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/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: {
|
|
@@ -266,6 +270,10 @@
|
|
|
266
270
|
dryEvalPolicy: {
|
|
267
271
|
method: "POST",
|
|
268
272
|
path: "/v1/projects/{project_id}/policy-evaluations"
|
|
273
|
+
},
|
|
274
|
+
replayPolicy: {
|
|
275
|
+
method: "POST",
|
|
276
|
+
path: "/v1/projects/{project_id}/policy-replays"
|
|
269
277
|
}
|
|
270
278
|
},
|
|
271
279
|
support: {
|
|
@@ -394,6 +402,11 @@ const operationsByPath = {
|
|
|
394
402
|
path: "/v1/projects/{project_id}/audit-logs/export",
|
|
395
403
|
operationId: "exportAuditLogs"
|
|
396
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
|
+
},
|
|
397
410
|
"GET /v1/plans": {
|
|
398
411
|
method: "GET",
|
|
399
412
|
path: "/v1/plans",
|
|
@@ -554,6 +567,11 @@ const operationsByPath = {
|
|
|
554
567
|
path: "/v1/projects/{project_id}/policy-evaluations",
|
|
555
568
|
operationId: "dryEvalPolicy"
|
|
556
569
|
},
|
|
570
|
+
"POST /v1/projects/{project_id}/policy-replays": {
|
|
571
|
+
method: "POST",
|
|
572
|
+
path: "/v1/projects/{project_id}/policy-replays",
|
|
573
|
+
operationId: "replayPolicy"
|
|
574
|
+
},
|
|
557
575
|
"GET /v1/projects": {
|
|
558
576
|
method: "GET",
|
|
559
577
|
path: "/v1/projects",
|
package/dist/operations.cjs
CHANGED
|
@@ -288,7 +288,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
288
288
|
],
|
|
289
289
|
"requestBodyType": "",
|
|
290
290
|
"requestBodyRequired": false,
|
|
291
|
-
"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 }",
|
|
291
|
+
"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 }",
|
|
292
292
|
"responseStatus": "200"
|
|
293
293
|
},
|
|
294
294
|
"approveApprovalRequest": {
|
|
@@ -315,7 +315,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
315
315
|
],
|
|
316
316
|
"requestBodyType": "{ reason?: string }",
|
|
317
317
|
"requestBodyRequired": false,
|
|
318
|
-
"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\" }",
|
|
318
|
+
"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[] }",
|
|
319
319
|
"responseStatus": "200"
|
|
320
320
|
},
|
|
321
321
|
"rejectApprovalRequest": {
|
|
@@ -342,7 +342,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
342
342
|
],
|
|
343
343
|
"requestBodyType": "{ reason?: string }",
|
|
344
344
|
"requestBodyRequired": false,
|
|
345
|
-
"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\" }",
|
|
345
|
+
"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[] }",
|
|
346
346
|
"responseStatus": "200"
|
|
347
347
|
},
|
|
348
348
|
"listAuditLogs": {
|
|
@@ -384,8 +384,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
384
384
|
"name": "source",
|
|
385
385
|
"in": "query",
|
|
386
386
|
"required": false,
|
|
387
|
-
"type": "\"wire\" | \"mcp\" | \"control\"",
|
|
388
|
-
"description": "Filter by statement origin (wire, mcp, or control)."
|
|
387
|
+
"type": "\"wire\" | \"mcp\" | \"rest\" | \"control\"",
|
|
388
|
+
"description": "Filter by statement origin (wire, mcp, rest, or control)."
|
|
389
389
|
},
|
|
390
390
|
{
|
|
391
391
|
"name": "start",
|
|
@@ -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": {
|
|
@@ -460,8 +460,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
460
460
|
"name": "source",
|
|
461
461
|
"in": "query",
|
|
462
462
|
"required": false,
|
|
463
|
-
"type": "\"wire\" | \"mcp\" | \"control\"",
|
|
464
|
-
"description": "Filter by statement origin (wire, mcp, or control)."
|
|
463
|
+
"type": "\"wire\" | \"mcp\" | \"rest\" | \"control\"",
|
|
464
|
+
"description": "Filter by statement origin (wire, mcp, rest, or control)."
|
|
465
465
|
},
|
|
466
466
|
{
|
|
467
467
|
"name": "start",
|
|
@@ -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",
|
|
@@ -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",
|
|
@@ -2039,6 +2093,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
2039
2093
|
exportAuditLogs: {
|
|
2040
2094
|
method: "GET",
|
|
2041
2095
|
path: "/v1/projects/{project_id}/audit-logs/export"
|
|
2096
|
+
},
|
|
2097
|
+
verifyAuditChain: {
|
|
2098
|
+
method: "GET",
|
|
2099
|
+
path: "/v1/projects/{project_id}/audit-logs/verify"
|
|
2042
2100
|
}
|
|
2043
2101
|
},
|
|
2044
2102
|
anomalies: {
|
|
@@ -2257,6 +2315,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
2257
2315
|
dryEvalPolicy: {
|
|
2258
2316
|
method: "POST",
|
|
2259
2317
|
path: "/v1/projects/{project_id}/policy-evaluations"
|
|
2318
|
+
},
|
|
2319
|
+
replayPolicy: {
|
|
2320
|
+
method: "POST",
|
|
2321
|
+
path: "/v1/projects/{project_id}/policy-replays"
|
|
2260
2322
|
}
|
|
2261
2323
|
},
|
|
2262
2324
|
support: {
|
|
@@ -2385,6 +2447,11 @@ const operationsByPath = {
|
|
|
2385
2447
|
path: "/v1/projects/{project_id}/audit-logs/export",
|
|
2386
2448
|
operationId: "exportAuditLogs"
|
|
2387
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
|
+
},
|
|
2388
2455
|
"GET /v1/plans": {
|
|
2389
2456
|
method: "GET",
|
|
2390
2457
|
path: "/v1/plans",
|
|
@@ -2545,6 +2612,11 @@ const operationsByPath = {
|
|
|
2545
2612
|
path: "/v1/projects/{project_id}/policy-evaluations",
|
|
2546
2613
|
operationId: "dryEvalPolicy"
|
|
2547
2614
|
},
|
|
2615
|
+
"POST /v1/projects/{project_id}/policy-replays": {
|
|
2616
|
+
method: "POST",
|
|
2617
|
+
path: "/v1/projects/{project_id}/policy-replays",
|
|
2618
|
+
operationId: "replayPolicy"
|
|
2619
|
+
},
|
|
2548
2620
|
"GET /v1/projects": {
|
|
2549
2621
|
method: "GET",
|
|
2550
2622
|
path: "/v1/projects",
|