From 83d0af1d47e76a4603b70de539f68ba37ccc7056 Mon Sep 17 00:00:00 2001 From: Max Polsky Date: Sun, 29 Oct 2023 13:30:31 +0200 Subject: [PATCH] fix: dynamo type fix --- .../src/dynamo_schema_requests_utils.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libs/external-db-dynamodb/src/dynamo_schema_requests_utils.ts b/libs/external-db-dynamodb/src/dynamo_schema_requests_utils.ts index 9e2bbab00..e0f357511 100644 --- a/libs/external-db-dynamodb/src/dynamo_schema_requests_utils.ts +++ b/libs/external-db-dynamodb/src/dynamo_schema_requests_utils.ts @@ -4,7 +4,9 @@ import { SystemTable } from './dynamo_utils' import { UpdateCommandInput } from '@aws-sdk/lib-dynamodb/dist-types/commands/UpdateCommand' import { CreateTableCommandInput } from '@aws-sdk/client-dynamodb/dist-types/commands/CreateTableCommand' -export const updateColumnsExpression = (collectionName: any, columns: any) => ({ + + +export const updateColumnsExpression = (collectionName: any, columns: any): UpdateCommandInput => ({ TableName: SystemTable, Key: { tableName: collectionName @@ -50,7 +52,7 @@ export const changeColumnTypeExpression = (collectionName: string, column: Input }, }) -export const createTableExpression = (collectionName: any) => ({ +export const createTableExpression = (collectionName: string): CreateTableCommandInput => ({ TableName: collectionName, KeySchema: [{ AttributeName: '_id', KeyType: 'HASH' }], AttributeDefinitions: [{ AttributeName: '_id', AttributeType: 'S' }],