pgbeam 0.3.9 → 0.3.11

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.
@@ -1102,6 +1102,16 @@ type ApprovalRequest = {
1102
1102
  * @type string | undefined
1103
1103
  */
1104
1104
  statement_kind?: string;
1105
+ /**
1106
+ * @description Best-effort estimate of how many rows the statement would affect, attached by the data plane when the statement was held. Either the planner estimate from EXPLAIN or the exact count observed in a rolled-back trial execution. Null when no estimate could be made; treat it as an estimate, not a guarantee.
1107
+ * @type integer
1108
+ */
1109
+ estimated_rows?: number | null;
1110
+ /**
1111
+ * @description Relations the statement touches, from the gateway\'s parse analysis.
1112
+ * @type array | undefined
1113
+ */
1114
+ target_tables?: string[];
1105
1115
  /**
1106
1116
  * @description Current state of the approval request.
1107
1117
  * @type string
@@ -1347,6 +1357,7 @@ type AuditDecisionKey = (typeof auditDecision)[keyof typeof auditDecision];
1347
1357
  declare const auditSource: {
1348
1358
  readonly wire: "wire";
1349
1359
  readonly mcp: "mcp";
1360
+ readonly rest: "rest";
1350
1361
  readonly control: "control";
1351
1362
  };
1352
1363
  type AuditSourceKey = (typeof auditSource)[keyof typeof auditSource];
@@ -1447,7 +1458,7 @@ type AuditLogEntry = {
1447
1458
  */
1448
1459
  session_id?: string;
1449
1460
  /**
1450
- * @description Statement origin (wire, mcp, or control for control-plane lifecycle events).
1461
+ * @description Statement origin (wire, mcp, rest, or control for control-plane lifecycle events).
1451
1462
  * @type string | undefined
1452
1463
  */
1453
1464
  source?: string;
@@ -1524,7 +1535,7 @@ type ListAuditLogsQueryEvent = string | undefined;
1524
1535
  */
1525
1536
  type ListAuditLogsQueryDecision = AuditDecisionKey | undefined;
1526
1537
  /**
1527
- * @description Filter by statement origin (wire, mcp, or control).
1538
+ * @description Filter by statement origin (wire, mcp, rest, or control).
1528
1539
  * @type string | undefined
1529
1540
  */
1530
1541
  type ListAuditLogsQuerySource = AuditSourceKey | undefined;
@@ -1616,7 +1627,7 @@ type ExportAuditLogsQueryEvent = string | undefined;
1616
1627
  */
1617
1628
  type ExportAuditLogsQueryDecision = AuditDecisionKey | undefined;
1618
1629
  /**
1619
- * @description Filter by statement origin (wire, mcp, or control).
1630
+ * @description Filter by statement origin (wire, mcp, rest, or control).
1620
1631
  * @type string | undefined
1621
1632
  */
1622
1633
  type ExportAuditLogsQuerySource = AuditSourceKey | undefined;
@@ -6828,6 +6839,11 @@ type SelfHostEnrollment = {
6828
6839
  * @type string
6829
6840
  */
6830
6841
  revoked_at?: string | null;
6842
+ /**
6843
+ * @description When the enrollment token expires and stops authenticating new proxy connections. Null means it never expires. Enforcement is fail-closed at the gRPC auth gate the instant this time passes.
6844
+ * @type string
6845
+ */
6846
+ expires_at?: string | null;
6831
6847
  };
6832
6848
 
6833
6849
  /**
@@ -6908,6 +6924,11 @@ type CreateSelfHostEnrollmentRequest = {
6908
6924
  * @type string | undefined
6909
6925
  */
6910
6926
  description?: string;
6927
+ /**
6928
+ * @description Optional expiry. When set, the enrollment token stops authenticating new proxy connections at this time (must be in the future). Omit or set null for a token that never expires.
6929
+ * @type string
6930
+ */
6931
+ expires_at?: string | null;
6911
6932
  };
6912
6933
 
6913
6934
  /**
@@ -6916,7 +6937,7 @@ type CreateSelfHostEnrollmentRequest = {
6916
6937
  */
6917
6938
 
6918
6939
  /**
6919
- * @description Response returned once when an enrollment is created. The token is shown a single time and cannot be retrieved again; set it as GRPC_AUTH_TOKEN on the self-hosted proxy.\n
6940
+ * @description Response returned once when an enrollment is created or its token is rotated. The token is shown a single time and cannot be retrieved again; set it as GRPC_AUTH_TOKEN on the self-hosted proxy.\n
6920
6941
  * @type object
6921
6942
  */
6922
6943
  type SelfHostEnrollmentSecret = {
@@ -6946,7 +6967,7 @@ type SelfHostEnrollmentSecret = {
6946
6967
  */
6947
6968
  type CreateSelfHostEnrollmentPathOrgId = string;
6948
6969
  /**
6949
- * @description Response returned once when an enrollment is created. The token is shown a single time and cannot be retrieved again; set it as GRPC_AUTH_TOKEN on the self-hosted proxy.\n
6970
+ * @description Response returned once when an enrollment is created or its token is rotated. The token is shown a single time and cannot be retrieved again; set it as GRPC_AUTH_TOKEN on the self-hosted proxy.\n
6950
6971
  * @type object
6951
6972
  */
6952
6973
  type CreateSelfHostEnrollmentStatus201 = SelfHostEnrollmentSecret;
@@ -7013,6 +7034,50 @@ type RevokeSelfHostEnrollmentRequestConfig = {
7013
7034
  url: `/v1/organizations/${string}/self-host-enrollments/${string}`;
7014
7035
  };
7015
7036
 
7037
+ /**
7038
+ * Generated by Kubb (https://kubb.dev/).
7039
+ * Do not edit manually.
7040
+ */
7041
+
7042
+ /**
7043
+ * @description Unique organization identifier.
7044
+ * @pattern ^[a-zA-Z0-9_.-]+$
7045
+ * @example org_abc123
7046
+ * @type string
7047
+ */
7048
+ type RotateSelfHostEnrollmentPathOrgId = string;
7049
+ /**
7050
+ * @description Unique enrollment identifier.
7051
+ * @pattern ^[a-zA-Z0-9_.-]+$
7052
+ * @example she_01h455vb4pex5vsknk084sn02q
7053
+ * @type string
7054
+ */
7055
+ type RotateSelfHostEnrollmentPathEnrollmentId = string;
7056
+ /**
7057
+ * @description Response returned once when an enrollment is created or its token is rotated. The token is shown a single time and cannot be retrieved again; set it as GRPC_AUTH_TOKEN on the self-hosted proxy.\n
7058
+ * @type object
7059
+ */
7060
+ type RotateSelfHostEnrollmentStatus200 = SelfHostEnrollmentSecret;
7061
+ /**
7062
+ * @type object
7063
+ */
7064
+ type RotateSelfHostEnrollmentRequestConfig = {
7065
+ data?: never;
7066
+ /**
7067
+ * @type object
7068
+ */
7069
+ pathParams: {
7070
+ org_id: RotateSelfHostEnrollmentPathOrgId;
7071
+ enrollment_id: RotateSelfHostEnrollmentPathEnrollmentId;
7072
+ };
7073
+ queryParams?: never;
7074
+ headerParams?: never;
7075
+ /**
7076
+ * @type string
7077
+ */
7078
+ url: `/v1/organizations/${string}/self-host-enrollments/${string}/rotate`;
7079
+ };
7080
+
7016
7081
  /**
7017
7082
  * Generated by Kubb (https://kubb.dev/).
7018
7083
  * Do not edit manually.
@@ -8498,6 +8563,10 @@ declare const operationsByTag: {
8498
8563
  readonly method: "DELETE";
8499
8564
  readonly path: "/v1/organizations/{org_id}/self-host-enrollments/{enrollment_id}";
8500
8565
  };
8566
+ readonly rotateSelfHostEnrollment: {
8567
+ readonly method: "POST";
8568
+ readonly path: "/v1/organizations/{org_id}/self-host-enrollments/{enrollment_id}/rotate";
8569
+ };
8501
8570
  };
8502
8571
  readonly migrations: {
8503
8572
  readonly lintMigration: {
@@ -8896,6 +8965,11 @@ declare const operationsByPath: {
8896
8965
  readonly path: "/v1/organizations/{org_id}/self-host-enrollments/{enrollment_id}";
8897
8966
  readonly operationId: "revokeSelfHostEnrollment";
8898
8967
  };
8968
+ readonly "POST /v1/organizations/{org_id}/self-host-enrollments/{enrollment_id}/rotate": {
8969
+ readonly method: "POST";
8970
+ readonly path: "/v1/organizations/{org_id}/self-host-enrollments/{enrollment_id}/rotate";
8971
+ readonly operationId: "rotateSelfHostEnrollment";
8972
+ };
8899
8973
  readonly "GET /v1/organizations/{org_id}/support/cases": {
8900
8974
  readonly method: "GET";
8901
8975
  readonly path: "/v1/organizations/{org_id}/support/cases";
@@ -9171,6 +9245,9 @@ type CreateSelfHostEnrollmentParams = {
9171
9245
  type RevokeSelfHostEnrollmentParams = {
9172
9246
  pathParams: NonNullable<RevokeSelfHostEnrollmentRequestConfig["pathParams"]>;
9173
9247
  };
9248
+ type RotateSelfHostEnrollmentParams = {
9249
+ pathParams: NonNullable<RotateSelfHostEnrollmentRequestConfig["pathParams"]>;
9250
+ };
9174
9251
  type ListSupportCasesParams = {
9175
9252
  pathParams: NonNullable<ListSupportCasesRequestConfig["pathParams"]>;
9176
9253
  queryParams?: NonNullable<ListSupportCasesRequestConfig["queryParams"]>;
@@ -9295,6 +9372,7 @@ interface ApiOperations {
9295
9372
  listSelfHostEnrollments(params: ListSelfHostEnrollmentsParams): Promise<ListSelfHostEnrollmentsStatus200>;
9296
9373
  createSelfHostEnrollment(params: CreateSelfHostEnrollmentParams): Promise<CreateSelfHostEnrollmentStatus201>;
9297
9374
  revokeSelfHostEnrollment(params: RevokeSelfHostEnrollmentParams): Promise<void>;
9375
+ rotateSelfHostEnrollment(params: RotateSelfHostEnrollmentParams): Promise<RotateSelfHostEnrollmentStatus200>;
9298
9376
  };
9299
9377
  migrations: {
9300
9378
  lintMigration(params: LintMigrationParams): Promise<LintMigrationStatus200>;
@@ -9572,6 +9650,10 @@ interface RequestMap {
9572
9650
  params: RevokeSelfHostEnrollmentParams;
9573
9651
  response: void;
9574
9652
  };
9653
+ "POST /v1/organizations/{org_id}/self-host-enrollments/{enrollment_id}/rotate": {
9654
+ params: RotateSelfHostEnrollmentParams;
9655
+ response: RotateSelfHostEnrollmentStatus200;
9656
+ };
9575
9657
  "GET /v1/organizations/{org_id}/support/cases": {
9576
9658
  params: ListSupportCasesParams;
9577
9659
  response: ListSupportCasesStatus200;
@@ -1102,6 +1102,16 @@ type ApprovalRequest = {
1102
1102
  * @type string | undefined
1103
1103
  */
1104
1104
  statement_kind?: string;
1105
+ /**
1106
+ * @description Best-effort estimate of how many rows the statement would affect, attached by the data plane when the statement was held. Either the planner estimate from EXPLAIN or the exact count observed in a rolled-back trial execution. Null when no estimate could be made; treat it as an estimate, not a guarantee.
1107
+ * @type integer
1108
+ */
1109
+ estimated_rows?: number | null;
1110
+ /**
1111
+ * @description Relations the statement touches, from the gateway\'s parse analysis.
1112
+ * @type array | undefined
1113
+ */
1114
+ target_tables?: string[];
1105
1115
  /**
1106
1116
  * @description Current state of the approval request.
1107
1117
  * @type string
@@ -1347,6 +1357,7 @@ type AuditDecisionKey = (typeof auditDecision)[keyof typeof auditDecision];
1347
1357
  declare const auditSource: {
1348
1358
  readonly wire: "wire";
1349
1359
  readonly mcp: "mcp";
1360
+ readonly rest: "rest";
1350
1361
  readonly control: "control";
1351
1362
  };
1352
1363
  type AuditSourceKey = (typeof auditSource)[keyof typeof auditSource];
@@ -1447,7 +1458,7 @@ type AuditLogEntry = {
1447
1458
  */
1448
1459
  session_id?: string;
1449
1460
  /**
1450
- * @description Statement origin (wire, mcp, or control for control-plane lifecycle events).
1461
+ * @description Statement origin (wire, mcp, rest, or control for control-plane lifecycle events).
1451
1462
  * @type string | undefined
1452
1463
  */
1453
1464
  source?: string;
@@ -1524,7 +1535,7 @@ type ListAuditLogsQueryEvent = string | undefined;
1524
1535
  */
1525
1536
  type ListAuditLogsQueryDecision = AuditDecisionKey | undefined;
1526
1537
  /**
1527
- * @description Filter by statement origin (wire, mcp, or control).
1538
+ * @description Filter by statement origin (wire, mcp, rest, or control).
1528
1539
  * @type string | undefined
1529
1540
  */
1530
1541
  type ListAuditLogsQuerySource = AuditSourceKey | undefined;
@@ -1616,7 +1627,7 @@ type ExportAuditLogsQueryEvent = string | undefined;
1616
1627
  */
1617
1628
  type ExportAuditLogsQueryDecision = AuditDecisionKey | undefined;
1618
1629
  /**
1619
- * @description Filter by statement origin (wire, mcp, or control).
1630
+ * @description Filter by statement origin (wire, mcp, rest, or control).
1620
1631
  * @type string | undefined
1621
1632
  */
1622
1633
  type ExportAuditLogsQuerySource = AuditSourceKey | undefined;
@@ -6828,6 +6839,11 @@ type SelfHostEnrollment = {
6828
6839
  * @type string
6829
6840
  */
6830
6841
  revoked_at?: string | null;
6842
+ /**
6843
+ * @description When the enrollment token expires and stops authenticating new proxy connections. Null means it never expires. Enforcement is fail-closed at the gRPC auth gate the instant this time passes.
6844
+ * @type string
6845
+ */
6846
+ expires_at?: string | null;
6831
6847
  };
6832
6848
 
6833
6849
  /**
@@ -6908,6 +6924,11 @@ type CreateSelfHostEnrollmentRequest = {
6908
6924
  * @type string | undefined
6909
6925
  */
6910
6926
  description?: string;
6927
+ /**
6928
+ * @description Optional expiry. When set, the enrollment token stops authenticating new proxy connections at this time (must be in the future). Omit or set null for a token that never expires.
6929
+ * @type string
6930
+ */
6931
+ expires_at?: string | null;
6911
6932
  };
6912
6933
 
6913
6934
  /**
@@ -6916,7 +6937,7 @@ type CreateSelfHostEnrollmentRequest = {
6916
6937
  */
6917
6938
 
6918
6939
  /**
6919
- * @description Response returned once when an enrollment is created. The token is shown a single time and cannot be retrieved again; set it as GRPC_AUTH_TOKEN on the self-hosted proxy.\n
6940
+ * @description Response returned once when an enrollment is created or its token is rotated. The token is shown a single time and cannot be retrieved again; set it as GRPC_AUTH_TOKEN on the self-hosted proxy.\n
6920
6941
  * @type object
6921
6942
  */
6922
6943
  type SelfHostEnrollmentSecret = {
@@ -6946,7 +6967,7 @@ type SelfHostEnrollmentSecret = {
6946
6967
  */
6947
6968
  type CreateSelfHostEnrollmentPathOrgId = string;
6948
6969
  /**
6949
- * @description Response returned once when an enrollment is created. The token is shown a single time and cannot be retrieved again; set it as GRPC_AUTH_TOKEN on the self-hosted proxy.\n
6970
+ * @description Response returned once when an enrollment is created or its token is rotated. The token is shown a single time and cannot be retrieved again; set it as GRPC_AUTH_TOKEN on the self-hosted proxy.\n
6950
6971
  * @type object
6951
6972
  */
6952
6973
  type CreateSelfHostEnrollmentStatus201 = SelfHostEnrollmentSecret;
@@ -7013,6 +7034,50 @@ type RevokeSelfHostEnrollmentRequestConfig = {
7013
7034
  url: `/v1/organizations/${string}/self-host-enrollments/${string}`;
7014
7035
  };
7015
7036
 
7037
+ /**
7038
+ * Generated by Kubb (https://kubb.dev/).
7039
+ * Do not edit manually.
7040
+ */
7041
+
7042
+ /**
7043
+ * @description Unique organization identifier.
7044
+ * @pattern ^[a-zA-Z0-9_.-]+$
7045
+ * @example org_abc123
7046
+ * @type string
7047
+ */
7048
+ type RotateSelfHostEnrollmentPathOrgId = string;
7049
+ /**
7050
+ * @description Unique enrollment identifier.
7051
+ * @pattern ^[a-zA-Z0-9_.-]+$
7052
+ * @example she_01h455vb4pex5vsknk084sn02q
7053
+ * @type string
7054
+ */
7055
+ type RotateSelfHostEnrollmentPathEnrollmentId = string;
7056
+ /**
7057
+ * @description Response returned once when an enrollment is created or its token is rotated. The token is shown a single time and cannot be retrieved again; set it as GRPC_AUTH_TOKEN on the self-hosted proxy.\n
7058
+ * @type object
7059
+ */
7060
+ type RotateSelfHostEnrollmentStatus200 = SelfHostEnrollmentSecret;
7061
+ /**
7062
+ * @type object
7063
+ */
7064
+ type RotateSelfHostEnrollmentRequestConfig = {
7065
+ data?: never;
7066
+ /**
7067
+ * @type object
7068
+ */
7069
+ pathParams: {
7070
+ org_id: RotateSelfHostEnrollmentPathOrgId;
7071
+ enrollment_id: RotateSelfHostEnrollmentPathEnrollmentId;
7072
+ };
7073
+ queryParams?: never;
7074
+ headerParams?: never;
7075
+ /**
7076
+ * @type string
7077
+ */
7078
+ url: `/v1/organizations/${string}/self-host-enrollments/${string}/rotate`;
7079
+ };
7080
+
7016
7081
  /**
7017
7082
  * Generated by Kubb (https://kubb.dev/).
7018
7083
  * Do not edit manually.
@@ -8498,6 +8563,10 @@ declare const operationsByTag: {
8498
8563
  readonly method: "DELETE";
8499
8564
  readonly path: "/v1/organizations/{org_id}/self-host-enrollments/{enrollment_id}";
8500
8565
  };
8566
+ readonly rotateSelfHostEnrollment: {
8567
+ readonly method: "POST";
8568
+ readonly path: "/v1/organizations/{org_id}/self-host-enrollments/{enrollment_id}/rotate";
8569
+ };
8501
8570
  };
8502
8571
  readonly migrations: {
8503
8572
  readonly lintMigration: {
@@ -8896,6 +8965,11 @@ declare const operationsByPath: {
8896
8965
  readonly path: "/v1/organizations/{org_id}/self-host-enrollments/{enrollment_id}";
8897
8966
  readonly operationId: "revokeSelfHostEnrollment";
8898
8967
  };
8968
+ readonly "POST /v1/organizations/{org_id}/self-host-enrollments/{enrollment_id}/rotate": {
8969
+ readonly method: "POST";
8970
+ readonly path: "/v1/organizations/{org_id}/self-host-enrollments/{enrollment_id}/rotate";
8971
+ readonly operationId: "rotateSelfHostEnrollment";
8972
+ };
8899
8973
  readonly "GET /v1/organizations/{org_id}/support/cases": {
8900
8974
  readonly method: "GET";
8901
8975
  readonly path: "/v1/organizations/{org_id}/support/cases";
@@ -9171,6 +9245,9 @@ type CreateSelfHostEnrollmentParams = {
9171
9245
  type RevokeSelfHostEnrollmentParams = {
9172
9246
  pathParams: NonNullable<RevokeSelfHostEnrollmentRequestConfig["pathParams"]>;
9173
9247
  };
9248
+ type RotateSelfHostEnrollmentParams = {
9249
+ pathParams: NonNullable<RotateSelfHostEnrollmentRequestConfig["pathParams"]>;
9250
+ };
9174
9251
  type ListSupportCasesParams = {
9175
9252
  pathParams: NonNullable<ListSupportCasesRequestConfig["pathParams"]>;
9176
9253
  queryParams?: NonNullable<ListSupportCasesRequestConfig["queryParams"]>;
@@ -9295,6 +9372,7 @@ interface ApiOperations {
9295
9372
  listSelfHostEnrollments(params: ListSelfHostEnrollmentsParams): Promise<ListSelfHostEnrollmentsStatus200>;
9296
9373
  createSelfHostEnrollment(params: CreateSelfHostEnrollmentParams): Promise<CreateSelfHostEnrollmentStatus201>;
9297
9374
  revokeSelfHostEnrollment(params: RevokeSelfHostEnrollmentParams): Promise<void>;
9375
+ rotateSelfHostEnrollment(params: RotateSelfHostEnrollmentParams): Promise<RotateSelfHostEnrollmentStatus200>;
9298
9376
  };
9299
9377
  migrations: {
9300
9378
  lintMigration(params: LintMigrationParams): Promise<LintMigrationStatus200>;
@@ -9572,6 +9650,10 @@ interface RequestMap {
9572
9650
  params: RevokeSelfHostEnrollmentParams;
9573
9651
  response: void;
9574
9652
  };
9653
+ "POST /v1/organizations/{org_id}/self-host-enrollments/{enrollment_id}/rotate": {
9654
+ params: RotateSelfHostEnrollmentParams;
9655
+ response: RotateSelfHostEnrollmentStatus200;
9656
+ };
9575
9657
  "GET /v1/organizations/{org_id}/support/cases": {
9576
9658
  params: ListSupportCasesParams;
9577
9659
  response: ListSupportCasesStatus200;
@@ -286,7 +286,7 @@
286
286
  ],
287
287
  "requestBodyType": "",
288
288
  "requestBodyRequired": false,
289
- "responseType": "{ approvals: ({ credential_id?: string; decided_at?: string; decided_by?: string; expires_at: string; id: string; normalized_sql?: string; policy_profile_id: string; project_id: string; reason?: string; region?: string; requested_at: string; session_id?: string; sql: string; statement_kind?: string; status: \"pending\" | \"approved\" | \"rejected\" | \"expired\" | \"executed\" | \"failed\" })[]; next_page_token?: string }",
289
+ "responseType": "{ approvals: ({ credential_id?: string; decided_at?: string; decided_by?: string; estimated_rows?: number; expires_at: string; id: string; normalized_sql?: string; policy_profile_id: string; project_id: string; reason?: string; region?: string; requested_at: string; session_id?: string; sql: string; statement_kind?: string; status: \"pending\" | \"approved\" | \"rejected\" | \"expired\" | \"executed\" | \"failed\"; target_tables?: string[] })[]; next_page_token?: string }",
290
290
  "responseStatus": "200"
291
291
  },
292
292
  "approveApprovalRequest": {
@@ -313,7 +313,7 @@
313
313
  ],
314
314
  "requestBodyType": "{ reason?: string }",
315
315
  "requestBodyRequired": false,
316
- "responseType": "{ credential_id?: string; decided_at?: string; decided_by?: string; expires_at: string; id: string; normalized_sql?: string; policy_profile_id: string; project_id: string; reason?: string; region?: string; requested_at: string; session_id?: string; sql: string; statement_kind?: string; status: \"pending\" | \"approved\" | \"rejected\" | \"expired\" | \"executed\" | \"failed\" }",
316
+ "responseType": "{ credential_id?: string; decided_at?: string; decided_by?: string; estimated_rows?: number; expires_at: string; id: string; normalized_sql?: string; policy_profile_id: string; project_id: string; reason?: string; region?: string; requested_at: string; session_id?: string; sql: string; statement_kind?: string; status: \"pending\" | \"approved\" | \"rejected\" | \"expired\" | \"executed\" | \"failed\"; target_tables?: string[] }",
317
317
  "responseStatus": "200"
318
318
  },
319
319
  "rejectApprovalRequest": {
@@ -340,7 +340,7 @@
340
340
  ],
341
341
  "requestBodyType": "{ reason?: string }",
342
342
  "requestBodyRequired": false,
343
- "responseType": "{ credential_id?: string; decided_at?: string; decided_by?: string; expires_at: string; id: string; normalized_sql?: string; policy_profile_id: string; project_id: string; reason?: string; region?: string; requested_at: string; session_id?: string; sql: string; statement_kind?: string; status: \"pending\" | \"approved\" | \"rejected\" | \"expired\" | \"executed\" | \"failed\" }",
343
+ "responseType": "{ credential_id?: string; decided_at?: string; decided_by?: string; estimated_rows?: number; expires_at: string; id: string; normalized_sql?: string; policy_profile_id: string; project_id: string; reason?: string; region?: string; requested_at: string; session_id?: string; sql: string; statement_kind?: string; status: \"pending\" | \"approved\" | \"rejected\" | \"expired\" | \"executed\" | \"failed\"; target_tables?: string[] }",
344
344
  "responseStatus": "200"
345
345
  },
346
346
  "listAuditLogs": {
@@ -382,8 +382,8 @@
382
382
  "name": "source",
383
383
  "in": "query",
384
384
  "required": false,
385
- "type": "\"wire\" | \"mcp\" | \"control\"",
386
- "description": "Filter by statement origin (wire, mcp, or control)."
385
+ "type": "\"wire\" | \"mcp\" | \"rest\" | \"control\"",
386
+ "description": "Filter by statement origin (wire, mcp, rest, or control)."
387
387
  },
388
388
  {
389
389
  "name": "start",
@@ -458,8 +458,8 @@
458
458
  "name": "source",
459
459
  "in": "query",
460
460
  "required": false,
461
- "type": "\"wire\" | \"mcp\" | \"control\"",
462
- "description": "Filter by statement origin (wire, mcp, or control)."
461
+ "type": "\"wire\" | \"mcp\" | \"rest\" | \"control\"",
462
+ "description": "Filter by statement origin (wire, mcp, rest, or control)."
463
463
  },
464
464
  {
465
465
  "name": "start",
@@ -1598,7 +1598,7 @@
1598
1598
  ],
1599
1599
  "requestBodyType": "",
1600
1600
  "requestBodyRequired": false,
1601
- "responseType": "{ enrollments: ({ created_at: string; created_by?: string; description?: string; id: string; last_seen_at?: string; org_id: string; region_label?: string; revoked_at?: string })[] }",
1601
+ "responseType": "{ enrollments: ({ created_at: string; created_by?: string; description?: string; expires_at?: string; id: string; last_seen_at?: string; org_id: string; region_label?: string; revoked_at?: string })[] }",
1602
1602
  "responseStatus": "200"
1603
1603
  },
1604
1604
  "createSelfHostEnrollment": {
@@ -1616,9 +1616,9 @@
1616
1616
  "description": "Unique organization identifier."
1617
1617
  }
1618
1618
  ],
1619
- "requestBodyType": "{ description?: string; region_label?: string }",
1619
+ "requestBodyType": "{ description?: string; expires_at?: string; region_label?: string }",
1620
1620
  "requestBodyRequired": false,
1621
- "responseType": "{ enrollment: { created_at: string; created_by?: string; description?: string; id: string; last_seen_at?: string; org_id: string; region_label?: string; revoked_at?: string }; token: string }",
1621
+ "responseType": "{ enrollment: { created_at: string; created_by?: string; description?: string; expires_at?: string; id: string; last_seen_at?: string; org_id: string; region_label?: string; revoked_at?: string }; token: string }",
1622
1622
  "responseStatus": "201"
1623
1623
  },
1624
1624
  "revokeSelfHostEnrollment": {
@@ -1648,6 +1648,33 @@
1648
1648
  "responseType": "",
1649
1649
  "responseStatus": "204"
1650
1650
  },
1651
+ "rotateSelfHostEnrollment": {
1652
+ "operationId": "rotateSelfHostEnrollment",
1653
+ "method": "POST",
1654
+ "path": "/v1/organizations/{org_id}/self-host-enrollments/{enrollment_id}/rotate",
1655
+ "summary": "Rotate a self-host enrollment token",
1656
+ "description": "Mints a new enrollment token in place, keeping the same enrollment id, metadata, and expiry. The swap is atomic: the old token stops authenticating new proxy connections the moment this call returns. An already-connected proxy keeps its existing gRPC streams until it disconnects, then must present the new token to reconnect. The new token is returned once and cannot be retrieved again.",
1657
+ "parameters": [
1658
+ {
1659
+ "name": "org_id",
1660
+ "in": "path",
1661
+ "required": true,
1662
+ "type": "string",
1663
+ "description": "Unique organization identifier."
1664
+ },
1665
+ {
1666
+ "name": "enrollment_id",
1667
+ "in": "path",
1668
+ "required": true,
1669
+ "type": "string",
1670
+ "description": "Unique enrollment identifier."
1671
+ }
1672
+ ],
1673
+ "requestBodyType": "",
1674
+ "requestBodyRequired": false,
1675
+ "responseType": "{ enrollment: { created_at: string; created_by?: string; description?: string; expires_at?: string; id: string; last_seen_at?: string; org_id: string; region_label?: string; revoked_at?: string }; token: string }",
1676
+ "responseStatus": "200"
1677
+ },
1651
1678
  "listSupportCases": {
1652
1679
  "operationId": "listSupportCases",
1653
1680
  "method": "GET",
@@ -2281,6 +2308,10 @@
2281
2308
  revokeSelfHostEnrollment: {
2282
2309
  method: "DELETE",
2283
2310
  path: "/v1/organizations/{org_id}/self-host-enrollments/{enrollment_id}"
2311
+ },
2312
+ rotateSelfHostEnrollment: {
2313
+ method: "POST",
2314
+ path: "/v1/organizations/{org_id}/self-host-enrollments/{enrollment_id}/rotate"
2284
2315
  }
2285
2316
  },
2286
2317
  migrations: {
@@ -2680,6 +2711,11 @@ const operationsByPath = {
2680
2711
  path: "/v1/organizations/{org_id}/self-host-enrollments/{enrollment_id}",
2681
2712
  operationId: "revokeSelfHostEnrollment"
2682
2713
  },
2714
+ "POST /v1/organizations/{org_id}/self-host-enrollments/{enrollment_id}/rotate": {
2715
+ method: "POST",
2716
+ path: "/v1/organizations/{org_id}/self-host-enrollments/{enrollment_id}/rotate",
2717
+ operationId: "rotateSelfHostEnrollment"
2718
+ },
2683
2719
  "GET /v1/organizations/{org_id}/support/cases": {
2684
2720
  method: "GET",
2685
2721
  path: "/v1/organizations/{org_id}/support/cases",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pgbeam",
3
- "version": "0.3.9",
3
+ "version": "0.3.11",
4
4
  "description": "TypeScript SDK for the PgBeam API — globally distributed PostgreSQL proxy platform",
5
5
  "type": "module",
6
6
  "exports": {