@goldstack/template-email-send 0.4.32 → 0.4.34

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.
@@ -1,3 +1,4 @@
1
1
  import { SESClient } from '@aws-sdk/client-ses';
2
+ export declare type CreateSESClientType = (sesClient?: SESClient) => SESClient;
2
3
  export declare function createSESClient(sesClient?: SESClient): SESClient;
3
4
  //# sourceMappingURL=mockedSES.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mockedSES.d.ts","sourceRoot":"","sources":["../../src/mockedSES.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAGV,MAAM,qBAAqB,CAAC;AAK7B,wBAAgB,eAAe,CAAC,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAqBhE"}
1
+ {"version":3,"file":"mockedSES.d.ts","sourceRoot":"","sources":["../../src/mockedSES.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAGV,MAAM,qBAAqB,CAAC;AAM7B,oBAAY,mBAAmB,GAAG,CAAC,SAAS,CAAC,EAAE,SAAS,KAAK,SAAS,CAAC;AAEvE,wBAAgB,eAAe,CAAC,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAqBhE"}
@@ -1 +1 @@
1
- {"version":3,"file":"mockedSES.js","sourceRoot":"","sources":["../../src/mockedSES.ts"],"names":[],"mappings":";;;AAAA,oDAI6B;AAE7B,6DAAiD;AACjD,+BAAmC;AAEnC,SAAgB,eAAe,CAAC,SAAqB;IACnD,IAAI,CAAC,SAAS,EAAE;QACd,SAAS,GAAG,IAAI,sBAAS,EAAE,CAAC;KAC7B;IACD,MAAM,YAAY,GAAG,IAAA,gCAAU,EAAC,SAAS,CAAC,CAAC;IAE3C,MAAM,iBAAiB,GAAuB,EAAE,CAAC;IAEhD,SAAiB,CAAC,sBAAsB,GAAG,iBAAiB,CAAC;IAC9D,YAAY,CAAC,EAAE,CAAC,6BAAgB,CAAC,CAAC,SAAS,CAAC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,CAAC,CAAC,CAAC;IAEH,OAAO,SAAS,CAAC;AACnB,CAAC;AArBD,0CAqBC"}
@@ -2,6 +2,25 @@ import type { EmailSendPackage, EmailSendDeployment } from './types/EmailSendPac
2
2
  export type { EmailSendDeployment, EmailSendPackage };
3
3
  export { connect, getMockedSES, getFromDomain } from './sesConnect';
4
4
  import { SendEmailRequest, SESClient } from '@aws-sdk/client-ses';
5
- export declare function createSESClient(sesClient?: SESClient): SESClient;
5
+ import type { CreateSESClientType } from './mockedSES';
6
+ /**
7
+ * Creates an SES (Simple Email Service) client.
8
+ *
9
+ * This function returns an SES client instance. If a client is provided as an argument,
10
+ * it will be used; otherwise, a new client will be created using the mocked SES module.
11
+ *
12
+ * @param {SESClient} [sesClient] - An optional SES client instance to use.
13
+ * @returns {SESClient} The SES client instance.
14
+ */
15
+ export declare const createSESClient: CreateSESClientType;
16
+ /**
17
+ * Retrieves the list of email send requests that have been sent using the provided SES client.
18
+ *
19
+ * This function accesses the internal `_goldstackSentRequests` property of the SES client
20
+ * to return the list of email requests that have been sent.
21
+ *
22
+ * @param {SESClient} sesClient - The SES client instance from which to retrieve sent email requests.
23
+ * @returns {SendEmailRequest[]} An array of `SendEmailRequest` objects representing the sent emails.
24
+ */
6
25
  export declare function getSentEmailRequests(sesClient: SESClient): SendEmailRequest[];
7
26
  //# sourceMappingURL=templateEmailSend.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"templateEmailSend.d.ts","sourceRoot":"","sources":["../../src/templateEmailSend.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,0BAA0B,CAAC;AAElC,YAAY,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,CAAC;AAEtD,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAEpE,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAGlE,wBAAgB,eAAe,CAAC,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAGhE;AAED,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,SAAS,GAAG,gBAAgB,EAAE,CAE7E"}
1
+ {"version":3,"file":"templateEmailSend.d.ts","sourceRoot":"","sources":["../../src/templateEmailSend.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,0BAA0B,CAAC;AAElC,YAAY,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,CAAC;AAEtD,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAEpE,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAIlE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,EAAE,mBAM7B,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,SAAS,GAAG,gBAAgB,EAAE,CAE7E"}
@@ -6,11 +6,30 @@ Object.defineProperty(exports, "connect", { enumerable: true, get: function () {
6
6
  Object.defineProperty(exports, "getMockedSES", { enumerable: true, get: function () { return sesConnect_1.getMockedSES; } });
7
7
  Object.defineProperty(exports, "getFromDomain", { enumerable: true, get: function () { return sesConnect_1.getFromDomain; } });
8
8
  const utils_esbuild_1 = require("@goldstack/utils-esbuild");
9
- function createSESClient(sesClient) {
9
+ /**
10
+ * Creates an SES (Simple Email Service) client.
11
+ *
12
+ * This function returns an SES client instance. If a client is provided as an argument,
13
+ * it will be used; otherwise, a new client will be created using the mocked SES module.
14
+ *
15
+ * @param {SESClient} [sesClient] - An optional SES client instance to use.
16
+ * @returns {SESClient} The SES client instance.
17
+ */
18
+ const createSESClient = (sesClient) => {
10
19
  // eslint-disable-next-line @typescript-eslint/no-var-requires
11
- return require((0, utils_esbuild_1.excludeInBundle)('./mockedSES')).createSESClient(sesClient);
12
- }
20
+ const createSESClient = require((0, utils_esbuild_1.excludeInBundle)('./mockedSES')).createSESClient;
21
+ return createSESClient(sesClient);
22
+ };
13
23
  exports.createSESClient = createSESClient;
24
+ /**
25
+ * Retrieves the list of email send requests that have been sent using the provided SES client.
26
+ *
27
+ * This function accesses the internal `_goldstackSentRequests` property of the SES client
28
+ * to return the list of email requests that have been sent.
29
+ *
30
+ * @param {SESClient} sesClient - The SES client instance from which to retrieve sent email requests.
31
+ * @returns {SendEmailRequest[]} An array of `SendEmailRequest` objects representing the sent emails.
32
+ */
14
33
  function getSentEmailRequests(sesClient) {
15
34
  return sesClient._goldstackSentRequests;
16
35
  }
@@ -1 +1 @@
1
- {"version":3,"file":"templateEmailSend.js","sourceRoot":"","sources":["../../src/templateEmailSend.ts"],"names":[],"mappings":";;;AAOA,2CAAoE;AAA3D,qGAAA,OAAO,OAAA;AAAE,0GAAA,YAAY,OAAA;AAAE,2GAAA,aAAa,OAAA;AAG7C,4DAA2D;AAE3D,SAAgB,eAAe,CAAC,SAAqB;IACnD,8DAA8D;IAC9D,OAAO,OAAO,CAAC,IAAA,+BAAe,EAAC,aAAa,CAAC,CAAC,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;AAC5E,CAAC;AAHD,0CAGC;AAED,SAAgB,oBAAoB,CAAC,SAAoB;IACvD,OAAQ,SAAiB,CAAC,sBAAsB,CAAC;AACnD,CAAC;AAFD,oDAEC"}
1
+ {"version":3,"file":"templateEmailSend.js","sourceRoot":"","sources":["../../src/templateEmailSend.ts"],"names":[],"mappings":";;;AAOA,2CAAoE;AAA3D,qGAAA,OAAO,OAAA;AAAE,0GAAA,YAAY,OAAA;AAAE,2GAAA,aAAa,OAAA;AAG7C,4DAA2D;AAK3D;;;;;;;;GAQG;AACI,MAAM,eAAe,GAAwB,CAAC,SAAS,EAAE,EAAE;IAChE,8DAA8D;IAC9D,MAAM,eAAe,GAAwB,OAAO,CAAC,IAAA,+BAAe,EAClE,aAAa,CACd,CAAC,CAAC,eAAe,CAAC;IACnB,OAAO,eAAe,CAAC,SAAS,CAAC,CAAC;AACpC,CAAC,CAAC;AANW,QAAA,eAAe,mBAM1B;AAEF;;;;;;;;GAQG;AACH,SAAgB,oBAAoB,CAAC,SAAoB;IACvD,OAAQ,SAAiB,CAAC,sBAAsB,CAAC;AACnD,CAAC;AAFD,oDAEC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goldstack/template-email-send",
3
- "version": "0.4.32",
3
+ "version": "0.4.34",
4
4
  "description": "Utilities for packages that implement email sending using AWS SES",
5
5
  "keywords": [
6
6
  "goldstack",
@@ -42,16 +42,16 @@
42
42
  },
43
43
  "dependencies": {
44
44
  "@aws-sdk/client-ses": "^3.645.0",
45
- "@aws-sdk/credential-providers": "^3.645.0",
45
+ "@aws-sdk/credential-providers": "3.645.0",
46
46
  "@aws-sdk/types": "^3.609.0",
47
47
  "@goldstack/infra": "0.4.12",
48
- "@goldstack/infra-aws": "0.4.20",
48
+ "@goldstack/infra-aws": "0.4.21",
49
49
  "@goldstack/utils-cli": "0.3.10",
50
50
  "@goldstack/utils-esbuild": "0.5.9",
51
51
  "@goldstack/utils-package": "0.4.12",
52
52
  "@goldstack/utils-package-config-embedded": "0.5.13",
53
- "@goldstack/utils-terraform": "0.4.25",
54
- "@goldstack/utils-terraform-aws": "0.4.28",
53
+ "@goldstack/utils-terraform": "0.4.26",
54
+ "@goldstack/utils-terraform-aws": "0.4.29",
55
55
  "aws-sdk-client-mock": "^4.0.1",
56
56
  "uuid": "^8.3.0"
57
57
  },