import { toQueryString } from "../../utils" ; import { SdkClient } from "../common/sdk-client" ; import { DeploymentWorkflowModels , DeviceConfigurationModels , DeviceManagementModels , DeviceStatusModels , EdgeAppDeploymentModels , EdgeAppInstanceModels , FirmwareDeploymentModels , } from "./open-edge-models" ; export class extends SdkClient export class DeviceManagementClient extends SdkClient { private _baseUrl : string = "/api/devicemanagement/v3" ; summary param { { owner ? : string ; code ? : string ; assetTypeId ? : string ; page ? : number ; size ? : number ; sort ? : string ; * } } params param { string } params . owner param { string } params . code param { string } params . assetTypeId param { number } params . size param { number } params . page param { string } params . sort example example returns { Promise < DeviceManagementModels . PaginatedDeviceType > } memberOf public async GetDeviceTypes ( params ? ) { const parameters = params || { } ; const { owner , code , assetTypeId , page , size , sort } = parameters ; const result = await this . HttpAction ( { verb : "GET" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/deviceTypes?${ toQueryString ( { owner , code , assetTypeId , page , size , sort } ) }` , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as DeviceManagementModels . PaginatedDeviceType ; } summary param { string } id returns { Promise < DeviceManagementModels . DeviceType > } example memberOf public async GetDeviceType ( id ) { if ( id === null || id === undefined ) { throw new DeviceManagementModels . RequiredError ( "id" , "Required parameter id was null or undefined when calling GetDeviceType." ) ; } const result = await this . HttpAction ( { verb : "GET" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/deviceTypes/${ id }` , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as DeviceManagementModels . DeviceType ; } summary param { DeviceType } deviceType returns { Promise < DeviceManagementModels . DeviceType > } example memberOf public async PostDeviceType ( deviceType ) { if ( deviceType === null || deviceType === undefined ) { throw new DeviceManagementModels . RequiredError ( "deviceType" , "Required parameter deviceType was null or undefined when calling PostDeviceType." ) ; } const result = await this . HttpAction ( { verb : "POST" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/deviceTypes` , body : deviceType , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as DeviceManagementModels . DeviceType ; } summary param { string } id param { DeviceManagementModels . DeviceTypeUpdate } deviceType returns { Promise < DeviceManagementModels . DeviceType > } example memberOf public async PatchDeviceType ( id , deviceType ) { if ( id === null || id === undefined ) { throw new DeviceManagementModels . RequiredError ( "id" , "Required parameter id was null or undefined when calling PatchDeviceType." ) ; } if ( deviceType === null || deviceType === undefined ) { throw new DeviceManagementModels . RequiredError ( "deviceType" , "Required parameter deviceType was null or undefined when calling PatchDeviceType." ) ; } const result = await this . HttpAction ( { verb : "PATCH" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/deviceTypes/${ id }` , body : deviceType , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as DeviceManagementModels . DeviceType ; } summary param { string } id example memberOf public async DeleteDeviceType ( id ) { if ( id === null || id === undefined ) { throw new DeviceManagementModels . RequiredError ( "id" , "Required parameter id was null or undefined when calling DeleteDeviceType." ) ; } try { await this . HttpAction ( { verb : "DELETE" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/deviceTypes/${ id }` , noResponse : true , } ) ; } catch ( error ) { console . error ( "At the time of creation of this client (May 2021), MindSphere didn't have any support for DELETE operation on  device-types." ) ; console . error ( "This was reported to mindsphere development team and should eventually start working." ) ; throw error ; } } summary summary param { { assetId ? : string ; page ? : number ; size ? : number ; * } } params param { number } params . size param { number } params . page param { string } params . assetId example example returns { Promise < DeviceManagementModels . PaginatedDevice > } memberOf public async GetDevices ( params ? ) { const parameters = params || { } ; const { assetId , page , size } = parameters ; const result = await this . HttpAction ( { verb : "GET" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/devices?${ toQueryString ( { assetId , page , size } ) }` , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as DeviceManagementModels . PaginatedDevice ; } summary param { string } id returns { Promise < DeviceManagementModels . Device > } example memberOf public async GetDevice ( id ) { if ( id === null || id === undefined ) { throw new DeviceManagementModels . RequiredError ( "id" , "Required parameter id was null or undefined when calling GetDevice." ) ; } const result = await this . HttpAction ( { verb : "GET" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/devices/${ id }` , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as DeviceManagementModels . Device ; } summary param { string } id param { DeviceManagementModels . DeviceUpdate } deviceMetadata returns { Promise < Device > } example memberOf public async PatchDevice ( id , deviceMetadata ) { if ( id === null || id === undefined ) { throw new DeviceManagementModels . RequiredError ( "id" , "Required parameter id was null or undefined when calling PatchDevice." ) ; } if ( deviceMetadata === null || deviceMetadata === undefined ) { throw new DeviceManagementModels . RequiredError ( "deviceMetadata" , "Required parameter deviceMetadata was null or undefined when calling PatchDevice." ) ; } const result = await this . HttpAction ( { verb : "PATCH" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/devices/${ id }` , body : deviceMetadata , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as DeviceManagementModels . Device ; } summary param { DeviceManagementModels . DeviceCreation } deviceMetadata returns { Promise < DeviceManagementModels . Device } example memberOf public async PostDevice ( deviceMetadata ) { if ( deviceMetadata === null || deviceMetadata === undefined ) { throw new DeviceManagementModels . RequiredError ( "deviceMetadata" , "Required parameter deviceMetadata was null or undefined when calling PostDevice." ) ; } const result = await this . HttpAction ( { verb : "POST" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/devices` , body : deviceMetadata , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as DeviceManagementModels . Device ; } summary param { string } id example memberOf public async DeleteDevice ( id ) { if ( id === null || id === undefined ) { throw new DeviceManagementModels . RequiredError ( "id" , "Required parameter id was null or undefined when calling DeleteDevice." ) ; } await this . HttpAction ( { verb : "DELETE" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/devices/${ id }` , noResponse : true , } ) ; } } export class extends SdkClient export class DeviceStatusManagementClient extends SdkClient { private _baseUrl : string = "/api/devicestatus/v3" ; summary param { string } id param { DeviceStatusModels . DeviceHealthStatusReportInput } healthStatusReport throws memberof public async PatchDeviceHealth ( id , healthStatusReport ) { if ( id === null || id === undefined ) { throw new DeviceStatusModels . RequiredError ( "id" , "Required parameter id was null or undefined when calling PatchDeviceHealth." ) ; } if ( healthStatusReport === null || healthStatusReport === undefined ) { throw new DeviceStatusModels . RequiredError ( "healthStatusReport" , "Required parameter healthStatusReport was null or undefined when calling PatchDeviceHealth." ) ; } const result = await this . HttpAction ( { verb : "PATCH" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/devices/${ id }/health` , body : healthStatusReport , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as DeviceStatusModels . DeviceHealthStatusReport ; } summary param { string } id throws memberof public async GetDeviceHealth ( id ) { if ( id === null || id === undefined ) { throw new DeviceStatusModels . RequiredError ( "id" , "Required parameter id was null or undefined when calling GetDeviceHealth." ) ; } const result = await this . HttpAction ( { verb : "GET" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/devices/${ id }/health` , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as DeviceStatusModels . DeviceHealthStatusReport ; } summary param { string } id param { DeviceStatusModels . DataConfigHealthInput } dataConfig throws memberof public async PatchDeviceHealthDataConfig ( id , dataConfig ) { if ( id === null || id === undefined ) { throw new DeviceStatusModels . RequiredError ( "id" , "Required parameter id was null or undefined when calling PatchDeviceHealthDataConfig." ) ; } if ( dataConfig === null || dataConfig === undefined ) { throw new DeviceStatusModels . RequiredError ( "dataConfig" , "Required parameter dataConfig was null or undefined when calling PatchDeviceHealthDataConfig." ) ; } const result = await this . HttpAction ( { verb : "PATCH" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/devices/${ id }/health/dataConfig` , body : dataConfig , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as DeviceStatusModels . DataConfigHealth ; } summary param { string } id throws memberof public async GetDeviceHealthDataConfig ( id ) { if ( id === null || id === undefined ) { throw new DeviceStatusModels . RequiredError ( "id" , "Required parameter id was null or undefined when calling GetDeviceHealthDataConfig." ) ; } const result = await this . HttpAction ( { verb : "GET" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/devices/${ id }/health/dataConfig` , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as DeviceStatusModels . DeviceHealthStatusReport ; } summary param { string } id throws memberof public async PostDeviceHeartbeat ( id ) { if ( id === null || id === undefined ) { throw new DeviceStatusModels . RequiredError ( "id" , "Required parameter id was null or undefined when calling PostDeviceHeartbeat." ) ; } const result = await this . HttpAction ( { verb : "POST" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/devices/${ id }/sendHeartbeat/` , rawResponse : true , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as Response ; } summary param { string } id throws memberof public async GetDeviceConnectionStatus ( id ) { if ( id === null || id === undefined ) { throw new DeviceStatusModels . RequiredError ( "id" , "Required parameter id was null or undefined when calling GetDeviceConnectionStatus." ) ; } const result = await this . HttpAction ( { verb : "GET" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/devices/${ id }/connectionStatus` , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as DeviceStatusModels . OnlineStatus ; } summary param { string } id param { 'FIRMWARE' | 'APP' } type param { string } softwareId param { number } size param { number } page throws memberof public async GetDeviceSoftwares ( id , type ? , softwareId ? , page ? , size ? ) { if ( id === null || id === undefined ) { throw new DeviceStatusModels . RequiredError ( "id" , "Required parameter id was null or undefined when calling GetDeviceSoftwares." ) ; } const result = await this . HttpAction ( { verb : "GET" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/devices/${ id }/software?${ toQueryString ( { type , softwareId , size , page } ) }` , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as DeviceStatusModels . PaginatedSoftwareInventoryRecord ; } summary param { string } id param { 'FIRMWARE' | 'APP' } type throws memberof public async GetDeviceInventory ( id , type ? ) { if ( id === null || id === undefined ) { throw new DeviceStatusModels . RequiredError ( "id" , "Required parameter id was null or undefined when calling GetDeviceInventory." ) ; } const result = await this . HttpAction ( { verb : "GET" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/devices/${ id }/inventory?${ toQueryString ( { type } ) }` , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as DeviceStatusModels . InventoryArray ; } summary param { string } id param { Array < DeviceStatusModels . InventoryEntry > } installationSoftwareInventory throws memberof public async PatchDeviceSoftwareInventory ( id , installationSoftwareInventory ) { if ( id === null || id === undefined ) { throw new DeviceStatusModels . RequiredError ( "id" , "Required parameter id was null or undefined when calling PatchDeviceSoftwareInventory." ) ; } if ( installationSoftwareInventory === null || installationSoftwareInventory === undefined ) { throw new DeviceStatusModels . RequiredError ( "installationSoftwareInventory" , "Required parameter installationSoftwareInventory was null or undefined when calling PatchDeviceSoftwareInventory." ) ; } const result = await this . HttpAction ( { verb : "PATCH" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/devices/${ id }/inventory` , body : installationSoftwareInventory , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as Array < DeviceStatusModels . InventoryEntry > ; } summary param { string } id param { Array < DeviceStatusModels . InventoryFirmwareEntry > } installationFirmwareInventory throws memberof public async PatchDeviceFirmwareInventory ( id , installationFirmwareInventory ) { if ( id === null || id === undefined ) { throw new DeviceStatusModels . RequiredError ( "id" , "Required parameter id was null or undefined when calling PatchDeviceFirmwareInventory." ) ; } if ( installationFirmwareInventory === null || installationFirmwareInventory === undefined ) { throw new DeviceStatusModels . RequiredError ( "installationFirmwareInventory" , "Required parameter installationFirmwareInventory was null or undefined when calling PatchDeviceFirmwareInventory." ) ; } const result = await this . HttpAction ( { verb : "PATCH" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/devices/${ id }/inventory/firmware` , body : installationFirmwareInventory , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as Array < DeviceStatusModels . InventoryEntry > ; } summary param { string } id param { Array < DeviceStatusModels . InventoryApplicationEntry > } installationApplicationInventory throws memberof public async PatchDeviceApplicationInventory ( id , installationApplicationInventory ) { if ( id === null || id === undefined ) { throw new DeviceStatusModels . RequiredError ( "id" , "Required parameter id was null or undefined when calling PatchDeviceApplicationInventory." ) ; } if ( installationApplicationInventory === null || installationApplicationInventory === undefined ) { throw new DeviceStatusModels . RequiredError ( "installationApplicationInventory" , "Required parameter installationApplicationInventory was null or undefined when calling PatchDeviceApplicationInventory." ) ; } const result = await this . HttpAction ( { verb : "PATCH" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/devices/${ id }/inventory/apps` , body : installationApplicationInventory , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as DeviceStatusModels . InventoryApplicationArray ; } } export class extends SdkClient export class DeviceConfigurationClient extends SdkClient { private _baseUrl : string = "/api/deviceconfiguration/v3" ; summary param { string } id param { number } size param { number } page param { string } sort returns { Promise < DeviceConfigurationModels . PaginatedConfigurationTask > } throws example memberof public async GetConfigurationTasks ( id , size ? , page ? , sort ? ) { if ( id === null || id === undefined ) { throw new DeviceConfigurationModels . RequiredError ( "deviceId" , "Required parameter id was null or undefined when calling GetConfigurationTasks." ) ; } const result = await this . HttpAction ( { verb : "GET" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/devices/${ id }/configurationTasks?${ toQueryString ( { size , page , sort } ) }` , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as DeviceConfigurationModels . PaginatedConfigurationTask ; } summary param { string } id param { string } taskId returns { Promise < DeviceConfigurationModels . ConfigurationTask > } throws example memberOf public async GetDeviceConfigurationTask ( id , taskId ) { if ( id === null || id === undefined ) { throw new DeviceConfigurationModels . RequiredError ( "id" , "Required parameter id was null or undefined when calling GetDeviceConfigurationTask." ) ; } if ( taskId === null || taskId === undefined ) { throw new DeviceConfigurationModels . RequiredError ( "taskId" , "Required parameter taskId was null or undefined when calling GetDeviceConfigurationTask." ) ; } const result = await this . HttpAction ( { verb : "GET" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/devices/${ id }/configurationTasks/${ taskId }` , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as DeviceConfigurationModels . ConfigurationTask ; } summary param { string } id param { DeviceConfigurationModels . TaskDefinition } taskDefinition returns { Promise < DeviceConfigurationModels . ConfigurationTask > } throws example memberOf public async PostNewDeploymentTaskConfiguration ( id , taskDefinition ) { if ( id === null || id === undefined ) { throw new DeviceConfigurationModels . RequiredError ( "id" , "Required parameter id was null or undefined when calling PostNewDeploymentTaskConfiguration." ) ; } if ( taskDefinition === null || taskDefinition === undefined ) { throw new DeviceConfigurationModels . RequiredError ( "taskDefinition" , "Required parameter taskDefinition was null or undefined when calling PostNewDeploymentTaskConfiguration." ) ; } const result = await this . HttpAction ( { verb : "POST" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/devices/${ id }/configurationTasks` , body : taskDefinition , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as DeviceConfigurationModels . ConfigurationTask ; } summary param { string } id param { string } taskId param { DeviceConfigurationModels . Updatetask } progressReport returns { Promise < DeviceConfigurationModels . ConfigurationTask > } example memberOf public async PatchDeploymentTaskConfiguration ( id , taskId , progressReport ) { if ( id === null || id === undefined ) { throw new DeviceConfigurationModels . RequiredError ( "id" , "Required parameter id was null or undefined when calling PatchDeploymentTaskConfiguration." ) ; } if ( taskId === null || taskId === undefined ) { throw new DeviceConfigurationModels . RequiredError ( "taskId" , "Required parameter taskId was null or undefined when calling PatchDeploymentTaskConfiguration." ) ; } if ( progressReport === null || progressReport === undefined ) { throw new DeviceConfigurationModels . RequiredError ( "progressReport" , "Required parameter progressReport was null or undefined when calling PatchDeploymentTaskConfiguration." ) ; } const result = await this . HttpAction ( { verb : "PATCH" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/devices/${ id }/configurationTasks/${ taskId }` , body : progressReport , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as DeviceConfigurationModels . ConfigurationTask ; } summary param { string } pathPrefix param { number } size param { number } page param { string } sort returns { Promise < DeviceConfigurationModels . PaginatedFileMetaData > } throws example memberof public async GetFiles ( pathPrefix , size ? , page ? , sort ? ) { if ( pathPrefix === null || pathPrefix === undefined ) { throw new DeviceConfigurationModels . RequiredError ( "pathPrefix" , "Required parameter pathPrefix was null or undefined when calling GetFiles." ) ; } const result = await this . HttpAction ( { verb : "GET" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/files?${ toQueryString ( { pathPrefix , size , page , sort } ) }` , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as DeviceConfigurationModels . PaginatedFileMetaData ; } summary param { string } id returns { Promise < DeviceConfigurationModels . FileMetaData > } throws example memberOf public async GetFileMetadata ( id ) { if ( id === null || id === undefined ) { throw new DeviceConfigurationModels . RequiredError ( "id" , "Required parameter id was null or undefined when calling GetFileMetadata." ) ; } const result = await this . HttpAction ( { verb : "GET" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/files/${ id }` , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as DeviceConfigurationModels . FileMetaData ; } summary param { DeviceConfigurationModels . ConfigurationFile } file returns { Promise < DeviceConfigurationModels . FileMetaData > } throws example memberOf public async PostNewFile ( file ) { if ( file === null || file === undefined ) { throw new DeviceConfigurationModels . RequiredError ( "file" , "Required parameter file was null or undefined when calling PostNewFile." ) ; } const result = await this . HttpAction ( { verb : "POST" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/files` , body : file , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as DeviceConfigurationModels . FileMetaData ; } summary param { string } id param { DeviceConfigurationModels . Payload } content param { string } contentType returns { Promise < DeviceConfigurationModels . FileMetaData > } example memberOf public async PatchFileHead ( id , content , contentType ? ) { if ( id === null || id === undefined ) { throw new DeviceConfigurationModels . RequiredError ( "id" , "Required parameter id was null or undefined when calling PatchFileHead." ) ; } if ( content === null || content === undefined ) { throw new DeviceConfigurationModels . RequiredError ( "content" , "Required parameter content was null or undefined when calling PatchFileHead." ) ; } const result = await this . HttpAction ( { verb : "PATCH" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/files/${ id }/head` , body : content , additionalHeaders : { "Content-Type" : contentType ? contentType : "*/*" } , } ) ; return result as DeviceConfigurationModels . FileMetaData ; } summary param { string } id example memberOf public async DeleteFile ( id ) { if ( id === null || id === undefined ) { throw new DeviceConfigurationModels . RequiredError ( "id" , "Required parameter id was null or undefined when calling DeleteFile." ) ; } await this . HttpAction ( { verb : "DELETE" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/files/${ id }` , noResponse : true , } ) ; } summary param { string } id param { number } size param { number } page param { string } sort returns { Promise < DeviceConfigurationModels . PaginatedRevisionMetaData > } throws example memberof public async GetFileRevisions ( id , size ? , page ? , sort ? ) { if ( id === null || id === undefined ) { throw new DeviceConfigurationModels . RequiredError ( "id" , "Required parameter id was null or undefined when calling GetFiles." ) ; } const result = await this . HttpAction ( { verb : "GET" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/files/${ id }/revisions?${ toQueryString ( { size , page , sort } ) }` , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as DeviceConfigurationModels . PaginatedRevisionMetaData ; } summary param { string } id param { string } hash returns { Promise < DeviceConfigurationModels . RevisionMetaData > } throws example memberOf public async GetFileRevisionMetadata ( id , hash ) { if ( id === null || id === undefined ) { throw new DeviceConfigurationModels . RequiredError ( "id" , "Required parameter id was null or undefined when calling GetFileRevisionMetadata." ) ; } if ( hash === null || hash === undefined ) { throw new DeviceConfigurationModels . RequiredError ( "hash" , "Required parameter hash was null or undefined when calling GetFileRevisionMetadata." ) ; } const result = await this . HttpAction ( { verb : "GET" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/files/${ id }/revisions/${ hash }` , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as DeviceConfigurationModels . RevisionMetaData ; } summary param { string } id param { string } hash param { string } accept returns { Promise < DeviceConfigurationModels . Payload > } throws example memberOf public async GetFileRevisionContent ( id , hash , accept ? ) { if ( id === null || id === undefined ) { throw new DeviceConfigurationModels . RequiredError ( "id" , "Required parameter id was null or undefined when calling GetFileRevisionContent." ) ; } if ( hash === null || hash === undefined ) { throw new DeviceConfigurationModels . RequiredError ( "hash" , "Required parameter hash was null or undefined when calling GetFileRevisionContent." ) ; } const result = await this . HttpAction ( { verb : "GET" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/files/${ id }/revisions/${ hash }/content` , additionalHeaders : { Accept : accept ? accept : "application/octet-stream" } , } ) ; return result as DeviceConfigurationModels . Payload ; } summary param { string } id param { Payload } content param { string } contentType returns { Promise < DeviceConfigurationModels . RevisionMetaData > } throws example memberOf public async PostFileRevision ( id , content , contentType ? ) { if ( id === null || id === undefined ) { throw new DeviceConfigurationModels . RequiredError ( "id" , "Required parameter id was null or undefined when calling PostFileRevision." ) ; } if ( content === null || content === undefined ) { throw new DeviceConfigurationModels . RequiredError ( "content" , "Required parameter content was null or undefined when calling PostFileRevision." ) ; } const result = await this . HttpAction ( { verb : "POST" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/files/${ id }/revisions` , body : content , additionalHeaders : { "Content-Type" : contentType ? contentType : "application/octet-stream" } , } ) ; return result as DeviceConfigurationModels . RevisionMetaData ; } } export class extends SdkClient export class DeploymentWorkflowClient extends SdkClient { private _baseUrl : string = "/api/deploymentworkflow/v3" ; summary param { string } modelKey returns { Promise < DeploymentWorkflowModels . Model > } throws example memberOf public async GetWorkflowModel ( modelKey ) { if ( modelKey === null || modelKey === undefined ) { throw new DeploymentWorkflowModels . RequiredError ( "id" , "Required parameter id was null or undefined when calling GetWorkflowModel." ) ; } const result = await this . HttpAction ( { verb : "GET" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/models/${ modelKey }` , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as DeploymentWorkflowModels . Model ; } summary param { Model } model returns { Promise < DeploymentWorkflowModels . Model > } throws example memberOf public async PostNewWorkflowModel ( model ) { if ( model === null || model === undefined ) { throw new DeploymentWorkflowModels . RequiredError ( "model" , "Required parameter id was null or undefined when calling PostNewWorkflowModel." ) ; } const result = await this . HttpAction ( { verb : "POST" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/models` , body : model , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as DeploymentWorkflowModels . Model ; } summary param { string } modelKey example memberOf public async DeleteWorkflowModel ( modelKey ) { if ( modelKey === null || modelKey === undefined ) { throw new DeploymentWorkflowModels . RequiredError ( "modelKey" , "Required parameter modelKey was null or undefined when calling DeleteWorkflowModel." ) ; } await this . HttpAction ( { verb : "DELETE" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/models/${ modelKey }` , noResponse : true , } ) ; } summary param { boolean } model param { boolean } history param { string } currentState param { string } group param { string } deviceId param { string } modelKey returns { Promise < DeploymentWorkflowModels . PaginatedFileMetaData > } throws example memberof public async GetWorkflowInstances ( model ? , history ? , currentState ? , group ? , deviceId ? , modelKey ? ) { const result = await this . HttpAction ( { verb : "GET" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/instances?${ toQueryString ( { model , history , currentState , group , deviceId , modelKey , } ) }` , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as DeploymentWorkflowModels . PaginatedInstanceList ; } summary param { string } id param { boolean } model param { boolean } history returns { Promise < DeploymentWorkflowModels . Instance > } throws example memberOf public async GetWorkflowInstance ( id , model ? , history ? ) { if ( id === null || id === undefined ) { throw new DeploymentWorkflowModels . RequiredError ( "id" , "Required parameter id was null or undefined when calling GetWorkflowInstance." ) ; } const result = await this . HttpAction ( { verb : "GET" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/instances/${ id }?${ toQueryString ( { model , history } ) }` , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as DeploymentWorkflowModels . Instance ; } summary param { DeploymentWorkflowModels . InstanceRequest } workflowInstance param { boolean } model param { boolean } history returns { Promise < DeploymentWorkflowModels . Instance > } throws example memberOf public async PostNewWorflowInstance ( workflowInstance , model ? , history ? ) { if ( workflowInstance === null || workflowInstance === undefined ) { throw new DeploymentWorkflowModels . RequiredError ( "workflowInstance" , "Required parameter workflowInstance was null or undefined when calling instancesPost." ) ; } const result = await this . HttpAction ( { verb : "POST" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/instances?${ toQueryString ( { model , history } ) }` , body : workflowInstance , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as DeploymentWorkflowModels . Instance ; } summary param { string } id param { StateInfo } stateInfo param { boolean } history param { boolean } model param { string } contentType returns { Promise < DeploymentWorkflowModels . Instance > } example memberOf public async PatchWorkflowInstance ( id , stateInfo , history ? , model ? ) { if ( id === null || id === undefined ) { throw new DeploymentWorkflowModels . RequiredError ( "id" , "Required parameter id was null or undefined when calling PatchWorkflowInstance." ) ; } if ( stateInfo === null || stateInfo === undefined ) { throw new DeploymentWorkflowModels . RequiredError ( "stateInfo" , "Required parameter stateInfo was null or undefined when calling PatchWorkflowInstance." ) ; } const result = await this . HttpAction ( { verb : "PATCH" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/instances/${ id }?${ toQueryString ( { model , history } ) }` , body : stateInfo , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as DeploymentWorkflowModels . Instance ; } summary param { string } id param { boolean } history param { boolean } model example memberOf public async PostToCancelWorkflowInstance ( id , history ? , model ? ) { if ( id === null || id === undefined ) { throw new DeploymentWorkflowModels . RequiredError ( "id" , "Required parameter id was null or undefined when calling DeleteFile." ) ; } const result = await this . HttpAction ( { verb : "POST" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/instances/${ id }/cancel?${ toQueryString ( { model , history } ) }` , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as DeploymentWorkflowModels . Instance ; } } export class extends SdkClient export class EdgeAppInstanceManagementClient extends SdkClient { private _baseUrl : string = "/api/edgeappinstancemanagement/v3" ; summary param { string } deviceId param { number } size param { number } page param { string } sort returns { Promise < EdgeAppInstanceModels . PaginatedApplicationInstance > } throws example memberof public async GetAppInstances ( deviceId , size ? , page ? , sort ? ) { if ( deviceId === null || deviceId === undefined ) { throw new EdgeAppInstanceModels . RequiredError ( "deviceId" , "Required parameter deviceId was null or undefined when calling GetAppInstances." ) ; } const result = await this . HttpAction ( { verb : "GET" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/appInstances?${ toQueryString ( { deviceId , size , page , sort } ) }` , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as EdgeAppInstanceModels . PaginatedApplicationInstance ; } summary param { string } id returns { Promise < EdgeAppInstanceModels . ApplicationInstanceLifeCycleResource > } throws example memberOf public async GetAppInstanceLifecycle ( id ) { if ( id === null || id === undefined ) { throw new EdgeAppInstanceModels . RequiredError ( "id" , "Required parameter id was null or undefined when calling GetAppInstanceLifecycle." ) ; } const result = await this . HttpAction ( { verb : "GET" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/appInstances/${ id }/lifecycle` , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as EdgeAppInstanceModels . ApplicationInstanceLifeCycleResource ; } summary param { string } id throws example memberOf public async DeleteAppInstance ( id ) { if ( id === null || id === undefined ) { throw new EdgeAppInstanceModels . RequiredError ( "id" , "Required parameter id was null or undefined when calling instanceConfigurationsIdDelete." ) ; } const baseUrl = `${ this . _baseUrl }/appInstances/${ id }` . replace ( `{${ "id" }}` , encodeURIComponent ( String ( id ) ) ) ; await this . HttpAction ( { verb : "DELETE" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : baseUrl , noResponse : true , } ) ; } summary param { EdgeAppInstanceModels . ApplicationInstance } applicationInstance returns { Promise < EdgeAppInstanceModels . ApplicationInstance > } example memberOf public async PostAppInstance ( applicationInstance ) { if ( applicationInstance === null || applicationInstance === undefined ) { throw new EdgeAppInstanceModels . RequiredError ( "instanceConfiguration" , "Required parameter applicationInstance was null or undefined when calling PostAppInstance." ) ; } const result = await this . HttpAction ( { verb : "POST" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/appInstances` , body : applicationInstance , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as EdgeAppInstanceModels . ApplicationInstanceResource ; } summary param { string } id param { EdgeAppInstanceModels . ApplicationInstanceLifeCycleStatus } applicationInstanceStatus returns { Promise < EdgeAppInstanceModels . ApplicationInstanceLifeCycleResource > } example memberOf public async PatchAppInstanceStatus ( id , applicationInstanceStatus ) { if ( id === null || id === undefined ) { throw new EdgeAppInstanceModels . RequiredError ( "id" , "Required parameter id was null or undefined when calling PatchAppInstanceStatus." ) ; } if ( applicationInstanceStatus === null || applicationInstanceStatus === undefined ) { throw new EdgeAppInstanceModels . RequiredError ( "instanceConfiguration" , "Required parameter instanceConfiguration was null or undefined when calling PatchAppInstanceStatus." ) ; } const result = await this . HttpAction ( { verb : "PATCH" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/appInstances/${ id }/lifecycle` , body : applicationInstanceStatus , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as EdgeAppInstanceModels . ApplicationInstanceLifeCycleResource ; } summary param { string } deviceId param { number } size param { number } page param { string } sort returns { Promise < EdgeAppInstanceModels . PaginatedInstanceConfigurationResource > } throws example memberof public async GetAppInstanceConfigurations ( deviceId , size ? , page ? , sort ? ) { if ( deviceId === null || deviceId === undefined ) { throw new EdgeAppInstanceModels . RequiredError ( "deviceId" , "Required parameter deviceId was null or undefined when calling GetAppInstanceConfigurations." ) ; } const result = await this . HttpAction ( { verb : "GET" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/instanceConfigurations?${ toQueryString ( { deviceId , size , page , sort } ) }` , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as EdgeAppInstanceModels . PaginatedInstanceConfigurationResource ; } summary param { string } id returns { Promise < EdgeAppInstanceModels . InstanceConfigurationResource > } throws example memberOf public async GetAppInstanceConfiguration ( id ) { if ( id === null || id === undefined ) { throw new EdgeAppInstanceModels . RequiredError ( "id" , "Required parameter id was null or undefined when calling GetAppInstanceConfiguration." ) ; } const result = await this . HttpAction ( { verb : "GET" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/instanceConfigurations/${ id }` , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as EdgeAppInstanceModels . InstanceConfigurationResource ; } summary param { string } id throws example memberOf public async DeleteAppInstanceConfiguration ( id ) { if ( id === null || id === undefined ) { throw new EdgeAppInstanceModels . RequiredError ( "id" , "Required parameter id was null or undefined when calling instanceConfigurationsIdDelete." ) ; } const baseUrl = `${ this . _baseUrl }/instanceConfigurations/${ id }` . replace ( `{${ "id" }}` , encodeURIComponent ( String ( id ) ) ) ; await this . HttpAction ( { verb : "DELETE" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : baseUrl , noResponse : true , } ) ; } summary param { EdgeAppInstanceModels . InstanceConfiguration } instanceConfiguration returns { Promise < EdgeAppInstanceModels . InstanceConfigurationResource > } example memberOf public async PostAppInstanceConfigurations ( instanceConfiguration ) { if ( instanceConfiguration === null || instanceConfiguration === undefined ) { throw new EdgeAppInstanceModels . RequiredError ( "instanceConfiguration" , "Required parameter instanceConfiguration was null or undefined when calling PostAppInstanceConfigurations." ) ; } const result = await this . HttpAction ( { verb : "POST" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/instanceConfigurations` , body : instanceConfiguration , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as EdgeAppInstanceModels . InstanceConfigurationResource ; } summary param { EdgeAppInstanceModels . ProcessInstanceConfiguration } configurations example memberOf public async PatchAppInstanceConfigurations ( configurations ) { if ( configurations === null || configurations === undefined ) { throw new EdgeAppInstanceModels . RequiredError ( "configurations" , "Required parameter configurations was null or undefined when calling PatchAppInstanceConfigurations." ) ; } await this . HttpAction ( { verb : "PATCH" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/instanceConfigurations` , body : configurations , additionalHeaders : { "Content-Type" : "application/json" } , noResponse : true , } ) ; } summary param { string } id param { EdgeAppInstanceModels . InstanceConfiguration } instanceConfiguration returns { Promise < EdgeAppInstanceModels . InstanceConfigurationResource > } example memberOf public async PatchAppInstanceConfigurationData ( id , instanceConfiguration ) { if ( id === null || id === undefined ) { throw new EdgeAppInstanceModels . RequiredError ( "id" , "Required parameter id was null or undefined when calling PatchAppInstanceConfigurationData." ) ; } if ( instanceConfiguration === null || instanceConfiguration === undefined ) { throw new EdgeAppInstanceModels . RequiredError ( "instanceConfiguration" , "Required parameter instanceConfiguration was null or undefined when calling PatchAppInstanceConfigurationData." ) ; } const result = await this . HttpAction ( { verb : "PATCH" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/instanceConfigurations/${ id }` , body : instanceConfiguration , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as EdgeAppInstanceModels . InstanceConfigurationResource ; } } export class extends SdkClient export class EdgeAppDeploymentClient extends SdkClient { private _baseUrl : string = "/api/edgeappdeployment/v3" ; summary param { string } deviceId param { 'closed' | 'open' } status param { number } size param { number } page param { string } sort returns { Promise < EdgeAppDeploymentModels . PaginatedTaskResource > } throws example memberof public async GetInstallationTasks ( deviceId , status ? , size ? , page ? , sort ? ) { if ( deviceId === null || deviceId === undefined ) { throw new EdgeAppDeploymentModels . RequiredError ( "deviceId" , "Required parameter deviceId was null or undefined when calling GetInstallationTasks." ) ; } const result = await this . HttpAction ( { verb : "GET" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/installationTasks?${ toQueryString ( { deviceId , status , size , page , sort } ) }` , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as EdgeAppDeploymentModels . PaginatedTaskResource ; } summary param { string } id returns { Promise < EdgeAppDeploymentModels . TaskResource > } throws example memberOf public async GetInstallationTask ( id ) { if ( id === null || id === undefined ) { throw new EdgeAppDeploymentModels . RequiredError ( "id" , "Required parameter id was null or undefined when calling GetInstallationTask." ) ; } const result = await this . HttpAction ( { verb : "GET" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/installationTasks/${ id }` , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as EdgeAppDeploymentModels . TaskResource ; } summary param { EdgeAppDeploymentModels . Task } task returns { Promise < EdgeAppDeploymentModels . TaskResource > } example memberOf public async PostInstallationTask ( task ) { if ( task === null || task === undefined ) { throw new EdgeAppDeploymentModels . RequiredError ( "task" , "Required parameter task was null or undefined when calling PostInstallationTask." ) ; } const result = await this . HttpAction ( { verb : "POST" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/installationTasks` , body : task , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as EdgeAppDeploymentModels . TaskResource ; } summary param { string } id param { EdgeAppDeploymentModels . TaskStatus } status returns { Promise < EdgeAppDeploymentModels . TaskResource > } example memberOf public async PatchInstallationTask ( id , status ) { if ( id === null || id === undefined ) { throw new EdgeAppDeploymentModels . RequiredError ( "id" , "Required parameter id was null or undefined when calling PatchInstallationTask." ) ; } if ( status === null || status === undefined ) { throw new EdgeAppDeploymentModels . RequiredError ( "status" , "Required parameter status was null or undefined when calling PatchInstallationTask." ) ; } const result = await this . HttpAction ( { verb : "PATCH" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/installationTasks/${ id }` , body : status , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as EdgeAppDeploymentModels . TaskResource ; } summary param { string } deviceId param { 'closed' | 'open' } status param { number } size param { number } page param { string } sort returns { Promise < EdgeAppDeploymentModels . PaginatedTaskResource > } throws example memberof public async GetRemovalTasks ( deviceId , status ? , size ? , page ? , sort ? ) { if ( deviceId === null || deviceId === undefined ) { throw new EdgeAppDeploymentModels . RequiredError ( "deviceId" , "Required parameter deviceId was null or undefined when calling GetRemovalTasks." ) ; } const result = await this . HttpAction ( { verb : "GET" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/removalTasks?${ toQueryString ( { deviceId , status , size , page , sort } ) }` , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as EdgeAppDeploymentModels . PaginatedTaskResource ; } summary param { EdgeAppDeploymentModels . Task } task returns { Promise < EdgeAppDeploymentModels . TaskRessource > } example memberOf public async PostRemovalTask ( task ) { if ( task === null || task === undefined ) { throw new EdgeAppDeploymentModels . RequiredError ( "task" , "Required parameter instanceConfiguration was null or undefined when calling PostRemovalTask." ) ; } const result = await this . HttpAction ( { verb : "POST" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/removalTasks` , body : task , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as EdgeAppDeploymentModels . TaskResource ; } summary param { string } deviceId param { string } releaseId returns { Promise < EdgeAppDeploymentModels . TermsAndConditionsResource > } throws example memberof public async GetTermsAndConditions ( deviceId , releaseId ) { if ( deviceId === null || deviceId === undefined ) { throw new EdgeAppDeploymentModels . RequiredError ( "deviceId" , "Required parameter deviceId was null or undefined when calling GetTermsAndConditions." ) ; } if ( releaseId === null || releaseId === undefined ) { throw new EdgeAppDeploymentModels . RequiredError ( "releaseId" , "Required parameter releaseId was null or undefined when calling GetTermsAndConditions." ) ; } const result = await this . HttpAction ( { verb : "GET" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/termsAndConditions?${ toQueryString ( { deviceId , releaseId } ) }` , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as EdgeAppDeploymentModels . TermsAndConditionsResource ; } summary param { EdgeAppDeploymentModels . TermsAndConditions } termsandconditions returns { Promise < EdgeAppDeploymentModels . TaskRessource > } example memberOf public async PostAcceptTermsAndConditions ( termsandconditions ) { if ( termsandconditions === null || termsandconditions === undefined ) { throw new EdgeAppDeploymentModels . RequiredError ( "termsandconditions" , "Required parameter termsandconditions was null or undefined when calling PostAcceptTermsAndConditions." ) ; } const result = await this . HttpAction ( { verb : "POST" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/acceptTermsAndConditions` , body : termsandconditions , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as EdgeAppDeploymentModels . TermsAndConditionsResource ; } } export class extends SdkClient export class FirmwareDeploymentClient extends SdkClient { private _baseUrl : string = "/api/firmwaredeployment/v3" ; summary param { string } deviceId param { string } type param { 'closed' | 'open' } status param { number } size param { number } page param { boolean } history returns { Promise < FirmwareDeploymentModels . PaginatedInstallationTask > } throws example memberof public async GetInstallationTasks ( deviceId , type ? , status ? , size ? , page ? , sort ? , history ? ) { if ( deviceId === null || deviceId === undefined ) { throw new EdgeAppDeploymentModels . RequiredError ( "deviceId" , "Required parameter deviceId was null or undefined when calling GetInstallationTasks." ) ; } const result = await this . HttpAction ( { verb : "GET" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/installationTasks?${ toQueryString ( { deviceId , type , status , size , page , sort , history , } ) }` , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as EdgeAppDeploymentModels . PaginatedTaskResource ; } summary param { string } id param { boolean } history returns { Promise < FirmwareDeploymentModels . TaskResource > } throws example memberOf public async GetInstallationTask ( id , history ? ) { if ( id === null || id === undefined ) { throw new FirmwareDeploymentModels . RequiredError ( "id" , "Required parameter id was null or undefined when calling GetInstallationTask." ) ; } const result = await this . HttpAction ( { verb : "GET" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/installationTasks/${ id }?${ toQueryString ( { history } ) }` , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as FirmwareDeploymentModels . InstallationTask ; } summary param { InstallationTaskInfo } taskDefinition returns { Promise < FirmwareDeploymentModels . InstallationTask > } example memberOf public async PostInstallationTask ( taskDefinition ) { if ( taskDefinition === null || taskDefinition === undefined ) { throw new FirmwareDeploymentModels . RequiredError ( "taskDefinition" , "Required parameter taskDefinition was null or undefined when calling PostInstallationTask." ) ; } const result = await this . HttpAction ( { verb : "POST" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/installationTasks` , body : taskDefinition , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as FirmwareDeploymentModels . InstallationTask ; } summary param { string } id param { FirmwareDeploymentModels . TaskUpdate } updateTaskInfo param { boolean } history returns { Promise < FirmwareDeploymentModels . TaskResource > } example memberOf public async PatchInstallationTask ( id , updateTaskInfo , history ? ) { if ( id === null || id === undefined ) { throw new FirmwareDeploymentModels . RequiredError ( "id" , "Required parameter id was null or undefined when calling PatchInstallationTask." ) ; } if ( updateTaskInfo === null || updateTaskInfo === undefined ) { throw new FirmwareDeploymentModels . RequiredError ( "updateTaskInfo" , "Required parameter updateTaskInfo was null or undefined when calling PatchInstallationTask." ) ; } const result = await this . HttpAction ( { verb : "PATCH" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/installationTasks/${ id }?${ toQueryString ( { history } ) }` , body : updateTaskInfo , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as FirmwareDeploymentModels . InstallationTask ; } summary param { string } deviceId param { string } releaseId returns { Promise < FirmwareDeploymentModels . TermsAndConditionsRecord > } throws example memberof public async GetTermsAndConditions ( deviceId , releaseId ) { if ( deviceId === null || deviceId === undefined ) { throw new FirmwareDeploymentModels . RequiredError ( "deviceId" , "Required parameter deviceId was null or undefined when calling GetTermsAndConditions." ) ; } if ( releaseId === null || releaseId === undefined ) { throw new FirmwareDeploymentModels . RequiredError ( "releaseId" , "Required parameter releaseId was null or undefined when calling GetTermsAndConditions." ) ; } const result = await this . HttpAction ( { verb : "GET" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/termsAndConditions?${ toQueryString ( { deviceId , releaseId } ) }` , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as FirmwareDeploymentModels . TermsAndConditionsRecord ; } summary param { FirmwareDeploymentModels . TermsAndConditionsAcceptance } acceptance returns { Promise < FirmwareDeploymentModels . TermsAndConditionsRecord > } example memberOf public async PostAcceptTermsAndConditions ( acceptance ) { if ( acceptance === null || acceptance === undefined ) { throw new FirmwareDeploymentModels . RequiredError ( "acceptance" , "Required parameter acceptance was null or undefined when calling PostAcceptTermsAndConditions." ) ; } const result = await this . HttpAction ( { verb : "POST" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/acceptTermsAndConditions` , body : acceptance , additionalHeaders : { "Content-Type" : "application/json" } , } ) ; return result as FirmwareDeploymentModels . TermsAndConditionsRecord ; } }