Skip to content

Commit

Permalink
MINOR: add model drawings (#709)
Browse files Browse the repository at this point in the history
* MINOR: add model drawings

* fix tests

* add admin
  • Loading branch information
Bimdata-io committed Dec 13, 2023
1 parent c1f2628 commit 3d2f60d
Show file tree
Hide file tree
Showing 8 changed files with 914 additions and 2 deletions.
3 changes: 3 additions & 0 deletions package/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ src/models/DirectionRequest.ts
src/models/Document.ts
src/models/DocumentPreviewFile.ts
src/models/DocumentWithElementList.ts
src/models/Drawing.ts
src/models/DrawingRequest.ts
src/models/Element.ts
src/models/ElementClassificationRelation.ts
src/models/ElementClassificationRelationRequest.ts
Expand Down Expand Up @@ -99,6 +101,7 @@ src/models/PatchedClassificationRequest.ts
src/models/PatchedCloudRequest.ts
src/models/PatchedCommentRequest.ts
src/models/PatchedDocumentRequest.ts
src/models/PatchedDrawingRequest.ts
src/models/PatchedElementRequest.ts
src/models/PatchedFolderWithoutChildrenRequest.ts
src/models/PatchedFullTopicRequest.ts
Expand Down
4 changes: 2 additions & 2 deletions package/src/apis/CollaborationApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1564,7 +1564,7 @@ export class CollaborationApi extends runtime.BaseAPI {
}

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

/**
* Create a document. If the document is one of {\'IFC\', \'DXF\', \'GLTF\', \'OBJ\', \'DWG\', \'POINT_CLOUD\'}, a model will be created and attached to this document Required scopes: document:write
* Create a document. If the document is one of {\'IFC\', \'OBJ\', \'POINT_CLOUD\', \'GLTF\', \'DWG\', \'DXF\'}, a model will be created and attached to this document Required scopes: document:write
* Create a document
*/
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, initOverrides?: RequestInit): Promise<Document> {
Expand Down
355 changes: 355 additions & 0 deletions package/src/apis/IfcApi.ts

Large diffs are not rendered by default.

355 changes: 355 additions & 0 deletions package/src/apis/ModelApi.ts

Large diffs are not rendered by default.

84 changes: 84 additions & 0 deletions package/src/models/Drawing.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
/* tslint:disable */
/* eslint-disable */
/**
* BIMData API
* 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.
*
* The version of the OpenAPI document: v1 (v1)
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/

import { exists, mapValues } from '../runtime';
import {
User,
UserFromJSON,
UserFromJSONTyped,
UserToJSON,
} from './User';

/**
*
* @export
* @interface Drawing
*/
export interface Drawing {
/**
*
* @type {number}
* @memberof Drawing
*/
readonly id: number;
/**
*
* @type {string}
* @memberof Drawing
*/
content: string;
/**
*
* @type {User}
* @memberof Drawing
*/
readonly creator: User | null;
/**
*
* @type {Date}
* @memberof Drawing
*/
readonly created_at: Date;
}

export function DrawingFromJSON(json: any): Drawing {
return DrawingFromJSONTyped(json, false);
}

export function DrawingFromJSONTyped(json: any, ignoreDiscriminator: boolean): Drawing {
if ((json === undefined) || (json === null)) {
return json;
}
return {

'id': json['id'],
'content': json['content'],
'creator': UserFromJSON(json['creator']),
'created_at': (new Date(json['created_at'])),
};
}

export function DrawingToJSON(value?: Drawing | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {

'content': value.content,
};
}

56 changes: 56 additions & 0 deletions package/src/models/DrawingRequest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/* tslint:disable */
/* eslint-disable */
/**
* BIMData API
* 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.
*
* The version of the OpenAPI document: v1 (v1)
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/

import { exists, mapValues } from '../runtime';
/**
*
* @export
* @interface DrawingRequest
*/
export interface DrawingRequest {
/**
*
* @type {string}
* @memberof DrawingRequest
*/
content: string;
}

export function DrawingRequestFromJSON(json: any): DrawingRequest {
return DrawingRequestFromJSONTyped(json, false);
}

export function DrawingRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): DrawingRequest {
if ((json === undefined) || (json === null)) {
return json;
}
return {

'content': json['content'],
};
}

export function DrawingRequestToJSON(value?: DrawingRequest | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {

'content': value.content,
};
}

56 changes: 56 additions & 0 deletions package/src/models/PatchedDrawingRequest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/* tslint:disable */
/* eslint-disable */
/**
* BIMData API
* 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.
*
* The version of the OpenAPI document: v1 (v1)
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/

import { exists, mapValues } from '../runtime';
/**
*
* @export
* @interface PatchedDrawingRequest
*/
export interface PatchedDrawingRequest {
/**
*
* @type {string}
* @memberof PatchedDrawingRequest
*/
content?: string;
}

export function PatchedDrawingRequestFromJSON(json: any): PatchedDrawingRequest {
return PatchedDrawingRequestFromJSONTyped(json, false);
}

export function PatchedDrawingRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedDrawingRequest {
if ((json === undefined) || (json === null)) {
return json;
}
return {

'content': !exists(json, 'content') ? undefined : json['content'],
};
}

export function PatchedDrawingRequestToJSON(value?: PatchedDrawingRequest | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {

'content': value.content,
};
}

3 changes: 3 additions & 0 deletions package/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ export * from './DirectionRequest';
export * from './Document';
export * from './DocumentPreviewFile';
export * from './DocumentWithElementList';
export * from './Drawing';
export * from './DrawingRequest';
export * from './Element';
export * from './ElementClassificationRelation';
export * from './ElementClassificationRelationRequest';
Expand Down Expand Up @@ -92,6 +94,7 @@ export * from './PatchedClassificationRequest';
export * from './PatchedCloudRequest';
export * from './PatchedCommentRequest';
export * from './PatchedDocumentRequest';
export * from './PatchedDrawingRequest';
export * from './PatchedElementRequest';
export * from './PatchedFolderWithoutChildrenRequest';
export * from './PatchedFullTopicRequest';
Expand Down

0 comments on commit 3d2f60d

Please sign in to comment.