Skip to content

Commit

Permalink
MINOR: add model layout_name for DWG models (#780)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bimdata-io committed Oct 23, 2024
1 parent e6cb0f2 commit 687b0d9
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 10 deletions.
4 changes: 2 additions & 2 deletions package/src/apis/CollaborationApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1677,7 +1677,7 @@ export class CollaborationApi extends runtime.BaseAPI {
}

/**
* Create a document. If the document is one of {\'OBJ\', \'GLTF\', \'IFC\', \'DWG\', \'POINT_CLOUD\', \'DXF\'}, a model will be created and attached to this document Required scopes: document:write
* Create a document. If the document is one of {\'IFC\', \'GLTF\', \'OBJ\', \'DXF\', \'POINT_CLOUD\', \'DWG\'}, 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 @@ -1780,7 +1780,7 @@ export class CollaborationApi extends runtime.BaseAPI {
}

/**
* Create a document. If the document is one of {\'OBJ\', \'GLTF\', \'IFC\', \'DWG\', \'POINT_CLOUD\', \'DXF\'}, a model will be created and attached to this document Required scopes: document:write
* Create a document. If the document is one of {\'IFC\', \'GLTF\', \'OBJ\', \'DXF\', \'POINT_CLOUD\', \'DWG\'}, 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
8 changes: 8 additions & 0 deletions package/src/models/CreateMultiPageModelRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ export interface CreateMultiPageModelRequest {
* @memberof CreateMultiPageModelRequest
*/
map_files: Array<Blob>;
/**
*
* @type {Array<string>}
* @memberof CreateMultiPageModelRequest
*/
layout_names?: Array<string> | null;
}

export function CreateMultiPageModelRequestFromJSON(json: any): CreateMultiPageModelRequest {
Expand All @@ -38,6 +44,7 @@ export function CreateMultiPageModelRequestFromJSONTyped(json: any, ignoreDiscri
return {

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

Expand All @@ -51,6 +58,7 @@ export function CreateMultiPageModelRequestToJSON(value?: CreateMultiPageModelRe
return {

'map_files': value.map_files,
'layout_names': value.layout_names,
};
}

8 changes: 8 additions & 0 deletions package/src/models/Model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,12 @@ export interface Model {
* @memberof Model
*/
readonly page_number: number | null;
/**
* The name of the DWG layout (only set when type==DWG)
* @type {string}
* @memberof Model
*/
layout_name?: string | null;
/**
* Contains additional pages of a pdf
* @type {Array<ModelSerializerWithoutChildren>}
Expand Down Expand Up @@ -316,6 +322,7 @@ export function ModelFromJSONTyped(json: any, ignoreDiscriminator: boolean): Mod
'recommanded_2d_angle': !exists(json, 'recommanded_2d_angle') ? undefined : json['recommanded_2d_angle'],
'parent_id': json['parent_id'],
'page_number': json['page_number'],
'layout_name': !exists(json, 'layout_name') ? undefined : json['layout_name'],
'children': ((json['children'] as Array<any>).map(ModelSerializerWithoutChildrenFromJSON)),
};
}
Expand All @@ -337,6 +344,7 @@ export function ModelToJSON(value?: Model | null): any {
'version': value.version,
'north_vector': value.north_vector,
'recommanded_2d_angle': value.recommanded_2d_angle,
'layout_name': value.layout_name,
};
}

8 changes: 8 additions & 0 deletions package/src/models/ModelSerializerWithoutChildren.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,12 @@ export interface ModelSerializerWithoutChildren {
* @memberof ModelSerializerWithoutChildren
*/
readonly page_number: number | null;
/**
* The name of the DWG layout (only set when type==DWG)
* @type {string}
* @memberof ModelSerializerWithoutChildren
*/
layout_name?: string | null;
}

/**
Expand Down Expand Up @@ -304,6 +310,7 @@ export function ModelSerializerWithoutChildrenFromJSONTyped(json: any, ignoreDis
'recommanded_2d_angle': !exists(json, 'recommanded_2d_angle') ? undefined : json['recommanded_2d_angle'],
'parent_id': json['parent_id'],
'page_number': json['page_number'],
'layout_name': !exists(json, 'layout_name') ? undefined : json['layout_name'],
};
}

Expand All @@ -324,6 +331,7 @@ export function ModelSerializerWithoutChildrenToJSON(value?: ModelSerializerWith
'version': value.version,
'north_vector': value.north_vector,
'recommanded_2d_angle': value.recommanded_2d_angle,
'layout_name': value.layout_name,
};
}

8 changes: 8 additions & 0 deletions package/src/models/PatchedModelRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ export interface PatchedModelRequest {
* @memberof PatchedModelRequest
*/
recommanded_2d_angle?: number | null;
/**
* The name of the DWG layout (only set when type==DWG)
* @type {string}
* @memberof PatchedModelRequest
*/
layout_name?: string | null;
}

/**
Expand Down Expand Up @@ -103,6 +109,7 @@ export function PatchedModelRequestFromJSONTyped(json: any, ignoreDiscriminator:
'version': !exists(json, 'version') ? undefined : json['version'],
'north_vector': !exists(json, 'north_vector') ? undefined : json['north_vector'],
'recommanded_2d_angle': !exists(json, 'recommanded_2d_angle') ? undefined : json['recommanded_2d_angle'],
'layout_name': !exists(json, 'layout_name') ? undefined : json['layout_name'],
};
}

Expand All @@ -123,6 +130,7 @@ export function PatchedModelRequestToJSON(value?: PatchedModelRequest | null): a
'version': value.version,
'north_vector': value.north_vector,
'recommanded_2d_angle': value.recommanded_2d_angle,
'layout_name': value.layout_name,
};
}

16 changes: 8 additions & 8 deletions package/src/models/WriteFolderRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ import { exists, mapValues } from '../runtime';
* @interface WriteFolderRequest
*/
export interface WriteFolderRequest {
/**
* Name of the folder
* @type {string}
* @memberof WriteFolderRequest
*/
name: string;
/**
* Permission for a Folder
*
Expand All @@ -35,12 +41,6 @@ export interface WriteFolderRequest {
* @memberof WriteFolderRequest
*/
parent_id?: number | null;
/**
* Name of the folder
* @type {string}
* @memberof WriteFolderRequest
*/
name: string;
/**
*
* @type {Array<WriteFolderRequest>}
Expand Down Expand Up @@ -69,9 +69,9 @@ export function WriteFolderRequestFromJSONTyped(json: any, ignoreDiscriminator:
}
return {

'name': json['name'],
'default_permission': !exists(json, 'default_permission') ? undefined : json['default_permission'],
'parent_id': !exists(json, 'parent_id') ? undefined : json['parent_id'],
'name': json['name'],
'children': !exists(json, 'children') ? undefined : (json['children'] === null ? null : (json['children'] as Array<any>).map(WriteFolderRequestFromJSON)),
};
}
Expand All @@ -85,9 +85,9 @@ export function WriteFolderRequestToJSON(value?: WriteFolderRequest | null): any
}
return {

'name': value.name,
'default_permission': value.default_permission,
'parent_id': value.parent_id,
'name': value.name,
'children': value.children === undefined ? undefined : (value.children === null ? null : (value.children as Array<any>).map(WriteFolderRequestToJSON)),
};
}
Expand Down

0 comments on commit 687b0d9

Please sign in to comment.