effect-dynamodb 0.1.0
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/LICENSE +21 -0
- package/README.md +69 -0
- package/dist/Aggregate.d.ts +210 -0
- package/dist/Aggregate.d.ts.map +1 -0
- package/dist/Aggregate.js +1169 -0
- package/dist/Aggregate.js.map +1 -0
- package/dist/Batch.d.ts +62 -0
- package/dist/Batch.d.ts.map +1 -0
- package/dist/Batch.js +218 -0
- package/dist/Batch.js.map +1 -0
- package/dist/Collection.d.ts +58 -0
- package/dist/Collection.d.ts.map +1 -0
- package/dist/Collection.js +195 -0
- package/dist/Collection.js.map +1 -0
- package/dist/Collections.d.ts +121 -0
- package/dist/Collections.d.ts.map +1 -0
- package/dist/Collections.js +121 -0
- package/dist/Collections.js.map +1 -0
- package/dist/DynamoClient.d.ts +317 -0
- package/dist/DynamoClient.d.ts.map +1 -0
- package/dist/DynamoClient.js +653 -0
- package/dist/DynamoClient.js.map +1 -0
- package/dist/DynamoModel.d.ts +278 -0
- package/dist/DynamoModel.d.ts.map +1 -0
- package/dist/DynamoModel.js +453 -0
- package/dist/DynamoModel.js.map +1 -0
- package/dist/DynamoSchema.d.ts +137 -0
- package/dist/DynamoSchema.d.ts.map +1 -0
- package/dist/DynamoSchema.js +188 -0
- package/dist/DynamoSchema.js.map +1 -0
- package/dist/Entity.d.ts +628 -0
- package/dist/Entity.d.ts.map +1 -0
- package/dist/Entity.js +2371 -0
- package/dist/Entity.js.map +1 -0
- package/dist/Errors.d.ts +227 -0
- package/dist/Errors.d.ts.map +1 -0
- package/dist/Errors.js +93 -0
- package/dist/Errors.js.map +1 -0
- package/dist/EventStore.d.ts +208 -0
- package/dist/EventStore.d.ts.map +1 -0
- package/dist/EventStore.js +333 -0
- package/dist/EventStore.js.map +1 -0
- package/dist/Expression.d.ts +50 -0
- package/dist/Expression.d.ts.map +1 -0
- package/dist/Expression.js +170 -0
- package/dist/Expression.js.map +1 -0
- package/dist/KeyComposer.d.ts +125 -0
- package/dist/KeyComposer.d.ts.map +1 -0
- package/dist/KeyComposer.js +257 -0
- package/dist/KeyComposer.js.map +1 -0
- package/dist/Marshaller.d.ts +30 -0
- package/dist/Marshaller.d.ts.map +1 -0
- package/dist/Marshaller.js +115 -0
- package/dist/Marshaller.js.map +1 -0
- package/dist/Projection.d.ts +28 -0
- package/dist/Projection.d.ts.map +1 -0
- package/dist/Projection.js +39 -0
- package/dist/Projection.js.map +1 -0
- package/dist/Query.d.ts +214 -0
- package/dist/Query.d.ts.map +1 -0
- package/dist/Query.js +397 -0
- package/dist/Query.js.map +1 -0
- package/dist/Table.d.ts +178 -0
- package/dist/Table.d.ts.map +1 -0
- package/dist/Table.js +211 -0
- package/dist/Table.js.map +1 -0
- package/dist/Transaction.d.ts +79 -0
- package/dist/Transaction.d.ts.map +1 -0
- package/dist/Transaction.js +215 -0
- package/dist/Transaction.js.map +1 -0
- package/dist/_AggregateCursor.d.ts +44 -0
- package/dist/_AggregateCursor.d.ts.map +1 -0
- package/dist/_AggregateCursor.js +18 -0
- package/dist/_AggregateCursor.js.map +1 -0
- package/dist/_AggregateEdges.d.ts +77 -0
- package/dist/_AggregateEdges.d.ts.map +1 -0
- package/dist/_AggregateEdges.js +41 -0
- package/dist/_AggregateEdges.js.map +1 -0
- package/dist/_AggregateSchemas.d.ts +69 -0
- package/dist/_AggregateSchemas.d.ts.map +1 -0
- package/dist/_AggregateSchemas.js +194 -0
- package/dist/_AggregateSchemas.js.map +1 -0
- package/dist/_AggregateTypes.d.ts +94 -0
- package/dist/_AggregateTypes.d.ts.map +1 -0
- package/dist/_AggregateTypes.js +7 -0
- package/dist/_AggregateTypes.js.map +1 -0
- package/dist/_EntityCombinators.d.ts +155 -0
- package/dist/_EntityCombinators.d.ts.map +1 -0
- package/dist/_EntityCombinators.js +158 -0
- package/dist/_EntityCombinators.js.map +1 -0
- package/dist/_EntityConfig.d.ts +100 -0
- package/dist/_EntityConfig.d.ts.map +1 -0
- package/dist/_EntityConfig.js +7 -0
- package/dist/_EntityConfig.js.map +1 -0
- package/dist/_EntityOps.d.ts +205 -0
- package/dist/_EntityOps.d.ts.map +1 -0
- package/dist/_EntityOps.js +137 -0
- package/dist/_EntityOps.js.map +1 -0
- package/dist/_EntitySchemas.d.ts +57 -0
- package/dist/_EntitySchemas.d.ts.map +1 -0
- package/dist/_EntitySchemas.js +298 -0
- package/dist/_EntitySchemas.js.map +1 -0
- package/dist/_EntityTypes.d.ts +81 -0
- package/dist/_EntityTypes.d.ts.map +1 -0
- package/dist/_EntityTypes.js +7 -0
- package/dist/_EntityTypes.js.map +1 -0
- package/dist/_sparse_check.d.ts +2 -0
- package/dist/_sparse_check.d.ts.map +1 -0
- package/dist/_sparse_check.js +193 -0
- package/dist/_sparse_check.js.map +1 -0
- package/dist/index.d.ts +35 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -0
- package/dist/internal/AggregateCursor.d.ts +44 -0
- package/dist/internal/AggregateCursor.d.ts.map +1 -0
- package/dist/internal/AggregateCursor.js +18 -0
- package/dist/internal/AggregateCursor.js.map +1 -0
- package/dist/internal/AggregateEdges.d.ts +77 -0
- package/dist/internal/AggregateEdges.d.ts.map +1 -0
- package/dist/internal/AggregateEdges.js +41 -0
- package/dist/internal/AggregateEdges.js.map +1 -0
- package/dist/internal/AggregateSchemas.d.ts +69 -0
- package/dist/internal/AggregateSchemas.d.ts.map +1 -0
- package/dist/internal/AggregateSchemas.js +193 -0
- package/dist/internal/AggregateSchemas.js.map +1 -0
- package/dist/internal/AggregateTypes.d.ts +94 -0
- package/dist/internal/AggregateTypes.d.ts.map +1 -0
- package/dist/internal/AggregateTypes.js +7 -0
- package/dist/internal/AggregateTypes.js.map +1 -0
- package/dist/internal/BoundQuery.d.ts +107 -0
- package/dist/internal/BoundQuery.d.ts.map +1 -0
- package/dist/internal/BoundQuery.js +111 -0
- package/dist/internal/BoundQuery.js.map +1 -0
- package/dist/internal/EntityCombinators.d.ts +173 -0
- package/dist/internal/EntityCombinators.d.ts.map +1 -0
- package/dist/internal/EntityCombinators.js +183 -0
- package/dist/internal/EntityCombinators.js.map +1 -0
- package/dist/internal/EntityConfig.d.ts +100 -0
- package/dist/internal/EntityConfig.d.ts.map +1 -0
- package/dist/internal/EntityConfig.js +7 -0
- package/dist/internal/EntityConfig.js.map +1 -0
- package/dist/internal/EntityOps.d.ts +268 -0
- package/dist/internal/EntityOps.d.ts.map +1 -0
- package/dist/internal/EntityOps.js +153 -0
- package/dist/internal/EntityOps.js.map +1 -0
- package/dist/internal/EntitySchemas.d.ts +57 -0
- package/dist/internal/EntitySchemas.d.ts.map +1 -0
- package/dist/internal/EntitySchemas.js +299 -0
- package/dist/internal/EntitySchemas.js.map +1 -0
- package/dist/internal/EntityTypes.d.ts +128 -0
- package/dist/internal/EntityTypes.d.ts.map +1 -0
- package/dist/internal/EntityTypes.js +7 -0
- package/dist/internal/EntityTypes.js.map +1 -0
- package/dist/internal/Expr.d.ts +141 -0
- package/dist/internal/Expr.d.ts.map +1 -0
- package/dist/internal/Expr.js +332 -0
- package/dist/internal/Expr.js.map +1 -0
- package/dist/internal/PathBuilder.d.ts +88 -0
- package/dist/internal/PathBuilder.d.ts.map +1 -0
- package/dist/internal/PathBuilder.js +100 -0
- package/dist/internal/PathBuilder.js.map +1 -0
- package/dist/internal/TransactableOps.d.ts +25 -0
- package/dist/internal/TransactableOps.d.ts.map +1 -0
- package/dist/internal/TransactableOps.js +58 -0
- package/dist/internal/TransactableOps.js.map +1 -0
- package/dist/internal/sparse_check.d.ts +2 -0
- package/dist/internal/sparse_check.d.ts.map +1 -0
- package/dist/internal/sparse_check.js +196 -0
- package/dist/internal/sparse_check.js.map +1 -0
- package/package.json +71 -0
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DynamoClient — Effect service wrapping the AWS SDK DynamoDBClient.
|
|
3
|
+
*
|
|
4
|
+
* All DynamoDB operations are exposed as Effect-returning methods that fail
|
|
5
|
+
* with {@link DynamoError}. The underlying SDK client lifecycle is managed
|
|
6
|
+
* via `Layer.scoped` (acquire on layer build, destroy on scope close).
|
|
7
|
+
*
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
import type { BatchGetItemCommandInput, BatchGetItemCommandOutput, BatchWriteItemCommandInput, BatchWriteItemCommandOutput, CreateBackupCommandInput, CreateBackupCommandOutput, CreateTableCommandInput, CreateTableCommandOutput, DeleteBackupCommandInput, DeleteBackupCommandOutput, DeleteItemCommandInput, DeleteItemCommandOutput, DeleteTableCommandInput, DeleteTableCommandOutput, DescribeContinuousBackupsCommandInput, DescribeContinuousBackupsCommandOutput, DescribeExportCommandInput, DescribeExportCommandOutput, DescribeTableCommandInput, DescribeTableCommandOutput, DescribeTimeToLiveCommandInput, DescribeTimeToLiveCommandOutput, ExportTableToPointInTimeCommandInput, ExportTableToPointInTimeCommandOutput, GetItemCommandInput, GetItemCommandOutput, ListBackupsCommandInput, ListBackupsCommandOutput, ListTablesCommandInput, ListTablesCommandOutput, ListTagsOfResourceCommandInput, ListTagsOfResourceCommandOutput, PutItemCommandInput, PutItemCommandOutput, QueryCommandInput, QueryCommandOutput, RestoreTableFromBackupCommandInput, RestoreTableFromBackupCommandOutput, RestoreTableToPointInTimeCommandInput, RestoreTableToPointInTimeCommandOutput, ScanCommandInput, ScanCommandOutput, TagResourceCommandInput, TagResourceCommandOutput, TransactGetItemsCommandInput, TransactGetItemsCommandOutput, TransactWriteItemsCommandInput, TransactWriteItemsCommandOutput, UntagResourceCommandInput, UntagResourceCommandOutput, UpdateContinuousBackupsCommandInput, UpdateContinuousBackupsCommandOutput, UpdateItemCommandInput, UpdateItemCommandOutput, UpdateTableCommandInput, UpdateTableCommandOutput, UpdateTimeToLiveCommandInput, UpdateTimeToLiveCommandOutput } from "@aws-sdk/client-dynamodb";
|
|
11
|
+
import { Config, Context, Effect, Layer, type Schema } from "effect";
|
|
12
|
+
import type { Aggregate as AggregateType, BoundAggregate } from "./Aggregate.js";
|
|
13
|
+
import type { BoundEntity, Entity as EntityType } from "./Entity.js";
|
|
14
|
+
import { DynamoError, DynamoValidationError, InternalServerError, ResourceNotFoundError, ThrottlingError } from "./Errors.js";
|
|
15
|
+
import type { EntityKeyType, IndexPkInput, IndexSkFields } from "./internal/EntityTypes.js";
|
|
16
|
+
import type { IndexDefinition } from "./KeyComposer.js";
|
|
17
|
+
import type { CreateTableOptions, TableConfig } from "./Table.js";
|
|
18
|
+
/** Union of all DynamoDB client error types */
|
|
19
|
+
export type DynamoClientError = DynamoError | ThrottlingError | DynamoValidationError | InternalServerError | ResourceNotFoundError;
|
|
20
|
+
/**
|
|
21
|
+
* Service interface for DynamoDB operations. Each method wraps a single
|
|
22
|
+
* AWS SDK command and returns `Effect<Output, DynamoError>`.
|
|
23
|
+
*/
|
|
24
|
+
export interface DynamoClientService {
|
|
25
|
+
/** Create a DynamoDB table. */
|
|
26
|
+
readonly createTable: (input: CreateTableCommandInput) => Effect.Effect<CreateTableCommandOutput, DynamoClientError>;
|
|
27
|
+
/** Delete a DynamoDB table. */
|
|
28
|
+
readonly deleteTable: (input: DeleteTableCommandInput) => Effect.Effect<DeleteTableCommandOutput, DynamoClientError>;
|
|
29
|
+
/** Describe a DynamoDB table (status, stream specification, etc.). */
|
|
30
|
+
readonly describeTable: (input: DescribeTableCommandInput) => Effect.Effect<DescribeTableCommandOutput, DynamoClientError>;
|
|
31
|
+
/** Put a single item. */
|
|
32
|
+
readonly putItem: (input: PutItemCommandInput) => Effect.Effect<PutItemCommandOutput, DynamoClientError>;
|
|
33
|
+
/** Get a single item by key. */
|
|
34
|
+
readonly getItem: (input: GetItemCommandInput) => Effect.Effect<GetItemCommandOutput, DynamoClientError>;
|
|
35
|
+
/** Delete a single item by key. */
|
|
36
|
+
readonly deleteItem: (input: DeleteItemCommandInput) => Effect.Effect<DeleteItemCommandOutput, DynamoClientError>;
|
|
37
|
+
/** Update a single item with an update expression. */
|
|
38
|
+
readonly updateItem: (input: UpdateItemCommandInput) => Effect.Effect<UpdateItemCommandOutput, DynamoClientError>;
|
|
39
|
+
/** Execute a query against a table or index. */
|
|
40
|
+
readonly query: (input: QueryCommandInput) => Effect.Effect<QueryCommandOutput, DynamoClientError>;
|
|
41
|
+
/** Execute a scan against a table or index. */
|
|
42
|
+
readonly scan: (input: ScanCommandInput) => Effect.Effect<ScanCommandOutput, DynamoClientError>;
|
|
43
|
+
/** Batch-get up to 100 items in a single request. */
|
|
44
|
+
readonly batchGetItem: (input: BatchGetItemCommandInput) => Effect.Effect<BatchGetItemCommandOutput, DynamoClientError>;
|
|
45
|
+
/** Batch-write up to 25 items (puts and deletes) in a single request. */
|
|
46
|
+
readonly batchWriteItem: (input: BatchWriteItemCommandInput) => Effect.Effect<BatchWriteItemCommandOutput, DynamoClientError>;
|
|
47
|
+
/** Atomically get up to 100 items across tables. */
|
|
48
|
+
readonly transactGetItems: (input: TransactGetItemsCommandInput) => Effect.Effect<TransactGetItemsCommandOutput, DynamoClientError>;
|
|
49
|
+
/** Atomically write up to 100 items across tables (2x WCU cost). */
|
|
50
|
+
readonly transactWriteItems: (input: TransactWriteItemsCommandInput) => Effect.Effect<TransactWriteItemsCommandOutput, DynamoClientError>;
|
|
51
|
+
/** Update table settings (provisioned throughput, GSIs, etc.). */
|
|
52
|
+
readonly updateTable: (input: UpdateTableCommandInput) => Effect.Effect<UpdateTableCommandOutput, DynamoClientError>;
|
|
53
|
+
/** List all tables. */
|
|
54
|
+
readonly listTables: (input: ListTablesCommandInput) => Effect.Effect<ListTablesCommandOutput, DynamoClientError>;
|
|
55
|
+
/** Create an on-demand backup. */
|
|
56
|
+
readonly createBackup: (input: CreateBackupCommandInput) => Effect.Effect<CreateBackupCommandOutput, DynamoClientError>;
|
|
57
|
+
/** Delete a backup. */
|
|
58
|
+
readonly deleteBackup: (input: DeleteBackupCommandInput) => Effect.Effect<DeleteBackupCommandOutput, DynamoClientError>;
|
|
59
|
+
/** List backups. */
|
|
60
|
+
readonly listBackups: (input: ListBackupsCommandInput) => Effect.Effect<ListBackupsCommandOutput, DynamoClientError>;
|
|
61
|
+
/** Restore a table from a backup. */
|
|
62
|
+
readonly restoreTableFromBackup: (input: RestoreTableFromBackupCommandInput) => Effect.Effect<RestoreTableFromBackupCommandOutput, DynamoClientError>;
|
|
63
|
+
/** Describe continuous backups (PITR) settings. */
|
|
64
|
+
readonly describeContinuousBackups: (input: DescribeContinuousBackupsCommandInput) => Effect.Effect<DescribeContinuousBackupsCommandOutput, DynamoClientError>;
|
|
65
|
+
/** Enable or disable PITR. */
|
|
66
|
+
readonly updateContinuousBackups: (input: UpdateContinuousBackupsCommandInput) => Effect.Effect<UpdateContinuousBackupsCommandOutput, DynamoClientError>;
|
|
67
|
+
/** Restore a table to a point in time. */
|
|
68
|
+
readonly restoreTableToPointInTime: (input: RestoreTableToPointInTimeCommandInput) => Effect.Effect<RestoreTableToPointInTimeCommandOutput, DynamoClientError>;
|
|
69
|
+
/** Export table to S3 (point-in-time snapshot). */
|
|
70
|
+
readonly exportTableToPointInTime: (input: ExportTableToPointInTimeCommandInput) => Effect.Effect<ExportTableToPointInTimeCommandOutput, DynamoClientError>;
|
|
71
|
+
/** Describe an export. */
|
|
72
|
+
readonly describeExport: (input: DescribeExportCommandInput) => Effect.Effect<DescribeExportCommandOutput, DynamoClientError>;
|
|
73
|
+
/** Update TTL settings for a table. */
|
|
74
|
+
readonly updateTimeToLive: (input: UpdateTimeToLiveCommandInput) => Effect.Effect<UpdateTimeToLiveCommandOutput, DynamoClientError>;
|
|
75
|
+
/** Describe TTL settings for a table. */
|
|
76
|
+
readonly describeTimeToLive: (input: DescribeTimeToLiveCommandInput) => Effect.Effect<DescribeTimeToLiveCommandOutput, DynamoClientError>;
|
|
77
|
+
/** Tag a DynamoDB resource. */
|
|
78
|
+
readonly tagResource: (input: TagResourceCommandInput) => Effect.Effect<TagResourceCommandOutput, DynamoClientError>;
|
|
79
|
+
/** Remove tags from a DynamoDB resource. */
|
|
80
|
+
readonly untagResource: (input: UntagResourceCommandInput) => Effect.Effect<UntagResourceCommandOutput, DynamoClientError>;
|
|
81
|
+
/** List tags on a DynamoDB resource. */
|
|
82
|
+
readonly listTagsOfResource: (input: ListTagsOfResourceCommandInput) => Effect.Effect<ListTagsOfResourceCommandOutput, DynamoClientError>;
|
|
83
|
+
}
|
|
84
|
+
declare const DynamoClient_base: Context.ServiceClass<DynamoClient, "@effect-dynamodb/DynamoClient", DynamoClientService>;
|
|
85
|
+
/**
|
|
86
|
+
* Effect Context.Service for the DynamoDB client service.
|
|
87
|
+
*
|
|
88
|
+
* Use `DynamoClient.layer(config)` to construct a live Layer that manages
|
|
89
|
+
* the underlying AWS SDK client lifecycle with `Effect.acquireRelease`.
|
|
90
|
+
*
|
|
91
|
+
* @example
|
|
92
|
+
* ```typescript
|
|
93
|
+
* const live = DynamoClient.layer({ region: "us-east-1" })
|
|
94
|
+
* pipe(program, Effect.provide(live), Effect.runPromise)
|
|
95
|
+
* ```
|
|
96
|
+
*/
|
|
97
|
+
export declare class DynamoClient extends DynamoClient_base {
|
|
98
|
+
/**
|
|
99
|
+
* Create a live Layer that manages an AWS DynamoDBClient.
|
|
100
|
+
*
|
|
101
|
+
* @param config.region - AWS region
|
|
102
|
+
* @param config.endpoint - Optional endpoint override (e.g., for DynamoDB Local)
|
|
103
|
+
* @param config.credentials - Optional static credentials
|
|
104
|
+
*/
|
|
105
|
+
static readonly layer: (config: {
|
|
106
|
+
readonly region: string;
|
|
107
|
+
readonly endpoint?: string | undefined;
|
|
108
|
+
readonly credentials?: {
|
|
109
|
+
readonly accessKeyId: string;
|
|
110
|
+
readonly secretAccessKey: string;
|
|
111
|
+
} | undefined;
|
|
112
|
+
}) => Layer.Layer<DynamoClient>;
|
|
113
|
+
/**
|
|
114
|
+
* Create a live Layer that reads configuration from Effect Config providers
|
|
115
|
+
* (e.g., environment variables, config files).
|
|
116
|
+
*
|
|
117
|
+
* @param config.region - Config for AWS region
|
|
118
|
+
* @param config.endpoint - Optional Config for endpoint override
|
|
119
|
+
* @param config.credentials - Optional Config for static credentials
|
|
120
|
+
*/
|
|
121
|
+
static readonly layerConfig: (config: {
|
|
122
|
+
readonly region: Config.Config<string>;
|
|
123
|
+
readonly endpoint?: Config.Config<string> | undefined;
|
|
124
|
+
readonly credentials?: Config.Config<{
|
|
125
|
+
readonly accessKeyId: string;
|
|
126
|
+
readonly secretAccessKey: string;
|
|
127
|
+
}> | undefined;
|
|
128
|
+
}) => Layer.Layer<DynamoClient, Config.ConfigError>;
|
|
129
|
+
/**
|
|
130
|
+
* Create a typed client gateway from entities, aggregates, and (optionally) tables.
|
|
131
|
+
*
|
|
132
|
+
* Returns a namespaced client with `entities`, `aggregates`, `collections`, and
|
|
133
|
+
* `tables` properties. Collections are auto-discovered from entity index
|
|
134
|
+
* `collection` properties — no separate registration needed.
|
|
135
|
+
*
|
|
136
|
+
* @example
|
|
137
|
+
* ```typescript
|
|
138
|
+
* const db = yield* DynamoClient.make({
|
|
139
|
+
* entities: { Users, Tasks },
|
|
140
|
+
* aggregates: { OrderAggregate },
|
|
141
|
+
* tables: { MainTable },
|
|
142
|
+
* })
|
|
143
|
+
*
|
|
144
|
+
* yield* db.entities.Users.get({ userId: "123" })
|
|
145
|
+
* yield* db.aggregates.OrderAggregate.get({ orderId: "o-1" })
|
|
146
|
+
* yield* db.collections.assignments({ userId: "123" }).collect()
|
|
147
|
+
* yield* db.tables.MainTable.create()
|
|
148
|
+
* ```
|
|
149
|
+
*/
|
|
150
|
+
static readonly make: {
|
|
151
|
+
<TEntities extends Record<string, {
|
|
152
|
+
readonly _tag: "Entity";
|
|
153
|
+
}>, TAggregates extends Record<string, AggregateType<any, any, any>>, TTables extends Record<string, TableLike>>(config: {
|
|
154
|
+
readonly entities: TEntities;
|
|
155
|
+
readonly aggregates: TAggregates;
|
|
156
|
+
readonly tables: TTables;
|
|
157
|
+
}): Effect.Effect<TypedClient<TEntities, TAggregates, TTables>, never, DynamoClient | TableConfig>;
|
|
158
|
+
<TEntities extends Record<string, {
|
|
159
|
+
readonly _tag: "Entity";
|
|
160
|
+
}>, TAggregates extends Record<string, AggregateType<any, any, any>>>(config: {
|
|
161
|
+
readonly entities: TEntities;
|
|
162
|
+
readonly aggregates: TAggregates;
|
|
163
|
+
}): Effect.Effect<TypedClient<TEntities, TAggregates, Record<string, TableLike>>, never, DynamoClient | TableConfig>;
|
|
164
|
+
<TEntities extends Record<string, {
|
|
165
|
+
readonly _tag: "Entity";
|
|
166
|
+
}>, TTables extends Record<string, TableLike>>(config: {
|
|
167
|
+
readonly entities: TEntities;
|
|
168
|
+
readonly tables: TTables;
|
|
169
|
+
}): Effect.Effect<TypedClient<TEntities, Record<string, never>, TTables>, never, DynamoClient | TableConfig>;
|
|
170
|
+
<TEntities extends Record<string, {
|
|
171
|
+
readonly _tag: "Entity";
|
|
172
|
+
}>>(config: {
|
|
173
|
+
readonly entities: TEntities;
|
|
174
|
+
}): Effect.Effect<TypedClient<TEntities, Record<string, never>, Record<string, TableLike>>, never, DynamoClient | TableConfig>;
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
/** Minimal structural type for tables used in DynamoClient.make() config. */
|
|
178
|
+
export interface TableLike {
|
|
179
|
+
readonly _tag: "Table";
|
|
180
|
+
readonly schema: import("./DynamoSchema.js").DynamoSchema;
|
|
181
|
+
readonly entities: Record<string, {
|
|
182
|
+
readonly _tag: "Entity";
|
|
183
|
+
}>;
|
|
184
|
+
readonly aggregates: Record<string, unknown>;
|
|
185
|
+
readonly Tag: Context.Service<TableConfig, TableConfig>;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Collection query — returned by `db.collections.Name(composites)`.
|
|
189
|
+
* `.collect()` returns the grouped result directly (not an array).
|
|
190
|
+
*/
|
|
191
|
+
export interface CollectionQuery<TResult> {
|
|
192
|
+
/** Execute and collect all pages into a grouped result. */
|
|
193
|
+
readonly collect: () => Effect.Effect<TResult, DynamoClientError | import("./Errors.js").ValidationError, never>;
|
|
194
|
+
/** Execute a single page. */
|
|
195
|
+
readonly fetch: () => Effect.Effect<{
|
|
196
|
+
items: TResult;
|
|
197
|
+
cursor: string | null;
|
|
198
|
+
}, DynamoClientError | import("./Errors.js").ValidationError, never>;
|
|
199
|
+
/** Add a filter expression (post-read). */
|
|
200
|
+
readonly filter: {
|
|
201
|
+
(fn: (t: import("./internal/PathBuilder.js").PathBuilder<unknown, unknown, never>, ops: import("./internal/Expr.js").ConditionOps<unknown>) => import("./internal/Expr.js").Expr): CollectionQuery<TResult>;
|
|
202
|
+
(shorthand: import("./internal/Expr.js").ConditionShorthand): CollectionQuery<TResult>;
|
|
203
|
+
};
|
|
204
|
+
/** Set the maximum number of items per DynamoDB page. */
|
|
205
|
+
readonly limit: (n: number) => CollectionQuery<TResult>;
|
|
206
|
+
/** Reverse sort order. */
|
|
207
|
+
readonly reverse: () => CollectionQuery<TResult>;
|
|
208
|
+
/** Resume from cursor. */
|
|
209
|
+
readonly startFrom: (cursor: string) => CollectionQuery<TResult>;
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Typed client returned by `DynamoClient.make({ entities, aggregates?, tables? })`.
|
|
213
|
+
* Namespaced under `entities`, `aggregates`, `collections`, and `tables`.
|
|
214
|
+
* Collections are auto-discovered from entity index `collection` properties.
|
|
215
|
+
*/
|
|
216
|
+
export type TypedClient<TEntities extends Record<string, {
|
|
217
|
+
readonly _tag: "Entity";
|
|
218
|
+
}>, TAggregates extends Record<string, AggregateType<any, any, any>> = Record<string, never>, TTables extends Record<string, TableLike> = Record<string, TableLike>> = {
|
|
219
|
+
/** Bound entities with CRUD + query accessors for each index. */
|
|
220
|
+
readonly entities: {
|
|
221
|
+
readonly [K in keyof TEntities]: TEntities[K] extends EntityType<infer M, any, infer I, any, any, any, any, infer R, any> ? Resolve<BoundEntity<M, I, R, ResolveKey<M, I>> & {
|
|
222
|
+
/** Scan this entity. Returns a BoundQuery for building scan queries. */
|
|
223
|
+
readonly scan: () => import("./internal/BoundQuery.js").BoundQuery<Schema.Schema.Type<M>, never, Schema.Schema.Type<M>>;
|
|
224
|
+
} & EntityIndexAccessors<M, I, R>> : never;
|
|
225
|
+
};
|
|
226
|
+
/** Bound aggregates with CRUD + list operations (R = never). */
|
|
227
|
+
readonly aggregates: {
|
|
228
|
+
readonly [K in keyof TAggregates]: TAggregates[K] extends AggregateType<infer S, infer TKey, infer TInput> ? BoundAggregate<S, TKey, TInput> : never;
|
|
229
|
+
};
|
|
230
|
+
/**
|
|
231
|
+
* Collection accessors — auto-discovered from entity index `collection` properties.
|
|
232
|
+
* Access by collection name: `db.collections.assignments({ employee: "x" }).collect()`
|
|
233
|
+
*
|
|
234
|
+
* Each accessor returns a `CollectionQuery` with grouped results keyed by entity name.
|
|
235
|
+
* Type safety for collection results requires explicit type annotation at the call site.
|
|
236
|
+
*/
|
|
237
|
+
readonly collections: {
|
|
238
|
+
readonly [K: string]: (composites: Record<string, unknown>) => CollectionQuery<any>;
|
|
239
|
+
};
|
|
240
|
+
/** Table operations keyed by table record keys. */
|
|
241
|
+
readonly tables: {
|
|
242
|
+
readonly [K in keyof TTables]: TableOperations;
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
/**
|
|
246
|
+
* Collection accessors interface. Uses an interface (not mapped type) so that
|
|
247
|
+
* `noUncheckedIndexedAccess` does not add `| undefined` to each access.
|
|
248
|
+
* Collections are auto-discovered from entity index `collection` properties
|
|
249
|
+
* and guaranteed to exist at runtime.
|
|
250
|
+
*/
|
|
251
|
+
export interface CollectionAccessors {
|
|
252
|
+
[collectionName: string]: (composites: Record<string, unknown>) => CollectionQuery<Record<string, unknown[]>>;
|
|
253
|
+
}
|
|
254
|
+
/** Force TypeScript to resolve an interface/intersection into a plain object for clean hover display */
|
|
255
|
+
type Resolve<T> = {
|
|
256
|
+
[K in keyof T]: T[K];
|
|
257
|
+
};
|
|
258
|
+
/** Resolve EntityKeyType into a plain object type for clean hover display.
|
|
259
|
+
* Uses conditional type to force eager evaluation by TypeScript. */
|
|
260
|
+
type ResolveKey<M extends Schema.Top, I> = EntityKeyType<M, I> extends infer K ? {
|
|
261
|
+
[P in keyof K]: K[P];
|
|
262
|
+
} : never;
|
|
263
|
+
/** Force eager resolution of remaining SK fields for clean hover display. */
|
|
264
|
+
type ResolveSkFields<M extends Schema.Top, I, K extends keyof I, Provided, R = undefined> = Omit<IndexSkFields<M, I, K, R>, keyof Provided> extends infer SK ? {
|
|
265
|
+
readonly [P in keyof SK]: SK[P];
|
|
266
|
+
} : never;
|
|
267
|
+
/** Compute entity query accessors for each index (non-primary).
|
|
268
|
+
* Generic over provided input — `.where()` only exposes SK composites NOT already provided.
|
|
269
|
+
* `R` (refs) lets ref-derived composite names (e.g. `playerId`) resolve to their
|
|
270
|
+
* branded identifier types instead of being silently dropped. */
|
|
271
|
+
type EntityIndexAccessors<M extends Schema.Top, I extends Record<string, IndexDefinition>, R = undefined> = {
|
|
272
|
+
readonly [K in Exclude<keyof I, "primary"> & string]: <Provided extends IndexPkInput<M, I, K, R>>(composites: Provided) => import("./internal/BoundQuery.js").BoundQuery<Schema.Schema.Type<M>, ResolveSkFields<M, I, K, Provided, R>, Schema.Schema.Type<M>>;
|
|
273
|
+
};
|
|
274
|
+
/**
|
|
275
|
+
* Pre-bound table operations with resolved table name.
|
|
276
|
+
*/
|
|
277
|
+
export interface TableOperations {
|
|
278
|
+
/** Create the physical DynamoDB table. */
|
|
279
|
+
readonly create: (options?: CreateTableOptions) => Effect.Effect<void, DynamoClientError>;
|
|
280
|
+
/** Delete the physical DynamoDB table. */
|
|
281
|
+
readonly delete: () => Effect.Effect<void, DynamoClientError>;
|
|
282
|
+
/** Describe the table. */
|
|
283
|
+
readonly describe: () => Effect.Effect<DescribeTableCommandOutput, DynamoClientError>;
|
|
284
|
+
/** Update table settings. */
|
|
285
|
+
readonly update: (input: Omit<UpdateTableCommandInput, "TableName">) => Effect.Effect<void, DynamoClientError>;
|
|
286
|
+
/** Create an on-demand backup. */
|
|
287
|
+
readonly backup: (name: string) => Effect.Effect<CreateBackupCommandOutput, DynamoClientError>;
|
|
288
|
+
/** List backups for this table. */
|
|
289
|
+
readonly listBackups: () => Effect.Effect<ListBackupsCommandOutput, DynamoClientError>;
|
|
290
|
+
/** Restore from a backup. */
|
|
291
|
+
readonly restoreFromBackup: (backupArn: string) => Effect.Effect<RestoreTableFromBackupCommandOutput, DynamoClientError>;
|
|
292
|
+
/** Enable point-in-time recovery. */
|
|
293
|
+
readonly enablePointInTimeRecovery: () => Effect.Effect<void, DynamoClientError>;
|
|
294
|
+
/** Disable point-in-time recovery. */
|
|
295
|
+
readonly disablePointInTimeRecovery: () => Effect.Effect<void, DynamoClientError>;
|
|
296
|
+
/** Restore to a point in time. */
|
|
297
|
+
readonly restoreToPointInTime: (timestamp: Date) => Effect.Effect<RestoreTableToPointInTimeCommandOutput, DynamoClientError>;
|
|
298
|
+
/** Export table to S3. */
|
|
299
|
+
readonly exportToS3: (s3Bucket: string, options?: {
|
|
300
|
+
readonly s3Prefix?: string;
|
|
301
|
+
readonly exportFormat?: "DYNAMODB_JSON" | "ION";
|
|
302
|
+
}) => Effect.Effect<ExportTableToPointInTimeCommandOutput, DynamoClientError>;
|
|
303
|
+
/** Enable TTL on an attribute. */
|
|
304
|
+
readonly enableTTL: (attributeName: string) => Effect.Effect<void, DynamoClientError>;
|
|
305
|
+
/** Disable TTL on an attribute. */
|
|
306
|
+
readonly disableTTL: (attributeName: string) => Effect.Effect<void, DynamoClientError>;
|
|
307
|
+
/** Describe TTL settings. */
|
|
308
|
+
readonly describeTTL: () => Effect.Effect<DescribeTimeToLiveCommandOutput, DynamoClientError>;
|
|
309
|
+
/** Tag this table. */
|
|
310
|
+
readonly tag: (tags: Record<string, string>) => Effect.Effect<void, DynamoClientError>;
|
|
311
|
+
/** Remove tags from this table. */
|
|
312
|
+
readonly untag: (tagKeys: ReadonlyArray<string>) => Effect.Effect<void, DynamoClientError>;
|
|
313
|
+
/** List tags on this table. */
|
|
314
|
+
readonly tags: () => Effect.Effect<ListTagsOfResourceCommandOutput, DynamoClientError>;
|
|
315
|
+
}
|
|
316
|
+
export {};
|
|
317
|
+
//# sourceMappingURL=DynamoClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DynamoClient.d.ts","sourceRoot":"","sources":["../src/DynamoClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,wBAAwB,EACxB,yBAAyB,EACzB,0BAA0B,EAC1B,2BAA2B,EAC3B,wBAAwB,EACxB,yBAAyB,EACzB,uBAAuB,EACvB,wBAAwB,EACxB,wBAAwB,EACxB,yBAAyB,EACzB,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,wBAAwB,EACxB,qCAAqC,EACrC,sCAAsC,EACtC,0BAA0B,EAC1B,2BAA2B,EAC3B,yBAAyB,EACzB,0BAA0B,EAC1B,8BAA8B,EAC9B,+BAA+B,EAC/B,oCAAoC,EACpC,qCAAqC,EACrC,mBAAmB,EACnB,oBAAoB,EACpB,uBAAuB,EACvB,wBAAwB,EACxB,sBAAsB,EACtB,uBAAuB,EACvB,8BAA8B,EAC9B,+BAA+B,EAC/B,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,kCAAkC,EAClC,mCAAmC,EACnC,qCAAqC,EACrC,sCAAsC,EACtC,gBAAgB,EAChB,iBAAiB,EACjB,uBAAuB,EACvB,wBAAwB,EACxB,4BAA4B,EAC5B,6BAA6B,EAC7B,8BAA8B,EAC9B,+BAA+B,EAC/B,yBAAyB,EACzB,0BAA0B,EAC1B,mCAAmC,EACnC,oCAAoC,EACpC,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,wBAAwB,EACxB,4BAA4B,EAC5B,6BAA6B,EAC9B,MAAM,0BAA0B,CAAA;AAiCjC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,K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