Browse Source

nextcloud: Regenerate

pull/418/head
jld3103 1 year ago
parent
commit
d5c726e164
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 2
      packages/nextcloud/lib/src/client.dart
  2. 323
      packages/nextcloud/lib/src/nextcloud.openapi.dart
  3. 2
      packages/nextcloud/test/core_test.dart
  4. 2
      packages/nextcloud/test/notes_test.dart
  5. 4
      packages/nextcloud/test/webdav_test.dart

2
packages/nextcloud/lib/src/client.dart

@ -22,7 +22,7 @@ class NextcloudClient extends openapi.NextcloudClient {
userAgent: userAgentOverride ?? appType.userAgent, userAgent: userAgentOverride ?? appType.userAgent,
authentications: [ authentications: [
if (loginName != null && password != null) ...[ if (loginName != null && password != null) ...[
openapi.NextcloudHttpBasicAuthentication( openapi.DynamiteHttpBasicAuthentication(
username: loginName, username: loginName,
password: password, password: password,
), ),

323
packages/nextcloud/lib/src/nextcloud.openapi.dart

@ -54,24 +54,6 @@ class NextcloudApiException extends DynamiteApiException {
String toString() => 'NextcloudApiException(statusCode: $statusCode, headers: $headers, body: $body)'; String toString() => 'NextcloudApiException(statusCode: $statusCode, headers: $headers, body: $body)';
} }
class NextcloudHttpBasicAuthentication extends DynamiteAuthentication {
NextcloudHttpBasicAuthentication({
required this.username,
required this.password,
});
final String username;
final String password;
@override
String get id => 'basic_auth';
@override
Map<String, String> get headers => {
'Authorization': 'Basic ${base64.encode(utf8.encode('$username:$password'))}',
};
}
class NextcloudClient extends DynamiteClient { class NextcloudClient extends DynamiteClient {
NextcloudClient( NextcloudClient(
super.baseURL, { super.baseURL, {
@ -125,8 +107,9 @@ class NextcloudCoreClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -152,8 +135,9 @@ class NextcloudCoreClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -231,8 +215,9 @@ class NextcloudCoreClient {
'Accept': 'image/png', 'Accept': 'image/png',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -276,8 +261,9 @@ class NextcloudCoreClient {
'Accept': 'image/png', 'Accept': 'image/png',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -305,8 +291,9 @@ class NextcloudCoreClient {
'Accept': 'image/png', 'Accept': 'image/png',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -338,8 +325,9 @@ class NextcloudCoreClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -375,8 +363,9 @@ class NextcloudCoreClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -405,8 +394,9 @@ class NextcloudNewsClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -432,8 +422,9 @@ class NextcloudNewsClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -459,8 +450,9 @@ class NextcloudNewsClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -488,8 +480,9 @@ class NextcloudNewsClient {
final queryParameters = <String, dynamic>{}; final queryParameters = <String, dynamic>{};
final headers = <String, String>{}; final headers = <String, String>{};
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -512,8 +505,9 @@ class NextcloudNewsClient {
final queryParameters = <String, dynamic>{}; final queryParameters = <String, dynamic>{};
final headers = <String, String>{}; final headers = <String, String>{};
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -538,8 +532,9 @@ class NextcloudNewsClient {
final queryParameters = <String, dynamic>{}; final queryParameters = <String, dynamic>{};
final headers = <String, String>{}; final headers = <String, String>{};
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -564,8 +559,9 @@ class NextcloudNewsClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -594,8 +590,9 @@ class NextcloudNewsClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -623,8 +620,9 @@ class NextcloudNewsClient {
final queryParameters = <String, dynamic>{}; final queryParameters = <String, dynamic>{};
final headers = <String, String>{}; final headers = <String, String>{};
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -649,8 +647,9 @@ class NextcloudNewsClient {
final queryParameters = <String, dynamic>{}; final queryParameters = <String, dynamic>{};
final headers = <String, String>{}; final headers = <String, String>{};
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -678,8 +677,9 @@ class NextcloudNewsClient {
final queryParameters = <String, dynamic>{}; final queryParameters = <String, dynamic>{};
final headers = <String, String>{}; final headers = <String, String>{};
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -705,8 +705,9 @@ class NextcloudNewsClient {
final queryParameters = <String, dynamic>{}; final queryParameters = <String, dynamic>{};
final headers = <String, String>{}; final headers = <String, String>{};
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -738,8 +739,9 @@ class NextcloudNewsClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -787,8 +789,9 @@ class NextcloudNewsClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -821,8 +824,9 @@ class NextcloudNewsClient {
final queryParameters = <String, dynamic>{}; final queryParameters = <String, dynamic>{};
final headers = <String, String>{}; final headers = <String, String>{};
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -844,8 +848,9 @@ class NextcloudNewsClient {
final queryParameters = <String, dynamic>{}; final queryParameters = <String, dynamic>{};
final headers = <String, String>{}; final headers = <String, String>{};
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -867,8 +872,9 @@ class NextcloudNewsClient {
final queryParameters = <String, dynamic>{}; final queryParameters = <String, dynamic>{};
final headers = <String, String>{}; final headers = <String, String>{};
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -890,8 +896,9 @@ class NextcloudNewsClient {
final queryParameters = <String, dynamic>{}; final queryParameters = <String, dynamic>{};
final headers = <String, String>{}; final headers = <String, String>{};
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -928,8 +935,9 @@ class NextcloudNotesClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -979,8 +987,9 @@ class NextcloudNotesClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -1023,8 +1032,9 @@ class NextcloudNotesClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -1063,8 +1073,9 @@ class NextcloudNotesClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -1107,8 +1118,9 @@ class NextcloudNotesClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -1132,8 +1144,9 @@ class NextcloudNotesClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -1159,8 +1172,9 @@ class NextcloudNotesClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -1198,8 +1212,9 @@ class NextcloudNotificationsClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -1225,8 +1240,9 @@ class NextcloudNotificationsClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -1249,8 +1265,9 @@ class NextcloudNotificationsClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -1277,8 +1294,9 @@ class NextcloudNotificationsClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -1307,8 +1325,9 @@ class NextcloudNotificationsClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -1337,8 +1356,9 @@ class NextcloudNotificationsClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -1365,8 +1385,9 @@ class NextcloudNotificationsClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -1401,8 +1422,9 @@ class NextcloudProvisioningApiClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -1428,8 +1450,9 @@ class NextcloudProvisioningApiClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -1463,8 +1486,9 @@ class NextcloudUnifiedPushProviderClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -1495,8 +1519,9 @@ class NextcloudUnifiedPushProviderClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -1526,8 +1551,9 @@ class NextcloudUnifiedPushProviderClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -1559,8 +1585,9 @@ class NextcloudUnifiedPushProviderClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -1590,8 +1617,9 @@ class NextcloudUnifiedPushProviderClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -1622,8 +1650,9 @@ class NextcloudUnifiedPushProviderClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -1654,8 +1683,9 @@ class NextcloudUnifiedPushProviderClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -1685,8 +1715,9 @@ class NextcloudUnifiedPushProviderClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -1714,8 +1745,9 @@ class NextcloudUnifiedPushProviderClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -1743,8 +1775,9 @@ class NextcloudUnifiedPushProviderClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -1771,8 +1804,9 @@ class NextcloudUnifiedPushProviderClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -1804,8 +1838,9 @@ class NextcloudUserStatusClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -1831,8 +1866,9 @@ class NextcloudUserStatusClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -1859,8 +1895,9 @@ class NextcloudUserStatusClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -1886,8 +1923,9 @@ class NextcloudUserStatusClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -1917,8 +1955,9 @@ class NextcloudUserStatusClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -1952,8 +1991,9 @@ class NextcloudUserStatusClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -1986,8 +2026,9 @@ class NextcloudUserStatusClient {
final queryParameters = <String, dynamic>{}; final queryParameters = <String, dynamic>{};
final headers = <String, String>{}; final headers = <String, String>{};
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -2010,8 +2051,9 @@ class NextcloudUserStatusClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
@ -2037,8 +2079,9 @@ class NextcloudUserStatusClient {
'Accept': 'application/json', 'Accept': 'application/json',
}; };
Uint8List? body; Uint8List? body;
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers
.addAll(rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }

2
packages/nextcloud/test/core_test.dart

@ -123,7 +123,7 @@ Future run(final DockerImage image) async {
await client.core.deleteAppPassword(); await client.core.deleteAppPassword();
expect( expect(
() => client.core.getCapabilities(), () => client.core.getCapabilities(),
throwsA(predicate((final e) => (e! as NextcloudApiException).statusCode == 401)), throwsA(predicate((final e) => (e! as DynamiteApiException).statusCode == 401)),
); );
}); });
}); });

2
packages/nextcloud/test/notes_test.dart

@ -96,7 +96,7 @@ Future run(final DockerImage image) async {
title: 'c', title: 'c',
ifMatch: '"${response.etag}"', ifMatch: '"${response.etag}"',
), ),
throwsA(predicate((final e) => (e! as NextcloudApiException).statusCode == 412)), throwsA(predicate((final e) => (e! as DynamiteApiException).statusCode == 412)),
); );
}); });

4
packages/nextcloud/test/webdav_test.dart

@ -170,7 +170,7 @@ Future run(final DockerImage image) async {
expect( expect(
() => client.webdav.copy('1.txt', '2.txt'), () => client.webdav.copy('1.txt', '2.txt'),
throwsA(predicate((final e) => (e! as NextcloudApiException).statusCode == 412)), throwsA(predicate((final e) => (e! as DynamiteApiException).statusCode == 412)),
); );
}); });
@ -203,7 +203,7 @@ Future run(final DockerImage image) async {
expect( expect(
() => client.webdav.move('1.txt', '2.txt'), () => client.webdav.move('1.txt', '2.txt'),
throwsA(predicate((final e) => (e! as NextcloudApiException).statusCode == 412)), throwsA(predicate((final e) => (e! as DynamiteApiException).statusCode == 412)),
); );
}); });

Loading…
Cancel
Save