diff --git a/x-pack/plugins/fleet/common/types/models/package_spec.ts b/x-pack/plugins/fleet/common/types/models/package_spec.ts index 24a592490137c..18c10e4617417 100644 --- a/x-pack/plugins/fleet/common/types/models/package_spec.ts +++ b/x-pack/plugins/fleet/common/types/models/package_spec.ts @@ -18,7 +18,7 @@ export interface PackageSpecManifest { source?: { license: string; }; - type?: 'integration' | 'input'; + type?: PackageSpecPackageType; release?: 'experimental' | 'beta' | 'ga'; categories?: Array; conditions?: PackageSpecConditions; @@ -35,6 +35,11 @@ export interface PackageSpecManifest { privileges?: { root?: boolean }; }; asset_tags?: PackageSpecTags[]; + discovery?: { + fields?: Array<{ + name: string; + }>; + }; } export interface PackageSpecTags { text: string; @@ -42,7 +47,7 @@ export interface PackageSpecTags { asset_ids?: string[]; } -export type PackageSpecPackageType = 'integration' | 'input'; +export type PackageSpecPackageType = 'integration' | 'input' | 'content'; export type PackageSpecCategory = | 'advanced_analytics_ueba' diff --git a/x-pack/plugins/fleet/server/types/rest_spec/epm.ts b/x-pack/plugins/fleet/server/types/rest_spec/epm.ts index 2dc9606a5432d..f08ccd9ff1248 100644 --- a/x-pack/plugins/fleet/server/types/rest_spec/epm.ts +++ b/x-pack/plugins/fleet/server/types/rest_spec/epm.ts @@ -163,7 +163,13 @@ export const PackageInfoSchema = schema release: schema.maybe( schema.oneOf([schema.literal('ga'), schema.literal('beta'), schema.literal('experimental')]) ), - type: schema.maybe(schema.oneOf([schema.literal('integration'), schema.literal('input')])), + type: schema.maybe( + schema.oneOf([ + schema.literal('integration'), + schema.literal('input'), + schema.literal('content'), + ]) + ), path: schema.maybe(schema.string()), download: schema.maybe(schema.string()), internal: schema.maybe(schema.boolean()), @@ -192,6 +198,11 @@ export const PackageInfoSchema = schema format_version: schema.maybe(schema.string()), vars: schema.maybe(schema.arrayOf(schema.recordOf(schema.string(), schema.any()))), latestVersion: schema.maybe(schema.string()), + discovery: schema.maybe( + schema.object({ + fields: schema.maybe(schema.arrayOf(schema.object({ name: schema.string() }))), + }) + ), }) // sometimes package list response contains extra properties, e.g. installed_kibana .extendsDeep({