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

Commit dd7c4e9

Browse files
committed
MINOR: add patch extension endpoint
1 parent 29761d3 commit dd7c4e9

File tree

6 files changed

+131
-6
lines changed

6 files changed

+131
-6
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ Class | Method | HTTP request | Description
173173
*bimdata.BcfApi* | [**updateBcfProject**](docs/BcfApi.md#updateBcfProject) | **PATCH** /bcf/2.1/projects/{id} |
174174
*bimdata.BcfApi* | [**updateColoring**](docs/BcfApi.md#updateColoring) | **PATCH** /bcf/2.1/projects/{projects_pk}/topics/{topics_pk}/viewpoints/{viewpoints_pk}/coloring/{id} |
175175
*bimdata.BcfApi* | [**updateComment**](docs/BcfApi.md#updateComment) | **PATCH** /bcf/2.1/projects/{projects_pk}/topics/{topics_pk}/comments/{guid} |
176+
*bimdata.BcfApi* | [**updateExtensions**](docs/BcfApi.md#updateExtensions) | **PATCH** /bcf/2.1/projects/{projects_pk}/extensions |
176177
*bimdata.BcfApi* | [**updateFullTopic**](docs/BcfApi.md#updateFullTopic) | **PATCH** /bcf/2.1/projects/{projects_pk}/full-topic/{guid} |
177178
*bimdata.BcfApi* | [**updateSelection**](docs/BcfApi.md#updateSelection) | **PATCH** /bcf/2.1/projects/{projects_pk}/topics/{topics_pk}/viewpoints/{viewpoints_pk}/selection/{id} |
178179
*bimdata.BcfApi* | [**updateTopic**](docs/BcfApi.md#updateTopic) | **PATCH** /bcf/2.1/projects/{projects_pk}/topics/{guid} |

docs/BcfApi.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ Method | HTTP request | Description
4848
[**updateBcfProject**](BcfApi.md#updateBcfProject) | **PATCH** /bcf/2.1/projects/{id} |
4949
[**updateColoring**](BcfApi.md#updateColoring) | **PATCH** /bcf/2.1/projects/{projects_pk}/topics/{topics_pk}/viewpoints/{viewpoints_pk}/coloring/{id} |
5050
[**updateComment**](BcfApi.md#updateComment) | **PATCH** /bcf/2.1/projects/{projects_pk}/topics/{topics_pk}/comments/{guid} |
51+
[**updateExtensions**](BcfApi.md#updateExtensions) | **PATCH** /bcf/2.1/projects/{projects_pk}/extensions |
5152
[**updateFullTopic**](BcfApi.md#updateFullTopic) | **PATCH** /bcf/2.1/projects/{projects_pk}/full-topic/{guid} |
5253
[**updateSelection**](BcfApi.md#updateSelection) | **PATCH** /bcf/2.1/projects/{projects_pk}/topics/{topics_pk}/viewpoints/{viewpoints_pk}/selection/{id} |
5354
[**updateTopic**](BcfApi.md#updateTopic) | **PATCH** /bcf/2.1/projects/{projects_pk}/topics/{guid} |
@@ -2208,6 +2209,53 @@ Name | Type | Description | Notes
22082209

22092210
[Bearer](../README.md#Bearer)
22102211

2212+
### HTTP request headers
2213+
2214+
- **Content-Type**: application/json
2215+
- **Accept**: application/json
2216+
2217+
<a name="updateExtensions"></a>
2218+
# **updateExtensions**
2219+
> Extensions updateExtensions(projectsPk, extensions)
2220+
2221+
2222+
2223+
### Example
2224+
```javascript
2225+
var bimdata = require('@bimdata/bimdata-api-client');
2226+
var defaultClient = bimdata.ApiClient.instance;
2227+
// Configure API key authorization: Bearer
2228+
var Bearer = defaultClient.authentications['Bearer'];
2229+
Bearer.apiKey = 'YOUR API KEY';
2230+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
2231+
//Bearer.apiKeyPrefix = 'Token';
2232+
2233+
var apiInstance = new bimdata.BcfApi();
2234+
var projectsPk = "projectsPk_example"; // String |
2235+
var extensions = new bimdata.Extensions(); // Extensions |
2236+
apiInstance.updateExtensions(projectsPk, extensions).then(function(data) {
2237+
console.log('API called successfully. Returned data: ' + data);
2238+
}, function(error) {
2239+
console.error(error);
2240+
});
2241+
2242+
```
2243+
2244+
### Parameters
2245+
2246+
Name | Type | Description | Notes
2247+
------------- | ------------- | ------------- | -------------
2248+
**projectsPk** | **String**| |
2249+
**extensions** | [**Extensions**](Extensions.md)| |
2250+
2251+
### Return type
2252+
2253+
[**Extensions**](Extensions.md)
2254+
2255+
### Authorization
2256+
2257+
[Bearer](../README.md#Bearer)
2258+
22112259
### HTTP request headers
22122260

22132261
- **Content-Type**: application/json

docs/Extensions.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**topicType** | **[String]** | | [optional]
7-
**topicStatus** | **[String]** | | [optional]
8-
**topicLabel** | **[String]** | | [optional]
9-
**priority** | **[String]** | | [optional]
6+
**topicType** | **[String]** | |
7+
**topicStatus** | **[String]** | |
8+
**topicLabel** | **[String]** | |
9+
**priority** | **[String]** | |
1010
**userIdType** | **[String]** | | [optional]
11-
**stage** | **[String]** | | [optional]
11+
**stage** | **[String]** | |
1212

1313

src/api/BcfApi.js

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2879,6 +2879,62 @@
28792879
}
28802880

28812881

2882+
/**
2883+
* @param {String} projectsPk
2884+
* @param {module:model/Extensions} extensions
2885+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Extensions} and HTTP response
2886+
*/
2887+
this.updateExtensionsWithHttpInfo = function(projectsPk, extensions) {
2888+
var postBody = extensions;
2889+
2890+
// verify the required parameter 'projectsPk' is set
2891+
if (projectsPk === undefined || projectsPk === null) {
2892+
throw new Error("Missing the required parameter 'projectsPk' when calling updateExtensions");
2893+
}
2894+
2895+
// verify the required parameter 'extensions' is set
2896+
if (extensions === undefined || extensions === null) {
2897+
throw new Error("Missing the required parameter 'extensions' when calling updateExtensions");
2898+
}
2899+
2900+
2901+
var pathParams = {
2902+
'projects_pk': projectsPk
2903+
};
2904+
var queryParams = {
2905+
};
2906+
var collectionQueryParams = {
2907+
};
2908+
var headerParams = {
2909+
};
2910+
var formParams = {
2911+
};
2912+
2913+
var authNames = ['Bearer'];
2914+
var contentTypes = ['application/json'];
2915+
var accepts = ['application/json'];
2916+
var returnType = Extensions;
2917+
2918+
return this.apiClient.callApi(
2919+
'/bcf/2.1/projects/{projects_pk}/extensions', 'PATCH',
2920+
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
2921+
authNames, contentTypes, accepts, returnType
2922+
);
2923+
}
2924+
2925+
/**
2926+
* @param {String} projectsPk
2927+
* @param {module:model/Extensions} extensions
2928+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Extensions}
2929+
*/
2930+
this.updateExtensions = function(projectsPk, extensions) {
2931+
return this.updateExtensionsWithHttpInfo(projectsPk, extensions)
2932+
.then(function(response_and_data) {
2933+
return response_and_data.data;
2934+
});
2935+
}
2936+
2937+
28822938
/**
28832939
* @param {String} guid A UUID string identifying this topic.
28842940
* @param {String} projectsPk

src/model/Extensions.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,20 @@
4343
* Constructs a new <code>Extensions</code>.
4444
* @alias module:model/Extensions
4545
* @class
46+
* @param topicType {Array.<String>}
47+
* @param topicStatus {Array.<String>}
48+
* @param topicLabel {Array.<String>}
49+
* @param priority {Array.<String>}
50+
* @param stage {Array.<String>}
4651
*/
47-
var exports = function() {
52+
var exports = function(topicType, topicStatus, topicLabel, priority, stage) {
4853
var _this = this;
4954

55+
_this['topic_type'] = topicType;
56+
_this['topic_status'] = topicStatus;
57+
_this['topic_label'] = topicLabel;
58+
_this['priority'] = priority;
59+
_this['stage'] = stage;
5060
};
5161

5262
/**

test/api/BcfApi.spec.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,16 @@
491491
done();
492492
});
493493
});
494+
describe('updateExtensions', function() {
495+
it('should call updateExtensions successfully', function(done) {
496+
//uncomment below and update the code to test updateExtensions
497+
//instance.updateExtensions(function(error) {
498+
// if (error) throw error;
499+
//expect().to.be();
500+
//});
501+
done();
502+
});
503+
});
494504
describe('updateFullTopic', function() {
495505
it('should call updateFullTopic successfully', function(done) {
496506
//uncomment below and update the code to test updateFullTopic

0 commit comments

Comments
 (0)