@pi-r/aws 0.6.2 → 0.6.3

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/client/index.d.ts CHANGED
@@ -8,7 +8,7 @@ import type { ConfigurationOptions } from 'aws-sdk/lib/core';
8
8
  import type { ServiceConfigurationOptions } from 'aws-sdk/lib/service';
9
9
  import type { AttributeValue, DocumentClient } from 'aws-sdk/clients/dynamodb';
10
10
  import type { DynamoDBClientConfig } from '@aws-sdk/client-dynamodb';
11
- import type { CreateBucketRequest } from 'aws-sdk/clients/s3';
11
+ import type { CreateBucketRequest, DefaultRetention } from 'aws-sdk/clients/s3';
12
12
 
13
13
  declare namespace AWS {
14
14
  function isAccessDefined(credential: Pick<ConfigurationOptions, "accessKeyId" | "secretAccessKey" | "sessionToken">): boolean;
@@ -33,7 +33,7 @@ declare namespace AWS {
33
33
  function executeBatchQuery(this: ICloud, credential: AWSDatabaseCredential, batch: AWSDatabaseQuery[], sessionKey?: string): Promise<BatchQueryResult>;
34
34
  function setDatabaseEndpoint(config: ServiceConfigurationOptions | DynamoDBClientConfig): void;
35
35
  function checkBucketCannedACL(value: unknown): BucketCannedACL | undefined;
36
- function writeMessageDefaultRetention(this: IModule, bucket: string, retention: s3.DefaultRetention, service?: string): void;
36
+ function writeMessageDefaultRetention(this: IModule, bucket: string, retention: DefaultRetention, service?: string): void;
37
37
  function parseAttributeValue(value: unknown): AttributeValue;
38
38
  function getBucketKey(credential: unknown, Bucket: string, acl: string | undefined, service: string, sdk: string): string;
39
39
  function isNoSuchBucket(err: unknown): boolean;
package/client/index.js CHANGED
@@ -323,7 +323,7 @@ async function executeBatchQuery(credential, batch, sessionKey) {
323
323
  continue;
324
324
  }
325
325
  }
326
- const Key = (0, types_1.isPlainObject)(key) ? key : { [key]: parseAttributeValue(id) };
326
+ const Key = (0, types_1.isPlainObject)(key) ? key : { [key]: id };
327
327
  const command = { TableName, Key };
328
328
  client = createClient();
329
329
  if (update) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-r/aws",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "description": "AWS V2 cloud functions for E-mc.",
5
5
  "main": "client/index.js",
6
6
  "types": "client/index.d.ts",
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "repository": {
11
11
  "type": "git",
12
- "url": "https://github.com/anpham6/pi-r.git",
12
+ "url": "git+https://github.com/anpham6/pi-r.git",
13
13
  "directory": "src/cloud/aws"
14
14
  },
15
15
  "keywords": [
@@ -21,9 +21,9 @@
21
21
  "license": "MIT",
22
22
  "homepage": "https://github.com/anpham6/pi-r#readme",
23
23
  "dependencies": {
24
- "@e-mc/cloud": "^0.8.2",
25
- "@e-mc/module": "^0.8.2",
26
- "@e-mc/types": "^0.8.2",
27
- "aws-sdk": "^2.1545.0"
24
+ "@e-mc/cloud": "^0.8.3",
25
+ "@e-mc/module": "^0.8.3",
26
+ "@e-mc/types": "^0.8.3",
27
+ "aws-sdk": "^2.1547.0"
28
28
  }
29
29
  }
package/types/index.d.ts CHANGED
@@ -3,12 +3,18 @@ import type { CloudDatabase } from '@e-mc/types/lib/cloud';
3
3
 
4
4
  import type { ConfigurationOptions } from 'aws-sdk/lib/core';
5
5
  import type { ServiceConfigurationOptions } from 'aws-sdk/lib/service';
6
- import type { BatchGetItemInput, Key, QueryInput, ScanInput, UpdateItemInput } from 'aws-sdk/clients/dynamodb';
6
+ import type { DocumentClient } from 'aws-sdk/clients/dynamodb';
7
7
  import type { PutBucketAclRequest, PutBucketPolicyRequest, PutPublicAccessBlockRequest } from 'aws-sdk/clients/s3';
8
8
 
9
9
  export type BucketCannedACL = "authenticated-read" | "private" | "public-read" | "public-read-write";
10
10
  export type ObjectCannedACL = BucketCannedACL | "aws-exec-read" | "bucket-owner-full-control" | "bucket-owner-read";
11
11
  export type ConfigureBucketOptions = PutBucketAclRequest | PutBucketPolicyRequest | PutPublicAccessBlockRequest;
12
+ export type Key = DocumentClient.Key;
13
+ export type GetItemInput = DocumentClient.GetItemInput;
14
+ export type QueryInput = DocumentClient.QueryInput;
15
+ export type UpdateItemInput = DocumentClient.UpdateItemInput;
16
+ export type ScanInput = DocumentClient.ScanInput;
17
+ export type BatchGetItemInput = DocumentClient.BatchGetItemInput;
12
18
 
13
19
  export interface AWSStorageCredential extends ConfigurationOptions {
14
20
  profile?: string;