pgbeam 0.3.6 → 0.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -222,6 +222,18 @@
222
222
  listRegions: {
223
223
  method: "GET",
224
224
  path: "/v1/regions"
225
+ },
226
+ listSelfHostEnrollments: {
227
+ method: "GET",
228
+ path: "/v1/organizations/{org_id}/self-host-enrollments"
229
+ },
230
+ createSelfHostEnrollment: {
231
+ method: "POST",
232
+ path: "/v1/organizations/{org_id}/self-host-enrollments"
233
+ },
234
+ revokeSelfHostEnrollment: {
235
+ method: "DELETE",
236
+ path: "/v1/organizations/{org_id}/self-host-enrollments/{enrollment_id}"
225
237
  }
226
238
  },
227
239
  migrations: {
@@ -592,6 +604,21 @@ const operationsByPath = {
592
604
  path: "/v1/databases/{database_id}/replicas/{replica_id}",
593
605
  operationId: "deleteReplica"
594
606
  },
607
+ "GET /v1/organizations/{org_id}/self-host-enrollments": {
608
+ method: "GET",
609
+ path: "/v1/organizations/{org_id}/self-host-enrollments",
610
+ operationId: "listSelfHostEnrollments"
611
+ },
612
+ "POST /v1/organizations/{org_id}/self-host-enrollments": {
613
+ method: "POST",
614
+ path: "/v1/organizations/{org_id}/self-host-enrollments",
615
+ operationId: "createSelfHostEnrollment"
616
+ },
617
+ "DELETE /v1/organizations/{org_id}/self-host-enrollments/{enrollment_id}": {
618
+ method: "DELETE",
619
+ path: "/v1/organizations/{org_id}/self-host-enrollments/{enrollment_id}",
620
+ operationId: "revokeSelfHostEnrollment"
621
+ },
595
622
  "GET /v1/organizations/{org_id}/support/cases": {
596
623
  method: "GET",
597
624
  path: "/v1/organizations/{org_id}/support/cases",
@@ -817,13 +844,15 @@ async function parseResponseBody(response) {
817
844
  if (contentType?.includes("application/json")) {
818
845
  return response.json();
819
846
  }
820
- // Fallback: try JSON, return undefined if body is empty/non-JSON
847
+ // Non-JSON body (e.g. text/csv from audit-log export). Parse opportunistically
848
+ // in case the server mislabels JSON, but fall back to the raw text so callers
849
+ // get the payload instead of undefined. Only an empty body is undefined.
821
850
  const text = await response.text();
822
851
  if (!text) return undefined;
823
852
  try {
824
853
  return JSON.parse(text);
825
854
  } catch {
826
- return undefined;
855
+ return text;
827
856
  }
828
857
  }
829
858
  function sleep(ms) {
@@ -492,7 +492,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
492
492
  "parameters": [],
493
493
  "requestBodyType": "",
494
494
  "requestBodyRequired": false,
495
- "responseType": "{ plans: ({ annual_price?: number; description?: string; label: string; limits: { bytes_per_month: number; included_seats: number; max_connections: number; max_databases: number; max_projects: number; max_query_shapes: number; queries_per_day: number; queries_per_second: number }; monthly_price: number; name: string; overage_text?: string; trial_days?: number })[] }",
495
+ "responseType": "{ plans: ({ annual_price?: number; description?: string; label: string; limits: { audit_retention_days: number; bytes_per_month: number; included_seats: number; max_agent_credentials: number; max_connections: number; max_databases: number; max_projects: number; max_query_shapes: number; queries_per_day: number; queries_per_second: number; sandbox_idle_seconds: number; sandbox_max_branches: number; sandbox_max_upstream_bytes: number; sandbox_ttl_seconds: number }; monthly_price: number; name: string; overage_text?: string; trial_days?: number })[] }",
496
496
  "responseStatus": "200"
497
497
  },
498
498
  "getOrganizationPlan": {
@@ -512,7 +512,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
512
512
  ],
513
513
  "requestBodyType": "",
514
514
  "requestBodyRequired": false,
515
- "responseType": "{ billing_provider?: \"stripe\" | \"vercel\" | \"aws\" | \"manual\"; created_at?: string; current_period_end?: string; custom_pricing?: boolean; enabled?: boolean; limits: { bytes_per_month: number; included_seats: number; max_connections: number; max_databases: number; max_projects: number; max_query_shapes: number; queries_per_day: number; queries_per_second: number }; org_id: string; plan: \"starter\" | \"pro\" | \"scale\" | \"enterprise\"; spend_limit?: number; subscription_status?: \"none\" | \"active\" | \"trialing\" | \"past_due\" | \"canceled\" | \"unpaid\" | \"incomplete\" | \"incomplete_expired\" | \"paused\"; updated_at?: string }",
515
+ "responseType": "{ billing_provider?: \"stripe\" | \"vercel\" | \"aws\" | \"manual\"; created_at?: string; current_period_end?: string; custom_pricing?: boolean; enabled?: boolean; limits: { audit_retention_days: number; bytes_per_month: number; included_seats: number; max_agent_credentials: number; max_connections: number; max_databases: number; max_projects: number; max_query_shapes: number; queries_per_day: number; queries_per_second: number; sandbox_idle_seconds: number; sandbox_max_branches: number; sandbox_max_upstream_bytes: number; sandbox_ttl_seconds: number }; org_id: string; plan: \"starter\" | \"pro\" | \"scale\" | \"enterprise\"; spend_capped?: boolean; spend_capped_at?: string; spend_limit?: number; subscription_status?: \"none\" | \"active\" | \"trialing\" | \"past_due\" | \"canceled\" | \"unpaid\" | \"incomplete\" | \"incomplete_expired\" | \"paused\"; updated_at?: string }",
516
516
  "responseStatus": "200"
517
517
  },
518
518
  "getVercelInstallation": {
@@ -552,7 +552,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
552
552
  ],
553
553
  "requestBodyType": "{ spend_limit?: number }",
554
554
  "requestBodyRequired": true,
555
- "responseType": "{ billing_provider?: \"stripe\" | \"vercel\" | \"aws\" | \"manual\"; created_at?: string; current_period_end?: string; custom_pricing?: boolean; enabled?: boolean; limits: { bytes_per_month: number; included_seats: number; max_connections: number; max_databases: number; max_projects: number; max_query_shapes: number; queries_per_day: number; queries_per_second: number }; org_id: string; plan: \"starter\" | \"pro\" | \"scale\" | \"enterprise\"; spend_limit?: number; subscription_status?: \"none\" | \"active\" | \"trialing\" | \"past_due\" | \"canceled\" | \"unpaid\" | \"incomplete\" | \"incomplete_expired\" | \"paused\"; updated_at?: string }",
555
+ "responseType": "{ billing_provider?: \"stripe\" | \"vercel\" | \"aws\" | \"manual\"; created_at?: string; current_period_end?: string; custom_pricing?: boolean; enabled?: boolean; limits: { audit_retention_days: number; bytes_per_month: number; included_seats: number; max_agent_credentials: number; max_connections: number; max_databases: number; max_projects: number; max_query_shapes: number; queries_per_day: number; queries_per_second: number; sandbox_idle_seconds: number; sandbox_max_branches: number; sandbox_max_upstream_bytes: number; sandbox_ttl_seconds: number }; org_id: string; plan: \"starter\" | \"pro\" | \"scale\" | \"enterprise\"; spend_capped?: boolean; spend_capped_at?: string; spend_limit?: number; subscription_status?: \"none\" | \"active\" | \"trialing\" | \"past_due\" | \"canceled\" | \"unpaid\" | \"incomplete\" | \"incomplete_expired\" | \"paused\"; updated_at?: string }",
556
556
  "responseStatus": "200"
557
557
  },
558
558
  "submitCancellationFeedback": {
@@ -1179,7 +1179,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
1179
1179
  ],
1180
1180
  "requestBodyType": "",
1181
1181
  "requestBodyRequired": false,
1182
- "responseType": "{ next_page_token?: string; policies: ({ access_mode: \"read_only\" | \"read_write\"; approval_auto_max_rows?: number; approval_mode?: \"off\" | \"writes\" | \"ddl\" | \"all\"; approval_timeout_seconds?: number; budget_queries_per_day?: number; budget_queries_per_hour?: number; created_at: string; egress_bytes_per_day?: number; id: string; masking_rules: ({ column: string; kind: \"redact\" | \"null\" | \"hash\"; table: string })[]; max_rows?: number; migration_safety?: \"off\" | \"warn\" | \"block\"; name: string; project_id: string; row_filters?: ({ predicate: string; table: string })[]; statement_rules?: { allow?: string[]; deny?: string[] }; statement_timeout_ms?: number; table_allowlist: string[]; table_denylist: string[]; updated_at: string; write_mode?: \"normal\" | \"rollback\" | \"sandbox\" })[] }",
1182
+ "responseType": "{ next_page_token?: string; policies: ({ access_mode: \"read_only\" | \"read_write\"; approval_auto_max_rows?: number; approval_mode?: \"off\" | \"writes\" | \"ddl\" | \"all\"; approval_timeout_seconds?: number; budget_queries_per_day?: number; budget_queries_per_hour?: number; created_at: string; egress_bytes_per_day?: number; id: string; masking_rules: ({ column: string; kind: \"redact\" | \"null\" | \"hash\"; table: string })[]; max_affected_rows?: number; max_rows?: number; migration_safety?: \"off\" | \"warn\" | \"block\"; name: string; project_id: string; row_filters?: ({ predicate: string; table: string })[]; statement_rules?: { allow?: string[]; deny?: string[] }; statement_timeout_ms?: number; table_allowlist: string[]; table_denylist: string[]; updated_at: string; write_mode?: \"normal\" | \"rollback\" | \"sandbox\" })[] }",
1183
1183
  "responseStatus": "200"
1184
1184
  },
1185
1185
  "createPolicyProfile": {
@@ -1197,9 +1197,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
1197
1197
  "description": "Unique project identifier (prefixed, e.g. prj_xxx)."
1198
1198
  }
1199
1199
  ],
1200
- "requestBodyType": "{ access_mode?: \"read_only\" | \"read_write\"; approval_auto_max_rows?: number; approval_mode?: \"off\" | \"writes\" | \"ddl\" | \"all\"; approval_timeout_seconds?: number; budget_queries_per_day?: number; budget_queries_per_hour?: number; egress_bytes_per_day?: number; masking_rules?: ({ column: string; kind: \"redact\" | \"null\" | \"hash\"; table: string })[]; max_rows?: number; migration_safety?: \"off\" | \"warn\" | \"block\"; name: string; row_filters?: ({ predicate: string; table: string })[]; statement_rules?: { allow?: string[]; deny?: string[] }; statement_timeout_ms?: number; table_allowlist?: string[]; table_denylist?: string[]; write_mode?: \"normal\" | \"rollback\" | \"sandbox\" }",
1200
+ "requestBodyType": "{ access_mode?: \"read_only\" | \"read_write\"; approval_auto_max_rows?: number; approval_mode?: \"off\" | \"writes\" | \"ddl\" | \"all\"; approval_timeout_seconds?: number; budget_queries_per_day?: number; budget_queries_per_hour?: number; egress_bytes_per_day?: number; masking_rules?: ({ column: string; kind: \"redact\" | \"null\" | \"hash\"; table: string })[]; max_affected_rows?: number; max_rows?: number; migration_safety?: \"off\" | \"warn\" | \"block\"; name: string; row_filters?: ({ predicate: string; table: string })[]; statement_rules?: { allow?: string[]; deny?: string[] }; statement_timeout_ms?: number; table_allowlist?: string[]; table_denylist?: string[]; write_mode?: \"normal\" | \"rollback\" | \"sandbox\" }",
1201
1201
  "requestBodyRequired": true,
1202
- "responseType": "{ access_mode: \"read_only\" | \"read_write\"; approval_auto_max_rows?: number; approval_mode?: \"off\" | \"writes\" | \"ddl\" | \"all\"; approval_timeout_seconds?: number; budget_queries_per_day?: number; budget_queries_per_hour?: number; created_at: string; egress_bytes_per_day?: number; id: string; masking_rules: ({ column: string; kind: \"redact\" | \"null\" | \"hash\"; table: string })[]; max_rows?: number; migration_safety?: \"off\" | \"warn\" | \"block\"; name: string; project_id: string; row_filters?: ({ predicate: string; table: string })[]; statement_rules?: { allow?: string[]; deny?: string[] }; statement_timeout_ms?: number; table_allowlist: string[]; table_denylist: string[]; updated_at: string; write_mode?: \"normal\" | \"rollback\" | \"sandbox\" }",
1202
+ "responseType": "{ access_mode: \"read_only\" | \"read_write\"; approval_auto_max_rows?: number; approval_mode?: \"off\" | \"writes\" | \"ddl\" | \"all\"; approval_timeout_seconds?: number; budget_queries_per_day?: number; budget_queries_per_hour?: number; created_at: string; egress_bytes_per_day?: number; id: string; masking_rules: ({ column: string; kind: \"redact\" | \"null\" | \"hash\"; table: string })[]; max_affected_rows?: number; max_rows?: number; migration_safety?: \"off\" | \"warn\" | \"block\"; name: string; project_id: string; row_filters?: ({ predicate: string; table: string })[]; statement_rules?: { allow?: string[]; deny?: string[] }; statement_timeout_ms?: number; table_allowlist: string[]; table_denylist: string[]; updated_at: string; write_mode?: \"normal\" | \"rollback\" | \"sandbox\" }",
1203
1203
  "responseStatus": "201"
1204
1204
  },
1205
1205
  "getPolicyProfile": {
@@ -1226,7 +1226,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
1226
1226
  ],
1227
1227
  "requestBodyType": "",
1228
1228
  "requestBodyRequired": false,
1229
- "responseType": "{ access_mode: \"read_only\" | \"read_write\"; approval_auto_max_rows?: number; approval_mode?: \"off\" | \"writes\" | \"ddl\" | \"all\"; approval_timeout_seconds?: number; budget_queries_per_day?: number; budget_queries_per_hour?: number; created_at: string; egress_bytes_per_day?: number; id: string; masking_rules: ({ column: string; kind: \"redact\" | \"null\" | \"hash\"; table: string })[]; max_rows?: number; migration_safety?: \"off\" | \"warn\" | \"block\"; name: string; project_id: string; row_filters?: ({ predicate: string; table: string })[]; statement_rules?: { allow?: string[]; deny?: string[] }; statement_timeout_ms?: number; table_allowlist: string[]; table_denylist: string[]; updated_at: string; write_mode?: \"normal\" | \"rollback\" | \"sandbox\" }",
1229
+ "responseType": "{ access_mode: \"read_only\" | \"read_write\"; approval_auto_max_rows?: number; approval_mode?: \"off\" | \"writes\" | \"ddl\" | \"all\"; approval_timeout_seconds?: number; budget_queries_per_day?: number; budget_queries_per_hour?: number; created_at: string; egress_bytes_per_day?: number; id: string; masking_rules: ({ column: string; kind: \"redact\" | \"null\" | \"hash\"; table: string })[]; max_affected_rows?: number; max_rows?: number; migration_safety?: \"off\" | \"warn\" | \"block\"; name: string; project_id: string; row_filters?: ({ predicate: string; table: string })[]; statement_rules?: { allow?: string[]; deny?: string[] }; statement_timeout_ms?: number; table_allowlist: string[]; table_denylist: string[]; updated_at: string; write_mode?: \"normal\" | \"rollback\" | \"sandbox\" }",
1230
1230
  "responseStatus": "200"
1231
1231
  },
1232
1232
  "updatePolicyProfile": {
@@ -1251,9 +1251,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
1251
1251
  "description": "Unique policy profile identifier (prefixed, e.g. pol_xxx)."
1252
1252
  }
1253
1253
  ],
1254
- "requestBodyType": "{ access_mode?: \"read_only\" | \"read_write\"; approval_auto_max_rows?: number; approval_mode?: \"off\" | \"writes\" | \"ddl\" | \"all\"; approval_timeout_seconds?: number; budget_queries_per_day?: number; budget_queries_per_hour?: number; egress_bytes_per_day?: number; masking_rules?: ({ column: string; kind: \"redact\" | \"null\" | \"hash\"; table: string })[]; max_rows?: number; migration_safety?: \"off\" | \"warn\" | \"block\"; name: string; row_filters?: ({ predicate: string; table: string })[]; statement_rules?: { allow?: string[]; deny?: string[] }; statement_timeout_ms?: number; table_allowlist?: string[]; table_denylist?: string[]; write_mode?: \"normal\" | \"rollback\" | \"sandbox\" }",
1254
+ "requestBodyType": "{ access_mode?: \"read_only\" | \"read_write\"; approval_auto_max_rows?: number; approval_mode?: \"off\" | \"writes\" | \"ddl\" | \"all\"; approval_timeout_seconds?: number; budget_queries_per_day?: number; budget_queries_per_hour?: number; egress_bytes_per_day?: number; masking_rules?: ({ column: string; kind: \"redact\" | \"null\" | \"hash\"; table: string })[]; max_affected_rows?: number; max_rows?: number; migration_safety?: \"off\" | \"warn\" | \"block\"; name: string; row_filters?: ({ predicate: string; table: string })[]; statement_rules?: { allow?: string[]; deny?: string[] }; statement_timeout_ms?: number; table_allowlist?: string[]; table_denylist?: string[]; write_mode?: \"normal\" | \"rollback\" | \"sandbox\" }",
1255
1255
  "requestBodyRequired": true,
1256
- "responseType": "{ access_mode: \"read_only\" | \"read_write\"; approval_auto_max_rows?: number; approval_mode?: \"off\" | \"writes\" | \"ddl\" | \"all\"; approval_timeout_seconds?: number; budget_queries_per_day?: number; budget_queries_per_hour?: number; created_at: string; egress_bytes_per_day?: number; id: string; masking_rules: ({ column: string; kind: \"redact\" | \"null\" | \"hash\"; table: string })[]; max_rows?: number; migration_safety?: \"off\" | \"warn\" | \"block\"; name: string; project_id: string; row_filters?: ({ predicate: string; table: string })[]; statement_rules?: { allow?: string[]; deny?: string[] }; statement_timeout_ms?: number; table_allowlist: string[]; table_denylist: string[]; updated_at: string; write_mode?: \"normal\" | \"rollback\" | \"sandbox\" }",
1256
+ "responseType": "{ access_mode: \"read_only\" | \"read_write\"; approval_auto_max_rows?: number; approval_mode?: \"off\" | \"writes\" | \"ddl\" | \"all\"; approval_timeout_seconds?: number; budget_queries_per_day?: number; budget_queries_per_hour?: number; created_at: string; egress_bytes_per_day?: number; id: string; masking_rules: ({ column: string; kind: \"redact\" | \"null\" | \"hash\"; table: string })[]; max_affected_rows?: number; max_rows?: number; migration_safety?: \"off\" | \"warn\" | \"block\"; name: string; project_id: string; row_filters?: ({ predicate: string; table: string })[]; statement_rules?: { allow?: string[]; deny?: string[] }; statement_timeout_ms?: number; table_allowlist: string[]; table_denylist: string[]; updated_at: string; write_mode?: \"normal\" | \"rollback\" | \"sandbox\" }",
1257
1257
  "responseStatus": "200"
1258
1258
  },
1259
1259
  "deletePolicyProfile": {
@@ -1288,7 +1288,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
1288
1288
  "method": "POST",
1289
1289
  "path": "/v1/projects/{project_id}/policy-evaluations",
1290
1290
  "summary": "Dry-eval a policy against a SQL statement",
1291
- "description": "Evaluates a single SQL statement against a policy — either a draft policy supplied inline or an existing policy referenced by id — and returns the decision the proxy would make: allow, block, mask, or row-filter. The evaluation reuses the data plane's own policy engine (the same parser, allow/block rules, row-filter rewriter, and masking analysis enforced on live agent sessions), so a what-if verdict matches real enforcement. Stateful checks a single-statement preview cannot model — per-region query and egress budgets, human approvals, and rollback/sandbox write routing — are reported as informational notes, not verdicts. This is a pure compute endpoint; it does not connect to the upstream database and persists nothing.",
1291
+ "description": "Evaluates a single SQL statement against a policy (either a draft policy supplied inline or an existing policy referenced by id) and returns the decision the proxy would make: allow, block, mask, or row-filter. The evaluation reuses the data plane's own policy engine (the same parser, allow/block rules, row-filter rewriter, and masking analysis enforced on live agent sessions), so a what-if verdict matches real enforcement. Stateful checks a single-statement preview cannot model (per-region query and egress budgets, human approvals, and rollback/sandbox write routing) are reported as informational notes, not verdicts. This is a pure compute endpoint; it does not connect to the upstream database and persists nothing.",
1292
1292
  "parameters": [
1293
1293
  {
1294
1294
  "name": "project_id",
@@ -1298,7 +1298,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
1298
1298
  "description": "Unique project identifier (prefixed, e.g. prj_xxx)."
1299
1299
  }
1300
1300
  ],
1301
- "requestBodyType": "{ policy?: { access_mode?: \"read_only\" | \"read_write\"; approval_auto_max_rows?: number; approval_mode?: \"off\" | \"writes\" | \"ddl\" | \"all\"; approval_timeout_seconds?: number; budget_queries_per_day?: number; budget_queries_per_hour?: number; egress_bytes_per_day?: number; masking_rules?: ({ column: string; kind: \"redact\" | \"null\" | \"hash\"; table: string })[]; max_rows?: number; migration_safety?: \"off\" | \"warn\" | \"block\"; name: string; row_filters?: ({ predicate: string; table: string })[]; statement_rules?: { allow?: string[]; deny?: string[] }; statement_timeout_ms?: number; table_allowlist?: string[]; table_denylist?: string[]; write_mode?: \"normal\" | \"rollback\" | \"sandbox\" }; policy_id?: string; sql: string }",
1301
+ "requestBodyType": "{ policy?: { access_mode?: \"read_only\" | \"read_write\"; approval_auto_max_rows?: number; approval_mode?: \"off\" | \"writes\" | \"ddl\" | \"all\"; approval_timeout_seconds?: number; budget_queries_per_day?: number; budget_queries_per_hour?: number; egress_bytes_per_day?: number; masking_rules?: ({ column: string; kind: \"redact\" | \"null\" | \"hash\"; table: string })[]; max_affected_rows?: number; max_rows?: number; migration_safety?: \"off\" | \"warn\" | \"block\"; name: string; row_filters?: ({ predicate: string; table: string })[]; statement_rules?: { allow?: string[]; deny?: string[] }; statement_timeout_ms?: number; table_allowlist?: string[]; table_denylist?: string[]; write_mode?: \"normal\" | \"rollback\" | \"sandbox\" }; policy_id?: string; sql: string }",
1302
1302
  "requestBodyRequired": true,
1303
1303
  "responseType": "{ hint?: string; masked_columns?: ({ column: string; kind: \"redact\" | \"null\" | \"hash\" })[]; notes?: string[]; reason: string; rewritten_sql?: string; row_filter_predicate?: string; rule: string; verdict: \"allow\" | \"block\" | \"mask\" | \"row-filter\" }",
1304
1304
  "responseStatus": "200"
@@ -1341,7 +1341,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
1341
1341
  ],
1342
1342
  "requestBodyType": "",
1343
1343
  "requestBodyRequired": false,
1344
- "responseType": "{ next_page_token?: string; projects: ({ active_connections?: number; agents_disabled?: boolean; allowed_cidrs?: ({ cidr: string; label?: string })[]; burst_size?: number; cloud?: \"aws\" | \"azure\" | \"gcp\"; created_at: string; database_count?: number; default_policy_profile_id?: string; description?: string; id: string; max_connections?: number; name: string; org_id: string; proxy_host?: string; queries_per_second?: number; status: \"active\" | \"suspended\" | \"deleted\"; tags?: string[]; updated_at: string })[]; total: number }",
1344
+ "responseType": "{ next_page_token?: string; projects: ({ active_connections?: number; agents_disabled?: boolean; allowed_cidrs?: ({ cidr: string; label?: string })[]; burst_size?: number; cloud?: \"aws\" | \"azure\" | \"gcp\"; created_at: string; database_count?: number; default_policy_profile_id?: string; description?: string; id: string; max_connections?: number; name: string; org_id: string; proxy_host?: string; queries_per_second?: number; residency?: \"any\" | \"us\" | \"eu\"; self_hosted?: boolean; status: \"active\" | \"suspended\" | \"deleted\"; tags?: string[]; updated_at: string })[]; total: number }",
1345
1345
  "responseStatus": "200"
1346
1346
  },
1347
1347
  "createProject": {
@@ -1351,9 +1351,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
1351
1351
  "summary": "Create a project",
1352
1352
  "description": "Creates a new project within the specified organization.",
1353
1353
  "parameters": [],
1354
- "requestBodyType": "{ cloud?: \"aws\" | \"azure\" | \"gcp\"; database: { auto_read_routing?: boolean; cache_config?: { enabled: boolean; max_entries: number; swr_seconds: number; ttl_seconds: number }; host: string; name: string; password: string; pool_config?: { max_active?: number; min_pool_size: number; pool_mode: \"session\" | \"transaction\" | \"statement\"; pool_size: number }; pool_region?: string; port: number; query_timeout_ms?: number; role?: \"primary\" | \"replica\"; ssl_mode?: \"disable\" | \"allow\" | \"prefer\" | \"require\" | \"verify-ca\" | \"verify-full\"; username: string }; description?: string; name: string; org_id: string; tags?: string[] }",
1354
+ "requestBodyType": "{ cloud?: \"aws\" | \"azure\" | \"gcp\"; database: { auto_read_routing?: boolean; cache_config?: { enabled: boolean; max_entries: number; swr_seconds: number; ttl_seconds: number }; host: string; name: string; password: string; pool_config?: { max_active?: number; min_pool_size: number; pool_mode: \"session\" | \"transaction\" | \"statement\"; pool_size: number }; pool_region?: string; port: number; query_timeout_ms?: number; role?: \"primary\" | \"replica\"; ssl_mode?: \"disable\" | \"allow\" | \"prefer\" | \"require\" | \"verify-ca\" | \"verify-full\"; username: string }; description?: string; name: string; org_id: string; self_hosted?: boolean; tags?: string[] }",
1355
1355
  "requestBodyRequired": true,
1356
- "responseType": "{ database?: { auto_read_routing?: boolean; cache_config: { enabled: boolean; max_entries: number; swr_seconds: number; ttl_seconds: number }; connection_string?: string; created_at: string; host: string; id: string; name: string; pool_config: { max_active?: number; min_pool_size: number; pool_mode: \"session\" | \"transaction\" | \"statement\"; pool_size: number }; pool_region?: string; port: number; project_id: string; query_timeout_ms?: number; role?: \"primary\" | \"replica\"; ssl_mode: \"disable\" | \"allow\" | \"prefer\" | \"require\" | \"verify-ca\" | \"verify-full\"; updated_at: string; username: string }; project: { active_connections?: number; agents_disabled?: boolean; allowed_cidrs?: ({ cidr: string; label?: string })[]; burst_size?: number; cloud?: \"aws\" | \"azure\" | \"gcp\"; created_at: string; database_count?: number; default_policy_profile_id?: string; description?: string; id: string; max_connections?: number; name: string; org_id: string; proxy_host?: string; queries_per_second?: number; status: \"active\" | \"suspended\" | \"deleted\"; tags?: string[]; updated_at: string } }",
1356
+ "responseType": "{ database?: { auto_read_routing?: boolean; cache_config: { enabled: boolean; max_entries: number; swr_seconds: number; ttl_seconds: number }; connection_string?: string; created_at: string; host: string; id: string; name: string; pool_config: { max_active?: number; min_pool_size: number; pool_mode: \"session\" | \"transaction\" | \"statement\"; pool_size: number }; pool_region?: string; port: number; project_id: string; query_timeout_ms?: number; role?: \"primary\" | \"replica\"; ssl_mode: \"disable\" | \"allow\" | \"prefer\" | \"require\" | \"verify-ca\" | \"verify-full\"; updated_at: string; username: string }; project: { active_connections?: number; agents_disabled?: boolean; allowed_cidrs?: ({ cidr: string; label?: string })[]; burst_size?: number; cloud?: \"aws\" | \"azure\" | \"gcp\"; created_at: string; database_count?: number; default_policy_profile_id?: string; description?: string; id: string; max_connections?: number; name: string; org_id: string; proxy_host?: string; queries_per_second?: number; residency?: \"any\" | \"us\" | \"eu\"; self_hosted?: boolean; status: \"active\" | \"suspended\" | \"deleted\"; tags?: string[]; updated_at: string } }",
1357
1357
  "responseStatus": "201"
1358
1358
  },
1359
1359
  "getProject": {
@@ -1373,7 +1373,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
1373
1373
  ],
1374
1374
  "requestBodyType": "",
1375
1375
  "requestBodyRequired": false,
1376
- "responseType": "{ active_connections?: number; agents_disabled?: boolean; allowed_cidrs?: ({ cidr: string; label?: string })[]; burst_size?: number; cloud?: \"aws\" | \"azure\" | \"gcp\"; created_at: string; database_count?: number; default_policy_profile_id?: string; description?: string; id: string; max_connections?: number; name: string; org_id: string; proxy_host?: string; queries_per_second?: number; status: \"active\" | \"suspended\" | \"deleted\"; tags?: string[]; updated_at: string }",
1376
+ "responseType": "{ active_connections?: number; agents_disabled?: boolean; allowed_cidrs?: ({ cidr: string; label?: string })[]; burst_size?: number; cloud?: \"aws\" | \"azure\" | \"gcp\"; created_at: string; database_count?: number; default_policy_profile_id?: string; description?: string; id: string; max_connections?: number; name: string; org_id: string; proxy_host?: string; queries_per_second?: number; residency?: \"any\" | \"us\" | \"eu\"; self_hosted?: boolean; status: \"active\" | \"suspended\" | \"deleted\"; tags?: string[]; updated_at: string }",
1377
1377
  "responseStatus": "200"
1378
1378
  },
1379
1379
  "updateProject": {
@@ -1391,9 +1391,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
1391
1391
  "description": "Unique project identifier (prefixed, e.g. prj_xxx)."
1392
1392
  }
1393
1393
  ],
1394
- "requestBodyType": "{ agents_disabled?: boolean; allowed_cidrs?: ({ cidr: string; label?: string })[]; default_policy_profile_id?: string; description?: string; name?: string; status?: \"active\" | \"suspended\" | \"deleted\"; tags?: string[] }",
1394
+ "requestBodyType": "{ agents_disabled?: boolean; allowed_cidrs?: ({ cidr: string; label?: string })[]; default_policy_profile_id?: string; description?: string; name?: string; residency?: \"any\" | \"us\" | \"eu\"; status?: \"active\" | \"suspended\" | \"deleted\"; tags?: string[] }",
1395
1395
  "requestBodyRequired": true,
1396
- "responseType": "{ active_connections?: number; agents_disabled?: boolean; allowed_cidrs?: ({ cidr: string; label?: string })[]; burst_size?: number; cloud?: \"aws\" | \"azure\" | \"gcp\"; created_at: string; database_count?: number; default_policy_profile_id?: string; description?: string; id: string; max_connections?: number; name: string; org_id: string; proxy_host?: string; queries_per_second?: number; status: \"active\" | \"suspended\" | \"deleted\"; tags?: string[]; updated_at: string }",
1396
+ "responseType": "{ active_connections?: number; agents_disabled?: boolean; allowed_cidrs?: ({ cidr: string; label?: string })[]; burst_size?: number; cloud?: \"aws\" | \"azure\" | \"gcp\"; created_at: string; database_count?: number; default_policy_profile_id?: string; description?: string; id: string; max_connections?: number; name: string; org_id: string; proxy_host?: string; queries_per_second?: number; residency?: \"any\" | \"us\" | \"eu\"; self_hosted?: boolean; status: \"active\" | \"suspended\" | \"deleted\"; tags?: string[]; updated_at: string }",
1397
1397
  "responseStatus": "200"
1398
1398
  },
1399
1399
  "deleteProject": {
@@ -1529,6 +1529,73 @@ Object.defineProperty(exports, '__esModule', { value: true });
1529
1529
  "responseType": "",
1530
1530
  "responseStatus": "204"
1531
1531
  },
1532
+ "listSelfHostEnrollments": {
1533
+ "operationId": "listSelfHostEnrollments",
1534
+ "method": "GET",
1535
+ "path": "/v1/organizations/{org_id}/self-host-enrollments",
1536
+ "summary": "List self-host enrollments",
1537
+ "description": "Lists an organization's self-host enrollments. Tokens are never returned.",
1538
+ "parameters": [
1539
+ {
1540
+ "name": "org_id",
1541
+ "in": "path",
1542
+ "required": true,
1543
+ "type": "string",
1544
+ "description": "Unique organization identifier."
1545
+ }
1546
+ ],
1547
+ "requestBodyType": "",
1548
+ "requestBodyRequired": false,
1549
+ "responseType": "{ enrollments: ({ created_at: string; created_by?: string; description?: string; id: string; last_seen_at?: string; org_id: string; region_label?: string; revoked_at?: string })[] }",
1550
+ "responseStatus": "200"
1551
+ },
1552
+ "createSelfHostEnrollment": {
1553
+ "operationId": "createSelfHostEnrollment",
1554
+ "method": "POST",
1555
+ "path": "/v1/organizations/{org_id}/self-host-enrollments",
1556
+ "summary": "Issue a self-host enrollment token",
1557
+ "description": "Issues an enrollment token a self-hosted (BYOC) proxy uses to authenticate to the control plane's config/audit gRPC stream. The token is returned once and cannot be retrieved again. Requires the Scale or enterprise plan.",
1558
+ "parameters": [
1559
+ {
1560
+ "name": "org_id",
1561
+ "in": "path",
1562
+ "required": true,
1563
+ "type": "string",
1564
+ "description": "Unique organization identifier."
1565
+ }
1566
+ ],
1567
+ "requestBodyType": "{ description?: string; region_label?: string }",
1568
+ "requestBodyRequired": false,
1569
+ "responseType": "{ enrollment: { created_at: string; created_by?: string; description?: string; id: string; last_seen_at?: string; org_id: string; region_label?: string; revoked_at?: string }; token: string }",
1570
+ "responseStatus": "201"
1571
+ },
1572
+ "revokeSelfHostEnrollment": {
1573
+ "operationId": "revokeSelfHostEnrollment",
1574
+ "method": "DELETE",
1575
+ "path": "/v1/organizations/{org_id}/self-host-enrollments/{enrollment_id}",
1576
+ "summary": "Revoke a self-host enrollment",
1577
+ "description": "Revokes an enrollment so its token can no longer authenticate a proxy. Connected proxies keep their last-known config until they reconnect.",
1578
+ "parameters": [
1579
+ {
1580
+ "name": "org_id",
1581
+ "in": "path",
1582
+ "required": true,
1583
+ "type": "string",
1584
+ "description": "Unique organization identifier."
1585
+ },
1586
+ {
1587
+ "name": "enrollment_id",
1588
+ "in": "path",
1589
+ "required": true,
1590
+ "type": "string",
1591
+ "description": "Unique enrollment identifier."
1592
+ }
1593
+ ],
1594
+ "requestBodyType": "",
1595
+ "requestBodyRequired": false,
1596
+ "responseType": "",
1597
+ "responseStatus": "204"
1598
+ },
1532
1599
  "listSupportCases": {
1533
1600
  "operationId": "listSupportCases",
1534
1601
  "method": "GET",
@@ -2146,6 +2213,18 @@ Object.defineProperty(exports, '__esModule', { value: true });
2146
2213
  listRegions: {
2147
2214
  method: "GET",
2148
2215
  path: "/v1/regions"
2216
+ },
2217
+ listSelfHostEnrollments: {
2218
+ method: "GET",
2219
+ path: "/v1/organizations/{org_id}/self-host-enrollments"
2220
+ },
2221
+ createSelfHostEnrollment: {
2222
+ method: "POST",
2223
+ path: "/v1/organizations/{org_id}/self-host-enrollments"
2224
+ },
2225
+ revokeSelfHostEnrollment: {
2226
+ method: "DELETE",
2227
+ path: "/v1/organizations/{org_id}/self-host-enrollments/{enrollment_id}"
2149
2228
  }
2150
2229
  },
2151
2230
  migrations: {
@@ -2516,6 +2595,21 @@ const operationsByPath = {
2516
2595
  path: "/v1/databases/{database_id}/replicas/{replica_id}",
2517
2596
  operationId: "deleteReplica"
2518
2597
  },
2598
+ "GET /v1/organizations/{org_id}/self-host-enrollments": {
2599
+ method: "GET",
2600
+ path: "/v1/organizations/{org_id}/self-host-enrollments",
2601
+ operationId: "listSelfHostEnrollments"
2602
+ },
2603
+ "POST /v1/organizations/{org_id}/self-host-enrollments": {
2604
+ method: "POST",
2605
+ path: "/v1/organizations/{org_id}/self-host-enrollments",
2606
+ operationId: "createSelfHostEnrollment"
2607
+ },
2608
+ "DELETE /v1/organizations/{org_id}/self-host-enrollments/{enrollment_id}": {
2609
+ method: "DELETE",
2610
+ path: "/v1/organizations/{org_id}/self-host-enrollments/{enrollment_id}",
2611
+ operationId: "revokeSelfHostEnrollment"
2612
+ },
2519
2613
  "GET /v1/organizations/{org_id}/support/cases": {
2520
2614
  method: "GET",
2521
2615
  path: "/v1/organizations/{org_id}/support/cases",