File tree 2 files changed +7
-24
lines changed
2 files changed +7
-24
lines changed Original file line number Diff line number Diff line change 1
- import type { TransformOptions } from './BaseProvider' ;
1
+ import type { GetOptionsInterface , GetMultipleOptionsInterface } from './BaseProvider' ;
2
2
import type { GetItemCommandInput , QueryCommandInput , DynamoDBClientConfig } from '@aws-sdk/client-dynamodb' ;
3
3
4
- // TODO: move this to BaseProvider.ts
5
- interface GetBaseOptionsInterface {
6
- maxAge ?: number
7
- forceFetch ?: boolean
8
- decrypt ?: boolean
9
- transform ?: TransformOptions
10
- }
11
-
12
- // TODO: move this to BaseProvider.ts
13
- interface GetMultipleBaseOptionsInterface extends GetBaseOptionsInterface {
14
- throwOnTransformError ?: boolean
15
- }
16
-
17
4
interface DynamoDBProviderOptions {
18
5
tableName : string
19
6
keyAttr ?: string
@@ -30,11 +17,11 @@ interface DynamoDBProviderOptions {
30
17
* @property {boolean } decrypt - If true, the parameter will be decrypted.
31
18
* @property {Partial<GetItemCommandInput> } sdkOptions - Options for the AWS SDK.
32
19
*/
33
- interface DynamoDBGetOptionsInterface extends GetBaseOptionsInterface {
20
+ interface DynamoDBGetOptionsInterface extends GetOptionsInterface {
34
21
sdkOptions ?: Omit < Partial < GetItemCommandInput > , 'Key' | 'TableName' | 'ProjectionExpression' >
35
22
}
36
23
37
- interface DynamoDBGetMultipleOptionsInterface extends GetMultipleBaseOptionsInterface {
24
+ interface DynamoDBGetMultipleOptionsInterface extends GetMultipleOptionsInterface {
38
25
sdkOptions ?: Partial < QueryCommandInput >
39
26
}
40
27
Original file line number Diff line number Diff line change 1
1
/**
2
- * Test DynamoDBProvider class
3
- *
4
- * @group unit/parameters/DynamoDBProvider/class
5
- */
2
+ * Test DynamoDBProvider class
3
+ *
4
+ * @group unit/parameters/DynamoDBProvider/class
5
+ */
6
6
import { DynamoDBProvider } from '../../src/DynamoDBProvider' ;
7
7
import { DynamoDBClient , GetItemCommand , QueryCommand } from '@aws-sdk/client-dynamodb' ;
8
8
import type { GetItemCommandInput , QueryCommandInput } from '@aws-sdk/client-dynamodb' ;
9
9
import { marshall } from '@aws-sdk/util-dynamodb' ;
10
10
import { mockClient } from 'aws-sdk-client-mock' ;
11
11
import 'aws-sdk-client-mock-jest' ;
12
- /* import type {
13
- DynamoDBGetOptionsInterface,
14
- DynamoDBGetMultipleOptionsInterface,
15
- } from '../../src/types/DynamoDBProvider'; */
16
12
17
13
describe ( 'Class: DynamoDBProvider' , ( ) => {
18
14
You can’t perform that action at this time.
0 commit comments