Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(lib-dynamodb): input types conflicts with client-dynamodb #6676

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export { DynamoDBDocumentClientCommand, $Command };
export type BatchExecuteStatementCommandInput = Omit<__BatchExecuteStatementCommandInput, "Statements"> & {
Statements:
| (Omit<BatchStatementRequest, "Parameters"> & {
Parameters?: NativeAttributeValue[];
Parameters?: NativeAttributeValue[] | undefined;
})[]
| undefined;
};
Expand Down
16 changes: 10 additions & 6 deletions lib/lib-dynamodb/src/commands/BatchWriteCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,16 @@ export type BatchWriteCommandInput = Omit<__BatchWriteItemCommandInput, "Request
| Record<
string,
(Omit<WriteRequest, "PutRequest" | "DeleteRequest"> & {
PutRequest?: Omit<PutRequest, "Item"> & {
Item: Record<string, NativeAttributeValue> | undefined;
};
DeleteRequest?: Omit<DeleteRequest, "Key"> & {
Key: Record<string, NativeAttributeValue> | undefined;
};
PutRequest?:
| (Omit<PutRequest, "Item"> & {
Item: Record<string, NativeAttributeValue> | undefined;
})
| undefined;
DeleteRequest?:
| (Omit<DeleteRequest, "Key"> & {
Key: Record<string, NativeAttributeValue> | undefined;
})
| undefined;
})[]
>
| undefined;
Expand Down
18 changes: 10 additions & 8 deletions lib/lib-dynamodb/src/commands/DeleteCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,16 @@ export { DynamoDBDocumentClientCommand, $Command };
*/
export type DeleteCommandInput = Omit<__DeleteItemCommandInput, "Key" | "Expected" | "ExpressionAttributeValues"> & {
Key: Record<string, NativeAttributeValue> | undefined;
Expected?: Record<
string,
Omit<ExpectedAttributeValue, "Value" | "AttributeValueList"> & {
Value?: NativeAttributeValue;
AttributeValueList?: NativeAttributeValue[];
}
>;
ExpressionAttributeValues?: Record<string, NativeAttributeValue>;
Expected?:
| Record<
string,
| Omit<ExpectedAttributeValue, "Value" | "AttributeValueList"> & {
Value?: NativeAttributeValue;
AttributeValueList?: NativeAttributeValue[] | undefined;
}
>
| undefined;
ExpressionAttributeValues?: Record<string, NativeAttributeValue> | undefined;
};

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/lib-dynamodb/src/commands/ExecuteStatementCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export { DynamoDBDocumentClientCommand, $Command };
* @public
*/
export type ExecuteStatementCommandInput = Omit<__ExecuteStatementCommandInput, "Parameters"> & {
Parameters?: NativeAttributeValue[];
Parameters?: NativeAttributeValue[] | undefined;
};

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export { DynamoDBDocumentClientCommand, $Command };
export type ExecuteTransactionCommandInput = Omit<__ExecuteTransactionCommandInput, "TransactStatements"> & {
TransactStatements:
| (Omit<ParameterizedStatement, "Parameters"> & {
Parameters?: NativeAttributeValue[];
Parameters?: NativeAttributeValue[] | undefined;
})[]
| undefined;
};
Expand Down
18 changes: 10 additions & 8 deletions lib/lib-dynamodb/src/commands/PutCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,16 @@ export { DynamoDBDocumentClientCommand, $Command };
*/
export type PutCommandInput = Omit<__PutItemCommandInput, "Item" | "Expected" | "ExpressionAttributeValues"> & {
Item: Record<string, NativeAttributeValue> | undefined;
Expected?: Record<
string,
Omit<ExpectedAttributeValue, "Value" | "AttributeValueList"> & {
Value?: NativeAttributeValue;
AttributeValueList?: NativeAttributeValue[];
}
>;
ExpressionAttributeValues?: Record<string, NativeAttributeValue>;
Expected?:
| Record<
string,
Omit<ExpectedAttributeValue, "Value" | "AttributeValueList"> & {
Value?: NativeAttributeValue | undefined;
AttributeValueList?: NativeAttributeValue[] | undefined;
}
>
| undefined;
ExpressionAttributeValues?: Record<string, NativeAttributeValue> | undefined;
};

/**
Expand Down
32 changes: 18 additions & 14 deletions lib/lib-dynamodb/src/commands/QueryCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,24 @@ export type QueryCommandInput = Omit<
__QueryCommandInput,
"KeyConditions" | "QueryFilter" | "ExclusiveStartKey" | "ExpressionAttributeValues"
> & {
KeyConditions?: Record<
string,
Omit<Condition, "AttributeValueList"> & {
AttributeValueList?: NativeAttributeValue[];
}
>;
QueryFilter?: Record<
string,
Omit<Condition, "AttributeValueList"> & {
AttributeValueList?: NativeAttributeValue[];
}
>;
ExclusiveStartKey?: Record<string, NativeAttributeValue>;
ExpressionAttributeValues?: Record<string, NativeAttributeValue>;
KeyConditions?:
| Record<
string,
Omit<Condition, "AttributeValueList"> & {
AttributeValueList?: NativeAttributeValue[] | undefined;
}
>
| undefined;
QueryFilter?:
| Record<
string,
Omit<Condition, "AttributeValueList"> & {
AttributeValueList?: NativeAttributeValue[] | undefined;
}
>
| undefined;
ExclusiveStartKey?: Record<string, NativeAttributeValue> | undefined;
ExpressionAttributeValues?: Record<string, NativeAttributeValue> | undefined;
};

/**
Expand Down
18 changes: 10 additions & 8 deletions lib/lib-dynamodb/src/commands/ScanCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,16 @@ export type ScanCommandInput = Omit<
__ScanCommandInput,
"ScanFilter" | "ExclusiveStartKey" | "ExpressionAttributeValues"
> & {
ScanFilter?: Record<
string,
Omit<Condition, "AttributeValueList"> & {
AttributeValueList?: NativeAttributeValue[];
}
>;
ExclusiveStartKey?: Record<string, NativeAttributeValue>;
ExpressionAttributeValues?: Record<string, NativeAttributeValue>;
ScanFilter?:
| Record<
string,
Omit<Condition, "AttributeValueList"> & {
AttributeValueList?: NativeAttributeValue[] | undefined;
}
>
| undefined;
ExclusiveStartKey?: Record<string, NativeAttributeValue> | undefined;
ExpressionAttributeValues?: Record<string, NativeAttributeValue> | undefined;
};

/**
Expand Down
40 changes: 24 additions & 16 deletions lib/lib-dynamodb/src/commands/TransactWriteCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,30 @@ export { DynamoDBDocumentClientCommand, $Command };
export type TransactWriteCommandInput = Omit<__TransactWriteItemsCommandInput, "TransactItems"> & {
TransactItems:
| (Omit<TransactWriteItem, "ConditionCheck" | "Put" | "Delete" | "Update"> & {
ConditionCheck?: Omit<ConditionCheck, "Key" | "ExpressionAttributeValues"> & {
Key: Record<string, NativeAttributeValue> | undefined;
ExpressionAttributeValues?: Record<string, NativeAttributeValue>;
};
Put?: Omit<Put, "Item" | "ExpressionAttributeValues"> & {
Item: Record<string, NativeAttributeValue> | undefined;
ExpressionAttributeValues?: Record<string, NativeAttributeValue>;
};
Delete?: Omit<Delete, "Key" | "ExpressionAttributeValues"> & {
Key: Record<string, NativeAttributeValue> | undefined;
ExpressionAttributeValues?: Record<string, NativeAttributeValue>;
};
Update?: Omit<Update, "Key" | "ExpressionAttributeValues"> & {
Key: Record<string, NativeAttributeValue> | undefined;
ExpressionAttributeValues?: Record<string, NativeAttributeValue>;
};
ConditionCheck?:
| (Omit<ConditionCheck, "Key" | "ExpressionAttributeValues"> & {
Key: Record<string, NativeAttributeValue> | undefined;
ExpressionAttributeValues?: Record<string, NativeAttributeValue> | undefined;
})
| undefined;
Put?:
| (Omit<Put, "Item" | "ExpressionAttributeValues"> & {
Item: Record<string, NativeAttributeValue> | undefined;
ExpressionAttributeValues?: Record<string, NativeAttributeValue> | undefined;
})
| undefined;
Delete?:
| (Omit<Delete, "Key" | "ExpressionAttributeValues"> & {
Key: Record<string, NativeAttributeValue> | undefined;
ExpressionAttributeValues?: Record<string, NativeAttributeValue> | undefined;
})
| undefined;
Update?:
| (Omit<Update, "Key" | "ExpressionAttributeValues"> & {
Key: Record<string, NativeAttributeValue> | undefined;
ExpressionAttributeValues?: Record<string, NativeAttributeValue> | undefined;
})
| undefined;
})[]
| undefined;
};
Expand Down
32 changes: 18 additions & 14 deletions lib/lib-dynamodb/src/commands/UpdateCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,24 @@ export type UpdateCommandInput = Omit<
"Key" | "AttributeUpdates" | "Expected" | "ExpressionAttributeValues"
> & {
Key: Record<string, NativeAttributeValue> | undefined;
AttributeUpdates?: Record<
string,
Omit<AttributeValueUpdate, "Value"> & {
Value?: NativeAttributeValue;
}
>;
Expected?: Record<
string,
Omit<ExpectedAttributeValue, "Value" | "AttributeValueList"> & {
Value?: NativeAttributeValue;
AttributeValueList?: NativeAttributeValue[];
}
>;
ExpressionAttributeValues?: Record<string, NativeAttributeValue>;
AttributeUpdates?:
| Record<
string,
Omit<AttributeValueUpdate, "Value"> & {
Value?: NativeAttributeValue;
}
>
| undefined;
Expected?:
| Record<
string,
Omit<ExpectedAttributeValue, "Value" | "AttributeValueList"> & {
Value?: NativeAttributeValue;
AttributeValueList?: NativeAttributeValue[] | undefined;
}
>
| undefined;
ExpressionAttributeValues?: Record<string, NativeAttributeValue> | undefined;
};

/**
Expand Down