kibana/x-pack/plugins/canvas/server/setup_interpreter.ts
Corey Robertson d3774519c0
[Canvas] Adds references extract/inject for Workpads (#109874)
* Register embeddable functions server side.  Adds reference extraction/injection to workpads

* Clean up

* Fix Types

* Update API docs

* Remove API doc from expression (bad conflict resolution)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-31 09:45:48 -04:00

16 lines
689 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.
*/
import { ExpressionsServerSetup } from 'src/plugins/expressions/server';
import { functions } from '../canvas_plugin_src/functions/server';
import { functions as externalFunctions } from '../canvas_plugin_src/functions/external';
export function setupInterpreter(expressions: ExpressionsServerSetup) {
functions.forEach((f) => expressions.registerFunction(f));
externalFunctions.forEach((f) => expressions.registerFunction(f));
}