|
13 | 13 |
|
14 | 14 |
|
15 | 15 | import ApiClient from "../ApiClient"; |
| 16 | +import CheckProjectAccess from '../model/CheckProjectAccess'; |
16 | 17 | import Classification from '../model/Classification'; |
17 | 18 | import ClassificationRequest from '../model/ClassificationRequest'; |
18 | 19 | import Cloud from '../model/Cloud'; |
@@ -512,6 +513,61 @@ export default class CollaborationApi { |
512 | 513 | } |
513 | 514 |
|
514 | 515 |
|
| 516 | + /** |
| 517 | + * Check if the current token has access to the requested project |
| 518 | + * The response gives you details about the right of the user or app, the scopes of the token and the usable scopes (scopes filtered by the right of the user). It works with user tokens, app tokens and ProjectAccessToken |
| 519 | + * @param {Number} cloudPk |
| 520 | + * @param {Number} id A unique integer value identifying this project. |
| 521 | + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CheckProjectAccess} and HTTP response |
| 522 | + */ |
| 523 | + checkProjectAccessWithHttpInfo(cloudPk, id) { |
| 524 | + let postBody = null; |
| 525 | + // verify the required parameter 'cloudPk' is set |
| 526 | + if (cloudPk === undefined || cloudPk === null) { |
| 527 | + throw new Error("Missing the required parameter 'cloudPk' when calling checkProjectAccess"); |
| 528 | + } |
| 529 | + // verify the required parameter 'id' is set |
| 530 | + if (id === undefined || id === null) { |
| 531 | + throw new Error("Missing the required parameter 'id' when calling checkProjectAccess"); |
| 532 | + } |
| 533 | + |
| 534 | + let pathParams = { |
| 535 | + 'cloud_pk': cloudPk, |
| 536 | + 'id': id |
| 537 | + }; |
| 538 | + let queryParams = { |
| 539 | + }; |
| 540 | + let headerParams = { |
| 541 | + }; |
| 542 | + let formParams = { |
| 543 | + }; |
| 544 | + |
| 545 | + let authNames = ['ApiKey', 'BIMData_Connect', 'BIMData_Connect', 'Bearer']; |
| 546 | + let contentTypes = []; |
| 547 | + let accepts = ['application/json']; |
| 548 | + let returnType = CheckProjectAccess; |
| 549 | + return this.apiClient.callApi( |
| 550 | + '/cloud/{cloud_pk}/project/{id}/check-access', 'GET', |
| 551 | + pathParams, queryParams, headerParams, formParams, postBody, |
| 552 | + authNames, contentTypes, accepts, returnType, null |
| 553 | + ); |
| 554 | + } |
| 555 | + |
| 556 | + /** |
| 557 | + * Check if the current token has access to the requested project |
| 558 | + * The response gives you details about the right of the user or app, the scopes of the token and the usable scopes (scopes filtered by the right of the user). It works with user tokens, app tokens and ProjectAccessToken |
| 559 | + * @param {Number} cloudPk |
| 560 | + * @param {Number} id A unique integer value identifying this project. |
| 561 | + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CheckProjectAccess} |
| 562 | + */ |
| 563 | + checkProjectAccess(cloudPk, id) { |
| 564 | + return this.checkProjectAccessWithHttpInfo(cloudPk, id) |
| 565 | + .then(function(response_and_data) { |
| 566 | + return response_and_data.data; |
| 567 | + }); |
| 568 | + } |
| 569 | + |
| 570 | + |
515 | 571 | /** |
516 | 572 | * Close a visa of a document |
517 | 573 | * Close a visa of a document Required scopes: document:write |
@@ -800,7 +856,7 @@ export default class CollaborationApi { |
800 | 856 |
|
801 | 857 | /** |
802 | 858 | * Create a document |
803 | | - * Create a document. If the document is one of {'POINT_CLOUD', 'DAE', 'DXF', 'GLTF', 'BFX', 'DWG', 'IFC', 'OBJ'}, a model will be created and attached to this document Required scopes: document:write |
| 859 | + * Create a document. If the document is one of {'DAE', 'DXF', 'DWG', 'POINT_CLOUD', 'BFX', 'IFC', 'GLTF', 'OBJ'}, a model will be created and attached to this document Required scopes: document:write |
804 | 860 | * @param {Number} cloudPk A unique integer value identifying this cloud. |
805 | 861 | * @param {Number} projectPk A unique integer value identifying this project. |
806 | 862 | * @param {String} name Shown name of the file |
@@ -868,7 +924,7 @@ export default class CollaborationApi { |
868 | 924 |
|
869 | 925 | /** |
870 | 926 | * Create a document |
871 | | - * Create a document. If the document is one of {'POINT_CLOUD', 'DAE', 'DXF', 'GLTF', 'BFX', 'DWG', 'IFC', 'OBJ'}, a model will be created and attached to this document Required scopes: document:write |
| 927 | + * Create a document. If the document is one of {'DAE', 'DXF', 'DWG', 'POINT_CLOUD', 'BFX', 'IFC', 'GLTF', 'OBJ'}, a model will be created and attached to this document Required scopes: document:write |
872 | 928 | * @param {Number} cloudPk A unique integer value identifying this cloud. |
873 | 929 | * @param {Number} projectPk A unique integer value identifying this project. |
874 | 930 | * @param {String} name Shown name of the file |
|
0 commit comments