/*
Hyrrokkin - a library for building and running executable graphs
MIT License - Copyright (C) 2022-2025 Visual Topology Ltd
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or
substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
var hyrrokkin_engine = hyrrokkin_engine || {};
/**
* An interface supplying services to a node
*
* @interface
* @type {hyrrokkin_engine.NodeServiceInterface}
*/
hyrrokkin_engine.NodeServiceInterface = class {
/**
* Get the unique ID of this node
*
* @returns {string} the node id
*/
get_node_id() {
}
/**
* Request that this node is re-run. Typically called after a change to the node that would alter the output values
* if there was no change to the inputs.
*/
async request_run() {
}
/**
* Get the set of properties associated with this node
*
* @returns {Object} the value of the properties
*/
async get_properties() {
}
/**
* Set the properties associated with this node
*
* @param {Object} properties the properties to set, must be an Object that is JSON serialisable
*/
async set_properties(properties) {
}
/**
* Retrieve data associated with a key or null if no data is associated with that key
*
* @param {string} key the key value
*
* @return {Promise<(ArrayBuffer|null)>}
*/
async get_data(key) {
}
/**
* Store data associated with a key
*
* @param {string} key the key value
* @param {(ArrayBuffer|null)} data the data value (pass null to delete data associated with the key)
*
* @return {Promise<void>}
*/
async set_data(key, data) {
}
/**
* Sets a status message for this node
*
* @param {string} status_msg the status message, or empty string to clear the status
* @param {string} level, one of "info", "warning", "error"
*/
set_status(status_msg, level) {
}
/**
* Take manual control of the running state
*
* @param {string} new_state one of "pending", "running", "completed", "failed"
*/
set_running_state(new_state) {
}
/**
* Resolve a relative resource path based on the location of the package schema
*
* @param resource_path
*/
resolve_resource(resource_path) {
}
/**
* Gets the configuration instance associated with a package.
*
* @param {string} [package_id] the id of the package, use the node's package id if not provided
*
* @returns {(object|null)} the configuration instance or null if no configuration is defined for the package
*/
get_configuration(package_id) {
}
/**
* Called to request that a client of this node be opened
*
* @param {string} client_name: the type of client to open
* @param {string|undefined} session_id: the session in which the client should be opened (if undefined, open in all sessions)
*/
request_open_client(client_name, session_id) {
}
/**
* Gets the number of connections to/from this port
*
* @param {string} port_name: the name of the port to count connections to/from
* @param {string} port_direction: specify whether the port is "input" or "output"
*/
get_connection_count(port_name, port_direction) {
}
}