@moicky/dynamodb 2.5.3 → 2.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -8,11 +8,11 @@ export declare const createCustomReference: (baseItem: DynamoDBItemKey, referenc
|
|
|
8
8
|
SK: `${string}-${string}-${string}-${string}-${string}`;
|
|
9
9
|
item: {
|
|
10
10
|
SK: string | number;
|
|
11
|
-
PK: string;
|
|
11
|
+
PK: string | number;
|
|
12
12
|
};
|
|
13
13
|
references: {
|
|
14
14
|
SK: string | number;
|
|
15
|
-
PK: string;
|
|
15
|
+
PK: string | number;
|
|
16
16
|
};
|
|
17
17
|
onAttribute: string;
|
|
18
18
|
}>;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { ConditionCheck, Delete, Put, Update } from "@aws-sdk/client-dynamodb";
|
|
2
2
|
import { DynamoDBItem } from "../types";
|
|
3
3
|
export type DynamoDBItemKey = {
|
|
4
|
-
PK: string;
|
|
4
|
+
PK: string | number;
|
|
5
5
|
SK?: string | number | undefined;
|
|
6
6
|
};
|
|
7
7
|
export type ItemWithKey = DynamoDBItem & DynamoDBItemKey;
|
|
8
8
|
export type WithoutKey<T> = Omit<T, keyof DynamoDBItemKey>;
|
|
9
|
-
export type OnlyKey<T extends DynamoDBItemKey> =
|
|
9
|
+
export type OnlyKey<T extends DynamoDBItemKey> = T extends {
|
|
10
|
+
SK?: any;
|
|
11
|
+
} ? Pick<T, "PK" | "SK"> : Pick<T, "PK">;
|
|
10
12
|
export type Prettify<T> = {
|
|
11
13
|
[key in keyof T]: T[key];
|
|
12
14
|
} & {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moicky/dynamodb",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.6",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"description": "Contains a collection of convenience functions for working with AWS DynamoDB",
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"aws-dynamodb"
|
|
41
41
|
],
|
|
42
42
|
"files": [
|
|
43
|
-
"dist"
|
|
43
|
+
"dist",
|
|
44
|
+
"tsconfig.json"
|
|
44
45
|
]
|
|
45
46
|
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ESNext",
|
|
4
|
+
"module": "CommonJS",
|
|
5
|
+
"outDir": "./dist",
|
|
6
|
+
"rootDir": "./src",
|
|
7
|
+
"moduleResolution": "node",
|
|
8
|
+
"declaration": true,
|
|
9
|
+
"removeComments": false
|
|
10
|
+
},
|
|
11
|
+
"include": ["src/**/*.ts"],
|
|
12
|
+
"exclude": ["node_modules"]
|
|
13
|
+
}
|