mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
Merge branch 'dev' of https://github.com/SyncrowIOT/web into feat/update-space-model
This commit is contained in:
@ -60,6 +60,36 @@ class SpaceModelManagementApi {
|
||||
return response;
|
||||
}
|
||||
|
||||
Future linkSpaceModel(
|
||||
{required String spaceModelUuid,
|
||||
required String projectId,
|
||||
required List<String> spaceUuids,
|
||||
required bool isOverWrite}) async {
|
||||
final response = await HTTPService().post(
|
||||
path: ApiEndpoints.linkSpaceModel
|
||||
.replaceAll('{projectId}', projectId)
|
||||
.replaceAll('{spaceModelUuid}', spaceModelUuid),
|
||||
showServerMessage: true,
|
||||
body: {"spaceUuids": spaceUuids, "overwrite": isOverWrite},
|
||||
expectedResponseModel: (json) {
|
||||
return json;
|
||||
},
|
||||
);
|
||||
return response;
|
||||
}
|
||||
|
||||
Future validateSpaceModel(String projectId, List<String> spaceUuids) async {
|
||||
final response = await HTTPService().post(
|
||||
path: ApiEndpoints.validateSpaceModel
|
||||
.replaceAll('{projectId}', projectId),
|
||||
showServerMessage: true,
|
||||
body: {"spacesUuids": spaceUuids},
|
||||
expectedResponseModel: (json) {
|
||||
return json;
|
||||
});
|
||||
return response;
|
||||
}
|
||||
|
||||
Future<bool> deleteSpaceModel(String spaceModelUuid, String projectId) async {
|
||||
final response = await HTTPService().delete(
|
||||
path: ApiEndpoints.getSpaceModel
|
||||
|
Reference in New Issue
Block a user