@infra-blocks/aws-dynamodb 0.54.0 → 0.55.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 +4 -5
- package/lib/cjs/client.js +5 -6
- package/lib/cjs/client.js.map +1 -1
- package/lib/cjs/commands/command/codecs/create-table.d.ts +6 -0
- package/lib/cjs/commands/command/codecs/create-table.js +10 -0
- package/lib/cjs/commands/command/codecs/create-table.js.map +1 -0
- package/lib/cjs/commands/command/command.d.ts +18 -9
- package/lib/cjs/commands/command/command.js +9 -5
- package/lib/cjs/commands/command/command.js.map +1 -1
- package/lib/cjs/commands/command/commands.d.ts +2 -1
- package/lib/cjs/commands/command/commands.js.map +1 -1
- package/lib/cjs/commands/command/create-table.d.ts +8 -0
- package/lib/cjs/commands/command/create-table.js +17 -0
- package/lib/cjs/commands/command/create-table.js.map +1 -0
- package/lib/cjs/commands/command/delete-item.d.ts +3 -3
- package/lib/cjs/commands/command/delete-item.js +1 -1
- package/lib/cjs/commands/command/delete-item.js.map +1 -1
- package/lib/cjs/commands/command/get-item.d.ts +3 -3
- package/lib/cjs/commands/command/get-item.js +1 -1
- package/lib/cjs/commands/command/get-item.js.map +1 -1
- package/lib/cjs/commands/command/index.d.ts +6 -0
- package/lib/cjs/commands/command/index.js +26 -0
- package/lib/cjs/commands/command/index.js.map +1 -0
- package/lib/cjs/commands/command/inputs/create-table.d.ts +7 -5
- package/lib/cjs/commands/command/inputs/create-table.js +75 -0
- package/lib/cjs/commands/command/inputs/create-table.js.map +1 -1
- package/lib/cjs/commands/command/inputs/index.d.ts +1 -0
- package/lib/cjs/commands/command/outputs/create-table.d.ts +3 -0
- package/lib/cjs/commands/command/outputs/create-table.js +7 -0
- package/lib/cjs/commands/command/outputs/create-table.js.map +1 -0
- package/lib/cjs/commands/command/outputs/index.d.ts +1 -0
- package/lib/cjs/commands/index.d.ts +1 -3
- package/lib/cjs/commands/index.js +1 -2
- package/lib/cjs/commands/index.js.map +1 -1
- package/lib/cjs/types.d.ts +2 -2
- package/lib/esm/client.d.ts +4 -5
- package/lib/esm/client.js +5 -6
- package/lib/esm/client.js.map +1 -1
- package/lib/esm/commands/command/codecs/create-table.d.ts +6 -0
- package/lib/esm/commands/command/codecs/create-table.js +7 -0
- package/lib/esm/commands/command/codecs/create-table.js.map +1 -0
- package/lib/esm/commands/command/command.d.ts +18 -9
- package/lib/esm/commands/command/command.js +7 -3
- package/lib/esm/commands/command/command.js.map +1 -1
- package/lib/esm/commands/command/commands.d.ts +2 -1
- package/lib/esm/commands/command/commands.js.map +1 -1
- package/lib/esm/commands/command/create-table.d.ts +8 -0
- package/lib/esm/commands/command/create-table.js +13 -0
- package/lib/esm/commands/command/create-table.js.map +1 -0
- package/lib/esm/commands/command/delete-item.d.ts +3 -3
- package/lib/esm/commands/command/delete-item.js +3 -3
- package/lib/esm/commands/command/delete-item.js.map +1 -1
- package/lib/esm/commands/command/get-item.d.ts +3 -3
- package/lib/esm/commands/command/get-item.js +3 -3
- package/lib/esm/commands/command/get-item.js.map +1 -1
- package/lib/esm/commands/command/index.d.ts +6 -0
- package/lib/esm/commands/command/index.js +6 -0
- package/lib/esm/commands/command/index.js.map +1 -0
- package/lib/esm/commands/command/inputs/create-table.d.ts +7 -5
- package/lib/esm/commands/command/inputs/create-table.js +74 -1
- package/lib/esm/commands/command/inputs/create-table.js.map +1 -1
- package/lib/esm/commands/command/inputs/index.d.ts +1 -0
- package/lib/esm/commands/command/outputs/create-table.d.ts +3 -0
- package/lib/esm/commands/command/outputs/create-table.js +4 -0
- package/lib/esm/commands/command/outputs/create-table.js.map +1 -0
- package/lib/esm/commands/command/outputs/index.d.ts +1 -0
- package/lib/esm/commands/index.d.ts +1 -3
- package/lib/esm/commands/index.js +1 -2
- package/lib/esm/commands/index.js.map +1 -1
- package/lib/esm/types.d.ts +2 -2
- package/package.json +2 -1
- package/lib/cjs/commands/create-table.d.ts +0 -21
- package/lib/cjs/commands/create-table.js +0 -101
- package/lib/cjs/commands/create-table.js.map +0 -1
- package/lib/esm/commands/create-table.d.ts +0 -21
- package/lib/esm/commands/create-table.js +0 -97
- package/lib/esm/commands/create-table.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-table.js","sourceRoot":"","sources":["../../../../../src/commands/command/codecs/create-table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEpD,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,MAAM;IACN,MAAM;CACP,CAAC"}
|
|
@@ -4,19 +4,28 @@
|
|
|
4
4
|
* generic constraints based on their command types, or their client's interface, because they don't work with
|
|
5
5
|
* each other trolololol. Hence, we use any where necessary as an escape hatch to this typing nightmare.
|
|
6
6
|
*/
|
|
7
|
-
import type {
|
|
7
|
+
import type { CreateTableCommand } from "@aws-sdk/client-dynamodb";
|
|
8
|
+
import type { DeleteCommand, DynamoDBDocumentClient, GetCommand } from "@aws-sdk/lib-dynamodb";
|
|
9
|
+
import type { GetOutputType } from "@smithy/types";
|
|
8
10
|
import type { Codec } from "./codecs/codec.js";
|
|
9
|
-
type
|
|
10
|
-
|
|
11
|
-
export type
|
|
12
|
-
export
|
|
11
|
+
type NativeCommand = DeleteCommand | GetCommand | CreateTableCommand;
|
|
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> = {
|
|
13
16
|
readonly input: I;
|
|
14
|
-
|
|
15
|
-
|
|
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>;
|
|
16
25
|
protected constructor(params: {
|
|
17
26
|
input: I;
|
|
18
|
-
codec: Codec<I, O,
|
|
19
|
-
command:
|
|
27
|
+
codec: Codec<I, O, C["input"], GetOutputType<C>>;
|
|
28
|
+
command: NativeCommandCtor<C>;
|
|
20
29
|
});
|
|
21
30
|
execute(params: {
|
|
22
31
|
client: DynamoDBDocumentClient;
|
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
* generic constraints based on their command types, or their client's interface, because they don't work with
|
|
5
5
|
* each other trolololol. Hence, we use any where necessary as an escape hatch to this typing nightmare.
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
import { trusted } from "@infra-blocks/types";
|
|
8
|
+
// Not exported.
|
|
9
|
+
export class AbstractCommand {
|
|
9
10
|
input;
|
|
10
11
|
codec;
|
|
11
12
|
command;
|
|
@@ -17,7 +18,10 @@ export class Command {
|
|
|
17
18
|
}
|
|
18
19
|
async execute(params) {
|
|
19
20
|
const { client } = params;
|
|
20
|
-
|
|
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));
|
|
21
25
|
}
|
|
22
26
|
}
|
|
23
27
|
//# sourceMappingURL=command.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.js","sourceRoot":"","sources":["../../../../src/commands/command/command.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"command.js","sourceRoot":"","sources":["../../../../src/commands/command/command.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAQH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAoB9C,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"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { CreateTable } from "./create-table.js";
|
|
1
2
|
import type { DeleteItem } from "./delete-item.js";
|
|
2
3
|
import type { GetItem } from "./get-item.js";
|
|
3
|
-
export type DynamoDbClientCommand = DeleteItem | GetItem;
|
|
4
|
+
export type DynamoDbClientCommand = DeleteItem | GetItem | CreateTable;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.js","sourceRoot":"","sources":["../../../../src/commands/command/commands.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"commands.js","sourceRoot":"","sources":["../../../../src/commands/command/commands.ts"],"names":[],"mappings":";AAMA,8CAA8C"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CreateTableCommand } from "@aws-sdk/client-dynamodb";
|
|
2
|
+
import type { KeySchema } from "../../types.js";
|
|
3
|
+
import { AbstractCommand } from "./command.js";
|
|
4
|
+
import type { CreateTableInput } from "./inputs/create-table.js";
|
|
5
|
+
import type { CreateTableOutput } from "./outputs/create-table.js";
|
|
6
|
+
export declare class CreateTable<KS extends KeySchema = KeySchema> extends AbstractCommand<CreateTableInput<KS>, CreateTableOutput, CreateTableCommand> {
|
|
7
|
+
constructor(input: CreateTableInput<KS>);
|
|
8
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CreateTableCommand } from "@aws-sdk/client-dynamodb";
|
|
2
|
+
import { CreateTableCodec } from "./codecs/create-table.js";
|
|
3
|
+
import { AbstractCommand } from "./command.js";
|
|
4
|
+
export class CreateTable extends AbstractCommand {
|
|
5
|
+
constructor(input) {
|
|
6
|
+
super({
|
|
7
|
+
input,
|
|
8
|
+
codec: CreateTableCodec,
|
|
9
|
+
command: CreateTableCommand,
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=create-table.js.map
|
|
@@ -0,0 +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,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAI/C,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,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DeleteCommand } from "@aws-sdk/lib-dynamodb";
|
|
2
2
|
import type { Attributes, KeyAttributes } from "../../types.js";
|
|
3
|
-
import {
|
|
3
|
+
import { AbstractCommand } from "./command.js";
|
|
4
4
|
import type { DeleteItemInput } from "./inputs/delete-item.js";
|
|
5
5
|
import type { DeleteItemOutput } from "./outputs/delete-item.js";
|
|
6
|
-
export declare class DeleteItem<T extends Attributes = Attributes, K extends KeyAttributes = KeyAttributes> extends
|
|
6
|
+
export declare class DeleteItem<T extends Attributes = Attributes, K extends KeyAttributes = KeyAttributes> extends AbstractCommand<DeleteItemInput<K>, DeleteItemOutput<T>, DeleteCommand> {
|
|
7
7
|
constructor(input: DeleteItemInput<K>);
|
|
8
8
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DeleteCommand
|
|
1
|
+
import { DeleteCommand } from "@aws-sdk/lib-dynamodb";
|
|
2
2
|
import { DeleteItemCodec } from "./codecs/delete-item.js";
|
|
3
|
-
import {
|
|
4
|
-
export class DeleteItem extends
|
|
3
|
+
import { AbstractCommand } from "./command.js";
|
|
4
|
+
export class DeleteItem extends AbstractCommand {
|
|
5
5
|
constructor(input) {
|
|
6
6
|
super({
|
|
7
7
|
input,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-item.js","sourceRoot":"","sources":["../../../../src/commands/command/delete-item.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
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,yBAAyB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAI/C,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,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GetCommand } from "@aws-sdk/lib-dynamodb";
|
|
2
2
|
import type { Attributes, KeyAttributes } from "../../types.js";
|
|
3
|
-
import {
|
|
3
|
+
import { AbstractCommand } from "./command.js";
|
|
4
4
|
import type { GetItemInput } from "./inputs/get-item.js";
|
|
5
5
|
import type { GetItemOutput } from "./outputs/get-item.js";
|
|
6
|
-
export declare class GetItem<T extends Attributes = Attributes, K extends KeyAttributes = KeyAttributes> extends
|
|
6
|
+
export declare class GetItem<T extends Attributes = Attributes, K extends KeyAttributes = KeyAttributes> extends AbstractCommand<GetItemInput<K>, GetItemOutput<T>, GetCommand> {
|
|
7
7
|
constructor(input: GetItemInput<K>);
|
|
8
8
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { GetCommand
|
|
1
|
+
import { GetCommand } from "@aws-sdk/lib-dynamodb";
|
|
2
2
|
import { GetItemCodec } from "./codecs/get-item.js";
|
|
3
|
-
import {
|
|
4
|
-
export class GetItem extends
|
|
3
|
+
import { AbstractCommand } from "./command.js";
|
|
4
|
+
export class GetItem extends AbstractCommand {
|
|
5
5
|
constructor(input) {
|
|
6
6
|
super({
|
|
7
7
|
input,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-item.js","sourceRoot":"","sources":["../../../../src/commands/command/get-item.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
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,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAI/C,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"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type { CommandInput, CommandOutput } from "./command.js";
|
|
2
|
+
export { CreateTable } from "./create-table.js";
|
|
3
|
+
export { DeleteItem } from "./delete-item.js";
|
|
4
|
+
export { GetItem } from "./get-item.js";
|
|
5
|
+
export * from "./inputs/index.js";
|
|
6
|
+
export * from "./outputs/index.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/commands/command/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
1
|
+
import type { CreateTableCommandInput } from "@aws-sdk/client-dynamodb";
|
|
2
|
+
import type { KeySchema } from "../../../types.js";
|
|
3
|
+
export interface CreateTableInput<KS extends KeySchema = KeySchema> {
|
|
3
4
|
name: string;
|
|
4
|
-
|
|
5
|
-
gsis?: Record<string,
|
|
6
|
-
lsis?: Record<string,
|
|
5
|
+
keySchema: KS;
|
|
6
|
+
gsis?: Record<string, KeySchema>;
|
|
7
|
+
lsis?: Record<string, KeySchema>;
|
|
7
8
|
}
|
|
9
|
+
export declare function encode<Def extends KeySchema = KeySchema>(input: CreateTableInput<Def>): CreateTableCommandInput;
|
|
@@ -1,2 +1,75 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export function encode(input) {
|
|
2
|
+
const attributeDefinitions = new Map();
|
|
3
|
+
const primaryKeySchema = encodeKeySchema({
|
|
4
|
+
attributeDefinitions,
|
|
5
|
+
key: input.keySchema,
|
|
6
|
+
});
|
|
7
|
+
const globalSecondaryIndexes = encodeGsis(attributeDefinitions, input.gsis);
|
|
8
|
+
const localSecondaryIndexes = encodeLsis(attributeDefinitions, input.lsis);
|
|
9
|
+
return {
|
|
10
|
+
AttributeDefinitions: [...attributeDefinitions.entries()].map(([name, type]) => ({
|
|
11
|
+
AttributeName: name,
|
|
12
|
+
AttributeType: type,
|
|
13
|
+
})),
|
|
14
|
+
TableName: input.name,
|
|
15
|
+
KeySchema: primaryKeySchema,
|
|
16
|
+
GlobalSecondaryIndexes: globalSecondaryIndexes.length > 0 ? globalSecondaryIndexes : undefined,
|
|
17
|
+
LocalSecondaryIndexes: localSecondaryIndexes.length > 0 ? localSecondaryIndexes : undefined,
|
|
18
|
+
BillingMode: "PAY_PER_REQUEST", // Use on-demand billing mode by default.
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function encodeKeySchema(params) {
|
|
22
|
+
const { attributeDefinitions, key } = params;
|
|
23
|
+
const keySchema = [];
|
|
24
|
+
attributeDefinitions.set(key.partitionKey.name, key.partitionKey.type);
|
|
25
|
+
keySchema.push({
|
|
26
|
+
AttributeName: key.partitionKey.name,
|
|
27
|
+
KeyType: "HASH",
|
|
28
|
+
});
|
|
29
|
+
if (key.sortKey != null) {
|
|
30
|
+
attributeDefinitions.set(key.sortKey.name, key.sortKey.type);
|
|
31
|
+
keySchema.push({
|
|
32
|
+
AttributeName: key.sortKey.name,
|
|
33
|
+
KeyType: "RANGE",
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
return keySchema;
|
|
37
|
+
}
|
|
38
|
+
function encodeGsis(attributeDefinitions, gsis) {
|
|
39
|
+
const globalSecondaryIndexes = [];
|
|
40
|
+
for (const [indexName, field] of Object.entries(gsis ?? {})) {
|
|
41
|
+
const ks = encodeKeySchema({
|
|
42
|
+
attributeDefinitions,
|
|
43
|
+
key: field,
|
|
44
|
+
});
|
|
45
|
+
globalSecondaryIndexes.push({
|
|
46
|
+
IndexName: indexName,
|
|
47
|
+
KeySchema: ks,
|
|
48
|
+
Projection: {
|
|
49
|
+
ProjectionType: "ALL",
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
return globalSecondaryIndexes;
|
|
54
|
+
}
|
|
55
|
+
function encodeLsis(attributeDefinitions, lsis) {
|
|
56
|
+
const localSecondaryIndexes = [];
|
|
57
|
+
for (const [indexName, field] of Object.entries(lsis ?? {})) {
|
|
58
|
+
const ks = encodeKeySchema({
|
|
59
|
+
attributeDefinitions,
|
|
60
|
+
key: {
|
|
61
|
+
partitionKey: field.partitionKey,
|
|
62
|
+
sortKey: field.sortKey,
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
localSecondaryIndexes.push({
|
|
66
|
+
IndexName: indexName,
|
|
67
|
+
KeySchema: ks,
|
|
68
|
+
Projection: {
|
|
69
|
+
ProjectionType: "ALL",
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
return localSecondaryIndexes;
|
|
74
|
+
}
|
|
2
75
|
//# sourceMappingURL=create-table.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-table.js","sourceRoot":"","sources":["../../../../../src/commands/command/inputs/create-table.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"create-table.js","sourceRoot":"","sources":["../../../../../src/commands/command/inputs/create-table.ts"],"names":[],"mappings":"AAgBA,MAAM,UAAU,MAAM,CACpB,KAA4B;IAE5B,MAAM,oBAAoB,GAAkC,IAAI,GAAG,EAAE,CAAC;IACtE,MAAM,gBAAgB,GAAG,eAAe,CAAC;QACvC,oBAAoB;QACpB,GAAG,EAAE,KAAK,CAAC,SAAS;KACrB,CAAC,CAAC;IAEH,MAAM,sBAAsB,GAAG,UAAU,CAAC,oBAAoB,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAC5E,MAAM,qBAAqB,GAAG,UAAU,CAAC,oBAAoB,EAAE,KA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ACL,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,UAAU,CACjB,oBAAmD,EACnD,IAA8B;IAE9B,MAAM,sBAAsB,GAAgC,EAAE,CAAC;IAC/D,KAAK,MAAM,CAAC,SAAS,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC,EAAE,CAAC;QAC5D,MAAM,EAAE,GAAG,eAAe,CAAC;YACzB,oBAAoB;YACpB,GAAG,EAAE,KAAK;SACX,CAAC,CAAC;QACH,sBAAsB,CAAC,IAAI,CAAC;YAC1B,SAAS,EAAE,SAAS;YACpB,SAAS,EAAE,EAAE;YACb,UAAU,EAAE;gBACV,cAAc,EAAE,KAAK;aACtB;SACF,CAAC,CAAC;IACL,CAAC;IACD,OAAO,sBAAsB,CAAC;AAChC,CAAC;AAED,SAAS,UAAU,CACjB,oBAAmD,EACnD,IAA8B;IAE9B,MAAM,qBAAqB,GAA+B,EAAE,CAAC;IAC7D,KAAK,MAAM,CAAC,SAAS,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC,EAAE,CAAC;QAC5D,MAAM,EAAE,GAAG,eAAe,CAAC;YACzB,oBAAoB;YACpB,GAAG,EAAE;gBACH,YAAY,EAAE,KAAK,CAAC,YAAY;gBAChC,OAAO,EAAE,KAAK,CAAC,OAAO;aACvB;SACF,CAAC,CAAC;QACH,qBAAqB,CAAC,IAAI,CAAC;YACzB,SAAS,EAAE,SAAS;YACpB,SAAS,EAAE,EAAE;YACb,UAAU,EAAE;gBACV,cAAc,EAAE,KAAK;aACtB;SACF,CAAC,CAAC;IACL,CAAC;IACD,OAAO,qBAAqB,CAAC;AAC/B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-table.js","sourceRoot":"","sources":["../../../../../src/commands/command/outputs/create-table.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,MAAM,CAAC,CAA2B;IAChD,OAAO,EAAE,CAAC;AACZ,CAAC"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
export type { DeleteItem } from "./command/delete-item.js";
|
|
2
|
-
export * from "./command/
|
|
3
|
-
export * from "./command/outputs/index.js";
|
|
4
|
-
export type { CreateTableParams } from "./create-table.js";
|
|
2
|
+
export * from "./command/index.js";
|
|
5
3
|
export type { DeleteTableParams } from "./delete.table.js";
|
|
6
4
|
export * from "./expressions/index.js";
|
|
7
5
|
export type { PutItemParams, PutItemResult, PutItemReturnValue, } from "./put-item.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/index.ts"],"names":[],"mappings":"AACA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/index.ts"],"names":[],"mappings":"AACA,cAAc,oBAAoB,CAAC;AAEnC,cAAc,wBAAwB,CAAC"}
|
package/lib/esm/types.d.ts
CHANGED
|
@@ -91,12 +91,12 @@ export interface KeyAttributeDefinition {
|
|
|
91
91
|
type: KeyAttributeType;
|
|
92
92
|
}
|
|
93
93
|
/**
|
|
94
|
-
* A key
|
|
94
|
+
* A key schema used when creating tables and indexes.
|
|
95
95
|
*
|
|
96
96
|
* The partition key represents the HASH type key, and the optional sort key
|
|
97
97
|
* represents the RANGE type key.
|
|
98
98
|
*/
|
|
99
|
-
export interface
|
|
99
|
+
export interface KeySchema {
|
|
100
100
|
partitionKey: KeyAttributeDefinition;
|
|
101
101
|
sortKey?: KeyAttributeDefinition;
|
|
102
102
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@infra-blocks/aws-dynamodb",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.55.0-alpha.0",
|
|
4
4
|
"description": "A convenience wrapper over @aws-sdk/client-dynamodb and @aws-sdk/lib-dynamodb.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aws",
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"@infra-blocks/iter": "^0.2.7",
|
|
46
46
|
"@infra-blocks/node-console-logger": "^0.3.1",
|
|
47
47
|
"@infra-blocks/test": "^0.7.0",
|
|
48
|
+
"@smithy/types": "^4.12.0",
|
|
48
49
|
"@types/mocha": "^10.0.10",
|
|
49
50
|
"@types/node": "^24.0.10",
|
|
50
51
|
"c8": "^10.1.3",
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { CreateTableCommand, type CreateTableCommandInput } from "@aws-sdk/client-dynamodb";
|
|
2
|
-
import type { KeyDefinition } from "../types.js";
|
|
3
|
-
import type { Command } from "./types.js";
|
|
4
|
-
export interface CreateTableParams {
|
|
5
|
-
name: string;
|
|
6
|
-
primaryKey: KeyDefinition;
|
|
7
|
-
gsis?: Record<string, KeyDefinition>;
|
|
8
|
-
lsis?: Record<string, KeyDefinition>;
|
|
9
|
-
}
|
|
10
|
-
export declare class CreateTable implements Command<CreateTableCommandInput, CreateTableCommand> {
|
|
11
|
-
private readonly name;
|
|
12
|
-
private readonly primaryKey;
|
|
13
|
-
private readonly gsis?;
|
|
14
|
-
private readonly lsis?;
|
|
15
|
-
private constructor();
|
|
16
|
-
toAwsCommandInput(): CreateTableCommandInput;
|
|
17
|
-
toAwsCommand(): CreateTableCommand;
|
|
18
|
-
private gsiInput;
|
|
19
|
-
private lsiInput;
|
|
20
|
-
static from(params: CreateTableParams): CreateTable;
|
|
21
|
-
}
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CreateTable = void 0;
|
|
4
|
-
const client_dynamodb_1 = require("@aws-sdk/client-dynamodb");
|
|
5
|
-
class CreateTable {
|
|
6
|
-
name;
|
|
7
|
-
primaryKey;
|
|
8
|
-
gsis;
|
|
9
|
-
lsis;
|
|
10
|
-
constructor(params) {
|
|
11
|
-
const { name, primaryKey, gsis, lsis } = params;
|
|
12
|
-
this.name = name;
|
|
13
|
-
this.primaryKey = primaryKey;
|
|
14
|
-
this.gsis = gsis;
|
|
15
|
-
this.lsis = lsis;
|
|
16
|
-
}
|
|
17
|
-
toAwsCommandInput() {
|
|
18
|
-
const attributeDefinitions = new Map();
|
|
19
|
-
const primaryKeySchema = keySchema({
|
|
20
|
-
attributeDefinitions,
|
|
21
|
-
key: this.primaryKey,
|
|
22
|
-
});
|
|
23
|
-
const globalSecondaryIndexes = this.gsiInput(attributeDefinitions);
|
|
24
|
-
const localSecondaryIndexes = this.lsiInput(attributeDefinitions);
|
|
25
|
-
return {
|
|
26
|
-
AttributeDefinitions: [...attributeDefinitions.entries()].map(([name, type]) => ({
|
|
27
|
-
AttributeName: name,
|
|
28
|
-
AttributeType: type,
|
|
29
|
-
})),
|
|
30
|
-
TableName: this.name,
|
|
31
|
-
KeySchema: primaryKeySchema,
|
|
32
|
-
GlobalSecondaryIndexes: globalSecondaryIndexes.length > 0 ? globalSecondaryIndexes : undefined,
|
|
33
|
-
LocalSecondaryIndexes: localSecondaryIndexes.length > 0 ? localSecondaryIndexes : undefined,
|
|
34
|
-
BillingMode: "PAY_PER_REQUEST", // Use on-demand billing mode by default.
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
toAwsCommand() {
|
|
38
|
-
return new client_dynamodb_1.CreateTableCommand(this.toAwsCommandInput());
|
|
39
|
-
}
|
|
40
|
-
gsiInput(attributeDefinitions) {
|
|
41
|
-
const gsis = this.gsis ?? {};
|
|
42
|
-
const globalSecondaryIndexes = [];
|
|
43
|
-
for (const [indexName, field] of Object.entries(gsis)) {
|
|
44
|
-
const ks = keySchema({
|
|
45
|
-
attributeDefinitions,
|
|
46
|
-
key: field,
|
|
47
|
-
});
|
|
48
|
-
globalSecondaryIndexes.push({
|
|
49
|
-
IndexName: indexName,
|
|
50
|
-
KeySchema: ks,
|
|
51
|
-
Projection: {
|
|
52
|
-
ProjectionType: "ALL",
|
|
53
|
-
},
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
return globalSecondaryIndexes;
|
|
57
|
-
}
|
|
58
|
-
lsiInput(attributeDefinitions) {
|
|
59
|
-
const lsis = this.lsis ?? {};
|
|
60
|
-
const localSecondaryIndexes = [];
|
|
61
|
-
for (const [indexName, field] of Object.entries(lsis)) {
|
|
62
|
-
const ks = keySchema({
|
|
63
|
-
attributeDefinitions,
|
|
64
|
-
key: {
|
|
65
|
-
partitionKey: field.partitionKey,
|
|
66
|
-
sortKey: field.sortKey,
|
|
67
|
-
},
|
|
68
|
-
});
|
|
69
|
-
localSecondaryIndexes.push({
|
|
70
|
-
IndexName: indexName,
|
|
71
|
-
KeySchema: ks,
|
|
72
|
-
Projection: {
|
|
73
|
-
ProjectionType: "ALL",
|
|
74
|
-
},
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
return localSecondaryIndexes;
|
|
78
|
-
}
|
|
79
|
-
static from(params) {
|
|
80
|
-
return new CreateTable(params);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
exports.CreateTable = CreateTable;
|
|
84
|
-
function keySchema(params) {
|
|
85
|
-
const { attributeDefinitions, key } = params;
|
|
86
|
-
const keySchema = [];
|
|
87
|
-
attributeDefinitions.set(key.partitionKey.name, key.partitionKey.type);
|
|
88
|
-
keySchema.push({
|
|
89
|
-
AttributeName: key.partitionKey.name,
|
|
90
|
-
KeyType: "HASH",
|
|
91
|
-
});
|
|
92
|
-
if (key.sortKey != null) {
|
|
93
|
-
attributeDefinitions.set(key.sortKey.name, key.sortKey.type);
|
|
94
|
-
keySchema.push({
|
|
95
|
-
AttributeName: key.sortKey.name,
|
|
96
|
-
KeyType: "RANGE",
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
return keySchema;
|
|
100
|
-
}
|
|
101
|
-
//# sourceMappingURL=create-table.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-table.js","sourceRoot":"","sources":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CAAC,CAAC;QACL,CAAC;QACD,OAAO,qBAAqB,CAAC;IAC/B,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,MAAyB;QACnC,OAAO,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC;IACjC,CAAC;CACF;AAnGD,kCAmGC;AAED,SAAS,SAAS,CAAC,MAGlB;IACC,MAAM,EAAE,oBAAoB,EAAE,GAAG,EAAE,GAAG,MAAM,CAAC;IAC7C,MAAM,SAAS,GAA4B,EAAE,CAAC;IAC9C,oBAAoB,CAAC,GAAG,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;IACvE,SAAS,CAAC,IAAI,CAAC;QACb,aAAa,EAAE,GAAG,CAAC,YAAY,CAAC,IAAI;QACpC,OAAO,EAAE,MAAM;KAChB,CAAC,CAAC;IACH,IAAI,GAAG,CAAC,OAAO,IAAI,IAAI,EAAE,CAAC;QACxB,oBAAoB,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC7D,SAAS,CAAC,IAAI,CAAC;YACb,aAAa,EAAE,GAAG,CAAC,OAAO,CAAC,IAAI;YAC/B,OAAO,EAAE,OAAO;SACjB,CAAC,CAAC;IACL,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { CreateTableCommand, type CreateTableCommandInput } from "@aws-sdk/client-dynamodb";
|
|
2
|
-
import type { KeyDefinition } from "../types.js";
|
|
3
|
-
import type { Command } from "./types.js";
|
|
4
|
-
export interface CreateTableParams {
|
|
5
|
-
name: string;
|
|
6
|
-
primaryKey: KeyDefinition;
|
|
7
|
-
gsis?: Record<string, KeyDefinition>;
|
|
8
|
-
lsis?: Record<string, KeyDefinition>;
|
|
9
|
-
}
|
|
10
|
-
export declare class CreateTable implements Command<CreateTableCommandInput, CreateTableCommand> {
|
|
11
|
-
private readonly name;
|
|
12
|
-
private readonly primaryKey;
|
|
13
|
-
private readonly gsis?;
|
|
14
|
-
private readonly lsis?;
|
|
15
|
-
private constructor();
|
|
16
|
-
toAwsCommandInput(): CreateTableCommandInput;
|
|
17
|
-
toAwsCommand(): CreateTableCommand;
|
|
18
|
-
private gsiInput;
|
|
19
|
-
private lsiInput;
|
|
20
|
-
static from(params: CreateTableParams): CreateTable;
|
|
21
|
-
}
|