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

Commit f56243e

Browse files
committed
MINOR: add BCF topic/pins route (#855)
* MINOR: add BCF topic/pins route * add topic guid filter test
1 parent 048e607 commit f56243e

20 files changed

+651
-84
lines changed

.openapi-generator/FILES

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ docs/PerspectiveCamera.md
147147
docs/PerspectiveCameraRequest.md
148148
docs/Pin.md
149149
docs/PinRequest.md
150+
docs/PinWithModels.md
150151
docs/Point.md
151152
docs/PointRequest.md
152153
docs/PositioningPlan.md
@@ -220,6 +221,7 @@ docs/Tag.md
220221
docs/TagIdRequest.md
221222
docs/TagRequest.md
222223
docs/Topic.md
224+
docs/TopicPin.md
223225
docs/TopicRequest.md
224226
docs/TopicStatus.md
225227
docs/TopicStatusRequest.md
@@ -415,6 +417,7 @@ src/model/PerspectiveCamera.js
415417
src/model/PerspectiveCameraRequest.js
416418
src/model/Pin.js
417419
src/model/PinRequest.js
420+
src/model/PinWithModels.js
418421
src/model/Point.js
419422
src/model/PointRequest.js
420423
src/model/PositioningPlan.js
@@ -487,6 +490,7 @@ src/model/Tag.js
487490
src/model/TagIdRequest.js
488491
src/model/TagRequest.js
489492
src/model/Topic.js
493+
src/model/TopicPin.js
490494
src/model/TopicRequest.js
491495
src/model/TopicStatus.js
492496
src/model/TopicStatusRequest.js
@@ -677,6 +681,7 @@ test/model/PerspectiveCamera.spec.js
677681
test/model/PerspectiveCameraRequest.spec.js
678682
test/model/Pin.spec.js
679683
test/model/PinRequest.spec.js
684+
test/model/PinWithModels.spec.js
680685
test/model/Point.spec.js
681686
test/model/PointRequest.spec.js
682687
test/model/PositioningPlan.spec.js
@@ -749,6 +754,7 @@ test/model/Tag.spec.js
749754
test/model/TagIdRequest.spec.js
750755
test/model/TagRequest.spec.js
751756
test/model/Topic.spec.js
757+
test/model/TopicPin.spec.js
752758
test/model/TopicRequest.spec.js
753759
test/model/TopicStatus.spec.js
754760
test/model/TopicStatusRequest.spec.js

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ Class | Method | HTTP request | Description
185185
*bimdata.BcfApi* | [**getTopicDocumentReferences**](docs/BcfApi.md#getTopicDocumentReferences) | **GET** /bcf/2.1/projects/{projects_pk}/topics/{guid}/document_references | Get all related documents
186186
*bimdata.BcfApi* | [**getTopicViewpoints**](docs/BcfApi.md#getTopicViewpoints) | **GET** /bcf/2.1/projects/{projects_pk}/topics/{topics_guid}/topic-viewpoints | Retrieve all viewpoints attached to the topic
187187
*bimdata.BcfApi* | [**getTopics**](docs/BcfApi.md#getTopics) | **GET** /bcf/2.1/projects/{projects_pk}/topics | Retrieve all topics
188+
*bimdata.BcfApi* | [**getTopicsPins**](docs/BcfApi.md#getTopicsPins) | **GET** /bcf/2.1/projects/{projects_pk}/topics/pins | Get pins of all or many topics
188189
*bimdata.BcfApi* | [**getUser**](docs/BcfApi.md#getUser) | **GET** /bcf/2.1/current-user | Get current user info
189190
*bimdata.BcfApi* | [**getVersions**](docs/BcfApi.md#getVersions) | **GET** /bcf/versions | Retrieve all supported BCF versions by this API
190191
*bimdata.BcfApi* | [**getViewpoinPin**](docs/BcfApi.md#getViewpoinPin) | **GET** /bcf/2.1/projects/{projects_pk}/topics/{topics_guid}/viewpoints/{viewpoints_guid}/pin/{guid} | Retrieve a Pin
@@ -633,6 +634,7 @@ Class | Method | HTTP request | Description
633634
- [bimdata.PerspectiveCameraRequest](docs/PerspectiveCameraRequest.md)
634635
- [bimdata.Pin](docs/Pin.md)
635636
- [bimdata.PinRequest](docs/PinRequest.md)
637+
- [bimdata.PinWithModels](docs/PinWithModels.md)
636638
- [bimdata.Point](docs/Point.md)
637639
- [bimdata.PointRequest](docs/PointRequest.md)
638640
- [bimdata.PositioningPlan](docs/PositioningPlan.md)
@@ -705,6 +707,7 @@ Class | Method | HTTP request | Description
705707
- [bimdata.TagIdRequest](docs/TagIdRequest.md)
706708
- [bimdata.TagRequest](docs/TagRequest.md)
707709
- [bimdata.Topic](docs/Topic.md)
710+
- [bimdata.TopicPin](docs/TopicPin.md)
708711
- [bimdata.TopicRequest](docs/TopicRequest.md)
709712
- [bimdata.TopicStatus](docs/TopicStatus.md)
710713
- [bimdata.TopicStatusRequest](docs/TopicStatusRequest.md)

docs/BcfApi.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ Method | HTTP request | Description
4848
[**getTopicDocumentReferences**](BcfApi.md#getTopicDocumentReferences) | **GET** /bcf/2.1/projects/{projects_pk}/topics/{guid}/document_references | Get all related documents
4949
[**getTopicViewpoints**](BcfApi.md#getTopicViewpoints) | **GET** /bcf/2.1/projects/{projects_pk}/topics/{topics_guid}/topic-viewpoints | Retrieve all viewpoints attached to the topic
5050
[**getTopics**](BcfApi.md#getTopics) | **GET** /bcf/2.1/projects/{projects_pk}/topics | Retrieve all topics
51+
[**getTopicsPins**](BcfApi.md#getTopicsPins) | **GET** /bcf/2.1/projects/{projects_pk}/topics/pins | Get pins of all or many topics
5152
[**getUser**](BcfApi.md#getUser) | **GET** /bcf/2.1/current-user | Get current user info
5253
[**getVersions**](BcfApi.md#getVersions) | **GET** /bcf/versions | Retrieve all supported BCF versions by this API
5354
[**getViewpoinPin**](BcfApi.md#getViewpoinPin) | **GET** /bcf/2.1/projects/{projects_pk}/topics/{topics_guid}/viewpoints/{viewpoints_guid}/pin/{guid} | Retrieve a Pin
@@ -2945,6 +2946,77 @@ Name | Type | Description | Notes
29452946
- **Accept**: application/json
29462947

29472948

2949+
## getTopicsPins
2950+
2951+
> [TopicPin] getTopicsPins(projectsPk, opts)
2952+
2953+
Get pins of all or many topics
2954+
2955+
This is not a standard route. Get pins of all or many topics Required scopes: bcf:read
2956+
2957+
### Example
2958+
2959+
```javascript
2960+
import bimdata from '@bimdata/bimdata-api-client';
2961+
let defaultClient = bimdata.ApiClient.instance;
2962+
// Configure API key authorization: ApiKey
2963+
let ApiKey = defaultClient.authentications['ApiKey'];
2964+
ApiKey.apiKey = 'YOUR API KEY';
2965+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
2966+
//ApiKey.apiKeyPrefix = 'Token';
2967+
// Configure OAuth2 access token for authorization: BIMData_Connect
2968+
let BIMData_Connect = defaultClient.authentications['BIMData_Connect'];
2969+
BIMData_Connect.accessToken = 'YOUR ACCESS TOKEN';
2970+
// Configure OAuth2 access token for authorization: BIMData_Connect
2971+
let BIMData_Connect = defaultClient.authentications['BIMData_Connect'];
2972+
BIMData_Connect.accessToken = 'YOUR ACCESS TOKEN';
2973+
// Configure API key authorization: Bearer
2974+
let Bearer = defaultClient.authentications['Bearer'];
2975+
Bearer.apiKey = 'YOUR API KEY';
2976+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
2977+
//Bearer.apiKeyPrefix = 'Token';
2978+
2979+
let apiInstance = new bimdata.BcfApi();
2980+
let projectsPk = 56; // Number |
2981+
let opts = {
2982+
'format': "format_example", // String |
2983+
'ifcs': [null], // [Number] |
2984+
'models': [null], // [Number] |
2985+
'topics': "topics_example" // String | topic guids to include, comma separated. Default = all
2986+
};
2987+
apiInstance.getTopicsPins(projectsPk, opts).then((data) => {
2988+
console.log('API called successfully. Returned data: ' + data);
2989+
}, (error) => {
2990+
console.error(error);
2991+
});
2992+
2993+
```
2994+
2995+
### Parameters
2996+
2997+
2998+
Name | Type | Description | Notes
2999+
------------- | ------------- | ------------- | -------------
3000+
**projectsPk** | **Number**| |
3001+
**format** | **String**| | [optional]
3002+
**ifcs** | [**[Number]**](Number.md)| | [optional]
3003+
**models** | [**[Number]**](Number.md)| | [optional]
3004+
**topics** | **String**| topic guids to include, comma separated. Default = all | [optional]
3005+
3006+
### Return type
3007+
3008+
[**[TopicPin]**](TopicPin.md)
3009+
3010+
### Authorization
3011+
3012+
[ApiKey](../README.md#ApiKey), [BIMData_Connect](../README.md#BIMData_Connect), [BIMData_Connect](../README.md#BIMData_Connect), [Bearer](../README.md#Bearer)
3013+
3014+
### HTTP request headers
3015+
3016+
- **Content-Type**: Not defined
3017+
- **Accept**: application/json
3018+
3019+
29483020
## getUser
29493021

29503022
> SelfBcfUser getUser()

docs/CollaborationApi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -960,7 +960,7 @@ Name | Type | Description | Notes
960960
961961
Create a document
962962

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

965965
### Example
966966

docs/PinWithModels.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# bimdata.PinWithModels
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**guid** | **String** | | [readonly]
8+
**name** | **String** | | [readonly]
9+
**color** | **String** | | [readonly]
10+
**point** | [**GeometryPoint**](GeometryPoint.md) | |
11+
**index** | **Number** | | [readonly]
12+
**modelIds** | **[Number]** | | [readonly]
13+
14+

docs/TopicPin.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# bimdata.TopicPin
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**topicGuid** | **String** | | [readonly]
8+
**pins** | [**[PinWithModels]**](PinWithModels.md) | | [readonly]
9+
10+

docs/WriteFolder.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**type** | **String** | DEPRECATED: Use 'nature' instead. Value is \"Folder\". It is usefull to parse the tree and discriminate folders and files | [readonly]
8+
**id** | **Number** | | [readonly]
9+
**groupsPermissions** | [**[GroupFolderRead]**](GroupFolderRead.md) | List of group permissions | [readonly]
10+
**createdBy** | [**ShortUser**](ShortUser.md) | | [readonly]
811
**userPermission** | **Number** | Aggregate of group user permissions and folder default permission | [readonly]
912
**defaultPermission** | **Number** | Permission for a Folder * `1` - denied * `50` - read_only * `100` - read_write | [optional]
10-
**createdBy** | [**ShortUser**](ShortUser.md) | | [readonly]
11-
**id** | **Number** | | [readonly]
12-
**parentId** | **Number** | | [optional]
1313
**createdAt** | **Date** | Creation date | [readonly]
14-
**groupsPermissions** | [**[GroupFolderRead]**](GroupFolderRead.md) | List of group permissions | [readonly]
15-
**updatedAt** | **Date** | Date of the last update | [readonly]
1614
**name** | **String** | Name of the folder |
1715
**nature** | **String** | Value is \"Folder\". It is usefull to parse the tree and discriminate folders and files | [readonly]
16+
**parentId** | **Number** | | [optional]
17+
**updatedAt** | **Date** | Date of the last update | [readonly]
1818
**children** | [**[WriteFolder]**](WriteFolder.md) | | [optional]
1919

2020

docs/WriteFolderRequest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**defaultPermission** | **Number** | Permission for a Folder * `1` - denied * `50` - read_only * `100` - read_write | [optional]
8-
**parentId** | **Number** | | [optional]
98
**name** | **String** | Name of the folder |
9+
**parentId** | **Number** | | [optional]
1010
**children** | [**[WriteFolder]**](WriteFolder.md) | | [optional]
1111

1212

src/api/BcfApi.js

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ import SelfBcfUser from '../model/SelfBcfUser';
4545
import Stage from '../model/Stage';
4646
import StageRequest from '../model/StageRequest';
4747
import Topic from '../model/Topic';
48+
import TopicPin from '../model/TopicPin';
4849
import TopicRequest from '../model/TopicRequest';
4950
import TopicStatus from '../model/TopicStatus';
5051
import TopicStatusRequest from '../model/TopicStatusRequest';
@@ -2666,6 +2667,69 @@ export default class BcfApi {
26662667
}
26672668

26682669

2670+
/**
2671+
* Get pins of all or many topics
2672+
* This is not a standard route. Get pins of all or many topics Required scopes: bcf:read
2673+
* @param {Number} projectsPk
2674+
* @param {Object} opts Optional parameters
2675+
* @param {String} opts.format
2676+
* @param {Array.<Number>} opts.ifcs
2677+
* @param {Array.<Number>} opts.models
2678+
* @param {String} opts.topics topic guids to include, comma separated. Default = all
2679+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/TopicPin>} and HTTP response
2680+
*/
2681+
getTopicsPinsWithHttpInfo(projectsPk, opts) {
2682+
opts = opts || {};
2683+
let postBody = null;
2684+
// verify the required parameter 'projectsPk' is set
2685+
if (projectsPk === undefined || projectsPk === null) {
2686+
throw new Error("Missing the required parameter 'projectsPk' when calling getTopicsPins");
2687+
}
2688+
2689+
let pathParams = {
2690+
'projects_pk': projectsPk
2691+
};
2692+
let queryParams = {
2693+
'format': opts['format'],
2694+
'ifcs': this.apiClient.buildCollectionParam(opts['ifcs'], 'multi'),
2695+
'models': this.apiClient.buildCollectionParam(opts['models'], 'multi'),
2696+
'topics': opts['topics']
2697+
};
2698+
let headerParams = {
2699+
};
2700+
let formParams = {
2701+
};
2702+
2703+
let authNames = ['ApiKey', 'BIMData_Connect', 'BIMData_Connect', 'Bearer'];
2704+
let contentTypes = [];
2705+
let accepts = ['application/json'];
2706+
let returnType = [TopicPin];
2707+
return this.apiClient.callApi(
2708+
'/bcf/2.1/projects/{projects_pk}/topics/pins', 'GET',
2709+
pathParams, queryParams, headerParams, formParams, postBody,
2710+
authNames, contentTypes, accepts, returnType, null
2711+
);
2712+
}
2713+
2714+
/**
2715+
* Get pins of all or many topics
2716+
* This is not a standard route. Get pins of all or many topics Required scopes: bcf:read
2717+
* @param {Number} projectsPk
2718+
* @param {Object} opts Optional parameters
2719+
* @param {String} opts.format
2720+
* @param {Array.<Number>} opts.ifcs
2721+
* @param {Array.<Number>} opts.models
2722+
* @param {String} opts.topics topic guids to include, comma separated. Default = all
2723+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/TopicPin>}
2724+
*/
2725+
getTopicsPins(projectsPk, opts) {
2726+
return this.getTopicsPinsWithHttpInfo(projectsPk, opts)
2727+
.then(function(response_and_data) {
2728+
return response_and_data.data;
2729+
});
2730+
}
2731+
2732+
26692733
/**
26702734
* Get current user info
26712735
* Get current user info. If request comes from an App, the response is always:{ \"id\": None, \"name\": None, \"is_client\": True,} Required scopes: bcf:read

src/api/CollaborationApi.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,7 @@ export default class CollaborationApi {
866866

867867
/**
868868
* Create a document
869-
* Create a document. If the document is one of {'POINT_CLOUD', 'DWG', 'OBJ', 'DXF', 'IFC', 'GLTF'}, a model will be created and attached to this document Required scopes: document:write
869+
* Create a document. If the document is one of {'DXF', 'DWG', 'POINT_CLOUD', 'OBJ', 'IFC', 'GLTF'}, a model will be created and attached to this document Required scopes: document:write
870870
* @param {Number} cloudPk A unique integer value identifying this cloud.
871871
* @param {Number} projectPk A unique integer value identifying this project.
872872
* @param {String} name Shown name of the file
@@ -934,7 +934,7 @@ export default class CollaborationApi {
934934

935935
/**
936936
* Create a document
937-
* Create a document. If the document is one of {'POINT_CLOUD', 'DWG', 'OBJ', 'DXF', 'IFC', 'GLTF'}, a model will be created and attached to this document Required scopes: document:write
937+
* Create a document. If the document is one of {'DXF', 'DWG', 'POINT_CLOUD', 'OBJ', 'IFC', 'GLTF'}, a model will be created and attached to this document Required scopes: document:write
938938
* @param {Number} cloudPk A unique integer value identifying this cloud.
939939
* @param {Number} projectPk A unique integer value identifying this project.
940940
* @param {String} name Shown name of the file

0 commit comments

Comments
 (0)