diff --git a/src/models/emailNotification.model.ts b/src/models/emailNotification.model.ts index 04e622b29..3afe65e42 100644 --- a/src/models/emailNotification.model.ts +++ b/src/models/emailNotification.model.ts @@ -15,7 +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; @@ -127,12 +131,16 @@ export const emailNotificationSchema = new Schema( { name: String, resource: String, + dataType: String, reference: String, query: { name: String, fields: [{ type: mongoose.Schema.Types.Mixed }], 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 9230363ae..3c17863c6 100644 --- a/src/schema/inputs/emailNotification.input.ts +++ b/src/schema/inputs/emailNotification.input.ts @@ -67,6 +67,9 @@ export const DatasetInputType = new GraphQLInputObjectType({ pageSize: { type: GraphQLInt }, 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 b0f7f168e..febf15a0c 100644 --- a/src/schema/types/emailNotification.type.ts +++ b/src/schema/types/emailNotification.type.ts @@ -35,7 +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 },