idea-aws 4.4.11 → 4.4.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.
- package/dist/src/comprehend.d.ts +1 -1
- package/dist/src/comprehend.js +4 -1
- package/dist/src/dynamoDB.d.ts +2 -2
- package/dist/src/dynamoDB.js +2 -2
- package/dist/src/lambdaLogger.d.ts +1 -1
- package/dist/src/resourceController.d.ts +1 -1
- package/dist/src/resourceController.js +3 -3
- package/dist/src/s3.d.ts +1 -1
- package/dist/src/ses.d.ts +0 -1
- package/package.json +28 -28
package/dist/src/comprehend.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ export interface DetectSentimentParameters {
|
|
|
25
25
|
* All contents must be in the same language. Required.
|
|
26
26
|
* Valid Values: en | es | fr | de | it | pt | ar | hi | ja | ko | zh | zh-TW
|
|
27
27
|
*/
|
|
28
|
-
language: string;
|
|
28
|
+
language: AmazonComprehend.LanguageCode | string;
|
|
29
29
|
/**
|
|
30
30
|
* The text to analyze. Required.
|
|
31
31
|
* A UTF-8 text string. Each string must contain fewer that 5,000 bytes of UTF-8 encoded characters.
|
package/dist/src/comprehend.js
CHANGED
|
@@ -38,7 +38,10 @@ class Comprehend {
|
|
|
38
38
|
async detectSentiment(params) {
|
|
39
39
|
if (!params.language || !params.text)
|
|
40
40
|
throw new Error('Missing some parameters');
|
|
41
|
-
const command = new AmazonComprehend.DetectSentimentCommand({
|
|
41
|
+
const command = new AmazonComprehend.DetectSentimentCommand({
|
|
42
|
+
LanguageCode: params.language,
|
|
43
|
+
Text: params.text
|
|
44
|
+
});
|
|
42
45
|
const { Sentiment } = await this.client.send(command);
|
|
43
46
|
return Sentiment;
|
|
44
47
|
}
|
package/dist/src/dynamoDB.d.ts
CHANGED
|
@@ -10,8 +10,8 @@ export declare class DynamoDB {
|
|
|
10
10
|
constructor();
|
|
11
11
|
/**
|
|
12
12
|
* Convert a JSON object from DynamoDB format to simple JSON.
|
|
13
|
-
* @data the data in DynamoDB's original format to convert in plain objects
|
|
14
|
-
* @options the options to use to convert the data
|
|
13
|
+
* @param data the data in DynamoDB's original format to convert in plain objects
|
|
14
|
+
* @param options the options to use to convert the data
|
|
15
15
|
*/
|
|
16
16
|
unmarshall(data: Record<string, any>, options?: DDBUtils.unmarshallOptions): Record<string, any>;
|
|
17
17
|
/**
|
package/dist/src/dynamoDB.js
CHANGED
|
@@ -42,8 +42,8 @@ class DynamoDB {
|
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
44
|
* Convert a JSON object from DynamoDB format to simple JSON.
|
|
45
|
-
* @data the data in DynamoDB's original format to convert in plain objects
|
|
46
|
-
* @options the options to use to convert the data
|
|
45
|
+
* @param data the data in DynamoDB's original format to convert in plain objects
|
|
46
|
+
* @param options the options to use to convert the data
|
|
47
47
|
*/
|
|
48
48
|
unmarshall(data, options) {
|
|
49
49
|
return DDBUtils.unmarshall(data, options);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Note: the log level is controlled by each Lambda function's configuration.
|
|
4
4
|
*/
|
|
5
5
|
export declare class LambdaLogger {
|
|
6
|
-
shouldLog: (logLevel:
|
|
6
|
+
shouldLog: (logLevel: "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR" | "FATAL") => boolean;
|
|
7
7
|
trace: (summary: string, content?: object) => void;
|
|
8
8
|
debug: (summary: string, content?: object) => void;
|
|
9
9
|
info: (summary: string, content?: object) => void;
|
|
@@ -41,7 +41,7 @@ export declare abstract class ResourceController extends GenericController {
|
|
|
41
41
|
constructor(event: APIGatewayProxyEventV2 | APIGatewayProxyEvent, callback: Callback, options?: ResourceControllerOptions);
|
|
42
42
|
private initFromEventV2;
|
|
43
43
|
private initFromEventV1;
|
|
44
|
-
protected getEventSummary(): Record<string, any>;
|
|
44
|
+
protected getEventSummary(limitBodyArrayDisplay?: boolean): Record<string, any>;
|
|
45
45
|
/**
|
|
46
46
|
* Force the parsing of a query parameter as an array of strings.
|
|
47
47
|
*/
|
|
@@ -63,7 +63,7 @@ class ResourceController extends genericController_1.GenericController {
|
|
|
63
63
|
}
|
|
64
64
|
this.tracer.annotateColdStart();
|
|
65
65
|
this.tracer.addServiceNameAnnotation();
|
|
66
|
-
this.tracer.putMetadata('START', { event: this.getEventSummary() });
|
|
66
|
+
this.tracer.putMetadata('START', { event: this.getEventSummary(true) });
|
|
67
67
|
}
|
|
68
68
|
try {
|
|
69
69
|
await this.checkAuthBeforeRequest();
|
|
@@ -204,13 +204,13 @@ class ResourceController extends genericController_1.GenericController {
|
|
|
204
204
|
throw new genericController_1.HandledError('Malformed body');
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
|
-
getEventSummary() {
|
|
207
|
+
getEventSummary(limitBodyArrayDisplay = false) {
|
|
208
208
|
return {
|
|
209
209
|
httpMethod: this.httpMethod,
|
|
210
210
|
path: this.path,
|
|
211
211
|
principalId: this.principalId,
|
|
212
212
|
queryParams: this.queryParams,
|
|
213
|
-
body: this.body,
|
|
213
|
+
body: limitBodyArrayDisplay && Array.isArray(this.body) ? { array: this.body.length } : this.body,
|
|
214
214
|
version: this.clientVersion,
|
|
215
215
|
platform: this.clientPlatform,
|
|
216
216
|
bundle: this.clientBundle
|
package/dist/src/s3.d.ts
CHANGED
package/dist/src/ses.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "idea-aws",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.13",
|
|
4
4
|
"description": "AWS wrappers to use in IDEA's back-ends",
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -39,38 +39,38 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@aws-lambda-powertools/metrics": "^1.18.1",
|
|
41
41
|
"@aws-lambda-powertools/tracer": "^1.18.1",
|
|
42
|
-
"idea-toolbox": "^7.0.
|
|
42
|
+
"idea-toolbox": "^7.0.8",
|
|
43
43
|
"nanoid": "^3.3.7",
|
|
44
|
-
"nodemailer": "^6.9.
|
|
44
|
+
"nodemailer": "^6.9.14",
|
|
45
45
|
"source-map-support": "^0.5.21"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"@aws-sdk/client-cognito-identity-provider": "^3.
|
|
49
|
-
"@aws-sdk/client-comprehend": "^3.
|
|
50
|
-
"@aws-sdk/client-dynamodb": "^3.
|
|
51
|
-
"@aws-sdk/client-eventbridge": "^3.
|
|
52
|
-
"@aws-sdk/client-lambda": "^3.
|
|
53
|
-
"@aws-sdk/client-s3": "^3.
|
|
54
|
-
"@aws-sdk/client-secrets-manager": "^3.
|
|
55
|
-
"@aws-sdk/client-ses": "^3.
|
|
56
|
-
"@aws-sdk/client-sesv2": "^3.
|
|
57
|
-
"@aws-sdk/client-sns": "^3.
|
|
58
|
-
"@aws-sdk/client-ssm": "^3.
|
|
59
|
-
"@aws-sdk/client-translate": "^3.
|
|
60
|
-
"@aws-sdk/lib-dynamodb": "^3.
|
|
61
|
-
"@aws-sdk/lib-storage": "^3.
|
|
62
|
-
"@aws-sdk/s3-request-presigner": "^3.
|
|
63
|
-
"@aws-sdk/util-dynamodb": "^3.
|
|
48
|
+
"@aws-sdk/client-cognito-identity-provider": "^3.616.0",
|
|
49
|
+
"@aws-sdk/client-comprehend": "^3.616.0",
|
|
50
|
+
"@aws-sdk/client-dynamodb": "^3.616.0",
|
|
51
|
+
"@aws-sdk/client-eventbridge": "^3.616.0",
|
|
52
|
+
"@aws-sdk/client-lambda": "^3.616.0",
|
|
53
|
+
"@aws-sdk/client-s3": "^3.614.0",
|
|
54
|
+
"@aws-sdk/client-secrets-manager": "^3.616.0",
|
|
55
|
+
"@aws-sdk/client-ses": "^3.616.0",
|
|
56
|
+
"@aws-sdk/client-sesv2": "^3.616.0",
|
|
57
|
+
"@aws-sdk/client-sns": "^3.616.0",
|
|
58
|
+
"@aws-sdk/client-ssm": "^3.616.0",
|
|
59
|
+
"@aws-sdk/client-translate": "^3.616.0",
|
|
60
|
+
"@aws-sdk/lib-dynamodb": "^3.616.0",
|
|
61
|
+
"@aws-sdk/lib-storage": "^3.616.0",
|
|
62
|
+
"@aws-sdk/s3-request-presigner": "^3.616.0",
|
|
63
|
+
"@aws-sdk/util-dynamodb": "^3.616.0"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"@tsconfig/
|
|
67
|
-
"@types/aws-lambda": "^8.10.
|
|
68
|
-
"@types/node": "^
|
|
69
|
-
"@types/nodemailer": "^6.4.
|
|
70
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
71
|
-
"@typescript-eslint/parser": "^
|
|
72
|
-
"eslint": "^8.
|
|
73
|
-
"typedoc": "^0.
|
|
74
|
-
"typescript": "^5.
|
|
66
|
+
"@tsconfig/node20": "^20.1.4",
|
|
67
|
+
"@types/aws-lambda": "^8.10.141",
|
|
68
|
+
"@types/node": "^20.14.11",
|
|
69
|
+
"@types/nodemailer": "^6.4.15",
|
|
70
|
+
"@typescript-eslint/eslint-plugin": "^7.16.1",
|
|
71
|
+
"@typescript-eslint/parser": "^7.16.1",
|
|
72
|
+
"eslint": "^8.57.0",
|
|
73
|
+
"typedoc": "^0.26.5",
|
|
74
|
+
"typescript": "^5.5.2"
|
|
75
75
|
}
|
|
76
76
|
}
|