pgbeam 0.3.8 → 0.3.10
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.cjs +18 -0
- package/dist/index.d.cts +489 -7
- package/dist/index.d.mts +489 -7
- package/dist/index.mjs +18 -0
- package/dist/operations.cjs +80 -8
- package/dist/operations.d.cts +411 -3
- package/dist/operations.d.mts +411 -3
- package/dist/operations.mjs +80 -8
- package/package.json +1 -1
package/dist/operations.mjs
CHANGED
|
@@ -286,7 +286,7 @@
|
|
|
286
286
|
],
|
|
287
287
|
"requestBodyType": "",
|
|
288
288
|
"requestBodyRequired": false,
|
|
289
|
-
"responseType": "{ approvals: ({ credential_id?: string; decided_at?: string; decided_by?: string; expires_at: string; id: string; normalized_sql?: string; policy_profile_id: string; project_id: string; reason?: string; region?: string; requested_at: string; session_id?: string; sql: string; statement_kind?: string; status: \"pending\" | \"approved\" | \"rejected\" | \"expired\" | \"executed\" | \"failed\" })[]; next_page_token?: string }",
|
|
289
|
+
"responseType": "{ approvals: ({ credential_id?: string; decided_at?: string; decided_by?: string; estimated_rows?: number; expires_at: string; id: string; normalized_sql?: string; policy_profile_id: string; project_id: string; reason?: string; region?: string; requested_at: string; session_id?: string; sql: string; statement_kind?: string; status: \"pending\" | \"approved\" | \"rejected\" | \"expired\" | \"executed\" | \"failed\"; target_tables?: string[] })[]; next_page_token?: string }",
|
|
290
290
|
"responseStatus": "200"
|
|
291
291
|
},
|
|
292
292
|
"approveApprovalRequest": {
|
|
@@ -313,7 +313,7 @@
|
|
|
313
313
|
],
|
|
314
314
|
"requestBodyType": "{ reason?: string }",
|
|
315
315
|
"requestBodyRequired": false,
|
|
316
|
-
"responseType": "{ credential_id?: string; decided_at?: string; decided_by?: string; expires_at: string; id: string; normalized_sql?: string; policy_profile_id: string; project_id: string; reason?: string; region?: string; requested_at: string; session_id?: string; sql: string; statement_kind?: string; status: \"pending\" | \"approved\" | \"rejected\" | \"expired\" | \"executed\" | \"failed\" }",
|
|
316
|
+
"responseType": "{ credential_id?: string; decided_at?: string; decided_by?: string; estimated_rows?: number; expires_at: string; id: string; normalized_sql?: string; policy_profile_id: string; project_id: string; reason?: string; region?: string; requested_at: string; session_id?: string; sql: string; statement_kind?: string; status: \"pending\" | \"approved\" | \"rejected\" | \"expired\" | \"executed\" | \"failed\"; target_tables?: string[] }",
|
|
317
317
|
"responseStatus": "200"
|
|
318
318
|
},
|
|
319
319
|
"rejectApprovalRequest": {
|
|
@@ -340,7 +340,7 @@
|
|
|
340
340
|
],
|
|
341
341
|
"requestBodyType": "{ reason?: string }",
|
|
342
342
|
"requestBodyRequired": false,
|
|
343
|
-
"responseType": "{ credential_id?: string; decided_at?: string; decided_by?: string; expires_at: string; id: string; normalized_sql?: string; policy_profile_id: string; project_id: string; reason?: string; region?: string; requested_at: string; session_id?: string; sql: string; statement_kind?: string; status: \"pending\" | \"approved\" | \"rejected\" | \"expired\" | \"executed\" | \"failed\" }",
|
|
343
|
+
"responseType": "{ credential_id?: string; decided_at?: string; decided_by?: string; estimated_rows?: number; expires_at: string; id: string; normalized_sql?: string; policy_profile_id: string; project_id: string; reason?: string; region?: string; requested_at: string; session_id?: string; sql: string; statement_kind?: string; status: \"pending\" | \"approved\" | \"rejected\" | \"expired\" | \"executed\" | \"failed\"; target_tables?: string[] }",
|
|
344
344
|
"responseStatus": "200"
|
|
345
345
|
},
|
|
346
346
|
"listAuditLogs": {
|
|
@@ -382,8 +382,8 @@
|
|
|
382
382
|
"name": "source",
|
|
383
383
|
"in": "query",
|
|
384
384
|
"required": false,
|
|
385
|
-
"type": "\"wire\" | \"mcp\" | \"control\"",
|
|
386
|
-
"description": "Filter by statement origin (wire, mcp, or control)."
|
|
385
|
+
"type": "\"wire\" | \"mcp\" | \"rest\" | \"control\"",
|
|
386
|
+
"description": "Filter by statement origin (wire, mcp, rest, or control)."
|
|
387
387
|
},
|
|
388
388
|
{
|
|
389
389
|
"name": "start",
|
|
@@ -416,7 +416,7 @@
|
|
|
416
416
|
],
|
|
417
417
|
"requestBodyType": "",
|
|
418
418
|
"requestBodyRequired": false,
|
|
419
|
-
"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 }",
|
|
419
|
+
"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 }",
|
|
420
420
|
"responseStatus": "200"
|
|
421
421
|
},
|
|
422
422
|
"exportAuditLogs": {
|
|
@@ -458,8 +458,8 @@
|
|
|
458
458
|
"name": "source",
|
|
459
459
|
"in": "query",
|
|
460
460
|
"required": false,
|
|
461
|
-
"type": "\"wire\" | \"mcp\" | \"control\"",
|
|
462
|
-
"description": "Filter by statement origin (wire, mcp, or control)."
|
|
461
|
+
"type": "\"wire\" | \"mcp\" | \"rest\" | \"control\"",
|
|
462
|
+
"description": "Filter by statement origin (wire, mcp, rest, or control)."
|
|
463
463
|
},
|
|
464
464
|
{
|
|
465
465
|
"name": "start",
|
|
@@ -481,6 +481,40 @@
|
|
|
481
481
|
"responseType": "",
|
|
482
482
|
"responseStatus": "200"
|
|
483
483
|
},
|
|
484
|
+
"verifyAuditChain": {
|
|
485
|
+
"operationId": "verifyAuditChain",
|
|
486
|
+
"method": "GET",
|
|
487
|
+
"path": "/v1/projects/{project_id}/audit-logs/verify",
|
|
488
|
+
"summary": "Verify the tamper-evident audit chain",
|
|
489
|
+
"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.",
|
|
490
|
+
"parameters": [
|
|
491
|
+
{
|
|
492
|
+
"name": "project_id",
|
|
493
|
+
"in": "path",
|
|
494
|
+
"required": true,
|
|
495
|
+
"type": "string",
|
|
496
|
+
"description": "Unique project identifier (prefixed, e.g. prj_xxx)."
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
"name": "start",
|
|
500
|
+
"in": "query",
|
|
501
|
+
"required": false,
|
|
502
|
+
"type": "string",
|
|
503
|
+
"description": "Return entries at or after this timestamp (inclusive lower bound)."
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
"name": "end",
|
|
507
|
+
"in": "query",
|
|
508
|
+
"required": false,
|
|
509
|
+
"type": "string",
|
|
510
|
+
"description": "Return entries strictly older than this timestamp (cursor / upper bound)."
|
|
511
|
+
}
|
|
512
|
+
],
|
|
513
|
+
"requestBodyType": "",
|
|
514
|
+
"requestBodyRequired": false,
|
|
515
|
+
"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 }",
|
|
516
|
+
"responseStatus": "200"
|
|
517
|
+
},
|
|
484
518
|
"listPlans": {
|
|
485
519
|
"operationId": "listPlans",
|
|
486
520
|
"method": "GET",
|
|
@@ -1301,6 +1335,26 @@
|
|
|
1301
1335
|
"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\" }",
|
|
1302
1336
|
"responseStatus": "200"
|
|
1303
1337
|
},
|
|
1338
|
+
"replayPolicy": {
|
|
1339
|
+
"operationId": "replayPolicy",
|
|
1340
|
+
"method": "POST",
|
|
1341
|
+
"path": "/v1/projects/{project_id}/policy-replays",
|
|
1342
|
+
"summary": "Replay recorded agent traffic against a policy",
|
|
1343
|
+
"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.",
|
|
1344
|
+
"parameters": [
|
|
1345
|
+
{
|
|
1346
|
+
"name": "project_id",
|
|
1347
|
+
"in": "path",
|
|
1348
|
+
"required": true,
|
|
1349
|
+
"type": "string",
|
|
1350
|
+
"description": "Unique project identifier (prefixed, e.g. prj_xxx)."
|
|
1351
|
+
}
|
|
1352
|
+
],
|
|
1353
|
+
"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 }",
|
|
1354
|
+
"requestBodyRequired": true,
|
|
1355
|
+
"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 } }",
|
|
1356
|
+
"responseStatus": "200"
|
|
1357
|
+
},
|
|
1304
1358
|
"listProjects": {
|
|
1305
1359
|
"operationId": "listProjects",
|
|
1306
1360
|
"method": "GET",
|
|
@@ -2037,6 +2091,10 @@
|
|
|
2037
2091
|
exportAuditLogs: {
|
|
2038
2092
|
method: "GET",
|
|
2039
2093
|
path: "/v1/projects/{project_id}/audit-logs/export"
|
|
2094
|
+
},
|
|
2095
|
+
verifyAuditChain: {
|
|
2096
|
+
method: "GET",
|
|
2097
|
+
path: "/v1/projects/{project_id}/audit-logs/verify"
|
|
2040
2098
|
}
|
|
2041
2099
|
},
|
|
2042
2100
|
anomalies: {
|
|
@@ -2255,6 +2313,10 @@
|
|
|
2255
2313
|
dryEvalPolicy: {
|
|
2256
2314
|
method: "POST",
|
|
2257
2315
|
path: "/v1/projects/{project_id}/policy-evaluations"
|
|
2316
|
+
},
|
|
2317
|
+
replayPolicy: {
|
|
2318
|
+
method: "POST",
|
|
2319
|
+
path: "/v1/projects/{project_id}/policy-replays"
|
|
2258
2320
|
}
|
|
2259
2321
|
},
|
|
2260
2322
|
support: {
|
|
@@ -2383,6 +2445,11 @@ const operationsByPath = {
|
|
|
2383
2445
|
path: "/v1/projects/{project_id}/audit-logs/export",
|
|
2384
2446
|
operationId: "exportAuditLogs"
|
|
2385
2447
|
},
|
|
2448
|
+
"GET /v1/projects/{project_id}/audit-logs/verify": {
|
|
2449
|
+
method: "GET",
|
|
2450
|
+
path: "/v1/projects/{project_id}/audit-logs/verify",
|
|
2451
|
+
operationId: "verifyAuditChain"
|
|
2452
|
+
},
|
|
2386
2453
|
"GET /v1/plans": {
|
|
2387
2454
|
method: "GET",
|
|
2388
2455
|
path: "/v1/plans",
|
|
@@ -2543,6 +2610,11 @@ const operationsByPath = {
|
|
|
2543
2610
|
path: "/v1/projects/{project_id}/policy-evaluations",
|
|
2544
2611
|
operationId: "dryEvalPolicy"
|
|
2545
2612
|
},
|
|
2613
|
+
"POST /v1/projects/{project_id}/policy-replays": {
|
|
2614
|
+
method: "POST",
|
|
2615
|
+
path: "/v1/projects/{project_id}/policy-replays",
|
|
2616
|
+
operationId: "replayPolicy"
|
|
2617
|
+
},
|
|
2546
2618
|
"GET /v1/projects": {
|
|
2547
2619
|
method: "GET",
|
|
2548
2620
|
path: "/v1/projects",
|