serverless-dynamodb
Version:
Serverless plugin to run DynamoDB local
19 lines (18 loc) • 931 B
TypeScript
import { BatchWriteItemCommandInput, BatchWriteItemCommandOutput } from '@aws-sdk/client-dynamodb';
import { BatchWriteCommandInput, BatchWriteCommandOutput } from '@aws-sdk/lib-dynamodb';
type DynamoDBWriteFunction = {
(params: BatchWriteCommandInput): Promise<BatchWriteCommandOutput>;
(params: BatchWriteItemCommandInput): Promise<BatchWriteItemCommandOutput>;
};
/**
* Writes a seed corpus to the given database table
* @param dynamodbWriteFunction The DynamoDB DocumentClient.batchWrite or DynamoDB.batchWriteItem function
*/
export declare function writeSeeds(dynamodbWriteFunction: DynamoDBWriteFunction, tableName: string, seedValues: object[]): Promise<void>;
/**
* Locates seeds given a set of files to scrape
* @param {string[]} sources The filenames to scrape for seeds
* @returns {object[]} The items to seed
*/
export declare function locateSeeds(sources: string[], cwd?: string): object[];
export {};