Merge branch 'dev' of https://github.com/SyncrowIOT/web into feat/update-space-model

This commit is contained in:
hannathkadher
2025-03-07 00:30:13 +04:00
25 changed files with 1322 additions and 131 deletions

View File

@ -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