|
1 |
| -import { |
2 |
| - DynamoDBClientResolvedConfig, |
3 |
| - DeleteItemCommand as _DeleteItemCommand, |
4 |
| - ReturnValue as DynamoDBReturnValue, |
5 |
| -} from "@aws-sdk/client-dynamodb"; |
6 |
| -import type { Command } from "@aws-sdk/smithy-client"; |
7 |
| -import { DeleteItemInput, DeleteItemOutput } from "./delete-item"; |
8 |
| -import { MetadataBearer } from "@aws-sdk/types"; |
9 |
| -import { TableKey } from "./key"; |
10 |
| -import { JsonFormat } from "./json-format"; |
11 |
| - |
12 |
| -export interface DeleteItemCommand< |
13 |
| - Item extends object, |
14 |
| - PartitionKey extends keyof Item, |
15 |
| - RangeKey extends keyof Item | undefined, |
16 |
| - Key extends TableKey<Item, PartitionKey, RangeKey, Format>, |
17 |
| - ConditionExpression extends string | undefined, |
18 |
| - ReturnValue extends DynamoDBReturnValue, |
19 |
| - Format extends JsonFormat |
20 |
| -> extends Command< |
21 |
| - DeleteItemInput< |
22 |
| - Item, |
23 |
| - PartitionKey, |
24 |
| - RangeKey, |
25 |
| - Key, |
26 |
| - ConditionExpression, |
27 |
| - ReturnValue, |
28 |
| - Format |
29 |
| - >, |
30 |
| - DeleteItemOutput<Item, ReturnValue, Format> & MetadataBearer, |
31 |
| - DynamoDBClientResolvedConfig |
32 |
| - > { |
33 |
| - _brand: "DeleteItemCommand"; |
34 |
| -} |
| 1 | +import { DeleteItemCommand as _DeleteItemCommand } from "@aws-sdk/client-dynamodb"; |
| 2 | +import type { DeleteCommand } from "./delete-item"; |
| 3 | +import type { JsonFormat } from "./json-format"; |
35 | 4 |
|
36 | 5 | export function TypeSafeDeleteItemCommand<
|
37 | 6 | Item extends object,
|
38 | 7 | PartitionKey extends keyof Item,
|
39 |
| - RangeKey extends keyof Item | undefined, |
40 |
| - Format extends JsonFormat = JsonFormat.Default |
41 |
| ->(): new < |
42 |
| - Key extends TableKey<Item, PartitionKey, RangeKey, Format>, |
43 |
| - ConditionExpression extends string | undefined = undefined, |
44 |
| - ReturnValue extends DynamoDBReturnValue = "NONE" |
45 |
| ->( |
46 |
| - input: DeleteItemInput< |
47 |
| - Item, |
48 |
| - PartitionKey, |
49 |
| - RangeKey, |
50 |
| - Key, |
51 |
| - ConditionExpression, |
52 |
| - ReturnValue, |
53 |
| - Format |
54 |
| - > |
55 |
| -) => DeleteItemCommand< |
56 |
| - Item, |
57 |
| - PartitionKey, |
58 |
| - RangeKey, |
59 |
| - Key, |
60 |
| - ConditionExpression, |
61 |
| - ReturnValue, |
62 |
| - Format |
63 |
| -> { |
| 8 | + RangeKey extends keyof Item | undefined |
| 9 | +>(): DeleteCommand<Item, PartitionKey, RangeKey, JsonFormat.AttributeValue> { |
64 | 10 | return _DeleteItemCommand as any;
|
65 | 11 | }
|
0 commit comments