Skip to content

Commit

Permalink
MINOR: remove sub projects (#782)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bimdata-io committed Oct 24, 2024
1 parent 6293d4f commit 1d864af
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 98 deletions.
58 changes: 2 additions & 56 deletions package/src/apis/CollaborationApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -650,10 +650,6 @@ export interface GetProjectSizeRequest {
id: number;
}

export interface GetProjectSubTreeRequest {
cloud_pk: number;
}

export interface GetProjectTreeRequest {
cloud_pk: number;
id: number;
Expand Down Expand Up @@ -1677,7 +1673,7 @@ export class CollaborationApi extends runtime.BaseAPI {
}

/**
* 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. If the document is one of {\'DXF\', \'IFC\', \'POINT_CLOUD\', \'GLTF\', \'DWG\', \'OBJ\'}, 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 +1776,7 @@ export class CollaborationApi extends runtime.BaseAPI {
}

/**
* 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. If the document is one of {\'DXF\', \'IFC\', \'POINT_CLOUD\', \'GLTF\', \'DWG\', \'OBJ\'}, 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 Expand Up @@ -5130,56 +5126,6 @@ export class CollaborationApi extends runtime.BaseAPI {
return await response.value();
}

/**
* Retrieve the complete projects tree of the cloud
* Retrieve the complete projects tree of the cloud
*/
async getProjectSubTreeRaw(requestParameters: GetProjectSubTreeRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Array<ProjectWithChildren>>> {
if (requestParameters.cloud_pk === null || requestParameters.cloud_pk === undefined) {
throw new runtime.RequiredError('cloud_pk','Required parameter requestParameters.cloud_pk was null or undefined when calling getProjectSubTree.');
}

const queryParameters: any = {};

const headerParameters: runtime.HTTPHeaders = {};

if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKey authentication
}

if (this.configuration && this.configuration.accessToken) {
// oauth required
headerParameters["Authorization"] = await this.configuration.accessToken("BIMData_Connect", []);
}

if (this.configuration && this.configuration.accessToken) {
// oauth required
headerParameters["Authorization"] = await this.configuration.accessToken("BIMData_Connect", []);
}

if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // Bearer authentication
}

const response = await this.request({
path: `/cloud/{cloud_pk}/project/subtree`.replace(`{${"cloud_pk"}}`, encodeURIComponent(String(requestParameters.cloud_pk))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);

return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ProjectWithChildrenFromJSON));
}

/**
* Retrieve the complete projects tree of the cloud
* Retrieve the complete projects tree of the cloud
*/
async getProjectSubTree(cloud_pk: number, initOverrides?: RequestInit): Promise<Array<ProjectWithChildren>> {
const response = await this.getProjectSubTreeRaw({ cloud_pk: cloud_pk }, initOverrides);
return await response.value();
}

/**
* Retrieve the complete DMS tree (all folders and all documents in the project). DEPRECATED: renamed to getProjectDMSTree
* Retrieve the complete DMS tree
Expand Down
3 changes: 1 addition & 2 deletions package/src/models/GroupFolderRead.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export interface GroupFolderRead {
* @type {Group}
* @memberof GroupFolderRead
*/
group: Group;
readonly group: Group | null;
/**
* * `1` - denied
* * `50` - read_only
Expand Down Expand Up @@ -77,7 +77,6 @@ export function GroupFolderReadToJSON(value?: GroupFolderRead | null): any {
}
return {

'group': GroupToJSON(value.group),
'permission': value.permission,
};
}
Expand Down
8 changes: 0 additions & 8 deletions package/src/models/PatchedProjectRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@ export interface PatchedProjectRequest {
* @memberof PatchedProjectRequest
*/
status?: PatchedProjectRequestStatusEnum;
/**
*
* @type {number}
* @memberof PatchedProjectRequest
*/
parent_id?: number | null;
/**
*
* @type {number}
Expand Down Expand Up @@ -81,7 +75,6 @@ export function PatchedProjectRequestFromJSONTyped(json: any, ignoreDiscriminato
'name': !exists(json, 'name') ? undefined : json['name'],
'description': !exists(json, 'description') ? undefined : json['description'],
'status': !exists(json, 'status') ? undefined : json['status'],
'parent_id': !exists(json, 'parent_id') ? undefined : json['parent_id'],
'main_model_id': !exists(json, 'main_model_id') ? undefined : json['main_model_id'],
};
}
Expand All @@ -99,7 +92,6 @@ export function PatchedProjectRequestToJSON(value?: PatchedProjectRequest | null
'name': value.name,
'description': value.description,
'status': value.status,
'parent_id': value.parent_id,
'main_model_id': value.main_model_id,
};
}
Expand Down
8 changes: 0 additions & 8 deletions package/src/models/Project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,6 @@ export interface Project {
* @memberof Project
*/
readonly updated_at: Date;
/**
*
* @type {number}
* @memberof Project
*/
parent_id?: number | null;
/**
*
* @type {number}
Expand Down Expand Up @@ -122,7 +116,6 @@ export function ProjectFromJSONTyped(json: any, ignoreDiscriminator: boolean): P
'status': !exists(json, 'status') ? undefined : json['status'],
'created_at': (new Date(json['created_at'])),
'updated_at': (new Date(json['updated_at'])),
'parent_id': !exists(json, 'parent_id') ? undefined : json['parent_id'],
'root_folder_id': json['root_folder_id'],
'main_model_id': !exists(json, 'main_model_id') ? undefined : json['main_model_id'],
};
Expand All @@ -141,7 +134,6 @@ export function ProjectToJSON(value?: Project | null): any {
'name': value.name,
'description': value.description,
'status': value.status,
'parent_id': value.parent_id,
'main_model_id': value.main_model_id,
};
}
Expand Down
8 changes: 0 additions & 8 deletions package/src/models/ProjectRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@ export interface ProjectRequest {
* @memberof ProjectRequest
*/
status?: ProjectRequestStatusEnum;
/**
*
* @type {number}
* @memberof ProjectRequest
*/
parent_id?: number | null;
/**
*
* @type {number}
Expand Down Expand Up @@ -81,7 +75,6 @@ export function ProjectRequestFromJSONTyped(json: any, ignoreDiscriminator: bool
'name': json['name'],
'description': !exists(json, 'description') ? undefined : json['description'],
'status': !exists(json, 'status') ? undefined : json['status'],
'parent_id': !exists(json, 'parent_id') ? undefined : json['parent_id'],
'main_model_id': !exists(json, 'main_model_id') ? undefined : json['main_model_id'],
};
}
Expand All @@ -99,7 +92,6 @@ export function ProjectRequestToJSON(value?: ProjectRequest | null): any {
'name': value.name,
'description': value.description,
'status': value.status,
'parent_id': value.parent_id,
'main_model_id': value.main_model_id,
};
}
Expand Down
8 changes: 0 additions & 8 deletions package/src/models/ProjectWithChildren.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,6 @@ export interface ProjectWithChildren {
* @memberof ProjectWithChildren
*/
readonly updated_at: Date;
/**
*
* @type {number}
* @memberof ProjectWithChildren
*/
parent_id?: number | null;
/**
*
* @type {Array<ProjectWithChildren>}
Expand Down Expand Up @@ -114,7 +108,6 @@ export function ProjectWithChildrenFromJSONTyped(json: any, ignoreDiscriminator:
'status': !exists(json, 'status') ? undefined : json['status'],
'created_at': (new Date(json['created_at'])),
'updated_at': (new Date(json['updated_at'])),
'parent_id': !exists(json, 'parent_id') ? undefined : json['parent_id'],
'children': ((json['children'] as Array<any>).map(ProjectWithChildrenFromJSON)),
'root_folder_id': json['root_folder_id'],
'main_model_id': json['main_model_id'],
Expand All @@ -134,7 +127,6 @@ export function ProjectWithChildrenToJSON(value?: ProjectWithChildren | null): a
'name': value.name,
'description': value.description,
'status': value.status,
'parent_id': value.parent_id,
};
}

16 changes: 8 additions & 8 deletions package/src/models/WriteFolderRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@ 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,6 +29,12 @@ export interface WriteFolderRequest {
* @memberof WriteFolderRequest
*/
default_permission?: WriteFolderRequestDefaultPermissionEnum;
/**
* Name of the folder
* @type {string}
* @memberof WriteFolderRequest
*/
name: string;
/**
*
* @type {number}
Expand Down Expand Up @@ -69,8 +69,8 @@ export function WriteFolderRequestFromJSONTyped(json: any, ignoreDiscriminator:
}
return {

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

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

0 comments on commit 1d864af

Please sign in to comment.