@itzworking/single-table 0.0.134 → 0.0.136
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.
- package/package.json +3 -3
- package/src/decorators/gsis/types.d.ts +2 -4
- package/src/index.d.ts +1 -0
- package/src/index.js +1 -0
- package/src/index.js.map +1 -1
- package/src/single-table-repository/types.d.ts +2 -4
- package/src/types.d.ts +8 -0
- package/src/types.js +3 -0
- package/src/types.js.map +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itzworking/single-table",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.136",
|
|
4
4
|
"private": false,
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"tslib": "^2.3.0"
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
"peerDependencies": {
|
|
9
9
|
"@aws-sdk/client-dynamodb": "3.x",
|
|
10
10
|
"@aws-sdk/lib-dynamodb": "3.x",
|
|
11
|
-
"@itzworking/decorated-class": "0.0.
|
|
12
|
-
"@itzworking/powertools": "0.0.
|
|
11
|
+
"@itzworking/decorated-class": "0.0.136",
|
|
12
|
+
"@itzworking/powertools": "0.0.136",
|
|
13
13
|
"reflect-metadata": "0.2.x",
|
|
14
14
|
"uuid": "10.x"
|
|
15
15
|
},
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
};
|
|
4
|
-
export type CompositeKeyElement<T> = Uppercase<string> | keyof ClassProperties<T>;
|
|
1
|
+
import { ClassPropertiesWithExcludedKeys } from "../../types";
|
|
2
|
+
export type CompositeKeyElement<T> = Uppercase<string> | keyof ClassPropertiesWithExcludedKeys<T>;
|
|
5
3
|
export type CompositePrimaryKeyComposition<T> = {
|
|
6
4
|
PK: Array<CompositeKeyElement<T>>;
|
|
7
5
|
SK: Array<CompositeKeyElement<T>>;
|
package/src/index.d.ts
CHANGED
package/src/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./types"), exports);
|
|
4
5
|
tslib_1.__exportStar(require("./decorators"), exports);
|
|
5
6
|
tslib_1.__exportStar(require("./dynamodb"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./errors"), exports);
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/single-table/src/index.ts"],"names":[],"mappings":";;;AAAA,uDAA6B;AAC7B,qDAA2B;AAC3B,mDAAyB;AACzB,8DAAoC;AACpC,oEAA0C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/single-table/src/index.ts"],"names":[],"mappings":";;;AAAA,kDAAwB;AAExB,uDAA6B;AAC7B,qDAA2B;AAC3B,mDAAyB;AACzB,8DAAoC;AACpC,oEAA0C"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { DeleteCommandInput, GetCommandInput, PutCommandInput, QueryCommandInput, UpdateCommandInput } from "@aws-sdk/lib-dynamodb";
|
|
2
|
-
|
|
3
|
-
[Key in keyof C]: C[Key];
|
|
4
|
-
};
|
|
2
|
+
import { ClassPropertiesWithExcludedKeys } from "../types";
|
|
5
3
|
export interface InsertItemOptions {
|
|
6
4
|
override?: boolean;
|
|
7
5
|
input?: Partial<PutCommandInput>;
|
|
@@ -10,7 +8,7 @@ export interface GetItemOptions {
|
|
|
10
8
|
input?: Partial<GetCommandInput>;
|
|
11
9
|
}
|
|
12
10
|
export interface UpdateItemOptions<T> {
|
|
13
|
-
attributes?: (keyof
|
|
11
|
+
attributes?: (keyof ClassPropertiesWithExcludedKeys<T>)[];
|
|
14
12
|
input?: Partial<UpdateCommandInput>;
|
|
15
13
|
}
|
|
16
14
|
export interface DeleteItemOptions {
|
package/src/types.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type ExcludedKeys = "generateId" | "pk" | "sk" | "key" | "gsi1pk" | "gsi1sk" | "gsi2pk" | "gsi2sk" | "gsi3pk" | "gsi3sk" | "gsi4pk" | "gsi4sk" | "gsi5pk" | "gsi5sk" | "generateUpdateExpression" | "toSingleTableItem";
|
|
2
|
+
export type ClassProperties<C> = {
|
|
3
|
+
[Key in keyof C]: C[Key];
|
|
4
|
+
};
|
|
5
|
+
export type ClassPropertiesWithExcludedKeys<C> = {
|
|
6
|
+
[Key in keyof C as Key extends ExcludedKeys ? never : Key]: C[Key];
|
|
7
|
+
};
|
|
8
|
+
export {};
|
package/src/types.js
ADDED
package/src/types.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../libs/single-table/src/types.ts"],"names":[],"mappings":""}
|