pgbeam 0.4.19 → 0.4.21

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.
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, '__esModule', { value: true });
2
2
 
3
- var operationsMap_gen = require('./operations-map.gen-j3jalb8e.cjs');
3
+ var operationsMap_gen = require('./operations-map.gen-l4ihw4c3.cjs');
4
4
 
5
5
  /**
6
6
  * Generated by generate-sdk-ts-maps.ts from backend/openapi/bundles/public.yaml — do not edit manually.
@@ -259,7 +259,7 @@ var operationsMap_gen = require('./operations-map.gen-j3jalb8e.cjs');
259
259
  "method": "GET",
260
260
  "path": "/v1/projects/{project_id}/anomalies",
261
261
  "summary": "List anomaly alerts",
262
- "description": "Lists anomaly alerts for the project, newest first, optionally filtered by status.",
262
+ "description": "Lists anomaly alerts for the project, newest first, optionally filtered by status and kind.",
263
263
  "parameters": [
264
264
  {
265
265
  "name": "project_id",
@@ -275,6 +275,13 @@ var operationsMap_gen = require('./operations-map.gen-j3jalb8e.cjs');
275
275
  "type": "\"open\" | \"acknowledged\" | \"resolved\"",
276
276
  "description": "Filter to a single status."
277
277
  },
278
+ {
279
+ "name": "kind",
280
+ "in": "query",
281
+ "required": false,
282
+ "type": "\"volume_spike\" | \"egress_spike\" | \"new_query_shape\" | \"off_hours\" | \"error_spike\" | \"canary_tripped\" | \"content_flagged\"",
283
+ "description": "Filter to a single anomaly kind."
284
+ },
278
285
  {
279
286
  "name": "page_size",
280
287
  "in": "query",
@@ -492,6 +499,169 @@ var operationsMap_gen = require('./operations-map.gen-j3jalb8e.cjs');
492
499
  "responseType": "",
493
500
  "responseStatus": "204"
494
501
  },
502
+ "listApprovalRules": {
503
+ "operationId": "listApprovalRules",
504
+ "method": "GET",
505
+ "path": "/v1/projects/{project_id}/approval-rules",
506
+ "summary": "List approval rules",
507
+ "description": "Lists the project's approval rules, including disabled ones.",
508
+ "parameters": [
509
+ {
510
+ "name": "project_id",
511
+ "in": "path",
512
+ "required": true,
513
+ "type": "string",
514
+ "description": "Unique project identifier (prefixed, e.g. prj_xxx)."
515
+ },
516
+ {
517
+ "name": "page_size",
518
+ "in": "query",
519
+ "required": false,
520
+ "type": "number",
521
+ "description": "Maximum number of items to return (1-100, default 20)."
522
+ },
523
+ {
524
+ "name": "page_token",
525
+ "in": "query",
526
+ "required": false,
527
+ "type": "string",
528
+ "description": "Opaque token for cursor-based pagination."
529
+ },
530
+ {
531
+ "name": "If-None-Match",
532
+ "in": "header",
533
+ "required": false,
534
+ "type": "string",
535
+ "description": "Entity tag the client already holds, taken from the `ETag` of an earlier response. When it still matches the current representation the server answers `304 Not Modified` with no body, so a poll that finds nothing changed costs a round trip rather than a transfer.\n\nA comma-separated list is accepted, and `*` matches any current representation."
536
+ }
537
+ ],
538
+ "requestBodyType": "",
539
+ "requestBodyRequired": false,
540
+ "responseType": "{ approval_rules: ({ created_at: string; enabled: boolean; id: string; min_affected_rows?: number; name: string; project_id: string; relation_name?: string; schema_name?: string; statement_kinds: (\"insert\" | \"update\" | \"delete\" | \"ddl\")[]; updated_at: string })[]; next_page_token?: string }",
541
+ "responseStatus": "200"
542
+ },
543
+ "createApprovalRule": {
544
+ "operationId": "createApprovalRule",
545
+ "method": "POST",
546
+ "path": "/v1/projects/{project_id}/approval-rules",
547
+ "summary": "Create an approval rule",
548
+ "description": "Sends the agent statements the rule matches to a human for approval,\nwhatever the policy profile's approval_mode says. A rule can only add\napproval; nothing here can exempt a statement from approval_mode.\n\nThe rule is pushed to connected data planes when it is written. A\nreviewer sees its name on every approval request it holds.\n\nReturns 409 for an enabled rule while the organization has a live\nself-hosted data plane enrollment, because PgBeam cannot yet confirm\nthat a self-hosted proxy runs a build that enforces approval rules. A\nrule with enabled set to false is still accepted.\n",
549
+ "parameters": [
550
+ {
551
+ "name": "project_id",
552
+ "in": "path",
553
+ "required": true,
554
+ "type": "string",
555
+ "description": "Unique project identifier (prefixed, e.g. prj_xxx)."
556
+ },
557
+ {
558
+ "name": "Idempotency-Key",
559
+ "in": "header",
560
+ "required": false,
561
+ "type": "string",
562
+ "description": "Client-generated key that makes a retry of this request safe. The first request carrying a given key executes normally and its response (status, content type and body) is stored for 24 hours; a later request with the same key returns that stored response without running the operation again, so a retry after a lost or timed-out response cannot create a second resource.\n\nReusing a key with a different request body returns `409 Conflict`: a key is a promise about one specific request, so a changed body is a client bug rather than a retry. Keys are scoped to the calling organization (or to the user, for account-scoped tokens), so one tenant can never read another's stored response.\n\nA `5xx`, `408` or `429` is never stored, because those describe a request that produced no settled answer and the next attempt with the same key must run for real. A `4xx` is stored: it is the server's settled answer about this exact request.\n\nUse a fresh UUID per logical operation. The PgBeam SDKs generate one per call and reuse it across their own automatic retries."
563
+ }
564
+ ],
565
+ "requestBodyType": "{ enabled?: boolean; min_affected_rows?: number; name: string; relation_name?: string; schema_name?: string; statement_kinds?: (\"insert\" | \"update\" | \"delete\" | \"ddl\")[] }",
566
+ "requestBodyRequired": true,
567
+ "responseType": "{ created_at: string; enabled: boolean; id: string; min_affected_rows?: number; name: string; project_id: string; relation_name?: string; schema_name?: string; statement_kinds: (\"insert\" | \"update\" | \"delete\" | \"ddl\")[]; updated_at: string }",
568
+ "responseStatus": "201"
569
+ },
570
+ "getApprovalRule": {
571
+ "operationId": "getApprovalRule",
572
+ "method": "GET",
573
+ "path": "/v1/projects/{project_id}/approval-rules/{approval_rule_id}",
574
+ "summary": "Get an approval rule",
575
+ "description": "Returns a single approval rule by ID.",
576
+ "parameters": [
577
+ {
578
+ "name": "project_id",
579
+ "in": "path",
580
+ "required": true,
581
+ "type": "string",
582
+ "description": "Unique project identifier (prefixed, e.g. prj_xxx)."
583
+ },
584
+ {
585
+ "name": "approval_rule_id",
586
+ "in": "path",
587
+ "required": true,
588
+ "type": "string",
589
+ "description": "Unique approval rule identifier (prefixed, e.g. apl_xxx)."
590
+ },
591
+ {
592
+ "name": "If-None-Match",
593
+ "in": "header",
594
+ "required": false,
595
+ "type": "string",
596
+ "description": "Entity tag the client already holds, taken from the `ETag` of an earlier response. When it still matches the current representation the server answers `304 Not Modified` with no body, so a poll that finds nothing changed costs a round trip rather than a transfer.\n\nA comma-separated list is accepted, and `*` matches any current representation."
597
+ }
598
+ ],
599
+ "requestBodyType": "",
600
+ "requestBodyRequired": false,
601
+ "responseType": "{ created_at: string; enabled: boolean; id: string; min_affected_rows?: number; name: string; project_id: string; relation_name?: string; schema_name?: string; statement_kinds: (\"insert\" | \"update\" | \"delete\" | \"ddl\")[]; updated_at: string }",
602
+ "responseStatus": "200"
603
+ },
604
+ "updateApprovalRule": {
605
+ "operationId": "updateApprovalRule",
606
+ "method": "PUT",
607
+ "path": "/v1/projects/{project_id}/approval-rules/{approval_rule_id}",
608
+ "summary": "Update an approval rule",
609
+ "description": "Replaces the rule's name, statement kinds, scope, row threshold and\nenabled flag. An approval request already held keeps the name it was\nheld under.\n\nReturns 409 when the update leaves the rule enabled while the\norganization has a live self-hosted data plane enrollment, for the same\nreason as create. Setting enabled to false is still accepted.\n",
610
+ "parameters": [
611
+ {
612
+ "name": "project_id",
613
+ "in": "path",
614
+ "required": true,
615
+ "type": "string",
616
+ "description": "Unique project identifier (prefixed, e.g. prj_xxx)."
617
+ },
618
+ {
619
+ "name": "approval_rule_id",
620
+ "in": "path",
621
+ "required": true,
622
+ "type": "string",
623
+ "description": "Unique approval rule identifier (prefixed, e.g. apl_xxx)."
624
+ },
625
+ {
626
+ "name": "If-Match",
627
+ "in": "header",
628
+ "required": false,
629
+ "type": "string",
630
+ "description": "Entity tag the write is based on, taken from the `ETag` of the read that produced the values being sent. The write proceeds only if it still matches the current representation; otherwise it is refused with `412 Precondition Failed` and nothing is changed.\n\nThis is what makes a read-modify-write safe. Without it the last writer wins and a concurrent edit is silently discarded, which is the failure an agent is most likely to cause and least likely to notice. The `412` response carries the current `ETag`, so a caller can re-read, re-apply its change and retry.\n\nOmitting the header keeps the old unconditional behaviour. `*` matches any current representation, which asserts only that the resource exists."
631
+ }
632
+ ],
633
+ "requestBodyType": "{ enabled?: boolean; min_affected_rows?: number; name: string; relation_name?: string; schema_name?: string; statement_kinds?: (\"insert\" | \"update\" | \"delete\" | \"ddl\")[] }",
634
+ "requestBodyRequired": true,
635
+ "responseType": "{ created_at: string; enabled: boolean; id: string; min_affected_rows?: number; name: string; project_id: string; relation_name?: string; schema_name?: string; statement_kinds: (\"insert\" | \"update\" | \"delete\" | \"ddl\")[]; updated_at: string }",
636
+ "responseStatus": "200"
637
+ },
638
+ "deleteApprovalRule": {
639
+ "operationId": "deleteApprovalRule",
640
+ "method": "DELETE",
641
+ "path": "/v1/projects/{project_id}/approval-rules/{approval_rule_id}",
642
+ "summary": "Delete an approval rule",
643
+ "description": "Removes the rule, so the statements it matched are held only if the\npolicy profile's approval_mode holds them. Approval requests it already\nheld are not affected.\n",
644
+ "parameters": [
645
+ {
646
+ "name": "project_id",
647
+ "in": "path",
648
+ "required": true,
649
+ "type": "string",
650
+ "description": "Unique project identifier (prefixed, e.g. prj_xxx)."
651
+ },
652
+ {
653
+ "name": "approval_rule_id",
654
+ "in": "path",
655
+ "required": true,
656
+ "type": "string",
657
+ "description": "Unique approval rule identifier (prefixed, e.g. apl_xxx)."
658
+ }
659
+ ],
660
+ "requestBodyType": "",
661
+ "requestBodyRequired": false,
662
+ "responseType": "",
663
+ "responseStatus": "204"
664
+ },
495
665
  "listApprovalRequests": {
496
666
  "operationId": "listApprovalRequests",
497
667
  "method": "GET",
@@ -791,7 +961,7 @@ var operationsMap_gen = require('./operations-map.gen-j3jalb8e.cjs');
791
961
  ],
792
962
  "requestBodyType": "",
793
963
  "requestBodyRequired": false,
794
- "responseType": "{ allowed: number; blocked: number; bytes_out: number; credential_ids: string[]; duration_ms: number; ended_at: string; entries_scanned: number; latency_ms_total: number; masked: number; other: number; project_id: string; rows_returned: number; scan_truncated: boolean; session_id: string; sources: string[]; started_at: string; statements: number; tables_blocked: string[]; tables_read: string[]; tables_written: string[]; truncated: number; unparsed_statements: number }",
964
+ "responseType": "{ allowed: number; anomalies?: { credential_window_alerts: ({ acknowledged_at?: string; acknowledged_by?: string; created_at: string; credential_id?: string; details?: Record<string, unknown>; id: string; kind: string; project_id: string; severity: \"info\" | \"warning\" | \"critical\"; status: \"open\" | \"acknowledged\" | \"resolved\"; title: string; window_end?: string; window_start?: string })[]; session_alerts: ({ acknowledged_at?: string; acknowledged_by?: string; created_at: string; credential_id?: string; details?: Record<string, unknown>; id: string; kind: string; project_id: string; severity: \"info\" | \"warning\" | \"critical\"; status: \"open\" | \"acknowledged\" | \"resolved\"; title: string; window_end?: string; window_start?: string })[]; truncated: boolean }; blocked: number; bytes_out: number; credential_ids: string[]; duration_ms: number; ended_at: string; entries_scanned: number; latency_ms_total: number; masked: number; other: number; project_id: string; rows_returned: number; scan_truncated: boolean; session_id: string; sources: string[]; started_at: string; statements: number; tables_blocked: string[]; tables_read: string[]; tables_written: string[]; truncated: number; unparsed_statements: number }",
795
965
  "responseStatus": "200"
796
966
  },
797
967
  "verifyAuditChain": {
@@ -1321,7 +1491,7 @@ var operationsMap_gen = require('./operations-map.gen-j3jalb8e.cjs');
1321
1491
  "method": "POST",
1322
1492
  "path": "/v1/projects/{project_id}/databases/{database_id}/scan-pii",
1323
1493
  "summary": "Scan a database for likely-PII columns",
1324
- "description": "Connects to the upstream database read-only, inspects information_schema and samples column values against PII heuristics, and returns ranked masking suggestions. Suggestions are advisory — the operator reviews them and applies the ones they want into a policy profile's masking rules. Nothing is auto-applied.",
1494
+ "description": "Connects to the upstream database read-only, inspects information_schema and samples column values against PII heuristics, and returns ranked masking suggestions. Suggestions are advisory: the operator reviews them and applies the ones they want into a policy profile's masking rules. Nothing is auto-applied.",
1325
1495
  "parameters": [
1326
1496
  {
1327
1497
  "name": "project_id",
@@ -1348,7 +1518,7 @@ var operationsMap_gen = require('./operations-map.gen-j3jalb8e.cjs');
1348
1518
  "method": "GET",
1349
1519
  "path": "/v1/projects/{project_id}/databases/{database_id}/schema-catalog",
1350
1520
  "summary": "Read a database's schema catalog",
1351
- "description": "Connects to the upstream database read-only and returns its user relations (tables and views) and columns. Powers table/column autocomplete and view-aware warnings in the policy editor — relation kind distinguishes a view (whose masking/row-filters apply to the view itself, not its base tables) from a base table, and a per-column is_binary flag flags columns that mask to NULL. System schemas are excluded; nothing is persisted.",
1521
+ "description": "Connects to the upstream database read-only and returns its user relations (tables and views) and columns. Powers table/column autocomplete and view-aware warnings in the policy editor. Relation kind distinguishes a view (whose masking/row-filters apply to the view itself, not its base tables) from a base table, and a per-column is_binary flag flags columns that mask to NULL. System schemas are excluded; nothing is persisted.",
1352
1522
  "parameters": [
1353
1523
  {
1354
1524
  "name": "project_id",
@@ -2732,7 +2902,7 @@ var operationsMap_gen = require('./operations-map.gen-j3jalb8e.cjs');
2732
2902
  "method": "POST",
2733
2903
  "path": "/v1/organizations/{org_id}/self-host-enrollments",
2734
2904
  "summary": "Issue a self-host enrollment token",
2735
- "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.",
2905
+ "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.\nReturns 409 while any project in the organization has an enabled approval rule, because PgBeam cannot yet confirm that a self-hosted proxy runs a build that enforces approval rules. Disable those rules first; they can be saved with enabled set to false.",
2736
2906
  "parameters": [
2737
2907
  {
2738
2908
  "name": "org_id",
@@ -1,4 +1,4 @@
1
- export { z0 as ApiOperations, z1 as ApiTag, z2 as RequestMap, z3 as Route, z4 as operationsByPath, z5 as operationsByTag } from './operations-map.gen-k9bt41ua.js';
1
+ export { Ab as ApiOperations, Ac as ApiTag, Ad as RequestMap, Ae as Route, Af as operationsByPath, Ag as operationsByTag } from './operations-map.gen-le9c2b3b.js';
2
2
 
3
3
  /**
4
4
  * Generated by generate-sdk-ts-maps.ts from backend/openapi/bundles/public.yaml — do not edit manually.
@@ -1,4 +1,4 @@
1
- export { z0 as ApiOperations, z1 as ApiTag, z2 as RequestMap, z3 as Route, z4 as operationsByPath, z5 as operationsByTag } from './operations-map.gen-k9bt41ua.js';
1
+ export { Ab as ApiOperations, Ac as ApiTag, Ad as RequestMap, Ae as Route, Af as operationsByPath, Ag as operationsByTag } from './operations-map.gen-le9c2b3b.js';
2
2
 
3
3
  /**
4
4
  * Generated by generate-sdk-ts-maps.ts from backend/openapi/bundles/public.yaml — do not edit manually.
@@ -1,4 +1,4 @@
1
- export { o as operationsByPath, a as operationsByTag } from './operations-map.gen-gmrf5uyf.js';
1
+ export { o as operationsByPath, a as operationsByTag } from './operations-map.gen-jqwfh8a6.js';
2
2
 
3
3
  /**
4
4
  * Generated by generate-sdk-ts-maps.ts from backend/openapi/bundles/public.yaml — do not edit manually.
@@ -257,7 +257,7 @@ export { o as operationsByPath, a as operationsByTag } from './operations-map.ge
257
257
  "method": "GET",
258
258
  "path": "/v1/projects/{project_id}/anomalies",
259
259
  "summary": "List anomaly alerts",
260
- "description": "Lists anomaly alerts for the project, newest first, optionally filtered by status.",
260
+ "description": "Lists anomaly alerts for the project, newest first, optionally filtered by status and kind.",
261
261
  "parameters": [
262
262
  {
263
263
  "name": "project_id",
@@ -273,6 +273,13 @@ export { o as operationsByPath, a as operationsByTag } from './operations-map.ge
273
273
  "type": "\"open\" | \"acknowledged\" | \"resolved\"",
274
274
  "description": "Filter to a single status."
275
275
  },
276
+ {
277
+ "name": "kind",
278
+ "in": "query",
279
+ "required": false,
280
+ "type": "\"volume_spike\" | \"egress_spike\" | \"new_query_shape\" | \"off_hours\" | \"error_spike\" | \"canary_tripped\" | \"content_flagged\"",
281
+ "description": "Filter to a single anomaly kind."
282
+ },
276
283
  {
277
284
  "name": "page_size",
278
285
  "in": "query",
@@ -490,6 +497,169 @@ export { o as operationsByPath, a as operationsByTag } from './operations-map.ge
490
497
  "responseType": "",
491
498
  "responseStatus": "204"
492
499
  },
500
+ "listApprovalRules": {
501
+ "operationId": "listApprovalRules",
502
+ "method": "GET",
503
+ "path": "/v1/projects/{project_id}/approval-rules",
504
+ "summary": "List approval rules",
505
+ "description": "Lists the project's approval rules, including disabled ones.",
506
+ "parameters": [
507
+ {
508
+ "name": "project_id",
509
+ "in": "path",
510
+ "required": true,
511
+ "type": "string",
512
+ "description": "Unique project identifier (prefixed, e.g. prj_xxx)."
513
+ },
514
+ {
515
+ "name": "page_size",
516
+ "in": "query",
517
+ "required": false,
518
+ "type": "number",
519
+ "description": "Maximum number of items to return (1-100, default 20)."
520
+ },
521
+ {
522
+ "name": "page_token",
523
+ "in": "query",
524
+ "required": false,
525
+ "type": "string",
526
+ "description": "Opaque token for cursor-based pagination."
527
+ },
528
+ {
529
+ "name": "If-None-Match",
530
+ "in": "header",
531
+ "required": false,
532
+ "type": "string",
533
+ "description": "Entity tag the client already holds, taken from the `ETag` of an earlier response. When it still matches the current representation the server answers `304 Not Modified` with no body, so a poll that finds nothing changed costs a round trip rather than a transfer.\n\nA comma-separated list is accepted, and `*` matches any current representation."
534
+ }
535
+ ],
536
+ "requestBodyType": "",
537
+ "requestBodyRequired": false,
538
+ "responseType": "{ approval_rules: ({ created_at: string; enabled: boolean; id: string; min_affected_rows?: number; name: string; project_id: string; relation_name?: string; schema_name?: string; statement_kinds: (\"insert\" | \"update\" | \"delete\" | \"ddl\")[]; updated_at: string })[]; next_page_token?: string }",
539
+ "responseStatus": "200"
540
+ },
541
+ "createApprovalRule": {
542
+ "operationId": "createApprovalRule",
543
+ "method": "POST",
544
+ "path": "/v1/projects/{project_id}/approval-rules",
545
+ "summary": "Create an approval rule",
546
+ "description": "Sends the agent statements the rule matches to a human for approval,\nwhatever the policy profile's approval_mode says. A rule can only add\napproval; nothing here can exempt a statement from approval_mode.\n\nThe rule is pushed to connected data planes when it is written. A\nreviewer sees its name on every approval request it holds.\n\nReturns 409 for an enabled rule while the organization has a live\nself-hosted data plane enrollment, because PgBeam cannot yet confirm\nthat a self-hosted proxy runs a build that enforces approval rules. A\nrule with enabled set to false is still accepted.\n",
547
+ "parameters": [
548
+ {
549
+ "name": "project_id",
550
+ "in": "path",
551
+ "required": true,
552
+ "type": "string",
553
+ "description": "Unique project identifier (prefixed, e.g. prj_xxx)."
554
+ },
555
+ {
556
+ "name": "Idempotency-Key",
557
+ "in": "header",
558
+ "required": false,
559
+ "type": "string",
560
+ "description": "Client-generated key that makes a retry of this request safe. The first request carrying a given key executes normally and its response (status, content type and body) is stored for 24 hours; a later request with the same key returns that stored response without running the operation again, so a retry after a lost or timed-out response cannot create a second resource.\n\nReusing a key with a different request body returns `409 Conflict`: a key is a promise about one specific request, so a changed body is a client bug rather than a retry. Keys are scoped to the calling organization (or to the user, for account-scoped tokens), so one tenant can never read another's stored response.\n\nA `5xx`, `408` or `429` is never stored, because those describe a request that produced no settled answer and the next attempt with the same key must run for real. A `4xx` is stored: it is the server's settled answer about this exact request.\n\nUse a fresh UUID per logical operation. The PgBeam SDKs generate one per call and reuse it across their own automatic retries."
561
+ }
562
+ ],
563
+ "requestBodyType": "{ enabled?: boolean; min_affected_rows?: number; name: string; relation_name?: string; schema_name?: string; statement_kinds?: (\"insert\" | \"update\" | \"delete\" | \"ddl\")[] }",
564
+ "requestBodyRequired": true,
565
+ "responseType": "{ created_at: string; enabled: boolean; id: string; min_affected_rows?: number; name: string; project_id: string; relation_name?: string; schema_name?: string; statement_kinds: (\"insert\" | \"update\" | \"delete\" | \"ddl\")[]; updated_at: string }",
566
+ "responseStatus": "201"
567
+ },
568
+ "getApprovalRule": {
569
+ "operationId": "getApprovalRule",
570
+ "method": "GET",
571
+ "path": "/v1/projects/{project_id}/approval-rules/{approval_rule_id}",
572
+ "summary": "Get an approval rule",
573
+ "description": "Returns a single approval rule by ID.",
574
+ "parameters": [
575
+ {
576
+ "name": "project_id",
577
+ "in": "path",
578
+ "required": true,
579
+ "type": "string",
580
+ "description": "Unique project identifier (prefixed, e.g. prj_xxx)."
581
+ },
582
+ {
583
+ "name": "approval_rule_id",
584
+ "in": "path",
585
+ "required": true,
586
+ "type": "string",
587
+ "description": "Unique approval rule identifier (prefixed, e.g. apl_xxx)."
588
+ },
589
+ {
590
+ "name": "If-None-Match",
591
+ "in": "header",
592
+ "required": false,
593
+ "type": "string",
594
+ "description": "Entity tag the client already holds, taken from the `ETag` of an earlier response. When it still matches the current representation the server answers `304 Not Modified` with no body, so a poll that finds nothing changed costs a round trip rather than a transfer.\n\nA comma-separated list is accepted, and `*` matches any current representation."
595
+ }
596
+ ],
597
+ "requestBodyType": "",
598
+ "requestBodyRequired": false,
599
+ "responseType": "{ created_at: string; enabled: boolean; id: string; min_affected_rows?: number; name: string; project_id: string; relation_name?: string; schema_name?: string; statement_kinds: (\"insert\" | \"update\" | \"delete\" | \"ddl\")[]; updated_at: string }",
600
+ "responseStatus": "200"
601
+ },
602
+ "updateApprovalRule": {
603
+ "operationId": "updateApprovalRule",
604
+ "method": "PUT",
605
+ "path": "/v1/projects/{project_id}/approval-rules/{approval_rule_id}",
606
+ "summary": "Update an approval rule",
607
+ "description": "Replaces the rule's name, statement kinds, scope, row threshold and\nenabled flag. An approval request already held keeps the name it was\nheld under.\n\nReturns 409 when the update leaves the rule enabled while the\norganization has a live self-hosted data plane enrollment, for the same\nreason as create. Setting enabled to false is still accepted.\n",
608
+ "parameters": [
609
+ {
610
+ "name": "project_id",
611
+ "in": "path",
612
+ "required": true,
613
+ "type": "string",
614
+ "description": "Unique project identifier (prefixed, e.g. prj_xxx)."
615
+ },
616
+ {
617
+ "name": "approval_rule_id",
618
+ "in": "path",
619
+ "required": true,
620
+ "type": "string",
621
+ "description": "Unique approval rule identifier (prefixed, e.g. apl_xxx)."
622
+ },
623
+ {
624
+ "name": "If-Match",
625
+ "in": "header",
626
+ "required": false,
627
+ "type": "string",
628
+ "description": "Entity tag the write is based on, taken from the `ETag` of the read that produced the values being sent. The write proceeds only if it still matches the current representation; otherwise it is refused with `412 Precondition Failed` and nothing is changed.\n\nThis is what makes a read-modify-write safe. Without it the last writer wins and a concurrent edit is silently discarded, which is the failure an agent is most likely to cause and least likely to notice. The `412` response carries the current `ETag`, so a caller can re-read, re-apply its change and retry.\n\nOmitting the header keeps the old unconditional behaviour. `*` matches any current representation, which asserts only that the resource exists."
629
+ }
630
+ ],
631
+ "requestBodyType": "{ enabled?: boolean; min_affected_rows?: number; name: string; relation_name?: string; schema_name?: string; statement_kinds?: (\"insert\" | \"update\" | \"delete\" | \"ddl\")[] }",
632
+ "requestBodyRequired": true,
633
+ "responseType": "{ created_at: string; enabled: boolean; id: string; min_affected_rows?: number; name: string; project_id: string; relation_name?: string; schema_name?: string; statement_kinds: (\"insert\" | \"update\" | \"delete\" | \"ddl\")[]; updated_at: string }",
634
+ "responseStatus": "200"
635
+ },
636
+ "deleteApprovalRule": {
637
+ "operationId": "deleteApprovalRule",
638
+ "method": "DELETE",
639
+ "path": "/v1/projects/{project_id}/approval-rules/{approval_rule_id}",
640
+ "summary": "Delete an approval rule",
641
+ "description": "Removes the rule, so the statements it matched are held only if the\npolicy profile's approval_mode holds them. Approval requests it already\nheld are not affected.\n",
642
+ "parameters": [
643
+ {
644
+ "name": "project_id",
645
+ "in": "path",
646
+ "required": true,
647
+ "type": "string",
648
+ "description": "Unique project identifier (prefixed, e.g. prj_xxx)."
649
+ },
650
+ {
651
+ "name": "approval_rule_id",
652
+ "in": "path",
653
+ "required": true,
654
+ "type": "string",
655
+ "description": "Unique approval rule identifier (prefixed, e.g. apl_xxx)."
656
+ }
657
+ ],
658
+ "requestBodyType": "",
659
+ "requestBodyRequired": false,
660
+ "responseType": "",
661
+ "responseStatus": "204"
662
+ },
493
663
  "listApprovalRequests": {
494
664
  "operationId": "listApprovalRequests",
495
665
  "method": "GET",
@@ -789,7 +959,7 @@ export { o as operationsByPath, a as operationsByTag } from './operations-map.ge
789
959
  ],
790
960
  "requestBodyType": "",
791
961
  "requestBodyRequired": false,
792
- "responseType": "{ allowed: number; blocked: number; bytes_out: number; credential_ids: string[]; duration_ms: number; ended_at: string; entries_scanned: number; latency_ms_total: number; masked: number; other: number; project_id: string; rows_returned: number; scan_truncated: boolean; session_id: string; sources: string[]; started_at: string; statements: number; tables_blocked: string[]; tables_read: string[]; tables_written: string[]; truncated: number; unparsed_statements: number }",
962
+ "responseType": "{ allowed: number; anomalies?: { credential_window_alerts: ({ acknowledged_at?: string; acknowledged_by?: string; created_at: string; credential_id?: string; details?: Record<string, unknown>; id: string; kind: string; project_id: string; severity: \"info\" | \"warning\" | \"critical\"; status: \"open\" | \"acknowledged\" | \"resolved\"; title: string; window_end?: string; window_start?: string })[]; session_alerts: ({ acknowledged_at?: string; acknowledged_by?: string; created_at: string; credential_id?: string; details?: Record<string, unknown>; id: string; kind: string; project_id: string; severity: \"info\" | \"warning\" | \"critical\"; status: \"open\" | \"acknowledged\" | \"resolved\"; title: string; window_end?: string; window_start?: string })[]; truncated: boolean }; blocked: number; bytes_out: number; credential_ids: string[]; duration_ms: number; ended_at: string; entries_scanned: number; latency_ms_total: number; masked: number; other: number; project_id: string; rows_returned: number; scan_truncated: boolean; session_id: string; sources: string[]; started_at: string; statements: number; tables_blocked: string[]; tables_read: string[]; tables_written: string[]; truncated: number; unparsed_statements: number }",
793
963
  "responseStatus": "200"
794
964
  },
795
965
  "verifyAuditChain": {
@@ -1319,7 +1489,7 @@ export { o as operationsByPath, a as operationsByTag } from './operations-map.ge
1319
1489
  "method": "POST",
1320
1490
  "path": "/v1/projects/{project_id}/databases/{database_id}/scan-pii",
1321
1491
  "summary": "Scan a database for likely-PII columns",
1322
- "description": "Connects to the upstream database read-only, inspects information_schema and samples column values against PII heuristics, and returns ranked masking suggestions. Suggestions are advisory — the operator reviews them and applies the ones they want into a policy profile's masking rules. Nothing is auto-applied.",
1492
+ "description": "Connects to the upstream database read-only, inspects information_schema and samples column values against PII heuristics, and returns ranked masking suggestions. Suggestions are advisory: the operator reviews them and applies the ones they want into a policy profile's masking rules. Nothing is auto-applied.",
1323
1493
  "parameters": [
1324
1494
  {
1325
1495
  "name": "project_id",
@@ -1346,7 +1516,7 @@ export { o as operationsByPath, a as operationsByTag } from './operations-map.ge
1346
1516
  "method": "GET",
1347
1517
  "path": "/v1/projects/{project_id}/databases/{database_id}/schema-catalog",
1348
1518
  "summary": "Read a database's schema catalog",
1349
- "description": "Connects to the upstream database read-only and returns its user relations (tables and views) and columns. Powers table/column autocomplete and view-aware warnings in the policy editor — relation kind distinguishes a view (whose masking/row-filters apply to the view itself, not its base tables) from a base table, and a per-column is_binary flag flags columns that mask to NULL. System schemas are excluded; nothing is persisted.",
1519
+ "description": "Connects to the upstream database read-only and returns its user relations (tables and views) and columns. Powers table/column autocomplete and view-aware warnings in the policy editor. Relation kind distinguishes a view (whose masking/row-filters apply to the view itself, not its base tables) from a base table, and a per-column is_binary flag flags columns that mask to NULL. System schemas are excluded; nothing is persisted.",
1350
1520
  "parameters": [
1351
1521
  {
1352
1522
  "name": "project_id",
@@ -2730,7 +2900,7 @@ export { o as operationsByPath, a as operationsByTag } from './operations-map.ge
2730
2900
  "method": "POST",
2731
2901
  "path": "/v1/organizations/{org_id}/self-host-enrollments",
2732
2902
  "summary": "Issue a self-host enrollment token",
2733
- "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.",
2903
+ "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.\nReturns 409 while any project in the organization has an enabled approval rule, because PgBeam cannot yet confirm that a self-hosted proxy runs a build that enforces approval rules. Disable those rules first; they can be saved with enabled set to false.",
2734
2904
  "parameters": [
2735
2905
  {
2736
2906
  "name": "org_id",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pgbeam",
3
- "version": "0.4.19",
3
+ "version": "0.4.21",
4
4
  "description": "TypeScript SDK for the PgBeam API, a Postgres proxy for safe AI agent access with policy enforcement in the wire protocol",
5
5
  "type": "module",
6
6
  "exports": {