@aouda/client 0.1.10 → 0.1.12
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/dist/cli/index.cjs +162 -23
- 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 +162 -23
- package/dist/cli/index.js.map +1 -1
- package/dist/{client-Dgenr-cE.d.cts → client-Q83x0Mz9.d.cts} +53 -7
- package/dist/{client-Dgenr-cE.d.ts → client-Q83x0Mz9.d.ts} +53 -7
- package/dist/index.cjs +162 -23
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +162 -23
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -833,12 +833,29 @@ interface ConditionalScalarExpr {
|
|
|
833
833
|
then: ScalarExprNode;
|
|
834
834
|
else: ScalarExprNode;
|
|
835
835
|
}
|
|
836
|
+
/**
|
|
837
|
+
* Bind-time parameter hole. The named-query binder substitutes a literal before eval.
|
|
838
|
+
* @internal
|
|
839
|
+
*/
|
|
840
|
+
interface ParamScalarExpr {
|
|
841
|
+
type: "param";
|
|
842
|
+
name: string;
|
|
843
|
+
}
|
|
844
|
+
/**
|
|
845
|
+
* Closed allowlist function call. fn is lowercase and case-sensitive.
|
|
846
|
+
* @internal
|
|
847
|
+
*/
|
|
848
|
+
interface CallScalarExpr {
|
|
849
|
+
type: "call";
|
|
850
|
+
fn: string;
|
|
851
|
+
args: ScalarExprNode[];
|
|
852
|
+
}
|
|
836
853
|
/**
|
|
837
854
|
* Discriminated union for scalar expression nodes in expression-based SET values.
|
|
838
855
|
* Named ScalarExprNode (not SetExprNode) to allow reuse for future SELECT projections.
|
|
839
856
|
* @internal
|
|
840
857
|
*/
|
|
841
|
-
type ScalarExprNode = LiteralScalarExpr | ColRefScalarExpr | ArithmeticScalarExpr | CoalesceScalarExpr | ConditionalScalarExpr;
|
|
858
|
+
type ScalarExprNode = LiteralScalarExpr | ColRefScalarExpr | ArithmeticScalarExpr | CoalesceScalarExpr | ConditionalScalarExpr | ParamScalarExpr | CallScalarExpr;
|
|
842
859
|
/**
|
|
843
860
|
* A single server-side computed column definition for SELECT projections.
|
|
844
861
|
* Plain JSON object; the polymorphism lives in ScalarExprNode.
|
|
@@ -2259,6 +2276,7 @@ declare class AuthHandler {
|
|
|
2259
2276
|
private readonly _serverUrl;
|
|
2260
2277
|
private readonly _timeout;
|
|
2261
2278
|
private readonly _refreshThresholdMs;
|
|
2279
|
+
private _onAccessTokenRefreshed;
|
|
2262
2280
|
private readonly _apiKeyMode;
|
|
2263
2281
|
private readonly _isServiceKeyMode;
|
|
2264
2282
|
private readonly _userToken;
|
|
@@ -2329,6 +2347,7 @@ declare class AuthHandler {
|
|
|
2329
2347
|
callMeEndpoint(): Promise<UserProfile>;
|
|
2330
2348
|
callChangePasswordEndpoint(currentPassword: string, newPassword: string): Promise<void>;
|
|
2331
2349
|
private shouldProactivelyRefresh;
|
|
2350
|
+
setOnAccessTokenRefreshed(handler: ((token: string) => void) | null): void;
|
|
2332
2351
|
private _doRefresh;
|
|
2333
2352
|
private _fetchJson;
|
|
2334
2353
|
private _tryReadErrorBody;
|
|
@@ -2426,12 +2445,23 @@ interface AuthMessage {
|
|
|
2426
2445
|
database: string;
|
|
2427
2446
|
wire_mode?: StreamingWireMode;
|
|
2428
2447
|
}
|
|
2448
|
+
interface ConflateOptions {
|
|
2449
|
+
key?: string[];
|
|
2450
|
+
interval_ms: number;
|
|
2451
|
+
}
|
|
2429
2452
|
interface SubscribeMessage {
|
|
2430
2453
|
type: "subscribe";
|
|
2431
2454
|
id: string;
|
|
2432
|
-
target
|
|
2455
|
+
target?: string;
|
|
2433
2456
|
filter?: Record<string, unknown>;
|
|
2434
2457
|
resume_from?: number;
|
|
2458
|
+
hash?: string;
|
|
2459
|
+
args?: Record<string, unknown>;
|
|
2460
|
+
conflate?: ConflateOptions;
|
|
2461
|
+
}
|
|
2462
|
+
interface ReAuthMessage {
|
|
2463
|
+
type: "re_auth";
|
|
2464
|
+
token: string;
|
|
2435
2465
|
}
|
|
2436
2466
|
interface UnsubscribeMessage {
|
|
2437
2467
|
type: "unsubscribe";
|
|
@@ -2456,7 +2486,7 @@ interface StreamCloseMessage {
|
|
|
2456
2486
|
interface PingMessage {
|
|
2457
2487
|
type: "ping";
|
|
2458
2488
|
}
|
|
2459
|
-
type ClientMessage = AuthMessage | SubscribeMessage | UnsubscribeMessage | StreamOpenMessage | StreamRowsMessage | StreamCloseMessage | PingMessage;
|
|
2489
|
+
type ClientMessage = AuthMessage | ReAuthMessage | SubscribeMessage | UnsubscribeMessage | StreamOpenMessage | StreamRowsMessage | StreamCloseMessage | PingMessage;
|
|
2460
2490
|
interface AuthOkMessage {
|
|
2461
2491
|
type: "auth_ok";
|
|
2462
2492
|
user_id?: string;
|
|
@@ -2479,6 +2509,11 @@ interface SnapshotCompleteMessage {
|
|
|
2479
2509
|
id: string;
|
|
2480
2510
|
version: number;
|
|
2481
2511
|
row_count: number;
|
|
2512
|
+
warnings?: Array<{
|
|
2513
|
+
code: string;
|
|
2514
|
+
hash?: string;
|
|
2515
|
+
sunsetAt?: string;
|
|
2516
|
+
}>;
|
|
2482
2517
|
}
|
|
2483
2518
|
interface GapMessage {
|
|
2484
2519
|
type: "gap";
|
|
@@ -2489,11 +2524,12 @@ interface GapMessage {
|
|
|
2489
2524
|
interface ChangeMessage {
|
|
2490
2525
|
type: "change";
|
|
2491
2526
|
id: string;
|
|
2492
|
-
op: "insert" | "update" | "delete";
|
|
2527
|
+
op: "insert" | "update" | "delete" | "upsert";
|
|
2493
2528
|
row?: unknown;
|
|
2494
2529
|
prev?: unknown;
|
|
2495
2530
|
key?: unknown;
|
|
2496
2531
|
version: number;
|
|
2532
|
+
values_skipped?: number;
|
|
2497
2533
|
}
|
|
2498
2534
|
interface StreamAckMessage {
|
|
2499
2535
|
type: "stream_ack";
|
|
@@ -2542,11 +2578,12 @@ interface SubscriptionSnapshotEvent<T = Record<string, unknown>> {
|
|
|
2542
2578
|
}
|
|
2543
2579
|
interface SubscriptionChangeEvent<T = Record<string, unknown>> {
|
|
2544
2580
|
type: "change";
|
|
2545
|
-
op: "insert" | "update" | "delete";
|
|
2581
|
+
op: "insert" | "update" | "delete" | "upsert";
|
|
2546
2582
|
row?: T;
|
|
2547
2583
|
prev?: T;
|
|
2548
2584
|
key?: unknown;
|
|
2549
2585
|
version: number;
|
|
2586
|
+
values_skipped?: number;
|
|
2550
2587
|
}
|
|
2551
2588
|
type SubscriptionEvent<T = Record<string, unknown>> = SubscriptionSnapshotEvent<T> | SubscriptionChangeEvent<T>;
|
|
2552
2589
|
interface SubscribeOptions<T = Record<string, unknown>> {
|
|
@@ -2554,6 +2591,7 @@ interface SubscribeOptions<T = Record<string, unknown>> {
|
|
|
2554
2591
|
onChange?: (event: SubscriptionChangeEvent<T>) => void;
|
|
2555
2592
|
onError?: (error: Error) => void;
|
|
2556
2593
|
filter?: Record<string, unknown>;
|
|
2594
|
+
conflate?: ConflateOptions;
|
|
2557
2595
|
}
|
|
2558
2596
|
interface Subscription<T = Record<string, unknown>> extends AsyncIterable<SubscriptionEvent<T>> {
|
|
2559
2597
|
readonly id: string;
|
|
@@ -3599,6 +3637,12 @@ declare class MaterializedQueriesApi {
|
|
|
3599
3637
|
interface NamedQueryExecuteOptions {
|
|
3600
3638
|
signal?: AbortSignal;
|
|
3601
3639
|
}
|
|
3640
|
+
interface NamedQuerySubscribeOptions<T = Record<string, unknown>> {
|
|
3641
|
+
onSnapshot?: (rows: T[], version: number) => void;
|
|
3642
|
+
onChange?: (event: SubscriptionChangeEvent<T>) => void;
|
|
3643
|
+
onError?: (error: Error) => void;
|
|
3644
|
+
conflate?: ConflateOptions;
|
|
3645
|
+
}
|
|
3602
3646
|
interface NamedQueryBatchItem {
|
|
3603
3647
|
hash: string;
|
|
3604
3648
|
args?: Record<string, unknown>;
|
|
@@ -3620,9 +3664,11 @@ declare class NamedQueriesApi {
|
|
|
3620
3664
|
private readonly transport;
|
|
3621
3665
|
private readonly database;
|
|
3622
3666
|
private readonly onWarning;
|
|
3623
|
-
|
|
3667
|
+
private readonly getStreamingTransport;
|
|
3668
|
+
constructor(transport: Transport, database: string, onWarning: NamedArtifactWarningSink, getStreamingTransport: () => StreamingTransport);
|
|
3624
3669
|
execute<T = Record<string, unknown>>(hash: string, args?: Record<string, unknown>, options?: NamedQueryExecuteOptions): Promise<QueryResult<T>>;
|
|
3625
3670
|
batch<T = Record<string, unknown>>(items: NamedQueryBatchItem[], options?: NamedQueryExecuteOptions): Promise<NamedQueryBatchSlotResult<T>[]>;
|
|
3671
|
+
subscribe<T = Record<string, unknown>>(hash: string, args?: Record<string, unknown>, options?: NamedQuerySubscribeOptions<T>): Subscription<T>;
|
|
3626
3672
|
}
|
|
3627
3673
|
declare class NamedMutationsApi {
|
|
3628
3674
|
private readonly transport;
|
|
@@ -3884,4 +3930,4 @@ declare class AoudaClient<S extends SchemaLike = DefaultSchema> {
|
|
|
3884
3930
|
*/
|
|
3885
3931
|
declare function createAoudaClient<S extends SchemaLike = DefaultSchema>(options: AoudaClientOptions): AoudaClient<S>;
|
|
3886
3932
|
|
|
3887
|
-
export { type BloomFilterMetrics as $, AoudaClient as A, type BulkLoadOptions as B, type CoverageResponse as C, type DetailedHealthResponse as D, type AggregateFunctionName as E, type FailoverClusterResponse as F, type AlterColumnRequest as G, type HealthStatus as H, type AoudaClientOptions as I, type JoinClusterRequest as J, type AoudaDataType as K, type ListBackupsResponse as L, type AppAuthOptions as M, type NodeInfoResponse as N, AuthClient as O, type PromoteClusterResponse as P, type AuthResult as Q, type ReplicationStatusResponse as R, type SchemaLike as S, type Transport as T, type AuthUserInfo as U, type AuthorizationMode as V, BackupAdminApi as W, type BackupMetrics as X, type BackupSummary as Y, type BatchMutationResult as Z, type BatchOperationInput as _, type BulkLoadJobHandle as a, type MetricsSnapshot as a$, type BranchInfo as a0, BranchesApi as a1, type BulkLoadForceAbortRequest as a2, type BulkLoadForceAbortResponse as a3, type BulkLoadListResponse as a4, type BulkLoadProgress as a5, type BulkLoadReplicaProgress as a6, type BulkLoadReplicaProgressDto as a7, type BulkLoadStatusResponse as a8, CircuitBreakerPolicy as a9, HealthAdminApi as aA, type IndexInfo as aB, type InsertOptions as aC, type InsertResult as aD, type IoMetrics as aE, JobsApi as aF, type LatencyPercentiles as aG, MaterializedQueriesApi as aH, type MaterializedQueryDefinition as aI, type MaterializedQueryExecuteOptions as aJ, type MaterializedQueryExecuteResult as aK, type MaterializedQueryMetrics as aL, type MaterializedQueryRefreshOptions as aM, MaterializedQueryState as aN, type MaterializedQueryStateNumber as aO, type MaterializedQueryStatus as aP, MaterializedQueryType as aQ, type MaterializedQueryTypeNumber as aR, type MemberInfo as aS, type MemoryMetrics as aT, type MergeBranchOptions as aU, type MergeConflict as aV, type MergeExecutionResult as aW, type MergeResult as aX, MetricsAdminApi as aY, type MetricsHistory as aZ, type MetricsHistoryOptions as a_, ClusterAdminApi as aa, type ClusterMemberEntry as ab, type ClusterThisNodeEntry as ac, type ColumnSchema as ad, type ColumnSummaryForErd as ae, type ColumnarResponse as af, type ComponentHealthEntry as ag, type ComputedColumnDef as ah, ConfigAdminApi as ai, type CreateBranchRequest as aj, type CreateColumnRequest as ak, type CreateDatabaseOptions as al, type CreatePartitionGrantRequest as am, type CreateRlsResolverRequest as an, type CreateTableRequest as ao, type DatabaseCoverageEntry as ap, type DatabaseInfo as aq, type DatabaseMemoryMetrics as ar, type DatabaseMemoryUsage as as, type DatabaseMetricsDto as at, type DatabaseOptionsInfo as au, DatabasesApi as av, type DeleteOptions as aw, type DiffSummary as ax, FILTER_OPERATORS as ay, type FilterOperator as az, type TopologyResponse as b, type
|
|
3933
|
+
export { type BloomFilterMetrics as $, AoudaClient as A, type BulkLoadOptions as B, type CoverageResponse as C, type DetailedHealthResponse as D, type AggregateFunctionName as E, type FailoverClusterResponse as F, type AlterColumnRequest as G, type HealthStatus as H, type AoudaClientOptions as I, type JoinClusterRequest as J, type AoudaDataType as K, type ListBackupsResponse as L, type AppAuthOptions as M, type NodeInfoResponse as N, AuthClient as O, type PromoteClusterResponse as P, type AuthResult as Q, type ReplicationStatusResponse as R, type SchemaLike as S, type Transport as T, type AuthUserInfo as U, type AuthorizationMode as V, BackupAdminApi as W, type BackupMetrics as X, type BackupSummary as Y, type BatchMutationResult as Z, type BatchOperationInput as _, type BulkLoadJobHandle as a, type MetricsSnapshot as a$, type BranchInfo as a0, BranchesApi as a1, type BulkLoadForceAbortRequest as a2, type BulkLoadForceAbortResponse as a3, type BulkLoadListResponse as a4, type BulkLoadProgress as a5, type BulkLoadReplicaProgress as a6, type BulkLoadReplicaProgressDto as a7, type BulkLoadStatusResponse as a8, CircuitBreakerPolicy as a9, HealthAdminApi as aA, type IndexInfo as aB, type InsertOptions as aC, type InsertResult as aD, type IoMetrics as aE, JobsApi as aF, type LatencyPercentiles as aG, MaterializedQueriesApi as aH, type MaterializedQueryDefinition as aI, type MaterializedQueryExecuteOptions as aJ, type MaterializedQueryExecuteResult as aK, type MaterializedQueryMetrics as aL, type MaterializedQueryRefreshOptions as aM, MaterializedQueryState as aN, type MaterializedQueryStateNumber as aO, type MaterializedQueryStatus as aP, MaterializedQueryType as aQ, type MaterializedQueryTypeNumber as aR, type MemberInfo as aS, type MemoryMetrics as aT, type MergeBranchOptions as aU, type MergeConflict as aV, type MergeExecutionResult as aW, type MergeResult as aX, MetricsAdminApi as aY, type MetricsHistory as aZ, type MetricsHistoryOptions as a_, ClusterAdminApi as aa, type ClusterMemberEntry as ab, type ClusterThisNodeEntry as ac, type ColumnSchema as ad, type ColumnSummaryForErd as ae, type ColumnarResponse as af, type ComponentHealthEntry as ag, type ComputedColumnDef as ah, ConfigAdminApi as ai, type CreateBranchRequest as aj, type CreateColumnRequest as ak, type CreateDatabaseOptions as al, type CreatePartitionGrantRequest as am, type CreateRlsResolverRequest as an, type CreateTableRequest as ao, type DatabaseCoverageEntry as ap, type DatabaseInfo as aq, type DatabaseMemoryMetrics as ar, type DatabaseMemoryUsage as as, type DatabaseMetricsDto as at, type DatabaseOptionsInfo as au, DatabasesApi as av, type DeleteOptions as aw, type DiffSummary as ax, FILTER_OPERATORS as ay, type FilterOperator as az, type TopologyResponse as b, type SubscriptionEvent as b$, type MetricsSummary as b0, type MutationResult as b1, type NamedArtifactWarning as b2, type NamedMutationResult as b3, NamedMutationsApi as b4, NamedQueriesApi as b5, type NamedQueryBatchItem as b6, type NamedQueryBatchSlotResult as b7, type NamedQueryExecuteOptions as b8, type NamedQuerySubscribeOptions as b9, ReplicationAdminApi as bA, type ReplicationMetrics as bB, type ResidencyConfig as bC, type ResultWarning as bD, RetryPolicy as bE, type RlsResolver as bF, type RlsResolverRule as bG, type RlsResolverRuleInput as bH, type RlsResolversListResponse as bI, type SchemaChange as bJ, type SchemaChangeType as bK, type SchemaDiffResult as bL, type SchemaRelationshipsResponse as bM, type SeedApplyResult as bN, type SeedTableApplyResult as bO, ServerAdminApi as bP, type ServerAuthOptions as bQ, type ServerMemoryResponse as bR, type ServerMetricsResponse as bS, type ServiceInfo as bT, type SimdMetrics as bU, type SingleDatabaseMetricsResponse as bV, type SortDirection as bW, type StorageMetrics as bX, type SubscribeOptions as bY, type Subscription as bZ, type SubscriptionChangeEvent as b_, NodeAdminApi as ba, type NodeLogEntry as bb, type NodeLogLevel as bc, type NodeLogStreamOptions as bd, type NodeLogsQuery as be, type NodeLogsResponse as bf, type OpenWriteStreamOptions as bg, type PageCacheMetrics as bh, type PartitionFunction as bi, type PartitionGrant as bj, type PartitionGrantsListResponse as bk, type PartitioningMetrics as bl, type PendingJobListResponse as bm, type PendingJobResponse as bn, type PerDatabaseLagEntry as bo, type PerDatabaseMetrics as bp, type PerDatabaseStatusEntry as bq, type QueryMetrics as br, type QueryResult as bs, type QueryStats as bt, type ReferenceInfo as bu, type RelationshipEndpoint as bv, type RelationshipInfo as bw, type RenameColumnRequest as bx, type RenameTableRequest as by, type ReorderColumnsRequest as bz, type ReadinessResponse as c, type SubscriptionInfo as c0, type SubscriptionSnapshotEvent as c1, TIME_BUCKET_FUNCTIONS as c2, type TableCoverageEntry as c3, type TableNameFromSchema as c4, type TablePolicy as c5, TableQuery as c6, type TableSchema as c7, type TableSchemaResponse as c8, type TableSummary as c9, type TableSummaryForErd as ca, TablesApi as cb, type TimeBucketFunction as cc, type TimeSeriesMetrics as cd, type TransactionMetrics as ce, type TypeGenerationOptions as cf, type UpdateOptions as cg, type UpdateRlsResolverRequest as ch, type UpdateTableOptionsRequest as ci, type UpdateTablePolicyRequest as cj, type UserProfile as ck, type WalMetrics as cl, WhereGroupBuilder as cm, type WhereOperator as cn, type WriteStream as co, coerceColumnarValue as cp, columnarToRows as cq, createAoudaClient as cr, 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 };
|
|
@@ -833,12 +833,29 @@ interface ConditionalScalarExpr {
|
|
|
833
833
|
then: ScalarExprNode;
|
|
834
834
|
else: ScalarExprNode;
|
|
835
835
|
}
|
|
836
|
+
/**
|
|
837
|
+
* Bind-time parameter hole. The named-query binder substitutes a literal before eval.
|
|
838
|
+
* @internal
|
|
839
|
+
*/
|
|
840
|
+
interface ParamScalarExpr {
|
|
841
|
+
type: "param";
|
|
842
|
+
name: string;
|
|
843
|
+
}
|
|
844
|
+
/**
|
|
845
|
+
* Closed allowlist function call. fn is lowercase and case-sensitive.
|
|
846
|
+
* @internal
|
|
847
|
+
*/
|
|
848
|
+
interface CallScalarExpr {
|
|
849
|
+
type: "call";
|
|
850
|
+
fn: string;
|
|
851
|
+
args: ScalarExprNode[];
|
|
852
|
+
}
|
|
836
853
|
/**
|
|
837
854
|
* Discriminated union for scalar expression nodes in expression-based SET values.
|
|
838
855
|
* Named ScalarExprNode (not SetExprNode) to allow reuse for future SELECT projections.
|
|
839
856
|
* @internal
|
|
840
857
|
*/
|
|
841
|
-
type ScalarExprNode = LiteralScalarExpr | ColRefScalarExpr | ArithmeticScalarExpr | CoalesceScalarExpr | ConditionalScalarExpr;
|
|
858
|
+
type ScalarExprNode = LiteralScalarExpr | ColRefScalarExpr | ArithmeticScalarExpr | CoalesceScalarExpr | ConditionalScalarExpr | ParamScalarExpr | CallScalarExpr;
|
|
842
859
|
/**
|
|
843
860
|
* A single server-side computed column definition for SELECT projections.
|
|
844
861
|
* Plain JSON object; the polymorphism lives in ScalarExprNode.
|
|
@@ -2259,6 +2276,7 @@ declare class AuthHandler {
|
|
|
2259
2276
|
private readonly _serverUrl;
|
|
2260
2277
|
private readonly _timeout;
|
|
2261
2278
|
private readonly _refreshThresholdMs;
|
|
2279
|
+
private _onAccessTokenRefreshed;
|
|
2262
2280
|
private readonly _apiKeyMode;
|
|
2263
2281
|
private readonly _isServiceKeyMode;
|
|
2264
2282
|
private readonly _userToken;
|
|
@@ -2329,6 +2347,7 @@ declare class AuthHandler {
|
|
|
2329
2347
|
callMeEndpoint(): Promise<UserProfile>;
|
|
2330
2348
|
callChangePasswordEndpoint(currentPassword: string, newPassword: string): Promise<void>;
|
|
2331
2349
|
private shouldProactivelyRefresh;
|
|
2350
|
+
setOnAccessTokenRefreshed(handler: ((token: string) => void) | null): void;
|
|
2332
2351
|
private _doRefresh;
|
|
2333
2352
|
private _fetchJson;
|
|
2334
2353
|
private _tryReadErrorBody;
|
|
@@ -2426,12 +2445,23 @@ interface AuthMessage {
|
|
|
2426
2445
|
database: string;
|
|
2427
2446
|
wire_mode?: StreamingWireMode;
|
|
2428
2447
|
}
|
|
2448
|
+
interface ConflateOptions {
|
|
2449
|
+
key?: string[];
|
|
2450
|
+
interval_ms: number;
|
|
2451
|
+
}
|
|
2429
2452
|
interface SubscribeMessage {
|
|
2430
2453
|
type: "subscribe";
|
|
2431
2454
|
id: string;
|
|
2432
|
-
target
|
|
2455
|
+
target?: string;
|
|
2433
2456
|
filter?: Record<string, unknown>;
|
|
2434
2457
|
resume_from?: number;
|
|
2458
|
+
hash?: string;
|
|
2459
|
+
args?: Record<string, unknown>;
|
|
2460
|
+
conflate?: ConflateOptions;
|
|
2461
|
+
}
|
|
2462
|
+
interface ReAuthMessage {
|
|
2463
|
+
type: "re_auth";
|
|
2464
|
+
token: string;
|
|
2435
2465
|
}
|
|
2436
2466
|
interface UnsubscribeMessage {
|
|
2437
2467
|
type: "unsubscribe";
|
|
@@ -2456,7 +2486,7 @@ interface StreamCloseMessage {
|
|
|
2456
2486
|
interface PingMessage {
|
|
2457
2487
|
type: "ping";
|
|
2458
2488
|
}
|
|
2459
|
-
type ClientMessage = AuthMessage | SubscribeMessage | UnsubscribeMessage | StreamOpenMessage | StreamRowsMessage | StreamCloseMessage | PingMessage;
|
|
2489
|
+
type ClientMessage = AuthMessage | ReAuthMessage | SubscribeMessage | UnsubscribeMessage | StreamOpenMessage | StreamRowsMessage | StreamCloseMessage | PingMessage;
|
|
2460
2490
|
interface AuthOkMessage {
|
|
2461
2491
|
type: "auth_ok";
|
|
2462
2492
|
user_id?: string;
|
|
@@ -2479,6 +2509,11 @@ interface SnapshotCompleteMessage {
|
|
|
2479
2509
|
id: string;
|
|
2480
2510
|
version: number;
|
|
2481
2511
|
row_count: number;
|
|
2512
|
+
warnings?: Array<{
|
|
2513
|
+
code: string;
|
|
2514
|
+
hash?: string;
|
|
2515
|
+
sunsetAt?: string;
|
|
2516
|
+
}>;
|
|
2482
2517
|
}
|
|
2483
2518
|
interface GapMessage {
|
|
2484
2519
|
type: "gap";
|
|
@@ -2489,11 +2524,12 @@ interface GapMessage {
|
|
|
2489
2524
|
interface ChangeMessage {
|
|
2490
2525
|
type: "change";
|
|
2491
2526
|
id: string;
|
|
2492
|
-
op: "insert" | "update" | "delete";
|
|
2527
|
+
op: "insert" | "update" | "delete" | "upsert";
|
|
2493
2528
|
row?: unknown;
|
|
2494
2529
|
prev?: unknown;
|
|
2495
2530
|
key?: unknown;
|
|
2496
2531
|
version: number;
|
|
2532
|
+
values_skipped?: number;
|
|
2497
2533
|
}
|
|
2498
2534
|
interface StreamAckMessage {
|
|
2499
2535
|
type: "stream_ack";
|
|
@@ -2542,11 +2578,12 @@ interface SubscriptionSnapshotEvent<T = Record<string, unknown>> {
|
|
|
2542
2578
|
}
|
|
2543
2579
|
interface SubscriptionChangeEvent<T = Record<string, unknown>> {
|
|
2544
2580
|
type: "change";
|
|
2545
|
-
op: "insert" | "update" | "delete";
|
|
2581
|
+
op: "insert" | "update" | "delete" | "upsert";
|
|
2546
2582
|
row?: T;
|
|
2547
2583
|
prev?: T;
|
|
2548
2584
|
key?: unknown;
|
|
2549
2585
|
version: number;
|
|
2586
|
+
values_skipped?: number;
|
|
2550
2587
|
}
|
|
2551
2588
|
type SubscriptionEvent<T = Record<string, unknown>> = SubscriptionSnapshotEvent<T> | SubscriptionChangeEvent<T>;
|
|
2552
2589
|
interface SubscribeOptions<T = Record<string, unknown>> {
|
|
@@ -2554,6 +2591,7 @@ interface SubscribeOptions<T = Record<string, unknown>> {
|
|
|
2554
2591
|
onChange?: (event: SubscriptionChangeEvent<T>) => void;
|
|
2555
2592
|
onError?: (error: Error) => void;
|
|
2556
2593
|
filter?: Record<string, unknown>;
|
|
2594
|
+
conflate?: ConflateOptions;
|
|
2557
2595
|
}
|
|
2558
2596
|
interface Subscription<T = Record<string, unknown>> extends AsyncIterable<SubscriptionEvent<T>> {
|
|
2559
2597
|
readonly id: string;
|
|
@@ -3599,6 +3637,12 @@ declare class MaterializedQueriesApi {
|
|
|
3599
3637
|
interface NamedQueryExecuteOptions {
|
|
3600
3638
|
signal?: AbortSignal;
|
|
3601
3639
|
}
|
|
3640
|
+
interface NamedQuerySubscribeOptions<T = Record<string, unknown>> {
|
|
3641
|
+
onSnapshot?: (rows: T[], version: number) => void;
|
|
3642
|
+
onChange?: (event: SubscriptionChangeEvent<T>) => void;
|
|
3643
|
+
onError?: (error: Error) => void;
|
|
3644
|
+
conflate?: ConflateOptions;
|
|
3645
|
+
}
|
|
3602
3646
|
interface NamedQueryBatchItem {
|
|
3603
3647
|
hash: string;
|
|
3604
3648
|
args?: Record<string, unknown>;
|
|
@@ -3620,9 +3664,11 @@ declare class NamedQueriesApi {
|
|
|
3620
3664
|
private readonly transport;
|
|
3621
3665
|
private readonly database;
|
|
3622
3666
|
private readonly onWarning;
|
|
3623
|
-
|
|
3667
|
+
private readonly getStreamingTransport;
|
|
3668
|
+
constructor(transport: Transport, database: string, onWarning: NamedArtifactWarningSink, getStreamingTransport: () => StreamingTransport);
|
|
3624
3669
|
execute<T = Record<string, unknown>>(hash: string, args?: Record<string, unknown>, options?: NamedQueryExecuteOptions): Promise<QueryResult<T>>;
|
|
3625
3670
|
batch<T = Record<string, unknown>>(items: NamedQueryBatchItem[], options?: NamedQueryExecuteOptions): Promise<NamedQueryBatchSlotResult<T>[]>;
|
|
3671
|
+
subscribe<T = Record<string, unknown>>(hash: string, args?: Record<string, unknown>, options?: NamedQuerySubscribeOptions<T>): Subscription<T>;
|
|
3626
3672
|
}
|
|
3627
3673
|
declare class NamedMutationsApi {
|
|
3628
3674
|
private readonly transport;
|
|
@@ -3884,4 +3930,4 @@ declare class AoudaClient<S extends SchemaLike = DefaultSchema> {
|
|
|
3884
3930
|
*/
|
|
3885
3931
|
declare function createAoudaClient<S extends SchemaLike = DefaultSchema>(options: AoudaClientOptions): AoudaClient<S>;
|
|
3886
3932
|
|
|
3887
|
-
export { type BloomFilterMetrics as $, AoudaClient as A, type BulkLoadOptions as B, type CoverageResponse as C, type DetailedHealthResponse as D, type AggregateFunctionName as E, type FailoverClusterResponse as F, type AlterColumnRequest as G, type HealthStatus as H, type AoudaClientOptions as I, type JoinClusterRequest as J, type AoudaDataType as K, type ListBackupsResponse as L, type AppAuthOptions as M, type NodeInfoResponse as N, AuthClient as O, type PromoteClusterResponse as P, type AuthResult as Q, type ReplicationStatusResponse as R, type SchemaLike as S, type Transport as T, type AuthUserInfo as U, type AuthorizationMode as V, BackupAdminApi as W, type BackupMetrics as X, type BackupSummary as Y, type BatchMutationResult as Z, type BatchOperationInput as _, type BulkLoadJobHandle as a, type MetricsSnapshot as a$, type BranchInfo as a0, BranchesApi as a1, type BulkLoadForceAbortRequest as a2, type BulkLoadForceAbortResponse as a3, type BulkLoadListResponse as a4, type BulkLoadProgress as a5, type BulkLoadReplicaProgress as a6, type BulkLoadReplicaProgressDto as a7, type BulkLoadStatusResponse as a8, CircuitBreakerPolicy as a9, HealthAdminApi as aA, type IndexInfo as aB, type InsertOptions as aC, type InsertResult as aD, type IoMetrics as aE, JobsApi as aF, type LatencyPercentiles as aG, MaterializedQueriesApi as aH, type MaterializedQueryDefinition as aI, type MaterializedQueryExecuteOptions as aJ, type MaterializedQueryExecuteResult as aK, type MaterializedQueryMetrics as aL, type MaterializedQueryRefreshOptions as aM, MaterializedQueryState as aN, type MaterializedQueryStateNumber as aO, type MaterializedQueryStatus as aP, MaterializedQueryType as aQ, type MaterializedQueryTypeNumber as aR, type MemberInfo as aS, type MemoryMetrics as aT, type MergeBranchOptions as aU, type MergeConflict as aV, type MergeExecutionResult as aW, type MergeResult as aX, MetricsAdminApi as aY, type MetricsHistory as aZ, type MetricsHistoryOptions as a_, ClusterAdminApi as aa, type ClusterMemberEntry as ab, type ClusterThisNodeEntry as ac, type ColumnSchema as ad, type ColumnSummaryForErd as ae, type ColumnarResponse as af, type ComponentHealthEntry as ag, type ComputedColumnDef as ah, ConfigAdminApi as ai, type CreateBranchRequest as aj, type CreateColumnRequest as ak, type CreateDatabaseOptions as al, type CreatePartitionGrantRequest as am, type CreateRlsResolverRequest as an, type CreateTableRequest as ao, type DatabaseCoverageEntry as ap, type DatabaseInfo as aq, type DatabaseMemoryMetrics as ar, type DatabaseMemoryUsage as as, type DatabaseMetricsDto as at, type DatabaseOptionsInfo as au, DatabasesApi as av, type DeleteOptions as aw, type DiffSummary as ax, FILTER_OPERATORS as ay, type FilterOperator as az, type TopologyResponse as b, type
|
|
3933
|
+
export { type BloomFilterMetrics as $, AoudaClient as A, type BulkLoadOptions as B, type CoverageResponse as C, type DetailedHealthResponse as D, type AggregateFunctionName as E, type FailoverClusterResponse as F, type AlterColumnRequest as G, type HealthStatus as H, type AoudaClientOptions as I, type JoinClusterRequest as J, type AoudaDataType as K, type ListBackupsResponse as L, type AppAuthOptions as M, type NodeInfoResponse as N, AuthClient as O, type PromoteClusterResponse as P, type AuthResult as Q, type ReplicationStatusResponse as R, type SchemaLike as S, type Transport as T, type AuthUserInfo as U, type AuthorizationMode as V, BackupAdminApi as W, type BackupMetrics as X, type BackupSummary as Y, type BatchMutationResult as Z, type BatchOperationInput as _, type BulkLoadJobHandle as a, type MetricsSnapshot as a$, type BranchInfo as a0, BranchesApi as a1, type BulkLoadForceAbortRequest as a2, type BulkLoadForceAbortResponse as a3, type BulkLoadListResponse as a4, type BulkLoadProgress as a5, type BulkLoadReplicaProgress as a6, type BulkLoadReplicaProgressDto as a7, type BulkLoadStatusResponse as a8, CircuitBreakerPolicy as a9, HealthAdminApi as aA, type IndexInfo as aB, type InsertOptions as aC, type InsertResult as aD, type IoMetrics as aE, JobsApi as aF, type LatencyPercentiles as aG, MaterializedQueriesApi as aH, type MaterializedQueryDefinition as aI, type MaterializedQueryExecuteOptions as aJ, type MaterializedQueryExecuteResult as aK, type MaterializedQueryMetrics as aL, type MaterializedQueryRefreshOptions as aM, MaterializedQueryState as aN, type MaterializedQueryStateNumber as aO, type MaterializedQueryStatus as aP, MaterializedQueryType as aQ, type MaterializedQueryTypeNumber as aR, type MemberInfo as aS, type MemoryMetrics as aT, type MergeBranchOptions as aU, type MergeConflict as aV, type MergeExecutionResult as aW, type MergeResult as aX, MetricsAdminApi as aY, type MetricsHistory as aZ, type MetricsHistoryOptions as a_, ClusterAdminApi as aa, type ClusterMemberEntry as ab, type ClusterThisNodeEntry as ac, type ColumnSchema as ad, type ColumnSummaryForErd as ae, type ColumnarResponse as af, type ComponentHealthEntry as ag, type ComputedColumnDef as ah, ConfigAdminApi as ai, type CreateBranchRequest as aj, type CreateColumnRequest as ak, type CreateDatabaseOptions as al, type CreatePartitionGrantRequest as am, type CreateRlsResolverRequest as an, type CreateTableRequest as ao, type DatabaseCoverageEntry as ap, type DatabaseInfo as aq, type DatabaseMemoryMetrics as ar, type DatabaseMemoryUsage as as, type DatabaseMetricsDto as at, type DatabaseOptionsInfo as au, DatabasesApi as av, type DeleteOptions as aw, type DiffSummary as ax, FILTER_OPERATORS as ay, type FilterOperator as az, type TopologyResponse as b, type SubscriptionEvent as b$, type MetricsSummary as b0, type MutationResult as b1, type NamedArtifactWarning as b2, type NamedMutationResult as b3, NamedMutationsApi as b4, NamedQueriesApi as b5, type NamedQueryBatchItem as b6, type NamedQueryBatchSlotResult as b7, type NamedQueryExecuteOptions as b8, type NamedQuerySubscribeOptions as b9, ReplicationAdminApi as bA, type ReplicationMetrics as bB, type ResidencyConfig as bC, type ResultWarning as bD, RetryPolicy as bE, type RlsResolver as bF, type RlsResolverRule as bG, type RlsResolverRuleInput as bH, type RlsResolversListResponse as bI, type SchemaChange as bJ, type SchemaChangeType as bK, type SchemaDiffResult as bL, type SchemaRelationshipsResponse as bM, type SeedApplyResult as bN, type SeedTableApplyResult as bO, ServerAdminApi as bP, type ServerAuthOptions as bQ, type ServerMemoryResponse as bR, type ServerMetricsResponse as bS, type ServiceInfo as bT, type SimdMetrics as bU, type SingleDatabaseMetricsResponse as bV, type SortDirection as bW, type StorageMetrics as bX, type SubscribeOptions as bY, type Subscription as bZ, type SubscriptionChangeEvent as b_, NodeAdminApi as ba, type NodeLogEntry as bb, type NodeLogLevel as bc, type NodeLogStreamOptions as bd, type NodeLogsQuery as be, type NodeLogsResponse as bf, type OpenWriteStreamOptions as bg, type PageCacheMetrics as bh, type PartitionFunction as bi, type PartitionGrant as bj, type PartitionGrantsListResponse as bk, type PartitioningMetrics as bl, type PendingJobListResponse as bm, type PendingJobResponse as bn, type PerDatabaseLagEntry as bo, type PerDatabaseMetrics as bp, type PerDatabaseStatusEntry as bq, type QueryMetrics as br, type QueryResult as bs, type QueryStats as bt, type ReferenceInfo as bu, type RelationshipEndpoint as bv, type RelationshipInfo as bw, type RenameColumnRequest as bx, type RenameTableRequest as by, type ReorderColumnsRequest as bz, type ReadinessResponse as c, type SubscriptionInfo as c0, type SubscriptionSnapshotEvent as c1, TIME_BUCKET_FUNCTIONS as c2, type TableCoverageEntry as c3, type TableNameFromSchema as c4, type TablePolicy as c5, TableQuery as c6, type TableSchema as c7, type TableSchemaResponse as c8, type TableSummary as c9, type TableSummaryForErd as ca, TablesApi as cb, type TimeBucketFunction as cc, type TimeSeriesMetrics as cd, type TransactionMetrics as ce, type TypeGenerationOptions as cf, type UpdateOptions as cg, type UpdateRlsResolverRequest as ch, type UpdateTableOptionsRequest as ci, type UpdateTablePolicyRequest as cj, type UserProfile as ck, type WalMetrics as cl, WhereGroupBuilder as cm, type WhereOperator as cn, type WriteStream as co, coerceColumnarValue as cp, columnarToRows as cq, createAoudaClient as cr, 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 };
|