* - migrated use of legacy.client to client - removed use of isEsError to detect legacy errors - refactored types to use types from @elastic/elasticsearch instead (where appropriate) tested get, put, post, delete, simulate and documents endpoints locally * remove use of legacyEs service in functional test * fixing type issues and API response object * remove id from get all request! * reinstated logic for handling 404 from get all pipelines request * clarify error handling with comments and small variable name refactor * updated delete error responses * update functional test * refactor use of legacyEs Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
36 lines
789 B
TypeScript
36 lines
789 B
TypeScript
/*
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
* 2.0; you may not use this file except in compliance with the Elastic License
|
|
* 2.0.
|
|
*/
|
|
|
|
export interface ESProcessorConfig {
|
|
on_failure?: Processor[];
|
|
ignore_failure?: boolean;
|
|
if?: string;
|
|
tag?: string;
|
|
[key: string]: any;
|
|
}
|
|
|
|
export interface Processor {
|
|
[typeName: string]: ESProcessorConfig;
|
|
}
|
|
|
|
export interface Pipeline {
|
|
name: string;
|
|
description?: string;
|
|
version?: number;
|
|
processors: Processor[];
|
|
on_failure?: Processor[];
|
|
}
|
|
|
|
export interface PipelinesByName {
|
|
[key: string]: {
|
|
description: string;
|
|
version?: number;
|
|
processors: Processor[];
|
|
on_failure?: Processor[];
|
|
};
|
|
}
|