pgbeam 0.3.7 → 0.3.9

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
@@ -48,6 +48,10 @@
48
48
  exportAuditLogs: {
49
49
  method: "GET",
50
50
  path: "/v1/projects/{project_id}/audit-logs/export"
51
+ },
52
+ verifyAuditChain: {
53
+ method: "GET",
54
+ path: "/v1/projects/{project_id}/audit-logs/verify"
51
55
  }
52
56
  },
53
57
  anomalies: {
@@ -222,6 +226,18 @@
222
226
  listRegions: {
223
227
  method: "GET",
224
228
  path: "/v1/regions"
229
+ },
230
+ listSelfHostEnrollments: {
231
+ method: "GET",
232
+ path: "/v1/organizations/{org_id}/self-host-enrollments"
233
+ },
234
+ createSelfHostEnrollment: {
235
+ method: "POST",
236
+ path: "/v1/organizations/{org_id}/self-host-enrollments"
237
+ },
238
+ revokeSelfHostEnrollment: {
239
+ method: "DELETE",
240
+ path: "/v1/organizations/{org_id}/self-host-enrollments/{enrollment_id}"
225
241
  }
226
242
  },
227
243
  migrations: {
@@ -254,6 +270,10 @@
254
270
  dryEvalPolicy: {
255
271
  method: "POST",
256
272
  path: "/v1/projects/{project_id}/policy-evaluations"
273
+ },
274
+ replayPolicy: {
275
+ method: "POST",
276
+ path: "/v1/projects/{project_id}/policy-replays"
257
277
  }
258
278
  },
259
279
  support: {
@@ -382,6 +402,11 @@ const operationsByPath = {
382
402
  path: "/v1/projects/{project_id}/audit-logs/export",
383
403
  operationId: "exportAuditLogs"
384
404
  },
405
+ "GET /v1/projects/{project_id}/audit-logs/verify": {
406
+ method: "GET",
407
+ path: "/v1/projects/{project_id}/audit-logs/verify",
408
+ operationId: "verifyAuditChain"
409
+ },
385
410
  "GET /v1/plans": {
386
411
  method: "GET",
387
412
  path: "/v1/plans",
@@ -542,6 +567,11 @@ const operationsByPath = {
542
567
  path: "/v1/projects/{project_id}/policy-evaluations",
543
568
  operationId: "dryEvalPolicy"
544
569
  },
570
+ "POST /v1/projects/{project_id}/policy-replays": {
571
+ method: "POST",
572
+ path: "/v1/projects/{project_id}/policy-replays",
573
+ operationId: "replayPolicy"
574
+ },
545
575
  "GET /v1/projects": {
546
576
  method: "GET",
547
577
  path: "/v1/projects",
@@ -592,6 +622,21 @@ const operationsByPath = {
592
622
  path: "/v1/databases/{database_id}/replicas/{replica_id}",
593
623
  operationId: "deleteReplica"
594
624
  },
625
+ "GET /v1/organizations/{org_id}/self-host-enrollments": {
626
+ method: "GET",
627
+ path: "/v1/organizations/{org_id}/self-host-enrollments",
628
+ operationId: "listSelfHostEnrollments"
629
+ },
630
+ "POST /v1/organizations/{org_id}/self-host-enrollments": {
631
+ method: "POST",
632
+ path: "/v1/organizations/{org_id}/self-host-enrollments",
633
+ operationId: "createSelfHostEnrollment"
634
+ },
635
+ "DELETE /v1/organizations/{org_id}/self-host-enrollments/{enrollment_id}": {
636
+ method: "DELETE",
637
+ path: "/v1/organizations/{org_id}/self-host-enrollments/{enrollment_id}",
638
+ operationId: "revokeSelfHostEnrollment"
639
+ },
595
640
  "GET /v1/organizations/{org_id}/support/cases": {
596
641
  method: "GET",
597
642
  path: "/v1/organizations/{org_id}/support/cases",
@@ -817,13 +862,15 @@ async function parseResponseBody(response) {
817
862
  if (contentType?.includes("application/json")) {
818
863
  return response.json();
819
864
  }
820
- // Fallback: try JSON, return undefined if body is empty/non-JSON
865
+ // Non-JSON body (e.g. text/csv from audit-log export). Parse opportunistically
866
+ // in case the server mislabels JSON, but fall back to the raw text so callers
867
+ // get the payload instead of undefined. Only an empty body is undefined.
821
868
  const text = await response.text();
822
869
  if (!text) return undefined;
823
870
  try {
824
871
  return JSON.parse(text);
825
872
  } catch {
826
- return undefined;
873
+ return text;
827
874
  }
828
875
  }
829
876
  function sleep(ms) {
@@ -418,7 +418,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
418
418
  ],
419
419
  "requestBodyType": "",
420
420
  "requestBodyRequired": false,
421
- "responseType": "{ entries: ({ bytes_out?: number; cache_status?: string; client_ip?: string; credential_id?: string; decision_rule?: string; event: string; id: string; latency_ms?: number; normalized_sql?: string; project_id: string; query_hash?: string; reason?: string; region?: string; rows_returned?: number; session_id?: string; source?: string; sql?: string; statement_kind?: string; ts: string })[]; next_page_token?: string }",
421
+ "responseType": "{ entries: ({ bytes_out?: number; cache_status?: string; client_ip?: string; credential_id?: string; decision_rule?: string; entry_hash?: string; event: string; id: string; latency_ms?: number; normalized_sql?: string; prev_hash?: string; project_id: string; query_hash?: string; reason?: string; region?: string; rows_returned?: number; seq?: number; session_id?: string; source?: string; sql?: string; statement_kind?: string; ts: string })[]; next_page_token?: string }",
422
422
  "responseStatus": "200"
423
423
  },
424
424
  "exportAuditLogs": {
@@ -483,6 +483,40 @@ Object.defineProperty(exports, '__esModule', { value: true });
483
483
  "responseType": "",
484
484
  "responseStatus": "200"
485
485
  },
486
+ "verifyAuditChain": {
487
+ "operationId": "verifyAuditChain",
488
+ "method": "GET",
489
+ "path": "/v1/projects/{project_id}/audit-logs/verify",
490
+ "summary": "Verify the tamper-evident audit chain",
491
+ "description": "Recomputes the project's audit hash chain over an optional time range and reports whether it is intact. Each audit entry is linked to its predecessor with a SHA-256 hash, so editing or deleting any row breaks the chain. On a break, the response reports the first sequence number where a tampered or deleted entry was detected. Requires the same audit:read permission as the list and export endpoints.",
492
+ "parameters": [
493
+ {
494
+ "name": "project_id",
495
+ "in": "path",
496
+ "required": true,
497
+ "type": "string",
498
+ "description": "Unique project identifier (prefixed, e.g. prj_xxx)."
499
+ },
500
+ {
501
+ "name": "start",
502
+ "in": "query",
503
+ "required": false,
504
+ "type": "string",
505
+ "description": "Return entries at or after this timestamp (inclusive lower bound)."
506
+ },
507
+ {
508
+ "name": "end",
509
+ "in": "query",
510
+ "required": false,
511
+ "type": "string",
512
+ "description": "Return entries strictly older than this timestamp (cursor / upper bound)."
513
+ }
514
+ ],
515
+ "requestBodyType": "",
516
+ "requestBodyRequired": false,
517
+ "responseType": "{ chain_end_seq?: number; chain_start_seq?: number; failure_reason?: string; first_broken_seq?: number; ok: boolean; unchained_count: number; verified_at: string; verified_count: number }",
518
+ "responseStatus": "200"
519
+ },
486
520
  "listPlans": {
487
521
  "operationId": "listPlans",
488
522
  "method": "GET",
@@ -492,7 +526,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
492
526
  "parameters": [],
493
527
  "requestBodyType": "",
494
528
  "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 })[] }",
529
+ "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
530
  "responseStatus": "200"
497
531
  },
498
532
  "getOrganizationPlan": {
@@ -512,7 +546,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
512
546
  ],
513
547
  "requestBodyType": "",
514
548
  "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_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 }",
549
+ "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
550
  "responseStatus": "200"
517
551
  },
518
552
  "getVercelInstallation": {
@@ -552,7 +586,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
552
586
  ],
553
587
  "requestBodyType": "{ spend_limit?: number }",
554
588
  "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_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 }",
589
+ "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
590
  "responseStatus": "200"
557
591
  },
558
592
  "submitCancellationFeedback": {
@@ -1303,6 +1337,26 @@ Object.defineProperty(exports, '__esModule', { value: true });
1303
1337
  "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
1338
  "responseStatus": "200"
1305
1339
  },
1340
+ "replayPolicy": {
1341
+ "operationId": "replayPolicy",
1342
+ "method": "POST",
1343
+ "path": "/v1/projects/{project_id}/policy-replays",
1344
+ "summary": "Replay recorded agent traffic against a policy",
1345
+ "description": "Replays the project's recorded agent audit traffic against a candidate policy (either a draft supplied inline or an existing policy referenced by id) and reports what would change: which queries that ran would now be blocked, which blocked queries would now be permitted, and which results would be masked or row-filtered. Traffic is deduplicated by normalized query shape, newest first, and every statement is evaluated through the data plane's own policy engine, so the verdicts match real enforcement. Stateful checks (budgets, approvals, write-mode routing) are reported as informational notes on each result, not verdicts. This endpoint reads only the audit log; it never connects to the upstream database and persists nothing.",
1346
+ "parameters": [
1347
+ {
1348
+ "name": "project_id",
1349
+ "in": "path",
1350
+ "required": true,
1351
+ "type": "string",
1352
+ "description": "Unique project identifier (prefixed, e.g. prj_xxx)."
1353
+ }
1354
+ ],
1355
+ "requestBodyType": "{ credential_id?: string; end_ts?: string; limit?: number; 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; start_ts?: string }",
1356
+ "requestBodyRequired": true,
1357
+ "responseType": "{ items: ({ change: \"newly_blocked\" | \"newly_allowed\" | \"still_allowed\" | \"still_blocked\"; first_seen: string; last_seen: string; occurrences: number; query_hash: string; recorded_event: string; recorded_rule?: string; result: { 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\" }; sql: string; statement_kind?: string })[]; summary: { distinct_queries: number; entries_scanned: number; evaluated: number; newly_allowed: number; newly_blocked: number; skipped_unparseable: number; truncated: boolean; would_allow: number; would_block: number; would_mask: number; would_row_filter: number } }",
1358
+ "responseStatus": "200"
1359
+ },
1306
1360
  "listProjects": {
1307
1361
  "operationId": "listProjects",
1308
1362
  "method": "GET",
@@ -1341,7 +1395,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
1341
1395
  ],
1342
1396
  "requestBodyType": "",
1343
1397
  "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 }",
1398
+ "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
1399
  "responseStatus": "200"
1346
1400
  },
1347
1401
  "createProject": {
@@ -1351,9 +1405,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
1351
1405
  "summary": "Create a project",
1352
1406
  "description": "Creates a new project within the specified organization.",
1353
1407
  "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[] }",
1408
+ "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
1409
  "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 } }",
1410
+ "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
1411
  "responseStatus": "201"
1358
1412
  },
1359
1413
  "getProject": {
@@ -1373,7 +1427,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
1373
1427
  ],
1374
1428
  "requestBodyType": "",
1375
1429
  "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 }",
1430
+ "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
1431
  "responseStatus": "200"
1378
1432
  },
1379
1433
  "updateProject": {
@@ -1391,9 +1445,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
1391
1445
  "description": "Unique project identifier (prefixed, e.g. prj_xxx)."
1392
1446
  }
1393
1447
  ],
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[] }",
1448
+ "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
1449
  "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 }",
1450
+ "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
1451
  "responseStatus": "200"
1398
1452
  },
1399
1453
  "deleteProject": {
@@ -1529,6 +1583,73 @@ Object.defineProperty(exports, '__esModule', { value: true });
1529
1583
  "responseType": "",
1530
1584
  "responseStatus": "204"
1531
1585
  },
1586
+ "listSelfHostEnrollments": {
1587
+ "operationId": "listSelfHostEnrollments",
1588
+ "method": "GET",
1589
+ "path": "/v1/organizations/{org_id}/self-host-enrollments",
1590
+ "summary": "List self-host enrollments",
1591
+ "description": "Lists an organization's self-host enrollments. Tokens are never returned.",
1592
+ "parameters": [
1593
+ {
1594
+ "name": "org_id",
1595
+ "in": "path",
1596
+ "required": true,
1597
+ "type": "string",
1598
+ "description": "Unique organization identifier."
1599
+ }
1600
+ ],
1601
+ "requestBodyType": "",
1602
+ "requestBodyRequired": false,
1603
+ "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 })[] }",
1604
+ "responseStatus": "200"
1605
+ },
1606
+ "createSelfHostEnrollment": {
1607
+ "operationId": "createSelfHostEnrollment",
1608
+ "method": "POST",
1609
+ "path": "/v1/organizations/{org_id}/self-host-enrollments",
1610
+ "summary": "Issue a self-host enrollment token",
1611
+ "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.",
1612
+ "parameters": [
1613
+ {
1614
+ "name": "org_id",
1615
+ "in": "path",
1616
+ "required": true,
1617
+ "type": "string",
1618
+ "description": "Unique organization identifier."
1619
+ }
1620
+ ],
1621
+ "requestBodyType": "{ description?: string; region_label?: string }",
1622
+ "requestBodyRequired": false,
1623
+ "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 }",
1624
+ "responseStatus": "201"
1625
+ },
1626
+ "revokeSelfHostEnrollment": {
1627
+ "operationId": "revokeSelfHostEnrollment",
1628
+ "method": "DELETE",
1629
+ "path": "/v1/organizations/{org_id}/self-host-enrollments/{enrollment_id}",
1630
+ "summary": "Revoke a self-host enrollment",
1631
+ "description": "Revokes an enrollment so its token can no longer authenticate a proxy. Connected proxies keep their last-known config until they reconnect.",
1632
+ "parameters": [
1633
+ {
1634
+ "name": "org_id",
1635
+ "in": "path",
1636
+ "required": true,
1637
+ "type": "string",
1638
+ "description": "Unique organization identifier."
1639
+ },
1640
+ {
1641
+ "name": "enrollment_id",
1642
+ "in": "path",
1643
+ "required": true,
1644
+ "type": "string",
1645
+ "description": "Unique enrollment identifier."
1646
+ }
1647
+ ],
1648
+ "requestBodyType": "",
1649
+ "requestBodyRequired": false,
1650
+ "responseType": "",
1651
+ "responseStatus": "204"
1652
+ },
1532
1653
  "listSupportCases": {
1533
1654
  "operationId": "listSupportCases",
1534
1655
  "method": "GET",
@@ -1972,6 +2093,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
1972
2093
  exportAuditLogs: {
1973
2094
  method: "GET",
1974
2095
  path: "/v1/projects/{project_id}/audit-logs/export"
2096
+ },
2097
+ verifyAuditChain: {
2098
+ method: "GET",
2099
+ path: "/v1/projects/{project_id}/audit-logs/verify"
1975
2100
  }
1976
2101
  },
1977
2102
  anomalies: {
@@ -2146,6 +2271,18 @@ Object.defineProperty(exports, '__esModule', { value: true });
2146
2271
  listRegions: {
2147
2272
  method: "GET",
2148
2273
  path: "/v1/regions"
2274
+ },
2275
+ listSelfHostEnrollments: {
2276
+ method: "GET",
2277
+ path: "/v1/organizations/{org_id}/self-host-enrollments"
2278
+ },
2279
+ createSelfHostEnrollment: {
2280
+ method: "POST",
2281
+ path: "/v1/organizations/{org_id}/self-host-enrollments"
2282
+ },
2283
+ revokeSelfHostEnrollment: {
2284
+ method: "DELETE",
2285
+ path: "/v1/organizations/{org_id}/self-host-enrollments/{enrollment_id}"
2149
2286
  }
2150
2287
  },
2151
2288
  migrations: {
@@ -2178,6 +2315,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
2178
2315
  dryEvalPolicy: {
2179
2316
  method: "POST",
2180
2317
  path: "/v1/projects/{project_id}/policy-evaluations"
2318
+ },
2319
+ replayPolicy: {
2320
+ method: "POST",
2321
+ path: "/v1/projects/{project_id}/policy-replays"
2181
2322
  }
2182
2323
  },
2183
2324
  support: {
@@ -2306,6 +2447,11 @@ const operationsByPath = {
2306
2447
  path: "/v1/projects/{project_id}/audit-logs/export",
2307
2448
  operationId: "exportAuditLogs"
2308
2449
  },
2450
+ "GET /v1/projects/{project_id}/audit-logs/verify": {
2451
+ method: "GET",
2452
+ path: "/v1/projects/{project_id}/audit-logs/verify",
2453
+ operationId: "verifyAuditChain"
2454
+ },
2309
2455
  "GET /v1/plans": {
2310
2456
  method: "GET",
2311
2457
  path: "/v1/plans",
@@ -2466,6 +2612,11 @@ const operationsByPath = {
2466
2612
  path: "/v1/projects/{project_id}/policy-evaluations",
2467
2613
  operationId: "dryEvalPolicy"
2468
2614
  },
2615
+ "POST /v1/projects/{project_id}/policy-replays": {
2616
+ method: "POST",
2617
+ path: "/v1/projects/{project_id}/policy-replays",
2618
+ operationId: "replayPolicy"
2619
+ },
2469
2620
  "GET /v1/projects": {
2470
2621
  method: "GET",
2471
2622
  path: "/v1/projects",
@@ -2516,6 +2667,21 @@ const operationsByPath = {
2516
2667
  path: "/v1/databases/{database_id}/replicas/{replica_id}",
2517
2668
  operationId: "deleteReplica"
2518
2669
  },
2670
+ "GET /v1/organizations/{org_id}/self-host-enrollments": {
2671
+ method: "GET",
2672
+ path: "/v1/organizations/{org_id}/self-host-enrollments",
2673
+ operationId: "listSelfHostEnrollments"
2674
+ },
2675
+ "POST /v1/organizations/{org_id}/self-host-enrollments": {
2676
+ method: "POST",
2677
+ path: "/v1/organizations/{org_id}/self-host-enrollments",
2678
+ operationId: "createSelfHostEnrollment"
2679
+ },
2680
+ "DELETE /v1/organizations/{org_id}/self-host-enrollments/{enrollment_id}": {
2681
+ method: "DELETE",
2682
+ path: "/v1/organizations/{org_id}/self-host-enrollments/{enrollment_id}",
2683
+ operationId: "revokeSelfHostEnrollment"
2684
+ },
2519
2685
  "GET /v1/organizations/{org_id}/support/cases": {
2520
2686
  method: "GET",
2521
2687
  path: "/v1/organizations/{org_id}/support/cases",