dynamodb-ts-model
Version:
A DynamoDB model/client with full TypeScript typings
19 lines • 1.09 kB
TypeScript
import { ConditionalCheckFailedException, DuplicateItemException, DynamoDBServiceException, ItemCollectionSizeLimitExceededException, ProvisionedThroughputExceededException, RequestLimitExceeded, ResourceNotFoundException, TransactionConflictException } from '@aws-sdk/client-dynamodb';
type DynamoErrors = {
AccessDenied: DynamoDBServiceException;
ConditionalCheckFailed: ConditionalCheckFailedException;
DuplicateItem: DuplicateItemException;
ItemCollectionSizeLimitExceeded: ItemCollectionSizeLimitExceededException;
ProvisionedThroughputExceeded: ProvisionedThroughputExceededException;
RequestLimitExceeded: RequestLimitExceeded;
ResourceNotFound: ResourceNotFoundException;
ThrottlingError: DynamoDBServiceException;
TransactionConflict: TransactionConflictException;
ValidationError: DynamoDBServiceException;
};
/**
* Check if err is a DynamoDB service error of the given name
*/
export declare function isDynamoError<K extends keyof DynamoErrors>(err: any, name: K): err is DynamoErrors[K];
export {};
//# sourceMappingURL=errors.d.ts.map