pgbeam 0.4.11 → 0.4.13

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,4 +1,4 @@
1
- export { o as operationsByPath, a as operationsByTag } from './operations-map.gen-nws17nv5.js';
1
+ export { o as operationsByPath, a as operationsByTag } from './operations-map.gen-cr323vpc.js';
2
2
 
3
3
  /**
4
4
  * Generated by generate-sdk-ts-maps.ts from backend/openapi/bundles/public.yaml — do not edit manually.
@@ -249,7 +249,7 @@ export { o as operationsByPath, a as operationsByTag } from './operations-map.ge
249
249
  ],
250
250
  "requestBodyType": "{ limit?: number; lookback_days?: number }",
251
251
  "requestBodyRequired": false,
252
- "responseType": "{ candidate?: { 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\" }; message?: string; notes?: string[]; observed_entries: number; observed_queries: number; replay?: { 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: { bound_credentials?: number; distinct_queries: number; entries_scanned: number; evaluated: number; newly_allowed: number; newly_blocked: number; skipped_unparseable: number; traffic_scope: \"project\" | \"bound_credentials\"; truncated: boolean; would_allow: number; would_block: number; would_mask: number; would_row_filter: number } }; sufficient_history: boolean; window_end: string; window_start: string }",
252
+ "responseType": "{ candidate?: { 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; content_scan_max_bytes?: number; content_scan_mode?: \"off\" | \"annotate\" | \"block\"; 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\" }; message?: string; notes?: string[]; observed_entries: number; observed_queries: number; replay?: { 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: { bound_credentials?: number; distinct_queries: number; entries_scanned: number; evaluated: number; newly_allowed: number; newly_blocked: number; skipped_unparseable: number; traffic_scope: \"project\" | \"bound_credentials\"; truncated: boolean; would_allow: number; would_block: number; would_mask: number; would_row_filter: number } }; sufficient_history: boolean; window_end: string; window_start: string }",
253
253
  "responseStatus": "200"
254
254
  },
255
255
  "listAnomalyAlerts": {
@@ -499,6 +499,13 @@ export { o as operationsByPath, a as operationsByTag } from './operations-map.ge
499
499
  "type": "number",
500
500
  "description": "Maximum number of items to return (1-100, default 20)."
501
501
  },
502
+ {
503
+ "name": "page_token",
504
+ "in": "query",
505
+ "required": false,
506
+ "type": "string",
507
+ "description": "Opaque token for cursor-based pagination."
508
+ },
502
509
  {
503
510
  "name": "If-None-Match",
504
511
  "in": "header",
@@ -1226,7 +1233,7 @@ export { o as operationsByPath, a as operationsByTag } from './operations-map.ge
1226
1233
  "parameters": [],
1227
1234
  "requestBodyType": "{ label?: string; payment_proof?: string; tier?: \"free\" | \"extended\" }",
1228
1235
  "requestBodyRequired": false,
1229
- "responseType": "{ connection_string: string; dataset: { schema: string; tables: ({ columns: ({ name: string; treatment: \"visible\" | \"redacted\" | \"hashed\" | \"nulled\"; type: string })[]; description: string; name: string; reachable: boolean })[] }; expires_at: string; mcp_token: string; mcp_url: string; policy_template: { 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\" }; query_budget: number; session_id: string; tier: string; ttl_seconds: number; upgrade: { description: string; docs_url: string; policy_endpoint: string; signup_url: string }; walkthrough: ({ expect: \"allow\" | \"masked\" | \"blocked\"; expect_columns?: ({ name: string; treatment: \"visible\" | \"redacted\" | \"hashed\" | \"nulled\"; type: string })[]; expect_rule?: string; sql: string; step: number; title: string; why: string })[] }",
1236
+ "responseType": "{ connection_string: string; dataset: { schema: string; tables: ({ columns: ({ name: string; treatment: \"visible\" | \"redacted\" | \"hashed\" | \"nulled\"; type: string })[]; description: string; name: string; reachable: boolean })[] }; expires_at: string; mcp_token: string; mcp_url: string; policy_template: { 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; content_scan_max_bytes?: number; content_scan_mode?: \"off\" | \"annotate\" | \"block\"; 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\" }; query_budget: number; session_id: string; tier: string; ttl_seconds: number; upgrade: { description: string; docs_url: string; policy_endpoint: string; signup_url: string }; walkthrough: ({ expect: \"allow\" | \"masked\" | \"blocked\"; expect_columns?: ({ name: string; treatment: \"visible\" | \"redacted\" | \"hashed\" | \"nulled\"; type: string })[]; expect_rule?: string; sql: string; step: number; title: string; why: string })[] }",
1230
1237
  "responseStatus": "201"
1231
1238
  },
1232
1239
  "releaseDemoCredential": {
@@ -1872,6 +1879,45 @@ export { o as operationsByPath, a as operationsByTag } from './operations-map.ge
1872
1879
  "responseType": "{ organizations: ({ id: string; name: string; role?: string; slug: string })[] }",
1873
1880
  "responseStatus": "200"
1874
1881
  },
1882
+ "listPaymentResources": {
1883
+ "operationId": "listPaymentResources",
1884
+ "method": "GET",
1885
+ "path": "/v1/payments/resources",
1886
+ "summary": "List priced resources",
1887
+ "description": "Lists what an agent can buy over the Machine Payments Protocol, with the\nunit, the pack size, and the price of one pack. Discovery only: the\n`WWW-Authenticate: Payment` challenge returned by a priced operation is\nalways authoritative.\n\nThis endpoint takes no authentication so an agent can read the price\nbefore it holds a credential.\n",
1888
+ "parameters": [],
1889
+ "requestBodyType": "",
1890
+ "requestBodyRequired": false,
1891
+ "responseType": "{ resources: ({ amount_per_pack: number; currency: string; description?: string; id: string; max_packs: number; min_packs: number; operation_id?: string; title: string; unit: string; units_per_pack: number })[] }",
1892
+ "responseStatus": "200"
1893
+ },
1894
+ "createBudgetTopup": {
1895
+ "operationId": "createBudgetTopup",
1896
+ "method": "POST",
1897
+ "path": "/v1/payments/budget-topups",
1898
+ "summary": "Buy query budget for an agent credential",
1899
+ "description": "Buys additional queries for the agent credential this request is\nauthenticated as, using the Machine Payments Protocol (HTTP 402 with the\n`Payment` authentication scheme).\n\nAuthenticate with the credential's hosted MCP token (`pba_...`) as a\nbearer token. The credential identifies itself, so no human and no\ndashboard session is involved.\n\nWithout a payment credential the response is `402` carrying a complete\n`WWW-Authenticate: Payment` challenge. Fulfil it, then repeat the request\nwith the credential in the `Payment-Authorization` header (the challenge\nselects that field so the bearer token can stay in `Authorization`). On\nsuccess the queries are granted, streamed to the data planes, and the\nresponse carries a `Payment-Receipt` header.\n\nPurchased queries do not raise the credential's policy budget. They are a\nseparate pool the proxy spends only once the policy's hourly and daily\nwindows have refused a statement, and they expire.\n",
1900
+ "parameters": [
1901
+ {
1902
+ "name": "Payment-Authorization",
1903
+ "in": "header",
1904
+ "required": false,
1905
+ "type": "string",
1906
+ "description": "The MPP payment credential, `Payment <base64url>`, echoing the\nchallenge from the `402` and carrying the method-specific proof. For\nthe `stripe` method the payload is `{\"spt\": \"spt_...\"}`, a single-use\nShared Payment Token.\n"
1907
+ },
1908
+ {
1909
+ "name": "Accept-Payment",
1910
+ "in": "header",
1911
+ "required": false,
1912
+ "type": "string",
1913
+ "description": "Payment method and intent preferences, for example `stripe/charge`.\nIgnored when it matches nothing this endpoint offers.\n"
1914
+ }
1915
+ ],
1916
+ "requestBodyType": "{ packs?: number }",
1917
+ "requestBodyRequired": false,
1918
+ "responseType": "{ amount: number; credential_id: string; currency: string; expires_at: string; grant_id: string; payment_reference?: string; queries: number; receipt?: string }",
1919
+ "responseStatus": "201"
1920
+ },
1875
1921
  "listPolicyProfiles": {
1876
1922
  "operationId": "listPolicyProfiles",
1877
1923
  "method": "GET",
@@ -1910,7 +1956,7 @@ export { o as operationsByPath, a as operationsByTag } from './operations-map.ge
1910
1956
  ],
1911
1957
  "requestBodyType": "",
1912
1958
  "requestBodyRequired": false,
1913
- "responseType": "{ next_page_token?: string; policies: ({ access_mode: \"read_only\" | \"read_write\"; approval_auto_max_rows?: number; approval_mode?: \"off\" | \"writes\" | \"ddl\" | \"all\"; approval_timeout_seconds?: number; budget_queries_per_day?: number; budget_queries_per_hour?: number; created_at: string; egress_bytes_per_day?: number; id: string; masking_rules: ({ column: string; kind: \"redact\" | \"null\" | \"hash\"; table: string })[]; max_affected_rows?: number; max_rows?: number; migration_safety?: \"off\" | \"warn\" | \"block\"; name: string; project_id: string; row_filters?: ({ predicate: string; table: string })[]; statement_rules?: { allow?: string[]; deny?: string[] }; statement_timeout_ms?: number; table_allowlist: string[]; table_denylist: string[]; updated_at: string; write_mode?: \"normal\" | \"rollback\" | \"sandbox\" })[] }",
1959
+ "responseType": "{ next_page_token?: string; policies: ({ access_mode: \"read_only\" | \"read_write\"; approval_auto_max_rows?: number; approval_mode?: \"off\" | \"writes\" | \"ddl\" | \"all\"; approval_timeout_seconds?: number; budget_queries_per_day?: number; budget_queries_per_hour?: number; content_scan_max_bytes?: number; content_scan_mode?: \"off\" | \"annotate\" | \"block\"; created_at: string; egress_bytes_per_day?: number; id: string; masking_rules: ({ column: string; kind: \"redact\" | \"null\" | \"hash\"; table: string })[]; max_affected_rows?: number; max_rows?: number; migration_safety?: \"off\" | \"warn\" | \"block\"; name: string; project_id: string; row_filters?: ({ predicate: string; table: string })[]; statement_rules?: { allow?: string[]; deny?: string[] }; statement_timeout_ms?: number; table_allowlist: string[]; table_denylist: string[]; updated_at: string; write_mode?: \"normal\" | \"rollback\" | \"sandbox\" })[] }",
1914
1960
  "responseStatus": "200"
1915
1961
  },
1916
1962
  "createPolicyProfile": {
@@ -1935,9 +1981,9 @@ export { o as operationsByPath, a as operationsByTag } from './operations-map.ge
1935
1981
  "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."
1936
1982
  }
1937
1983
  ],
1938
- "requestBodyType": "{ access_mode?: \"read_only\" | \"read_write\"; approval_auto_max_rows?: number; approval_mode?: \"off\" | \"writes\" | \"ddl\" | \"all\"; approval_timeout_seconds?: number; budget_queries_per_day?: number; budget_queries_per_hour?: number; egress_bytes_per_day?: number; masking_rules?: ({ column: string; kind: \"redact\" | \"null\" | \"hash\"; table: string })[]; max_affected_rows?: number; max_rows?: number; migration_safety?: \"off\" | \"warn\" | \"block\"; name: string; row_filters?: ({ predicate: string; table: string })[]; statement_rules?: { allow?: string[]; deny?: string[] }; statement_timeout_ms?: number; table_allowlist?: string[]; table_denylist?: string[]; write_mode?: \"normal\" | \"rollback\" | \"sandbox\" }",
1984
+ "requestBodyType": "{ access_mode?: \"read_only\" | \"read_write\"; approval_auto_max_rows?: number; approval_mode?: \"off\" | \"writes\" | \"ddl\" | \"all\"; approval_timeout_seconds?: number; budget_queries_per_day?: number; budget_queries_per_hour?: number; content_scan_max_bytes?: number; content_scan_mode?: \"off\" | \"annotate\" | \"block\"; 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\" }",
1939
1985
  "requestBodyRequired": true,
1940
- "responseType": "{ access_mode: \"read_only\" | \"read_write\"; approval_auto_max_rows?: number; approval_mode?: \"off\" | \"writes\" | \"ddl\" | \"all\"; approval_timeout_seconds?: number; budget_queries_per_day?: number; budget_queries_per_hour?: number; created_at: string; egress_bytes_per_day?: number; id: string; masking_rules: ({ column: string; kind: \"redact\" | \"null\" | \"hash\"; table: string })[]; max_affected_rows?: number; max_rows?: number; migration_safety?: \"off\" | \"warn\" | \"block\"; name: string; project_id: string; row_filters?: ({ predicate: string; table: string })[]; statement_rules?: { allow?: string[]; deny?: string[] }; statement_timeout_ms?: number; table_allowlist: string[]; table_denylist: string[]; updated_at: string; write_mode?: \"normal\" | \"rollback\" | \"sandbox\" }",
1986
+ "responseType": "{ access_mode: \"read_only\" | \"read_write\"; approval_auto_max_rows?: number; approval_mode?: \"off\" | \"writes\" | \"ddl\" | \"all\"; approval_timeout_seconds?: number; budget_queries_per_day?: number; budget_queries_per_hour?: number; content_scan_max_bytes?: number; content_scan_mode?: \"off\" | \"annotate\" | \"block\"; created_at: string; egress_bytes_per_day?: number; id: string; masking_rules: ({ column: string; kind: \"redact\" | \"null\" | \"hash\"; table: string })[]; max_affected_rows?: number; max_rows?: number; migration_safety?: \"off\" | \"warn\" | \"block\"; name: string; project_id: string; row_filters?: ({ predicate: string; table: string })[]; statement_rules?: { allow?: string[]; deny?: string[] }; statement_timeout_ms?: number; table_allowlist: string[]; table_denylist: string[]; updated_at: string; write_mode?: \"normal\" | \"rollback\" | \"sandbox\" }",
1941
1987
  "responseStatus": "201"
1942
1988
  },
1943
1989
  "getPolicyProfile": {
@@ -1971,7 +2017,7 @@ export { o as operationsByPath, a as operationsByTag } from './operations-map.ge
1971
2017
  ],
1972
2018
  "requestBodyType": "",
1973
2019
  "requestBodyRequired": false,
1974
- "responseType": "{ access_mode: \"read_only\" | \"read_write\"; approval_auto_max_rows?: number; approval_mode?: \"off\" | \"writes\" | \"ddl\" | \"all\"; approval_timeout_seconds?: number; budget_queries_per_day?: number; budget_queries_per_hour?: number; created_at: string; egress_bytes_per_day?: number; id: string; masking_rules: ({ column: string; kind: \"redact\" | \"null\" | \"hash\"; table: string })[]; max_affected_rows?: number; max_rows?: number; migration_safety?: \"off\" | \"warn\" | \"block\"; name: string; project_id: string; row_filters?: ({ predicate: string; table: string })[]; statement_rules?: { allow?: string[]; deny?: string[] }; statement_timeout_ms?: number; table_allowlist: string[]; table_denylist: string[]; updated_at: string; write_mode?: \"normal\" | \"rollback\" | \"sandbox\" }",
2020
+ "responseType": "{ access_mode: \"read_only\" | \"read_write\"; approval_auto_max_rows?: number; approval_mode?: \"off\" | \"writes\" | \"ddl\" | \"all\"; approval_timeout_seconds?: number; budget_queries_per_day?: number; budget_queries_per_hour?: number; content_scan_max_bytes?: number; content_scan_mode?: \"off\" | \"annotate\" | \"block\"; created_at: string; egress_bytes_per_day?: number; id: string; masking_rules: ({ column: string; kind: \"redact\" | \"null\" | \"hash\"; table: string })[]; max_affected_rows?: number; max_rows?: number; migration_safety?: \"off\" | \"warn\" | \"block\"; name: string; project_id: string; row_filters?: ({ predicate: string; table: string })[]; statement_rules?: { allow?: string[]; deny?: string[] }; statement_timeout_ms?: number; table_allowlist: string[]; table_denylist: string[]; updated_at: string; write_mode?: \"normal\" | \"rollback\" | \"sandbox\" }",
1975
2021
  "responseStatus": "200"
1976
2022
  },
1977
2023
  "updatePolicyProfile": {
@@ -2003,9 +2049,9 @@ export { o as operationsByPath, a as operationsByTag } from './operations-map.ge
2003
2049
  "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."
2004
2050
  }
2005
2051
  ],
2006
- "requestBodyType": "{ access_mode?: \"read_only\" | \"read_write\"; approval_auto_max_rows?: number; approval_mode?: \"off\" | \"writes\" | \"ddl\" | \"all\"; approval_timeout_seconds?: number; budget_queries_per_day?: number; budget_queries_per_hour?: number; egress_bytes_per_day?: number; masking_rules?: ({ column: string; kind: \"redact\" | \"null\" | \"hash\"; table: string })[]; max_affected_rows?: number; max_rows?: number; migration_safety?: \"off\" | \"warn\" | \"block\"; name: string; row_filters?: ({ predicate: string; table: string })[]; statement_rules?: { allow?: string[]; deny?: string[] }; statement_timeout_ms?: number; table_allowlist?: string[]; table_denylist?: string[]; write_mode?: \"normal\" | \"rollback\" | \"sandbox\" }",
2052
+ "requestBodyType": "{ access_mode?: \"read_only\" | \"read_write\"; approval_auto_max_rows?: number; approval_mode?: \"off\" | \"writes\" | \"ddl\" | \"all\"; approval_timeout_seconds?: number; budget_queries_per_day?: number; budget_queries_per_hour?: number; content_scan_max_bytes?: number; content_scan_mode?: \"off\" | \"annotate\" | \"block\"; 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\" }",
2007
2053
  "requestBodyRequired": true,
2008
- "responseType": "{ access_mode: \"read_only\" | \"read_write\"; approval_auto_max_rows?: number; approval_mode?: \"off\" | \"writes\" | \"ddl\" | \"all\"; approval_timeout_seconds?: number; budget_queries_per_day?: number; budget_queries_per_hour?: number; created_at: string; egress_bytes_per_day?: number; id: string; masking_rules: ({ column: string; kind: \"redact\" | \"null\" | \"hash\"; table: string })[]; max_affected_rows?: number; max_rows?: number; migration_safety?: \"off\" | \"warn\" | \"block\"; name: string; project_id: string; row_filters?: ({ predicate: string; table: string })[]; statement_rules?: { allow?: string[]; deny?: string[] }; statement_timeout_ms?: number; table_allowlist: string[]; table_denylist: string[]; updated_at: string; write_mode?: \"normal\" | \"rollback\" | \"sandbox\" }",
2054
+ "responseType": "{ access_mode: \"read_only\" | \"read_write\"; approval_auto_max_rows?: number; approval_mode?: \"off\" | \"writes\" | \"ddl\" | \"all\"; approval_timeout_seconds?: number; budget_queries_per_day?: number; budget_queries_per_hour?: number; content_scan_max_bytes?: number; content_scan_mode?: \"off\" | \"annotate\" | \"block\"; created_at: string; egress_bytes_per_day?: number; id: string; masking_rules: ({ column: string; kind: \"redact\" | \"null\" | \"hash\"; table: string })[]; max_affected_rows?: number; max_rows?: number; migration_safety?: \"off\" | \"warn\" | \"block\"; name: string; project_id: string; row_filters?: ({ predicate: string; table: string })[]; statement_rules?: { allow?: string[]; deny?: string[] }; statement_timeout_ms?: number; table_allowlist: string[]; table_denylist: string[]; updated_at: string; write_mode?: \"normal\" | \"rollback\" | \"sandbox\" }",
2009
2055
  "responseStatus": "200"
2010
2056
  },
2011
2057
  "deletePolicyProfile": {
@@ -2050,7 +2096,7 @@ export { o as operationsByPath, a as operationsByTag } from './operations-map.ge
2050
2096
  "description": "Unique project identifier (prefixed, e.g. prj_xxx)."
2051
2097
  }
2052
2098
  ],
2053
- "requestBodyType": "{ policy?: { access_mode?: \"read_only\" | \"read_write\"; approval_auto_max_rows?: number; approval_mode?: \"off\" | \"writes\" | \"ddl\" | \"all\"; approval_timeout_seconds?: number; budget_queries_per_day?: number; budget_queries_per_hour?: number; egress_bytes_per_day?: number; masking_rules?: ({ column: string; kind: \"redact\" | \"null\" | \"hash\"; table: string })[]; max_affected_rows?: number; max_rows?: number; migration_safety?: \"off\" | \"warn\" | \"block\"; name: string; row_filters?: ({ predicate: string; table: string })[]; statement_rules?: { allow?: string[]; deny?: string[] }; statement_timeout_ms?: number; table_allowlist?: string[]; table_denylist?: string[]; write_mode?: \"normal\" | \"rollback\" | \"sandbox\" }; policy_id?: string; sql: string }",
2099
+ "requestBodyType": "{ policy?: { access_mode?: \"read_only\" | \"read_write\"; approval_auto_max_rows?: number; approval_mode?: \"off\" | \"writes\" | \"ddl\" | \"all\"; approval_timeout_seconds?: number; budget_queries_per_day?: number; budget_queries_per_hour?: number; content_scan_max_bytes?: number; content_scan_mode?: \"off\" | \"annotate\" | \"block\"; egress_bytes_per_day?: number; masking_rules?: ({ column: string; kind: \"redact\" | \"null\" | \"hash\"; table: string })[]; max_affected_rows?: number; max_rows?: number; migration_safety?: \"off\" | \"warn\" | \"block\"; name: string; row_filters?: ({ predicate: string; table: string })[]; statement_rules?: { allow?: string[]; deny?: string[] }; statement_timeout_ms?: number; table_allowlist?: string[]; table_denylist?: string[]; write_mode?: \"normal\" | \"rollback\" | \"sandbox\" }; policy_id?: string; sql: string }",
2054
2100
  "requestBodyRequired": true,
2055
2101
  "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\" }",
2056
2102
  "responseStatus": "200"
@@ -2070,7 +2116,7 @@ export { o as operationsByPath, a as operationsByTag } from './operations-map.ge
2070
2116
  "description": "Unique project identifier (prefixed, e.g. prj_xxx)."
2071
2117
  }
2072
2118
  ],
2073
- "requestBodyType": "{ bound_policy_id?: string; 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 }",
2119
+ "requestBodyType": "{ bound_policy_id?: string; 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; content_scan_max_bytes?: number; content_scan_mode?: \"off\" | \"annotate\" | \"block\"; 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 }",
2074
2120
  "requestBodyRequired": true,
2075
2121
  "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: { bound_credentials?: number; distinct_queries: number; entries_scanned: number; evaluated: number; newly_allowed: number; newly_blocked: number; skipped_unparseable: number; traffic_scope: \"project\" | \"bound_credentials\"; truncated: boolean; would_allow: number; would_block: number; would_mask: number; would_row_filter: number } }",
2076
2122
  "responseStatus": "200"
@@ -2283,7 +2329,7 @@ export { o as operationsByPath, a as operationsByTag } from './operations-map.ge
2283
2329
  "method": "GET",
2284
2330
  "path": "/v1/databases/{database_id}/replicas",
2285
2331
  "summary": "List replicas",
2286
- "description": "Lists all read replicas for a database.",
2332
+ "description": "Lists a database's read replicas.",
2287
2333
  "parameters": [
2288
2334
  {
2289
2335
  "name": "database_id",
@@ -2292,6 +2338,20 @@ export { o as operationsByPath, a as operationsByTag } from './operations-map.ge
2292
2338
  "type": "string",
2293
2339
  "description": "Unique database identifier (prefixed, e.g. db_xxx)."
2294
2340
  },
2341
+ {
2342
+ "name": "page_size",
2343
+ "in": "query",
2344
+ "required": false,
2345
+ "type": "number",
2346
+ "description": "Maximum number of items to return (1-100, default 20)."
2347
+ },
2348
+ {
2349
+ "name": "page_token",
2350
+ "in": "query",
2351
+ "required": false,
2352
+ "type": "string",
2353
+ "description": "Opaque token for cursor-based pagination."
2354
+ },
2295
2355
  {
2296
2356
  "name": "If-None-Match",
2297
2357
  "in": "header",
@@ -2475,6 +2535,20 @@ export { o as operationsByPath, a as operationsByTag } from './operations-map.ge
2475
2535
  "type": "string",
2476
2536
  "description": "Unique organization identifier."
2477
2537
  },
2538
+ {
2539
+ "name": "page_size",
2540
+ "in": "query",
2541
+ "required": false,
2542
+ "type": "number",
2543
+ "description": "Maximum number of items to return (1-100, default 20)."
2544
+ },
2545
+ {
2546
+ "name": "page_token",
2547
+ "in": "query",
2548
+ "required": false,
2549
+ "type": "string",
2550
+ "description": "Opaque token for cursor-based pagination."
2551
+ },
2478
2552
  {
2479
2553
  "name": "If-None-Match",
2480
2554
  "in": "header",
@@ -2485,7 +2559,7 @@ export { o as operationsByPath, a as operationsByTag } from './operations-map.ge
2485
2559
  ],
2486
2560
  "requestBodyType": "",
2487
2561
  "requestBodyRequired": false,
2488
- "responseType": "{ enrollments: ({ created_at: string; created_by?: string; description?: string; expires_at?: string; id: string; last_seen_at?: string; org_id: string; region_label?: string; revoked_at?: string })[] }",
2562
+ "responseType": "{ enrollments: ({ created_at: string; created_by?: string; description?: string; expires_at?: string; id: string; last_seen_at?: string; org_id: string; region_label?: string; revoked_at?: string })[]; next_page_token?: string }",
2489
2563
  "responseStatus": "200"
2490
2564
  },
2491
2565
  "createSelfHostEnrollment": {
@@ -2611,6 +2685,13 @@ export { o as operationsByPath, a as operationsByTag } from './operations-map.ge
2611
2685
  "type": "number",
2612
2686
  "description": "Number of results per page (1-100, default 20)."
2613
2687
  },
2688
+ {
2689
+ "name": "page_token",
2690
+ "in": "query",
2691
+ "required": false,
2692
+ "type": "string",
2693
+ "description": "Opaque token for cursor-based pagination."
2694
+ },
2614
2695
  {
2615
2696
  "name": "page",
2616
2697
  "in": "query",
@@ -2628,7 +2709,7 @@ export { o as operationsByPath, a as operationsByTag } from './operations-map.ge
2628
2709
  ],
2629
2710
  "requestBodyType": "",
2630
2711
  "requestBodyRequired": false,
2631
- "responseType": "{ cases: ({ case_number: number; closed_at?: string; created_at: string; id: string; message_count?: number; org_id: string; severity: number; slack_channel_id?: string; slack_thread_ts?: string; status: \"open\" | \"closed\"; title: string; updated_at: string; user_id: string })[]; total: number }",
2712
+ "responseType": "{ cases: ({ case_number: number; closed_at?: string; created_at: string; id: string; message_count?: number; org_id: string; severity: number; slack_channel_id?: string; slack_thread_ts?: string; status: \"open\" | \"closed\"; title: string; updated_at: string; user_id: string })[]; next_page_token?: string; total: number }",
2632
2713
  "responseStatus": "200"
2633
2714
  },
2634
2715
  "createSupportCase": {
@@ -2765,6 +2846,18 @@ export { o as operationsByPath, a as operationsByTag } from './operations-map.ge
2765
2846
  "responseType": "",
2766
2847
  "responseStatus": "200"
2767
2848
  },
2849
+ "scanText": {
2850
+ "operationId": "scanText",
2851
+ "method": "POST",
2852
+ "path": "/v1/scan/text",
2853
+ "summary": "Scan untrusted text for prompt injection",
2854
+ "description": "Inspects one piece of untrusted text for the techniques used to smuggle instructions into a model's context, and returns a verdict, a recommended action, and the evidence behind it.\n\nTwo detector families run. The structural layer reads codepoints and scripts: invisible-codepoint runs, Unicode Tag smuggling, unterminated bidirectional overrides, and mixed-script words. None of those has a legitimate reason to appear in ordinary text, so a structural finding is a fact worth acting on. The lexical layer is exact-phrase matching with Unicode normalization, which is worth what exact-phrase matching is worth: it is a reason to look, and a support ticket quoting an attack contains the attack. Neither layer is a semantic classifier, and this endpoint does not pretend to catch prose that is hostile only in its meaning. The measured confusion matrix and the list of evasions that are known to work are published at https://pgbeam.com/docs/prompt-scan.\n\nAuthentication is optional. Anonymous callers get a free daily allowance keyed on their source address; an API key moves the allowance onto the organization. Past the allowance the endpoint answers 402 with a payment challenge.\n\nThe submitted text is held in memory for the duration of the request and is never logged, stored, or used to train anything. An `Idempotency-Key` is refused on this operation rather than honoured, because honouring it would persist the response, and the response quotes the submitted text back. The operation has no side effects beyond metering, so a retry is safe without one.",
2855
+ "parameters": [],
2856
+ "requestBodyType": "{ include_evidence?: boolean; layers?: (\"structural\" | \"lexical\")[]; text: string }",
2857
+ "requestBodyRequired": true,
2858
+ "responseType": "{ action: \"allow\" | \"review\" | \"block\"; action_reason: string; advice: string; engine: string; findings: ({ confidence: \"low\" | \"medium\" | \"high\"; detail: string; evidence?: string; layer: \"structural\" | \"lexical\"; offset: number; technique: \"invisible_run\" | \"tag_smuggling\" | \"bidi_override\" | \"mixed_script\" | \"instruction_phrase\" | \"invalid_encoding\" | \"truncated\" })[]; has_structural: boolean; highest_confidence?: \"low\" | \"medium\" | \"high\"; quota: { free_limit: number; free_remaining: number; paid_remaining: number; resets_at: string }; scanned_bytes: number; truncated: boolean; verdict: \"clean\" | \"suspicious\" | \"unscannable\" }",
2859
+ "responseStatus": "200"
2860
+ },
2768
2861
  "getOrganizationUsage": {
2769
2862
  "operationId": "getOrganizationUsage",
2770
2863
  "method": "GET",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pgbeam",
3
- "version": "0.4.11",
3
+ "version": "0.4.13",
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": {