pgbeam 0.4.21 → 0.5.0
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 +68 -11
- package/dist/index.d.cts +51 -9
- package/dist/index.d.mts +51 -9
- package/dist/index.mjs +68 -12
- package/dist/{operations-map.gen-l4ihw4c3.cjs → operations-map.gen-fayr6b1o.cjs} +49 -13
- package/dist/{operations-map.gen-le9c2b3b.d.ts → operations-map.gen-g8h39ajx.d.ts} +1212 -401
- package/dist/{operations-map.gen-jqwfh8a6.js → operations-map.gen-ir66wlzb.js} +49 -13
- package/dist/operations.cjs +167 -16
- package/dist/operations.d.cts +1 -1
- package/dist/operations.d.mts +1 -1
- package/dist/operations.mjs +167 -16
- package/package.json +7 -6
|
@@ -122,6 +122,26 @@
|
|
|
122
122
|
replayPolicy: {
|
|
123
123
|
method: "POST",
|
|
124
124
|
path: "/v1/projects/{project_id}/policy-replays"
|
|
125
|
+
},
|
|
126
|
+
listQueryTemplates: {
|
|
127
|
+
method: "GET",
|
|
128
|
+
path: "/v1/projects/{project_id}/query-templates"
|
|
129
|
+
},
|
|
130
|
+
createQueryTemplate: {
|
|
131
|
+
method: "POST",
|
|
132
|
+
path: "/v1/projects/{project_id}/query-templates"
|
|
133
|
+
},
|
|
134
|
+
getQueryTemplate: {
|
|
135
|
+
method: "GET",
|
|
136
|
+
path: "/v1/projects/{project_id}/query-templates/{query_template_id}"
|
|
137
|
+
},
|
|
138
|
+
updateQueryTemplate: {
|
|
139
|
+
method: "PUT",
|
|
140
|
+
path: "/v1/projects/{project_id}/query-templates/{query_template_id}"
|
|
141
|
+
},
|
|
142
|
+
deleteQueryTemplate: {
|
|
143
|
+
method: "DELETE",
|
|
144
|
+
path: "/v1/projects/{project_id}/query-templates/{query_template_id}"
|
|
125
145
|
}
|
|
126
146
|
},
|
|
127
147
|
anomalies: {
|
|
@@ -375,7 +395,8 @@
|
|
|
375
395
|
},
|
|
376
396
|
scanText: {
|
|
377
397
|
method: "POST",
|
|
378
|
-
path: "/v1/scan/text"
|
|
398
|
+
path: "/v1/scan/text",
|
|
399
|
+
refusesIdempotencyKey: true
|
|
379
400
|
}
|
|
380
401
|
},
|
|
381
402
|
honeytokens: {
|
|
@@ -452,12 +473,6 @@
|
|
|
452
473
|
path: "/v1/organizations/{org_id}/support/cases/{case_id}/messages"
|
|
453
474
|
}
|
|
454
475
|
},
|
|
455
|
-
internal: {
|
|
456
|
-
handleSlackSupportEvent: {
|
|
457
|
-
method: "POST",
|
|
458
|
-
path: "/v1/internal/support/slack-event"
|
|
459
|
-
}
|
|
460
|
-
},
|
|
461
476
|
webhooks: {
|
|
462
477
|
listWebhookEndpoints: {
|
|
463
478
|
method: "GET",
|
|
@@ -906,6 +921,31 @@ const operationsByPath = {
|
|
|
906
921
|
path: "/v1/projects/{project_id}/metrics",
|
|
907
922
|
operationId: "getProjectMetrics"
|
|
908
923
|
},
|
|
924
|
+
"GET /v1/projects/{project_id}/query-templates": {
|
|
925
|
+
method: "GET",
|
|
926
|
+
path: "/v1/projects/{project_id}/query-templates",
|
|
927
|
+
operationId: "listQueryTemplates"
|
|
928
|
+
},
|
|
929
|
+
"POST /v1/projects/{project_id}/query-templates": {
|
|
930
|
+
method: "POST",
|
|
931
|
+
path: "/v1/projects/{project_id}/query-templates",
|
|
932
|
+
operationId: "createQueryTemplate"
|
|
933
|
+
},
|
|
934
|
+
"GET /v1/projects/{project_id}/query-templates/{query_template_id}": {
|
|
935
|
+
method: "GET",
|
|
936
|
+
path: "/v1/projects/{project_id}/query-templates/{query_template_id}",
|
|
937
|
+
operationId: "getQueryTemplate"
|
|
938
|
+
},
|
|
939
|
+
"PUT /v1/projects/{project_id}/query-templates/{query_template_id}": {
|
|
940
|
+
method: "PUT",
|
|
941
|
+
path: "/v1/projects/{project_id}/query-templates/{query_template_id}",
|
|
942
|
+
operationId: "updateQueryTemplate"
|
|
943
|
+
},
|
|
944
|
+
"DELETE /v1/projects/{project_id}/query-templates/{query_template_id}": {
|
|
945
|
+
method: "DELETE",
|
|
946
|
+
path: "/v1/projects/{project_id}/query-templates/{query_template_id}",
|
|
947
|
+
operationId: "deleteQueryTemplate"
|
|
948
|
+
},
|
|
909
949
|
"GET /v1/regions": {
|
|
910
950
|
method: "GET",
|
|
911
951
|
path: "/v1/regions",
|
|
@@ -986,15 +1026,11 @@ const operationsByPath = {
|
|
|
986
1026
|
path: "/v1/organizations/{org_id}/support/cases/{case_id}/messages",
|
|
987
1027
|
operationId: "createSupportMessage"
|
|
988
1028
|
},
|
|
989
|
-
"POST /v1/internal/support/slack-event": {
|
|
990
|
-
method: "POST",
|
|
991
|
-
path: "/v1/internal/support/slack-event",
|
|
992
|
-
operationId: "handleSlackSupportEvent"
|
|
993
|
-
},
|
|
994
1029
|
"POST /v1/scan/text": {
|
|
995
1030
|
method: "POST",
|
|
996
1031
|
path: "/v1/scan/text",
|
|
997
|
-
operationId: "scanText"
|
|
1032
|
+
operationId: "scanText",
|
|
1033
|
+
refusesIdempotencyKey: true
|
|
998
1034
|
},
|
|
999
1035
|
"GET /v1/organizations/{org_id}/usage": {
|
|
1000
1036
|
method: "GET",
|
package/dist/operations.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
2
|
|
|
3
|
-
var operationsMap_gen = require('./operations-map.gen-
|
|
3
|
+
var operationsMap_gen = require('./operations-map.gen-fayr6b1o.cjs');
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Generated by generate-sdk-ts-maps.ts from backend/openapi/bundles/public.yaml — do not edit manually.
|
|
@@ -251,7 +251,7 @@ var operationsMap_gen = require('./operations-map.gen-l4ihw4c3.cjs');
|
|
|
251
251
|
],
|
|
252
252
|
"requestBodyType": "{ limit?: number; lookback_days?: number }",
|
|
253
253
|
"requestBodyRequired": false,
|
|
254
|
-
"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 }",
|
|
254
|
+
"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; template?: 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 }",
|
|
255
255
|
"responseStatus": "200"
|
|
256
256
|
},
|
|
257
257
|
"listAnomalyAlerts": {
|
|
@@ -2433,7 +2433,7 @@ var operationsMap_gen = require('./operations-map.gen-l4ihw4c3.cjs');
|
|
|
2433
2433
|
],
|
|
2434
2434
|
"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 }",
|
|
2435
2435
|
"requestBodyRequired": true,
|
|
2436
|
-
"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\" }",
|
|
2436
|
+
"responseType": "{ hint?: string; masked_columns?: ({ column: string; kind: \"redact\" | \"null\" | \"hash\" })[]; notes?: string[]; reason: string; rewritten_sql?: string; row_filter_predicate?: string; rule: string; template?: string; verdict: \"allow\" | \"block\" | \"mask\" | \"row-filter\" }",
|
|
2437
2437
|
"responseStatus": "200"
|
|
2438
2438
|
},
|
|
2439
2439
|
"replayPolicy": {
|
|
@@ -2453,7 +2453,7 @@ var operationsMap_gen = require('./operations-map.gen-l4ihw4c3.cjs');
|
|
|
2453
2453
|
],
|
|
2454
2454
|
"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 }",
|
|
2455
2455
|
"requestBodyRequired": true,
|
|
2456
|
-
"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 } }",
|
|
2456
|
+
"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; template?: 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 } }",
|
|
2457
2457
|
"responseStatus": "200"
|
|
2458
2458
|
},
|
|
2459
2459
|
"listProjects": {
|
|
@@ -2639,6 +2639,169 @@ var operationsMap_gen = require('./operations-map.gen-l4ihw4c3.cjs');
|
|
|
2639
2639
|
"responseType": "{ snapshots: ({ active_connections: number; avg_connect_ms?: number; avg_latency_ms: number; avg_query_ms?: number; cache_hits: number; cache_misses: number; created_at: string; id: string; p99_latency_ms: number; project_id: string; queries_total: number; region: string })[] }",
|
|
2640
2640
|
"responseStatus": "200"
|
|
2641
2641
|
},
|
|
2642
|
+
"listQueryTemplates": {
|
|
2643
|
+
"operationId": "listQueryTemplates",
|
|
2644
|
+
"method": "GET",
|
|
2645
|
+
"path": "/v1/projects/{project_id}/query-templates",
|
|
2646
|
+
"summary": "List query templates",
|
|
2647
|
+
"description": "Lists the project's query templates, including disabled ones.",
|
|
2648
|
+
"parameters": [
|
|
2649
|
+
{
|
|
2650
|
+
"name": "project_id",
|
|
2651
|
+
"in": "path",
|
|
2652
|
+
"required": true,
|
|
2653
|
+
"type": "string",
|
|
2654
|
+
"description": "Unique project identifier (prefixed, e.g. prj_xxx)."
|
|
2655
|
+
},
|
|
2656
|
+
{
|
|
2657
|
+
"name": "page_size",
|
|
2658
|
+
"in": "query",
|
|
2659
|
+
"required": false,
|
|
2660
|
+
"type": "number",
|
|
2661
|
+
"description": "Maximum number of items to return (1-100, default 20)."
|
|
2662
|
+
},
|
|
2663
|
+
{
|
|
2664
|
+
"name": "page_token",
|
|
2665
|
+
"in": "query",
|
|
2666
|
+
"required": false,
|
|
2667
|
+
"type": "string",
|
|
2668
|
+
"description": "Opaque token for cursor-based pagination."
|
|
2669
|
+
},
|
|
2670
|
+
{
|
|
2671
|
+
"name": "If-None-Match",
|
|
2672
|
+
"in": "header",
|
|
2673
|
+
"required": false,
|
|
2674
|
+
"type": "string",
|
|
2675
|
+
"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."
|
|
2676
|
+
}
|
|
2677
|
+
],
|
|
2678
|
+
"requestBodyType": "",
|
|
2679
|
+
"requestBodyRequired": false,
|
|
2680
|
+
"responseType": "{ next_page_token?: string; query_templates: ({ created_at: string; description: string; enabled: boolean; id: string; include_sql: boolean; name: string; params: ({ name: string; nullable?: boolean; type: \"text\" | \"integer\" | \"bigint\" | \"double precision\" | \"numeric\" | \"boolean\" | \"uuid\" | \"date\" | \"timestamptz\" | \"jsonb\" })[]; project_id: string; sql: string; statement_kind?: \"select\" | \"insert\" | \"update\" | \"delete\"; updated_at: string })[] }",
|
|
2681
|
+
"responseStatus": "200"
|
|
2682
|
+
},
|
|
2683
|
+
"createQueryTemplate": {
|
|
2684
|
+
"operationId": "createQueryTemplate",
|
|
2685
|
+
"method": "POST",
|
|
2686
|
+
"path": "/v1/projects/{project_id}/query-templates",
|
|
2687
|
+
"summary": "Create a query template",
|
|
2688
|
+
"description": "Adds a named, parameterized statement to the project. A template admits\na statement for a policy profile that runs templates only; it never\ngrants access, and the statement still meets the credential's whole\npolicy.\n\nThe SQL is parsed and checked when it is written: exactly one SELECT,\nINSERT, UPDATE or DELETE, placeholders $1 to $n, one declared parameter\nfor each. A template that fails is refused with 400 and a message\nnaming the problem. Returns 409 when the project already has a template\nof that name.\n\nThe template is pushed to connected data planes when it is written.\n\nReturns 409 for an enabled template 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 templates. A\ntemplate with enabled set to false is still accepted.\n",
|
|
2689
|
+
"parameters": [
|
|
2690
|
+
{
|
|
2691
|
+
"name": "project_id",
|
|
2692
|
+
"in": "path",
|
|
2693
|
+
"required": true,
|
|
2694
|
+
"type": "string",
|
|
2695
|
+
"description": "Unique project identifier (prefixed, e.g. prj_xxx)."
|
|
2696
|
+
},
|
|
2697
|
+
{
|
|
2698
|
+
"name": "Idempotency-Key",
|
|
2699
|
+
"in": "header",
|
|
2700
|
+
"required": false,
|
|
2701
|
+
"type": "string",
|
|
2702
|
+
"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."
|
|
2703
|
+
}
|
|
2704
|
+
],
|
|
2705
|
+
"requestBodyType": "{ description?: string; enabled?: boolean; include_sql?: boolean; name: string; params?: ({ name: string; nullable?: boolean; type: \"text\" | \"integer\" | \"bigint\" | \"double precision\" | \"numeric\" | \"boolean\" | \"uuid\" | \"date\" | \"timestamptz\" | \"jsonb\" })[]; sql: string }",
|
|
2706
|
+
"requestBodyRequired": true,
|
|
2707
|
+
"responseType": "{ created_at: string; description: string; enabled: boolean; id: string; include_sql: boolean; name: string; params: ({ name: string; nullable?: boolean; type: \"text\" | \"integer\" | \"bigint\" | \"double precision\" | \"numeric\" | \"boolean\" | \"uuid\" | \"date\" | \"timestamptz\" | \"jsonb\" })[]; project_id: string; sql: string; statement_kind?: \"select\" | \"insert\" | \"update\" | \"delete\"; updated_at: string }",
|
|
2708
|
+
"responseStatus": "201"
|
|
2709
|
+
},
|
|
2710
|
+
"getQueryTemplate": {
|
|
2711
|
+
"operationId": "getQueryTemplate",
|
|
2712
|
+
"method": "GET",
|
|
2713
|
+
"path": "/v1/projects/{project_id}/query-templates/{query_template_id}",
|
|
2714
|
+
"summary": "Get a query template",
|
|
2715
|
+
"description": "Returns a single query template by ID.",
|
|
2716
|
+
"parameters": [
|
|
2717
|
+
{
|
|
2718
|
+
"name": "project_id",
|
|
2719
|
+
"in": "path",
|
|
2720
|
+
"required": true,
|
|
2721
|
+
"type": "string",
|
|
2722
|
+
"description": "Unique project identifier (prefixed, e.g. prj_xxx)."
|
|
2723
|
+
},
|
|
2724
|
+
{
|
|
2725
|
+
"name": "query_template_id",
|
|
2726
|
+
"in": "path",
|
|
2727
|
+
"required": true,
|
|
2728
|
+
"type": "string",
|
|
2729
|
+
"description": "Unique query template identifier (prefixed, e.g. qtp_xxx)."
|
|
2730
|
+
},
|
|
2731
|
+
{
|
|
2732
|
+
"name": "If-None-Match",
|
|
2733
|
+
"in": "header",
|
|
2734
|
+
"required": false,
|
|
2735
|
+
"type": "string",
|
|
2736
|
+
"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."
|
|
2737
|
+
}
|
|
2738
|
+
],
|
|
2739
|
+
"requestBodyType": "",
|
|
2740
|
+
"requestBodyRequired": false,
|
|
2741
|
+
"responseType": "{ created_at: string; description: string; enabled: boolean; id: string; include_sql: boolean; name: string; params: ({ name: string; nullable?: boolean; type: \"text\" | \"integer\" | \"bigint\" | \"double precision\" | \"numeric\" | \"boolean\" | \"uuid\" | \"date\" | \"timestamptz\" | \"jsonb\" })[]; project_id: string; sql: string; statement_kind?: \"select\" | \"insert\" | \"update\" | \"delete\"; updated_at: string }",
|
|
2742
|
+
"responseStatus": "200"
|
|
2743
|
+
},
|
|
2744
|
+
"updateQueryTemplate": {
|
|
2745
|
+
"operationId": "updateQueryTemplate",
|
|
2746
|
+
"method": "PUT",
|
|
2747
|
+
"path": "/v1/projects/{project_id}/query-templates/{query_template_id}",
|
|
2748
|
+
"summary": "Update a query template",
|
|
2749
|
+
"description": "Replaces the template's name, description, SQL, parameters, include_sql\nand enabled flag. The SQL is checked as on create. A statement already\nadmitted under the old template is not affected; the next one is\nmatched against the new text.\n\nReturns 409 on a rename to a name the project already uses, and when\nthe update leaves the template enabled while the organization has a\nlive self-hosted data plane enrollment, for the same reason as create.\nSetting enabled to false is still accepted.\n",
|
|
2750
|
+
"parameters": [
|
|
2751
|
+
{
|
|
2752
|
+
"name": "project_id",
|
|
2753
|
+
"in": "path",
|
|
2754
|
+
"required": true,
|
|
2755
|
+
"type": "string",
|
|
2756
|
+
"description": "Unique project identifier (prefixed, e.g. prj_xxx)."
|
|
2757
|
+
},
|
|
2758
|
+
{
|
|
2759
|
+
"name": "query_template_id",
|
|
2760
|
+
"in": "path",
|
|
2761
|
+
"required": true,
|
|
2762
|
+
"type": "string",
|
|
2763
|
+
"description": "Unique query template identifier (prefixed, e.g. qtp_xxx)."
|
|
2764
|
+
},
|
|
2765
|
+
{
|
|
2766
|
+
"name": "If-Match",
|
|
2767
|
+
"in": "header",
|
|
2768
|
+
"required": false,
|
|
2769
|
+
"type": "string",
|
|
2770
|
+
"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."
|
|
2771
|
+
}
|
|
2772
|
+
],
|
|
2773
|
+
"requestBodyType": "{ description?: string; enabled?: boolean; include_sql?: boolean; name: string; params?: ({ name: string; nullable?: boolean; type: \"text\" | \"integer\" | \"bigint\" | \"double precision\" | \"numeric\" | \"boolean\" | \"uuid\" | \"date\" | \"timestamptz\" | \"jsonb\" })[]; sql: string }",
|
|
2774
|
+
"requestBodyRequired": true,
|
|
2775
|
+
"responseType": "{ created_at: string; description: string; enabled: boolean; id: string; include_sql: boolean; name: string; params: ({ name: string; nullable?: boolean; type: \"text\" | \"integer\" | \"bigint\" | \"double precision\" | \"numeric\" | \"boolean\" | \"uuid\" | \"date\" | \"timestamptz\" | \"jsonb\" })[]; project_id: string; sql: string; statement_kind?: \"select\" | \"insert\" | \"update\" | \"delete\"; updated_at: string }",
|
|
2776
|
+
"responseStatus": "200"
|
|
2777
|
+
},
|
|
2778
|
+
"deleteQueryTemplate": {
|
|
2779
|
+
"operationId": "deleteQueryTemplate",
|
|
2780
|
+
"method": "DELETE",
|
|
2781
|
+
"path": "/v1/projects/{project_id}/query-templates/{query_template_id}",
|
|
2782
|
+
"summary": "Delete a query template",
|
|
2783
|
+
"description": "Removes the template, so a profile that runs templates only stops\nadmitting its statement. Deleting the last template is allowed: such a\nprofile then admits nothing, which is the intended way to withdraw\naccess in an incident.\n",
|
|
2784
|
+
"parameters": [
|
|
2785
|
+
{
|
|
2786
|
+
"name": "project_id",
|
|
2787
|
+
"in": "path",
|
|
2788
|
+
"required": true,
|
|
2789
|
+
"type": "string",
|
|
2790
|
+
"description": "Unique project identifier (prefixed, e.g. prj_xxx)."
|
|
2791
|
+
},
|
|
2792
|
+
{
|
|
2793
|
+
"name": "query_template_id",
|
|
2794
|
+
"in": "path",
|
|
2795
|
+
"required": true,
|
|
2796
|
+
"type": "string",
|
|
2797
|
+
"description": "Unique query template identifier (prefixed, e.g. qtp_xxx)."
|
|
2798
|
+
}
|
|
2799
|
+
],
|
|
2800
|
+
"requestBodyType": "",
|
|
2801
|
+
"requestBodyRequired": false,
|
|
2802
|
+
"responseType": "",
|
|
2803
|
+
"responseStatus": "204"
|
|
2804
|
+
},
|
|
2642
2805
|
"listRegions": {
|
|
2643
2806
|
"operationId": "listRegions",
|
|
2644
2807
|
"method": "GET",
|
|
@@ -3169,18 +3332,6 @@ var operationsMap_gen = require('./operations-map.gen-l4ihw4c3.cjs');
|
|
|
3169
3332
|
"responseType": "{ author_image?: string; author_name: string; body: string; case_id: string; created_at: string; id: string; slack_user_id?: string; source: \"user\" | \"slack\" }",
|
|
3170
3333
|
"responseStatus": "201"
|
|
3171
3334
|
},
|
|
3172
|
-
"handleSlackSupportEvent": {
|
|
3173
|
-
"operationId": "handleSlackSupportEvent",
|
|
3174
|
-
"method": "POST",
|
|
3175
|
-
"path": "/v1/internal/support/slack-event",
|
|
3176
|
-
"summary": "Handle a Slack support event",
|
|
3177
|
-
"description": "Receives a forwarded Slack event from the dashboard webhook handler and creates a support message.",
|
|
3178
|
-
"parameters": [],
|
|
3179
|
-
"requestBodyType": "{ channel_id: string; text: string; thread_ts: string; user_id: string }",
|
|
3180
|
-
"requestBodyRequired": true,
|
|
3181
|
-
"responseType": "",
|
|
3182
|
-
"responseStatus": "200"
|
|
3183
|
-
},
|
|
3184
3335
|
"scanText": {
|
|
3185
3336
|
"operationId": "scanText",
|
|
3186
3337
|
"method": "POST",
|
package/dist/operations.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Ba as ApiOperations, Bb as ApiTag, Bc as RequestMap, Bd as Route, Be as operationsByPath, Bf as operationsByTag } from './operations-map.gen-g8h39ajx.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Generated by generate-sdk-ts-maps.ts from backend/openapi/bundles/public.yaml — do not edit manually.
|
package/dist/operations.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Ba as ApiOperations, Bb as ApiTag, Bc as RequestMap, Bd as Route, Be as operationsByPath, Bf as operationsByTag } from './operations-map.gen-g8h39ajx.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Generated by generate-sdk-ts-maps.ts from backend/openapi/bundles/public.yaml — do not edit manually.
|
package/dist/operations.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { o as operationsByPath, a as operationsByTag } from './operations-map.gen-
|
|
1
|
+
export { o as operationsByPath, a as operationsByTag } from './operations-map.gen-ir66wlzb.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; 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 }",
|
|
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; template?: 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": {
|
|
@@ -2431,7 +2431,7 @@ export { o as operationsByPath, a as operationsByTag } from './operations-map.ge
|
|
|
2431
2431
|
],
|
|
2432
2432
|
"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 }",
|
|
2433
2433
|
"requestBodyRequired": true,
|
|
2434
|
-
"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\" }",
|
|
2434
|
+
"responseType": "{ hint?: string; masked_columns?: ({ column: string; kind: \"redact\" | \"null\" | \"hash\" })[]; notes?: string[]; reason: string; rewritten_sql?: string; row_filter_predicate?: string; rule: string; template?: string; verdict: \"allow\" | \"block\" | \"mask\" | \"row-filter\" }",
|
|
2435
2435
|
"responseStatus": "200"
|
|
2436
2436
|
},
|
|
2437
2437
|
"replayPolicy": {
|
|
@@ -2451,7 +2451,7 @@ export { o as operationsByPath, a as operationsByTag } from './operations-map.ge
|
|
|
2451
2451
|
],
|
|
2452
2452
|
"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 }",
|
|
2453
2453
|
"requestBodyRequired": true,
|
|
2454
|
-
"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 } }",
|
|
2454
|
+
"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; template?: 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 } }",
|
|
2455
2455
|
"responseStatus": "200"
|
|
2456
2456
|
},
|
|
2457
2457
|
"listProjects": {
|
|
@@ -2637,6 +2637,169 @@ export { o as operationsByPath, a as operationsByTag } from './operations-map.ge
|
|
|
2637
2637
|
"responseType": "{ snapshots: ({ active_connections: number; avg_connect_ms?: number; avg_latency_ms: number; avg_query_ms?: number; cache_hits: number; cache_misses: number; created_at: string; id: string; p99_latency_ms: number; project_id: string; queries_total: number; region: string })[] }",
|
|
2638
2638
|
"responseStatus": "200"
|
|
2639
2639
|
},
|
|
2640
|
+
"listQueryTemplates": {
|
|
2641
|
+
"operationId": "listQueryTemplates",
|
|
2642
|
+
"method": "GET",
|
|
2643
|
+
"path": "/v1/projects/{project_id}/query-templates",
|
|
2644
|
+
"summary": "List query templates",
|
|
2645
|
+
"description": "Lists the project's query templates, including disabled ones.",
|
|
2646
|
+
"parameters": [
|
|
2647
|
+
{
|
|
2648
|
+
"name": "project_id",
|
|
2649
|
+
"in": "path",
|
|
2650
|
+
"required": true,
|
|
2651
|
+
"type": "string",
|
|
2652
|
+
"description": "Unique project identifier (prefixed, e.g. prj_xxx)."
|
|
2653
|
+
},
|
|
2654
|
+
{
|
|
2655
|
+
"name": "page_size",
|
|
2656
|
+
"in": "query",
|
|
2657
|
+
"required": false,
|
|
2658
|
+
"type": "number",
|
|
2659
|
+
"description": "Maximum number of items to return (1-100, default 20)."
|
|
2660
|
+
},
|
|
2661
|
+
{
|
|
2662
|
+
"name": "page_token",
|
|
2663
|
+
"in": "query",
|
|
2664
|
+
"required": false,
|
|
2665
|
+
"type": "string",
|
|
2666
|
+
"description": "Opaque token for cursor-based pagination."
|
|
2667
|
+
},
|
|
2668
|
+
{
|
|
2669
|
+
"name": "If-None-Match",
|
|
2670
|
+
"in": "header",
|
|
2671
|
+
"required": false,
|
|
2672
|
+
"type": "string",
|
|
2673
|
+
"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."
|
|
2674
|
+
}
|
|
2675
|
+
],
|
|
2676
|
+
"requestBodyType": "",
|
|
2677
|
+
"requestBodyRequired": false,
|
|
2678
|
+
"responseType": "{ next_page_token?: string; query_templates: ({ created_at: string; description: string; enabled: boolean; id: string; include_sql: boolean; name: string; params: ({ name: string; nullable?: boolean; type: \"text\" | \"integer\" | \"bigint\" | \"double precision\" | \"numeric\" | \"boolean\" | \"uuid\" | \"date\" | \"timestamptz\" | \"jsonb\" })[]; project_id: string; sql: string; statement_kind?: \"select\" | \"insert\" | \"update\" | \"delete\"; updated_at: string })[] }",
|
|
2679
|
+
"responseStatus": "200"
|
|
2680
|
+
},
|
|
2681
|
+
"createQueryTemplate": {
|
|
2682
|
+
"operationId": "createQueryTemplate",
|
|
2683
|
+
"method": "POST",
|
|
2684
|
+
"path": "/v1/projects/{project_id}/query-templates",
|
|
2685
|
+
"summary": "Create a query template",
|
|
2686
|
+
"description": "Adds a named, parameterized statement to the project. A template admits\na statement for a policy profile that runs templates only; it never\ngrants access, and the statement still meets the credential's whole\npolicy.\n\nThe SQL is parsed and checked when it is written: exactly one SELECT,\nINSERT, UPDATE or DELETE, placeholders $1 to $n, one declared parameter\nfor each. A template that fails is refused with 400 and a message\nnaming the problem. Returns 409 when the project already has a template\nof that name.\n\nThe template is pushed to connected data planes when it is written.\n\nReturns 409 for an enabled template 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 templates. A\ntemplate with enabled set to false is still accepted.\n",
|
|
2687
|
+
"parameters": [
|
|
2688
|
+
{
|
|
2689
|
+
"name": "project_id",
|
|
2690
|
+
"in": "path",
|
|
2691
|
+
"required": true,
|
|
2692
|
+
"type": "string",
|
|
2693
|
+
"description": "Unique project identifier (prefixed, e.g. prj_xxx)."
|
|
2694
|
+
},
|
|
2695
|
+
{
|
|
2696
|
+
"name": "Idempotency-Key",
|
|
2697
|
+
"in": "header",
|
|
2698
|
+
"required": false,
|
|
2699
|
+
"type": "string",
|
|
2700
|
+
"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."
|
|
2701
|
+
}
|
|
2702
|
+
],
|
|
2703
|
+
"requestBodyType": "{ description?: string; enabled?: boolean; include_sql?: boolean; name: string; params?: ({ name: string; nullable?: boolean; type: \"text\" | \"integer\" | \"bigint\" | \"double precision\" | \"numeric\" | \"boolean\" | \"uuid\" | \"date\" | \"timestamptz\" | \"jsonb\" })[]; sql: string }",
|
|
2704
|
+
"requestBodyRequired": true,
|
|
2705
|
+
"responseType": "{ created_at: string; description: string; enabled: boolean; id: string; include_sql: boolean; name: string; params: ({ name: string; nullable?: boolean; type: \"text\" | \"integer\" | \"bigint\" | \"double precision\" | \"numeric\" | \"boolean\" | \"uuid\" | \"date\" | \"timestamptz\" | \"jsonb\" })[]; project_id: string; sql: string; statement_kind?: \"select\" | \"insert\" | \"update\" | \"delete\"; updated_at: string }",
|
|
2706
|
+
"responseStatus": "201"
|
|
2707
|
+
},
|
|
2708
|
+
"getQueryTemplate": {
|
|
2709
|
+
"operationId": "getQueryTemplate",
|
|
2710
|
+
"method": "GET",
|
|
2711
|
+
"path": "/v1/projects/{project_id}/query-templates/{query_template_id}",
|
|
2712
|
+
"summary": "Get a query template",
|
|
2713
|
+
"description": "Returns a single query template by ID.",
|
|
2714
|
+
"parameters": [
|
|
2715
|
+
{
|
|
2716
|
+
"name": "project_id",
|
|
2717
|
+
"in": "path",
|
|
2718
|
+
"required": true,
|
|
2719
|
+
"type": "string",
|
|
2720
|
+
"description": "Unique project identifier (prefixed, e.g. prj_xxx)."
|
|
2721
|
+
},
|
|
2722
|
+
{
|
|
2723
|
+
"name": "query_template_id",
|
|
2724
|
+
"in": "path",
|
|
2725
|
+
"required": true,
|
|
2726
|
+
"type": "string",
|
|
2727
|
+
"description": "Unique query template identifier (prefixed, e.g. qtp_xxx)."
|
|
2728
|
+
},
|
|
2729
|
+
{
|
|
2730
|
+
"name": "If-None-Match",
|
|
2731
|
+
"in": "header",
|
|
2732
|
+
"required": false,
|
|
2733
|
+
"type": "string",
|
|
2734
|
+
"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."
|
|
2735
|
+
}
|
|
2736
|
+
],
|
|
2737
|
+
"requestBodyType": "",
|
|
2738
|
+
"requestBodyRequired": false,
|
|
2739
|
+
"responseType": "{ created_at: string; description: string; enabled: boolean; id: string; include_sql: boolean; name: string; params: ({ name: string; nullable?: boolean; type: \"text\" | \"integer\" | \"bigint\" | \"double precision\" | \"numeric\" | \"boolean\" | \"uuid\" | \"date\" | \"timestamptz\" | \"jsonb\" })[]; project_id: string; sql: string; statement_kind?: \"select\" | \"insert\" | \"update\" | \"delete\"; updated_at: string }",
|
|
2740
|
+
"responseStatus": "200"
|
|
2741
|
+
},
|
|
2742
|
+
"updateQueryTemplate": {
|
|
2743
|
+
"operationId": "updateQueryTemplate",
|
|
2744
|
+
"method": "PUT",
|
|
2745
|
+
"path": "/v1/projects/{project_id}/query-templates/{query_template_id}",
|
|
2746
|
+
"summary": "Update a query template",
|
|
2747
|
+
"description": "Replaces the template's name, description, SQL, parameters, include_sql\nand enabled flag. The SQL is checked as on create. A statement already\nadmitted under the old template is not affected; the next one is\nmatched against the new text.\n\nReturns 409 on a rename to a name the project already uses, and when\nthe update leaves the template enabled while the organization has a\nlive self-hosted data plane enrollment, for the same reason as create.\nSetting enabled to false is still accepted.\n",
|
|
2748
|
+
"parameters": [
|
|
2749
|
+
{
|
|
2750
|
+
"name": "project_id",
|
|
2751
|
+
"in": "path",
|
|
2752
|
+
"required": true,
|
|
2753
|
+
"type": "string",
|
|
2754
|
+
"description": "Unique project identifier (prefixed, e.g. prj_xxx)."
|
|
2755
|
+
},
|
|
2756
|
+
{
|
|
2757
|
+
"name": "query_template_id",
|
|
2758
|
+
"in": "path",
|
|
2759
|
+
"required": true,
|
|
2760
|
+
"type": "string",
|
|
2761
|
+
"description": "Unique query template identifier (prefixed, e.g. qtp_xxx)."
|
|
2762
|
+
},
|
|
2763
|
+
{
|
|
2764
|
+
"name": "If-Match",
|
|
2765
|
+
"in": "header",
|
|
2766
|
+
"required": false,
|
|
2767
|
+
"type": "string",
|
|
2768
|
+
"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."
|
|
2769
|
+
}
|
|
2770
|
+
],
|
|
2771
|
+
"requestBodyType": "{ description?: string; enabled?: boolean; include_sql?: boolean; name: string; params?: ({ name: string; nullable?: boolean; type: \"text\" | \"integer\" | \"bigint\" | \"double precision\" | \"numeric\" | \"boolean\" | \"uuid\" | \"date\" | \"timestamptz\" | \"jsonb\" })[]; sql: string }",
|
|
2772
|
+
"requestBodyRequired": true,
|
|
2773
|
+
"responseType": "{ created_at: string; description: string; enabled: boolean; id: string; include_sql: boolean; name: string; params: ({ name: string; nullable?: boolean; type: \"text\" | \"integer\" | \"bigint\" | \"double precision\" | \"numeric\" | \"boolean\" | \"uuid\" | \"date\" | \"timestamptz\" | \"jsonb\" })[]; project_id: string; sql: string; statement_kind?: \"select\" | \"insert\" | \"update\" | \"delete\"; updated_at: string }",
|
|
2774
|
+
"responseStatus": "200"
|
|
2775
|
+
},
|
|
2776
|
+
"deleteQueryTemplate": {
|
|
2777
|
+
"operationId": "deleteQueryTemplate",
|
|
2778
|
+
"method": "DELETE",
|
|
2779
|
+
"path": "/v1/projects/{project_id}/query-templates/{query_template_id}",
|
|
2780
|
+
"summary": "Delete a query template",
|
|
2781
|
+
"description": "Removes the template, so a profile that runs templates only stops\nadmitting its statement. Deleting the last template is allowed: such a\nprofile then admits nothing, which is the intended way to withdraw\naccess in an incident.\n",
|
|
2782
|
+
"parameters": [
|
|
2783
|
+
{
|
|
2784
|
+
"name": "project_id",
|
|
2785
|
+
"in": "path",
|
|
2786
|
+
"required": true,
|
|
2787
|
+
"type": "string",
|
|
2788
|
+
"description": "Unique project identifier (prefixed, e.g. prj_xxx)."
|
|
2789
|
+
},
|
|
2790
|
+
{
|
|
2791
|
+
"name": "query_template_id",
|
|
2792
|
+
"in": "path",
|
|
2793
|
+
"required": true,
|
|
2794
|
+
"type": "string",
|
|
2795
|
+
"description": "Unique query template identifier (prefixed, e.g. qtp_xxx)."
|
|
2796
|
+
}
|
|
2797
|
+
],
|
|
2798
|
+
"requestBodyType": "",
|
|
2799
|
+
"requestBodyRequired": false,
|
|
2800
|
+
"responseType": "",
|
|
2801
|
+
"responseStatus": "204"
|
|
2802
|
+
},
|
|
2640
2803
|
"listRegions": {
|
|
2641
2804
|
"operationId": "listRegions",
|
|
2642
2805
|
"method": "GET",
|
|
@@ -3167,18 +3330,6 @@ export { o as operationsByPath, a as operationsByTag } from './operations-map.ge
|
|
|
3167
3330
|
"responseType": "{ author_image?: string; author_name: string; body: string; case_id: string; created_at: string; id: string; slack_user_id?: string; source: \"user\" | \"slack\" }",
|
|
3168
3331
|
"responseStatus": "201"
|
|
3169
3332
|
},
|
|
3170
|
-
"handleSlackSupportEvent": {
|
|
3171
|
-
"operationId": "handleSlackSupportEvent",
|
|
3172
|
-
"method": "POST",
|
|
3173
|
-
"path": "/v1/internal/support/slack-event",
|
|
3174
|
-
"summary": "Handle a Slack support event",
|
|
3175
|
-
"description": "Receives a forwarded Slack event from the dashboard webhook handler and creates a support message.",
|
|
3176
|
-
"parameters": [],
|
|
3177
|
-
"requestBodyType": "{ channel_id: string; text: string; thread_ts: string; user_id: string }",
|
|
3178
|
-
"requestBodyRequired": true,
|
|
3179
|
-
"responseType": "",
|
|
3180
|
-
"responseStatus": "200"
|
|
3181
|
-
},
|
|
3182
3333
|
"scanText": {
|
|
3183
3334
|
"operationId": "scanText",
|
|
3184
3335
|
"method": "POST",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pgbeam",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
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": {
|
|
@@ -47,17 +47,18 @@
|
|
|
47
47
|
],
|
|
48
48
|
"homepage": "https://pgbeam.com",
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@kubb/adapter-oas": "5.
|
|
50
|
+
"@kubb/adapter-oas": "5.11.1",
|
|
51
51
|
"@kubb/middleware-barrel": "5.0.0-beta.35",
|
|
52
|
-
"@kubb/plugin-ts": "5.0.
|
|
52
|
+
"@kubb/plugin-ts": "5.0.14",
|
|
53
53
|
"@pgbeam/config": "0.0.1",
|
|
54
54
|
"@typescript/typescript6": "6.0.2",
|
|
55
|
-
"bunchee": "7.0.
|
|
56
|
-
"kubb": "5.
|
|
55
|
+
"bunchee": "7.0.2",
|
|
56
|
+
"kubb": "5.11.1",
|
|
57
57
|
"typescript": "7.0.2"
|
|
58
58
|
},
|
|
59
59
|
"scripts": {
|
|
60
60
|
"build": "bunchee",
|
|
61
|
-
"generate": "kubb generate"
|
|
61
|
+
"generate": "kubb generate",
|
|
62
|
+
"typecheck": "tsc --noEmit"
|
|
62
63
|
}
|
|
63
64
|
}
|