From 8ad113d2c9efa262dd1a5065922a873812a49839 Mon Sep 17 00:00:00 2001 From: Morgan Gowans Date: Wed, 26 Nov 2025 17:39:31 +0000 Subject: [PATCH 1/2] WIP: schema/model changes for EmailNotification ref data --- src/models/emailNotification.model.ts | 2 ++ src/schema/inputs/emailNotification.input.ts | 1 + src/schema/types/emailNotification.type.ts | 1 + 3 files changed, 4 insertions(+) diff --git a/src/models/emailNotification.model.ts b/src/models/emailNotification.model.ts index 04e622b29..89555d908 100644 --- a/src/models/emailNotification.model.ts +++ b/src/models/emailNotification.model.ts @@ -16,6 +16,7 @@ export interface Dataset { name: string; resource: string; reference?: string; + referenceDataVariableMapping?: string; query: { name: string; filter: any; @@ -133,6 +134,7 @@ export const emailNotificationSchema = new Schema( fields: [{ type: mongoose.Schema.Types.Mixed }], filter: { type: mongoose.Schema.Types.Mixed }, }, + referenceDataVariableMapping: String, individualEmailFields: [{ type: mongoose.Schema.Types.Mixed }], pageSize: { type: mongoose.Schema.Types.Number }, tableStyle: { type: mongoose.Schema.Types.Mixed }, diff --git a/src/schema/inputs/emailNotification.input.ts b/src/schema/inputs/emailNotification.input.ts index 9230363ae..7010b84c6 100644 --- a/src/schema/inputs/emailNotification.input.ts +++ b/src/schema/inputs/emailNotification.input.ts @@ -67,6 +67,7 @@ export const DatasetInputType = new GraphQLInputObjectType({ pageSize: { type: GraphQLInt }, navigateToPage: { type: GraphQLBoolean, defaultValue: false }, navigateSettings: { type: GraphQLJSON }, + referenceDataVariableMapping: { type: GraphQLString }, }), }); diff --git a/src/schema/types/emailNotification.type.ts b/src/schema/types/emailNotification.type.ts index b0f7f168e..5a9c32f44 100644 --- a/src/schema/types/emailNotification.type.ts +++ b/src/schema/types/emailNotification.type.ts @@ -36,6 +36,7 @@ export const DatasetType = new GraphQLObjectType({ name: { type: GraphQLString }, resource: { type: GraphQLString }, reference: { type: GraphQLString }, + referenceDataVariableMapping: { type: GraphQLString }, query: { type: QueryType }, tableStyle: { type: GraphQLJSON }, blockType: { type: GraphQLJSON }, From 974de1585aa342be0fe1416818e5aa463739065a Mon Sep 17 00:00:00 2001 From: Morgan Gowans Date: Mon, 8 Dec 2025 15:15:48 +0000 Subject: [PATCH 2/2] Add reference data config variables to GraphQL/Mongoose schemas --- src/models/emailNotification.model.ts | 6 ++++++ src/schema/inputs/emailNotification.input.ts | 2 ++ src/schema/types/emailNotification.type.ts | 3 +++ 3 files changed, 11 insertions(+) diff --git a/src/models/emailNotification.model.ts b/src/models/emailNotification.model.ts index 89555d908..3afe65e42 100644 --- a/src/models/emailNotification.model.ts +++ b/src/models/emailNotification.model.ts @@ -15,8 +15,11 @@ import { CustomTemplate } from '@models/customTemplate.model'; export interface Dataset { name: string; resource: string; + dataType?: string; reference?: string; referenceDataVariableMapping?: string; + referenceDataInputConfig?: any; + referenceDataInputs?: any; query: { name: string; filter: any; @@ -128,6 +131,7 @@ export const emailNotificationSchema = new Schema( { name: String, resource: String, + dataType: String, reference: String, query: { name: String, @@ -135,6 +139,8 @@ export const emailNotificationSchema = new Schema( filter: { type: mongoose.Schema.Types.Mixed }, }, referenceDataVariableMapping: String, + referenceDataInputConfig: { type: mongoose.Schema.Types.Mixed }, + referenceDataInputs: { type: mongoose.Schema.Types.Mixed }, individualEmailFields: [{ type: mongoose.Schema.Types.Mixed }], pageSize: { type: mongoose.Schema.Types.Number }, tableStyle: { type: mongoose.Schema.Types.Mixed }, diff --git a/src/schema/inputs/emailNotification.input.ts b/src/schema/inputs/emailNotification.input.ts index 7010b84c6..3c17863c6 100644 --- a/src/schema/inputs/emailNotification.input.ts +++ b/src/schema/inputs/emailNotification.input.ts @@ -68,6 +68,8 @@ export const DatasetInputType = new GraphQLInputObjectType({ navigateToPage: { type: GraphQLBoolean, defaultValue: false }, navigateSettings: { type: GraphQLJSON }, referenceDataVariableMapping: { type: GraphQLString }, + referenceDataInputConfig: { type: GraphQLJSON }, + referenceDataInputs: { type: GraphQLJSON }, }), }); diff --git a/src/schema/types/emailNotification.type.ts b/src/schema/types/emailNotification.type.ts index 5a9c32f44..febf15a0c 100644 --- a/src/schema/types/emailNotification.type.ts +++ b/src/schema/types/emailNotification.type.ts @@ -35,8 +35,11 @@ export const DatasetType = new GraphQLObjectType({ fields: () => ({ name: { type: GraphQLString }, resource: { type: GraphQLString }, + dataType: { type: GraphQLString }, reference: { type: GraphQLString }, referenceDataVariableMapping: { type: GraphQLString }, + referenceDataInputConfig: { type: GraphQLJSON }, + referenceDataInputs: { type: GraphQLJSON }, query: { type: QueryType }, tableStyle: { type: GraphQLJSON }, blockType: { type: GraphQLJSON },