import { ShapeDiverCommonsModelStatus } from '../commons/SdCommonModel'; import { ShapeDiverCommonsGroup } from '../commons/SdCommonsGroup'; import { ShapeDiverCommonsParameterBasic, ShapeDiverCommonsParameterSType, } from '../commons/SdCommonsParameter'; import { ShapeDiverCommonsTicket, ShapeDiverCommonsTicketType } from '../commons/SdCommonsTicket'; /** * @swagger {components.schemas} ResponseAction { "description": "Defines the actions to be taken on the response data.", "type": "object" } */ /** Defines the actions to be taken on the response data. */ export interface ShapeDiverResponseAction { /** * @swagger {components.schemas.ResponseAction.properties} name { "description": "Name of the action, e.g. customize, close, default, etc.", "type": "string" } * @swagger {components.schemas.ResponseAction} required [ "name" ] */ /** Name of the action, e.g. customize, close, default, etc. */ name: string; /** * @swagger {components.schemas.ResponseAction.properties} title { "description": "Title of the action, e.g. 'Customize model', 'Close session', etc.", "type": "string" } * @swagger {components.schemas.ResponseAction} required [ "title" ] */ /** Title of the action, e.g. 'Customize model', 'Close session', etc. */ title: string; /** * @swagger {components.schemas.ResponseAction.properties} href { "description": "Hyperlink to make the request to.", "type": "string" } * @swagger {components.schemas.ResponseAction} required [ "href" ] */ /** Hyperlink to make the request to. */ href: string; /** * @swagger {components.schemas.ResponseAction.properties} method { "description": "HTTP method to use.", "type": "string" } * @swagger {components.schemas.ResponseAction} required [ "method" ] */ /** HTTP method to use. */ method: string; /** * @swagger {components.schemas.ResponseAction.properties} template { "description": "Template for the request body, references into the 'templates' array of the response (e.g. 'customize-request').", "type": "string" } */ /** Template for the request body, references into the 'templates' array of the response (e.g. 'customize-request'). */ template?: string; } /** * @swagger {components.schemas} ResponseTemplate { "description": "Provides templates for actions.", "type": "object" } */ /** Provides templates for actions. */ export interface ShapeDiverResponseTemplate { /** * @swagger {components.schemas.ResponseTemplate.properties} name { "description": "Name of the template, e.g. 'customize-request'.", "type": "string" } * @swagger {components.schemas.ResponseTemplate} required [ "name" ] */ /** Name of the template, e.g. 'customize-request'. */ name: string; /** * @swagger {components.schemas.ResponseTemplate.properties} title { "description": "Title of the template, e.g. 'Template for model customization request'.", "type": "string" } * @swagger {components.schemas.ResponseTemplate} required [ "titel" ] */ /** Title of the template, e.g. 'Template for model customization request'. */ title: string; /** * @swagger {components.schemas.ResponseTemplate.properties} data { "description": "Template for the request body.", "type": "object", "properties": {} } * @swagger {components.schemas.ResponseTemplate} required [ "data" ] */ /** Template for the request body. */ data: object; } /** * @swagger {components.schemas} ResponseModel { "description": "Definition of a ShapeDiver model.", "type": "object" } */ /** Definition of a ShapeDiver model. */ export interface ShapeDiverResponseModel { /** * @swagger {components.schemas.ResponseModel.properties} allowed_libraries { "description": "List of allowed Grasshopper libraries.", "type": "array", "items": { "type": "string" } } */ /** List of allowed Grasshopper libraries. */ allowed_libraries?: string[]; /** * @swagger {components.schemas.ResponseModel.properties} backlinkurl { "description": "Link to view the model on the ShapeDiver Platform.", "type": "string" } */ /** Link to view the model on the ShapeDiver Platform. */ backlinkurl?: string; /** * @swagger {components.schemas.ResponseModel.properties} checkurl { "description": "Link to continue the checking process of the model on the ShapeDiver Platform.", "type": "string" } */ /** Link to continue the checking process of the model on the ShapeDiver Platform. */ checkurl?: string; /** * @swagger {components.schemas.ResponseModel.properties} createdate { "description": "Timestamp of creation of the model, in ISO-8601 format.", "type": "string" } */ /** Timestamp of creation of the model, in ISO-8601 format. */ createdate?: string; /** * @swagger {components.schemas.ResponseModel.properties} documentid { "description": "ID of the Grasshopper document.", "type": "string", "format": "uuid" } */ /** ID of the Grasshopper document. */ documentid?: string; /** * @swagger {components.schemas.ResponseModel.properties} filename { "description": "Original name of the model's grasshopper file.", "type": "string" } */ /** Original name of the model's grasshopper file. */ filename?: string; /** * @swagger {components.schemas.ResponseModel.properties} id { "description": "ID of the model.", "type": "string", "format": "uuid" } * @swagger {components.schemas.ResponseModel} required [ "id" ] */ /** ID of the model. */ id: string; /** * @swagger {components.schemas.ResponseModel.properties} id2 { "description": "Optional second ID of the model. This value can be unset via an empty string.", "type": "string", "format": "uuid" } */ /** Optional second ID of the model. This value can be unset via an empty string. */ id2?: string; /** * @swagger {components.schemas.ResponseModel.properties} msg { "description": "Optional message, used in case the model was denied.", "type": "string" } */ /** Optional message, used in case the model was denied. */ msg?: string; /** * @swagger {components.schemas.ResponseModel.properties} name { "description": "Model name.", "type": "string" } */ /** Model name. */ name?: string; /** * @swagger {components.schemas.ResponseModel.properties} org_id { "description": "Organization ID of the user that owns the model.", "type": "string" } */ /** Organization ID of the user that owns the model. */ org_id?: string; /** * @swagger {components.schemas.ResponseModel.properties} stat { "description": "Status of the model.", "$ref": "#/components/schemas/ResponseModelStatus" } * @swagger {components.schemas.ResponseModel} required [ "stat" ] */ /** Status of the model. */ stat: ShapeDiverResponseModelStatus; /** * @swagger {components.schemas.ResponseModel.properties} user_id { "description": "ShapeDiver User ID of the model owner.", "type": "string" } */ /** ShapeDiver User ID of the model owner. */ user_id?: string; /** * @swagger {components.schemas.ResponseModel.properties} webhook_url { "description": "The webhook-url for updating the platform backend about model status changes.", "type": "string" } */ /** The webhook-url for updating the platform backend about model status changes. */ webhook_url?: string; /** * @swagger {components.schemas.ResponseModel.properties} webhook_token { "description": "The webhook-token for authentication used by the webhook-url.", "type": "string" } */ /** The webhook-token for authentication used by the webhook-url. */ webhook_token?: string; } /** * @swagger {components.schemas} ResponseModelStatus { "allOf": [ { "$ref": "#/components/schemas/CommonsModelStatus" } ] } */ /** Status of the model. */ export const ShapeDiverResponseModelStatus = { ...ShapeDiverCommonsModelStatus, }; export type ShapeDiverResponseModelStatus = (typeof ShapeDiverResponseModelStatus)[keyof typeof ShapeDiverResponseModelStatus]; /** * @swagger {components.schemas} ResponseFile { "description": "Definitions of a model file.", "type": "object" } */ /** Definitions of a model file. */ export interface ShapeDiverResponseFile { /** * @swagger {components.schemas.ResponseFile.properties} upload { "description": "href to upload a model file.", "type": "string" } */ /** href to upload a model file. */ upload?: string; /** * @swagger {components.schemas.ResponseFile.properties} download { "description": "href to download a model file.", "type": "string" } */ /** href to download a model file. */ download?: string; } /** * @swagger {components.schemas} ResponsePlugins { "description": "Information about Grasshopper plugins.", "type": "object" } */ /** Information about Grasshopper plugins. */ export interface ShapeDiverResponsePlugins { /** * @swagger {components.schemas.ResponsePlugins.properties} libraries { "description": "Libraries used by the model.", "type": "array", "items": { "$ref": "#/components/schemas/ResponsePluginsLibrary" } } */ /** Libraries used by the model. */ libraries?: ShapeDiverResponsePluginsLibrary[]; } /** * @swagger {components.schemas} ResponsePluginsLibrary { "description": "Definition of a model library.", "type": "object" } */ /** Definition of a model library. */ export interface ShapeDiverResponsePluginsLibrary { /** * @swagger {components.schemas.ResponsePluginsLibrary.properties} id { "description": "Library ID.", "type": "string" } * @swagger {components.schemas.ResponsePluginsLibrary} required [ "id" ] */ /** Library ID. */ id: string; /** * @swagger {components.schemas.ResponsePluginsLibrary.properties} version { "description": "Library version.", "type": "string" } * @swagger {components.schemas.ResponsePluginsLibrary} required [ "version" ] */ /** Library version. */ version: string; /** * @swagger {components.schemas.ResponsePluginsLibrary.properties} name { "description": "Library name.", "type": "string" } * @swagger {components.schemas.ResponsePluginsLibrary} required [ "name" ] */ /** Library name. */ name: string; /** * @swagger {components.schemas.ResponsePluginsLibrary.properties} author { "description": "Library author.", "type": "string" } * @swagger {components.schemas.ResponsePluginsLibrary} required [ "author" ] */ /** Library author. */ author: string; /** * @swagger {components.schemas.ResponsePluginsLibrary.properties} assemblyFullName { "description": "Assembly name (not present in Rhino 5).", "type": "string" } */ /** Assembly name (not present in Rhino 5). */ assemblyFullName?: string; /** * @swagger {components.schemas.ResponsePluginsLibrary.properties} assemblyVersion { "description": "Assembly version (not present in Rhino 5).", "type": "string" } */ /** Assembly version (not present in Rhino 5). */ assemblyVersion?: string; } /** * @swagger {components.schemas} ResponseStatistic { "description": "Model statistic object.", "type": "object" } */ /** Model statistic object. */ export interface ShapeDiverResponseStatistic { /** * @swagger {components.schemas.ResponseStatistic.properties} comptime { "description": "Cumulative time (msec) which has been spent for processing computation requests by the workers (pure computation time).", "type": "number" } */ /** Cumulative time (msec) which has been spent for processing computation requests by the workers (pure computation time). */ comptime?: number; /** * @swagger {components.schemas.ResponseStatistic.properties} lastsession { "description": "Timestamp of last session created for the model, in ISO-8601 format.", "type": "string" } */ /** Timestamp of last session created for the model, in ISO-8601 format. */ lastsession?: string; /** * @swagger {components.schemas.ResponseStatistic.properties} lastview { "description": "Timestamp of last view of the model, in ISO-8601 format.", "type": "string" } */ /** Timestamp of last view of the model, in ISO-8601 format. */ lastview?: string; /** * @swagger {components.schemas.ResponseStatistic.properties} memUsage { "description": "Approximate memory usage of model on workers, in bytes.", "type": "number" } */ /** Approximate memory usage of model on workers, in bytes. */ memUsage?: number; /** * @swagger {components.schemas.ResponseStatistic.properties} numcomp { "description": "Number of computations which have been carried out for the model by the workers so far.", "type": "number" } */ /** Number of computations which have been carried out for the model by the workers so far. */ numcomp?: number; /** * @swagger {components.schemas.ResponseStatistic.properties} numsessions { "description": "Number of sessions which have been opened for the model so far.", "type": "number" } */ /** Number of sessions which have been opened for the model so far. */ numsessions?: number; /** * @swagger {components.schemas.ResponseStatistic.properties} requesttime { "description": "Cumulative time (msec) which has been spent for processing computation requests by the workers (computation time plus overheads).", "type": "number" } */ /** Cumulative time (msec) which has been spent for processing computation requests by the workers (computation time plus overheads). */ requesttime?: number; /** * @swagger {components.schemas.ResponseStatistic.properties} size { "description": "File size of the model file in bytes.", "type": "number" } */ /** File size of the model file in bytes. */ size?: number; } /** * @swagger {components.schemas} ResponseParameter { "description": "Definition of a parameter of a ShapeDiver Model.", "type": "object" } */ /** Definition of a parameter of a ShapeDiver Model. */ export interface ShapeDiverResponseParameter { /** * @swagger {components.schemas.ResponseParameter.properties} id { "description": "Unique ID of parameter, stays constant each time a model gets uploaded.", "type": "string" } * @swagger {components.schemas.ResponseParameter} required [ "id" ] */ /** Unique ID of parameter, stays constant each time a model gets uploaded. */ id: string; /** * @swagger {components.schemas.ResponseParameter.properties} choices { "description": "Choice of parameter values for types STRINGLIST.", "type": "array", "items": { "type": "string" } } */ /** Choice of parameter values for types STRINGLIST. */ choices?: string[]; /** * @swagger {components.schemas.ResponseParameter.properties} decimalplaces { "description": "Number of decimal places for numeric types.", "type": "number" } */ /** Number of decimal places for numeric types. */ decimalplaces?: number; /** * @swagger {components.schemas.ResponseParameter.properties} defval { "description": "Default value of parameter, stringified.", "type": "string" } * @swagger {components.schemas.ResponseParameter} required [ "defvali" ] */ /** Default value of parameter, stringified. */ defval: string; /** * @swagger {components.schemas.ResponseParameter.properties} expression { "description": "Optional expression to be applied to value for visualisation.", "type": "string" } */ /** Optional expression to be applied to value for visualisation. */ expression?: string; /** * @swagger {components.schemas.ResponseParameter.properties} format { "description": "List of file formats (content types) supported, used for type FILE.", "type": "array", "items": { "type": "string" } } */ /** List of file formats (content types) supported, used for type FILE. */ format?: string[]; /** * @swagger {components.schemas.ResponseParameter.properties} min { "description": "Minimum value (stringified) for numeric types.", "type": "number" } */ /** Minimum value (stringified) for numeric types. */ min?: number; /** * @swagger {components.schemas.ResponseParameter.properties} max { "description": "Maximum: