/* eslint-disable */
/**
 * This file was automatically generated by json-schema-to-typescript.
 * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
 * and run json-schema-to-typescript to regenerate this file.
 */

export interface ModuleManifest {
  $schema?: string;
  /**
   * Unique identifier for the module
   */
  id: string;
  /**
   * Name of the module
   */
  name: string;
  shortname: string;
  /**
   * Description of the module
   */
  description: string;
  /**
   * Current version of the module
   */
  version: string;
  /**
   * Is this a pre-release version
   */
  isPrerelease?: boolean;
  /**
   * SPDX identifier for license of the module
   */
  license: string;
  /**
   * URL to the source repository
   */
  repository: string;
  /**
   * URL to bug tracker
   */
  bugs: string;
  /**
   * List of active maintiners
   */
  maintainers: ModuleManifestMaintainer[];
  /**
   * If the module had a different unique identifier previously, then specify it here
   */
  legacyIds: string[];
  runtime: ModuleManifestRuntime;
  manufacturer: string;
  /**
   * @minItems 1
   */
  products: [string, ...string[]];
  keywords: string[];
  /**
   * If the device or software for your module supports bonjour announcements, Companion will offer an easy way to watch for these announcements.
   * Each query you define must have a matching config field of type 'bonjour-device' with the same name
   */
  bonjourQueries?: {
    /**
     * This interface was referenced by `undefined`'s JSON-Schema definition
     * via the `patternProperty` "".
     */
    [k: string]: ModuleBonjourQuery | ModuleBonjourQuery[];
  };
}
export interface ModuleManifestMaintainer {
  name: string;
  email?: string;
  github?: string;
  url?: string;
}
/**
 * Information on how to execute the module
 */
export interface ModuleManifestRuntime {
  /**
   * Type of the module. Must be: node18 or node22
   */
  type: "node18" | "node22";
  /**
   * Which host-api does it use. In the future alternate options will be allowed
   */
  api: "nodejs-ipc";
  /**
   * The version of the host-api used
   */
  apiVersion: string;
  /**
   * Entrypoint to pass to the runtime. eg index.js
   */
  entrypoint: string;
  /**
   * Permissions required by the module. This is used to inform the user of the permissions required by the module.
   * Note: this requires the node22 or newer runtime
   */
  permissions?: {
    /**
     * Enable if the module uses worker threads
     */
    "worker-threads"?: boolean;
    /**
     * Enable if the module uses child processes
     */
    "child-process"?: boolean;
    /**
     * Enable if the module uses native addons
     */
    "native-addons"?: boolean;
    /**
     * Enable if the module requires read/write access to the filesystem
     */
    filesystem?: boolean;
  };
}
export interface ModuleBonjourQuery {
  type: string;
  protocol: "tcp" | "udp";
  port?: number;
  /**
   * Match on any txt values returned in the query. This is useful to filter out devices of the same 'type' that are not supported
   */
  txt?: {
    /**
     * This interface was referenced by `undefined`'s JSON-Schema definition
     * via the `patternProperty` "".
     */
    [k: string]: string;
  };
}
