UNPKG

@salto-io/da-playa

Version:

Deploy locks management (CLI and Slackbot)

28 lines 1.01 kB
import dynamo from 'dynamodb'; export declare type ModelDetails<TModel> = { Model: dynamo.DefineConfig<TModel>; ModelName: string; }; export declare type InitParams<TModel> = { model: dynamo.DefineConfig<TModel>; modelName: string; dynamoDBRegion?: string; dynamoDbUri?: string; }; export declare type GetParams = { filterExpression: string; filterAttributeValues: Record<string, any>; filterAttributeNames: Record<string, string>; }; export declare type CreateParams = any; export declare type UpdateParams = Partial<{ id: string; }> & Record<string, any>; export declare type IData<TModel> = { get: (getParams: GetParams) => Promise<Array<TModel>>; set: (updateParams: UpdateParams) => Promise<TModel>; create: (createParams: CreateParams) => Promise<TModel>; init: () => Promise<void>; }; export declare const Data: <TModel>({ model, modelName, dynamoDBRegion, dynamoDbUri, }: InitParams<TModel>) => IData<TModel>; //# sourceMappingURL=index.d.ts.map