Browse Source

dynamite: Add missing coverage ignores

pull/392/head
jld3103 1 year ago
parent
commit
ecdb219a04
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 2
      packages/dynamite/dynamite/lib/src/openapi_builder.dart
  2. 122
      packages/nextcloud/lib/src/nextcloud.openapi.dart

2
packages/dynamite/dynamite/lib/src/openapi_builder.dart

@ -701,7 +701,7 @@ class OpenAPIBuilder implements Builder {
if (securityRequirements.isNotEmpty && !isOptionalSecurity) { if (securityRequirements.isNotEmpty && !isOptionalSecurity) {
code.write(''' code.write('''
{ {
throw Exception('Missing authentication for ${securityRequirements.map((final r) => r.keys.single).join(' or ')}'); throw Exception('Missing authentication for ${securityRequirements.map((final r) => r.keys.single).join(' or ')}'); // coverage:ignore-line
} }
'''); ''');
} }

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

@ -204,7 +204,7 @@ class NextcloudCoreClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
final response = await rootClient.doRequest( final response = await rootClient.doRequest(
'get', 'get',
@ -231,7 +231,7 @@ class NextcloudCoreClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
final response = await rootClient.doRequest( final response = await rootClient.doRequest(
'get', 'get',
@ -310,7 +310,7 @@ class NextcloudCoreClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
if (file != '') { if (file != '') {
queryParameters['file'] = file; queryParameters['file'] = file;
@ -355,7 +355,7 @@ class NextcloudCoreClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
path = path.replaceAll('{userId}', Uri.encodeQueryComponent(userId)); path = path.replaceAll('{userId}', Uri.encodeQueryComponent(userId));
path = path.replaceAll('{size}', Uri.encodeQueryComponent(size.toString())); path = path.replaceAll('{size}', Uri.encodeQueryComponent(size.toString()));
@ -384,7 +384,7 @@ class NextcloudCoreClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
path = path.replaceAll('{userId}', Uri.encodeQueryComponent(userId)); path = path.replaceAll('{userId}', Uri.encodeQueryComponent(userId));
path = path.replaceAll('{size}', Uri.encodeQueryComponent(size.toString())); path = path.replaceAll('{size}', Uri.encodeQueryComponent(size.toString()));
@ -417,7 +417,7 @@ class NextcloudCoreClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
queryParameters['search'] = search; queryParameters['search'] = search;
queryParameters['itemType'] = itemType; queryParameters['itemType'] = itemType;
@ -454,7 +454,7 @@ class NextcloudCoreClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
final response = await rootClient.doRequest( final response = await rootClient.doRequest(
'delete', 'delete',
@ -484,7 +484,7 @@ class NextcloudNewsClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
final response = await rootClient.doRequest( final response = await rootClient.doRequest(
'get', 'get',
@ -511,7 +511,7 @@ class NextcloudNewsClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
final response = await rootClient.doRequest( final response = await rootClient.doRequest(
'get', 'get',
@ -538,7 +538,7 @@ class NextcloudNewsClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
queryParameters['name'] = name; queryParameters['name'] = name;
final response = await rootClient.doRequest( final response = await rootClient.doRequest(
@ -567,7 +567,7 @@ class NextcloudNewsClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
path = path.replaceAll('{folderId}', Uri.encodeQueryComponent(folderId.toString())); path = path.replaceAll('{folderId}', Uri.encodeQueryComponent(folderId.toString()));
queryParameters['name'] = name; queryParameters['name'] = name;
@ -591,7 +591,7 @@ class NextcloudNewsClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
path = path.replaceAll('{folderId}', Uri.encodeQueryComponent(folderId.toString())); path = path.replaceAll('{folderId}', Uri.encodeQueryComponent(folderId.toString()));
final response = await rootClient.doRequest( final response = await rootClient.doRequest(
@ -617,7 +617,7 @@ class NextcloudNewsClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
path = path.replaceAll('{folderId}', Uri.encodeQueryComponent(folderId.toString())); path = path.replaceAll('{folderId}', Uri.encodeQueryComponent(folderId.toString()));
queryParameters['newestItemId'] = newestItemId.toString(); queryParameters['newestItemId'] = newestItemId.toString();
@ -643,7 +643,7 @@ class NextcloudNewsClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
final response = await rootClient.doRequest( final response = await rootClient.doRequest(
'get', 'get',
@ -673,7 +673,7 @@ class NextcloudNewsClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
queryParameters['url'] = url; queryParameters['url'] = url;
if (folderId != null) { if (folderId != null) {
@ -702,7 +702,7 @@ class NextcloudNewsClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
path = path.replaceAll('{feedId}', Uri.encodeQueryComponent(feedId.toString())); path = path.replaceAll('{feedId}', Uri.encodeQueryComponent(feedId.toString()));
final response = await rootClient.doRequest( final response = await rootClient.doRequest(
@ -728,7 +728,7 @@ class NextcloudNewsClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
path = path.replaceAll('{feedId}', Uri.encodeQueryComponent(feedId.toString())); path = path.replaceAll('{feedId}', Uri.encodeQueryComponent(feedId.toString()));
if (folderId != null) { if (folderId != null) {
@ -757,7 +757,7 @@ class NextcloudNewsClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
path = path.replaceAll('{feedId}', Uri.encodeQueryComponent(feedId.toString())); path = path.replaceAll('{feedId}', Uri.encodeQueryComponent(feedId.toString()));
queryParameters['feedTitle'] = feedTitle; queryParameters['feedTitle'] = feedTitle;
@ -784,7 +784,7 @@ class NextcloudNewsClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
path = path.replaceAll('{feedId}', Uri.encodeQueryComponent(feedId.toString())); path = path.replaceAll('{feedId}', Uri.encodeQueryComponent(feedId.toString()));
queryParameters['newestItemId'] = newestItemId.toString(); queryParameters['newestItemId'] = newestItemId.toString();
@ -817,7 +817,7 @@ class NextcloudNewsClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
if (type != 3) { if (type != 3) {
queryParameters['type'] = type.toString(); queryParameters['type'] = type.toString();
@ -866,7 +866,7 @@ class NextcloudNewsClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
if (type != 3) { if (type != 3) {
queryParameters['type'] = type.toString(); queryParameters['type'] = type.toString();
@ -900,7 +900,7 @@ class NextcloudNewsClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
path = path.replaceAll('{itemId}', Uri.encodeQueryComponent(itemId.toString())); path = path.replaceAll('{itemId}', Uri.encodeQueryComponent(itemId.toString()));
final response = await rootClient.doRequest( final response = await rootClient.doRequest(
@ -923,7 +923,7 @@ class NextcloudNewsClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
path = path.replaceAll('{itemId}', Uri.encodeQueryComponent(itemId.toString())); path = path.replaceAll('{itemId}', Uri.encodeQueryComponent(itemId.toString()));
final response = await rootClient.doRequest( final response = await rootClient.doRequest(
@ -946,7 +946,7 @@ class NextcloudNewsClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
path = path.replaceAll('{itemId}', Uri.encodeQueryComponent(itemId.toString())); path = path.replaceAll('{itemId}', Uri.encodeQueryComponent(itemId.toString()));
final response = await rootClient.doRequest( final response = await rootClient.doRequest(
@ -969,7 +969,7 @@ class NextcloudNewsClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
path = path.replaceAll('{itemId}', Uri.encodeQueryComponent(itemId.toString())); path = path.replaceAll('{itemId}', Uri.encodeQueryComponent(itemId.toString()));
final response = await rootClient.doRequest( final response = await rootClient.doRequest(
@ -1007,7 +1007,7 @@ class NextcloudNotesClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
if (category != null) { if (category != null) {
queryParameters['category'] = category; queryParameters['category'] = category;
@ -1058,7 +1058,7 @@ class NextcloudNotesClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
if (category != '') { if (category != '') {
queryParameters['category'] = category; queryParameters['category'] = category;
@ -1104,7 +1104,7 @@ class NextcloudNotesClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
path = path.replaceAll('{id}', Uri.encodeQueryComponent(id.toString())); path = path.replaceAll('{id}', Uri.encodeQueryComponent(id.toString()));
if (exclude != '') { if (exclude != '') {
@ -1146,7 +1146,7 @@ class NextcloudNotesClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
path = path.replaceAll('{id}', Uri.encodeQueryComponent(id.toString())); path = path.replaceAll('{id}', Uri.encodeQueryComponent(id.toString()));
if (content != null) { if (content != null) {
@ -1192,7 +1192,7 @@ class NextcloudNotesClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
path = path.replaceAll('{id}', Uri.encodeQueryComponent(id.toString())); path = path.replaceAll('{id}', Uri.encodeQueryComponent(id.toString()));
final response = await rootClient.doRequest( final response = await rootClient.doRequest(
@ -1217,7 +1217,7 @@ class NextcloudNotesClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
final response = await rootClient.doRequest( final response = await rootClient.doRequest(
'get', 'get',
@ -1244,7 +1244,7 @@ class NextcloudNotesClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
headers['Content-Type'] = 'application/json'; headers['Content-Type'] = 'application/json';
body = Uint8List.fromList( body = Uint8List.fromList(
@ -1283,7 +1283,7 @@ class NextcloudNotificationsClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
final response = await rootClient.doRequest( final response = await rootClient.doRequest(
'get', 'get',
@ -1310,7 +1310,7 @@ class NextcloudNotificationsClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
final response = await rootClient.doRequest( final response = await rootClient.doRequest(
'delete', 'delete',
@ -1334,7 +1334,7 @@ class NextcloudNotificationsClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
path = path.replaceAll('{id}', Uri.encodeQueryComponent(id.toString())); path = path.replaceAll('{id}', Uri.encodeQueryComponent(id.toString()));
final response = await rootClient.doRequest( final response = await rootClient.doRequest(
@ -1362,7 +1362,7 @@ class NextcloudNotificationsClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
path = path.replaceAll('{id}', Uri.encodeQueryComponent(id.toString())); path = path.replaceAll('{id}', Uri.encodeQueryComponent(id.toString()));
final response = await rootClient.doRequest( final response = await rootClient.doRequest(
@ -1394,7 +1394,7 @@ class NextcloudNotificationsClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
queryParameters['pushTokenHash'] = pushTokenHash; queryParameters['pushTokenHash'] = pushTokenHash;
queryParameters['devicePublicKey'] = devicePublicKey; queryParameters['devicePublicKey'] = devicePublicKey;
@ -1424,7 +1424,7 @@ class NextcloudNotificationsClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
final response = await rootClient.doRequest( final response = await rootClient.doRequest(
'delete', 'delete',
@ -1452,7 +1452,7 @@ class NextcloudNotificationsClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
path = path.replaceAll('{userId}', Uri.encodeQueryComponent(userId)); path = path.replaceAll('{userId}', Uri.encodeQueryComponent(userId));
queryParameters['shortMessage'] = shortMessage; queryParameters['shortMessage'] = shortMessage;
@ -1490,7 +1490,7 @@ class NextcloudProvisioningApiClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
final response = await rootClient.doRequest( final response = await rootClient.doRequest(
'get', 'get',
@ -1517,7 +1517,7 @@ class NextcloudProvisioningApiClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
path = path.replaceAll('{userId}', Uri.encodeQueryComponent(userId)); path = path.replaceAll('{userId}', Uri.encodeQueryComponent(userId));
final response = await rootClient.doRequest( final response = await rootClient.doRequest(
@ -1552,7 +1552,7 @@ class NextcloudUnifiedPushProviderClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
final response = await rootClient.doRequest( final response = await rootClient.doRequest(
'get', 'get',
@ -1584,7 +1584,7 @@ class NextcloudUnifiedPushProviderClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
queryParameters['keepalive'] = keepalive.toString(); queryParameters['keepalive'] = keepalive.toString();
final response = await rootClient.doRequest( final response = await rootClient.doRequest(
@ -1615,7 +1615,7 @@ class NextcloudUnifiedPushProviderClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
queryParameters['deviceName'] = deviceName; queryParameters['deviceName'] = deviceName;
final response = await rootClient.doRequest( final response = await rootClient.doRequest(
@ -1648,7 +1648,7 @@ class NextcloudUnifiedPushProviderClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
path = path.replaceAll('{deviceId}', Uri.encodeQueryComponent(deviceId)); path = path.replaceAll('{deviceId}', Uri.encodeQueryComponent(deviceId));
final response = await rootClient.doRequest( final response = await rootClient.doRequest(
@ -1679,7 +1679,7 @@ class NextcloudUnifiedPushProviderClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
path = path.replaceAll('{deviceId}', Uri.encodeQueryComponent(deviceId)); path = path.replaceAll('{deviceId}', Uri.encodeQueryComponent(deviceId));
final response = await rootClient.doRequest( final response = await rootClient.doRequest(
@ -1711,7 +1711,7 @@ class NextcloudUnifiedPushProviderClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
queryParameters['deviceId'] = deviceId; queryParameters['deviceId'] = deviceId;
queryParameters['appName'] = appName; queryParameters['appName'] = appName;
@ -1743,7 +1743,7 @@ class NextcloudUnifiedPushProviderClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
path = path.replaceAll('{token}', Uri.encodeQueryComponent(token)); path = path.replaceAll('{token}', Uri.encodeQueryComponent(token));
final response = await rootClient.doRequest( final response = await rootClient.doRequest(
@ -1774,7 +1774,7 @@ class NextcloudUnifiedPushProviderClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
path = path.replaceAll('{token}', Uri.encodeQueryComponent(token)); path = path.replaceAll('{token}', Uri.encodeQueryComponent(token));
final response = await rootClient.doRequest( final response = await rootClient.doRequest(
@ -1803,7 +1803,7 @@ class NextcloudUnifiedPushProviderClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
path = path.replaceAll('{token}', Uri.encodeQueryComponent(token)); path = path.replaceAll('{token}', Uri.encodeQueryComponent(token));
final response = await rootClient.doRequest( final response = await rootClient.doRequest(
@ -1832,7 +1832,7 @@ class NextcloudUnifiedPushProviderClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
final response = await rootClient.doRequest( final response = await rootClient.doRequest(
'get', 'get',
@ -1860,7 +1860,7 @@ class NextcloudUnifiedPushProviderClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
final response = await rootClient.doRequest( final response = await rootClient.doRequest(
'post', 'post',
@ -1893,7 +1893,7 @@ class NextcloudUserStatusClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
final response = await rootClient.doRequest( final response = await rootClient.doRequest(
'get', 'get',
@ -1920,7 +1920,7 @@ class NextcloudUserStatusClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
path = path.replaceAll('{userId}', Uri.encodeQueryComponent(userId)); path = path.replaceAll('{userId}', Uri.encodeQueryComponent(userId));
final response = await rootClient.doRequest( final response = await rootClient.doRequest(
@ -1948,7 +1948,7 @@ class NextcloudUserStatusClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
final response = await rootClient.doRequest( final response = await rootClient.doRequest(
'get', 'get',
@ -1975,7 +1975,7 @@ class NextcloudUserStatusClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
queryParameters['statusType'] = statusType.name; queryParameters['statusType'] = statusType.name;
final response = await rootClient.doRequest( final response = await rootClient.doRequest(
@ -2006,7 +2006,7 @@ class NextcloudUserStatusClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
queryParameters['messageId'] = messageId; queryParameters['messageId'] = messageId;
if (clearAt != null) { if (clearAt != null) {
@ -2041,7 +2041,7 @@ class NextcloudUserStatusClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
if (statusIcon != null) { if (statusIcon != null) {
queryParameters['statusIcon'] = statusIcon; queryParameters['statusIcon'] = statusIcon;
@ -2075,7 +2075,7 @@ class NextcloudUserStatusClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
final response = await rootClient.doRequest( final response = await rootClient.doRequest(
'delete', 'delete',
@ -2099,7 +2099,7 @@ class NextcloudUserStatusClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
final response = await rootClient.doRequest( final response = await rootClient.doRequest(
'get', 'get',
@ -2126,7 +2126,7 @@ class NextcloudUserStatusClient {
if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) {
headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers);
} else { } else {
throw Exception('Missing authentication for basic_auth'); throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line
} }
queryParameters['status'] = status.name; queryParameters['status'] = status.name;
final response = await rootClient.doRequest( final response = await rootClient.doRequest(

Loading…
Cancel
Save