@aouda/client 0.1.8 → 0.1.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.
@@ -1210,6 +1210,21 @@ interface ServerMemoryResponse {
1210
1210
  databaseCount: number;
1211
1211
  perDatabaseUsage: Record<string, DatabaseMemoryUsage>;
1212
1212
  timestamp: string;
1213
+ rssBytes?: number;
1214
+ reservedBytes?: number;
1215
+ governedBudgetBytes?: number;
1216
+ rssDriftBytes?: number;
1217
+ tighteningActive?: boolean;
1218
+ budgetTargetBytes?: number;
1219
+ budgetEffectiveBytes?: number;
1220
+ resizeStatus?: string;
1221
+ admissionDenials?: number;
1222
+ admissionThrottles?: number;
1223
+ walBytesOnDisk?: number;
1224
+ walBytesReclaimable?: number;
1225
+ walRecoveryPortions?: number;
1226
+ walRecoveryCursorWrites?: number;
1227
+ quarantinedDatabases?: number;
1213
1228
  }
1214
1229
  /** Per-database metrics DTO in server metrics response. */
1215
1230
  interface DatabaseMetricsDto {
@@ -1443,8 +1458,29 @@ interface MemoryMetrics {
1443
1458
  hotBytes: number;
1444
1459
  cacheBytes: number;
1445
1460
  evictions: number;
1461
+ rssBytes?: number;
1462
+ reservedBytes?: number;
1463
+ governedBudgetBytes?: number;
1464
+ rssDriftBytes?: number;
1465
+ tighteningActive?: boolean;
1466
+ budgetTargetBytes?: number;
1467
+ budgetEffectiveBytes?: number;
1468
+ resizeStatus?: string;
1469
+ admissionDenials?: number;
1470
+ admissionThrottles?: number;
1446
1471
  perDatabase?: Record<string, DatabaseMemoryMetrics>;
1447
1472
  }
1473
+ /** Bounded-WAL inventory (GET /api/admin/metrics/wal). */
1474
+ interface WalMetrics {
1475
+ bytesOnDisk: number;
1476
+ bytesReclaimable: number;
1477
+ recoveryPortions: number;
1478
+ recoveryCursorWrites: number;
1479
+ corruptFramesStopped: number;
1480
+ ladderThrottleTotal: number;
1481
+ ladderRefuseTotal: number;
1482
+ quarantinedTotal: number;
1483
+ }
1448
1484
  /** I/O operation metrics. */
1449
1485
  interface IoMetrics {
1450
1486
  totalMs: number;
@@ -1492,6 +1528,7 @@ interface MetricsSnapshot {
1492
1528
  bloomFilters: BloomFilterMetrics;
1493
1529
  transactions: TransactionMetrics;
1494
1530
  memory: MemoryMetrics;
1531
+ wal?: WalMetrics;
1495
1532
  io: IoMetrics;
1496
1533
  simd: SimdMetrics;
1497
1534
  databases?: Record<string, PerDatabaseMetrics>;
@@ -1508,6 +1545,11 @@ interface MetricsSummary {
1508
1545
  activeConnections: number;
1509
1546
  activeMaterializedQueries: number;
1510
1547
  databaseCount: number;
1548
+ rssBytes?: number;
1549
+ governedBudgetBytes?: number;
1550
+ admissionDenials?: number;
1551
+ walBytesReclaimable?: number;
1552
+ quarantinedDatabases?: number;
1511
1553
  }
1512
1554
  /** Historical metrics from GET /api/admin/metrics/history. */
1513
1555
  interface MetricsHistory {
@@ -1840,6 +1882,11 @@ interface AdminMemoryConfig {
1840
1882
  maxTotalRamBytes: number;
1841
1883
  maxHotBytes: number;
1842
1884
  maxPageCacheBytes: number;
1885
+ budgetTargetBytes?: number;
1886
+ budgetEffectiveBytes?: number;
1887
+ resizeStatus?: string;
1888
+ lastResizeError?: string | null;
1889
+ lastResizeCommittedBytes?: number | null;
1843
1890
  }
1844
1891
  interface AdminBackupConfig {
1845
1892
  cronExpression?: string | null;
@@ -3747,4 +3794,4 @@ declare class AoudaClient<S extends SchemaLike = DefaultSchema> {
3747
3794
  */
3748
3795
  declare function createAoudaClient<S extends SchemaLike = DefaultSchema>(options: AoudaClientOptions): AoudaClient<S>;
3749
3796
 
3750
- export { type BloomFilterMetrics as $, AoudaClient as A, type BulkLoadOptions as B, type CoverageResponse as C, type DetailedHealthResponse as D, type AggregateFunctionName as E, type FailoverClusterResponse as F, type AlterColumnRequest as G, type HealthStatus as H, type AoudaClientOptions as I, type JoinClusterRequest as J, type AoudaDataType as K, type ListBackupsResponse as L, type AppAuthOptions as M, type NodeInfoResponse as N, AuthClient as O, type PromoteClusterResponse as P, type AuthResult as Q, type ReplicationStatusResponse as R, type SchemaLike as S, type Transport as T, type AuthUserInfo as U, type AuthorizationMode as V, BackupAdminApi as W, type BackupMetrics as X, type BackupSummary as Y, type BatchMutationResult as Z, type BatchOperationInput as _, type BulkLoadJobHandle as a, type MetricsSnapshot as a$, type BranchInfo as a0, BranchesApi as a1, type BulkLoadForceAbortRequest as a2, type BulkLoadForceAbortResponse as a3, type BulkLoadListResponse as a4, type BulkLoadProgress as a5, type BulkLoadReplicaProgress as a6, type BulkLoadReplicaProgressDto as a7, type BulkLoadStatusResponse as a8, CircuitBreakerPolicy as a9, HealthAdminApi as aA, type IndexInfo as aB, type InsertOptions as aC, type InsertResult as aD, type IoMetrics as aE, JobsApi as aF, type LatencyPercentiles as aG, MaterializedQueriesApi as aH, type MaterializedQueryDefinition as aI, type MaterializedQueryExecuteOptions as aJ, type MaterializedQueryExecuteResult as aK, type MaterializedQueryMetrics as aL, type MaterializedQueryRefreshOptions as aM, MaterializedQueryState as aN, type MaterializedQueryStateNumber as aO, type MaterializedQueryStatus as aP, MaterializedQueryType as aQ, type MaterializedQueryTypeNumber as aR, type MemberInfo as aS, type MemoryMetrics as aT, type MergeBranchOptions as aU, type MergeConflict as aV, type MergeExecutionResult as aW, type MergeResult as aX, MetricsAdminApi as aY, type MetricsHistory as aZ, type MetricsHistoryOptions as a_, ClusterAdminApi as aa, type ClusterMemberEntry as ab, type ClusterThisNodeEntry as ac, type ColumnSchema as ad, type ColumnSummaryForErd as ae, type ColumnarResponse as af, type ComponentHealthEntry as ag, type ComputedColumnDef as ah, ConfigAdminApi as ai, type CreateBranchRequest as aj, type CreateColumnRequest as ak, type CreateDatabaseOptions as al, type CreatePartitionGrantRequest as am, type CreateRlsResolverRequest as an, type CreateTableRequest as ao, type DatabaseCoverageEntry as ap, type DatabaseInfo as aq, type DatabaseMemoryMetrics as ar, type DatabaseMemoryUsage as as, type DatabaseMetricsDto as at, type DatabaseOptionsInfo as au, DatabasesApi as av, type DeleteOptions as aw, type DiffSummary as ax, FILTER_OPERATORS as ay, type FilterOperator as az, type TopologyResponse as b, type TableSchemaResponse as b$, type MetricsSummary as b0, type MutationResult as b1, NodeAdminApi as b2, type NodeLogEntry as b3, type NodeLogLevel as b4, type NodeLogStreamOptions as b5, type NodeLogsQuery as b6, type NodeLogsResponse as b7, type OpenWriteStreamOptions as b8, type PageCacheMetrics as b9, type SchemaChange as bA, type SchemaChangeType as bB, type SchemaDiffResult as bC, type SchemaRelationshipsResponse as bD, type SeedApplyResult as bE, type SeedTableApplyResult as bF, ServerAdminApi as bG, type ServerAuthOptions as bH, type ServerMemoryResponse as bI, type ServerMetricsResponse as bJ, type ServiceInfo as bK, type SimdMetrics as bL, type SingleDatabaseMetricsResponse as bM, type SortDirection as bN, type StorageMetrics as bO, type SubscribeOptions as bP, type Subscription as bQ, type SubscriptionChangeEvent as bR, type SubscriptionEvent as bS, type SubscriptionInfo as bT, type SubscriptionSnapshotEvent as bU, TIME_BUCKET_FUNCTIONS as bV, type TableCoverageEntry as bW, type TableNameFromSchema as bX, type TablePolicy as bY, TableQuery as bZ, type TableSchema as b_, type PartitionFunction as ba, type PartitionGrant as bb, type PartitionGrantsListResponse as bc, type PartitioningMetrics as bd, type PendingJobListResponse as be, type PendingJobResponse as bf, type PerDatabaseLagEntry as bg, type PerDatabaseMetrics as bh, type PerDatabaseStatusEntry as bi, type QueryMetrics as bj, type QueryResult as bk, type QueryStats as bl, type ReferenceInfo as bm, type RelationshipEndpoint as bn, type RelationshipInfo as bo, type RenameColumnRequest as bp, type RenameTableRequest as bq, type ReorderColumnsRequest as br, ReplicationAdminApi as bs, type ReplicationMetrics as bt, type ResidencyConfig as bu, RetryPolicy as bv, type RlsResolver as bw, type RlsResolverRule as bx, type RlsResolverRuleInput as by, type RlsResolversListResponse as bz, type ReadinessResponse as c, type TableSummary as c0, type TableSummaryForErd as c1, TablesApi as c2, type TimeBucketFunction as c3, type TimeSeriesMetrics as c4, type TransactionMetrics as c5, type TypeGenerationOptions as c6, type UpdateOptions as c7, type UpdateRlsResolverRequest as c8, type UpdateTableOptionsRequest as c9, type UpdateTablePolicyRequest as ca, type UserProfile as cb, WhereGroupBuilder as cc, type WhereOperator as cd, type WriteStream as ce, coerceColumnarValue as cf, createAoudaClient as cg, type TriggerBackupRequest as d, type TriggerBackupResponse as e, type RestoreBackupResponse as f, type BackupSchedule as g, type JoinClusterResponse as h, type LeaveClusterResponse as i, type DrainClusterResponse as j, type ClusterConfigResponse as k, type ClusterConfigPatchRequest as l, type DefaultSchema as m, AGGREGATE_FUNCTIONS as n, AOUDA_DATA_TYPES as o, type AddColumnRequest as p, AdminApi as q, type AdminBackupConfig as r, type AdminBackupPatch as s, type AdminConfigPatchRequest as t, type AdminConfigResponse as u, type AdminConfigSchemaResponse as v, type AdminLoggingConfig as w, type AdminLoggingPatch as x, type AdminMemoryConfig as y, type AdminMemoryPatch as z };
3797
+ export { type BloomFilterMetrics as $, AoudaClient as A, type BulkLoadOptions as B, type CoverageResponse as C, type DetailedHealthResponse as D, type AggregateFunctionName as E, type FailoverClusterResponse as F, type AlterColumnRequest as G, type HealthStatus as H, type AoudaClientOptions as I, type JoinClusterRequest as J, type AoudaDataType as K, type ListBackupsResponse as L, type AppAuthOptions as M, type NodeInfoResponse as N, AuthClient as O, type PromoteClusterResponse as P, type AuthResult as Q, type ReplicationStatusResponse as R, type SchemaLike as S, type Transport as T, type AuthUserInfo as U, type AuthorizationMode as V, BackupAdminApi as W, type BackupMetrics as X, type BackupSummary as Y, type BatchMutationResult as Z, type BatchOperationInput as _, type BulkLoadJobHandle as a, type MetricsSnapshot as a$, type BranchInfo as a0, BranchesApi as a1, type BulkLoadForceAbortRequest as a2, type BulkLoadForceAbortResponse as a3, type BulkLoadListResponse as a4, type BulkLoadProgress as a5, type BulkLoadReplicaProgress as a6, type BulkLoadReplicaProgressDto as a7, type BulkLoadStatusResponse as a8, CircuitBreakerPolicy as a9, HealthAdminApi as aA, type IndexInfo as aB, type InsertOptions as aC, type InsertResult as aD, type IoMetrics as aE, JobsApi as aF, type LatencyPercentiles as aG, MaterializedQueriesApi as aH, type MaterializedQueryDefinition as aI, type MaterializedQueryExecuteOptions as aJ, type MaterializedQueryExecuteResult as aK, type MaterializedQueryMetrics as aL, type MaterializedQueryRefreshOptions as aM, MaterializedQueryState as aN, type MaterializedQueryStateNumber as aO, type MaterializedQueryStatus as aP, MaterializedQueryType as aQ, type MaterializedQueryTypeNumber as aR, type MemberInfo as aS, type MemoryMetrics as aT, type MergeBranchOptions as aU, type MergeConflict as aV, type MergeExecutionResult as aW, type MergeResult as aX, MetricsAdminApi as aY, type MetricsHistory as aZ, type MetricsHistoryOptions as a_, ClusterAdminApi as aa, type ClusterMemberEntry as ab, type ClusterThisNodeEntry as ac, type ColumnSchema as ad, type ColumnSummaryForErd as ae, type ColumnarResponse as af, type ComponentHealthEntry as ag, type ComputedColumnDef as ah, ConfigAdminApi as ai, type CreateBranchRequest as aj, type CreateColumnRequest as ak, type CreateDatabaseOptions as al, type CreatePartitionGrantRequest as am, type CreateRlsResolverRequest as an, type CreateTableRequest as ao, type DatabaseCoverageEntry as ap, type DatabaseInfo as aq, type DatabaseMemoryMetrics as ar, type DatabaseMemoryUsage as as, type DatabaseMetricsDto as at, type DatabaseOptionsInfo as au, DatabasesApi as av, type DeleteOptions as aw, type DiffSummary as ax, FILTER_OPERATORS as ay, type FilterOperator as az, type TopologyResponse as b, type TableSchemaResponse as b$, type MetricsSummary as b0, type MutationResult as b1, NodeAdminApi as b2, type NodeLogEntry as b3, type NodeLogLevel as b4, type NodeLogStreamOptions as b5, type NodeLogsQuery as b6, type NodeLogsResponse as b7, type OpenWriteStreamOptions as b8, type PageCacheMetrics as b9, type SchemaChange as bA, type SchemaChangeType as bB, type SchemaDiffResult as bC, type SchemaRelationshipsResponse as bD, type SeedApplyResult as bE, type SeedTableApplyResult as bF, ServerAdminApi as bG, type ServerAuthOptions as bH, type ServerMemoryResponse as bI, type ServerMetricsResponse as bJ, type ServiceInfo as bK, type SimdMetrics as bL, type SingleDatabaseMetricsResponse as bM, type SortDirection as bN, type StorageMetrics as bO, type SubscribeOptions as bP, type Subscription as bQ, type SubscriptionChangeEvent as bR, type SubscriptionEvent as bS, type SubscriptionInfo as bT, type SubscriptionSnapshotEvent as bU, TIME_BUCKET_FUNCTIONS as bV, type TableCoverageEntry as bW, type TableNameFromSchema as bX, type TablePolicy as bY, TableQuery as bZ, type TableSchema as b_, type PartitionFunction as ba, type PartitionGrant as bb, type PartitionGrantsListResponse as bc, type PartitioningMetrics as bd, type PendingJobListResponse as be, type PendingJobResponse as bf, type PerDatabaseLagEntry as bg, type PerDatabaseMetrics as bh, type PerDatabaseStatusEntry as bi, type QueryMetrics as bj, type QueryResult as bk, type QueryStats as bl, type ReferenceInfo as bm, type RelationshipEndpoint as bn, type RelationshipInfo as bo, type RenameColumnRequest as bp, type RenameTableRequest as bq, type ReorderColumnsRequest as br, ReplicationAdminApi as bs, type ReplicationMetrics as bt, type ResidencyConfig as bu, RetryPolicy as bv, type RlsResolver as bw, type RlsResolverRule as bx, type RlsResolverRuleInput as by, type RlsResolversListResponse as bz, type ReadinessResponse as c, type TableSummary as c0, type TableSummaryForErd as c1, TablesApi as c2, type TimeBucketFunction as c3, type TimeSeriesMetrics as c4, type TransactionMetrics as c5, type TypeGenerationOptions as c6, type UpdateOptions as c7, type UpdateRlsResolverRequest as c8, type UpdateTableOptionsRequest as c9, type UpdateTablePolicyRequest as ca, type UserProfile as cb, type WalMetrics as cc, WhereGroupBuilder as cd, type WhereOperator as ce, type WriteStream as cf, coerceColumnarValue as cg, createAoudaClient as ch, type TriggerBackupRequest as d, type TriggerBackupResponse as e, type RestoreBackupResponse as f, type BackupSchedule as g, type JoinClusterResponse as h, type LeaveClusterResponse as i, type DrainClusterResponse as j, type ClusterConfigResponse as k, type ClusterConfigPatchRequest as l, type DefaultSchema as m, AGGREGATE_FUNCTIONS as n, AOUDA_DATA_TYPES as o, type AddColumnRequest as p, AdminApi as q, type AdminBackupConfig as r, type AdminBackupPatch as s, type AdminConfigPatchRequest as t, type AdminConfigResponse as u, type AdminConfigSchemaResponse as v, type AdminLoggingConfig as w, type AdminLoggingPatch as x, type AdminMemoryConfig as y, type AdminMemoryPatch as z };
@@ -1210,6 +1210,21 @@ interface ServerMemoryResponse {
1210
1210
  databaseCount: number;
1211
1211
  perDatabaseUsage: Record<string, DatabaseMemoryUsage>;
1212
1212
  timestamp: string;
1213
+ rssBytes?: number;
1214
+ reservedBytes?: number;
1215
+ governedBudgetBytes?: number;
1216
+ rssDriftBytes?: number;
1217
+ tighteningActive?: boolean;
1218
+ budgetTargetBytes?: number;
1219
+ budgetEffectiveBytes?: number;
1220
+ resizeStatus?: string;
1221
+ admissionDenials?: number;
1222
+ admissionThrottles?: number;
1223
+ walBytesOnDisk?: number;
1224
+ walBytesReclaimable?: number;
1225
+ walRecoveryPortions?: number;
1226
+ walRecoveryCursorWrites?: number;
1227
+ quarantinedDatabases?: number;
1213
1228
  }
1214
1229
  /** Per-database metrics DTO in server metrics response. */
1215
1230
  interface DatabaseMetricsDto {
@@ -1443,8 +1458,29 @@ interface MemoryMetrics {
1443
1458
  hotBytes: number;
1444
1459
  cacheBytes: number;
1445
1460
  evictions: number;
1461
+ rssBytes?: number;
1462
+ reservedBytes?: number;
1463
+ governedBudgetBytes?: number;
1464
+ rssDriftBytes?: number;
1465
+ tighteningActive?: boolean;
1466
+ budgetTargetBytes?: number;
1467
+ budgetEffectiveBytes?: number;
1468
+ resizeStatus?: string;
1469
+ admissionDenials?: number;
1470
+ admissionThrottles?: number;
1446
1471
  perDatabase?: Record<string, DatabaseMemoryMetrics>;
1447
1472
  }
1473
+ /** Bounded-WAL inventory (GET /api/admin/metrics/wal). */
1474
+ interface WalMetrics {
1475
+ bytesOnDisk: number;
1476
+ bytesReclaimable: number;
1477
+ recoveryPortions: number;
1478
+ recoveryCursorWrites: number;
1479
+ corruptFramesStopped: number;
1480
+ ladderThrottleTotal: number;
1481
+ ladderRefuseTotal: number;
1482
+ quarantinedTotal: number;
1483
+ }
1448
1484
  /** I/O operation metrics. */
1449
1485
  interface IoMetrics {
1450
1486
  totalMs: number;
@@ -1492,6 +1528,7 @@ interface MetricsSnapshot {
1492
1528
  bloomFilters: BloomFilterMetrics;
1493
1529
  transactions: TransactionMetrics;
1494
1530
  memory: MemoryMetrics;
1531
+ wal?: WalMetrics;
1495
1532
  io: IoMetrics;
1496
1533
  simd: SimdMetrics;
1497
1534
  databases?: Record<string, PerDatabaseMetrics>;
@@ -1508,6 +1545,11 @@ interface MetricsSummary {
1508
1545
  activeConnections: number;
1509
1546
  activeMaterializedQueries: number;
1510
1547
  databaseCount: number;
1548
+ rssBytes?: number;
1549
+ governedBudgetBytes?: number;
1550
+ admissionDenials?: number;
1551
+ walBytesReclaimable?: number;
1552
+ quarantinedDatabases?: number;
1511
1553
  }
1512
1554
  /** Historical metrics from GET /api/admin/metrics/history. */
1513
1555
  interface MetricsHistory {
@@ -1840,6 +1882,11 @@ interface AdminMemoryConfig {
1840
1882
  maxTotalRamBytes: number;
1841
1883
  maxHotBytes: number;
1842
1884
  maxPageCacheBytes: number;
1885
+ budgetTargetBytes?: number;
1886
+ budgetEffectiveBytes?: number;
1887
+ resizeStatus?: string;
1888
+ lastResizeError?: string | null;
1889
+ lastResizeCommittedBytes?: number | null;
1843
1890
  }
1844
1891
  interface AdminBackupConfig {
1845
1892
  cronExpression?: string | null;
@@ -3747,4 +3794,4 @@ declare class AoudaClient<S extends SchemaLike = DefaultSchema> {
3747
3794
  */
3748
3795
  declare function createAoudaClient<S extends SchemaLike = DefaultSchema>(options: AoudaClientOptions): AoudaClient<S>;
3749
3796
 
3750
- export { type BloomFilterMetrics as $, AoudaClient as A, type BulkLoadOptions as B, type CoverageResponse as C, type DetailedHealthResponse as D, type AggregateFunctionName as E, type FailoverClusterResponse as F, type AlterColumnRequest as G, type HealthStatus as H, type AoudaClientOptions as I, type JoinClusterRequest as J, type AoudaDataType as K, type ListBackupsResponse as L, type AppAuthOptions as M, type NodeInfoResponse as N, AuthClient as O, type PromoteClusterResponse as P, type AuthResult as Q, type ReplicationStatusResponse as R, type SchemaLike as S, type Transport as T, type AuthUserInfo as U, type AuthorizationMode as V, BackupAdminApi as W, type BackupMetrics as X, type BackupSummary as Y, type BatchMutationResult as Z, type BatchOperationInput as _, type BulkLoadJobHandle as a, type MetricsSnapshot as a$, type BranchInfo as a0, BranchesApi as a1, type BulkLoadForceAbortRequest as a2, type BulkLoadForceAbortResponse as a3, type BulkLoadListResponse as a4, type BulkLoadProgress as a5, type BulkLoadReplicaProgress as a6, type BulkLoadReplicaProgressDto as a7, type BulkLoadStatusResponse as a8, CircuitBreakerPolicy as a9, HealthAdminApi as aA, type IndexInfo as aB, type InsertOptions as aC, type InsertResult as aD, type IoMetrics as aE, JobsApi as aF, type LatencyPercentiles as aG, MaterializedQueriesApi as aH, type MaterializedQueryDefinition as aI, type MaterializedQueryExecuteOptions as aJ, type MaterializedQueryExecuteResult as aK, type MaterializedQueryMetrics as aL, type MaterializedQueryRefreshOptions as aM, MaterializedQueryState as aN, type MaterializedQueryStateNumber as aO, type MaterializedQueryStatus as aP, MaterializedQueryType as aQ, type MaterializedQueryTypeNumber as aR, type MemberInfo as aS, type MemoryMetrics as aT, type MergeBranchOptions as aU, type MergeConflict as aV, type MergeExecutionResult as aW, type MergeResult as aX, MetricsAdminApi as aY, type MetricsHistory as aZ, type MetricsHistoryOptions as a_, ClusterAdminApi as aa, type ClusterMemberEntry as ab, type ClusterThisNodeEntry as ac, type ColumnSchema as ad, type ColumnSummaryForErd as ae, type ColumnarResponse as af, type ComponentHealthEntry as ag, type ComputedColumnDef as ah, ConfigAdminApi as ai, type CreateBranchRequest as aj, type CreateColumnRequest as ak, type CreateDatabaseOptions as al, type CreatePartitionGrantRequest as am, type CreateRlsResolverRequest as an, type CreateTableRequest as ao, type DatabaseCoverageEntry as ap, type DatabaseInfo as aq, type DatabaseMemoryMetrics as ar, type DatabaseMemoryUsage as as, type DatabaseMetricsDto as at, type DatabaseOptionsInfo as au, DatabasesApi as av, type DeleteOptions as aw, type DiffSummary as ax, FILTER_OPERATORS as ay, type FilterOperator as az, type TopologyResponse as b, type TableSchemaResponse as b$, type MetricsSummary as b0, type MutationResult as b1, NodeAdminApi as b2, type NodeLogEntry as b3, type NodeLogLevel as b4, type NodeLogStreamOptions as b5, type NodeLogsQuery as b6, type NodeLogsResponse as b7, type OpenWriteStreamOptions as b8, type PageCacheMetrics as b9, type SchemaChange as bA, type SchemaChangeType as bB, type SchemaDiffResult as bC, type SchemaRelationshipsResponse as bD, type SeedApplyResult as bE, type SeedTableApplyResult as bF, ServerAdminApi as bG, type ServerAuthOptions as bH, type ServerMemoryResponse as bI, type ServerMetricsResponse as bJ, type ServiceInfo as bK, type SimdMetrics as bL, type SingleDatabaseMetricsResponse as bM, type SortDirection as bN, type StorageMetrics as bO, type SubscribeOptions as bP, type Subscription as bQ, type SubscriptionChangeEvent as bR, type SubscriptionEvent as bS, type SubscriptionInfo as bT, type SubscriptionSnapshotEvent as bU, TIME_BUCKET_FUNCTIONS as bV, type TableCoverageEntry as bW, type TableNameFromSchema as bX, type TablePolicy as bY, TableQuery as bZ, type TableSchema as b_, type PartitionFunction as ba, type PartitionGrant as bb, type PartitionGrantsListResponse as bc, type PartitioningMetrics as bd, type PendingJobListResponse as be, type PendingJobResponse as bf, type PerDatabaseLagEntry as bg, type PerDatabaseMetrics as bh, type PerDatabaseStatusEntry as bi, type QueryMetrics as bj, type QueryResult as bk, type QueryStats as bl, type ReferenceInfo as bm, type RelationshipEndpoint as bn, type RelationshipInfo as bo, type RenameColumnRequest as bp, type RenameTableRequest as bq, type ReorderColumnsRequest as br, ReplicationAdminApi as bs, type ReplicationMetrics as bt, type ResidencyConfig as bu, RetryPolicy as bv, type RlsResolver as bw, type RlsResolverRule as bx, type RlsResolverRuleInput as by, type RlsResolversListResponse as bz, type ReadinessResponse as c, type TableSummary as c0, type TableSummaryForErd as c1, TablesApi as c2, type TimeBucketFunction as c3, type TimeSeriesMetrics as c4, type TransactionMetrics as c5, type TypeGenerationOptions as c6, type UpdateOptions as c7, type UpdateRlsResolverRequest as c8, type UpdateTableOptionsRequest as c9, type UpdateTablePolicyRequest as ca, type UserProfile as cb, WhereGroupBuilder as cc, type WhereOperator as cd, type WriteStream as ce, coerceColumnarValue as cf, createAoudaClient as cg, type TriggerBackupRequest as d, type TriggerBackupResponse as e, type RestoreBackupResponse as f, type BackupSchedule as g, type JoinClusterResponse as h, type LeaveClusterResponse as i, type DrainClusterResponse as j, type ClusterConfigResponse as k, type ClusterConfigPatchRequest as l, type DefaultSchema as m, AGGREGATE_FUNCTIONS as n, AOUDA_DATA_TYPES as o, type AddColumnRequest as p, AdminApi as q, type AdminBackupConfig as r, type AdminBackupPatch as s, type AdminConfigPatchRequest as t, type AdminConfigResponse as u, type AdminConfigSchemaResponse as v, type AdminLoggingConfig as w, type AdminLoggingPatch as x, type AdminMemoryConfig as y, type AdminMemoryPatch as z };
3797
+ export { type BloomFilterMetrics as $, AoudaClient as A, type BulkLoadOptions as B, type CoverageResponse as C, type DetailedHealthResponse as D, type AggregateFunctionName as E, type FailoverClusterResponse as F, type AlterColumnRequest as G, type HealthStatus as H, type AoudaClientOptions as I, type JoinClusterRequest as J, type AoudaDataType as K, type ListBackupsResponse as L, type AppAuthOptions as M, type NodeInfoResponse as N, AuthClient as O, type PromoteClusterResponse as P, type AuthResult as Q, type ReplicationStatusResponse as R, type SchemaLike as S, type Transport as T, type AuthUserInfo as U, type AuthorizationMode as V, BackupAdminApi as W, type BackupMetrics as X, type BackupSummary as Y, type BatchMutationResult as Z, type BatchOperationInput as _, type BulkLoadJobHandle as a, type MetricsSnapshot as a$, type BranchInfo as a0, BranchesApi as a1, type BulkLoadForceAbortRequest as a2, type BulkLoadForceAbortResponse as a3, type BulkLoadListResponse as a4, type BulkLoadProgress as a5, type BulkLoadReplicaProgress as a6, type BulkLoadReplicaProgressDto as a7, type BulkLoadStatusResponse as a8, CircuitBreakerPolicy as a9, HealthAdminApi as aA, type IndexInfo as aB, type InsertOptions as aC, type InsertResult as aD, type IoMetrics as aE, JobsApi as aF, type LatencyPercentiles as aG, MaterializedQueriesApi as aH, type MaterializedQueryDefinition as aI, type MaterializedQueryExecuteOptions as aJ, type MaterializedQueryExecuteResult as aK, type MaterializedQueryMetrics as aL, type MaterializedQueryRefreshOptions as aM, MaterializedQueryState as aN, type MaterializedQueryStateNumber as aO, type MaterializedQueryStatus as aP, MaterializedQueryType as aQ, type MaterializedQueryTypeNumber as aR, type MemberInfo as aS, type MemoryMetrics as aT, type MergeBranchOptions as aU, type MergeConflict as aV, type MergeExecutionResult as aW, type MergeResult as aX, MetricsAdminApi as aY, type MetricsHistory as aZ, type MetricsHistoryOptions as a_, ClusterAdminApi as aa, type ClusterMemberEntry as ab, type ClusterThisNodeEntry as ac, type ColumnSchema as ad, type ColumnSummaryForErd as ae, type ColumnarResponse as af, type ComponentHealthEntry as ag, type ComputedColumnDef as ah, ConfigAdminApi as ai, type CreateBranchRequest as aj, type CreateColumnRequest as ak, type CreateDatabaseOptions as al, type CreatePartitionGrantRequest as am, type CreateRlsResolverRequest as an, type CreateTableRequest as ao, type DatabaseCoverageEntry as ap, type DatabaseInfo as aq, type DatabaseMemoryMetrics as ar, type DatabaseMemoryUsage as as, type DatabaseMetricsDto as at, type DatabaseOptionsInfo as au, DatabasesApi as av, type DeleteOptions as aw, type DiffSummary as ax, FILTER_OPERATORS as ay, type FilterOperator as az, type TopologyResponse as b, type TableSchemaResponse as b$, type MetricsSummary as b0, type MutationResult as b1, NodeAdminApi as b2, type NodeLogEntry as b3, type NodeLogLevel as b4, type NodeLogStreamOptions as b5, type NodeLogsQuery as b6, type NodeLogsResponse as b7, type OpenWriteStreamOptions as b8, type PageCacheMetrics as b9, type SchemaChange as bA, type SchemaChangeType as bB, type SchemaDiffResult as bC, type SchemaRelationshipsResponse as bD, type SeedApplyResult as bE, type SeedTableApplyResult as bF, ServerAdminApi as bG, type ServerAuthOptions as bH, type ServerMemoryResponse as bI, type ServerMetricsResponse as bJ, type ServiceInfo as bK, type SimdMetrics as bL, type SingleDatabaseMetricsResponse as bM, type SortDirection as bN, type StorageMetrics as bO, type SubscribeOptions as bP, type Subscription as bQ, type SubscriptionChangeEvent as bR, type SubscriptionEvent as bS, type SubscriptionInfo as bT, type SubscriptionSnapshotEvent as bU, TIME_BUCKET_FUNCTIONS as bV, type TableCoverageEntry as bW, type TableNameFromSchema as bX, type TablePolicy as bY, TableQuery as bZ, type TableSchema as b_, type PartitionFunction as ba, type PartitionGrant as bb, type PartitionGrantsListResponse as bc, type PartitioningMetrics as bd, type PendingJobListResponse as be, type PendingJobResponse as bf, type PerDatabaseLagEntry as bg, type PerDatabaseMetrics as bh, type PerDatabaseStatusEntry as bi, type QueryMetrics as bj, type QueryResult as bk, type QueryStats as bl, type ReferenceInfo as bm, type RelationshipEndpoint as bn, type RelationshipInfo as bo, type RenameColumnRequest as bp, type RenameTableRequest as bq, type ReorderColumnsRequest as br, ReplicationAdminApi as bs, type ReplicationMetrics as bt, type ResidencyConfig as bu, RetryPolicy as bv, type RlsResolver as bw, type RlsResolverRule as bx, type RlsResolverRuleInput as by, type RlsResolversListResponse as bz, type ReadinessResponse as c, type TableSummary as c0, type TableSummaryForErd as c1, TablesApi as c2, type TimeBucketFunction as c3, type TimeSeriesMetrics as c4, type TransactionMetrics as c5, type TypeGenerationOptions as c6, type UpdateOptions as c7, type UpdateRlsResolverRequest as c8, type UpdateTableOptionsRequest as c9, type UpdateTablePolicyRequest as ca, type UserProfile as cb, type WalMetrics as cc, WhereGroupBuilder as cd, type WhereOperator as ce, type WriteStream as cf, coerceColumnarValue as cg, createAoudaClient as ch, type TriggerBackupRequest as d, type TriggerBackupResponse as e, type RestoreBackupResponse as f, type BackupSchedule as g, type JoinClusterResponse as h, type LeaveClusterResponse as i, type DrainClusterResponse as j, type ClusterConfigResponse as k, type ClusterConfigPatchRequest as l, type DefaultSchema as m, AGGREGATE_FUNCTIONS as n, AOUDA_DATA_TYPES as o, type AddColumnRequest as p, AdminApi as q, type AdminBackupConfig as r, type AdminBackupPatch as s, type AdminConfigPatchRequest as t, type AdminConfigResponse as u, type AdminConfigSchemaResponse as v, type AdminLoggingConfig as w, type AdminLoggingPatch as x, type AdminMemoryConfig as y, type AdminMemoryPatch as z };
package/dist/index.cjs CHANGED
@@ -83,7 +83,7 @@ module.exports = __toCommonJS(index_exports);
83
83
  // package.json
84
84
  var package_default = {
85
85
  name: "@aouda/client",
86
- version: "0.1.8",
86
+ version: "0.1.9",
87
87
  description: "Official TypeScript/JavaScript client library for Aouda",
88
88
  type: "module",
89
89
  main: "./dist/index.cjs",
@@ -215,12 +215,13 @@ var AoudaResponseError = class extends AoudaError {
215
215
  }
216
216
  };
217
217
  var AoudaApiError = class extends AoudaError {
218
- constructor(message, code, statusCode, details, requestId) {
218
+ constructor(message, code, statusCode, details, requestId, retryAfterSeconds) {
219
219
  super(message);
220
220
  this.code = code;
221
221
  this.statusCode = statusCode;
222
222
  this.details = details;
223
223
  this.requestId = requestId;
224
+ this.retryAfterSeconds = retryAfterSeconds;
224
225
  this.name = "AoudaApiError";
225
226
  }
226
227
  };
@@ -243,8 +244,8 @@ var AoudaValidationError = class extends AoudaApiError {
243
244
  }
244
245
  };
245
246
  var AoudaServerError = class extends AoudaApiError {
246
- constructor(message, code, statusCode, details, requestId) {
247
- super(message, code, statusCode, details, requestId);
247
+ constructor(message, code, statusCode, details, requestId, retryAfterSeconds) {
248
+ super(message, code, statusCode, details, requestId, retryAfterSeconds);
248
249
  this.name = "AoudaServerError";
249
250
  }
250
251
  };
@@ -1199,6 +1200,8 @@ var ERROR_CODE_MAP = {
1199
1200
  SERVICE_UNAVAILABLE: AoudaServerError,
1200
1201
  TIMEOUT: AoudaServerError,
1201
1202
  OVERLOADED: AoudaServerError,
1203
+ MEMORY_BUDGET_EXCEEDED: AoudaServerError,
1204
+ WAL_CAPACITY_EXCEEDED: AoudaServerError,
1202
1205
  AUTH_TOKEN_MISSING: AoudaAuthenticationError,
1203
1206
  AUTH_TOKEN_EXPIRED: AoudaAuthenticationError,
1204
1207
  AUTH_TOKEN_INVALID: AoudaAuthenticationError,
@@ -1226,13 +1229,22 @@ function createComposedAbortController(...signals) {
1226
1229
  }
1227
1230
  return controller;
1228
1231
  }
1229
- function createApiError(statusCode, statusText, body) {
1232
+ function parseRetryAfterSeconds(header) {
1233
+ if (header == null || header.trim() === "") return void 0;
1234
+ const trimmed = header.trim();
1235
+ if (!/^\d+$/.test(trimmed)) return void 0;
1236
+ const n = Number.parseInt(trimmed, 10);
1237
+ if (!Number.isFinite(n) || n < 0) return void 0;
1238
+ return n;
1239
+ }
1240
+ function createApiError(statusCode, statusText, body, retryAfterHeader) {
1230
1241
  const message = body.error ?? `${statusCode} ${statusText}`;
1231
1242
  const code = body.code ?? "UNKNOWN";
1232
1243
  const details = body.details;
1233
1244
  const requestId = body.requestId;
1245
+ const retryAfterSeconds = parseRetryAfterSeconds(retryAfterHeader ?? null);
1234
1246
  const Ctor = ERROR_CODE_MAP[code] ?? AoudaApiError;
1235
- return new Ctor(message, code, statusCode, details, requestId);
1247
+ return new Ctor(message, code, statusCode, details, requestId, retryAfterSeconds);
1236
1248
  }
1237
1249
  var HttpTransport = class {
1238
1250
  constructor(options) {
@@ -1325,7 +1337,8 @@ var HttpTransport = class {
1325
1337
  throw createApiError(
1326
1338
  response.status,
1327
1339
  response.statusText,
1328
- errorBody
1340
+ errorBody,
1341
+ response.headers.get("Retry-After")
1329
1342
  );
1330
1343
  }
1331
1344
  throw new AoudaResponseError(
@@ -1435,7 +1448,8 @@ var HttpTransport = class {
1435
1448
  throw createApiError(
1436
1449
  response.status,
1437
1450
  response.statusText,
1438
- errorBody
1451
+ errorBody,
1452
+ response.headers.get("Retry-After")
1439
1453
  );
1440
1454
  }
1441
1455
  throw new AoudaResponseError(
@@ -1781,6 +1795,17 @@ var CIRCUIT_BREAKER_POLICY_DISABLED = {
1781
1795
 
1782
1796
  // src/resilience/resilient-transport.ts
1783
1797
  var REQUEST_ID_HEADER3 = "X-Request-Id";
1798
+ function isCapacityBackPressure(error) {
1799
+ return error instanceof AoudaApiError && (error.code === "MEMORY_BUDGET_EXCEEDED" || error.code === "WAL_CAPACITY_EXCEEDED");
1800
+ }
1801
+ function retryDelayMs(retryPolicy, attempt, error) {
1802
+ const backoff = calculateDelay(retryPolicy, attempt);
1803
+ if (!isCapacityBackPressure(error) || !(error instanceof AoudaApiError)) {
1804
+ return backoff;
1805
+ }
1806
+ const headerMs = error.retryAfterSeconds != null ? error.retryAfterSeconds * 1e3 : 0;
1807
+ return Math.max(backoff, headerMs);
1808
+ }
1784
1809
  function delayMs(ms, signal) {
1785
1810
  if (ms <= 0) return Promise.resolve();
1786
1811
  return new Promise((resolve, reject) => {
@@ -1835,7 +1860,7 @@ var ResilientTransport = class {
1835
1860
  } catch (error) {
1836
1861
  lastError = error;
1837
1862
  const retryable = isRetryable(error);
1838
- if (retryable) {
1863
+ if (retryable && !isCapacityBackPressure(error)) {
1839
1864
  this.circuitBreaker.recordFailure(error);
1840
1865
  }
1841
1866
  if (!retryable) {
@@ -1845,7 +1870,7 @@ var ResilientTransport = class {
1845
1870
  if (attempt > this.retryPolicy.maxRetries) {
1846
1871
  throw error;
1847
1872
  }
1848
- const delay = calculateDelay(this.retryPolicy, attempt);
1873
+ const delay = retryDelayMs(this.retryPolicy, attempt, error);
1849
1874
  try {
1850
1875
  await delayMs(delay, config.signal);
1851
1876
  } catch {
@@ -1881,7 +1906,7 @@ var ResilientTransport = class {
1881
1906
  } catch (error) {
1882
1907
  lastError = error;
1883
1908
  const retryable = isRetryable(error);
1884
- if (retryable) {
1909
+ if (retryable && !isCapacityBackPressure(error)) {
1885
1910
  this.circuitBreaker.recordFailure(error);
1886
1911
  }
1887
1912
  if (!retryable) {
@@ -1891,7 +1916,7 @@ var ResilientTransport = class {
1891
1916
  if (attempt > this.retryPolicy.maxRetries) {
1892
1917
  throw error;
1893
1918
  }
1894
- const delay = calculateDelay(this.retryPolicy, attempt);
1919
+ const delay = retryDelayMs(this.retryPolicy, attempt, error);
1895
1920
  try {
1896
1921
  await delayMs(delay, config.signal);
1897
1922
  } catch {