ag-common 0.0.185 → 0.0.186

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.
@@ -73,8 +73,10 @@ const generateDynamoPKS = ({ type, L1, L2, L3, L4, L5, L6, additionalPKValues, }
73
73
  const additionalPK = additionalPKValues && (additionalPKValues === null || additionalPKValues === void 0 ? void 0 : additionalPKValues.length) > 0
74
74
  ? `#${additionalPKValues.join(c)}`
75
75
  : '';
76
- return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ PK: keys.join(c) + additionalPK, type,
77
- L1 }, (L2 && { L2 })), (L3 && { L3 })), (L4 && { L4 })), (L5 && { L5 })), (L6 && { L6 })), { PK1: L1, PK2: [keys[0], keys[1]].join(c) }), (keys.length >= 3 && {
76
+ return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ PK: keys.join(c) + additionalPK, type,
77
+ L1 }, (L2 && { L2 })), (L3 && { L3 })), (L4 && { L4 })), (L5 && { L5 })), (L6 && { L6 })), { PK1: L1 }), (keys.length >= 2 && {
78
+ PK2: [keys[0], keys[1]].join(c),
79
+ })), (keys.length >= 3 && {
78
80
  PK3: [keys[0], keys[1], keys[2]].join(c),
79
81
  })), (keys.length >= 4 && {
80
82
  PK4: [keys[0], keys[1], keys[2], keys[3]].join(c),
@@ -212,7 +212,19 @@ const getItemsDynamo = ({ tableName, items, }) => __awaiter(void 0, void 0, void
212
212
  }
213
213
  });
214
214
  exports.getItemsDynamo = getItemsDynamo;
215
- const queryDynamo = ({ tableName, pkName, pkValue, pkOperator = '=', skName, skValue, skOperator = '=', indexName, count = 1000, startKey: startKeyIn, filterName, filterValue, filterOperator = '=', }) => __awaiter(void 0, void 0, void 0, function* () {
215
+ const queryDynamo = ({ tableName, pkName, pkValue,
216
+ /**
217
+ * default =
218
+ */
219
+ pkOperator = '=', skName, skValue,
220
+ /**
221
+ * default =
222
+ */
223
+ skOperator = '=', indexName, count = 1000, startKey: startKeyIn, filterName, filterValue,
224
+ /**
225
+ * default =
226
+ */
227
+ filterOperator = '=', }) => __awaiter(void 0, void 0, void 0, function* () {
216
228
  var _g, _h;
217
229
  let startKey = startKeyIn;
218
230
  let kce = `#${pkName.toLowerCase()} ${pkOperator} :${pkName.toLowerCase()}`;
@@ -9,7 +9,7 @@ export interface DYNAMOKEYS {
9
9
  L5?: string;
10
10
  PK: string;
11
11
  PK1: string;
12
- PK2: string;
12
+ PK2?: string;
13
13
  PK3?: string;
14
14
  PK4?: string;
15
15
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ag-common",
3
- "version": "0.0.185",
3
+ "version": "0.0.186",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "author": "Andrei Gec <@andreigec> (https://gec.dev/)",