@aouda/client 0.1.15 → 0.1.17

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.
@@ -447,6 +447,15 @@ interface RequestOptions {
447
447
  /** Sent as X-Request-Id header when provided. */
448
448
  requestId?: string;
449
449
  }
450
+ /**
451
+ * Per-row rejection detail on HTTP `rowErrors` and write-stream `ErrorMessage.errors`.
452
+ * Same three fields as C# `StreamAckRowError`.
453
+ */
454
+ interface StreamAckRowError {
455
+ index: number;
456
+ code: string;
457
+ message: string;
458
+ }
450
459
  /**
451
460
  * User-facing comparison operator for where clauses.
452
461
  * Mapped to wire protocol operators (eq, ne, gt, etc.) internally.
@@ -1118,6 +1127,27 @@ interface DatabaseInfo {
1118
1127
  * "application" databases are end-user auth stores browsable via the data explorer.
1119
1128
  */
1120
1129
  authDatabaseKind: "none" | "server" | "application";
1130
+ /**
1131
+ * Non-secret auth linkage. Distinct from `authDatabaseKind`:
1132
+ * `authDatabaseKind` says whether *this* database is an auth store;
1133
+ * `auth.enabled` / `auth.database` say whether this data database is linked to one.
1134
+ * GET/list never include `keys` (`mk_*` is create/regenerate only).
1135
+ * Absent on servers older than this field (treat as unknown, not unlinked).
1136
+ */
1137
+ auth?: DatabaseAuthInfo;
1138
+ }
1139
+ /** App auth keys shown once at create/regenerate. Never re-emitted on GET. */
1140
+ interface DatabaseAuthKeys {
1141
+ anonKey: string;
1142
+ serviceRoleKey: string;
1143
+ publicKey?: string;
1144
+ }
1145
+ /** Non-secret auth linkage on list/get/create. */
1146
+ interface DatabaseAuthInfo {
1147
+ enabled: boolean;
1148
+ database: string | null;
1149
+ /** Present only on create or key regeneration. */
1150
+ keys?: DatabaseAuthKeys;
1121
1151
  }
1122
1152
  /**
1123
1153
  * Options when creating a database (camelCase, matches server request).
@@ -1936,11 +1966,26 @@ interface BackupSummary {
1936
1966
  newFileCount: number;
1937
1967
  /** Database names included in this backup run. Present on server >= 0.0.x. */
1938
1968
  databases?: string[];
1969
+ /** True when every contributing manifest recorded a non-zero WAL position (ADR 0044 D-2). */
1970
+ pitrEligible?: boolean;
1939
1971
  }
1940
1972
  interface ListBackupsResponse {
1941
1973
  backups: BackupSummary[];
1942
1974
  warning?: string | null;
1943
1975
  }
1976
+ interface RestoreBackupRequest {
1977
+ backupId?: string | null;
1978
+ targetTime?: string | null;
1979
+ }
1980
+ interface DatabasePitrResult {
1981
+ database: string;
1982
+ replayed: boolean;
1983
+ transactionsReplayed: number;
1984
+ rowsReplayed: number;
1985
+ lastAppliedCommitUtc?: string | null;
1986
+ stoppedAtTarget: boolean;
1987
+ error?: string | null;
1988
+ }
1944
1989
  interface RestoreBackupResponse {
1945
1990
  backupId: string;
1946
1991
  restoredUtc: string;
@@ -1948,6 +1993,8 @@ interface RestoreBackupResponse {
1948
1993
  bytesDownloaded: number;
1949
1994
  integrityVerified: boolean;
1950
1995
  durationSeconds: number;
1996
+ targetTime?: string | null;
1997
+ pitr?: DatabasePitrResult[] | null;
1951
1998
  }
1952
1999
  interface BackupSchedule {
1953
2000
  cronExpression?: string | null;
@@ -1974,10 +2021,11 @@ declare class BackupAdminApi {
1974
2021
  */
1975
2022
  list(): Promise<ListBackupsResponse>;
1976
2023
  /**
1977
- * Restore a backup by id.
1978
- * POST /admin/backup/restore/{id}
2024
+ * Restore a backup. The string form is an exact restore of that id
2025
+ * (`POST /admin/backup/restore/{id}` with `{}`). The object form posts the body to
2026
+ * `POST /admin/backup/restore` and may carry `targetTime` for point-in-time recovery.
1979
2027
  */
1980
- restore(backupId: string): Promise<RestoreBackupResponse>;
2028
+ restore(input: string | RestoreBackupRequest): Promise<RestoreBackupResponse>;
1981
2029
  /**
1982
2030
  * Get backup schedule.
1983
2031
  * GET /admin/backup/schedule
@@ -2514,8 +2562,9 @@ declare class AuthClient {
2514
2562
 
2515
2563
  /**
2516
2564
  * Wire protocol message types for Aouda real-time streaming (ADR 0020 §4).
2517
- * No imports pure type definitions.
2565
+ * Type-only import of StreamAckRowError is allowed; no runtime imports.
2518
2566
  */
2567
+
2519
2568
  type StreamingWireMode = "json" | "msgpack";
2520
2569
  interface AuthMessage {
2521
2570
  type: "auth";
@@ -2642,6 +2691,7 @@ interface ServerErrorMessage {
2642
2691
  id?: string;
2643
2692
  code: string;
2644
2693
  message: string;
2694
+ errors?: StreamAckRowError[];
2645
2695
  }
2646
2696
  interface PongMessage {
2647
2697
  type: "pong";
@@ -2982,6 +3032,12 @@ declare class TableQuery<T = Record<string, unknown>> {
2982
3032
  * evaluated per row on the server. Computed columns are appended after any physical-column
2983
3033
  * `select()` projection.
2984
3034
  *
3035
+ * Result types are inferred by the server where the expression permits
3036
+ * (e.g. Int32 → `number`). Uninferable expressions use wire `"Unknown"` /
3037
+ * codegen `unknown`. Computed columns are always nullable. Named-query
3038
+ * `*Row` properties pick this up when regenerated against a post-S08 server.
3039
+ * See aouda-docs/guides/browser-tier-read-limits.md#selectexpr-result-types
3040
+ *
2985
3041
  * @param projections - One or more `{ alias, expr }` pairs.
2986
3042
  * @returns A new TableQuery with computed columns set.
2987
3043
  *
@@ -3445,8 +3501,10 @@ interface SchemaColumnDefinition {
3445
3501
  encoder?: string;
3446
3502
  default?: string;
3447
3503
  description?: string;
3448
- /** Write-time derived expression (stored, not virtual). */
3449
- derived?: ScalarExprNode;
3504
+ /** Write-time derived expression, or `{ identity: "subject" }` (P43 stamp). */
3505
+ derived?: ScalarExprNode | {
3506
+ identity: string;
3507
+ };
3450
3508
  unique?: boolean;
3451
3509
  }
3452
3510
  /** A single insert-time `route` or `tee` transform. */
@@ -3467,6 +3525,8 @@ interface SchemaTableDefinition {
3467
3525
  authMode?: string;
3468
3526
  permissionDimension?: string;
3469
3527
  rlsResolverName?: string;
3528
+ /** jwt-claim PLS source: `subject` or `claim:<name>`. Omit = `claim:tenant_id`. */
3529
+ plsClaimBinding?: string;
3470
3530
  culture?: string;
3471
3531
  checks?: Record<string, WhereClause>;
3472
3532
  transforms?: SchemaTableTransform[];
@@ -3553,6 +3613,20 @@ interface SchemaFilterPredicate {
3553
3613
  interface SchemaMaterializedStorage {
3554
3614
  storageTemperature?: string;
3555
3615
  }
3616
+ /**
3617
+ * Closed sortable type set for aggregate MQ computed outputs
3618
+ * (`ComputedOutputValidation.AllowedTypeNames` / JSON-schema `MaterializedComputedOutput`).
3619
+ */
3620
+ type SchemaComputedOutputType = "Int64" | "Double" | "Decimal" | "String" | "Timestamp" | "Date";
3621
+ /**
3622
+ * One computed public column of an aggregate materialized query (ADR 0040 `D-36`).
3623
+ * Wire keys are `outputName` + `type` + `expr` — not query `selectExpr` `{ alias, expr }`.
3624
+ */
3625
+ interface SchemaComputedOutput {
3626
+ outputName: string;
3627
+ type: SchemaComputedOutputType;
3628
+ expr: ScalarExprNode;
3629
+ }
3556
3630
  /**
3557
3631
  * Materialized-query declaration in `materializedQueries`.
3558
3632
  * `groupBy` items are a column-name string or `{ column, function?, outputName? }`.
@@ -3568,6 +3642,16 @@ interface SchemaMaterializedQuery {
3568
3642
  predicate?: SchemaFilterPredicate;
3569
3643
  updateMode?: string;
3570
3644
  storage?: SchemaMaterializedStorage;
3645
+ /**
3646
+ * Direct-client access on the MQ result table. Defaults `false` at apply.
3647
+ * Flipping this is `UpdateDataPlaneAccess`, not a replace.
3648
+ */
3649
+ dataPlaneAccess?: boolean;
3650
+ /**
3651
+ * Write-time public columns on an aggregate MQ. Aggregate-only at apply;
3652
+ * other `type` values with `computed` set are a server `SchemaValidationException`, not a TS error.
3653
+ */
3654
+ computed?: SchemaComputedOutput[];
3571
3655
  }
3572
3656
  /** Root type for `aouda.schema.json`. */
3573
3657
  interface SchemaDocument {
@@ -4307,4 +4391,4 @@ declare class AoudaClient<S extends SchemaLike = DefaultSchema> {
4307
4391
  */
4308
4392
  declare function createAoudaClient<S extends SchemaLike = DefaultSchema>(options: AoudaClientOptions): AoudaClient<S>;
4309
4393
 
4310
- 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 MetricsHistory 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, type FilterOperator as aA, HealthAdminApi as aB, type IndexInfo as aC, type InsertOptions as aD, type InsertResult as aE, type IoMetrics as aF, JobsApi as aG, type LatencyPercentiles as aH, MaterializedQueriesApi as aI, type MaterializedQueryDefinition as aJ, type MaterializedQueryExecuteOptions as aK, type MaterializedQueryExecuteResult as aL, type MaterializedQueryMetrics as aM, type MaterializedQueryRefreshOptions as aN, MaterializedQueryState as aO, type MaterializedQueryStateNumber as aP, type MaterializedQueryStatus as aQ, MaterializedQueryType as aR, type MaterializedQueryTypeNumber as aS, type MemberInfo as aT, MemoryConsistencyTokenStore as aU, type MemoryMetrics as aV, type MergeBranchOptions as aW, type MergeConflict as aX, type MergeExecutionResult as aY, type MergeResult as aZ, MetricsAdminApi 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 ConsistencyTokenStore as aj, type CreateBranchRequest as ak, type CreateColumnRequest as al, type CreateDatabaseOptions as am, type CreatePartitionGrantRequest as an, type CreateRlsResolverRequest as ao, type CreateTableRequest as ap, type DatabaseCoverageEntry as aq, type DatabaseInfo as ar, type DatabaseMemoryMetrics as as, type DatabaseMemoryUsage as at, type DatabaseMetricsDto as au, type DatabaseOptionsInfo as av, DatabasesApi as aw, type DeleteOptions as ax, type DiffSummary as ay, FILTER_OPERATORS as az, type TopologyResponse as b, type SchemaFilterPredicate as b$, type MetricsHistoryOptions as b0, type MetricsSnapshot as b1, type MetricsSummary as b2, type MutationResult as b3, type NamedArtifactWarning as b4, type NamedMutationDefinition as b5, type NamedMutationResult as b6, NamedMutationsApi as b7, NamedQueriesApi as b8, type NamedQueryBatchItem as b9, type PolicyInspectTraverseStart as bA, type PolicyInspectVectorProbe as bB, type QueryMetrics as bC, type QueryResult as bD, type QueryStats as bE, type ReferenceInfo as bF, type RelationshipEndpoint as bG, type RelationshipInfo as bH, type RenameColumnRequest as bI, type RenameTableRequest as bJ, type ReorderColumnsRequest as bK, ReplicationAdminApi as bL, type ReplicationMetrics as bM, type ResidencyConfig as bN, type ResultWarning as bO, RetryPolicy as bP, type RlsResolver as bQ, type RlsResolverRule as bR, type RlsResolverRuleInput as bS, type RlsResolversListResponse as bT, type SchemaAggregateColumn as bU, type SchemaChange as bV, type SchemaChangeType as bW, type SchemaColumnDefinition as bX, type SchemaDiffResult as bY, type SchemaDocument as bZ, type SchemaFilterCondition as b_, type NamedQueryBatchSlotResult as ba, type NamedQueryDefinition as bb, type NamedQueryExecuteOptions as bc, type NamedQueryParamConstraint as bd, type NamedQuerySubscribeOptions as be, NodeAdminApi as bf, type NodeLogEntry as bg, type NodeLogLevel as bh, type NodeLogStreamOptions as bi, type NodeLogsQuery as bj, type NodeLogsResponse as bk, type OpenWriteStreamOptions as bl, type PageCacheMetrics as bm, type PartitionFunction as bn, type PartitionGrant as bo, type PartitionGrantsListResponse as bp, type PartitioningMetrics as bq, type PendingJobListResponse as br, type PendingJobResponse as bs, type PerDatabaseLagEntry as bt, type PerDatabaseMetrics as bu, type PerDatabaseStatusEntry as bv, PolicyApi as bw, type PolicyInspectRequest as bx, type PolicyInspectResponse as by, type PolicyInspectTableResult as bz, type ReadinessResponse as c, type SchemaGroupByTerm as c0, type SchemaMaterializedQuery as c1, type SchemaMaterializedStorage as c2, type SchemaPartitionKeyEntry as c3, type SchemaRelationshipsResponse as c4, type SchemaSettings as c5, type SchemaSettingsDurability as c6, type SchemaTableDefinition as c7, type SchemaTableDurability as c8, type SchemaTablePolicy as c9, type TableSummaryForErd as cA, TablesApi as cB, type TestIdentity as cC, type TestIdentityDocument as cD, type TestIdentityGrant as cE, type TimeBucketFunction as cF, type TimeSeriesMetrics as cG, type TransactionMetrics as cH, type TypeGenerationOptions as cI, type UpdateOptions as cJ, type UpdateRlsResolverRequest as cK, type UpdateTableOptionsRequest as cL, type UpdateTablePolicyRequest as cM, type UserProfile as cN, type WalMetrics as cO, WhereGroupBuilder as cP, type WhereOperator as cQ, type WriteStream as cR, coerceColumnarValue as cS, columnarToRows as cT, compareOrdinal as cU, createAoudaClient as cV, maxToken as cW, type SchemaTableTransform as ca, type SeedApplyResult as cb, type SeedTableApplyResult as cc, ServerAdminApi as cd, type ServerAuthOptions as ce, type ServerMemoryResponse as cf, type ServerMetricsResponse as cg, type ServiceInfo as ch, type SimdMetrics as ci, type SingleDatabaseMetricsResponse as cj, type SortDirection as ck, type StorageMetrics as cl, type SubscribeOptions as cm, type Subscription as cn, type SubscriptionChangeEvent as co, type SubscriptionEvent as cp, type SubscriptionInfo as cq, type SubscriptionSnapshotEvent as cr, TIME_BUCKET_FUNCTIONS as cs, type TableCoverageEntry as ct, type TableNameFromSchema as cu, type TablePolicy as cv, TableQuery as cw, type TableSchema as cx, type TableSchemaResponse as cy, type TableSummary as cz, 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 };
4394
+ export { type BatchOperationInput as $, AoudaClient as A, type BulkLoadOptions as B, type CoverageResponse as C, type DetailedHealthResponse as D, type AdminMemoryPatch as E, type FailoverClusterResponse as F, type AggregateFunctionName as G, type HealthStatus as H, type AlterColumnRequest as I, type JoinClusterRequest as J, type AoudaClientOptions as K, type ListBackupsResponse as L, type AoudaDataType as M, type NodeInfoResponse as N, type AppAuthOptions as O, type PromoteClusterResponse as P, AuthClient as Q, type ReplicationStatusResponse as R, type StreamAckRowError as S, type Transport as T, type AuthResult as U, type AuthUserInfo as V, type AuthorizationMode as W, BackupAdminApi as X, type BackupMetrics as Y, type BackupSummary as Z, type BatchMutationResult as _, type BulkLoadJobHandle as a, type MergeConflict as a$, type BloomFilterMetrics as a0, type BranchInfo as a1, BranchesApi as a2, type BulkLoadForceAbortRequest as a3, type BulkLoadForceAbortResponse as a4, type BulkLoadListResponse as a5, type BulkLoadProgress as a6, type BulkLoadReplicaProgress as a7, type BulkLoadReplicaProgressDto as a8, type BulkLoadStatusResponse as a9, DatabasesApi as aA, type DeleteOptions as aB, type DiffSummary as aC, FILTER_OPERATORS as aD, type FilterOperator as aE, HealthAdminApi as aF, type IndexInfo as aG, type InsertOptions as aH, type InsertResult as aI, type IoMetrics as aJ, JobsApi as aK, type LatencyPercentiles as aL, MaterializedQueriesApi as aM, type MaterializedQueryDefinition as aN, type MaterializedQueryExecuteOptions as aO, type MaterializedQueryExecuteResult as aP, type MaterializedQueryMetrics as aQ, type MaterializedQueryRefreshOptions as aR, MaterializedQueryState as aS, type MaterializedQueryStateNumber as aT, type MaterializedQueryStatus as aU, MaterializedQueryType as aV, type MaterializedQueryTypeNumber as aW, type MemberInfo as aX, MemoryConsistencyTokenStore as aY, type MemoryMetrics as aZ, type MergeBranchOptions as a_, CircuitBreakerPolicy as aa, ClusterAdminApi as ab, type ClusterMemberEntry as ac, type ClusterThisNodeEntry as ad, type ColumnSchema as ae, type ColumnSummaryForErd as af, type ColumnarResponse as ag, type ComponentHealthEntry as ah, type ComputedColumnDef as ai, ConfigAdminApi as aj, type ConsistencyTokenStore as ak, type CreateBranchRequest as al, type CreateColumnRequest as am, type CreateDatabaseOptions as an, type CreatePartitionGrantRequest as ao, type CreateRlsResolverRequest as ap, type CreateTableRequest as aq, type DatabaseAuthInfo as ar, type DatabaseAuthKeys as as, type DatabaseCoverageEntry as at, type DatabaseInfo as au, type DatabaseMemoryMetrics as av, type DatabaseMemoryUsage as aw, type DatabaseMetricsDto as ax, type DatabaseOptionsInfo as ay, type DatabasePitrResult as az, type TopologyResponse as b, type SchemaChangeType as b$, type MergeExecutionResult as b0, type MergeResult as b1, MetricsAdminApi as b2, type MetricsHistory as b3, type MetricsHistoryOptions as b4, type MetricsSnapshot as b5, type MetricsSummary as b6, type MutationResult as b7, type NamedArtifactWarning as b8, type NamedMutationDefinition as b9, PolicyApi as bA, type PolicyInspectRequest as bB, type PolicyInspectResponse as bC, type PolicyInspectTableResult as bD, type PolicyInspectTraverseStart as bE, type PolicyInspectVectorProbe as bF, type QueryMetrics as bG, type QueryResult as bH, type QueryStats as bI, type ReferenceInfo as bJ, type RelationshipEndpoint as bK, type RelationshipInfo as bL, type RenameColumnRequest as bM, type RenameTableRequest as bN, type ReorderColumnsRequest as bO, ReplicationAdminApi as bP, type ReplicationMetrics as bQ, type ResidencyConfig as bR, type RestoreBackupRequest as bS, type ResultWarning as bT, RetryPolicy as bU, type RlsResolver as bV, type RlsResolverRule as bW, type RlsResolverRuleInput as bX, type RlsResolversListResponse as bY, type SchemaAggregateColumn as bZ, type SchemaChange as b_, type NamedMutationResult as ba, NamedMutationsApi as bb, NamedQueriesApi as bc, type NamedQueryBatchItem as bd, type NamedQueryBatchSlotResult as be, type NamedQueryDefinition as bf, type NamedQueryExecuteOptions as bg, type NamedQueryParamConstraint as bh, type NamedQuerySubscribeOptions as bi, NodeAdminApi as bj, type NodeLogEntry as bk, type NodeLogLevel as bl, type NodeLogStreamOptions as bm, type NodeLogsQuery as bn, type NodeLogsResponse as bo, type OpenWriteStreamOptions as bp, type PageCacheMetrics as bq, type PartitionFunction as br, type PartitionGrant as bs, type PartitionGrantsListResponse as bt, type PartitioningMetrics as bu, type PendingJobListResponse as bv, type PendingJobResponse as bw, type PerDatabaseLagEntry as bx, type PerDatabaseMetrics as by, type PerDatabaseStatusEntry as bz, type ReadinessResponse as c, compareOrdinal as c$, type SchemaColumnDefinition as c0, type SchemaComputedOutput as c1, type SchemaComputedOutputType as c2, type SchemaDiffResult as c3, type SchemaDocument as c4, type SchemaFilterCondition as c5, type SchemaFilterPredicate as c6, type SchemaGroupByTerm as c7, type SchemaMaterializedQuery as c8, type SchemaMaterializedStorage as c9, type TableCoverageEntry as cA, type TableNameFromSchema as cB, type TablePolicy as cC, TableQuery as cD, type TableSchema as cE, type TableSchemaResponse as cF, type TableSummary as cG, type TableSummaryForErd as cH, TablesApi as cI, type TestIdentity as cJ, type TestIdentityDocument as cK, type TestIdentityGrant as cL, type TimeBucketFunction as cM, type TimeSeriesMetrics as cN, type TransactionMetrics as cO, type TypeGenerationOptions as cP, type UpdateOptions as cQ, type UpdateRlsResolverRequest as cR, type UpdateTableOptionsRequest as cS, type UpdateTablePolicyRequest as cT, type UserProfile as cU, type WalMetrics as cV, WhereGroupBuilder as cW, type WhereOperator as cX, type WriteStream as cY, coerceColumnarValue as cZ, columnarToRows as c_, type SchemaPartitionKeyEntry as ca, type SchemaRelationshipsResponse as cb, type SchemaSettings as cc, type SchemaSettingsDurability as cd, type SchemaTableDefinition as ce, type SchemaTableDurability as cf, type SchemaTablePolicy as cg, type SchemaTableTransform as ch, type SeedApplyResult as ci, type SeedTableApplyResult as cj, ServerAdminApi as ck, type ServerAuthOptions as cl, type ServerMemoryResponse as cm, type ServerMetricsResponse as cn, type ServiceInfo as co, type SimdMetrics as cp, type SingleDatabaseMetricsResponse as cq, type SortDirection as cr, type StorageMetrics as cs, type SubscribeOptions as ct, type Subscription as cu, type SubscriptionChangeEvent as cv, type SubscriptionEvent as cw, type SubscriptionInfo as cx, type SubscriptionSnapshotEvent as cy, TIME_BUCKET_FUNCTIONS as cz, type TriggerBackupRequest as d, createAoudaClient as d0, maxToken as d1, 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 SchemaLike as m, type DefaultSchema as n, AGGREGATE_FUNCTIONS as o, AOUDA_DATA_TYPES as p, type AddColumnRequest as q, AdminApi as r, type AdminBackupConfig as s, type AdminBackupPatch as t, type AdminConfigPatchRequest as u, type AdminConfigResponse as v, type AdminConfigSchemaResponse as w, type AdminLoggingConfig as x, type AdminLoggingPatch as y, type AdminMemoryConfig as z };
@@ -447,6 +447,15 @@ interface RequestOptions {
447
447
  /** Sent as X-Request-Id header when provided. */
448
448
  requestId?: string;
449
449
  }
450
+ /**
451
+ * Per-row rejection detail on HTTP `rowErrors` and write-stream `ErrorMessage.errors`.
452
+ * Same three fields as C# `StreamAckRowError`.
453
+ */
454
+ interface StreamAckRowError {
455
+ index: number;
456
+ code: string;
457
+ message: string;
458
+ }
450
459
  /**
451
460
  * User-facing comparison operator for where clauses.
452
461
  * Mapped to wire protocol operators (eq, ne, gt, etc.) internally.
@@ -1118,6 +1127,27 @@ interface DatabaseInfo {
1118
1127
  * "application" databases are end-user auth stores browsable via the data explorer.
1119
1128
  */
1120
1129
  authDatabaseKind: "none" | "server" | "application";
1130
+ /**
1131
+ * Non-secret auth linkage. Distinct from `authDatabaseKind`:
1132
+ * `authDatabaseKind` says whether *this* database is an auth store;
1133
+ * `auth.enabled` / `auth.database` say whether this data database is linked to one.
1134
+ * GET/list never include `keys` (`mk_*` is create/regenerate only).
1135
+ * Absent on servers older than this field (treat as unknown, not unlinked).
1136
+ */
1137
+ auth?: DatabaseAuthInfo;
1138
+ }
1139
+ /** App auth keys shown once at create/regenerate. Never re-emitted on GET. */
1140
+ interface DatabaseAuthKeys {
1141
+ anonKey: string;
1142
+ serviceRoleKey: string;
1143
+ publicKey?: string;
1144
+ }
1145
+ /** Non-secret auth linkage on list/get/create. */
1146
+ interface DatabaseAuthInfo {
1147
+ enabled: boolean;
1148
+ database: string | null;
1149
+ /** Present only on create or key regeneration. */
1150
+ keys?: DatabaseAuthKeys;
1121
1151
  }
1122
1152
  /**
1123
1153
  * Options when creating a database (camelCase, matches server request).
@@ -1936,11 +1966,26 @@ interface BackupSummary {
1936
1966
  newFileCount: number;
1937
1967
  /** Database names included in this backup run. Present on server >= 0.0.x. */
1938
1968
  databases?: string[];
1969
+ /** True when every contributing manifest recorded a non-zero WAL position (ADR 0044 D-2). */
1970
+ pitrEligible?: boolean;
1939
1971
  }
1940
1972
  interface ListBackupsResponse {
1941
1973
  backups: BackupSummary[];
1942
1974
  warning?: string | null;
1943
1975
  }
1976
+ interface RestoreBackupRequest {
1977
+ backupId?: string | null;
1978
+ targetTime?: string | null;
1979
+ }
1980
+ interface DatabasePitrResult {
1981
+ database: string;
1982
+ replayed: boolean;
1983
+ transactionsReplayed: number;
1984
+ rowsReplayed: number;
1985
+ lastAppliedCommitUtc?: string | null;
1986
+ stoppedAtTarget: boolean;
1987
+ error?: string | null;
1988
+ }
1944
1989
  interface RestoreBackupResponse {
1945
1990
  backupId: string;
1946
1991
  restoredUtc: string;
@@ -1948,6 +1993,8 @@ interface RestoreBackupResponse {
1948
1993
  bytesDownloaded: number;
1949
1994
  integrityVerified: boolean;
1950
1995
  durationSeconds: number;
1996
+ targetTime?: string | null;
1997
+ pitr?: DatabasePitrResult[] | null;
1951
1998
  }
1952
1999
  interface BackupSchedule {
1953
2000
  cronExpression?: string | null;
@@ -1974,10 +2021,11 @@ declare class BackupAdminApi {
1974
2021
  */
1975
2022
  list(): Promise<ListBackupsResponse>;
1976
2023
  /**
1977
- * Restore a backup by id.
1978
- * POST /admin/backup/restore/{id}
2024
+ * Restore a backup. The string form is an exact restore of that id
2025
+ * (`POST /admin/backup/restore/{id}` with `{}`). The object form posts the body to
2026
+ * `POST /admin/backup/restore` and may carry `targetTime` for point-in-time recovery.
1979
2027
  */
1980
- restore(backupId: string): Promise<RestoreBackupResponse>;
2028
+ restore(input: string | RestoreBackupRequest): Promise<RestoreBackupResponse>;
1981
2029
  /**
1982
2030
  * Get backup schedule.
1983
2031
  * GET /admin/backup/schedule
@@ -2514,8 +2562,9 @@ declare class AuthClient {
2514
2562
 
2515
2563
  /**
2516
2564
  * Wire protocol message types for Aouda real-time streaming (ADR 0020 §4).
2517
- * No imports pure type definitions.
2565
+ * Type-only import of StreamAckRowError is allowed; no runtime imports.
2518
2566
  */
2567
+
2519
2568
  type StreamingWireMode = "json" | "msgpack";
2520
2569
  interface AuthMessage {
2521
2570
  type: "auth";
@@ -2642,6 +2691,7 @@ interface ServerErrorMessage {
2642
2691
  id?: string;
2643
2692
  code: string;
2644
2693
  message: string;
2694
+ errors?: StreamAckRowError[];
2645
2695
  }
2646
2696
  interface PongMessage {
2647
2697
  type: "pong";
@@ -2982,6 +3032,12 @@ declare class TableQuery<T = Record<string, unknown>> {
2982
3032
  * evaluated per row on the server. Computed columns are appended after any physical-column
2983
3033
  * `select()` projection.
2984
3034
  *
3035
+ * Result types are inferred by the server where the expression permits
3036
+ * (e.g. Int32 → `number`). Uninferable expressions use wire `"Unknown"` /
3037
+ * codegen `unknown`. Computed columns are always nullable. Named-query
3038
+ * `*Row` properties pick this up when regenerated against a post-S08 server.
3039
+ * See aouda-docs/guides/browser-tier-read-limits.md#selectexpr-result-types
3040
+ *
2985
3041
  * @param projections - One or more `{ alias, expr }` pairs.
2986
3042
  * @returns A new TableQuery with computed columns set.
2987
3043
  *
@@ -3445,8 +3501,10 @@ interface SchemaColumnDefinition {
3445
3501
  encoder?: string;
3446
3502
  default?: string;
3447
3503
  description?: string;
3448
- /** Write-time derived expression (stored, not virtual). */
3449
- derived?: ScalarExprNode;
3504
+ /** Write-time derived expression, or `{ identity: "subject" }` (P43 stamp). */
3505
+ derived?: ScalarExprNode | {
3506
+ identity: string;
3507
+ };
3450
3508
  unique?: boolean;
3451
3509
  }
3452
3510
  /** A single insert-time `route` or `tee` transform. */
@@ -3467,6 +3525,8 @@ interface SchemaTableDefinition {
3467
3525
  authMode?: string;
3468
3526
  permissionDimension?: string;
3469
3527
  rlsResolverName?: string;
3528
+ /** jwt-claim PLS source: `subject` or `claim:<name>`. Omit = `claim:tenant_id`. */
3529
+ plsClaimBinding?: string;
3470
3530
  culture?: string;
3471
3531
  checks?: Record<string, WhereClause>;
3472
3532
  transforms?: SchemaTableTransform[];
@@ -3553,6 +3613,20 @@ interface SchemaFilterPredicate {
3553
3613
  interface SchemaMaterializedStorage {
3554
3614
  storageTemperature?: string;
3555
3615
  }
3616
+ /**
3617
+ * Closed sortable type set for aggregate MQ computed outputs
3618
+ * (`ComputedOutputValidation.AllowedTypeNames` / JSON-schema `MaterializedComputedOutput`).
3619
+ */
3620
+ type SchemaComputedOutputType = "Int64" | "Double" | "Decimal" | "String" | "Timestamp" | "Date";
3621
+ /**
3622
+ * One computed public column of an aggregate materialized query (ADR 0040 `D-36`).
3623
+ * Wire keys are `outputName` + `type` + `expr` — not query `selectExpr` `{ alias, expr }`.
3624
+ */
3625
+ interface SchemaComputedOutput {
3626
+ outputName: string;
3627
+ type: SchemaComputedOutputType;
3628
+ expr: ScalarExprNode;
3629
+ }
3556
3630
  /**
3557
3631
  * Materialized-query declaration in `materializedQueries`.
3558
3632
  * `groupBy` items are a column-name string or `{ column, function?, outputName? }`.
@@ -3568,6 +3642,16 @@ interface SchemaMaterializedQuery {
3568
3642
  predicate?: SchemaFilterPredicate;
3569
3643
  updateMode?: string;
3570
3644
  storage?: SchemaMaterializedStorage;
3645
+ /**
3646
+ * Direct-client access on the MQ result table. Defaults `false` at apply.
3647
+ * Flipping this is `UpdateDataPlaneAccess`, not a replace.
3648
+ */
3649
+ dataPlaneAccess?: boolean;
3650
+ /**
3651
+ * Write-time public columns on an aggregate MQ. Aggregate-only at apply;
3652
+ * other `type` values with `computed` set are a server `SchemaValidationException`, not a TS error.
3653
+ */
3654
+ computed?: SchemaComputedOutput[];
3571
3655
  }
3572
3656
  /** Root type for `aouda.schema.json`. */
3573
3657
  interface SchemaDocument {
@@ -4307,4 +4391,4 @@ declare class AoudaClient<S extends SchemaLike = DefaultSchema> {
4307
4391
  */
4308
4392
  declare function createAoudaClient<S extends SchemaLike = DefaultSchema>(options: AoudaClientOptions): AoudaClient<S>;
4309
4393
 
4310
- 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 MetricsHistory 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, type FilterOperator as aA, HealthAdminApi as aB, type IndexInfo as aC, type InsertOptions as aD, type InsertResult as aE, type IoMetrics as aF, JobsApi as aG, type LatencyPercentiles as aH, MaterializedQueriesApi as aI, type MaterializedQueryDefinition as aJ, type MaterializedQueryExecuteOptions as aK, type MaterializedQueryExecuteResult as aL, type MaterializedQueryMetrics as aM, type MaterializedQueryRefreshOptions as aN, MaterializedQueryState as aO, type MaterializedQueryStateNumber as aP, type MaterializedQueryStatus as aQ, MaterializedQueryType as aR, type MaterializedQueryTypeNumber as aS, type MemberInfo as aT, MemoryConsistencyTokenStore as aU, type MemoryMetrics as aV, type MergeBranchOptions as aW, type MergeConflict as aX, type MergeExecutionResult as aY, type MergeResult as aZ, MetricsAdminApi 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 ConsistencyTokenStore as aj, type CreateBranchRequest as ak, type CreateColumnRequest as al, type CreateDatabaseOptions as am, type CreatePartitionGrantRequest as an, type CreateRlsResolverRequest as ao, type CreateTableRequest as ap, type DatabaseCoverageEntry as aq, type DatabaseInfo as ar, type DatabaseMemoryMetrics as as, type DatabaseMemoryUsage as at, type DatabaseMetricsDto as au, type DatabaseOptionsInfo as av, DatabasesApi as aw, type DeleteOptions as ax, type DiffSummary as ay, FILTER_OPERATORS as az, type TopologyResponse as b, type SchemaFilterPredicate as b$, type MetricsHistoryOptions as b0, type MetricsSnapshot as b1, type MetricsSummary as b2, type MutationResult as b3, type NamedArtifactWarning as b4, type NamedMutationDefinition as b5, type NamedMutationResult as b6, NamedMutationsApi as b7, NamedQueriesApi as b8, type NamedQueryBatchItem as b9, type PolicyInspectTraverseStart as bA, type PolicyInspectVectorProbe as bB, type QueryMetrics as bC, type QueryResult as bD, type QueryStats as bE, type ReferenceInfo as bF, type RelationshipEndpoint as bG, type RelationshipInfo as bH, type RenameColumnRequest as bI, type RenameTableRequest as bJ, type ReorderColumnsRequest as bK, ReplicationAdminApi as bL, type ReplicationMetrics as bM, type ResidencyConfig as bN, type ResultWarning as bO, RetryPolicy as bP, type RlsResolver as bQ, type RlsResolverRule as bR, type RlsResolverRuleInput as bS, type RlsResolversListResponse as bT, type SchemaAggregateColumn as bU, type SchemaChange as bV, type SchemaChangeType as bW, type SchemaColumnDefinition as bX, type SchemaDiffResult as bY, type SchemaDocument as bZ, type SchemaFilterCondition as b_, type NamedQueryBatchSlotResult as ba, type NamedQueryDefinition as bb, type NamedQueryExecuteOptions as bc, type NamedQueryParamConstraint as bd, type NamedQuerySubscribeOptions as be, NodeAdminApi as bf, type NodeLogEntry as bg, type NodeLogLevel as bh, type NodeLogStreamOptions as bi, type NodeLogsQuery as bj, type NodeLogsResponse as bk, type OpenWriteStreamOptions as bl, type PageCacheMetrics as bm, type PartitionFunction as bn, type PartitionGrant as bo, type PartitionGrantsListResponse as bp, type PartitioningMetrics as bq, type PendingJobListResponse as br, type PendingJobResponse as bs, type PerDatabaseLagEntry as bt, type PerDatabaseMetrics as bu, type PerDatabaseStatusEntry as bv, PolicyApi as bw, type PolicyInspectRequest as bx, type PolicyInspectResponse as by, type PolicyInspectTableResult as bz, type ReadinessResponse as c, type SchemaGroupByTerm as c0, type SchemaMaterializedQuery as c1, type SchemaMaterializedStorage as c2, type SchemaPartitionKeyEntry as c3, type SchemaRelationshipsResponse as c4, type SchemaSettings as c5, type SchemaSettingsDurability as c6, type SchemaTableDefinition as c7, type SchemaTableDurability as c8, type SchemaTablePolicy as c9, type TableSummaryForErd as cA, TablesApi as cB, type TestIdentity as cC, type TestIdentityDocument as cD, type TestIdentityGrant as cE, type TimeBucketFunction as cF, type TimeSeriesMetrics as cG, type TransactionMetrics as cH, type TypeGenerationOptions as cI, type UpdateOptions as cJ, type UpdateRlsResolverRequest as cK, type UpdateTableOptionsRequest as cL, type UpdateTablePolicyRequest as cM, type UserProfile as cN, type WalMetrics as cO, WhereGroupBuilder as cP, type WhereOperator as cQ, type WriteStream as cR, coerceColumnarValue as cS, columnarToRows as cT, compareOrdinal as cU, createAoudaClient as cV, maxToken as cW, type SchemaTableTransform as ca, type SeedApplyResult as cb, type SeedTableApplyResult as cc, ServerAdminApi as cd, type ServerAuthOptions as ce, type ServerMemoryResponse as cf, type ServerMetricsResponse as cg, type ServiceInfo as ch, type SimdMetrics as ci, type SingleDatabaseMetricsResponse as cj, type SortDirection as ck, type StorageMetrics as cl, type SubscribeOptions as cm, type Subscription as cn, type SubscriptionChangeEvent as co, type SubscriptionEvent as cp, type SubscriptionInfo as cq, type SubscriptionSnapshotEvent as cr, TIME_BUCKET_FUNCTIONS as cs, type TableCoverageEntry as ct, type TableNameFromSchema as cu, type TablePolicy as cv, TableQuery as cw, type TableSchema as cx, type TableSchemaResponse as cy, type TableSummary as cz, 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 };
4394
+ export { type BatchOperationInput as $, AoudaClient as A, type BulkLoadOptions as B, type CoverageResponse as C, type DetailedHealthResponse as D, type AdminMemoryPatch as E, type FailoverClusterResponse as F, type AggregateFunctionName as G, type HealthStatus as H, type AlterColumnRequest as I, type JoinClusterRequest as J, type AoudaClientOptions as K, type ListBackupsResponse as L, type AoudaDataType as M, type NodeInfoResponse as N, type AppAuthOptions as O, type PromoteClusterResponse as P, AuthClient as Q, type ReplicationStatusResponse as R, type StreamAckRowError as S, type Transport as T, type AuthResult as U, type AuthUserInfo as V, type AuthorizationMode as W, BackupAdminApi as X, type BackupMetrics as Y, type BackupSummary as Z, type BatchMutationResult as _, type BulkLoadJobHandle as a, type MergeConflict as a$, type BloomFilterMetrics as a0, type BranchInfo as a1, BranchesApi as a2, type BulkLoadForceAbortRequest as a3, type BulkLoadForceAbortResponse as a4, type BulkLoadListResponse as a5, type BulkLoadProgress as a6, type BulkLoadReplicaProgress as a7, type BulkLoadReplicaProgressDto as a8, type BulkLoadStatusResponse as a9, DatabasesApi as aA, type DeleteOptions as aB, type DiffSummary as aC, FILTER_OPERATORS as aD, type FilterOperator as aE, HealthAdminApi as aF, type IndexInfo as aG, type InsertOptions as aH, type InsertResult as aI, type IoMetrics as aJ, JobsApi as aK, type LatencyPercentiles as aL, MaterializedQueriesApi as aM, type MaterializedQueryDefinition as aN, type MaterializedQueryExecuteOptions as aO, type MaterializedQueryExecuteResult as aP, type MaterializedQueryMetrics as aQ, type MaterializedQueryRefreshOptions as aR, MaterializedQueryState as aS, type MaterializedQueryStateNumber as aT, type MaterializedQueryStatus as aU, MaterializedQueryType as aV, type MaterializedQueryTypeNumber as aW, type MemberInfo as aX, MemoryConsistencyTokenStore as aY, type MemoryMetrics as aZ, type MergeBranchOptions as a_, CircuitBreakerPolicy as aa, ClusterAdminApi as ab, type ClusterMemberEntry as ac, type ClusterThisNodeEntry as ad, type ColumnSchema as ae, type ColumnSummaryForErd as af, type ColumnarResponse as ag, type ComponentHealthEntry as ah, type ComputedColumnDef as ai, ConfigAdminApi as aj, type ConsistencyTokenStore as ak, type CreateBranchRequest as al, type CreateColumnRequest as am, type CreateDatabaseOptions as an, type CreatePartitionGrantRequest as ao, type CreateRlsResolverRequest as ap, type CreateTableRequest as aq, type DatabaseAuthInfo as ar, type DatabaseAuthKeys as as, type DatabaseCoverageEntry as at, type DatabaseInfo as au, type DatabaseMemoryMetrics as av, type DatabaseMemoryUsage as aw, type DatabaseMetricsDto as ax, type DatabaseOptionsInfo as ay, type DatabasePitrResult as az, type TopologyResponse as b, type SchemaChangeType as b$, type MergeExecutionResult as b0, type MergeResult as b1, MetricsAdminApi as b2, type MetricsHistory as b3, type MetricsHistoryOptions as b4, type MetricsSnapshot as b5, type MetricsSummary as b6, type MutationResult as b7, type NamedArtifactWarning as b8, type NamedMutationDefinition as b9, PolicyApi as bA, type PolicyInspectRequest as bB, type PolicyInspectResponse as bC, type PolicyInspectTableResult as bD, type PolicyInspectTraverseStart as bE, type PolicyInspectVectorProbe as bF, type QueryMetrics as bG, type QueryResult as bH, type QueryStats as bI, type ReferenceInfo as bJ, type RelationshipEndpoint as bK, type RelationshipInfo as bL, type RenameColumnRequest as bM, type RenameTableRequest as bN, type ReorderColumnsRequest as bO, ReplicationAdminApi as bP, type ReplicationMetrics as bQ, type ResidencyConfig as bR, type RestoreBackupRequest as bS, type ResultWarning as bT, RetryPolicy as bU, type RlsResolver as bV, type RlsResolverRule as bW, type RlsResolverRuleInput as bX, type RlsResolversListResponse as bY, type SchemaAggregateColumn as bZ, type SchemaChange as b_, type NamedMutationResult as ba, NamedMutationsApi as bb, NamedQueriesApi as bc, type NamedQueryBatchItem as bd, type NamedQueryBatchSlotResult as be, type NamedQueryDefinition as bf, type NamedQueryExecuteOptions as bg, type NamedQueryParamConstraint as bh, type NamedQuerySubscribeOptions as bi, NodeAdminApi as bj, type NodeLogEntry as bk, type NodeLogLevel as bl, type NodeLogStreamOptions as bm, type NodeLogsQuery as bn, type NodeLogsResponse as bo, type OpenWriteStreamOptions as bp, type PageCacheMetrics as bq, type PartitionFunction as br, type PartitionGrant as bs, type PartitionGrantsListResponse as bt, type PartitioningMetrics as bu, type PendingJobListResponse as bv, type PendingJobResponse as bw, type PerDatabaseLagEntry as bx, type PerDatabaseMetrics as by, type PerDatabaseStatusEntry as bz, type ReadinessResponse as c, compareOrdinal as c$, type SchemaColumnDefinition as c0, type SchemaComputedOutput as c1, type SchemaComputedOutputType as c2, type SchemaDiffResult as c3, type SchemaDocument as c4, type SchemaFilterCondition as c5, type SchemaFilterPredicate as c6, type SchemaGroupByTerm as c7, type SchemaMaterializedQuery as c8, type SchemaMaterializedStorage as c9, type TableCoverageEntry as cA, type TableNameFromSchema as cB, type TablePolicy as cC, TableQuery as cD, type TableSchema as cE, type TableSchemaResponse as cF, type TableSummary as cG, type TableSummaryForErd as cH, TablesApi as cI, type TestIdentity as cJ, type TestIdentityDocument as cK, type TestIdentityGrant as cL, type TimeBucketFunction as cM, type TimeSeriesMetrics as cN, type TransactionMetrics as cO, type TypeGenerationOptions as cP, type UpdateOptions as cQ, type UpdateRlsResolverRequest as cR, type UpdateTableOptionsRequest as cS, type UpdateTablePolicyRequest as cT, type UserProfile as cU, type WalMetrics as cV, WhereGroupBuilder as cW, type WhereOperator as cX, type WriteStream as cY, coerceColumnarValue as cZ, columnarToRows as c_, type SchemaPartitionKeyEntry as ca, type SchemaRelationshipsResponse as cb, type SchemaSettings as cc, type SchemaSettingsDurability as cd, type SchemaTableDefinition as ce, type SchemaTableDurability as cf, type SchemaTablePolicy as cg, type SchemaTableTransform as ch, type SeedApplyResult as ci, type SeedTableApplyResult as cj, ServerAdminApi as ck, type ServerAuthOptions as cl, type ServerMemoryResponse as cm, type ServerMetricsResponse as cn, type ServiceInfo as co, type SimdMetrics as cp, type SingleDatabaseMetricsResponse as cq, type SortDirection as cr, type StorageMetrics as cs, type SubscribeOptions as ct, type Subscription as cu, type SubscriptionChangeEvent as cv, type SubscriptionEvent as cw, type SubscriptionInfo as cx, type SubscriptionSnapshotEvent as cy, TIME_BUCKET_FUNCTIONS as cz, type TriggerBackupRequest as d, createAoudaClient as d0, maxToken as d1, 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 SchemaLike as m, type DefaultSchema as n, AGGREGATE_FUNCTIONS as o, AOUDA_DATA_TYPES as p, type AddColumnRequest as q, AdminApi as r, type AdminBackupConfig as s, type AdminBackupPatch as t, type AdminConfigPatchRequest as u, type AdminConfigResponse as v, type AdminConfigSchemaResponse as w, type AdminLoggingConfig as x, type AdminLoggingPatch as y, type AdminMemoryConfig as z };
package/dist/index.cjs CHANGED
@@ -90,7 +90,7 @@ module.exports = __toCommonJS(index_exports);
90
90
  // package.json
91
91
  var package_default = {
92
92
  name: "@aouda/client",
93
- version: "0.1.15",
93
+ version: "0.1.17",
94
94
  description: "Official TypeScript/JavaScript client library for Aouda",
95
95
  type: "module",
96
96
  main: "./dist/index.cjs",
@@ -200,9 +200,10 @@ var AoudaError = class extends Error {
200
200
  }
201
201
  };
202
202
  var AoudaConnectionError = class extends AoudaError {
203
- constructor(message, cause) {
203
+ constructor(message, cause, rowErrors) {
204
204
  super(message);
205
205
  this.cause = cause;
206
+ this.rowErrors = rowErrors;
206
207
  this.name = "AoudaConnectionError";
207
208
  }
208
209
  };
@@ -222,7 +223,7 @@ var AoudaResponseError = class extends AoudaError {
222
223
  }
223
224
  };
224
225
  var AoudaApiError = class extends AoudaError {
225
- constructor(message, code, statusCode, details, requestId, retryAfterSeconds, token) {
226
+ constructor(message, code, statusCode, details, requestId, retryAfterSeconds, token, rowErrors) {
226
227
  super(message);
227
228
  this.code = code;
228
229
  this.statusCode = statusCode;
@@ -230,36 +231,37 @@ var AoudaApiError = class extends AoudaError {
230
231
  this.requestId = requestId;
231
232
  this.retryAfterSeconds = retryAfterSeconds;
232
233
  this.token = token;
234
+ this.rowErrors = rowErrors;
233
235
  this.name = "AoudaApiError";
234
236
  }
235
237
  };
236
238
  var AoudaNotFoundError = class extends AoudaApiError {
237
- constructor(message, code, statusCode, details, requestId, retryAfterSeconds, token) {
238
- super(message, code, statusCode, details, requestId, retryAfterSeconds, token);
239
+ constructor(message, code, statusCode, details, requestId, retryAfterSeconds, token, rowErrors) {
240
+ super(message, code, statusCode, details, requestId, retryAfterSeconds, token, rowErrors);
239
241
  this.name = "AoudaNotFoundError";
240
242
  }
241
243
  };
242
244
  var AoudaConflictError = class extends AoudaApiError {
243
- constructor(message, code, statusCode, details, requestId, retryAfterSeconds, token) {
244
- super(message, code, statusCode, details, requestId, retryAfterSeconds, token);
245
+ constructor(message, code, statusCode, details, requestId, retryAfterSeconds, token, rowErrors) {
246
+ super(message, code, statusCode, details, requestId, retryAfterSeconds, token, rowErrors);
245
247
  this.name = "AoudaConflictError";
246
248
  }
247
249
  };
248
250
  var AoudaValidationError = class extends AoudaApiError {
249
- constructor(message, code, statusCode, details, requestId, retryAfterSeconds, token) {
250
- super(message, code, statusCode, details, requestId, retryAfterSeconds, token);
251
+ constructor(message, code, statusCode, details, requestId, retryAfterSeconds, token, rowErrors) {
252
+ super(message, code, statusCode, details, requestId, retryAfterSeconds, token, rowErrors);
251
253
  this.name = "AoudaValidationError";
252
254
  }
253
255
  };
254
256
  var AoudaServerError = class extends AoudaApiError {
255
- constructor(message, code, statusCode, details, requestId, retryAfterSeconds, token) {
256
- super(message, code, statusCode, details, requestId, retryAfterSeconds, token);
257
+ constructor(message, code, statusCode, details, requestId, retryAfterSeconds, token, rowErrors) {
258
+ super(message, code, statusCode, details, requestId, retryAfterSeconds, token, rowErrors);
257
259
  this.name = "AoudaServerError";
258
260
  }
259
261
  };
260
262
  var AoudaAuthenticationError = class extends AoudaApiError {
261
- constructor(message, code, statusCode, details, requestId, retryAfterSeconds, token) {
262
- super(message, code, statusCode, details, requestId, retryAfterSeconds, token);
263
+ constructor(message, code, statusCode, details, requestId, retryAfterSeconds, token, rowErrors) {
264
+ super(message, code, statusCode, details, requestId, retryAfterSeconds, token, rowErrors);
263
265
  this.name = "AoudaAuthenticationError";
264
266
  }
265
267
  };
@@ -1212,6 +1214,10 @@ var ERROR_CODE_MAP = {
1212
1214
  INVALID_OPERATOR: AoudaValidationError,
1213
1215
  INVALID_COLUMN: AoudaValidationError,
1214
1216
  INVALID_VALUE: AoudaValidationError,
1217
+ CONSTRAINT_CHECK_VIOLATION: AoudaValidationError,
1218
+ TRANSFORM_DERIVED_READONLY: AoudaValidationError,
1219
+ TRANSFORM_ROUTE_UNMATCHED: AoudaValidationError,
1220
+ TRANSFORM_ROUTE_AMBIGUOUS: AoudaValidationError,
1215
1221
  UNSUPPORTED_VERSION: AoudaValidationError,
1216
1222
  MALFORMED_REQUEST: AoudaValidationError,
1217
1223
  INTERNAL_ERROR: AoudaServerError,
@@ -1272,6 +1278,9 @@ function parseRetryAfterSeconds(header) {
1272
1278
  if (!Number.isFinite(n) || n < 0) return void 0;
1273
1279
  return n;
1274
1280
  }
1281
+ function nonEmptyRowErrors(rowErrors) {
1282
+ return Array.isArray(rowErrors) && rowErrors.length > 0 ? rowErrors : void 0;
1283
+ }
1275
1284
  function createApiError(statusCode, statusText, body, retryAfterHeader) {
1276
1285
  const message = body.error ?? `${statusCode} ${statusText}`;
1277
1286
  const code = body.code ?? "UNKNOWN";
@@ -1279,7 +1288,16 @@ function createApiError(statusCode, statusText, body, retryAfterHeader) {
1279
1288
  const requestId = body.requestId;
1280
1289
  const retryAfterSeconds = parseRetryAfterSeconds(retryAfterHeader ?? null);
1281
1290
  const Ctor = ERROR_CODE_MAP[code] ?? AoudaApiError;
1282
- return new Ctor(message, code, statusCode, details, requestId, retryAfterSeconds, body.token);
1291
+ return new Ctor(
1292
+ message,
1293
+ code,
1294
+ statusCode,
1295
+ details,
1296
+ requestId,
1297
+ retryAfterSeconds,
1298
+ body.token,
1299
+ nonEmptyRowErrors(body.rowErrors)
1300
+ );
1283
1301
  }
1284
1302
  var HttpTransport = class {
1285
1303
  constructor(options) {
@@ -1393,7 +1411,8 @@ var HttpTransport = class {
1393
1411
  errorBody?.details,
1394
1412
  errorBody?.requestId,
1395
1413
  void 0,
1396
- errorBody?.token
1414
+ errorBody?.token,
1415
+ nonEmptyRowErrors(errorBody?.rowErrors)
1397
1416
  );
1398
1417
  }
1399
1418
  if (errorBody?.code != null) {
@@ -1512,7 +1531,8 @@ var HttpTransport = class {
1512
1531
  errorBody?.details,
1513
1532
  errorBody?.requestId,
1514
1533
  void 0,
1515
- errorBody?.token
1534
+ errorBody?.token,
1535
+ nonEmptyRowErrors(errorBody?.rowErrors)
1516
1536
  );
1517
1537
  }
1518
1538
  if (errorBody?.code != null) {
@@ -2602,8 +2622,11 @@ var TableWriteStream = class {
2602
2622
  resolve?.();
2603
2623
  }
2604
2624
  _handleServerError(message) {
2625
+ const rowErrors = Array.isArray(message.errors) && message.errors.length > 0 ? message.errors : void 0;
2605
2626
  const error = new AoudaConnectionError(
2606
- `Write stream error (${message.code}): ${message.message}`
2627
+ `Write stream error (${message.code}): ${message.message}`,
2628
+ void 0,
2629
+ rowErrors
2607
2630
  );
2608
2631
  const openReject = this._openReject;
2609
2632
  this._openResolve = null;
@@ -3055,6 +3078,12 @@ var TableQuery = class _TableQuery {
3055
3078
  * evaluated per row on the server. Computed columns are appended after any physical-column
3056
3079
  * `select()` projection.
3057
3080
  *
3081
+ * Result types are inferred by the server where the expression permits
3082
+ * (e.g. Int32 → `number`). Uninferable expressions use wire `"Unknown"` /
3083
+ * codegen `unknown`. Computed columns are always nullable. Named-query
3084
+ * `*Row` properties pick this up when regenerated against a post-S08 server.
3085
+ * See aouda-docs/guides/browser-tier-read-limits.md#selectexpr-result-types
3086
+ *
3058
3087
  * @param projections - One or more `{ alias, expr }` pairs.
3059
3088
  * @returns A new TableQuery with computed columns set.
3060
3089
  *
@@ -4627,14 +4656,21 @@ var BackupAdminApi = class {
4627
4656
  return this.transport.get(`${BASE_PATH4}/list`);
4628
4657
  }
4629
4658
  /**
4630
- * Restore a backup by id.
4631
- * POST /admin/backup/restore/{id}
4659
+ * Restore a backup. The string form is an exact restore of that id
4660
+ * (`POST /admin/backup/restore/{id}` with `{}`). The object form posts the body to
4661
+ * `POST /admin/backup/restore` and may carry `targetTime` for point-in-time recovery.
4632
4662
  */
4633
- async restore(backupId) {
4634
- const encoded = encodeURIComponent(backupId);
4663
+ async restore(input) {
4664
+ if (typeof input === "string") {
4665
+ const encoded = encodeURIComponent(input);
4666
+ return this.transport.post(
4667
+ `${BASE_PATH4}/restore/${encoded}`,
4668
+ {}
4669
+ );
4670
+ }
4635
4671
  return this.transport.post(
4636
- `${BASE_PATH4}/restore/${encoded}`,
4637
- {}
4672
+ `${BASE_PATH4}/restore`,
4673
+ input
4638
4674
  );
4639
4675
  }
4640
4676
  /**