@moicky/dynamodb 2.5.0 → 2.5.2

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.
@@ -16,5 +16,5 @@ export declare class Transaction {
16
16
  delete(item: DynamoDBItemKey, args?: DeleteOperation["args"]): void;
17
17
  addConditionFor<T extends DynamoDBItemKey>(item: T, args?: Partial<ConditionOperation["args"]>): ConditionOperations<T>;
18
18
  private handleOperation;
19
- execute(args?: Partial<Omit<TransactWriteItemsCommandInput, "TransactItems">>): Promise<any>;
19
+ execute(args?: Partial<Omit<TransactWriteItemsCommandInput, "TransactItems">>): Promise<import("@aws-sdk/client-dynamodb").TransactWriteItemsCommandOutput>;
20
20
  }
@@ -131,9 +131,7 @@ class Transaction {
131
131
  TransactItems: operations,
132
132
  ...args,
133
133
  };
134
- return (0, __1.getClient)()
135
- .send(new client_dynamodb_1.TransactWriteItemsCommand(input))
136
- .catch((err) => ({ ...err, args: input }));
134
+ return (0, __1.getClient)().send(new client_dynamodb_1.TransactWriteItemsCommand(input));
137
135
  }
138
136
  }
139
137
  exports.Transaction = Transaction;
@@ -7,11 +7,11 @@ export declare const createCustomReference: (baseItem: DynamoDBItemKey, referenc
7
7
  PK: "dynamodb:reference";
8
8
  SK: `${string}-${string}-${string}-${string}-${string}`;
9
9
  item: {
10
- SK: string;
10
+ SK: string | number;
11
11
  PK: string;
12
12
  };
13
13
  references: {
14
- SK: string;
14
+ SK: string | number;
15
15
  PK: string;
16
16
  };
17
17
  onAttribute: string;
@@ -2,7 +2,7 @@ import { ConditionCheck, Delete, Put, Update } from "@aws-sdk/client-dynamodb";
2
2
  import { DynamoDBItem } from "../types";
3
3
  export type DynamoDBItemKey = {
4
4
  PK: string;
5
- SK?: string;
5
+ SK?: string | number | undefined;
6
6
  };
7
7
  export type ItemWithKey = DynamoDBItem & DynamoDBItemKey;
8
8
  export type WithoutKey<T> = Omit<T, keyof DynamoDBItemKey>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moicky/dynamodb",
3
- "version": "2.5.0",
3
+ "version": "2.5.2",
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",