@infra-blocks/aws-dynamodb 0.59.0 → 0.60.0-alpha.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/lib/cjs/client.d.ts +3 -6
- package/lib/cjs/client.js +4 -6
- package/lib/cjs/client.js.map +1 -1
- package/lib/cjs/commands/command/base.d.ts +34 -0
- package/lib/cjs/commands/command/base.js +31 -0
- package/lib/cjs/commands/command/base.js.map +1 -0
- package/lib/cjs/commands/command/codecs/update-time-to-live.d.ts +6 -0
- package/lib/cjs/commands/command/codecs/update-time-to-live.js +10 -0
- package/lib/cjs/commands/command/codecs/update-time-to-live.js.map +1 -0
- package/lib/cjs/commands/command/command.d.ts +9 -34
- package/lib/cjs/commands/command/command.js +1 -28
- package/lib/cjs/commands/command/command.js.map +1 -1
- package/lib/cjs/commands/command/create-table.d.ts +1 -1
- package/lib/cjs/commands/command/create-table.js +2 -2
- package/lib/cjs/commands/command/create-table.js.map +1 -1
- package/lib/cjs/commands/command/delete-item.d.ts +1 -1
- package/lib/cjs/commands/command/delete-item.js +2 -2
- package/lib/cjs/commands/command/delete-item.js.map +1 -1
- package/lib/cjs/commands/command/delete-table.d.ts +1 -1
- package/lib/cjs/commands/command/delete-table.js +2 -2
- package/lib/cjs/commands/command/delete-table.js.map +1 -1
- package/lib/cjs/commands/command/get-item.d.ts +1 -1
- package/lib/cjs/commands/command/get-item.js +2 -2
- package/lib/cjs/commands/command/get-item.js.map +1 -1
- package/lib/cjs/commands/command/index.d.ts +3 -1
- package/lib/cjs/commands/command/index.js +3 -1
- package/lib/cjs/commands/command/index.js.map +1 -1
- package/lib/cjs/commands/command/inputs/index.d.ts +1 -0
- package/lib/cjs/commands/command/inputs/update-time-to-live.d.ts +7 -0
- package/lib/cjs/commands/command/inputs/update-time-to-live.js +13 -0
- package/lib/cjs/commands/command/inputs/update-time-to-live.js.map +1 -0
- package/lib/cjs/commands/command/outputs/index.d.ts +1 -0
- package/lib/cjs/commands/command/outputs/update-time-to-live.d.ts +3 -0
- package/lib/cjs/commands/command/outputs/update-time-to-live.js +7 -0
- package/lib/cjs/commands/command/outputs/update-time-to-live.js.map +1 -0
- package/lib/cjs/commands/command/put-item.d.ts +1 -1
- package/lib/cjs/commands/command/put-item.js +2 -2
- package/lib/cjs/commands/command/put-item.js.map +1 -1
- package/lib/cjs/commands/command/query.d.ts +1 -1
- package/lib/cjs/commands/command/query.js +2 -2
- package/lib/cjs/commands/command/query.js.map +1 -1
- package/lib/cjs/commands/command/update-item.d.ts +1 -1
- package/lib/cjs/commands/command/update-item.js +2 -2
- package/lib/cjs/commands/command/update-item.js.map +1 -1
- package/lib/cjs/commands/command/update-time-to-live.d.ts +7 -0
- package/lib/cjs/commands/command/update-time-to-live.js +17 -0
- package/lib/cjs/commands/command/update-time-to-live.js.map +1 -0
- package/lib/cjs/commands/index.d.ts +0 -1
- package/lib/esm/client.d.ts +3 -6
- package/lib/esm/client.js +5 -7
- package/lib/esm/client.js.map +1 -1
- package/lib/esm/commands/command/base.d.ts +34 -0
- package/lib/esm/commands/command/base.js +27 -0
- package/lib/esm/commands/command/base.js.map +1 -0
- package/lib/esm/commands/command/codecs/update-time-to-live.d.ts +6 -0
- package/lib/esm/commands/command/codecs/update-time-to-live.js +7 -0
- package/lib/esm/commands/command/codecs/update-time-to-live.js.map +1 -0
- package/lib/esm/commands/command/command.d.ts +9 -34
- package/lib/esm/commands/command/command.js +2 -26
- package/lib/esm/commands/command/command.js.map +1 -1
- package/lib/esm/commands/command/create-table.d.ts +1 -1
- package/lib/esm/commands/command/create-table.js +1 -1
- package/lib/esm/commands/command/create-table.js.map +1 -1
- package/lib/esm/commands/command/delete-item.d.ts +1 -1
- package/lib/esm/commands/command/delete-item.js +1 -1
- package/lib/esm/commands/command/delete-item.js.map +1 -1
- package/lib/esm/commands/command/delete-table.d.ts +1 -1
- package/lib/esm/commands/command/delete-table.js +1 -1
- package/lib/esm/commands/command/delete-table.js.map +1 -1
- package/lib/esm/commands/command/get-item.d.ts +1 -1
- package/lib/esm/commands/command/get-item.js +1 -1
- package/lib/esm/commands/command/get-item.js.map +1 -1
- package/lib/esm/commands/command/index.d.ts +3 -1
- package/lib/esm/commands/command/index.js +1 -0
- package/lib/esm/commands/command/index.js.map +1 -1
- package/lib/esm/commands/command/inputs/index.d.ts +1 -0
- package/lib/esm/commands/command/inputs/update-time-to-live.d.ts +7 -0
- package/lib/esm/commands/command/inputs/update-time-to-live.js +10 -0
- package/lib/esm/commands/command/inputs/update-time-to-live.js.map +1 -0
- package/lib/esm/commands/command/outputs/index.d.ts +1 -0
- package/lib/esm/commands/command/outputs/update-time-to-live.d.ts +3 -0
- package/lib/esm/commands/command/outputs/update-time-to-live.js +4 -0
- package/lib/esm/commands/command/outputs/update-time-to-live.js.map +1 -0
- package/lib/esm/commands/command/put-item.d.ts +1 -1
- package/lib/esm/commands/command/put-item.js +1 -1
- package/lib/esm/commands/command/put-item.js.map +1 -1
- package/lib/esm/commands/command/query.d.ts +1 -1
- package/lib/esm/commands/command/query.js +1 -1
- package/lib/esm/commands/command/query.js.map +1 -1
- package/lib/esm/commands/command/update-item.d.ts +1 -1
- package/lib/esm/commands/command/update-item.js +1 -1
- package/lib/esm/commands/command/update-item.js.map +1 -1
- package/lib/esm/commands/command/update-time-to-live.d.ts +7 -0
- package/lib/esm/commands/command/update-time-to-live.js +13 -0
- package/lib/esm/commands/command/update-time-to-live.js.map +1 -0
- package/lib/esm/commands/index.d.ts +0 -1
- package/package.json +1 -1
- package/lib/cjs/commands/command/commands.d.ts +0 -8
- package/lib/cjs/commands/command/commands.js +0 -4
- package/lib/cjs/commands/command/commands.js.map +0 -1
- package/lib/cjs/commands/update-time-to-live.d.ts +0 -16
- package/lib/cjs/commands/update-time-to-live.js +0 -32
- package/lib/cjs/commands/update-time-to-live.js.map +0 -1
- package/lib/esm/commands/command/commands.d.ts +0 -8
- package/lib/esm/commands/command/commands.js +0 -3
- package/lib/esm/commands/command/commands.js.map +0 -1
- package/lib/esm/commands/update-time-to-live.d.ts +0 -16
- package/lib/esm/commands/update-time-to-live.js +0 -28
- package/lib/esm/commands/update-time-to-live.js.map +0 -1
package/lib/esm/client.d.ts
CHANGED
|
@@ -3,10 +3,7 @@ import type { TranslateConfig } from "@aws-sdk/lib-dynamodb";
|
|
|
3
3
|
import { DynamoDBDocumentClient } from "@aws-sdk/lib-dynamodb";
|
|
4
4
|
import type { Logger } from "@infra-blocks/logger-interface";
|
|
5
5
|
import { type Retry, type RetryConfig } from "@infra-blocks/retry";
|
|
6
|
-
import type
|
|
7
|
-
import type { DynamoDbClientCommand } from "./commands/command/commands.js";
|
|
8
|
-
import { type CreateTableInput, type CreateTableOutput, type DeleteItemInput, type DeleteItemOutput, type DeleteTableInput, type DeleteTableOutput, type GetItemInput, type GetItemOutput, type PutItemInput, type PutItemOutput, type QueryInput, type QueryOutput, type UpdateItemInput } from "./commands/index.js";
|
|
9
|
-
import { type UpdateTimeToLiveParams } from "./commands/update-time-to-live.js";
|
|
6
|
+
import { type CommandOutput, type CreateTableInput, type CreateTableOutput, type DeleteItemInput, type DeleteItemOutput, type DeleteTableInput, type DeleteTableOutput, type DynamoDbClientCommand, type GetItemInput, type GetItemOutput, type PutItemInput, type PutItemOutput, type QueryInput, type QueryOutput, type UpdateItemInput, type UpdateTimeToLiveInput, type UpdateTimeToLiveOutput } from "./commands/index.js";
|
|
10
7
|
import { type WriteTransactionParams } from "./commands/write-transaction.js";
|
|
11
8
|
import type { Attributes, KeyAttributes, KeySchema } from "./types.js";
|
|
12
9
|
/**
|
|
@@ -189,11 +186,11 @@ export declare class DynamoDbClient {
|
|
|
189
186
|
/**
|
|
190
187
|
* Updates the time to live settings of a table using the UpdateTimeToLive API.
|
|
191
188
|
*
|
|
192
|
-
* @param
|
|
189
|
+
* @param input - The parameters to use to update the time to live settings.
|
|
193
190
|
*
|
|
194
191
|
* @see https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateTimeToLive.html
|
|
195
192
|
*/
|
|
196
|
-
updateTimeToLive(
|
|
193
|
+
updateTimeToLive(input: UpdateTimeToLiveInput): Promise<UpdateTimeToLiveOutput>;
|
|
197
194
|
/**
|
|
198
195
|
* Executes a write transaction using the TransactWriteItems API.
|
|
199
196
|
*
|
package/lib/esm/client.js
CHANGED
|
@@ -3,8 +3,7 @@ import { DynamoDBDocumentClient } from "@aws-sdk/lib-dynamodb";
|
|
|
3
3
|
import { NullLogger } from "@infra-blocks/null-logger";
|
|
4
4
|
import { retry } from "@infra-blocks/retry";
|
|
5
5
|
import { trusted } from "@infra-blocks/types";
|
|
6
|
-
import { CreateTable, DeleteItem, DeleteTable, GetItem, PutItem, Query, UpdateItem, } from "./commands/index.js";
|
|
7
|
-
import { UpdateTimeToLive, } from "./commands/update-time-to-live.js";
|
|
6
|
+
import { CreateTable, DeleteItem, DeleteTable, GetItem, PutItem, Query, UpdateItem, UpdateTimeToLive, } from "./commands/index.js";
|
|
8
7
|
import { WriteTransaction, } from "./commands/write-transaction.js";
|
|
9
8
|
import { TooManyItemsException } from "./error.js";
|
|
10
9
|
/**
|
|
@@ -241,16 +240,15 @@ export class DynamoDbClient {
|
|
|
241
240
|
/**
|
|
242
241
|
* Updates the time to live settings of a table using the UpdateTimeToLive API.
|
|
243
242
|
*
|
|
244
|
-
* @param
|
|
243
|
+
* @param input - The parameters to use to update the time to live settings.
|
|
245
244
|
*
|
|
246
245
|
* @see https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateTimeToLive.html
|
|
247
246
|
*/
|
|
248
|
-
async updateTimeToLive(
|
|
247
|
+
async updateTimeToLive(input) {
|
|
249
248
|
if (this.logger.isDebugEnabled()) {
|
|
250
|
-
this.logger.debug("updateTimeToLive(%s)", JSON.stringify(
|
|
249
|
+
this.logger.debug("updateTimeToLive(%s)", JSON.stringify(input));
|
|
251
250
|
}
|
|
252
|
-
|
|
253
|
-
await this.client.send(command.toAwsCommand());
|
|
251
|
+
return this.send(new UpdateTimeToLive(input));
|
|
254
252
|
}
|
|
255
253
|
/**
|
|
256
254
|
* Executes a write transaction using the TransactWriteItems API.
|
package/lib/esm/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAgC,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAgC,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAEL,WAAW,EAGX,UAAU,EAGV,WAAW,EAIX,OAAO,EAGP,OAAO,EAGP,KAAK,EAGL,UAAU,EAEV,gBAAgB,GAGjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,gBAAgB,GAEjB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAuCnD;;;GAGG;AACH,MAAM,OAAO,cAAc;IACR,MAAM,CAAyB;IAC/B,MAAM,CAAS;IAEhC,YAAoB,MAGnB;QACC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;QAClC,IAAI,CAAC,MAAM,GAAG,MA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AI,CAAC,MAAM,CAAC,CAAC,YAAY,EAAE,CAAC,CAAC;IACvE,CAAC;IAED;;OAEG;IACH,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC;IAEtB;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,IAAI,CAAC,MAGX;QACC,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,UAAU,CAAC,MAAM,EAAE,EAAE,GAAG,MAAM,CAAC;QACxD,OAAO,IAAI,cAAc,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAChD,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,MAAM,CAAC,MAAM,CAAC,MAAqB;QACjC,MAAM,CAAC,GAAG,MAAM,IAAI,EAAE,CAAC;QACvB,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC;QACrB,MAAM,QAAQ,GAAG,IAAI,cAAc,CAAC,CAAC,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC;QACtD,MAAM,MAAM,GAAG,sBAAsB,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC;QACjE,OAAO,cAAc,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACjD,CAAC;CACF"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/** biome-ignore-all lint/suspicious/noExplicitAny: The lib-dynamodb's own types don't compile with their interface.
|
|
2
|
+
* For example, pick any command they offer. None of them are assignable to
|
|
3
|
+
* Parameters<DynamoDBDocumentClient["send"]>[0]. This issue is transitive and makes it very hard to express
|
|
4
|
+
* generic constraints based on their command types, or their client's interface, because they don't work with
|
|
5
|
+
* each other trolololol. Hence, we use `any` where necessary as an escape hatch to this typing nightmare.
|
|
6
|
+
*/
|
|
7
|
+
import type { CreateTableCommand, DeleteTableCommand, UpdateTimeToLiveCommand } from "@aws-sdk/client-dynamodb";
|
|
8
|
+
import type { DeleteCommand, DynamoDBDocumentClient, GetCommand, PutCommand, QueryCommand, UpdateCommand } from "@aws-sdk/lib-dynamodb";
|
|
9
|
+
import type { GetOutputType } from "@smithy/types";
|
|
10
|
+
import type { Codec } from "./codecs/codec.js";
|
|
11
|
+
type NativeCommand = DeleteCommand | GetCommand | CreateTableCommand | DeleteTableCommand | PutCommand | QueryCommand | UpdateCommand | UpdateTimeToLiveCommand;
|
|
12
|
+
type NativeCommandCtor<C extends NativeCommand> = new (input: C["input"]) => C;
|
|
13
|
+
export type CommandOutput<C extends Command<unknown, unknown>> = Awaited<ReturnType<C["execute"]>>;
|
|
14
|
+
export type CommandInput<C extends Command<unknown, unknown>> = C["input"];
|
|
15
|
+
export type Command<I, O> = {
|
|
16
|
+
readonly input: I;
|
|
17
|
+
execute(params: {
|
|
18
|
+
client: DynamoDBDocumentClient;
|
|
19
|
+
}): Promise<O>;
|
|
20
|
+
};
|
|
21
|
+
export declare abstract class AbstractCommand<I extends object, O extends object, C extends NativeCommand> implements Command<I, O> {
|
|
22
|
+
readonly input: I;
|
|
23
|
+
protected readonly codec: Codec<I, O, C["input"], GetOutputType<C>>;
|
|
24
|
+
protected readonly command: NativeCommandCtor<C>;
|
|
25
|
+
protected constructor(params: {
|
|
26
|
+
input: I;
|
|
27
|
+
codec: Codec<I, O, C["input"], GetOutputType<C>>;
|
|
28
|
+
command: NativeCommandCtor<C>;
|
|
29
|
+
});
|
|
30
|
+
execute(params: {
|
|
31
|
+
client: DynamoDBDocumentClient;
|
|
32
|
+
}): Promise<O>;
|
|
33
|
+
}
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** biome-ignore-all lint/suspicious/noExplicitAny: The lib-dynamodb's own types don't compile with their interface.
|
|
2
|
+
* For example, pick any command they offer. None of them are assignable to
|
|
3
|
+
* Parameters<DynamoDBDocumentClient["send"]>[0]. This issue is transitive and makes it very hard to express
|
|
4
|
+
* generic constraints based on their command types, or their client's interface, because they don't work with
|
|
5
|
+
* each other trolololol. Hence, we use `any` where necessary as an escape hatch to this typing nightmare.
|
|
6
|
+
*/
|
|
7
|
+
import { trusted } from "@infra-blocks/types";
|
|
8
|
+
// Not exported.
|
|
9
|
+
export class AbstractCommand {
|
|
10
|
+
input;
|
|
11
|
+
codec;
|
|
12
|
+
command;
|
|
13
|
+
constructor(params) {
|
|
14
|
+
const { input, codec, command } = params;
|
|
15
|
+
this.input = input;
|
|
16
|
+
this.codec = codec;
|
|
17
|
+
this.command = command;
|
|
18
|
+
}
|
|
19
|
+
async execute(params) {
|
|
20
|
+
const { client } = params;
|
|
21
|
+
const commandInput = this.codec.encode(this.input);
|
|
22
|
+
const command = new this.command(commandInput);
|
|
23
|
+
const commandOutput = await client.send(command);
|
|
24
|
+
return this.codec.decode(trusted(commandOutput));
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../../../src/commands/command/base.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAeH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AA4B9C,gBAAgB;AAChB,MAAM,OAAgB,eAAe;IAM1B,KAAK,CAAI;IAEC,KAAK,CAA4C;IACjD,OAAO,CAAuB;IAEjD,YAAsB,MAIrB;QACC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;QACzC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,MAA0C;QACtD,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;QAC1B,MAAM,YAAY,GAAe,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC/D,MAAM,OAAO,GAAG,IAAI,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QAC/C,MAAM,aAAa,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,OAAc,CAAC,CAAC;QACxD,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC;IACnD,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-time-to-live.js","sourceRoot":"","sources":["../../../../../src/commands/command/codecs/update-time-to-live.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,mCAAmC,CAAC;AAE3D,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,MAAM;IACN,MAAM;CACP,CAAC"}
|
|
@@ -1,34 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import type {
|
|
8
|
-
import type {
|
|
9
|
-
|
|
10
|
-
import type { Codec } from "./codecs/codec.js";
|
|
11
|
-
type NativeCommand = DeleteCommand | GetCommand | CreateTableCommand | DeleteTableCommand | PutCommand | QueryCommand | UpdateCommand;
|
|
12
|
-
type NativeCommandCtor<C extends NativeCommand> = new (input: C["input"]) => C;
|
|
13
|
-
export type CommandOutput<C extends Command<unknown, unknown>> = Awaited<ReturnType<C["execute"]>>;
|
|
14
|
-
export type CommandInput<C extends Command<unknown, unknown>> = C["input"];
|
|
15
|
-
export type Command<I, O> = {
|
|
16
|
-
readonly input: I;
|
|
17
|
-
execute(params: {
|
|
18
|
-
client: DynamoDBDocumentClient;
|
|
19
|
-
}): Promise<O>;
|
|
20
|
-
};
|
|
21
|
-
export declare abstract class AbstractCommand<I extends object, O extends object, C extends NativeCommand> implements Command<I, O> {
|
|
22
|
-
readonly input: I;
|
|
23
|
-
protected readonly codec: Codec<I, O, C["input"], GetOutputType<C>>;
|
|
24
|
-
protected readonly command: NativeCommandCtor<C>;
|
|
25
|
-
protected constructor(params: {
|
|
26
|
-
input: I;
|
|
27
|
-
codec: Codec<I, O, C["input"], GetOutputType<C>>;
|
|
28
|
-
command: NativeCommandCtor<C>;
|
|
29
|
-
});
|
|
30
|
-
execute(params: {
|
|
31
|
-
client: DynamoDBDocumentClient;
|
|
32
|
-
}): Promise<O>;
|
|
33
|
-
}
|
|
34
|
-
export {};
|
|
1
|
+
import type { CreateTable } from "./create-table.js";
|
|
2
|
+
import type { DeleteItem } from "./delete-item.js";
|
|
3
|
+
import type { DeleteTable } from "./delete-table.js";
|
|
4
|
+
import type { GetItem } from "./get-item.js";
|
|
5
|
+
import type { PutItem } from "./put-item.js";
|
|
6
|
+
import type { Query } from "./query.js";
|
|
7
|
+
import type { UpdateItem } from "./update-item.js";
|
|
8
|
+
import type { UpdateTimeToLive } from "./update-time-to-live.js";
|
|
9
|
+
export type DynamoDbClientCommand = DeleteItem | GetItem | CreateTable | DeleteTable | PutItem | Query | UpdateItem | UpdateTimeToLive;
|
|
@@ -1,27 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* Parameters<DynamoDBDocumentClient["send"]>[0]. This issue is transitive and makes it very hard to express
|
|
4
|
-
* generic constraints based on their command types, or their client's interface, because they don't work with
|
|
5
|
-
* each other trolololol. Hence, we use `any` where necessary as an escape hatch to this typing nightmare.
|
|
6
|
-
*/
|
|
7
|
-
import { trusted } from "@infra-blocks/types";
|
|
8
|
-
// Not exported.
|
|
9
|
-
export class AbstractCommand {
|
|
10
|
-
input;
|
|
11
|
-
codec;
|
|
12
|
-
command;
|
|
13
|
-
constructor(params) {
|
|
14
|
-
const { input, codec, command } = params;
|
|
15
|
-
this.input = input;
|
|
16
|
-
this.codec = codec;
|
|
17
|
-
this.command = command;
|
|
18
|
-
}
|
|
19
|
-
async execute(params) {
|
|
20
|
-
const { client } = params;
|
|
21
|
-
const commandInput = this.codec.encode(this.input);
|
|
22
|
-
const command = new this.command(commandInput);
|
|
23
|
-
const commandOutput = await client.send(command);
|
|
24
|
-
return this.codec.decode(trusted(commandOutput));
|
|
25
|
-
}
|
|
26
|
-
}
|
|
1
|
+
export {};
|
|
2
|
+
// TODO: runtime checks with instanceof checks
|
|
27
3
|
//# sourceMappingURL=command.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.js","sourceRoot":"","sources":["../../../../src/commands/command/command.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"command.js","sourceRoot":"","sources":["../../../../src/commands/command/command.ts"],"names":[],"mappings":";AAmBA,8CAA8C"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CreateTableCommand } from "@aws-sdk/client-dynamodb";
|
|
2
2
|
import type { KeySchema } from "../../types.js";
|
|
3
|
-
import { AbstractCommand } from "./
|
|
3
|
+
import { AbstractCommand } from "./base.js";
|
|
4
4
|
import type { CreateTableInput } from "./inputs/create-table.js";
|
|
5
5
|
import type { CreateTableOutput } from "./outputs/create-table.js";
|
|
6
6
|
export declare class CreateTable<KS extends KeySchema = KeySchema> extends AbstractCommand<CreateTableInput<KS>, CreateTableOutput, CreateTableCommand> {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CreateTableCommand } from "@aws-sdk/client-dynamodb";
|
|
2
|
+
import { AbstractCommand } from "./base.js";
|
|
2
3
|
import { CreateTableCodec } from "./codecs/create-table.js";
|
|
3
|
-
import { AbstractCommand } from "./command.js";
|
|
4
4
|
export class CreateTable extends AbstractCommand {
|
|
5
5
|
constructor(input) {
|
|
6
6
|
super({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-table.js","sourceRoot":"","sources":["../../../../src/commands/command/create-table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"create-table.js","sourceRoot":"","sources":["../../../../src/commands/command/create-table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAI5D,MAAM,OAAO,WAEX,SAAQ,eAIT;IACC,YAAY,KAA2B;QACrC,KAAK,CAAC;YACJ,KAAK;YACL,KAAK,EAAE,gBAAgB;YACvB,OAAO,EAAE,kBAAkB;SAC5B,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DeleteCommand } from "@aws-sdk/lib-dynamodb";
|
|
2
2
|
import type { Attributes, KeyAttributes } from "../../types.js";
|
|
3
|
-
import { AbstractCommand } from "./
|
|
3
|
+
import { AbstractCommand } from "./base.js";
|
|
4
4
|
import type { DeleteItemInput } from "./inputs/delete-item.js";
|
|
5
5
|
import type { DeleteItemOutput } from "./outputs/delete-item.js";
|
|
6
6
|
export declare class DeleteItem<T extends Attributes = Attributes, K extends KeyAttributes = KeyAttributes> extends AbstractCommand<DeleteItemInput<K>, DeleteItemOutput<T>, DeleteCommand> {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DeleteCommand } from "@aws-sdk/lib-dynamodb";
|
|
2
|
+
import { AbstractCommand } from "./base.js";
|
|
2
3
|
import { DeleteItemCodec } from "./codecs/delete-item.js";
|
|
3
|
-
import { AbstractCommand } from "./command.js";
|
|
4
4
|
export class DeleteItem extends AbstractCommand {
|
|
5
5
|
constructor(input) {
|
|
6
6
|
super({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-item.js","sourceRoot":"","sources":["../../../../src/commands/command/delete-item.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"delete-item.js","sourceRoot":"","sources":["../../../../src/commands/command/delete-item.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAI1D,MAAM,OAAO,UAGX,SAAQ,eAIT;IACC,YAAY,KAAyB;QACnC,KAAK,CAAC;YACJ,KAAK;YACL,KAAK,EAAE,eAAe;YACtB,OAAO,EAAE,aAAa;SACvB,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DeleteTableCommand } from "@aws-sdk/client-dynamodb";
|
|
2
|
-
import { AbstractCommand } from "./
|
|
2
|
+
import { AbstractCommand } from "./base.js";
|
|
3
3
|
import type { DeleteTableInput } from "./inputs/delete-table.js";
|
|
4
4
|
import type { DeleteTableOutput } from "./outputs/delete-table.js";
|
|
5
5
|
export declare class DeleteTable extends AbstractCommand<DeleteTableInput, DeleteTableOutput, DeleteTableCommand> {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DeleteTableCommand } from "@aws-sdk/client-dynamodb";
|
|
2
|
+
import { AbstractCommand } from "./base.js";
|
|
2
3
|
import { DeleteTableCodec } from "./codecs/delete-table.js";
|
|
3
|
-
import { AbstractCommand } from "./command.js";
|
|
4
4
|
export class DeleteTable extends AbstractCommand {
|
|
5
5
|
constructor(input) {
|
|
6
6
|
super({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-table.js","sourceRoot":"","sources":["../../../../src/commands/command/delete-table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"delete-table.js","sourceRoot":"","sources":["../../../../src/commands/command/delete-table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAI5D,MAAM,OAAO,WAAY,SAAQ,eAIhC;IACC,YAAY,KAAuB;QACjC,KAAK,CAAC;YACJ,KAAK;YACL,KAAK,EAAE,gBAAgB;YACvB,OAAO,EAAE,kBAAkB;SAC5B,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GetCommand } from "@aws-sdk/lib-dynamodb";
|
|
2
2
|
import type { Attributes, KeyAttributes } from "../../types.js";
|
|
3
|
-
import { AbstractCommand } from "./
|
|
3
|
+
import { AbstractCommand } from "./base.js";
|
|
4
4
|
import type { GetItemInput } from "./inputs/get-item.js";
|
|
5
5
|
import type { GetItemOutput } from "./outputs/get-item.js";
|
|
6
6
|
export declare class GetItem<T extends Attributes = Attributes, K extends KeyAttributes = KeyAttributes> extends AbstractCommand<GetItemInput<K>, GetItemOutput<T>, GetCommand> {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GetCommand } from "@aws-sdk/lib-dynamodb";
|
|
2
|
+
import { AbstractCommand } from "./base.js";
|
|
2
3
|
import { GetItemCodec } from "./codecs/get-item.js";
|
|
3
|
-
import { AbstractCommand } from "./command.js";
|
|
4
4
|
export class GetItem extends AbstractCommand {
|
|
5
5
|
constructor(input) {
|
|
6
6
|
super({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-item.js","sourceRoot":"","sources":["../../../../src/commands/command/get-item.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"get-item.js","sourceRoot":"","sources":["../../../../src/commands/command/get-item.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAIpD,MAAM,OAAO,OAGX,SAAQ,eAA8D;IACtE,YAAY,KAAsB;QAChC,KAAK,CAAC;YACJ,KAAK;YACL,KAAK,EAAE,YAAY;YACnB,OAAO,EAAE,UAAU;SACpB,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export type { CommandInput, CommandOutput } from "./
|
|
1
|
+
export type { CommandInput, CommandOutput } from "./base.js";
|
|
2
|
+
export type { DynamoDbClientCommand } from "./command.js";
|
|
2
3
|
export { CreateTable } from "./create-table.js";
|
|
3
4
|
export { DeleteItem } from "./delete-item.js";
|
|
4
5
|
export { DeleteTable } from "./delete-table.js";
|
|
@@ -8,3 +9,4 @@ export * from "./outputs/index.js";
|
|
|
8
9
|
export { PutItem } from "./put-item.js";
|
|
9
10
|
export { Query } from "./query.js";
|
|
10
11
|
export { UpdateItem } from "./update-item.js";
|
|
12
|
+
export { UpdateTimeToLive } from "./update-time-to-live.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/commands/command/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/commands/command/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,+GAA+G;AAC/G,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -5,3 +5,4 @@ export type { GetItemInput } from "./get-item.js";
|
|
|
5
5
|
export type { PutItemInput } from "./put-item.js";
|
|
6
6
|
export type { QueryInput } from "./query.js";
|
|
7
7
|
export type { UpdateItemInput } from "./update-item.js";
|
|
8
|
+
export type { UpdateTimeToLiveInput } from "./update-time-to-live.js";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { UpdateTimeToLiveCommandInput } from "@aws-sdk/client-dynamodb";
|
|
2
|
+
export interface UpdateTimeToLiveInput {
|
|
3
|
+
table: string;
|
|
4
|
+
attribute: string;
|
|
5
|
+
enabled: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function encode(input: UpdateTimeToLiveInput): UpdateTimeToLiveCommandInput;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-time-to-live.js","sourceRoot":"","sources":["../../../../../src/commands/command/inputs/update-time-to-live.ts"],"names":[],"mappings":"AAQA,MAAM,UAAU,MAAM,CACpB,KAA4B;IAE5B,OAAO;QACL,SAAS,EAAE,KAAK,CAAC,KAAK;QACtB,uBAAuB,EAAE;YACvB,aAAa,EAAE,KAAK,CAAC,SAAS;YAC9B,OAAO,EAAE,KAAK,CAAC,OAAO;SACvB;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -5,3 +5,4 @@ export type { GetItemOutput } from "./get-item.js";
|
|
|
5
5
|
export type { PutItemOutput } from "./put-item.js";
|
|
6
6
|
export type { QueryOutput } from "./query.js";
|
|
7
7
|
export type { UpdateItemOutput } from "./update-item.js";
|
|
8
|
+
export type { UpdateTimeToLiveOutput } from "./update-time-to-live.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-time-to-live.js","sourceRoot":"","sources":["../../../../../src/commands/command/outputs/update-time-to-live.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,MAAM,CACpB,CAAgC;IAEhC,OAAO,EAAE,CAAC;AACZ,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PutCommand } from "@aws-sdk/lib-dynamodb";
|
|
2
2
|
import type { Attributes } from "../../types.js";
|
|
3
|
-
import { AbstractCommand } from "./
|
|
3
|
+
import { AbstractCommand } from "./base.js";
|
|
4
4
|
import type { PutItemInput } from "./inputs/put-item.js";
|
|
5
5
|
import type { PutItemOutput } from "./outputs/put-item.js";
|
|
6
6
|
export declare class PutItem<T extends Attributes = Attributes> extends AbstractCommand<PutItemInput<T>, PutItemOutput<T>, PutCommand> {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PutCommand } from "@aws-sdk/lib-dynamodb";
|
|
2
|
+
import { AbstractCommand } from "./base.js";
|
|
2
3
|
import { PutItemCodec } from "./codecs/put-item.js";
|
|
3
|
-
import { AbstractCommand } from "./command.js";
|
|
4
4
|
export class PutItem extends AbstractCommand {
|
|
5
5
|
constructor(input) {
|
|
6
6
|
super({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"put-item.js","sourceRoot":"","sources":["../../../../src/commands/command/put-item.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"put-item.js","sourceRoot":"","sources":["../../../../src/commands/command/put-item.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAIpD,MAAM,OAAO,OAA2C,SAAQ,eAI/D;IACC,YAAY,KAAsB;QAChC,KAAK,CAAC;YACJ,KAAK;YACL,KAAK,EAAE,YAAY;YACnB,OAAO,EAAE,UAAU;SACpB,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { QueryCommand } from "@aws-sdk/lib-dynamodb";
|
|
2
2
|
import type { Attributes, KeyAttributes } from "../../types.js";
|
|
3
|
-
import { AbstractCommand } from "./
|
|
3
|
+
import { AbstractCommand } from "./base.js";
|
|
4
4
|
import type { QueryInput } from "./inputs/query.js";
|
|
5
5
|
import type { QueryOutput } from "./outputs/query.js";
|
|
6
6
|
export declare class Query<T extends Attributes = Attributes, K extends KeyAttributes = KeyAttributes> extends AbstractCommand<QueryInput<K>, QueryOutput<T, K>, QueryCommand> {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { QueryCommand } from "@aws-sdk/lib-dynamodb";
|
|
2
|
+
import { AbstractCommand } from "./base.js";
|
|
2
3
|
import { QueryCodec } from "./codecs/query.js";
|
|
3
|
-
import { AbstractCommand } from "./command.js";
|
|
4
4
|
export class Query extends AbstractCommand {
|
|
5
5
|
constructor(input) {
|
|
6
6
|
super({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.js","sourceRoot":"","sources":["../../../../src/commands/command/query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"query.js","sourceRoot":"","sources":["../../../../src/commands/command/query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAI/C,MAAM,OAAO,KAGX,SAAQ,eAA+D;IACvE,YAAY,KAAoB;QAC9B,KAAK,CAAC;YACJ,KAAK;YACL,KAAK,EAAE,UAAU;YACjB,OAAO,EAAE,YAAY;SACtB,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UpdateCommand } from "@aws-sdk/lib-dynamodb";
|
|
2
2
|
import type { KeyAttributes } from "../../types.js";
|
|
3
|
-
import { AbstractCommand } from "./
|
|
3
|
+
import { AbstractCommand } from "./base.js";
|
|
4
4
|
import type { UpdateItemInput } from "./inputs/update-item.js";
|
|
5
5
|
import type { UpdateItemOutput } from "./outputs/update-item.js";
|
|
6
6
|
export declare class UpdateItem<K extends KeyAttributes = KeyAttributes> extends AbstractCommand<UpdateItemInput<K>, UpdateItemOutput, UpdateCommand> {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UpdateCommand } from "@aws-sdk/lib-dynamodb";
|
|
2
|
+
import { AbstractCommand } from "./base.js";
|
|
2
3
|
import { UpdateItemCodec } from "./codecs/update-item.js";
|
|
3
|
-
import { AbstractCommand } from "./command.js";
|
|
4
4
|
export class UpdateItem extends AbstractCommand {
|
|
5
5
|
constructor(input) {
|
|
6
6
|
super({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-item.js","sourceRoot":"","sources":["../../../../src/commands/command/update-item.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"update-item.js","sourceRoot":"","sources":["../../../../src/commands/command/update-item.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAI1D,MAAM,OAAO,UAEX,SAAQ,eAAoE;IAC5E,YAAY,KAAyB;QACnC,KAAK,CAAC;YACJ,KAAK;YACL,KAAK,EAAE,eAAe;YACtB,OAAO,EAAE,aAAa;SACvB,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { UpdateTimeToLiveCommand } from "@aws-sdk/client-dynamodb";
|
|
2
|
+
import { AbstractCommand } from "./base.js";
|
|
3
|
+
import type { UpdateTimeToLiveInput } from "./inputs/update-time-to-live.js";
|
|
4
|
+
import type { UpdateTimeToLiveOutput } from "./outputs/update-time-to-live.js";
|
|
5
|
+
export declare class UpdateTimeToLive extends AbstractCommand<UpdateTimeToLiveInput, UpdateTimeToLiveOutput, UpdateTimeToLiveCommand> {
|
|
6
|
+
constructor(input: UpdateTimeToLiveInput);
|
|
7
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { UpdateTimeToLiveCommand } from "@aws-sdk/client-dynamodb";
|
|
2
|
+
import { AbstractCommand } from "./base.js";
|
|
3
|
+
import { UpdateTimeToLiveCodec } from "./codecs/update-time-to-live.js";
|
|
4
|
+
export class UpdateTimeToLive extends AbstractCommand {
|
|
5
|
+
constructor(input) {
|
|
6
|
+
super({
|
|
7
|
+
input,
|
|
8
|
+
codec: UpdateTimeToLiveCodec,
|
|
9
|
+
command: UpdateTimeToLiveCommand,
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=update-time-to-live.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-time-to-live.js","sourceRoot":"","sources":["../../../../src/commands/command/update-time-to-live.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAIxE,MAAM,OAAO,gBAAiB,SAAQ,eAIrC;IACC,YAAY,KAA4B;QACtC,KAAK,CAAC;YACJ,KAAK;YACL,KAAK,EAAE,qBAAqB;YAC5B,OAAO,EAAE,uBAAuB;SACjC,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { CreateTable } from "./create-table.js";
|
|
2
|
-
import type { DeleteItem } from "./delete-item.js";
|
|
3
|
-
import type { DeleteTable } from "./delete-table.js";
|
|
4
|
-
import type { GetItem } from "./get-item.js";
|
|
5
|
-
import type { PutItem } from "./put-item.js";
|
|
6
|
-
import type { Query } from "./query.js";
|
|
7
|
-
import type { UpdateItem } from "./update-item.js";
|
|
8
|
-
export type DynamoDbClientCommand = DeleteItem | GetItem | CreateTable | DeleteTable | PutItem | Query | UpdateItem;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"commands.js","sourceRoot":"","sources":["../../../../src/commands/command/commands.ts"],"names":[],"mappings":";;AAiBA,8CAA8C"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { UpdateTimeToLiveCommand, type UpdateTimeToLiveCommandInput } from "@aws-sdk/client-dynamodb";
|
|
2
|
-
import type { Command } from "./types.js";
|
|
3
|
-
export interface UpdateTimeToLiveParams {
|
|
4
|
-
table: string;
|
|
5
|
-
attribute: string;
|
|
6
|
-
enabled: boolean;
|
|
7
|
-
}
|
|
8
|
-
export declare class UpdateTimeToLive implements Command<UpdateTimeToLiveCommandInput, UpdateTimeToLiveCommand> {
|
|
9
|
-
private readonly table;
|
|
10
|
-
private readonly attribute;
|
|
11
|
-
private readonly enabled;
|
|
12
|
-
private constructor();
|
|
13
|
-
toAwsCommandInput(): UpdateTimeToLiveCommandInput;
|
|
14
|
-
toAwsCommand(): UpdateTimeToLiveCommand;
|
|
15
|
-
static from(params: UpdateTimeToLiveParams): UpdateTimeToLive;
|
|
16
|
-
}
|