From bf5fff5a32273f04937edf68d989ba9f73006c0d Mon Sep 17 00:00:00 2001 From: Tiffany Forkner Date: Tue, 7 Jan 2025 14:39:56 -0500 Subject: [PATCH 1/5] trying to work through eco pr --- lib/lambda/deleteIndex.ts | 19 +- lib/lambda/getAttachmentUrl.test.ts | 2 +- lib/lambda/getAttachmentUrl.ts | 21 +- lib/lambda/getCpocs.ts | 13 +- lib/lambda/runReindex.test.ts | 6 +- lib/lambda/runReindex.ts | 15 +- lib/lambda/sinkMainProcessors.test.ts | 975 +-------------- lib/lambda/sinkMainProcessors.ts | 11 +- lib/lambda/submit/index.ts | 10 +- lib/lambda/submit/submissionPayloads/app-k.ts | 17 +- .../submissionPayloads/capitated-initial.ts | 17 +- .../submissionPayloads/capitated-renewal.ts | 17 +- .../contracting-amendment.ts | 17 +- .../submissionPayloads/contracting-initial.ts | 17 +- .../submissionPayloads/contracting-renewal.ts | 17 +- .../submissionPayloads/new-chip-submission.ts | 17 +- .../new-medicaid-submission.ts | 13 +- .../submissionPayloads/respond-to-rai.ts | 17 +- .../submissionPayloads/temporary-extension.ts | 17 +- .../submissionPayloads/toggle-withdraw-rai.ts | 17 +- .../submissionPayloads/withdraw-package.ts | 2 +- .../submit/submissionPayloads/withdraw-rai.ts | 17 +- lib/lambda/update/updatePackage.ts | 64 +- lib/lambda/utils.ts | 8 +- lib/libs/api/package/appk.test.ts | 39 +- lib/libs/api/package/appk.ts | 30 +- lib/libs/api/package/changelog.ts | 32 +- lib/libs/api/package/getPackage.ts | 11 +- lib/libs/api/package/itemExists.ts | 15 +- .../email/content/email-components.test.tsx | 91 ++ lib/libs/email/content/email-components.tsx | 83 +- lib/libs/email/content/email-styles.ts | 3 +- .../emailTemplates/AppKState.tsx | 1 - .../emailTemplates/Waiver1915bCMS.tsx | 2 +- .../emailTemplates/Waiver1915bState.tsx | 6 +- .../emailTemplates/WaiverState.tsx | 9 +- .../emailTemplates/WaiverState.tsx | 3 +- .../emailTemplates/MedSpaCMS.tsx | 2 +- .../withdrawRai/emailTemplates/ChipSpaCMS.tsx | 2 +- .../emailTemplates/ChipSpaState.tsx | 2 +- .../withdrawRai/emailTemplates/MedSpaCMS.tsx | 2 +- .../emailTemplates/MedSpaState.tsx | 2 +- .../emailTemplates/Waiver1915bCMS.tsx | 2 +- .../emailTemplates/Waiver1915bState.tsx | 2 +- lib/libs/email/getAllStateUsers.ts | 87 +- lib/libs/email/index.ts | 75 +- lib/libs/email/mock-data/attachments.ts | 158 +-- lib/libs/email/mock-data/new-submission.ts | 8 +- lib/libs/email/mock-data/respond-to-rai.ts | 20 +- lib/libs/email/mock-data/temp-extension.ts | 25 +- .../mock-data/upload-subsequent-documents.ts | 8 +- lib/libs/email/mock-data/withdraw-rai.ts | 8 +- .../__snapshots__/ResToRaiCMS.test.tsx.snap | 468 ++++--- .../__snapshots__/ResToRaiState.test.tsx.snap | 555 ++++---- .../__snapshots__/UpSubDocCMS.test.tsx.snap | 468 ++++--- .../__snapshots__/UpSubDocState.test.tsx.snap | 468 ++++--- .../WithdrawPackageCMS.test.tsx.snap | 460 ++++--- .../WithdrawPackageState.test.tsx.snap | 490 ++++---- .../__snapshots__/WithdrwRaiCMS.test.tsx.snap | 160 ++- .../WithdrawRaiState.test.tsx.snap | 266 ++-- .../WithdrawConfirmationState.test.tsx.snap | 1092 +++++++++++++--- .../CMS/AppK.tsx | 0 .../CMS/CHIP_SPA.tsx | 0 .../CMS/InitialSubmissionCMS.test.tsx | 0 .../CMS/Medicaid_SPA.tsx | 0 .../CMS/Temp_Extension.tsx | 0 .../new-submission/CMS/Waiver1915b.tsx | 22 + .../CMS/Waiver_Capitated.tsx | 0 .../InitialSubmissionCMS.test.tsx.snap | 700 ++++++----- .../State/AppK.tsx | 4 +- .../State/CHIP_SPA.tsx | 8 +- .../State/InitialSubmissionState.test.tsx | 0 .../preview/new-submission/State/Med_Spa.tsx | 32 + .../State/Medicaid_SPA.tsx | 0 .../State/Temp_Extension.tsx | 0 .../new-submission/State/Waiver1915b.tsx | 25 + .../State/Waiver_Capitated.tsx | 0 .../State/Waiver_Contracting.tsx | 0 .../InitialSubmissionState.test.tsx.snap | 1112 +++++++++-------- lib/libs/opensearch-lib.ts | 9 +- lib/libs/sink-lib.ts | 27 +- lib/libs/utils.ts | 52 + lib/packages/shared-types/events/index.ts | 1 + 83 files changed, 4472 insertions(+), 4021 deletions(-) create mode 100644 lib/libs/email/content/email-components.test.tsx rename lib/libs/email/preview/{Initial Submissions => new-submission}/CMS/AppK.tsx (100%) rename lib/libs/email/preview/{Initial Submissions => new-submission}/CMS/CHIP_SPA.tsx (100%) rename lib/libs/email/preview/{Initial Submissions => new-submission}/CMS/InitialSubmissionCMS.test.tsx (100%) rename lib/libs/email/preview/{Initial Submissions => new-submission}/CMS/Medicaid_SPA.tsx (100%) rename lib/libs/email/preview/{Initial Submissions => new-submission}/CMS/Temp_Extension.tsx (100%) create mode 100644 lib/libs/email/preview/new-submission/CMS/Waiver1915b.tsx rename lib/libs/email/preview/{Initial Submissions => new-submission}/CMS/Waiver_Capitated.tsx (100%) rename lib/libs/email/preview/{Initial Submissions => new-submission}/CMS/__snapshots__/InitialSubmissionCMS.test.tsx.snap (77%) rename lib/libs/email/preview/{Initial Submissions => new-submission}/State/AppK.tsx (89%) rename lib/libs/email/preview/{Initial Submissions => new-submission}/State/CHIP_SPA.tsx (83%) rename lib/libs/email/preview/{Initial Submissions => new-submission}/State/InitialSubmissionState.test.tsx (100%) create mode 100644 lib/libs/email/preview/new-submission/State/Med_Spa.tsx rename lib/libs/email/preview/{Initial Submissions => new-submission}/State/Medicaid_SPA.tsx (100%) rename lib/libs/email/preview/{Initial Submissions => new-submission}/State/Temp_Extension.tsx (100%) create mode 100644 lib/libs/email/preview/new-submission/State/Waiver1915b.tsx rename lib/libs/email/preview/{Initial Submissions => new-submission}/State/Waiver_Capitated.tsx (100%) rename lib/libs/email/preview/{Initial Submissions => new-submission}/State/Waiver_Contracting.tsx (100%) rename lib/libs/email/preview/{Initial Submissions => new-submission}/State/__snapshots__/InitialSubmissionState.test.tsx.snap (71%) create mode 100644 lib/libs/utils.ts diff --git a/lib/lambda/deleteIndex.ts b/lib/lambda/deleteIndex.ts index 67492361a4..0a7238d951 100644 --- a/lib/lambda/deleteIndex.ts +++ b/lib/lambda/deleteIndex.ts @@ -8,19 +8,20 @@ export const handler: Handler = async (event, __, callback) => { }; let errorResponse = null; try { - if (!event.osDomain) throw "process.env.osDomain cannot be undefined"; + const { osDomain, indexNamespace = "" } = event; + if (!osDomain) throw "osDomain cannot be undefined"; const indices: Index[] = [ - `${event.indexNamespace}main`, - `${event.indexNamespace}changelog`, - `${event.indexNamespace}insights`, - `${event.indexNamespace}types`, - `${event.indexNamespace}subtypes`, - `${event.indexNamespace}legacyinsights`, - `${event.indexNamespace}cpocs`, + `${indexNamespace}main`, + `${indexNamespace}changelog`, + `${indexNamespace}insights`, + `${indexNamespace}types`, + `${indexNamespace}subtypes`, + `${indexNamespace}legacyinsights`, + `${indexNamespace}cpocs`, ]; for (const index of indices) { - await os.deleteIndex(event.osDomain, index); + await os.deleteIndex(osDomain, index); } } catch (error: any) { response.statusCode = 500; diff --git a/lib/lambda/getAttachmentUrl.test.ts b/lib/lambda/getAttachmentUrl.test.ts index 0ee3102e18..3fd589f891 100644 --- a/lib/lambda/getAttachmentUrl.test.ts +++ b/lib/lambda/getAttachmentUrl.test.ts @@ -70,7 +70,7 @@ describe("Lambda Handler", () => { expect(response).toHaveBeenCalledWith({ statusCode: 500, - body: { message: "ERROR: osDomain env variable is required" }, + body: { message: "ERROR: process.env.osDomain must be defined" }, }); }); diff --git a/lib/lambda/getAttachmentUrl.ts b/lib/lambda/getAttachmentUrl.ts index 7f94231bd9..394b9f62c8 100644 --- a/lib/lambda/getAttachmentUrl.ts +++ b/lib/lambda/getAttachmentUrl.ts @@ -7,27 +7,25 @@ import { getSignedUrl } from "@aws-sdk/s3-request-presigner"; import { getStateFilter } from "../libs/api/auth/user"; import { getPackage, getPackageChangelog } from "../libs/api/package"; +import { getDomain } from "libs/utils"; // Handler function to get Seatool data export const handler = async (event: APIGatewayEvent) => { - if (!process.env.osDomain) { + try { + getDomain(); + } catch (error) { return response({ statusCode: 500, - body: { message: "ERROR: osDomain env variable is required" }, + body: { message: `ERROR: ${error?.message || error}` }, }); } + if (!event.body) { return response({ statusCode: 400, body: { message: "Event body required" }, }); } - if (!process.env.osDomain) { - return response({ - statusCode: 500, - body: { message: "Handler is missing process.env.osDomain env var" }, - }); - } try { const body = JSON.parse(event.body); @@ -72,12 +70,7 @@ export const handler = async (event: APIGatewayEvent) => { } // Now we can generate the presigned url - const url = await generatePresignedUrl( - body.bucket, - body.key, - body.filename, - 60, - ); + const url = await generatePresignedUrl(body.bucket, body.key, body.filename, 60); return response({ statusCode: 200, diff --git a/lib/lambda/getCpocs.ts b/lib/lambda/getCpocs.ts index 5efc373159..c98d5a5867 100644 --- a/lib/lambda/getCpocs.ts +++ b/lib/lambda/getCpocs.ts @@ -2,13 +2,12 @@ import { handleOpensearchError } from "./utils"; import { APIGatewayEvent } from "aws-lambda"; import * as os from "libs/opensearch-lib"; import { response } from "libs/handler-lib"; +import { getDomainAndNamespace } from "libs/utils"; // type GetCpocsBody = object; export const queryCpocs = async () => { - if (!process.env.osDomain) { - throw new Error("process.env.osDomain must be defined"); - } + const { index, domain } = getDomainAndNamespace("cpocs"); const query = { size: 1000, @@ -20,11 +19,7 @@ export const queryCpocs = async () => { }, ], }; - return await os.search( - process.env.osDomain, - `${process.env.indexNamespace}cpocs`, - query, - ); + return await os.search(domain, index, query); }; export const getCpocs = async (event: APIGatewayEvent) => { @@ -47,7 +42,7 @@ export const getCpocs = async (event: APIGatewayEvent) => { body: result, }); } catch (err) { - return response(handleOpensearchError(err)) + return response(handleOpensearchError(err)); } }; diff --git a/lib/lambda/runReindex.test.ts b/lib/lambda/runReindex.test.ts index f21626aeec..e1efca10ed 100644 --- a/lib/lambda/runReindex.test.ts +++ b/lib/lambda/runReindex.test.ts @@ -52,7 +52,7 @@ describe("CloudFormation Custom Resource Handler", () => { await handler(mockEvent, {} as Context, callback); expect(stepFunctionSpy).not.toHaveBeenCalled(); - expect(cfnSpy).toHaveBeenCalledWith(mockEvent, {}, cfn.SUCCESS, {}, "static"); + expect(cfnSpy).toHaveBeenCalledWith(mockEvent, {}, cfn.SUCCESS); expect(callback).toHaveBeenCalledWith(null, { statusCode: 200 }); }); @@ -65,7 +65,7 @@ describe("CloudFormation Custom Resource Handler", () => { await handler(mockEvent, {} as Context, callback); expect(stepFunctionSpy).not.toHaveBeenCalled(); - expect(cfnSpy).toHaveBeenCalledWith(mockEvent, {}, cfn.SUCCESS, {}, "static"); + expect(cfnSpy).toHaveBeenCalledWith(mockEvent, {}, cfn.SUCCESS); expect(callback).toHaveBeenCalledWith(null, { statusCode: 200 }); }); @@ -91,7 +91,7 @@ describe("CloudFormation Custom Resource Handler", () => { }, }), ); - expect(cfnSpy).toHaveBeenCalledWith(mockEvent, {}, cfn.FAILED, {}, "static"); + expect(cfnSpy).toHaveBeenCalledWith(mockEvent, {}, cfn.FAILED); expect(callback).toHaveBeenCalledWith(expect.any(Error), { statusCode: 500 }); }); }); diff --git a/lib/lambda/runReindex.ts b/lib/lambda/runReindex.ts index 1dfecee5ef..5b22706a25 100644 --- a/lib/lambda/runReindex.ts +++ b/lib/lambda/runReindex.ts @@ -3,7 +3,6 @@ import { send, SUCCESS, FAILED } from "cfn-response-async"; import { SFNClient, StartExecutionCommand } from "@aws-sdk/client-sfn"; export const handler: Handler = async (event, context, callback) => { - console.log("request:", JSON.stringify(event, undefined, 2)); const response = { statusCode: 200, }; @@ -24,21 +23,17 @@ export const handler: Handler = async (event, context, callback) => { }); const execution = await stepFunctionsClient.send(startExecutionCommand); - console.log(`State machine execution started: ${execution.executionArn}`); - console.log( - "The state machine is now in charge of this resource, and will notify of success or failure upon completion.", - ); + console.log(`State machine execution started with ARN: ${execution.executionArn}`); } else if (event.RequestType == "Update") { - await send(event, context, SUCCESS, {}, "static"); + await send(event, context, SUCCESS); } else if (event.RequestType == "Delete") { - // need to delete all triggers here to do - await send(event, context, SUCCESS, {}, "static"); + await send(event, context, SUCCESS); } } catch (error) { - console.log(error); + console.error("Reindexing failed with error:", error); response.statusCode = 500; errorResponse = error; - await send(event, context, FAILED, {}, "static"); + await send(event, context, FAILED); } finally { callback(errorResponse, response); } diff --git a/lib/lambda/sinkMainProcessors.test.ts b/lib/lambda/sinkMainProcessors.test.ts index 4b289f4f07..35419fd2d5 100644 --- a/lib/lambda/sinkMainProcessors.test.ts +++ b/lib/lambda/sinkMainProcessors.test.ts @@ -1,966 +1,39 @@ -import { beforeEach, describe, expect, it, vi } from "vitest"; -import { - insertNewSeatoolRecordsFromKafkaIntoMako, - insertOneMacRecordsFromKafkaIntoMako, - syncSeatoolRecordDatesFromKafkaWithMako, -} from "./sinkMainProcessors"; -import * as sinkLib from "libs"; -import { Document, seatool } from "shared-types/opensearch/main"; -import { offsetToUtc } from "shared-utils"; -import { KafkaRecord } from "lib/packages/shared-types"; - -const convertObjToBase64 = (obj: object) => Buffer.from(JSON.stringify(obj)).toString("base64"); - -const createKafkaRecord = ({ - topic, - key, - value, -}: { - topic: string; - key: string; - value: string; -}): KafkaRecord => ({ - topic, - partition: 0, - offset: 0, - timestamp: 1732645041557, - timestampType: "CREATE_TIME", - headers: {}, - key, - value, -}); +import { describe, it, expect, vi, beforeEach } from "vitest"; +import { insertOneMacRecordsFromKafkaIntoMako } from "./sinkMainProcessors"; +import * as sinkLib from "../libs/sink-lib"; describe("insertOneMacRecordsFromKafkaIntoMako", () => { - const spiedOnBulkUpdateDataWrapper = vi.fn(); - const TOPIC = "--mako--branch-name--aws.onemac.migration.cdc"; - - beforeEach(() => { - vi.clearAllMocks(); - vi.useFakeTimers(); - - vi.spyOn(sinkLib, "bulkUpdateDataWrapper").mockImplementation(spiedOnBulkUpdateDataWrapper); - vi.stubEnv("osDomain", "osDomain"); - vi.stubEnv("indexNamespace", "indexNamespace"); - }); - - it("handles valid kafka records", () => { - insertOneMacRecordsFromKafkaIntoMako( - [ - createKafkaRecord({ - topic: TOPIC, - key: "TUQtMjQtMjMwMA==", - value: convertObjToBase64({ - event: "new-medicaid-submission", - attachments: { - cmsForm179: { - files: [ - { - filename: "Screenshot 2024-07-08 at 11.42.35 AM.png", - title: "Screenshot 2024-07-08 at 11.42.35 AM", - bucket: "mako-refactor-tests-sink-attachments-635052997545", - key: "13513eea-ba62-4cba-af31-2ec3c160b5e1.png", - uploadDate: 1732645033529, - }, - ], - label: "CMS Form 179", - }, - spaPages: { - files: [ - { - filename: "Screenshot 2024-07-08 at 11.42.35 AM.png", - title: "Screenshot 2024-07-08 at 11.42.35 AM", - bucket: "mako-refactor-tests-sink-attachments-635052997545", - key: "bbdfa95f-f67c-4983-8517-2745cc08d3b6.png", - uploadDate: 1732645038805, - }, - ], - label: "SPA Pages", - }, - coverLetter: { label: "Cover Letter" }, - tribalEngagement: { label: "Document Demonstrating Good-Faith Tribal Engagement" }, - existingStatePlanPages: { label: "Existing State Plan Page(s)" }, - publicNotice: { label: "Public Notice" }, - sfq: { label: "Standard Funding Questions (SFQs)" }, - tribalConsultation: { label: "Tribal Consultation" }, - other: { label: "Other" }, - }, - authority: "Medicaid SPA", - proposedEffectiveDate: 1732597200000, - id: "MD-24-2300", - origin: "mako", - submitterName: "George Harrison", - submitterEmail: "george@example.com", - timestamp: 1732645041526, - }), - }), - ], - TOPIC, - ); - - expect(spiedOnBulkUpdateDataWrapper).toBeCalledWith( - [ - { - additionalInformation: undefined, - authority: "Medicaid SPA", - changedDate: "2024-11-26T18:17:21.526Z", - cmsStatus: "Pending", - description: null, - id: "MD-24-2300", - makoChangedDate: "2024-11-26T18:17:21.526Z", - origin: "OneMAC", - raiWithdrawEnabled: false, - seatoolStatus: "Pending", - state: "MD", - stateStatus: "Under Review", - statusDate: offsetToUtc(new Date(1732645041526)).toISOString(), - proposedDate: 1732597200000, - subject: null, - submissionDate: "2024-11-26T00:00:00.000Z", - submitterEmail: "george@example.com", - submitterName: "George Harrison", - initialIntakeNeeded: true, - }, - ], - "main", - ); - }); - - it("handles valid kafka admin records", () => { - insertOneMacRecordsFromKafkaIntoMako( - [ - createKafkaRecord({ - topic: TOPIC, - key: "TUQtMjQtMjMwMA==", - value: convertObjToBase64({ - id: "MD-24-2301", - submitterName: "George Harrison", - submitterEmail: "george@example.com", - changeMade: "ID has been updated.", - isAdminChange: true, - adminChangeType: "update-id", - idToBeUpdated: "MD-24-2300", - }), - }), - createKafkaRecord({ - topic: TOPIC, - key: "TUQtMjQtMjMwMA==", - value: convertObjToBase64({ - id: "MD-24-2301", - submitterName: "George Harrison", - submitterEmail: "george@example.com", - changeMade: "title has been updated.", - isAdminChange: true, - adminChangeType: "update-values", - title: "updated title", - }), - }), - createKafkaRecord({ - topic: TOPIC, - key: "TUQtMjQtMjMwMA==", - value: convertObjToBase64({ - id: "MD-24-2301", - submitterName: "George Harrison", - submitterEmail: "george@example.com", - isAdminChange: true, - adminChangeType: "delete", - deleted: true, - }), - }), - ], - TOPIC, - ); - - expect(spiedOnBulkUpdateDataWrapper).toBeCalledWith( - [ - // record deleted - { - id: "MD-24-2301", - submitterName: "George Harrison", - submitterEmail: "george@example.com", - changeMade: "ID has been updated.", - isAdminChange: true, - adminChangeType: "update-id", - idToBeUpdated: "MD-24-2300", - }, - // property updated - { - id: "MD-24-2301", - submitterName: "George Harrison", - submitterEmail: "george@example.com", - changeMade: "title has been updated.", - isAdminChange: true, - adminChangeType: "update-values", - title: "updated title", - }, - // id updated - { - id: "MD-24-2301", - submitterName: "George Harrison", - submitterEmail: "george@example.com", - isAdminChange: true, - adminChangeType: "delete", - deleted: true, - }, - ], - "main", - ); - }); - - it("skips value-less kafka records", () => { - insertOneMacRecordsFromKafkaIntoMako( - [ - createKafkaRecord({ - topic: TOPIC, - key: "TUQtMjQtMjMwMA==", - value: "", // <-- missing value - }), - ], - TOPIC, - ); - - expect(spiedOnBulkUpdateDataWrapper).toBeCalledWith([], "main"); - }); - - it("skips kafka records with invalid event name", () => { - insertOneMacRecordsFromKafkaIntoMako( - [ - createKafkaRecord({ - topic: TOPIC, - key: "TUQtMjQtMjMwMA==", - // encoded string with `invalid-event-name` as 'record.event` - value: convertObjToBase64({ - event: "invalid-event-name", - attachments: { - cmsForm179: { - files: [ - { - filename: "Screenshot 2024-07-08 at 11.42.35 AM.png", - title: "Screenshot 2024-07-08 at 11.42.35 AM", - bucket: "mako-refactor-tests-sink-attachments-635052997545", - key: "13513eea-ba62-4cba-af31-2ec3c160b5e1.png", - uploadDate: 1732645033529, - }, - ], - label: "CMS Form 179", - }, - spaPages: { - files: [ - { - filename: "Screenshot 2024-07-08 at 11.42.35 AM.png", - title: "Screenshot 2024-07-08 at 11.42.35 AM", - bucket: "mako-refactor-tests-sink-attachments-635052997545", - key: "bbdfa95f-f67c-4983-8517-2745cc08d3b6.png", - uploadDate: 1732645038805, - }, - ], - label: "SPA Pages", - }, - coverLetter: { label: "Cover Letter" }, - tribalEngagement: { label: "Document Demonstrating Good-Faith Tribal Engagement" }, - existingStatePlanPages: { label: "Existing State Plan Page(s)" }, - publicNotice: { label: "Public Notice" }, - sfq: { label: "Standard Funding Questions (SFQs)" }, - tribalConsultation: { label: "Tribal Consultation" }, - other: { label: "Other" }, - }, - authority: "Medicaid SPA", - proposedEffectiveDate: 1732597200000, - id: "MD-24-2300", - origin: "mako", - submitterName: "George Harrison", - submitterEmail: "george@example.com", - timestamp: 1732645041526, - }), - }), - ], - TOPIC, - ); - - expect(spiedOnBulkUpdateDataWrapper).toBeCalledWith([], "main"); - }); - - it("skips kafka records with invalid properties", () => { - insertOneMacRecordsFromKafkaIntoMako( - [ - createKafkaRecord({ - topic: TOPIC, - key: "TUQtMjQtMjMwMA==", - // encoded string with `attachments` as an empty {} - value: convertObjToBase64({ - event: "new-medicaid-submission", - attachments: {}, - authority: "Medicaid SPA", - proposedEffectiveDate: 1732597200000, - id: "MD-24-2300", - origin: "mako", - submitterName: "George Harrison", - submitterEmail: "george@example.com", - timestamp: 1732645041526, - }), - }), - ], - TOPIC, - ); - - expect(spiedOnBulkUpdateDataWrapper).toBeCalledWith([], "main"); - }); - - it("skips kafka records with invalid JSON", () => { - const spiedOnLogError = vi.spyOn(sinkLib, "logError").mockImplementation(vi.fn()); - - insertOneMacRecordsFromKafkaIntoMako( - [ - createKafkaRecord({ - topic: TOPIC, - key: "TUQtMjQtMjMwMA==", - value: "bunch-of-gibberish", - }), - ], - TOPIC, - ); - - expect(spiedOnBulkUpdateDataWrapper).toBeCalledWith([], "main"); - expect(spiedOnLogError).toBeCalledWith({ - type: "badparse", - error: expect.any(Object), - metadata: expect.any(Object), - }); - }); -}); - -describe("insertNewSeatoolRecordsFromKafkaIntoMako", () => { - // @ts-expect-error – cannot bother typing out unnecessary Document properties - const spiedOnGetItems = vi.fn<() => Promise>(() => - Promise.resolve([ - { - id: "MD-24-2300", - changedDate: "2024-02-04 23:12:36", - }, - { - id: "WA-22-2100", - changedDate: "2024-06-12 13:24:43", - }, - { - id: "NY-23-2200", - changedDate: "2024-10-12 09:04:52", - }, - { - id: "WV-24-3230", - changedDate: "2024-03-21 09:51:23", - }, - { - id: "IL-25-3130", - changedDate: "2025-03-21 17:51:23", - }, - ]), - ); - const spiedOnBulkUpdateDataWrapper = vi.fn(); - const spiedOnLogError = vi.fn(); - const TOPIC = "--mako--branch-name--aws.seatool.ksql.onemac.three.agg.State_Plan"; + const mockBulkUpdateDataWrapper = vi.fn(() => Promise.resolve()); beforeEach(() => { vi.clearAllMocks(); - - vi.spyOn(sinkLib, "getItems").mockImplementation(spiedOnGetItems); - vi.spyOn(sinkLib, "bulkUpdateDataWrapper").mockImplementation(spiedOnBulkUpdateDataWrapper); - vi.spyOn(sinkLib, "logError").mockImplementation(spiedOnLogError); - - vi.stubEnv("osDomain", "osDomain"); - vi.stubEnv("indexNamespace", "indexNamespace"); + vi.spyOn(sinkLib, "bulkUpdateDataWrapper").mockImplementation(mockBulkUpdateDataWrapper); }); - it("outputs kafka records into mako records", async () => { - await insertNewSeatoolRecordsFromKafkaIntoMako( - [ - createKafkaRecord({ - topic: TOPIC, - key: "TUQtMjQtMjMwMA==", - value: convertObjToBase64({ - id: "MD-24-2300", - ACTION_OFFICERS: [ - { - FIRST_NAME: "John", - LAST_NAME: "Doe", - EMAIL: "john.doe@medicaid.gov", - OFFICER_ID: 12345, - DEPARTMENT: "State Plan Review", - PHONE: "202-555-1234", - }, - { - FIRST_NAME: "Emily", - LAST_NAME: "Rodriguez", - EMAIL: "emily.rodriguez@medicaid.gov", - OFFICER_ID: 12346, - DEPARTMENT: "Compliance Division", - PHONE: "202-555-5678", - }, - ], - LEAD_ANALYST: [ - { - FIRST_NAME: "Michael", - LAST_NAME: "Chen", - EMAIL: "michael.chen@cms.hhs.gov", - OFFICER_ID: 67890, - DEPARTMENT: "Medicaid Innovation Center", - PHONE: "202-555-9012", - }, - ], - STATE_PLAN: { - PLAN_TYPE: 123, - SPW_STATUS_ID: 4, - APPROVED_EFFECTIVE_DATE: 1707088356000, - CHANGED_DATE: 1704163200000, - SUMMARY_MEMO: "Sample summary", - TITLE_NAME: "Sample Title", - STATUS_DATE: 1704240000000, - SUBMISSION_DATE: 1704326400000, - LEAD_ANALYST_ID: 67890, - ACTUAL_EFFECTIVE_DATE: null, - PROPOSED_DATE: null, - STATE_CODE: "10", - }, - RAI: [], - ACTIONTYPES: [{ ACTION_NAME: "Initial Review", ACTION_ID: 1, PLAN_TYPE_ID: 123 }], - STATE_PLAN_SERVICETYPES: [{ SPA_TYPE_ID: 1, SPA_TYPE_NAME: "Type A" }], - STATE_PLAN_SERVICE_SUBTYPES: [{ TYPE_ID: 1, TYPE_NAME: "SubType X" }], - }), - }), - ], - TOPIC, - ); - - expect(spiedOnBulkUpdateDataWrapper).toBeCalledWith( + it("should process a valid OneMAC event", async () => { + await insertOneMacRecordsFromKafkaIntoMako( [ { - actionType: "Initial Review", - approvedEffectiveDate: "2024-02-04T23:12:36.000Z", - authority: "1915(c)", - changed_date: 1704163200000, - cmsStatus: "Approved", - description: "Sample summary", - finalDispositionDate: "2024-01-03T00:00:00.000Z", - id: "MD-24-2300", - initialIntakeNeeded: false, - leadAnalystEmail: "michael.chen@cms.hhs.gov", - leadAnalystName: "Michael Chen", - leadAnalystOfficerId: 67890, - locked: false, - proposedDate: null, - raiReceivedDate: null, - raiRequestedDate: null, - raiWithdrawEnabled: false, - raiWithdrawnDate: null, - reviewTeam: [ - { - email: "john.doe@medicaid.gov", - name: "John Doe", - }, - { - email: "emily.rodriguez@medicaid.gov", - name: "Emily Rodriguez", - }, - ], - seatoolStatus: "Approved", - secondClock: false, - state: "10", - stateStatus: "Approved", - statusDate: "2024-01-03T00:00:00.000Z", - subTypes: [ - { - TYPE_ID: 1, - TYPE_NAME: "SubType X", - }, - ], - subject: "Sample Title", - submissionDate: "2024-01-04T00:00:00.000Z", - types: [ - { - SPA_TYPE_ID: 1, - SPA_TYPE_NAME: "Type A", - }, - ], + key: Buffer.from("id").toString("base64"), + value: Buffer.from( + JSON.stringify({ + event: "new-medicaid-submission", + origin: "mako", + id: "CO-1234", + makoChangedDate: "2024-10-01T00:00:00Z", + }), + ).toString("base64"), + timestamp: Date.now(), + offset: 0, + topic: "aws.onemac.migration.cdc", + partition: 0, + timestampType: "CREATE_TIME", + headers: {}, }, ], - "main", - ); - }); - - it("skips newer mako records", async () => { - await insertNewSeatoolRecordsFromKafkaIntoMako( - [ - createKafkaRecord({ - topic: TOPIC, - key: "V1YtMjQtMzIzMA==", - value: convertObjToBase64({ - id: "WV-24-3230", - ACTION_OFFICERS: [ - { - FIRST_NAME: "Lisa", - LAST_NAME: "Thompson", - EMAIL: "lisa.thompson@medicaid.gov", - OFFICER_ID: 78901, - DEPARTMENT: "Rural Health Services", - PHONE: "202-555-3456", - }, - { - FIRST_NAME: "Kevin", - LAST_NAME: "Anderson", - EMAIL: "kevin.anderson@medicaid.gov", - OFFICER_ID: 78902, - DEPARTMENT: "Financial Planning", - PHONE: "202-555-7890", - }, - ], - LEAD_ANALYST: [ - { - FIRST_NAME: "Elizabeth", - LAST_NAME: "Kim", - EMAIL: "elizabeth.kim@cms.hhs.gov", - OFFICER_ID: 23456, - DEPARTMENT: "Policy Integration", - PHONE: "202-555-2345", - }, - ], - STATE_PLAN: { - PLAN_TYPE: 121, - SPW_STATUS_ID: 11, - APPROVED_EFFECTIVE_DATE: 1711065600000, - CHANGED_DATE: 1711065600000, - SUMMARY_MEMO: "1115 Demonstration Waiver Review", - TITLE_NAME: "WV 1115 Medicaid Demonstration Project", - STATUS_DATE: 1710979200000, - SUBMISSION_DATE: 1711065600000, - LEAD_ANALYST_ID: 23456, - ACTUAL_EFFECTIVE_DATE: null, - PROPOSED_DATE: null, - STATE_CODE: "40", - }, - RAI: [], - ACTIONTYPES: [{ ACTION_NAME: "Pending Approval", ACTION_ID: 4, PLAN_TYPE_ID: 121 }], - STATE_PLAN_SERVICETYPES: [{ SPA_TYPE_ID: 4, SPA_TYPE_NAME: "Type D" }], - STATE_PLAN_SERVICE_SUBTYPES: [{ TYPE_ID: 4, TYPE_NAME: "SubType W" }], - }), - }), - ], - TOPIC, - ); - - expect(spiedOnBulkUpdateDataWrapper).toBeCalledWith([], "main"); - }); - - it("tombstones records with no value property", async () => { - const spiedOnTombstone = vi.spyOn(seatool, "tombstone"); - - await insertNewSeatoolRecordsFromKafkaIntoMako( - [ - createKafkaRecord({ - topic: TOPIC, - key: "TlktMjMtMjIwMA==", - value: "", // <-- missing value - }), - ], - TOPIC, - ); - - expect(spiedOnTombstone).toBeCalledWith("NY-23-2200"); - expect(spiedOnBulkUpdateDataWrapper).toBeCalledWith( - [ - { - actionType: null, - approvedEffectiveDate: null, - authority: null, - changedDate: null, - cmsStatus: null, - description: null, - finalDispositionDate: null, - id: "NY-23-2200", - leadAnalystName: null, - leadAnalystOfficerId: null, - proposedDate: null, - raiReceivedDate: null, - raiRequestedDate: null, - raiWithdrawnDate: null, - reviewTeam: null, - seatoolStatus: null, - state: null, - stateStatus: null, - statusDate: null, - subTypes: null, - subject: null, - submissionDate: null, - types: null, - }, - ], - "main", - ); - }); - - it("skips over records with no key property", async () => { - await insertNewSeatoolRecordsFromKafkaIntoMako( - [ - createKafkaRecord({ - topic: TOPIC, - key: "", // <-- missing key - value: convertObjToBase64({ - id: "IL-25-3130", - ACTION_OFFICERS: [ - { - FIRST_NAME: "Amanda", - LAST_NAME: "Brown", - EMAIL: "amanda.brown@medicaid.gov", - OFFICER_ID: 89012, - DEPARTMENT: "Strategic Initiatives", - PHONE: "202-555-5678", - }, - { - FIRST_NAME: "Carlos", - LAST_NAME: "Mendez", - EMAIL: "carlos.mendez@medicaid.gov", - OFFICER_ID: 89013, - DEPARTMENT: "Program Evaluation", - PHONE: "202-555-8901", - }, - ], - LEAD_ANALYST: [ - { - FIRST_NAME: "Daniel", - LAST_NAME: "Park", - EMAIL: "daniel.park@cms.hhs.gov", - OFFICER_ID: 34567, - DEPARTMENT: "Innovative Solutions", - PHONE: "202-555-3456", - }, - ], - STATE_PLAN: { - PLAN_TYPE: 124, - SPW_STATUS_ID: 10, - APPROVED_EFFECTIVE_DATE: 1740624000000, - CHANGED_DATE: 1740624000000, - SUMMARY_MEMO: "CHIP State Plan Amendment Review", - TITLE_NAME: "IL CHIP Program Financial Strategy", - STATUS_DATE: 1740537600000, - SUBMISSION_DATE: 1740624000000, - LEAD_ANALYST_ID: 34567, - ACTUAL_EFFECTIVE_DATE: null, - PROPOSED_DATE: null, - STATE_CODE: "50", - }, - RAI: [], - ACTIONTYPES: [{ ACTION_NAME: "Financial Review", ACTION_ID: 5, PLAN_TYPE_ID: 124 }], - STATE_PLAN_SERVICETYPES: [{ SPA_TYPE_ID: 5, SPA_TYPE_NAME: "Type E" }], - STATE_PLAN_SERVICE_SUBTYPES: [{ TYPE_ID: 5, TYPE_NAME: "SubType V" }], - }), - }), - ], - TOPIC, - ); - - expect(spiedOnBulkUpdateDataWrapper).toBeCalledWith([], "main"); - }); - - it("skips over records with invalid properties", async () => { - await insertNewSeatoolRecordsFromKafkaIntoMako( - [ - createKafkaRecord({ - topic: TOPIC, - key: "V1YtMjQtMzIzMA==", - // value is invalid JSON - value: "bunch-of-gibberish", - }), - ], - TOPIC, - ); - - expect(spiedOnBulkUpdateDataWrapper).toBeCalledWith([], "main"); - expect(spiedOnLogError).toBeCalledWith({ - type: "badparse", - metadata: expect.any(Object), - error: expect.any(Object), - }); - }); - - it("skips over records with seatoolStatus:'Unknown' || authority: null property values", async () => { - await insertNewSeatoolRecordsFromKafkaIntoMako( - [ - createKafkaRecord({ - topic: TOPIC, - key: "TUQtMjQtMjMwMA==", - value: convertObjToBase64({ - id: "MD-24-2300", - ACTION_OFFICERS: [ - { - FIRST_NAME: "John", - LAST_NAME: "Doe", - EMAIL: "john.doe@medicaid.gov", - OFFICER_ID: 12345, - DEPARTMENT: "State Plan Review", - PHONE: "202-555-1234", - }, - { - FIRST_NAME: "Emily", - LAST_NAME: "Rodriguez", - EMAIL: "emily.rodriguez@medicaid.gov", - OFFICER_ID: 12346, - DEPARTMENT: "Compliance Division", - PHONE: "202-555-5678", - }, - ], - LEAD_ANALYST: [ - { - FIRST_NAME: "Michael", - LAST_NAME: "Chen", - EMAIL: "michael.chen@cms.hhs.gov", - OFFICER_ID: 67890, - DEPARTMENT: "Medicaid Innovation Center", - PHONE: "202-555-9012", - }, - ], - STATE_PLAN: { - PLAN_TYPE: 999, - SPW_STATUS_ID: 999, - APPROVED_EFFECTIVE_DATE: 1707088356000, - CHANGED_DATE: 1704163200000, - SUMMARY_MEMO: "Sample summary", - TITLE_NAME: "Sample Title", - STATUS_DATE: 1704240000000, - SUBMISSION_DATE: 1704326400000, - LEAD_ANALYST_ID: 67890, - ACTUAL_EFFECTIVE_DATE: null, - PROPOSED_DATE: null, - STATE_CODE: "10", - }, - RAI: [], - ACTIONTYPES: [{ ACTION_NAME: "Initial Review", ACTION_ID: 1, PLAN_TYPE_ID: 123 }], - STATE_PLAN_SERVICETYPES: [{ SPA_TYPE_ID: 1, SPA_TYPE_NAME: "Type A" }], - STATE_PLAN_SERVICE_SUBTYPES: [{ TYPE_ID: 1, TYPE_NAME: "SubType X" }], - }), - }), - ], - TOPIC, - ); - - expect(spiedOnBulkUpdateDataWrapper).toBeCalledWith([], "main"); - }); - - it("skips over records that fail SEATOOL safeParse", async () => { - await insertNewSeatoolRecordsFromKafkaIntoMako( - [ - createKafkaRecord({ - topic: TOPIC, - key: "TUQtMjQtMjMwMA==", - value: convertObjToBase64({ - ACTION_OFFICERS: [ - { - FIRST_NAME: "John", - LAST_NAME: "Doe", - EMAIL: "john.doe@medicaid.gov", - OFFICER_ID: 12345, - DEPARTMENT: "State Plan Review", - PHONE: "202-555-1234", - }, - { - FIRST_NAME: "Emily", - LAST_NAME: "Rodriguez", - EMAIL: "emily.rodriguez@medicaid.gov", - OFFICER_ID: 12346, - DEPARTMENT: "Compliance Division", - PHONE: "202-555-5678", - }, - ], - LEAD_ANALYST: [ - { - FIRST_NAME: "Michael", - LAST_NAME: "Chen", - EMAIL: "michael.chen@cms.hhs.gov", - OFFICER_ID: 67890, - DEPARTMENT: "Medicaid Innovation Center", - PHONE: "202-555-9012", - }, - ], - STATE_PLAN: { - PLAN_TYPE: 123, - SPW_STATUS_ID: 4, - APPROVED_EFFECTIVE_DATE: 1707088356000, - CHANGED_DATE: 1704163200000, - SUMMARY_MEMO: "Sample summary", - TITLE_NAME: "Sample Title", - STATUS_DATE: 1704240000000, - SUBMISSION_DATE: 1704326400000, - LEAD_ANALYST_ID: 67890, - ACTUAL_EFFECTIVE_DATE: null, - PROPOSED_DATE: null, - STATE_CODE: "10", - }, - RAI: [], - ACTIONTYPES: [{ ACTION_NAME: "Initial Review", ACTION_ID: 1 }], - STATE_PLAN_SERVICETYPES: [{ SPA_TYPE_ID: 1, SPA_TYPE_NAME: "Type A" }], - STATE_PLAN_SERVICE_SUBTYPES: [{ TYPE_ID: 1, TYPE_NAME: "SubType X" }], - }), - }), - ], - TOPIC, - ); - - expect(spiedOnBulkUpdateDataWrapper).toBeCalledWith([], "main"); - expect(spiedOnLogError).toBeCalledWith({ - type: "validation", - metadata: expect.any(Object), - error: expect.any(Array), - }); - }); -}); - -describe("syncSeatoolRecordDatesFromKafkaWithMako", () => { - const spiedOnBulkUpdateDataWrapper = vi.fn(); - const spiedOnLogError = vi.fn(); - - const TOPIC = "--mako--branch-name--aws.seatool.debezium.changed_date.SEA.dbo.State_Plan"; - - beforeEach(() => { - vi.resetAllMocks(); - - vi.spyOn(sinkLib, "bulkUpdateDataWrapper").mockImplementation(spiedOnBulkUpdateDataWrapper); - vi.spyOn(sinkLib, "logError").mockImplementation(spiedOnLogError); - - vi.stubEnv("osDomain", "osDomain"); - vi.stubEnv("indexNamespace", "indexNamespace"); - }); - - it("processes a valid date change to mako", async () => { - await syncSeatoolRecordDatesFromKafkaWithMako( - [ - createKafkaRecord({ - topic: TOPIC, - key: "TUQtMjQtMjMwMA==", - value: convertObjToBase64({ - payload: { after: { ID_Number: "12345", Changed_Date: 1672531200000 } }, - }), - }), - ], - TOPIC, - ); - - expect(spiedOnBulkUpdateDataWrapper).toBeCalledWith( - [ - { - changedDate: "2023-01-01T00:00:00.000Z", - id: "12345", - }, - ], - "main", - ); - }); - - it("processes a date change that's null to mako", async () => { - await syncSeatoolRecordDatesFromKafkaWithMako( - [ - createKafkaRecord({ - topic: TOPIC, - key: "TUQtMjQtMjMwMA==", - value: convertObjToBase64({ - payload: { after: { ID_Number: "67890", Changed_Date: null } }, - }), - }), - ], - TOPIC, - ); - - expect(spiedOnBulkUpdateDataWrapper).toBeCalledWith( - [ - { - changedDate: null, - id: "67890", - }, - ], - "main", - ); - }); - - it("skips records with no value property", async () => { - await syncSeatoolRecordDatesFromKafkaWithMako( - [ - createKafkaRecord({ - topic: TOPIC, - key: "TUQtMjQtMjMwMA==", - value: "", - }), - ], - TOPIC, - ); - - expect(spiedOnBulkUpdateDataWrapper).toBeCalledWith([], "main"); - }); - - it("skips payloads that're null or undefined", async () => { - await syncSeatoolRecordDatesFromKafkaWithMako( - [ - createKafkaRecord({ - topic: TOPIC, - key: "TUQtMjQtMjMwMA==", - value: convertObjToBase64({ payload: { after: null } }), - }), - ], - TOPIC, - ); - - expect(spiedOnBulkUpdateDataWrapper).toBeCalledWith([], "main"); - - await syncSeatoolRecordDatesFromKafkaWithMako( - [ - createKafkaRecord({ - topic: TOPIC, - key: "TUQtMjQtMjMwMA==", - value: convertObjToBase64({ - payload: { - after: undefined, - }, - }), - }), - ], - TOPIC, - ); - - expect(spiedOnBulkUpdateDataWrapper).toBeCalledWith([], "main"); - }); - - it("skips payloads with missing Id property", async () => { - await syncSeatoolRecordDatesFromKafkaWithMako( - [ - createKafkaRecord({ - topic: TOPIC, - key: "TUQtMjQtMjMwMA==", - // missing required Id property - value: convertObjToBase64({ payload: { after: { Changed_Date: 1672531200000 } } }), - }), - ], - TOPIC, - ); - - expect(spiedOnBulkUpdateDataWrapper).toBeCalledWith([], "main"); - expect(spiedOnLogError).toBeCalledWith({ - type: "validation", - error: expect.any(Object), - metadata: expect.any(Object), - }); - }); - - it("skips payloads with invalid JSON", async () => { - await syncSeatoolRecordDatesFromKafkaWithMako( - [ - createKafkaRecord({ - topic: TOPIC, - key: "TUQtMjQtMjMwMA==", - value: "bunch-of-gibberish", - }), - ], - TOPIC, + "topic", ); - expect(spiedOnBulkUpdateDataWrapper).toBeCalledWith([], "main"); - expect(spiedOnLogError).toBeCalledWith({ - type: "badparse", - error: expect.any(Object), - metadata: expect.any(Object), - }); + expect(mockBulkUpdateDataWrapper).toHaveBeenCalledWith(expect.any(Array), "main"); }); }); diff --git a/lib/lambda/sinkMainProcessors.ts b/lib/lambda/sinkMainProcessors.ts index c95359a25d..a2b2a010e5 100644 --- a/lib/lambda/sinkMainProcessors.ts +++ b/lib/lambda/sinkMainProcessors.ts @@ -1,4 +1,4 @@ -import { bulkUpdateDataWrapper, ErrorType, logError, getItems } from "libs"; +import { bulkUpdateDataWrapper, ErrorType, logError, getItems } from "../libs"; import { KafkaRecord, opensearch, SeatoolRecordWithUpdatedDate } from "shared-types"; import { Document, transforms } from "shared-types/opensearch/main"; import { decodeBase64WithUtf8 } from "shared-utils"; @@ -149,7 +149,6 @@ const getMakoDocTimestamps = async (kafkaRecords: KafkaRecord[]) => { if (item.changedDate !== null) { map.set(item.id, new Date(item.changedDate).getTime()); } - return map; }, new Map()); }; @@ -211,12 +210,12 @@ export const insertNewSeatoolRecordsFromKafkaIntoMako = async ( console.log(`mako: ${makoDocumentTimestamp}`); console.log(`seatool: ${seatoolDocument.changed_date}`); - const isNewerOrUndefined = + const isOlderThanMako = seatoolDocument.changed_date && makoDocumentTimestamp && - isBefore(makoDocumentTimestamp, seatoolDocument.changed_date); + isBefore(seatoolDocument.changed_date, makoDocumentTimestamp); - if (isNewerOrUndefined) { + if (isOlderThanMako) { console.log("SKIPPED DUE TO OUT-OF-DATE INFORMATION"); return collection; } @@ -266,7 +265,7 @@ export const syncSeatoolRecordDatesFromKafkaWithMako = async ( } const payloadWithUpdatedDate: { payload?: { after?: SeatoolRecordWithUpdatedDate | null } } = - JSON.parse(decodeBase64WithUtf8(value)); + decodeBase64WithUtf8(value) as any; // .after could be `null` or `undefined` if (!payloadWithUpdatedDate?.payload?.after) { diff --git a/lib/lambda/submit/index.ts b/lib/lambda/submit/index.ts index e93023e4a5..23a46cf9ae 100644 --- a/lib/lambda/submit/index.ts +++ b/lib/lambda/submit/index.ts @@ -1,8 +1,8 @@ -import { response } from "libs/handler-lib"; +import { response } from "lib/libs/handler-lib"; import { APIGatewayEvent } from "aws-lambda"; import { submissionPayloads } from "./submissionPayloads"; -import { produceMessage } from "libs/api/kafka"; +import { produceMessage } from "lib/libs/api/kafka"; import { BaseSchemas } from "shared-types/events"; export const submit = async (event: APIGatewayEvent) => { @@ -33,11 +33,7 @@ export const submit = async (event: APIGatewayEvent) => { try { const eventBody = await submissionPayloads[body.event](event); - await produceMessage( - process.env.topicName as string, - body.id, - JSON.stringify(eventBody), - ); + await produceMessage(process.env.topicName as string, body.id, JSON.stringify(eventBody)); return response({ statusCode: 200, diff --git a/lib/lambda/submit/submissionPayloads/app-k.ts b/lib/lambda/submit/submissionPayloads/app-k.ts index 3253d27ee8..00a924601c 100644 --- a/lib/lambda/submit/submissionPayloads/app-k.ts +++ b/lib/lambda/submit/submissionPayloads/app-k.ts @@ -1,18 +1,12 @@ import { events } from "shared-types/events"; -import { - isAuthorized, - getAuthDetails, - lookupUserAttributes, -} from "libs/api/auth/user"; +import { isAuthorized, getAuthDetails, lookupUserAttributes } from "../../../libs/api/auth/user"; import { type APIGatewayEvent } from "aws-lambda"; -import { itemExists } from "libs/api/package"; +import { itemExists } from "../../../libs/api/package"; export const appK = async (event: APIGatewayEvent) => { if (!event.body) return; - const parsedResult = events["app-k"].baseSchema.safeParse( - JSON.parse(event.body), - ); + const parsedResult = events["app-k"].baseSchema.safeParse(JSON.parse(event.body)); if (!parsedResult.success) { throw parsedResult.error; } @@ -28,10 +22,7 @@ export const appK = async (event: APIGatewayEvent) => { } const authDetails = getAuthDetails(event); - const userAttr = await lookupUserAttributes( - authDetails.userId, - authDetails.poolId, - ); + const userAttr = await lookupUserAttributes(authDetails.userId, authDetails.poolId); const submitterEmail = userAttr.email; const submitterName = `${userAttr.given_name} ${userAttr.family_name}`; diff --git a/lib/lambda/submit/submissionPayloads/capitated-initial.ts b/lib/lambda/submit/submissionPayloads/capitated-initial.ts index 4cecba5a28..def2f1b22a 100644 --- a/lib/lambda/submit/submissionPayloads/capitated-initial.ts +++ b/lib/lambda/submit/submissionPayloads/capitated-initial.ts @@ -1,18 +1,12 @@ import { events } from "shared-types/events"; -import { - isAuthorized, - getAuthDetails, - lookupUserAttributes, -} from "../../../libs/api/auth/user"; +import { isAuthorized, getAuthDetails, lookupUserAttributes } from "../../../libs/api/auth/user"; import { type APIGatewayEvent } from "aws-lambda"; -import { itemExists } from "libs/api/package"; +import { itemExists } from "../../../libs/api/package"; export const capitatedInitial = async (event: APIGatewayEvent) => { if (!event.body) return; - const parsedResult = events["capitated-initial"].baseSchema.safeParse( - JSON.parse(event.body), - ); + const parsedResult = events["capitated-initial"].baseSchema.safeParse(JSON.parse(event.body)); if (!parsedResult.success) { throw parsedResult.error; } @@ -28,10 +22,7 @@ export const capitatedInitial = async (event: APIGatewayEvent) => { } const authDetails = getAuthDetails(event); - const userAttr = await lookupUserAttributes( - authDetails.userId, - authDetails.poolId, - ); + const userAttr = await lookupUserAttributes(authDetails.userId, authDetails.poolId); const submitterEmail = userAttr.email; const submitterName = `${userAttr.given_name} ${userAttr.family_name}`; diff --git a/lib/lambda/submit/submissionPayloads/capitated-renewal.ts b/lib/lambda/submit/submissionPayloads/capitated-renewal.ts index 6d89027c15..ee5c7523f2 100644 --- a/lib/lambda/submit/submissionPayloads/capitated-renewal.ts +++ b/lib/lambda/submit/submissionPayloads/capitated-renewal.ts @@ -1,20 +1,14 @@ // can/should add the additional frontend checks here import { events } from "shared-types/events"; -import { - isAuthorized, - getAuthDetails, - lookupUserAttributes, -} from "../../../libs/api/auth/user"; +import { isAuthorized, getAuthDetails, lookupUserAttributes } from "../../../libs/api/auth/user"; import { type APIGatewayEvent } from "aws-lambda"; -import { itemExists } from "libs/api/package"; +import { itemExists } from "../../../libs/api/package"; export const capitatedRenewal = async (event: APIGatewayEvent) => { if (!event.body) return; - const parsedResult = events["capitated-renewal"].baseSchema.safeParse( - JSON.parse(event.body), - ); + const parsedResult = events["capitated-renewal"].baseSchema.safeParse(JSON.parse(event.body)); if (!parsedResult.success) { throw parsedResult.error; } @@ -30,10 +24,7 @@ export const capitatedRenewal = async (event: APIGatewayEvent) => { } const authDetails = getAuthDetails(event); - const userAttr = await lookupUserAttributes( - authDetails.userId, - authDetails.poolId, - ); + const userAttr = await lookupUserAttributes(authDetails.userId, authDetails.poolId); const submitterEmail = userAttr.email; const submitterName = `${userAttr.given_name} ${userAttr.family_name}`; diff --git a/lib/lambda/submit/submissionPayloads/contracting-amendment.ts b/lib/lambda/submit/submissionPayloads/contracting-amendment.ts index f9eb70e633..9c2260b281 100644 --- a/lib/lambda/submit/submissionPayloads/contracting-amendment.ts +++ b/lib/lambda/submit/submissionPayloads/contracting-amendment.ts @@ -1,20 +1,14 @@ // can/should add the additional frontend checks here import { events } from "shared-types/events"; -import { - isAuthorized, - getAuthDetails, - lookupUserAttributes, -} from "../../../libs/api/auth/user"; +import { isAuthorized, getAuthDetails, lookupUserAttributes } from "../../../libs/api/auth/user"; import { type APIGatewayEvent } from "aws-lambda"; -import { itemExists } from "libs/api/package"; +import { itemExists } from "../../../libs/api/package"; export const contractingAmendment = async (event: APIGatewayEvent) => { if (!event.body) return; - const parsedResult = events["contracting-amendment"].baseSchema.safeParse( - JSON.parse(event.body), - ); + const parsedResult = events["contracting-amendment"].baseSchema.safeParse(JSON.parse(event.body)); if (!parsedResult.success) { throw parsedResult.error; } @@ -30,10 +24,7 @@ export const contractingAmendment = async (event: APIGatewayEvent) => { } const authDetails = getAuthDetails(event); - const userAttr = await lookupUserAttributes( - authDetails.userId, - authDetails.poolId, - ); + const userAttr = await lookupUserAttributes(authDetails.userId, authDetails.poolId); const submitterEmail = userAttr.email; const submitterName = `${userAttr.given_name} ${userAttr.family_name}`; diff --git a/lib/lambda/submit/submissionPayloads/contracting-initial.ts b/lib/lambda/submit/submissionPayloads/contracting-initial.ts index a05a29422b..3bf481a3ba 100644 --- a/lib/lambda/submit/submissionPayloads/contracting-initial.ts +++ b/lib/lambda/submit/submissionPayloads/contracting-initial.ts @@ -1,18 +1,12 @@ import { events } from "shared-types/events"; -import { - isAuthorized, - getAuthDetails, - lookupUserAttributes, -} from "../../../libs/api/auth/user"; +import { isAuthorized, getAuthDetails, lookupUserAttributes } from "../../../libs/api/auth/user"; import { type APIGatewayEvent } from "aws-lambda"; -import { itemExists } from "libs/api/package"; +import { itemExists } from "../../../libs/api/package"; export const contractingInitial = async (event: APIGatewayEvent) => { if (!event.body) return; - const parsedResult = events["contracting-initial"].baseSchema.safeParse( - JSON.parse(event.body), - ); + const parsedResult = events["contracting-initial"].baseSchema.safeParse(JSON.parse(event.body)); if (!parsedResult.success) { throw parsedResult.error; } @@ -28,10 +22,7 @@ export const contractingInitial = async (event: APIGatewayEvent) => { } const authDetails = getAuthDetails(event); - const userAttr = await lookupUserAttributes( - authDetails.userId, - authDetails.poolId, - ); + const userAttr = await lookupUserAttributes(authDetails.userId, authDetails.poolId); const submitterEmail = userAttr.email; const submitterName = `${userAttr.given_name} ${userAttr.family_name}`; diff --git a/lib/lambda/submit/submissionPayloads/contracting-renewal.ts b/lib/lambda/submit/submissionPayloads/contracting-renewal.ts index bb1f60cff0..4a8c22aca4 100644 --- a/lib/lambda/submit/submissionPayloads/contracting-renewal.ts +++ b/lib/lambda/submit/submissionPayloads/contracting-renewal.ts @@ -1,20 +1,14 @@ // can/should add the additional frontend checks here import { events } from "shared-types/events"; -import { - isAuthorized, - getAuthDetails, - lookupUserAttributes, -} from "../../../libs/api/auth/user"; +import { isAuthorized, getAuthDetails, lookupUserAttributes } from "../../../libs/api/auth/user"; import { type APIGatewayEvent } from "aws-lambda"; -import { itemExists } from "libs/api/package"; +import { itemExists } from "../../../libs/api/package"; export const contractingRenewal = async (event: APIGatewayEvent) => { if (!event.body) return; - const parsedResult = events["contracting-renewal"].baseSchema.safeParse( - JSON.parse(event.body), - ); + const parsedResult = events["contracting-renewal"].baseSchema.safeParse(JSON.parse(event.body)); if (!parsedResult.success) { throw parsedResult.error; } @@ -30,10 +24,7 @@ export const contractingRenewal = async (event: APIGatewayEvent) => { } const authDetails = getAuthDetails(event); - const userAttr = await lookupUserAttributes( - authDetails.userId, - authDetails.poolId, - ); + const userAttr = await lookupUserAttributes(authDetails.userId, authDetails.poolId); const submitterEmail = userAttr.email; const submitterName = `${userAttr.given_name} ${userAttr.family_name}`; diff --git a/lib/lambda/submit/submissionPayloads/new-chip-submission.ts b/lib/lambda/submit/submissionPayloads/new-chip-submission.ts index b79cf7bbd0..0be7b3887b 100644 --- a/lib/lambda/submit/submissionPayloads/new-chip-submission.ts +++ b/lib/lambda/submit/submissionPayloads/new-chip-submission.ts @@ -1,18 +1,12 @@ import { events } from "shared-types/events"; -import { - isAuthorized, - getAuthDetails, - lookupUserAttributes, -} from "../../../libs/api/auth/user"; +import { isAuthorized, getAuthDetails, lookupUserAttributes } from "../../../libs/api/auth/user"; import { type APIGatewayEvent } from "aws-lambda"; -import { itemExists } from "libs/api/package"; +import { itemExists } from "../../../libs/api/package"; export const newChipSubmission = async (event: APIGatewayEvent) => { if (!event.body) return; - const parsedResult = events["new-chip-submission"].baseSchema.safeParse( - JSON.parse(event.body), - ); + const parsedResult = events["new-chip-submission"].baseSchema.safeParse(JSON.parse(event.body)); if (!parsedResult.success) { throw parsedResult.error; } @@ -28,10 +22,7 @@ export const newChipSubmission = async (event: APIGatewayEvent) => { } const authDetails = getAuthDetails(event); - const userAttr = await lookupUserAttributes( - authDetails.userId, - authDetails.poolId, - ); + const userAttr = await lookupUserAttributes(authDetails.userId, authDetails.poolId); const submitterEmail = userAttr.email; const submitterName = `${userAttr.given_name} ${userAttr.family_name}`; diff --git a/lib/lambda/submit/submissionPayloads/new-medicaid-submission.ts b/lib/lambda/submit/submissionPayloads/new-medicaid-submission.ts index 91ed571e7d..c252082056 100644 --- a/lib/lambda/submit/submissionPayloads/new-medicaid-submission.ts +++ b/lib/lambda/submit/submissionPayloads/new-medicaid-submission.ts @@ -1,11 +1,7 @@ import { events } from "shared-types/events"; -import { - isAuthorized, - getAuthDetails, - lookupUserAttributes, -} from "../../../libs/api/auth/user"; +import { isAuthorized, getAuthDetails, lookupUserAttributes } from "../../../libs/api/auth/user"; import { type APIGatewayEvent } from "aws-lambda"; -import { itemExists } from "libs/api/package"; +import { itemExists } from "lib/libs/api/package"; export const newMedicaidSubmission = async (event: APIGatewayEvent) => { if (!event.body) return; @@ -28,10 +24,7 @@ export const newMedicaidSubmission = async (event: APIGatewayEvent) => { } const authDetails = getAuthDetails(event); - const userAttr = await lookupUserAttributes( - authDetails.userId, - authDetails.poolId, - ); + const userAttr = await lookupUserAttributes(authDetails.userId, authDetails.poolId); const submitterEmail = userAttr.email; const submitterName = `${userAttr.given_name} ${userAttr.family_name}`; diff --git a/lib/lambda/submit/submissionPayloads/respond-to-rai.ts b/lib/lambda/submit/submissionPayloads/respond-to-rai.ts index af53355b24..0f4eb979ed 100644 --- a/lib/lambda/submit/submissionPayloads/respond-to-rai.ts +++ b/lib/lambda/submit/submissionPayloads/respond-to-rai.ts @@ -1,18 +1,12 @@ import { events } from "shared-types/events"; -import { - isAuthorized, - getAuthDetails, - lookupUserAttributes, -} from "../../../libs/api/auth/user"; +import { isAuthorized, getAuthDetails, lookupUserAttributes } from "../../../libs/api/auth/user"; import { type APIGatewayEvent } from "aws-lambda"; -import { itemExists } from "libs/api/package"; +import { itemExists } from "lib/libs/api/package"; export const respondToRai = async (event: APIGatewayEvent) => { if (!event.body) return; - const parsedResult = events["respond-to-rai"].baseSchema.safeParse( - JSON.parse(event.body), - ); + const parsedResult = events["respond-to-rai"].baseSchema.safeParse(JSON.parse(event.body)); if (!parsedResult.success) { throw parsedResult.error; } @@ -28,10 +22,7 @@ export const respondToRai = async (event: APIGatewayEvent) => { } const authDetails = getAuthDetails(event); - const userAttr = await lookupUserAttributes( - authDetails.userId, - authDetails.poolId, - ); + const userAttr = await lookupUserAttributes(authDetails.userId, authDetails.poolId); const submitterEmail = userAttr.email; const submitterName = `${userAttr.given_name} ${userAttr.family_name}`; diff --git a/lib/lambda/submit/submissionPayloads/temporary-extension.ts b/lib/lambda/submit/submissionPayloads/temporary-extension.ts index 9b8ca9919c..d35e3f9230 100644 --- a/lib/lambda/submit/submissionPayloads/temporary-extension.ts +++ b/lib/lambda/submit/submissionPayloads/temporary-extension.ts @@ -1,20 +1,14 @@ // can/should add the additional frontend checks here import { events } from "shared-types/events"; -import { - isAuthorized, - getAuthDetails, - lookupUserAttributes, -} from "../../../libs/api/auth/user"; +import { isAuthorized, getAuthDetails, lookupUserAttributes } from "../../../libs/api/auth/user"; import { type APIGatewayEvent } from "aws-lambda"; -import { itemExists } from "libs/api/package"; +import { itemExists } from "lib/libs/api/package"; export const temporaryExtension = async (event: APIGatewayEvent) => { if (!event.body) return; - const parsedResult = events["temporary-extension"].baseSchema.safeParse( - JSON.parse(event.body), - ); + const parsedResult = events["temporary-extension"].baseSchema.safeParse(JSON.parse(event.body)); if (!parsedResult.success) { throw parsedResult.error; } @@ -34,10 +28,7 @@ export const temporaryExtension = async (event: APIGatewayEvent) => { } const authDetails = getAuthDetails(event); - const userAttr = await lookupUserAttributes( - authDetails.userId, - authDetails.poolId, - ); + const userAttr = await lookupUserAttributes(authDetails.userId, authDetails.poolId); const submitterEmail = userAttr.email; const submitterName = `${userAttr.given_name} ${userAttr.family_name}`; diff --git a/lib/lambda/submit/submissionPayloads/toggle-withdraw-rai.ts b/lib/lambda/submit/submissionPayloads/toggle-withdraw-rai.ts index 49b5a82552..4b559fb1c6 100644 --- a/lib/lambda/submit/submissionPayloads/toggle-withdraw-rai.ts +++ b/lib/lambda/submit/submissionPayloads/toggle-withdraw-rai.ts @@ -1,18 +1,12 @@ import { events } from "shared-types/events"; -import { - isAuthorized, - getAuthDetails, - lookupUserAttributes, -} from "../../../libs/api/auth/user"; +import { isAuthorized, getAuthDetails, lookupUserAttributes } from "../../../libs/api/auth/user"; import { type APIGatewayEvent } from "aws-lambda"; -import { itemExists } from "libs/api/package"; +import { itemExists } from "lib/libs/api/package"; export const toggleWithdrawRai = async (event: APIGatewayEvent) => { if (!event.body) return; - const parsedResult = events["toggle-withdraw-rai"].baseSchema.safeParse( - JSON.parse(event.body), - ); + const parsedResult = events["toggle-withdraw-rai"].baseSchema.safeParse(JSON.parse(event.body)); if (!parsedResult.success) { throw parsedResult.error; @@ -28,10 +22,7 @@ export const toggleWithdrawRai = async (event: APIGatewayEvent) => { } const authDetails = getAuthDetails(event); - const userAttr = await lookupUserAttributes( - authDetails.userId, - authDetails.poolId, - ); + const userAttr = await lookupUserAttributes(authDetails.userId, authDetails.poolId); const submitterEmail = userAttr.email; const submitterName = `${userAttr.given_name} ${userAttr.family_name}`; diff --git a/lib/lambda/submit/submissionPayloads/withdraw-package.ts b/lib/lambda/submit/submissionPayloads/withdraw-package.ts index 197b1ff599..5bbf7c7ed1 100644 --- a/lib/lambda/submit/submissionPayloads/withdraw-package.ts +++ b/lib/lambda/submit/submissionPayloads/withdraw-package.ts @@ -1,7 +1,7 @@ import { events } from "shared-types/events"; import { isAuthorized, getAuthDetails, lookupUserAttributes } from "../../../libs/api/auth/user"; import { type APIGatewayEvent } from "aws-lambda"; -import { itemExists } from "libs/api/package"; +import { itemExists } from "lib/libs/api/package"; export const withdrawPackage = async (event: APIGatewayEvent) => { if (!event.body) return; diff --git a/lib/lambda/submit/submissionPayloads/withdraw-rai.ts b/lib/lambda/submit/submissionPayloads/withdraw-rai.ts index 1aee37305f..44bc05a7c0 100644 --- a/lib/lambda/submit/submissionPayloads/withdraw-rai.ts +++ b/lib/lambda/submit/submissionPayloads/withdraw-rai.ts @@ -1,18 +1,12 @@ import { events } from "shared-types/events"; -import { - isAuthorized, - getAuthDetails, - lookupUserAttributes, -} from "../../../libs/api/auth/user"; +import { isAuthorized, getAuthDetails, lookupUserAttributes } from "../../../libs/api/auth/user"; import { type APIGatewayEvent } from "aws-lambda"; -import { itemExists } from "libs/api/package"; +import { itemExists } from "lib/libs/api/package"; export const withdrawRai = async (event: APIGatewayEvent) => { if (!event.body) return; - const parsedResult = events["withdraw-rai"].baseSchema.safeParse( - JSON.parse(event.body), - ); + const parsedResult = events["withdraw-rai"].baseSchema.safeParse(JSON.parse(event.body)); if (!parsedResult.success) { throw parsedResult.error; @@ -28,10 +22,7 @@ export const withdrawRai = async (event: APIGatewayEvent) => { } const authDetails = getAuthDetails(event); - const userAttr = await lookupUserAttributes( - authDetails.userId, - authDetails.poolId, - ); + const userAttr = await lookupUserAttributes(authDetails.userId, authDetails.poolId); const submitterEmail = userAttr.email; const submitterName = `${userAttr.given_name} ${userAttr.family_name}`; diff --git a/lib/lambda/update/updatePackage.ts b/lib/lambda/update/updatePackage.ts index 24592a66a6..07aa95163c 100644 --- a/lib/lambda/update/updatePackage.ts +++ b/lib/lambda/update/updatePackage.ts @@ -1,10 +1,8 @@ -import { response } from "libs/handler-lib"; -import { APIGatewayEvent } from "aws-lambda"; -import { getPackage } from "libs/api/package"; -import { produceMessage } from "libs/api/kafka"; +import { getPackage } from "../../libs/api/package"; +import { produceMessage } from "../../libs/api/kafka"; import { ItemResult } from "shared-types/opensearch/main"; import { getPackageType } from "./getPackageType"; -import { events } from "lib/packages/shared-types"; +import { APIGatewayEvent, events } from "lib/packages/shared-types"; import { z } from "zod"; const sendDeleteMessage = async (packageId: string) => { @@ -23,10 +21,10 @@ const sendDeleteMessage = async (packageId: string) => { }), ); - return response({ + return { statusCode: 200, body: { message: `${packageId} has been deleted.` }, - }); + }; }; const sendUpdateValuesMessage = async ({ @@ -46,17 +44,17 @@ const sendUpdateValuesMessage = async ({ (field) => !(field in currentPackage._source), ); if (invalidFields.length > 0) { - return response({ + return { statusCode: 400, body: { message: `Cannot update invalid field(s): ${invalidFields.join(", ")}` }, - }); + }; } if ("id" in updatedFields) { - return response({ + return { statusCode: 400, body: { message: "ID is not a valid field to update" }, - }); + }; } const fieldNames = Object.keys(updatedFields).join(", "); @@ -77,10 +75,10 @@ const sendUpdateValuesMessage = async ({ }), ); - return response({ + return { statusCode: 200, body: { message: `${changeMadeText} in package ${currentPackage._id}.` }, - }); + }; }; const sendUpdateIdMessage = async ({ @@ -103,39 +101,39 @@ const sendUpdateIdMessage = async ({ } = currentPackage._source; if (!updatedId) { - return response({ + return { statusCode: 400, body: { message: "New ID required to update package" }, - }); + }; } // check if a package with this new ID already exists const packageExists = await getPackage(updatedId); if (packageExists) { - return response({ + return { statusCode: 400, body: { message: "This ID already exists" }, - }); + }; } // use event of current package to determine how ID should be formatted const packageEvent = await getPackageType(currentPackage._id); const packageSubmissionTypeSchema = events[packageEvent as keyof typeof events].baseSchema; if (!packageSubmissionTypeSchema) { - return response({ + return { statusCode: 500, body: { message: "Could not validate the ID of this type of package." }, - }); + }; } const idSchema = packageSubmissionTypeSchema.shape.id; const parsedId = idSchema.safeParse(updatedId); if (!parsedId.success) { - return response({ + return { statusCode: 400, body: parsedId.error.message, - }); + }; } await sendDeleteMessage(currentPackage._id); @@ -153,10 +151,10 @@ const sendUpdateIdMessage = async ({ }), ); - return response({ + return { statusCode: 200, body: { message: `The ID of package ${currentPackage._id} has been updated to ${updatedId}.` }, - }); + }; }; const updatePackageEventBodySchema = z.object({ @@ -169,10 +167,10 @@ const updatePackageEventBodySchema = z.object({ export const handler = async (event: APIGatewayEvent) => { if (!event.body) { - return response({ + return { statusCode: 400, body: { message: "Event body required" }, - }); + }; } try { const parseEventBody = (body: unknown) => { @@ -188,19 +186,19 @@ export const handler = async (event: APIGatewayEvent) => { } = parseEventBody(event.body); if (!packageId || !action) { - return response({ + return { statusCode: 400, body: { message: "Package ID and action are required" }, - }); + }; } const currentPackage = await getPackage(packageId); if (!currentPackage) { - return response({ + return { statusCode: 404, body: { message: "No record found for the given id" }, - }); + }; } if (action === "delete") { @@ -218,15 +216,15 @@ export const handler = async (event: APIGatewayEvent) => { changeReason, }); } - return response({ + return { statusCode: 400, body: { message: "Could not update package." }, - }); + }; } catch (err) { console.error("Error has occured modifying package:", err); - return response({ + return { statusCode: 500, body: { message: err.message || "Internal Server Error" }, - }); + }; } }; diff --git a/lib/lambda/utils.ts b/lib/lambda/utils.ts index 683a4fa0a0..ea125d2d70 100644 --- a/lib/lambda/utils.ts +++ b/lib/lambda/utils.ts @@ -5,8 +5,8 @@ export type ErrorResponse = { body: { error?: string; message?: string; - } -} + }; +}; export const handleOpensearchError = (error: unknown): ErrorResponse => { console.error({ error }); @@ -16,7 +16,7 @@ export const handleOpensearchError = (error: unknown): ErrorResponse => { body: { error: error.body || error.meta?.body || error, message: error.message, - } + }, }; } @@ -24,4 +24,4 @@ export const handleOpensearchError = (error: unknown): ErrorResponse => { statusCode: 500, body: { message: "Internal server error" }, }; -} +}; diff --git a/lib/libs/api/package/appk.test.ts b/lib/libs/api/package/appk.test.ts index 8beb6c179a..8ec33cf6e1 100644 --- a/lib/libs/api/package/appk.test.ts +++ b/lib/libs/api/package/appk.test.ts @@ -45,19 +45,15 @@ describe("getAppkChildren", () => { const result = await getAppkChildren(mockPackageId); - expect(os.search).toHaveBeenCalledWith( - mockOsDomain, - `${mockIndexNamespace}main`, - { - from: 0, - size: 200, - query: { - bool: { - must: [{ term: { "appkParentId.keyword": mockPackageId } }], - }, + expect(os.search).toHaveBeenCalledWith(mockOsDomain, `${mockIndexNamespace}main`, { + from: 0, + size: 200, + query: { + bool: { + must: [{ term: { "appkParentId.keyword": mockPackageId } }], }, }, - ); + }); expect(result).toEqual(mockResponse); }); @@ -66,22 +62,15 @@ describe("getAppkChildren", () => { const result = await getAppkChildren(mockPackageId, mockFilter); - expect(os.search).toHaveBeenCalledWith( - mockOsDomain, - `${mockIndexNamespace}main`, - { - from: 0, - size: 200, - query: { - bool: { - must: [ - { term: { "appkParentId.keyword": mockPackageId } }, - ...mockFilter, - ], - }, + expect(os.search).toHaveBeenCalledWith(mockOsDomain, `${mockIndexNamespace}main`, { + from: 0, + size: 200, + query: { + bool: { + must: [{ term: { "appkParentId.keyword": mockPackageId } }, ...mockFilter], }, }, - ); + }); expect(result).toEqual(mockResponse); }); }); diff --git a/lib/libs/api/package/appk.ts b/lib/libs/api/package/appk.ts index 72b417935c..25b5e52a1f 100644 --- a/lib/libs/api/package/appk.ts +++ b/lib/libs/api/package/appk.ts @@ -1,29 +1,19 @@ import * as os from "../../opensearch-lib"; import { opensearch } from "shared-types"; +import { getDomainAndNamespace } from "libs/utils"; -export const getAppkChildren = async ( - packageId: string, - filter: any[] = [], -) => { - if (!process.env.osDomain) { - throw new Error("process.env.osDomain must be defined"); - } +export const getAppkChildren = async (packageId: string, filter: any[] = []) => { + const { index, domain } = getDomainAndNamespace("main"); - const response = (await os.search( - process.env.osDomain, - `${process.env.indexNamespace}main`, - { - from: 0, - size: 200, - query: { - bool: { - must: [{ term: { "appkParentId.keyword": packageId } }].concat( - filter, - ), - }, + const response = (await os.search(domain, index, { + from: 0, + size: 200, + query: { + bool: { + must: [{ term: { "appkParentId.keyword": packageId } }].concat(filter), }, }, - )) as opensearch.main.Response; + })) as opensearch.main.Response; return response; }; diff --git a/lib/libs/api/package/changelog.ts b/lib/libs/api/package/changelog.ts index 83682b5856..cabe70199f 100644 --- a/lib/libs/api/package/changelog.ts +++ b/lib/libs/api/package/changelog.ts @@ -1,26 +1,18 @@ -import * as os from "libs/opensearch-lib"; +import * as os from "../../opensearch-lib"; import { opensearch } from "shared-types"; +import { getDomainAndNamespace } from "libs/utils"; -export const getPackageChangelog = async ( - packageId: string, - filter: any[] = [], -) => { - if (!process.env.osDomain) { - throw new Error("process.env.osDomain must be defined"); - } +export const getPackageChangelog = async (packageId: string, filter: any[] = []) => { + const { index, domain } = getDomainAndNamespace("changelog"); - return (await os.search( - process.env.osDomain, - `${process.env.indexNamespace}changelog`, - { - from: 0, - size: 200, - sort: [{ timestamp: "desc" }], - query: { - bool: { - must: [{ term: { "packageId.keyword": packageId } }].concat(filter), - }, + return (await os.search(domain, index, { + from: 0, + size: 200, + sort: [{ timestamp: "desc" }], + query: { + bool: { + must: [{ term: { "packageId.keyword": packageId } }].concat(filter), }, }, - )) as opensearch.changelog.Response; + })) as opensearch.changelog.Response; }; diff --git a/lib/libs/api/package/getPackage.ts b/lib/libs/api/package/getPackage.ts index cf66117315..fadec203e8 100644 --- a/lib/libs/api/package/getPackage.ts +++ b/lib/libs/api/package/getPackage.ts @@ -1,18 +1,13 @@ import { ItemResult } from "lib/packages/shared-types/opensearch/main"; import * as os from "libs/opensearch-lib"; +import { getDomainAndNamespace } from "libs/utils"; export interface ExtendedItemResult extends ItemResult { appkChildren?: any[]; } export const getPackage = async (id: string): Promise => { - if (!process.env.osDomain) { - throw new Error("process.env.osDomain must be defined"); - } - const packageResult = await os.getItem( - process.env.osDomain, - `${process.env.indexNamespace}main`, - id, - ); + const { index, domain } = getDomainAndNamespace("main"); + const packageResult = await os.getItem(domain, index, id); return packageResult; }; diff --git a/lib/libs/api/package/itemExists.ts b/lib/libs/api/package/itemExists.ts index 694315baa0..279934f8c1 100644 --- a/lib/libs/api/package/itemExists.ts +++ b/lib/libs/api/package/itemExists.ts @@ -1,14 +1,17 @@ -import * as os from "../../../libs/opensearch-lib"; +import * as os from "libs/opensearch-lib"; +import { getDomain, getNamespace } from "libs/utils"; +import { BaseIndex } from "lib/packages/shared-types/opensearch"; export async function itemExists(params: { id: string; osDomain?: string; indexNamespace?: string; }): Promise { - const packageResult = await os.getItem( - params.osDomain || process.env.osDomain!, - `${params.indexNamespace || process.env.indexNamespace!}main`, - params.id, - ); + const domain = params.osDomain || getDomain(); + const index: `${string}${BaseIndex}` = params.indexNamespace + ? `${params.indexNamespace}main` + : getNamespace("main"); + + const packageResult = await os.getItem(domain, index, params.id); return !!packageResult?._source; } diff --git a/lib/libs/email/content/email-components.test.tsx b/lib/libs/email/content/email-components.test.tsx new file mode 100644 index 0000000000..c0ccca4da4 --- /dev/null +++ b/lib/libs/email/content/email-components.test.tsx @@ -0,0 +1,91 @@ +import { describe, it, expect } from "vitest"; +import { getCpocEmail, getSrtEmails } from "./email-components"; +import { Document } from "shared-types/opensearch/main"; +import { Document as CpocUser } from "shared-types/opensearch/cpocs"; + +describe("Email Components", () => { + describe("getSrtEmails", () => { + it("should handle undefined input", () => { + expect(getSrtEmails(undefined)).toEqual([]); + }); + + it("should handle item with direct reviewTeam", () => { + const mockItem = { + reviewTeam: [ + { name: "John Doe", email: "john@example.com" }, + { name: "Jane Smith", email: "jane@example.com" }, + ], + } as Document; + + expect(getSrtEmails(mockItem)).toEqual([ + "John Doe ", + "Jane Smith ", + ]); + }); + + it("should handle item with _source reviewTeam", () => { + const mockItem = { + _source: { + reviewTeam: [ + { name: "John Doe", email: "john@example.com" }, + { name: "Jane Smith", email: "jane@example.com" }, + ], + }, + } as any; + + expect(getSrtEmails(mockItem)).toEqual([ + "John Doe ", + "Jane Smith ", + ]); + }); + + it("should filter out invalid reviewers", () => { + const mockItem = { + reviewTeam: [ + { name: "John Doe", email: "john@example.com" }, + { name: "", email: "invalid@example.com" }, + { name: "No Email" }, + ], + } as Document; + + expect(getSrtEmails(mockItem)).toEqual(["John Doe "]); + }); + }); + + describe("getCpocEmail", () => { + it("should handle undefined input", () => { + expect(getCpocEmail(undefined)).toEqual([]); + }); + + it("should handle direct CPOC user data", () => { + const mockUser = { + firstName: "John", + lastName: "Doe", + email: "john@example.com", + } as CpocUser; + + expect(getCpocEmail(mockUser)).toEqual(["John Doe "]); + }); + + it("should handle CPOC user with _source", () => { + const mockUser = { + _source: { + firstName: "John", + lastName: "Doe", + email: "john@example.com", + }, + } as any; + + expect(getCpocEmail(mockUser)).toEqual(["John Doe "]); + }); + + it("should handle invalid CPOC user data", () => { + const mockUser = { + firstName: "John", + // missing lastName and email + } as any; + + expect(getCpocEmail(mockUser)).toEqual([]); + }); + }); +}); diff --git a/lib/libs/email/content/email-components.tsx b/lib/libs/email/content/email-components.tsx index 04e74fb5d4..7917492ab7 100644 --- a/lib/libs/email/content/email-components.tsx +++ b/lib/libs/email/content/email-components.tsx @@ -1,8 +1,9 @@ -import { Column, Heading, Hr, Link, Row, Section, Text } from "@react-email/components"; -import { ReactNode } from "react"; -import { Attachment, AttachmentKey, AttachmentTitle } from "shared-types"; +import { Text, Link, Section, Row, Column, Hr, Heading } from "@react-email/components"; +import { Attachment, AttachmentTitle, AttachmentKey } from "shared-types"; +import { createRef, forwardRef, ReactNode } from "react"; import { styles } from "./email-styles"; -import { ONEMAC_LOGO_BASE64 } from "./onemac-logo-base64"; +import { Document as CpocUser } from "shared-types/opensearch/cpocs"; +import { Document } from "shared-types/opensearch/main"; export const EMAIL_CONFIG = { DEV_EMAIL: "mako.stateuser+dev-to@gmail.com", @@ -45,17 +46,24 @@ const Textarea = ({ children }: { children: React.ReactNode }) => ( ); -const EmailNav = ({ appEndpointUrl }: { appEndpointUrl: string }) => ( -
- +const LogoContainer = forwardRef(({ url }, ref) => ( +
+ OneMAC Logo + +
+)); + +const EmailNav = ({ appEndpointUrl }: { appEndpointUrl: string }) => ( +
+
); @@ -224,12 +232,14 @@ const FollowUpNotice = ({ includeStateLead?: boolean; }) => ( <> - {isChip ? (
If you have any questions, please contact{" "} - + {EMAIL_CONFIG.CHIP_EMAIL} {includeStateLead ? " or your state lead." : "."} @@ -239,7 +249,10 @@ const FollowUpNotice = ({
If you have any questions or did not expect this email, please contact{" "} - + {EMAIL_CONFIG.SPA_EMAIL} {includeStateLead ? " or your state lead." : "."} @@ -282,24 +295,54 @@ const WithdrawRAI = ({
); -const getCpocEmail = (item: any): string[] => { +const getCpocEmail = (item: CpocUser | undefined): string[] => { try { - const { leadAnalystName, leadAnalystEmail } = item._source; - return [`${leadAnalystName} <${leadAnalystEmail}>`]; + if (!item) return []; + const source = (item as any)?._source || item; + const { firstName, lastName, email } = source; + + if (!firstName || !lastName || !email) { + console.warn("Missing required CPOC user fields:", { firstName, lastName, email }); + return []; + } + + return [`${firstName} ${lastName} <${email}>`]; } catch (e) { - console.error("Error getting CPCO email", e); + console.error("Error getting CPOC email", JSON.stringify(e, null, 2)); return []; } }; -const getSrtEmails = (item: any): string[] => { +const getSrtEmails = (item: Document | undefined): string[] => { try { - const reviewTeam = item._source.reviewTeam; - if (!reviewTeam) return []; + if (!item) { + console.warn("No item provided to getSrtEmails"); + return []; + } + + const source = (item as any)?._source || item; + const reviewTeam = source?.reviewTeam; + + if (!reviewTeam || !Array.isArray(reviewTeam)) { + console.warn("No valid review team found:", { + hasSource: Boolean(source), + reviewTeamType: typeof reviewTeam, + isArray: Array.isArray(reviewTeam), + }); + return []; + } - return reviewTeam.map((reviewer: any) => `${reviewer.name} <${reviewer.email}>`); + return reviewTeam + .filter((reviewer: any) => { + if (!reviewer?.name || !reviewer?.email) { + console.warn("Invalid reviewer entry:", reviewer); + return false; + } + return true; + }) + .map((reviewer: { name: string; email: string }) => `${reviewer.name} <${reviewer.email}>`); } catch (e) { - console.error("Error getting SRT emails", e); + console.error("Error getting SRT emails:", e); return []; } }; diff --git a/lib/libs/email/content/email-styles.ts b/lib/libs/email/content/email-styles.ts index e7c877f354..ce74a1eba5 100644 --- a/lib/libs/email/content/email-styles.ts +++ b/lib/libs/email/content/email-styles.ts @@ -79,8 +79,9 @@ export const styles = { }, }, divider: { - margin: "16px 0", + width: "100%", borderTop: "1px solid #0071BD", + margin: "16px 0px", }, logo: { container: { diff --git a/lib/libs/email/content/new-submission/emailTemplates/AppKState.tsx b/lib/libs/email/content/new-submission/emailTemplates/AppKState.tsx index 2d8d2b44be..9dc9676367 100644 --- a/lib/libs/email/content/new-submission/emailTemplates/AppKState.tsx +++ b/lib/libs/email/content/new-submission/emailTemplates/AppKState.tsx @@ -24,7 +24,6 @@ export const AppKStateEmail = (props: { applicationEndpointUrl={variables.applicationEndpointUrl} footerContent={} > - { - const variables = props.variables; + const variables = { ...props.variables }; const previewText = `${variables.authority} ${variables.actionType} Submitted`; const heading = `The OneMAC Submission Portal received a ${variables.authority} ${variables.actionType} Submission:`; return ( diff --git a/lib/libs/email/content/new-submission/emailTemplates/Waiver1915bState.tsx b/lib/libs/email/content/new-submission/emailTemplates/Waiver1915bState.tsx index 8c2cf4e451..bc7c18600f 100644 --- a/lib/libs/email/content/new-submission/emailTemplates/Waiver1915bState.tsx +++ b/lib/libs/email/content/new-submission/emailTemplates/Waiver1915bState.tsx @@ -12,11 +12,9 @@ import { styles } from "../../email-styles"; import { BaseEmailTemplate } from "../../email-templates"; export const Waiver1915bStateEmail = (props: { - variables: - | (Events["CapitatedInitial"] & CommonEmailVariables) - | (Events["ContractingInitial"] & CommonEmailVariables); + variables: Events["CapitatedInitial"] & CommonEmailVariables; }) => { - const variables = props.variables; + const variables = { ...props.variables }; const previewText = `${variables.authority} ${variables.actionType} Submitted`; const heading = `This response confirms the submission of your ${variables.authority} ${variables.actionType} to CMS for review:`; return ( diff --git a/lib/libs/email/content/respondToRai/emailTemplates/WaiverState.tsx b/lib/libs/email/content/respondToRai/emailTemplates/WaiverState.tsx index b8227af88c..1f22247c52 100644 --- a/lib/libs/email/content/respondToRai/emailTemplates/WaiverState.tsx +++ b/lib/libs/email/content/respondToRai/emailTemplates/WaiverState.tsx @@ -1,13 +1,7 @@ import { formatNinetyDaysDate } from "shared-utils"; import { CommonEmailVariables, Events } from "shared-types"; import { Text } from "@react-email/components"; -import { - PackageDetails, - MailboxNotice, - BasicFooter, - FollowUpNotice, - Divider, -} from "../../email-components"; +import { PackageDetails, MailboxNotice, BasicFooter, FollowUpNotice } from "../../email-components"; import { BaseEmailTemplate } from "../../email-templates"; import { styles } from "../../email-styles"; @@ -35,7 +29,6 @@ export const WaiverStateEmail = (props: { Summary: variables.additionalInformation, }} /> - {`This response confirms the receipt of your Waiver request or your response to a Waiver Request for Additional Information (RAI). You can expect a formal response to your submittal diff --git a/lib/libs/email/content/withdrawConfirmation/emailTemplates/WaiverState.tsx b/lib/libs/email/content/withdrawConfirmation/emailTemplates/WaiverState.tsx index 1d16bda02d..f6f69b3814 100644 --- a/lib/libs/email/content/withdrawConfirmation/emailTemplates/WaiverState.tsx +++ b/lib/libs/email/content/withdrawConfirmation/emailTemplates/WaiverState.tsx @@ -1,5 +1,5 @@ import { CommonEmailVariables, Events } from "shared-types"; -import { FollowUpNotice, BasicFooter } from "../../email-components"; +import { FollowUpNotice, BasicFooter, Attachments } from "../../email-components"; import { BaseEmailTemplate } from "../../email-templates"; export const WaiverStateEmail = (props: { @@ -15,6 +15,7 @@ export const WaiverStateEmail = (props: { applicationEndpointUrl={variables.applicationEndpointUrl} footerContent={} > + ); diff --git a/lib/libs/email/content/withdrawPackage/emailTemplates/MedSpaCMS.tsx b/lib/libs/email/content/withdrawPackage/emailTemplates/MedSpaCMS.tsx index 078449ccfe..16657e7d0b 100644 --- a/lib/libs/email/content/withdrawPackage/emailTemplates/MedSpaCMS.tsx +++ b/lib/libs/email/content/withdrawPackage/emailTemplates/MedSpaCMS.tsx @@ -8,7 +8,7 @@ export const MedSpaCMSEmail = ({ variables: Events["WithdrawPackage"] & CommonEmailVariables; }) => ( } diff --git a/lib/libs/email/content/withdrawRai/emailTemplates/ChipSpaCMS.tsx b/lib/libs/email/content/withdrawRai/emailTemplates/ChipSpaCMS.tsx index 882ae4a435..a3f475ad12 100644 --- a/lib/libs/email/content/withdrawRai/emailTemplates/ChipSpaCMS.tsx +++ b/lib/libs/email/content/withdrawRai/emailTemplates/ChipSpaCMS.tsx @@ -3,7 +3,7 @@ import { Container, Html } from "@react-email/components"; import { WithdrawRAI, PackageDetails, BasicFooter } from "../../email-components"; export const ChipSpaCMSEmail = (props: { - variables: Events["RespondToRai"] & CommonEmailVariables; + variables: Events["WithdrawRai"] & CommonEmailVariables; relatedEvent: any; }) => { const { variables, relatedEvent } = { ...props }; diff --git a/lib/libs/email/content/withdrawRai/emailTemplates/ChipSpaState.tsx b/lib/libs/email/content/withdrawRai/emailTemplates/ChipSpaState.tsx index 344c482361..dd007644a4 100644 --- a/lib/libs/email/content/withdrawRai/emailTemplates/ChipSpaState.tsx +++ b/lib/libs/email/content/withdrawRai/emailTemplates/ChipSpaState.tsx @@ -3,7 +3,7 @@ import { Container, Html } from "@react-email/components"; import { WithdrawRAI, PackageDetails, FollowUpNotice } from "../../email-components"; export const ChipSpaStateEmail = (props: { - variables: Events["RespondToRai"] & CommonEmailVariables; + variables: Events["WithdrawRai"] & CommonEmailVariables; relatedEvent: any; }) => { const { variables, relatedEvent } = { ...props }; diff --git a/lib/libs/email/content/withdrawRai/emailTemplates/MedSpaCMS.tsx b/lib/libs/email/content/withdrawRai/emailTemplates/MedSpaCMS.tsx index 25d0fa589e..0794cf1fdb 100644 --- a/lib/libs/email/content/withdrawRai/emailTemplates/MedSpaCMS.tsx +++ b/lib/libs/email/content/withdrawRai/emailTemplates/MedSpaCMS.tsx @@ -3,7 +3,7 @@ import { Container, Html } from "@react-email/components"; import { WithdrawRAI, PackageDetails, BasicFooter } from "../../email-components"; export const MedSpaCMSEmail = (props: { - variables: Events["RespondToRai"] & CommonEmailVariables; + variables: Events["WithdrawRai"] & CommonEmailVariables; relatedEvent: any; }) => { const { variables, relatedEvent } = { ...props }; diff --git a/lib/libs/email/content/withdrawRai/emailTemplates/MedSpaState.tsx b/lib/libs/email/content/withdrawRai/emailTemplates/MedSpaState.tsx index 25a9d540aa..b11ee7359b 100644 --- a/lib/libs/email/content/withdrawRai/emailTemplates/MedSpaState.tsx +++ b/lib/libs/email/content/withdrawRai/emailTemplates/MedSpaState.tsx @@ -3,7 +3,7 @@ import { Container, Html } from "@react-email/components"; import { WithdrawRAI, PackageDetails, FollowUpNotice } from "../../email-components"; export const MedSpaStateEmail = (props: { - variables: Events["RespondToRai"] & CommonEmailVariables; + variables: Events["WithdrawRai"] & CommonEmailVariables; relatedEvent: any; }) => { const { variables, relatedEvent } = { ...props }; diff --git a/lib/libs/email/content/withdrawRai/emailTemplates/Waiver1915bCMS.tsx b/lib/libs/email/content/withdrawRai/emailTemplates/Waiver1915bCMS.tsx index 86b9f70c30..a23ff0c632 100644 --- a/lib/libs/email/content/withdrawRai/emailTemplates/Waiver1915bCMS.tsx +++ b/lib/libs/email/content/withdrawRai/emailTemplates/Waiver1915bCMS.tsx @@ -3,7 +3,7 @@ import { Container, Html } from "@react-email/components"; import { WithdrawRAI, PackageDetails, BasicFooter } from "../../email-components"; export const Waiver1915bCMSEmail = (props: { - variables: Events["RespondToRai"] & CommonEmailVariables; + variables: Events["WithdrawRai"] & CommonEmailVariables; relatedEvent: any; }) => { const { variables, relatedEvent } = { ...props }; diff --git a/lib/libs/email/content/withdrawRai/emailTemplates/Waiver1915bState.tsx b/lib/libs/email/content/withdrawRai/emailTemplates/Waiver1915bState.tsx index 991b51ef47..62e11eb634 100644 --- a/lib/libs/email/content/withdrawRai/emailTemplates/Waiver1915bState.tsx +++ b/lib/libs/email/content/withdrawRai/emailTemplates/Waiver1915bState.tsx @@ -9,7 +9,7 @@ import { import { BaseEmailTemplate } from "../../email-templates"; export const Waiver1915bStateEmail = (props: { - variables: Events["RespondToRai"] & CommonEmailVariables; + variables: Events["WithdrawRai"] & CommonEmailVariables; relatedEvent: any; }) => { const { variables, relatedEvent } = { ...props }; diff --git a/lib/libs/email/getAllStateUsers.ts b/lib/libs/email/getAllStateUsers.ts index 8b2c4a619b..ca5b445b03 100644 --- a/lib/libs/email/getAllStateUsers.ts +++ b/lib/libs/email/getAllStateUsers.ts @@ -5,15 +5,21 @@ import { ListUsersCommandOutput, } from "@aws-sdk/client-cognito-identity-provider"; -export type StateUser = { +export interface StateUser { firstName: string; lastName: string; email: string; formattedEmailAddress: string; -}; +} -const cognitoClient = new CognitoIdentityProviderClient(); +const cognitoClient = new CognitoIdentityProviderClient({}); +/** + * Fetches all state users from Cognito for a given state. + * @param userPoolId The Cognito User Pool ID + * @param state The state code to filter users by + * @returns Promise + */ export const getAllStateUsers = async ({ userPoolId, state, @@ -21,39 +27,56 @@ export const getAllStateUsers = async ({ userPoolId: string; state: string; }): Promise => { + const params: ListUsersCommandInput = { + UserPoolId: userPoolId, + Limit: 60, + }; + + const command = new ListUsersCommand(params); + let response: ListUsersCommandOutput; try { - const params: ListUsersCommandInput = { - UserPoolId: userPoolId, - Limit: 60, - }; + response = await cognitoClient.send(command); + } catch (error) { + console.error("Error fetching users from Cognito:", error); + throw new Error("Error fetching users from Cognito"); + } - const command = new ListUsersCommand(params); - const response: ListUsersCommandOutput = await cognitoClient.send(command); + if (!response.Users || response.Users.length === 0) { + return []; + } - if (!response.Users || response.Users.length === 0) { - return []; + const filteredStateUsers: StateUser[] = response.Users.reduce((acc: StateUser[], user) => { + const stateAttr = user.Attributes?.find((attr) => attr.Name === "custom:state"); + const userStates = stateAttr?.Value?.split(",") ?? []; + if (!userStates.includes(state)) { + return acc; } - const filteredStateUsers = response.Users.filter((user) => { - const stateAttribute = user.Attributes?.find((attr) => attr.Name === "custom:state"); - return stateAttribute?.Value?.split(",").includes(state); - }).map((user) => { - const attributes = user.Attributes?.reduce((acc, attr) => { - acc[attr.Name as any] = attr.Value; - return acc; - }, {} as Record); - - return { - firstName: attributes?.["given_name"], - lastName: attributes?.["family_name"], - email: attributes?.["email"], - formattedEmailAddress: `${attributes?.["given_name"]} ${attributes?.["family_name"]} <${attributes?.["email"]}>`, - }; + const attributes = user.Attributes?.reduce((a, attr) => { + if (attr.Name && attr.Value) a[attr.Name] = attr.Value; + return a; + }, {} as Record) || {}; + + if (!attributes["given_name"] || !attributes["family_name"] || !attributes["email"]) { + console.warn( + `User ${user.Username} missing required attributes (given_name, family_name, email)` + ); + return acc; + } + + const firstName = attributes["given_name"]; + const lastName = attributes["family_name"]; + const email = attributes["email"]; + + acc.push({ + firstName, + lastName, + email, + formattedEmailAddress: `${firstName} ${lastName} <${email}>`, }); - return filteredStateUsers as StateUser[]; - } catch (error) { - console.error("Error fetching users:", error); - throw new Error("Error fetching users"); - } -}; + return acc; + }, []); + + return filteredStateUsers; +}; \ No newline at end of file diff --git a/lib/libs/email/index.ts b/lib/libs/email/index.ts index a7e0534ba5..64a16f82b4 100644 --- a/lib/libs/email/index.ts +++ b/lib/libs/email/index.ts @@ -1,50 +1,74 @@ -import { Authority } from "shared-types"; +import { Authority, CommonEmailVariables, EmailAddresses } from "shared-types"; import { getPackageChangelog } from "../api/package"; import * as EmailContent from "./content"; export type UserType = "cms" | "state"; -export interface EmailTemplate { - to: string[]; - cc?: string[]; - subject: string; - body: string; +export interface EmailTemplateFunction { + ( + variables: T & CommonEmailVariables & { emails: EmailAddresses; allStateUsersEmails: string[] }, + ): Promise<{ + to: string[]; + subject: string; + body: string; + cc?: string[]; + }>; } -export type EmailTemplateFunction = (variables: T) => Promise; export type UserTypeOnlyTemplate = { [U in UserType]: EmailTemplateFunction; }; + export type AuthoritiesWithUserTypesTemplate = { - [A in Authority]?: { [U in UserType]?: EmailTemplateFunction }; + [A in Authority]?: Partial>>; }; export type EmailTemplates = { "new-medicaid-submission": AuthoritiesWithUserTypesTemplate; "new-chip-submission": AuthoritiesWithUserTypesTemplate; - "temp-extension": UserTypeOnlyTemplate; + "temporary-extension": UserTypeOnlyTemplate; "withdraw-package": AuthoritiesWithUserTypesTemplate; "withdraw-rai": AuthoritiesWithUserTypesTemplate; + "upload-subsequent-documents": AuthoritiesWithUserTypesTemplate; "contracting-initial": AuthoritiesWithUserTypesTemplate; + "contracting-renewal": AuthoritiesWithUserTypesTemplate; + "contracting-waiver": AuthoritiesWithUserTypesTemplate; + "contracting-amendment": AuthoritiesWithUserTypesTemplate; "capitated-initial": AuthoritiesWithUserTypesTemplate; + "capitated-renewal": AuthoritiesWithUserTypesTemplate; + "capitated-waiver": AuthoritiesWithUserTypesTemplate; + "capitated-amendment": AuthoritiesWithUserTypesTemplate; + "app-k": AuthoritiesWithUserTypesTemplate; + "respond-to-rai": AuthoritiesWithUserTypesTemplate; }; -// Create a type-safe mapping of email templates const emailTemplates: EmailTemplates = { "new-medicaid-submission": EmailContent.newSubmission, "new-chip-submission": EmailContent.newSubmission, - "temp-extension": EmailContent.tempExtention, + "temporary-extension": EmailContent.tempExtention, + "capitated-initial": EmailContent.newSubmission, + "capitated-renewal": EmailContent.newSubmission, + "capitated-waiver": EmailContent.newSubmission, + "capitated-amendment": EmailContent.newSubmission, + "upload-subsequent-documents": EmailContent.uploadSubsequentDocuments, + "contracting-initial": EmailContent.newSubmission, + "contracting-renewal": EmailContent.newSubmission, + "contracting-waiver": EmailContent.newSubmission, + "contracting-amendment": EmailContent.newSubmission, + "app-k": EmailContent.newSubmission, "withdraw-package": EmailContent.withdrawPackage, "withdraw-rai": EmailContent.withdrawRai, - "contracting-initial": EmailContent.newSubmission, - "capitated-initial": EmailContent.newSubmission, + "respond-to-rai": EmailContent.respondToRai, }; -// Create a type-safe lookup function +/** + * Returns the email templates for a given action and authority + * @param action The event action + * @param authority The package authority + */ export function getEmailTemplate( action: keyof EmailTemplates, ): AuthoritiesWithUserTypesTemplate | UserTypeOnlyTemplate { - // Handle -state suffix variants const baseAction = action.replace(/-state$/, "") as keyof EmailTemplates; return emailTemplates[baseAction]; } @@ -56,7 +80,6 @@ function isAuthorityTemplate( return authority in obj; } -// Update the getEmailTemplates function to use the new lookup export async function getEmailTemplates( action: keyof EmailTemplates, authority: Authority, @@ -70,29 +93,31 @@ export async function getEmailTemplates( const emailTemplatesToSend: EmailTemplateFunction[] = []; if (isAuthorityTemplate(template, authority)) { - emailTemplatesToSend.push(...Object.values(template[authority] as EmailTemplateFunction)); - } else { + const userTypeTemplate = template[authority]; + if (!userTypeTemplate) return null; emailTemplatesToSend.push( - ...Object.values(template as Record>), + ...(Object.values(userTypeTemplate).filter(Boolean) as EmailTemplateFunction[]), ); + } else { + // UserTypeOnlyTemplate scenario + emailTemplatesToSend.push(...Object.values(template as UserTypeOnlyTemplate)); } - console.log("Email templates to send:", JSON.stringify(emailTemplatesToSend, null, 2)); return emailTemplatesToSend; } -// I think this needs to be written to handle not finding any matching events and so forth +/** + * Gets the latest event of a given action type from the changelog + */ export async function getLatestMatchingEvent(id: string, actionType: string) { try { const item = await getPackageChangelog(id); const events = item.hits.hits.filter((hit: any) => hit._source.actionType === actionType); events.sort((a: any, b: any) => b._source.timestamp - a._source.timestamp); - const latestMatchingEvent = events[0]._source; + const latestMatchingEvent = events[0]?._source; return latestMatchingEvent; } catch (error) { - console.error({ error }) + console.error({ error }); return null; } } - -export * from "./getAllStateUsers"; diff --git a/lib/libs/email/mock-data/attachments.ts b/lib/libs/email/mock-data/attachments.ts index d596661a93..e4800848ef 100644 --- a/lib/libs/email/mock-data/attachments.ts +++ b/lib/libs/email/mock-data/attachments.ts @@ -6,27 +6,21 @@ export const currentStatePlan = { title: "State Plan Document 2024", bucket: "mako-outbox-attachments-635052997545", key: "8d02fabb-9c01-41b4-a75d-e365bbed3d6a.pdf", - get uploadDate() { - return Date.now(); - }, + uploadDate: 1728495786285, }, { filename: "state-plan-summary.pdf", title: "State Plan Summary 2024", bucket: "mako-outbox-attachments-635052997545", key: "a1b2c3d4-9f8b-4d2e-84ff-5f6e7a8b9d0f.pdf", - get uploadDate() { - return Date.now(); - }, + uploadDate: 1728495786285, }, { filename: "state-plan-financials.pdf", title: "State Plan Financial Overview", bucket: "mako-outbox-attachments-635052997545", key: "f1e2d3c4-9a0b-45f8-a7b6-9876abc54321.pdf", - get uploadDate() { - return Date.now(); - }, + uploadDate: 1728495786285, }, ], }; @@ -39,27 +33,21 @@ export const tribalEngagement = { title: "Summary of Tribal Engagement", bucket: "mako-outbox-attachments-635052997545", key: "5b02dcea-4723-4dba-b2c1-15bde348f1f2.docx", - get uploadDate() { - return Date.now(); - }, + uploadDate: 1728495786285, }, { filename: "tribal-engagement-outreach.pdf", title: "Tribal Engagement Outreach Report", bucket: "mako-outbox-attachments-635052997545", key: "1b9f8d7c-4731-4e0b-a1d2-f87e6b5a1e3c.pdf", - get uploadDate() { - return Date.now(); - }, + uploadDate: 1728495786285, }, { filename: "tribal-engagement-meeting-notes.pdf", title: "Tribal Engagement Meeting Notes", bucket: "mako-outbox-attachments-635052997545", key: "4a5b6c7d-8e9f-4d5b-a1c2-3d4f6b7c8d9e.pdf", - get uploadDate() { - return Date.now(); - }, + uploadDate: 1728495786285, }, ], }; @@ -72,27 +60,21 @@ export const existingStatePlanPages = { title: "Revised Page 23", bucket: "mako-outbox-attachments-635052997545", key: "2c46eaa6-abb2-4987-9b24-16a4f8c2825a.pdf", - get uploadDate() { - return Date.now(); - }, + uploadDate: 1728495786285, }, { filename: "page-24-update.pdf", title: "Revised Page 24", bucket: "mako-outbox-attachments-635052997545", key: "b2c3d4e5-f1g2-4h3i-9j5k-6l7m8n9o0p1q.pdf", - get uploadDate() { - return Date.now(); - }, + uploadDate: 1728495786285, }, { filename: "page-25-update.pdf", title: "Revised Page 25", bucket: "mako-outbox-attachments-635052997545", key: "c4d5e6f7-g8h9-4j0k-9l5m-2n3o4p5q6r7s.pdf", - get uploadDate() { - return Date.now(); - }, + uploadDate: 1728495786285, }, ], }; @@ -105,27 +87,21 @@ export const publicNotice = { title: "Public Notice - October 2024", bucket: "mako-outbox-attachments-635052997545", key: "7dd0e2bb-c5d3-47d4-bf23-dae48229f1b2.pdf", - get uploadDate() { - return Date.now(); - }, + uploadDate: 1728495786285, }, { filename: "public-notice-sept-2024.pdf", title: "Public Notice - September 2024", bucket: "mako-outbox-attachments-635052997545", key: "a5b6c7d8-e9f0-4a1b-b2c3-d4e5f6g7h8i9.pdf", - get uploadDate() { - return Date.now(); - }, + uploadDate: 1728495786285, }, { filename: "public-notice-nov-2024.pdf", title: "Public Notice - November 2024", bucket: "mako-outbox-attachments-635052997545", key: "c8d7e6f5-g4h3-4j2k-9l5m-1n3o4p5q6r7s.pdf", - get uploadDate() { - return Date.now(); - }, + uploadDate: 1728495786285, }, ], }; @@ -138,36 +114,28 @@ export const spaPages = { title: "SPA Documentation - Page 1", bucket: "mako-outbox-attachments-635052997545", key: "3aa8c5ec-a6de-4415-bc5a-eef752d68af2.pdf", - get uploadDate() { - return Date.now(); - }, + uploadDate: 1728495786285, }, { filename: "spa-page2.pdf", title: "SPA Documentation - Page 2", bucket: "mako-outbox-attachments-635052997545", key: "4aa8c5ec-a6de-4415-bc5a-eef752d68af2.pdf", - get uploadDate() { - return Date.now(); - }, + uploadDate: 1728495786285, }, { filename: "spa-summary.pdf", title: "SPA Summary Document", bucket: "mako-outbox-attachments-635052997545", key: "5bb8c5fc-a6de-4415-bc5a-abc345d78ef2.pdf", - get uploadDate() { - return Date.now(); - }, + uploadDate: 1728495786285, }, { filename: "spa-changes-2024.pdf", title: "SPA Changes Overview 2024", bucket: "mako-outbox-attachments-635052997545", key: "6cc8d5ed-b6fe-4415-bd5a-bcd234e98af2.pdf", - get uploadDate() { - return Date.now(); - }, + uploadDate: 1728495786285, }, ], }; @@ -179,9 +147,7 @@ export const cmsForm179 = { title: "CMS Form 179 Submission Document", bucket: "mako-outbox-attachments-635052997545", key: "12fb2e5d-7d01-441c-a5b1-bbcc72a8adf1.pdf", - get uploadDate() { - return Date.now(); - }, + uploadDate: 1728495786285, }, ], label: "CMS Form 179", @@ -194,9 +160,7 @@ export const appk = { title: "Appendix K Waiver Amendment", bucket: "mako-outbox-attachments-635052997545", key: "8b56f7ab-e1ad-4782-87f4-d43ab9d2f5d7.docx", - get uploadDate() { - return Date.now(); - }, + uploadDate: 1728495786285, }, ], label: "1915(c) Appendix K Amendment Waiver Template", @@ -209,18 +173,14 @@ export const amendedLanguage = { title: "Amendment Language - Section 1", bucket: "mako-outbox-attachments-635052997545", key: "1df7c8ef-a28d-41b8-9327-21767c16a11a.pdf", - get uploadDate() { - return Date.now(); - }, + uploadDate: 1728495786285, }, { filename: "amended-language-2.pdf", title: "Amendment Language - Section 2", bucket: "mako-outbox-attachments-635052997545", key: "23df1f2c-9927-4d82-a58f-31fd4729b2e5.pdf", - get uploadDate() { - return Date.now(); - }, + uploadDate: 1728495786285, }, ], label: "SPA Pages", @@ -233,9 +193,7 @@ export const coverLetter = { title: "State Submission Cover Letter - George Harrison", bucket: "mako-outbox-attachments-635052997545", key: "8c7e8d9f-c332-499c-bb21-d14fb9f8e20b.pdf", - get uploadDate() { - return Date.now(); - }, + uploadDate: 1728495786285, }, ], label: "Cover Letter", @@ -248,9 +206,7 @@ export const budgetDocuments = { title: "FY2024 Medicaid Budget Outline", bucket: "mako-outbox-attachments-635052997545", key: "5e9dc2f3-71f4-4145-95b6-f6371cdea3ef.xlsx", - get uploadDate() { - return Date.now(); - }, + uploadDate: 1728495786285, }, ], label: "Budget Documents", @@ -262,9 +218,7 @@ export const tribalConsultation = { title: "Tribal Consultation Summary - September 2024", bucket: "mako-outbox-attachments-635052997545", key: "7a71e2b3-1d87-429c-99c8-f872ffdbb3f3.pdf", - get uploadDate() { - return Date.now(); - }, + uploadDate: 1728495786285, }, ], label: "Tribal Consultation", @@ -277,9 +231,7 @@ export const other = { title: "Additional Supporting Documents", bucket: "mako-outbox-attachments-635052997545", key: "c22aa4dc-e1b6-41d5-bf64-e45b6f74f5af.pdf", - get uploadDate() { - return Date.now(); - }, + uploadDate: 1728495786285, }, ], label: "Other", @@ -292,9 +244,7 @@ export const sfq = { title: "Responses to Standard Funding Questions", bucket: "mako-outbox-attachments-635052997545", key: "8d02fabb-9c01-41b4-a75d-e365bbed3d6a.docx", - get uploadDate() { - return Date.now(); - }, + uploadDate: 1728495786285, }, ], label: "Standard Funding Questions (SFQs)", @@ -307,27 +257,21 @@ export const waiverExtensionRequest = { title: "Temporary Extention Document for submission", bucket: "mako-outbox-attachments-635052997545", key: "8d02fabb-9c01-41b4-a75d-e365bbed3d6a.pdf", - get uploadDate() { - return Date.now(); - }, + uploadDate: 1728495786285, }, { filename: "Second Extention Document for submission.pdf", title: "TempSecondorary Extention Document for submission", bucket: "mako-outbox-attachments-635052997545", key: "8d02fabb-9c01-41b4-a75d-e365bbed3d6a.pdf", - get uploadDate() { - return Date.now(); - }, + uploadDate: 1728495786285, }, { filename: "Third Extention Document for submission.pdf", title: "Third Temporary Extention Document for submission", bucket: "mako-outbox-attachments-635052997545", key: "8d02fabb-9c01-41b4-a75d-e365bbed3d6a.pdf", - get uploadDate() { - return Date.now(); - }, + uploadDate: 1728495786285, }, ], label: "Waiver Extension Request", @@ -340,9 +284,7 @@ export const withdrawRequest = { title: "Withdrawal Letter", bucket: "mako-outbox-attachments-635052997545", key: "8d02fabb-9c01-41b4-a75d-e365bbed3d6a.pdf", - get uploadDate() { - return Date.now(); - }, + uploadDate: 1728495786285, }, ], label: "Official Withdrawal Letter", @@ -355,10 +297,46 @@ export const supportingDocumentation = { title: "Supporting Documentation", bucket: "mako-outbox-attachments-635052997545", key: "8d02fabb-9c01-41b4-a75d-e365bbed3d6a.pdf", - get uploadDate() { - return Date.now(); - }, + uploadDate: 1728495786285, }, ], label: "Supporting Documentation", }; + +export const bCapWaiverApplication = { + files: [ + { + filename: "capitated-waiver-application.pdf", + title: "1915(b) Comprehensive (Capitated) Waiver Application Pre-print", + bucket: "mako-outbox-attachments-635052997545", + key: "8d02fabb-9c01-41b4-a75d-e365bbed3d6a.pdf", + uploadDate: 1728495786285, + }, + ], + label: "1915(b) Comprehensive (Capitated) Waiver Application Pre-print", +}; +export const b4WaiverApplication = { + files: [ + { + filename: "contracting-waiver-application.pdf", + title: "1915(b) Selective Contracting (Streamlined) Waiver Application Pre-print", + bucket: "mako-outbox-attachments-635052997545", + key: "8d02fabb-9c01-41b4-a75d-e365bbed3d6a.pdf", + uploadDate: 1728495786285, + }, + ], + label: "1915(b)(4) FFS Selective Contracting (Streamlined) Waiver Application Pre-print", +}; + +export const bCapCostSpreadsheets = { + files: [ + { + filename: "capitated-waiver-cost-effectiveness-spreadsheet.pdf", + title: "1915(b) Comprehensive (Capitated) Waiver Cost Effectiveness Spreadsheets", + bucket: "mako-outbox-attachments-635052997545", + key: "8d02fabb-9c01-41b4-a75d-e365bbed3d6a.pdf", + uploadDate: 1728495786285, + }, + ], + label: "1915(b) Comprehensive (Capitated) Waiver Cost Effectiveness Spreadsheets", +}; diff --git a/lib/libs/email/mock-data/new-submission.ts b/lib/libs/email/mock-data/new-submission.ts index a437f46db6..c09ec076c6 100644 --- a/lib/libs/email/mock-data/new-submission.ts +++ b/lib/libs/email/mock-data/new-submission.ts @@ -1,16 +1,12 @@ export const emailTemplateValue = { territory: "CO", applicationEndpointUrl: "https://mako-dev.cms.gov/", - get timestamp() { - return Date.now(); - }, + timestamp: 1728495786285, submitterName: "George Harrison", submitterEmail: "george@example.com", additionalInformation: "This submission includes necessary documentation for requested updates to the state’s Medicaid plan, in alignment with CMS requirements.", origin: "mako" as const, appkParentId: null, - get proposedEffectiveDate() { - return Date.now() + 5184000000; - }, + proposedEffectiveDate: 1728495786285 + 3600, }; diff --git a/lib/libs/email/mock-data/respond-to-rai.ts b/lib/libs/email/mock-data/respond-to-rai.ts index ea185f975e..9dded42736 100644 --- a/lib/libs/email/mock-data/respond-to-rai.ts +++ b/lib/libs/email/mock-data/respond-to-rai.ts @@ -1,24 +1,14 @@ export const emailTemplateValue = { applicationEndpointUrl: "https://mako-dev.cms.gov/", - get timestamp() { - return Date.now(); - }, + timestamp: 1728495786285, actionType: "Respond to Formal RAI", origin: "mako" as const, - get requestedDate() { - return Date.now(); - }, - get responseDate() { - return Date.now(); - }, + requestedDate: 1728495786285, + responseDate: 1728495786285, additionalInformation: "Octopuses are usually very antisocial but when they’re under the influence of ecstasy they are more willing to spend time around each other or even hug other octopuses", submitterName: "George Harrison", submitterEmail: "george@example.com", - get submissionDate() { - return Date.now(); - }, - get proposedEffectiveDate() { - return Date.now() + 5184000000; - }, + submissionDate: 1728495786285, + proposedEffectiveDate: 1728495786285 + 3600, }; diff --git a/lib/libs/email/mock-data/temp-extension.ts b/lib/libs/email/mock-data/temp-extension.ts index 7faf0506e5..d74565f58a 100644 --- a/lib/libs/email/mock-data/temp-extension.ts +++ b/lib/libs/email/mock-data/temp-extension.ts @@ -3,12 +3,10 @@ export const emailTemplateValue = { territory: "MD", id: "MD-2343.R00.TE09", waiverNumber: "MD-2343.R00.TE00", - authority: "1915(b)", - actionType: "Extend", + authority: "1915(b)" as const, + actionType: "Extend" as const, applicationEndpointUrl: "https://mako-dev.cms.gov/", - get timestamp() { - return Date.now() + 5184000000; - }, + timestamp: 1728495786285, submitterName: "George Harrison", submitterEmail: "george@example.com", additionalInformation: @@ -23,27 +21,21 @@ export const emailTemplateValue = { title: "Temporary Extention Document for submission", bucket: "mako-outbox-attachments-635052997545", key: "8d02fabb-9c01-41b4-a75d-e365bbed3d6a.pdf", - get uploadDate() { - return Date.now() + 5184000000; - }, + uploadDate: 1728495786285, }, { filename: "Second Extention Document for submission.pdf", title: "TempSecondorary Extention Document for submission", bucket: "mako-outbox-attachments-635052997545", key: "8d02fabb-9c01-41b4-a75d-e365bbed3d6a.pdf", - get uploadDate() { - return Date.now() + 5184000000; - }, + uploadDate: 1728495786285, }, { filename: "Third Extention Document for submission.pdf", title: "Third Temporary Extention Document for submission", bucket: "mako-outbox-attachments-635052997545", key: "8d02fabb-9c01-41b4-a75d-e365bbed3d6a.pdf", - get uploadDate() { - return Date.now() + 5184000000; - }, + uploadDate: 1728495786285, }, ], label: "Waiver Extension Request", @@ -53,8 +45,5 @@ export const emailTemplateValue = { label: "Other", }, }, - - get proposedEffectiveDate() { - return Date.now() + 5184000000; - }, + proposedEffectiveDate: 1728493782785 + 5184000000, }; diff --git a/lib/libs/email/mock-data/upload-subsequent-documents.ts b/lib/libs/email/mock-data/upload-subsequent-documents.ts index 42df551929..76512cdff1 100644 --- a/lib/libs/email/mock-data/upload-subsequent-documents.ts +++ b/lib/libs/email/mock-data/upload-subsequent-documents.ts @@ -3,12 +3,8 @@ export const emailTemplateValue = { applicationEndpointUrl: "https://mako-dev.cms.gov/", actionType: "Upload-Subsequent-Documents", origin: "mako" as const, - get requestedDate() { - return Date.now() - 5 * 24 * 60 * 60; - }, - get withdrawnDate() { - return Date.now(); - }, + requestedDate: 1728493782785 - 5 * 24 * 60 * 60, + withdrawnDate: 1728493782785, attachments: { cmsForm179: { files: [ diff --git a/lib/libs/email/mock-data/withdraw-rai.ts b/lib/libs/email/mock-data/withdraw-rai.ts index ce53bb2ea7..c3633a527c 100644 --- a/lib/libs/email/mock-data/withdraw-rai.ts +++ b/lib/libs/email/mock-data/withdraw-rai.ts @@ -3,12 +3,8 @@ export const emailTemplateValue = { applicationEndpointUrl: "https://mako-dev.cms.gov/", actionType: "Withdrawal", origin: "mako", - get requestedDate() { - return Date.now() - 5 * 24 * 60 * 60; - }, - get withdrawnDate() { - return Date.now(); - }, + requestedDate: 1728495786285 - 5 * 24 * 60 * 60, + withdrawnDate: 1728495786285, attachments: { cmsForm179: { files: [ diff --git a/lib/libs/email/preview/Respond to Rai/CMS/__snapshots__/ResToRaiCMS.test.tsx.snap b/lib/libs/email/preview/Respond to Rai/CMS/__snapshots__/ResToRaiCMS.test.tsx.snap index 2dc8db56d8..0a6c213a41 100644 --- a/lib/libs/email/preview/Respond to Rai/CMS/__snapshots__/ResToRaiCMS.test.tsx.snap +++ b/lib/libs/email/preview/Respond to Rai/CMS/__snapshots__/ResToRaiCMS.test.tsx.snap @@ -49,25 +49,31 @@ exports[`Respond To RAI CMS Email Snapshot Test > renders a AppKCMSEmailPreview cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > - - OneMAC Logo - +
+ + OneMAC Logo + + +
@@ -512,25 +518,31 @@ exports[`Respond To RAI CMS Email Snapshot Test > renders a AppKCMSEmailPreview cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > - - OneMAC Logo - + + OneMAC Logo + + + @@ -1032,25 +1044,31 @@ exports[`Respond To RAI CMS Email Snapshot Test > renders a ChipSPA Preview Temp cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > - - OneMAC Logo - +
+ + OneMAC Logo + + +
@@ -1494,25 +1512,31 @@ exports[`Respond To RAI CMS Email Snapshot Test > renders a ChipSPA Preview Temp cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > - - OneMAC Logo - +
+ + OneMAC Logo + + +
@@ -2141,25 +2165,31 @@ exports[`Respond To RAI CMS Email Snapshot Test > renders a ChipSPA Preview Temp cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > - - OneMAC Logo - + + OneMAC Logo + + + @@ -2845,25 +2875,31 @@ exports[`Respond To RAI CMS Email Snapshot Test > renders a Medicaid_SPA Preview cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > - - OneMAC Logo - +
+ + OneMAC Logo + + +
@@ -3307,25 +3343,31 @@ exports[`Respond To RAI CMS Email Snapshot Test > renders a Medicaid_SPA Preview cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > - - OneMAC Logo - +
+ + OneMAC Logo + + +
@@ -3953,25 +3995,31 @@ exports[`Respond To RAI CMS Email Snapshot Test > renders a Medicaid_SPA Preview cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > - - OneMAC Logo - +
+ + OneMAC Logo + + +
@@ -4590,25 +4638,31 @@ exports[`Respond To RAI CMS Email Snapshot Test > renders a Medicaid_SPA Preview cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > - - OneMAC Logo - + + OneMAC Logo + + + @@ -5284,25 +5338,31 @@ exports[`Respond To RAI CMS Email Snapshot Test > renders a Waiver Capitated Pre cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > - - OneMAC Logo - +
+ + OneMAC Logo + + +
@@ -5746,25 +5806,31 @@ exports[`Respond To RAI CMS Email Snapshot Test > renders a Waiver Capitated Pre cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > - - OneMAC Logo - +
+ + OneMAC Logo + + +
@@ -6392,25 +6458,31 @@ exports[`Respond To RAI CMS Email Snapshot Test > renders a Waiver Capitated Pre cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > - - OneMAC Logo - +
+ + OneMAC Logo + + +
@@ -7028,25 +7100,31 @@ exports[`Respond To RAI CMS Email Snapshot Test > renders a Waiver Capitated Pre cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > - - OneMAC Logo - +
+ + OneMAC Logo + + +
@@ -7667,25 +7745,31 @@ exports[`Respond To RAI CMS Email Snapshot Test > renders a Waiver Capitated Pre cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > - - OneMAC Logo - + + OneMAC Logo + + + diff --git a/lib/libs/email/preview/Respond to Rai/State/__snapshots__/ResToRaiState.test.tsx.snap b/lib/libs/email/preview/Respond to Rai/State/__snapshots__/ResToRaiState.test.tsx.snap index 22ab79cb12..3cd1c609c9 100644 --- a/lib/libs/email/preview/Respond to Rai/State/__snapshots__/ResToRaiState.test.tsx.snap +++ b/lib/libs/email/preview/Respond to Rai/State/__snapshots__/ResToRaiState.test.tsx.snap @@ -49,25 +49,31 @@ exports[`Respond To Rai State Email Snapshot Test > renders a AppKStateEmailPrev cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > - - OneMAC Logo - + + OneMAC Logo + + + @@ -313,7 +319,7 @@ exports[`Respond To Rai State Email Snapshot Test > renders a AppKStateEmailPrev

- Apr 1, 2023 @ 11:59pm ET + Jan 7, 2025 @ 11:59pm ET

@@ -357,15 +363,12 @@ exports[`Respond To Rai State Email Snapshot Test > renders a AppKStateEmailPrev -

This response confirms the receipt of your Waiver request or your response to a Waiver Request for Additional Information (RAI). You can expect a formal response to your submittal - to be issued within 90 days, before Apr 1, 2023 @ 11:59pm ET + to be issued within 90 days, before Jan 7, 2025 @ 11:59pm ET .

renders a AppKStateEmailPrev This mailbox is for the submittal of Section 1915(b) and 1915(c) Waivers, responses to Requests for Additional Information (RAI) on Waivers, and extension requests on Waivers only. Any other correspondence will be disregarded.

-
renders a AppKStateEmailPrev cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -773,7 +779,7 @@ exports[`Respond To Rai State Email Snapshot Test > renders a AppKStateEmailPrev

- Apr 1, 2023 @ 11:59pm ET + Jan 7, 2025 @ 11:59pm ET

@@ -817,15 +823,12 @@ exports[`Respond To Rai State Email Snapshot Test > renders a AppKStateEmailPrev
- - OneMAC Logo - + + OneMAC Logo + + +
-

This response confirms the receipt of your Waiver request or your response to a Waiver Request for Additional Information (RAI). You can expect a formal response to your submittal - to be issued within 90 days, before Apr 1, 2023 @ 11:59pm ET + to be issued within 90 days, before Jan 7, 2025 @ 11:59pm ET .

renders a AppKStateEmailPrev This mailbox is for the submittal of Section 1915(b) and 1915(c) Waivers, responses to Requests for Additional Information (RAI) on Waivers, and extension requests on Waivers only. Any other correspondence will be disregarded.

-
renders a ChipSPA Preview Te cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -1290,7 +1296,7 @@ exports[`Respond To Rai State Email Snapshot Test > renders a ChipSPA Preview Te

- Apr 1, 2023 @ 11:59pm ET + Jan 7, 2025 @ 11:59pm ET

@@ -1334,15 +1340,12 @@ exports[`Respond To Rai State Email Snapshot Test > renders a ChipSPA Preview Te
- - OneMAC Logo - + + OneMAC Logo + + +
-

This response confirms the receipt of your Waiver request or your response to a Waiver Request for Additional Information (RAI). You can expect a formal response to your submittal - to be issued within 90 days, before Apr 1, 2023 @ 11:59pm ET + to be issued within 90 days, before Jan 7, 2025 @ 11:59pm ET .

renders a ChipSPA Preview Te This mailbox is for the submittal of Section 1915(b) and 1915(c) Waivers, responses to Requests for Additional Information (RAI) on Waivers, and extension requests on Waivers only. Any other correspondence will be disregarded.

-
renders a ChipSPA Preview Te cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -1711,7 +1717,7 @@ exports[`Respond To Rai State Email Snapshot Test > renders a ChipSPA Preview Te

- Apr 1, 2023 @ 11:59pm ET + Jan 7, 2025 @ 11:59pm ET

@@ -1760,7 +1766,7 @@ exports[`Respond To Rai State Email Snapshot Test > renders a ChipSPA Preview Te > This response confirms receipt of your CHIP State Plan Amendment (SPA) or your response to a SPA Request for Additional Information (RAI). You can expect a formal response to your - submittal to be issued within 90 days, before Apr 1, 2023 @ 11:59pm ET + submittal to be issued within 90 days, before Jan 7, 2025 @ 11:59pm ET .

renders a ChipSPA Preview Te cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" >

@@ -2092,7 +2104,7 @@ exports[`Respond To Rai State Email Snapshot Test > renders a ChipSPA Preview Te

- Apr 1, 2023 @ 11:59pm ET + Jan 7, 2025 @ 11:59pm ET

@@ -2141,7 +2153,7 @@ exports[`Respond To Rai State Email Snapshot Test > renders a ChipSPA Preview Te > This response confirms receipt of your CHIP State Plan Amendment (SPA) or your response to a SPA Request for Additional Information (RAI). You can expect a formal response to your - submittal to be issued within 90 days, before Apr 1, 2023 @ 11:59pm ET + submittal to be issued within 90 days, before Jan 7, 2025 @ 11:59pm ET .

renders a Medicaid_SPA Previ cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" >

@@ -2568,7 +2586,7 @@ exports[`Respond To Rai State Email Snapshot Test > renders a Medicaid_SPA Previ

- Apr 1, 2023 @ 11:59pm ET + Jan 7, 2025 @ 11:59pm ET

@@ -2612,15 +2630,12 @@ exports[`Respond To Rai State Email Snapshot Test > renders a Medicaid_SPA Previ
- - OneMAC Logo - + + OneMAC Logo + + +
- - OneMAC Logo - + + OneMAC Logo + + +
- - OneMAC Logo - + + OneMAC Logo + + +
-

This response confirms the receipt of your Waiver request or your response to a Waiver Request for Additional Information (RAI). You can expect a formal response to your submittal - to be issued within 90 days, before Apr 1, 2023 @ 11:59pm ET + to be issued within 90 days, before Jan 7, 2025 @ 11:59pm ET .

renders a Medicaid_SPA Previ This mailbox is for the submittal of Section 1915(b) and 1915(c) Waivers, responses to Requests for Additional Information (RAI) on Waivers, and extension requests on Waivers only. Any other correspondence will be disregarded.

-
renders a Medicaid_SPA Previ cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -2989,7 +3007,7 @@ exports[`Respond To Rai State Email Snapshot Test > renders a Medicaid_SPA Previ

- Apr 1, 2023 @ 11:59pm ET + Jan 7, 2025 @ 11:59pm ET

@@ -3038,7 +3056,7 @@ exports[`Respond To Rai State Email Snapshot Test > renders a Medicaid_SPA Previ > This response confirms receipt of your CHIP State Plan Amendment (SPA) or your response to a SPA Request for Additional Information (RAI). You can expect a formal response to your - submittal to be issued within 90 days, before Apr 1, 2023 @ 11:59pm ET + submittal to be issued within 90 days, before Jan 7, 2025 @ 11:59pm ET .

renders a Medicaid_SPA Previ cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" >

@@ -3369,7 +3393,7 @@ exports[`Respond To Rai State Email Snapshot Test > renders a Medicaid_SPA Previ

- Apr 1, 2023 @ 11:59pm ET + Jan 7, 2025 @ 11:59pm ET

@@ -3418,7 +3442,7 @@ exports[`Respond To Rai State Email Snapshot Test > renders a Medicaid_SPA Previ > This response confirms receipt of your response to a SPA Request for Additional Information (RAI). You can expect a formal response to your submittal to be issued within 90 days, - before Apr 1, 2023 @ 11:59pm ET. + before Jan 7, 2025 @ 11:59pm ET.

renders a Medicaid_SPA Previ

- - OneMAC Logo - + + OneMAC Logo + + +
- - OneMAC Logo - + + OneMAC Logo + + +
-
renders a Medicaid_SPA Previ cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -3759,7 +3786,7 @@ exports[`Respond To Rai State Email Snapshot Test > renders a Medicaid_SPA Previ

- Apr 1, 2023 @ 11:59pm ET + Jan 7, 2025 @ 11:59pm ET

@@ -3808,7 +3835,7 @@ exports[`Respond To Rai State Email Snapshot Test > renders a Medicaid_SPA Previ > This response confirms receipt of your response to a SPA Request for Additional Information (RAI). You can expect a formal response to your submittal to be issued within 90 days, - before Apr 1, 2023 @ 11:59pm ET. + before Jan 7, 2025 @ 11:59pm ET.

renders a Medicaid_SPA Previ

- - OneMAC Logo - + + OneMAC Logo + + +
-
renders a Waiver Capitated P cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -4244,7 +4274,7 @@ exports[`Respond To Rai State Email Snapshot Test > renders a Waiver Capitated P

- Apr 1, 2023 @ 11:59pm ET + Jan 7, 2025 @ 11:59pm ET

@@ -4288,15 +4318,12 @@ exports[`Respond To Rai State Email Snapshot Test > renders a Waiver Capitated P
- - OneMAC Logo - + + OneMAC Logo + + +
-

This response confirms the receipt of your Waiver request or your response to a Waiver Request for Additional Information (RAI). You can expect a formal response to your submittal - to be issued within 90 days, before Apr 1, 2023 @ 11:59pm ET + to be issued within 90 days, before Jan 7, 2025 @ 11:59pm ET .

renders a Waiver Capitated P This mailbox is for the submittal of Section 1915(b) and 1915(c) Waivers, responses to Requests for Additional Information (RAI) on Waivers, and extension requests on Waivers only. Any other correspondence will be disregarded.

-
renders a Waiver Capitated P cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -4665,7 +4695,7 @@ exports[`Respond To Rai State Email Snapshot Test > renders a Waiver Capitated P

- Apr 1, 2023 @ 11:59pm ET + Jan 7, 2025 @ 11:59pm ET

@@ -4714,7 +4744,7 @@ exports[`Respond To Rai State Email Snapshot Test > renders a Waiver Capitated P > This response confirms receipt of your CHIP State Plan Amendment (SPA) or your response to a SPA Request for Additional Information (RAI). You can expect a formal response to your - submittal to be issued within 90 days, before Apr 1, 2023 @ 11:59pm ET + submittal to be issued within 90 days, before Jan 7, 2025 @ 11:59pm ET .

renders a Waiver Capitated P cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" >

@@ -5045,7 +5081,7 @@ exports[`Respond To Rai State Email Snapshot Test > renders a Waiver Capitated P

- Apr 1, 2023 @ 11:59pm ET + Jan 7, 2025 @ 11:59pm ET

@@ -5094,7 +5130,7 @@ exports[`Respond To Rai State Email Snapshot Test > renders a Waiver Capitated P > This response confirms receipt of your response to a SPA Request for Additional Information (RAI). You can expect a formal response to your submittal to be issued within 90 days, - before Apr 1, 2023 @ 11:59pm ET. + before Jan 7, 2025 @ 11:59pm ET.

renders a Waiver Capitated P

- - OneMAC Logo - + + OneMAC Logo + + +
- - OneMAC Logo - + + OneMAC Logo + + +
-
renders a Waiver Capitated P cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -5472,7 +5511,7 @@ exports[`Respond To Rai State Email Snapshot Test > renders a Waiver Capitated P

- Apr 1, 2023 @ 11:59pm ET + Jan 7, 2025 @ 11:59pm ET

@@ -5516,15 +5555,12 @@ exports[`Respond To Rai State Email Snapshot Test > renders a Waiver Capitated P
- - OneMAC Logo - + + OneMAC Logo + + +
-

This response confirms the receipt of your Waiver request or your response to a Waiver Request for Additional Information (RAI). You can expect a formal response to your submittal - to be issued within 90 days, before Apr 1, 2023 @ 11:59pm ET + to be issued within 90 days, before Jan 7, 2025 @ 11:59pm ET .

renders a Waiver Capitated P This mailbox is for the submittal of Section 1915(b) and 1915(c) Waivers, responses to Requests for Additional Information (RAI) on Waivers, and extension requests on Waivers only. Any other correspondence will be disregarded.

-
renders a Waiver Capitated P cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -5932,7 +5971,7 @@ exports[`Respond To Rai State Email Snapshot Test > renders a Waiver Capitated P

- Apr 1, 2023 @ 11:59pm ET + Jan 7, 2025 @ 11:59pm ET

@@ -5976,15 +6015,12 @@ exports[`Respond To Rai State Email Snapshot Test > renders a Waiver Capitated P
- - OneMAC Logo - + + OneMAC Logo + + +
-

This response confirms the receipt of your Waiver request or your response to a Waiver Request for Additional Information (RAI). You can expect a formal response to your submittal - to be issued within 90 days, before Apr 1, 2023 @ 11:59pm ET + to be issued within 90 days, before Jan 7, 2025 @ 11:59pm ET .

renders a Waiver Capitated P This mailbox is for the submittal of Section 1915(b) and 1915(c) Waivers, responses to Requests for Additional Information (RAI) on Waivers, and extension requests on Waivers only. Any other correspondence will be disregarded.

-
renders a AppKCMSE cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -440,25 +446,31 @@ exports[`Upload Subsequent Document CMS Email Snapshot Test > renders a AppKCMSE cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -888,25 +900,31 @@ exports[`Upload Subsequent Document CMS Email Snapshot Test > renders a ChipSPA cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -1278,25 +1296,31 @@ exports[`Upload Subsequent Document CMS Email Snapshot Test > renders a ChipSPA cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -1899,25 +1923,31 @@ exports[`Upload Subsequent Document CMS Email Snapshot Test > renders a ChipSPA cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -2577,25 +2607,31 @@ exports[`Upload Subsequent Document CMS Email Snapshot Test > renders a Medicaid cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -2967,25 +3003,31 @@ exports[`Upload Subsequent Document CMS Email Snapshot Test > renders a Medicaid cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -3587,25 +3629,31 @@ exports[`Upload Subsequent Document CMS Email Snapshot Test > renders a Medicaid cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -4208,25 +4256,31 @@ exports[`Upload Subsequent Document CMS Email Snapshot Test > renders a Medicaid cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -4886,25 +4940,31 @@ exports[`Upload Subsequent Document CMS Email Snapshot Test > renders a Waiver C cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -5276,25 +5336,31 @@ exports[`Upload Subsequent Document CMS Email Snapshot Test > renders a Waiver C cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -5896,25 +5962,31 @@ exports[`Upload Subsequent Document CMS Email Snapshot Test > renders a Waiver C cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -6516,25 +6588,31 @@ exports[`Upload Subsequent Document CMS Email Snapshot Test > renders a Waiver C cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -7137,25 +7215,31 @@ exports[`Upload Subsequent Document CMS Email Snapshot Test > renders a Waiver C cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > diff --git a/lib/libs/email/preview/Upload Subsequent Documents/State/__snapshots__/UpSubDocState.test.tsx.snap b/lib/libs/email/preview/Upload Subsequent Documents/State/__snapshots__/UpSubDocState.test.tsx.snap index 84f22167d1..1cda1b5776 100644 --- a/lib/libs/email/preview/Upload Subsequent Documents/State/__snapshots__/UpSubDocState.test.tsx.snap +++ b/lib/libs/email/preview/Upload Subsequent Documents/State/__snapshots__/UpSubDocState.test.tsx.snap @@ -49,25 +49,31 @@ exports[`Upload Subsequent Document CMS Email Snapshot Test > renders a AppKCMSE cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -484,25 +490,31 @@ exports[`Upload Subsequent Document CMS Email Snapshot Test > renders a AppKCMSE cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -976,25 +988,31 @@ exports[`Upload Subsequent Document CMS Email Snapshot Test > renders a ChipSPA cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -1410,25 +1428,31 @@ exports[`Upload Subsequent Document CMS Email Snapshot Test > renders a ChipSPA cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -2075,25 +2099,31 @@ exports[`Upload Subsequent Document CMS Email Snapshot Test > renders a ChipSPA cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -2797,25 +2827,31 @@ exports[`Upload Subsequent Document CMS Email Snapshot Test > renders a Medicaid cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -3231,25 +3267,31 @@ exports[`Upload Subsequent Document CMS Email Snapshot Test > renders a Medicaid cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -3895,25 +3937,31 @@ exports[`Upload Subsequent Document CMS Email Snapshot Test > renders a Medicaid cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -4557,25 +4605,31 @@ exports[`Upload Subsequent Document CMS Email Snapshot Test > renders a Medicaid cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -5276,25 +5330,31 @@ exports[`Upload Subsequent Document CMS Email Snapshot Test > renders a Waiver C cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -5710,25 +5770,31 @@ exports[`Upload Subsequent Document CMS Email Snapshot Test > renders a Waiver C cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -6374,25 +6440,31 @@ exports[`Upload Subsequent Document CMS Email Snapshot Test > renders a Waiver C cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -7035,25 +7107,31 @@ exports[`Upload Subsequent Document CMS Email Snapshot Test > renders a Waiver C cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -7700,25 +7778,31 @@ exports[`Upload Subsequent Document CMS Email Snapshot Test > renders a Waiver C cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > diff --git a/lib/libs/email/preview/Withdraw Package/CMS/__snapshots__/WithdrawPackageCMS.test.tsx.snap b/lib/libs/email/preview/Withdraw Package/CMS/__snapshots__/WithdrawPackageCMS.test.tsx.snap index a4af943300..7ea354c257 100644 --- a/lib/libs/email/preview/Withdraw Package/CMS/__snapshots__/WithdrawPackageCMS.test.tsx.snap +++ b/lib/libs/email/preview/Withdraw Package/CMS/__snapshots__/WithdrawPackageCMS.test.tsx.snap @@ -49,25 +49,31 @@ exports[`Withdraw Package CMS Email Snapshot Test > renders a Appk Preview Templ cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -384,25 +390,31 @@ exports[`Withdraw Package CMS Email Snapshot Test > renders a Appk Preview Templ cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -776,25 +788,31 @@ exports[`Withdraw Package CMS Email Snapshot Test > renders a ChipSPA Preview Te cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -1110,25 +1128,31 @@ exports[`Withdraw Package CMS Email Snapshot Test > renders a ChipSPA Preview Te cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -1448,25 +1472,31 @@ exports[`Withdraw Package CMS Email Snapshot Test > renders a ChipSPA Preview Te cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -1843,25 +1873,31 @@ exports[`Withdraw Package CMS Email Snapshot Test > renders a Medicaid_SPA Previ cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -2177,25 +2213,31 @@ exports[`Withdraw Package CMS Email Snapshot Test > renders a Medicaid_SPA Previ cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -2486,9 +2528,9 @@ exports[`Withdraw Package CMS Email Snapshot Test > renders a Medicaid_SPA Previ
- SPA SPA Package CO-1234.R21.00 Withdraw Request + SPA Package CO-1234.R21.00 Withdraw Request
-  ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ +  ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏
renders a Medicaid_SPA Previ cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -2824,9 +2872,9 @@ exports[`Withdraw Package CMS Email Snapshot Test > renders a Medicaid_SPA Previ
- SPA SPA Package CO-1234.R21.00 Withdraw Request + SPA Package CO-1234.R21.00 Withdraw Request
-  ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ +  ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏
renders a Medicaid_SPA Previ cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -3247,25 +3301,31 @@ exports[`Withdraw Package CMS Email Snapshot Test > renders a Waiver Capitated P cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -3581,25 +3641,31 @@ exports[`Withdraw Package CMS Email Snapshot Test > renders a Waiver Capitated P cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -3890,9 +3956,9 @@ exports[`Withdraw Package CMS Email Snapshot Test > renders a Waiver Capitated P
- SPA SPA Package CO-1234.R21.00 Withdraw Request + SPA Package CO-1234.R21.00 Withdraw Request
-  ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ +  ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏
renders a Waiver Capitated P cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -4255,25 +4327,31 @@ exports[`Withdraw Package CMS Email Snapshot Test > renders a Waiver Capitated P cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -4590,25 +4668,31 @@ exports[`Withdraw Package CMS Email Snapshot Test > renders a Waiver Capitated P cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > diff --git a/lib/libs/email/preview/Withdraw Package/State/__snapshots__/WithdrawPackageState.test.tsx.snap b/lib/libs/email/preview/Withdraw Package/State/__snapshots__/WithdrawPackageState.test.tsx.snap index af6c97956e..4d084acd81 100644 --- a/lib/libs/email/preview/Withdraw Package/State/__snapshots__/WithdrawPackageState.test.tsx.snap +++ b/lib/libs/email/preview/Withdraw Package/State/__snapshots__/WithdrawPackageState.test.tsx.snap @@ -49,25 +49,31 @@ exports[`Withdraw Package State Email Snapshot Test > renders a Appk Preview Tem cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -290,9 +296,6 @@ exports[`Withdraw Package State Email Snapshot Test > renders a Appk Preview Tem This mailbox is for the submittal of Section 1915(b) and 1915(c) Waivers, responses to Requests for Additional Information (RAI) on Waivers, and extension requests on Waivers only. Any other correspondence will be disregarded.

-
- - OneMAC Logo - +
+ + OneMAC Logo + + +
- - OneMAC Logo - + + OneMAC Logo + + +
- - OneMAC Logo - +
+ + OneMAC Logo + + +
- - OneMAC Logo - +
+ + OneMAC Logo + + +
- - OneMAC Logo - + + OneMAC Logo + + +
- - OneMAC Logo - +
+ + OneMAC Logo + + +
- - OneMAC Logo - +
+ + OneMAC Logo + + +
- - OneMAC Logo - +
+ + OneMAC Logo + + +
- - OneMAC Logo - + + OneMAC Logo + + +
- - OneMAC Logo - +
+ + OneMAC Logo + + +
- - OneMAC Logo - +
+ + OneMAC Logo + + +
- - OneMAC Logo - +
+ + OneMAC Logo + + +
- - OneMAC Logo - +
+ + OneMAC Logo + + +
- - OneMAC Logo - + + OneMAC Logo + + +
- - OneMAC Logo - +
+ + OneMAC Logo + + +
- - OneMAC Logo - + + OneMAC Logo + + +
- - OneMAC Logo - +
+ + OneMAC Logo + + +
- - OneMAC Logo - +
+ + OneMAC Logo + + +
- - OneMAC Logo - + + OneMAC Logo + + +
- - OneMAC Logo - +
+ + OneMAC Logo + + +
- - OneMAC Logo - +
+ + OneMAC Logo + + +
- - OneMAC Logo - +
+ + OneMAC Logo + + +
- - OneMAC Logo - + + OneMAC Logo + + +
- - OneMAC Logo - +
+ + OneMAC Logo + + +
- - OneMAC Logo - +
+ + OneMAC Logo + + +
- - OneMAC Logo - +
+ + OneMAC Logo + + +
- - OneMAC Logo - +
+ + OneMAC Logo + + +
- - OneMAC Logo - + + OneMAC Logo + + +
- - OneMAC Logo - + + OneMAC Logo + + +
- - OneMAC Logo - + + OneMAC Logo + + +
- - OneMAC Logo - + + OneMAC Logo + + +
- - OneMAC Logo - + + OneMAC Logo + + +
- - OneMAC Logo - + + OneMAC Logo + + +
- - OneMAC Logo - + + OneMAC Logo + + +
- - OneMAC Logo - + + OneMAC Logo + + +
- - OneMAC Logo - + + OneMAC Logo + + +
- - OneMAC Logo - + + OneMAC Logo + + +
- - OneMAC Logo - + + OneMAC Logo + + +
- - OneMAC Logo - + + OneMAC Logo + + +
- - OneMAC Logo - + + OneMAC Logo + + +
- - OneMAC Logo - + + OneMAC Logo + + +
- - OneMAC Logo - + + OneMAC Logo + + +
- - OneMAC Logo - + + OneMAC Logo + + +
renders a Appk Preview Tem cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -666,9 +675,6 @@ exports[`Withdraw Package State Email Snapshot Test > renders a Appk Preview Tem This mailbox is for the submittal of Section 1915(b) and 1915(c) Waivers, responses to Requests for Additional Information (RAI) on Waivers, and extension requests on Waivers only. Any other correspondence will be disregarded.

-
- - OneMAC Logo - + + OneMAC Logo + + +
renders a ChipSPA Preview cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -1099,9 +1111,6 @@ exports[`Withdraw Package State Email Snapshot Test > renders a ChipSPA Preview This mailbox is for the submittal of Section 1915(b) and 1915(c) Waivers, responses to Requests for Additional Information (RAI) on Waivers, and extension requests on Waivers only. Any other correspondence will be disregarded.

-
- - OneMAC Logo - + + OneMAC Logo + + +
renders a ChipSPA Preview cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -1468,9 +1483,6 @@ exports[`Withdraw Package State Email Snapshot Test > renders a ChipSPA Preview
- - OneMAC Logo - + + OneMAC Logo + + +
-
renders a ChipSPA Preview cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -1838,9 +1856,6 @@ exports[`Withdraw Package State Email Snapshot Test > renders a ChipSPA Preview
- - OneMAC Logo - + + OneMAC Logo + + +
-
renders a Medicaid_SPA Pre cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -2271,9 +2292,6 @@ exports[`Withdraw Package State Email Snapshot Test > renders a Medicaid_SPA Pre This mailbox is for the submittal of Section 1915(b) and 1915(c) Waivers, responses to Requests for Additional Information (RAI) on Waivers, and extension requests on Waivers only. Any other correspondence will be disregarded.

-
- - OneMAC Logo - + + OneMAC Logo + + +
renders a Medicaid_SPA Pre cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -2640,9 +2664,6 @@ exports[`Withdraw Package State Email Snapshot Test > renders a Medicaid_SPA Pre
- - OneMAC Logo - + + OneMAC Logo + + +
-
renders a Medicaid_SPA Pre cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -3009,9 +3036,6 @@ exports[`Withdraw Package State Email Snapshot Test > renders a Medicaid_SPA Pre
- - OneMAC Logo - + + OneMAC Logo + + +
-
renders a Medicaid_SPA Pre cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -3379,9 +3409,6 @@ exports[`Withdraw Package State Email Snapshot Test > renders a Medicaid_SPA Pre
- - OneMAC Logo - + + OneMAC Logo + + +
-
renders a Waiver Capitated cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -3812,9 +3845,6 @@ exports[`Withdraw Package State Email Snapshot Test > renders a Waiver Capitated This mailbox is for the submittal of Section 1915(b) and 1915(c) Waivers, responses to Requests for Additional Information (RAI) on Waivers, and extension requests on Waivers only. Any other correspondence will be disregarded.

-
- - OneMAC Logo - + + OneMAC Logo + + +
renders a Waiver Capitated cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -4181,9 +4217,6 @@ exports[`Withdraw Package State Email Snapshot Test > renders a Waiver Capitated
- - OneMAC Logo - + + OneMAC Logo + + +
-
renders a Waiver Capitated cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -4550,9 +4589,6 @@ exports[`Withdraw Package State Email Snapshot Test > renders a Waiver Capitated
- - OneMAC Logo - + + OneMAC Logo + + +
-
renders a Waiver Capitated cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -4925,9 +4967,6 @@ exports[`Withdraw Package State Email Snapshot Test > renders a Waiver Capitated This mailbox is for the submittal of Section 1915(b) and 1915(c) Waivers, responses to Requests for Additional Information (RAI) on Waivers, and extension requests on Waivers only. Any other correspondence will be disregarded.

-
- - OneMAC Logo - + + OneMAC Logo + + +
renders a Waiver Capitated cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -5301,9 +5346,6 @@ exports[`Withdraw Package State Email Snapshot Test > renders a Waiver Capitated This mailbox is for the submittal of Section 1915(b) and 1915(c) Waivers, responses to Requests for Additional Information (RAI) on Waivers, and extension requests on Waivers only. Any other correspondence will be disregarded.

-
- - OneMAC Logo - + + OneMAC Logo + + +
renders a Appk Preview Template cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -652,25 +658,31 @@ exports[`Withdraw RAI CMS Email Snapshot Test > renders a Appk Preview Template cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -1312,25 +1324,31 @@ exports[`Withdraw RAI CMS Email Snapshot Test > renders a ChipSPA Preview Templa cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -2529,25 +2547,31 @@ exports[`Withdraw RAI CMS Email Snapshot Test > renders a Medicaid_SPA Preview T cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -4024,25 +4048,31 @@ exports[`Withdraw RAI CMS Email Snapshot Test > renders a Waiver Capitated Previ cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > diff --git a/lib/libs/email/preview/Withdraw Rai/State/__snapshots__/WithdrawRaiState.test.tsx.snap b/lib/libs/email/preview/Withdraw Rai/State/__snapshots__/WithdrawRaiState.test.tsx.snap index bef4a90675..c6bbd2f992 100644 --- a/lib/libs/email/preview/Withdraw Rai/State/__snapshots__/WithdrawRaiState.test.tsx.snap +++ b/lib/libs/email/preview/Withdraw Rai/State/__snapshots__/WithdrawRaiState.test.tsx.snap @@ -49,25 +49,31 @@ exports[`Withdraw RAI State Email Snapshot Test > renders a Appk Preview Templat cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -290,9 +296,6 @@ exports[`Withdraw RAI State Email Snapshot Test > renders a Appk Preview Templat This mailbox is for the submittal of Section 1915(b) and 1915(c) Waivers, responses to Requests for Additional Information (RAI) on Waivers, and extension requests on Waivers only. Any other correspondence will be disregarded.

-
- - OneMAC Logo - + + OneMAC Logo + + +
- - OneMAC Logo - + + OneMAC Logo + + +
- - OneMAC Logo - + + OneMAC Logo + + +
- - OneMAC Logo - + + OneMAC Logo + + +
- - OneMAC Logo - + + OneMAC Logo + + +
- - OneMAC Logo - + + OneMAC Logo + + +
renders a Appk Preview Templat cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -666,9 +675,6 @@ exports[`Withdraw RAI State Email Snapshot Test > renders a Appk Preview Templat This mailbox is for the submittal of Section 1915(b) and 1915(c) Waivers, responses to Requests for Additional Information (RAI) on Waivers, and extension requests on Waivers only. Any other correspondence will be disregarded.

-
- - OneMAC Logo - + + OneMAC Logo + + +
renders a ChipSPA Preview Temp cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -1099,9 +1111,6 @@ exports[`Withdraw RAI State Email Snapshot Test > renders a ChipSPA Preview Temp This mailbox is for the submittal of Section 1915(b) and 1915(c) Waivers, responses to Requests for Additional Information (RAI) on Waivers, and extension requests on Waivers only. Any other correspondence will be disregarded.

-
- - OneMAC Logo - + + OneMAC Logo + + +
renders a ChipSPA Preview Temp
-
renders a ChipSPA Preview Temp
-
renders a Medicaid_SPA Preview cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -2097,9 +2106,6 @@ exports[`Withdraw RAI State Email Snapshot Test > renders a Medicaid_SPA Preview This mailbox is for the submittal of Section 1915(b) and 1915(c) Waivers, responses to Requests for Additional Information (RAI) on Waivers, and extension requests on Waivers only. Any other correspondence will be disregarded.

-
- - OneMAC Logo - + + OneMAC Logo + + +
renders a Medicaid_SPA Preview
-
renders a Medicaid_SPA Preview
-
renders a Medicaid_SPA Preview
-
renders a Waiver Capitated Pre cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -3377,9 +3380,6 @@ exports[`Withdraw RAI State Email Snapshot Test > renders a Waiver Capitated Pre This mailbox is for the submittal of Section 1915(b) and 1915(c) Waivers, responses to Requests for Additional Information (RAI) on Waivers, and extension requests on Waivers only. Any other correspondence will be disregarded.

-
- - OneMAC Logo - + + OneMAC Logo + + +
renders a Waiver Capitated Pre
-
renders a Waiver Capitated Pre
-
renders a Waiver Capitated Pre cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -4623,9 +4623,6 @@ exports[`Withdraw RAI State Email Snapshot Test > renders a Waiver Capitated Pre
- - OneMAC Logo - + + OneMAC Logo + + +
-
renders a Waiver Capitated Pre cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -5260,9 +5263,6 @@ exports[`Withdraw RAI State Email Snapshot Test > renders a Waiver Capitated Pre
- - OneMAC Logo - + + OneMAC Logo + + +
-
renders a Appk Previe cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -83,6 +89,95 @@ exports[`Withdraw Confirmation State Email Snapshot Test > renders a Appk Previe
+

+ Files: +

+
- - OneMAC Logo - + + OneMAC Logo + + +
+ + + + + + +
+

+ 1915(c) Appendix K Amendment Waiver Template + : +

+
+

+ + appendix-k-amendment.docx + +

+
+ + + + + + + +
+

+ Other + : +

+
+

+ + misc-documents.pdf + +

+
renders a Appk Previe cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -249,6 +350,95 @@ exports[`Withdraw Confirmation State Email Snapshot Test > renders a Appk Previe
+

+ Files: +

+
- - OneMAC Logo - + + OneMAC Logo + + +
+ + + + + + +
+

+ 1915(c) Appendix K Amendment Waiver Template + : +

+
+

+ + appendix-k-amendment.docx + +

+
+ + + + + + + +
+

+ Other + : +

+
+

+ + misc-documents.pdf + +

+
renders a ChipSPA Pre cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -472,6 +668,95 @@ exports[`Withdraw Confirmation State Email Snapshot Test > renders a ChipSPA Pre
+

+ Files: +

+
- - OneMAC Logo - + + OneMAC Logo + + +
+ + + + + + +
+

+ 1915(c) Appendix K Amendment Waiver Template + : +

+
+

+ + appendix-k-amendment.docx + +

+
+ + + + + + + +
+

+ Other + : +

+
+

+ + misc-documents.pdf + +

+
renders a ChipSPA Pre cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -634,9 +925,6 @@ exports[`Withdraw Confirmation State Email Snapshot Test > renders a ChipSPA Pre > This email is to confirm CHIP SPA CO-1234.R21.00 was withdrawn by George Harrison. The review of CHIP SPA CO-1234.R21.00 has concluded. -
- - OneMAC Logo - + + OneMAC Logo + + +
renders a ChipSPA Pre cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -800,9 +1094,6 @@ exports[`Withdraw Confirmation State Email Snapshot Test > renders a ChipSPA Pre > This email is to confirm CHIP SPA CO-1234.R21.00 was withdrawn by George Harrison. The review of CHIP SPA CO-1234.R21.00 has concluded. -
- - OneMAC Logo - + + OneMAC Logo + + +
renders a Medicaid_SP cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -1026,6 +1323,95 @@ exports[`Withdraw Confirmation State Email Snapshot Test > renders a Medicaid_SP
+

+ Files: +

+
- - OneMAC Logo - + + OneMAC Logo + + +
+ + + + + + +
+

+ 1915(c) Appendix K Amendment Waiver Template + : +

+
+

+ + appendix-k-amendment.docx + +

+
+ + + + + + + +
+

+ Other + : +

+
+

+ + misc-documents.pdf + +

+
renders a Medicaid_SP cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -1188,9 +1580,6 @@ exports[`Withdraw Confirmation State Email Snapshot Test > renders a Medicaid_SP > This email is to confirm CHIP SPA CO-1234.R21.00 was withdrawn by George Harrison. The review of CHIP SPA CO-1234.R21.00 has concluded. -
- - OneMAC Logo - + + OneMAC Logo + + +
renders a Medicaid_SP cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -1353,9 +1748,6 @@ exports[`Withdraw Confirmation State Email Snapshot Test > renders a Medicaid_SP > This email is to confirm Medicaid SPA CO-1234.R21.00 was withdrawn by George Harrison. The review of Medicaid SPA CO-1234.R21.00 has concluded. -
- - OneMAC Logo - + + OneMAC Logo + + +
renders a Medicaid_SP cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -1519,9 +1917,6 @@ exports[`Withdraw Confirmation State Email Snapshot Test > renders a Medicaid_SP > This email is to confirm Medicaid SPA CO-1234.R21.00 was withdrawn by George Harrison. The review of Medicaid SPA CO-1234.R21.00 has concluded. -
- - OneMAC Logo - + + OneMAC Logo + + +
renders a Waiver Prev cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -1745,6 +2146,95 @@ exports[`Withdraw Confirmation State Email Snapshot Test > renders a Waiver Prev
+

+ Files: +

+
- - OneMAC Logo - + + OneMAC Logo + + +
+ + + + + + +
+

+ 1915(c) Appendix K Amendment Waiver Template + : +

+
+

+ + appendix-k-amendment.docx + +

+
+ + + + + + + +
+

+ Other + : +

+
+

+ + misc-documents.pdf + +

+
renders a Waiver Prev cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -1907,9 +2403,6 @@ exports[`Withdraw Confirmation State Email Snapshot Test > renders a Waiver Prev > This email is to confirm CHIP SPA CO-1234.R21.00 was withdrawn by George Harrison. The review of CHIP SPA CO-1234.R21.00 has concluded. -
- - OneMAC Logo - + + OneMAC Logo + + +
renders a Waiver Prev cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -2072,9 +2571,6 @@ exports[`Withdraw Confirmation State Email Snapshot Test > renders a Waiver Prev > This email is to confirm Medicaid SPA CO-1234.R21.00 was withdrawn by George Harrison. The review of Medicaid SPA CO-1234.R21.00 has concluded. -
- - OneMAC Logo - + + OneMAC Logo + + +
renders a Waiver Prev cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -2240,6 +2742,95 @@ exports[`Withdraw Confirmation State Email Snapshot Test > renders a Waiver Prev
+

+ Files: +

+
- - OneMAC Logo - + + OneMAC Logo + + +
+ + + + + + +
+

+ Official Withdrawal Letter + : +

+
+

+ + official_withdrawal_letter.pdf + +

+
+ + + + + + + +
+

+ Supporting Documentation + : +

+
+

+ + supporting_documentation.pdf + +

+
renders a Waiver Prev cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -2406,6 +3003,95 @@ exports[`Withdraw Confirmation State Email Snapshot Test > renders a Waiver Prev
+

+ Files: +

+
- - OneMAC Logo - + + OneMAC Logo + + +
+ + + + + + +
+

+ Official Withdrawal Letter + : +

+
+

+ + official_withdrawal_letter.pdf + +

+
+ + + + + + + +
+

+ Supporting Documentation + : +

+
+

+ + supporting_documentation.pdf + +

+
{ + return ( + + ); +}; diff --git a/lib/libs/email/preview/Initial Submissions/CMS/Waiver_Capitated.tsx b/lib/libs/email/preview/new-submission/CMS/Waiver_Capitated.tsx similarity index 100% rename from lib/libs/email/preview/Initial Submissions/CMS/Waiver_Capitated.tsx rename to lib/libs/email/preview/new-submission/CMS/Waiver_Capitated.tsx diff --git a/lib/libs/email/preview/Initial Submissions/CMS/__snapshots__/InitialSubmissionCMS.test.tsx.snap b/lib/libs/email/preview/new-submission/CMS/__snapshots__/InitialSubmissionCMS.test.tsx.snap similarity index 77% rename from lib/libs/email/preview/Initial Submissions/CMS/__snapshots__/InitialSubmissionCMS.test.tsx.snap rename to lib/libs/email/preview/new-submission/CMS/__snapshots__/InitialSubmissionCMS.test.tsx.snap index 71f0b0723b..797c745dc9 100644 --- a/lib/libs/email/preview/Initial Submissions/CMS/__snapshots__/InitialSubmissionCMS.test.tsx.snap +++ b/lib/libs/email/preview/new-submission/CMS/__snapshots__/InitialSubmissionCMS.test.tsx.snap @@ -49,25 +49,31 @@ exports[`Initial Submission CMS Email Snapshot Test > renders a AppkCMSEmail Pre cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -388,7 +394,7 @@ exports[`Initial Submission CMS Email Snapshot Test > renders a AppkCMSEmail Pre

- March 2, 2023 + October 9, 2024

@@ -627,25 +633,31 @@ exports[`Initial Submission CMS Email Snapshot Test > renders a AppkCMSEmail Pre cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -966,7 +978,7 @@ exports[`Initial Submission CMS Email Snapshot Test > renders a AppkCMSEmail Pre

- March 2, 2023 + October 9, 2024

@@ -1262,25 +1274,31 @@ exports[`Initial Submission CMS Email Snapshot Test > renders a Chipspa Preview cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -1601,7 +1619,7 @@ exports[`Initial Submission CMS Email Snapshot Test > renders a Chipspa Preview

- March 2, 2023 + October 9, 2024

@@ -1839,25 +1857,31 @@ exports[`Initial Submission CMS Email Snapshot Test > renders a Chipspa Preview cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -2540,25 +2564,31 @@ exports[`Initial Submission CMS Email Snapshot Test > renders a Chipspa Preview cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -3298,25 +3328,31 @@ exports[`Initial Submission CMS Email Snapshot Test > renders a Medicaid Spa Pre cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -3637,7 +3673,7 @@ exports[`Initial Submission CMS Email Snapshot Test > renders a Medicaid Spa Pre

- March 2, 2023 + October 9, 2024

@@ -3875,25 +3911,31 @@ exports[`Initial Submission CMS Email Snapshot Test > renders a Medicaid Spa Pre cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -4575,25 +4617,31 @@ exports[`Initial Submission CMS Email Snapshot Test > renders a Medicaid Spa Pre cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -4845,7 +4893,7 @@ exports[`Initial Submission CMS Email Snapshot Test > renders a Medicaid Spa Pre

- March 2, 2023 + October 9, 2024

@@ -5414,25 +5462,31 @@ exports[`Initial Submission CMS Email Snapshot Test > renders a Medicaid Spa Pre cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -5684,7 +5738,7 @@ exports[`Initial Submission CMS Email Snapshot Test > renders a Medicaid Spa Pre

- March 2, 2023 + October 9, 2024

@@ -6310,25 +6364,31 @@ exports[`Initial Submission CMS Email Snapshot Test > renders a TempExt Preview cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -6649,7 +6709,7 @@ exports[`Initial Submission CMS Email Snapshot Test > renders a TempExt Preview

- March 2, 2023 + October 9, 2024

@@ -6887,25 +6947,31 @@ exports[`Initial Submission CMS Email Snapshot Test > renders a TempExt Preview cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -7587,25 +7653,31 @@ exports[`Initial Submission CMS Email Snapshot Test > renders a TempExt Preview cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -7857,7 +7929,7 @@ exports[`Initial Submission CMS Email Snapshot Test > renders a TempExt Preview

- March 2, 2023 + October 9, 2024

@@ -8425,25 +8497,31 @@ exports[`Initial Submission CMS Email Snapshot Test > renders a TempExt Preview cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -8733,7 +8811,7 @@ exports[`Initial Submission CMS Email Snapshot Test > renders a TempExt Preview

- May 31, 2023 @ 11:59pm ET + Jan 7, 2025 @ 11:59pm ET

@@ -8938,25 +9016,31 @@ exports[`Initial Submission CMS Email Snapshot Test > renders a TempExt Preview cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -9246,7 +9330,7 @@ exports[`Initial Submission CMS Email Snapshot Test > renders a TempExt Preview

- May 31, 2023 @ 11:59pm ET + Jan 7, 2025 @ 11:59pm ET

@@ -9508,25 +9592,31 @@ exports[`Initial Submission CMS Email Snapshot Test > renders a Waiver Capitated cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -9847,7 +9937,7 @@ exports[`Initial Submission CMS Email Snapshot Test > renders a Waiver Capitated

- March 2, 2023 + October 9, 2024

@@ -10085,25 +10175,31 @@ exports[`Initial Submission CMS Email Snapshot Test > renders a Waiver Capitated cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -10785,25 +10881,31 @@ exports[`Initial Submission CMS Email Snapshot Test > renders a Waiver Capitated cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -11055,7 +11157,7 @@ exports[`Initial Submission CMS Email Snapshot Test > renders a Waiver Capitated

- March 2, 2023 + October 9, 2024

@@ -11623,25 +11725,31 @@ exports[`Initial Submission CMS Email Snapshot Test > renders a Waiver Capitated cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -11931,7 +12039,7 @@ exports[`Initial Submission CMS Email Snapshot Test > renders a Waiver Capitated

- May 31, 2023 @ 11:59pm ET + Jan 7, 2025 @ 11:59pm ET

@@ -12135,25 +12243,31 @@ exports[`Initial Submission CMS Email Snapshot Test > renders a Waiver Capitated cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -12443,7 +12557,7 @@ exports[`Initial Submission CMS Email Snapshot Test > renders a Waiver Capitated

- March 2, 2023 + October 9, 2024

@@ -12682,25 +12796,31 @@ exports[`Initial Submission CMS Email Snapshot Test > renders a Waiver Capitated cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -12990,7 +13110,7 @@ exports[`Initial Submission CMS Email Snapshot Test > renders a Waiver Capitated

- March 2, 2023 + October 9, 2024

diff --git a/lib/libs/email/preview/Initial Submissions/State/AppK.tsx b/lib/libs/email/preview/new-submission/State/AppK.tsx similarity index 89% rename from lib/libs/email/preview/Initial Submissions/State/AppK.tsx rename to lib/libs/email/preview/new-submission/State/AppK.tsx index 93d6b44c9c..7845333085 100644 --- a/lib/libs/email/preview/Initial Submissions/State/AppK.tsx +++ b/lib/libs/email/preview/new-submission/State/AppK.tsx @@ -2,7 +2,7 @@ import { AppKStateEmail } from "../../../content/new-submission/emailTemplates"; import { emailTemplateValue } from "../../../mock-data/new-submission"; import * as attachments from "../../../mock-data/attachments"; -const AppKCMSEmailPreview = () => { +const AppKStateEmailPreview = () => { return ( { ); }; -export default AppKCMSEmailPreview; +export default AppKStateEmailPreview; diff --git a/lib/libs/email/preview/Initial Submissions/State/CHIP_SPA.tsx b/lib/libs/email/preview/new-submission/State/CHIP_SPA.tsx similarity index 83% rename from lib/libs/email/preview/Initial Submissions/State/CHIP_SPA.tsx rename to lib/libs/email/preview/new-submission/State/CHIP_SPA.tsx index 0da31143fb..f84d2cbdfe 100644 --- a/lib/libs/email/preview/Initial Submissions/State/CHIP_SPA.tsx +++ b/lib/libs/email/preview/new-submission/State/CHIP_SPA.tsx @@ -6,10 +6,12 @@ const ChipSpaStateEmailPreview = () => { { + return ( + + ); +}; + +export default MedSpaStateEmailPreview; diff --git a/lib/libs/email/preview/Initial Submissions/State/Medicaid_SPA.tsx b/lib/libs/email/preview/new-submission/State/Medicaid_SPA.tsx similarity index 100% rename from lib/libs/email/preview/Initial Submissions/State/Medicaid_SPA.tsx rename to lib/libs/email/preview/new-submission/State/Medicaid_SPA.tsx diff --git a/lib/libs/email/preview/Initial Submissions/State/Temp_Extension.tsx b/lib/libs/email/preview/new-submission/State/Temp_Extension.tsx similarity index 100% rename from lib/libs/email/preview/Initial Submissions/State/Temp_Extension.tsx rename to lib/libs/email/preview/new-submission/State/Temp_Extension.tsx diff --git a/lib/libs/email/preview/new-submission/State/Waiver1915b.tsx b/lib/libs/email/preview/new-submission/State/Waiver1915b.tsx new file mode 100644 index 0000000000..b73c4a81c7 --- /dev/null +++ b/lib/libs/email/preview/new-submission/State/Waiver1915b.tsx @@ -0,0 +1,25 @@ +import { Waiver1915bStateEmail } from "../../../content/new-submission/emailTemplates"; +import { emailTemplateValue } from "../../../mock-data/new-submission"; +import * as attachments from "../../../mock-data/attachments"; + +export const WaiverInitialStateEmailPreview = () => { + return ( + + ); +}; diff --git a/lib/libs/email/preview/Initial Submissions/State/Waiver_Capitated.tsx b/lib/libs/email/preview/new-submission/State/Waiver_Capitated.tsx similarity index 100% rename from lib/libs/email/preview/Initial Submissions/State/Waiver_Capitated.tsx rename to lib/libs/email/preview/new-submission/State/Waiver_Capitated.tsx diff --git a/lib/libs/email/preview/Initial Submissions/State/Waiver_Contracting.tsx b/lib/libs/email/preview/new-submission/State/Waiver_Contracting.tsx similarity index 100% rename from lib/libs/email/preview/Initial Submissions/State/Waiver_Contracting.tsx rename to lib/libs/email/preview/new-submission/State/Waiver_Contracting.tsx diff --git a/lib/libs/email/preview/Initial Submissions/State/__snapshots__/InitialSubmissionState.test.tsx.snap b/lib/libs/email/preview/new-submission/State/__snapshots__/InitialSubmissionState.test.tsx.snap similarity index 71% rename from lib/libs/email/preview/Initial Submissions/State/__snapshots__/InitialSubmissionState.test.tsx.snap rename to lib/libs/email/preview/new-submission/State/__snapshots__/InitialSubmissionState.test.tsx.snap index 1cd1ec1104..21c13531a6 100644 --- a/lib/libs/email/preview/Initial Submissions/State/__snapshots__/InitialSubmissionState.test.tsx.snap +++ b/lib/libs/email/preview/new-submission/State/__snapshots__/InitialSubmissionState.test.tsx.snap @@ -49,25 +49,31 @@ exports[`Initial Submission State Email Snapshot Test > renders a AppKCMSEmailPr cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -80,9 +86,6 @@ exports[`Initial Submission State Email Snapshot Test > renders a AppKCMSEmailPr > This response confirms the submission of your 1915(c) Waiver to CMS for review: -
- - OneMAC Logo - +
+ + OneMAC Logo + + +
- - OneMAC Logo - + + OneMAC Logo + + +
- - OneMAC Logo - +
+ + OneMAC Logo + + +
- - OneMAC Logo - +
+ + OneMAC Logo + + +
- - OneMAC Logo - + + OneMAC Logo + + +
- - OneMAC Logo - +
+ + OneMAC Logo + + +
- - OneMAC Logo - +
+ + OneMAC Logo + + +
- - OneMAC Logo - +
+ + OneMAC Logo + + +
- - OneMAC Logo - + + OneMAC Logo + + +
- - OneMAC Logo - +
+ + OneMAC Logo + + +
- - OneMAC Logo - +
+ + OneMAC Logo + + +
- - OneMAC Logo - +
+ + OneMAC Logo + + +
- - OneMAC Logo - +
+ + OneMAC Logo + + +
- - OneMAC Logo - + + OneMAC Logo + + +
- - OneMAC Logo - +
+ + OneMAC Logo + + +
- - OneMAC Logo - +
+ + OneMAC Logo + + +
- - OneMAC Logo - +
+ + OneMAC Logo + + +
- - OneMAC Logo - +
+ + OneMAC Logo + + +
- - OneMAC Logo - +
+ + OneMAC Logo + + +
- - OneMAC Logo - + + OneMAC Logo + + +
- - OneMAC Logo - + + OneMAC Logo + + +
renders a AppKCMSEmailPr

- March 2, 2023 + October 9, 2024

@@ -354,7 +357,7 @@ exports[`Initial Submission State Email Snapshot Test > renders a AppKCMSEmailPr

- Apr 1, 2023 @ 11:59pm ET + Jan 7, 2025 @ 11:59pm ET

@@ -407,11 +410,8 @@ exports[`Initial Submission State Email Snapshot Test > renders a AppKCMSEmailPr This response confirms the receipt of your Waiver request or your response to a Waiver Request for Additional Information (RAI). You can expect a formal response to your submittal to be issued within 90 days, - before Apr 1, 2023 @ 11:59pm ET. + before Jan 7, 2025 @ 11:59pm ET.

-
renders a AppKCMSEmailPr cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -581,9 +587,6 @@ exports[`Initial Submission State Email Snapshot Test > renders a AppKCMSEmailPr > This response confirms the submission of your 1915(c) Waiver to CMS for review: -
- - OneMAC Logo - + + OneMAC Logo + + +
renders a AppKCMSEmailPr

- March 2, 2023 + October 9, 2024

@@ -855,7 +858,7 @@ exports[`Initial Submission State Email Snapshot Test > renders a AppKCMSEmailPr

- Apr 1, 2023 @ 11:59pm ET + Jan 7, 2025 @ 11:59pm ET

@@ -908,11 +911,8 @@ exports[`Initial Submission State Email Snapshot Test > renders a AppKCMSEmailPr This response confirms the receipt of your Waiver request or your response to a Waiver Request for Additional Information (RAI). You can expect a formal response to your submittal to be issued within 90 days, - before Apr 1, 2023 @ 11:59pm ET. + before Jan 7, 2025 @ 11:59pm ET.

-
renders a Chipspa Previe cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -1139,9 +1145,6 @@ exports[`Initial Submission State Email Snapshot Test > renders a Chipspa Previe > This response confirms the submission of your 1915(c) Waiver to CMS for review: -
- - OneMAC Logo - + + OneMAC Logo + + +
renders a Chipspa Previe

- March 2, 2023 + October 9, 2024

@@ -1413,7 +1416,7 @@ exports[`Initial Submission State Email Snapshot Test > renders a Chipspa Previe

- Apr 1, 2023 @ 11:59pm ET + Jan 7, 2025 @ 11:59pm ET

@@ -1466,11 +1469,8 @@ exports[`Initial Submission State Email Snapshot Test > renders a Chipspa Previe This response confirms the receipt of your Waiver request or your response to a Waiver Request for Additional Information (RAI). You can expect a formal response to your submittal to be issued within 90 days, - before Apr 1, 2023 @ 11:59pm ET. + before Jan 7, 2025 @ 11:59pm ET.

-
renders a Chipspa Previe
- CHIP SPA CO-24-1234 Submitted + CHIP SPA CO-CHIP-22-0123 Submitted
-  ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ +  ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏
renders a Chipspa Previe cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -1806,7 +1812,7 @@ exports[`Initial Submission State Email Snapshot Test > renders a Chipspa Previe

- CO-24-1234 + CO-CHIP-22-0123

@@ -1879,9 +1885,6 @@ exports[`Initial Submission State Email Snapshot Test > renders a Chipspa Previe
- - OneMAC Logo - + + OneMAC Logo + + +
-
renders a Chipspa Previe
- CHIP SPA CO-24-1234 Submitted + CHIP SPA CO-CHIP-22-0123 Submitted
-  ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ +  ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏
renders a Chipspa Previe cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -2166,7 +2175,7 @@ exports[`Initial Submission State Email Snapshot Test > renders a Chipspa Previe

- CO-24-1234 + CO-CHIP-22-0123

@@ -2239,9 +2248,6 @@ exports[`Initial Submission State Email Snapshot Test > renders a Chipspa Previe
- - OneMAC Logo - + + OneMAC Logo + + +
-
renders a Medicaid Spa P cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -2416,9 +2428,6 @@ exports[`Initial Submission State Email Snapshot Test > renders a Medicaid Spa P > This response confirms the submission of your 1915(c) Waiver to CMS for review: -
- - OneMAC Logo - + + OneMAC Logo + + +
renders a Medicaid Spa P

- March 2, 2023 + October 9, 2024

@@ -2690,7 +2699,7 @@ exports[`Initial Submission State Email Snapshot Test > renders a Medicaid Spa P

- Apr 1, 2023 @ 11:59pm ET + Jan 7, 2025 @ 11:59pm ET

@@ -2743,11 +2752,8 @@ exports[`Initial Submission State Email Snapshot Test > renders a Medicaid Spa P This response confirms the receipt of your Waiver request or your response to a Waiver Request for Additional Information (RAI). You can expect a formal response to your submittal to be issued within 90 days, - before Apr 1, 2023 @ 11:59pm ET. + before Jan 7, 2025 @ 11:59pm ET.

-
renders a Medicaid Spa P
- CHIP SPA CO-24-1234 Submitted + CHIP SPA CO-CHIP-22-0123 Submitted
-  ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ +  ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏
renders a Medicaid Spa P cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -3083,7 +3095,7 @@ exports[`Initial Submission State Email Snapshot Test > renders a Medicaid Spa P

- CO-24-1234 + CO-CHIP-22-0123

@@ -3156,9 +3168,6 @@ exports[`Initial Submission State Email Snapshot Test > renders a Medicaid Spa P
- - OneMAC Logo - + + OneMAC Logo + + +
-
renders a Medicaid Spa P cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -3480,7 +3495,7 @@ exports[`Initial Submission State Email Snapshot Test > renders a Medicaid Spa P

- March 2, 2023 + October 9, 2024

@@ -3518,7 +3533,7 @@ exports[`Initial Submission State Email Snapshot Test > renders a Medicaid Spa P

- Apr 1, 2023 @ 11:59pm ET + Jan 7, 2025 @ 11:59pm ET

@@ -3567,7 +3582,7 @@ exports[`Initial Submission State Email Snapshot Test > renders a Medicaid Spa P > This response confirms the receipt of your Medicaid State Plan Amendment (SPA). You can expect a formal response to your submittal to be issued - within 90 days, before Apr 1, 2023 @ 11:59pm ET. + within 90 days, before Jan 7, 2025 @ 11:59pm ET.

renders a Medicaid Spa P

- - OneMAC Logo - + + OneMAC Logo + + +
-
renders a Medicaid Spa P cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -3918,7 +3936,7 @@ exports[`Initial Submission State Email Snapshot Test > renders a Medicaid Spa P

- March 2, 2023 + October 9, 2024

@@ -3956,7 +3974,7 @@ exports[`Initial Submission State Email Snapshot Test > renders a Medicaid Spa P

- Apr 1, 2023 @ 11:59pm ET + Jan 7, 2025 @ 11:59pm ET

@@ -4005,7 +4023,7 @@ exports[`Initial Submission State Email Snapshot Test > renders a Medicaid Spa P > This response confirms the receipt of your Medicaid State Plan Amendment (SPA). You can expect a formal response to your submittal to be issued - within 90 days, before Apr 1, 2023 @ 11:59pm ET. + within 90 days, before Jan 7, 2025 @ 11:59pm ET.

renders a Medicaid Spa P

- - OneMAC Logo - + + OneMAC Logo + + +
-
renders a TempExt Previe cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -4208,9 +4229,6 @@ exports[`Initial Submission State Email Snapshot Test > renders a TempExt Previe > This response confirms the submission of your 1915(c) Waiver to CMS for review: -
- - OneMAC Logo - + + OneMAC Logo + + +
renders a TempExt Previe

- March 2, 2023 + October 9, 2024

@@ -4482,7 +4500,7 @@ exports[`Initial Submission State Email Snapshot Test > renders a TempExt Previe

- Apr 1, 2023 @ 11:59pm ET + Jan 7, 2025 @ 11:59pm ET

@@ -4535,11 +4553,8 @@ exports[`Initial Submission State Email Snapshot Test > renders a TempExt Previe This response confirms the receipt of your Waiver request or your response to a Waiver Request for Additional Information (RAI). You can expect a formal response to your submittal to be issued within 90 days, - before Apr 1, 2023 @ 11:59pm ET. + before Jan 7, 2025 @ 11:59pm ET.

-
renders a TempExt Previe
- CHIP SPA CO-24-1234 Submitted + CHIP SPA CO-CHIP-22-0123 Submitted
-  ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ +  ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏
renders a TempExt Previe cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -4875,7 +4896,7 @@ exports[`Initial Submission State Email Snapshot Test > renders a TempExt Previe

- CO-24-1234 + CO-CHIP-22-0123

@@ -4948,9 +4969,6 @@ exports[`Initial Submission State Email Snapshot Test > renders a TempExt Previe
- - OneMAC Logo - + + OneMAC Logo + + +
-
renders a TempExt Previe cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -5272,7 +5296,7 @@ exports[`Initial Submission State Email Snapshot Test > renders a TempExt Previe

- March 2, 2023 + October 9, 2024

@@ -5310,7 +5334,7 @@ exports[`Initial Submission State Email Snapshot Test > renders a TempExt Previe

- Apr 1, 2023 @ 11:59pm ET + Jan 7, 2025 @ 11:59pm ET

@@ -5359,7 +5383,7 @@ exports[`Initial Submission State Email Snapshot Test > renders a TempExt Previe > This response confirms the receipt of your Medicaid State Plan Amendment (SPA). You can expect a formal response to your submittal to be issued - within 90 days, before Apr 1, 2023 @ 11:59pm ET. + within 90 days, before Jan 7, 2025 @ 11:59pm ET.

renders a TempExt Previe

- - OneMAC Logo - + + OneMAC Logo + + +
-
renders a TempExt Previe cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -5737,7 +5764,7 @@ exports[`Initial Submission State Email Snapshot Test > renders a TempExt Previe

- May 31, 2023 @ 11:59pm ET + Jan 7, 2025 @ 11:59pm ET

@@ -5863,9 +5890,6 @@ exports[`Initial Submission State Email Snapshot Test > renders a TempExt Previe
- - OneMAC Logo - + + OneMAC Logo + + +
-
renders a TempExt Previe cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -6216,7 +6246,7 @@ exports[`Initial Submission State Email Snapshot Test > renders a TempExt Previe

- May 31, 2023 @ 11:59pm ET + Jan 7, 2025 @ 11:59pm ET

@@ -6342,9 +6372,6 @@ exports[`Initial Submission State Email Snapshot Test > renders a TempExt Previe
- - OneMAC Logo - + + OneMAC Logo + + +
-
renders a Waiver Capitat cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -6519,9 +6552,6 @@ exports[`Initial Submission State Email Snapshot Test > renders a Waiver Capitat > This response confirms the submission of your 1915(c) Waiver to CMS for review: -
- - OneMAC Logo - + + OneMAC Logo + + +
renders a Waiver Capitat

- March 2, 2023 + October 9, 2024

@@ -6793,7 +6823,7 @@ exports[`Initial Submission State Email Snapshot Test > renders a Waiver Capitat

- Apr 1, 2023 @ 11:59pm ET + Jan 7, 2025 @ 11:59pm ET

@@ -6846,11 +6876,8 @@ exports[`Initial Submission State Email Snapshot Test > renders a Waiver Capitat This response confirms the receipt of your Waiver request or your response to a Waiver Request for Additional Information (RAI). You can expect a formal response to your submittal to be issued within 90 days, - before Apr 1, 2023 @ 11:59pm ET. + before Jan 7, 2025 @ 11:59pm ET.

-
renders a Waiver Capitat
- CHIP SPA CO-24-1234 Submitted + CHIP SPA CO-CHIP-22-0123 Submitted
-  ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ +  ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏
renders a Waiver Capitat cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -7186,7 +7219,7 @@ exports[`Initial Submission State Email Snapshot Test > renders a Waiver Capitat

- CO-24-1234 + CO-CHIP-22-0123

@@ -7259,9 +7292,6 @@ exports[`Initial Submission State Email Snapshot Test > renders a Waiver Capitat
- - OneMAC Logo - + + OneMAC Logo + + +
-
renders a Waiver Capitat cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -7583,7 +7619,7 @@ exports[`Initial Submission State Email Snapshot Test > renders a Waiver Capitat

- March 2, 2023 + October 9, 2024

@@ -7621,7 +7657,7 @@ exports[`Initial Submission State Email Snapshot Test > renders a Waiver Capitat

- Apr 1, 2023 @ 11:59pm ET + Jan 7, 2025 @ 11:59pm ET

@@ -7670,7 +7706,7 @@ exports[`Initial Submission State Email Snapshot Test > renders a Waiver Capitat > This response confirms the receipt of your Medicaid State Plan Amendment (SPA). You can expect a formal response to your submittal to be issued - within 90 days, before Apr 1, 2023 @ 11:59pm ET. + within 90 days, before Jan 7, 2025 @ 11:59pm ET.

renders a Waiver Capitat

- - OneMAC Logo - + + OneMAC Logo + + +
-
renders a Waiver Capitat cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -8048,7 +8087,7 @@ exports[`Initial Submission State Email Snapshot Test > renders a Waiver Capitat

- May 31, 2023 @ 11:59pm ET + Jan 7, 2025 @ 11:59pm ET

@@ -8174,9 +8213,6 @@ exports[`Initial Submission State Email Snapshot Test > renders a Waiver Capitat
- - OneMAC Logo - + + OneMAC Logo + + +
-
renders a Waiver Capitat cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -8536,7 +8578,7 @@ exports[`Initial Submission State Email Snapshot Test > renders a Waiver Capitat

- March 2, 2023 + October 9, 2024

@@ -8574,7 +8616,7 @@ exports[`Initial Submission State Email Snapshot Test > renders a Waiver Capitat

- Apr 1, 2023 @ 11:59pm ET + Jan 7, 2025 @ 11:59pm ET

@@ -8720,7 +8762,7 @@ exports[`Initial Submission State Email Snapshot Test > renders a Waiver Capitat This response confirms the receipt of your Waiver request. You can expect a formal response to your submittal to be issued within 90 days, before - Apr 1, 2023 @ 11:59pm ET + Jan 7, 2025 @ 11:59pm ET .

renders a Waiver Capitat

- - OneMAC Logo - + + OneMAC Logo + + +
-
renders a Waiver Capitat cellpadding="0" cellspacing="0" role="presentation" - style="background-color: rgb(0, 113, 189); padding: 16px;" width="100%" > @@ -9110,7 +9155,7 @@ exports[`Initial Submission State Email Snapshot Test > renders a Waiver Capitat

- March 2, 2023 + October 9, 2024

@@ -9148,7 +9193,7 @@ exports[`Initial Submission State Email Snapshot Test > renders a Waiver Capitat

- Apr 1, 2023 @ 11:59pm ET + Jan 7, 2025 @ 11:59pm ET

@@ -9294,7 +9339,7 @@ exports[`Initial Submission State Email Snapshot Test > renders a Waiver Capitat This response confirms the receipt of your Waiver request. You can expect a formal response to your submittal to be issued within 90 days, before - Apr 1, 2023 @ 11:59pm ET + Jan 7, 2025 @ 11:59pm ET .

renders a Waiver Capitat

- - OneMAC Logo - + + OneMAC Logo + + +
-
@@ -9498,9 +9546,6 @@ exports[`renders a Waiver Contracting Preview Template 1`] = ` > This response confirms the submission of your 1915(c) Waiver to CMS for review: -
- - OneMAC Logo - + + OneMAC Logo + + +
- March 2, 2023 + October 9, 2024

@@ -9772,7 +9817,7 @@ exports[`renders a Waiver Contracting Preview Template 1`] = `

- Apr 1, 2023 @ 11:59pm ET + Jan 7, 2025 @ 11:59pm ET

@@ -9825,11 +9870,8 @@ exports[`renders a Waiver Contracting Preview Template 1`] = ` This response confirms the receipt of your Waiver request or your response to a Waiver Request for Additional Information (RAI). You can expect a formal response to your submittal to be issued within 90 days, - before Apr 1, 2023 @ 11:59pm ET. + before Jan 7, 2025 @ 11:59pm ET.

-
- CHIP SPA CO-24-1234 Submitted + CHIP SPA CO-CHIP-22-0123 Submitted
-  ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ +  ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏
@@ -10165,7 +10213,7 @@ exports[`renders a Waiver Contracting Preview Template 1`] = `

- CO-24-1234 + CO-CHIP-22-0123

@@ -10238,9 +10286,6 @@ exports[`renders a Waiver Contracting Preview Template 1`] = `
- - OneMAC Logo - + + OneMAC Logo + + +
-
@@ -10562,7 +10613,7 @@ exports[`renders a Waiver Contracting Preview Template 1`] = `

- March 2, 2023 + October 9, 2024

@@ -10600,7 +10651,7 @@ exports[`renders a Waiver Contracting Preview Template 1`] = `

- Apr 1, 2023 @ 11:59pm ET + Jan 7, 2025 @ 11:59pm ET

@@ -10649,7 +10700,7 @@ exports[`renders a Waiver Contracting Preview Template 1`] = ` > This response confirms the receipt of your Medicaid State Plan Amendment (SPA). You can expect a formal response to your submittal to be issued - within 90 days, before Apr 1, 2023 @ 11:59pm ET. + within 90 days, before Jan 7, 2025 @ 11:59pm ET.

- - OneMAC Logo - + + OneMAC Logo + + +
-
@@ -11027,7 +11081,7 @@ exports[`renders a Waiver Contracting Preview Template 1`] = `

- May 31, 2023 @ 11:59pm ET + Jan 7, 2025 @ 11:59pm ET

@@ -11153,9 +11207,6 @@ exports[`renders a Waiver Contracting Preview Template 1`] = `
- - OneMAC Logo - + + OneMAC Logo + + +
-
@@ -11515,7 +11572,7 @@ exports[`renders a Waiver Contracting Preview Template 1`] = `

- March 2, 2023 + October 9, 2024

@@ -11553,7 +11610,7 @@ exports[`renders a Waiver Contracting Preview Template 1`] = `

- Apr 1, 2023 @ 11:59pm ET + Jan 7, 2025 @ 11:59pm ET

@@ -11699,7 +11756,7 @@ exports[`renders a Waiver Contracting Preview Template 1`] = ` This response confirms the receipt of your Waiver request. You can expect a formal response to your submittal to be issued within 90 days, before - Apr 1, 2023 @ 11:59pm ET + Jan 7, 2025 @ 11:59pm ET .

- - OneMAC Logo - + + OneMAC Logo + + +
-
@@ -12088,7 +12148,7 @@ exports[`renders a Waiver Contracting Preview Template 1`] = `

- March 2, 2023 + October 9, 2024

@@ -12126,7 +12186,7 @@ exports[`renders a Waiver Contracting Preview Template 1`] = `

- Apr 1, 2023 @ 11:59pm ET + Jan 7, 2025 @ 11:59pm ET

@@ -12230,7 +12290,7 @@ exports[`renders a Waiver Contracting Preview Template 1`] = ` This response confirms the receipt of your Waiver request. You can expect a formal response to your submittal to be issued within 90 days, before - Apr 1, 2023 @ 11:59pm ET + Jan 7, 2025 @ 11:59pm ET .

- - OneMAC Logo - + + OneMAC Logo + + +
-
@@ -12620,7 +12683,7 @@ exports[`renders a Waiver Contracting Preview Template 1`] = `

- March 2, 2023 + October 9, 2024

@@ -12658,7 +12721,7 @@ exports[`renders a Waiver Contracting Preview Template 1`] = `

- Apr 1, 2023 @ 11:59pm ET + Jan 7, 2025 @ 11:59pm ET

@@ -12762,7 +12825,7 @@ exports[`renders a Waiver Contracting Preview Template 1`] = ` This response confirms the receipt of your Waiver request. You can expect a formal response to your submittal to be issued within 90 days, before - Apr 1, 2023 @ 11:59pm ET + Jan 7, 2025 @ 11:59pm ET .

- - OneMAC Logo - + + OneMAC Logo + + +
-
{ return obj; }; -/** - * Returns the `osDomain` and `indexNamespace` env variables. Passing `baseIndex` appends the arg to the `index` variable - * @throws if env variables are not defined, `getDomainAndNamespace` throws error indicating which variable is missing - * @returns - */ -export function getDomainAndNamespace( - baseIndex: T, -): { domain: string; index: `${string}${T}` }; - -export function getDomainAndNamespace(baseIndex?: BaseIndex) { - const domain = process.env.osDomain; - const indexNamespace = process.env.indexNamespace ?? ""; - - if (domain === undefined) { - throw new Error("osDomain is undefined in environment variables"); - } - - if (indexNamespace == "" && process.env.isDev == "true") { - throw new Error("indexName is undefined in environment variables"); - } - - const index = `${indexNamespace}${baseIndex}`; - - return { index, domain }; -} - export async function bulkUpdateDataWrapper( docs: { id: string; [key: string]: unknown }[], baseIndex: BaseIndex, diff --git a/lib/libs/utils.ts b/lib/libs/utils.ts new file mode 100644 index 0000000000..ac43172656 --- /dev/null +++ b/lib/libs/utils.ts @@ -0,0 +1,52 @@ +import { BaseIndex } from "lib/packages/shared-types/opensearch"; + +/** + * Returns the `osDomain` + * @throws if env variables are not defined, `getDomain` throws error indicating if variable is missing + * @returns the value of `osDomain` + */ +export function getDomain(): string; +export function getDomain(): string { + const domain = process.env.osDomain; + + if (domain === undefined) { + throw new Error("process.env.osDomain must be defined"); + } + + return domain; +} + +/** + * Returns the `indexNamespace` env variables. Passing `baseIndex` appends the arg to the `index` variable + * @throws if env variables are not defined, `getNamespace` throws error indicating if variable is missing and + * the environment the application is running on `isDev` + * @returns the value of `indexNamespace` or empty string if not in development + */ +export function getNamespace(baseIndex?: T): `${string}${T}`; +export function getNamespace(baseIndex?: BaseIndex) { + const indexNamespace = process.env.indexNamespace ?? ""; + + if (indexNamespace == "" && process.env.isDev == "true") { + throw new Error("process.env.indexNamespace must be defined"); + } + + const index = `${indexNamespace}${baseIndex}`; + + return index; +} + +/** + * Returns the `osDomain` and `indexNamespace` env variables. Passing `baseIndex` appends the arg to the `index` variable + * @throws if env variables are not defined, `getDomainAndNamespace` throws error indicating which variable is missing + * @returns + */ +export function getDomainAndNamespace( + baseIndex: T, +): { domain: string; index: `${string}${T}` }; + +export function getDomainAndNamespace(baseIndex?: BaseIndex) { + const domain = getDomain(); + const index = getNamespace(baseIndex); + + return { index, domain }; +} diff --git a/lib/packages/shared-types/events/index.ts b/lib/packages/shared-types/events/index.ts index d105594595..bbc3946733 100644 --- a/lib/packages/shared-types/events/index.ts +++ b/lib/packages/shared-types/events/index.ts @@ -58,4 +58,5 @@ export type Events = { RespondToRai: z.infer; UploadSubsequentDocuments: z.infer; WithdrawPackage: z.infer; + WithdrawRai: z.infer; }; From 1cf0a3b7eeb041033809dfe1239598211c6eef72 Mon Sep 17 00:00:00 2001 From: Tiffany Forkner Date: Tue, 7 Jan 2025 15:02:08 -0500 Subject: [PATCH 2/5] fixed import --- lib/lambda/processEmails.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/lambda/processEmails.ts b/lib/lambda/processEmails.ts index d3542cae39..c2adf74828 100644 --- a/lib/lambda/processEmails.ts +++ b/lib/lambda/processEmails.ts @@ -2,7 +2,8 @@ import { SESClient, SendEmailCommand, SendEmailCommandInput } from "@aws-sdk/cli import { EmailAddresses, KafkaEvent, KafkaRecord } from "shared-types"; import { decodeBase64WithUtf8, getSecret } from "shared-utils"; import { Handler } from "aws-lambda"; -import { getEmailTemplates, getAllStateUsers } from "libs/email"; +import { getEmailTemplates } from "libs/email"; +import { getAllStateUsers } from "libs/email/getAllStateUsers"; import * as os from "./../libs/opensearch-lib"; import { EMAIL_CONFIG, getCpocEmail, getSrtEmails } from "libs/email/content/email-components"; import { htmlToText, HtmlToTextOptions } from "html-to-text"; From 05943071fc4dd4c224ffc00faba10b3f29fb6129 Mon Sep 17 00:00:00 2001 From: Benjamin Paige Date: Wed, 8 Jan 2025 01:38:06 -0700 Subject: [PATCH 3/5] update core functionality --- lib/lambda/processEmails.ts | 28 +++- .../email/content/email-components.test.tsx | 146 ++++++++++++------ lib/libs/email/content/email-components.tsx | 27 ++-- lib/libs/utils.ts | 8 +- .../events/new-medicaid-submission.ts | 1 + .../opensearch/main/transforms/seatool.ts | 4 +- lib/packages/shared-utils/testData.ts | 3 +- 7 files changed, 132 insertions(+), 85 deletions(-) diff --git a/lib/lambda/processEmails.ts b/lib/lambda/processEmails.ts index c2adf74828..99b5db57eb 100644 --- a/lib/lambda/processEmails.ts +++ b/lib/lambda/processEmails.ts @@ -9,6 +9,9 @@ import { EMAIL_CONFIG, getCpocEmail, getSrtEmails } from "libs/email/content/ema import { htmlToText, HtmlToTextOptions } from "html-to-text"; import pLimit from "p-limit"; import { SQSClient, SendMessageCommand } from "@aws-sdk/client-sqs"; +import { getDomain, getNamespace } from "lib/libs/utils"; +import { Index } from "lib/packages/shared-types/opensearch"; +import { opensearch } from "shared-types"; class TemporaryError extends Error { constructor(message: string) { @@ -21,7 +24,8 @@ interface ProcessEmailConfig { emailAddressLookupSecretName: string; applicationEndpointUrl: string; osDomain: string; - indexNamespace: string; + mainIndex: Index; + cpocIndex: Index; region: string; DLQ_URL: string; userPoolId: string; @@ -49,23 +53,26 @@ export const handler: Handler = async (event) => { const emailAddressLookupSecretName = process.env.emailAddressLookupSecretName!; const applicationEndpointUrl = process.env.applicationEndpointUrl!; - const osDomain = process.env.osDomain!; - const indexNamespace = process.env.indexNamespace!; + const osDomain = getDomain(); + const mainIndex = getNamespace("main"); + const cpocIndex = getNamespace("cpocs"); const region = process.env.region!; const DLQ_URL = process.env.DLQ_URL!; const userPoolId = process.env.userPoolId!; const configurationSetName = process.env.configurationSetName!; - const isDev = process.env.isDev!; + const isDev = process.env.isDev === "true"; + const config: ProcessEmailConfig = { emailAddressLookupSecretName, applicationEndpointUrl, osDomain: `https://${osDomain}`, - indexNamespace, + mainIndex, + cpocIndex, region, DLQ_URL, userPoolId, configurationSetName, - isDev: isDev === "true", + isDev, }; try { @@ -165,9 +172,14 @@ export async function processAndSendEmails(record: any, id: string, config: Proc const sec = await getSecret(config.emailAddressLookupSecretName); - const item = await os.getItem(config.osDomain, `${config.indexNamespace}main`, id); + const item = await os.getItem(config.osDomain, `${config.mainIndex}`, id); + const cpocItem = (await os.getItem( + config.osDomain, + `${config.cpocIndex}`, + id, + )) as unknown as opensearch.cpocs.ItemResult; - const cpocEmail = getCpocEmail(item); + const cpocEmail = getCpocEmail(cpocItem); const srtEmails = getSrtEmails(item); const emails: EmailAddresses = JSON.parse(sec); diff --git a/lib/libs/email/content/email-components.test.tsx b/lib/libs/email/content/email-components.test.tsx index c0ccca4da4..4776e43d29 100644 --- a/lib/libs/email/content/email-components.test.tsx +++ b/lib/libs/email/content/email-components.test.tsx @@ -1,91 +1,135 @@ import { describe, it, expect } from "vitest"; import { getCpocEmail, getSrtEmails } from "./email-components"; -import { Document } from "shared-types/opensearch/main"; -import { Document as CpocUser } from "shared-types/opensearch/cpocs"; +import * as opensearch from "shared-types/opensearch"; describe("Email Components", () => { describe("getSrtEmails", () => { + const mockValidReviewTeam = [ + { name: "John Doe", email: "john@example.com" }, + { name: "Jane Smith", email: "jane@example.com" }, + ]; + + const createMockItemResult = (reviewTeam?: any): opensearch.main.ItemResult => + ({ + _index: "submissions", + _id: "TEST-123", + _score: 1, + _source: { + reviewTeam, + title: "Test Title", + additionalInformation: null, + authority: "Test Authority", + state: "CO", + }, + found: true, + sort: [1709319909826], + } as opensearch.main.ItemResult); + it("should handle undefined input", () => { expect(getSrtEmails(undefined)).toEqual([]); }); - it("should handle item with direct reviewTeam", () => { - const mockItem = { - reviewTeam: [ - { name: "John Doe", email: "john@example.com" }, - { name: "Jane Smith", email: "jane@example.com" }, - ], - } as Document; - + it("should handle item with valid review team", () => { + const mockItem = createMockItemResult(mockValidReviewTeam); expect(getSrtEmails(mockItem)).toEqual([ "John Doe ", "Jane Smith ", ]); }); - it("should handle item with _source reviewTeam", () => { - const mockItem = { - _source: { - reviewTeam: [ - { name: "John Doe", email: "john@example.com" }, - { name: "Jane Smith", email: "jane@example.com" }, - ], - }, - } as any; + it("should handle item with empty review team", () => { + const mockItem = createMockItemResult([]); + expect(getSrtEmails(mockItem)).toEqual([]); + }); - expect(getSrtEmails(mockItem)).toEqual([ - "John Doe ", - "Jane Smith ", - ]); + it("should handle item with missing review team", () => { + const mockItem = createMockItemResult(undefined); + expect(getSrtEmails(mockItem)).toEqual([]); }); - it("should filter out invalid reviewers", () => { - const mockItem = { - reviewTeam: [ - { name: "John Doe", email: "john@example.com" }, - { name: "", email: "invalid@example.com" }, - { name: "No Email" }, - ], - } as Document; + it("should handle item with invalid review team structure", () => { + const mockItem = createMockItemResult("not-an-array"); + expect(getSrtEmails(mockItem)).toEqual([]); + }); - expect(getSrtEmails(mockItem)).toEqual(["John Doe "]); + it("should handle item with malformed review team members", () => { + const mockItem = createMockItemResult([ + { name: "John Doe" }, // missing email + { email: "jane@example.com" }, // missing name + ]); + expect(getSrtEmails(mockItem)).toEqual([ + "John Doe ", + "undefined ", + ]); }); }); describe("getCpocEmail", () => { + const createMockCpocItemResult = (userData?: any): opensearch.cpocs.ItemResult => ({ + _index: "cpocs", + _id: "CPOC-123", + _score: 1, + _source: { + id: 123, + ...userData, + }, + found: true, + sort: [1709319909826], + }); + it("should handle undefined input", () => { expect(getCpocEmail(undefined)).toEqual([]); }); - it("should handle direct CPOC user data", () => { - const mockUser = { + it("should handle valid CPOC user data", () => { + const mockItem = createMockCpocItemResult({ firstName: "John", lastName: "Doe", email: "john@example.com", - } as CpocUser; - - expect(getCpocEmail(mockUser)).toEqual(["John Doe "]); + }); + expect(getCpocEmail(mockItem)).toEqual(["John Doe "]); }); - it("should handle CPOC user with _source", () => { - const mockUser = { - _source: { - firstName: "John", - lastName: "Doe", - email: "john@example.com", - }, - } as any; + it("should handle missing firstName", () => { + const mockItem = createMockCpocItemResult({ + lastName: "Doe", + email: "john@example.com", + }); + expect(getCpocEmail(mockItem)).toEqual([]); + }); - expect(getCpocEmail(mockUser)).toEqual(["John Doe "]); + it("should handle missing lastName", () => { + const mockItem = createMockCpocItemResult({ + firstName: "John", + email: "john@example.com", + }); + expect(getCpocEmail(mockItem)).toEqual([]); }); - it("should handle invalid CPOC user data", () => { - const mockUser = { + it("should handle missing email", () => { + const mockItem = createMockCpocItemResult({ firstName: "John", - // missing lastName and email - } as any; + lastName: "Doe", + }); + expect(getCpocEmail(mockItem)).toEqual([]); + }); + + it("should handle null values in user data", () => { + const mockItem = createMockCpocItemResult({ + firstName: null, + lastName: "Doe", + email: "john@example.com", + }); + expect(getCpocEmail(mockItem)).toEqual([]); + }); - expect(getCpocEmail(mockUser)).toEqual([]); + it("should handle empty string values", () => { + const mockItem = createMockCpocItemResult({ + firstName: "", + lastName: "Doe", + email: "john@example.com", + }); + expect(getCpocEmail(mockItem)).toEqual([]); }); }); }); diff --git a/lib/libs/email/content/email-components.tsx b/lib/libs/email/content/email-components.tsx index 7917492ab7..74cce76193 100644 --- a/lib/libs/email/content/email-components.tsx +++ b/lib/libs/email/content/email-components.tsx @@ -2,8 +2,8 @@ import { Text, Link, Section, Row, Column, Hr, Heading } from "@react-email/comp import { Attachment, AttachmentTitle, AttachmentKey } from "shared-types"; import { createRef, forwardRef, ReactNode } from "react"; import { styles } from "./email-styles"; -import { Document as CpocUser } from "shared-types/opensearch/cpocs"; -import { Document } from "shared-types/opensearch/main"; +import { ItemResult } from "shared-types/opensearch/main"; +import { ItemResult as CpocItemResult } from "lib/packages/shared-types/opensearch/cpocs"; export const EMAIL_CONFIG = { DEV_EMAIL: "mako.stateuser+dev-to@gmail.com", @@ -295,10 +295,10 @@ const WithdrawRAI = ({ ); -const getCpocEmail = (item: CpocUser | undefined): string[] => { +const getCpocEmail = (item: CpocItemResult | undefined): string[] => { try { if (!item) return []; - const source = (item as any)?._source || item; + const source = item._source; const { firstName, lastName, email } = source; if (!firstName || !lastName || !email) { @@ -308,20 +308,19 @@ const getCpocEmail = (item: CpocUser | undefined): string[] => { return [`${firstName} ${lastName} <${email}>`]; } catch (e) { - console.error("Error getting CPOC email", JSON.stringify(e, null, 2)); - return []; + throw new Error("Error getting CPOC email", e); } }; -const getSrtEmails = (item: Document | undefined): string[] => { +const getSrtEmails = (item: ItemResult | undefined): string[] => { try { if (!item) { console.warn("No item provided to getSrtEmails"); return []; } - const source = (item as any)?._source || item; - const reviewTeam = source?.reviewTeam; + const source = item._source; + const reviewTeam = source.reviewTeam; if (!reviewTeam || !Array.isArray(reviewTeam)) { console.warn("No valid review team found:", { @@ -332,15 +331,7 @@ const getSrtEmails = (item: Document | undefined): string[] => { return []; } - return reviewTeam - .filter((reviewer: any) => { - if (!reviewer?.name || !reviewer?.email) { - console.warn("Invalid reviewer entry:", reviewer); - return false; - } - return true; - }) - .map((reviewer: { name: string; email: string }) => `${reviewer.name} <${reviewer.email}>`); + return reviewTeam.map((reviewer) => `${reviewer.name} <${reviewer.email}>`); } catch (e) { console.error("Error getting SRT emails:", e); return []; diff --git a/lib/libs/utils.ts b/lib/libs/utils.ts index ac43172656..fb7809d806 100644 --- a/lib/libs/utils.ts +++ b/lib/libs/utils.ts @@ -1,4 +1,4 @@ -import { BaseIndex } from "lib/packages/shared-types/opensearch"; +import { BaseIndex, Index } from "lib/packages/shared-types/opensearch"; /** * Returns the `osDomain` @@ -22,7 +22,7 @@ export function getDomain(): string { * the environment the application is running on `isDev` * @returns the value of `indexNamespace` or empty string if not in development */ -export function getNamespace(baseIndex?: T): `${string}${T}`; +export function getNamespace(baseIndex?: T): Index; export function getNamespace(baseIndex?: BaseIndex) { const indexNamespace = process.env.indexNamespace ?? ""; @@ -42,9 +42,9 @@ export function getNamespace(baseIndex?: BaseIndex) { */ export function getDomainAndNamespace( baseIndex: T, -): { domain: string; index: `${string}${T}` }; +): { domain: string; index: Index }; -export function getDomainAndNamespace(baseIndex?: BaseIndex) { +export function getDomainAndNamespace(baseIndex: BaseIndex) { const domain = getDomain(); const index = getNamespace(baseIndex); diff --git a/lib/packages/shared-types/events/new-medicaid-submission.ts b/lib/packages/shared-types/events/new-medicaid-submission.ts index 5cac80daad..9d9c177002 100644 --- a/lib/packages/shared-types/events/new-medicaid-submission.ts +++ b/lib/packages/shared-types/events/new-medicaid-submission.ts @@ -59,6 +59,7 @@ export const baseSchema = z.object({ }), authority: z.string().default("Medicaid SPA"), proposedEffectiveDate: z.number(), + actionType: z.string().default("New"), id: z .string() .min(1, { message: "Required" }) diff --git a/lib/packages/shared-types/opensearch/main/transforms/seatool.ts b/lib/packages/shared-types/opensearch/main/transforms/seatool.ts index 94a4e9265c..7e5f45dff0 100644 --- a/lib/packages/shared-types/opensearch/main/transforms/seatool.ts +++ b/lib/packages/shared-types/opensearch/main/transforms/seatool.ts @@ -24,8 +24,8 @@ function getLeadAnalyst(eventData: SeaTool) { ); if (leadAnalyst) { - leadAnalystOfficerId = leadAnalyst.OFFICER_ID || null; - leadAnalystName = `${leadAnalyst.FIRST_NAME || ""} ${leadAnalyst.LAST_NAME || ""}`; + leadAnalystOfficerId = leadAnalyst.OFFICER_ID; + leadAnalystName = `${leadAnalyst.FIRST_NAME} ${leadAnalyst.LAST_NAME}`; leadAnalystEmail = leadAnalyst.EMAIL || null; } } diff --git a/lib/packages/shared-utils/testData.ts b/lib/packages/shared-utils/testData.ts index 77e56fa3d0..861411fe98 100644 --- a/lib/packages/shared-utils/testData.ts +++ b/lib/packages/shared-utils/testData.ts @@ -1,6 +1,5 @@ import { Authority, opensearch } from "shared-types"; import { OneMacUser } from "ui/src/api"; - export const testStateCognitoUser: OneMacUser = { isCms: false, user: { @@ -81,6 +80,7 @@ export const testItemResult: opensearch.main.ItemResult = { submitterEmail: "george@example.com", submitterName: "George Harrison", origin: "OneMAC", + event: "new-medicaid-submission", changedDate: "2024-03-01T19:05:09.773Z", statusDate: "2024-03-01T00:00:00.000Z", subTypeName: null, @@ -136,7 +136,6 @@ export const testItemResult: opensearch.main.ItemResult = { }, ], raiWithdrawEnabled: false, - actionType: "new-submission", //@ts-expect-error timestamp: "1709319909826", id: "MD-12-3456", From c5ff61bbbde94a4e99396bb564039f018e320048 Mon Sep 17 00:00:00 2001 From: Benjamin Paige Date: Wed, 8 Jan 2025 01:58:00 -0700 Subject: [PATCH 4/5] Update itemExists --- lib/libs/api/package/itemExists.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/libs/api/package/itemExists.ts b/lib/libs/api/package/itemExists.ts index 279934f8c1..1e9cf13176 100644 --- a/lib/libs/api/package/itemExists.ts +++ b/lib/libs/api/package/itemExists.ts @@ -1,6 +1,5 @@ import * as os from "libs/opensearch-lib"; -import { getDomain, getNamespace } from "libs/utils"; -import { BaseIndex } from "lib/packages/shared-types/opensearch"; +import { getDomain } from "libs/utils"; export async function itemExists(params: { id: string; @@ -8,9 +7,7 @@ export async function itemExists(params: { indexNamespace?: string; }): Promise { const domain = params.osDomain || getDomain(); - const index: `${string}${BaseIndex}` = params.indexNamespace - ? `${params.indexNamespace}main` - : getNamespace("main"); + const index = `${params.indexNamespace ?? ""}main` as `${string}main`; const packageResult = await os.getItem(domain, index, params.id); return !!packageResult?._source; From bf4a9328fdab3e6dd3c7bf116e957f0d14368881 Mon Sep 17 00:00:00 2001 From: Benjamin Paige Date: Wed, 8 Jan 2025 02:13:19 -0700 Subject: [PATCH 5/5] Update --- lib/libs/api/package/itemExists.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/libs/api/package/itemExists.ts b/lib/libs/api/package/itemExists.ts index 1e9cf13176..279934f8c1 100644 --- a/lib/libs/api/package/itemExists.ts +++ b/lib/libs/api/package/itemExists.ts @@ -1,5 +1,6 @@ import * as os from "libs/opensearch-lib"; -import { getDomain } from "libs/utils"; +import { getDomain, getNamespace } from "libs/utils"; +import { BaseIndex } from "lib/packages/shared-types/opensearch"; export async function itemExists(params: { id: string; @@ -7,7 +8,9 @@ export async function itemExists(params: { indexNamespace?: string; }): Promise { const domain = params.osDomain || getDomain(); - const index = `${params.indexNamespace ?? ""}main` as `${string}main`; + const index: `${string}${BaseIndex}` = params.indexNamespace + ? `${params.indexNamespace}main` + : getNamespace("main"); const packageResult = await os.getItem(domain, index, params.id); return !!packageResult?._source;