link space model api integration

This commit is contained in:
mohammad
2025-03-05 14:37:52 +03:00
parent b134823551
commit 215dd9cfa4
8 changed files with 758 additions and 273 deletions

View File

@ -60,4 +60,40 @@ class SpaceModelManagementApi {
);
return response;
}
Future linkSpaceModel(
{required String spaceModelUuid,
required String projectId,
required List<String> spaceUuids,
required bool isOverWrite}) async {
print(spaceModelUuid);
print(projectId);
print(spaceUuids);
print(isOverWrite);
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;
}
}