import method
Imports the provided collections.
If deleteMissing
is true
, all local collections and schema fields,
that are not present in the imported configuration, WILL BE DELETED
(including their related records data)!
Implementation
Future<void> import(
List<CollectionModel> collections, {
bool deleteMissing = false,
Map<String, dynamic> body = const {},
Map<String, dynamic> query = const {},
Map<String, String> headers = const {},
}) {
final enrichedBody = Map<String, dynamic>.of(body);
enrichedBody["collections"] = collections;
enrichedBody["deleteMissing"] = deleteMissing;
return client.send(
"$baseCrudPath/import",
method: "PUT",
body: enrichedBody,
query: query,
headers: headers,
);
}