pgbeam 0.3.12 → 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.
@@ -796,6 +796,609 @@ type RotateAgentCredentialRequestConfig = {
796
796
  url: `/v1/projects/${string}/agents/${string}/rotate`;
797
797
  };
798
798
 
799
+ /**
800
+ * Generated by Kubb (https://kubb.dev/).
801
+ * Do not edit manually.
802
+ */
803
+ declare const maskingRuleKindEnum: {
804
+ readonly redact: "redact";
805
+ readonly null: "null";
806
+ readonly hash: "hash";
807
+ };
808
+ type MaskingRuleKindEnumKey = (typeof maskingRuleKindEnum)[keyof typeof maskingRuleKindEnum];
809
+ /**
810
+ * @description A column masking rule applied to agent query results.
811
+ * @type object
812
+ */
813
+ type MaskingRule = {
814
+ /**
815
+ * @description Relation name, optionally schema-qualified (e.g. \"public.users\" or \"users\").
816
+ * @example users
817
+ * @type string
818
+ */
819
+ table: string;
820
+ /**
821
+ * @description Column to mask.
822
+ * @example email
823
+ * @type string
824
+ */
825
+ column: string;
826
+ /**
827
+ * @description How to mask. redact replaces with a token, null returns NULL, hash returns a SHA-256 hex.
828
+ * @type string
829
+ */
830
+ kind: MaskingRuleKindEnumKey;
831
+ };
832
+
833
+ /**
834
+ * Generated by Kubb (https://kubb.dev/).
835
+ * Do not edit manually.
836
+ */
837
+ /**
838
+ * @description A per-relation row filter. The predicate is a raw SQL boolean expression ANDed into the WHERE clause for the matching relation.
839
+ * @type object
840
+ */
841
+ type RowFilter = {
842
+ /**
843
+ * @description Relation name, optionally schema-qualified (e.g. \"public.orders\").
844
+ * @example orders
845
+ * @type string
846
+ */
847
+ table: string;
848
+ /**
849
+ * @description Raw SQL boolean expression ANDed into WHERE for this relation.
850
+ * @example tenant_id = current_setting('pgbeam.tenant')
851
+ * @type string
852
+ */
853
+ predicate: string;
854
+ };
855
+
856
+ /**
857
+ * Generated by Kubb (https://kubb.dev/).
858
+ * Do not edit manually.
859
+ */
860
+ /**
861
+ * @description Per-statement-kind allow/deny lists. Empty allow means all kinds permitted by the access mode.
862
+ * @type object
863
+ */
864
+ type StatementRules = {
865
+ /**
866
+ * @description Allowed statement kinds (select, insert, update, delete, ddl, copy, set, show, explain, transaction).
867
+ * @type array | undefined
868
+ */
869
+ allow?: string[];
870
+ /**
871
+ * @description Denied statement kinds (takes precedence over allow).
872
+ * @type array | undefined
873
+ */
874
+ deny?: string[];
875
+ };
876
+
877
+ /**
878
+ * Generated by Kubb (https://kubb.dev/).
879
+ * Do not edit manually.
880
+ */
881
+
882
+ declare const policyProfileInputAccessModeEnum: {
883
+ readonly read_only: "read_only";
884
+ readonly read_write: "read_write";
885
+ };
886
+ type PolicyProfileInputAccessModeEnumKey = (typeof policyProfileInputAccessModeEnum)[keyof typeof policyProfileInputAccessModeEnum];
887
+ declare const policyProfileInputWriteModeEnum: {
888
+ readonly normal: "normal";
889
+ readonly rollback: "rollback";
890
+ readonly sandbox: "sandbox";
891
+ };
892
+ type PolicyProfileInputWriteModeEnumKey = (typeof policyProfileInputWriteModeEnum)[keyof typeof policyProfileInputWriteModeEnum];
893
+ declare const policyProfileInputApprovalModeEnum: {
894
+ readonly off: "off";
895
+ readonly writes: "writes";
896
+ readonly ddl: "ddl";
897
+ readonly all: "all";
898
+ };
899
+ type PolicyProfileInputApprovalModeEnumKey = (typeof policyProfileInputApprovalModeEnum)[keyof typeof policyProfileInputApprovalModeEnum];
900
+ declare const policyProfileInputMigrationSafetyEnum: {
901
+ readonly off: "off";
902
+ readonly warn: "warn";
903
+ readonly block: "block";
904
+ };
905
+ type PolicyProfileInputMigrationSafetyEnumKey = (typeof policyProfileInputMigrationSafetyEnum)[keyof typeof policyProfileInputMigrationSafetyEnum];
906
+ /**
907
+ * @description Mutable fields of a policy profile (used for create and update).
908
+ * @type object
909
+ */
910
+ type PolicyProfileInput = {
911
+ /**
912
+ * @description Human-readable name for the policy profile.
913
+ * @minLength 1
914
+ * @maxLength 128
915
+ * @type string
916
+ */
917
+ name: string;
918
+ /**
919
+ * @description read_only blocks all data and schema mutations.
920
+ * @default "read_only"
921
+ * @type string | undefined
922
+ */
923
+ access_mode?: PolicyProfileInputAccessModeEnumKey;
924
+ /**
925
+ * @description Per-statement-kind allow/deny lists. Empty allow means all kinds permitted by the access mode.
926
+ * @type object | undefined
927
+ */
928
+ statement_rules?: StatementRules;
929
+ /**
930
+ * @description If non-empty, only these relations are reachable.
931
+ * @type array | undefined
932
+ */
933
+ table_allowlist?: string[];
934
+ /**
935
+ * @description Relations explicitly blocked.
936
+ * @type array | undefined
937
+ */
938
+ table_denylist?: string[];
939
+ /**
940
+ * @description Column masking rules applied to query results.
941
+ * @type array | undefined
942
+ */
943
+ masking_rules?: MaskingRule[];
944
+ /**
945
+ * @description Max queries per rolling hour window. 0 means unlimited.
946
+ * @minLength 0
947
+ * @default 0
948
+ * @type integer | undefined
949
+ */
950
+ budget_queries_per_hour?: number;
951
+ /**
952
+ * @description Max queries per day window. 0 means unlimited.
953
+ * @minLength 0
954
+ * @default 0
955
+ * @type integer | undefined
956
+ */
957
+ budget_queries_per_day?: number;
958
+ /**
959
+ * @description Max rows returned per query. 0 means unlimited.
960
+ * @minLength 0
961
+ * @default 0
962
+ * @type integer | undefined
963
+ */
964
+ max_rows?: number;
965
+ /**
966
+ * @description Upstream statement timeout for agent sessions. 0 uses the project default.
967
+ * @minLength 0
968
+ * @default 0
969
+ * @type integer | undefined
970
+ */
971
+ statement_timeout_ms?: number;
972
+ /**
973
+ * @description Per-relation row filters ANDed into agent reads.
974
+ * @type array | undefined
975
+ */
976
+ row_filters?: RowFilter[];
977
+ /**
978
+ * @description How writes are handled. normal commits, rollback auto-rolls back, sandbox routes to an ephemeral branch.
979
+ * @default "normal"
980
+ * @type string | undefined
981
+ */
982
+ write_mode?: PolicyProfileInputWriteModeEnumKey;
983
+ /**
984
+ * @description Which statement classes require human approval before execution.
985
+ * @default "off"
986
+ * @type string | undefined
987
+ */
988
+ approval_mode?: PolicyProfileInputApprovalModeEnumKey;
989
+ /**
990
+ * @description Statements touching at most this many rows are auto-approved. 0 means none.
991
+ * @minLength 0
992
+ * @default 0
993
+ * @type integer | undefined
994
+ */
995
+ approval_auto_max_rows?: number;
996
+ /**
997
+ * @description How long a held statement waits for a decision before expiring.
998
+ * @minLength 0
999
+ * @default 300
1000
+ * @type integer | undefined
1001
+ */
1002
+ approval_timeout_seconds?: number;
1003
+ /**
1004
+ * @description Migration safety mode. warn surfaces findings, block refuses unsafe DDL.
1005
+ * @default "off"
1006
+ * @type string | undefined
1007
+ */
1008
+ migration_safety?: PolicyProfileInputMigrationSafetyEnumKey;
1009
+ /**
1010
+ * @description Per-day egress budget in bytes. 0 means unlimited.
1011
+ * @minLength 0
1012
+ * @default 0
1013
+ * @type integer | undefined
1014
+ */
1015
+ egress_bytes_per_day?: number;
1016
+ /**
1017
+ * @description Hard cap on rows a single write (INSERT/UPDATE/DELETE) may affect. A write whose affected-row count would exceed this is executed inside a transaction, checked, and rolled back so nothing persists, then blocked. Enforced independently of human approval. 0 means unlimited.
1018
+ * @minLength 0
1019
+ * @default 0
1020
+ * @type integer | undefined
1021
+ */
1022
+ max_affected_rows?: number;
1023
+ };
1024
+
1025
+ /**
1026
+ * Generated by Kubb (https://kubb.dev/).
1027
+ * Do not edit manually.
1028
+ */
1029
+ declare const dryEvalMaskedColumnKindEnum: {
1030
+ readonly redact: "redact";
1031
+ readonly null: "null";
1032
+ readonly hash: "hash";
1033
+ };
1034
+ type DryEvalMaskedColumnKindEnumKey = (typeof dryEvalMaskedColumnKindEnum)[keyof typeof dryEvalMaskedColumnKindEnum];
1035
+ /**
1036
+ * @description One result column that would be masked, with the mask kind applied.
1037
+ * @type object
1038
+ */
1039
+ type DryEvalMaskedColumn = {
1040
+ /**
1041
+ * @description The output column name (post-alias) the client would see masked.
1042
+ * @example email
1043
+ * @type string
1044
+ */
1045
+ column: string;
1046
+ /**
1047
+ * @description How the column is masked.
1048
+ * @type string
1049
+ */
1050
+ kind: DryEvalMaskedColumnKindEnumKey;
1051
+ };
1052
+
1053
+ /**
1054
+ * Generated by Kubb (https://kubb.dev/).
1055
+ * Do not edit manually.
1056
+ */
1057
+
1058
+ declare const dryEvalResultVerdictEnum: {
1059
+ readonly allow: "allow";
1060
+ readonly block: "block";
1061
+ readonly mask: "mask";
1062
+ readonly "row-filter": "row-filter";
1063
+ };
1064
+ type DryEvalResultVerdictEnumKey = (typeof dryEvalResultVerdictEnum)[keyof typeof dryEvalResultVerdictEnum];
1065
+ /**
1066
+ * @description The decision the proxy would reach for the supplied statement under the supplied policy. verdict is the headline outcome; the remaining fields detail why.
1067
+ * @type object
1068
+ */
1069
+ type DryEvalResult = {
1070
+ /**
1071
+ * @description allow — permitted unchanged; block — rejected; mask — permitted but listed result columns are masked; row-filter — permitted but a WHERE predicate is injected (and any listed columns are also masked).
1072
+ * @type string
1073
+ */
1074
+ verdict: DryEvalResultVerdictEnumKey;
1075
+ /**
1076
+ * @description Machine-readable decision tag. For a block, the blocking rule (e.g. read_only, table_denied, table_not_allowed, statement_denied, row_filter_unsafe). Otherwise \"ok\".
1077
+ * @example ok
1078
+ * @type string
1079
+ */
1080
+ rule: string;
1081
+ /**
1082
+ * @description Human-readable explanation of the verdict.
1083
+ * @type string
1084
+ */
1085
+ reason: string;
1086
+ /**
1087
+ * @description What the author could do instead (present on block verdicts).
1088
+ * @type string | undefined
1089
+ */
1090
+ hint?: string;
1091
+ /**
1092
+ * @description Result columns that would be masked. Present on mask/row-filter verdicts.
1093
+ * @type array | undefined
1094
+ */
1095
+ masked_columns?: DryEvalMaskedColumn[];
1096
+ /**
1097
+ * @description The row-filter predicate ANDed into the statement\'s WHERE clause.
1098
+ * @example tenant_id = current_setting('pgbeam.tenant')
1099
+ * @type string | undefined
1100
+ */
1101
+ row_filter_predicate?: string;
1102
+ /**
1103
+ * @description The statement as it would be sent upstream after row-filter injection.
1104
+ * @type string | undefined
1105
+ */
1106
+ rewritten_sql?: string;
1107
+ /**
1108
+ * @description Informational caveats about stateful enforcement a single-statement preview cannot model (per-region budgets, approvals, write-mode routing).
1109
+ * @type array | undefined
1110
+ */
1111
+ notes?: string[];
1112
+ };
1113
+
1114
+ /**
1115
+ * Generated by Kubb (https://kubb.dev/).
1116
+ * Do not edit manually.
1117
+ */
1118
+
1119
+ declare const policyReplayItemChangeEnum: {
1120
+ readonly newly_blocked: "newly_blocked";
1121
+ readonly newly_allowed: "newly_allowed";
1122
+ readonly still_allowed: "still_allowed";
1123
+ readonly still_blocked: "still_blocked";
1124
+ };
1125
+ type PolicyReplayItemChangeEnumKey = (typeof policyReplayItemChangeEnum)[keyof typeof policyReplayItemChangeEnum];
1126
+ /**
1127
+ * @description One distinct recorded query and the decision the candidate policy would reach for it.
1128
+ * @type object
1129
+ */
1130
+ type PolicyReplayItem = {
1131
+ /**
1132
+ * @description Normalized query hash identifying this statement shape.
1133
+ * @type string
1134
+ */
1135
+ query_hash: string;
1136
+ /**
1137
+ * @description The recorded statement (normalized, literals replaced with $N placeholders), from its most recent occurrence.
1138
+ * @type string
1139
+ */
1140
+ sql: string;
1141
+ /**
1142
+ * @description Statement kind (select, insert, update, delete, ddl, ...).
1143
+ * @type string | undefined
1144
+ */
1145
+ statement_kind?: string;
1146
+ /**
1147
+ * @description How many recorded entries share this query shape in the window.
1148
+ * @type integer
1149
+ */
1150
+ occurrences: number;
1151
+ /**
1152
+ * @description Oldest occurrence in the window.
1153
+ * @type string
1154
+ */
1155
+ first_seen: string;
1156
+ /**
1157
+ * @description Newest occurrence in the window.
1158
+ * @type string
1159
+ */
1160
+ last_seen: string;
1161
+ /**
1162
+ * @description The most recent recorded outcome for this query (query, masked, truncated, or blocked).
1163
+ * @type string
1164
+ */
1165
+ recorded_event: string;
1166
+ /**
1167
+ * @description The decision rule recorded with a blocked outcome.
1168
+ * @type string | undefined
1169
+ */
1170
+ recorded_rule?: string;
1171
+ /**
1172
+ * @description How the candidate decision compares to the recorded outcome. newly_blocked and newly_allowed are the changes worth reviewing before rollout; still_allowed and still_blocked are unchanged.
1173
+ * @type string
1174
+ */
1175
+ change: PolicyReplayItemChangeEnumKey;
1176
+ /**
1177
+ * @description The decision the proxy would reach for the supplied statement under the supplied policy. verdict is the headline outcome; the remaining fields detail why.
1178
+ * @type object
1179
+ */
1180
+ result: DryEvalResult;
1181
+ };
1182
+
1183
+ /**
1184
+ * Generated by Kubb (https://kubb.dev/).
1185
+ * Do not edit manually.
1186
+ */
1187
+ /**
1188
+ * @description Aggregate outcome of a policy replay.
1189
+ * @type object
1190
+ */
1191
+ type PolicyReplaySummary = {
1192
+ /**
1193
+ * @description Recorded audit entries covered by the replayed queries.
1194
+ * @type integer
1195
+ */
1196
+ entries_scanned: number;
1197
+ /**
1198
+ * @description Distinct normalized queries found in the window (capped at limit).
1199
+ * @type integer
1200
+ */
1201
+ distinct_queries: number;
1202
+ /**
1203
+ * @description Distinct queries actually evaluated against the candidate policy.
1204
+ * @type integer
1205
+ */
1206
+ evaluated: number;
1207
+ /**
1208
+ * @description Queries the candidate policy would allow unchanged.
1209
+ * @type integer
1210
+ */
1211
+ would_allow: number;
1212
+ /**
1213
+ * @description Queries the candidate policy would block.
1214
+ * @type integer
1215
+ */
1216
+ would_block: number;
1217
+ /**
1218
+ * @description Queries the candidate policy would mask result columns on.
1219
+ * @type integer
1220
+ */
1221
+ would_mask: number;
1222
+ /**
1223
+ * @description Queries the candidate policy would inject a row filter into.
1224
+ * @type integer
1225
+ */
1226
+ would_row_filter: number;
1227
+ /**
1228
+ * @description Queries that executed under the recorded policy but the candidate policy would block.
1229
+ * @type integer
1230
+ */
1231
+ newly_blocked: number;
1232
+ /**
1233
+ * @description Queries that were blocked when recorded but the candidate policy would permit.
1234
+ * @type integer
1235
+ */
1236
+ newly_allowed: number;
1237
+ /**
1238
+ * @description Distinct queries skipped because the stored statement was truncated at record time and can no longer be parsed faithfully.
1239
+ * @type integer
1240
+ */
1241
+ skipped_unparseable: number;
1242
+ /**
1243
+ * @description True when the window contained more distinct queries than limit; only the newest were replayed.
1244
+ * @type boolean
1245
+ */
1246
+ truncated: boolean;
1247
+ };
1248
+
1249
+ /**
1250
+ * Generated by Kubb (https://kubb.dev/).
1251
+ * Do not edit manually.
1252
+ */
1253
+
1254
+ /**
1255
+ * @description The outcome of replaying recorded agent traffic against a candidate policy: an aggregate summary plus per-query decisions, changes first.
1256
+ * @type object
1257
+ */
1258
+ type PolicyReplayResult = {
1259
+ /**
1260
+ * @description Aggregate outcome of a policy replay.
1261
+ * @type object
1262
+ */
1263
+ summary: PolicyReplaySummary;
1264
+ /**
1265
+ * @description Per-query replay decisions, ordered changes first (newly blocked, then newly allowed), then by occurrence count.
1266
+ * @type array
1267
+ */
1268
+ items: PolicyReplayItem[];
1269
+ };
1270
+
1271
+ /**
1272
+ * Generated by Kubb (https://kubb.dev/).
1273
+ * Do not edit manually.
1274
+ */
1275
+
1276
+ /**
1277
+ * @description A least-privilege policy derived from an agent credential\'s recorded audit history, together with the replay diff that proves the candidate would not newly block any statement the credential legitimately ran. Advisory only: this endpoint never creates, updates, or otherwise mutates a policy or a credential. A good recommendation has replay.summary.newly_blocked == 0.
1278
+ * @type object
1279
+ */
1280
+ type PolicyRecommendation = {
1281
+ /**
1282
+ * @description True when there was enough parseable, executed traffic to derive a candidate. When false, candidate and replay are omitted and message explains why no recommendation could be made.
1283
+ * @type boolean
1284
+ */
1285
+ sufficient_history: boolean;
1286
+ /**
1287
+ * @description Present when sufficient_history is false; a clear explanation of why no recommendation could be produced (e.g. no executed traffic in the window).
1288
+ * @type string | undefined
1289
+ */
1290
+ message?: string;
1291
+ /**
1292
+ * @description Mutable fields of a policy profile (used for create and update).
1293
+ * @type object | undefined
1294
+ */
1295
+ candidate?: PolicyProfileInput;
1296
+ /**
1297
+ * @description The outcome of replaying recorded agent traffic against a candidate policy: an aggregate summary plus per-query decisions, changes first.
1298
+ * @type object | undefined
1299
+ */
1300
+ replay?: PolicyReplayResult;
1301
+ /**
1302
+ * @description Distinct executed query shapes the candidate was derived from (blocked attempts are excluded from derivation).
1303
+ * @type integer
1304
+ */
1305
+ observed_queries: number;
1306
+ /**
1307
+ * @description Recorded audit entries covered by the analyzed window.
1308
+ * @type integer
1309
+ */
1310
+ observed_entries: number;
1311
+ /**
1312
+ * @description Start of the analyzed traffic window (inclusive).
1313
+ * @type string
1314
+ */
1315
+ window_start: string;
1316
+ /**
1317
+ * @description End of the analyzed traffic window (exclusive).
1318
+ * @type string
1319
+ */
1320
+ window_end: string;
1321
+ /**
1322
+ * @description Human-readable rationale for each tightening decision (e.g. why the candidate was downgraded to read-only, or how max_rows was chosen).
1323
+ * @type array | undefined
1324
+ */
1325
+ notes?: string[];
1326
+ };
1327
+
1328
+ /**
1329
+ * Generated by Kubb (https://kubb.dev/).
1330
+ * Do not edit manually.
1331
+ */
1332
+ /**
1333
+ * @description Optional parameters for a least-privilege policy recommendation. Every field is optional; an empty body analyzes the last 30 days of the credential\'s audit history.
1334
+ * @type object
1335
+ */
1336
+ type PolicyRecommendationInput = {
1337
+ /**
1338
+ * @description How many days of recorded audit history to analyze.
1339
+ * @minLength 1
1340
+ * @maxLength 365
1341
+ * @default 30
1342
+ * @type integer | undefined
1343
+ */
1344
+ lookback_days?: number;
1345
+ /**
1346
+ * @description Maximum number of distinct query shapes to analyze and replay, newest first. Traffic is deduplicated by normalized query hash.
1347
+ * @minLength 1
1348
+ * @maxLength 500
1349
+ * @default 200
1350
+ * @type integer | undefined
1351
+ */
1352
+ limit?: number;
1353
+ };
1354
+
1355
+ /**
1356
+ * Generated by Kubb (https://kubb.dev/).
1357
+ * Do not edit manually.
1358
+ */
1359
+
1360
+ /**
1361
+ * @description Unique project identifier (prefixed, e.g. prj_xxx).
1362
+ * @pattern ^[a-zA-Z0-9_.-]+$
1363
+ * @type string
1364
+ */
1365
+ type RecommendAgentPolicyPathProjectId = string;
1366
+ /**
1367
+ * @description Unique agent credential identifier (prefixed, e.g. agt_xxx).
1368
+ * @pattern ^[a-zA-Z0-9_.-]+$
1369
+ * @type string
1370
+ */
1371
+ type RecommendAgentPolicyPathAgentId = string;
1372
+ /**
1373
+ * @description A least-privilege policy derived from an agent credential\'s recorded audit history, together with the replay diff that proves the candidate would not newly block any statement the credential legitimately ran. Advisory only: this endpoint never creates, updates, or otherwise mutates a policy or a credential. A good recommendation has replay.summary.newly_blocked == 0.
1374
+ * @type object
1375
+ */
1376
+ type RecommendAgentPolicyStatus200 = PolicyRecommendation;
1377
+ /**
1378
+ * @description Optional parameters for a least-privilege policy recommendation. Every field is optional; an empty body analyzes the last 30 days of the credential\'s audit history.
1379
+ * @type object | undefined
1380
+ */
1381
+ type RecommendAgentPolicyData = PolicyRecommendationInput | undefined;
1382
+ /**
1383
+ * @type object
1384
+ */
1385
+ type RecommendAgentPolicyRequestConfig = {
1386
+ data?: RecommendAgentPolicyData;
1387
+ /**
1388
+ * @type object
1389
+ */
1390
+ pathParams: {
1391
+ project_id: RecommendAgentPolicyPathProjectId;
1392
+ agent_id: RecommendAgentPolicyPathAgentId;
1393
+ };
1394
+ queryParams?: never;
1395
+ headerParams?: never;
1396
+ /**
1397
+ * @type string
1398
+ */
1399
+ url: `/v1/projects/${string}/agents/${string}/policy-recommendation`;
1400
+ };
1401
+
799
1402
  /**
800
1403
  * Generated by Kubb (https://kubb.dev/).
801
1404
  * Do not edit manually.
@@ -4258,93 +4861,55 @@ type GetHealthStatus200 = HealthResponse;
4258
4861
  * Generated by Kubb (https://kubb.dev/).
4259
4862
  * Do not edit manually.
4260
4863
  */
4261
- /**
4262
- * @description Aggregate cache performance metrics for the selected time range.
4263
- * @type object
4264
- */
4265
- type CacheSummary = {
4266
- /**
4267
- * @description Total number of cache hits in the selected time range.
4268
- * @type integer
4269
- */
4270
- total_hits: number;
4271
- /**
4272
- * @description Total number of cache misses in the selected time range.
4273
- * @type integer
4274
- */
4275
- total_misses: number;
4276
- /**
4277
- * @description Cache hit rate as a fraction (0.0 to 1.0).
4278
- * @type number
4279
- */
4280
- hit_rate: number;
4281
- };
4282
-
4283
- /**
4284
- * Generated by Kubb (https://kubb.dev/).
4285
- * Do not edit manually.
4286
- */
4287
- /**
4288
- * @description Aggregate latency metrics for the selected time range.
4289
- * @type object
4290
- */
4291
- type LatencySummary = {
4292
- /**
4293
- * @description Average latency in milliseconds across all queries.
4294
- * @type number
4295
- */
4296
- avg_ms: number;
4297
- /**
4298
- * @description P99 latency in milliseconds across all queries.
4299
- * @type number
4300
- */
4301
- p99_ms: number;
4864
+ declare const honeytokenActionEnum: {
4865
+ readonly audit_only: "audit_only";
4866
+ readonly kill: "kill";
4302
4867
  };
4303
-
4304
- /**
4305
- * Generated by Kubb (https://kubb.dev/).
4306
- * Do not edit manually.
4307
- */
4868
+ type HoneytokenActionEnumKey = (typeof honeytokenActionEnum)[keyof typeof honeytokenActionEnum];
4308
4869
  /**
4309
- * @description Aggregated analytics for a normalized SQL query shape.
4870
+ * @description A decoy (canary) relation. Any agent statement that references it is blocked (fail closed) and recorded as a canary_tripped audit event.\n
4310
4871
  * @type object
4311
4872
  */
4312
- type QueryInsight = {
4873
+ type Honeytoken = {
4313
4874
  /**
4314
- * @description xxhash64 of the normalized SQL pattern (hex).
4875
+ * @description Unique honeytoken identifier.
4876
+ * @example hnt_01j9x8y7z6w5v4u3t2s1r0q9p8
4315
4877
  * @type string
4316
4878
  */
4317
- query_hash: string;
4879
+ id: string;
4318
4880
  /**
4319
- * @description Normalized SQL pattern (truncated to 500 chars).
4881
+ * @description Project the honeytoken belongs to.
4882
+ * @example prj_01j9x8y7z6w5v4u3t2s1r0q9p8
4320
4883
  * @type string
4321
4884
  */
4322
- query_pattern: string;
4885
+ project_id: string;
4323
4886
  /**
4324
- * @description Total number of executions in the time range.
4325
- * @type integer
4887
+ * @description Optional schema. Null matches the unqualified/public form, mirroring the relation allowlist normalization.\n
4888
+ * @example public
4889
+ * @type string
4326
4890
  */
4327
- total_count: number;
4891
+ schema_name?: string | null;
4328
4892
  /**
4329
- * @description Total cache hits attributed to the query shape.
4330
- * @type integer
4893
+ * @description Relation (table or view) name of the decoy.
4894
+ * @example customer_ssns
4895
+ * @type string
4331
4896
  */
4332
- total_cache_hits: number;
4897
+ relation_name: string;
4333
4898
  /**
4334
- * @description Total cache misses attributed to the query shape.
4335
- * @type integer
4899
+ * @description Response when tripped. audit_only blocks the statement, records the event, and fires webhooks. kill additionally disables the tripping credential via the kill-switch.\n
4900
+ * @type string
4336
4901
  */
4337
- total_cache_misses: number;
4902
+ action: HoneytokenActionEnumKey;
4338
4903
  /**
4339
- * @description Average query latency in milliseconds.
4340
- * @type number
4904
+ * @description When the honeytoken was registered.
4905
+ * @type string
4341
4906
  */
4342
- avg_latency_ms: number;
4907
+ created_at: string;
4343
4908
  /**
4344
- * @description P99 query latency in milliseconds.
4345
- * @type number
4909
+ * @description When the honeytoken was last updated.
4910
+ * @type string
4346
4911
  */
4347
- p99_latency_ms: number;
4912
+ updated_at: string;
4348
4913
  };
4349
4914
 
4350
4915
  /**
@@ -4353,25 +4918,20 @@ type QueryInsight = {
4353
4918
  */
4354
4919
 
4355
4920
  /**
4356
- * @description Query insights, cache performance, and latency for a project.
4921
+ * @description Cursor-paginated honeytokens for a project.
4357
4922
  * @type object
4358
4923
  */
4359
- type ProjectInsights = {
4924
+ type ListHoneytokensResponse = {
4360
4925
  /**
4361
- * @description Top query shapes observed for the project.
4926
+ * @description Honeytokens returned for the current page.
4362
4927
  * @type array
4363
4928
  */
4364
- queries: QueryInsight[];
4365
- /**
4366
- * @description Aggregate cache performance metrics for the selected time range.
4367
- * @type object
4368
- */
4369
- cache: CacheSummary;
4929
+ honeytokens: Honeytoken[];
4370
4930
  /**
4371
- * @description Aggregate latency metrics for the selected time range.
4372
- * @type object
4931
+ * @description Opaque token for cursor-based pagination.
4932
+ * @type string | undefined
4373
4933
  */
4374
- latency: LatencySummary;
4934
+ next_page_token?: string;
4375
4935
  };
4376
4936
 
4377
4937
  /**
@@ -4384,115 +4944,125 @@ type ProjectInsights = {
4384
4944
  * @pattern ^[a-zA-Z0-9_.-]+$
4385
4945
  * @type string
4386
4946
  */
4387
- type GetProjectInsightsPathProjectId = string;
4388
- /**
4389
- * @description Time range to query. Defaults to 24h.
4390
- * @default "24h"
4391
- * @example 24h
4392
- * @type string | undefined
4393
- */
4394
- type GetProjectInsightsQueryRange = ("1h" | "6h" | "24h" | "7d") | undefined;
4947
+ type ListHoneytokensPathProjectId = string;
4395
4948
  /**
4396
- * @description Maximum number of top queries to return (1-100).
4949
+ * @description Maximum number of items to return (1-100, default 20).
4397
4950
  * @minLength 1
4398
4951
  * @maxLength 100
4399
4952
  * @default 20
4400
4953
  * @type integer | undefined
4401
4954
  */
4402
- type GetProjectInsightsQueryLimit = number | undefined;
4955
+ type ListHoneytokensQueryPageSize = number | undefined;
4403
4956
  /**
4404
- * @description Query insights, cache performance, and latency for a project.
4957
+ * @description Opaque token for cursor-based pagination.
4958
+ * @pattern ^[a-zA-Z0-9_.-]+$
4959
+ * @type string | undefined
4960
+ */
4961
+ type ListHoneytokensQueryPageToken = string | undefined;
4962
+ /**
4963
+ * @description Cursor-paginated honeytokens for a project.
4405
4964
  * @type object
4406
4965
  */
4407
- type GetProjectInsightsStatus200 = ProjectInsights;
4966
+ type ListHoneytokensStatus200 = ListHoneytokensResponse;
4408
4967
  /**
4409
4968
  * @type object
4410
4969
  */
4411
- type GetProjectInsightsRequestConfig = {
4970
+ type ListHoneytokensRequestConfig = {
4412
4971
  data?: never;
4413
4972
  /**
4414
4973
  * @type object
4415
4974
  */
4416
4975
  pathParams: {
4417
- project_id: GetProjectInsightsPathProjectId;
4976
+ project_id: ListHoneytokensPathProjectId;
4418
4977
  };
4419
4978
  /**
4420
4979
  * @type object | undefined
4421
4980
  */
4422
4981
  queryParams?: {
4423
- range?: GetProjectInsightsQueryRange;
4424
- limit?: GetProjectInsightsQueryLimit;
4982
+ page_size?: ListHoneytokensQueryPageSize;
4983
+ page_token?: ListHoneytokensQueryPageToken;
4425
4984
  };
4426
4985
  headerParams?: never;
4427
4986
  /**
4428
4987
  * @type string
4429
4988
  */
4430
- url: `/v1/projects/${string}/insights`;
4989
+ url: `/v1/projects/${string}/honeytokens`;
4431
4990
  };
4432
4991
 
4433
4992
  /**
4434
4993
  * Generated by Kubb (https://kubb.dev/).
4435
4994
  * Do not edit manually.
4436
4995
  */
4996
+ declare const honeytokenInputActionEnum: {
4997
+ readonly audit_only: "audit_only";
4998
+ readonly kill: "kill";
4999
+ };
5000
+ type HoneytokenInputActionEnumKey = (typeof honeytokenInputActionEnum)[keyof typeof honeytokenInputActionEnum];
4437
5001
  /**
4438
- * @description A migration script to lint for unsafe schema changes.
5002
+ * @description Request body for creating or updating a honeytoken.
4439
5003
  * @type object
4440
5004
  */
4441
- type MigrationLintRequest = {
5005
+ type HoneytokenInput = {
4442
5006
  /**
4443
- * @description The migration SQL to analyze. May contain multiple statements.
5007
+ * @description Optional schema. Null or empty matches the unqualified/public form.
5008
+ * @maxLength 255
5009
+ * @example public
5010
+ * @type string
5011
+ */
5012
+ schema_name?: string | null;
5013
+ /**
5014
+ * @description Relation (table or view) name of the decoy.
4444
5015
  * @minLength 1
4445
- * @maxLength 1048576
5016
+ * @maxLength 255
5017
+ * @example customer_ssns
4446
5018
  * @type string
4447
5019
  */
4448
- sql: string;
5020
+ relation_name: string;
4449
5021
  /**
4450
- * @description Optional database to scope the lint to.
4451
- * @type string | undefined
5022
+ * @description Response when the honeytoken is tripped.
5023
+ * @type string
4452
5024
  */
4453
- database_id?: string;
5025
+ action: HoneytokenInputActionEnumKey;
4454
5026
  };
4455
5027
 
4456
5028
  /**
4457
5029
  * Generated by Kubb (https://kubb.dev/).
4458
5030
  * Do not edit manually.
4459
5031
  */
4460
- declare const migrationFindingSeverityEnum: {
4461
- readonly info: "info";
4462
- readonly warning: "warning";
4463
- readonly error: "error";
4464
- };
4465
- type MigrationFindingSeverityEnumKey = (typeof migrationFindingSeverityEnum)[keyof typeof migrationFindingSeverityEnum];
5032
+
5033
+ /**
5034
+ * @description Unique project identifier (prefixed, e.g. prj_xxx).
5035
+ * @pattern ^[a-zA-Z0-9_.-]+$
5036
+ * @type string
5037
+ */
5038
+ type CreateHoneytokenPathProjectId = string;
5039
+ /**
5040
+ * @description A decoy (canary) relation. Any agent statement that references it is blocked (fail closed) and recorded as a canary_tripped audit event.\n
5041
+ * @type object
5042
+ */
5043
+ type CreateHoneytokenStatus201 = Honeytoken;
4466
5044
  /**
4467
- * @description A single issue found while linting a migration.
5045
+ * @description Request body for creating or updating a honeytoken.
4468
5046
  * @type object
4469
5047
  */
4470
- type MigrationFinding = {
4471
- /**
4472
- * @description How serious the finding is. error indicates an unsafe change.
4473
- * @type string
4474
- */
4475
- severity: MigrationFindingSeverityEnumKey;
5048
+ type CreateHoneytokenData = HoneytokenInput;
5049
+ /**
5050
+ * @type object
5051
+ */
5052
+ type CreateHoneytokenRequestConfig = {
5053
+ data?: CreateHoneytokenData;
4476
5054
  /**
4477
- * @description Machine-readable rule identifier (e.g. drop_table, add_not_null_no_default).
4478
- * @type string
5055
+ * @type object
4479
5056
  */
4480
- rule: string;
5057
+ pathParams: {
5058
+ project_id: CreateHoneytokenPathProjectId;
5059
+ };
5060
+ queryParams?: never;
5061
+ headerParams?: never;
4481
5062
  /**
4482
- * @description Human-readable description of the issue.
4483
5063
  * @type string
4484
5064
  */
4485
- message: string;
4486
- /**
4487
- * @description The statement that triggered the finding.
4488
- * @type string | undefined
4489
- */
4490
- statement?: string;
4491
- /**
4492
- * @description Suggested safer alternative, if any.
4493
- * @type string | undefined
4494
- */
4495
- hint?: string;
5065
+ url: `/v1/projects/${string}/honeytokens`;
4496
5066
  };
4497
5067
 
4498
5068
  /**
@@ -4501,20 +5071,40 @@ type MigrationFinding = {
4501
5071
  */
4502
5072
 
4503
5073
  /**
4504
- * @description Result of linting a migration script.
5074
+ * @description Unique project identifier (prefixed, e.g. prj_xxx).
5075
+ * @pattern ^[a-zA-Z0-9_.-]+$
5076
+ * @type string
5077
+ */
5078
+ type GetHoneytokenPathProjectId = string;
5079
+ /**
5080
+ * @description Unique honeytoken identifier (prefixed, e.g. hnt_xxx).
5081
+ * @pattern ^[a-zA-Z0-9_.-]+$
5082
+ * @type string
5083
+ */
5084
+ type GetHoneytokenPathHoneytokenId = string;
5085
+ /**
5086
+ * @description A decoy (canary) relation. Any agent statement that references it is blocked (fail closed) and recorded as a canary_tripped audit event.\n
4505
5087
  * @type object
4506
5088
  */
4507
- type MigrationLintResponse = {
5089
+ type GetHoneytokenStatus200 = Honeytoken;
5090
+ /**
5091
+ * @type object
5092
+ */
5093
+ type GetHoneytokenRequestConfig = {
5094
+ data?: never;
4508
5095
  /**
4509
- * @description True when no error-severity findings were detected.
4510
- * @type boolean
5096
+ * @type object
4511
5097
  */
4512
- safe: boolean;
5098
+ pathParams: {
5099
+ project_id: GetHoneytokenPathProjectId;
5100
+ honeytoken_id: GetHoneytokenPathHoneytokenId;
5101
+ };
5102
+ queryParams?: never;
5103
+ headerParams?: never;
4513
5104
  /**
4514
- * @description Findings detected across all statements.
4515
- * @type array
5105
+ * @type string
4516
5106
  */
4517
- findings: MigrationFinding[];
5107
+ url: `/v1/projects/${string}/honeytokens/${string}`;
4518
5108
  };
4519
5109
 
4520
5110
  /**
@@ -4527,110 +5117,171 @@ type MigrationLintResponse = {
4527
5117
  * @pattern ^[a-zA-Z0-9_.-]+$
4528
5118
  * @type string
4529
5119
  */
4530
- type LintMigrationPathProjectId = string;
5120
+ type UpdateHoneytokenPathProjectId = string;
4531
5121
  /**
4532
- * @description Result of linting a migration script.
5122
+ * @description Unique honeytoken identifier (prefixed, e.g. hnt_xxx).
5123
+ * @pattern ^[a-zA-Z0-9_.-]+$
5124
+ * @type string
5125
+ */
5126
+ type UpdateHoneytokenPathHoneytokenId = string;
5127
+ /**
5128
+ * @description A decoy (canary) relation. Any agent statement that references it is blocked (fail closed) and recorded as a canary_tripped audit event.\n
4533
5129
  * @type object
4534
5130
  */
4535
- type LintMigrationStatus200 = MigrationLintResponse;
5131
+ type UpdateHoneytokenStatus200 = Honeytoken;
4536
5132
  /**
4537
- * @description A migration script to lint for unsafe schema changes.
5133
+ * @description Request body for creating or updating a honeytoken.
4538
5134
  * @type object
4539
5135
  */
4540
- type LintMigrationData = MigrationLintRequest;
5136
+ type UpdateHoneytokenData = HoneytokenInput;
4541
5137
  /**
4542
5138
  * @type object
4543
5139
  */
4544
- type LintMigrationRequestConfig = {
4545
- data?: LintMigrationData;
5140
+ type UpdateHoneytokenRequestConfig = {
5141
+ data?: UpdateHoneytokenData;
4546
5142
  /**
4547
5143
  * @type object
4548
5144
  */
4549
5145
  pathParams: {
4550
- project_id: LintMigrationPathProjectId;
5146
+ project_id: UpdateHoneytokenPathProjectId;
5147
+ honeytoken_id: UpdateHoneytokenPathHoneytokenId;
4551
5148
  };
4552
5149
  queryParams?: never;
4553
5150
  headerParams?: never;
4554
5151
  /**
4555
5152
  * @type string
4556
5153
  */
4557
- url: `/v1/projects/${string}/migrations${string}`;
5154
+ url: `/v1/projects/${string}/honeytokens/${string}`;
4558
5155
  };
4559
5156
 
4560
5157
  /**
4561
5158
  * Generated by Kubb (https://kubb.dev/).
4562
5159
  * Do not edit manually.
4563
5160
  */
5161
+
5162
+ /**
5163
+ * @description Unique project identifier (prefixed, e.g. prj_xxx).
5164
+ * @pattern ^[a-zA-Z0-9_.-]+$
5165
+ * @type string
5166
+ */
5167
+ type DeleteHoneytokenPathProjectId = string;
5168
+ /**
5169
+ * @description Unique honeytoken identifier (prefixed, e.g. hnt_xxx).
5170
+ * @pattern ^[a-zA-Z0-9_.-]+$
5171
+ * @type string
5172
+ */
5173
+ type DeleteHoneytokenPathHoneytokenId = string;
4564
5174
  /**
4565
- * @description Progress state for the dashboard onboarding checklist.
4566
5175
  * @type object
4567
5176
  */
4568
- type OnboardingProgress = {
5177
+ type DeleteHoneytokenRequestConfig = {
5178
+ data?: never;
4569
5179
  /**
4570
- * @description Organization ID this onboarding belongs to.
4571
- * @type string
5180
+ * @type object
4572
5181
  */
4573
- organization_id: string;
5182
+ pathParams: {
5183
+ project_id: DeleteHoneytokenPathProjectId;
5184
+ honeytoken_id: DeleteHoneytokenPathHoneytokenId;
5185
+ };
5186
+ queryParams?: never;
5187
+ headerParams?: never;
4574
5188
  /**
4575
- * @description Whether the organization has been created.
4576
- * @type boolean
5189
+ * @type string
4577
5190
  */
4578
- org_created: boolean;
5191
+ url: `/v1/projects/${string}/honeytokens/${string}`;
5192
+ };
5193
+
5194
+ /**
5195
+ * Generated by Kubb (https://kubb.dev/).
5196
+ * Do not edit manually.
5197
+ */
5198
+ /**
5199
+ * @description Aggregate cache performance metrics for the selected time range.
5200
+ * @type object
5201
+ */
5202
+ type CacheSummary = {
4579
5203
  /**
4580
- * @description Whether a project has been created.
4581
- * @type boolean
5204
+ * @description Total number of cache hits in the selected time range.
5205
+ * @type integer
4582
5206
  */
4583
- project_created: boolean;
5207
+ total_hits: number;
4584
5208
  /**
4585
- * @description Whether a database has been added.
4586
- * @type boolean
5209
+ * @description Total number of cache misses in the selected time range.
5210
+ * @type integer
4587
5211
  */
4588
- database_added: boolean;
5212
+ total_misses: number;
4589
5213
  /**
4590
- * @description Whether the database connection has been tested.
4591
- * @type boolean
5214
+ * @description Cache hit rate as a fraction (0.0 to 1.0).
5215
+ * @type number
4592
5216
  */
4593
- connection_tested: boolean;
5217
+ hit_rate: number;
5218
+ };
5219
+
5220
+ /**
5221
+ * Generated by Kubb (https://kubb.dev/).
5222
+ * Do not edit manually.
5223
+ */
5224
+ /**
5225
+ * @description Aggregate latency metrics for the selected time range.
5226
+ * @type object
5227
+ */
5228
+ type LatencySummary = {
4594
5229
  /**
4595
- * @description Whether the connection string has been copied.
4596
- * @type boolean
5230
+ * @description Average latency in milliseconds across all queries.
5231
+ * @type number
4597
5232
  */
4598
- connection_string_copied: boolean;
5233
+ avg_ms: number;
4599
5234
  /**
4600
- * @description Whether the first query has been run through PgBeam.
4601
- * @type boolean
5235
+ * @description P99 latency in milliseconds across all queries.
5236
+ * @type number
4602
5237
  */
4603
- first_query_run: boolean;
5238
+ p99_ms: number;
5239
+ };
5240
+
5241
+ /**
5242
+ * Generated by Kubb (https://kubb.dev/).
5243
+ * Do not edit manually.
5244
+ */
5245
+ /**
5246
+ * @description Aggregated analytics for a normalized SQL query shape.
5247
+ * @type object
5248
+ */
5249
+ type QueryInsight = {
4604
5250
  /**
4605
- * @description Whether an agent credential has been issued.
4606
- * @type boolean
5251
+ * @description xxhash64 of the normalized SQL pattern (hex).
5252
+ * @type string
4607
5253
  */
4608
- agent_credential_created: boolean;
5254
+ query_hash: string;
4609
5255
  /**
4610
- * @description Whether the user has dismissed the onboarding checklist.
4611
- * @type boolean
5256
+ * @description Normalized SQL pattern (truncated to 500 chars).
5257
+ * @type string
4612
5258
  */
4613
- dismissed: boolean;
5259
+ query_pattern: string;
4614
5260
  /**
4615
- * @description Whether all onboarding steps are complete.
4616
- * @type boolean
5261
+ * @description Total number of executions in the time range.
5262
+ * @type integer
4617
5263
  */
4618
- completed: boolean;
5264
+ total_count: number;
4619
5265
  /**
4620
- * @description Number of completed onboarding steps.
5266
+ * @description Total cache hits attributed to the query shape.
4621
5267
  * @type integer
4622
5268
  */
4623
- steps_completed: number;
5269
+ total_cache_hits: number;
4624
5270
  /**
4625
- * @description Total number of onboarding steps.
5271
+ * @description Total cache misses attributed to the query shape.
4626
5272
  * @type integer
4627
5273
  */
4628
- steps_total: number;
5274
+ total_cache_misses: number;
4629
5275
  /**
4630
- * @description When onboarding was completed. Null if not yet completed.
4631
- * @type string
5276
+ * @description Average query latency in milliseconds.
5277
+ * @type number
4632
5278
  */
4633
- completed_at?: string | null;
5279
+ avg_latency_ms: number;
5280
+ /**
5281
+ * @description P99 query latency in milliseconds.
5282
+ * @type number
5283
+ */
5284
+ p99_latency_ms: number;
4634
5285
  };
4635
5286
 
4636
5287
  /**
@@ -4639,65 +5290,25 @@ type OnboardingProgress = {
4639
5290
  */
4640
5291
 
4641
5292
  /**
4642
- * @description Unique organization identifier.
4643
- * @pattern ^[a-zA-Z0-9_.-]+$
4644
- * @example org_abc123
4645
- * @type string
4646
- */
4647
- type GetOnboardingProgressPathOrgId = string;
4648
- /**
4649
- * @description Progress state for the dashboard onboarding checklist.
4650
- * @type object
4651
- */
4652
- type GetOnboardingProgressStatus200 = OnboardingProgress;
4653
- /**
5293
+ * @description Query insights, cache performance, and latency for a project.
4654
5294
  * @type object
4655
5295
  */
4656
- type GetOnboardingProgressRequestConfig = {
4657
- data?: never;
4658
- /**
4659
- * @type object
4660
- */
4661
- pathParams: {
4662
- org_id: GetOnboardingProgressPathOrgId;
4663
- };
4664
- queryParams?: never;
4665
- headerParams?: never;
5296
+ type ProjectInsights = {
4666
5297
  /**
4667
- * @type string
5298
+ * @description Top query shapes observed for the project.
5299
+ * @type array
4668
5300
  */
4669
- url: `/v1/organizations/${string}/onboarding`;
4670
- };
4671
-
4672
- /**
4673
- * Generated by Kubb (https://kubb.dev/).
4674
- * Do not edit manually.
4675
- */
4676
- declare const updateOnboardingRequestStepEnum: {
4677
- readonly project_created: "project_created";
4678
- readonly database_added: "database_added";
4679
- readonly connection_tested: "connection_tested";
4680
- readonly connection_string_copied: "connection_string_copied";
4681
- readonly first_query_run: "first_query_run";
4682
- readonly agent_credential_created: "agent_credential_created";
4683
- };
4684
- type UpdateOnboardingRequestStepEnumKey = (typeof updateOnboardingRequestStepEnum)[keyof typeof updateOnboardingRequestStepEnum];
4685
- /**
4686
- * @description Request body for advancing or dismissing onboarding.
4687
- * @type object
4688
- */
4689
- type UpdateOnboardingRequest = {
5301
+ queries: QueryInsight[];
4690
5302
  /**
4691
- * @description The onboarding step to mark as complete.
4692
- * @example project_created
4693
- * @type string | undefined
5303
+ * @description Aggregate cache performance metrics for the selected time range.
5304
+ * @type object
4694
5305
  */
4695
- step?: UpdateOnboardingRequestStepEnumKey;
5306
+ cache: CacheSummary;
4696
5307
  /**
4697
- * @description Set to true to dismiss the onboarding checklist.
4698
- * @type boolean | undefined
5308
+ * @description Aggregate latency metrics for the selected time range.
5309
+ * @type object
4699
5310
  */
4700
- dismiss?: boolean;
5311
+ latency: LatencySummary;
4701
5312
  };
4702
5313
 
4703
5314
  /**
@@ -4706,39 +5317,54 @@ type UpdateOnboardingRequest = {
4706
5317
  */
4707
5318
 
4708
5319
  /**
4709
- * @description Unique organization identifier.
5320
+ * @description Unique project identifier (prefixed, e.g. prj_xxx).
4710
5321
  * @pattern ^[a-zA-Z0-9_.-]+$
4711
- * @example org_abc123
4712
5322
  * @type string
4713
5323
  */
4714
- type UpdateOnboardingProgressPathOrgId = string;
5324
+ type GetProjectInsightsPathProjectId = string;
4715
5325
  /**
4716
- * @description Progress state for the dashboard onboarding checklist.
4717
- * @type object
5326
+ * @description Time range to query. Defaults to 24h.
5327
+ * @default "24h"
5328
+ * @example 24h
5329
+ * @type string | undefined
4718
5330
  */
4719
- type UpdateOnboardingProgressStatus200 = OnboardingProgress;
5331
+ type GetProjectInsightsQueryRange = ("1h" | "6h" | "24h" | "7d") | undefined;
4720
5332
  /**
4721
- * @description Request body for advancing or dismissing onboarding.
5333
+ * @description Maximum number of top queries to return (1-100).
5334
+ * @minLength 1
5335
+ * @maxLength 100
5336
+ * @default 20
5337
+ * @type integer | undefined
5338
+ */
5339
+ type GetProjectInsightsQueryLimit = number | undefined;
5340
+ /**
5341
+ * @description Query insights, cache performance, and latency for a project.
4722
5342
  * @type object
4723
5343
  */
4724
- type UpdateOnboardingProgressData = UpdateOnboardingRequest;
5344
+ type GetProjectInsightsStatus200 = ProjectInsights;
4725
5345
  /**
4726
5346
  * @type object
4727
5347
  */
4728
- type UpdateOnboardingProgressRequestConfig = {
4729
- data?: UpdateOnboardingProgressData;
5348
+ type GetProjectInsightsRequestConfig = {
5349
+ data?: never;
4730
5350
  /**
4731
5351
  * @type object
4732
5352
  */
4733
5353
  pathParams: {
4734
- org_id: UpdateOnboardingProgressPathOrgId;
5354
+ project_id: GetProjectInsightsPathProjectId;
5355
+ };
5356
+ /**
5357
+ * @type object | undefined
5358
+ */
5359
+ queryParams?: {
5360
+ range?: GetProjectInsightsQueryRange;
5361
+ limit?: GetProjectInsightsQueryLimit;
4735
5362
  };
4736
- queryParams?: never;
4737
5363
  headerParams?: never;
4738
5364
  /**
4739
5365
  * @type string
4740
5366
  */
4741
- url: `/v1/organizations/${string}/onboarding`;
5367
+ url: `/v1/projects/${string}/insights`;
4742
5368
  };
4743
5369
 
4744
5370
  /**
@@ -4746,326 +5372,269 @@ type UpdateOnboardingProgressRequestConfig = {
4746
5372
  * Do not edit manually.
4747
5373
  */
4748
5374
  /**
4749
- * @description An organization visible to the caller\'s credential.
5375
+ * @description A migration script to lint for unsafe schema changes.
4750
5376
  * @type object
4751
5377
  */
4752
- type OrganizationSummary = {
4753
- /**
4754
- * @description Organization identifier.
4755
- * @example org_abc123
4756
- * @type string
4757
- */
4758
- id: string;
4759
- /**
4760
- * @description Organization display name.
4761
- * @example Acme Corp
4762
- * @type string
4763
- */
4764
- name: string;
5378
+ type MigrationLintRequest = {
4765
5379
  /**
4766
- * @description Organization slug used in URLs and routing.
4767
- * @example acme-corp
5380
+ * @description The migration SQL to analyze. May contain multiple statements.
5381
+ * @minLength 1
5382
+ * @maxLength 1048576
4768
5383
  * @type string
4769
5384
  */
4770
- slug: string;
5385
+ sql: string;
4771
5386
  /**
4772
- * @description The caller\'s role within the organization. Omitted for organization-scoped API keys, which act as the organization itself rather than as a member.
4773
- * @example owner
5387
+ * @description Optional database to scope the lint to.
4774
5388
  * @type string | undefined
4775
5389
  */
4776
- role?: string;
4777
- };
4778
-
4779
- /**
4780
- * Generated by Kubb (https://kubb.dev/).
4781
- * Do not edit manually.
4782
- */
4783
-
4784
- /**
4785
- * @description Organizations visible to the caller\'s credential.
4786
- * @type object
4787
- */
4788
- type ListOrganizationsResponse = {
4789
- /**
4790
- * @description Organizations the caller can access.
4791
- * @type array
4792
- */
4793
- organizations: OrganizationSummary[];
5390
+ database_id?: string;
4794
5391
  };
4795
5392
 
4796
5393
  /**
4797
5394
  * Generated by Kubb (https://kubb.dev/).
4798
5395
  * Do not edit manually.
4799
5396
  */
4800
-
4801
- /**
4802
- * @description Organizations visible to the caller\'s credential.
4803
- * @type object
4804
- */
4805
- type ListOrganizationsStatus200 = ListOrganizationsResponse;
4806
-
4807
- /**
4808
- * Generated by Kubb (https://kubb.dev/).
4809
- * Do not edit manually.
4810
- */
4811
- declare const maskingRuleKindEnum: {
4812
- readonly redact: "redact";
4813
- readonly null: "null";
4814
- readonly hash: "hash";
5397
+ declare const migrationFindingSeverityEnum: {
5398
+ readonly info: "info";
5399
+ readonly warning: "warning";
5400
+ readonly error: "error";
4815
5401
  };
4816
- type MaskingRuleKindEnumKey = (typeof maskingRuleKindEnum)[keyof typeof maskingRuleKindEnum];
5402
+ type MigrationFindingSeverityEnumKey = (typeof migrationFindingSeverityEnum)[keyof typeof migrationFindingSeverityEnum];
4817
5403
  /**
4818
- * @description A column masking rule applied to agent query results.
5404
+ * @description A single issue found while linting a migration.
4819
5405
  * @type object
4820
5406
  */
4821
- type MaskingRule = {
5407
+ type MigrationFinding = {
4822
5408
  /**
4823
- * @description Relation name, optionally schema-qualified (e.g. \"public.users\" or \"users\").
4824
- * @example users
5409
+ * @description How serious the finding is. error indicates an unsafe change.
4825
5410
  * @type string
4826
5411
  */
4827
- table: string;
5412
+ severity: MigrationFindingSeverityEnumKey;
4828
5413
  /**
4829
- * @description Column to mask.
4830
- * @example email
5414
+ * @description Machine-readable rule identifier (e.g. drop_table, add_not_null_no_default).
4831
5415
  * @type string
4832
5416
  */
4833
- column: string;
5417
+ rule: string;
4834
5418
  /**
4835
- * @description How to mask. redact replaces with a token, null returns NULL, hash returns a SHA-256 hex.
5419
+ * @description Human-readable description of the issue.
4836
5420
  * @type string
4837
5421
  */
4838
- kind: MaskingRuleKindEnumKey;
5422
+ message: string;
5423
+ /**
5424
+ * @description The statement that triggered the finding.
5425
+ * @type string | undefined
5426
+ */
5427
+ statement?: string;
5428
+ /**
5429
+ * @description Suggested safer alternative, if any.
5430
+ * @type string | undefined
5431
+ */
5432
+ hint?: string;
4839
5433
  };
4840
5434
 
4841
5435
  /**
4842
5436
  * Generated by Kubb (https://kubb.dev/).
4843
5437
  * Do not edit manually.
4844
5438
  */
5439
+
4845
5440
  /**
4846
- * @description A per-relation row filter. The predicate is a raw SQL boolean expression ANDed into the WHERE clause for the matching relation.
5441
+ * @description Result of linting a migration script.
4847
5442
  * @type object
4848
5443
  */
4849
- type RowFilter = {
5444
+ type MigrationLintResponse = {
4850
5445
  /**
4851
- * @description Relation name, optionally schema-qualified (e.g. \"public.orders\").
4852
- * @example orders
4853
- * @type string
5446
+ * @description True when no error-severity findings were detected.
5447
+ * @type boolean
4854
5448
  */
4855
- table: string;
5449
+ safe: boolean;
4856
5450
  /**
4857
- * @description Raw SQL boolean expression ANDed into WHERE for this relation.
4858
- * @example tenant_id = current_setting('pgbeam.tenant')
4859
- * @type string
5451
+ * @description Findings detected across all statements.
5452
+ * @type array
4860
5453
  */
4861
- predicate: string;
5454
+ findings: MigrationFinding[];
4862
5455
  };
4863
5456
 
4864
5457
  /**
4865
5458
  * Generated by Kubb (https://kubb.dev/).
4866
5459
  * Do not edit manually.
4867
5460
  */
5461
+
4868
5462
  /**
4869
- * @description Per-statement-kind allow/deny lists. Empty allow means all kinds permitted by the access mode.
5463
+ * @description Unique project identifier (prefixed, e.g. prj_xxx).
5464
+ * @pattern ^[a-zA-Z0-9_.-]+$
5465
+ * @type string
5466
+ */
5467
+ type LintMigrationPathProjectId = string;
5468
+ /**
5469
+ * @description Result of linting a migration script.
4870
5470
  * @type object
4871
5471
  */
4872
- type StatementRules = {
5472
+ type LintMigrationStatus200 = MigrationLintResponse;
5473
+ /**
5474
+ * @description A migration script to lint for unsafe schema changes.
5475
+ * @type object
5476
+ */
5477
+ type LintMigrationData = MigrationLintRequest;
5478
+ /**
5479
+ * @type object
5480
+ */
5481
+ type LintMigrationRequestConfig = {
5482
+ data?: LintMigrationData;
4873
5483
  /**
4874
- * @description Allowed statement kinds (select, insert, update, delete, ddl, copy, set, show, explain, transaction).
4875
- * @type array | undefined
5484
+ * @type object
4876
5485
  */
4877
- allow?: string[];
5486
+ pathParams: {
5487
+ project_id: LintMigrationPathProjectId;
5488
+ };
5489
+ queryParams?: never;
5490
+ headerParams?: never;
4878
5491
  /**
4879
- * @description Denied statement kinds (takes precedence over allow).
4880
- * @type array | undefined
5492
+ * @type string
4881
5493
  */
4882
- deny?: string[];
5494
+ url: `/v1/projects/${string}/migrations${string}`;
4883
5495
  };
4884
5496
 
4885
5497
  /**
4886
5498
  * Generated by Kubb (https://kubb.dev/).
4887
5499
  * Do not edit manually.
4888
5500
  */
4889
-
4890
- declare const policyProfileAccessModeEnum: {
4891
- readonly read_only: "read_only";
4892
- readonly read_write: "read_write";
4893
- };
4894
- type PolicyProfileAccessModeEnumKey = (typeof policyProfileAccessModeEnum)[keyof typeof policyProfileAccessModeEnum];
4895
- declare const policyProfileWriteModeEnum: {
4896
- readonly normal: "normal";
4897
- readonly rollback: "rollback";
4898
- readonly sandbox: "sandbox";
4899
- };
4900
- type PolicyProfileWriteModeEnumKey = (typeof policyProfileWriteModeEnum)[keyof typeof policyProfileWriteModeEnum];
4901
- declare const policyProfileApprovalModeEnum: {
4902
- readonly off: "off";
4903
- readonly writes: "writes";
4904
- readonly ddl: "ddl";
4905
- readonly all: "all";
4906
- };
4907
- type PolicyProfileApprovalModeEnumKey = (typeof policyProfileApprovalModeEnum)[keyof typeof policyProfileApprovalModeEnum];
4908
- declare const policyProfileMigrationSafetyEnum: {
4909
- readonly off: "off";
4910
- readonly warn: "warn";
4911
- readonly block: "block";
4912
- };
4913
- type PolicyProfileMigrationSafetyEnumKey = (typeof policyProfileMigrationSafetyEnum)[keyof typeof policyProfileMigrationSafetyEnum];
4914
5501
  /**
4915
- * @description A named bundle of rules enforced on agent credentials in the data plane.
5502
+ * @description Progress state for the dashboard onboarding checklist.
4916
5503
  * @type object
4917
5504
  */
4918
- type PolicyProfile = {
4919
- /**
4920
- * @description Unique policy profile identifier (prefixed).
4921
- * @example pol_01h455vb4pex5vsknk084sn02q
4922
- * @type string
4923
- */
4924
- id: string;
4925
- /**
4926
- * @description Owning project ID.
4927
- * @example prj_01h455vb4pex5vsknk084sn02q
4928
- * @type string
4929
- */
4930
- project_id: string;
4931
- /**
4932
- * @description Human-readable name for the policy profile.
4933
- * @example Read-only analytics
4934
- * @type string
4935
- */
4936
- name: string;
4937
- /**
4938
- * @description read_only blocks all data and schema mutations.
4939
- * @type string
4940
- */
4941
- access_mode: PolicyProfileAccessModeEnumKey;
4942
- /**
4943
- * @description Per-statement-kind allow/deny lists. Empty allow means all kinds permitted by the access mode.
4944
- * @type object | undefined
4945
- */
4946
- statement_rules?: StatementRules;
4947
- /**
4948
- * @description If non-empty, only these relations are reachable. Schema-qualified or bare names.
4949
- * @type array
4950
- */
4951
- table_allowlist: string[];
4952
- /**
4953
- * @description Relations explicitly blocked (takes precedence over the allowlist).
4954
- * @type array
4955
- */
4956
- table_denylist: string[];
5505
+ type OnboardingProgress = {
4957
5506
  /**
4958
- * @description Column masking rules applied to query results.
4959
- * @type array
5507
+ * @description Organization ID this onboarding belongs to.
5508
+ * @type string
4960
5509
  */
4961
- masking_rules: MaskingRule[];
5510
+ organization_id: string;
4962
5511
  /**
4963
- * @description Max queries per rolling hour window. 0 means unlimited.
4964
- * @default 0
4965
- * @type integer | undefined
5512
+ * @description Whether the organization has been created.
5513
+ * @type boolean
4966
5514
  */
4967
- budget_queries_per_hour?: number;
5515
+ org_created: boolean;
4968
5516
  /**
4969
- * @description Max queries per day window. 0 means unlimited.
4970
- * @default 0
4971
- * @type integer | undefined
5517
+ * @description Whether a project has been created.
5518
+ * @type boolean
4972
5519
  */
4973
- budget_queries_per_day?: number;
5520
+ project_created: boolean;
4974
5521
  /**
4975
- * @description Max rows returned per query. 0 means unlimited.
4976
- * @default 0
4977
- * @type integer | undefined
5522
+ * @description Whether a database has been added.
5523
+ * @type boolean
4978
5524
  */
4979
- max_rows?: number;
5525
+ database_added: boolean;
4980
5526
  /**
4981
- * @description Upstream statement timeout for agent sessions. 0 uses the project default.
4982
- * @default 0
4983
- * @type integer | undefined
5527
+ * @description Whether the database connection has been tested.
5528
+ * @type boolean
4984
5529
  */
4985
- statement_timeout_ms?: number;
5530
+ connection_tested: boolean;
4986
5531
  /**
4987
- * @description Per-relation row filters ANDed into agent reads.
4988
- * @type array | undefined
5532
+ * @description Whether the connection string has been copied.
5533
+ * @type boolean
4989
5534
  */
4990
- row_filters?: RowFilter[];
5535
+ connection_string_copied: boolean;
4991
5536
  /**
4992
- * @description How writes are handled. normal commits, rollback auto-rolls back, sandbox routes to an ephemeral branch.
4993
- * @default "normal"
4994
- * @type string | undefined
5537
+ * @description Whether the first query has been run through PgBeam.
5538
+ * @type boolean
4995
5539
  */
4996
- write_mode?: PolicyProfileWriteModeEnumKey;
5540
+ first_query_run: boolean;
4997
5541
  /**
4998
- * @description Which statement classes require human approval before execution.
4999
- * @default "off"
5000
- * @type string | undefined
5542
+ * @description Whether an agent credential has been issued.
5543
+ * @type boolean
5001
5544
  */
5002
- approval_mode?: PolicyProfileApprovalModeEnumKey;
5545
+ agent_credential_created: boolean;
5003
5546
  /**
5004
- * @description Statements touching at most this many rows are auto-approved. 0 means none.
5005
- * @minLength 0
5006
- * @default 0
5007
- * @type integer | undefined
5547
+ * @description Whether the user has dismissed the onboarding checklist.
5548
+ * @type boolean
5008
5549
  */
5009
- approval_auto_max_rows?: number;
5550
+ dismissed: boolean;
5010
5551
  /**
5011
- * @description How long a held statement waits for a decision before expiring.
5012
- * @minLength 0
5013
- * @default 300
5014
- * @type integer | undefined
5552
+ * @description Whether all onboarding steps are complete.
5553
+ * @type boolean
5015
5554
  */
5016
- approval_timeout_seconds?: number;
5555
+ completed: boolean;
5017
5556
  /**
5018
- * @description Migration safety mode. warn surfaces findings, block refuses unsafe DDL.
5019
- * @default "off"
5020
- * @type string | undefined
5557
+ * @description Number of completed onboarding steps.
5558
+ * @type integer
5021
5559
  */
5022
- migration_safety?: PolicyProfileMigrationSafetyEnumKey;
5560
+ steps_completed: number;
5023
5561
  /**
5024
- * @description Per-day egress budget in bytes. 0 means unlimited.
5025
- * @minLength 0
5026
- * @default 0
5027
- * @type integer | undefined
5562
+ * @description Total number of onboarding steps.
5563
+ * @type integer
5028
5564
  */
5029
- egress_bytes_per_day?: number;
5565
+ steps_total: number;
5030
5566
  /**
5031
- * @description Hard cap on rows a single write (INSERT/UPDATE/DELETE) may affect. A write whose affected-row count would exceed this is executed inside a transaction, checked, and rolled back so nothing persists, then blocked. Enforced independently of human approval. 0 means unlimited.
5032
- * @minLength 0
5033
- * @default 0
5034
- * @type integer | undefined
5567
+ * @description When onboarding was completed. Null if not yet completed.
5568
+ * @type string
5035
5569
  */
5036
- max_affected_rows?: number;
5570
+ completed_at?: string | null;
5571
+ };
5572
+
5573
+ /**
5574
+ * Generated by Kubb (https://kubb.dev/).
5575
+ * Do not edit manually.
5576
+ */
5577
+
5578
+ /**
5579
+ * @description Unique organization identifier.
5580
+ * @pattern ^[a-zA-Z0-9_.-]+$
5581
+ * @example org_abc123
5582
+ * @type string
5583
+ */
5584
+ type GetOnboardingProgressPathOrgId = string;
5585
+ /**
5586
+ * @description Progress state for the dashboard onboarding checklist.
5587
+ * @type object
5588
+ */
5589
+ type GetOnboardingProgressStatus200 = OnboardingProgress;
5590
+ /**
5591
+ * @type object
5592
+ */
5593
+ type GetOnboardingProgressRequestConfig = {
5594
+ data?: never;
5037
5595
  /**
5038
- * @description When the policy profile was created.
5039
- * @type string
5596
+ * @type object
5040
5597
  */
5041
- created_at: string;
5598
+ pathParams: {
5599
+ org_id: GetOnboardingProgressPathOrgId;
5600
+ };
5601
+ queryParams?: never;
5602
+ headerParams?: never;
5042
5603
  /**
5043
- * @description When the policy profile was last updated.
5044
5604
  * @type string
5045
5605
  */
5046
- updated_at: string;
5606
+ url: `/v1/organizations/${string}/onboarding`;
5047
5607
  };
5048
5608
 
5049
5609
  /**
5050
5610
  * Generated by Kubb (https://kubb.dev/).
5051
5611
  * Do not edit manually.
5052
5612
  */
5053
-
5613
+ declare const updateOnboardingRequestStepEnum: {
5614
+ readonly project_created: "project_created";
5615
+ readonly database_added: "database_added";
5616
+ readonly connection_tested: "connection_tested";
5617
+ readonly connection_string_copied: "connection_string_copied";
5618
+ readonly first_query_run: "first_query_run";
5619
+ readonly agent_credential_created: "agent_credential_created";
5620
+ };
5621
+ type UpdateOnboardingRequestStepEnumKey = (typeof updateOnboardingRequestStepEnum)[keyof typeof updateOnboardingRequestStepEnum];
5054
5622
  /**
5055
- * @description Cursor-paginated list of policy profiles for a project.
5623
+ * @description Request body for advancing or dismissing onboarding.
5056
5624
  * @type object
5057
5625
  */
5058
- type ListPolicyProfilesResponse = {
5626
+ type UpdateOnboardingRequest = {
5059
5627
  /**
5060
- * @description Policy profiles on the current page.
5061
- * @type array
5628
+ * @description The onboarding step to mark as complete.
5629
+ * @example project_created
5630
+ * @type string | undefined
5062
5631
  */
5063
- policies: PolicyProfile[];
5632
+ step?: UpdateOnboardingRequestStepEnumKey;
5064
5633
  /**
5065
- * @description Token for the next page. Empty if no more results.
5066
- * @type string | undefined
5634
+ * @description Set to true to dismiss the onboarding checklist.
5635
+ * @type boolean | undefined
5067
5636
  */
5068
- next_page_token?: string;
5637
+ dismiss?: boolean;
5069
5638
  };
5070
5639
 
5071
5640
  /**
@@ -5074,53 +5643,91 @@ type ListPolicyProfilesResponse = {
5074
5643
  */
5075
5644
 
5076
5645
  /**
5077
- * @description Unique project identifier (prefixed, e.g. prj_xxx).
5646
+ * @description Unique organization identifier.
5078
5647
  * @pattern ^[a-zA-Z0-9_.-]+$
5648
+ * @example org_abc123
5079
5649
  * @type string
5080
5650
  */
5081
- type ListPolicyProfilesPathProjectId = string;
5082
- /**
5083
- * @description Maximum number of items to return (1-100, default 20).
5084
- * @minLength 1
5085
- * @maxLength 100
5086
- * @default 20
5087
- * @type integer | undefined
5088
- */
5089
- type ListPolicyProfilesQueryPageSize = number | undefined;
5651
+ type UpdateOnboardingProgressPathOrgId = string;
5090
5652
  /**
5091
- * @description Opaque token for cursor-based pagination.
5092
- * @pattern ^[a-zA-Z0-9_.-]+$
5093
- * @type string | undefined
5653
+ * @description Progress state for the dashboard onboarding checklist.
5654
+ * @type object
5094
5655
  */
5095
- type ListPolicyProfilesQueryPageToken = string | undefined;
5656
+ type UpdateOnboardingProgressStatus200 = OnboardingProgress;
5096
5657
  /**
5097
- * @description Cursor-paginated list of policy profiles for a project.
5658
+ * @description Request body for advancing or dismissing onboarding.
5098
5659
  * @type object
5099
5660
  */
5100
- type ListPolicyProfilesStatus200 = ListPolicyProfilesResponse;
5661
+ type UpdateOnboardingProgressData = UpdateOnboardingRequest;
5101
5662
  /**
5102
5663
  * @type object
5103
5664
  */
5104
- type ListPolicyProfilesRequestConfig = {
5105
- data?: never;
5665
+ type UpdateOnboardingProgressRequestConfig = {
5666
+ data?: UpdateOnboardingProgressData;
5106
5667
  /**
5107
5668
  * @type object
5108
5669
  */
5109
5670
  pathParams: {
5110
- project_id: ListPolicyProfilesPathProjectId;
5671
+ org_id: UpdateOnboardingProgressPathOrgId;
5111
5672
  };
5673
+ queryParams?: never;
5674
+ headerParams?: never;
5112
5675
  /**
5113
- * @type object | undefined
5676
+ * @type string
5114
5677
  */
5115
- queryParams?: {
5116
- page_size?: ListPolicyProfilesQueryPageSize;
5117
- page_token?: ListPolicyProfilesQueryPageToken;
5118
- };
5119
- headerParams?: never;
5678
+ url: `/v1/organizations/${string}/onboarding`;
5679
+ };
5680
+
5681
+ /**
5682
+ * Generated by Kubb (https://kubb.dev/).
5683
+ * Do not edit manually.
5684
+ */
5685
+ /**
5686
+ * @description An organization visible to the caller\'s credential.
5687
+ * @type object
5688
+ */
5689
+ type OrganizationSummary = {
5120
5690
  /**
5691
+ * @description Organization identifier.
5692
+ * @example org_abc123
5121
5693
  * @type string
5122
5694
  */
5123
- url: `/v1/projects/${string}/policies`;
5695
+ id: string;
5696
+ /**
5697
+ * @description Organization display name.
5698
+ * @example Acme Corp
5699
+ * @type string
5700
+ */
5701
+ name: string;
5702
+ /**
5703
+ * @description Organization slug used in URLs and routing.
5704
+ * @example acme-corp
5705
+ * @type string
5706
+ */
5707
+ slug: string;
5708
+ /**
5709
+ * @description The caller\'s role within the organization. Omitted for organization-scoped API keys, which act as the organization itself rather than as a member.
5710
+ * @example owner
5711
+ * @type string | undefined
5712
+ */
5713
+ role?: string;
5714
+ };
5715
+
5716
+ /**
5717
+ * Generated by Kubb (https://kubb.dev/).
5718
+ * Do not edit manually.
5719
+ */
5720
+
5721
+ /**
5722
+ * @description Organizations visible to the caller\'s credential.
5723
+ * @type object
5724
+ */
5725
+ type ListOrganizationsResponse = {
5726
+ /**
5727
+ * @description Organizations the caller can access.
5728
+ * @type array
5729
+ */
5730
+ organizations: OrganizationSummary[];
5124
5731
  };
5125
5732
 
5126
5733
  /**
@@ -5128,92 +5735,109 @@ type ListPolicyProfilesRequestConfig = {
5128
5735
  * Do not edit manually.
5129
5736
  */
5130
5737
 
5131
- declare const policyProfileInputAccessModeEnum: {
5738
+ /**
5739
+ * @description Organizations visible to the caller\'s credential.
5740
+ * @type object
5741
+ */
5742
+ type ListOrganizationsStatus200 = ListOrganizationsResponse;
5743
+
5744
+ /**
5745
+ * Generated by Kubb (https://kubb.dev/).
5746
+ * Do not edit manually.
5747
+ */
5748
+
5749
+ declare const policyProfileAccessModeEnum: {
5132
5750
  readonly read_only: "read_only";
5133
5751
  readonly read_write: "read_write";
5134
5752
  };
5135
- type PolicyProfileInputAccessModeEnumKey = (typeof policyProfileInputAccessModeEnum)[keyof typeof policyProfileInputAccessModeEnum];
5136
- declare const policyProfileInputWriteModeEnum: {
5753
+ type PolicyProfileAccessModeEnumKey = (typeof policyProfileAccessModeEnum)[keyof typeof policyProfileAccessModeEnum];
5754
+ declare const policyProfileWriteModeEnum: {
5137
5755
  readonly normal: "normal";
5138
5756
  readonly rollback: "rollback";
5139
5757
  readonly sandbox: "sandbox";
5140
5758
  };
5141
- type PolicyProfileInputWriteModeEnumKey = (typeof policyProfileInputWriteModeEnum)[keyof typeof policyProfileInputWriteModeEnum];
5142
- declare const policyProfileInputApprovalModeEnum: {
5759
+ type PolicyProfileWriteModeEnumKey = (typeof policyProfileWriteModeEnum)[keyof typeof policyProfileWriteModeEnum];
5760
+ declare const policyProfileApprovalModeEnum: {
5143
5761
  readonly off: "off";
5144
5762
  readonly writes: "writes";
5145
5763
  readonly ddl: "ddl";
5146
5764
  readonly all: "all";
5147
5765
  };
5148
- type PolicyProfileInputApprovalModeEnumKey = (typeof policyProfileInputApprovalModeEnum)[keyof typeof policyProfileInputApprovalModeEnum];
5149
- declare const policyProfileInputMigrationSafetyEnum: {
5766
+ type PolicyProfileApprovalModeEnumKey = (typeof policyProfileApprovalModeEnum)[keyof typeof policyProfileApprovalModeEnum];
5767
+ declare const policyProfileMigrationSafetyEnum: {
5150
5768
  readonly off: "off";
5151
5769
  readonly warn: "warn";
5152
5770
  readonly block: "block";
5153
5771
  };
5154
- type PolicyProfileInputMigrationSafetyEnumKey = (typeof policyProfileInputMigrationSafetyEnum)[keyof typeof policyProfileInputMigrationSafetyEnum];
5772
+ type PolicyProfileMigrationSafetyEnumKey = (typeof policyProfileMigrationSafetyEnum)[keyof typeof policyProfileMigrationSafetyEnum];
5155
5773
  /**
5156
- * @description Mutable fields of a policy profile (used for create and update).
5774
+ * @description A named bundle of rules enforced on agent credentials in the data plane.
5157
5775
  * @type object
5158
5776
  */
5159
- type PolicyProfileInput = {
5777
+ type PolicyProfile = {
5778
+ /**
5779
+ * @description Unique policy profile identifier (prefixed).
5780
+ * @example pol_01h455vb4pex5vsknk084sn02q
5781
+ * @type string
5782
+ */
5783
+ id: string;
5784
+ /**
5785
+ * @description Owning project ID.
5786
+ * @example prj_01h455vb4pex5vsknk084sn02q
5787
+ * @type string
5788
+ */
5789
+ project_id: string;
5160
5790
  /**
5161
5791
  * @description Human-readable name for the policy profile.
5162
- * @minLength 1
5163
- * @maxLength 128
5792
+ * @example Read-only analytics
5164
5793
  * @type string
5165
5794
  */
5166
5795
  name: string;
5167
5796
  /**
5168
5797
  * @description read_only blocks all data and schema mutations.
5169
- * @default "read_only"
5170
- * @type string | undefined
5798
+ * @type string
5171
5799
  */
5172
- access_mode?: PolicyProfileInputAccessModeEnumKey;
5800
+ access_mode: PolicyProfileAccessModeEnumKey;
5173
5801
  /**
5174
5802
  * @description Per-statement-kind allow/deny lists. Empty allow means all kinds permitted by the access mode.
5175
5803
  * @type object | undefined
5176
5804
  */
5177
5805
  statement_rules?: StatementRules;
5178
5806
  /**
5179
- * @description If non-empty, only these relations are reachable.
5180
- * @type array | undefined
5807
+ * @description If non-empty, only these relations are reachable. Schema-qualified or bare names.
5808
+ * @type array
5181
5809
  */
5182
- table_allowlist?: string[];
5810
+ table_allowlist: string[];
5183
5811
  /**
5184
- * @description Relations explicitly blocked.
5185
- * @type array | undefined
5812
+ * @description Relations explicitly blocked (takes precedence over the allowlist).
5813
+ * @type array
5186
5814
  */
5187
- table_denylist?: string[];
5815
+ table_denylist: string[];
5188
5816
  /**
5189
5817
  * @description Column masking rules applied to query results.
5190
- * @type array | undefined
5818
+ * @type array
5191
5819
  */
5192
- masking_rules?: MaskingRule[];
5820
+ masking_rules: MaskingRule[];
5193
5821
  /**
5194
5822
  * @description Max queries per rolling hour window. 0 means unlimited.
5195
- * @minLength 0
5196
5823
  * @default 0
5197
5824
  * @type integer | undefined
5198
5825
  */
5199
5826
  budget_queries_per_hour?: number;
5200
5827
  /**
5201
5828
  * @description Max queries per day window. 0 means unlimited.
5202
- * @minLength 0
5203
5829
  * @default 0
5204
5830
  * @type integer | undefined
5205
5831
  */
5206
5832
  budget_queries_per_day?: number;
5207
5833
  /**
5208
5834
  * @description Max rows returned per query. 0 means unlimited.
5209
- * @minLength 0
5210
5835
  * @default 0
5211
5836
  * @type integer | undefined
5212
5837
  */
5213
5838
  max_rows?: number;
5214
5839
  /**
5215
5840
  * @description Upstream statement timeout for agent sessions. 0 uses the project default.
5216
- * @minLength 0
5217
5841
  * @default 0
5218
5842
  * @type integer | undefined
5219
5843
  */
@@ -5228,13 +5852,13 @@ type PolicyProfileInput = {
5228
5852
  * @default "normal"
5229
5853
  * @type string | undefined
5230
5854
  */
5231
- write_mode?: PolicyProfileInputWriteModeEnumKey;
5855
+ write_mode?: PolicyProfileWriteModeEnumKey;
5232
5856
  /**
5233
5857
  * @description Which statement classes require human approval before execution.
5234
5858
  * @default "off"
5235
5859
  * @type string | undefined
5236
5860
  */
5237
- approval_mode?: PolicyProfileInputApprovalModeEnumKey;
5861
+ approval_mode?: PolicyProfileApprovalModeEnumKey;
5238
5862
  /**
5239
5863
  * @description Statements touching at most this many rows are auto-approved. 0 means none.
5240
5864
  * @minLength 0
@@ -5254,7 +5878,7 @@ type PolicyProfileInput = {
5254
5878
  * @default "off"
5255
5879
  * @type string | undefined
5256
5880
  */
5257
- migration_safety?: PolicyProfileInputMigrationSafetyEnumKey;
5881
+ migration_safety?: PolicyProfileMigrationSafetyEnumKey;
5258
5882
  /**
5259
5883
  * @description Per-day egress budget in bytes. 0 means unlimited.
5260
5884
  * @minLength 0
@@ -5269,88 +5893,16 @@ type PolicyProfileInput = {
5269
5893
  * @type integer | undefined
5270
5894
  */
5271
5895
  max_affected_rows?: number;
5272
- };
5273
-
5274
- /**
5275
- * Generated by Kubb (https://kubb.dev/).
5276
- * Do not edit manually.
5277
- */
5278
-
5279
- /**
5280
- * @description Unique project identifier (prefixed, e.g. prj_xxx).
5281
- * @pattern ^[a-zA-Z0-9_.-]+$
5282
- * @type string
5283
- */
5284
- type CreatePolicyProfilePathProjectId = string;
5285
- /**
5286
- * @description A named bundle of rules enforced on agent credentials in the data plane.
5287
- * @type object
5288
- */
5289
- type CreatePolicyProfileStatus201 = PolicyProfile;
5290
- /**
5291
- * @description Mutable fields of a policy profile (used for create and update).
5292
- * @type object
5293
- */
5294
- type CreatePolicyProfileData = PolicyProfileInput;
5295
- /**
5296
- * @type object
5297
- */
5298
- type CreatePolicyProfileRequestConfig = {
5299
- data?: CreatePolicyProfileData;
5300
- /**
5301
- * @type object
5302
- */
5303
- pathParams: {
5304
- project_id: CreatePolicyProfilePathProjectId;
5305
- };
5306
- queryParams?: never;
5307
- headerParams?: never;
5308
5896
  /**
5897
+ * @description When the policy profile was created.
5309
5898
  * @type string
5310
5899
  */
5311
- url: `/v1/projects/${string}/policies`;
5312
- };
5313
-
5314
- /**
5315
- * Generated by Kubb (https://kubb.dev/).
5316
- * Do not edit manually.
5317
- */
5318
-
5319
- /**
5320
- * @description Unique project identifier (prefixed, e.g. prj_xxx).
5321
- * @pattern ^[a-zA-Z0-9_.-]+$
5322
- * @type string
5323
- */
5324
- type GetPolicyProfilePathProjectId = string;
5325
- /**
5326
- * @description Unique policy profile identifier (prefixed, e.g. pol_xxx).
5327
- * @pattern ^[a-zA-Z0-9_.-]+$
5328
- * @type string
5329
- */
5330
- type GetPolicyProfilePathPolicyId = string;
5331
- /**
5332
- * @description A named bundle of rules enforced on agent credentials in the data plane.
5333
- * @type object
5334
- */
5335
- type GetPolicyProfileStatus200 = PolicyProfile;
5336
- /**
5337
- * @type object
5338
- */
5339
- type GetPolicyProfileRequestConfig = {
5340
- data?: never;
5341
- /**
5342
- * @type object
5343
- */
5344
- pathParams: {
5345
- project_id: GetPolicyProfilePathProjectId;
5346
- policy_id: GetPolicyProfilePathPolicyId;
5347
- };
5348
- queryParams?: never;
5349
- headerParams?: never;
5900
+ created_at: string;
5350
5901
  /**
5902
+ * @description When the policy profile was last updated.
5351
5903
  * @type string
5352
5904
  */
5353
- url: `/v1/projects/${string}/policies/${string}`;
5905
+ updated_at: string;
5354
5906
  };
5355
5907
 
5356
5908
  /**
@@ -5359,45 +5911,20 @@ type GetPolicyProfileRequestConfig = {
5359
5911
  */
5360
5912
 
5361
5913
  /**
5362
- * @description Unique project identifier (prefixed, e.g. prj_xxx).
5363
- * @pattern ^[a-zA-Z0-9_.-]+$
5364
- * @type string
5365
- */
5366
- type UpdatePolicyProfilePathProjectId = string;
5367
- /**
5368
- * @description Unique policy profile identifier (prefixed, e.g. pol_xxx).
5369
- * @pattern ^[a-zA-Z0-9_.-]+$
5370
- * @type string
5371
- */
5372
- type UpdatePolicyProfilePathPolicyId = string;
5373
- /**
5374
- * @description A named bundle of rules enforced on agent credentials in the data plane.
5375
- * @type object
5376
- */
5377
- type UpdatePolicyProfileStatus200 = PolicyProfile;
5378
- /**
5379
- * @description Mutable fields of a policy profile (used for create and update).
5380
- * @type object
5381
- */
5382
- type UpdatePolicyProfileData = PolicyProfileInput;
5383
- /**
5914
+ * @description Cursor-paginated list of policy profiles for a project.
5384
5915
  * @type object
5385
5916
  */
5386
- type UpdatePolicyProfileRequestConfig = {
5387
- data?: UpdatePolicyProfileData;
5917
+ type ListPolicyProfilesResponse = {
5388
5918
  /**
5389
- * @type object
5919
+ * @description Policy profiles on the current page.
5920
+ * @type array
5390
5921
  */
5391
- pathParams: {
5392
- project_id: UpdatePolicyProfilePathProjectId;
5393
- policy_id: UpdatePolicyProfilePathPolicyId;
5394
- };
5395
- queryParams?: never;
5396
- headerParams?: never;
5922
+ policies: PolicyProfile[];
5397
5923
  /**
5398
- * @type string
5924
+ * @description Token for the next page. Empty if no more results.
5925
+ * @type string | undefined
5399
5926
  */
5400
- url: `/v1/projects/${string}/policies/${string}`;
5927
+ next_page_token?: string;
5401
5928
  };
5402
5929
 
5403
5930
  /**
@@ -5410,90 +5937,49 @@ type UpdatePolicyProfileRequestConfig = {
5410
5937
  * @pattern ^[a-zA-Z0-9_.-]+$
5411
5938
  * @type string
5412
5939
  */
5413
- type DeletePolicyProfilePathProjectId = string;
5414
- /**
5415
- * @description Unique policy profile identifier (prefixed, e.g. pol_xxx).
5416
- * @pattern ^[a-zA-Z0-9_.-]+$
5417
- * @type string
5418
- */
5419
- type DeletePolicyProfilePathPolicyId = string;
5940
+ type ListPolicyProfilesPathProjectId = string;
5420
5941
  /**
5421
- * @type object
5942
+ * @description Maximum number of items to return (1-100, default 20).
5943
+ * @minLength 1
5944
+ * @maxLength 100
5945
+ * @default 20
5946
+ * @type integer | undefined
5422
5947
  */
5423
- type DeletePolicyProfileRequestConfig = {
5424
- data?: never;
5425
- /**
5426
- * @type object
5427
- */
5428
- pathParams: {
5429
- project_id: DeletePolicyProfilePathProjectId;
5430
- policy_id: DeletePolicyProfilePathPolicyId;
5431
- };
5432
- queryParams?: never;
5433
- headerParams?: never;
5434
- /**
5435
- * @type string
5436
- */
5437
- url: `/v1/projects/${string}/policies/${string}`;
5438
- };
5439
-
5948
+ type ListPolicyProfilesQueryPageSize = number | undefined;
5440
5949
  /**
5441
- * Generated by Kubb (https://kubb.dev/).
5442
- * Do not edit manually.
5950
+ * @description Opaque token for cursor-based pagination.
5951
+ * @pattern ^[a-zA-Z0-9_.-]+$
5952
+ * @type string | undefined
5443
5953
  */
5444
-
5954
+ type ListPolicyProfilesQueryPageToken = string | undefined;
5445
5955
  /**
5446
- * @description A SQL statement to test plus the policy to test it against. Supply exactly one of policy_id (an existing saved policy) or policy (an unsaved draft, e.g. the in-progress editor form).
5956
+ * @description Cursor-paginated list of policy profiles for a project.
5447
5957
  * @type object
5448
5958
  */
5449
- type DryEvalInput = {
5450
- /**
5451
- * @description The single SQL statement to evaluate.
5452
- * @minLength 1
5453
- * @maxLength 100000
5454
- * @example SELECT email FROM users WHERE id = 1
5455
- * @type string
5456
- */
5457
- sql: string;
5458
- /**
5459
- * @description ID of an existing saved policy profile to evaluate against.
5460
- * @example pol_01h455vb4pex5vsknk084sn02q
5461
- * @type string | undefined
5462
- */
5463
- policy_id?: string;
5464
- /**
5465
- * @description Mutable fields of a policy profile (used for create and update).
5466
- * @type object | undefined
5467
- */
5468
- policy?: PolicyProfileInput;
5469
- };
5470
-
5471
- /**
5472
- * Generated by Kubb (https://kubb.dev/).
5473
- * Do not edit manually.
5474
- */
5475
- declare const dryEvalMaskedColumnKindEnum: {
5476
- readonly redact: "redact";
5477
- readonly null: "null";
5478
- readonly hash: "hash";
5479
- };
5480
- type DryEvalMaskedColumnKindEnumKey = (typeof dryEvalMaskedColumnKindEnum)[keyof typeof dryEvalMaskedColumnKindEnum];
5959
+ type ListPolicyProfilesStatus200 = ListPolicyProfilesResponse;
5481
5960
  /**
5482
- * @description One result column that would be masked, with the mask kind applied.
5483
5961
  * @type object
5484
5962
  */
5485
- type DryEvalMaskedColumn = {
5963
+ type ListPolicyProfilesRequestConfig = {
5964
+ data?: never;
5486
5965
  /**
5487
- * @description The output column name (post-alias) the client would see masked.
5488
- * @example email
5489
- * @type string
5966
+ * @type object
5490
5967
  */
5491
- column: string;
5968
+ pathParams: {
5969
+ project_id: ListPolicyProfilesPathProjectId;
5970
+ };
5971
+ /**
5972
+ * @type object | undefined
5973
+ */
5974
+ queryParams?: {
5975
+ page_size?: ListPolicyProfilesQueryPageSize;
5976
+ page_token?: ListPolicyProfilesQueryPageToken;
5977
+ };
5978
+ headerParams?: never;
5492
5979
  /**
5493
- * @description How the column is masked.
5494
5980
  * @type string
5495
5981
  */
5496
- kind: DryEvalMaskedColumnKindEnumKey;
5982
+ url: `/v1/projects/${string}/policies`;
5497
5983
  };
5498
5984
 
5499
5985
  /**
@@ -5501,60 +5987,39 @@ type DryEvalMaskedColumn = {
5501
5987
  * Do not edit manually.
5502
5988
  */
5503
5989
 
5504
- declare const dryEvalResultVerdictEnum: {
5505
- readonly allow: "allow";
5506
- readonly block: "block";
5507
- readonly mask: "mask";
5508
- readonly "row-filter": "row-filter";
5509
- };
5510
- type DryEvalResultVerdictEnumKey = (typeof dryEvalResultVerdictEnum)[keyof typeof dryEvalResultVerdictEnum];
5511
5990
  /**
5512
- * @description The decision the proxy would reach for the supplied statement under the supplied policy. verdict is the headline outcome; the remaining fields detail why.
5991
+ * @description Unique project identifier (prefixed, e.g. prj_xxx).
5992
+ * @pattern ^[a-zA-Z0-9_.-]+$
5993
+ * @type string
5994
+ */
5995
+ type CreatePolicyProfilePathProjectId = string;
5996
+ /**
5997
+ * @description A named bundle of rules enforced on agent credentials in the data plane.
5513
5998
  * @type object
5514
5999
  */
5515
- type DryEvalResult = {
5516
- /**
5517
- * @description allow — permitted unchanged; block — rejected; mask — permitted but listed result columns are masked; row-filter — permitted but a WHERE predicate is injected (and any listed columns are also masked).
5518
- * @type string
5519
- */
5520
- verdict: DryEvalResultVerdictEnumKey;
6000
+ type CreatePolicyProfileStatus201 = PolicyProfile;
6001
+ /**
6002
+ * @description Mutable fields of a policy profile (used for create and update).
6003
+ * @type object
6004
+ */
6005
+ type CreatePolicyProfileData = PolicyProfileInput;
6006
+ /**
6007
+ * @type object
6008
+ */
6009
+ type CreatePolicyProfileRequestConfig = {
6010
+ data?: CreatePolicyProfileData;
5521
6011
  /**
5522
- * @description Machine-readable decision tag. For a block, the blocking rule (e.g. read_only, table_denied, table_not_allowed, statement_denied, row_filter_unsafe). Otherwise \"ok\".
5523
- * @example ok
5524
- * @type string
6012
+ * @type object
5525
6013
  */
5526
- rule: string;
6014
+ pathParams: {
6015
+ project_id: CreatePolicyProfilePathProjectId;
6016
+ };
6017
+ queryParams?: never;
6018
+ headerParams?: never;
5527
6019
  /**
5528
- * @description Human-readable explanation of the verdict.
5529
6020
  * @type string
5530
6021
  */
5531
- reason: string;
5532
- /**
5533
- * @description What the author could do instead (present on block verdicts).
5534
- * @type string | undefined
5535
- */
5536
- hint?: string;
5537
- /**
5538
- * @description Result columns that would be masked. Present on mask/row-filter verdicts.
5539
- * @type array | undefined
5540
- */
5541
- masked_columns?: DryEvalMaskedColumn[];
5542
- /**
5543
- * @description The row-filter predicate ANDed into the statement\'s WHERE clause.
5544
- * @example tenant_id = current_setting('pgbeam.tenant')
5545
- * @type string | undefined
5546
- */
5547
- row_filter_predicate?: string;
5548
- /**
5549
- * @description The statement as it would be sent upstream after row-filter injection.
5550
- * @type string | undefined
5551
- */
5552
- rewritten_sql?: string;
5553
- /**
5554
- * @description Informational caveats about stateful enforcement a single-statement preview cannot model (per-region budgets, approvals, write-mode routing).
5555
- * @type array | undefined
5556
- */
5557
- notes?: string[];
6022
+ url: `/v1/projects/${string}/policies`;
5558
6023
  };
5559
6024
 
5560
6025
  /**
@@ -5567,34 +6032,36 @@ type DryEvalResult = {
5567
6032
  * @pattern ^[a-zA-Z0-9_.-]+$
5568
6033
  * @type string
5569
6034
  */
5570
- type DryEvalPolicyPathProjectId = string;
6035
+ type GetPolicyProfilePathProjectId = string;
5571
6036
  /**
5572
- * @description The decision the proxy would reach for the supplied statement under the supplied policy. verdict is the headline outcome; the remaining fields detail why.
5573
- * @type object
6037
+ * @description Unique policy profile identifier (prefixed, e.g. pol_xxx).
6038
+ * @pattern ^[a-zA-Z0-9_.-]+$
6039
+ * @type string
5574
6040
  */
5575
- type DryEvalPolicyStatus200 = DryEvalResult;
6041
+ type GetPolicyProfilePathPolicyId = string;
5576
6042
  /**
5577
- * @description A SQL statement to test plus the policy to test it against. Supply exactly one of policy_id (an existing saved policy) or policy (an unsaved draft, e.g. the in-progress editor form).
6043
+ * @description A named bundle of rules enforced on agent credentials in the data plane.
5578
6044
  * @type object
5579
6045
  */
5580
- type DryEvalPolicyData = DryEvalInput;
6046
+ type GetPolicyProfileStatus200 = PolicyProfile;
5581
6047
  /**
5582
6048
  * @type object
5583
6049
  */
5584
- type DryEvalPolicyRequestConfig = {
5585
- data?: DryEvalPolicyData;
6050
+ type GetPolicyProfileRequestConfig = {
6051
+ data?: never;
5586
6052
  /**
5587
6053
  * @type object
5588
6054
  */
5589
6055
  pathParams: {
5590
- project_id: DryEvalPolicyPathProjectId;
6056
+ project_id: GetPolicyProfilePathProjectId;
6057
+ policy_id: GetPolicyProfilePathPolicyId;
5591
6058
  };
5592
6059
  queryParams?: never;
5593
6060
  headerParams?: never;
5594
6061
  /**
5595
6062
  * @type string
5596
6063
  */
5597
- url: `/v1/projects/${string}/policy-evaluations`;
6064
+ url: `/v1/projects/${string}/policies/${string}`;
5598
6065
  };
5599
6066
 
5600
6067
  /**
@@ -5603,45 +6070,45 @@ type DryEvalPolicyRequestConfig = {
5603
6070
  */
5604
6071
 
5605
6072
  /**
5606
- * @description A window of recorded agent traffic to replay plus the candidate policy to replay it against. Supply exactly one of policy_id (an existing saved policy) or policy (an unsaved draft, e.g. the in-progress editor form).
6073
+ * @description Unique project identifier (prefixed, e.g. prj_xxx).
6074
+ * @pattern ^[a-zA-Z0-9_.-]+$
6075
+ * @type string
6076
+ */
6077
+ type UpdatePolicyProfilePathProjectId = string;
6078
+ /**
6079
+ * @description Unique policy profile identifier (prefixed, e.g. pol_xxx).
6080
+ * @pattern ^[a-zA-Z0-9_.-]+$
6081
+ * @type string
6082
+ */
6083
+ type UpdatePolicyProfilePathPolicyId = string;
6084
+ /**
6085
+ * @description A named bundle of rules enforced on agent credentials in the data plane.
5607
6086
  * @type object
5608
6087
  */
5609
- type PolicyReplayInput = {
5610
- /**
5611
- * @description ID of an existing saved policy profile to replay against.
5612
- * @example pol_01h455vb4pex5vsknk084sn02q
5613
- * @type string | undefined
5614
- */
5615
- policy_id?: string;
5616
- /**
5617
- * @description Mutable fields of a policy profile (used for create and update).
5618
- * @type object | undefined
5619
- */
5620
- policy?: PolicyProfileInput;
5621
- /**
5622
- * @description Restrict the replay to traffic recorded for one agent credential.
5623
- * @example cred_01h455vb4pex5vsknk084sn02q
5624
- * @type string | undefined
5625
- */
5626
- credential_id?: string;
5627
- /**
5628
- * @description Start of the traffic window (inclusive). Defaults to 7 days before end_ts.
5629
- * @type string | undefined
5630
- */
5631
- start_ts?: string;
6088
+ type UpdatePolicyProfileStatus200 = PolicyProfile;
6089
+ /**
6090
+ * @description Mutable fields of a policy profile (used for create and update).
6091
+ * @type object
6092
+ */
6093
+ type UpdatePolicyProfileData = PolicyProfileInput;
6094
+ /**
6095
+ * @type object
6096
+ */
6097
+ type UpdatePolicyProfileRequestConfig = {
6098
+ data?: UpdatePolicyProfileData;
5632
6099
  /**
5633
- * @description End of the traffic window (exclusive). Defaults to now.
5634
- * @type string | undefined
6100
+ * @type object
5635
6101
  */
5636
- end_ts?: string;
6102
+ pathParams: {
6103
+ project_id: UpdatePolicyProfilePathProjectId;
6104
+ policy_id: UpdatePolicyProfilePathPolicyId;
6105
+ };
6106
+ queryParams?: never;
6107
+ headerParams?: never;
5637
6108
  /**
5638
- * @description Maximum number of distinct queries to replay, newest first. Traffic is deduplicated by normalized query hash before evaluation.
5639
- * @minLength 1
5640
- * @maxLength 500
5641
- * @default 200
5642
- * @type integer | undefined
6109
+ * @type string
5643
6110
  */
5644
- limit?: number;
6111
+ url: `/v1/projects/${string}/policies/${string}`;
5645
6112
  };
5646
6113
 
5647
6114
  /**
@@ -5649,134 +6116,107 @@ type PolicyReplayInput = {
5649
6116
  * Do not edit manually.
5650
6117
  */
5651
6118
 
5652
- declare const policyReplayItemChangeEnum: {
5653
- readonly newly_blocked: "newly_blocked";
5654
- readonly newly_allowed: "newly_allowed";
5655
- readonly still_allowed: "still_allowed";
5656
- readonly still_blocked: "still_blocked";
5657
- };
5658
- type PolicyReplayItemChangeEnumKey = (typeof policyReplayItemChangeEnum)[keyof typeof policyReplayItemChangeEnum];
5659
6119
  /**
5660
- * @description One distinct recorded query and the decision the candidate policy would reach for it.
6120
+ * @description Unique project identifier (prefixed, e.g. prj_xxx).
6121
+ * @pattern ^[a-zA-Z0-9_.-]+$
6122
+ * @type string
6123
+ */
6124
+ type DeletePolicyProfilePathProjectId = string;
6125
+ /**
6126
+ * @description Unique policy profile identifier (prefixed, e.g. pol_xxx).
6127
+ * @pattern ^[a-zA-Z0-9_.-]+$
6128
+ * @type string
6129
+ */
6130
+ type DeletePolicyProfilePathPolicyId = string;
6131
+ /**
5661
6132
  * @type object
5662
6133
  */
5663
- type PolicyReplayItem = {
5664
- /**
5665
- * @description Normalized query hash identifying this statement shape.
5666
- * @type string
5667
- */
5668
- query_hash: string;
5669
- /**
5670
- * @description The recorded statement (normalized, literals replaced with $N placeholders), from its most recent occurrence.
5671
- * @type string
5672
- */
5673
- sql: string;
5674
- /**
5675
- * @description Statement kind (select, insert, update, delete, ddl, ...).
5676
- * @type string | undefined
5677
- */
5678
- statement_kind?: string;
5679
- /**
5680
- * @description How many recorded entries share this query shape in the window.
5681
- * @type integer
5682
- */
5683
- occurrences: number;
5684
- /**
5685
- * @description Oldest occurrence in the window.
5686
- * @type string
5687
- */
5688
- first_seen: string;
5689
- /**
5690
- * @description Newest occurrence in the window.
5691
- * @type string
5692
- */
5693
- last_seen: string;
5694
- /**
5695
- * @description The most recent recorded outcome for this query (query, masked, truncated, or blocked).
5696
- * @type string
5697
- */
5698
- recorded_event: string;
5699
- /**
5700
- * @description The decision rule recorded with a blocked outcome.
5701
- * @type string | undefined
5702
- */
5703
- recorded_rule?: string;
5704
- /**
5705
- * @description How the candidate decision compares to the recorded outcome. newly_blocked and newly_allowed are the changes worth reviewing before rollout; still_allowed and still_blocked are unchanged.
5706
- * @type string
5707
- */
5708
- change: PolicyReplayItemChangeEnumKey;
6134
+ type DeletePolicyProfileRequestConfig = {
6135
+ data?: never;
5709
6136
  /**
5710
- * @description The decision the proxy would reach for the supplied statement under the supplied policy. verdict is the headline outcome; the remaining fields detail why.
5711
6137
  * @type object
5712
6138
  */
5713
- result: DryEvalResult;
6139
+ pathParams: {
6140
+ project_id: DeletePolicyProfilePathProjectId;
6141
+ policy_id: DeletePolicyProfilePathPolicyId;
6142
+ };
6143
+ queryParams?: never;
6144
+ headerParams?: never;
6145
+ /**
6146
+ * @type string
6147
+ */
6148
+ url: `/v1/projects/${string}/policies/${string}`;
5714
6149
  };
5715
6150
 
5716
6151
  /**
5717
6152
  * Generated by Kubb (https://kubb.dev/).
5718
6153
  * Do not edit manually.
5719
6154
  */
6155
+
5720
6156
  /**
5721
- * @description Aggregate outcome of a policy replay.
6157
+ * @description A SQL statement to test plus the policy to test it against. Supply exactly one of policy_id (an existing saved policy) or policy (an unsaved draft, e.g. the in-progress editor form).
5722
6158
  * @type object
5723
6159
  */
5724
- type PolicyReplaySummary = {
5725
- /**
5726
- * @description Recorded audit entries covered by the replayed queries.
5727
- * @type integer
5728
- */
5729
- entries_scanned: number;
5730
- /**
5731
- * @description Distinct normalized queries found in the window (capped at limit).
5732
- * @type integer
5733
- */
5734
- distinct_queries: number;
5735
- /**
5736
- * @description Distinct queries actually evaluated against the candidate policy.
5737
- * @type integer
5738
- */
5739
- evaluated: number;
5740
- /**
5741
- * @description Queries the candidate policy would allow unchanged.
5742
- * @type integer
5743
- */
5744
- would_allow: number;
5745
- /**
5746
- * @description Queries the candidate policy would block.
5747
- * @type integer
5748
- */
5749
- would_block: number;
5750
- /**
5751
- * @description Queries the candidate policy would mask result columns on.
5752
- * @type integer
5753
- */
5754
- would_mask: number;
6160
+ type DryEvalInput = {
5755
6161
  /**
5756
- * @description Queries the candidate policy would inject a row filter into.
5757
- * @type integer
6162
+ * @description The single SQL statement to evaluate.
6163
+ * @minLength 1
6164
+ * @maxLength 100000
6165
+ * @example SELECT email FROM users WHERE id = 1
6166
+ * @type string
5758
6167
  */
5759
- would_row_filter: number;
6168
+ sql: string;
5760
6169
  /**
5761
- * @description Queries that executed under the recorded policy but the candidate policy would block.
5762
- * @type integer
6170
+ * @description ID of an existing saved policy profile to evaluate against.
6171
+ * @example pol_01h455vb4pex5vsknk084sn02q
6172
+ * @type string | undefined
5763
6173
  */
5764
- newly_blocked: number;
6174
+ policy_id?: string;
5765
6175
  /**
5766
- * @description Queries that were blocked when recorded but the candidate policy would permit.
5767
- * @type integer
6176
+ * @description Mutable fields of a policy profile (used for create and update).
6177
+ * @type object | undefined
5768
6178
  */
5769
- newly_allowed: number;
6179
+ policy?: PolicyProfileInput;
6180
+ };
6181
+
6182
+ /**
6183
+ * Generated by Kubb (https://kubb.dev/).
6184
+ * Do not edit manually.
6185
+ */
6186
+
6187
+ /**
6188
+ * @description Unique project identifier (prefixed, e.g. prj_xxx).
6189
+ * @pattern ^[a-zA-Z0-9_.-]+$
6190
+ * @type string
6191
+ */
6192
+ type DryEvalPolicyPathProjectId = string;
6193
+ /**
6194
+ * @description The decision the proxy would reach for the supplied statement under the supplied policy. verdict is the headline outcome; the remaining fields detail why.
6195
+ * @type object
6196
+ */
6197
+ type DryEvalPolicyStatus200 = DryEvalResult;
6198
+ /**
6199
+ * @description A SQL statement to test plus the policy to test it against. Supply exactly one of policy_id (an existing saved policy) or policy (an unsaved draft, e.g. the in-progress editor form).
6200
+ * @type object
6201
+ */
6202
+ type DryEvalPolicyData = DryEvalInput;
6203
+ /**
6204
+ * @type object
6205
+ */
6206
+ type DryEvalPolicyRequestConfig = {
6207
+ data?: DryEvalPolicyData;
5770
6208
  /**
5771
- * @description Distinct queries skipped because the stored statement was truncated at record time and can no longer be parsed faithfully.
5772
- * @type integer
6209
+ * @type object
5773
6210
  */
5774
- skipped_unparseable: number;
6211
+ pathParams: {
6212
+ project_id: DryEvalPolicyPathProjectId;
6213
+ };
6214
+ queryParams?: never;
6215
+ headerParams?: never;
5775
6216
  /**
5776
- * @description True when the window contained more distinct queries than limit; only the newest were replayed.
5777
- * @type boolean
6217
+ * @type string
5778
6218
  */
5779
- truncated: boolean;
6219
+ url: `/v1/projects/${string}/policy-evaluations`;
5780
6220
  };
5781
6221
 
5782
6222
  /**
@@ -5785,20 +6225,45 @@ type PolicyReplaySummary = {
5785
6225
  */
5786
6226
 
5787
6227
  /**
5788
- * @description The outcome of replaying recorded agent traffic against a candidate policy: an aggregate summary plus per-query decisions, changes first.
6228
+ * @description A window of recorded agent traffic to replay plus the candidate policy to replay it against. Supply exactly one of policy_id (an existing saved policy) or policy (an unsaved draft, e.g. the in-progress editor form).
5789
6229
  * @type object
5790
6230
  */
5791
- type PolicyReplayResult = {
6231
+ type PolicyReplayInput = {
5792
6232
  /**
5793
- * @description Aggregate outcome of a policy replay.
5794
- * @type object
6233
+ * @description ID of an existing saved policy profile to replay against.
6234
+ * @example pol_01h455vb4pex5vsknk084sn02q
6235
+ * @type string | undefined
5795
6236
  */
5796
- summary: PolicyReplaySummary;
6237
+ policy_id?: string;
5797
6238
  /**
5798
- * @description Per-query replay decisions, ordered changes first (newly blocked, then newly allowed), then by occurrence count.
5799
- * @type array
6239
+ * @description Mutable fields of a policy profile (used for create and update).
6240
+ * @type object | undefined
5800
6241
  */
5801
- items: PolicyReplayItem[];
6242
+ policy?: PolicyProfileInput;
6243
+ /**
6244
+ * @description Restrict the replay to traffic recorded for one agent credential.
6245
+ * @example cred_01h455vb4pex5vsknk084sn02q
6246
+ * @type string | undefined
6247
+ */
6248
+ credential_id?: string;
6249
+ /**
6250
+ * @description Start of the traffic window (inclusive). Defaults to 7 days before end_ts.
6251
+ * @type string | undefined
6252
+ */
6253
+ start_ts?: string;
6254
+ /**
6255
+ * @description End of the traffic window (exclusive). Defaults to now.
6256
+ * @type string | undefined
6257
+ */
6258
+ end_ts?: string;
6259
+ /**
6260
+ * @description Maximum number of distinct queries to replay, newest first. Traffic is deduplicated by normalized query hash before evaluation.
6261
+ * @minLength 1
6262
+ * @maxLength 500
6263
+ * @default 200
6264
+ * @type integer | undefined
6265
+ */
6266
+ limit?: number;
5802
6267
  };
5803
6268
 
5804
6269
  /**
@@ -8445,6 +8910,40 @@ declare const operationsByTag: {
8445
8910
  readonly path: "/v1/projects/{project_id}/audit-logs/verify";
8446
8911
  };
8447
8912
  };
8913
+ readonly policies: {
8914
+ readonly recommendAgentPolicy: {
8915
+ readonly method: "POST";
8916
+ readonly path: "/v1/projects/{project_id}/agents/{agent_id}/policy-recommendation";
8917
+ };
8918
+ readonly listPolicyProfiles: {
8919
+ readonly method: "GET";
8920
+ readonly path: "/v1/projects/{project_id}/policies";
8921
+ };
8922
+ readonly createPolicyProfile: {
8923
+ readonly method: "POST";
8924
+ readonly path: "/v1/projects/{project_id}/policies";
8925
+ };
8926
+ readonly getPolicyProfile: {
8927
+ readonly method: "GET";
8928
+ readonly path: "/v1/projects/{project_id}/policies/{policy_id}";
8929
+ };
8930
+ readonly updatePolicyProfile: {
8931
+ readonly method: "PUT";
8932
+ readonly path: "/v1/projects/{project_id}/policies/{policy_id}";
8933
+ };
8934
+ readonly deletePolicyProfile: {
8935
+ readonly method: "DELETE";
8936
+ readonly path: "/v1/projects/{project_id}/policies/{policy_id}";
8937
+ };
8938
+ readonly dryEvalPolicy: {
8939
+ readonly method: "POST";
8940
+ readonly path: "/v1/projects/{project_id}/policy-evaluations";
8941
+ };
8942
+ readonly replayPolicy: {
8943
+ readonly method: "POST";
8944
+ readonly path: "/v1/projects/{project_id}/policy-replays";
8945
+ };
8946
+ };
8448
8947
  readonly anomalies: {
8449
8948
  readonly listAnomalyAlerts: {
8450
8949
  readonly method: "GET";
@@ -8635,40 +9134,32 @@ declare const operationsByTag: {
8635
9134
  readonly path: "/v1/organizations/{org_id}/self-host-enrollments/{enrollment_id}/rotate";
8636
9135
  };
8637
9136
  };
8638
- readonly migrations: {
8639
- readonly lintMigration: {
8640
- readonly method: "POST";
8641
- readonly path: "/v1/projects/{project_id}/migrations:lint";
8642
- };
8643
- };
8644
- readonly policies: {
8645
- readonly listPolicyProfiles: {
9137
+ readonly honeytokens: {
9138
+ readonly listHoneytokens: {
8646
9139
  readonly method: "GET";
8647
- readonly path: "/v1/projects/{project_id}/policies";
9140
+ readonly path: "/v1/projects/{project_id}/honeytokens";
8648
9141
  };
8649
- readonly createPolicyProfile: {
9142
+ readonly createHoneytoken: {
8650
9143
  readonly method: "POST";
8651
- readonly path: "/v1/projects/{project_id}/policies";
9144
+ readonly path: "/v1/projects/{project_id}/honeytokens";
8652
9145
  };
8653
- readonly getPolicyProfile: {
9146
+ readonly getHoneytoken: {
8654
9147
  readonly method: "GET";
8655
- readonly path: "/v1/projects/{project_id}/policies/{policy_id}";
9148
+ readonly path: "/v1/projects/{project_id}/honeytokens/{honeytoken_id}";
8656
9149
  };
8657
- readonly updatePolicyProfile: {
9150
+ readonly updateHoneytoken: {
8658
9151
  readonly method: "PUT";
8659
- readonly path: "/v1/projects/{project_id}/policies/{policy_id}";
9152
+ readonly path: "/v1/projects/{project_id}/honeytokens/{honeytoken_id}";
8660
9153
  };
8661
- readonly deletePolicyProfile: {
9154
+ readonly deleteHoneytoken: {
8662
9155
  readonly method: "DELETE";
8663
- readonly path: "/v1/projects/{project_id}/policies/{policy_id}";
8664
- };
8665
- readonly dryEvalPolicy: {
8666
- readonly method: "POST";
8667
- readonly path: "/v1/projects/{project_id}/policy-evaluations";
9156
+ readonly path: "/v1/projects/{project_id}/honeytokens/{honeytoken_id}";
8668
9157
  };
8669
- readonly replayPolicy: {
9158
+ };
9159
+ readonly migrations: {
9160
+ readonly lintMigration: {
8670
9161
  readonly method: "POST";
8671
- readonly path: "/v1/projects/{project_id}/policy-replays";
9162
+ readonly path: "/v1/projects/{project_id}/migrations:lint";
8672
9163
  };
8673
9164
  };
8674
9165
  readonly support: {
@@ -8762,6 +9253,11 @@ declare const operationsByPath: {
8762
9253
  readonly path: "/v1/projects/{project_id}/agents/{agent_id}/rotate";
8763
9254
  readonly operationId: "rotateAgentCredential";
8764
9255
  };
9256
+ readonly "POST /v1/projects/{project_id}/agents/{agent_id}/policy-recommendation": {
9257
+ readonly method: "POST";
9258
+ readonly path: "/v1/projects/{project_id}/agents/{agent_id}/policy-recommendation";
9259
+ readonly operationId: "recommendAgentPolicy";
9260
+ };
8765
9261
  readonly "GET /v1/projects/{project_id}/anomalies": {
8766
9262
  readonly method: "GET";
8767
9263
  readonly path: "/v1/projects/{project_id}/anomalies";
@@ -8912,6 +9408,31 @@ declare const operationsByPath: {
8912
9408
  readonly path: "/v1/health";
8913
9409
  readonly operationId: "getHealth";
8914
9410
  };
9411
+ readonly "GET /v1/projects/{project_id}/honeytokens": {
9412
+ readonly method: "GET";
9413
+ readonly path: "/v1/projects/{project_id}/honeytokens";
9414
+ readonly operationId: "listHoneytokens";
9415
+ };
9416
+ readonly "POST /v1/projects/{project_id}/honeytokens": {
9417
+ readonly method: "POST";
9418
+ readonly path: "/v1/projects/{project_id}/honeytokens";
9419
+ readonly operationId: "createHoneytoken";
9420
+ };
9421
+ readonly "GET /v1/projects/{project_id}/honeytokens/{honeytoken_id}": {
9422
+ readonly method: "GET";
9423
+ readonly path: "/v1/projects/{project_id}/honeytokens/{honeytoken_id}";
9424
+ readonly operationId: "getHoneytoken";
9425
+ };
9426
+ readonly "PUT /v1/projects/{project_id}/honeytokens/{honeytoken_id}": {
9427
+ readonly method: "PUT";
9428
+ readonly path: "/v1/projects/{project_id}/honeytokens/{honeytoken_id}";
9429
+ readonly operationId: "updateHoneytoken";
9430
+ };
9431
+ readonly "DELETE /v1/projects/{project_id}/honeytokens/{honeytoken_id}": {
9432
+ readonly method: "DELETE";
9433
+ readonly path: "/v1/projects/{project_id}/honeytokens/{honeytoken_id}";
9434
+ readonly operationId: "deleteHoneytoken";
9435
+ };
8915
9436
  readonly "GET /v1/projects/{project_id}/insights": {
8916
9437
  readonly method: "GET";
8917
9438
  readonly path: "/v1/projects/{project_id}/insights";
@@ -9134,6 +9655,10 @@ type RevokeAgentCredentialParams = {
9134
9655
  type RotateAgentCredentialParams = {
9135
9656
  pathParams: NonNullable<RotateAgentCredentialRequestConfig["pathParams"]>;
9136
9657
  };
9658
+ type RecommendAgentPolicyParams = {
9659
+ pathParams: NonNullable<RecommendAgentPolicyRequestConfig["pathParams"]>;
9660
+ body: NonNullable<RecommendAgentPolicyRequestConfig["data"]>;
9661
+ };
9137
9662
  type ListAnomalyAlertsParams = {
9138
9663
  pathParams: NonNullable<ListAnomalyAlertsRequestConfig["pathParams"]>;
9139
9664
  queryParams?: NonNullable<ListAnomalyAlertsRequestConfig["queryParams"]>;
@@ -9236,6 +9761,24 @@ type DeleteCustomDomainParams = {
9236
9761
  type VerifyCustomDomainParams = {
9237
9762
  pathParams: NonNullable<VerifyCustomDomainRequestConfig["pathParams"]>;
9238
9763
  };
9764
+ type ListHoneytokensParams = {
9765
+ pathParams: NonNullable<ListHoneytokensRequestConfig["pathParams"]>;
9766
+ queryParams?: NonNullable<ListHoneytokensRequestConfig["queryParams"]>;
9767
+ };
9768
+ type CreateHoneytokenParams = {
9769
+ pathParams: NonNullable<CreateHoneytokenRequestConfig["pathParams"]>;
9770
+ body: NonNullable<CreateHoneytokenRequestConfig["data"]>;
9771
+ };
9772
+ type GetHoneytokenParams = {
9773
+ pathParams: NonNullable<GetHoneytokenRequestConfig["pathParams"]>;
9774
+ };
9775
+ type UpdateHoneytokenParams = {
9776
+ pathParams: NonNullable<UpdateHoneytokenRequestConfig["pathParams"]>;
9777
+ body: NonNullable<UpdateHoneytokenRequestConfig["data"]>;
9778
+ };
9779
+ type DeleteHoneytokenParams = {
9780
+ pathParams: NonNullable<DeleteHoneytokenRequestConfig["pathParams"]>;
9781
+ };
9239
9782
  type GetProjectInsightsParams = {
9240
9783
  pathParams: NonNullable<GetProjectInsightsRequestConfig["pathParams"]>;
9241
9784
  queryParams?: NonNullable<GetProjectInsightsRequestConfig["queryParams"]>;
@@ -9389,6 +9932,16 @@ interface ApiOperations {
9389
9932
  exportAuditLogs(params: ExportAuditLogsParams): Promise<ExportAuditLogsStatus200>;
9390
9933
  verifyAuditChain(params: VerifyAuditChainParams): Promise<VerifyAuditChainStatus200>;
9391
9934
  };
9935
+ policies: {
9936
+ recommendAgentPolicy(params: RecommendAgentPolicyParams): Promise<RecommendAgentPolicyStatus200>;
9937
+ listPolicyProfiles(params: ListPolicyProfilesParams): Promise<ListPolicyProfilesStatus200>;
9938
+ createPolicyProfile(params: CreatePolicyProfileParams): Promise<CreatePolicyProfileStatus201>;
9939
+ getPolicyProfile(params: GetPolicyProfileParams): Promise<GetPolicyProfileStatus200>;
9940
+ updatePolicyProfile(params: UpdatePolicyProfileParams): Promise<UpdatePolicyProfileStatus200>;
9941
+ deletePolicyProfile(params: DeletePolicyProfileParams): Promise<void>;
9942
+ dryEvalPolicy(params: DryEvalPolicyParams): Promise<DryEvalPolicyStatus200>;
9943
+ replayPolicy(params: ReplayPolicyParams): Promise<ReplayPolicyStatus200>;
9944
+ };
9392
9945
  anomalies: {
9393
9946
  listAnomalyAlerts(params: ListAnomalyAlertsParams): Promise<ListAnomalyAlertsStatus200>;
9394
9947
  updateAnomalyAlert(params: UpdateAnomalyAlertParams): Promise<UpdateAnomalyAlertStatus200>;
@@ -9447,18 +10000,16 @@ interface ApiOperations {
9447
10000
  revokeSelfHostEnrollment(params: RevokeSelfHostEnrollmentParams): Promise<void>;
9448
10001
  rotateSelfHostEnrollment(params: RotateSelfHostEnrollmentParams): Promise<RotateSelfHostEnrollmentStatus200>;
9449
10002
  };
10003
+ honeytokens: {
10004
+ listHoneytokens(params: ListHoneytokensParams): Promise<ListHoneytokensStatus200>;
10005
+ createHoneytoken(params: CreateHoneytokenParams): Promise<CreateHoneytokenStatus201>;
10006
+ getHoneytoken(params: GetHoneytokenParams): Promise<GetHoneytokenStatus200>;
10007
+ updateHoneytoken(params: UpdateHoneytokenParams): Promise<UpdateHoneytokenStatus200>;
10008
+ deleteHoneytoken(params: DeleteHoneytokenParams): Promise<void>;
10009
+ };
9450
10010
  migrations: {
9451
10011
  lintMigration(params: LintMigrationParams): Promise<LintMigrationStatus200>;
9452
10012
  };
9453
- policies: {
9454
- listPolicyProfiles(params: ListPolicyProfilesParams): Promise<ListPolicyProfilesStatus200>;
9455
- createPolicyProfile(params: CreatePolicyProfileParams): Promise<CreatePolicyProfileStatus201>;
9456
- getPolicyProfile(params: GetPolicyProfileParams): Promise<GetPolicyProfileStatus200>;
9457
- updatePolicyProfile(params: UpdatePolicyProfileParams): Promise<UpdatePolicyProfileStatus200>;
9458
- deletePolicyProfile(params: DeletePolicyProfileParams): Promise<void>;
9459
- dryEvalPolicy(params: DryEvalPolicyParams): Promise<DryEvalPolicyStatus200>;
9460
- replayPolicy(params: ReplayPolicyParams): Promise<ReplayPolicyStatus200>;
9461
- };
9462
10013
  support: {
9463
10014
  listSupportCases(params: ListSupportCasesParams): Promise<ListSupportCasesStatus200>;
9464
10015
  createSupportCase(params: CreateSupportCaseParams): Promise<CreateSupportCaseStatus201>;
@@ -9507,6 +10058,10 @@ interface RequestMap {
9507
10058
  params: RotateAgentCredentialParams;
9508
10059
  response: RotateAgentCredentialStatus200;
9509
10060
  };
10061
+ "POST /v1/projects/{project_id}/agents/{agent_id}/policy-recommendation": {
10062
+ params: RecommendAgentPolicyParams;
10063
+ response: RecommendAgentPolicyStatus200;
10064
+ };
9510
10065
  "GET /v1/projects/{project_id}/anomalies": {
9511
10066
  params: ListAnomalyAlertsParams;
9512
10067
  response: ListAnomalyAlertsStatus200;
@@ -9627,6 +10182,26 @@ interface RequestMap {
9627
10182
  params?: undefined;
9628
10183
  response: GetHealthStatus200;
9629
10184
  };
10185
+ "GET /v1/projects/{project_id}/honeytokens": {
10186
+ params: ListHoneytokensParams;
10187
+ response: ListHoneytokensStatus200;
10188
+ };
10189
+ "POST /v1/projects/{project_id}/honeytokens": {
10190
+ params: CreateHoneytokenParams;
10191
+ response: CreateHoneytokenStatus201;
10192
+ };
10193
+ "GET /v1/projects/{project_id}/honeytokens/{honeytoken_id}": {
10194
+ params: GetHoneytokenParams;
10195
+ response: GetHoneytokenStatus200;
10196
+ };
10197
+ "PUT /v1/projects/{project_id}/honeytokens/{honeytoken_id}": {
10198
+ params: UpdateHoneytokenParams;
10199
+ response: UpdateHoneytokenStatus200;
10200
+ };
10201
+ "DELETE /v1/projects/{project_id}/honeytokens/{honeytoken_id}": {
10202
+ params: DeleteHoneytokenParams;
10203
+ response: void;
10204
+ };
9630
10205
  "GET /v1/projects/{project_id}/insights": {
9631
10206
  params: GetProjectInsightsParams;
9632
10207
  response: GetProjectInsightsStatus200;