idea-aws 3.16.0 → 3.16.2

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.
@@ -4,7 +4,6 @@ import { CognitoUser, Auth0User } from 'idea-toolbox';
4
4
  import { Logger } from './logger';
5
5
  import { CloudWatchMetrics } from './metrics';
6
6
  import { GenericController } from './genericController';
7
- import { DynamoDB } from './dynamoDB';
8
7
  /**
9
8
  * An abstract class to inherit to manage API requests (AWS API Gateway) in an AWS Lambda function.
10
9
  */
@@ -32,7 +31,6 @@ export declare abstract class ResourceController extends GenericController {
32
31
  protected returnStatusCode?: number;
33
32
  protected logger: Logger;
34
33
  protected logRequestsWithKey: string;
35
- protected ddbToLogRequests: DynamoDB;
36
34
  protected metrics: CloudWatchMetrics;
37
35
  protected currentLang: string;
38
36
  protected defaultLang: string;
@@ -101,8 +101,6 @@ class ResourceController extends genericController_1.GenericController {
101
101
  else
102
102
  this.initFromEventV1(event, options);
103
103
  this.logRequestsWithKey = options.logRequestsWithKey;
104
- if (this.logRequestsWithKey)
105
- this.ddbToLogRequests = new dynamoDB_1.DynamoDB();
106
104
  // acquire some info about the client, if available
107
105
  if (this.queryParams['_v']) {
108
106
  this.clientVersion = this.queryParams['_v'];
@@ -304,7 +302,7 @@ class ResourceController extends genericController_1.GenericController {
304
302
  if (this.httpMethod === 'PATCH' && this.body && this.body.action)
305
303
  log.action = this.body.action;
306
304
  try {
307
- await this.ddbToLogRequests.put({ TableName: 'idea_logs', Item: log });
305
+ await new dynamoDB_1.DynamoDB().put({ TableName: 'idea_logs', Item: log });
308
306
  }
309
307
  catch (error) {
310
308
  // ignore
package/dist/src/ses.d.ts CHANGED
@@ -130,7 +130,7 @@ export interface TemplatedEmailData extends BasicEmailData {
130
130
  /**
131
131
  * The name of the configuration set to use for the sending.
132
132
  */
133
- configurationSet: string;
133
+ configurationSet?: string;
134
134
  }
135
135
  /**
136
136
  * SES configuration.
package/dist/src/ses.js CHANGED
@@ -53,7 +53,7 @@ class SES {
53
53
  const request = {
54
54
  Destination: this.prepareEmailDestination(emailData),
55
55
  Template: emailData.template,
56
- TemplateData: JSON.stringify(emailData.templateData || {}),
56
+ TemplateData: JSON.stringify(emailData.templateData ?? {}),
57
57
  ConfigurationSetName: emailData.configurationSet,
58
58
  ReplyToAddresses: emailData.replyToAddresses,
59
59
  Source: sesParams.sourceName ? `${sesParams.sourceName} <${sesParams.source}>` : sesParams.source,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "idea-aws",
3
- "version": "3.16.0",
3
+ "version": "3.16.2",
4
4
  "description": "AWS wrappers to use in IDEA's back-ends",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",