Skip to content

Commit 4e5d0f8

Browse files
committed
MINOR: add BCF events
1 parent ade2a68 commit 4e5d0f8

File tree

13 files changed

+565
-75
lines changed

13 files changed

+565
-75
lines changed

package/.openapi-generator/FILES

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ src/models/Coloring.ts
2626
src/models/ColoringDefinition.ts
2727
src/models/ColoringRequest.ts
2828
src/models/Comment.ts
29+
src/models/CommentEvent.ts
30+
src/models/CommentEventAction.ts
2931
src/models/CommentRequest.ts
3032
src/models/Component.ts
3133
src/models/ComponentRequest.ts
@@ -235,6 +237,8 @@ src/models/Tag.ts
235237
src/models/TagIdRequest.ts
236238
src/models/TagRequest.ts
237239
src/models/Topic.ts
240+
src/models/TopicEvent.ts
241+
src/models/TopicEventAction.ts
238242
src/models/TopicPin.ts
239243
src/models/TopicRequest.ts
240244
src/models/TopicStatus.ts

package/src/apis/BcfApi.ts

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ import {
3636
Comment,
3737
CommentFromJSON,
3838
CommentToJSON,
39+
CommentEvent,
40+
CommentEventFromJSON,
41+
CommentEventToJSON,
3942
CommentRequest,
4043
CommentRequestFromJSON,
4144
CommentRequestToJSON,
@@ -117,6 +120,9 @@ import {
117120
Topic,
118121
TopicFromJSON,
119122
TopicToJSON,
123+
TopicEvent,
124+
TopicEventFromJSON,
125+
TopicEventToJSON,
120126
TopicPin,
121127
TopicPinFromJSON,
122128
TopicPinToJSON,
@@ -339,6 +345,12 @@ export interface GetCommentsRequest {
339345
$orderby?: string;
340346
}
341347

348+
export interface GetCommentsEventsRequest {
349+
projects_pk: number;
350+
$filter?: string;
351+
$orderby?: string;
352+
}
353+
342354
export interface GetDetailedExtensionsRequest {
343355
id: number;
344356
}
@@ -417,6 +429,12 @@ export interface GetTopicsRequest {
417429
models?: Array<number>;
418430
}
419431

432+
export interface GetTopicsEventsRequest {
433+
projects_pk: number;
434+
$filter?: string;
435+
$orderby?: string;
436+
}
437+
420438
export interface GetTopicsPinsRequest {
421439
projects_pk: number;
422440
format?: string;
@@ -2502,6 +2520,64 @@ export class BcfApi extends runtime.BaseAPI {
25022520
return await response.value();
25032521
}
25042522

2523+
/**
2524+
* Get comments events Required scopes: bcf:read
2525+
* Get comments events
2526+
*/
2527+
async getCommentsEventsRaw(requestParameters: GetCommentsEventsRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Array<CommentEvent>>> {
2528+
if (requestParameters.projects_pk === null || requestParameters.projects_pk === undefined) {
2529+
throw new runtime.RequiredError('projects_pk','Required parameter requestParameters.projects_pk was null or undefined when calling getCommentsEvents.');
2530+
}
2531+
2532+
const queryParameters: any = {};
2533+
2534+
if (requestParameters.$filter !== undefined) {
2535+
queryParameters['$filter'] = requestParameters.$filter;
2536+
}
2537+
2538+
if (requestParameters.$orderby !== undefined) {
2539+
queryParameters['$orderby'] = requestParameters.$orderby;
2540+
}
2541+
2542+
const headerParameters: runtime.HTTPHeaders = {};
2543+
2544+
if (this.configuration && this.configuration.apiKey) {
2545+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKey authentication
2546+
}
2547+
2548+
if (this.configuration && this.configuration.accessToken) {
2549+
// oauth required
2550+
headerParameters["Authorization"] = await this.configuration.accessToken("BIMData_Connect", []);
2551+
}
2552+
2553+
if (this.configuration && this.configuration.accessToken) {
2554+
// oauth required
2555+
headerParameters["Authorization"] = await this.configuration.accessToken("BIMData_Connect", []);
2556+
}
2557+
2558+
if (this.configuration && this.configuration.apiKey) {
2559+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // Bearer authentication
2560+
}
2561+
2562+
const response = await this.request({
2563+
path: `/bcf/2.1/projects/{projects_pk}/topics/comments/events`.replace(`{${"projects_pk"}}`, encodeURIComponent(String(requestParameters.projects_pk))),
2564+
method: 'GET',
2565+
headers: headerParameters,
2566+
query: queryParameters,
2567+
}, initOverrides);
2568+
2569+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(CommentEventFromJSON));
2570+
}
2571+
2572+
/**
2573+
* Get comments events Required scopes: bcf:read
2574+
* Get comments events
2575+
*/
2576+
async getCommentsEvents(projects_pk: number, $filter?: string, $orderby?: string, initOverrides?: RequestInit): Promise<Array<CommentEvent>> {
2577+
const response = await this.getCommentsEventsRaw({ projects_pk: projects_pk, $filter: $filter, $orderby: $orderby }, initOverrides);
2578+
return await response.value();
2579+
}
2580+
25052581
/**
25062582
* This is not a standard route. Retrieve project detailed extensions Required scopes: bcf:read
25072583
* Retrieve project detailed extensions
@@ -3222,6 +3298,64 @@ export class BcfApi extends runtime.BaseAPI {
32223298
return await response.value();
32233299
}
32243300

3301+
/**
3302+
* Get topics events Required scopes: bcf:read
3303+
* Get topics events
3304+
*/
3305+
async getTopicsEventsRaw(requestParameters: GetTopicsEventsRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Array<TopicEvent>>> {
3306+
if (requestParameters.projects_pk === null || requestParameters.projects_pk === undefined) {
3307+
throw new runtime.RequiredError('projects_pk','Required parameter requestParameters.projects_pk was null or undefined when calling getTopicsEvents.');
3308+
}
3309+
3310+
const queryParameters: any = {};
3311+
3312+
if (requestParameters.$filter !== undefined) {
3313+
queryParameters['$filter'] = requestParameters.$filter;
3314+
}
3315+
3316+
if (requestParameters.$orderby !== undefined) {
3317+
queryParameters['$orderby'] = requestParameters.$orderby;
3318+
}
3319+
3320+
const headerParameters: runtime.HTTPHeaders = {};
3321+
3322+
if (this.configuration && this.configuration.apiKey) {
3323+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKey authentication
3324+
}
3325+
3326+
if (this.configuration && this.configuration.accessToken) {
3327+
// oauth required
3328+
headerParameters["Authorization"] = await this.configuration.accessToken("BIMData_Connect", []);
3329+
}
3330+
3331+
if (this.configuration && this.configuration.accessToken) {
3332+
// oauth required
3333+
headerParameters["Authorization"] = await this.configuration.accessToken("BIMData_Connect", []);
3334+
}
3335+
3336+
if (this.configuration && this.configuration.apiKey) {
3337+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // Bearer authentication
3338+
}
3339+
3340+
const response = await this.request({
3341+
path: `/bcf/2.1/projects/{projects_pk}/topics/events`.replace(`{${"projects_pk"}}`, encodeURIComponent(String(requestParameters.projects_pk))),
3342+
method: 'GET',
3343+
headers: headerParameters,
3344+
query: queryParameters,
3345+
}, initOverrides);
3346+
3347+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(TopicEventFromJSON));
3348+
}
3349+
3350+
/**
3351+
* Get topics events Required scopes: bcf:read
3352+
* Get topics events
3353+
*/
3354+
async getTopicsEvents(projects_pk: number, $filter?: string, $orderby?: string, initOverrides?: RequestInit): Promise<Array<TopicEvent>> {
3355+
const response = await this.getTopicsEventsRaw({ projects_pk: projects_pk, $filter: $filter, $orderby: $orderby }, initOverrides);
3356+
return await response.value();
3357+
}
3358+
32253359
/**
32263360
* This is not a standard route. Get pins of all or many topics Required scopes: bcf:read
32273361
* Get pins of all or many topics

package/src/apis/CollaborationApi.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1693,7 +1693,7 @@ export class CollaborationApi extends runtime.BaseAPI {
16931693
}
16941694

16951695
/**
1696-
* Create a document. If the document is one of {\'OBJ\', \'GLTF\', \'DXF\', \'POINT_CLOUD\', \'IFC\', \'DWG\'}, a model will be created and attached to this document Required scopes: document:write
1696+
* Create a document. If the document is one of {\'GLTF\', \'DXF\', \'IFC\', \'DWG\', \'POINT_CLOUD\', \'OBJ\'}, a model will be created and attached to this document Required scopes: document:write
16971697
* Create a document
16981698
*/
16991699
async createDocumentRaw(requestParameters: CreateDocumentRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Document>> {
@@ -1800,7 +1800,7 @@ export class CollaborationApi extends runtime.BaseAPI {
18001800
}
18011801

18021802
/**
1803-
* Create a document. If the document is one of {\'OBJ\', \'GLTF\', \'DXF\', \'POINT_CLOUD\', \'IFC\', \'DWG\'}, a model will be created and attached to this document Required scopes: document:write
1803+
* Create a document. If the document is one of {\'GLTF\', \'DXF\', \'IFC\', \'DWG\', \'POINT_CLOUD\', \'OBJ\'}, a model will be created and attached to this document Required scopes: document:write
18041804
* Create a document
18051805
*/
18061806
async createDocument(cloud_pk: number, project_pk: number, name: string, file: Blob, parent_id?: number | null, file_name?: string, description?: string | null, model_source?: CreateDocumentModelSourceEnum, ifc_source?: CreateDocumentIfcSourceEnum, successor_of?: number, process_hint?: CreateDocumentProcessHintEnum, initOverrides?: RequestInit): Promise<Document> {

package/src/apis/ModelApi.ts

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,9 +1096,6 @@ export interface GetPropertiesTypesRequest {
10961096
cloud_pk: number;
10971097
model_pk: number;
10981098
project_pk: number;
1099-
classification?: string;
1100-
classification__notation?: string;
1101-
property_filter?: string;
11021099
type?: string;
11031100
}
11041101

@@ -8810,18 +8807,6 @@ export class ModelApi extends runtime.BaseAPI {
88108807

88118808
const queryParameters: any = {};
88128809

8813-
if (requestParameters.classification !== undefined) {
8814-
queryParameters['classification'] = requestParameters.classification;
8815-
}
8816-
8817-
if (requestParameters.classification__notation !== undefined) {
8818-
queryParameters['classification__notation'] = requestParameters.classification__notation;
8819-
}
8820-
8821-
if (requestParameters.property_filter !== undefined) {
8822-
queryParameters['property_filter'] = requestParameters.property_filter;
8823-
}
8824-
88258810
if (requestParameters.type !== undefined) {
88268811
queryParameters['type'] = requestParameters.type;
88278812
}
@@ -8860,8 +8845,8 @@ export class ModelApi extends runtime.BaseAPI {
88608845
* Retrieve all property types and their value type used in this model Required scopes: ifc:read, model:read
88618846
* Retrieve all property types and their value type used in this model
88628847
*/
8863-
async getPropertiesTypes(cloud_pk: number, model_pk: number, project_pk: number, classification?: string, classification__notation?: string, property_filter?: string, type?: string, initOverrides?: RequestInit): Promise<Array<PropertyList>> {
8864-
const response = await this.getPropertiesTypesRaw({ cloud_pk: cloud_pk, model_pk: model_pk, project_pk: project_pk, classification: classification, classification__notation: classification__notation, property_filter: property_filter, type: type }, initOverrides);
8848+
async getPropertiesTypes(cloud_pk: number, model_pk: number, project_pk: number, type?: string, initOverrides?: RequestInit): Promise<Array<PropertyList>> {
8849+
const response = await this.getPropertiesTypesRaw({ cloud_pk: cloud_pk, model_pk: model_pk, project_pk: project_pk, type: type }, initOverrides);
88658850
return await response.value();
88668851
}
88678852

package/src/models/CommentEvent.ts

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
/* tslint:disable */
2+
/* eslint-disable */
3+
/**
4+
* BIMData API
5+
* BIMData API is a tool to interact with your models stored on BIMData’s servers. Through the API, you can manage your projects, the clouds, upload your IFC files and manage them through endpoints.
6+
*
7+
* The version of the OpenAPI document: v1 (v1)
8+
* Contact: support@bimdata.io
9+
*
10+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11+
* https://openapi-generator.tech
12+
* Do not edit the class manually.
13+
*/
14+
15+
import { exists, mapValues } from '../runtime';
16+
import {
17+
CommentEventAction,
18+
CommentEventActionFromJSON,
19+
CommentEventActionFromJSONTyped,
20+
CommentEventActionToJSON,
21+
} from './CommentEventAction';
22+
23+
/**
24+
*
25+
* @export
26+
* @interface CommentEvent
27+
*/
28+
export interface CommentEvent {
29+
/**
30+
*
31+
* @type {string}
32+
* @memberof CommentEvent
33+
*/
34+
readonly topic_guid: string;
35+
/**
36+
*
37+
* @type {string}
38+
* @memberof CommentEvent
39+
*/
40+
readonly comment_guid: string;
41+
/**
42+
*
43+
* @type {string}
44+
* @memberof CommentEvent
45+
*/
46+
readonly author: string | null;
47+
/**
48+
*
49+
* @type {Date}
50+
* @memberof CommentEvent
51+
*/
52+
readonly date: Date;
53+
/**
54+
*
55+
* @type {Array<CommentEventAction>}
56+
* @memberof CommentEvent
57+
*/
58+
events: Array<CommentEventAction>;
59+
}
60+
61+
export function CommentEventFromJSON(json: any): CommentEvent {
62+
return CommentEventFromJSONTyped(json, false);
63+
}
64+
65+
export function CommentEventFromJSONTyped(json: any, ignoreDiscriminator: boolean): CommentEvent {
66+
if ((json === undefined) || (json === null)) {
67+
return json;
68+
}
69+
return {
70+
71+
'topic_guid': json['topic_guid'],
72+
'comment_guid': json['comment_guid'],
73+
'author': json['author'],
74+
'date': (new Date(json['date'])),
75+
'events': ((json['events'] as Array<any>).map(CommentEventActionFromJSON)),
76+
};
77+
}
78+
79+
export function CommentEventToJSON(value?: CommentEvent | null): any {
80+
if (value === undefined) {
81+
return undefined;
82+
}
83+
if (value === null) {
84+
return null;
85+
}
86+
return {
87+
88+
'events': ((value.events as Array<any>).map(CommentEventActionToJSON)),
89+
};
90+
}
91+

0 commit comments

Comments
 (0)