import { UpdateExpression as UpdateExpressionStr } from '../DocumentClient'; import ExpressionAttributeNames from './ExpressionAttributeNames'; import ExpressionAttributeValues from './ExpressionAttributeValues'; import UpdateValueExpression from './UpdateValueExpression'; export type AddValue = [T] extends [ Set | number | undefined ] ? T : never; export type DeleteValue = [T] extends [ Set | undefined ] ? T : never; export type SetValue = V | ((exp: UpdateValueExpression) => string); export default class UpdateExpression { private names; private values; private sets; private removes; private adds; private deletes; constructor(names: ExpressionAttributeNames, values: ExpressionAttributeValues, init?: UpdateExpressionStr); set(path: K1 | [K1], value: SetValue): this; set(path: [K1, K2], value: SetValue): this; set(path: [K1, K2, K3], value: SetValue): this; set(path: [K1, K2, K3, K4], value: SetValue): this; set(path: [K1, K2, K3, K4, K5], value: SetValue): this; set(path: [K1, K2, K3, K4, K5, K6], value: SetValue): this; set(path: [K1, K2, K3, K4, K5, K6, K7], value: SetValue): this; set(path: [K1, K2, K3, K4, K5, K6, K7, K8], value: SetValue): this; remove(...path: [K1, K2?, K3?, K4?, K5?, K6?, K7?, K8?, ...(string | number)[]]): this; add(path: K1 | [K1], value: AddValue): this; add(path: [K1, K2], value: AddValue): this; add(path: [K1, K2, K3], value: AddValue): this; add(path: [K1, K2, K3, K4], value: AddValue): this; add(path: [K1, K2, K3, K4, K5], value: AddValue): this; add(path: [K1, K2, K3, K4, K5, K6], value: AddValue): this; add(path: [K1, K2, K3, K4, K5, K6, K7], value: AddValue): this; add(path: [K1, K2, K3, K4, K5, K6, K7, K8], value: AddValue): this; delete(path: K1 | [K1], value: DeleteValue): this; delete(path: [K1, K2], value: DeleteValue): this; delete(path: [K1, K2, K3], value: DeleteValue): this; delete(path: [K1, K2, K3, K4], value: DeleteValue): this; delete(path: [K1, K2, K3, K4, K5], value: DeleteValue): this; delete(path: [K1, K2, K3, K4, K5, K6], value: DeleteValue): this; delete(path: [K1, K2, K3, K4, K5, K6, K7], value: DeleteValue): this; delete(path: [K1, K2, K3, K4, K5, K6, K7, K8], value: DeleteValue): this; serialize(): UpdateExpressionStr | undefined; }