pgbeam 0.3.11 → 0.3.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.
- package/dist/index.cjs +89 -24
- package/dist/index.d.cts +1999 -1159
- package/dist/index.d.mts +1999 -1159
- package/dist/index.mjs +89 -24
- package/dist/operations.cjs +263 -24
- package/dist/operations.d.cts +1538 -886
- package/dist/operations.d.mts +1538 -886
- package/dist/operations.mjs +263 -24
- package/package.json +1 -1
package/dist/operations.mjs
CHANGED
|
@@ -180,6 +180,33 @@
|
|
|
180
180
|
"responseType": "{ connection_string: string; credential: { auth_method?: \"cleartext\" | \"scram-sha-256\"; created_at: string; expires_at?: string; id: string; last_used_at?: string; name: string; pg_username: string; policy_profile_id: string; principal_type?: \"agent\" | \"human\"; project_id: string; status: \"active\" | \"disabled\" | \"revoked\"; updated_at: string }; mcp_token: string; mcp_url: string }",
|
|
181
181
|
"responseStatus": "200"
|
|
182
182
|
},
|
|
183
|
+
"recommendAgentPolicy": {
|
|
184
|
+
"operationId": "recommendAgentPolicy",
|
|
185
|
+
"method": "POST",
|
|
186
|
+
"path": "/v1/projects/{project_id}/agents/{agent_id}/policy-recommendation",
|
|
187
|
+
"summary": "Recommend a least-privilege policy from recorded traffic",
|
|
188
|
+
"description": "Derives the tightest policy that would still pass every statement this agent credential has legitimately run, using its recorded audit history over a lookback window (default 30 days). The candidate's table allowlist is the union of relations actually referenced, its statement-kind allow set is the observed set, it downgrades to read-only when no writes were seen, and its max_rows ceiling comes from an observed high-percentile row count. The candidate is proven safe by replaying it through the data plane's own policy engine against the same history: a good recommendation has replay.summary.newly_blocked == 0. This endpoint is advisory only. It reads the audit log, never connects to the upstream database, and never creates, updates, or mutates any policy or credential; the operator loads the candidate into the editor and saves it themselves.",
|
|
189
|
+
"parameters": [
|
|
190
|
+
{
|
|
191
|
+
"name": "project_id",
|
|
192
|
+
"in": "path",
|
|
193
|
+
"required": true,
|
|
194
|
+
"type": "string",
|
|
195
|
+
"description": "Unique project identifier (prefixed, e.g. prj_xxx)."
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"name": "agent_id",
|
|
199
|
+
"in": "path",
|
|
200
|
+
"required": true,
|
|
201
|
+
"type": "string",
|
|
202
|
+
"description": "Unique agent credential identifier (prefixed, e.g. agt_xxx)."
|
|
203
|
+
}
|
|
204
|
+
],
|
|
205
|
+
"requestBodyType": "{ limit?: number; lookback_days?: number }",
|
|
206
|
+
"requestBodyRequired": false,
|
|
207
|
+
"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: { distinct_queries: number; entries_scanned: number; evaluated: number; newly_allowed: number; newly_blocked: number; skipped_unparseable: number; truncated: boolean; would_allow: number; would_block: number; would_mask: number; would_row_filter: number } }; sufficient_history: boolean; window_end: string; window_start: string }",
|
|
208
|
+
"responseStatus": "200"
|
|
209
|
+
},
|
|
183
210
|
"listAnomalyAlerts": {
|
|
184
211
|
"operationId": "listAnomalyAlerts",
|
|
185
212
|
"method": "GET",
|
|
@@ -1086,6 +1113,141 @@
|
|
|
1086
1113
|
"responseType": "{ image_sha: string; status: \"ok\" | \"degraded\"; timestamp?: string; version: string }",
|
|
1087
1114
|
"responseStatus": "200"
|
|
1088
1115
|
},
|
|
1116
|
+
"listHoneytokens": {
|
|
1117
|
+
"operationId": "listHoneytokens",
|
|
1118
|
+
"method": "GET",
|
|
1119
|
+
"path": "/v1/projects/{project_id}/honeytokens",
|
|
1120
|
+
"summary": "List honeytokens",
|
|
1121
|
+
"description": "Lists the project's honeytokens.",
|
|
1122
|
+
"parameters": [
|
|
1123
|
+
{
|
|
1124
|
+
"name": "project_id",
|
|
1125
|
+
"in": "path",
|
|
1126
|
+
"required": true,
|
|
1127
|
+
"type": "string",
|
|
1128
|
+
"description": "Unique project identifier (prefixed, e.g. prj_xxx)."
|
|
1129
|
+
},
|
|
1130
|
+
{
|
|
1131
|
+
"name": "page_size",
|
|
1132
|
+
"in": "query",
|
|
1133
|
+
"required": false,
|
|
1134
|
+
"type": "number",
|
|
1135
|
+
"description": "Maximum number of items to return (1-100, default 20)."
|
|
1136
|
+
},
|
|
1137
|
+
{
|
|
1138
|
+
"name": "page_token",
|
|
1139
|
+
"in": "query",
|
|
1140
|
+
"required": false,
|
|
1141
|
+
"type": "string",
|
|
1142
|
+
"description": "Opaque token for cursor-based pagination."
|
|
1143
|
+
}
|
|
1144
|
+
],
|
|
1145
|
+
"requestBodyType": "",
|
|
1146
|
+
"requestBodyRequired": false,
|
|
1147
|
+
"responseType": "{ honeytokens: ({ action: \"audit_only\" | \"kill\"; created_at: string; id: string; project_id: string; relation_name: string; schema_name?: string; updated_at: string })[]; next_page_token?: string }",
|
|
1148
|
+
"responseStatus": "200"
|
|
1149
|
+
},
|
|
1150
|
+
"createHoneytoken": {
|
|
1151
|
+
"operationId": "createHoneytoken",
|
|
1152
|
+
"method": "POST",
|
|
1153
|
+
"path": "/v1/projects/{project_id}/honeytokens",
|
|
1154
|
+
"summary": "Register a honeytoken",
|
|
1155
|
+
"description": "Registers a decoy (canary) relation for the project. Any agent statement\nthat references it is blocked and recorded as a canary_tripped audit event.\n",
|
|
1156
|
+
"parameters": [
|
|
1157
|
+
{
|
|
1158
|
+
"name": "project_id",
|
|
1159
|
+
"in": "path",
|
|
1160
|
+
"required": true,
|
|
1161
|
+
"type": "string",
|
|
1162
|
+
"description": "Unique project identifier (prefixed, e.g. prj_xxx)."
|
|
1163
|
+
}
|
|
1164
|
+
],
|
|
1165
|
+
"requestBodyType": "{ action: \"audit_only\" | \"kill\"; relation_name: string; schema_name?: string }",
|
|
1166
|
+
"requestBodyRequired": true,
|
|
1167
|
+
"responseType": "{ action: \"audit_only\" | \"kill\"; created_at: string; id: string; project_id: string; relation_name: string; schema_name?: string; updated_at: string }",
|
|
1168
|
+
"responseStatus": "201"
|
|
1169
|
+
},
|
|
1170
|
+
"getHoneytoken": {
|
|
1171
|
+
"operationId": "getHoneytoken",
|
|
1172
|
+
"method": "GET",
|
|
1173
|
+
"path": "/v1/projects/{project_id}/honeytokens/{honeytoken_id}",
|
|
1174
|
+
"summary": "Get a honeytoken",
|
|
1175
|
+
"description": "Returns a single honeytoken by ID.",
|
|
1176
|
+
"parameters": [
|
|
1177
|
+
{
|
|
1178
|
+
"name": "project_id",
|
|
1179
|
+
"in": "path",
|
|
1180
|
+
"required": true,
|
|
1181
|
+
"type": "string",
|
|
1182
|
+
"description": "Unique project identifier (prefixed, e.g. prj_xxx)."
|
|
1183
|
+
},
|
|
1184
|
+
{
|
|
1185
|
+
"name": "honeytoken_id",
|
|
1186
|
+
"in": "path",
|
|
1187
|
+
"required": true,
|
|
1188
|
+
"type": "string",
|
|
1189
|
+
"description": "Unique honeytoken identifier (prefixed, e.g. hnt_xxx)."
|
|
1190
|
+
}
|
|
1191
|
+
],
|
|
1192
|
+
"requestBodyType": "",
|
|
1193
|
+
"requestBodyRequired": false,
|
|
1194
|
+
"responseType": "{ action: \"audit_only\" | \"kill\"; created_at: string; id: string; project_id: string; relation_name: string; schema_name?: string; updated_at: string }",
|
|
1195
|
+
"responseStatus": "200"
|
|
1196
|
+
},
|
|
1197
|
+
"updateHoneytoken": {
|
|
1198
|
+
"operationId": "updateHoneytoken",
|
|
1199
|
+
"method": "PUT",
|
|
1200
|
+
"path": "/v1/projects/{project_id}/honeytokens/{honeytoken_id}",
|
|
1201
|
+
"summary": "Update a honeytoken",
|
|
1202
|
+
"description": "Updates a honeytoken's relation or action.",
|
|
1203
|
+
"parameters": [
|
|
1204
|
+
{
|
|
1205
|
+
"name": "project_id",
|
|
1206
|
+
"in": "path",
|
|
1207
|
+
"required": true,
|
|
1208
|
+
"type": "string",
|
|
1209
|
+
"description": "Unique project identifier (prefixed, e.g. prj_xxx)."
|
|
1210
|
+
},
|
|
1211
|
+
{
|
|
1212
|
+
"name": "honeytoken_id",
|
|
1213
|
+
"in": "path",
|
|
1214
|
+
"required": true,
|
|
1215
|
+
"type": "string",
|
|
1216
|
+
"description": "Unique honeytoken identifier (prefixed, e.g. hnt_xxx)."
|
|
1217
|
+
}
|
|
1218
|
+
],
|
|
1219
|
+
"requestBodyType": "{ action: \"audit_only\" | \"kill\"; relation_name: string; schema_name?: string }",
|
|
1220
|
+
"requestBodyRequired": true,
|
|
1221
|
+
"responseType": "{ action: \"audit_only\" | \"kill\"; created_at: string; id: string; project_id: string; relation_name: string; schema_name?: string; updated_at: string }",
|
|
1222
|
+
"responseStatus": "200"
|
|
1223
|
+
},
|
|
1224
|
+
"deleteHoneytoken": {
|
|
1225
|
+
"operationId": "deleteHoneytoken",
|
|
1226
|
+
"method": "DELETE",
|
|
1227
|
+
"path": "/v1/projects/{project_id}/honeytokens/{honeytoken_id}",
|
|
1228
|
+
"summary": "Delete a honeytoken",
|
|
1229
|
+
"description": "Removes a honeytoken from the project.",
|
|
1230
|
+
"parameters": [
|
|
1231
|
+
{
|
|
1232
|
+
"name": "project_id",
|
|
1233
|
+
"in": "path",
|
|
1234
|
+
"required": true,
|
|
1235
|
+
"type": "string",
|
|
1236
|
+
"description": "Unique project identifier (prefixed, e.g. prj_xxx)."
|
|
1237
|
+
},
|
|
1238
|
+
{
|
|
1239
|
+
"name": "honeytoken_id",
|
|
1240
|
+
"in": "path",
|
|
1241
|
+
"required": true,
|
|
1242
|
+
"type": "string",
|
|
1243
|
+
"description": "Unique honeytoken identifier (prefixed, e.g. hnt_xxx)."
|
|
1244
|
+
}
|
|
1245
|
+
],
|
|
1246
|
+
"requestBodyType": "",
|
|
1247
|
+
"requestBodyRequired": false,
|
|
1248
|
+
"responseType": "",
|
|
1249
|
+
"responseStatus": "204"
|
|
1250
|
+
},
|
|
1089
1251
|
"getProjectInsights": {
|
|
1090
1252
|
"operationId": "getProjectInsights",
|
|
1091
1253
|
"method": "GET",
|
|
@@ -1180,6 +1342,18 @@
|
|
|
1180
1342
|
"responseType": "{ agent_credential_created: boolean; completed: boolean; completed_at?: string; connection_string_copied: boolean; connection_tested: boolean; database_added: boolean; dismissed: boolean; first_query_run: boolean; org_created: boolean; organization_id: string; project_created: boolean; steps_completed: number; steps_total: number }",
|
|
1181
1343
|
"responseStatus": "200"
|
|
1182
1344
|
},
|
|
1345
|
+
"listOrganizations": {
|
|
1346
|
+
"operationId": "listOrganizations",
|
|
1347
|
+
"method": "GET",
|
|
1348
|
+
"path": "/v1/organizations",
|
|
1349
|
+
"summary": "List organizations",
|
|
1350
|
+
"description": "Lists the organizations visible to the caller's credential. An organization-scoped API key (pbo_) returns exactly the organization it belongs to. A user credential (account-scoped API key or dashboard session token) returns the organizations the user is a member of, including the caller's role in each.",
|
|
1351
|
+
"parameters": [],
|
|
1352
|
+
"requestBodyType": "",
|
|
1353
|
+
"requestBodyRequired": false,
|
|
1354
|
+
"responseType": "{ organizations: ({ id: string; name: string; role?: string; slug: string })[] }",
|
|
1355
|
+
"responseStatus": "200"
|
|
1356
|
+
},
|
|
1183
1357
|
"listPolicyProfiles": {
|
|
1184
1358
|
"operationId": "listPolicyProfiles",
|
|
1185
1359
|
"method": "GET",
|
|
@@ -2084,6 +2258,10 @@
|
|
|
2084
2258
|
updateOnboardingProgress: {
|
|
2085
2259
|
method: "PATCH",
|
|
2086
2260
|
path: "/v1/organizations/{org_id}/onboarding"
|
|
2261
|
+
},
|
|
2262
|
+
listOrganizations: {
|
|
2263
|
+
method: "GET",
|
|
2264
|
+
path: "/v1/organizations"
|
|
2087
2265
|
}
|
|
2088
2266
|
},
|
|
2089
2267
|
agents: {
|
|
@@ -2124,6 +2302,40 @@
|
|
|
2124
2302
|
path: "/v1/projects/{project_id}/audit-logs/verify"
|
|
2125
2303
|
}
|
|
2126
2304
|
},
|
|
2305
|
+
policies: {
|
|
2306
|
+
recommendAgentPolicy: {
|
|
2307
|
+
method: "POST",
|
|
2308
|
+
path: "/v1/projects/{project_id}/agents/{agent_id}/policy-recommendation"
|
|
2309
|
+
},
|
|
2310
|
+
listPolicyProfiles: {
|
|
2311
|
+
method: "GET",
|
|
2312
|
+
path: "/v1/projects/{project_id}/policies"
|
|
2313
|
+
},
|
|
2314
|
+
createPolicyProfile: {
|
|
2315
|
+
method: "POST",
|
|
2316
|
+
path: "/v1/projects/{project_id}/policies"
|
|
2317
|
+
},
|
|
2318
|
+
getPolicyProfile: {
|
|
2319
|
+
method: "GET",
|
|
2320
|
+
path: "/v1/projects/{project_id}/policies/{policy_id}"
|
|
2321
|
+
},
|
|
2322
|
+
updatePolicyProfile: {
|
|
2323
|
+
method: "PUT",
|
|
2324
|
+
path: "/v1/projects/{project_id}/policies/{policy_id}"
|
|
2325
|
+
},
|
|
2326
|
+
deletePolicyProfile: {
|
|
2327
|
+
method: "DELETE",
|
|
2328
|
+
path: "/v1/projects/{project_id}/policies/{policy_id}"
|
|
2329
|
+
},
|
|
2330
|
+
dryEvalPolicy: {
|
|
2331
|
+
method: "POST",
|
|
2332
|
+
path: "/v1/projects/{project_id}/policy-evaluations"
|
|
2333
|
+
},
|
|
2334
|
+
replayPolicy: {
|
|
2335
|
+
method: "POST",
|
|
2336
|
+
path: "/v1/projects/{project_id}/policy-replays"
|
|
2337
|
+
}
|
|
2338
|
+
},
|
|
2127
2339
|
anomalies: {
|
|
2128
2340
|
listAnomalyAlerts: {
|
|
2129
2341
|
method: "GET",
|
|
@@ -2314,40 +2526,32 @@
|
|
|
2314
2526
|
path: "/v1/organizations/{org_id}/self-host-enrollments/{enrollment_id}/rotate"
|
|
2315
2527
|
}
|
|
2316
2528
|
},
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
method: "POST",
|
|
2320
|
-
path: "/v1/projects/{project_id}/migrations:lint"
|
|
2321
|
-
}
|
|
2322
|
-
},
|
|
2323
|
-
policies: {
|
|
2324
|
-
listPolicyProfiles: {
|
|
2529
|
+
honeytokens: {
|
|
2530
|
+
listHoneytokens: {
|
|
2325
2531
|
method: "GET",
|
|
2326
|
-
path: "/v1/projects/{project_id}/
|
|
2532
|
+
path: "/v1/projects/{project_id}/honeytokens"
|
|
2327
2533
|
},
|
|
2328
|
-
|
|
2534
|
+
createHoneytoken: {
|
|
2329
2535
|
method: "POST",
|
|
2330
|
-
path: "/v1/projects/{project_id}/
|
|
2536
|
+
path: "/v1/projects/{project_id}/honeytokens"
|
|
2331
2537
|
},
|
|
2332
|
-
|
|
2538
|
+
getHoneytoken: {
|
|
2333
2539
|
method: "GET",
|
|
2334
|
-
path: "/v1/projects/{project_id}/
|
|
2540
|
+
path: "/v1/projects/{project_id}/honeytokens/{honeytoken_id}"
|
|
2335
2541
|
},
|
|
2336
|
-
|
|
2542
|
+
updateHoneytoken: {
|
|
2337
2543
|
method: "PUT",
|
|
2338
|
-
path: "/v1/projects/{project_id}/
|
|
2544
|
+
path: "/v1/projects/{project_id}/honeytokens/{honeytoken_id}"
|
|
2339
2545
|
},
|
|
2340
|
-
|
|
2546
|
+
deleteHoneytoken: {
|
|
2341
2547
|
method: "DELETE",
|
|
2342
|
-
path: "/v1/projects/{project_id}/
|
|
2343
|
-
}
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
},
|
|
2348
|
-
replayPolicy: {
|
|
2548
|
+
path: "/v1/projects/{project_id}/honeytokens/{honeytoken_id}"
|
|
2549
|
+
}
|
|
2550
|
+
},
|
|
2551
|
+
migrations: {
|
|
2552
|
+
lintMigration: {
|
|
2349
2553
|
method: "POST",
|
|
2350
|
-
path: "/v1/projects/{project_id}/
|
|
2554
|
+
path: "/v1/projects/{project_id}/migrations:lint"
|
|
2351
2555
|
}
|
|
2352
2556
|
},
|
|
2353
2557
|
support: {
|
|
@@ -2441,6 +2645,11 @@ const operationsByPath = {
|
|
|
2441
2645
|
path: "/v1/projects/{project_id}/agents/{agent_id}/rotate",
|
|
2442
2646
|
operationId: "rotateAgentCredential"
|
|
2443
2647
|
},
|
|
2648
|
+
"POST /v1/projects/{project_id}/agents/{agent_id}/policy-recommendation": {
|
|
2649
|
+
method: "POST",
|
|
2650
|
+
path: "/v1/projects/{project_id}/agents/{agent_id}/policy-recommendation",
|
|
2651
|
+
operationId: "recommendAgentPolicy"
|
|
2652
|
+
},
|
|
2444
2653
|
"GET /v1/projects/{project_id}/anomalies": {
|
|
2445
2654
|
method: "GET",
|
|
2446
2655
|
path: "/v1/projects/{project_id}/anomalies",
|
|
@@ -2591,6 +2800,31 @@ const operationsByPath = {
|
|
|
2591
2800
|
path: "/v1/health",
|
|
2592
2801
|
operationId: "getHealth"
|
|
2593
2802
|
},
|
|
2803
|
+
"GET /v1/projects/{project_id}/honeytokens": {
|
|
2804
|
+
method: "GET",
|
|
2805
|
+
path: "/v1/projects/{project_id}/honeytokens",
|
|
2806
|
+
operationId: "listHoneytokens"
|
|
2807
|
+
},
|
|
2808
|
+
"POST /v1/projects/{project_id}/honeytokens": {
|
|
2809
|
+
method: "POST",
|
|
2810
|
+
path: "/v1/projects/{project_id}/honeytokens",
|
|
2811
|
+
operationId: "createHoneytoken"
|
|
2812
|
+
},
|
|
2813
|
+
"GET /v1/projects/{project_id}/honeytokens/{honeytoken_id}": {
|
|
2814
|
+
method: "GET",
|
|
2815
|
+
path: "/v1/projects/{project_id}/honeytokens/{honeytoken_id}",
|
|
2816
|
+
operationId: "getHoneytoken"
|
|
2817
|
+
},
|
|
2818
|
+
"PUT /v1/projects/{project_id}/honeytokens/{honeytoken_id}": {
|
|
2819
|
+
method: "PUT",
|
|
2820
|
+
path: "/v1/projects/{project_id}/honeytokens/{honeytoken_id}",
|
|
2821
|
+
operationId: "updateHoneytoken"
|
|
2822
|
+
},
|
|
2823
|
+
"DELETE /v1/projects/{project_id}/honeytokens/{honeytoken_id}": {
|
|
2824
|
+
method: "DELETE",
|
|
2825
|
+
path: "/v1/projects/{project_id}/honeytokens/{honeytoken_id}",
|
|
2826
|
+
operationId: "deleteHoneytoken"
|
|
2827
|
+
},
|
|
2594
2828
|
"GET /v1/projects/{project_id}/insights": {
|
|
2595
2829
|
method: "GET",
|
|
2596
2830
|
path: "/v1/projects/{project_id}/insights",
|
|
@@ -2611,6 +2845,11 @@ const operationsByPath = {
|
|
|
2611
2845
|
path: "/v1/organizations/{org_id}/onboarding",
|
|
2612
2846
|
operationId: "updateOnboardingProgress"
|
|
2613
2847
|
},
|
|
2848
|
+
"GET /v1/organizations": {
|
|
2849
|
+
method: "GET",
|
|
2850
|
+
path: "/v1/organizations",
|
|
2851
|
+
operationId: "listOrganizations"
|
|
2852
|
+
},
|
|
2614
2853
|
"GET /v1/projects/{project_id}/policies": {
|
|
2615
2854
|
method: "GET",
|
|
2616
2855
|
path: "/v1/projects/{project_id}/policies",
|