Source: interfaces/store_base.js

/*   Hyrrokkin - A visual modelling tool for constructing directed graphs.

     Copyright (C) 2022-2026 Visual Topology Ltd

     Licensed under the MIT License
*/

var hyrrokkin = hyrrokkin || {};

hyrrokkin.StoreBase = class {

    /**
     * Initialise the store
     *
     * @param {object} the options object defining system configuration
     *
     * @returns {Promise<void>}
     */
    async init(options)  {
    }

    /**
     * Create a new topology in the store
     *
     * @param {string} topology_id ID of new topology
     * @param {?string} from_topology_id ID of a topology to copy, if provided
     * @returns {Promise<void>}
     */
    async create_topology(topology_id, from_topology_id) {
    }

    /**
     * Remove a topology from the store, if it exists
     *
     * @param topology_id
     * @returns {Promise<void>}
     */
    async remove_topology(topology_id) {
    }

    /**
     * Reload a topology from its template
     *
     * @param topology_id
     * @returns {Promise<void>}
     */
    async reload_topology(topology_id) {
    }

    /**
     * @typedef  TopologyMetadata
     * @type {object}
     * @property {string} name - the topology name.
     * @property {string} description - the topology name.
     * @property {?string} version - the topology version.
     * @property {?number} authors - list of authors.
     *
     */

    /**
     * Get an array of all the topology ids in the store
     *
     * @returns {Promise<string[]>}
     */
    async list_topologies() {

    }

    /**
     * Check if a topology exists in the store
     *
     * @param {string} topology_id the id of the topology
     * @returns {Promise<boolean>}
     */
    async topology_exists(topology_id) {
    }

    /**
     * Return a list of topologies, where the key is the topology metadata
     *
     * @returns {Promise<Object.<string, TopologyMetadata>>}
     */
    async get_topology_details() {
    }

    /**
     * Get the metadata for a topology
     *
     * @returns {Promise<TopologyMetadata>}
     */
    async get_topology_metadata(topology_id) {
    }


}