@allthings/cloud-toolkit 2.2.0-dev.2 → 2.2.0-dev.4

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/lib.cjs.js CHANGED
@@ -312,7 +312,7 @@ const parameterStore = (userConfig) => {
312
312
  const DEFAULT_CLIENT_CONFIG = {
313
313
  clientConfig: { region: 'eu-west-1' },
314
314
  };
315
- const sendMail = async (config, transport, options, from) => {
315
+ const sendMail = async (config, transport, options, from, responseCallback) => {
316
316
  try {
317
317
  if (!options.html && !options.text) {
318
318
  if (config.logger) {
@@ -330,8 +330,8 @@ const sendMail = async (config, transport, options, from) => {
330
330
  from,
331
331
  ...options,
332
332
  });
333
- if (config.responseCallback) {
334
- await config.responseCallback(transportResponse);
333
+ if (responseCallback) {
334
+ await responseCallback(transportResponse);
335
335
  }
336
336
  if (!transportResponse) {
337
337
  if (config.logger) {
@@ -358,7 +358,7 @@ const ses = (fromEmailAddress, userConfig) => {
358
358
  SES: { aws: aws__namespace, ses: sesClient },
359
359
  });
360
360
  return {
361
- sendMail: (options) => sendMail(config, transport, options, fromEmailAddress),
361
+ sendMail: (options, responseCallback) => sendMail(config, transport, options, fromEmailAddress, responseCallback),
362
362
  };
363
363
  };
364
364
 
package/dist/lib.esm.js CHANGED
@@ -292,7 +292,7 @@ const parameterStore = (userConfig) => {
292
292
  const DEFAULT_CLIENT_CONFIG = {
293
293
  clientConfig: { region: 'eu-west-1' },
294
294
  };
295
- const sendMail = async (config, transport, options, from) => {
295
+ const sendMail = async (config, transport, options, from, responseCallback) => {
296
296
  try {
297
297
  if (!options.html && !options.text) {
298
298
  if (config.logger) {
@@ -310,8 +310,8 @@ const sendMail = async (config, transport, options, from) => {
310
310
  from,
311
311
  ...options,
312
312
  });
313
- if (config.responseCallback) {
314
- await config.responseCallback(transportResponse);
313
+ if (responseCallback) {
314
+ await responseCallback(transportResponse);
315
315
  }
316
316
  if (!transportResponse) {
317
317
  if (config.logger) {
@@ -338,7 +338,7 @@ const ses = (fromEmailAddress, userConfig) => {
338
338
  SES: { aws, ses: sesClient },
339
339
  });
340
340
  return {
341
- sendMail: (options) => sendMail(config, transport, options, fromEmailAddress),
341
+ sendMail: (options, responseCallback) => sendMail(config, transport, options, fromEmailAddress, responseCallback),
342
342
  };
343
343
  };
344
344