pgbeam 0.3.7 → 0.3.9

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.
@@ -1456,6 +1456,21 @@ type AuditLogEntry = {
1456
1456
  * @type string
1457
1457
  */
1458
1458
  ts: string;
1459
+ /**
1460
+ * @description Monotonic per-project position in the tamper-evident hash chain.
1461
+ * @type integer | undefined
1462
+ */
1463
+ seq?: number;
1464
+ /**
1465
+ * @description Hex SHA-256 of the previous chained entry (a fixed genesis value for the first entry). Empty for pre-chain legacy entries.
1466
+ * @type string | undefined
1467
+ */
1468
+ prev_hash?: string;
1469
+ /**
1470
+ * @description Hex SHA-256 of this entry\'s canonical content chained onto prev_hash. Empty for pre-chain legacy entries.
1471
+ * @type string | undefined
1472
+ */
1473
+ entry_hash?: string;
1459
1474
  };
1460
1475
 
1461
1476
  /**
@@ -1648,6 +1663,108 @@ type ExportAuditLogsRequestConfig = {
1648
1663
  url: `/v1/projects/${string}/audit-logs/export`;
1649
1664
  };
1650
1665
 
1666
+ /**
1667
+ * Generated by Kubb (https://kubb.dev/).
1668
+ * Do not edit manually.
1669
+ */
1670
+ /**
1671
+ * @description Result of recomputing the project\'s tamper-evident audit hash chain over a time range. The chain links each entry to its predecessor, so editing or deleting any row breaks it.
1672
+ * @type object
1673
+ */
1674
+ type AuditChainVerification = {
1675
+ /**
1676
+ * @description True when every chained entry in the range links correctly and no tampering or deletion was detected.
1677
+ * @type boolean
1678
+ */
1679
+ ok: boolean;
1680
+ /**
1681
+ * @description Number of chained entries checked.
1682
+ * @type integer
1683
+ */
1684
+ verified_count: number;
1685
+ /**
1686
+ * @description Pre-chain (legacy) entries in the range that predate the hash chain and were skipped rather than treated as tampering.
1687
+ * @type integer
1688
+ */
1689
+ unchained_count: number;
1690
+ /**
1691
+ * @description Sequence number of the first chained entry checked. Null when none.
1692
+ * @type integer
1693
+ */
1694
+ chain_start_seq?: number | null;
1695
+ /**
1696
+ * @description Sequence number of the last chained entry checked. Null when none.
1697
+ * @type integer
1698
+ */
1699
+ chain_end_seq?: number | null;
1700
+ /**
1701
+ * @description Sequence number where verification first failed (a tampered or deleted entry). Null when ok.
1702
+ * @type integer
1703
+ */
1704
+ first_broken_seq?: number | null;
1705
+ /**
1706
+ * @description Machine-readable failure kind: hash_mismatch (entry content edited), broken_link (prev_hash does not match the predecessor), or missing_entry (a sequence number was deleted). Null when ok.
1707
+ * @type string
1708
+ */
1709
+ failure_reason?: string | null;
1710
+ /**
1711
+ * @description When verification ran.
1712
+ * @type string
1713
+ */
1714
+ verified_at: string;
1715
+ };
1716
+
1717
+ /**
1718
+ * Generated by Kubb (https://kubb.dev/).
1719
+ * Do not edit manually.
1720
+ */
1721
+
1722
+ /**
1723
+ * @description Unique project identifier (prefixed, e.g. prj_xxx).
1724
+ * @pattern ^[a-zA-Z0-9_.-]+$
1725
+ * @type string
1726
+ */
1727
+ type VerifyAuditChainPathProjectId = string;
1728
+ /**
1729
+ * @description Return entries at or after this timestamp (inclusive lower bound).
1730
+ * @type string | undefined
1731
+ */
1732
+ type VerifyAuditChainQueryStart = string | undefined;
1733
+ /**
1734
+ * @description Return entries strictly older than this timestamp (cursor / upper bound).
1735
+ * @type string | undefined
1736
+ */
1737
+ type VerifyAuditChainQueryEnd = string | undefined;
1738
+ /**
1739
+ * @description Result of recomputing the project\'s tamper-evident audit hash chain over a time range. The chain links each entry to its predecessor, so editing or deleting any row breaks it.
1740
+ * @type object
1741
+ */
1742
+ type VerifyAuditChainStatus200 = AuditChainVerification;
1743
+ /**
1744
+ * @type object
1745
+ */
1746
+ type VerifyAuditChainRequestConfig = {
1747
+ data?: never;
1748
+ /**
1749
+ * @type object
1750
+ */
1751
+ pathParams: {
1752
+ project_id: VerifyAuditChainPathProjectId;
1753
+ };
1754
+ /**
1755
+ * @type object | undefined
1756
+ */
1757
+ queryParams?: {
1758
+ start?: VerifyAuditChainQueryStart;
1759
+ end?: VerifyAuditChainQueryEnd;
1760
+ };
1761
+ headerParams?: never;
1762
+ /**
1763
+ * @type string
1764
+ */
1765
+ url: `/v1/projects/${string}/audit-logs/verify`;
1766
+ };
1767
+
1651
1768
  /**
1652
1769
  * Generated by Kubb (https://kubb.dev/).
1653
1770
  * Do not edit manually.
@@ -1697,6 +1814,36 @@ type PlanLimits = {
1697
1814
  * @type integer
1698
1815
  */
1699
1816
  included_seats: number;
1817
+ /**
1818
+ * @description Maximum agent credentials per organization. 0 means unlimited.
1819
+ * @type integer
1820
+ */
1821
+ max_agent_credentials: number;
1822
+ /**
1823
+ * @description Agent audit-log retention window in days.
1824
+ * @type integer
1825
+ */
1826
+ audit_retention_days: number;
1827
+ /**
1828
+ * @description Maximum concurrently active instant (sandbox) branches. 0 means no limit.
1829
+ * @type integer
1830
+ */
1831
+ sandbox_max_branches: number;
1832
+ /**
1833
+ * @description Maximum upstream source-database size a sandbox base sync accepts, in bytes. 0 means no limit.
1834
+ * @type integer
1835
+ */
1836
+ sandbox_max_upstream_bytes: number;
1837
+ /**
1838
+ * @description Idle time before an instant (sandbox) branch scales to zero, in seconds.
1839
+ * @type integer
1840
+ */
1841
+ sandbox_idle_seconds: number;
1842
+ /**
1843
+ * @description Lifetime of an instant (sandbox) branch before the TTL sweep discards it, in seconds.
1844
+ * @type integer
1845
+ */
1846
+ sandbox_ttl_seconds: number;
1700
1847
  };
1701
1848
 
1702
1849
  /**
@@ -5376,6 +5523,250 @@ type DryEvalPolicyRequestConfig = {
5376
5523
  url: `/v1/projects/${string}/policy-evaluations`;
5377
5524
  };
5378
5525
 
5526
+ /**
5527
+ * Generated by Kubb (https://kubb.dev/).
5528
+ * Do not edit manually.
5529
+ */
5530
+
5531
+ /**
5532
+ * @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).
5533
+ * @type object
5534
+ */
5535
+ type PolicyReplayInput = {
5536
+ /**
5537
+ * @description ID of an existing saved policy profile to replay against.
5538
+ * @example pol_01h455vb4pex5vsknk084sn02q
5539
+ * @type string | undefined
5540
+ */
5541
+ policy_id?: string;
5542
+ /**
5543
+ * @description Mutable fields of a policy profile (used for create and update).
5544
+ * @type object | undefined
5545
+ */
5546
+ policy?: PolicyProfileInput;
5547
+ /**
5548
+ * @description Restrict the replay to traffic recorded for one agent credential.
5549
+ * @example cred_01h455vb4pex5vsknk084sn02q
5550
+ * @type string | undefined
5551
+ */
5552
+ credential_id?: string;
5553
+ /**
5554
+ * @description Start of the traffic window (inclusive). Defaults to 7 days before end_ts.
5555
+ * @type string | undefined
5556
+ */
5557
+ start_ts?: string;
5558
+ /**
5559
+ * @description End of the traffic window (exclusive). Defaults to now.
5560
+ * @type string | undefined
5561
+ */
5562
+ end_ts?: string;
5563
+ /**
5564
+ * @description Maximum number of distinct queries to replay, newest first. Traffic is deduplicated by normalized query hash before evaluation.
5565
+ * @minLength 1
5566
+ * @maxLength 500
5567
+ * @default 200
5568
+ * @type integer | undefined
5569
+ */
5570
+ limit?: number;
5571
+ };
5572
+
5573
+ /**
5574
+ * Generated by Kubb (https://kubb.dev/).
5575
+ * Do not edit manually.
5576
+ */
5577
+
5578
+ declare const policyReplayItemChangeEnum: {
5579
+ readonly newly_blocked: "newly_blocked";
5580
+ readonly newly_allowed: "newly_allowed";
5581
+ readonly still_allowed: "still_allowed";
5582
+ readonly still_blocked: "still_blocked";
5583
+ };
5584
+ type PolicyReplayItemChangeEnumKey = (typeof policyReplayItemChangeEnum)[keyof typeof policyReplayItemChangeEnum];
5585
+ /**
5586
+ * @description One distinct recorded query and the decision the candidate policy would reach for it.
5587
+ * @type object
5588
+ */
5589
+ type PolicyReplayItem = {
5590
+ /**
5591
+ * @description Normalized query hash identifying this statement shape.
5592
+ * @type string
5593
+ */
5594
+ query_hash: string;
5595
+ /**
5596
+ * @description The recorded statement (normalized, literals replaced with $N placeholders), from its most recent occurrence.
5597
+ * @type string
5598
+ */
5599
+ sql: string;
5600
+ /**
5601
+ * @description Statement kind (select, insert, update, delete, ddl, ...).
5602
+ * @type string | undefined
5603
+ */
5604
+ statement_kind?: string;
5605
+ /**
5606
+ * @description How many recorded entries share this query shape in the window.
5607
+ * @type integer
5608
+ */
5609
+ occurrences: number;
5610
+ /**
5611
+ * @description Oldest occurrence in the window.
5612
+ * @type string
5613
+ */
5614
+ first_seen: string;
5615
+ /**
5616
+ * @description Newest occurrence in the window.
5617
+ * @type string
5618
+ */
5619
+ last_seen: string;
5620
+ /**
5621
+ * @description The most recent recorded outcome for this query (query, masked, truncated, or blocked).
5622
+ * @type string
5623
+ */
5624
+ recorded_event: string;
5625
+ /**
5626
+ * @description The decision rule recorded with a blocked outcome.
5627
+ * @type string | undefined
5628
+ */
5629
+ recorded_rule?: string;
5630
+ /**
5631
+ * @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.
5632
+ * @type string
5633
+ */
5634
+ change: PolicyReplayItemChangeEnumKey;
5635
+ /**
5636
+ * @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.
5637
+ * @type object
5638
+ */
5639
+ result: DryEvalResult;
5640
+ };
5641
+
5642
+ /**
5643
+ * Generated by Kubb (https://kubb.dev/).
5644
+ * Do not edit manually.
5645
+ */
5646
+ /**
5647
+ * @description Aggregate outcome of a policy replay.
5648
+ * @type object
5649
+ */
5650
+ type PolicyReplaySummary = {
5651
+ /**
5652
+ * @description Recorded audit entries covered by the replayed queries.
5653
+ * @type integer
5654
+ */
5655
+ entries_scanned: number;
5656
+ /**
5657
+ * @description Distinct normalized queries found in the window (capped at limit).
5658
+ * @type integer
5659
+ */
5660
+ distinct_queries: number;
5661
+ /**
5662
+ * @description Distinct queries actually evaluated against the candidate policy.
5663
+ * @type integer
5664
+ */
5665
+ evaluated: number;
5666
+ /**
5667
+ * @description Queries the candidate policy would allow unchanged.
5668
+ * @type integer
5669
+ */
5670
+ would_allow: number;
5671
+ /**
5672
+ * @description Queries the candidate policy would block.
5673
+ * @type integer
5674
+ */
5675
+ would_block: number;
5676
+ /**
5677
+ * @description Queries the candidate policy would mask result columns on.
5678
+ * @type integer
5679
+ */
5680
+ would_mask: number;
5681
+ /**
5682
+ * @description Queries the candidate policy would inject a row filter into.
5683
+ * @type integer
5684
+ */
5685
+ would_row_filter: number;
5686
+ /**
5687
+ * @description Queries that executed under the recorded policy but the candidate policy would block.
5688
+ * @type integer
5689
+ */
5690
+ newly_blocked: number;
5691
+ /**
5692
+ * @description Queries that were blocked when recorded but the candidate policy would permit.
5693
+ * @type integer
5694
+ */
5695
+ newly_allowed: number;
5696
+ /**
5697
+ * @description Distinct queries skipped because the stored statement was truncated at record time and can no longer be parsed faithfully.
5698
+ * @type integer
5699
+ */
5700
+ skipped_unparseable: number;
5701
+ /**
5702
+ * @description True when the window contained more distinct queries than limit; only the newest were replayed.
5703
+ * @type boolean
5704
+ */
5705
+ truncated: boolean;
5706
+ };
5707
+
5708
+ /**
5709
+ * Generated by Kubb (https://kubb.dev/).
5710
+ * Do not edit manually.
5711
+ */
5712
+
5713
+ /**
5714
+ * @description The outcome of replaying recorded agent traffic against a candidate policy: an aggregate summary plus per-query decisions, changes first.
5715
+ * @type object
5716
+ */
5717
+ type PolicyReplayResult = {
5718
+ /**
5719
+ * @description Aggregate outcome of a policy replay.
5720
+ * @type object
5721
+ */
5722
+ summary: PolicyReplaySummary;
5723
+ /**
5724
+ * @description Per-query replay decisions, ordered changes first (newly blocked, then newly allowed), then by occurrence count.
5725
+ * @type array
5726
+ */
5727
+ items: PolicyReplayItem[];
5728
+ };
5729
+
5730
+ /**
5731
+ * Generated by Kubb (https://kubb.dev/).
5732
+ * Do not edit manually.
5733
+ */
5734
+
5735
+ /**
5736
+ * @description Unique project identifier (prefixed, e.g. prj_xxx).
5737
+ * @pattern ^[a-zA-Z0-9_.-]+$
5738
+ * @type string
5739
+ */
5740
+ type ReplayPolicyPathProjectId = string;
5741
+ /**
5742
+ * @description The outcome of replaying recorded agent traffic against a candidate policy: an aggregate summary plus per-query decisions, changes first.
5743
+ * @type object
5744
+ */
5745
+ type ReplayPolicyStatus200 = PolicyReplayResult;
5746
+ /**
5747
+ * @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).
5748
+ * @type object
5749
+ */
5750
+ type ReplayPolicyData = PolicyReplayInput;
5751
+ /**
5752
+ * @type object
5753
+ */
5754
+ type ReplayPolicyRequestConfig = {
5755
+ data?: ReplayPolicyData;
5756
+ /**
5757
+ * @type object
5758
+ */
5759
+ pathParams: {
5760
+ project_id: ReplayPolicyPathProjectId;
5761
+ };
5762
+ queryParams?: never;
5763
+ headerParams?: never;
5764
+ /**
5765
+ * @type string
5766
+ */
5767
+ url: `/v1/projects/${string}/policy-replays`;
5768
+ };
5769
+
5379
5770
  /**
5380
5771
  * Generated by Kubb (https://kubb.dev/).
5381
5772
  * Do not edit manually.
@@ -5401,6 +5792,17 @@ type CidrEntry = {
5401
5792
  label?: string;
5402
5793
  };
5403
5794
 
5795
+ /**
5796
+ * Generated by Kubb (https://kubb.dev/).
5797
+ * Do not edit manually.
5798
+ */
5799
+ declare const dataResidency: {
5800
+ readonly any: "any";
5801
+ readonly us: "us";
5802
+ readonly eu: "eu";
5803
+ };
5804
+ type DataResidencyKey = (typeof dataResidency)[keyof typeof dataResidency];
5805
+
5404
5806
  /**
5405
5807
  * Generated by Kubb (https://kubb.dev/).
5406
5808
  * Do not edit manually.
@@ -5466,6 +5868,12 @@ type Project = {
5466
5868
  * @type string | undefined
5467
5869
  */
5468
5870
  readonly cloud?: ProjectCloudEnumKey;
5871
+ /**
5872
+ * @description When true, this project\'s data plane runs in the customer\'s own VPC/cluster (BYOC): the control plane does not provision hosted infra, and a self-hosted proxy dials home over the config/audit gRPC stream. Requires the Scale or enterprise plan.\n
5873
+ * @example false
5874
+ * @type boolean | undefined
5875
+ */
5876
+ readonly self_hosted?: boolean;
5469
5877
  /**
5470
5878
  * @description Proxy hostname for connecting through PgBeam (e.g., myproject.proxy.pgbeam.app).
5471
5879
  * @type string | undefined
@@ -5501,6 +5909,13 @@ type Project = {
5501
5909
  * @type string
5502
5910
  */
5503
5911
  default_policy_profile_id?: string | null;
5912
+ /**
5913
+ * @description Data-residency requirement for the project. \"any\" (default) lets queries be served from the nearest data-plane metro. \"us\" or \"eu\" require the serving metro to be in that jurisdiction; the proxy fails a connection closed when it is served from a metro outside the required jurisdiction, so regulated workloads never process outside their permitted region.\n
5914
+ * @default "any"
5915
+ * @example eu
5916
+ * @type string | undefined
5917
+ */
5918
+ residency?: DataResidencyKey;
5504
5919
  /**
5505
5920
  * @description Project-level kill-switch. When true, ALL agent-credential connections to this project are blocked at the proxy and live agent sessions are dropped within seconds. Passthrough/human connections are unaffected.\n
5506
5921
  * @example false
@@ -5673,6 +6088,12 @@ type CreateProjectRequest = {
5673
6088
  * @type string | undefined
5674
6089
  */
5675
6090
  cloud?: CreateProjectRequestCloudEnumKey;
6091
+ /**
6092
+ * @description Mark this project as running on a self-hosted (BYOC) data plane in the customer\'s own VPC/cluster. Requires the Scale or enterprise plan.\n
6093
+ * @default false
6094
+ * @type boolean | undefined
6095
+ */
6096
+ self_hosted?: boolean;
5676
6097
  /**
5677
6098
  * @description Primary database. Created atomically with the project.
5678
6099
  * @type object
@@ -5815,6 +6236,13 @@ type UpdateProjectRequest = {
5815
6236
  * @type string
5816
6237
  */
5817
6238
  default_policy_profile_id?: string | null;
6239
+ /**
6240
+ * @description Data-residency requirement for the project. \"any\" (default) lets queries be served from the nearest data-plane metro. \"us\" or \"eu\" require the serving metro to be in that jurisdiction; the proxy fails a connection closed when it is served from a metro outside the required jurisdiction, so regulated workloads never process outside their permitted region.\n
6241
+ * @default "any"
6242
+ * @example eu
6243
+ * @type string | undefined
6244
+ */
6245
+ residency?: DataResidencyKey;
5818
6246
  /**
5819
6247
  * @description Project-level kill-switch. Set true to block ALL agent-credential connections to this project (live agent sessions are dropped within seconds); set false to re-enable them. Passthrough/human connections are unaffected. Engaging the kill-switch emits a kill_switch webhook event.\n
5820
6248
  * @example true
@@ -6347,6 +6775,244 @@ type DeleteReplicaRequestConfig = {
6347
6775
  url: `/v1/databases/${string}/replicas/${string}`;
6348
6776
  };
6349
6777
 
6778
+ /**
6779
+ * Generated by Kubb (https://kubb.dev/).
6780
+ * Do not edit manually.
6781
+ */
6782
+ /**
6783
+ * @description An enrollment that lets a self-hosted (BYOC) proxy authenticate to the control plane\'s config/audit gRPC stream on behalf of an organization. The token itself is never returned after creation, only its metadata.\n
6784
+ * @type object
6785
+ */
6786
+ type SelfHostEnrollment = {
6787
+ /**
6788
+ * @description Unique enrollment identifier.
6789
+ * @example she_01h455vb4pex5vsknk084sn02q
6790
+ * @type string
6791
+ */
6792
+ id: string;
6793
+ /**
6794
+ * @description Organization that owns this enrollment.
6795
+ * @example org_abc123
6796
+ * @type string
6797
+ */
6798
+ org_id: string;
6799
+ /**
6800
+ * @description Operator-supplied label for where the proxy runs (informational).
6801
+ * @example customer-vpc-us-east
6802
+ * @type string | undefined
6803
+ */
6804
+ region_label?: string;
6805
+ /**
6806
+ * @description Optional human-readable note.
6807
+ * @example prod cluster
6808
+ * @type string | undefined
6809
+ */
6810
+ description?: string;
6811
+ /**
6812
+ * @description User ID that created the enrollment.
6813
+ * @type string
6814
+ */
6815
+ created_by?: string | null;
6816
+ /**
6817
+ * @description When the enrollment was created.
6818
+ * @type string
6819
+ */
6820
+ created_at: string;
6821
+ /**
6822
+ * @description Last time a proxy authenticated with this enrollment.
6823
+ * @type string
6824
+ */
6825
+ last_seen_at?: string | null;
6826
+ /**
6827
+ * @description When the enrollment was revoked. Null means active.
6828
+ * @type string
6829
+ */
6830
+ revoked_at?: string | null;
6831
+ };
6832
+
6833
+ /**
6834
+ * Generated by Kubb (https://kubb.dev/).
6835
+ * Do not edit manually.
6836
+ */
6837
+
6838
+ /**
6839
+ * @description List of self-host enrollments for an organization.
6840
+ * @type object
6841
+ */
6842
+ type ListSelfHostEnrollmentsResponse = {
6843
+ /**
6844
+ * @description The organization\'s self-host enrollments, newest first.
6845
+ * @type array
6846
+ */
6847
+ enrollments: SelfHostEnrollment[];
6848
+ };
6849
+
6850
+ /**
6851
+ * Generated by Kubb (https://kubb.dev/).
6852
+ * Do not edit manually.
6853
+ */
6854
+
6855
+ /**
6856
+ * @description Unique organization identifier.
6857
+ * @pattern ^[a-zA-Z0-9_.-]+$
6858
+ * @example org_abc123
6859
+ * @type string
6860
+ */
6861
+ type ListSelfHostEnrollmentsPathOrgId = string;
6862
+ /**
6863
+ * @description List of self-host enrollments for an organization.
6864
+ * @type object
6865
+ */
6866
+ type ListSelfHostEnrollmentsStatus200 = ListSelfHostEnrollmentsResponse;
6867
+ /**
6868
+ * @type object
6869
+ */
6870
+ type ListSelfHostEnrollmentsRequestConfig = {
6871
+ data?: never;
6872
+ /**
6873
+ * @type object
6874
+ */
6875
+ pathParams: {
6876
+ org_id: ListSelfHostEnrollmentsPathOrgId;
6877
+ };
6878
+ queryParams?: never;
6879
+ headerParams?: never;
6880
+ /**
6881
+ * @type string
6882
+ */
6883
+ url: `/v1/organizations/${string}/self-host-enrollments`;
6884
+ };
6885
+
6886
+ /**
6887
+ * Generated by Kubb (https://kubb.dev/).
6888
+ * Do not edit manually.
6889
+ */
6890
+ /**
6891
+ * @description Request body for issuing a self-host enrollment token.
6892
+ * @type object
6893
+ */
6894
+ type CreateSelfHostEnrollmentRequest = {
6895
+ /**
6896
+ * @description Operator-supplied label for where the proxy runs.
6897
+ * @maxLength 100
6898
+ * @pattern ^[^\x00]*$
6899
+ * @example customer-vpc-us-east
6900
+ * @type string | undefined
6901
+ */
6902
+ region_label?: string;
6903
+ /**
6904
+ * @description Optional human-readable note.
6905
+ * @maxLength 500
6906
+ * @pattern ^[^\x00]*$
6907
+ * @example prod cluster
6908
+ * @type string | undefined
6909
+ */
6910
+ description?: string;
6911
+ };
6912
+
6913
+ /**
6914
+ * Generated by Kubb (https://kubb.dev/).
6915
+ * Do not edit manually.
6916
+ */
6917
+
6918
+ /**
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
6920
+ * @type object
6921
+ */
6922
+ type SelfHostEnrollmentSecret = {
6923
+ /**
6924
+ * @description An enrollment that lets a self-hosted (BYOC) proxy authenticate to the control plane\'s config/audit gRPC stream on behalf of an organization. The token itself is never returned after creation, only its metadata.\n
6925
+ * @type object
6926
+ */
6927
+ enrollment: SelfHostEnrollment;
6928
+ /**
6929
+ * @description The plaintext enrollment token (pbh_...). Shown once.
6930
+ * @example pbh_01h455vb4pex5vsknk084sn02q9zk3m7
6931
+ * @type string
6932
+ */
6933
+ token: string;
6934
+ };
6935
+
6936
+ /**
6937
+ * Generated by Kubb (https://kubb.dev/).
6938
+ * Do not edit manually.
6939
+ */
6940
+
6941
+ /**
6942
+ * @description Unique organization identifier.
6943
+ * @pattern ^[a-zA-Z0-9_.-]+$
6944
+ * @example org_abc123
6945
+ * @type string
6946
+ */
6947
+ type CreateSelfHostEnrollmentPathOrgId = string;
6948
+ /**
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
6950
+ * @type object
6951
+ */
6952
+ type CreateSelfHostEnrollmentStatus201 = SelfHostEnrollmentSecret;
6953
+ /**
6954
+ * @description Request body for issuing a self-host enrollment token.
6955
+ * @type object | undefined
6956
+ */
6957
+ type CreateSelfHostEnrollmentData = CreateSelfHostEnrollmentRequest | undefined;
6958
+ /**
6959
+ * @type object
6960
+ */
6961
+ type CreateSelfHostEnrollmentRequestConfig = {
6962
+ data?: CreateSelfHostEnrollmentData;
6963
+ /**
6964
+ * @type object
6965
+ */
6966
+ pathParams: {
6967
+ org_id: CreateSelfHostEnrollmentPathOrgId;
6968
+ };
6969
+ queryParams?: never;
6970
+ headerParams?: never;
6971
+ /**
6972
+ * @type string
6973
+ */
6974
+ url: `/v1/organizations/${string}/self-host-enrollments`;
6975
+ };
6976
+
6977
+ /**
6978
+ * Generated by Kubb (https://kubb.dev/).
6979
+ * Do not edit manually.
6980
+ */
6981
+
6982
+ /**
6983
+ * @description Unique organization identifier.
6984
+ * @pattern ^[a-zA-Z0-9_.-]+$
6985
+ * @example org_abc123
6986
+ * @type string
6987
+ */
6988
+ type RevokeSelfHostEnrollmentPathOrgId = string;
6989
+ /**
6990
+ * @description Unique enrollment identifier.
6991
+ * @pattern ^[a-zA-Z0-9_.-]+$
6992
+ * @example she_01h455vb4pex5vsknk084sn02q
6993
+ * @type string
6994
+ */
6995
+ type RevokeSelfHostEnrollmentPathEnrollmentId = string;
6996
+ /**
6997
+ * @type object
6998
+ */
6999
+ type RevokeSelfHostEnrollmentRequestConfig = {
7000
+ data?: never;
7001
+ /**
7002
+ * @type object
7003
+ */
7004
+ pathParams: {
7005
+ org_id: RevokeSelfHostEnrollmentPathOrgId;
7006
+ enrollment_id: RevokeSelfHostEnrollmentPathEnrollmentId;
7007
+ };
7008
+ queryParams?: never;
7009
+ headerParams?: never;
7010
+ /**
7011
+ * @type string
7012
+ */
7013
+ url: `/v1/organizations/${string}/self-host-enrollments/${string}`;
7014
+ };
7015
+
6350
7016
  /**
6351
7017
  * Generated by Kubb (https://kubb.dev/).
6352
7018
  * Do not edit manually.
@@ -7642,6 +8308,10 @@ declare const operationsByTag: {
7642
8308
  readonly method: "GET";
7643
8309
  readonly path: "/v1/projects/{project_id}/audit-logs/export";
7644
8310
  };
8311
+ readonly verifyAuditChain: {
8312
+ readonly method: "GET";
8313
+ readonly path: "/v1/projects/{project_id}/audit-logs/verify";
8314
+ };
7645
8315
  };
7646
8316
  readonly anomalies: {
7647
8317
  readonly listAnomalyAlerts: {
@@ -7816,6 +8486,18 @@ declare const operationsByTag: {
7816
8486
  readonly method: "GET";
7817
8487
  readonly path: "/v1/regions";
7818
8488
  };
8489
+ readonly listSelfHostEnrollments: {
8490
+ readonly method: "GET";
8491
+ readonly path: "/v1/organizations/{org_id}/self-host-enrollments";
8492
+ };
8493
+ readonly createSelfHostEnrollment: {
8494
+ readonly method: "POST";
8495
+ readonly path: "/v1/organizations/{org_id}/self-host-enrollments";
8496
+ };
8497
+ readonly revokeSelfHostEnrollment: {
8498
+ readonly method: "DELETE";
8499
+ readonly path: "/v1/organizations/{org_id}/self-host-enrollments/{enrollment_id}";
8500
+ };
7819
8501
  };
7820
8502
  readonly migrations: {
7821
8503
  readonly lintMigration: {
@@ -7848,6 +8530,10 @@ declare const operationsByTag: {
7848
8530
  readonly method: "POST";
7849
8531
  readonly path: "/v1/projects/{project_id}/policy-evaluations";
7850
8532
  };
8533
+ readonly replayPolicy: {
8534
+ readonly method: "POST";
8535
+ readonly path: "/v1/projects/{project_id}/policy-replays";
8536
+ };
7851
8537
  };
7852
8538
  readonly support: {
7853
8539
  readonly listSupportCases: {
@@ -7975,6 +8661,11 @@ declare const operationsByPath: {
7975
8661
  readonly path: "/v1/projects/{project_id}/audit-logs/export";
7976
8662
  readonly operationId: "exportAuditLogs";
7977
8663
  };
8664
+ readonly "GET /v1/projects/{project_id}/audit-logs/verify": {
8665
+ readonly method: "GET";
8666
+ readonly path: "/v1/projects/{project_id}/audit-logs/verify";
8667
+ readonly operationId: "verifyAuditChain";
8668
+ };
7978
8669
  readonly "GET /v1/plans": {
7979
8670
  readonly method: "GET";
7980
8671
  readonly path: "/v1/plans";
@@ -8135,6 +8826,11 @@ declare const operationsByPath: {
8135
8826
  readonly path: "/v1/projects/{project_id}/policy-evaluations";
8136
8827
  readonly operationId: "dryEvalPolicy";
8137
8828
  };
8829
+ readonly "POST /v1/projects/{project_id}/policy-replays": {
8830
+ readonly method: "POST";
8831
+ readonly path: "/v1/projects/{project_id}/policy-replays";
8832
+ readonly operationId: "replayPolicy";
8833
+ };
8138
8834
  readonly "GET /v1/projects": {
8139
8835
  readonly method: "GET";
8140
8836
  readonly path: "/v1/projects";
@@ -8185,6 +8881,21 @@ declare const operationsByPath: {
8185
8881
  readonly path: "/v1/databases/{database_id}/replicas/{replica_id}";
8186
8882
  readonly operationId: "deleteReplica";
8187
8883
  };
8884
+ readonly "GET /v1/organizations/{org_id}/self-host-enrollments": {
8885
+ readonly method: "GET";
8886
+ readonly path: "/v1/organizations/{org_id}/self-host-enrollments";
8887
+ readonly operationId: "listSelfHostEnrollments";
8888
+ };
8889
+ readonly "POST /v1/organizations/{org_id}/self-host-enrollments": {
8890
+ readonly method: "POST";
8891
+ readonly path: "/v1/organizations/{org_id}/self-host-enrollments";
8892
+ readonly operationId: "createSelfHostEnrollment";
8893
+ };
8894
+ readonly "DELETE /v1/organizations/{org_id}/self-host-enrollments/{enrollment_id}": {
8895
+ readonly method: "DELETE";
8896
+ readonly path: "/v1/organizations/{org_id}/self-host-enrollments/{enrollment_id}";
8897
+ readonly operationId: "revokeSelfHostEnrollment";
8898
+ };
8188
8899
  readonly "GET /v1/organizations/{org_id}/support/cases": {
8189
8900
  readonly method: "GET";
8190
8901
  readonly path: "/v1/organizations/{org_id}/support/cases";
@@ -8305,6 +9016,10 @@ type ExportAuditLogsParams = {
8305
9016
  pathParams: NonNullable<ExportAuditLogsRequestConfig["pathParams"]>;
8306
9017
  queryParams?: NonNullable<ExportAuditLogsRequestConfig["queryParams"]>;
8307
9018
  };
9019
+ type VerifyAuditChainParams = {
9020
+ pathParams: NonNullable<VerifyAuditChainRequestConfig["pathParams"]>;
9021
+ queryParams?: NonNullable<VerifyAuditChainRequestConfig["queryParams"]>;
9022
+ };
8308
9023
  type GetOrganizationPlanParams = {
8309
9024
  pathParams: NonNullable<GetOrganizationPlanRequestConfig["pathParams"]>;
8310
9025
  };
@@ -8412,6 +9127,10 @@ type DryEvalPolicyParams = {
8412
9127
  pathParams: NonNullable<DryEvalPolicyRequestConfig["pathParams"]>;
8413
9128
  body: NonNullable<DryEvalPolicyRequestConfig["data"]>;
8414
9129
  };
9130
+ type ReplayPolicyParams = {
9131
+ pathParams: NonNullable<ReplayPolicyRequestConfig["pathParams"]>;
9132
+ body: NonNullable<ReplayPolicyRequestConfig["data"]>;
9133
+ };
8415
9134
  type ListProjectsParams = {
8416
9135
  queryParams: NonNullable<ListProjectsRequestConfig["queryParams"]>;
8417
9136
  };
@@ -8442,6 +9161,16 @@ type CreateReplicaParams = {
8442
9161
  type DeleteReplicaParams = {
8443
9162
  pathParams: NonNullable<DeleteReplicaRequestConfig["pathParams"]>;
8444
9163
  };
9164
+ type ListSelfHostEnrollmentsParams = {
9165
+ pathParams: NonNullable<ListSelfHostEnrollmentsRequestConfig["pathParams"]>;
9166
+ };
9167
+ type CreateSelfHostEnrollmentParams = {
9168
+ pathParams: NonNullable<CreateSelfHostEnrollmentRequestConfig["pathParams"]>;
9169
+ body: NonNullable<CreateSelfHostEnrollmentRequestConfig["data"]>;
9170
+ };
9171
+ type RevokeSelfHostEnrollmentParams = {
9172
+ pathParams: NonNullable<RevokeSelfHostEnrollmentRequestConfig["pathParams"]>;
9173
+ };
8445
9174
  type ListSupportCasesParams = {
8446
9175
  pathParams: NonNullable<ListSupportCasesRequestConfig["pathParams"]>;
8447
9176
  queryParams?: NonNullable<ListSupportCasesRequestConfig["queryParams"]>;
@@ -8508,6 +9237,7 @@ interface ApiOperations {
8508
9237
  rotateAgentCredential(params: RotateAgentCredentialParams): Promise<RotateAgentCredentialStatus200>;
8509
9238
  listAuditLogs(params: ListAuditLogsParams): Promise<ListAuditLogsStatus200>;
8510
9239
  exportAuditLogs(params: ExportAuditLogsParams): Promise<ExportAuditLogsStatus200>;
9240
+ verifyAuditChain(params: VerifyAuditChainParams): Promise<VerifyAuditChainStatus200>;
8511
9241
  };
8512
9242
  anomalies: {
8513
9243
  listAnomalyAlerts(params: ListAnomalyAlertsParams): Promise<ListAnomalyAlertsStatus200>;
@@ -8562,6 +9292,9 @@ interface ApiOperations {
8562
9292
  platform: {
8563
9293
  getHealth(): Promise<GetHealthStatus200>;
8564
9294
  listRegions(): Promise<ListRegionsStatus200>;
9295
+ listSelfHostEnrollments(params: ListSelfHostEnrollmentsParams): Promise<ListSelfHostEnrollmentsStatus200>;
9296
+ createSelfHostEnrollment(params: CreateSelfHostEnrollmentParams): Promise<CreateSelfHostEnrollmentStatus201>;
9297
+ revokeSelfHostEnrollment(params: RevokeSelfHostEnrollmentParams): Promise<void>;
8565
9298
  };
8566
9299
  migrations: {
8567
9300
  lintMigration(params: LintMigrationParams): Promise<LintMigrationStatus200>;
@@ -8573,6 +9306,7 @@ interface ApiOperations {
8573
9306
  updatePolicyProfile(params: UpdatePolicyProfileParams): Promise<UpdatePolicyProfileStatus200>;
8574
9307
  deletePolicyProfile(params: DeletePolicyProfileParams): Promise<void>;
8575
9308
  dryEvalPolicy(params: DryEvalPolicyParams): Promise<DryEvalPolicyStatus200>;
9309
+ replayPolicy(params: ReplayPolicyParams): Promise<ReplayPolicyStatus200>;
8576
9310
  };
8577
9311
  support: {
8578
9312
  listSupportCases(params: ListSupportCasesParams): Promise<ListSupportCasesStatus200>;
@@ -8650,6 +9384,10 @@ interface RequestMap {
8650
9384
  params: ExportAuditLogsParams;
8651
9385
  response: ExportAuditLogsStatus200;
8652
9386
  };
9387
+ "GET /v1/projects/{project_id}/audit-logs/verify": {
9388
+ params: VerifyAuditChainParams;
9389
+ response: VerifyAuditChainStatus200;
9390
+ };
8653
9391
  "GET /v1/plans": {
8654
9392
  params?: undefined;
8655
9393
  response: ListPlansStatus200;
@@ -8778,6 +9516,10 @@ interface RequestMap {
8778
9516
  params: DryEvalPolicyParams;
8779
9517
  response: DryEvalPolicyStatus200;
8780
9518
  };
9519
+ "POST /v1/projects/{project_id}/policy-replays": {
9520
+ params: ReplayPolicyParams;
9521
+ response: ReplayPolicyStatus200;
9522
+ };
8781
9523
  "GET /v1/projects": {
8782
9524
  params: ListProjectsParams;
8783
9525
  response: ListProjectsStatus200;
@@ -8818,6 +9560,18 @@ interface RequestMap {
8818
9560
  params: DeleteReplicaParams;
8819
9561
  response: void;
8820
9562
  };
9563
+ "GET /v1/organizations/{org_id}/self-host-enrollments": {
9564
+ params: ListSelfHostEnrollmentsParams;
9565
+ response: ListSelfHostEnrollmentsStatus200;
9566
+ };
9567
+ "POST /v1/organizations/{org_id}/self-host-enrollments": {
9568
+ params: CreateSelfHostEnrollmentParams;
9569
+ response: CreateSelfHostEnrollmentStatus201;
9570
+ };
9571
+ "DELETE /v1/organizations/{org_id}/self-host-enrollments/{enrollment_id}": {
9572
+ params: RevokeSelfHostEnrollmentParams;
9573
+ response: void;
9574
+ };
8821
9575
  "GET /v1/organizations/{org_id}/support/cases": {
8822
9576
  params: ListSupportCasesParams;
8823
9577
  response: ListSupportCasesStatus200;