asherah 1.0.21 → 1.0.24

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +34 -0
  2. package/package.json +6 -4
@@ -0,0 +1,34 @@
1
+ /// <reference types="node" />
2
+ declare type KeyMeta = {
3
+ ID: string;
4
+ Created: string | number;
5
+ };
6
+ declare type EnvelopeKeyRecord = {
7
+ EncryptedKey: Buffer;
8
+ Created: string | number;
9
+ ParentKeyMeta: KeyMeta;
10
+ };
11
+ declare type DataRowRecord = {
12
+ Data: Buffer;
13
+ Key: EnvelopeKeyRecord;
14
+ };
15
+ declare type AsherahConfig = {
16
+ kmsType: string;
17
+ metastore: string;
18
+ serviceName: string;
19
+ productId: string;
20
+ rdbmsConnectionString: string | null;
21
+ dynamoDbEndpoint: string | null;
22
+ dynamoDbRegion: string | null;
23
+ dynamoDbTableName: string | null;
24
+ enableRegionSuffix: boolean;
25
+ preferredRegion: string | null;
26
+ regionMap: string | null;
27
+ verbose: boolean;
28
+ sessionCache: boolean;
29
+ debugOutput: boolean;
30
+ };
31
+ export declare function setup(config: AsherahConfig): void;
32
+ export declare function decrypt(partitionId: string, dataRowRecord: DataRowRecord): Buffer;
33
+ export declare function encrypt(partitionId: string, data: Buffer): DataRowRecord;
34
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asherah",
3
- "version": "1.0.21",
3
+ "version": "1.0.24",
4
4
  "description": "Asherah envelope encryption and key rotation library",
5
5
  "main": "dist/index.js",
6
6
  "repository": {
@@ -16,10 +16,11 @@
16
16
  "license": "MIT",
17
17
  "files": [
18
18
  "binaries/*.so",
19
- "binaries/*.dylib"
19
+ "binaries/*.dylib",
20
+ "dist/index.d.ts"
20
21
  ],
21
22
  "dependencies": {
22
- "cobhan": "^1.0.21"
23
+ "cobhan": "^1.0.22"
23
24
  },
24
25
  "devDependencies": {
25
26
  "@types/node": "^17.0.21",
@@ -27,5 +28,6 @@
27
28
  "@typescript-eslint/parser": "^5.13.0",
28
29
  "eslint": "^8.10.0",
29
30
  "typescript": "^4.6.2"
30
- }
31
+ },
32
+ "types": "./dist/index.d.ts"
31
33
  }