@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
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as Transport, B as BulkLoadOptions, a as BulkLoadJobHandle, R as ReplicationStatusResponse, b as TopologyResponse, C as CoverageResponse, H as HealthStatus, c as ReadinessResponse, D as DetailedHealthResponse, N as NodeInfoResponse, d as TriggerBackupRequest, e as TriggerBackupResponse, L as ListBackupsResponse, f as RestoreBackupResponse, g as BackupSchedule, J as JoinClusterRequest, h as JoinClusterResponse, i as LeaveClusterResponse, P as PromoteClusterResponse, F as FailoverClusterResponse, j as DrainClusterResponse, k as ClusterConfigResponse, l as ClusterConfigPatchRequest, S as SchemaLike, m as DefaultSchema, A as AoudaClient } from './client-
|
|
2
|
-
export { n as AGGREGATE_FUNCTIONS, o as AOUDA_DATA_TYPES, p as AddColumnRequest, q as AdminApi, r as AdminBackupConfig, s as AdminBackupPatch, t as AdminConfigPatchRequest, u as AdminConfigResponse, v as AdminConfigSchemaResponse, w as AdminLoggingConfig, x as AdminLoggingPatch, y as AdminMemoryConfig, z as AdminMemoryPatch, E as AggregateFunctionName, G as AoudaClientOptions, I as AoudaDataType, K as AppAuthOptions, M as AuthClient, O as AuthResult, Q as AuthUserInfo, U as AuthorizationMode, V as BackupAdminApi, W as BackupMetrics, X as BackupSummary, Y as BatchMutationResult, Z as BatchOperationInput, _ as BloomFilterMetrics, $ as BranchInfo, a0 as BranchesApi, a1 as BulkLoadForceAbortRequest, a2 as BulkLoadForceAbortResponse, a3 as BulkLoadListResponse, a4 as BulkLoadProgress, a5 as BulkLoadReplicaProgress, a6 as BulkLoadReplicaProgressDto, a7 as BulkLoadStatusResponse, a8 as CircuitBreakerPolicy, a9 as ClusterAdminApi, aa as ClusterMemberEntry, ab as ClusterThisNodeEntry, ac as ColumnSchema, ad as ColumnSummaryForErd, ae as ColumnarResponse, af as ComponentHealthEntry, ag as ComputedColumnDef, ah as ConfigAdminApi, ai as CreateBranchRequest, aj as CreateColumnRequest, ak as CreateDatabaseOptions, al as CreatePartitionGrantRequest, am as CreateRlsResolverRequest, an as CreateTableRequest, ao as DatabaseCoverageEntry, ap as DatabaseInfo, aq as DatabaseMemoryMetrics, ar as DatabaseMemoryUsage, as as DatabaseMetricsDto, at as DatabaseOptionsInfo, au as DatabasesApi, av as DeleteOptions, aw as DiffSummary, ax as FILTER_OPERATORS, ay as FilterOperator, az as HealthAdminApi, aA as IndexInfo, aB as
|
|
1
|
+
import { T as Transport, B as BulkLoadOptions, a as BulkLoadJobHandle, R as ReplicationStatusResponse, b as TopologyResponse, C as CoverageResponse, H as HealthStatus, c as ReadinessResponse, D as DetailedHealthResponse, N as NodeInfoResponse, d as TriggerBackupRequest, e as TriggerBackupResponse, L as ListBackupsResponse, f as RestoreBackupResponse, g as BackupSchedule, J as JoinClusterRequest, h as JoinClusterResponse, i as LeaveClusterResponse, P as PromoteClusterResponse, F as FailoverClusterResponse, j as DrainClusterResponse, k as ClusterConfigResponse, l as ClusterConfigPatchRequest, S as SchemaLike, m as DefaultSchema, A as AoudaClient } from './client-BbyXG5AL.cjs';
|
|
2
|
+
export { n as AGGREGATE_FUNCTIONS, o as AOUDA_DATA_TYPES, p as AddColumnRequest, q as AdminApi, r as AdminBackupConfig, s as AdminBackupPatch, t as AdminConfigPatchRequest, u as AdminConfigResponse, v as AdminConfigSchemaResponse, w as AdminLoggingConfig, x as AdminLoggingPatch, y as AdminMemoryConfig, z as AdminMemoryPatch, E as AggregateFunctionName, G as AoudaClientOptions, I as AoudaDataType, K as AppAuthOptions, M as AuthClient, O as AuthResult, Q as AuthUserInfo, U as AuthorizationMode, V as BackupAdminApi, W as BackupMetrics, X as BackupSummary, Y as BatchMutationResult, Z as BatchOperationInput, _ as BloomFilterMetrics, $ as BranchInfo, a0 as BranchesApi, a1 as BulkLoadForceAbortRequest, a2 as BulkLoadForceAbortResponse, a3 as BulkLoadListResponse, a4 as BulkLoadProgress, a5 as BulkLoadReplicaProgress, a6 as BulkLoadReplicaProgressDto, a7 as BulkLoadStatusResponse, a8 as CircuitBreakerPolicy, a9 as ClusterAdminApi, aa as ClusterMemberEntry, ab as ClusterThisNodeEntry, ac as ColumnSchema, ad as ColumnSummaryForErd, ae as ColumnarResponse, af as ComponentHealthEntry, ag as ComputedColumnDef, ah as ConfigAdminApi, ai as CreateBranchRequest, aj as CreateColumnRequest, ak as CreateDatabaseOptions, al as CreatePartitionGrantRequest, am as CreateRlsResolverRequest, an as CreateTableRequest, ao as DatabaseCoverageEntry, ap as DatabaseInfo, aq as DatabaseMemoryMetrics, ar as DatabaseMemoryUsage, as as DatabaseMetricsDto, at as DatabaseOptionsInfo, au as DatabasesApi, av as DeleteOptions, aw as DiffSummary, ax as FILTER_OPERATORS, ay as FilterOperator, az as HealthAdminApi, aA as IndexInfo, aB as InsertOptions, aC as InsertResult, aD as IoMetrics, aE as LatencyPercentiles, aF as MaterializedQueriesApi, aG as MaterializedQueryDefinition, aH as MaterializedQueryExecuteOptions, aI as MaterializedQueryExecuteResult, aJ as MaterializedQueryMetrics, aK as MaterializedQueryRefreshOptions, aL as MaterializedQueryState, aM as MaterializedQueryStateNumber, aN as MaterializedQueryStatus, aO as MaterializedQueryType, aP as MaterializedQueryTypeNumber, aQ as MemberInfo, aR as MemoryMetrics, aS as MergeBranchOptions, aT as MergeConflict, aU as MergeExecutionResult, aV as MergeResult, aW as MetricsAdminApi, aX as MetricsHistory, aY as MetricsHistoryOptions, aZ as MetricsSnapshot, a_ as MetricsSummary, a$ as MutationResult, b0 as NodeAdminApi, b1 as NodeLogEntry, b2 as NodeLogLevel, b3 as NodeLogStreamOptions, b4 as NodeLogsQuery, b5 as NodeLogsResponse, b6 as OpenWriteStreamOptions, b7 as PageCacheMetrics, b8 as PartitionFunction, b9 as PartitionGrant, ba as PartitionGrantsListResponse, bb as PartitioningMetrics, bc as PerDatabaseLagEntry, bd as PerDatabaseMetrics, be as PerDatabaseStatusEntry, bf as QueryMetrics, bg as QueryResult, bh as QueryStats, bi as ReferenceInfo, bj as RelationshipEndpoint, bk as RelationshipInfo, bl as RenameColumnRequest, bm as RenameTableRequest, bn as ReplicationAdminApi, bo as ReplicationMetrics, bp as ResidencyConfig, bq as RetryPolicy, br as RlsResolver, bs as RlsResolverRule, bt as RlsResolverRuleInput, bu as RlsResolversListResponse, bv as SchemaChange, bw as SchemaDiffResult, bx as SchemaRelationshipsResponse, by as SeedApplyResult, bz as SeedTableApplyResult, bA as ServerAdminApi, bB as ServerAuthOptions, bC as ServerMemoryResponse, bD as ServerMetricsResponse, bE as ServiceInfo, bF as SimdMetrics, bG as SingleDatabaseMetricsResponse, bH as SortDirection, bI as StorageMetrics, bJ as SubscribeOptions, bK as Subscription, bL as SubscriptionChangeEvent, bM as SubscriptionEvent, bN as SubscriptionInfo, bO as SubscriptionSnapshotEvent, bP as TIME_BUCKET_FUNCTIONS, bQ as TableCoverageEntry, bR as TableNameFromSchema, bS as TablePolicy, bT as TableQuery, bU as TableSchema, bV as TableSchemaResponse, bW as TableSummary, bX as TableSummaryForErd, bY as TablesApi, bZ as TimeBucketFunction, b_ as TimeSeriesMetrics, b$ as TransactionMetrics, c0 as TypeGenerationOptions, c1 as UpdateOptions, c2 as UpdateRlsResolverRequest, c3 as UpdateTableOptionsRequest, c4 as UpdateTablePolicyRequest, c5 as UserProfile, c6 as WhereGroupBuilder, c7 as WhereOperator, c8 as WriteStream, c9 as coerceColumnarValue, ca as createAoudaClient } from './client-BbyXG5AL.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @aouda/client error types.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as Transport, B as BulkLoadOptions, a as BulkLoadJobHandle, R as ReplicationStatusResponse, b as TopologyResponse, C as CoverageResponse, H as HealthStatus, c as ReadinessResponse, D as DetailedHealthResponse, N as NodeInfoResponse, d as TriggerBackupRequest, e as TriggerBackupResponse, L as ListBackupsResponse, f as RestoreBackupResponse, g as BackupSchedule, J as JoinClusterRequest, h as JoinClusterResponse, i as LeaveClusterResponse, P as PromoteClusterResponse, F as FailoverClusterResponse, j as DrainClusterResponse, k as ClusterConfigResponse, l as ClusterConfigPatchRequest, S as SchemaLike, m as DefaultSchema, A as AoudaClient } from './client-
|
|
2
|
-
export { n as AGGREGATE_FUNCTIONS, o as AOUDA_DATA_TYPES, p as AddColumnRequest, q as AdminApi, r as AdminBackupConfig, s as AdminBackupPatch, t as AdminConfigPatchRequest, u as AdminConfigResponse, v as AdminConfigSchemaResponse, w as AdminLoggingConfig, x as AdminLoggingPatch, y as AdminMemoryConfig, z as AdminMemoryPatch, E as AggregateFunctionName, G as AoudaClientOptions, I as AoudaDataType, K as AppAuthOptions, M as AuthClient, O as AuthResult, Q as AuthUserInfo, U as AuthorizationMode, V as BackupAdminApi, W as BackupMetrics, X as BackupSummary, Y as BatchMutationResult, Z as BatchOperationInput, _ as BloomFilterMetrics, $ as BranchInfo, a0 as BranchesApi, a1 as BulkLoadForceAbortRequest, a2 as BulkLoadForceAbortResponse, a3 as BulkLoadListResponse, a4 as BulkLoadProgress, a5 as BulkLoadReplicaProgress, a6 as BulkLoadReplicaProgressDto, a7 as BulkLoadStatusResponse, a8 as CircuitBreakerPolicy, a9 as ClusterAdminApi, aa as ClusterMemberEntry, ab as ClusterThisNodeEntry, ac as ColumnSchema, ad as ColumnSummaryForErd, ae as ColumnarResponse, af as ComponentHealthEntry, ag as ComputedColumnDef, ah as ConfigAdminApi, ai as CreateBranchRequest, aj as CreateColumnRequest, ak as CreateDatabaseOptions, al as CreatePartitionGrantRequest, am as CreateRlsResolverRequest, an as CreateTableRequest, ao as DatabaseCoverageEntry, ap as DatabaseInfo, aq as DatabaseMemoryMetrics, ar as DatabaseMemoryUsage, as as DatabaseMetricsDto, at as DatabaseOptionsInfo, au as DatabasesApi, av as DeleteOptions, aw as DiffSummary, ax as FILTER_OPERATORS, ay as FilterOperator, az as HealthAdminApi, aA as IndexInfo, aB as
|
|
1
|
+
import { T as Transport, B as BulkLoadOptions, a as BulkLoadJobHandle, R as ReplicationStatusResponse, b as TopologyResponse, C as CoverageResponse, H as HealthStatus, c as ReadinessResponse, D as DetailedHealthResponse, N as NodeInfoResponse, d as TriggerBackupRequest, e as TriggerBackupResponse, L as ListBackupsResponse, f as RestoreBackupResponse, g as BackupSchedule, J as JoinClusterRequest, h as JoinClusterResponse, i as LeaveClusterResponse, P as PromoteClusterResponse, F as FailoverClusterResponse, j as DrainClusterResponse, k as ClusterConfigResponse, l as ClusterConfigPatchRequest, S as SchemaLike, m as DefaultSchema, A as AoudaClient } from './client-BbyXG5AL.js';
|
|
2
|
+
export { n as AGGREGATE_FUNCTIONS, o as AOUDA_DATA_TYPES, p as AddColumnRequest, q as AdminApi, r as AdminBackupConfig, s as AdminBackupPatch, t as AdminConfigPatchRequest, u as AdminConfigResponse, v as AdminConfigSchemaResponse, w as AdminLoggingConfig, x as AdminLoggingPatch, y as AdminMemoryConfig, z as AdminMemoryPatch, E as AggregateFunctionName, G as AoudaClientOptions, I as AoudaDataType, K as AppAuthOptions, M as AuthClient, O as AuthResult, Q as AuthUserInfo, U as AuthorizationMode, V as BackupAdminApi, W as BackupMetrics, X as BackupSummary, Y as BatchMutationResult, Z as BatchOperationInput, _ as BloomFilterMetrics, $ as BranchInfo, a0 as BranchesApi, a1 as BulkLoadForceAbortRequest, a2 as BulkLoadForceAbortResponse, a3 as BulkLoadListResponse, a4 as BulkLoadProgress, a5 as BulkLoadReplicaProgress, a6 as BulkLoadReplicaProgressDto, a7 as BulkLoadStatusResponse, a8 as CircuitBreakerPolicy, a9 as ClusterAdminApi, aa as ClusterMemberEntry, ab as ClusterThisNodeEntry, ac as ColumnSchema, ad as ColumnSummaryForErd, ae as ColumnarResponse, af as ComponentHealthEntry, ag as ComputedColumnDef, ah as ConfigAdminApi, ai as CreateBranchRequest, aj as CreateColumnRequest, ak as CreateDatabaseOptions, al as CreatePartitionGrantRequest, am as CreateRlsResolverRequest, an as CreateTableRequest, ao as DatabaseCoverageEntry, ap as DatabaseInfo, aq as DatabaseMemoryMetrics, ar as DatabaseMemoryUsage, as as DatabaseMetricsDto, at as DatabaseOptionsInfo, au as DatabasesApi, av as DeleteOptions, aw as DiffSummary, ax as FILTER_OPERATORS, ay as FilterOperator, az as HealthAdminApi, aA as IndexInfo, aB as InsertOptions, aC as InsertResult, aD as IoMetrics, aE as LatencyPercentiles, aF as MaterializedQueriesApi, aG as MaterializedQueryDefinition, aH as MaterializedQueryExecuteOptions, aI as MaterializedQueryExecuteResult, aJ as MaterializedQueryMetrics, aK as MaterializedQueryRefreshOptions, aL as MaterializedQueryState, aM as MaterializedQueryStateNumber, aN as MaterializedQueryStatus, aO as MaterializedQueryType, aP as MaterializedQueryTypeNumber, aQ as MemberInfo, aR as MemoryMetrics, aS as MergeBranchOptions, aT as MergeConflict, aU as MergeExecutionResult, aV as MergeResult, aW as MetricsAdminApi, aX as MetricsHistory, aY as MetricsHistoryOptions, aZ as MetricsSnapshot, a_ as MetricsSummary, a$ as MutationResult, b0 as NodeAdminApi, b1 as NodeLogEntry, b2 as NodeLogLevel, b3 as NodeLogStreamOptions, b4 as NodeLogsQuery, b5 as NodeLogsResponse, b6 as OpenWriteStreamOptions, b7 as PageCacheMetrics, b8 as PartitionFunction, b9 as PartitionGrant, ba as PartitionGrantsListResponse, bb as PartitioningMetrics, bc as PerDatabaseLagEntry, bd as PerDatabaseMetrics, be as PerDatabaseStatusEntry, bf as QueryMetrics, bg as QueryResult, bh as QueryStats, bi as ReferenceInfo, bj as RelationshipEndpoint, bk as RelationshipInfo, bl as RenameColumnRequest, bm as RenameTableRequest, bn as ReplicationAdminApi, bo as ReplicationMetrics, bp as ResidencyConfig, bq as RetryPolicy, br as RlsResolver, bs as RlsResolverRule, bt as RlsResolverRuleInput, bu as RlsResolversListResponse, bv as SchemaChange, bw as SchemaDiffResult, bx as SchemaRelationshipsResponse, by as SeedApplyResult, bz as SeedTableApplyResult, bA as ServerAdminApi, bB as ServerAuthOptions, bC as ServerMemoryResponse, bD as ServerMetricsResponse, bE as ServiceInfo, bF as SimdMetrics, bG as SingleDatabaseMetricsResponse, bH as SortDirection, bI as StorageMetrics, bJ as SubscribeOptions, bK as Subscription, bL as SubscriptionChangeEvent, bM as SubscriptionEvent, bN as SubscriptionInfo, bO as SubscriptionSnapshotEvent, bP as TIME_BUCKET_FUNCTIONS, bQ as TableCoverageEntry, bR as TableNameFromSchema, bS as TablePolicy, bT as TableQuery, bU as TableSchema, bV as TableSchemaResponse, bW as TableSummary, bX as TableSummaryForErd, bY as TablesApi, bZ as TimeBucketFunction, b_ as TimeSeriesMetrics, b$ as TransactionMetrics, c0 as TypeGenerationOptions, c1 as UpdateOptions, c2 as UpdateRlsResolverRequest, c3 as UpdateTableOptionsRequest, c4 as UpdateTablePolicyRequest, c5 as UserProfile, c6 as WhereGroupBuilder, c7 as WhereOperator, c8 as WriteStream, c9 as coerceColumnarValue, ca as createAoudaClient } from './client-BbyXG5AL.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @aouda/client error types.
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// package.json
|
|
2
2
|
var package_default = {
|
|
3
3
|
name: "@aouda/client",
|
|
4
|
-
version: "0.1.
|
|
4
|
+
version: "0.1.7",
|
|
5
5
|
description: "Official TypeScript/JavaScript client library for Aouda",
|
|
6
6
|
type: "module",
|
|
7
7
|
main: "./dist/index.cjs",
|
|
@@ -1038,7 +1038,8 @@ var BulkLoadCoordinator = class {
|
|
|
1038
1038
|
pkUniquenessOverride: options.pkUniquenessOverride,
|
|
1039
1039
|
replicationMode: options.replicationMode,
|
|
1040
1040
|
forceSingleNodeReplicationBypass: options.forceSingleNodeReplicationBypass,
|
|
1041
|
-
postLoadMqBehavior: options.postLoadMqBehavior
|
|
1041
|
+
postLoadMqBehavior: options.postLoadMqBehavior,
|
|
1042
|
+
...options.identityInsert === true ? { identityInsert: true } : {}
|
|
1042
1043
|
}
|
|
1043
1044
|
};
|
|
1044
1045
|
const beginResp = await this.transport.post(
|
|
@@ -3048,6 +3049,8 @@ var TableQuery = class _TableQuery {
|
|
|
3048
3049
|
* a Promise. It does not use query builder state (where, orderBy, etc.).
|
|
3049
3050
|
*
|
|
3050
3051
|
* @param row - The row data to insert. Keys are column names.
|
|
3052
|
+
* @param row - The row object to insert. Keys are column names.
|
|
3053
|
+
* @param options - Optional insert options (e.g. `identityInsert`).
|
|
3051
3054
|
* @returns The insert result with row count, execution time, and optional generated values.
|
|
3052
3055
|
* @throws Error if `row` is null or undefined.
|
|
3053
3056
|
*
|
|
@@ -3058,9 +3061,12 @@ var TableQuery = class _TableQuery {
|
|
|
3058
3061
|
*
|
|
3059
3062
|
* console.log(result.rowsInserted); // 1
|
|
3060
3063
|
* console.log(result.generatedValues); // { "0": { id: 42 } }
|
|
3064
|
+
*
|
|
3065
|
+
* // Identity-insert (Bond isAutoIncrementDisabled: true): store explicit IDs including 0
|
|
3066
|
+
* await client.table('orders').insert({ id: 1000, status: 'seeded' }, { identityInsert: true });
|
|
3061
3067
|
* ```
|
|
3062
3068
|
*/
|
|
3063
|
-
async insert(row) {
|
|
3069
|
+
async insert(row, options) {
|
|
3064
3070
|
if (row == null) {
|
|
3065
3071
|
throw new Error("insert() requires a non-null row object");
|
|
3066
3072
|
}
|
|
@@ -3070,6 +3076,9 @@ var TableQuery = class _TableQuery {
|
|
|
3070
3076
|
database: this.database,
|
|
3071
3077
|
rows: [row]
|
|
3072
3078
|
};
|
|
3079
|
+
if (options?.identityInsert === true) {
|
|
3080
|
+
body.identityInsert = true;
|
|
3081
|
+
}
|
|
3073
3082
|
const response = await this.transport.post(path, body);
|
|
3074
3083
|
const result = {
|
|
3075
3084
|
rowsInserted: response.rowsInserted,
|
|
@@ -3087,6 +3096,7 @@ var TableQuery = class _TableQuery {
|
|
|
3087
3096
|
* a Promise. It does not use query builder state (where, orderBy, etc.).
|
|
3088
3097
|
*
|
|
3089
3098
|
* @param rows - Array of row objects to insert. Must contain at least one row.
|
|
3099
|
+
* @param options - Optional insert options (e.g. `identityInsert`).
|
|
3090
3100
|
* @returns The insert result with total row count, execution time, and optional generated values.
|
|
3091
3101
|
* @throws Error if `rows` is empty.
|
|
3092
3102
|
*
|
|
@@ -3099,9 +3109,14 @@ var TableQuery = class _TableQuery {
|
|
|
3099
3109
|
* ]);
|
|
3100
3110
|
*
|
|
3101
3111
|
* console.log(result.rowsInserted); // 2
|
|
3112
|
+
*
|
|
3113
|
+
* await client.table('orders').insertMany(
|
|
3114
|
+
* [{ id: 10 }, { id: 20 }],
|
|
3115
|
+
* { identityInsert: true },
|
|
3116
|
+
* );
|
|
3102
3117
|
* ```
|
|
3103
3118
|
*/
|
|
3104
|
-
async insertMany(rows) {
|
|
3119
|
+
async insertMany(rows, options) {
|
|
3105
3120
|
if (!Array.isArray(rows) || rows.length === 0) {
|
|
3106
3121
|
throw new Error("insertMany() requires a non-empty array of rows");
|
|
3107
3122
|
}
|
|
@@ -3111,6 +3126,9 @@ var TableQuery = class _TableQuery {
|
|
|
3111
3126
|
database: this.database,
|
|
3112
3127
|
rows
|
|
3113
3128
|
};
|
|
3129
|
+
if (options?.identityInsert === true) {
|
|
3130
|
+
body.identityInsert = true;
|
|
3131
|
+
}
|
|
3114
3132
|
const response = await this.transport.post(path, body);
|
|
3115
3133
|
const result = {
|
|
3116
3134
|
rowsInserted: response.rowsInserted,
|
|
@@ -4313,6 +4331,35 @@ var NotificationsAdminApi = class {
|
|
|
4313
4331
|
request
|
|
4314
4332
|
);
|
|
4315
4333
|
}
|
|
4334
|
+
/**
|
|
4335
|
+
* Get recent captured auth notifications (newest first).
|
|
4336
|
+
* GET /admin/notifications/outbox?channel=&limit=
|
|
4337
|
+
*/
|
|
4338
|
+
async getOutbox(options) {
|
|
4339
|
+
return this.transport.get(
|
|
4340
|
+
this.buildOutboxPath(options)
|
|
4341
|
+
);
|
|
4342
|
+
}
|
|
4343
|
+
/**
|
|
4344
|
+
* Clear the in-memory notification outbox.
|
|
4345
|
+
* DELETE /admin/notifications/outbox
|
|
4346
|
+
*/
|
|
4347
|
+
async clearOutbox() {
|
|
4348
|
+
return this.transport.delete(
|
|
4349
|
+
`${BASE_PATH7}/outbox`
|
|
4350
|
+
);
|
|
4351
|
+
}
|
|
4352
|
+
buildOutboxPath(options) {
|
|
4353
|
+
const params = new URLSearchParams();
|
|
4354
|
+
if (options?.channel !== void 0 && options.channel.trim().length > 0) {
|
|
4355
|
+
params.set("channel", options.channel);
|
|
4356
|
+
}
|
|
4357
|
+
if (options?.limit !== void 0) {
|
|
4358
|
+
params.set("limit", String(options.limit));
|
|
4359
|
+
}
|
|
4360
|
+
const query = params.toString();
|
|
4361
|
+
return query.length > 0 ? `${BASE_PATH7}/outbox?${query}` : `${BASE_PATH7}/outbox`;
|
|
4362
|
+
}
|
|
4316
4363
|
};
|
|
4317
4364
|
|
|
4318
4365
|
// src/admin/index.ts
|