@aouda/client 0.1.15 → 0.1.16

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).
@@ -2514,8 +2544,9 @@ declare class AuthClient {
2514
2544
 
2515
2545
  /**
2516
2546
  * Wire protocol message types for Aouda real-time streaming (ADR 0020 §4).
2517
- * No imports pure type definitions.
2547
+ * Type-only import of StreamAckRowError is allowed; no runtime imports.
2518
2548
  */
2549
+
2519
2550
  type StreamingWireMode = "json" | "msgpack";
2520
2551
  interface AuthMessage {
2521
2552
  type: "auth";
@@ -2642,6 +2673,7 @@ interface ServerErrorMessage {
2642
2673
  id?: string;
2643
2674
  code: string;
2644
2675
  message: string;
2676
+ errors?: StreamAckRowError[];
2645
2677
  }
2646
2678
  interface PongMessage {
2647
2679
  type: "pong";
@@ -2982,6 +3014,12 @@ declare class TableQuery<T = Record<string, unknown>> {
2982
3014
  * evaluated per row on the server. Computed columns are appended after any physical-column
2983
3015
  * `select()` projection.
2984
3016
  *
3017
+ * Result types are inferred by the server where the expression permits
3018
+ * (e.g. Int32 → `number`). Uninferable expressions use wire `"Unknown"` /
3019
+ * codegen `unknown`. Computed columns are always nullable. Named-query
3020
+ * `*Row` properties pick this up when regenerated against a post-S08 server.
3021
+ * See aouda-docs/guides/browser-tier-read-limits.md#selectexpr-result-types
3022
+ *
2985
3023
  * @param projections - One or more `{ alias, expr }` pairs.
2986
3024
  * @returns A new TableQuery with computed columns set.
2987
3025
  *
@@ -3445,8 +3483,10 @@ interface SchemaColumnDefinition {
3445
3483
  encoder?: string;
3446
3484
  default?: string;
3447
3485
  description?: string;
3448
- /** Write-time derived expression (stored, not virtual). */
3449
- derived?: ScalarExprNode;
3486
+ /** Write-time derived expression, or `{ identity: "subject" }` (P43 stamp). */
3487
+ derived?: ScalarExprNode | {
3488
+ identity: string;
3489
+ };
3450
3490
  unique?: boolean;
3451
3491
  }
3452
3492
  /** A single insert-time `route` or `tee` transform. */
@@ -3467,6 +3507,8 @@ interface SchemaTableDefinition {
3467
3507
  authMode?: string;
3468
3508
  permissionDimension?: string;
3469
3509
  rlsResolverName?: string;
3510
+ /** jwt-claim PLS source: `subject` or `claim:<name>`. Omit = `claim:tenant_id`. */
3511
+ plsClaimBinding?: string;
3470
3512
  culture?: string;
3471
3513
  checks?: Record<string, WhereClause>;
3472
3514
  transforms?: SchemaTableTransform[];
@@ -3553,6 +3595,20 @@ interface SchemaFilterPredicate {
3553
3595
  interface SchemaMaterializedStorage {
3554
3596
  storageTemperature?: string;
3555
3597
  }
3598
+ /**
3599
+ * Closed sortable type set for aggregate MQ computed outputs
3600
+ * (`ComputedOutputValidation.AllowedTypeNames` / JSON-schema `MaterializedComputedOutput`).
3601
+ */
3602
+ type SchemaComputedOutputType = "Int64" | "Double" | "Decimal" | "String" | "Timestamp" | "Date";
3603
+ /**
3604
+ * One computed public column of an aggregate materialized query (ADR 0040 `D-36`).
3605
+ * Wire keys are `outputName` + `type` + `expr` — not query `selectExpr` `{ alias, expr }`.
3606
+ */
3607
+ interface SchemaComputedOutput {
3608
+ outputName: string;
3609
+ type: SchemaComputedOutputType;
3610
+ expr: ScalarExprNode;
3611
+ }
3556
3612
  /**
3557
3613
  * Materialized-query declaration in `materializedQueries`.
3558
3614
  * `groupBy` items are a column-name string or `{ column, function?, outputName? }`.
@@ -3568,6 +3624,16 @@ interface SchemaMaterializedQuery {
3568
3624
  predicate?: SchemaFilterPredicate;
3569
3625
  updateMode?: string;
3570
3626
  storage?: SchemaMaterializedStorage;
3627
+ /**
3628
+ * Direct-client access on the MQ result table. Defaults `false` at apply.
3629
+ * Flipping this is `UpdateDataPlaneAccess`, not a replace.
3630
+ */
3631
+ dataPlaneAccess?: boolean;
3632
+ /**
3633
+ * Write-time public columns on an aggregate MQ. Aggregate-only at apply;
3634
+ * other `type` values with `computed` set are a server `SchemaValidationException`, not a TS error.
3635
+ */
3636
+ computed?: SchemaComputedOutput[];
3571
3637
  }
3572
3638
  /** Root type for `aouda.schema.json`. */
3573
3639
  interface SchemaDocument {
@@ -4307,4 +4373,4 @@ declare class AoudaClient<S extends SchemaLike = DefaultSchema> {
4307
4373
  */
4308
4374
  declare function createAoudaClient<S extends SchemaLike = DefaultSchema>(options: AoudaClientOptions): AoudaClient<S>;
4309
4375
 
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 };
4376
+ 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 MergeExecutionResult 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, type DeleteOptions as aA, type DiffSummary as aB, FILTER_OPERATORS as aC, type FilterOperator as aD, HealthAdminApi as aE, type IndexInfo as aF, type InsertOptions as aG, type InsertResult as aH, type IoMetrics as aI, JobsApi as aJ, type LatencyPercentiles as aK, MaterializedQueriesApi as aL, type MaterializedQueryDefinition as aM, type MaterializedQueryExecuteOptions as aN, type MaterializedQueryExecuteResult as aO, type MaterializedQueryMetrics as aP, type MaterializedQueryRefreshOptions as aQ, MaterializedQueryState as aR, type MaterializedQueryStateNumber as aS, type MaterializedQueryStatus as aT, MaterializedQueryType as aU, type MaterializedQueryTypeNumber as aV, type MemberInfo as aW, MemoryConsistencyTokenStore as aX, type MemoryMetrics as aY, type MergeBranchOptions as aZ, type MergeConflict 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, DatabasesApi as az, type TopologyResponse as b, type SchemaComputedOutput as b$, type MergeResult as b0, MetricsAdminApi as b1, type MetricsHistory as b2, type MetricsHistoryOptions as b3, type MetricsSnapshot as b4, type MetricsSummary as b5, type MutationResult as b6, type NamedArtifactWarning as b7, type NamedMutationDefinition as b8, type NamedMutationResult as b9, type PolicyInspectRequest as bA, type PolicyInspectResponse as bB, type PolicyInspectTableResult as bC, type PolicyInspectTraverseStart as bD, type PolicyInspectVectorProbe as bE, type QueryMetrics as bF, type QueryResult as bG, type QueryStats as bH, type ReferenceInfo as bI, type RelationshipEndpoint as bJ, type RelationshipInfo as bK, type RenameColumnRequest as bL, type RenameTableRequest as bM, type ReorderColumnsRequest as bN, ReplicationAdminApi as bO, type ReplicationMetrics as bP, type ResidencyConfig as bQ, type ResultWarning as bR, RetryPolicy as bS, type RlsResolver as bT, type RlsResolverRule as bU, type RlsResolverRuleInput as bV, type RlsResolversListResponse as bW, type SchemaAggregateColumn as bX, type SchemaChange as bY, type SchemaChangeType as bZ, type SchemaColumnDefinition as b_, NamedMutationsApi as ba, NamedQueriesApi as bb, type NamedQueryBatchItem as bc, type NamedQueryBatchSlotResult as bd, type NamedQueryDefinition as be, type NamedQueryExecuteOptions as bf, type NamedQueryParamConstraint as bg, type NamedQuerySubscribeOptions as bh, NodeAdminApi as bi, type NodeLogEntry as bj, type NodeLogLevel as bk, type NodeLogStreamOptions as bl, type NodeLogsQuery as bm, type NodeLogsResponse as bn, type OpenWriteStreamOptions as bo, type PageCacheMetrics as bp, type PartitionFunction as bq, type PartitionGrant as br, type PartitionGrantsListResponse as bs, type PartitioningMetrics as bt, type PendingJobListResponse as bu, type PendingJobResponse as bv, type PerDatabaseLagEntry as bw, type PerDatabaseMetrics as bx, type PerDatabaseStatusEntry as by, PolicyApi as bz, type ReadinessResponse as c, maxToken as c$, type SchemaComputedOutputType as c0, type SchemaDiffResult as c1, type SchemaDocument as c2, type SchemaFilterCondition as c3, type SchemaFilterPredicate as c4, type SchemaGroupByTerm as c5, type SchemaMaterializedQuery as c6, type SchemaMaterializedStorage as c7, type SchemaPartitionKeyEntry as c8, type SchemaRelationshipsResponse as c9, type TablePolicy as cA, TableQuery as cB, type TableSchema as cC, type TableSchemaResponse as cD, type TableSummary as cE, type TableSummaryForErd as cF, TablesApi as cG, type TestIdentity as cH, type TestIdentityDocument as cI, type TestIdentityGrant as cJ, type TimeBucketFunction as cK, type TimeSeriesMetrics as cL, type TransactionMetrics as cM, type TypeGenerationOptions as cN, type UpdateOptions as cO, type UpdateRlsResolverRequest as cP, type UpdateTableOptionsRequest as cQ, type UpdateTablePolicyRequest as cR, type UserProfile as cS, type WalMetrics as cT, WhereGroupBuilder as cU, type WhereOperator as cV, type WriteStream as cW, coerceColumnarValue as cX, columnarToRows as cY, compareOrdinal as cZ, createAoudaClient as c_, type SchemaSettings as ca, type SchemaSettingsDurability as cb, type SchemaTableDefinition as cc, type SchemaTableDurability as cd, type SchemaTablePolicy as ce, type SchemaTableTransform as cf, type SeedApplyResult as cg, type SeedTableApplyResult as ch, ServerAdminApi as ci, type ServerAuthOptions as cj, type ServerMemoryResponse as ck, type ServerMetricsResponse as cl, type ServiceInfo as cm, type SimdMetrics as cn, type SingleDatabaseMetricsResponse as co, type SortDirection as cp, type StorageMetrics as cq, type SubscribeOptions as cr, type Subscription as cs, type SubscriptionChangeEvent as ct, type SubscriptionEvent as cu, type SubscriptionInfo as cv, type SubscriptionSnapshotEvent as cw, TIME_BUCKET_FUNCTIONS as cx, type TableCoverageEntry as cy, type TableNameFromSchema 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 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).
@@ -2514,8 +2544,9 @@ declare class AuthClient {
2514
2544
 
2515
2545
  /**
2516
2546
  * Wire protocol message types for Aouda real-time streaming (ADR 0020 §4).
2517
- * No imports pure type definitions.
2547
+ * Type-only import of StreamAckRowError is allowed; no runtime imports.
2518
2548
  */
2549
+
2519
2550
  type StreamingWireMode = "json" | "msgpack";
2520
2551
  interface AuthMessage {
2521
2552
  type: "auth";
@@ -2642,6 +2673,7 @@ interface ServerErrorMessage {
2642
2673
  id?: string;
2643
2674
  code: string;
2644
2675
  message: string;
2676
+ errors?: StreamAckRowError[];
2645
2677
  }
2646
2678
  interface PongMessage {
2647
2679
  type: "pong";
@@ -2982,6 +3014,12 @@ declare class TableQuery<T = Record<string, unknown>> {
2982
3014
  * evaluated per row on the server. Computed columns are appended after any physical-column
2983
3015
  * `select()` projection.
2984
3016
  *
3017
+ * Result types are inferred by the server where the expression permits
3018
+ * (e.g. Int32 → `number`). Uninferable expressions use wire `"Unknown"` /
3019
+ * codegen `unknown`. Computed columns are always nullable. Named-query
3020
+ * `*Row` properties pick this up when regenerated against a post-S08 server.
3021
+ * See aouda-docs/guides/browser-tier-read-limits.md#selectexpr-result-types
3022
+ *
2985
3023
  * @param projections - One or more `{ alias, expr }` pairs.
2986
3024
  * @returns A new TableQuery with computed columns set.
2987
3025
  *
@@ -3445,8 +3483,10 @@ interface SchemaColumnDefinition {
3445
3483
  encoder?: string;
3446
3484
  default?: string;
3447
3485
  description?: string;
3448
- /** Write-time derived expression (stored, not virtual). */
3449
- derived?: ScalarExprNode;
3486
+ /** Write-time derived expression, or `{ identity: "subject" }` (P43 stamp). */
3487
+ derived?: ScalarExprNode | {
3488
+ identity: string;
3489
+ };
3450
3490
  unique?: boolean;
3451
3491
  }
3452
3492
  /** A single insert-time `route` or `tee` transform. */
@@ -3467,6 +3507,8 @@ interface SchemaTableDefinition {
3467
3507
  authMode?: string;
3468
3508
  permissionDimension?: string;
3469
3509
  rlsResolverName?: string;
3510
+ /** jwt-claim PLS source: `subject` or `claim:<name>`. Omit = `claim:tenant_id`. */
3511
+ plsClaimBinding?: string;
3470
3512
  culture?: string;
3471
3513
  checks?: Record<string, WhereClause>;
3472
3514
  transforms?: SchemaTableTransform[];
@@ -3553,6 +3595,20 @@ interface SchemaFilterPredicate {
3553
3595
  interface SchemaMaterializedStorage {
3554
3596
  storageTemperature?: string;
3555
3597
  }
3598
+ /**
3599
+ * Closed sortable type set for aggregate MQ computed outputs
3600
+ * (`ComputedOutputValidation.AllowedTypeNames` / JSON-schema `MaterializedComputedOutput`).
3601
+ */
3602
+ type SchemaComputedOutputType = "Int64" | "Double" | "Decimal" | "String" | "Timestamp" | "Date";
3603
+ /**
3604
+ * One computed public column of an aggregate materialized query (ADR 0040 `D-36`).
3605
+ * Wire keys are `outputName` + `type` + `expr` — not query `selectExpr` `{ alias, expr }`.
3606
+ */
3607
+ interface SchemaComputedOutput {
3608
+ outputName: string;
3609
+ type: SchemaComputedOutputType;
3610
+ expr: ScalarExprNode;
3611
+ }
3556
3612
  /**
3557
3613
  * Materialized-query declaration in `materializedQueries`.
3558
3614
  * `groupBy` items are a column-name string or `{ column, function?, outputName? }`.
@@ -3568,6 +3624,16 @@ interface SchemaMaterializedQuery {
3568
3624
  predicate?: SchemaFilterPredicate;
3569
3625
  updateMode?: string;
3570
3626
  storage?: SchemaMaterializedStorage;
3627
+ /**
3628
+ * Direct-client access on the MQ result table. Defaults `false` at apply.
3629
+ * Flipping this is `UpdateDataPlaneAccess`, not a replace.
3630
+ */
3631
+ dataPlaneAccess?: boolean;
3632
+ /**
3633
+ * Write-time public columns on an aggregate MQ. Aggregate-only at apply;
3634
+ * other `type` values with `computed` set are a server `SchemaValidationException`, not a TS error.
3635
+ */
3636
+ computed?: SchemaComputedOutput[];
3571
3637
  }
3572
3638
  /** Root type for `aouda.schema.json`. */
3573
3639
  interface SchemaDocument {
@@ -4307,4 +4373,4 @@ declare class AoudaClient<S extends SchemaLike = DefaultSchema> {
4307
4373
  */
4308
4374
  declare function createAoudaClient<S extends SchemaLike = DefaultSchema>(options: AoudaClientOptions): AoudaClient<S>;
4309
4375
 
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 };
4376
+ 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 MergeExecutionResult 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, type DeleteOptions as aA, type DiffSummary as aB, FILTER_OPERATORS as aC, type FilterOperator as aD, HealthAdminApi as aE, type IndexInfo as aF, type InsertOptions as aG, type InsertResult as aH, type IoMetrics as aI, JobsApi as aJ, type LatencyPercentiles as aK, MaterializedQueriesApi as aL, type MaterializedQueryDefinition as aM, type MaterializedQueryExecuteOptions as aN, type MaterializedQueryExecuteResult as aO, type MaterializedQueryMetrics as aP, type MaterializedQueryRefreshOptions as aQ, MaterializedQueryState as aR, type MaterializedQueryStateNumber as aS, type MaterializedQueryStatus as aT, MaterializedQueryType as aU, type MaterializedQueryTypeNumber as aV, type MemberInfo as aW, MemoryConsistencyTokenStore as aX, type MemoryMetrics as aY, type MergeBranchOptions as aZ, type MergeConflict 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, DatabasesApi as az, type TopologyResponse as b, type SchemaComputedOutput as b$, type MergeResult as b0, MetricsAdminApi as b1, type MetricsHistory as b2, type MetricsHistoryOptions as b3, type MetricsSnapshot as b4, type MetricsSummary as b5, type MutationResult as b6, type NamedArtifactWarning as b7, type NamedMutationDefinition as b8, type NamedMutationResult as b9, type PolicyInspectRequest as bA, type PolicyInspectResponse as bB, type PolicyInspectTableResult as bC, type PolicyInspectTraverseStart as bD, type PolicyInspectVectorProbe as bE, type QueryMetrics as bF, type QueryResult as bG, type QueryStats as bH, type ReferenceInfo as bI, type RelationshipEndpoint as bJ, type RelationshipInfo as bK, type RenameColumnRequest as bL, type RenameTableRequest as bM, type ReorderColumnsRequest as bN, ReplicationAdminApi as bO, type ReplicationMetrics as bP, type ResidencyConfig as bQ, type ResultWarning as bR, RetryPolicy as bS, type RlsResolver as bT, type RlsResolverRule as bU, type RlsResolverRuleInput as bV, type RlsResolversListResponse as bW, type SchemaAggregateColumn as bX, type SchemaChange as bY, type SchemaChangeType as bZ, type SchemaColumnDefinition as b_, NamedMutationsApi as ba, NamedQueriesApi as bb, type NamedQueryBatchItem as bc, type NamedQueryBatchSlotResult as bd, type NamedQueryDefinition as be, type NamedQueryExecuteOptions as bf, type NamedQueryParamConstraint as bg, type NamedQuerySubscribeOptions as bh, NodeAdminApi as bi, type NodeLogEntry as bj, type NodeLogLevel as bk, type NodeLogStreamOptions as bl, type NodeLogsQuery as bm, type NodeLogsResponse as bn, type OpenWriteStreamOptions as bo, type PageCacheMetrics as bp, type PartitionFunction as bq, type PartitionGrant as br, type PartitionGrantsListResponse as bs, type PartitioningMetrics as bt, type PendingJobListResponse as bu, type PendingJobResponse as bv, type PerDatabaseLagEntry as bw, type PerDatabaseMetrics as bx, type PerDatabaseStatusEntry as by, PolicyApi as bz, type ReadinessResponse as c, maxToken as c$, type SchemaComputedOutputType as c0, type SchemaDiffResult as c1, type SchemaDocument as c2, type SchemaFilterCondition as c3, type SchemaFilterPredicate as c4, type SchemaGroupByTerm as c5, type SchemaMaterializedQuery as c6, type SchemaMaterializedStorage as c7, type SchemaPartitionKeyEntry as c8, type SchemaRelationshipsResponse as c9, type TablePolicy as cA, TableQuery as cB, type TableSchema as cC, type TableSchemaResponse as cD, type TableSummary as cE, type TableSummaryForErd as cF, TablesApi as cG, type TestIdentity as cH, type TestIdentityDocument as cI, type TestIdentityGrant as cJ, type TimeBucketFunction as cK, type TimeSeriesMetrics as cL, type TransactionMetrics as cM, type TypeGenerationOptions as cN, type UpdateOptions as cO, type UpdateRlsResolverRequest as cP, type UpdateTableOptionsRequest as cQ, type UpdateTablePolicyRequest as cR, type UserProfile as cS, type WalMetrics as cT, WhereGroupBuilder as cU, type WhereOperator as cV, type WriteStream as cW, coerceColumnarValue as cX, columnarToRows as cY, compareOrdinal as cZ, createAoudaClient as c_, type SchemaSettings as ca, type SchemaSettingsDurability as cb, type SchemaTableDefinition as cc, type SchemaTableDurability as cd, type SchemaTablePolicy as ce, type SchemaTableTransform as cf, type SeedApplyResult as cg, type SeedTableApplyResult as ch, ServerAdminApi as ci, type ServerAuthOptions as cj, type ServerMemoryResponse as ck, type ServerMetricsResponse as cl, type ServiceInfo as cm, type SimdMetrics as cn, type SingleDatabaseMetricsResponse as co, type SortDirection as cp, type StorageMetrics as cq, type SubscribeOptions as cr, type Subscription as cs, type SubscriptionChangeEvent as ct, type SubscriptionEvent as cu, type SubscriptionInfo as cv, type SubscriptionSnapshotEvent as cw, TIME_BUCKET_FUNCTIONS as cx, type TableCoverageEntry as cy, type TableNameFromSchema 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 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.16",
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
  *