diff --git a/x-pack/plugins/reporting/server/lib/store/store.ts b/x-pack/plugins/reporting/server/lib/store/store.ts index 4f4b74841517b..7ed0860c83811 100644 --- a/x-pack/plugins/reporting/server/lib/store/store.ts +++ b/x-pack/plugins/reporting/server/lib/store/store.ts @@ -121,7 +121,7 @@ export class ReportingStore { meta: { // We are copying these values out of payload because these fields are indexed and can be aggregated on // for tracking stats, while payload contents are not. - objectType: params.type, + objectType: (params as any).type, // params.type for legacy (7.x) layout: params.layout ? params.layout.id : 'none', }, payload: report.payload, diff --git a/x-pack/plugins/reporting/server/routes/legacy.ts b/x-pack/plugins/reporting/server/routes/legacy.ts index d432f9396872c..baa4e3648c85b 100644 --- a/x-pack/plugins/reporting/server/routes/legacy.ts +++ b/x-pack/plugins/reporting/server/routes/legacy.ts @@ -42,7 +42,10 @@ export function registerLegacy( logger.warn(message, ['deprecation']); try { - const { savedObjectId }: { savedObjectId: string } = req.params as any; + const { + savedObjectId, + browserTimezone, + }: { savedObjectId: string; browserTimezone: string } = req.params as any; const queryString = querystring.stringify(req.query as any); return await handler( @@ -51,6 +54,7 @@ export function registerLegacy( { objectType, savedObjectId, + browserTimezone, queryString, }, context, diff --git a/x-pack/plugins/reporting/server/types.ts b/x-pack/plugins/reporting/server/types.ts index c9649cb6e558b..061e15f883c0f 100644 --- a/x-pack/plugins/reporting/server/types.ts +++ b/x-pack/plugins/reporting/server/types.ts @@ -171,6 +171,8 @@ export interface CreateJobBaseParams { browserTimezone: string; layout?: LayoutInstance; // for screenshot type reports objectType: string; + savedObjectId?: string; // legacy (7.x) only + queryString?: string; // legacy (7.x) only } export interface CreateJobBaseParamsEncryptedFields extends CreateJobBaseParams {