@aouda/client 0.1.5 → 0.1.7
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 +51 -4
- 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 +51 -4
- package/dist/cli/index.js.map +1 -1
- package/dist/{client-CD9Ew5sO.d.cts → client-BbyXG5AL.d.cts} +81 -5
- package/dist/{client-CD9Ew5sO.d.ts → client-BbyXG5AL.d.ts} +81 -5
- package/dist/index.cjs +51 -4
- 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 +51 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -756,6 +756,16 @@ interface BatchMutationResult {
|
|
|
756
756
|
/** Server-side execution time in milliseconds. */
|
|
757
757
|
executionMs: number;
|
|
758
758
|
}
|
|
759
|
+
/**
|
|
760
|
+
* Options for {@link TableQuery.insert} / {@link TableQuery.insertMany}.
|
|
761
|
+
*/
|
|
762
|
+
interface InsertOptions {
|
|
763
|
+
/**
|
|
764
|
+
* When true, store explicit autoIncrement values as-is (including 0).
|
|
765
|
+
* Equivalent to Bond `isAutoIncrementDisabled: true`.
|
|
766
|
+
*/
|
|
767
|
+
identityInsert?: boolean;
|
|
768
|
+
}
|
|
759
769
|
/**
|
|
760
770
|
* Literal (constant) value node.
|
|
761
771
|
* @internal
|
|
@@ -997,6 +1007,12 @@ interface BulkLoadOptions {
|
|
|
997
1007
|
onProgress?: (progress: BulkLoadProgress) => void;
|
|
998
1008
|
/** AbortSignal for cancellation. Issues :abort on the server before throwing. */
|
|
999
1009
|
signal?: AbortSignal;
|
|
1010
|
+
/**
|
|
1011
|
+
* When true, treat this bulk-load as identity-insert (Bond `isAutoIncrementDisabled: true`):
|
|
1012
|
+
* every autoIncrement column must be present/non-null on every row; values (including `0`)
|
|
1013
|
+
* are stored as-is; after successful commit the server advances the counter to max(inserted).
|
|
1014
|
+
*/
|
|
1015
|
+
identityInsert?: boolean;
|
|
1000
1016
|
}
|
|
1001
1017
|
interface BulkLoadProgress {
|
|
1002
1018
|
ivfAssignmentsCompleted: number;
|
|
@@ -1911,8 +1927,11 @@ declare class NodeAdminApi {
|
|
|
1911
1927
|
type NotificationProviderSource = "db" | "env" | "none";
|
|
1912
1928
|
/** Information about one configured notification provider (email or SMS). */
|
|
1913
1929
|
interface NotificationProviderInfo {
|
|
1914
|
-
/**
|
|
1915
|
-
|
|
1930
|
+
/**
|
|
1931
|
+
* Provider identifier, e.g. "sendgrid", "gatewayapi", "capture", "console",
|
|
1932
|
+
* or null when no provider is active.
|
|
1933
|
+
*/
|
|
1934
|
+
provider: string | null;
|
|
1916
1935
|
/**
|
|
1917
1936
|
* Where the provider config was loaded from.
|
|
1918
1937
|
* "db" = persisted in _settings DB; "env" = appsettings/env var; "none" = no provider.
|
|
@@ -1952,6 +1971,11 @@ interface PutEmailProviderRequest {
|
|
|
1952
1971
|
fromName?: string | null;
|
|
1953
1972
|
inviteUrl?: string | null;
|
|
1954
1973
|
passwordResetUrl?: string | null;
|
|
1974
|
+
/**
|
|
1975
|
+
* Required when provider is "capture" and the server is Production.
|
|
1976
|
+
* Confirms OTPs will be visible to server admins via the outbox.
|
|
1977
|
+
*/
|
|
1978
|
+
acknowledgeDevCapture?: boolean;
|
|
1955
1979
|
}
|
|
1956
1980
|
/** Request body for PUT /admin/notifications/sms. */
|
|
1957
1981
|
interface PutSmsProviderRequest {
|
|
@@ -1960,6 +1984,11 @@ interface PutSmsProviderRequest {
|
|
|
1960
1984
|
apiKey?: string | null;
|
|
1961
1985
|
sender?: string | null;
|
|
1962
1986
|
baseUrl?: string | null;
|
|
1987
|
+
/**
|
|
1988
|
+
* Required when provider is "capture" and the server is Production.
|
|
1989
|
+
* Confirms OTPs will be visible to server admins via the outbox.
|
|
1990
|
+
*/
|
|
1991
|
+
acknowledgeDevCapture?: boolean;
|
|
1963
1992
|
}
|
|
1964
1993
|
/** Request body for POST /admin/notifications/email/test. */
|
|
1965
1994
|
interface TestEmailRequest {
|
|
@@ -1977,6 +2006,30 @@ interface TestSendResult {
|
|
|
1977
2006
|
/** Error message if success is false. */
|
|
1978
2007
|
error?: string | null;
|
|
1979
2008
|
}
|
|
2009
|
+
/** Channel for a captured notification. */
|
|
2010
|
+
type NotificationOutboxChannel = "email" | "sms";
|
|
2011
|
+
/** Kind of captured auth notification. */
|
|
2012
|
+
type NotificationOutboxKind = "password_reset" | "invite" | "mfa_otp" | "test";
|
|
2013
|
+
/** One captured outbound auth notification from GET /admin/notifications/outbox. */
|
|
2014
|
+
interface NotificationOutboxEntry {
|
|
2015
|
+
id: string;
|
|
2016
|
+
channel: NotificationOutboxChannel | string;
|
|
2017
|
+
kind: NotificationOutboxKind | string;
|
|
2018
|
+
to: string;
|
|
2019
|
+
subject: string | null;
|
|
2020
|
+
body: string;
|
|
2021
|
+
otp: string;
|
|
2022
|
+
createdAtUtc: string;
|
|
2023
|
+
}
|
|
2024
|
+
/** Response from GET /admin/notifications/outbox. */
|
|
2025
|
+
interface NotificationOutboxResponse {
|
|
2026
|
+
entries: NotificationOutboxEntry[];
|
|
2027
|
+
}
|
|
2028
|
+
/** Query options for GET /admin/notifications/outbox. */
|
|
2029
|
+
interface NotificationOutboxQuery {
|
|
2030
|
+
channel?: NotificationOutboxChannel | string;
|
|
2031
|
+
limit?: number;
|
|
2032
|
+
}
|
|
1980
2033
|
|
|
1981
2034
|
/**
|
|
1982
2035
|
* Admin notification provider settings API.
|
|
@@ -2021,6 +2074,17 @@ declare class NotificationsAdminApi {
|
|
|
2021
2074
|
* POST /admin/notifications/sms/test
|
|
2022
2075
|
*/
|
|
2023
2076
|
testSms(request: TestSmsRequest): Promise<TestSendResult>;
|
|
2077
|
+
/**
|
|
2078
|
+
* Get recent captured auth notifications (newest first).
|
|
2079
|
+
* GET /admin/notifications/outbox?channel=&limit=
|
|
2080
|
+
*/
|
|
2081
|
+
getOutbox(options?: NotificationOutboxQuery): Promise<NotificationOutboxResponse>;
|
|
2082
|
+
/**
|
|
2083
|
+
* Clear the in-memory notification outbox.
|
|
2084
|
+
* DELETE /admin/notifications/outbox
|
|
2085
|
+
*/
|
|
2086
|
+
clearOutbox(): Promise<NotificationOutboxResponse>;
|
|
2087
|
+
private buildOutboxPath;
|
|
2024
2088
|
}
|
|
2025
2089
|
|
|
2026
2090
|
/**
|
|
@@ -2761,6 +2825,8 @@ declare class TableQuery<T = Record<string, unknown>> {
|
|
|
2761
2825
|
* a Promise. It does not use query builder state (where, orderBy, etc.).
|
|
2762
2826
|
*
|
|
2763
2827
|
* @param row - The row data to insert. Keys are column names.
|
|
2828
|
+
* @param row - The row object to insert. Keys are column names.
|
|
2829
|
+
* @param options - Optional insert options (e.g. `identityInsert`).
|
|
2764
2830
|
* @returns The insert result with row count, execution time, and optional generated values.
|
|
2765
2831
|
* @throws Error if `row` is null or undefined.
|
|
2766
2832
|
*
|
|
@@ -2771,9 +2837,12 @@ declare class TableQuery<T = Record<string, unknown>> {
|
|
|
2771
2837
|
*
|
|
2772
2838
|
* console.log(result.rowsInserted); // 1
|
|
2773
2839
|
* console.log(result.generatedValues); // { "0": { id: 42 } }
|
|
2840
|
+
*
|
|
2841
|
+
* // Identity-insert (Bond isAutoIncrementDisabled: true): store explicit IDs including 0
|
|
2842
|
+
* await client.table('orders').insert({ id: 1000, status: 'seeded' }, { identityInsert: true });
|
|
2774
2843
|
* ```
|
|
2775
2844
|
*/
|
|
2776
|
-
insert(row: Partial<T
|
|
2845
|
+
insert(row: Partial<T>, options?: InsertOptions): Promise<InsertResult>;
|
|
2777
2846
|
/**
|
|
2778
2847
|
* Inserts multiple rows into the table in a single request.
|
|
2779
2848
|
*
|
|
@@ -2781,6 +2850,7 @@ declare class TableQuery<T = Record<string, unknown>> {
|
|
|
2781
2850
|
* a Promise. It does not use query builder state (where, orderBy, etc.).
|
|
2782
2851
|
*
|
|
2783
2852
|
* @param rows - Array of row objects to insert. Must contain at least one row.
|
|
2853
|
+
* @param options - Optional insert options (e.g. `identityInsert`).
|
|
2784
2854
|
* @returns The insert result with total row count, execution time, and optional generated values.
|
|
2785
2855
|
* @throws Error if `rows` is empty.
|
|
2786
2856
|
*
|
|
@@ -2793,9 +2863,14 @@ declare class TableQuery<T = Record<string, unknown>> {
|
|
|
2793
2863
|
* ]);
|
|
2794
2864
|
*
|
|
2795
2865
|
* console.log(result.rowsInserted); // 2
|
|
2866
|
+
*
|
|
2867
|
+
* await client.table('orders').insertMany(
|
|
2868
|
+
* [{ id: 10 }, { id: 20 }],
|
|
2869
|
+
* { identityInsert: true },
|
|
2870
|
+
* );
|
|
2796
2871
|
* ```
|
|
2797
2872
|
*/
|
|
2798
|
-
insertMany(rows: Partial<T>[]): Promise<InsertResult>;
|
|
2873
|
+
insertMany(rows: Partial<T>[], options?: InsertOptions): Promise<InsertResult>;
|
|
2799
2874
|
/**
|
|
2800
2875
|
* Updates rows matching the current where predicates.
|
|
2801
2876
|
*
|
|
@@ -3061,6 +3136,7 @@ interface DiffSummary {
|
|
|
3061
3136
|
tablesDropped: number;
|
|
3062
3137
|
columnsAdded: number;
|
|
3063
3138
|
columnsDropped: number;
|
|
3139
|
+
columnsAltered?: number;
|
|
3064
3140
|
policiesUpdated: number;
|
|
3065
3141
|
durabilitiesUpdated: number;
|
|
3066
3142
|
settingsUpdated: number;
|
|
@@ -3572,4 +3648,4 @@ declare class AoudaClient<S extends SchemaLike = DefaultSchema> {
|
|
|
3572
3648
|
*/
|
|
3573
3649
|
declare function createAoudaClient<S extends SchemaLike = DefaultSchema>(options: AoudaClientOptions): AoudaClient<S>;
|
|
3574
3650
|
|
|
3575
|
-
export { type BranchInfo 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 AoudaClientOptions as G, type HealthStatus as H, type AoudaDataType as I, type JoinClusterRequest as J, type AppAuthOptions as K, type ListBackupsResponse as L, AuthClient as M, type NodeInfoResponse as N, type AuthResult as O, type PromoteClusterResponse as P, type AuthUserInfo as Q, type ReplicationStatusResponse as R, type SchemaLike as S, type Transport as T, type AuthorizationMode as U, BackupAdminApi as V, type BackupMetrics as W, type BackupSummary as X, type BatchMutationResult as Y, type BatchOperationInput as Z, type BloomFilterMetrics as _, type BulkLoadJobHandle as a,
|
|
3651
|
+
export { type BranchInfo 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 AoudaClientOptions as G, type HealthStatus as H, type AoudaDataType as I, type JoinClusterRequest as J, type AppAuthOptions as K, type ListBackupsResponse as L, AuthClient as M, type NodeInfoResponse as N, type AuthResult as O, type PromoteClusterResponse as P, type AuthUserInfo as Q, type ReplicationStatusResponse as R, type SchemaLike as S, type Transport as T, type AuthorizationMode as U, BackupAdminApi as V, type BackupMetrics as W, type BackupSummary as X, type BatchMutationResult as Y, type BatchOperationInput as Z, type BloomFilterMetrics as _, type BulkLoadJobHandle as a, type MutationResult as a$, BranchesApi as a0, type BulkLoadForceAbortRequest as a1, type BulkLoadForceAbortResponse as a2, type BulkLoadListResponse as a3, type BulkLoadProgress as a4, type BulkLoadReplicaProgress as a5, type BulkLoadReplicaProgressDto as a6, type BulkLoadStatusResponse as a7, CircuitBreakerPolicy as a8, ClusterAdminApi as a9, type IndexInfo as aA, type InsertOptions as aB, type InsertResult as aC, type IoMetrics as aD, type LatencyPercentiles as aE, MaterializedQueriesApi as aF, type MaterializedQueryDefinition as aG, type MaterializedQueryExecuteOptions as aH, type MaterializedQueryExecuteResult as aI, type MaterializedQueryMetrics as aJ, type MaterializedQueryRefreshOptions as aK, MaterializedQueryState as aL, type MaterializedQueryStateNumber as aM, type MaterializedQueryStatus as aN, MaterializedQueryType as aO, type MaterializedQueryTypeNumber as aP, type MemberInfo as aQ, type MemoryMetrics as aR, type MergeBranchOptions as aS, type MergeConflict as aT, type MergeExecutionResult as aU, type MergeResult as aV, MetricsAdminApi as aW, type MetricsHistory as aX, type MetricsHistoryOptions as aY, type MetricsSnapshot as aZ, type MetricsSummary as a_, type ClusterMemberEntry as aa, type ClusterThisNodeEntry as ab, type ColumnSchema as ac, type ColumnSummaryForErd as ad, type ColumnarResponse as ae, type ComponentHealthEntry as af, type ComputedColumnDef as ag, ConfigAdminApi as ah, type CreateBranchRequest as ai, type CreateColumnRequest as aj, type CreateDatabaseOptions as ak, type CreatePartitionGrantRequest as al, type CreateRlsResolverRequest as am, type CreateTableRequest as an, type DatabaseCoverageEntry as ao, type DatabaseInfo as ap, type DatabaseMemoryMetrics as aq, type DatabaseMemoryUsage as ar, type DatabaseMetricsDto as as, type DatabaseOptionsInfo as at, DatabasesApi as au, type DeleteOptions as av, type DiffSummary as aw, FILTER_OPERATORS as ax, type FilterOperator as ay, HealthAdminApi as az, type TopologyResponse as b, type TransactionMetrics as b$, NodeAdminApi as b0, type NodeLogEntry as b1, type NodeLogLevel as b2, type NodeLogStreamOptions as b3, type NodeLogsQuery as b4, type NodeLogsResponse as b5, type OpenWriteStreamOptions as b6, type PageCacheMetrics as b7, type PartitionFunction as b8, type PartitionGrant as b9, ServerAdminApi as bA, type ServerAuthOptions as bB, type ServerMemoryResponse as bC, type ServerMetricsResponse as bD, type ServiceInfo as bE, type SimdMetrics as bF, type SingleDatabaseMetricsResponse as bG, type SortDirection as bH, type StorageMetrics as bI, type SubscribeOptions as bJ, type Subscription as bK, type SubscriptionChangeEvent as bL, type SubscriptionEvent as bM, type SubscriptionInfo as bN, type SubscriptionSnapshotEvent as bO, TIME_BUCKET_FUNCTIONS as bP, type TableCoverageEntry as bQ, type TableNameFromSchema as bR, type TablePolicy as bS, TableQuery as bT, type TableSchema as bU, type TableSchemaResponse as bV, type TableSummary as bW, type TableSummaryForErd as bX, TablesApi as bY, type TimeBucketFunction as bZ, type TimeSeriesMetrics as b_, type PartitionGrantsListResponse as ba, type PartitioningMetrics as bb, type PerDatabaseLagEntry as bc, type PerDatabaseMetrics as bd, type PerDatabaseStatusEntry as be, type QueryMetrics as bf, type QueryResult as bg, type QueryStats as bh, type ReferenceInfo as bi, type RelationshipEndpoint as bj, type RelationshipInfo as bk, type RenameColumnRequest as bl, type RenameTableRequest as bm, ReplicationAdminApi as bn, type ReplicationMetrics as bo, type ResidencyConfig as bp, RetryPolicy as bq, type RlsResolver as br, type RlsResolverRule as bs, type RlsResolverRuleInput as bt, type RlsResolversListResponse as bu, type SchemaChange as bv, type SchemaDiffResult as bw, type SchemaRelationshipsResponse as bx, type SeedApplyResult as by, type SeedTableApplyResult as bz, type ReadinessResponse as c, type TypeGenerationOptions as c0, type UpdateOptions as c1, type UpdateRlsResolverRequest as c2, type UpdateTableOptionsRequest as c3, type UpdateTablePolicyRequest as c4, type UserProfile as c5, WhereGroupBuilder as c6, type WhereOperator as c7, type WriteStream as c8, coerceColumnarValue as c9, createAoudaClient as ca, 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 };
|
|
@@ -756,6 +756,16 @@ interface BatchMutationResult {
|
|
|
756
756
|
/** Server-side execution time in milliseconds. */
|
|
757
757
|
executionMs: number;
|
|
758
758
|
}
|
|
759
|
+
/**
|
|
760
|
+
* Options for {@link TableQuery.insert} / {@link TableQuery.insertMany}.
|
|
761
|
+
*/
|
|
762
|
+
interface InsertOptions {
|
|
763
|
+
/**
|
|
764
|
+
* When true, store explicit autoIncrement values as-is (including 0).
|
|
765
|
+
* Equivalent to Bond `isAutoIncrementDisabled: true`.
|
|
766
|
+
*/
|
|
767
|
+
identityInsert?: boolean;
|
|
768
|
+
}
|
|
759
769
|
/**
|
|
760
770
|
* Literal (constant) value node.
|
|
761
771
|
* @internal
|
|
@@ -997,6 +1007,12 @@ interface BulkLoadOptions {
|
|
|
997
1007
|
onProgress?: (progress: BulkLoadProgress) => void;
|
|
998
1008
|
/** AbortSignal for cancellation. Issues :abort on the server before throwing. */
|
|
999
1009
|
signal?: AbortSignal;
|
|
1010
|
+
/**
|
|
1011
|
+
* When true, treat this bulk-load as identity-insert (Bond `isAutoIncrementDisabled: true`):
|
|
1012
|
+
* every autoIncrement column must be present/non-null on every row; values (including `0`)
|
|
1013
|
+
* are stored as-is; after successful commit the server advances the counter to max(inserted).
|
|
1014
|
+
*/
|
|
1015
|
+
identityInsert?: boolean;
|
|
1000
1016
|
}
|
|
1001
1017
|
interface BulkLoadProgress {
|
|
1002
1018
|
ivfAssignmentsCompleted: number;
|
|
@@ -1911,8 +1927,11 @@ declare class NodeAdminApi {
|
|
|
1911
1927
|
type NotificationProviderSource = "db" | "env" | "none";
|
|
1912
1928
|
/** Information about one configured notification provider (email or SMS). */
|
|
1913
1929
|
interface NotificationProviderInfo {
|
|
1914
|
-
/**
|
|
1915
|
-
|
|
1930
|
+
/**
|
|
1931
|
+
* Provider identifier, e.g. "sendgrid", "gatewayapi", "capture", "console",
|
|
1932
|
+
* or null when no provider is active.
|
|
1933
|
+
*/
|
|
1934
|
+
provider: string | null;
|
|
1916
1935
|
/**
|
|
1917
1936
|
* Where the provider config was loaded from.
|
|
1918
1937
|
* "db" = persisted in _settings DB; "env" = appsettings/env var; "none" = no provider.
|
|
@@ -1952,6 +1971,11 @@ interface PutEmailProviderRequest {
|
|
|
1952
1971
|
fromName?: string | null;
|
|
1953
1972
|
inviteUrl?: string | null;
|
|
1954
1973
|
passwordResetUrl?: string | null;
|
|
1974
|
+
/**
|
|
1975
|
+
* Required when provider is "capture" and the server is Production.
|
|
1976
|
+
* Confirms OTPs will be visible to server admins via the outbox.
|
|
1977
|
+
*/
|
|
1978
|
+
acknowledgeDevCapture?: boolean;
|
|
1955
1979
|
}
|
|
1956
1980
|
/** Request body for PUT /admin/notifications/sms. */
|
|
1957
1981
|
interface PutSmsProviderRequest {
|
|
@@ -1960,6 +1984,11 @@ interface PutSmsProviderRequest {
|
|
|
1960
1984
|
apiKey?: string | null;
|
|
1961
1985
|
sender?: string | null;
|
|
1962
1986
|
baseUrl?: string | null;
|
|
1987
|
+
/**
|
|
1988
|
+
* Required when provider is "capture" and the server is Production.
|
|
1989
|
+
* Confirms OTPs will be visible to server admins via the outbox.
|
|
1990
|
+
*/
|
|
1991
|
+
acknowledgeDevCapture?: boolean;
|
|
1963
1992
|
}
|
|
1964
1993
|
/** Request body for POST /admin/notifications/email/test. */
|
|
1965
1994
|
interface TestEmailRequest {
|
|
@@ -1977,6 +2006,30 @@ interface TestSendResult {
|
|
|
1977
2006
|
/** Error message if success is false. */
|
|
1978
2007
|
error?: string | null;
|
|
1979
2008
|
}
|
|
2009
|
+
/** Channel for a captured notification. */
|
|
2010
|
+
type NotificationOutboxChannel = "email" | "sms";
|
|
2011
|
+
/** Kind of captured auth notification. */
|
|
2012
|
+
type NotificationOutboxKind = "password_reset" | "invite" | "mfa_otp" | "test";
|
|
2013
|
+
/** One captured outbound auth notification from GET /admin/notifications/outbox. */
|
|
2014
|
+
interface NotificationOutboxEntry {
|
|
2015
|
+
id: string;
|
|
2016
|
+
channel: NotificationOutboxChannel | string;
|
|
2017
|
+
kind: NotificationOutboxKind | string;
|
|
2018
|
+
to: string;
|
|
2019
|
+
subject: string | null;
|
|
2020
|
+
body: string;
|
|
2021
|
+
otp: string;
|
|
2022
|
+
createdAtUtc: string;
|
|
2023
|
+
}
|
|
2024
|
+
/** Response from GET /admin/notifications/outbox. */
|
|
2025
|
+
interface NotificationOutboxResponse {
|
|
2026
|
+
entries: NotificationOutboxEntry[];
|
|
2027
|
+
}
|
|
2028
|
+
/** Query options for GET /admin/notifications/outbox. */
|
|
2029
|
+
interface NotificationOutboxQuery {
|
|
2030
|
+
channel?: NotificationOutboxChannel | string;
|
|
2031
|
+
limit?: number;
|
|
2032
|
+
}
|
|
1980
2033
|
|
|
1981
2034
|
/**
|
|
1982
2035
|
* Admin notification provider settings API.
|
|
@@ -2021,6 +2074,17 @@ declare class NotificationsAdminApi {
|
|
|
2021
2074
|
* POST /admin/notifications/sms/test
|
|
2022
2075
|
*/
|
|
2023
2076
|
testSms(request: TestSmsRequest): Promise<TestSendResult>;
|
|
2077
|
+
/**
|
|
2078
|
+
* Get recent captured auth notifications (newest first).
|
|
2079
|
+
* GET /admin/notifications/outbox?channel=&limit=
|
|
2080
|
+
*/
|
|
2081
|
+
getOutbox(options?: NotificationOutboxQuery): Promise<NotificationOutboxResponse>;
|
|
2082
|
+
/**
|
|
2083
|
+
* Clear the in-memory notification outbox.
|
|
2084
|
+
* DELETE /admin/notifications/outbox
|
|
2085
|
+
*/
|
|
2086
|
+
clearOutbox(): Promise<NotificationOutboxResponse>;
|
|
2087
|
+
private buildOutboxPath;
|
|
2024
2088
|
}
|
|
2025
2089
|
|
|
2026
2090
|
/**
|
|
@@ -2761,6 +2825,8 @@ declare class TableQuery<T = Record<string, unknown>> {
|
|
|
2761
2825
|
* a Promise. It does not use query builder state (where, orderBy, etc.).
|
|
2762
2826
|
*
|
|
2763
2827
|
* @param row - The row data to insert. Keys are column names.
|
|
2828
|
+
* @param row - The row object to insert. Keys are column names.
|
|
2829
|
+
* @param options - Optional insert options (e.g. `identityInsert`).
|
|
2764
2830
|
* @returns The insert result with row count, execution time, and optional generated values.
|
|
2765
2831
|
* @throws Error if `row` is null or undefined.
|
|
2766
2832
|
*
|
|
@@ -2771,9 +2837,12 @@ declare class TableQuery<T = Record<string, unknown>> {
|
|
|
2771
2837
|
*
|
|
2772
2838
|
* console.log(result.rowsInserted); // 1
|
|
2773
2839
|
* console.log(result.generatedValues); // { "0": { id: 42 } }
|
|
2840
|
+
*
|
|
2841
|
+
* // Identity-insert (Bond isAutoIncrementDisabled: true): store explicit IDs including 0
|
|
2842
|
+
* await client.table('orders').insert({ id: 1000, status: 'seeded' }, { identityInsert: true });
|
|
2774
2843
|
* ```
|
|
2775
2844
|
*/
|
|
2776
|
-
insert(row: Partial<T
|
|
2845
|
+
insert(row: Partial<T>, options?: InsertOptions): Promise<InsertResult>;
|
|
2777
2846
|
/**
|
|
2778
2847
|
* Inserts multiple rows into the table in a single request.
|
|
2779
2848
|
*
|
|
@@ -2781,6 +2850,7 @@ declare class TableQuery<T = Record<string, unknown>> {
|
|
|
2781
2850
|
* a Promise. It does not use query builder state (where, orderBy, etc.).
|
|
2782
2851
|
*
|
|
2783
2852
|
* @param rows - Array of row objects to insert. Must contain at least one row.
|
|
2853
|
+
* @param options - Optional insert options (e.g. `identityInsert`).
|
|
2784
2854
|
* @returns The insert result with total row count, execution time, and optional generated values.
|
|
2785
2855
|
* @throws Error if `rows` is empty.
|
|
2786
2856
|
*
|
|
@@ -2793,9 +2863,14 @@ declare class TableQuery<T = Record<string, unknown>> {
|
|
|
2793
2863
|
* ]);
|
|
2794
2864
|
*
|
|
2795
2865
|
* console.log(result.rowsInserted); // 2
|
|
2866
|
+
*
|
|
2867
|
+
* await client.table('orders').insertMany(
|
|
2868
|
+
* [{ id: 10 }, { id: 20 }],
|
|
2869
|
+
* { identityInsert: true },
|
|
2870
|
+
* );
|
|
2796
2871
|
* ```
|
|
2797
2872
|
*/
|
|
2798
|
-
insertMany(rows: Partial<T>[]): Promise<InsertResult>;
|
|
2873
|
+
insertMany(rows: Partial<T>[], options?: InsertOptions): Promise<InsertResult>;
|
|
2799
2874
|
/**
|
|
2800
2875
|
* Updates rows matching the current where predicates.
|
|
2801
2876
|
*
|
|
@@ -3061,6 +3136,7 @@ interface DiffSummary {
|
|
|
3061
3136
|
tablesDropped: number;
|
|
3062
3137
|
columnsAdded: number;
|
|
3063
3138
|
columnsDropped: number;
|
|
3139
|
+
columnsAltered?: number;
|
|
3064
3140
|
policiesUpdated: number;
|
|
3065
3141
|
durabilitiesUpdated: number;
|
|
3066
3142
|
settingsUpdated: number;
|
|
@@ -3572,4 +3648,4 @@ declare class AoudaClient<S extends SchemaLike = DefaultSchema> {
|
|
|
3572
3648
|
*/
|
|
3573
3649
|
declare function createAoudaClient<S extends SchemaLike = DefaultSchema>(options: AoudaClientOptions): AoudaClient<S>;
|
|
3574
3650
|
|
|
3575
|
-
export { type BranchInfo 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 AoudaClientOptions as G, type HealthStatus as H, type AoudaDataType as I, type JoinClusterRequest as J, type AppAuthOptions as K, type ListBackupsResponse as L, AuthClient as M, type NodeInfoResponse as N, type AuthResult as O, type PromoteClusterResponse as P, type AuthUserInfo as Q, type ReplicationStatusResponse as R, type SchemaLike as S, type Transport as T, type AuthorizationMode as U, BackupAdminApi as V, type BackupMetrics as W, type BackupSummary as X, type BatchMutationResult as Y, type BatchOperationInput as Z, type BloomFilterMetrics as _, type BulkLoadJobHandle as a,
|
|
3651
|
+
export { type BranchInfo 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 AoudaClientOptions as G, type HealthStatus as H, type AoudaDataType as I, type JoinClusterRequest as J, type AppAuthOptions as K, type ListBackupsResponse as L, AuthClient as M, type NodeInfoResponse as N, type AuthResult as O, type PromoteClusterResponse as P, type AuthUserInfo as Q, type ReplicationStatusResponse as R, type SchemaLike as S, type Transport as T, type AuthorizationMode as U, BackupAdminApi as V, type BackupMetrics as W, type BackupSummary as X, type BatchMutationResult as Y, type BatchOperationInput as Z, type BloomFilterMetrics as _, type BulkLoadJobHandle as a, type MutationResult as a$, BranchesApi as a0, type BulkLoadForceAbortRequest as a1, type BulkLoadForceAbortResponse as a2, type BulkLoadListResponse as a3, type BulkLoadProgress as a4, type BulkLoadReplicaProgress as a5, type BulkLoadReplicaProgressDto as a6, type BulkLoadStatusResponse as a7, CircuitBreakerPolicy as a8, ClusterAdminApi as a9, type IndexInfo as aA, type InsertOptions as aB, type InsertResult as aC, type IoMetrics as aD, type LatencyPercentiles as aE, MaterializedQueriesApi as aF, type MaterializedQueryDefinition as aG, type MaterializedQueryExecuteOptions as aH, type MaterializedQueryExecuteResult as aI, type MaterializedQueryMetrics as aJ, type MaterializedQueryRefreshOptions as aK, MaterializedQueryState as aL, type MaterializedQueryStateNumber as aM, type MaterializedQueryStatus as aN, MaterializedQueryType as aO, type MaterializedQueryTypeNumber as aP, type MemberInfo as aQ, type MemoryMetrics as aR, type MergeBranchOptions as aS, type MergeConflict as aT, type MergeExecutionResult as aU, type MergeResult as aV, MetricsAdminApi as aW, type MetricsHistory as aX, type MetricsHistoryOptions as aY, type MetricsSnapshot as aZ, type MetricsSummary as a_, type ClusterMemberEntry as aa, type ClusterThisNodeEntry as ab, type ColumnSchema as ac, type ColumnSummaryForErd as ad, type ColumnarResponse as ae, type ComponentHealthEntry as af, type ComputedColumnDef as ag, ConfigAdminApi as ah, type CreateBranchRequest as ai, type CreateColumnRequest as aj, type CreateDatabaseOptions as ak, type CreatePartitionGrantRequest as al, type CreateRlsResolverRequest as am, type CreateTableRequest as an, type DatabaseCoverageEntry as ao, type DatabaseInfo as ap, type DatabaseMemoryMetrics as aq, type DatabaseMemoryUsage as ar, type DatabaseMetricsDto as as, type DatabaseOptionsInfo as at, DatabasesApi as au, type DeleteOptions as av, type DiffSummary as aw, FILTER_OPERATORS as ax, type FilterOperator as ay, HealthAdminApi as az, type TopologyResponse as b, type TransactionMetrics as b$, NodeAdminApi as b0, type NodeLogEntry as b1, type NodeLogLevel as b2, type NodeLogStreamOptions as b3, type NodeLogsQuery as b4, type NodeLogsResponse as b5, type OpenWriteStreamOptions as b6, type PageCacheMetrics as b7, type PartitionFunction as b8, type PartitionGrant as b9, ServerAdminApi as bA, type ServerAuthOptions as bB, type ServerMemoryResponse as bC, type ServerMetricsResponse as bD, type ServiceInfo as bE, type SimdMetrics as bF, type SingleDatabaseMetricsResponse as bG, type SortDirection as bH, type StorageMetrics as bI, type SubscribeOptions as bJ, type Subscription as bK, type SubscriptionChangeEvent as bL, type SubscriptionEvent as bM, type SubscriptionInfo as bN, type SubscriptionSnapshotEvent as bO, TIME_BUCKET_FUNCTIONS as bP, type TableCoverageEntry as bQ, type TableNameFromSchema as bR, type TablePolicy as bS, TableQuery as bT, type TableSchema as bU, type TableSchemaResponse as bV, type TableSummary as bW, type TableSummaryForErd as bX, TablesApi as bY, type TimeBucketFunction as bZ, type TimeSeriesMetrics as b_, type PartitionGrantsListResponse as ba, type PartitioningMetrics as bb, type PerDatabaseLagEntry as bc, type PerDatabaseMetrics as bd, type PerDatabaseStatusEntry as be, type QueryMetrics as bf, type QueryResult as bg, type QueryStats as bh, type ReferenceInfo as bi, type RelationshipEndpoint as bj, type RelationshipInfo as bk, type RenameColumnRequest as bl, type RenameTableRequest as bm, ReplicationAdminApi as bn, type ReplicationMetrics as bo, type ResidencyConfig as bp, RetryPolicy as bq, type RlsResolver as br, type RlsResolverRule as bs, type RlsResolverRuleInput as bt, type RlsResolversListResponse as bu, type SchemaChange as bv, type SchemaDiffResult as bw, type SchemaRelationshipsResponse as bx, type SeedApplyResult as by, type SeedTableApplyResult as bz, type ReadinessResponse as c, type TypeGenerationOptions as c0, type UpdateOptions as c1, type UpdateRlsResolverRequest as c2, type UpdateTableOptionsRequest as c3, type UpdateTablePolicyRequest as c4, type UserProfile as c5, WhereGroupBuilder as c6, type WhereOperator as c7, type WriteStream as c8, coerceColumnarValue as c9, createAoudaClient as ca, 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
|
@@ -82,7 +82,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
82
82
|
// package.json
|
|
83
83
|
var package_default = {
|
|
84
84
|
name: "@aouda/client",
|
|
85
|
-
version: "0.1.
|
|
85
|
+
version: "0.1.7",
|
|
86
86
|
description: "Official TypeScript/JavaScript client library for Aouda",
|
|
87
87
|
type: "module",
|
|
88
88
|
main: "./dist/index.cjs",
|
|
@@ -1119,7 +1119,8 @@ var BulkLoadCoordinator = class {
|
|
|
1119
1119
|
pkUniquenessOverride: options.pkUniquenessOverride,
|
|
1120
1120
|
replicationMode: options.replicationMode,
|
|
1121
1121
|
forceSingleNodeReplicationBypass: options.forceSingleNodeReplicationBypass,
|
|
1122
|
-
postLoadMqBehavior: options.postLoadMqBehavior
|
|
1122
|
+
postLoadMqBehavior: options.postLoadMqBehavior,
|
|
1123
|
+
...options.identityInsert === true ? { identityInsert: true } : {}
|
|
1123
1124
|
}
|
|
1124
1125
|
};
|
|
1125
1126
|
const beginResp = await this.transport.post(
|
|
@@ -3129,6 +3130,8 @@ var TableQuery = class _TableQuery {
|
|
|
3129
3130
|
* a Promise. It does not use query builder state (where, orderBy, etc.).
|
|
3130
3131
|
*
|
|
3131
3132
|
* @param row - The row data to insert. Keys are column names.
|
|
3133
|
+
* @param row - The row object to insert. Keys are column names.
|
|
3134
|
+
* @param options - Optional insert options (e.g. `identityInsert`).
|
|
3132
3135
|
* @returns The insert result with row count, execution time, and optional generated values.
|
|
3133
3136
|
* @throws Error if `row` is null or undefined.
|
|
3134
3137
|
*
|
|
@@ -3139,9 +3142,12 @@ var TableQuery = class _TableQuery {
|
|
|
3139
3142
|
*
|
|
3140
3143
|
* console.log(result.rowsInserted); // 1
|
|
3141
3144
|
* console.log(result.generatedValues); // { "0": { id: 42 } }
|
|
3145
|
+
*
|
|
3146
|
+
* // Identity-insert (Bond isAutoIncrementDisabled: true): store explicit IDs including 0
|
|
3147
|
+
* await client.table('orders').insert({ id: 1000, status: 'seeded' }, { identityInsert: true });
|
|
3142
3148
|
* ```
|
|
3143
3149
|
*/
|
|
3144
|
-
async insert(row) {
|
|
3150
|
+
async insert(row, options) {
|
|
3145
3151
|
if (row == null) {
|
|
3146
3152
|
throw new Error("insert() requires a non-null row object");
|
|
3147
3153
|
}
|
|
@@ -3151,6 +3157,9 @@ var TableQuery = class _TableQuery {
|
|
|
3151
3157
|
database: this.database,
|
|
3152
3158
|
rows: [row]
|
|
3153
3159
|
};
|
|
3160
|
+
if (options?.identityInsert === true) {
|
|
3161
|
+
body.identityInsert = true;
|
|
3162
|
+
}
|
|
3154
3163
|
const response = await this.transport.post(path, body);
|
|
3155
3164
|
const result = {
|
|
3156
3165
|
rowsInserted: response.rowsInserted,
|
|
@@ -3168,6 +3177,7 @@ var TableQuery = class _TableQuery {
|
|
|
3168
3177
|
* a Promise. It does not use query builder state (where, orderBy, etc.).
|
|
3169
3178
|
*
|
|
3170
3179
|
* @param rows - Array of row objects to insert. Must contain at least one row.
|
|
3180
|
+
* @param options - Optional insert options (e.g. `identityInsert`).
|
|
3171
3181
|
* @returns The insert result with total row count, execution time, and optional generated values.
|
|
3172
3182
|
* @throws Error if `rows` is empty.
|
|
3173
3183
|
*
|
|
@@ -3180,9 +3190,14 @@ var TableQuery = class _TableQuery {
|
|
|
3180
3190
|
* ]);
|
|
3181
3191
|
*
|
|
3182
3192
|
* console.log(result.rowsInserted); // 2
|
|
3193
|
+
*
|
|
3194
|
+
* await client.table('orders').insertMany(
|
|
3195
|
+
* [{ id: 10 }, { id: 20 }],
|
|
3196
|
+
* { identityInsert: true },
|
|
3197
|
+
* );
|
|
3183
3198
|
* ```
|
|
3184
3199
|
*/
|
|
3185
|
-
async insertMany(rows) {
|
|
3200
|
+
async insertMany(rows, options) {
|
|
3186
3201
|
if (!Array.isArray(rows) || rows.length === 0) {
|
|
3187
3202
|
throw new Error("insertMany() requires a non-empty array of rows");
|
|
3188
3203
|
}
|
|
@@ -3192,6 +3207,9 @@ var TableQuery = class _TableQuery {
|
|
|
3192
3207
|
database: this.database,
|
|
3193
3208
|
rows
|
|
3194
3209
|
};
|
|
3210
|
+
if (options?.identityInsert === true) {
|
|
3211
|
+
body.identityInsert = true;
|
|
3212
|
+
}
|
|
3195
3213
|
const response = await this.transport.post(path, body);
|
|
3196
3214
|
const result = {
|
|
3197
3215
|
rowsInserted: response.rowsInserted,
|
|
@@ -4394,6 +4412,35 @@ var NotificationsAdminApi = class {
|
|
|
4394
4412
|
request
|
|
4395
4413
|
);
|
|
4396
4414
|
}
|
|
4415
|
+
/**
|
|
4416
|
+
* Get recent captured auth notifications (newest first).
|
|
4417
|
+
* GET /admin/notifications/outbox?channel=&limit=
|
|
4418
|
+
*/
|
|
4419
|
+
async getOutbox(options) {
|
|
4420
|
+
return this.transport.get(
|
|
4421
|
+
this.buildOutboxPath(options)
|
|
4422
|
+
);
|
|
4423
|
+
}
|
|
4424
|
+
/**
|
|
4425
|
+
* Clear the in-memory notification outbox.
|
|
4426
|
+
* DELETE /admin/notifications/outbox
|
|
4427
|
+
*/
|
|
4428
|
+
async clearOutbox() {
|
|
4429
|
+
return this.transport.delete(
|
|
4430
|
+
`${BASE_PATH7}/outbox`
|
|
4431
|
+
);
|
|
4432
|
+
}
|
|
4433
|
+
buildOutboxPath(options) {
|
|
4434
|
+
const params = new URLSearchParams();
|
|
4435
|
+
if (options?.channel !== void 0 && options.channel.trim().length > 0) {
|
|
4436
|
+
params.set("channel", options.channel);
|
|
4437
|
+
}
|
|
4438
|
+
if (options?.limit !== void 0) {
|
|
4439
|
+
params.set("limit", String(options.limit));
|
|
4440
|
+
}
|
|
4441
|
+
const query = params.toString();
|
|
4442
|
+
return query.length > 0 ? `${BASE_PATH7}/outbox?${query}` : `${BASE_PATH7}/outbox`;
|
|
4443
|
+
}
|
|
4397
4444
|
};
|
|
4398
4445
|
|
|
4399
4446
|
// src/admin/index.ts
|