From 8c020ccac31c534e6cee5e32eb7e779239efe04b Mon Sep 17 00:00:00 2001 From: Alex Yang <32620988+DatProJack@users.noreply.github.com> Date: Mon, 8 Jul 2024 11:24:12 -0500 Subject: [PATCH 1/5] saving progress: --- package.json | 1 + src/middleware/ses.ts | 19 + src/services/ses/ses-router.ts | 52 +++ src/services/ses/ses-schema.ts | 10 + src/services/ses/ses-utils.ts | 16 + yarn.lock | 761 +++++++++++++++++++++++++++++++++ 6 files changed, 859 insertions(+) create mode 100644 src/middleware/ses.ts create mode 100644 src/services/ses/ses-router.ts create mode 100644 src/services/ses/ses-schema.ts create mode 100644 src/services/ses/ses-utils.ts diff --git a/package.json b/package.json index 77e56f5..b0f744e 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ }, "dependencies": { "@aws-sdk/client-s3": "^3.496.0", + "@aws-sdk/client-ses": "^3.609.0", "@aws-sdk/s3-presigned-post": "^3.499.0", "@aws-sdk/s3-request-presigner": "^3.496.0", "@paralleldrive/cuid2": "^2.2.2", diff --git a/src/middleware/ses.ts b/src/middleware/ses.ts new file mode 100644 index 0000000..058c42c --- /dev/null +++ b/src/middleware/ses.ts @@ -0,0 +1,19 @@ +import { NextFunction, Request, Response } from "express"; +import { SESClient } from "@aws-sdk/client-ses"; +import { Config } from "../config"; + +export function sesClientMiddleware( + _: Request, + res: Response, + next: NextFunction +): void { + res.locals.sesClient = new SESClient({ + region: Config.S3_REGION, + credentials: { + accessKeyId: Config.S3_ACCESS_KEY, + secretAccessKey: Config.S3_SECRET_KEY, + }, + }); + + return next(); +} diff --git a/src/services/ses/ses-router.ts b/src/services/ses/ses-router.ts new file mode 100644 index 0000000..7103b18 --- /dev/null +++ b/src/services/ses/ses-router.ts @@ -0,0 +1,52 @@ +import { Request, Response, Router } from "express"; +import RoleChecker from "../../middleware/role-checker"; +import { StatusCodes } from "http-status-codes"; +// import { Config } from "../../config"; +import { Role } from "../auth/auth-models"; +import { sesClientMiddleware } from "../../middleware/ses"; +import { SESClient } from "@aws-sdk/client-ses"; +import { createCreateTemplateCommand } from "./ses-utils"; + +const sesRouter: Router = Router(); + +sesRouter.post( + "/template", + RoleChecker([Role.enum.STAFF], false), + sesClientMiddleware, + async (req: Request, res: Response) => { + const ses = res.locals.ses as SESClient; + + const createTemplateCommand = createCreateTemplateCommand(); + console.log(ses.send(createTemplateCommand)); + } +); + +sesRouter.post( + "/email", + RoleChecker([Role.enum.STAFF], false), + sesClientMiddleware, + async (req: Request, res: Response) => { + //recipients (by userid) + //template + //data + //idk + //we'll have a function to send mail + //individually given the data + + //we could have a template and then + //for the sub values j follow + //assumes we're grabbing from the attendee + //profile + //ex + //sub values = ["name", "points"] + // ... etc + //which will have to match the template {{name}}, {{points}} + + // const userId: string = req.params.USERID; + // const ses = res.locals.ses as SESClient; + + return res.status(StatusCodes.OK).send({ ok: "ok!" }); + } +); + +export default sesRouter; diff --git a/src/services/ses/ses-schema.ts b/src/services/ses/ses-schema.ts new file mode 100644 index 0000000..9be550c --- /dev/null +++ b/src/services/ses/ses-schema.ts @@ -0,0 +1,10 @@ +import { z } from "zod"; + +// Zod schema for email requests +const NotificationsValidator = z.object({ + recipients: z.string(), + template: z.string(), + //should be able to work out subs from template +}); + +export { NotificationsValidator }; diff --git a/src/services/ses/ses-utils.ts b/src/services/ses/ses-utils.ts new file mode 100644 index 0000000..3b2a93a --- /dev/null +++ b/src/services/ses/ses-utils.ts @@ -0,0 +1,16 @@ +import { CreateTemplateCommand } from "@aws-sdk/client-ses"; + +export const createCreateTemplateCommand = () => { + return new CreateTemplateCommand({ + Template: { + TemplateName: "tester_template", + HtmlPart: ` +
+ Did you know Amazon has a mascot named Peccy? +
+ `, + SubjectPart: "Amazon Tip", + }, + }); +}; diff --git a/yarn.lock b/yarn.lock index e949d7d..0b2787f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -62,6 +62,19 @@ "@aws-sdk/util-utf8-browser" "^3.0.0" tslib "^1.11.1" +"@aws-crypto/sha256-browser@5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@aws-crypto/sha256-browser/-/sha256-browser-5.2.0.tgz#153895ef1dba6f9fce38af550e0ef58988eb649e" + integrity sha512-AXfN/lGotSQwu6HNcEsIASo7kWXZ5HYWvfOmSNKDsEqC4OashTp8alTmaz+F7TC2L083SFv5RdB+qU3Vs1kZqw== + dependencies: + "@aws-crypto/sha256-js" "^5.2.0" + "@aws-crypto/supports-web-crypto" "^5.2.0" + "@aws-crypto/util" "^5.2.0" + "@aws-sdk/types" "^3.222.0" + "@aws-sdk/util-locate-window" "^3.0.0" + "@smithy/util-utf8" "^2.0.0" + tslib "^2.6.2" + "@aws-crypto/sha256-js@3.0.0", "@aws-crypto/sha256-js@^3.0.0": version "3.0.0" resolved "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-3.0.0.tgz" @@ -71,6 +84,15 @@ "@aws-sdk/types" "^3.222.0" tslib "^1.11.1" +"@aws-crypto/sha256-js@5.2.0", "@aws-crypto/sha256-js@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@aws-crypto/sha256-js/-/sha256-js-5.2.0.tgz#c4fdb773fdbed9a664fc1a95724e206cf3860042" + integrity sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA== + dependencies: + "@aws-crypto/util" "^5.2.0" + "@aws-sdk/types" "^3.222.0" + tslib "^2.6.2" + "@aws-crypto/supports-web-crypto@^3.0.0": version "3.0.0" resolved "https://registry.npmjs.org/@aws-crypto/supports-web-crypto/-/supports-web-crypto-3.0.0.tgz" @@ -78,6 +100,13 @@ dependencies: tslib "^1.11.1" +"@aws-crypto/supports-web-crypto@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@aws-crypto/supports-web-crypto/-/supports-web-crypto-5.2.0.tgz#a1e399af29269be08e695109aa15da0a07b5b5fb" + integrity sha512-iAvUotm021kM33eCdNfwIN//F77/IADDSs58i+MDaOqFrVjZo9bAal0NK7HurRuWLLpF1iLX7gbWrjHjeo+YFg== + dependencies: + tslib "^2.6.2" + "@aws-crypto/util@^3.0.0": version "3.0.0" resolved "https://registry.npmjs.org/@aws-crypto/util/-/util-3.0.0.tgz" @@ -87,6 +116,15 @@ "@aws-sdk/util-utf8-browser" "^3.0.0" tslib "^1.11.1" +"@aws-crypto/util@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@aws-crypto/util/-/util-5.2.0.tgz#71284c9cffe7927ddadac793c14f14886d3876da" + integrity sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ== + dependencies: + "@aws-sdk/types" "^3.222.0" + "@smithy/util-utf8" "^2.0.0" + tslib "^2.6.2" + "@aws-sdk/client-s3@3.590.0", "@aws-sdk/client-s3@^3.496.0": version "3.590.0" resolved "https://registry.npmjs.org/@aws-sdk/client-s3/-/client-s3-3.590.0.tgz" @@ -151,6 +189,54 @@ "@smithy/util-waiter" "^3.0.0" tslib "^2.6.2" +"@aws-sdk/client-ses@^3.609.0": + version "3.609.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/client-ses/-/client-ses-3.609.0.tgz#7415fd1964981f7fe895ca995f004fad2f2c58a4" + integrity sha512-tfTfTl8IuKcOLFSlUA6XCSbzAVQ+MCdCl0Fme2Rd/GsKgB3Momyh4HcVHI09S5HaYTo/7P3ovJBOdv6JcKVDDw== + dependencies: + "@aws-crypto/sha256-browser" "5.2.0" + "@aws-crypto/sha256-js" "5.2.0" + "@aws-sdk/client-sso-oidc" "3.609.0" + "@aws-sdk/client-sts" "3.609.0" + "@aws-sdk/core" "3.609.0" + "@aws-sdk/credential-provider-node" "3.609.0" + "@aws-sdk/middleware-host-header" "3.609.0" + "@aws-sdk/middleware-logger" "3.609.0" + "@aws-sdk/middleware-recursion-detection" "3.609.0" + "@aws-sdk/middleware-user-agent" "3.609.0" + "@aws-sdk/region-config-resolver" "3.609.0" + "@aws-sdk/types" "3.609.0" + "@aws-sdk/util-endpoints" "3.609.0" + "@aws-sdk/util-user-agent-browser" "3.609.0" + "@aws-sdk/util-user-agent-node" "3.609.0" + "@smithy/config-resolver" "^3.0.4" + "@smithy/core" "^2.2.4" + "@smithy/fetch-http-handler" "^3.2.0" + "@smithy/hash-node" "^3.0.3" + "@smithy/invalid-dependency" "^3.0.3" + "@smithy/middleware-content-length" "^3.0.3" + "@smithy/middleware-endpoint" "^3.0.4" + "@smithy/middleware-retry" "^3.0.7" + "@smithy/middleware-serde" "^3.0.3" + "@smithy/middleware-stack" "^3.0.3" + "@smithy/node-config-provider" "^3.1.3" + "@smithy/node-http-handler" "^3.1.1" + "@smithy/protocol-http" "^4.0.3" + "@smithy/smithy-client" "^3.1.5" + "@smithy/types" "^3.3.0" + "@smithy/url-parser" "^3.0.3" + "@smithy/util-base64" "^3.0.0" + "@smithy/util-body-length-browser" "^3.0.0" + "@smithy/util-body-length-node" "^3.0.0" + "@smithy/util-defaults-mode-browser" "^3.0.7" + "@smithy/util-defaults-mode-node" "^3.0.7" + "@smithy/util-endpoints" "^2.0.4" + "@smithy/util-middleware" "^3.0.3" + "@smithy/util-retry" "^3.0.3" + "@smithy/util-utf8" "^3.0.0" + "@smithy/util-waiter" "^3.1.2" + tslib "^2.6.2" + "@aws-sdk/client-sso-oidc@3.590.0": version "3.590.0" resolved "https://registry.npmjs.org/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.590.0.tgz" @@ -197,6 +283,51 @@ "@smithy/util-utf8" "^3.0.0" tslib "^2.6.2" +"@aws-sdk/client-sso-oidc@3.609.0": + version "3.609.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.609.0.tgz#66b3cdf6c1ede12423046ea0d0b5889655565e1a" + integrity sha512-0bNPAyPdkWkS9EGB2A9BZDkBNrnVCBzk5lYRezoT4K3/gi9w1DTYH5tuRdwaTZdxW19U1mq7CV0YJJARKO1L9Q== + dependencies: + "@aws-crypto/sha256-browser" "5.2.0" + "@aws-crypto/sha256-js" "5.2.0" + "@aws-sdk/core" "3.609.0" + "@aws-sdk/credential-provider-node" "3.609.0" + "@aws-sdk/middleware-host-header" "3.609.0" + "@aws-sdk/middleware-logger" "3.609.0" + "@aws-sdk/middleware-recursion-detection" "3.609.0" + "@aws-sdk/middleware-user-agent" "3.609.0" + "@aws-sdk/region-config-resolver" "3.609.0" + "@aws-sdk/types" "3.609.0" + "@aws-sdk/util-endpoints" "3.609.0" + "@aws-sdk/util-user-agent-browser" "3.609.0" + "@aws-sdk/util-user-agent-node" "3.609.0" + "@smithy/config-resolver" "^3.0.4" + "@smithy/core" "^2.2.4" + "@smithy/fetch-http-handler" "^3.2.0" + "@smithy/hash-node" "^3.0.3" + "@smithy/invalid-dependency" "^3.0.3" + "@smithy/middleware-content-length" "^3.0.3" + "@smithy/middleware-endpoint" "^3.0.4" + "@smithy/middleware-retry" "^3.0.7" + "@smithy/middleware-serde" "^3.0.3" + "@smithy/middleware-stack" "^3.0.3" + "@smithy/node-config-provider" "^3.1.3" + "@smithy/node-http-handler" "^3.1.1" + "@smithy/protocol-http" "^4.0.3" + "@smithy/smithy-client" "^3.1.5" + "@smithy/types" "^3.3.0" + "@smithy/url-parser" "^3.0.3" + "@smithy/util-base64" "^3.0.0" + "@smithy/util-body-length-browser" "^3.0.0" + "@smithy/util-body-length-node" "^3.0.0" + "@smithy/util-defaults-mode-browser" "^3.0.7" + "@smithy/util-defaults-mode-node" "^3.0.7" + "@smithy/util-endpoints" "^2.0.4" + "@smithy/util-middleware" "^3.0.3" + "@smithy/util-retry" "^3.0.3" + "@smithy/util-utf8" "^3.0.0" + tslib "^2.6.2" + "@aws-sdk/client-sso@3.590.0": version "3.590.0" resolved "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.590.0.tgz" @@ -241,6 +372,50 @@ "@smithy/util-utf8" "^3.0.0" tslib "^2.6.2" +"@aws-sdk/client-sso@3.609.0": + version "3.609.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/client-sso/-/client-sso-3.609.0.tgz#2a99166694b64947ba5b7453f057772bd3bba5b8" + integrity sha512-gqXGFDkIpKHCKAbeJK4aIDt3tiwJ26Rf5Tqw9JS6BYXsdMeOB8FTzqD9R+Yc1epHd8s5L94sdqXT5PapgxFZrg== + dependencies: + "@aws-crypto/sha256-browser" "5.2.0" + "@aws-crypto/sha256-js" "5.2.0" + "@aws-sdk/core" "3.609.0" + "@aws-sdk/middleware-host-header" "3.609.0" + "@aws-sdk/middleware-logger" "3.609.0" + "@aws-sdk/middleware-recursion-detection" "3.609.0" + "@aws-sdk/middleware-user-agent" "3.609.0" + "@aws-sdk/region-config-resolver" "3.609.0" + "@aws-sdk/types" "3.609.0" + "@aws-sdk/util-endpoints" "3.609.0" + "@aws-sdk/util-user-agent-browser" "3.609.0" + "@aws-sdk/util-user-agent-node" "3.609.0" + "@smithy/config-resolver" "^3.0.4" + "@smithy/core" "^2.2.4" + "@smithy/fetch-http-handler" "^3.2.0" + "@smithy/hash-node" "^3.0.3" + "@smithy/invalid-dependency" "^3.0.3" + "@smithy/middleware-content-length" "^3.0.3" + "@smithy/middleware-endpoint" "^3.0.4" + "@smithy/middleware-retry" "^3.0.7" + "@smithy/middleware-serde" "^3.0.3" + "@smithy/middleware-stack" "^3.0.3" + "@smithy/node-config-provider" "^3.1.3" + "@smithy/node-http-handler" "^3.1.1" + "@smithy/protocol-http" "^4.0.3" + "@smithy/smithy-client" "^3.1.5" + "@smithy/types" "^3.3.0" + "@smithy/url-parser" "^3.0.3" + "@smithy/util-base64" "^3.0.0" + "@smithy/util-body-length-browser" "^3.0.0" + "@smithy/util-body-length-node" "^3.0.0" + "@smithy/util-defaults-mode-browser" "^3.0.7" + "@smithy/util-defaults-mode-node" "^3.0.7" + "@smithy/util-endpoints" "^2.0.4" + "@smithy/util-middleware" "^3.0.3" + "@smithy/util-retry" "^3.0.3" + "@smithy/util-utf8" "^3.0.0" + tslib "^2.6.2" + "@aws-sdk/client-sts@3.590.0": version "3.590.0" resolved "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.590.0.tgz" @@ -287,6 +462,52 @@ "@smithy/util-utf8" "^3.0.0" tslib "^2.6.2" +"@aws-sdk/client-sts@3.609.0": + version "3.609.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/client-sts/-/client-sts-3.609.0.tgz#ac373baf1d4c02adcf6162f0a6f099607046a44c" + integrity sha512-A0B3sDKFoFlGo8RYRjDBWHXpbgirer2bZBkCIzhSPHc1vOFHt/m2NcUoE2xnBKXJFrptL1xDkvo1P+XYp/BfcQ== + dependencies: + "@aws-crypto/sha256-browser" "5.2.0" + "@aws-crypto/sha256-js" "5.2.0" + "@aws-sdk/client-sso-oidc" "3.609.0" + "@aws-sdk/core" "3.609.0" + "@aws-sdk/credential-provider-node" "3.609.0" + "@aws-sdk/middleware-host-header" "3.609.0" + "@aws-sdk/middleware-logger" "3.609.0" + "@aws-sdk/middleware-recursion-detection" "3.609.0" + "@aws-sdk/middleware-user-agent" "3.609.0" + "@aws-sdk/region-config-resolver" "3.609.0" + "@aws-sdk/types" "3.609.0" + "@aws-sdk/util-endpoints" "3.609.0" + "@aws-sdk/util-user-agent-browser" "3.609.0" + "@aws-sdk/util-user-agent-node" "3.609.0" + "@smithy/config-resolver" "^3.0.4" + "@smithy/core" "^2.2.4" + "@smithy/fetch-http-handler" "^3.2.0" + "@smithy/hash-node" "^3.0.3" + "@smithy/invalid-dependency" "^3.0.3" + "@smithy/middleware-content-length" "^3.0.3" + "@smithy/middleware-endpoint" "^3.0.4" + "@smithy/middleware-retry" "^3.0.7" + "@smithy/middleware-serde" "^3.0.3" + "@smithy/middleware-stack" "^3.0.3" + "@smithy/node-config-provider" "^3.1.3" + "@smithy/node-http-handler" "^3.1.1" + "@smithy/protocol-http" "^4.0.3" + "@smithy/smithy-client" "^3.1.5" + "@smithy/types" "^3.3.0" + "@smithy/url-parser" "^3.0.3" + "@smithy/util-base64" "^3.0.0" + "@smithy/util-body-length-browser" "^3.0.0" + "@smithy/util-body-length-node" "^3.0.0" + "@smithy/util-defaults-mode-browser" "^3.0.7" + "@smithy/util-defaults-mode-node" "^3.0.7" + "@smithy/util-endpoints" "^2.0.4" + "@smithy/util-middleware" "^3.0.3" + "@smithy/util-retry" "^3.0.3" + "@smithy/util-utf8" "^3.0.0" + tslib "^2.6.2" + "@aws-sdk/core@3.588.0": version "3.588.0" resolved "https://registry.npmjs.org/@aws-sdk/core/-/core-3.588.0.tgz" @@ -300,6 +521,19 @@ fast-xml-parser "4.2.5" tslib "^2.6.2" +"@aws-sdk/core@3.609.0": + version "3.609.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/core/-/core-3.609.0.tgz#4c3994cd341452d1ef1a8b5e81a16442a7422287" + integrity sha512-ptqw+DTxLr01+pKjDUuo53SEDzI+7nFM3WfQaEo0yhDg8vWw8PER4sWj1Ysx67ksctnZesPUjqxd5SHbtdBxiA== + dependencies: + "@smithy/core" "^2.2.4" + "@smithy/protocol-http" "^4.0.3" + "@smithy/signature-v4" "^3.1.2" + "@smithy/smithy-client" "^3.1.5" + "@smithy/types" "^3.3.0" + fast-xml-parser "4.2.5" + tslib "^2.6.2" + "@aws-sdk/credential-provider-env@3.587.0": version "3.587.0" resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.587.0.tgz" @@ -310,6 +544,16 @@ "@smithy/types" "^3.0.0" tslib "^2.6.2" +"@aws-sdk/credential-provider-env@3.609.0": + version "3.609.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-env/-/credential-provider-env-3.609.0.tgz#b3f32e5a8ff8b541e151eadadfb60283aa3d835e" + integrity sha512-v69ZCWcec2iuV9vLVJMa6fAb5xwkzN4jYIT8yjo2c4Ia/j976Q+TPf35Pnz5My48Xr94EFcaBazrWedF+kwfuQ== + dependencies: + "@aws-sdk/types" "3.609.0" + "@smithy/property-provider" "^3.1.3" + "@smithy/types" "^3.3.0" + tslib "^2.6.2" + "@aws-sdk/credential-provider-http@3.587.0": version "3.587.0" resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.587.0.tgz" @@ -325,6 +569,21 @@ "@smithy/util-stream" "^3.0.1" tslib "^2.6.2" +"@aws-sdk/credential-provider-http@3.609.0": + version "3.609.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-http/-/credential-provider-http-3.609.0.tgz#836c042a012bf1b9ff9df9ae9e3d876bb492c82e" + integrity sha512-GQQfB9Mk4XUZwaPsk4V3w8MqleS6ApkZKVQn3vTLAKa8Y7B2Imcpe5zWbKYjDd8MPpMWjHcBGFTVlDRFP4zwSQ== + dependencies: + "@aws-sdk/types" "3.609.0" + "@smithy/fetch-http-handler" "^3.2.0" + "@smithy/node-http-handler" "^3.1.1" + "@smithy/property-provider" "^3.1.3" + "@smithy/protocol-http" "^4.0.3" + "@smithy/smithy-client" "^3.1.5" + "@smithy/types" "^3.3.0" + "@smithy/util-stream" "^3.0.5" + tslib "^2.6.2" + "@aws-sdk/credential-provider-ini@3.590.0": version "3.590.0" resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.590.0.tgz" @@ -342,6 +601,23 @@ "@smithy/types" "^3.0.0" tslib "^2.6.2" +"@aws-sdk/credential-provider-ini@3.609.0": + version "3.609.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.609.0.tgz#5b569a7fb8cddd0fecb1dd6444ae0599fb27121e" + integrity sha512-hwaBfXuBTv6/eAdEsDfGcteYUW6Km7lvvubbxEdxIuJNF3vswR7RMGIXaEC37hhPkTTgd3H0TONammhwZIfkog== + dependencies: + "@aws-sdk/credential-provider-env" "3.609.0" + "@aws-sdk/credential-provider-http" "3.609.0" + "@aws-sdk/credential-provider-process" "3.609.0" + "@aws-sdk/credential-provider-sso" "3.609.0" + "@aws-sdk/credential-provider-web-identity" "3.609.0" + "@aws-sdk/types" "3.609.0" + "@smithy/credential-provider-imds" "^3.1.3" + "@smithy/property-provider" "^3.1.3" + "@smithy/shared-ini-file-loader" "^3.1.3" + "@smithy/types" "^3.3.0" + tslib "^2.6.2" + "@aws-sdk/credential-provider-node@3.590.0": version "3.590.0" resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.590.0.tgz" @@ -360,6 +636,24 @@ "@smithy/types" "^3.0.0" tslib "^2.6.2" +"@aws-sdk/credential-provider-node@3.609.0": + version "3.609.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-node/-/credential-provider-node-3.609.0.tgz#9abcf6c9104310cc4fba70d95f0b9029ba54dea9" + integrity sha512-4J8/JRuqfxJDGD9jTHVCBxCvYt7/Vgj2Stlhj930mrjFPO/yRw8ilAAZxBWe0JHPX3QwepCmh4ErZe53F5ysxQ== + dependencies: + "@aws-sdk/credential-provider-env" "3.609.0" + "@aws-sdk/credential-provider-http" "3.609.0" + "@aws-sdk/credential-provider-ini" "3.609.0" + "@aws-sdk/credential-provider-process" "3.609.0" + "@aws-sdk/credential-provider-sso" "3.609.0" + "@aws-sdk/credential-provider-web-identity" "3.609.0" + "@aws-sdk/types" "3.609.0" + "@smithy/credential-provider-imds" "^3.1.3" + "@smithy/property-provider" "^3.1.3" + "@smithy/shared-ini-file-loader" "^3.1.3" + "@smithy/types" "^3.3.0" + tslib "^2.6.2" + "@aws-sdk/credential-provider-process@3.587.0": version "3.587.0" resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.587.0.tgz" @@ -371,6 +665,17 @@ "@smithy/types" "^3.0.0" tslib "^2.6.2" +"@aws-sdk/credential-provider-process@3.609.0": + version "3.609.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-process/-/credential-provider-process-3.609.0.tgz#2bfa160eec4be8532a45061810466ee3462ce240" + integrity sha512-Ux35nGOSJKZWUIM3Ny0ROZ8cqPRUEkh+tR3X2o9ydEbFiLq3eMMyEnHJqx4EeUjLRchidlm4CCid9GxMe5/gdw== + dependencies: + "@aws-sdk/types" "3.609.0" + "@smithy/property-provider" "^3.1.3" + "@smithy/shared-ini-file-loader" "^3.1.3" + "@smithy/types" "^3.3.0" + tslib "^2.6.2" + "@aws-sdk/credential-provider-sso@3.590.0": version "3.590.0" resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.590.0.tgz" @@ -384,6 +689,19 @@ "@smithy/types" "^3.0.0" tslib "^2.6.2" +"@aws-sdk/credential-provider-sso@3.609.0": + version "3.609.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.609.0.tgz#94da403a000060700a34ee62fcf119fd4cacf167" + integrity sha512-oQPGDKMMIxjvTcm86g07RPYeC7mCNk+29dPpY15ZAPRpAF7F0tircsC3wT9fHzNaKShEyK5LuI5Kg/uxsdy+Iw== + dependencies: + "@aws-sdk/client-sso" "3.609.0" + "@aws-sdk/token-providers" "3.609.0" + "@aws-sdk/types" "3.609.0" + "@smithy/property-provider" "^3.1.3" + "@smithy/shared-ini-file-loader" "^3.1.3" + "@smithy/types" "^3.3.0" + tslib "^2.6.2" + "@aws-sdk/credential-provider-web-identity@3.587.0": version "3.587.0" resolved "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.587.0.tgz" @@ -394,6 +712,16 @@ "@smithy/types" "^3.0.0" tslib "^2.6.2" +"@aws-sdk/credential-provider-web-identity@3.609.0": + version "3.609.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.609.0.tgz#d29222d6894347ee89c781ea090d388656df1d2a" + integrity sha512-U+PG8NhlYYF45zbr1km3ROtBMYqyyj/oK8NRp++UHHeuavgrP+4wJ4wQnlEaKvJBjevfo3+dlIBcaeQ7NYejWg== + dependencies: + "@aws-sdk/types" "3.609.0" + "@smithy/property-provider" "^3.1.3" + "@smithy/types" "^3.3.0" + tslib "^2.6.2" + "@aws-sdk/middleware-bucket-endpoint@3.587.0": version "3.587.0" resolved "https://registry.npmjs.org/@aws-sdk/middleware-bucket-endpoint/-/middleware-bucket-endpoint-3.587.0.tgz" @@ -441,6 +769,16 @@ "@smithy/types" "^3.0.0" tslib "^2.6.2" +"@aws-sdk/middleware-host-header@3.609.0": + version "3.609.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-host-header/-/middleware-host-header-3.609.0.tgz#844302cb905e4d09b9a1ea4bfa96729833068913" + integrity sha512-iTKfo158lc4jLDfYeZmYMIBHsn8m6zX+XB6birCSNZ/rrlzAkPbGE43CNdKfvjyWdqgLMRXF+B+OcZRvqhMXPQ== + dependencies: + "@aws-sdk/types" "3.609.0" + "@smithy/protocol-http" "^4.0.3" + "@smithy/types" "^3.3.0" + tslib "^2.6.2" + "@aws-sdk/middleware-location-constraint@3.577.0": version "3.577.0" resolved "https://registry.npmjs.org/@aws-sdk/middleware-location-constraint/-/middleware-location-constraint-3.577.0.tgz" @@ -459,6 +797,15 @@ "@smithy/types" "^3.0.0" tslib "^2.6.2" +"@aws-sdk/middleware-logger@3.609.0": + version "3.609.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-logger/-/middleware-logger-3.609.0.tgz#ed44d201f091b8bac908cbf14724c7a4d492553f" + integrity sha512-S62U2dy4jMDhDFDK5gZ4VxFdWzCtLzwbYyFZx2uvPYTECkepLUfzLic2BHg2Qvtu4QjX+oGE3P/7fwaGIsGNuQ== + dependencies: + "@aws-sdk/types" "3.609.0" + "@smithy/types" "^3.3.0" + tslib "^2.6.2" + "@aws-sdk/middleware-recursion-detection@3.577.0": version "3.577.0" resolved "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.577.0.tgz" @@ -469,6 +816,16 @@ "@smithy/types" "^3.0.0" tslib "^2.6.2" +"@aws-sdk/middleware-recursion-detection@3.609.0": + version "3.609.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.609.0.tgz#b7b869aaeac021a43dbea1435eaea81e5d2460b1" + integrity sha512-6sewsYB7/o/nbUfA99Aa/LokM+a/u4Wpm/X2o0RxOsDtSB795ObebLJe2BxY5UssbGaWkn7LswyfvrdZNXNj1w== + dependencies: + "@aws-sdk/types" "3.609.0" + "@smithy/protocol-http" "^4.0.3" + "@smithy/types" "^3.3.0" + tslib "^2.6.2" + "@aws-sdk/middleware-sdk-s3@3.587.0": version "3.587.0" resolved "https://registry.npmjs.org/@aws-sdk/middleware-sdk-s3/-/middleware-sdk-s3-3.587.0.tgz" @@ -517,6 +874,17 @@ "@smithy/types" "^3.0.0" tslib "^2.6.2" +"@aws-sdk/middleware-user-agent@3.609.0": + version "3.609.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.609.0.tgz#eb3b7c604817be42f7ecd97988dda69a22e6011b" + integrity sha512-nbq7MXRmeXm4IDqh+sJRAxGPAq0OfGmGIwKvJcw66hLoG8CmhhVMZmIAEBDFr57S+YajGwnLLRt+eMI05MMeVA== + dependencies: + "@aws-sdk/types" "3.609.0" + "@aws-sdk/util-endpoints" "3.609.0" + "@smithy/protocol-http" "^4.0.3" + "@smithy/types" "^3.3.0" + tslib "^2.6.2" + "@aws-sdk/region-config-resolver@3.587.0": version "3.587.0" resolved "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.587.0.tgz" @@ -529,6 +897,18 @@ "@smithy/util-middleware" "^3.0.0" tslib "^2.6.2" +"@aws-sdk/region-config-resolver@3.609.0": + version "3.609.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/region-config-resolver/-/region-config-resolver-3.609.0.tgz#68fe568d1c69f35f7fa3d66f718bd5751b1debda" + integrity sha512-lMHBG8zg9GWYBc9/XVPKyuAUd7iKqfPP7z04zGta2kGNOKbUTeqmAdc1gJGku75p4kglIPlGBorOxti8DhRmKw== + dependencies: + "@aws-sdk/types" "3.609.0" + "@smithy/node-config-provider" "^3.1.3" + "@smithy/types" "^3.3.0" + "@smithy/util-config-provider" "^3.0.0" + "@smithy/util-middleware" "^3.0.3" + tslib "^2.6.2" + "@aws-sdk/s3-presigned-post@^3.499.0": version "3.590.0" resolved "https://registry.npmjs.org/@aws-sdk/s3-presigned-post/-/s3-presigned-post-3.590.0.tgz" @@ -581,6 +961,17 @@ "@smithy/types" "^3.0.0" tslib "^2.6.2" +"@aws-sdk/token-providers@3.609.0": + version "3.609.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/token-providers/-/token-providers-3.609.0.tgz#cfa9cdc84fefe71277c7d44b08b09f42c16c1d66" + integrity sha512-WvhW/7XSf+H7YmtiIigQxfDVZVZI7mbKikQ09YpzN7FeN3TmYib1+0tB+EE9TbICkwssjiFc71FEBEh4K9grKQ== + dependencies: + "@aws-sdk/types" "3.609.0" + "@smithy/property-provider" "^3.1.3" + "@smithy/shared-ini-file-loader" "^3.1.3" + "@smithy/types" "^3.3.0" + tslib "^2.6.2" + "@aws-sdk/types@3.577.0", "@aws-sdk/types@^3.222.0": version "3.577.0" resolved "https://registry.npmjs.org/@aws-sdk/types/-/types-3.577.0.tgz" @@ -589,6 +980,14 @@ "@smithy/types" "^3.0.0" tslib "^2.6.2" +"@aws-sdk/types@3.609.0": + version "3.609.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/types/-/types-3.609.0.tgz#06b39d799c9f197a7b43670243e8e78a3bf7d6a5" + integrity sha512-+Tqnh9w0h2LcrUsdXyT1F8mNhXz+tVYBtP19LpeEGntmvHwa2XzvLUCWpoIAIVsHp5+HdB2X9Sn0KAtmbFXc2Q== + dependencies: + "@smithy/types" "^3.3.0" + tslib "^2.6.2" + "@aws-sdk/util-arn-parser@3.568.0": version "3.568.0" resolved "https://registry.npmjs.org/@aws-sdk/util-arn-parser/-/util-arn-parser-3.568.0.tgz" @@ -606,6 +1005,16 @@ "@smithy/util-endpoints" "^2.0.1" tslib "^2.6.2" +"@aws-sdk/util-endpoints@3.609.0": + version "3.609.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-endpoints/-/util-endpoints-3.609.0.tgz#e02d3fce2f999d750828dacf9f37289a1a48f6c9" + integrity sha512-Rh+3V8dOvEeE1aQmUy904DYWtLUEJ7Vf5XBPlQ6At3pBhp+zpXbsnpZzVL33c8lW1xfj6YPwtO6gOeEsl1juCQ== + dependencies: + "@aws-sdk/types" "3.609.0" + "@smithy/types" "^3.3.0" + "@smithy/util-endpoints" "^2.0.4" + tslib "^2.6.2" + "@aws-sdk/util-format-url@3.577.0": version "3.577.0" resolved "https://registry.npmjs.org/@aws-sdk/util-format-url/-/util-format-url-3.577.0.tgz" @@ -633,6 +1042,16 @@ bowser "^2.11.0" tslib "^2.6.2" +"@aws-sdk/util-user-agent-browser@3.609.0": + version "3.609.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.609.0.tgz#aa15421b2e32ae8bc589dac2bd6e8969832ce588" + integrity sha512-fojPU+mNahzQ0YHYBsx0ZIhmMA96H+ZIZ665ObU9tl+SGdbLneVZVikGve+NmHTQwHzwkFsZYYnVKAkreJLAtA== + dependencies: + "@aws-sdk/types" "3.609.0" + "@smithy/types" "^3.3.0" + bowser "^2.11.0" + tslib "^2.6.2" + "@aws-sdk/util-user-agent-node@3.587.0": version "3.587.0" resolved "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.587.0.tgz" @@ -643,6 +1062,16 @@ "@smithy/types" "^3.0.0" tslib "^2.6.2" +"@aws-sdk/util-user-agent-node@3.609.0": + version "3.609.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.609.0.tgz#f8270517b2961cbf627e4e8fb6338ad153db44bb" + integrity sha512-DlZBwQ/HkZyf3pOWc7+wjJRk5R7x9YxHhs2szHwtv1IW30KMabjjjX0GMlGJ9LLkBHkbaaEY/w9Tkj12XRLhRg== + dependencies: + "@aws-sdk/types" "3.609.0" + "@smithy/node-config-provider" "^3.1.3" + "@smithy/types" "^3.3.0" + tslib "^2.6.2" + "@aws-sdk/util-utf8-browser@^3.0.0": version "3.259.0" resolved "https://registry.npmjs.org/@aws-sdk/util-utf8-browser/-/util-utf8-browser-3.259.0.tgz" @@ -1447,6 +1876,14 @@ "@smithy/types" "^3.0.0" tslib "^2.6.2" +"@smithy/abort-controller@^3.1.1": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@smithy/abort-controller/-/abort-controller-3.1.1.tgz#291210611ff6afecfc198d0ca72d5771d8461d16" + integrity sha512-MBJBiidoe+0cTFhyxT8g+9g7CeVccLM0IOKKUMCNQ1CNMJ/eIfoo0RTfVrXOONEI1UCN1W+zkiHSbzUNE9dZtQ== + dependencies: + "@smithy/types" "^3.3.0" + tslib "^2.6.2" + "@smithy/chunked-blob-reader-native@^3.0.0": version "3.0.0" resolved "https://registry.npmjs.org/@smithy/chunked-blob-reader-native/-/chunked-blob-reader-native-3.0.0.tgz" @@ -1473,6 +1910,17 @@ "@smithy/util-middleware" "^3.0.0" tslib "^2.6.2" +"@smithy/config-resolver@^3.0.4": + version "3.0.4" + resolved "https://registry.yarnpkg.com/@smithy/config-resolver/-/config-resolver-3.0.4.tgz#85fffa86cee4562f867b0a70a374057a48525d1b" + integrity sha512-VwiOk7TwXoE7NlNguV/aPq1hFH72tqkHCw8eWXbr2xHspRyyv9DLpLXhq+Ieje+NwoqXrY0xyQjPXdOE6cGcHA== + dependencies: + "@smithy/node-config-provider" "^3.1.3" + "@smithy/types" "^3.3.0" + "@smithy/util-config-provider" "^3.0.0" + "@smithy/util-middleware" "^3.0.3" + tslib "^2.6.2" + "@smithy/core@^2.1.1": version "2.2.0" resolved "https://registry.npmjs.org/@smithy/core/-/core-2.2.0.tgz" @@ -1487,6 +1935,20 @@ "@smithy/util-middleware" "^3.0.0" tslib "^2.6.2" +"@smithy/core@^2.2.4": + version "2.2.4" + resolved "https://registry.yarnpkg.com/@smithy/core/-/core-2.2.4.tgz#a83d62fc685ff95ad3133d55d7e365a51526a436" + integrity sha512-qdY3LpMOUyLM/gfjjMQZui+UTNS7kBRDWlvyIhVOql5dn2J3isk9qUTBtQ1CbDH8MTugHis1zu3h4rH+Qmmh4g== + dependencies: + "@smithy/middleware-endpoint" "^3.0.4" + "@smithy/middleware-retry" "^3.0.7" + "@smithy/middleware-serde" "^3.0.3" + "@smithy/protocol-http" "^4.0.3" + "@smithy/smithy-client" "^3.1.5" + "@smithy/types" "^3.3.0" + "@smithy/util-middleware" "^3.0.3" + tslib "^2.6.2" + "@smithy/credential-provider-imds@^3.1.0": version "3.1.0" resolved "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-3.1.0.tgz" @@ -1498,6 +1960,17 @@ "@smithy/url-parser" "^3.0.0" tslib "^2.6.2" +"@smithy/credential-provider-imds@^3.1.3": + version "3.1.3" + resolved "https://registry.yarnpkg.com/@smithy/credential-provider-imds/-/credential-provider-imds-3.1.3.tgz#43e6c2d1e3df6bb6bb28bfae6b99c5a4d93bda09" + integrity sha512-U1Yrv6hx/mRK6k8AncuI6jLUx9rn0VVSd9NPEX6pyYFBfkSkChOc/n4zUb8alHUVg83TbI4OdZVo1X0Zfj3ijA== + dependencies: + "@smithy/node-config-provider" "^3.1.3" + "@smithy/property-provider" "^3.1.3" + "@smithy/types" "^3.3.0" + "@smithy/url-parser" "^3.0.3" + tslib "^2.6.2" + "@smithy/eventstream-codec@^3.0.0": version "3.0.0" resolved "https://registry.npmjs.org/@smithy/eventstream-codec/-/eventstream-codec-3.0.0.tgz" @@ -1554,6 +2027,17 @@ "@smithy/util-base64" "^3.0.0" tslib "^2.6.2" +"@smithy/fetch-http-handler@^3.2.0": + version "3.2.0" + resolved "https://registry.yarnpkg.com/@smithy/fetch-http-handler/-/fetch-http-handler-3.2.0.tgz#425ce7686bf20176b38f8013ed7fb28302a88929" + integrity sha512-vFvDxMrc6sO5Atec8PaISckMcAwsCrRhYxwUylg97bRT2KZoumOF7qk5+6EVUtuM1IG9AJV5aqXnHln9ZdXHpg== + dependencies: + "@smithy/protocol-http" "^4.0.3" + "@smithy/querystring-builder" "^3.0.3" + "@smithy/types" "^3.3.0" + "@smithy/util-base64" "^3.0.0" + tslib "^2.6.2" + "@smithy/hash-blob-browser@^3.0.0": version "3.0.0" resolved "https://registry.npmjs.org/@smithy/hash-blob-browser/-/hash-blob-browser-3.0.0.tgz" @@ -1574,6 +2058,16 @@ "@smithy/util-utf8" "^3.0.0" tslib "^2.6.2" +"@smithy/hash-node@^3.0.3": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@smithy/hash-node/-/hash-node-3.0.3.tgz#82c5cb7b0f1a29ee7319081853d2d158c07dff24" + integrity sha512-2ctBXpPMG+B3BtWSGNnKELJ7SH9e4TNefJS0cd2eSkOOROeBnnVBnAy9LtJ8tY4vUEoe55N4CNPxzbWvR39iBw== + dependencies: + "@smithy/types" "^3.3.0" + "@smithy/util-buffer-from" "^3.0.0" + "@smithy/util-utf8" "^3.0.0" + tslib "^2.6.2" + "@smithy/hash-stream-node@^3.0.0": version "3.0.0" resolved "https://registry.npmjs.org/@smithy/hash-stream-node/-/hash-stream-node-3.0.0.tgz" @@ -1591,6 +2085,21 @@ "@smithy/types" "^3.0.0" tslib "^2.6.2" +"@smithy/invalid-dependency@^3.0.3": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@smithy/invalid-dependency/-/invalid-dependency-3.0.3.tgz#8d9fd70e3a94b565a4eba4ffbdc95238e1930528" + integrity sha512-ID1eL/zpDULmHJbflb864k72/SNOZCADRc9i7Exq3RUNJw6raWUSlFEQ+3PX3EYs++bTxZB2dE9mEHTQLv61tw== + dependencies: + "@smithy/types" "^3.3.0" + tslib "^2.6.2" + +"@smithy/is-array-buffer@^2.2.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz#f84f0d9f9a36601a9ca9381688bd1b726fd39111" + integrity sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA== + dependencies: + tslib "^2.6.2" + "@smithy/is-array-buffer@^3.0.0": version "3.0.0" resolved "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-3.0.0.tgz" @@ -1616,6 +2125,15 @@ "@smithy/types" "^3.0.0" tslib "^2.6.2" +"@smithy/middleware-content-length@^3.0.3": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@smithy/middleware-content-length/-/middleware-content-length-3.0.3.tgz#426a7f907cc3c0a5d81deb84e16d38303e5a9ad8" + integrity sha512-Dbz2bzexReYIQDWMr+gZhpwBetNXzbhnEMhYKA6urqmojO14CsXjnsoPYO8UL/xxcawn8ZsuVU61ElkLSltIUQ== + dependencies: + "@smithy/protocol-http" "^4.0.3" + "@smithy/types" "^3.3.0" + tslib "^2.6.2" + "@smithy/middleware-endpoint@^3.0.1": version "3.0.1" resolved "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-3.0.1.tgz" @@ -1629,6 +2147,19 @@ "@smithy/util-middleware" "^3.0.0" tslib "^2.6.2" +"@smithy/middleware-endpoint@^3.0.4": + version "3.0.4" + resolved "https://registry.yarnpkg.com/@smithy/middleware-endpoint/-/middleware-endpoint-3.0.4.tgz#c18518b21c80887c16fb595b156c7c009b0b64ca" + integrity sha512-whUJMEPwl3ANIbXjBXZVdJNgfV2ZU8ayln7xUM47rXL2txuenI7jQ/VFFwCzy5lCmXScjp6zYtptW5Evud8e9g== + dependencies: + "@smithy/middleware-serde" "^3.0.3" + "@smithy/node-config-provider" "^3.1.3" + "@smithy/shared-ini-file-loader" "^3.1.3" + "@smithy/types" "^3.3.0" + "@smithy/url-parser" "^3.0.3" + "@smithy/util-middleware" "^3.0.3" + tslib "^2.6.2" + "@smithy/middleware-retry@^3.0.3": version "3.0.3" resolved "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-3.0.3.tgz" @@ -1644,6 +2175,21 @@ tslib "^2.6.2" uuid "^9.0.1" +"@smithy/middleware-retry@^3.0.7": + version "3.0.7" + resolved "https://registry.yarnpkg.com/@smithy/middleware-retry/-/middleware-retry-3.0.7.tgz#b42d90b3ecc392fdfeda1eff9dc7a023ba11d34b" + integrity sha512-f5q7Y09G+2h5ivkSx5CHvlAT4qRR3jBFEsfXyQ9nFNiWQlr8c48blnu5cmbTQ+p1xmIO14UXzKoF8d7Tm0Gsjw== + dependencies: + "@smithy/node-config-provider" "^3.1.3" + "@smithy/protocol-http" "^4.0.3" + "@smithy/service-error-classification" "^3.0.3" + "@smithy/smithy-client" "^3.1.5" + "@smithy/types" "^3.3.0" + "@smithy/util-middleware" "^3.0.3" + "@smithy/util-retry" "^3.0.3" + tslib "^2.6.2" + uuid "^9.0.1" + "@smithy/middleware-serde@^3.0.0": version "3.0.0" resolved "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-3.0.0.tgz" @@ -1652,6 +2198,14 @@ "@smithy/types" "^3.0.0" tslib "^2.6.2" +"@smithy/middleware-serde@^3.0.3": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@smithy/middleware-serde/-/middleware-serde-3.0.3.tgz#74d974460f74d99f38c861e6862984543a880a66" + integrity sha512-puUbyJQBcg9eSErFXjKNiGILJGtiqmuuNKEYNYfUD57fUl4i9+mfmThtQhvFXU0hCVG0iEJhvQUipUf+/SsFdA== + dependencies: + "@smithy/types" "^3.3.0" + tslib "^2.6.2" + "@smithy/middleware-stack@^3.0.0": version "3.0.0" resolved "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-3.0.0.tgz" @@ -1660,6 +2214,14 @@ "@smithy/types" "^3.0.0" tslib "^2.6.2" +"@smithy/middleware-stack@^3.0.3": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@smithy/middleware-stack/-/middleware-stack-3.0.3.tgz#91845c7e61e6f137fa912b623b6def719a4f6ce7" + integrity sha512-r4klY9nFudB0r9UdSMaGSyjyQK5adUyPnQN/ZM6M75phTxOdnc/AhpvGD1fQUvgmqjQEBGCwpnPbDm8pH5PapA== + dependencies: + "@smithy/types" "^3.3.0" + tslib "^2.6.2" + "@smithy/node-config-provider@^3.1.0": version "3.1.0" resolved "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-3.1.0.tgz" @@ -1670,6 +2232,16 @@ "@smithy/types" "^3.0.0" tslib "^2.6.2" +"@smithy/node-config-provider@^3.1.3": + version "3.1.3" + resolved "https://registry.yarnpkg.com/@smithy/node-config-provider/-/node-config-provider-3.1.3.tgz#e8e69d0df5be9d6ed3f3a84f51fd2176f09c7ab8" + integrity sha512-rxdpAZczzholz6CYZxtqDu/aKTxATD5DAUDVj7HoEulq+pDSQVWzbg0btZDlxeFfa6bb2b5tUvgdX5+k8jUqcg== + dependencies: + "@smithy/property-provider" "^3.1.3" + "@smithy/shared-ini-file-loader" "^3.1.3" + "@smithy/types" "^3.3.0" + tslib "^2.6.2" + "@smithy/node-http-handler@^3.0.0": version "3.0.0" resolved "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-3.0.0.tgz" @@ -1681,6 +2253,17 @@ "@smithy/types" "^3.0.0" tslib "^2.6.2" +"@smithy/node-http-handler@^3.1.1": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@smithy/node-http-handler/-/node-http-handler-3.1.1.tgz#9213d9b5139c9f9c5a1928e1574de767a979bf94" + integrity sha512-L71NLyPeP450r2J/mfu1jMc//Z1YnqJt2eSNw7uhiItaONnBLDA68J5jgxq8+MBDsYnFwNAIc7dBG1ImiWBiwg== + dependencies: + "@smithy/abort-controller" "^3.1.1" + "@smithy/protocol-http" "^4.0.3" + "@smithy/querystring-builder" "^3.0.3" + "@smithy/types" "^3.3.0" + tslib "^2.6.2" + "@smithy/property-provider@^3.1.0": version "3.1.0" resolved "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-3.1.0.tgz" @@ -1689,6 +2272,14 @@ "@smithy/types" "^3.0.0" tslib "^2.6.2" +"@smithy/property-provider@^3.1.3": + version "3.1.3" + resolved "https://registry.yarnpkg.com/@smithy/property-provider/-/property-provider-3.1.3.tgz#afd57ea82a3f6c79fbda95e3cb85c0ee0a79f39a" + integrity sha512-zahyOVR9Q4PEoguJ/NrFP4O7SMAfYO1HLhB18M+q+Z4KFd4V2obiMnlVoUFzFLSPeVt1POyNWneHHrZaTMoc/g== + dependencies: + "@smithy/types" "^3.3.0" + tslib "^2.6.2" + "@smithy/protocol-http@^4.0.0": version "4.0.0" resolved "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.0.0.tgz" @@ -1697,6 +2288,14 @@ "@smithy/types" "^3.0.0" tslib "^2.6.2" +"@smithy/protocol-http@^4.0.3": + version "4.0.3" + resolved "https://registry.yarnpkg.com/@smithy/protocol-http/-/protocol-http-4.0.3.tgz#acf16058504e3cce2dbe8abf94f7b544cd09d3f4" + integrity sha512-x5jmrCWwQlx+Zv4jAtc33ijJ+vqqYN+c/ZkrnpvEe/uDas7AT7A/4Rc2CdfxgWv4WFGmEqODIrrUToPN6DDkGw== + dependencies: + "@smithy/types" "^3.3.0" + tslib "^2.6.2" + "@smithy/querystring-builder@^3.0.0": version "3.0.0" resolved "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-3.0.0.tgz" @@ -1706,6 +2305,15 @@ "@smithy/util-uri-escape" "^3.0.0" tslib "^2.6.2" +"@smithy/querystring-builder@^3.0.3": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@smithy/querystring-builder/-/querystring-builder-3.0.3.tgz#6b0e566f885bb84938d077c69e8f8555f686af13" + integrity sha512-vyWckeUeesFKzCDaRwWLUA1Xym9McaA6XpFfAK5qI9DKJ4M33ooQGqvM4J+LalH4u/Dq9nFiC8U6Qn1qi0+9zw== + dependencies: + "@smithy/types" "^3.3.0" + "@smithy/util-uri-escape" "^3.0.0" + tslib "^2.6.2" + "@smithy/querystring-parser@^3.0.0": version "3.0.0" resolved "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-3.0.0.tgz" @@ -1714,6 +2322,14 @@ "@smithy/types" "^3.0.0" tslib "^2.6.2" +"@smithy/querystring-parser@^3.0.3": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@smithy/querystring-parser/-/querystring-parser-3.0.3.tgz#272a6b83f88dfcbbec8283d72a6bde850cc00091" + integrity sha512-zahM1lQv2YjmznnfQsWbYojFe55l0SLG/988brlLv1i8z3dubloLF+75ATRsqPBboUXsW6I9CPGE5rQgLfY0vQ== + dependencies: + "@smithy/types" "^3.3.0" + tslib "^2.6.2" + "@smithy/service-error-classification@^3.0.0": version "3.0.0" resolved "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-3.0.0.tgz" @@ -1721,6 +2337,13 @@ dependencies: "@smithy/types" "^3.0.0" +"@smithy/service-error-classification@^3.0.3": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@smithy/service-error-classification/-/service-error-classification-3.0.3.tgz#73484255060a094aa9372f6cd972dcaf97e3ce80" + integrity sha512-Jn39sSl8cim/VlkLsUhRFq/dKDnRUFlfRkvhOJaUbLBXUsLRLNf9WaxDv/z9BjuQ3A6k/qE8af1lsqcwm7+DaQ== + dependencies: + "@smithy/types" "^3.3.0" + "@smithy/shared-ini-file-loader@^3.1.0": version "3.1.0" resolved "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-3.1.0.tgz" @@ -1729,6 +2352,14 @@ "@smithy/types" "^3.0.0" tslib "^2.6.2" +"@smithy/shared-ini-file-loader@^3.1.3": + version "3.1.3" + resolved "https://registry.yarnpkg.com/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-3.1.3.tgz#49a5e0e8cd98d219e7e56860586710b146d52ade" + integrity sha512-Z8Y3+08vgoDgl4HENqNnnzSISAaGrF2RoKupoC47u2wiMp+Z8P/8mDh1CL8+8ujfi2U5naNvopSBmP/BUj8b5w== + dependencies: + "@smithy/types" "^3.3.0" + tslib "^2.6.2" + "@smithy/signature-v4@^3.0.0": version "3.0.0" resolved "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-3.0.0.tgz" @@ -1742,6 +2373,19 @@ "@smithy/util-utf8" "^3.0.0" tslib "^2.6.2" +"@smithy/signature-v4@^3.1.2": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@smithy/signature-v4/-/signature-v4-3.1.2.tgz#63fc0d4f9a955e902138fb0a57fafc96b9d4e8bb" + integrity sha512-3BcPylEsYtD0esM4Hoyml/+s7WP2LFhcM3J2AGdcL2vx9O60TtfpDOL72gjb4lU8NeRPeKAwR77YNyyGvMbuEA== + dependencies: + "@smithy/is-array-buffer" "^3.0.0" + "@smithy/types" "^3.3.0" + "@smithy/util-hex-encoding" "^3.0.0" + "@smithy/util-middleware" "^3.0.3" + "@smithy/util-uri-escape" "^3.0.0" + "@smithy/util-utf8" "^3.0.0" + tslib "^2.6.2" + "@smithy/smithy-client@^3.1.1": version "3.1.1" resolved "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-3.1.1.tgz" @@ -1754,6 +2398,18 @@ "@smithy/util-stream" "^3.0.1" tslib "^2.6.2" +"@smithy/smithy-client@^3.1.5": + version "3.1.5" + resolved "https://registry.yarnpkg.com/@smithy/smithy-client/-/smithy-client-3.1.5.tgz#3956f0b511c3a51f859c45eb11bfd70ae00c5fec" + integrity sha512-x9bL9Mx2CT2P1OiUlHM+ZNpbVU6TgT32f9CmTRzqIHA7M4vYrROCWEoC3o4xHNJASoGd4Opos3cXYPgh+/m4Ww== + dependencies: + "@smithy/middleware-endpoint" "^3.0.4" + "@smithy/middleware-stack" "^3.0.3" + "@smithy/protocol-http" "^4.0.3" + "@smithy/types" "^3.3.0" + "@smithy/util-stream" "^3.0.5" + tslib "^2.6.2" + "@smithy/types@^3.0.0": version "3.0.0" resolved "https://registry.npmjs.org/@smithy/types/-/types-3.0.0.tgz" @@ -1761,6 +2417,13 @@ dependencies: tslib "^2.6.2" +"@smithy/types@^3.3.0": + version "3.3.0" + resolved "https://registry.yarnpkg.com/@smithy/types/-/types-3.3.0.tgz#fae037c733d09bc758946a01a3de0ef6e210b16b" + integrity sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA== + dependencies: + tslib "^2.6.2" + "@smithy/url-parser@^3.0.0": version "3.0.0" resolved "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-3.0.0.tgz" @@ -1770,6 +2433,15 @@ "@smithy/types" "^3.0.0" tslib "^2.6.2" +"@smithy/url-parser@^3.0.3": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@smithy/url-parser/-/url-parser-3.0.3.tgz#e8a060d9810b24b1870385fc2b02485b8a6c5955" + integrity sha512-pw3VtZtX2rg+s6HMs6/+u9+hu6oY6U7IohGhVNnjbgKy86wcIsSZwgHrFR+t67Uyxvp4Xz3p3kGXXIpTNisq8A== + dependencies: + "@smithy/querystring-parser" "^3.0.3" + "@smithy/types" "^3.3.0" + tslib "^2.6.2" + "@smithy/util-base64@^3.0.0": version "3.0.0" resolved "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-3.0.0.tgz" @@ -1793,6 +2465,14 @@ dependencies: tslib "^2.6.2" +"@smithy/util-buffer-from@^2.2.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz#6fc88585165ec73f8681d426d96de5d402021e4b" + integrity sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA== + dependencies: + "@smithy/is-array-buffer" "^2.2.0" + tslib "^2.6.2" + "@smithy/util-buffer-from@^3.0.0": version "3.0.0" resolved "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-3.0.0.tgz" @@ -1819,6 +2499,17 @@ bowser "^2.11.0" tslib "^2.6.2" +"@smithy/util-defaults-mode-browser@^3.0.7": + version "3.0.7" + resolved "https://registry.yarnpkg.com/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-3.0.7.tgz#5868ae56c9ae4a3532c175f9c0ee281a41065215" + integrity sha512-Q2txLyvQyGfmjsaDbVV7Sg8psefpFcrnlGapDzXGFRPFKRBeEg6OvFK8FljqjeHSaCZ6/UuzQExUPqBR/2qlDA== + dependencies: + "@smithy/property-provider" "^3.1.3" + "@smithy/smithy-client" "^3.1.5" + "@smithy/types" "^3.3.0" + bowser "^2.11.0" + tslib "^2.6.2" + "@smithy/util-defaults-mode-node@^3.0.3": version "3.0.3" resolved "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-3.0.3.tgz" @@ -1832,6 +2523,19 @@ "@smithy/types" "^3.0.0" tslib "^2.6.2" +"@smithy/util-defaults-mode-node@^3.0.7": + version "3.0.7" + resolved "https://registry.yarnpkg.com/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-3.0.7.tgz#e802ca57df6b8543dc288524d3894a6c357b51fc" + integrity sha512-F4Qcj1fG6MGi2BSWCslfsMSwllws/WzYONBGtLybyY+halAcXdWhcew+mej8M5SKd5hqPYp4f7b+ABQEaeytgg== + dependencies: + "@smithy/config-resolver" "^3.0.4" + "@smithy/credential-provider-imds" "^3.1.3" + "@smithy/node-config-provider" "^3.1.3" + "@smithy/property-provider" "^3.1.3" + "@smithy/smithy-client" "^3.1.5" + "@smithy/types" "^3.3.0" + tslib "^2.6.2" + "@smithy/util-endpoints@^2.0.1": version "2.0.1" resolved "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-2.0.1.tgz" @@ -1841,6 +2545,15 @@ "@smithy/types" "^3.0.0" tslib "^2.6.2" +"@smithy/util-endpoints@^2.0.4": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@smithy/util-endpoints/-/util-endpoints-2.0.4.tgz#0cfb01deb42ec5cd819b54e85acb2c32e4ba4385" + integrity sha512-ZAtNf+vXAsgzgRutDDiklU09ZzZiiV/nATyqde4Um4priTmasDH+eLpp3tspL0hS2dEootyFMhu1Y6Y+tzpWBQ== + dependencies: + "@smithy/node-config-provider" "^3.1.3" + "@smithy/types" "^3.3.0" + tslib "^2.6.2" + "@smithy/util-hex-encoding@^3.0.0": version "3.0.0" resolved "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-3.0.0.tgz" @@ -1856,6 +2569,14 @@ "@smithy/types" "^3.0.0" tslib "^2.6.2" +"@smithy/util-middleware@^3.0.3": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@smithy/util-middleware/-/util-middleware-3.0.3.tgz#07bf9602682f5a6c55bc2f0384303f85fc68c87e" + integrity sha512-l+StyYYK/eO3DlVPbU+4Bi06Jjal+PFLSMmlWM1BEwyLxZ3aKkf1ROnoIakfaA7mC6uw3ny7JBkau4Yc+5zfWw== + dependencies: + "@smithy/types" "^3.3.0" + tslib "^2.6.2" + "@smithy/util-retry@^3.0.0": version "3.0.0" resolved "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-3.0.0.tgz" @@ -1865,6 +2586,15 @@ "@smithy/types" "^3.0.0" tslib "^2.6.2" +"@smithy/util-retry@^3.0.3": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@smithy/util-retry/-/util-retry-3.0.3.tgz#9b2ac0dbb1c81f69812a8affa4d772bebfc0e049" + integrity sha512-AFw+hjpbtVApzpNDhbjNG5NA3kyoMs7vx0gsgmlJF4s+yz1Zlepde7J58zpIRIsdjc+emhpAITxA88qLkPF26w== + dependencies: + "@smithy/service-error-classification" "^3.0.3" + "@smithy/types" "^3.3.0" + tslib "^2.6.2" + "@smithy/util-stream@^3.0.1": version "3.0.1" resolved "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-3.0.1.tgz" @@ -1879,6 +2609,20 @@ "@smithy/util-utf8" "^3.0.0" tslib "^2.6.2" +"@smithy/util-stream@^3.0.5": + version "3.0.5" + resolved "https://registry.yarnpkg.com/@smithy/util-stream/-/util-stream-3.0.5.tgz#8ca98441e1deedfc4ec8d3fee9aa4342fdbc484f" + integrity sha512-xC3L5PKMAT/Bh8fmHNXP9sdQ4+4aKVUU3EEJ2CF/lLk7R+wtMJM+v/1B4en7jO++Wa5spGzFDBCl0QxgbUc5Ug== + dependencies: + "@smithy/fetch-http-handler" "^3.2.0" + "@smithy/node-http-handler" "^3.1.1" + "@smithy/types" "^3.3.0" + "@smithy/util-base64" "^3.0.0" + "@smithy/util-buffer-from" "^3.0.0" + "@smithy/util-hex-encoding" "^3.0.0" + "@smithy/util-utf8" "^3.0.0" + tslib "^2.6.2" + "@smithy/util-uri-escape@^3.0.0": version "3.0.0" resolved "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-3.0.0.tgz" @@ -1886,6 +2630,14 @@ dependencies: tslib "^2.6.2" +"@smithy/util-utf8@^2.0.0": + version "2.3.0" + resolved "https://registry.yarnpkg.com/@smithy/util-utf8/-/util-utf8-2.3.0.tgz#dd96d7640363259924a214313c3cf16e7dd329c5" + integrity sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A== + dependencies: + "@smithy/util-buffer-from" "^2.2.0" + tslib "^2.6.2" + "@smithy/util-utf8@^3.0.0": version "3.0.0" resolved "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-3.0.0.tgz" @@ -1903,6 +2655,15 @@ "@smithy/types" "^3.0.0" tslib "^2.6.2" +"@smithy/util-waiter@^3.1.2": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@smithy/util-waiter/-/util-waiter-3.1.2.tgz#2d40c3312f3537feee763459a19acafab4c75cf3" + integrity sha512-4pP0EV3iTsexDx+8PPGAKCQpd/6hsQBaQhqWzU4hqKPHN5epPsxKbvUTIiYIHTxaKt6/kEaqPBpu/ufvfbrRzw== + dependencies: + "@smithy/abort-controller" "^3.1.1" + "@smithy/types" "^3.3.0" + tslib "^2.6.2" + "@tsconfig/node10@^1.0.7": version "1.0.11" resolved "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz" From ab11478ab362d3cf94a47c571b6da51c775525ee Mon Sep 17 00:00:00 2001 From: Alex Yang <32620988+DatProJack@users.noreply.github.com> Date: Mon, 8 Jul 2024 13:13:08 -0500 Subject: [PATCH 2/5] saving changes --- src/app.ts | 2 ++ src/services/ses/ses-router.ts | 14 +++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/app.ts b/src/app.ts index 31442ba..c8c290e 100644 --- a/src/app.ts +++ b/src/app.ts @@ -16,6 +16,7 @@ import eventsRouter from "./services/events/events-router"; import notificationsRouter from "./services/notifications/notifications-router"; import registrationRouter from "./services/registration/registration-router"; import s3Router from "./services/s3/s3-router"; +import sesRouter from "./services/ses/ses-router"; import statsRouter from "./services/stats/stats-router"; import sponsorRouter from "./services/sponsor/sponsor-router"; import subscriptionRouter from "./services/subscription/subscription-router"; @@ -42,6 +43,7 @@ app.use("/events", databaseMiddleware, eventsRouter); app.use("/notifications", databaseMiddleware, notificationsRouter); app.use("/registration", databaseMiddleware, registrationRouter); app.use("/s3", databaseMiddleware, s3Router); +app.use("/ses", sesRouter); app.use("/stats", databaseMiddleware, statsRouter); app.use("/sponsor", databaseMiddleware, sponsorRouter); app.use("/subscription", databaseMiddleware, subscriptionRouter); diff --git a/src/services/ses/ses-router.ts b/src/services/ses/ses-router.ts index 7103b18..27220f4 100644 --- a/src/services/ses/ses-router.ts +++ b/src/services/ses/ses-router.ts @@ -11,13 +11,21 @@ const sesRouter: Router = Router(); sesRouter.post( "/template", - RoleChecker([Role.enum.STAFF], false), + RoleChecker([Role.enum.STAFF], true), sesClientMiddleware, async (req: Request, res: Response) => { - const ses = res.locals.ses as SESClient; + const ses = res.locals.sesClient as SESClient; const createTemplateCommand = createCreateTemplateCommand(); - console.log(ses.send(createTemplateCommand)); + try { + ses.send(createTemplateCommand); + return res.status(StatusCodes.OK); + } catch (err) { + console.error("Error creating template", err); + return res + .status(StatusCodes.BAD_REQUEST) + .send({ error: "Error creating template" }); + } } ); From 8155818f4320b6ab3c03e815b9f36ebda3d38fdf Mon Sep 17 00:00:00 2001 From: Alex Yang <32620988+DatProJack@users.noreply.github.com> Date: Fri, 12 Jul 2024 11:58:10 -0400 Subject: [PATCH 3/5] ses first iteration --- src/app.ts | 7 +++ src/config.ts | 6 +++ src/middleware/ses.ts | 19 ------- src/services/ses/ses-formats.ts | 16 ++++++ src/services/ses/ses-router.ts | 89 ++++++++++++++++++--------------- src/services/ses/ses-utils.ts | 22 +++----- 6 files changed, 85 insertions(+), 74 deletions(-) delete mode 100644 src/middleware/ses.ts create mode 100644 src/services/ses/ses-formats.ts diff --git a/src/app.ts b/src/app.ts index c8c290e..763ded8 100644 --- a/src/app.ts +++ b/src/app.ts @@ -3,6 +3,7 @@ import { StatusCodes } from "http-status-codes"; import { Config } from "./config"; import { rateLimiter } from "./middleware/rateLimiter"; import { isTest } from "./utilities"; +import AWS from "aws-sdk"; import databaseMiddleware from "./middleware/database-middleware"; import customCors from "./middleware/cors-middleware"; @@ -21,6 +22,12 @@ import statsRouter from "./services/stats/stats-router"; import sponsorRouter from "./services/sponsor/sponsor-router"; import subscriptionRouter from "./services/subscription/subscription-router"; +AWS.config.update({ + region: Config.S3_REGION, + accessKeyId: Config.S3_ACCESS_KEY, + secretAccessKey: Config.S3_SECRET_KEY, +}); + const app = express(); // to prevent server-side caching/returning status code 200 diff --git a/src/config.ts b/src/config.ts index 259f97a..818e068 100644 --- a/src/config.ts +++ b/src/config.ts @@ -3,6 +3,8 @@ import dotenv from "dotenv"; import { z } from "zod"; import { getEnv } from "./utilities"; +import AWS from "aws-sdk"; + dotenv.config(); export const Environment = z.enum(["PRODUCTION", "DEVELOPMENT", "TESTING"]); @@ -87,4 +89,8 @@ export const DeviceRedirects: Record- Did you know Amazon has a mascot named Peccy? -
- `, - SubjectPart: "Amazon Tip", - }, - }); -}; +export function sendEmail( + params: sendEmailParams +): Promise