@aouda/client 0.1.11 → 0.1.13
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 +155 -24
- 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 +155 -24
- package/dist/cli/index.js.map +1 -1
- package/dist/{client-CT3GdrvA.d.cts → client-DFujaTFB.d.cts} +317 -8
- package/dist/{client-CT3GdrvA.d.ts → client-DFujaTFB.d.ts} +317 -8
- package/dist/index.cjs +157 -24
- 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 +156 -24
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -566,6 +566,8 @@ interface TableSchema {
|
|
|
566
566
|
rlsResolverName?: string;
|
|
567
567
|
/** IETF culture tag for locale-aware date/number parsing (e.g. "en-US", "en-GB"). Null = ISO defaults. */
|
|
568
568
|
culture?: string | null;
|
|
569
|
+
/** When true, browser-tier credentials on the data-plane listener may touch this table. Omit/false = fail-closed. */
|
|
570
|
+
dataPlaneAccess?: boolean;
|
|
569
571
|
}
|
|
570
572
|
/**
|
|
571
573
|
* Schema definition for a single column.
|
|
@@ -647,6 +649,8 @@ interface TableSchemaResponse {
|
|
|
647
649
|
rlsResolverName?: string;
|
|
648
650
|
/** IETF culture tag for locale-aware date/number parsing (e.g. "en-US", "en-GB"). Null = ISO defaults. */
|
|
649
651
|
culture?: string | null;
|
|
652
|
+
/** When true, browser-tier credentials on the data-plane listener may touch this table. Omit/false = fail-closed. */
|
|
653
|
+
dataPlaneAccess?: boolean;
|
|
650
654
|
}
|
|
651
655
|
/**
|
|
652
656
|
* Index information (placeholder for future index management).
|
|
@@ -833,12 +837,29 @@ interface ConditionalScalarExpr {
|
|
|
833
837
|
then: ScalarExprNode;
|
|
834
838
|
else: ScalarExprNode;
|
|
835
839
|
}
|
|
840
|
+
/**
|
|
841
|
+
* Bind-time parameter hole. The named-query binder substitutes a literal before eval.
|
|
842
|
+
* @internal
|
|
843
|
+
*/
|
|
844
|
+
interface ParamScalarExpr {
|
|
845
|
+
type: "param";
|
|
846
|
+
name: string;
|
|
847
|
+
}
|
|
848
|
+
/**
|
|
849
|
+
* Closed allowlist function call. fn is lowercase and case-sensitive.
|
|
850
|
+
* @internal
|
|
851
|
+
*/
|
|
852
|
+
interface CallScalarExpr {
|
|
853
|
+
type: "call";
|
|
854
|
+
fn: string;
|
|
855
|
+
args: ScalarExprNode[];
|
|
856
|
+
}
|
|
836
857
|
/**
|
|
837
858
|
* Discriminated union for scalar expression nodes in expression-based SET values.
|
|
838
859
|
* Named ScalarExprNode (not SetExprNode) to allow reuse for future SELECT projections.
|
|
839
860
|
* @internal
|
|
840
861
|
*/
|
|
841
|
-
type ScalarExprNode = LiteralScalarExpr | ColRefScalarExpr | ArithmeticScalarExpr | CoalesceScalarExpr | ConditionalScalarExpr;
|
|
862
|
+
type ScalarExprNode = LiteralScalarExpr | ColRefScalarExpr | ArithmeticScalarExpr | CoalesceScalarExpr | ConditionalScalarExpr | ParamScalarExpr | CallScalarExpr;
|
|
842
863
|
/**
|
|
843
864
|
* A single server-side computed column definition for SELECT projections.
|
|
844
865
|
* Plain JSON object; the polymorphism lives in ScalarExprNode.
|
|
@@ -914,6 +935,8 @@ interface CreateTableRequest {
|
|
|
914
935
|
rlsResolverName?: string;
|
|
915
936
|
/** IETF culture tag for locale-aware date/number parsing (e.g. "en-US", "en-GB"). Null/omit = ISO defaults. */
|
|
916
937
|
culture?: string | null;
|
|
938
|
+
/** When true, browser-tier credentials on the data-plane listener may touch this table. Omit/false = fail-closed. */
|
|
939
|
+
dataPlaneAccess?: boolean;
|
|
917
940
|
}
|
|
918
941
|
/**
|
|
919
942
|
* Request body for updating table options (PUT /api/databases/{db}/tables/{name}/options).
|
|
@@ -930,6 +953,8 @@ interface UpdateTableOptionsRequest {
|
|
|
930
953
|
rlsResolverName?: string | null;
|
|
931
954
|
/** IETF culture tag. Null to clear. */
|
|
932
955
|
culture?: string | null;
|
|
956
|
+
/** When true, browser-tier credentials on the data-plane listener may touch this table. Null/omit = unchanged. */
|
|
957
|
+
dataPlaneAccess?: boolean | null;
|
|
933
958
|
}
|
|
934
959
|
/**
|
|
935
960
|
* Request body for renaming a table (PATCH /api/databases/{db}/tables/{name}).
|
|
@@ -1080,6 +1105,22 @@ interface BulkLoadOptions {
|
|
|
1080
1105
|
* are stored as-is; after successful commit the server advances the counter to max(inserted).
|
|
1081
1106
|
*/
|
|
1082
1107
|
identityInsert?: boolean;
|
|
1108
|
+
/**
|
|
1109
|
+
* When true, expand the lock set to the transform-graph closure and land rows via the
|
|
1110
|
+
* bulk-load coordinator. Mutually exclusive with {@link BulkLoadOptions.preTransformed}.
|
|
1111
|
+
* Compute-bearing tables require exactly one of `applyTransforms` or `preTransformed`.
|
|
1112
|
+
* Both true → server `BULK_LOAD_TRANSFORM_INTENT_CONFLICT`; neither →
|
|
1113
|
+
* `BULK_LOAD_TRANSFORM_INTENT_REQUIRED`. The client does not throw locally when both
|
|
1114
|
+
* are set; the server is the source of truth.
|
|
1115
|
+
*/
|
|
1116
|
+
applyTransforms?: boolean;
|
|
1117
|
+
/**
|
|
1118
|
+
* When true, write named tables as-is (no pipeline). Mutually exclusive with
|
|
1119
|
+
* {@link BulkLoadOptions.applyTransforms}. Compute-bearing tables require exactly one
|
|
1120
|
+
* of `applyTransforms` or `preTransformed`. The client does not throw locally when both
|
|
1121
|
+
* are set; the server is the source of truth.
|
|
1122
|
+
*/
|
|
1123
|
+
preTransformed?: boolean;
|
|
1083
1124
|
}
|
|
1084
1125
|
interface BulkLoadProgress {
|
|
1085
1126
|
ivfAssignmentsCompleted: number;
|
|
@@ -2435,7 +2476,7 @@ interface ConflateOptions {
|
|
|
2435
2476
|
interface SubscribeMessage {
|
|
2436
2477
|
type: "subscribe";
|
|
2437
2478
|
id: string;
|
|
2438
|
-
target
|
|
2479
|
+
target?: string;
|
|
2439
2480
|
filter?: Record<string, unknown>;
|
|
2440
2481
|
resume_from?: number;
|
|
2441
2482
|
hash?: string;
|
|
@@ -2492,6 +2533,11 @@ interface SnapshotCompleteMessage {
|
|
|
2492
2533
|
id: string;
|
|
2493
2534
|
version: number;
|
|
2494
2535
|
row_count: number;
|
|
2536
|
+
warnings?: Array<{
|
|
2537
|
+
code: string;
|
|
2538
|
+
hash?: string;
|
|
2539
|
+
sunsetAt?: string;
|
|
2540
|
+
}>;
|
|
2495
2541
|
}
|
|
2496
2542
|
interface GapMessage {
|
|
2497
2543
|
type: "gap";
|
|
@@ -3274,6 +3320,185 @@ declare class DatabasesApi {
|
|
|
3274
3320
|
drop(databaseName: string): Promise<void>;
|
|
3275
3321
|
}
|
|
3276
3322
|
|
|
3323
|
+
/**
|
|
3324
|
+
* Schema-file types for `aouda.schema.json` (engine `Aouda.Engine.Schema.Models`).
|
|
3325
|
+
* Property names match the file JSON, not HTTP GET table (`isNullable` / `primaryKeyOrder`).
|
|
3326
|
+
*/
|
|
3327
|
+
|
|
3328
|
+
/** One partition-key entry: column name and optional partition function. */
|
|
3329
|
+
interface SchemaPartitionKeyEntry {
|
|
3330
|
+
column: string;
|
|
3331
|
+
function?: string;
|
|
3332
|
+
}
|
|
3333
|
+
/** Per-table policy in the schema file. */
|
|
3334
|
+
interface SchemaTablePolicy {
|
|
3335
|
+
storageTemperature?: string;
|
|
3336
|
+
}
|
|
3337
|
+
/** Per-table durability overrides in the schema file. */
|
|
3338
|
+
interface SchemaTableDurability {
|
|
3339
|
+
walEnabled?: boolean;
|
|
3340
|
+
replicationFactor?: number;
|
|
3341
|
+
}
|
|
3342
|
+
/** Database-level durability in schema settings. */
|
|
3343
|
+
interface SchemaSettingsDurability {
|
|
3344
|
+
walEnabled?: boolean;
|
|
3345
|
+
replicationFactor?: number;
|
|
3346
|
+
}
|
|
3347
|
+
/** Database-level settings in the schema file. */
|
|
3348
|
+
interface SchemaSettings {
|
|
3349
|
+
durability?: SchemaSettingsDurability;
|
|
3350
|
+
allowTruncatingTimestampToDate?: boolean;
|
|
3351
|
+
}
|
|
3352
|
+
/**
|
|
3353
|
+
* Column definition in the schema file. Keys are column names; values are these objects.
|
|
3354
|
+
* Uses schema-file names (`nullable`, `primaryKey`), not HTTP `ColumnSchema`.
|
|
3355
|
+
*/
|
|
3356
|
+
interface SchemaColumnDefinition {
|
|
3357
|
+
type: string;
|
|
3358
|
+
primaryKey?: number;
|
|
3359
|
+
autoIncrement?: boolean;
|
|
3360
|
+
nullable?: boolean;
|
|
3361
|
+
references?: string;
|
|
3362
|
+
partitionFunction?: string;
|
|
3363
|
+
encoder?: string;
|
|
3364
|
+
default?: string;
|
|
3365
|
+
description?: string;
|
|
3366
|
+
/** Write-time derived expression (stored, not virtual). */
|
|
3367
|
+
derived?: ScalarExprNode;
|
|
3368
|
+
unique?: boolean;
|
|
3369
|
+
}
|
|
3370
|
+
/** A single insert-time `route` or `tee` transform. */
|
|
3371
|
+
interface SchemaTableTransform {
|
|
3372
|
+
name: string;
|
|
3373
|
+
kind: "route" | "tee" | (string & {});
|
|
3374
|
+
when: WhereClause;
|
|
3375
|
+
to: string;
|
|
3376
|
+
}
|
|
3377
|
+
/** Table definition in the schema file. Keys are table names; values are these objects. */
|
|
3378
|
+
interface SchemaTableDefinition {
|
|
3379
|
+
columns?: Record<string, SchemaColumnDefinition>;
|
|
3380
|
+
partitionKey?: SchemaPartitionKeyEntry[];
|
|
3381
|
+
clusterColumns?: string[];
|
|
3382
|
+
policy?: SchemaTablePolicy;
|
|
3383
|
+
durability?: SchemaTableDurability;
|
|
3384
|
+
partitionLevelSecurity?: boolean;
|
|
3385
|
+
authMode?: string;
|
|
3386
|
+
permissionDimension?: string;
|
|
3387
|
+
rlsResolverName?: string;
|
|
3388
|
+
culture?: string;
|
|
3389
|
+
checks?: Record<string, WhereClause>;
|
|
3390
|
+
transforms?: SchemaTableTransform[];
|
|
3391
|
+
dataPlaneAccess?: boolean;
|
|
3392
|
+
}
|
|
3393
|
+
/** Optional declared constraints on a named-query or named-mutation parameter. */
|
|
3394
|
+
interface NamedQueryParamConstraint {
|
|
3395
|
+
required?: boolean;
|
|
3396
|
+
min?: number;
|
|
3397
|
+
max?: number;
|
|
3398
|
+
enum?: unknown[];
|
|
3399
|
+
maxLength?: number;
|
|
3400
|
+
maxItems?: number;
|
|
3401
|
+
}
|
|
3402
|
+
/**
|
|
3403
|
+
* Named-query template in `namedQueries`. Identity is the content hash of the body;
|
|
3404
|
+
* export JSON has no `hash` field.
|
|
3405
|
+
*/
|
|
3406
|
+
interface NamedQueryDefinition {
|
|
3407
|
+
table: string;
|
|
3408
|
+
where?: WhereClause;
|
|
3409
|
+
select?: string[];
|
|
3410
|
+
selectExpr?: ComputedColumnDef[];
|
|
3411
|
+
joins?: JoinClause[];
|
|
3412
|
+
orderBy?: OrderByClause[];
|
|
3413
|
+
distinct?: boolean;
|
|
3414
|
+
limit?: number;
|
|
3415
|
+
offset?: number;
|
|
3416
|
+
limitParam?: string;
|
|
3417
|
+
offsetParam?: string;
|
|
3418
|
+
params?: Record<string, NamedQueryParamConstraint>;
|
|
3419
|
+
version?: string;
|
|
3420
|
+
deprecatedAt?: string;
|
|
3421
|
+
sunsetAt?: string;
|
|
3422
|
+
}
|
|
3423
|
+
/**
|
|
3424
|
+
* Named-mutation template in `namedMutations`. No definer / `runAs`.
|
|
3425
|
+
*/
|
|
3426
|
+
interface NamedMutationDefinition {
|
|
3427
|
+
op: string;
|
|
3428
|
+
table: string;
|
|
3429
|
+
where?: WhereClause;
|
|
3430
|
+
set?: Record<string, unknown>;
|
|
3431
|
+
setExpr?: Record<string, ScalarExprNode>;
|
|
3432
|
+
values?: Record<string, unknown>;
|
|
3433
|
+
returning?: string[];
|
|
3434
|
+
limit?: number;
|
|
3435
|
+
orderBy?: OrderByClause[];
|
|
3436
|
+
limitParam?: string;
|
|
3437
|
+
params?: Record<string, NamedQueryParamConstraint>;
|
|
3438
|
+
version?: string;
|
|
3439
|
+
deprecatedAt?: string;
|
|
3440
|
+
sunsetAt?: string;
|
|
3441
|
+
}
|
|
3442
|
+
/** Group-by term object form. JSON also accepts a bare column-name string. */
|
|
3443
|
+
interface SchemaGroupByTerm {
|
|
3444
|
+
column: string;
|
|
3445
|
+
function?: string;
|
|
3446
|
+
outputName?: string;
|
|
3447
|
+
}
|
|
3448
|
+
/** One aggregate computation in an aggregate materialized query. */
|
|
3449
|
+
interface SchemaAggregateColumn {
|
|
3450
|
+
function: string;
|
|
3451
|
+
outputName: string;
|
|
3452
|
+
sourceColumn?: string;
|
|
3453
|
+
orderByColumn?: string;
|
|
3454
|
+
descending?: boolean;
|
|
3455
|
+
}
|
|
3456
|
+
/** A single filter comparison. */
|
|
3457
|
+
interface SchemaFilterCondition {
|
|
3458
|
+
column: string;
|
|
3459
|
+
op: string;
|
|
3460
|
+
value?: unknown;
|
|
3461
|
+
}
|
|
3462
|
+
/** Filter predicate (`condition` / `and` / `or`), matching HTTP filter config. */
|
|
3463
|
+
interface SchemaFilterPredicate {
|
|
3464
|
+
condition?: SchemaFilterCondition;
|
|
3465
|
+
and?: SchemaFilterCondition[];
|
|
3466
|
+
or?: SchemaFilterCondition[];
|
|
3467
|
+
}
|
|
3468
|
+
/** Optional storage options for a materialized query result. */
|
|
3469
|
+
interface SchemaMaterializedStorage {
|
|
3470
|
+
storageTemperature?: string;
|
|
3471
|
+
}
|
|
3472
|
+
/**
|
|
3473
|
+
* Materialized-query declaration in `materializedQueries`.
|
|
3474
|
+
* `groupBy` items are a column-name string or `{ column, function?, outputName? }`.
|
|
3475
|
+
*/
|
|
3476
|
+
interface SchemaMaterializedQuery {
|
|
3477
|
+
type: string;
|
|
3478
|
+
sourceTable: string;
|
|
3479
|
+
groupBy?: Array<string | SchemaGroupByTerm>;
|
|
3480
|
+
orderBy?: string;
|
|
3481
|
+
descending?: boolean;
|
|
3482
|
+
select?: string[];
|
|
3483
|
+
aggregates?: SchemaAggregateColumn[];
|
|
3484
|
+
predicate?: SchemaFilterPredicate;
|
|
3485
|
+
updateMode?: string;
|
|
3486
|
+
storage?: SchemaMaterializedStorage;
|
|
3487
|
+
}
|
|
3488
|
+
/** Root type for `aouda.schema.json`. */
|
|
3489
|
+
interface SchemaDocument {
|
|
3490
|
+
$schema?: string;
|
|
3491
|
+
database?: string;
|
|
3492
|
+
tables?: Record<string, SchemaTableDefinition>;
|
|
3493
|
+
settings?: SchemaSettings;
|
|
3494
|
+
extends?: string;
|
|
3495
|
+
namedQueries?: Record<string, NamedQueryDefinition>;
|
|
3496
|
+
dropNamedQueries?: string[];
|
|
3497
|
+
namedMutations?: Record<string, NamedMutationDefinition>;
|
|
3498
|
+
dropNamedMutations?: string[];
|
|
3499
|
+
materializedQueries?: Record<string, SchemaMaterializedQuery>;
|
|
3500
|
+
}
|
|
3501
|
+
|
|
3277
3502
|
/**
|
|
3278
3503
|
* Schema management API: diff, apply, export, history.
|
|
3279
3504
|
* Uses server endpoints under /api/databases/{db}/schema.
|
|
@@ -3283,7 +3508,7 @@ declare class DatabasesApi {
|
|
|
3283
3508
|
* Schema change classification (matches server `SchemaChangeType` enum names).
|
|
3284
3509
|
* Unknown future values may appear as plain strings at runtime.
|
|
3285
3510
|
*/
|
|
3286
|
-
type SchemaChangeType = "CreateTable" | "DropTable" | "AddColumn" | "DropColumn" | "UpdatePolicy" | "UpdateDurability" | "UpdatePartitionLevelSecurity" | "UpdateAuthorizationOptions" | "UpdateTableCulture" | "UpdateSettings" | "UpdateColumnAutoIncrement" | "UpdateColumnType" | "UpdateColumnNullable" | "UpdateColumnEncoder" | "RenameColumn" | "ReorderColumns" | "UpdateColumnReferences" | "UpdateColumnDefault" | "UpdateColumnDescription" | "UpdateTablePrimaryKey";
|
|
3511
|
+
type SchemaChangeType = "CreateTable" | "DropTable" | "AddColumn" | "DropColumn" | "UpdatePolicy" | "UpdateDurability" | "UpdatePartitionLevelSecurity" | "UpdateAuthorizationOptions" | "UpdateTableCulture" | "UpdateSettings" | "UpdateColumnAutoIncrement" | "UpdateColumnType" | "UpdateColumnNullable" | "UpdateColumnEncoder" | "RenameColumn" | "ReorderColumns" | "UpdateColumnReferences" | "UpdateColumnDefault" | "UpdateColumnDescription" | "UpdateTablePrimaryKey" | "UpdateDataPlaneAccess" | "UpdateColumnDerived" | "UpdateColumnUnique" | "UpdateTableChecks" | "UpdateTableTransforms" | "CreateNamedQuery" | "RetargetNamedQueryAlias" | "DeprecateNamedQuery" | "RemoveNamedQuery" | "CreateNamedMutation" | "RetargetNamedMutationAlias" | "DeprecateNamedMutation" | "RemoveNamedMutation" | "CreateMaterializedQuery" | "ReplaceMaterializedQuery" | "DropMaterializedQuery";
|
|
3287
3512
|
/** Server diff result (matches SchemaDiffResult). */
|
|
3288
3513
|
interface SchemaDiffResult {
|
|
3289
3514
|
changes: SchemaChange[];
|
|
@@ -3376,18 +3601,18 @@ declare class SchemaApi {
|
|
|
3376
3601
|
* @param desired - Schema document (merged from file + overlay).
|
|
3377
3602
|
* @param format - "json" (default) or "markdown".
|
|
3378
3603
|
*/
|
|
3379
|
-
diff(desired: Record<string, unknown>, format?: "json" | "markdown"): Promise<SchemaDiffResult | string>;
|
|
3604
|
+
diff(desired: SchemaDocument | Record<string, unknown>, format?: "json" | "markdown"): Promise<SchemaDiffResult | string>;
|
|
3380
3605
|
/**
|
|
3381
3606
|
* Apply desired schema to the database.
|
|
3382
3607
|
*/
|
|
3383
|
-
apply(desired: Record<string, unknown>, options?: {
|
|
3608
|
+
apply(desired: SchemaDocument | Record<string, unknown>, options?: {
|
|
3384
3609
|
allowDestructive?: boolean;
|
|
3385
3610
|
dryRun?: boolean;
|
|
3386
3611
|
}): Promise<SchemaApplyResponse>;
|
|
3387
3612
|
/**
|
|
3388
3613
|
* Export current database schema as JSON (aouda.schema.json format).
|
|
3389
3614
|
*/
|
|
3390
|
-
export(): Promise<
|
|
3615
|
+
export(): Promise<SchemaDocument>;
|
|
3391
3616
|
/**
|
|
3392
3617
|
* Get paginated migration history (newest first).
|
|
3393
3618
|
*/
|
|
@@ -3615,6 +3840,12 @@ declare class MaterializedQueriesApi {
|
|
|
3615
3840
|
interface NamedQueryExecuteOptions {
|
|
3616
3841
|
signal?: AbortSignal;
|
|
3617
3842
|
}
|
|
3843
|
+
interface NamedQuerySubscribeOptions<T = Record<string, unknown>> {
|
|
3844
|
+
onSnapshot?: (rows: T[], version: number) => void;
|
|
3845
|
+
onChange?: (event: SubscriptionChangeEvent<T>) => void;
|
|
3846
|
+
onError?: (error: Error) => void;
|
|
3847
|
+
conflate?: ConflateOptions;
|
|
3848
|
+
}
|
|
3618
3849
|
interface NamedQueryBatchItem {
|
|
3619
3850
|
hash: string;
|
|
3620
3851
|
args?: Record<string, unknown>;
|
|
@@ -3636,9 +3867,11 @@ declare class NamedQueriesApi {
|
|
|
3636
3867
|
private readonly transport;
|
|
3637
3868
|
private readonly database;
|
|
3638
3869
|
private readonly onWarning;
|
|
3639
|
-
|
|
3870
|
+
private readonly getStreamingTransport;
|
|
3871
|
+
constructor(transport: Transport, database: string, onWarning: NamedArtifactWarningSink, getStreamingTransport: () => StreamingTransport);
|
|
3640
3872
|
execute<T = Record<string, unknown>>(hash: string, args?: Record<string, unknown>, options?: NamedQueryExecuteOptions): Promise<QueryResult<T>>;
|
|
3641
3873
|
batch<T = Record<string, unknown>>(items: NamedQueryBatchItem[], options?: NamedQueryExecuteOptions): Promise<NamedQueryBatchSlotResult<T>[]>;
|
|
3874
|
+
subscribe<T = Record<string, unknown>>(hash: string, args?: Record<string, unknown>, options?: NamedQuerySubscribeOptions<T>): Subscription<T>;
|
|
3642
3875
|
}
|
|
3643
3876
|
declare class NamedMutationsApi {
|
|
3644
3877
|
private readonly transport;
|
|
@@ -3648,6 +3881,77 @@ declare class NamedMutationsApi {
|
|
|
3648
3881
|
execute(hash: string, args?: Record<string, unknown>): Promise<NamedMutationResult>;
|
|
3649
3882
|
}
|
|
3650
3883
|
|
|
3884
|
+
/**
|
|
3885
|
+
* Policy inspect API: POST /api/databases/{db}/policy/inspect.
|
|
3886
|
+
* Admin-gated; the existing client bearer is sufficient. Does not validate identities locally.
|
|
3887
|
+
*/
|
|
3888
|
+
|
|
3889
|
+
/** One partition grant on a user identity (`aouda.identities.json`). */
|
|
3890
|
+
interface TestIdentityGrant {
|
|
3891
|
+
dimension: string;
|
|
3892
|
+
partitionKey: string;
|
|
3893
|
+
accessLevel?: string;
|
|
3894
|
+
}
|
|
3895
|
+
/** One named synthetic principal. */
|
|
3896
|
+
interface TestIdentity {
|
|
3897
|
+
kind?: string;
|
|
3898
|
+
userId?: string;
|
|
3899
|
+
email?: string;
|
|
3900
|
+
roles?: string[];
|
|
3901
|
+
claims?: Record<string, string>;
|
|
3902
|
+
grants?: TestIdentityGrant[];
|
|
3903
|
+
}
|
|
3904
|
+
/** Root of `aouda.identities.json`. Sibling of the schema — never applied, never persisted. */
|
|
3905
|
+
interface TestIdentityDocument {
|
|
3906
|
+
$schema?: string;
|
|
3907
|
+
identities: Record<string, TestIdentity>;
|
|
3908
|
+
}
|
|
3909
|
+
interface PolicyInspectVectorProbe {
|
|
3910
|
+
table: string;
|
|
3911
|
+
column: string;
|
|
3912
|
+
embedding: number[];
|
|
3913
|
+
}
|
|
3914
|
+
interface PolicyInspectTraverseStart {
|
|
3915
|
+
table: string;
|
|
3916
|
+
startNodeId: number;
|
|
3917
|
+
hops?: number;
|
|
3918
|
+
}
|
|
3919
|
+
/** Body for `POST /api/databases/{db}/policy/inspect`. */
|
|
3920
|
+
interface PolicyInspectRequest {
|
|
3921
|
+
identity?: TestIdentity;
|
|
3922
|
+
document?: TestIdentityDocument;
|
|
3923
|
+
identityName?: string;
|
|
3924
|
+
tables?: string[];
|
|
3925
|
+
includeSample?: boolean;
|
|
3926
|
+
sampleLimit?: number;
|
|
3927
|
+
vectorProbe?: PolicyInspectVectorProbe;
|
|
3928
|
+
traverseStart?: PolicyInspectTraverseStart;
|
|
3929
|
+
}
|
|
3930
|
+
interface PolicyInspectTableResult {
|
|
3931
|
+
table: string;
|
|
3932
|
+
visibility: "full" | "filtered" | "none" | (string & {});
|
|
3933
|
+
pls?: WhereClause;
|
|
3934
|
+
rls?: WhereClause;
|
|
3935
|
+
effective?: WhereClause;
|
|
3936
|
+
effectiveHash?: string;
|
|
3937
|
+
message?: string;
|
|
3938
|
+
/** Tabular samples are row-object arrays; vector/edge/MQ differ. */
|
|
3939
|
+
sample?: unknown;
|
|
3940
|
+
sampleReason?: "probe_required" | "sample_failed" | (string & {});
|
|
3941
|
+
}
|
|
3942
|
+
interface PolicyInspectResponse {
|
|
3943
|
+
identityName?: string;
|
|
3944
|
+
tables: PolicyInspectTableResult[];
|
|
3945
|
+
}
|
|
3946
|
+
declare class PolicyApi {
|
|
3947
|
+
private readonly transport;
|
|
3948
|
+
private readonly database;
|
|
3949
|
+
constructor(transport: Transport, database: string);
|
|
3950
|
+
inspect(body: PolicyInspectRequest, options?: {
|
|
3951
|
+
signal?: AbortSignal;
|
|
3952
|
+
}): Promise<PolicyInspectResponse>;
|
|
3953
|
+
}
|
|
3954
|
+
|
|
3651
3955
|
/**
|
|
3652
3956
|
* @aouda/client — AoudaClient implementation.
|
|
3653
3957
|
*/
|
|
@@ -3685,6 +3989,7 @@ declare class AoudaClient<S extends SchemaLike = DefaultSchema> {
|
|
|
3685
3989
|
private readonly _materializedQueries;
|
|
3686
3990
|
private readonly _namedQueries;
|
|
3687
3991
|
private readonly _namedMutations;
|
|
3992
|
+
private readonly _policy;
|
|
3688
3993
|
private readonly _auth;
|
|
3689
3994
|
private readonly _authHandler;
|
|
3690
3995
|
private readonly _streamingEnableCompression;
|
|
@@ -3800,6 +4105,10 @@ declare class AoudaClient<S extends SchemaLike = DefaultSchema> {
|
|
|
3800
4105
|
* Hash-only named-mutation execute. No batch.
|
|
3801
4106
|
*/
|
|
3802
4107
|
get namedMutations(): NamedMutationsApi;
|
|
4108
|
+
/**
|
|
4109
|
+
* Policy inspect (`POST …/policy/inspect`). Admin on the data DB.
|
|
4110
|
+
*/
|
|
4111
|
+
get policy(): PolicyApi;
|
|
3803
4112
|
/**
|
|
3804
4113
|
* Access auth operations (signUp, signIn, signOut, refresh, me, changePassword).
|
|
3805
4114
|
* @returns The auth API.
|
|
@@ -3900,4 +4209,4 @@ declare class AoudaClient<S extends SchemaLike = DefaultSchema> {
|
|
|
3900
4209
|
*/
|
|
3901
4210
|
declare function createAoudaClient<S extends SchemaLike = DefaultSchema>(options: AoudaClientOptions): AoudaClient<S>;
|
|
3902
4211
|
|
|
3903
|
-
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
|
|
4212
|
+
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 SchemaMaterializedQuery as b$, type MetricsSummary as b0, type MutationResult as b1, type NamedArtifactWarning as b2, type NamedMutationDefinition as b3, type NamedMutationResult as b4, NamedMutationsApi as b5, NamedQueriesApi as b6, type NamedQueryBatchItem as b7, type NamedQueryBatchSlotResult as b8, type NamedQueryDefinition as b9, type QueryMetrics as bA, type QueryResult as bB, type QueryStats as bC, type ReferenceInfo as bD, type RelationshipEndpoint as bE, type RelationshipInfo as bF, type RenameColumnRequest as bG, type RenameTableRequest as bH, type ReorderColumnsRequest as bI, ReplicationAdminApi as bJ, type ReplicationMetrics as bK, type ResidencyConfig as bL, type ResultWarning as bM, RetryPolicy as bN, type RlsResolver as bO, type RlsResolverRule as bP, type RlsResolverRuleInput as bQ, type RlsResolversListResponse as bR, type SchemaAggregateColumn as bS, type SchemaChange as bT, type SchemaChangeType as bU, type SchemaColumnDefinition as bV, type SchemaDiffResult as bW, type SchemaDocument as bX, type SchemaFilterCondition as bY, type SchemaFilterPredicate as bZ, type SchemaGroupByTerm as b_, type NamedQueryExecuteOptions as ba, type NamedQueryParamConstraint as bb, type NamedQuerySubscribeOptions as bc, NodeAdminApi as bd, type NodeLogEntry as be, type NodeLogLevel as bf, type NodeLogStreamOptions as bg, type NodeLogsQuery as bh, type NodeLogsResponse as bi, type OpenWriteStreamOptions as bj, type PageCacheMetrics as bk, type PartitionFunction as bl, type PartitionGrant as bm, type PartitionGrantsListResponse as bn, type PartitioningMetrics as bo, type PendingJobListResponse as bp, type PendingJobResponse as bq, type PerDatabaseLagEntry as br, type PerDatabaseMetrics as bs, type PerDatabaseStatusEntry as bt, PolicyApi as bu, type PolicyInspectRequest as bv, type PolicyInspectResponse as bw, type PolicyInspectTableResult as bx, type PolicyInspectTraverseStart as by, type PolicyInspectVectorProbe as bz, type ReadinessResponse as c, type SchemaMaterializedStorage as c0, type SchemaPartitionKeyEntry as c1, type SchemaRelationshipsResponse as c2, type SchemaSettings as c3, type SchemaSettingsDurability as c4, type SchemaTableDefinition as c5, type SchemaTableDurability as c6, type SchemaTablePolicy as c7, type SchemaTableTransform as c8, type SeedApplyResult as c9, type TestIdentity as cA, type TestIdentityDocument as cB, type TestIdentityGrant as cC, type TimeBucketFunction as cD, type TimeSeriesMetrics as cE, type TransactionMetrics as cF, type TypeGenerationOptions as cG, type UpdateOptions as cH, type UpdateRlsResolverRequest as cI, type UpdateTableOptionsRequest as cJ, type UpdateTablePolicyRequest as cK, type UserProfile as cL, type WalMetrics as cM, WhereGroupBuilder as cN, type WhereOperator as cO, type WriteStream as cP, coerceColumnarValue as cQ, columnarToRows as cR, createAoudaClient as cS, type SeedTableApplyResult as ca, ServerAdminApi as cb, type ServerAuthOptions as cc, type ServerMemoryResponse as cd, type ServerMetricsResponse as ce, type ServiceInfo as cf, type SimdMetrics as cg, type SingleDatabaseMetricsResponse as ch, type SortDirection as ci, type StorageMetrics as cj, type SubscribeOptions as ck, type Subscription as cl, type SubscriptionChangeEvent as cm, type SubscriptionEvent as cn, type SubscriptionInfo as co, type SubscriptionSnapshotEvent as cp, TIME_BUCKET_FUNCTIONS as cq, type TableCoverageEntry as cr, type TableNameFromSchema as cs, type TablePolicy as ct, TableQuery as cu, type TableSchema as cv, type TableSchemaResponse as cw, type TableSummary as cx, type TableSummaryForErd as cy, TablesApi 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 };
|