@aouda/client 0.1.12 → 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.
@@ -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).
@@ -931,6 +935,8 @@ interface CreateTableRequest {
931
935
  rlsResolverName?: string;
932
936
  /** IETF culture tag for locale-aware date/number parsing (e.g. "en-US", "en-GB"). Null/omit = ISO defaults. */
933
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;
934
940
  }
935
941
  /**
936
942
  * Request body for updating table options (PUT /api/databases/{db}/tables/{name}/options).
@@ -947,6 +953,8 @@ interface UpdateTableOptionsRequest {
947
953
  rlsResolverName?: string | null;
948
954
  /** IETF culture tag. Null to clear. */
949
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;
950
958
  }
951
959
  /**
952
960
  * Request body for renaming a table (PATCH /api/databases/{db}/tables/{name}).
@@ -1097,6 +1105,22 @@ interface BulkLoadOptions {
1097
1105
  * are stored as-is; after successful commit the server advances the counter to max(inserted).
1098
1106
  */
1099
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;
1100
1124
  }
1101
1125
  interface BulkLoadProgress {
1102
1126
  ivfAssignmentsCompleted: number;
@@ -3296,6 +3320,185 @@ declare class DatabasesApi {
3296
3320
  drop(databaseName: string): Promise<void>;
3297
3321
  }
3298
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
+
3299
3502
  /**
3300
3503
  * Schema management API: diff, apply, export, history.
3301
3504
  * Uses server endpoints under /api/databases/{db}/schema.
@@ -3305,7 +3508,7 @@ declare class DatabasesApi {
3305
3508
  * Schema change classification (matches server `SchemaChangeType` enum names).
3306
3509
  * Unknown future values may appear as plain strings at runtime.
3307
3510
  */
3308
- 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";
3309
3512
  /** Server diff result (matches SchemaDiffResult). */
3310
3513
  interface SchemaDiffResult {
3311
3514
  changes: SchemaChange[];
@@ -3398,18 +3601,18 @@ declare class SchemaApi {
3398
3601
  * @param desired - Schema document (merged from file + overlay).
3399
3602
  * @param format - "json" (default) or "markdown".
3400
3603
  */
3401
- diff(desired: Record<string, unknown>, format?: "json" | "markdown"): Promise<SchemaDiffResult | string>;
3604
+ diff(desired: SchemaDocument | Record<string, unknown>, format?: "json" | "markdown"): Promise<SchemaDiffResult | string>;
3402
3605
  /**
3403
3606
  * Apply desired schema to the database.
3404
3607
  */
3405
- apply(desired: Record<string, unknown>, options?: {
3608
+ apply(desired: SchemaDocument | Record<string, unknown>, options?: {
3406
3609
  allowDestructive?: boolean;
3407
3610
  dryRun?: boolean;
3408
3611
  }): Promise<SchemaApplyResponse>;
3409
3612
  /**
3410
3613
  * Export current database schema as JSON (aouda.schema.json format).
3411
3614
  */
3412
- export(): Promise<Record<string, unknown>>;
3615
+ export(): Promise<SchemaDocument>;
3413
3616
  /**
3414
3617
  * Get paginated migration history (newest first).
3415
3618
  */
@@ -3678,6 +3881,77 @@ declare class NamedMutationsApi {
3678
3881
  execute(hash: string, args?: Record<string, unknown>): Promise<NamedMutationResult>;
3679
3882
  }
3680
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
+
3681
3955
  /**
3682
3956
  * @aouda/client — AoudaClient implementation.
3683
3957
  */
@@ -3715,6 +3989,7 @@ declare class AoudaClient<S extends SchemaLike = DefaultSchema> {
3715
3989
  private readonly _materializedQueries;
3716
3990
  private readonly _namedQueries;
3717
3991
  private readonly _namedMutations;
3992
+ private readonly _policy;
3718
3993
  private readonly _auth;
3719
3994
  private readonly _authHandler;
3720
3995
  private readonly _streamingEnableCompression;
@@ -3830,6 +4105,10 @@ declare class AoudaClient<S extends SchemaLike = DefaultSchema> {
3830
4105
  * Hash-only named-mutation execute. No batch.
3831
4106
  */
3832
4107
  get namedMutations(): NamedMutationsApi;
4108
+ /**
4109
+ * Policy inspect (`POST …/policy/inspect`). Admin on the data DB.
4110
+ */
4111
+ get policy(): PolicyApi;
3833
4112
  /**
3834
4113
  * Access auth operations (signUp, signIn, signOut, refresh, me, changePassword).
3835
4114
  * @returns The auth API.
@@ -3930,4 +4209,4 @@ declare class AoudaClient<S extends SchemaLike = DefaultSchema> {
3930
4209
  */
3931
4210
  declare function createAoudaClient<S extends SchemaLike = DefaultSchema>(options: AoudaClientOptions): AoudaClient<S>;
3932
4211
 
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 };
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 };
package/dist/index.cjs CHANGED
@@ -64,6 +64,7 @@ __export(index_exports, {
64
64
  NamedMutationsApi: () => NamedMutationsApi,
65
65
  NamedQueriesApi: () => NamedQueriesApi,
66
66
  NodeAdminApi: () => NodeAdminApi,
67
+ PolicyApi: () => PolicyApi,
67
68
  ReplicationAdminApi: () => ReplicationAdminApi,
68
69
  RetryPolicy: () => RetryPolicy,
69
70
  ServerAdminApi: () => ServerAdminApi,
@@ -86,7 +87,7 @@ module.exports = __toCommonJS(index_exports);
86
87
  // package.json
87
88
  var package_default = {
88
89
  name: "@aouda/client",
89
- version: "0.1.12",
90
+ version: "0.1.13",
90
91
  description: "Official TypeScript/JavaScript client library for Aouda",
91
92
  type: "module",
92
93
  main: "./dist/index.cjs",
@@ -1132,7 +1133,9 @@ var BulkLoadCoordinator = class {
1132
1133
  replicationMode: options.replicationMode,
1133
1134
  forceSingleNodeReplicationBypass: options.forceSingleNodeReplicationBypass,
1134
1135
  postLoadMqBehavior: options.postLoadMqBehavior,
1135
- ...options.identityInsert === true ? { identityInsert: true } : {}
1136
+ ...options.identityInsert === true ? { identityInsert: true } : {},
1137
+ ...options.applyTransforms === true ? { applyTransforms: true } : {},
1138
+ ...options.preTransformed === true ? { preTransformed: true } : {}
1136
1139
  }
1137
1140
  };
1138
1141
  const beginResp = await this.transport.post(
@@ -1225,7 +1228,11 @@ var ERROR_CODE_MAP = {
1225
1228
  NAMED_QUERY_BATCH_MUTATION: AoudaValidationError,
1226
1229
  NAMED_QUERY_BIND_FAILED: AoudaValidationError,
1227
1230
  NAMED_QUERY_PARAM_REQUIRED: AoudaValidationError,
1228
- NAMED_MUTATION_BIND_FAILED: AoudaValidationError
1231
+ NAMED_MUTATION_BIND_FAILED: AoudaValidationError,
1232
+ AUTH_IDENTITY_INVALID: AoudaValidationError,
1233
+ AUTH_IDENTITY_NOT_FOUND: AoudaValidationError,
1234
+ BULK_LOAD_TRANSFORM_INTENT_REQUIRED: AoudaValidationError,
1235
+ BULK_LOAD_TRANSFORM_INTENT_CONFLICT: AoudaValidationError
1229
1236
  };
1230
1237
  function createComposedAbortController(...signals) {
1231
1238
  const controller = new AbortController();
@@ -4959,6 +4966,20 @@ var NamedMutationsApi = class {
4959
4966
  }
4960
4967
  };
4961
4968
 
4969
+ // src/policy.ts
4970
+ var PolicyApi = class {
4971
+ constructor(transport, database) {
4972
+ this.transport = transport;
4973
+ this.database = database;
4974
+ }
4975
+ inspect(body, options) {
4976
+ const path = `${databasePath2(this.database)}/policy/inspect`;
4977
+ return this.transport.post(path, body, {
4978
+ signal: options?.signal
4979
+ });
4980
+ }
4981
+ };
4982
+
4962
4983
  // src/streaming/websocket-transport.ts
4963
4984
  var import_msgpack = require("@msgpack/msgpack");
4964
4985
  var DEFAULT_PING_INTERVAL_MS = 2e4;
@@ -5747,6 +5768,7 @@ var AoudaClient = class {
5747
5768
  this.database,
5748
5769
  onNamedArtifactWarning
5749
5770
  );
5771
+ this._policy = new PolicyApi(this.transport, this.database);
5750
5772
  }
5751
5773
  /**
5752
5774
  * Connects to the Aouda server.
@@ -5901,6 +5923,12 @@ var AoudaClient = class {
5901
5923
  get namedMutations() {
5902
5924
  return this._namedMutations;
5903
5925
  }
5926
+ /**
5927
+ * Policy inspect (`POST …/policy/inspect`). Admin on the data DB.
5928
+ */
5929
+ get policy() {
5930
+ return this._policy;
5931
+ }
5904
5932
  /**
5905
5933
  * Access auth operations (signUp, signIn, signOut, refresh, me, changePassword).
5906
5934
  * @returns The auth API.
@@ -6325,6 +6353,7 @@ var version = package_default.version;
6325
6353
  NamedMutationsApi,
6326
6354
  NamedQueriesApi,
6327
6355
  NodeAdminApi,
6356
+ PolicyApi,
6328
6357
  ReplicationAdminApi,
6329
6358
  RetryPolicy,
6330
6359
  ServerAdminApi,