Skip to content

Commit

Permalink
MINOR: Feat/add link between zone and storey (#723)
Browse files Browse the repository at this point in the history
* Add a link between zone and storey.

* Zone-storey, use uuid instead of pk.

* Rename storey as storey_uuid in zone serializer.

* Split update/remove storey from zone test.
  • Loading branch information
Bimdata-io committed Feb 22, 2024
1 parent 59336cc commit 57c0e58
Show file tree
Hide file tree
Showing 26 changed files with 256 additions and 20 deletions.
3 changes: 3 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ docs/Viewpoint.md
docs/ViewpointRequest.md
docs/Visa.md
docs/VisaAttachment.md
docs/VisaAttachmentRequest.md
docs/VisaComment.md
docs/VisaCommentRequest.md
docs/VisaRequest.md
Expand Down Expand Up @@ -484,6 +485,7 @@ src/model/Viewpoint.js
src/model/ViewpointRequest.js
src/model/Visa.js
src/model/VisaAttachment.js
src/model/VisaAttachmentRequest.js
src/model/VisaComment.js
src/model/VisaCommentRequest.js
src/model/VisaRequest.js
Expand Down Expand Up @@ -731,6 +733,7 @@ test/model/Viewpoint.spec.js
test/model/ViewpointRequest.spec.js
test/model/Visa.spec.js
test/model/VisaAttachment.spec.js
test/model/VisaAttachmentRequest.spec.js
test/model/VisaComment.spec.js
test/model/VisaCommentRequest.spec.js
test/model/VisaRequest.spec.js
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -859,6 +859,7 @@ Class | Method | HTTP request | Description
- [bimdata.ViewpointRequest](docs/ViewpointRequest.md)
- [bimdata.Visa](docs/Visa.md)
- [bimdata.VisaAttachment](docs/VisaAttachment.md)
- [bimdata.VisaAttachmentRequest](docs/VisaAttachmentRequest.md)
- [bimdata.VisaComment](docs/VisaComment.md)
- [bimdata.VisaCommentRequest](docs/VisaCommentRequest.md)
- [bimdata.VisaRequest](docs/VisaRequest.md)
Expand Down
6 changes: 3 additions & 3 deletions docs/CollaborationApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ Name | Type | Description | Notes

### HTTP request headers

- **Content-Type**: multipart/form-data, application/x-www-form-urlencoded
- **Content-Type**: multipart/form-data, application/x-www-form-urlencoded, application/json
- **Accept**: application/json


Expand Down Expand Up @@ -961,7 +961,7 @@ Name | Type | Description | Notes
Create a document

Create a document. If the document is one of {'GLTF', 'POINT_CLOUD', 'DWG', 'OBJ', 'IFC', 'DXF'}, a model will be created and attached to this document Required scopes: document:write
Create a document. If the document is one of {'POINT_CLOUD', 'OBJ', 'IFC', 'DXF', 'GLTF', 'DWG'}, a model will be created and attached to this document Required scopes: document:write

### Example

Expand Down Expand Up @@ -2744,7 +2744,7 @@ Name | Type | Description | Notes

### HTTP request headers

- **Content-Type**: multipart/form-data, application/x-www-form-urlencoded
- **Content-Type**: multipart/form-data, application/x-www-form-urlencoded, application/json
- **Accept**: application/json


Expand Down
1 change: 1 addition & 0 deletions docs/FolderWithoutChildrenRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Name | Type | Description | Notes
**parentId** | **Number** | | [optional]
**name** | **String** | Name of the folder |
**defaultPermission** | **Number** | Permission for a Folder * `1` - denied * `50` - read_only * `100` - read_write | [optional]
**propagate** | **Boolean** | | [optional] [default to false]



Expand Down
1 change: 1 addition & 0 deletions docs/PatchedFolderWithoutChildrenRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Name | Type | Description | Notes
**parentId** | **Number** | | [optional]
**name** | **String** | Name of the folder | [optional]
**defaultPermission** | **Number** | Permission for a Folder * `1` - denied * `50` - read_only * `100` - read_write | [optional]
**propagate** | **Boolean** | | [optional] [default to false]



Expand Down
1 change: 1 addition & 0 deletions docs/PatchedZoneRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ Name | Type | Description | Notes
**spaces** | [**[ZoneSpaceRequest]**](ZoneSpaceRequest.md) | | [optional]
**color** | **String** | | [optional]
**order** | **Number** | | [optional]
**storeyUuid** | **String** | IFC element or element type UUID | [optional]


9 changes: 9 additions & 0 deletions docs/VisaAttachmentRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# bimdata.VisaAttachmentRequest

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**attachment** | **File** | | [optional]


2 changes: 1 addition & 1 deletion docs/WriteFolderRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**parentId** | **Number** | | [optional]
**name** | **String** | Name of the folder |
**parentId** | **Number** | | [optional]
**defaultPermission** | **Number** | Permission for a Folder * `1` - denied * `50` - read_only * `100` - read_write | [optional]
**children** | [**[WriteFolderRequest]**](WriteFolderRequest.md) | | [optional]

Expand Down
1 change: 1 addition & 0 deletions docs/Zone.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ Name | Type | Description | Notes
**updatedAt** | **Date** | | [readonly]
**color** | **String** | | [optional]
**order** | **Number** | | [optional]
**storeyUuid** | **String** | IFC element or element type UUID | [optional]


1 change: 1 addition & 0 deletions docs/ZoneRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ Name | Type | Description | Notes
**spaces** | [**[ZoneSpaceRequest]**](ZoneSpaceRequest.md) | | [optional]
**color** | **String** | | [optional]
**order** | **Number** | | [optional]
**storeyUuid** | **String** | IFC element or element type UUID | [optional]


8 changes: 4 additions & 4 deletions src/api/CollaborationApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export default class CollaborationApi {
};

let authNames = ['ApiKey', 'BIMData_Connect', 'BIMData_Connect', 'Bearer'];
let contentTypes = ['multipart/form-data', 'application/x-www-form-urlencoded'];
let contentTypes = ['multipart/form-data', 'application/x-www-form-urlencoded', 'application/json'];
let accepts = ['application/json'];
let returnType = VisaAttachment;
return this.apiClient.callApi(
Expand Down Expand Up @@ -866,7 +866,7 @@ export default class CollaborationApi {

/**
* Create a document
* Create a document. If the document is one of {'GLTF', 'POINT_CLOUD', 'DWG', 'OBJ', 'IFC', 'DXF'}, a model will be created and attached to this document Required scopes: document:write
* Create a document. If the document is one of {'POINT_CLOUD', 'OBJ', 'IFC', 'DXF', 'GLTF', 'DWG'}, a model will be created and attached to this document Required scopes: document:write
* @param {Number} cloudPk A unique integer value identifying this cloud.
* @param {Number} projectPk A unique integer value identifying this project.
* @param {String} name Shown name of the file
Expand Down Expand Up @@ -932,7 +932,7 @@ export default class CollaborationApi {

/**
* Create a document
* Create a document. If the document is one of {'GLTF', 'POINT_CLOUD', 'DWG', 'OBJ', 'IFC', 'DXF'}, a model will be created and attached to this document Required scopes: document:write
* Create a document. If the document is one of {'POINT_CLOUD', 'OBJ', 'IFC', 'DXF', 'GLTF', 'DWG'}, a model will be created and attached to this document Required scopes: document:write
* @param {Number} cloudPk A unique integer value identifying this cloud.
* @param {Number} projectPk A unique integer value identifying this project.
* @param {String} name Shown name of the file
Expand Down Expand Up @@ -2581,7 +2581,7 @@ export default class CollaborationApi {
};

let authNames = ['ApiKey', 'BIMData_Connect', 'BIMData_Connect', 'Bearer'];
let contentTypes = ['multipart/form-data', 'application/x-www-form-urlencoded'];
let contentTypes = ['multipart/form-data', 'application/x-www-form-urlencoded', 'application/json'];
let accepts = ['application/json'];
let returnType = VisaAttachment;
return this.apiClient.callApi(
Expand Down
7 changes: 7 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ import Viewpoint from './model/Viewpoint';
import ViewpointRequest from './model/ViewpointRequest';
import Visa from './model/Visa';
import VisaAttachment from './model/VisaAttachment';
import VisaAttachmentRequest from './model/VisaAttachmentRequest';
import VisaComment from './model/VisaComment';
import VisaCommentRequest from './model/VisaCommentRequest';
import VisaRequest from './model/VisaRequest';
Expand Down Expand Up @@ -1650,6 +1651,12 @@ export {
*/
VisaAttachment,

/**
* The VisaAttachmentRequest model constructor.
* @property {module:model/VisaAttachmentRequest}
*/
VisaAttachmentRequest,

/**
* The VisaComment model constructor.
* @property {module:model/VisaComment}
Expand Down
9 changes: 9 additions & 0 deletions src/model/FolderWithoutChildrenRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ class FolderWithoutChildrenRequest {
if (data.hasOwnProperty('default_permission')) {
obj['default_permission'] = ApiClient.convertToType(data['default_permission'], 'Number');
}
if (data.hasOwnProperty('propagate')) {
obj['propagate'] = ApiClient.convertToType(data['propagate'], 'Boolean');
}
}
return obj;
}
Expand All @@ -82,6 +85,12 @@ FolderWithoutChildrenRequest.prototype['name'] = undefined;
*/
FolderWithoutChildrenRequest.prototype['default_permission'] = undefined;

/**
* @member {Boolean} propagate
* @default false
*/
FolderWithoutChildrenRequest.prototype['propagate'] = false;




Expand Down
9 changes: 9 additions & 0 deletions src/model/PatchedFolderWithoutChildrenRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ class PatchedFolderWithoutChildrenRequest {
if (data.hasOwnProperty('default_permission')) {
obj['default_permission'] = ApiClient.convertToType(data['default_permission'], 'Number');
}
if (data.hasOwnProperty('propagate')) {
obj['propagate'] = ApiClient.convertToType(data['propagate'], 'Boolean');
}
}
return obj;
}
Expand All @@ -80,6 +83,12 @@ PatchedFolderWithoutChildrenRequest.prototype['name'] = undefined;
*/
PatchedFolderWithoutChildrenRequest.prototype['default_permission'] = undefined;

/**
* @member {Boolean} propagate
* @default false
*/
PatchedFolderWithoutChildrenRequest.prototype['propagate'] = false;




Expand Down
9 changes: 9 additions & 0 deletions src/model/PatchedZoneRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ class PatchedZoneRequest {
if (data.hasOwnProperty('order')) {
obj['order'] = ApiClient.convertToType(data['order'], 'Number');
}
if (data.hasOwnProperty('storey_uuid')) {
obj['storey_uuid'] = ApiClient.convertToType(data['storey_uuid'], 'String');
}
}
return obj;
}
Expand Down Expand Up @@ -113,6 +116,12 @@ PatchedZoneRequest.prototype['color'] = undefined;
*/
PatchedZoneRequest.prototype['order'] = undefined;

/**
* IFC element or element type UUID
* @member {String} storey_uuid
*/
PatchedZoneRequest.prototype['storey_uuid'] = undefined;




Expand Down
71 changes: 71 additions & 0 deletions src/model/VisaAttachmentRequest.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/**
* 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 ApiClient from '../ApiClient';

/**
* The VisaAttachmentRequest model module.
* @module model/VisaAttachmentRequest
* @version 0.0.0
*/
class VisaAttachmentRequest {
/**
* Constructs a new <code>VisaAttachmentRequest</code>.
* @alias module:model/VisaAttachmentRequest
*/
constructor() {

VisaAttachmentRequest.initialize(this);
}

/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}

/**
* Constructs a <code>VisaAttachmentRequest</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/VisaAttachmentRequest} obj Optional instance to populate.
* @return {module:model/VisaAttachmentRequest} The populated <code>VisaAttachmentRequest</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new VisaAttachmentRequest();

if (data.hasOwnProperty('attachment')) {
obj['attachment'] = ApiClient.convertToType(data['attachment'], File);
}
}
return obj;
}


}

/**
* @member {File} attachment
*/
VisaAttachmentRequest.prototype['attachment'] = undefined;






export default VisaAttachmentRequest;

16 changes: 8 additions & 8 deletions src/model/WriteFolderRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ class WriteFolderRequest {
if (data) {
obj = obj || new WriteFolderRequest();

if (data.hasOwnProperty('parent_id')) {
obj['parent_id'] = ApiClient.convertToType(data['parent_id'], 'Number');
}
if (data.hasOwnProperty('name')) {
obj['name'] = ApiClient.convertToType(data['name'], 'String');
}
if (data.hasOwnProperty('parent_id')) {
obj['parent_id'] = ApiClient.convertToType(data['parent_id'], 'Number');
}
if (data.hasOwnProperty('default_permission')) {
obj['default_permission'] = ApiClient.convertToType(data['default_permission'], 'Number');
}
Expand All @@ -68,17 +68,17 @@ class WriteFolderRequest {

}

/**
* @member {Number} parent_id
*/
WriteFolderRequest.prototype['parent_id'] = undefined;

/**
* Name of the folder
* @member {String} name
*/
WriteFolderRequest.prototype['name'] = undefined;

/**
* @member {Number} parent_id
*/
WriteFolderRequest.prototype['parent_id'] = undefined;

/**
* Permission for a Folder * `1` - denied * `50` - read_only * `100` - read_write
* @member {module:model/WriteFolderRequest.DefaultPermissionEnum} default_permission
Expand Down
9 changes: 9 additions & 0 deletions src/model/Zone.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ class Zone {
if (data.hasOwnProperty('order')) {
obj['order'] = ApiClient.convertToType(data['order'], 'Number');
}
if (data.hasOwnProperty('storey_uuid')) {
obj['storey_uuid'] = ApiClient.convertToType(data['storey_uuid'], 'String');
}
}
return obj;
}
Expand Down Expand Up @@ -144,6 +147,12 @@ Zone.prototype['color'] = undefined;
*/
Zone.prototype['order'] = undefined;

/**
* IFC element or element type UUID
* @member {String} storey_uuid
*/
Zone.prototype['storey_uuid'] = undefined;




Expand Down
9 changes: 9 additions & 0 deletions src/model/ZoneRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ class ZoneRequest {
if (data.hasOwnProperty('order')) {
obj['order'] = ApiClient.convertToType(data['order'], 'Number');
}
if (data.hasOwnProperty('storey_uuid')) {
obj['storey_uuid'] = ApiClient.convertToType(data['storey_uuid'], 'String');
}
}
return obj;
}
Expand Down Expand Up @@ -114,6 +117,12 @@ ZoneRequest.prototype['color'] = undefined;
*/
ZoneRequest.prototype['order'] = undefined;

/**
* IFC element or element type UUID
* @member {String} storey_uuid
*/
ZoneRequest.prototype['storey_uuid'] = undefined;




Expand Down
Loading

0 comments on commit 57c0e58

Please sign in to comment.