From 179a15dd5e9cc56c3dc7c9d0bd77ef4e915b355a Mon Sep 17 00:00:00 2001 From: Rory Doak Date: Thu, 5 Sep 2024 17:25:09 +0100 Subject: [PATCH 1/5] switch planx-core ref - alter refs in api send/email --- e2e/tests/api-driven/package.json | 2 +- e2e/tests/api-driven/pnpm-lock.yaml | 14 +++---- e2e/tests/ui-driven/package.json | 2 +- e2e/tests/ui-driven/pnpm-lock.yaml | 14 +++---- e2e/tests/ui-driven/src/helpers/context.ts | 48 +++++++++++----------- 5 files changed, 40 insertions(+), 40 deletions(-) diff --git a/e2e/tests/api-driven/package.json b/e2e/tests/api-driven/package.json index 77cd72ac3a..34bcd24ba0 100644 --- a/e2e/tests/api-driven/package.json +++ b/e2e/tests/api-driven/package.json @@ -7,7 +7,7 @@ "packageManager": "pnpm@8.6.6", "dependencies": { "@cucumber/cucumber": "^9.3.0", - "@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#931d4db", + "@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#20df9fc", "axios": "^1.7.4", "dotenv": "^16.3.1", "dotenv-expand": "^10.0.0", diff --git a/e2e/tests/api-driven/pnpm-lock.yaml b/e2e/tests/api-driven/pnpm-lock.yaml index f1195bf03d..97cff461d2 100644 --- a/e2e/tests/api-driven/pnpm-lock.yaml +++ b/e2e/tests/api-driven/pnpm-lock.yaml @@ -9,8 +9,8 @@ dependencies: specifier: ^9.3.0 version: 9.3.0 '@opensystemslab/planx-core': - specifier: git+https://github.com/theopensystemslab/planx-core#931d4db - version: github.com/theopensystemslab/planx-core/931d4db + specifier: git+https://github.com/theopensystemslab/planx-core#20df9fc + version: github.com/theopensystemslab/planx-core/20df9fc axios: specifier: ^1.7.4 version: 1.7.4 @@ -2719,8 +2719,8 @@ packages: engines: {node: '>=10'} dev: false - /type-fest@4.25.0: - resolution: {integrity: sha512-bRkIGlXsnGBRBQRAY56UXBm//9qH4bmJfFvq83gSz41N282df+fjy8ofcEgc1sM8geNt5cl6mC2g9Fht1cs8Aw==} + /type-fest@4.26.0: + resolution: {integrity: sha512-OduNjVJsFbifKb57UqZ2EMP1i4u64Xwow3NYXUtBbD4vIwJdQd4+xl8YDou1dlm4DVrtwT/7Ky8z8WyCULVfxw==} engines: {node: '>=16'} dev: false @@ -2931,8 +2931,8 @@ packages: resolution: {integrity: sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==} dev: false - github.com/theopensystemslab/planx-core/931d4db: - resolution: {tarball: https://codeload.github.com/theopensystemslab/planx-core/tar.gz/931d4db} + github.com/theopensystemslab/planx-core/20df9fc: + resolution: {tarball: https://codeload.github.com/theopensystemslab/planx-core/tar.gz/20df9fc} name: '@opensystemslab/planx-core' version: 1.0.0 prepare: true @@ -2958,7 +2958,7 @@ packages: prettier: 3.3.3 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - type-fest: 4.25.0 + type-fest: 4.26.0 uuid: 10.0.0 zod: 3.23.8 transitivePeerDependencies: diff --git a/e2e/tests/ui-driven/package.json b/e2e/tests/ui-driven/package.json index 89043a4a02..481357c9f5 100644 --- a/e2e/tests/ui-driven/package.json +++ b/e2e/tests/ui-driven/package.json @@ -8,7 +8,7 @@ "postinstall": "./install-dependencies.sh" }, "dependencies": { - "@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#931d4db", + "@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#20df9fc", "axios": "^1.7.4", "dotenv": "^16.3.1", "eslint": "^8.56.0", diff --git a/e2e/tests/ui-driven/pnpm-lock.yaml b/e2e/tests/ui-driven/pnpm-lock.yaml index d7442aa1a9..ffc3915d4f 100644 --- a/e2e/tests/ui-driven/pnpm-lock.yaml +++ b/e2e/tests/ui-driven/pnpm-lock.yaml @@ -6,8 +6,8 @@ settings: dependencies: '@opensystemslab/planx-core': - specifier: git+https://github.com/theopensystemslab/planx-core#931d4db - version: github.com/theopensystemslab/planx-core/931d4db + specifier: git+https://github.com/theopensystemslab/planx-core#20df9fc + version: github.com/theopensystemslab/planx-core/20df9fc axios: specifier: ^1.7.4 version: 1.7.4 @@ -2501,8 +2501,8 @@ packages: engines: {node: '>=12.20'} dev: false - /type-fest@4.25.0: - resolution: {integrity: sha512-bRkIGlXsnGBRBQRAY56UXBm//9qH4bmJfFvq83gSz41N282df+fjy8ofcEgc1sM8geNt5cl6mC2g9Fht1cs8Aw==} + /type-fest@4.26.0: + resolution: {integrity: sha512-OduNjVJsFbifKb57UqZ2EMP1i4u64Xwow3NYXUtBbD4vIwJdQd4+xl8YDou1dlm4DVrtwT/7Ky8z8WyCULVfxw==} engines: {node: '>=16'} dev: false @@ -2669,8 +2669,8 @@ packages: resolution: {integrity: sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==} dev: false - github.com/theopensystemslab/planx-core/931d4db: - resolution: {tarball: https://codeload.github.com/theopensystemslab/planx-core/tar.gz/931d4db} + github.com/theopensystemslab/planx-core/20df9fc: + resolution: {tarball: https://codeload.github.com/theopensystemslab/planx-core/tar.gz/20df9fc} name: '@opensystemslab/planx-core' version: 1.0.0 prepare: true @@ -2696,7 +2696,7 @@ packages: prettier: 3.3.3 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - type-fest: 4.25.0 + type-fest: 4.26.0 uuid: 10.0.0 zod: 3.23.8 transitivePeerDependencies: diff --git a/e2e/tests/ui-driven/src/helpers/context.ts b/e2e/tests/ui-driven/src/helpers/context.ts index 2e60786e54..2cdf41f3ec 100644 --- a/e2e/tests/ui-driven/src/helpers/context.ts +++ b/e2e/tests/ui-driven/src/helpers/context.ts @@ -47,7 +47,7 @@ export const contextDefaults: Context = { }; export async function setUpTestContext( - initialContext: Context, + initialContext: Context ): Promise { const $admin = getCoreDomainClient(); const context: Context = { ...initialContext }; @@ -60,7 +60,7 @@ export async function setUpTestContext( name: context.team.name, settings: { homepage: context.team.settings?.homepage, - submissionEmail: context.team.submissionEmail, + submissionEmail: context.team.settings?.submissionEmail, }, }); } @@ -117,7 +117,7 @@ export function generateAuthenticationToken(userId: string) { "x-hasura-user-id": `${userId}`, }, }, - process.env.JWT_SECRET, + process.env.JWT_SECRET ); } @@ -127,7 +127,7 @@ export function getCoreDomainClient(): CoreDomainClient { const API = process.env.HASURA_GRAPHQL_URL!.replace( "${HASURA_PROXY_PORT}", - process.env.HASURA_PROXY_PORT!, + process.env.HASURA_PROXY_PORT! ); const SECRET = process.env.HASURA_GRAPHQL_ADMIN_SECRET!; return new CoreDomainClient({ @@ -142,7 +142,7 @@ export function getGraphQLClient(): GraphQLClient { export async function findSessionId( adminGQLClient: GraphQLClient, - context, + context ): Promise { // get the flow id which may have a session const flowResponse: { flows: { id: string }[] } = @@ -152,7 +152,7 @@ export async function findSessionId( id } }`, - { slug: context.flow?.slug }, + { slug: context.flow?.slug } ); if (!flowResponse.flows.length || !flowResponse.flows[0].id) { return; @@ -172,7 +172,7 @@ export async function findSessionId( } } `, - { flowId, email: context.user?.email }, + { flowId, email: context.user?.email } ); if (response.lowcal_sessions.length && response.lowcal_sessions[0].id) { return response.lowcal_sessions[0].id; @@ -188,7 +188,7 @@ async function deleteSession(adminGQLClient: GraphQLClient, context) { id } }`, - { sessionId }, + { sessionId } ); } } @@ -201,14 +201,14 @@ async function deleteSession(adminGQLClient: GraphQLClient, context) { id } }`, - { sessionId }, + { sessionId } ); } } async function deletePublishedFlow( adminGQLClient: GraphQLClient, - context: Context, + context: Context ) { if (context.flow?.publishedId) { log(`deleting published flow ${context.flow?.publishedId}`); @@ -218,7 +218,7 @@ async function deletePublishedFlow( id } }`, - { publishedFlowId: context.flow?.publishedId }, + { publishedFlowId: context.flow?.publishedId } ); } } @@ -232,7 +232,7 @@ async function deleteFlow(adminGQLClient: GraphQLClient, context: Context) { id } }`, - { flowId: context.flow?.id }, + { flowId: context.flow?.id } ); } else if (context.flow?.slug) { // try deleting via slug (when cleaning up from a previously failed test) @@ -242,11 +242,11 @@ async function deleteFlow(adminGQLClient: GraphQLClient, context: Context) { id } }`, - { slug: context.flow?.slug }, + { slug: context.flow?.slug } ); if (response.flows.length && response.flows[0].id) { log( - `deleting flow ${context.flow?.slug} flowId: ${response.flows[0].id}`, + `deleting flow ${context.flow?.slug} flowId: ${response.flows[0].id}` ); await adminGQLClient.request( `mutation DeleteTestFlow( $flowId: uuid!) { @@ -254,7 +254,7 @@ async function deleteFlow(adminGQLClient: GraphQLClient, context: Context) { id } }`, - { flowId: response.flows[0].id }, + { flowId: response.flows[0].id } ); } } @@ -269,7 +269,7 @@ async function deleteUser(adminGQLClient: GraphQLClient, context: Context) { id } }`, - { userId: context.user?.id }, + { userId: context.user?.id } ); } else if (context.user?.email) { // try deleting via email (when cleaning up from a previously failed test) @@ -279,11 +279,11 @@ async function deleteUser(adminGQLClient: GraphQLClient, context: Context) { id } }`, - { email: context.user?.email }, + { email: context.user?.email } ); if (response.users.length && response.users[0].id) { log( - `deleting user ${context.user?.email} userId: ${response.users[0].id}`, + `deleting user ${context.user?.email} userId: ${response.users[0].id}` ); await adminGQLClient.request( `mutation DeleteTestUser($userId: Int!) { @@ -291,7 +291,7 @@ async function deleteUser(adminGQLClient: GraphQLClient, context: Context) { id } }`, - { userId: response.users[0].id }, + { userId: response.users[0].id } ); } } @@ -306,7 +306,7 @@ async function deleteTeam(adminGQLClient: GraphQLClient, context: Context) { id } }`, - { teamId: context.team?.id }, + { teamId: context.team?.id } ); } else if (context.team?.slug) { // try deleting via slug (when cleaning up from a previously failed test) @@ -316,11 +316,11 @@ async function deleteTeam(adminGQLClient: GraphQLClient, context: Context) { id } }`, - { slug: context.team?.slug }, + { slug: context.team?.slug } ); if (response.teams.length && response.teams[0].id) { log( - `deleting team ${context.team?.slug} teamId: ${response.teams[0].id}`, + `deleting team ${context.team?.slug} teamId: ${response.teams[0].id}` ); await adminGQLClient.request( `mutation DeleteTestTeam( $teamId: Int!) { @@ -328,7 +328,7 @@ async function deleteTeam(adminGQLClient: GraphQLClient, context: Context) { id } }`, - { teamId: response.teams[0].id }, + { teamId: response.teams[0].id } ); } } @@ -353,7 +353,7 @@ async function setupGovPaySecret($admin: CoreDomainClient, context: Context) { { team_id: context.team.id, staging_govpay_secret: process.env.GOV_UK_PAY_SECRET_E2E, - }, + } ); } catch (error) { throw Error("Failed to setup GovPay secret for E2E team"); From e88856ea2d5c3b6f8a2fdf913817d70c9f174fa4 Mon Sep 17 00:00:00 2001 From: Rory Doak Date: Thu, 5 Sep 2024 17:49:58 +0100 Subject: [PATCH 2/5] database down and api changes --- .../send/downloadApplicationFiles/index.ts | 8 ++--- api.planx.uk/modules/send/email/index.test.ts | 20 ++++++------- api.planx.uk/modules/send/email/index.ts | 21 +++++++------- api.planx.uk/modules/send/email/service.ts | 23 +++++++-------- api.planx.uk/package.json | 2 +- api.planx.uk/pnpm-lock.yaml | 14 ++++----- hasura.planx.uk/metadata/tables.yaml | 29 ------------------- .../down.sql | 3 ++ .../up.sql | 1 + scripts/seed-database/write/teams.sql | 1 - 10 files changed, 46 insertions(+), 76 deletions(-) create mode 100644 hasura.planx.uk/migrations/1725554908326_alter_table_public_teams_drop_column_submission_email/down.sql create mode 100644 hasura.planx.uk/migrations/1725554908326_alter_table_public_teams_drop_column_submission_email/up.sql diff --git a/api.planx.uk/modules/send/downloadApplicationFiles/index.ts b/api.planx.uk/modules/send/downloadApplicationFiles/index.ts index aede2c8369..470ce5b790 100644 --- a/api.planx.uk/modules/send/downloadApplicationFiles/index.ts +++ b/api.planx.uk/modules/send/downloadApplicationFiles/index.ts @@ -5,7 +5,7 @@ import { getSessionData, getTeamEmailSettings } from "../email/service.js"; export async function downloadApplicationFiles( req: Request, res: Response, - next: NextFunction, + next: NextFunction ) { const sessionId: string = req.params?.sessionId; if (!sessionId || !req.query?.email || !req.query?.localAuthority) { @@ -17,10 +17,10 @@ export async function downloadApplicationFiles( try { // Confirm that the provided email matches the stored team settings for the provided localAuthority - const { notifyPersonalisation } = await getTeamEmailSettings( - req.query.localAuthority as string, + const { teamSettings } = await getTeamEmailSettings( + req.query.localAuthority as string ); - if (notifyPersonalisation.sendToEmail !== req.query.email) { + if (teamSettings.submissionEmail !== req.query.email) { return next({ status: 403, message: diff --git a/api.planx.uk/modules/send/email/index.test.ts b/api.planx.uk/modules/send/email/index.test.ts index 973ff9cbbc..c7db8d17f6 100644 --- a/api.planx.uk/modules/send/email/index.test.ts +++ b/api.planx.uk/modules/send/email/index.test.ts @@ -49,9 +49,9 @@ describe(`sending an application by email to a planning office`, () => { data: { teams: [ { - notifyPersonalisation: { + teamSettings: { emailReplyToId: "abc123", - sendToEmail: "planning.office.example@council.gov.uk", + submissionEmail: "planning.office.example@council.gov.uk", }, }, ], @@ -154,9 +154,9 @@ describe(`sending an application by email to a planning office`, () => { data: { teams: [ { - notifyPersonalisation: { + teamSettings: { emailReplyToId: "abc123", - sendToEmail: null, + submissionEmail: null, }, }, ], @@ -206,8 +206,8 @@ describe(`downloading application data received by email`, () => { data: { teams: [ { - notifyPersonalisation: { - sendToEmail: "planning.office.example@council.gov.uk", + teamSettings: { + submissionEmail: "planning.office.example@council.gov.uk", }, }, ], @@ -239,7 +239,7 @@ describe(`downloading application data received by email`, () => { it("errors if email query param does not match the stored database value for this team", async () => { await supertest(app) .get( - "/download-application-files/123?email=wrong@council.gov.uk&localAuthority=southwark", + "/download-application-files/123?email=wrong@council.gov.uk&localAuthority=southwark" ) .expect(403) .then((res) => { @@ -261,12 +261,12 @@ describe(`downloading application data received by email`, () => { await supertest(app) .get( - "/download-application-files/456?email=planning.office.example@council.gov.uk&localAuthority=southwark", + "/download-application-files/456?email=planning.office.example@council.gov.uk&localAuthority=southwark" ) .expect(400) .then((res) => { expect(res.body.error).toMatch( - /Failed to find session data for this sessionId/, + /Failed to find session data for this sessionId/ ); }); }); @@ -274,7 +274,7 @@ describe(`downloading application data received by email`, () => { it("calls addTemplateFilesToZip()", async () => { await supertest(app) .get( - "/download-application-files/123?email=planning.office.example@council.gov.uk&localAuthority=southwark", + "/download-application-files/123?email=planning.office.example@council.gov.uk&localAuthority=southwark" ) .expect(200) .then((_res) => { diff --git a/api.planx.uk/modules/send/email/index.ts b/api.planx.uk/modules/send/email/index.ts index 4d36063ad3..8d779a2e1b 100644 --- a/api.planx.uk/modules/send/email/index.ts +++ b/api.planx.uk/modules/send/email/index.ts @@ -11,7 +11,7 @@ import { export async function sendToEmail( req: Request, res: Response, - next: NextFunction, + next: NextFunction ) { req.setTimeout(120 * 1000); // Temporary bump to address submission timeouts @@ -28,9 +28,8 @@ export async function sendToEmail( try { // Confirm this local authority (aka team) has an email configured in teams.submission_email - const { notifyPersonalisation } = - await getTeamEmailSettings(localAuthority); - if (!notifyPersonalisation.sendToEmail) { + const { teamSettings } = await getTeamEmailSettings(localAuthority); + if (!teamSettings.submissionEmail) { return next({ status: 400, message: `Send to email is not enabled for this local authority (${localAuthority})`, @@ -47,16 +46,16 @@ export async function sendToEmail( serviceName: flowName, sessionId: payload.sessionId, applicantEmail: email, - downloadLink: `${process.env.API_URL_EXT}/download-application-files/${payload.sessionId}?email=${notifyPersonalisation.sendToEmail}&localAuthority=${localAuthority}`, - ...notifyPersonalisation, + downloadLink: `${process.env.API_URL_EXT}/download-application-files/${payload.sessionId}?email=${teamSettings.submissionEmail}&localAuthority=${localAuthority}`, + ...teamSettings, }, }; // Send the email const response = await sendEmail( "submit", - notifyPersonalisation.sendToEmail, - config, + teamSettings.submissionEmail, + config ); // Mark session as submitted so that reminder and expiry emails are not triggered @@ -66,14 +65,14 @@ export async function sendToEmail( insertAuditEntry( payload.sessionId, localAuthority, - notifyPersonalisation.sendToEmail, + teamSettings.submissionEmail, config, - response, + response ); return res.status(200).send({ message: `Successfully sent to email`, - inbox: notifyPersonalisation.sendToEmail, + inbox: teamSettings.submissionEmail, govuk_notify_template: "Submit", }); } catch (error) { diff --git a/api.planx.uk/modules/send/email/service.ts b/api.planx.uk/modules/send/email/service.ts index 2a5454bc0c..d728fbd435 100644 --- a/api.planx.uk/modules/send/email/service.ts +++ b/api.planx.uk/modules/send/email/service.ts @@ -1,14 +1,11 @@ import { gql } from "graphql-request"; import { $api } from "../../../client/index.js"; -import { - NotifyPersonalisation, - Session, -} from "@opensystemslab/planx-core/types"; +import { Session, TeamContactSettings } from "@opensystemslab/planx-core/types"; import { EmailSubmissionNotifyConfig } from "../../../types.js"; interface GetTeamEmailSettings { teams: { - notifyPersonalisation: NotifyPersonalisation & { sendToEmail: string }; + teamSettings: TeamContactSettings; }[]; } @@ -17,19 +14,19 @@ export async function getTeamEmailSettings(localAuthority: string) { gql` query GetTeamEmailSettings($slug: String) { teams(where: { slug: { _eq: $slug } }) { - notifyPersonalisation: team_settings { + teamSettings: team_settings { helpEmail: help_email helpPhone: help_phone emailReplyToId: email_reply_to_id helpOpeningHours: help_opening_hours - sendToEmail: submission_email + submissionEmail: submission_email } } } `, { slug: localAuthority, - }, + } ); return response?.teams[0]; @@ -50,7 +47,7 @@ export async function getSessionData(sessionId: string) { `, { id: sessionId, - }, + } ); return response?.session?.data; @@ -81,12 +78,12 @@ export async function getSessionEmailDetailsById(sessionId: string) { `, { id: sessionId, - }, + } ); if (!response.session) throw Error( - `Cannot find session ${sessionId} in GetSessionEmailDetails query`, + `Cannot find session ${sessionId} in GetSessionEmailDetails query` ); return response.session; @@ -106,7 +103,7 @@ export async function insertAuditEntry( sendEmailResponse: { message: string; expiryDate?: string; - }, + } ) { const response = await $api.client.request( gql` @@ -136,7 +133,7 @@ export async function insertAuditEntry( recipient: recipient, request: notifyRequest, response: sendEmailResponse, - }, + } ); return response?.application?.id; diff --git a/api.planx.uk/package.json b/api.planx.uk/package.json index a5c53d3fcd..de91d36d50 100644 --- a/api.planx.uk/package.json +++ b/api.planx.uk/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "@airbrake/node": "^2.1.8", - "@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#931d4db", + "@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#20df9fc", "@types/isomorphic-fetch": "^0.0.36", "adm-zip": "^0.5.10", "aws-sdk": "^2.1467.0", diff --git a/api.planx.uk/pnpm-lock.yaml b/api.planx.uk/pnpm-lock.yaml index e75edf6d12..e79a2fee77 100644 --- a/api.planx.uk/pnpm-lock.yaml +++ b/api.planx.uk/pnpm-lock.yaml @@ -14,8 +14,8 @@ dependencies: specifier: ^2.1.8 version: 2.1.8 '@opensystemslab/planx-core': - specifier: git+https://github.com/theopensystemslab/planx-core#931d4db - version: github.com/theopensystemslab/planx-core/931d4db + specifier: git+https://github.com/theopensystemslab/planx-core#20df9fc + version: github.com/theopensystemslab/planx-core/20df9fc '@types/isomorphic-fetch': specifier: ^0.0.36 version: 0.0.36 @@ -5902,8 +5902,8 @@ packages: engines: {node: '>=16'} dev: false - /type-fest@4.25.0: - resolution: {integrity: sha512-bRkIGlXsnGBRBQRAY56UXBm//9qH4bmJfFvq83gSz41N282df+fjy8ofcEgc1sM8geNt5cl6mC2g9Fht1cs8Aw==} + /type-fest@4.26.0: + resolution: {integrity: sha512-OduNjVJsFbifKb57UqZ2EMP1i4u64Xwow3NYXUtBbD4vIwJdQd4+xl8YDou1dlm4DVrtwT/7Ky8z8WyCULVfxw==} engines: {node: '>=16'} dev: false @@ -6360,8 +6360,8 @@ packages: resolution: {integrity: sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==} dev: false - github.com/theopensystemslab/planx-core/931d4db: - resolution: {tarball: https://codeload.github.com/theopensystemslab/planx-core/tar.gz/931d4db} + github.com/theopensystemslab/planx-core/20df9fc: + resolution: {tarball: https://codeload.github.com/theopensystemslab/planx-core/tar.gz/20df9fc} name: '@opensystemslab/planx-core' version: 1.0.0 prepare: true @@ -6387,7 +6387,7 @@ packages: prettier: 3.3.3 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - type-fest: 4.25.0 + type-fest: 4.26.0 uuid: 10.0.0 zod: 3.23.8 transitivePeerDependencies: diff --git a/hasura.planx.uk/metadata/tables.yaml b/hasura.planx.uk/metadata/tables.yaml index cd7a62e911..f3e3a34e85 100644 --- a/hasura.planx.uk/metadata/tables.yaml +++ b/hasura.planx.uk/metadata/tables.yaml @@ -2055,7 +2055,6 @@ - notify_personalisation - settings - slug - - submission_email - updated_at select_permissions: - role: api @@ -2070,7 +2069,6 @@ - reference_code - settings - slug - - submission_email - updated_at computed_fields: - boundary_bbox @@ -2130,35 +2128,8 @@ - notify_personalisation - settings - slug - - submission_email filter: {} check: null -- table: - name: teams_summary - schema: public - select_permissions: - - role: platformAdmin - permission: - columns: - - govpay_enabled - - planning_data_enabled - - id - - govnotify_personalisation - - action_colour - - article_4s_enabled - - bops_submission_url - - favicon - - homepage - - link_colour - - logo - - name - - primary_colour - - reference_code - - send_to_email_address - - slug - - subdomain - filter: {} - comment: "" - table: name: uniform_applications schema: public diff --git a/hasura.planx.uk/migrations/1725554908326_alter_table_public_teams_drop_column_submission_email/down.sql b/hasura.planx.uk/migrations/1725554908326_alter_table_public_teams_drop_column_submission_email/down.sql new file mode 100644 index 0000000000..bf193e696b --- /dev/null +++ b/hasura.planx.uk/migrations/1725554908326_alter_table_public_teams_drop_column_submission_email/down.sql @@ -0,0 +1,3 @@ +comment on column "public"."teams"."submission_email" is E'Teams are core way we organise `flows` and configure settings like theme colour, logo, and contact info; name usually reflects a council but not exclusively'; +alter table "public"."teams" alter column "submission_email" drop not null; +alter table "public"."teams" add column "submission_email" text; diff --git a/hasura.planx.uk/migrations/1725554908326_alter_table_public_teams_drop_column_submission_email/up.sql b/hasura.planx.uk/migrations/1725554908326_alter_table_public_teams_drop_column_submission_email/up.sql new file mode 100644 index 0000000000..b9b844b49c --- /dev/null +++ b/hasura.planx.uk/migrations/1725554908326_alter_table_public_teams_drop_column_submission_email/up.sql @@ -0,0 +1 @@ +alter table "public"."teams" drop column "submission_email" cascade; diff --git a/scripts/seed-database/write/teams.sql b/scripts/seed-database/write/teams.sql index 7cc3c73dde..5a8e6bc5dc 100644 --- a/scripts/seed-database/write/teams.sql +++ b/scripts/seed-database/write/teams.sql @@ -8,7 +8,6 @@ CREATE TEMPORARY TABLE sync_teams ( settings jsonb, notify_personalisation jsonb, domain text, - submission_email text, boundary jsonb, reference_code text ); From 90459dedd90834d53625ba6e13acd5acae5c669a Mon Sep 17 00:00:00 2001 From: Rory Doak Date: Thu, 5 Sep 2024 17:54:33 +0100 Subject: [PATCH 3/5] Revert "database down and api changes" This reverts commit a7ede195c28d063f6f111a90362378dccda8c1c5. --- hasura.planx.uk/metadata/tables.yaml | 29 +++++++++++++++++++ .../down.sql | 3 -- .../up.sql | 1 - scripts/seed-database/write/teams.sql | 1 + 4 files changed, 30 insertions(+), 4 deletions(-) delete mode 100644 hasura.planx.uk/migrations/1725554908326_alter_table_public_teams_drop_column_submission_email/down.sql delete mode 100644 hasura.planx.uk/migrations/1725554908326_alter_table_public_teams_drop_column_submission_email/up.sql diff --git a/hasura.planx.uk/metadata/tables.yaml b/hasura.planx.uk/metadata/tables.yaml index f3e3a34e85..cd7a62e911 100644 --- a/hasura.planx.uk/metadata/tables.yaml +++ b/hasura.planx.uk/metadata/tables.yaml @@ -2055,6 +2055,7 @@ - notify_personalisation - settings - slug + - submission_email - updated_at select_permissions: - role: api @@ -2069,6 +2070,7 @@ - reference_code - settings - slug + - submission_email - updated_at computed_fields: - boundary_bbox @@ -2128,8 +2130,35 @@ - notify_personalisation - settings - slug + - submission_email filter: {} check: null +- table: + name: teams_summary + schema: public + select_permissions: + - role: platformAdmin + permission: + columns: + - govpay_enabled + - planning_data_enabled + - id + - govnotify_personalisation + - action_colour + - article_4s_enabled + - bops_submission_url + - favicon + - homepage + - link_colour + - logo + - name + - primary_colour + - reference_code + - send_to_email_address + - slug + - subdomain + filter: {} + comment: "" - table: name: uniform_applications schema: public diff --git a/hasura.planx.uk/migrations/1725554908326_alter_table_public_teams_drop_column_submission_email/down.sql b/hasura.planx.uk/migrations/1725554908326_alter_table_public_teams_drop_column_submission_email/down.sql deleted file mode 100644 index bf193e696b..0000000000 --- a/hasura.planx.uk/migrations/1725554908326_alter_table_public_teams_drop_column_submission_email/down.sql +++ /dev/null @@ -1,3 +0,0 @@ -comment on column "public"."teams"."submission_email" is E'Teams are core way we organise `flows` and configure settings like theme colour, logo, and contact info; name usually reflects a council but not exclusively'; -alter table "public"."teams" alter column "submission_email" drop not null; -alter table "public"."teams" add column "submission_email" text; diff --git a/hasura.planx.uk/migrations/1725554908326_alter_table_public_teams_drop_column_submission_email/up.sql b/hasura.planx.uk/migrations/1725554908326_alter_table_public_teams_drop_column_submission_email/up.sql deleted file mode 100644 index b9b844b49c..0000000000 --- a/hasura.planx.uk/migrations/1725554908326_alter_table_public_teams_drop_column_submission_email/up.sql +++ /dev/null @@ -1 +0,0 @@ -alter table "public"."teams" drop column "submission_email" cascade; diff --git a/scripts/seed-database/write/teams.sql b/scripts/seed-database/write/teams.sql index 5a8e6bc5dc..7cc3c73dde 100644 --- a/scripts/seed-database/write/teams.sql +++ b/scripts/seed-database/write/teams.sql @@ -8,6 +8,7 @@ CREATE TEMPORARY TABLE sync_teams ( settings jsonb, notify_personalisation jsonb, domain text, + submission_email text, boundary jsonb, reference_code text ); From 33a91586b608d36cedee1a0f27a226137cb06080 Mon Sep 17 00:00:00 2001 From: Rory Doak Date: Thu, 5 Sep 2024 17:57:56 +0100 Subject: [PATCH 4/5] lint fix --- .../send/downloadApplicationFiles/index.ts | 4 +- api.planx.uk/modules/send/email/index.test.ts | 8 ++-- api.planx.uk/modules/send/email/index.ts | 6 +-- api.planx.uk/modules/send/email/service.ts | 12 ++--- e2e/tests/ui-driven/src/helpers/context.ts | 46 +++++++++---------- 5 files changed, 38 insertions(+), 38 deletions(-) diff --git a/api.planx.uk/modules/send/downloadApplicationFiles/index.ts b/api.planx.uk/modules/send/downloadApplicationFiles/index.ts index 470ce5b790..2c3e0f8a68 100644 --- a/api.planx.uk/modules/send/downloadApplicationFiles/index.ts +++ b/api.planx.uk/modules/send/downloadApplicationFiles/index.ts @@ -5,7 +5,7 @@ import { getSessionData, getTeamEmailSettings } from "../email/service.js"; export async function downloadApplicationFiles( req: Request, res: Response, - next: NextFunction + next: NextFunction, ) { const sessionId: string = req.params?.sessionId; if (!sessionId || !req.query?.email || !req.query?.localAuthority) { @@ -18,7 +18,7 @@ export async function downloadApplicationFiles( try { // Confirm that the provided email matches the stored team settings for the provided localAuthority const { teamSettings } = await getTeamEmailSettings( - req.query.localAuthority as string + req.query.localAuthority as string, ); if (teamSettings.submissionEmail !== req.query.email) { return next({ diff --git a/api.planx.uk/modules/send/email/index.test.ts b/api.planx.uk/modules/send/email/index.test.ts index c7db8d17f6..74c21f805a 100644 --- a/api.planx.uk/modules/send/email/index.test.ts +++ b/api.planx.uk/modules/send/email/index.test.ts @@ -239,7 +239,7 @@ describe(`downloading application data received by email`, () => { it("errors if email query param does not match the stored database value for this team", async () => { await supertest(app) .get( - "/download-application-files/123?email=wrong@council.gov.uk&localAuthority=southwark" + "/download-application-files/123?email=wrong@council.gov.uk&localAuthority=southwark", ) .expect(403) .then((res) => { @@ -261,12 +261,12 @@ describe(`downloading application data received by email`, () => { await supertest(app) .get( - "/download-application-files/456?email=planning.office.example@council.gov.uk&localAuthority=southwark" + "/download-application-files/456?email=planning.office.example@council.gov.uk&localAuthority=southwark", ) .expect(400) .then((res) => { expect(res.body.error).toMatch( - /Failed to find session data for this sessionId/ + /Failed to find session data for this sessionId/, ); }); }); @@ -274,7 +274,7 @@ describe(`downloading application data received by email`, () => { it("calls addTemplateFilesToZip()", async () => { await supertest(app) .get( - "/download-application-files/123?email=planning.office.example@council.gov.uk&localAuthority=southwark" + "/download-application-files/123?email=planning.office.example@council.gov.uk&localAuthority=southwark", ) .expect(200) .then((_res) => { diff --git a/api.planx.uk/modules/send/email/index.ts b/api.planx.uk/modules/send/email/index.ts index 8d779a2e1b..cd19e6bffe 100644 --- a/api.planx.uk/modules/send/email/index.ts +++ b/api.planx.uk/modules/send/email/index.ts @@ -11,7 +11,7 @@ import { export async function sendToEmail( req: Request, res: Response, - next: NextFunction + next: NextFunction, ) { req.setTimeout(120 * 1000); // Temporary bump to address submission timeouts @@ -55,7 +55,7 @@ export async function sendToEmail( const response = await sendEmail( "submit", teamSettings.submissionEmail, - config + config, ); // Mark session as submitted so that reminder and expiry emails are not triggered @@ -67,7 +67,7 @@ export async function sendToEmail( localAuthority, teamSettings.submissionEmail, config, - response + response, ); return res.status(200).send({ diff --git a/api.planx.uk/modules/send/email/service.ts b/api.planx.uk/modules/send/email/service.ts index d728fbd435..878d165856 100644 --- a/api.planx.uk/modules/send/email/service.ts +++ b/api.planx.uk/modules/send/email/service.ts @@ -26,7 +26,7 @@ export async function getTeamEmailSettings(localAuthority: string) { `, { slug: localAuthority, - } + }, ); return response?.teams[0]; @@ -47,7 +47,7 @@ export async function getSessionData(sessionId: string) { `, { id: sessionId, - } + }, ); return response?.session?.data; @@ -78,12 +78,12 @@ export async function getSessionEmailDetailsById(sessionId: string) { `, { id: sessionId, - } + }, ); if (!response.session) throw Error( - `Cannot find session ${sessionId} in GetSessionEmailDetails query` + `Cannot find session ${sessionId} in GetSessionEmailDetails query`, ); return response.session; @@ -103,7 +103,7 @@ export async function insertAuditEntry( sendEmailResponse: { message: string; expiryDate?: string; - } + }, ) { const response = await $api.client.request( gql` @@ -133,7 +133,7 @@ export async function insertAuditEntry( recipient: recipient, request: notifyRequest, response: sendEmailResponse, - } + }, ); return response?.application?.id; diff --git a/e2e/tests/ui-driven/src/helpers/context.ts b/e2e/tests/ui-driven/src/helpers/context.ts index 2cdf41f3ec..c94783189e 100644 --- a/e2e/tests/ui-driven/src/helpers/context.ts +++ b/e2e/tests/ui-driven/src/helpers/context.ts @@ -47,7 +47,7 @@ export const contextDefaults: Context = { }; export async function setUpTestContext( - initialContext: Context + initialContext: Context, ): Promise { const $admin = getCoreDomainClient(); const context: Context = { ...initialContext }; @@ -117,7 +117,7 @@ export function generateAuthenticationToken(userId: string) { "x-hasura-user-id": `${userId}`, }, }, - process.env.JWT_SECRET + process.env.JWT_SECRET, ); } @@ -127,7 +127,7 @@ export function getCoreDomainClient(): CoreDomainClient { const API = process.env.HASURA_GRAPHQL_URL!.replace( "${HASURA_PROXY_PORT}", - process.env.HASURA_PROXY_PORT! + process.env.HASURA_PROXY_PORT!, ); const SECRET = process.env.HASURA_GRAPHQL_ADMIN_SECRET!; return new CoreDomainClient({ @@ -142,7 +142,7 @@ export function getGraphQLClient(): GraphQLClient { export async function findSessionId( adminGQLClient: GraphQLClient, - context + context, ): Promise { // get the flow id which may have a session const flowResponse: { flows: { id: string }[] } = @@ -152,7 +152,7 @@ export async function findSessionId( id } }`, - { slug: context.flow?.slug } + { slug: context.flow?.slug }, ); if (!flowResponse.flows.length || !flowResponse.flows[0].id) { return; @@ -172,7 +172,7 @@ export async function findSessionId( } } `, - { flowId, email: context.user?.email } + { flowId, email: context.user?.email }, ); if (response.lowcal_sessions.length && response.lowcal_sessions[0].id) { return response.lowcal_sessions[0].id; @@ -188,7 +188,7 @@ async function deleteSession(adminGQLClient: GraphQLClient, context) { id } }`, - { sessionId } + { sessionId }, ); } } @@ -201,14 +201,14 @@ async function deleteSession(adminGQLClient: GraphQLClient, context) { id } }`, - { sessionId } + { sessionId }, ); } } async function deletePublishedFlow( adminGQLClient: GraphQLClient, - context: Context + context: Context, ) { if (context.flow?.publishedId) { log(`deleting published flow ${context.flow?.publishedId}`); @@ -218,7 +218,7 @@ async function deletePublishedFlow( id } }`, - { publishedFlowId: context.flow?.publishedId } + { publishedFlowId: context.flow?.publishedId }, ); } } @@ -232,7 +232,7 @@ async function deleteFlow(adminGQLClient: GraphQLClient, context: Context) { id } }`, - { flowId: context.flow?.id } + { flowId: context.flow?.id }, ); } else if (context.flow?.slug) { // try deleting via slug (when cleaning up from a previously failed test) @@ -242,11 +242,11 @@ async function deleteFlow(adminGQLClient: GraphQLClient, context: Context) { id } }`, - { slug: context.flow?.slug } + { slug: context.flow?.slug }, ); if (response.flows.length && response.flows[0].id) { log( - `deleting flow ${context.flow?.slug} flowId: ${response.flows[0].id}` + `deleting flow ${context.flow?.slug} flowId: ${response.flows[0].id}`, ); await adminGQLClient.request( `mutation DeleteTestFlow( $flowId: uuid!) { @@ -254,7 +254,7 @@ async function deleteFlow(adminGQLClient: GraphQLClient, context: Context) { id } }`, - { flowId: response.flows[0].id } + { flowId: response.flows[0].id }, ); } } @@ -269,7 +269,7 @@ async function deleteUser(adminGQLClient: GraphQLClient, context: Context) { id } }`, - { userId: context.user?.id } + { userId: context.user?.id }, ); } else if (context.user?.email) { // try deleting via email (when cleaning up from a previously failed test) @@ -279,11 +279,11 @@ async function deleteUser(adminGQLClient: GraphQLClient, context: Context) { id } }`, - { email: context.user?.email } + { email: context.user?.email }, ); if (response.users.length && response.users[0].id) { log( - `deleting user ${context.user?.email} userId: ${response.users[0].id}` + `deleting user ${context.user?.email} userId: ${response.users[0].id}`, ); await adminGQLClient.request( `mutation DeleteTestUser($userId: Int!) { @@ -291,7 +291,7 @@ async function deleteUser(adminGQLClient: GraphQLClient, context: Context) { id } }`, - { userId: response.users[0].id } + { userId: response.users[0].id }, ); } } @@ -306,7 +306,7 @@ async function deleteTeam(adminGQLClient: GraphQLClient, context: Context) { id } }`, - { teamId: context.team?.id } + { teamId: context.team?.id }, ); } else if (context.team?.slug) { // try deleting via slug (when cleaning up from a previously failed test) @@ -316,11 +316,11 @@ async function deleteTeam(adminGQLClient: GraphQLClient, context: Context) { id } }`, - { slug: context.team?.slug } + { slug: context.team?.slug }, ); if (response.teams.length && response.teams[0].id) { log( - `deleting team ${context.team?.slug} teamId: ${response.teams[0].id}` + `deleting team ${context.team?.slug} teamId: ${response.teams[0].id}`, ); await adminGQLClient.request( `mutation DeleteTestTeam( $teamId: Int!) { @@ -328,7 +328,7 @@ async function deleteTeam(adminGQLClient: GraphQLClient, context: Context) { id } }`, - { teamId: response.teams[0].id } + { teamId: response.teams[0].id }, ); } } @@ -353,7 +353,7 @@ async function setupGovPaySecret($admin: CoreDomainClient, context: Context) { { team_id: context.team.id, staging_govpay_secret: process.env.GOV_UK_PAY_SECRET_E2E, - } + }, ); } catch (error) { throw Error("Failed to setup GovPay secret for E2E team"); From 0510c864e115744d24d7b58e06520a3c156b0a3c Mon Sep 17 00:00:00 2001 From: Rory Doak Date: Thu, 5 Sep 2024 18:13:01 +0100 Subject: [PATCH 5/5] switch planx-core ref and found bug in editor types --- api.planx.uk/package.json | 2 +- api.planx.uk/pnpm-lock.yaml | 8 ++++---- e2e/tests/api-driven/package.json | 2 +- e2e/tests/api-driven/pnpm-lock.yaml | 8 ++++---- e2e/tests/ui-driven/package.json | 2 +- e2e/tests/ui-driven/pnpm-lock.yaml | 8 ++++---- editor.planx.uk/package.json | 2 +- editor.planx.uk/pnpm-lock.yaml | 16 ++++++++-------- editor.planx.uk/src/types.ts | 4 ++-- 9 files changed, 26 insertions(+), 26 deletions(-) diff --git a/api.planx.uk/package.json b/api.planx.uk/package.json index de91d36d50..297ada5bc9 100644 --- a/api.planx.uk/package.json +++ b/api.planx.uk/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "@airbrake/node": "^2.1.8", - "@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#20df9fc", + "@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#ec52620", "@types/isomorphic-fetch": "^0.0.36", "adm-zip": "^0.5.10", "aws-sdk": "^2.1467.0", diff --git a/api.planx.uk/pnpm-lock.yaml b/api.planx.uk/pnpm-lock.yaml index e79a2fee77..e01b020420 100644 --- a/api.planx.uk/pnpm-lock.yaml +++ b/api.planx.uk/pnpm-lock.yaml @@ -14,8 +14,8 @@ dependencies: specifier: ^2.1.8 version: 2.1.8 '@opensystemslab/planx-core': - specifier: git+https://github.com/theopensystemslab/planx-core#20df9fc - version: github.com/theopensystemslab/planx-core/20df9fc + specifier: git+https://github.com/theopensystemslab/planx-core#ec52620 + version: github.com/theopensystemslab/planx-core/ec52620 '@types/isomorphic-fetch': specifier: ^0.0.36 version: 0.0.36 @@ -6360,8 +6360,8 @@ packages: resolution: {integrity: sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==} dev: false - github.com/theopensystemslab/planx-core/20df9fc: - resolution: {tarball: https://codeload.github.com/theopensystemslab/planx-core/tar.gz/20df9fc} + github.com/theopensystemslab/planx-core/ec52620: + resolution: {tarball: https://codeload.github.com/theopensystemslab/planx-core/tar.gz/ec52620} name: '@opensystemslab/planx-core' version: 1.0.0 prepare: true diff --git a/e2e/tests/api-driven/package.json b/e2e/tests/api-driven/package.json index 34bcd24ba0..56008e0dcd 100644 --- a/e2e/tests/api-driven/package.json +++ b/e2e/tests/api-driven/package.json @@ -7,7 +7,7 @@ "packageManager": "pnpm@8.6.6", "dependencies": { "@cucumber/cucumber": "^9.3.0", - "@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#20df9fc", + "@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#ec52620", "axios": "^1.7.4", "dotenv": "^16.3.1", "dotenv-expand": "^10.0.0", diff --git a/e2e/tests/api-driven/pnpm-lock.yaml b/e2e/tests/api-driven/pnpm-lock.yaml index 97cff461d2..ee5dcc3424 100644 --- a/e2e/tests/api-driven/pnpm-lock.yaml +++ b/e2e/tests/api-driven/pnpm-lock.yaml @@ -9,8 +9,8 @@ dependencies: specifier: ^9.3.0 version: 9.3.0 '@opensystemslab/planx-core': - specifier: git+https://github.com/theopensystemslab/planx-core#20df9fc - version: github.com/theopensystemslab/planx-core/20df9fc + specifier: git+https://github.com/theopensystemslab/planx-core#ec52620 + version: github.com/theopensystemslab/planx-core/ec52620 axios: specifier: ^1.7.4 version: 1.7.4 @@ -2931,8 +2931,8 @@ packages: resolution: {integrity: sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==} dev: false - github.com/theopensystemslab/planx-core/20df9fc: - resolution: {tarball: https://codeload.github.com/theopensystemslab/planx-core/tar.gz/20df9fc} + github.com/theopensystemslab/planx-core/ec52620: + resolution: {tarball: https://codeload.github.com/theopensystemslab/planx-core/tar.gz/ec52620} name: '@opensystemslab/planx-core' version: 1.0.0 prepare: true diff --git a/e2e/tests/ui-driven/package.json b/e2e/tests/ui-driven/package.json index 481357c9f5..971eea4a6e 100644 --- a/e2e/tests/ui-driven/package.json +++ b/e2e/tests/ui-driven/package.json @@ -8,7 +8,7 @@ "postinstall": "./install-dependencies.sh" }, "dependencies": { - "@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#20df9fc", + "@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#ec52620", "axios": "^1.7.4", "dotenv": "^16.3.1", "eslint": "^8.56.0", diff --git a/e2e/tests/ui-driven/pnpm-lock.yaml b/e2e/tests/ui-driven/pnpm-lock.yaml index ffc3915d4f..5844006a8a 100644 --- a/e2e/tests/ui-driven/pnpm-lock.yaml +++ b/e2e/tests/ui-driven/pnpm-lock.yaml @@ -6,8 +6,8 @@ settings: dependencies: '@opensystemslab/planx-core': - specifier: git+https://github.com/theopensystemslab/planx-core#20df9fc - version: github.com/theopensystemslab/planx-core/20df9fc + specifier: git+https://github.com/theopensystemslab/planx-core#ec52620 + version: github.com/theopensystemslab/planx-core/ec52620 axios: specifier: ^1.7.4 version: 1.7.4 @@ -2669,8 +2669,8 @@ packages: resolution: {integrity: sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==} dev: false - github.com/theopensystemslab/planx-core/20df9fc: - resolution: {tarball: https://codeload.github.com/theopensystemslab/planx-core/tar.gz/20df9fc} + github.com/theopensystemslab/planx-core/ec52620: + resolution: {tarball: https://codeload.github.com/theopensystemslab/planx-core/tar.gz/ec52620} name: '@opensystemslab/planx-core' version: 1.0.0 prepare: true diff --git a/editor.planx.uk/package.json b/editor.planx.uk/package.json index 9f16b6549e..d52764d757 100644 --- a/editor.planx.uk/package.json +++ b/editor.planx.uk/package.json @@ -14,7 +14,7 @@ "@mui/lab": "5.0.0-alpha.170", "@mui/material": "^5.15.10", "@mui/utils": "^5.15.11", - "@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#931d4db", + "@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#ec52620", "@opensystemslab/map": "1.0.0-alpha.2", "@tiptap/core": "^2.4.0", "@tiptap/extension-bold": "^2.0.3", diff --git a/editor.planx.uk/pnpm-lock.yaml b/editor.planx.uk/pnpm-lock.yaml index 014ad884f5..8e03e5da42 100644 --- a/editor.planx.uk/pnpm-lock.yaml +++ b/editor.planx.uk/pnpm-lock.yaml @@ -47,8 +47,8 @@ dependencies: specifier: 1.0.0-alpha.2 version: 1.0.0-alpha.2 '@opensystemslab/planx-core': - specifier: git+https://github.com/theopensystemslab/planx-core#931d4db - version: github.com/theopensystemslab/planx-core/931d4db(@types/react@18.2.45) + specifier: git+https://github.com/theopensystemslab/planx-core#ec52620 + version: github.com/theopensystemslab/planx-core/ec52620(@types/react@18.2.45) '@tiptap/core': specifier: ^2.4.0 version: 2.4.0(@tiptap/pm@2.0.3) @@ -19994,8 +19994,8 @@ packages: engines: {node: '>=16'} dev: false - /type-fest@4.25.0: - resolution: {integrity: sha512-bRkIGlXsnGBRBQRAY56UXBm//9qH4bmJfFvq83gSz41N282df+fjy8ofcEgc1sM8geNt5cl6mC2g9Fht1cs8Aw==} + /type-fest@4.26.0: + resolution: {integrity: sha512-OduNjVJsFbifKb57UqZ2EMP1i4u64Xwow3NYXUtBbD4vIwJdQd4+xl8YDou1dlm4DVrtwT/7Ky8z8WyCULVfxw==} engines: {node: '>=16'} dev: false @@ -21379,9 +21379,9 @@ packages: use-sync-external-store: 1.2.0(react@18.2.0) dev: false - github.com/theopensystemslab/planx-core/931d4db(@types/react@18.2.45): - resolution: {tarball: https://codeload.github.com/theopensystemslab/planx-core/tar.gz/931d4db} - id: github.com/theopensystemslab/planx-core/931d4db + github.com/theopensystemslab/planx-core/ec52620(@types/react@18.2.45): + resolution: {tarball: https://codeload.github.com/theopensystemslab/planx-core/tar.gz/ec52620} + id: github.com/theopensystemslab/planx-core/ec52620 name: '@opensystemslab/planx-core' version: 1.0.0 prepare: true @@ -21407,7 +21407,7 @@ packages: prettier: 3.3.3 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - type-fest: 4.25.0 + type-fest: 4.26.0 uuid: 10.0.0 zod: 3.23.8 transitivePeerDependencies: diff --git a/editor.planx.uk/src/types.ts b/editor.planx.uk/src/types.ts index 9a129e442e..8837621420 100644 --- a/editor.planx.uk/src/types.ts +++ b/editor.planx.uk/src/types.ts @@ -1,8 +1,8 @@ import { FlowStatus, GovUKPayment, - NotifyPersonalisation, Team, + TeamContactSettings, } from "@opensystemslab/planx-core/types"; import { OT } from "@planx/graph/types"; import { useFormik } from "formik"; @@ -116,7 +116,7 @@ export interface AdminPanelData { subdomain?: string; planningDataEnabled: boolean; article4sEnabled: string; - govnotifyPersonalisation?: NotifyPersonalisation; + govnotifyPersonalisation?: TeamContactSettings; govpayEnabled: boolean; sendToEmailAddress?: string; bopsSubmissionURL?: string;