@geniehr/utilities 1.0.11 → 1.0.13

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.
@@ -13,7 +13,9 @@ import { RekognitionClient, IndexFacesCommand, SearchFacesByImageCommand } from
13
13
  const rekognition = new RekognitionClient({ region: 'ap-south-1', credentials: env === 'local' ? fromIni({ profile: 'ghr-aws-dev-profile' }) : undefined });
14
14
  const s3 = new S3Client({
15
15
  region: 'ap-south-1',
16
- credentials: env === 'local' ? fromIni({ profile: 'ghr-aws-dev-profile' }) : undefined
16
+ credentials: env === 'local' ? fromIni({ profile: 'ghr-aws-dev-profile' }) : undefined,
17
+ requestChecksumCalculation: "WHEN_REQUIRED",
18
+ responseChecksumValidation: "WHEN_REQUIRED"
17
19
  });
18
20
  const client = new CognitoIdentityProviderClient({
19
21
  region: 'ap-south-1',
@@ -90,7 +92,6 @@ export async function generatePresignedUrl(bucketName, key, idToken, action, exp
90
92
  if (!userId)
91
93
  throw new AppException("User ID not found in token", "E-User-ID-Not-Found");
92
94
  const REGION = "ap-south-1";
93
- const s3 = new S3Client({ region: REGION });
94
95
  let command;
95
96
  switch (action) {
96
97
  case 'put':
@@ -118,7 +119,6 @@ export async function generatePresignedUrlLegacy(entity, fileName, bucketName, i
118
119
  if (!userId)
119
120
  throw new AppException("User ID not found in token", "E-User-ID-Not-Found");
120
121
  const REGION = "ap-south-1";
121
- const s3 = new S3Client({ region: REGION });
122
122
  const key = `${userId}/${entity}/${fileName}`;
123
123
  let command;
124
124
  switch (action) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geniehr/utilities",
3
- "version": "1.0.11",
3
+ "version": "1.0.13",
4
4
  "description": "",
5
5
  "homepage": "https://github.com/Genie-HR/ghr-utilities#readme",
6
6
  "bugs": {