Skip to content

Commit

Permalink
Move more to PDF package
Browse files Browse the repository at this point in the history
  • Loading branch information
tsullivan committed Nov 14, 2023
1 parent ac970d4 commit 073390a
Show file tree
Hide file tree
Showing 11 changed files with 9 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@

import type { ReportingServerInfo } from '@kbn/reporting-common/types';
import type { TaskPayloadPDF } from '@kbn/reporting-export-types-pdf-common';
import { createMockConfigSchema } from '@kbn/reporting-mocks-server';

import type { ReportingConfigType } from '.';
import { getFullUrls } from './get_full_urls';

const getMockJob = (base: object) => base as TaskPayloadPDF;
const mockConfig = { kibanaServer: {} } as unknown as ReportingConfigType;
const mockConfig = createMockConfigSchema();
const mockServerInfo: ReportingServerInfo = {
hostname: 'localhost',
protocol: 'http',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import {

import type { ReportingServerInfo } from '@kbn/reporting-common/types';
import type { TaskPayloadPDF } from '@kbn/reporting-export-types-pdf-common';
import type { ReportingConfigType } from '@kbn/reporting-server';

import type { ReportingConfigType } from '.';
import { getAbsoluteUrlFactory } from './get_absolute_url';
import { validateUrls } from './validate_urls';

Expand Down
11 changes: 4 additions & 7 deletions packages/kbn-reporting/export_types/pdf/printable_pdf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,12 @@ import {
PDF_JOB_TYPE,
TaskPayloadPDF,
} from '@kbn/reporting-export-types-pdf-common';
import {
ExportType,
decryptJobHeaders,
getCustomLogo,
getFullUrls,
validateUrls,
} from '@kbn/reporting-server';
import { ExportType, decryptJobHeaders } from '@kbn/reporting-server';

import { generatePdfObservable } from './generate_pdf';
import { validateUrls } from './validate_urls';
import { getCustomLogo } from './get_custom_logo';
import { getFullUrls } from './get_full_urls';

/**
* @deprecated
Expand Down
8 changes: 2 additions & 6 deletions packages/kbn-reporting/export_types/pdf/printable_pdf_v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,10 @@ import {
PDF_REPORT_TYPE_V2,
TaskPayloadPDFV2,
} from '@kbn/reporting-export-types-pdf-common';
import {
decryptJobHeaders,
getFullRedirectAppUrl,
ExportType,
getCustomLogo,
} from '@kbn/reporting-server';
import { decryptJobHeaders, getFullRedirectAppUrl, ExportType } from '@kbn/reporting-server';

import { generatePdfObservableV2 } from './generate_pdf_v2';
import { getCustomLogo } from './get_custom_logo';

export class PdfExportType extends ExportType<JobParamsPDFV2, TaskPayloadPDFV2> {
id = PDF_REPORT_TYPE_V2;
Expand Down
4 changes: 0 additions & 4 deletions packages/kbn-reporting/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,8 @@
export { cryptoFactory } from './crypto';
export { decryptJobHeaders } from './decrypt_job_headers';
export { ExportType } from './export_type';
export { getAbsoluteUrlFactory } from './get_absolute_url';
export { getCustomLogo } from './get_custom_logo';
export { getFullRedirectAppUrl } from './get_full_redirect_app_url';
export { getFullUrls } from './get_full_urls';
export { getFieldFormats, setFieldFormats } from './services';
export { validateUrls } from './validate_urls';

export type { BaseExportTypeSetupDeps, BaseExportTypeStartDeps } from './export_type';
export { ConfigSchema } from './config_schema';
Expand Down

0 comments on commit 073390a

Please sign in to comment.