@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.
- package/README.md +1 -1
- package/dist/cli/index.cjs +46 -17
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.d.cts +1 -1
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +46 -17
- package/dist/cli/index.js.map +1 -1
- package/dist/{client-CXfjcF61.d.cts → client-CsE8Vd6m.d.cts} +70 -4
- package/dist/{client-CXfjcF61.d.ts → client-CsE8Vd6m.d.ts} +70 -4
- package/dist/index.cjs +46 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -10
- package/dist/index.d.ts +13 -10
- package/dist/index.js +46 -17
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -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
|
-
*
|
|
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 (
|
|
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
|
|
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
|
-
*
|
|
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 (
|
|
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
|
|
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.
|
|
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(
|
|
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
|
*
|