@optimiser/common 1.0.365 → 1.0.367
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/dist/aws/awsservices.d.ts +39 -39
- package/dist/aws/awsservices.js +398 -398
- package/dist/constants.d.ts +35 -35
- package/dist/constants.js +36 -36
- package/dist/enums/databasetype.enum.d.ts +7 -7
- package/dist/enums/databasetype.enum.js +11 -11
- package/dist/enums/log.enum.d.ts +22 -22
- package/dist/enums/log.enum.js +26 -26
- package/dist/index.d.ts +25 -25
- package/dist/index.js +69 -61
- package/dist/lib/activity.d.ts +1 -1
- package/dist/lib/activity.js +44 -44
- package/dist/lib/calculatedbsize.d.ts +15 -15
- package/dist/lib/calculatedbsize.js +75 -75
- package/dist/lib/connection.d.ts +116 -116
- package/dist/lib/connection.js +595 -595
- package/dist/lib/convertfilesize.d.ts +2 -2
- package/dist/lib/convertfilesize.js +15 -15
- package/dist/lib/countrycode.d.ts +2 -2
- package/dist/lib/countrycode.js +255 -255
- package/dist/lib/event.d.ts +26 -26
- package/dist/lib/event.js +252 -248
- package/dist/lib/helper.d.ts +94 -93
- package/dist/lib/helper.js +1016 -1009
- package/dist/lib/memoryserverclient.d.ts +40 -40
- package/dist/lib/memoryserverclient.js +256 -252
- package/dist/lib/operautilitycommon.d.ts +65 -65
- package/dist/lib/operautilitycommon.js +620 -620
- package/dist/lib/redis.d.ts +21 -21
- package/dist/lib/redis.js +46 -46
- package/dist/lib/socketidfromredis.d.ts +3 -3
- package/dist/lib/socketidfromredis.js +5 -5
- package/dist/lib/taskutils.d.ts +40 -40
- package/dist/lib/taskutils.js +656 -656
- package/dist/lib/utility.d.ts +300 -298
- package/dist/lib/utility.js +5626 -5621
- package/dist/lib/validateRequest.d.ts +3 -3
- package/dist/lib/validateRequest.js +13 -13
- package/dist/logs/auditlog.d.ts +25 -25
- package/dist/logs/auditlog.js +1033 -1029
- package/dist/logs/checklogtable.d.ts +3 -3
- package/dist/logs/checklogtable.js +67 -67
- package/dist/logs/log.table.d.ts +7 -7
- package/dist/logs/log.table.js +127 -127
- package/dist/modals/connection.modal.d.ts +32 -32
- package/dist/modals/connection.modal.js +2 -2
- package/dist/modals/globalNotification.modal.d.ts +8 -8
- package/dist/modals/globalNotification.modal.js +2 -2
- package/dist/modals/log.modal.d.ts +64 -64
- package/dist/modals/log.modal.js +2 -2
- package/dist/modals/mail.modal.d.ts +6 -6
- package/dist/modals/mail.modal.js +2 -2
- package/dist/modals/notificationData.modal.d.ts +29 -29
- package/dist/modals/notificationData.modal.js +2 -2
- package/dist/modals/redisconfig.modal.d.ts +6 -6
- package/dist/modals/redisconfig.modal.js +2 -2
- package/dist/modals/sqsconfig.modal.d.ts +8 -8
- package/dist/modals/sqsconfig.modal.js +2 -2
- package/dist/modals/utility.modal.d.ts +17 -17
- package/dist/modals/utility.modal.js +2 -2
- package/dist/utility/crypto.d.ts +4 -4
- package/dist/utility/crypto.js +43 -43
- package/dist/utility/errorHandler.d.ts +30 -30
- package/dist/utility/errorHandler.js +24 -24
- package/dist/utility/errorHandlerForServices.d.ts +22 -22
- package/dist/utility/errorHandlerForServices.js +19 -19
- package/dist/utility/mail.d.ts +21 -21
- package/dist/utility/mail.js +91 -87
- package/package.json +3 -3
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="express-serve-static-core" />
|
|
3
|
-
import aws, { S3 } from 'aws-sdk';
|
|
4
|
-
import mongo from 'mongodb';
|
|
5
|
-
import request from 'request';
|
|
6
|
-
import { AnyObjectInterface } from '../modals/utility.modal';
|
|
7
|
-
export default class AwsServices {
|
|
8
|
-
private s3;
|
|
9
|
-
private cfSigner;
|
|
10
|
-
private accessKeyId;
|
|
11
|
-
private secretAccessKey;
|
|
12
|
-
/**
|
|
13
|
-
* @param accesskeyId access key id
|
|
14
|
-
* @param secretaccesskey secret access key
|
|
15
|
-
* @param cloudfrontPublicKey region
|
|
16
|
-
* @param cloudfrontPrivateKey
|
|
17
|
-
* @description credentials for aws
|
|
18
|
-
*/
|
|
19
|
-
constructor(accesskeyId: string, secretaccesskey: string, cloudfrontPublicKey: string, cloudfrontPrivateKey: string);
|
|
20
|
-
CreateNewBucket(BucketName: string, Region: string): Promise<S3.CreateBucketOutput | aws.AWSError>;
|
|
21
|
-
CheckIFBucketExist(BucketName: string, Region: string): Promise<AnyObjectInterface | Error>;
|
|
22
|
-
DeleteFile(Bucket: string, Key: string, id: string, db: mongo.Db): Promise<Error | AnyObjectInterface>;
|
|
23
|
-
GetFile(BucketName: string, Region: string, FilePath: string): Promise<S3.GetObjectOutput>;
|
|
24
|
-
getDownloadUrl(CDN: string, FilePath: string, FileName: string, action: string, expiry?: number): Promise<any>;
|
|
25
|
-
GetFileStream(CDN: string, Key: string, FileName: string): Promise<request.Request>;
|
|
26
|
-
ChangesACL(BucketName: string, FilePath: string): Promise<S3.PutObjectAclOutput | aws.AWSError>;
|
|
27
|
-
GetSignedUrl(BucketName: string, Region: string, FilePath: string): string;
|
|
28
|
-
UploadZip(params: aws.S3.PutObjectRequest, callback: ((err: Error, data: aws.S3.ManagedUpload.SendData) => void) | undefined): S3.ManagedUpload;
|
|
29
|
-
UploadFile(BucketName: string, Region: string, FilePath: string, File: Buffer, ContentType: string, FileName: string, FileType: string, UploadType: string, Acltype: string, UniqueID: string, Socketid: string, req: Express.Request): Promise<unknown>;
|
|
30
|
-
UploadToS3(BucketName: string, Region: string, FilePath: string, File: Buffer, ContentType: string, FileName: string, FileType: string, UploadType: string, Acltype: string, UploadTime: string, SocketID: string, req: Express.Request): Promise<unknown>;
|
|
31
|
-
GetFileFromS3(BucketName: string, Region: string, FilePath: string): Promise<Error | any>;
|
|
32
|
-
GeneratePreSignedUrlNotAccelerated(params: {
|
|
33
|
-
[key: string]: any;
|
|
34
|
-
}): Promise<string | Error>;
|
|
35
|
-
GeneratePreSignedUrl(Bucket: string, Path: string, Acl: string, Region: string, ContentType: string, FileName: string, ContryRegionName: string): Promise<string | Error>;
|
|
36
|
-
ImageUpload(BucketName: string, Region: string, FilePath: string, base64String: string, ContentType: string, FileName: string, FileType: string, UploadType: string, Acltype: string, Socketid: string, req: Express.Request): Promise<S3.ManagedUpload.SendData | Error>;
|
|
37
|
-
uploadFromStream(params: S3.Types.PutObjectRequest): Promise<S3.ManagedUpload.SendData>;
|
|
38
|
-
DownloadFileInStreams(urlOfFile: string, pathToStore: string, type: string): Promise<void | Error>;
|
|
39
|
-
}
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="express-serve-static-core" />
|
|
3
|
+
import aws, { S3 } from 'aws-sdk';
|
|
4
|
+
import mongo from 'mongodb';
|
|
5
|
+
import request from 'request';
|
|
6
|
+
import { AnyObjectInterface } from '../modals/utility.modal';
|
|
7
|
+
export default class AwsServices {
|
|
8
|
+
private s3;
|
|
9
|
+
private cfSigner;
|
|
10
|
+
private accessKeyId;
|
|
11
|
+
private secretAccessKey;
|
|
12
|
+
/**
|
|
13
|
+
* @param accesskeyId access key id
|
|
14
|
+
* @param secretaccesskey secret access key
|
|
15
|
+
* @param cloudfrontPublicKey region
|
|
16
|
+
* @param cloudfrontPrivateKey
|
|
17
|
+
* @description credentials for aws
|
|
18
|
+
*/
|
|
19
|
+
constructor(accesskeyId: string, secretaccesskey: string, cloudfrontPublicKey: string, cloudfrontPrivateKey: string);
|
|
20
|
+
CreateNewBucket(BucketName: string, Region: string): Promise<S3.CreateBucketOutput | aws.AWSError>;
|
|
21
|
+
CheckIFBucketExist(BucketName: string, Region: string): Promise<AnyObjectInterface | Error>;
|
|
22
|
+
DeleteFile(Bucket: string, Key: string, id: string, db: mongo.Db): Promise<Error | AnyObjectInterface>;
|
|
23
|
+
GetFile(BucketName: string, Region: string, FilePath: string): Promise<S3.GetObjectOutput>;
|
|
24
|
+
getDownloadUrl(CDN: string, FilePath: string, FileName: string, action: string, expiry?: number): Promise<any>;
|
|
25
|
+
GetFileStream(CDN: string, Key: string, FileName: string): Promise<request.Request>;
|
|
26
|
+
ChangesACL(BucketName: string, FilePath: string): Promise<S3.PutObjectAclOutput | aws.AWSError>;
|
|
27
|
+
GetSignedUrl(BucketName: string, Region: string, FilePath: string): string;
|
|
28
|
+
UploadZip(params: aws.S3.PutObjectRequest, callback: ((err: Error, data: aws.S3.ManagedUpload.SendData) => void) | undefined): S3.ManagedUpload;
|
|
29
|
+
UploadFile(BucketName: string, Region: string, FilePath: string, File: Buffer, ContentType: string, FileName: string, FileType: string, UploadType: string, Acltype: string, UniqueID: string, Socketid: string, req: Express.Request): Promise<unknown>;
|
|
30
|
+
UploadToS3(BucketName: string, Region: string, FilePath: string, File: Buffer, ContentType: string, FileName: string, FileType: string, UploadType: string, Acltype: string, UploadTime: string, SocketID: string, req: Express.Request): Promise<unknown>;
|
|
31
|
+
GetFileFromS3(BucketName: string, Region: string, FilePath: string): Promise<Error | any>;
|
|
32
|
+
GeneratePreSignedUrlNotAccelerated(params: {
|
|
33
|
+
[key: string]: any;
|
|
34
|
+
}): Promise<string | Error>;
|
|
35
|
+
GeneratePreSignedUrl(Bucket: string, Path: string, Acl: string, Region: string, ContentType: string, FileName: string, ContryRegionName: string): Promise<string | Error>;
|
|
36
|
+
ImageUpload(BucketName: string, Region: string, FilePath: string, base64String: string, ContentType: string, FileName: string, FileType: string, UploadType: string, Acltype: string, Socketid: string, req: Express.Request): Promise<S3.ManagedUpload.SendData | Error>;
|
|
37
|
+
uploadFromStream(params: S3.Types.PutObjectRequest): Promise<S3.ManagedUpload.SendData>;
|
|
38
|
+
DownloadFileInStreams(urlOfFile: string, pathToStore: string, type: string): Promise<void | Error>;
|
|
39
|
+
}
|