Skip to content
This repository was archived by the owner on Nov 18, 2025. It is now read-only.

Commit bf844ce

Browse files
committed
MINOR: user invitation routes (#569)
* make invitation api updatable * add user:write scope * use many to many scopes in views and tests * set scopes in MarketplaceAppAuthorization view
1 parent ca5789b commit bf844ce

File tree

4 files changed

+477
-3
lines changed

4 files changed

+477
-3
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ Class | Method | HTTP request | Description
224224
*bimdata.CheckerApi* | [**updateRule**](docs/CheckerApi.md#updateRule) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/checkplan/{check_plan_pk}/ruleset/{ruleset_pk}/rule/{id} | Update some fields of a Rule
225225
*bimdata.CheckerApi* | [**updateRuleComponent**](docs/CheckerApi.md#updateRuleComponent) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/checkplan/{check_plan_pk}/ruleset/{ruleset_pk}/rule/{rule_pk}/rulecomponent/{id} | Update some fields of a RuleComponent
226226
*bimdata.CheckerApi* | [**updateRuleset**](docs/CheckerApi.md#updateRuleset) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/checkplan/{check_plan_pk}/ruleset/{id} | Update some fields of a Ruleset
227+
*bimdata.CollaborationApi* | [**acceptUserInvitation**](docs/CollaborationApi.md#acceptUserInvitation) | **POST** /user/invitations/{id}/accept | Accept an invitation
227228
*bimdata.CollaborationApi* | [**acceptValidation**](docs/CollaborationApi.md#acceptValidation) | **POST** /cloud/{cloud_pk}/project/{project_pk}/document/{document_pk}/visa/{visa_pk}/validation/{id}/accept | Accept a validation
228229
*bimdata.CollaborationApi* | [**addDocumentTag**](docs/CollaborationApi.md#addDocumentTag) | **POST** /cloud/{cloud_pk}/project/{project_pk}/document/{document_pk}/tag | Add a tag to a document
229230
*bimdata.CollaborationApi* | [**addGroupMember**](docs/CollaborationApi.md#addGroupMember) | **POST** /cloud/{cloud_pk}/project/{project_pk}/group/{group_pk}/member | Add a user to a group
@@ -260,6 +261,7 @@ Class | Method | HTTP request | Description
260261
*bimdata.CollaborationApi* | [**deleteValidation**](docs/CollaborationApi.md#deleteValidation) | **DELETE** /cloud/{cloud_pk}/project/{project_pk}/document/{document_pk}/visa/{visa_pk}/validation/{id} | Remove a validation
261262
*bimdata.CollaborationApi* | [**deleteVisa**](docs/CollaborationApi.md#deleteVisa) | **DELETE** /cloud/{cloud_pk}/project/{project_pk}/document/{document_pk}/visa/{id} | Remove a visa
262263
*bimdata.CollaborationApi* | [**deleteVisaComment**](docs/CollaborationApi.md#deleteVisaComment) | **DELETE** /cloud/{cloud_pk}/project/{project_pk}/document/{document_pk}/visa/{visa_pk}/comment/{id} | Remove a comment
264+
*bimdata.CollaborationApi* | [**denyUserInvitation**](docs/CollaborationApi.md#denyUserInvitation) | **POST** /user/invitations/{id}/deny | Deny an invitation
263265
*bimdata.CollaborationApi* | [**denyValidation**](docs/CollaborationApi.md#denyValidation) | **POST** /cloud/{cloud_pk}/project/{project_pk}/document/{document_pk}/visa/{visa_pk}/validation/{id}/deny | Deny a validation
264266
*bimdata.CollaborationApi* | [**getClassification**](docs/CollaborationApi.md#getClassification) | **GET** /cloud/{cloud_pk}/project/{project_pk}/classification/{id} | Retrieve a classification
265267
*bimdata.CollaborationApi* | [**getClassifications**](docs/CollaborationApi.md#getClassifications) | **GET** /cloud/{cloud_pk}/project/{project_pk}/classification | Retrieve all classifications
@@ -296,6 +298,8 @@ Class | Method | HTTP request | Description
296298
*bimdata.CollaborationApi* | [**getSelfUser**](docs/CollaborationApi.md#getSelfUser) | **GET** /user | Get info about the current user
297299
*bimdata.CollaborationApi* | [**getTag**](docs/CollaborationApi.md#getTag) | **GET** /cloud/{cloud_pk}/project/{project_pk}/tag/{id} | Retrieve a tag
298300
*bimdata.CollaborationApi* | [**getTags**](docs/CollaborationApi.md#getTags) | **GET** /cloud/{cloud_pk}/project/{project_pk}/tag | Retrieve all tags
301+
*bimdata.CollaborationApi* | [**getUserInvitation**](docs/CollaborationApi.md#getUserInvitation) | **GET** /user/invitations/{id} | Retrieve an invitation
302+
*bimdata.CollaborationApi* | [**getUserInvitations**](docs/CollaborationApi.md#getUserInvitations) | **GET** /user/invitations | List user's invitations
299303
*bimdata.CollaborationApi* | [**getValidation**](docs/CollaborationApi.md#getValidation) | **GET** /cloud/{cloud_pk}/project/{project_pk}/document/{document_pk}/visa/{visa_pk}/validation/{id} | Retrieve a validation to a visa
300304
*bimdata.CollaborationApi* | [**getValidations**](docs/CollaborationApi.md#getValidations) | **GET** /cloud/{cloud_pk}/project/{project_pk}/document/{document_pk}/visa/{visa_pk}/validation | List all validations to a visa
301305
*bimdata.CollaborationApi* | [**getVisa**](docs/CollaborationApi.md#getVisa) | **GET** /cloud/{cloud_pk}/project/{project_pk}/document/{document_pk}/visa/{id} | Retrieve a visa of a document

docs/CollaborationApi.md

Lines changed: 245 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ All URIs are relative to *http://localhost*
44

55
Method | HTTP request | Description
66
------------- | ------------- | -------------
7+
[**acceptUserInvitation**](CollaborationApi.md#acceptUserInvitation) | **POST** /user/invitations/{id}/accept | Accept an invitation
78
[**acceptValidation**](CollaborationApi.md#acceptValidation) | **POST** /cloud/{cloud_pk}/project/{project_pk}/document/{document_pk}/visa/{visa_pk}/validation/{id}/accept | Accept a validation
89
[**addDocumentTag**](CollaborationApi.md#addDocumentTag) | **POST** /cloud/{cloud_pk}/project/{project_pk}/document/{document_pk}/tag | Add a tag to a document
910
[**addGroupMember**](CollaborationApi.md#addGroupMember) | **POST** /cloud/{cloud_pk}/project/{project_pk}/group/{group_pk}/member | Add a user to a group
@@ -40,6 +41,7 @@ Method | HTTP request | Description
4041
[**deleteValidation**](CollaborationApi.md#deleteValidation) | **DELETE** /cloud/{cloud_pk}/project/{project_pk}/document/{document_pk}/visa/{visa_pk}/validation/{id} | Remove a validation
4142
[**deleteVisa**](CollaborationApi.md#deleteVisa) | **DELETE** /cloud/{cloud_pk}/project/{project_pk}/document/{document_pk}/visa/{id} | Remove a visa
4243
[**deleteVisaComment**](CollaborationApi.md#deleteVisaComment) | **DELETE** /cloud/{cloud_pk}/project/{project_pk}/document/{document_pk}/visa/{visa_pk}/comment/{id} | Remove a comment
44+
[**denyUserInvitation**](CollaborationApi.md#denyUserInvitation) | **POST** /user/invitations/{id}/deny | Deny an invitation
4345
[**denyValidation**](CollaborationApi.md#denyValidation) | **POST** /cloud/{cloud_pk}/project/{project_pk}/document/{document_pk}/visa/{visa_pk}/validation/{id}/deny | Deny a validation
4446
[**getClassification**](CollaborationApi.md#getClassification) | **GET** /cloud/{cloud_pk}/project/{project_pk}/classification/{id} | Retrieve a classification
4547
[**getClassifications**](CollaborationApi.md#getClassifications) | **GET** /cloud/{cloud_pk}/project/{project_pk}/classification | Retrieve all classifications
@@ -76,6 +78,8 @@ Method | HTTP request | Description
7678
[**getSelfUser**](CollaborationApi.md#getSelfUser) | **GET** /user | Get info about the current user
7779
[**getTag**](CollaborationApi.md#getTag) | **GET** /cloud/{cloud_pk}/project/{project_pk}/tag/{id} | Retrieve a tag
7880
[**getTags**](CollaborationApi.md#getTags) | **GET** /cloud/{cloud_pk}/project/{project_pk}/tag | Retrieve all tags
81+
[**getUserInvitation**](CollaborationApi.md#getUserInvitation) | **GET** /user/invitations/{id} | Retrieve an invitation
82+
[**getUserInvitations**](CollaborationApi.md#getUserInvitations) | **GET** /user/invitations | List user's invitations
7983
[**getValidation**](CollaborationApi.md#getValidation) | **GET** /cloud/{cloud_pk}/project/{project_pk}/document/{document_pk}/visa/{visa_pk}/validation/{id} | Retrieve a validation to a visa
8084
[**getValidations**](CollaborationApi.md#getValidations) | **GET** /cloud/{cloud_pk}/project/{project_pk}/document/{document_pk}/visa/{visa_pk}/validation | List all validations to a visa
8185
[**getVisa**](CollaborationApi.md#getVisa) | **GET** /cloud/{cloud_pk}/project/{project_pk}/document/{document_pk}/visa/{id} | Retrieve a visa of a document
@@ -107,6 +111,67 @@ Method | HTTP request | Description
107111

108112

109113

114+
## acceptUserInvitation
115+
116+
> acceptUserInvitation(id)
117+
118+
Accept an invitation
119+
120+
The user is added to the cloud and projet. Required scopes: user:write
121+
122+
### Example
123+
124+
```javascript
125+
import bimdata from '@bimdata/bimdata-api-client';
126+
let defaultClient = bimdata.ApiClient.instance;
127+
// Configure API key authorization: ApiKey
128+
let ApiKey = defaultClient.authentications['ApiKey'];
129+
ApiKey.apiKey = 'YOUR API KEY';
130+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
131+
//ApiKey.apiKeyPrefix = 'Token';
132+
// Configure OAuth2 access token for authorization: BIMData_Connect
133+
let BIMData_Connect = defaultClient.authentications['BIMData_Connect'];
134+
BIMData_Connect.accessToken = 'YOUR ACCESS TOKEN';
135+
// Configure OAuth2 access token for authorization: BIMData_Connect
136+
let BIMData_Connect = defaultClient.authentications['BIMData_Connect'];
137+
BIMData_Connect.accessToken = 'YOUR ACCESS TOKEN';
138+
// Configure API key authorization: Bearer
139+
let Bearer = defaultClient.authentications['Bearer'];
140+
Bearer.apiKey = 'YOUR API KEY';
141+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
142+
//Bearer.apiKeyPrefix = 'Token';
143+
144+
let apiInstance = new bimdata.CollaborationApi();
145+
let id = 56; // Number | A unique integer value identifying this invitation.
146+
apiInstance.acceptUserInvitation(id).then(() => {
147+
console.log('API called successfully.');
148+
}, (error) => {
149+
console.error(error);
150+
});
151+
152+
```
153+
154+
### Parameters
155+
156+
157+
Name | Type | Description | Notes
158+
------------- | ------------- | ------------- | -------------
159+
**id** | **Number**| A unique integer value identifying this invitation. |
160+
161+
### Return type
162+
163+
null (empty response body)
164+
165+
### Authorization
166+
167+
[ApiKey](../README.md#ApiKey), [BIMData_Connect](../README.md#BIMData_Connect), [BIMData_Connect](../README.md#BIMData_Connect), [Bearer](../README.md#Bearer)
168+
169+
### HTTP request headers
170+
171+
- **Content-Type**: Not defined
172+
- **Accept**: Not defined
173+
174+
110175
## acceptValidation
111176

112177
> acceptValidation(cloudPk, documentPk, id, projectPk, visaPk)
@@ -824,7 +889,7 @@ Name | Type | Description | Notes
824889
825890
Create a document
826891

827-
Create a document. If the document is one of {'GLTF', 'DWG', 'POINT_CLOUD', 'BFX', 'OBJ', 'IFC', 'DAE', 'DXF'}, a model will be created and attached to this document Required scopes: document:write
892+
Create a document. If the document is one of {'DXF', 'BFX', 'GLTF', 'DAE', 'OBJ', 'IFC', 'POINT_CLOUD', 'DWG'}, a model will be created and attached to this document Required scopes: document:write
828893

829894
### Example
830895

@@ -2479,6 +2544,67 @@ null (empty response body)
24792544
- **Accept**: Not defined
24802545

24812546

2547+
## denyUserInvitation
2548+
2549+
> denyUserInvitation(id)
2550+
2551+
Deny an invitation
2552+
2553+
The invitation status change to DENIED and the user is not added to the cloud. You can accept an invitation previously denied Required scopes: user:write
2554+
2555+
### Example
2556+
2557+
```javascript
2558+
import bimdata from '@bimdata/bimdata-api-client';
2559+
let defaultClient = bimdata.ApiClient.instance;
2560+
// Configure API key authorization: ApiKey
2561+
let ApiKey = defaultClient.authentications['ApiKey'];
2562+
ApiKey.apiKey = 'YOUR API KEY';
2563+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
2564+
//ApiKey.apiKeyPrefix = 'Token';
2565+
// Configure OAuth2 access token for authorization: BIMData_Connect
2566+
let BIMData_Connect = defaultClient.authentications['BIMData_Connect'];
2567+
BIMData_Connect.accessToken = 'YOUR ACCESS TOKEN';
2568+
// Configure OAuth2 access token for authorization: BIMData_Connect
2569+
let BIMData_Connect = defaultClient.authentications['BIMData_Connect'];
2570+
BIMData_Connect.accessToken = 'YOUR ACCESS TOKEN';
2571+
// Configure API key authorization: Bearer
2572+
let Bearer = defaultClient.authentications['Bearer'];
2573+
Bearer.apiKey = 'YOUR API KEY';
2574+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
2575+
//Bearer.apiKeyPrefix = 'Token';
2576+
2577+
let apiInstance = new bimdata.CollaborationApi();
2578+
let id = 56; // Number | A unique integer value identifying this invitation.
2579+
apiInstance.denyUserInvitation(id).then(() => {
2580+
console.log('API called successfully.');
2581+
}, (error) => {
2582+
console.error(error);
2583+
});
2584+
2585+
```
2586+
2587+
### Parameters
2588+
2589+
2590+
Name | Type | Description | Notes
2591+
------------- | ------------- | ------------- | -------------
2592+
**id** | **Number**| A unique integer value identifying this invitation. |
2593+
2594+
### Return type
2595+
2596+
null (empty response body)
2597+
2598+
### Authorization
2599+
2600+
[ApiKey](../README.md#ApiKey), [BIMData_Connect](../README.md#BIMData_Connect), [BIMData_Connect](../README.md#BIMData_Connect), [Bearer](../README.md#Bearer)
2601+
2602+
### HTTP request headers
2603+
2604+
- **Content-Type**: Not defined
2605+
- **Accept**: Not defined
2606+
2607+
24822608
## denyValidation
24832609

24842610
> denyValidation(cloudPk, documentPk, id, projectPk, visaPk)
@@ -4759,6 +4885,124 @@ Name | Type | Description | Notes
47594885
- **Accept**: application/json
47604886

47614887

4888+
## getUserInvitation
4889+
4890+
> Invitation getUserInvitation(id)
4891+
4892+
Retrieve an invitation
4893+
4894+
Retrieve the invitation Required scopes: user:read
4895+
4896+
### Example
4897+
4898+
```javascript
4899+
import bimdata from '@bimdata/bimdata-api-client';
4900+
let defaultClient = bimdata.ApiClient.instance;
4901+
// Configure API key authorization: ApiKey
4902+
let ApiKey = defaultClient.authentications['ApiKey'];
4903+
ApiKey.apiKey = 'YOUR API KEY';
4904+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
4905+
//ApiKey.apiKeyPrefix = 'Token';
4906+
// Configure OAuth2 access token for authorization: BIMData_Connect
4907+
let BIMData_Connect = defaultClient.authentications['BIMData_Connect'];
4908+
BIMData_Connect.accessToken = 'YOUR ACCESS TOKEN';
4909+
// Configure OAuth2 access token for authorization: BIMData_Connect
4910+
let BIMData_Connect = defaultClient.authentications['BIMData_Connect'];
4911+
BIMData_Connect.accessToken = 'YOUR ACCESS TOKEN';
4912+
// Configure API key authorization: Bearer
4913+
let Bearer = defaultClient.authentications['Bearer'];
4914+
Bearer.apiKey = 'YOUR API KEY';
4915+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
4916+
//Bearer.apiKeyPrefix = 'Token';
4917+
4918+
let apiInstance = new bimdata.CollaborationApi();
4919+
let id = 56; // Number | A unique integer value identifying this invitation.
4920+
apiInstance.getUserInvitation(id).then((data) => {
4921+
console.log('API called successfully. Returned data: ' + data);
4922+
}, (error) => {
4923+
console.error(error);
4924+
});
4925+
4926+
```
4927+
4928+
### Parameters
4929+
4930+
4931+
Name | Type | Description | Notes
4932+
------------- | ------------- | ------------- | -------------
4933+
**id** | **Number**| A unique integer value identifying this invitation. |
4934+
4935+
### Return type
4936+
4937+
[**Invitation**](Invitation.md)
4938+
4939+
### Authorization
4940+
4941+
[ApiKey](../README.md#ApiKey), [BIMData_Connect](../README.md#BIMData_Connect), [BIMData_Connect](../README.md#BIMData_Connect), [Bearer](../README.md#Bearer)
4942+
4943+
### HTTP request headers
4944+
4945+
- **Content-Type**: Not defined
4946+
- **Accept**: application/json
4947+
4948+
4949+
## getUserInvitations
4950+
4951+
> [Invitation] getUserInvitations()
4952+
4953+
List user's invitations
4954+
4955+
List all user's invitations Required scopes: user:read
4956+
4957+
### Example
4958+
4959+
```javascript
4960+
import bimdata from '@bimdata/bimdata-api-client';
4961+
let defaultClient = bimdata.ApiClient.instance;
4962+
// Configure API key authorization: ApiKey
4963+
let ApiKey = defaultClient.authentications['ApiKey'];
4964+
ApiKey.apiKey = 'YOUR API KEY';
4965+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
4966+
//ApiKey.apiKeyPrefix = 'Token';
4967+
// Configure OAuth2 access token for authorization: BIMData_Connect
4968+
let BIMData_Connect = defaultClient.authentications['BIMData_Connect'];
4969+
BIMData_Connect.accessToken = 'YOUR ACCESS TOKEN';
4970+
// Configure OAuth2 access token for authorization: BIMData_Connect
4971+
let BIMData_Connect = defaultClient.authentications['BIMData_Connect'];
4972+
BIMData_Connect.accessToken = 'YOUR ACCESS TOKEN';
4973+
// Configure API key authorization: Bearer
4974+
let Bearer = defaultClient.authentications['Bearer'];
4975+
Bearer.apiKey = 'YOUR API KEY';
4976+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
4977+
//Bearer.apiKeyPrefix = 'Token';
4978+
4979+
let apiInstance = new bimdata.CollaborationApi();
4980+
apiInstance.getUserInvitations().then((data) => {
4981+
console.log('API called successfully. Returned data: ' + data);
4982+
}, (error) => {
4983+
console.error(error);
4984+
});
4985+
4986+
```
4987+
4988+
### Parameters
4989+
4990+
This endpoint does not need any parameter.
4991+
4992+
### Return type
4993+
4994+
[**[Invitation]**](Invitation.md)
4995+
4996+
### Authorization
4997+
4998+
[ApiKey](../README.md#ApiKey), [BIMData_Connect](../README.md#BIMData_Connect), [BIMData_Connect](../README.md#BIMData_Connect), [Bearer](../README.md#Bearer)
4999+
5000+
### HTTP request headers
5001+
5002+
- **Content-Type**: Not defined
5003+
- **Accept**: application/json
5004+
5005+
47625006
## getValidation
47635007

47645008
> VisaValidation getValidation(cloudPk, documentPk, id, projectPk, visaPk)

0 commit comments

Comments
 (0)