|
17 | 17 | (function(root, factory) { |
18 | 18 | if (typeof define === 'function' && define.amd) { |
19 | 19 | // AMD. Register as an anonymous module. |
20 | | - define(['ApiClient', 'model/Cloud', 'model/InviteUser', 'model/User'], factory); |
| 20 | + define(['ApiClient', 'model/Cloud', 'model/InviteUser', 'model/Project', 'model/User'], factory); |
21 | 21 | } else if (typeof module === 'object' && module.exports) { |
22 | 22 | // CommonJS-like environments that support module.exports, like Node. |
23 | | - module.exports = factory(require('../ApiClient'), require('../model/Cloud'), require('../model/InviteUser'), require('../model/User')); |
| 23 | + module.exports = factory(require('../ApiClient'), require('../model/Cloud'), require('../model/InviteUser'), require('../model/Project'), require('../model/User')); |
24 | 24 | } else { |
25 | 25 | // Browser globals (root is window) |
26 | 26 | if (!root.bimdata) { |
27 | 27 | root.bimdata = {}; |
28 | 28 | } |
29 | | - root.bimdata.CloudApi = factory(root.bimdata.ApiClient, root.bimdata.Cloud, root.bimdata.InviteUser, root.bimdata.User); |
| 29 | + root.bimdata.CloudApi = factory(root.bimdata.ApiClient, root.bimdata.Cloud, root.bimdata.InviteUser, root.bimdata.Project, root.bimdata.User); |
30 | 30 | } |
31 | | -}(this, function(ApiClient, Cloud, InviteUser, User) { |
| 31 | +}(this, function(ApiClient, Cloud, InviteUser, Project, User) { |
32 | 32 | 'use strict'; |
33 | 33 |
|
34 | 34 | /** |
|
153 | 153 | } |
154 | 154 |
|
155 | 155 |
|
| 156 | + /** |
| 157 | + * Create a demo project with a pre-populated IFC and its data |
| 158 | + * @param {String} id |
| 159 | + * @param {module:model/Cloud} cloud |
| 160 | + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Project} and HTTP response |
| 161 | + */ |
| 162 | + this.createDemoWithHttpInfo = function(id, cloud) { |
| 163 | + var postBody = cloud; |
| 164 | + |
| 165 | + // verify the required parameter 'id' is set |
| 166 | + if (id === undefined || id === null) { |
| 167 | + throw new Error("Missing the required parameter 'id' when calling createDemo"); |
| 168 | + } |
| 169 | + |
| 170 | + // verify the required parameter 'cloud' is set |
| 171 | + if (cloud === undefined || cloud === null) { |
| 172 | + throw new Error("Missing the required parameter 'cloud' when calling createDemo"); |
| 173 | + } |
| 174 | + |
| 175 | + |
| 176 | + var pathParams = { |
| 177 | + 'id': id |
| 178 | + }; |
| 179 | + var queryParams = { |
| 180 | + }; |
| 181 | + var collectionQueryParams = { |
| 182 | + }; |
| 183 | + var headerParams = { |
| 184 | + }; |
| 185 | + var formParams = { |
| 186 | + }; |
| 187 | + |
| 188 | + var authNames = ['Bearer']; |
| 189 | + var contentTypes = ['application/json']; |
| 190 | + var accepts = ['application/json']; |
| 191 | + var returnType = Project; |
| 192 | + |
| 193 | + return this.apiClient.callApi( |
| 194 | + '/cloud/{id}/create-demo', 'POST', |
| 195 | + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, |
| 196 | + authNames, contentTypes, accepts, returnType |
| 197 | + ); |
| 198 | + } |
| 199 | + |
| 200 | + /** |
| 201 | + * Create a demo project with a pre-populated IFC and its data |
| 202 | + * @param {String} id |
| 203 | + * @param {module:model/Cloud} cloud |
| 204 | + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Project} |
| 205 | + */ |
| 206 | + this.createDemo = function(id, cloud) { |
| 207 | + return this.createDemoWithHttpInfo(id, cloud) |
| 208 | + .then(function(response_and_data) { |
| 209 | + return response_and_data.data; |
| 210 | + }); |
| 211 | + } |
| 212 | + |
| 213 | + |
156 | 214 | /** |
157 | 215 | * @param {String} cloudPk |
158 | 216 | * @param {String} id |
|
0 commit comments