Skip to content

Commit 9350b26

Browse files
committed
PATCH: fix(storey): allow to add photosphere as storey plan + fix process_hint on createDocument (#790)
* fix(storey): allow to add photosphere as storey plan * fix(storey): create STOREY_CHILD_TYPES list + add 'process_hint' to Docuemnt serializer fields
1 parent 7237a4e commit 9350b26

File tree

4 files changed

+44
-16
lines changed

4 files changed

+44
-16
lines changed

package/src/apis/CollaborationApi.ts

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ export interface CreateDocumentRequest {
276276
model_source?: CreateDocumentModelSourceEnum;
277277
ifc_source?: CreateDocumentIfcSourceEnum;
278278
successor_of?: number;
279+
process_hint?: CreateDocumentProcessHintEnum;
279280
}
280281

281282
export interface CreateFolderRequest {
@@ -1670,7 +1671,7 @@ export class CollaborationApi extends runtime.BaseAPI {
16701671
}
16711672

16721673
/**
1673-
* Create a document. If the document is one of {\'GLTF\', \'OBJ\', \'IFC\', \'DWG\', \'DXF\', \'POINT_CLOUD\'}, a model will be created and attached to this document Required scopes: document:write
1674+
* Create a document. If the document is one of {\'OBJ\', \'IFC\', \'GLTF\', \'DXF\', \'POINT_CLOUD\', \'DWG\'}, a model will be created and attached to this document Required scopes: document:write
16741675
* Create a document
16751676
*/
16761677
async createDocumentRaw(requestParameters: CreateDocumentRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Document>> {
@@ -1761,6 +1762,10 @@ export class CollaborationApi extends runtime.BaseAPI {
17611762
formParams.append('successor_of', requestParameters.successor_of as any);
17621763
}
17631764

1765+
if (requestParameters.process_hint !== undefined) {
1766+
formParams.append('process_hint', requestParameters.process_hint as any);
1767+
}
1768+
17641769
const response = await this.request({
17651770
path: `/cloud/{cloud_pk}/project/{project_pk}/document`.replace(`{${"cloud_pk"}}`, encodeURIComponent(String(requestParameters.cloud_pk))).replace(`{${"project_pk"}}`, encodeURIComponent(String(requestParameters.project_pk))),
17661771
method: 'POST',
@@ -1773,11 +1778,11 @@ export class CollaborationApi extends runtime.BaseAPI {
17731778
}
17741779

17751780
/**
1776-
* Create a document. If the document is one of {\'GLTF\', \'OBJ\', \'IFC\', \'DWG\', \'DXF\', \'POINT_CLOUD\'}, a model will be created and attached to this document Required scopes: document:write
1781+
* Create a document. If the document is one of {\'OBJ\', \'IFC\', \'GLTF\', \'DXF\', \'POINT_CLOUD\', \'DWG\'}, a model will be created and attached to this document Required scopes: document:write
17771782
* Create a document
17781783
*/
1779-
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> {
1780-
const response = await this.createDocumentRaw({ cloud_pk: cloud_pk, project_pk: project_pk, name: name, file: file, parent_id: parent_id, file_name: file_name, description: description, model_source: model_source, ifc_source: ifc_source, successor_of: successor_of }, initOverrides);
1784+
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> {
1785+
const response = await this.createDocumentRaw({ cloud_pk: cloud_pk, project_pk: project_pk, name: name, file: file, parent_id: parent_id, file_name: file_name, description: description, model_source: model_source, ifc_source: ifc_source, successor_of: successor_of, process_hint: process_hint }, initOverrides);
17811786
return await response.value();
17821787
}
17831788

@@ -7556,6 +7561,13 @@ export enum CreateDocumentIfcSourceEnum {
75567561
Export = 'EXPORT',
75577562
Optimized = 'OPTIMIZED'
75587563
}
7564+
/**
7565+
* @export
7566+
* @enum {string}
7567+
*/
7568+
export enum CreateDocumentProcessHintEnum {
7569+
Photosphere = 'PHOTOSPHERE'
7570+
}
75597571
/**
75607572
* @export
75617573
* @enum {string}

package/src/apis/ModelApi.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2460,7 +2460,7 @@ export class ModelApi extends runtime.BaseAPI {
24602460
}
24612461

24622462
/**
2463-
* Create a relation between a 2d model and a building. The model type must be one of : (\'DWG\', \'DXF\', \'PDF\', \'JPEG\', \'PNG\') Required scopes: ifc:write, model:write
2463+
* Create a relation between a 2d model and a building. The model type must be one of : (\'DWG\', \'DXF\', \'PDF\', \'JPEG\', \'PNG\', \'PHOTOSPHERE\') Required scopes: ifc:write, model:write
24642464
* Create a relation between a 2d model and a building
24652465
*/
24662466
async createBuildingPlanRaw(requestParameters: CreateBuildingPlanRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Building>> {
@@ -2520,7 +2520,7 @@ export class ModelApi extends runtime.BaseAPI {
25202520
}
25212521

25222522
/**
2523-
* Create a relation between a 2d model and a building. The model type must be one of : (\'DWG\', \'DXF\', \'PDF\', \'JPEG\', \'PNG\') Required scopes: ifc:write, model:write
2523+
* Create a relation between a 2d model and a building. The model type must be one of : (\'DWG\', \'DXF\', \'PDF\', \'JPEG\', \'PNG\', \'PHOTOSPHERE\') Required scopes: ifc:write, model:write
25242524
* Create a relation between a 2d model and a building
25252525
*/
25262526
async createBuildingPlan(building_uuid: string, cloud_pk: number, model_pk: number, project_pk: number, BuildingModelPlanRequest: BuildingModelPlanRequest, initOverrides?: RequestInit): Promise<Building> {
@@ -3923,7 +3923,7 @@ export class ModelApi extends runtime.BaseAPI {
39233923
}
39243924

39253925
/**
3926-
* Create a relation between a 2d model and a storey. The model type must be one of : (\'DWG\', \'DXF\', \'PDF\', \'JPEG\', \'PNG\') Required scopes: ifc:write, model:write
3926+
* Create a relation between a 2d model and a storey. The model type must be one of : (\'DWG\', \'DXF\', \'PDF\', \'JPEG\', \'PNG\', \'PHOTOSPHERE\') Required scopes: ifc:write, model:write
39273927
* Create a relation between a 2d model and a storey
39283928
*/
39293929
async createStoreyPlanRaw(requestParameters: CreateStoreyPlanRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Storey>> {
@@ -3983,7 +3983,7 @@ export class ModelApi extends runtime.BaseAPI {
39833983
}
39843984

39853985
/**
3986-
* Create a relation between a 2d model and a storey. The model type must be one of : (\'DWG\', \'DXF\', \'PDF\', \'JPEG\', \'PNG\') Required scopes: ifc:write, model:write
3986+
* Create a relation between a 2d model and a storey. The model type must be one of : (\'DWG\', \'DXF\', \'PDF\', \'JPEG\', \'PNG\', \'PHOTOSPHERE\') Required scopes: ifc:write, model:write
39873987
* Create a relation between a 2d model and a storey
39883988
*/
39893989
async createStoreyPlan(cloud_pk: number, model_pk: number, project_pk: number, storey_uuid: string, StoreyModelPlanRequest: StoreyModelPlanRequest, initOverrides?: RequestInit): Promise<Storey> {

package/src/models/PatchedDocumentRequest.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,14 @@ export interface PatchedDocumentRequest {
7979
* @memberof PatchedDocumentRequest
8080
*/
8181
successor_of?: number;
82+
/**
83+
* Provide a info about the document in order to customize the way it is processed.
84+
*
85+
* * `PHOTOSPHERE` - PHOTOSPHERE
86+
* @type {string}
87+
* @memberof PatchedDocumentRequest
88+
*/
89+
process_hint?: PatchedDocumentRequestProcessHintEnum;
8290
}
8391

8492
/**
@@ -101,6 +109,12 @@ export enum PatchedDocumentRequestIfcSourceEnum {
101109
Merge = 'MERGE',
102110
Export = 'EXPORT',
103111
Optimized = 'OPTIMIZED'
112+
}/**
113+
* @export
114+
* @enum {string}
115+
*/
116+
export enum PatchedDocumentRequestProcessHintEnum {
117+
Photosphere = 'PHOTOSPHERE'
104118
}
105119

106120
export function PatchedDocumentRequestFromJSON(json: any): PatchedDocumentRequest {
@@ -121,6 +135,7 @@ export function PatchedDocumentRequestFromJSONTyped(json: any, ignoreDiscriminat
121135
'model_source': !exists(json, 'model_source') ? undefined : json['model_source'],
122136
'ifc_source': !exists(json, 'ifc_source') ? undefined : json['ifc_source'],
123137
'successor_of': !exists(json, 'successor_of') ? undefined : json['successor_of'],
138+
'process_hint': !exists(json, 'process_hint') ? undefined : json['process_hint'],
124139
};
125140
}
126141

@@ -141,6 +156,7 @@ export function PatchedDocumentRequestToJSON(value?: PatchedDocumentRequest | nu
141156
'model_source': value.model_source,
142157
'ifc_source': value.ifc_source,
143158
'successor_of': value.successor_of,
159+
'process_hint': value.process_hint,
144160
};
145161
}
146162

package/src/models/WriteFolderRequest.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ import { exists, mapValues } from '../runtime';
1919
* @interface WriteFolderRequest
2020
*/
2121
export interface WriteFolderRequest {
22+
/**
23+
* Name of the folder
24+
* @type {string}
25+
* @memberof WriteFolderRequest
26+
*/
27+
name: string;
2228
/**
2329
* Permission for a Folder
2430
*
@@ -35,12 +41,6 @@ export interface WriteFolderRequest {
3541
* @memberof WriteFolderRequest
3642
*/
3743
parent_id?: number | null;
38-
/**
39-
* Name of the folder
40-
* @type {string}
41-
* @memberof WriteFolderRequest
42-
*/
43-
name: string;
4444
/**
4545
*
4646
* @type {Array<WriteFolderRequest>}
@@ -69,9 +69,9 @@ export function WriteFolderRequestFromJSONTyped(json: any, ignoreDiscriminator:
6969
}
7070
return {
7171

72+
'name': json['name'],
7273
'default_permission': !exists(json, 'default_permission') ? undefined : json['default_permission'],
7374
'parent_id': !exists(json, 'parent_id') ? undefined : json['parent_id'],
74-
'name': json['name'],
7575
'children': !exists(json, 'children') ? undefined : (json['children'] === null ? null : (json['children'] as Array<any>).map(WriteFolderRequestFromJSON)),
7676
};
7777
}
@@ -85,9 +85,9 @@ export function WriteFolderRequestToJSON(value?: WriteFolderRequest | null): any
8585
}
8686
return {
8787

88+
'name': value.name,
8889
'default_permission': value.default_permission,
8990
'parent_id': value.parent_id,
90-
'name': value.name,
9191
'children': value.children === undefined ? undefined : (value.children === null ? null : (value.children as Array<any>).map(WriteFolderRequestToJSON)),
9292
};
9393
}

0 commit comments

Comments
 (0)