kibana/packages/kbn-reporting/common
Rachel Shen 4a0b967e38
Reporting packages for export types (#162845)
## Summary
This PR refactors the export type classes into their own packages to be
then instantiated in the reporting plugin. This will reduce bloat in the
central reporting plugin.

**Main packages**
- `kbn/reporting-export-types-{png,pdf,csv}` are server packages with
export type declarations
- `kbn/reporting-export-types-{png,pdf,csv}-common` are shared common
packages with type declarations and constants

**Other changes**
 - Remove `reporting.getScreenshots()`
 - Remove duplicated `schema_utils.ts`
 - Consolidate `JOB_STATUS` declaration as an enum

<img width="1063" alt="image"
src="bced8321-93c5-4ebd-b31e-1fd946166241">

### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Timothy Sullivan <tsullivan@elastic.co>
2023-11-15 10:48:00 -07:00
..
build_kibana_path.ts Reporting packages for export types (#162845) 2023-11-15 10:48:00 -07:00
cancellation_token.test.ts
cancellation_token.ts
constants.ts Reporting packages for export types (#162845) 2023-11-15 10:48:00 -07:00
errors.test.ts
errors.ts
index.ts Reporting packages for export types (#162845) 2023-11-15 10:48:00 -07:00
jest.config.js
kibana.jsonc Reporting packages for export types (#162845) 2023-11-15 10:48:00 -07:00
package.json
README.md Reporting packages for export types (#162845) 2023-11-15 10:48:00 -07:00
schema_utils.test.ts
schema_utils.ts
tsconfig.json Reporting packages for export types (#162845) 2023-11-15 10:48:00 -07:00
types.ts Reporting packages for export types (#162845) 2023-11-15 10:48:00 -07:00
url.ts Reporting packages for export types (#162845) 2023-11-15 10:48:00 -07:00

@kbn/reporting-common

Removes any circular dependency from the reporting plugin and the @kbn/generate-csv package.

This package includes the CancellationToken class, schema utils, constants, errors that extend ReportingError, and metrics such as TaskRunResult. This package is shared-common vs specifically server or browser. The @kbn/reporting-server package has the server side helpers.