@shapediver/sdk.geometry-api-sdk-v2
Version:
SDK to communicate with the Geometry API version 2
1,942 lines (1,856 loc) • 562 kB
text/typescript
/* tslint:disable */
/* eslint-disable */
/**
* Geometry Backend API v2
* The ShapeDiver Geometry Backend system is used to: * host Grasshopper models in a secure, reliable, scalable, and performant way, * run computations of Grasshopper models, * and cache and output the results of computations and exports.
*
* The version of the OpenAPI document: 1.12.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import type { Configuration } from './configuration';
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
import globalAxios from 'axios';
// Some imports not used depending on template conditions
// @ts-ignore
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
import type { RequestArgs } from './base';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, RequiredError, operationServerMap } from './base';
import { BaseAPI } from '../base';
/**
* Reference to the s-type parameter asset to be used.
* @export
* @interface CommmonsParameterAsset
*/
export interface CommmonsParameterAsset {
/**
* String ID of the asset.
* @type {string}
* @memberof CommmonsParameterAsset
*/
'id': string;
/**
*
* @type {CommonsParameterChunk}
* @memberof CommmonsParameterAsset
*/
'chunk'?: CommonsParameterChunk;
}
/**
* @type CommonsBasicParameter
* Definition of a basic ShapeDiver parameter.
* @export
*/
export type CommonsBasicParameter = boolean | number | string;
/**
* Status of a model computation.
* @export
* @enum {string}
*/
export const CommonsComputationStatus = {
SUCCESS: 'success',
TIMEOUT: 'timeout',
CHECK_CONFIRMED: 'checkconfirmed',
CHECK_DENIED: 'checkdenied',
CHECK_PENDING: 'checkpending',
MAX_COMBINED_ASSET_SIZE_EXCEEDED: 'maxcombinedassetsizeexceeded',
MAX_DB_SIZE_PER_OUTPUT_EXCEEDED: 'maxdbsizeperoutputexceeded',
MAX_PARTS_PER_OUTPUT_EXCEEDED: 'maxpartsperoutputexceeded',
MAX_ASSET_PARTS_PER_OUTPUT_EXCEEDED: 'maxassetpartsperoutputexceeded',
MAX_TRANSFORMATIONS_PER_OUTPUT_EXCEEDED: 'maxtransformationsperoutputexceeded',
MAX_PARTS_EXCEEDED: 'maxpartsexceeded',
MAX_ASSET_PARTS_EXCEEDED: 'maxassetpartsexceeded',
RECOVERABLE_ERROR: 'recoverableerror',
UNRECOVERABLE_ERROR: 'unrecoverableerror',
NO_OUTPUT_DATA_FOR_DEFAULT_PARAMETER_VALUES: 'nooutputdatafordefaultparametervalues',
MODEL_WITHOUT_GEOMETRY_OUTPUT: 'modelwithoutgeometryoutput',
UNKNOWN: 'unknown'
} as const;
export type CommonsComputationStatus = typeof CommonsComputationStatus[keyof typeof CommonsComputationStatus];
/**
* Group of a parameter, export or output.
* @export
* @interface CommonsGroup
*/
export interface CommonsGroup {
/**
*
* @type {string}
* @memberof CommonsGroup
*/
'id': string;
/**
*
* @type {string}
* @memberof CommonsGroup
*/
'name': string;
}
/**
* Reasons why the model may be blocked.
* @export
* @interface CommonsModelBlockingReasons
*/
export interface CommonsModelBlockingReasons {
/**
* The model owner\'s credit limit has been exceeded.
* @type {boolean}
* @memberof CommonsModelBlockingReasons
*/
'creditLimit'?: boolean;
/**
* The model has been blocked explicitly by its owner.
* @type {boolean}
* @memberof CommonsModelBlockingReasons
*/
'owner'?: boolean;
}
/**
* Status of a model.
* @export
* @enum {string}
*/
export const CommonsModelStatus = {
UNKNOWN: 'unknown',
NOT_UPLOADED: 'not_uploaded',
UPLOADED: 'uploaded',
PENDING: 'pending',
CONFIRMED: 'confirmed',
DENIED: 'denied',
DELETED: 'deleted'
} as const;
export type CommonsModelStatus = typeof CommonsModelStatus[keyof typeof CommonsModelStatus];
/**
* Describing which chunk of the s-type asset to use. When not specified, the chunk of an asset gets chosen based on parameter ID and name.
* @export
* @interface CommonsParameterChunk
*/
export interface CommonsParameterChunk {
/**
* ID of the chunk to be used.
* @type {string}
* @memberof CommonsParameterChunk
*/
'id'?: string;
/**
* Name attribute of the chunk to be used.
* @type {string}
* @memberof CommonsParameterChunk
*/
'name'?: string;
}
/**
* Definition of the value to use for s-type parameters.
* @export
* @interface CommonsStypeParameter
*/
export interface CommonsStypeParameter {
/**
* Optional embedded value. If this is set the asset is ignored.
* @type {string}
* @memberof CommonsStypeParameter
*/
'value'?: string;
/**
*
* @type {CommmonsParameterAsset}
* @memberof CommonsStypeParameter
*/
'asset'?: CommmonsParameterAsset;
}
/**
* Authorization ticket.
* @export
* @interface CommonsTicket
*/
export interface CommonsTicket {
/**
* List of domains (origins) this ticket should be limited to; may be empty.
* @type {Array<string>}
* @memberof CommonsTicket
*/
'accessdomains'?: Array<string>;
/**
* Should this ticket provide access to model authoring (allows to change configuration)?
* @type {boolean}
* @memberof CommonsTicket
*/
'author'?: boolean;
/**
* Should this ticket allow public access (ignore the model\'s `accessdomains` property)?
* @type {boolean}
* @memberof CommonsTicket
*/
'pub': boolean;
/**
* The timestamp until which the ticket should be valid.
* @type {string}
* @memberof CommonsTicket
*/
'until': string;
/**
* Does this ticket identify the model via its secondary ID (model property `id2`)?
* @type {boolean}
* @memberof CommonsTicket
*/
'use_id2'?: boolean;
}
/**
* Type of a ticket.
* @export
* @enum {string}
*/
export const CommonsTicketType = {
BACKEND: 'backend',
NONE: ''
} as const;
export type CommonsTicketType = typeof CommonsTicketType[keyof typeof CommonsTicketType];
/**
* A substitution for the JSON-value `null`.
* @export
* @interface NullObj
*/
export interface NullObj {
/**
* The value of this property does not matter.
* @type {boolean}
* @memberof NullObj
*/
'nullObj': boolean;
}
/**
* Filter by model computation statistics status.
* @export
* @enum {string}
*/
export const QueryComputationStatisticsStatus = {
SUCCESS: 'success',
TIMEOUT: 'timeout',
OTHER: 'other',
ALL: '*'
} as const;
export type QueryComputationStatisticsStatus = typeof QueryComputationStatisticsStatus[keyof typeof QueryComputationStatisticsStatus];
/**
* Filter by model computation status.
* @export
* @enum {string}
*/
export const QueryComputationStatus = {
SUCCESS: 'success',
TIMEOUT: 'timeout',
CHECK_CONFIRMED: 'checkconfirmed',
CHECK_DENIED: 'checkdenied',
CHECK_PENDING: 'checkpending',
MAX_COMBINED_ASSET_SIZE_EXCEEDED: 'maxcombinedassetsizeexceeded',
MAX_DB_SIZE_PER_OUTPUT_EXCEEDED: 'maxdbsizeperoutputexceeded',
MAX_PARTS_PER_OUTPUT_EXCEEDED: 'maxpartsperoutputexceeded',
MAX_ASSET_PARTS_PER_OUTPUT_EXCEEDED: 'maxassetpartsperoutputexceeded',
MAX_TRANSFORMATIONS_PER_OUTPUT_EXCEEDED: 'maxtransformationsperoutputexceeded',
MAX_PARTS_EXCEEDED: 'maxpartsexceeded',
MAX_ASSET_PARTS_EXCEEDED: 'maxassetpartsexceeded',
RECOVERABLE_ERROR: 'recoverableerror',
UNRECOVERABLE_ERROR: 'unrecoverableerror',
NO_OUTPUT_DATA_FOR_DEFAULT_PARAMETER_VALUES: 'nooutputdatafordefaultparametervalues',
MODEL_WITHOUT_GEOMETRY_OUTPUT: 'modelwithoutgeometryoutput',
UNKNOWN: 'unknown'
} as const;
export type QueryComputationStatus = typeof QueryComputationStatus[keyof typeof QueryComputationStatus];
/**
* Filter by computation type.
* @export
* @enum {string}
*/
export const QueryComputationType = {
COMPUTATION: 'computation',
EXPORT: 'export',
LOAD: 'load',
ALL: '*'
} as const;
export type QueryComputationType = typeof QueryComputationType[keyof typeof QueryComputationType];
/**
* Conversion type of a glTF upoad: * `none`: no further processing of the file. * `usdz`: converts the glTF into the USDZ format. * `scene`: creates a temporary AR scene that holds both, a glTF and a USDZ file.
* @export
* @enum {string}
*/
export const QueryGltfConversion = {
NONE: 'none',
SCENE: 'scene',
USDZ: 'usdz'
} as const;
export type QueryGltfConversion = typeof QueryGltfConversion[keyof typeof QueryGltfConversion];
/**
* Filter by model status.
* @export
* @enum {string}
*/
export const QueryModelStatus = {
UNKNOWN: 'unknown',
NOT_UPLOADED: 'not_uploaded',
UPLOADED: 'uploaded',
PENDING: 'pending',
CONFIRMED: 'confirmed',
DENIED: 'denied',
DELETED: 'deleted'
} as const;
export type QueryModelStatus = typeof QueryModelStatus[keyof typeof QueryModelStatus];
/**
* Specifies the order of the results.
* @export
* @enum {string}
*/
export const QueryOrder = {
ASC: 'asc',
DESC: 'desc'
} as const;
export type QueryOrder = typeof QueryOrder[keyof typeof QueryOrder];
/**
* @type ReqAnyCreditMetricId
* Either a single or multiple IDs. Multiple IDs are aggregated and result in a single credit metrics object.
* @export
*/
export type ReqAnyCreditMetricId = ReqModelCreditMetricId | ReqModelOrganizationCreditMetricId | ReqModelUserCreditMetricId | ReqOrganizationCreditMetricId | ReqSystemCreditMetricId | ReqUserCreditMetricId;
/**
* Body of an authorization group request.
* @export
* @interface ReqAuthorizationGroup
*/
export interface ReqAuthorizationGroup {
/**
* The model IDs that should form the new authorization group.
* @type {Array<string>}
* @memberof ReqAuthorizationGroup
*/
'models'?: Array<string>;
/**
* The user IDs that should form the new authorization group.
* @type {Array<string>}
* @memberof ReqAuthorizationGroup
*/
'users'?: Array<string>;
/**
* The organization IDs that should form the new authorization group.
* @type {Array<string>}
* @memberof ReqAuthorizationGroup
*/
'organizations'?: Array<string>;
}
/**
* @type ReqBasicParameter
* Definition of a basic ShapeDiver parameter.
* @export
*/
export type ReqBasicParameter = boolean | number | string;
/**
* Body of an export or output cache request. A directory of export-/output-IDs and version-IDs.
* @export
* @interface ReqCache
*/
export interface ReqCache {
[key: string]: string;
}
/**
* Body of a configure request. A dictionary of string keys and values of any type.
* @export
* @interface ReqConfigure
*/
export interface ReqConfigure {
[key: string]: any;
}
/**
* Parameters of a credit metrics request. When IDs or timestamps are requested, the resulting response-item represents an aggregation of the requested data.
* @export
* @interface ReqCreditMetric
*/
export interface ReqCreditMetric {
/**
*
* @type {ReqAnyCreditMetricId}
* @memberof ReqCreditMetric
*/
'id': ReqAnyCreditMetricId;
/**
* Either a single extended date or an array of extended dates. Multiple timestamps are aggregated and result in a single credit metrics object.
* @type {Array<string>}
* @memberof ReqCreditMetric
*/
'timestamp'?: Array<string>;
/**
* Allows to define the beginning of a time range, instead of specifying individual timestamps.
* @type {string}
* @memberof ReqCreditMetric
*/
'timestamp_from'?: string;
/**
* Allows to define the ending of a time range, instead of specifying individual timestamps.
* @type {string}
* @memberof ReqCreditMetric
*/
'timestamp_to'?: string;
}
/**
* Body of a credit metrics request. Every request-item results in exactly one response-item, whereby the order of response-items corresponds to the order of the request-items.
* @export
* @interface ReqCreditMetrics
*/
export interface ReqCreditMetrics {
/**
*
* @type {Array<ReqCreditMetric>}
* @memberof ReqCreditMetrics
*/
'parameters': Array<ReqCreditMetric>;
}
/**
* A directory of parameter keys and values. Supported parameter keys are as follows, whereby the parameter resolution is done in the same order as the keys are listed: * `id` * `name` * `displayname` Supported parameter values are: * Basic parameter (`ReqBasicParameter`) * S-type parameter (`ReqStypeParameter`)
* @export
* @interface ReqCustomization
*/
export interface ReqCustomization {
[key: string]: ReqParameterValue;
}
/**
* @type ReqCustomizationOrCache
* Either a cache or a customization request.
* @export
*/
export type ReqCustomizationOrCache = ReqCache | ReqCustomization;
/**
* @type ReqCustomizationOrExport
* @export
*/
export type ReqCustomizationOrExport = ReqCustomization | ReqExport;
/**
* Body of an export request.
* @export
* @interface ReqExport
*/
export interface ReqExport {
/**
*
* @type {ReqCustomization}
* @memberof ReqExport
*/
'parameters': ReqCustomization;
/**
*
* @type {Array<string>}
* @memberof ReqExport
*/
'exports': Array<string>;
/**
*
* @type {Array<string>}
* @memberof ReqExport
*/
'outputs'?: Array<string>;
/**
* Maximum amount of milliseconds to wait for completion of export request before responding.
* @type {number}
* @memberof ReqExport
*/
'max_wait_time'?: number;
}
/**
* Data for a single export definition.
* @export
* @interface ReqExportDefinition
*/
export interface ReqExportDefinition {
/**
* Parameter name to display instead of _name_.
* @type {string}
* @memberof ReqExportDefinition
*/
'displayname'?: string;
/**
*
* @type {ReqExportDefinitionGroup}
* @memberof ReqExportDefinition
*/
'group'?: ReqExportDefinitionGroup;
/**
* Controls whether the export should be hidden in the UI.
* @type {boolean}
* @memberof ReqExportDefinition
*/
'hidden'?: boolean;
/**
* Ordering of the export in client applications.
* @type {number}
* @memberof ReqExportDefinition
*/
'order'?: number;
/**
* Description that is shown as a tooltip in the clients.
* @type {string}
* @memberof ReqExportDefinition
*/
'tooltip'?: string;
}
/**
* @type ReqExportDefinitionGroup
* Set to `null` or `NullObj` to remove the export from the currently assigned group.
* @export
*/
export type ReqExportDefinitionGroup = NullObj | ReqGroup;
/**
* Definition of a exports. A directory of export-IDs and export-definitions.
* @export
* @interface ReqExportDefinitions
*/
export interface ReqExportDefinitions {
[key: string]: ReqExportDefinition;
}
/**
* @type ReqExportOrCache
* Either a cache or an export request.
* @export
*/
export type ReqExportOrCache = ReqCache | ReqExport;
/**
* Data for a single file parameter.
* @export
* @interface ReqFileDefinition
*/
export interface ReqFileDefinition {
/**
* Name of the file to be uploaded. If this property is set, the file upload request must include a `Content-Disposition` HTTP header with the format `attachment; filename=\"{filename}\"`. Failure to do so will result in a signature mismatch. For convenience, the response will provide a preformatted HTTP header value that can be used directly.
* @type {string}
* @memberof ReqFileDefinition
*/
'filename'?: string;
/**
* Content-Type (MIME type) of the file to be uploaded.
* @type {string}
* @memberof ReqFileDefinition
*/
'format': string;
/**
* Size of the file to be uploaded, in bytes.
* @type {number}
* @memberof ReqFileDefinition
*/
'size': number;
}
/**
* Body of a file upload request. A directory of file-parameter-IDs and upload-definitions.
* @export
* @interface ReqFileUpload
*/
export interface ReqFileUpload {
[key: string]: ReqFileDefinition;
}
/**
* Group of a parameter, export or output.
* @export
* @interface ReqGroup
*/
export interface ReqGroup {
/**
*
* @type {string}
* @memberof ReqGroup
*/
'id': string;
/**
*
* @type {string}
* @memberof ReqGroup
*/
'name': string;
}
/**
* Log message level for log requests.
* @export
* @enum {string}
*/
export const ReqLogLevel = {
INFO: '0',
WARN: '1',
ERROR: '2'
} as const;
export type ReqLogLevel = typeof ReqLogLevel[keyof typeof ReqLogLevel];
/**
* Body of a log message request.
* @export
* @interface ReqLogMessage
*/
export interface ReqLogMessage {
/**
*
* @type {ReqLogLevel}
* @memberof ReqLogMessage
*/
'level': ReqLogLevel;
/**
* The message that should be logged.
* @type {string}
* @memberof ReqLogMessage
*/
'message': string;
}
/**
* Body of a template request.
* @export
* @interface ReqModel
*/
export interface ReqModel {
/**
* List of domains (origins) this model is limited to (is ignored in case `pub` is true).
* @type {Array<string>}
* @memberof ReqModel
*/
'accessdomains'?: Array<string>;
/**
* List of allowed Grasshopper libraries.
* @type {Array<string>}
* @memberof ReqModel
*/
'allowed_libraries'?: Array<string>;
/**
* List of allowed auth-groups.
* @type {Array<string>}
* @memberof ReqModel
*/
'auth_groups'?: Array<string>;
/**
* Should backend access to the model be allowed.
* @type {boolean}
* @memberof ReqModel
*/
'backendaccess'?: boolean;
/**
*
* @type {ReqModelBlockingReasons}
* @memberof ReqModel
*/
'blockingReasons'?: ReqModelBlockingReasons;
/**
* Original name of the model\'s grasshopper file.
* @type {string}
* @memberof ReqModel
*/
'filename'?: string;
/**
* File type of the model.
* @type {ReqModelFileType}
* @memberof ReqModel
*/
'ftype'?: ReqModelFileType;
/**
* Allows to control whether the model should be warmed up immediately after loading by running a computation. This increases the likelihood of following computation requests to be faster.
* @type {boolean}
* @memberof ReqModel
*/
'initial_warmup'?: boolean;
/**
* Optional second model ID.
* @type {string}
* @memberof ReqModel
*/
'id2'?: string;
/**
* Maximum number of milliseconds allowed for computations of this model.
* @type {number}
* @memberof ReqModel
*/
'max_comp_time'?: number;
/**
* Maximum number of bytes allowed to be exported from a model for a specific set of parameter values.
* @type {number}
* @memberof ReqModel
*/
'max_export_size'?: number;
/**
* Maximum amount of minutes a loaded model may be unused before it gets unloaded. Note: Models may get unloaded earlier than that.
* @type {number}
* @memberof ReqModel
*/
'max_idle_minutes'?: number;
/**
* Maximum number of bytes allowed for the model\'s Grasshopper file size.
* @type {number}
* @memberof ReqModel
*/
'max_model_size'?: number;
/**
* Maximum number of bytes allowed for an output of a model for a specific set of parameter values.
* @type {number}
* @memberof ReqModel
*/
'max_output_size'?: number;
/**
* Allows to configure the maximum number of bytes allowed for a single texture.
* @type {number}
* @memberof ReqModel
*/
'max_texture_size'?: number;
/**
* Maximum time a computation request may stay waiting before a further worker goes ahead regardless of whether it already has the model loaded, and regardless of `num_loaded_max`. This allows to configure a soft or a hard upper boundary for the number of loaded models.
* @type {number}
* @memberof ReqModel
*/
'max_wait_time'?: number;
/**
* Name of the model.
* @type {string}
* @memberof ReqModel
*/
'name'?: string;
/**
* Maximum number of workers that should have the model loaded at the same time.
* @type {number}
* @memberof ReqModel
*/
'num_loaded_max'?: number;
/**
* Minimum number of workers which should have the model loaded once a session to the model gets opened.
* @type {number}
* @memberof ReqModel
*/
'num_loaded_min'?: number;
/**
* Minimum number of workers that should always have the model loaded, regardless of session activity. This allows to minimise the likelihood of computation requests being slower due to model loading.
* @type {number}
* @memberof ReqModel
*/
'num_preloaded_min'?: number;
/**
* Optional organization ID.
* @type {string}
* @memberof ReqModel
*/
'org_id'?: string;
/**
* The Model ID of the previous version of this model. This property is applicable only when creating a new model and cannot be used in conjunction with `prev_id`.
* @type {string}
* @memberof ReqModel
*/
'prev_id'?: string;
/**
* If set to `true`, a new repository will be created for the model. This property is applicable only when creating a new model and cannot be used in conjunction with `prev_id`.
* @type {boolean}
* @memberof ReqModel
*/
'with_repo'?: boolean;
/**
* Allows public access (ignore `accessdomains`).
* @type {boolean}
* @memberof ReqModel
*/
'pub'?: boolean;
/**
* Enforces iframe embedding instead of direct embedding.
* @type {boolean}
* @memberof ReqModel
*/
'require_iframe'?: boolean;
/**
* Enforces token-based authentication for this model.
* @type {boolean}
* @memberof ReqModel
*/
'require_token'?: boolean;
/**
* Limits the number of sessions that can be created by a specific IP address in one hour.
* @type {number}
* @memberof ReqModel
*/
'session_rate_limit'?: number;
/**
* Can this model be trusted (controls whether failed computations will be retried).
* @type {ReqTrustLevel}
* @memberof ReqModel
*/
'trust'?: ReqTrustLevel;
/**
* Allows the usage of the CDN for fast content distribution.
* @type {boolean}
* @memberof ReqModel
*/
'use_cdn'?: boolean;
/**
* Optional user ID.
* @type {string}
* @memberof ReqModel
*/
'user_id'?: string;
/**
* The webhook-url for updating the platform backend about model status changes.
* @type {string}
* @memberof ReqModel
*/
'webhook_url'?: string;
/**
* The webhook-token for authentication used by the webhook-url.
* @type {string}
* @memberof ReqModel
*/
'webhook_token'?: string;
/**
* Allows to control whether the model\'s Grasshopper file can contain scripts.
* @type {boolean}
* @memberof ReqModel
*/
'deny_scripts'?: boolean;
}
/**
* Reasons why the model may be blocked.
* @export
* @interface ReqModelBlockingReasons
*/
export interface ReqModelBlockingReasons {
/**
* The model owner\'s credit limit has been exceeded.
* @type {boolean}
* @memberof ReqModelBlockingReasons
*/
'creditLimit'?: boolean;
/**
* The model has been blocked explicitly by its owner.
* @type {boolean}
* @memberof ReqModelBlockingReasons
*/
'owner'?: boolean;
}
/**
* Model metrics
* @export
* @interface ReqModelCreditMetricId
*/
export interface ReqModelCreditMetricId {
/**
*
* @type {Array<string>}
* @memberof ReqModelCreditMetricId
*/
'modelIds': Array<string>;
}
/**
* Supported Grasshopper file types for models.
* @export
* @enum {string}
*/
export const ReqModelFileType = {
GRASSHOPPER_BINARY: 'gh',
GRASSHOPPER_XML: 'ghx'
} as const;
export type ReqModelFileType = typeof ReqModelFileType[keyof typeof ReqModelFileType];
/**
* Model-Organization metrics
* @export
* @interface ReqModelOrganizationCreditMetricId
*/
export interface ReqModelOrganizationCreditMetricId {
/**
*
* @type {Array<string>}
* @memberof ReqModelOrganizationCreditMetricId
*/
'modelIds': Array<string>;
/**
*
* @type {Array<string>}
* @memberof ReqModelOrganizationCreditMetricId
*/
'orgIds': Array<string>;
}
/**
* Description of a Model-State.
* @export
* @interface ReqModelState
*/
export interface ReqModelState {
/**
*
* @type {ReqCustomization}
* @memberof ReqModelState
*/
'parameters': ReqCustomization;
/**
* Optional untyped data that can be used to store additional information.
* @type {{ [key: string]: any; }}
* @memberof ReqModelState
*/
'data'?: { [key: string]: any; };
/**
* Details of the Model-State image file. If provided, the response will include a URL for uploading the file.
* @type {ReqFileDefinition}
* @memberof ReqModelState
*/
'image'?: ReqFileDefinition;
/**
* The ID of an existing AR scene associated with this model. If provided, the scene\'s glTF and USDZ data will be duplicated into the newly created Model-State.
* @type {string}
* @memberof ReqModelState
*/
'arSceneId'?: string;
}
/**
* Parameters of a single model-session analytics request. When multiple model IDs or timestamps are requested, the resulting response-item represents an aggregation of the requested data.
* @export
* @interface ReqModelStatistic
*/
export interface ReqModelStatistic {
/**
*
* @type {Array<string>}
* @memberof ReqModelStatistic
*/
'modelid': Array<string>;
/**
* Either a single extended date or an array of extended dates. Multiple timestamps are aggregated and result in a single statistic object.
* @type {Array<string>}
* @memberof ReqModelStatistic
*/
'timestamp'?: Array<string>;
/**
* Allows to define the beginning of a time range, instead of specifying individual timestamps.
* @type {string}
* @memberof ReqModelStatistic
*/
'timestamp_from'?: string;
/**
* Allows to define the ending of a time range, instead of specifying individual timestamps.
* @type {string}
* @memberof ReqModelStatistic
*/
'timestamp_to'?: string;
}
/**
* Body of a model statistics request. Every request-item results in exactly one response-item, whereby the order of response-items corresponds to the order of the request-items.
* @export
* @interface ReqModelStatistics
*/
export interface ReqModelStatistics {
/**
*
* @type {Array<ReqModelStatistic>}
* @memberof ReqModelStatistics
*/
'parameters': Array<ReqModelStatistic>;
}
/**
* Model-User metrics
* @export
* @interface ReqModelUserCreditMetricId
*/
export interface ReqModelUserCreditMetricId {
/**
*
* @type {Array<string>}
* @memberof ReqModelUserCreditMetricId
*/
'modelIds': Array<string>;
/**
*
* @type {Array<string>}
* @memberof ReqModelUserCreditMetricId
*/
'userIds': Array<string>;
}
/**
* Organization metrics
* @export
* @interface ReqOrganizationCreditMetricId
*/
export interface ReqOrganizationCreditMetricId {
/**
*
* @type {Array<string>}
* @memberof ReqOrganizationCreditMetricId
*/
'orgIds': Array<string>;
}
/**
* Data for a single output definition.
* @export
* @interface ReqOutputDefinition
*/
export interface ReqOutputDefinition {
/**
* Parameter name to display instead of `name`.
* @type {string}
* @memberof ReqOutputDefinition
*/
'displayname'?: string;
/**
*
* @type {ReqOutputDefinitionGroup}
* @memberof ReqOutputDefinition
*/
'group'?: ReqOutputDefinitionGroup;
/**
* Controls whether the output should be hidden in the UI.
* @type {boolean}
* @memberof ReqOutputDefinition
*/
'hidden'?: boolean;
/**
* Ordering of the output in client applications.
* @type {number}
* @memberof ReqOutputDefinition
*/
'order'?: number;
/**
* Description that is shown as a tooltip in the clients.
* @type {string}
* @memberof ReqOutputDefinition
*/
'tooltip'?: string;
/**
* The chunk definitions of the sdTF file that is generated by the output. If specified, all existing sdTF chunks of the output must be given. The order of the given chunk items determines the order in that the chunks will be shown in the UI.
* @type {Array<ReqOutputDefinitionChunk>}
* @memberof ReqOutputDefinition
*/
'chunks'?: Array<ReqOutputDefinitionChunk>;
}
/**
* Definition of a single \"chunk\" of data in an sdTF file that is generated by the output component.
* @export
* @interface ReqOutputDefinitionChunk
*/
export interface ReqOutputDefinitionChunk {
/**
* ID of the chunk.
* @type {string}
* @memberof ReqOutputDefinitionChunk
*/
'id': string;
/**
* Chunk name to display instead of the chunk `name`. This value can be unset by specifying an empty string.
* @type {string}
* @memberof ReqOutputDefinitionChunk
*/
'displayname'?: string;
/**
* Controls whether the chunk should be hidden in the UI.
* @type {boolean}
* @memberof ReqOutputDefinitionChunk
*/
'hidden'?: boolean;
}
/**
* @type ReqOutputDefinitionGroup
* Set to `null` or `NullObj` to remove the export from the currently assigned group.
* @export
*/
export type ReqOutputDefinitionGroup = NullObj | ReqGroup;
/**
* Definition of outputs. A directory of output-IDs and output-definitions.
* @export
* @interface ReqOutputDefinitions
*/
export interface ReqOutputDefinitions {
[key: string]: ReqOutputDefinition;
}
/**
* Data for a single parameter definition.
* @export
* @interface ReqParameterDefinition
*/
export interface ReqParameterDefinition {
/**
* Parameter name to display instead of `name`.
* @type {string}
* @memberof ReqParameterDefinition
*/
'displayname'?: string;
/**
*
* @type {ReqParameterDefinitionGroup}
* @memberof ReqParameterDefinition
*/
'group'?: ReqParameterDefinitionGroup;
/**
* Controls whether the parameter should be hidden in the UI.
* @type {boolean}
* @memberof ReqParameterDefinition
*/
'hidden'?: boolean;
/**
* Ordering of the parameter in client applications.
* @type {number}
* @memberof ReqParameterDefinition
*/
'order'?: number;
/**
* Description that is shown as a tooltip in the clients.
* @type {string}
* @memberof ReqParameterDefinition
*/
'tooltip'?: string;
/**
* Holds parameter-type specific information.
* @type {object}
* @memberof ReqParameterDefinition
*/
'settings'?: object;
}
/**
* @type ReqParameterDefinitionGroup
* Set to `null` or `NullObj` to remove the export from the currently assigned group.
* @export
*/
export type ReqParameterDefinitionGroup = NullObj | ReqGroup;
/**
* Definition of model parameters. A directory of parameter-IDs and parameter-definitions.
* @export
* @interface ReqParameterDefinitions
*/
export interface ReqParameterDefinitions {
[key: string]: ReqParameterDefinition;
}
/**
* @type ReqParameterValue
* The value of a single model parameter.
* @export
*/
export type ReqParameterValue = ReqBasicParameter | ReqStypeParameter;
/**
* Data for a single sdTF parameter.
* @export
* @interface ReqSdtfDefinition
*/
export interface ReqSdtfDefinition {
/**
* Encoding of the sdTF to be uploaded.
* @type {string}
* @memberof ReqSdtfDefinition
*/
'content_encoding'?: string;
/**
* Size of the sdTF to be uploaded, in bytes.
* @type {number}
* @memberof ReqSdtfDefinition
*/
'content_length': number;
/**
* Content-type of the sdTF to be uploaded.
* @type {ReqSdtfType}
* @memberof ReqSdtfDefinition
*/
'content_type': ReqSdtfType;
/**
* Namespace the asset shall be created in.
* @type {string}
* @memberof ReqSdtfDefinition
*/
'namespace': string;
}
/**
* Content-Type (MIME type) of the sdTF to be uploaded.
* @export
* @enum {string}
*/
export const ReqSdtfType = {
MODEL_SDTF: 'model/vnd.sdtf'
} as const;
export type ReqSdtfType = typeof ReqSdtfType[keyof typeof ReqSdtfType];
/**
* Definition of the value to use for s-type parameters.
* @export
* @interface ReqStypeParameter
*/
export interface ReqStypeParameter {
/**
* Optional embedded value. If this is set the asset is ignored.
* @type {string}
* @memberof ReqStypeParameter
*/
'value'?: string;
/**
*
* @type {CommmonsParameterAsset}
* @memberof ReqStypeParameter
*/
'asset'?: CommmonsParameterAsset;
}
/**
* System-wide metrics
* @export
* @interface ReqSystemCreditMetricId
*/
export interface ReqSystemCreditMetricId {
/**
*
* @type {boolean}
* @memberof ReqSystemCreditMetricId
*/
'systems': boolean;
}
/**
* Body of a ticket request.
* @export
* @interface ReqTicket
*/
export interface ReqTicket {
/**
* List of domains (origins) this ticket should be limited to; may be empty.
* @type {Array<string>}
* @memberof ReqTicket
*/
'accessdomains'?: Array<string>;
/**
* Should this ticket provide access to model authoring (allows to change configuration)?
* @type {boolean}
* @memberof ReqTicket
*/
'author'?: boolean;
/**
* Should this ticket allow public access (ignore the model\'s `accessdomains` property)?
* @type {boolean}
* @memberof ReqTicket
*/
'pub': boolean;
/**
* The timestamp until which the ticket should be valid.
* @type {string}
* @memberof ReqTicket
*/
'until': string;
/**
* Does this ticket identify the model via its secondary ID (model property `id2`)?
* @type {boolean}
* @memberof ReqTicket
*/
'use_id2'?: boolean;
/**
*
* @type {ReqTicketType}
* @memberof ReqTicket
*/
'type': ReqTicketType;
}
/**
* The type of the ticket.
* @export
* @enum {string}
*/
export const ReqTicketType = {
BACKEND: 'backend',
NONE: ''
} as const;
export type ReqTicketType = typeof ReqTicketType[keyof typeof ReqTicketType];
/**
* Level of trust granted for a model.
* @export
* @enum {string}
*/
export const ReqTrustLevel = {
UNDEFINED: '',
NONE: 'none',
FULL: 'full'
} as const;
export type ReqTrustLevel = typeof ReqTrustLevel[keyof typeof ReqTrustLevel];
/**
* User metrics
* @export
* @interface ReqUserCreditMetricId
*/
export interface ReqUserCreditMetricId {
/**
*
* @type {Array<string>}
* @memberof ReqUserCreditMetricId
*/
'userIds': Array<string>;
}
/**
* Defines the actions to be taken on the response data.
* @export
* @interface ResAction
*/
export interface ResAction {
/**
* Name of the action, e.g. customize, close, default, etc.
* @type {string}
* @memberof ResAction
*/
'name': string;
/**
* Title of the action, e.g. \'Customize model\', \'Close session\', etc.
* @type {string}
* @memberof ResAction
*/
'title': string;
/**
* Hyperlink to make the request to.
* @type {string}
* @memberof ResAction
*/
'href': string;
/**
* HTTP method to use.
* @type {string}
* @memberof ResAction
*/
'method': string;
/**
* Template for the request body, references into the \'templates\' array of the response (e.g. \'customize-request\').
* @type {string}
* @memberof ResAction
*/
'template'?: string;
}
/**
* Contains the model checking configuration for the Grasshopper plugins.
* @export
* @interface ResAllowedWorkerPlugin
*/
export interface ResAllowedWorkerPlugin {
/**
* ID of the Grasshopper plugin.
* @type {string}
* @memberof ResAllowedWorkerPlugin
*/
'id': string;
/**
* Name of the Grasshopper plugin.
* @type {string}
* @memberof ResAllowedWorkerPlugin
*/
'name': string;
/**
* Minimum supported version of the plugin.
* @type {string}
* @memberof ResAllowedWorkerPlugin
*/
'minVersion': string;
/**
* Maximum supported version of the plugin.
* @type {string}
* @memberof ResAllowedWorkerPlugin
*/
'maxVersion': string;
/**
* Name of the plugin author.
* @type {string}
* @memberof ResAllowedWorkerPlugin
*/
'authorName'?: string;
/**
* Link to a website related to the plugin.
* @type {string}
* @memberof ResAllowedWorkerPlugin
*/
'description'?: string;
/**
* Link to a website related to the plugin.
* @type {string}
* @memberof ResAllowedWorkerPlugin
*/
'href'?: string;
/**
* When `true` then `GH_AssemblyInfo.AssemblyVersion` may be used instead of `GH_AssemblyInfo.Version` for version checking. Defaults to `false`.
* @type {boolean}
* @memberof ResAllowedWorkerPlugin
*/
'allowFallbackToAssemblyVersion': boolean;
/**
* When `true` then only the major and minor version numbers recorded in Grasshopper models will be checked. Defaults to `false`.
* @type {boolean}
* @memberof ResAllowedWorkerPlugin
*/
'checkMajorMinorVersionOnly': boolean;
/**
* When `false` then the installation check of the plugin will be skipped. Defaults to `true`.
* @type {boolean}
* @memberof ResAllowedWorkerPlugin
*/
'checkIfInstalled': boolean;
/**
* List of previous plugin IDs supported by this plugin version. This is used for the obscure case of the plugin developer changing the plugin ID.
* @type {Array<string>}
* @memberof ResAllowedWorkerPlugin
*/
'previousIds': Array<string>;
/**
* List of plugin components that are explicitly allowed. When this property is set, only the listed components are allowed, overruling the list in `disallowedComponents`.
* @type {Array<ResWorkerPluginComponent>}
* @memberof ResAllowedWorkerPlugin
*/
'allowedComponents': Array<ResWorkerPluginComponent>;
/**
* List of plugin components which may not be used. This list might be overruled by `allowedComponents`.
* @type {Array<ResWorkerPluginComponent>}
* @memberof ResAllowedWorkerPlugin
*/
'disallowedComponents': Array<ResWorkerPluginComponent>;
}
/**
* Analytics components.
* @export
* @interface ResAnalytics
*/
export interface ResAnalytics {
/**
*
* @type {Array<ResModelStatistic>}
* @memberof ResAnalytics
*/
'models': Array<ResModelStatistic>;
/**
*
* @type {Array<ResAnyCreditMetric>}
* @memberof ResAnalytics
*/
'creditMetrics': Array<ResAnyCreditMetric>;
}
/**
* @type ResAnyCreditMetric
* The ID of any type of credit metric.
* @export
*/
export type ResAnyCreditMetric = ResModelCreditMetric | ResModelOrganizationCreditMetric | ResModelUserCreditMetric | ResOrganizationCreditMetric | ResSystemCreditMetric | ResUserCreditMetric;
/**
* Downloads of AR scenes.
* @export
* @interface ResArCreditMetric
*/
export interface ResArCreditMetric {
/**
* Number of AR downloads charged.
* @type {number}
* @memberof ResArCreditMetric
*/
'credits': number;
}
/**
* ShapeDiver API response for asset upload requests.
* @export
* @interface ResAsset
*/
export interface ResAsset {
/**
* A directory of parameter-IDs and asset-definitions.
* @type {{ [key: string]: ResAssetDefinition; }}
* @memberof ResAsset
*/
'file'?: { [key: string]: ResAssetDefinition; };
/**
*
* @type {Array<ResAssetDefinition>}
* @memberof ResAsset
*/
'sdtf'?: Array<ResAssetDefinition>;
/**
* The asset-definition of a Model-State image.
* @type {ResAssetDefinition}
* @memberof ResAsset
*/
'modelState'?: ResAssetDefinition;
}
/**
* Result part for the response to an asset upload request.
* @export
* @interface ResAssetDefinition
*/
export interface ResAssetDefinition {
/**
* ID of the file to be uploaded.
* @type {string}
* @memberof ResAssetDefinition
*/
'id': string;
/**
* href the file should be uploaded to (typically a time-limited pre-signed url).
* @type {string}
* @memberof ResAssetDefinition
*/
'href': string;
/**
*
* @type {ResAssetUploadHeaders}
* @memberof ResAssetDefinition
*/
'headers': ResAssetUploadHeaders;
}
/**
* HTTP headers to use when uploading an asset to ShapeDiver.
* @export
* @interface ResAssetUploadHeaders
*/
export interface ResAssetUploadHeaders {
/**
* The value of the Content-Disposition HTTP header.
* @type {string}
* @memberof ResAssetUploadHeaders
*/
'contentDisposition'?: string;
/**
* The value of the Content-Type HTTP header.
* @type {string}
* @memberof ResAssetUploadHeaders
*/
'contentType': string;
}
/**
*
* @export
* @interface ResAuthorizationSettings
*/
export interface ResAuthorizationSettings {
/**
*
* @type {ResTicketAuthorization}
* @memberof ResAuthorizationSettings
*/
'ticket'?: ResTicketAuthorization;
/**
*
* @type {ResTokenAuthorization}
* @memberof ResAuthorizationSettings
*/
'token'?: ResTokenAuthorization;
}
/**
*
* @export
* @interface ResBase
*/
export interface ResBase {
/**
*
* @type {ResAsset}
* @memberof ResBase
*/
'asset'?: ResAsset;
/**
*
* @type {ResList}
* @memberof ResBase
*/
'list'?: ResList;
/**
*
* @type {ResModelStateOrData}
* @memberof ResBase
*/
'modelState'?: ResModelStateOrData;
/**
*
* @type {ResSystem}
* @memberof ResBase
*/
'system'?: ResSystem;
/**
* Actions the client may take.
* @type {Array<ResAction>}
* @memberof ResBase
*/
'actions'?: Array<ResAction>;
/**
* Statistics of the model for the given timespan.
* @type {ResAnalytics}
* @memberof ResBase
*/
'analytics'?: ResAnalytics;
/**
* The auth-group to use for ticked-based authentication.
* @type {string}
* @memberof ResBase
*/
'auth_group'?: string;
/**
* Model cleanup information.
* @type {Array<ResModelCleanupProcess>}
* @memberof ResBase
*/
'cleanup'?: Array<ResModelCleanupProcess>;
/**
* Decrypted ticket details.
* @type {ResTicket}
* @memberof ResBase
*/
'decryptedTicket'?: ResTicket;
/**
* Exports of the model for the given parameter values. A directory of export-IDs and exports.
* @type {{ [key: string]: ResExportOrDefinition; }}
* @memberof ResBase
*/
'exports'?: { [key: string]: ResExportOrDefinition; };
/**
* Links regarding the model file.
* @type {ResFile}
* @memberof ResBase
*/
'file'?: ResFile;
/**
* glTF information.
* @type {ResGltfUpload}
* @memberof ResBase
*/
'gltf'?: ResGltfUpload;
/**
* Contains urgent information about the system.
* @type {string}
* @memberof ResBase
*/
'message'?: string;
/**
* The definitions of a ShapeDiver model.
* @type {ResModel}
* @memberof ResBase
*/
'model'?: ResModel;
/**
* Statistics about model computations.
* @type {Array<ResModelComputation>}
* @memberof ResBase
*/
'computations'?: Array<ResModelComputation>;
/**
* Outputs of the model for the given parameter values. A directory of output-IDs and outputs.
* @type {{ [key: string]: ResOutputOrDefinition; }}
* @memberof ResBase
*/
'outputs'?: { [key: string]: ResOutputOrDefinition; };
/**
* Pagination information.
* @type {ResPagination}
* @memberof ResBase
*/
'pagination'?: ResPagination;
/**
* Parameter definitions, not contained with every response. A directory of parameter-IDs and parameters.
* @type {{ [key: string]: ResParameter; }}
* @memberof ResBase
*/
'parameters'?: { [key: string]: ResParameter; };
/**
*
* @type {ResPlugins}
* @memberof ResBase
*/
'plugins'?: ResPlugins;
/**
* The ID of the created session.
* @type {string}
* @memberof ResBase
*/
'sessionId'?: string;
/**
* Various settings.
* @type {ResSettings}
* @memberof ResBase
*/
'setting'?: ResSettings;
/**
* Statistics of a model.
* @type {ResStatistic}
* @memberof ResBase
*/
'statistic'?: ResStatistic;
/**
* Request templates for actions.
* @type {Array<ResTemplate>}
* @memberof ResBase
*/
'templates'?: Array<ResTemplate>;
/**
* The ticket to create a model session.
* @type {string}
* @memberof ResBase
*/
'ticket'?: string;
/**
* Version of the Geometry Backend API.
* @type {string}
* @memberof ResBase
*/
'version': string;
/**
* Viewer specific data.
* @type {ResViewer}
* @memberof ResBase
*/
'viewer'?: ResViewer;
/**
* The current version of the viewer settings.
* @type {string}
* @memberof ResBase
*/
'viewerSettingsVersion'?: string;
/**
* An array of warnings encountered during request processing. These warnings indicate potential issues or non-critical conditions but did not prevent the request from being successfully processed.
* @type {Array<string>}
* @memberof ResBase
*/
'warnings'?: Array<string>;
}
/**
*
* @export
* @interface ResBaseAsset
*/
export interface ResBaseAsset {
/**
*
* @type {ResAsset}
* @memberof ResBaseAsset
*/
'asset'?: ResAsset;
}
/**
*
* @export
* @interface ResBaseCreditMetric
*/
export interface ResBaseCreditMetric {
/**
* Either an extended date-time or a \'merged\'-specifier.
* @type {string}
* @memberof ResBaseCreditMetric
*/
'timestamp': string;
/**
* Aggregation for this timestamp has finished.
* @type {boolean}
* @memberof ResBaseCreditMetric
*/
'isCompilationDone': boolean;
/**
*
* @type {ResArCreditMetric}
* @memberof ResBaseCreditMetric
*/
'ar': ResArCreditMetric;
/**
*
* @type {ResLoadingCreditMetric}
* @memberof ResBaseCreditMetric
*/
'loading': ResLoadingCreditMetric;
/**
*
* @type {ResLimitedCreditMetric}
* @memberof ResBaseCreditMetric
*/
'limited': ResLimitedCreditMetric;
/**
*
* @type {ResDefaultCreditMetric}
* @memberof ResBaseCreditMetric
*/
'default': ResDefaultCreditMetric;
}
/**
*
* @export
* @interface ResBaseList
*/
export interface ResBaseList {
/**
*
* @type {ResList}
* @memberof ResBaseList
*/
'list'?: ResList;
}
/**
*
* @export
* @interface ResBaseModelState
*/
export interface ResBaseModelState {
/**
*
* @type {ResModelStateOrData}
* @memberof ResBaseModelState
*/
'modelState'?: ResModelStateOrData;
}
/**
*
* @export
* @interface ResBaseSystem
*/
export interface ResBaseSystem {
/**
*
* @type {ResSystem}
* @memberof ResBaseSystem
*/
'system'?: ResSystem;
}
/**
* @type ResBasicParameter
* Definition of a basic ShapeDiver parameter.
* @export
*/
export type ResBasicParameter = boolean | number | string;
/**
*
* @export
* @interface ResCleanupExports
*/
export interface ResCleanupExports {
/**
* Version of the Geometry Backend API.
* @type {string}
* @memberof ResCleanupExports
*/
'version': string;
}
/**
*
* @export
* @interface ResCleanupOutputs
*/
export interface ResCleanupOutputs {
/**
* Version of the Geometry Backend API.
* @type {string}
* @memberof ResCleanupOutputs
*/
'version': string;
}
/**
*
* @export
* @interface ResCleanupTextures
*/
export interface ResCleanupTextures {
/**
* Version of the Geometry Backend API.
* @type {string}
* @memberof ResCleanupTextures
*/
'version': string;
}
/**
*
* @export
* @interface ResCloseSession
*/
export interface ResCloseSession {
/**
* Version of the Geometry Backend API.
* @type {string}
* @memberof ResCloseSession
*/
'version': string;
}
/**
* Information about the components taking most computation time in the model computations log.
* @export
* @interface ResComputationComponent
*/
export interface ResComputationComponent {
/**
* Components which were computed, ordered by descending processor time.
* @type {Array<ResComputedComponent>}
* @memberof ResComputationComponent
*/
'computed': Array<ResComputedComponent>;
/**
* Components which were currently computing at the time the computation was stopped.
* @type {Array<ResComputingComponent>}
* @memberof ResComputationComponent
*/
'computing': Array