Browse Source

Merge pull request #857 from nextcloud/fix/nextcloud/ocs-apirequest-header

fix(nextcloud): Fix OCS-APIRequest header
pull/860/head
Kate 2 years ago committed by GitHub
parent
commit
473e77e353
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      external/nextcloud-server
  2. 130
      packages/nextcloud/lib/src/api/core.openapi.dart
  3. 182
      packages/nextcloud/lib/src/api/core.openapi.json
  4. 14
      packages/nextcloud/lib/src/api/dashboard.openapi.dart
  5. 21
      packages/nextcloud/lib/src/api/dashboard.openapi.json
  6. 4
      packages/nextcloud/lib/src/api/dav.openapi.dart
  7. 5
      packages/nextcloud/lib/src/api/dav.openapi.json
  8. 160
      packages/nextcloud/lib/src/api/files.openapi.dart
  9. 88
      packages/nextcloud/lib/src/api/files.openapi.g.dart
  10. 102
      packages/nextcloud/lib/src/api/files.openapi.json
  11. 6
      packages/nextcloud/lib/src/api/files_external.openapi.dart
  12. 7
      packages/nextcloud/lib/src/api/files_external.openapi.json
  13. 12
      packages/nextcloud/lib/src/api/files_reminders.openapi.dart
  14. 15
      packages/nextcloud/lib/src/api/files_reminders.openapi.json
  15. 80
      packages/nextcloud/lib/src/api/files_sharing.openapi.dart
  16. 110
      packages/nextcloud/lib/src/api/files_sharing.openapi.json
  17. 172
      packages/nextcloud/lib/src/api/provisioning_api.openapi.dart
  18. 279
      packages/nextcloud/lib/src/api/provisioning_api.openapi.json
  19. 2
      packages/nextcloud/lib/src/api/settings.openapi.json
  20. 20
      packages/nextcloud/lib/src/api/theming.openapi.dart
  21. 29
      packages/nextcloud/lib/src/api/theming.openapi.json
  22. 4
      packages/nextcloud/lib/src/api/updatenotification.openapi.dart
  23. 5
      packages/nextcloud/lib/src/api/updatenotification.openapi.json
  24. 42
      packages/nextcloud/lib/src/api/user_status.openapi.dart
  25. 58
      packages/nextcloud/lib/src/api/user_status.openapi.json
  26. 28
      packages/nextcloud/lib/src/api/weather_status.openapi.dart
  27. 47
      packages/nextcloud/lib/src/api/weather_status.openapi.json

2
external/nextcloud-server vendored

@ -1 +1 @@
Subproject commit 3c5d8410fa3d3f4ded01eed8c5cf1718532c174e
Subproject commit 69a050991bd580c0fef0c10a27fcadae701a9338

130
packages/nextcloud/lib/src/api/core.openapi.dart

@ -137,9 +137,7 @@ class CoreAppPasswordClient {
final CoreClient _rootClient;
/// Create app password
Future<CoreAppPasswordGetAppPasswordResponseApplicationJson> getAppPassword({
final String oCSAPIRequest = 'true',
}) async {
Future<CoreAppPasswordGetAppPasswordResponseApplicationJson> getAppPassword({final bool oCSAPIRequest = true}) async {
const path = '/ocs/v2.php/core/getapppassword';
final queryParameters = <String, dynamic>{};
final headers = <String, String>{
@ -159,7 +157,7 @@ class CoreAppPasswordClient {
throw Exception('Missing authentication for bearer_auth or basic_auth');
}
// coverage:ignore-end
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -177,7 +175,7 @@ class CoreAppPasswordClient {
/// Rotate app password
Future<CoreAppPasswordRotateAppPasswordResponseApplicationJson> rotateAppPassword({
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path = '/ocs/v2.php/core/apppassword/rotate';
final queryParameters = <String, dynamic>{};
@ -198,7 +196,7 @@ class CoreAppPasswordClient {
throw Exception('Missing authentication for bearer_auth or basic_auth');
}
// coverage:ignore-end
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'post',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -216,7 +214,7 @@ class CoreAppPasswordClient {
/// Delete app password
Future<CoreAppPasswordDeleteAppPasswordResponseApplicationJson> deleteAppPassword({
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path = '/ocs/v2.php/core/apppassword';
final queryParameters = <String, dynamic>{};
@ -237,7 +235,7 @@ class CoreAppPasswordClient {
throw Exception('Missing authentication for bearer_auth or basic_auth');
}
// coverage:ignore-end
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'delete',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -267,7 +265,7 @@ class CoreAutoCompleteClient {
final String? sorter,
final List<int>? shareTypes,
final int limit = 10,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path = '/ocs/v2.php/core/autocomplete/get';
final queryParameters = <String, dynamic>{};
@ -304,7 +302,7 @@ class CoreAutoCompleteClient {
if (limit != 10) {
queryParameters['limit'] = limit.toString();
}
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -493,7 +491,7 @@ class CoreCollaborationResourcesClient {
/// Search for collections
Future<CoreCollaborationResourcesSearchCollectionsResponseApplicationJson> searchCollections({
required final String filter,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/collaboration/resources/collections/search/{filter}';
final queryParameters = <String, dynamic>{};
@ -515,7 +513,7 @@ class CoreCollaborationResourcesClient {
}
// coverage:ignore-end
path = path.replaceAll('{filter}', Uri.encodeQueryComponent(filter));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -534,7 +532,7 @@ class CoreCollaborationResourcesClient {
/// Get a collection
Future<CoreCollaborationResourcesListCollectionResponseApplicationJson> listCollection({
required final int collectionId,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/collaboration/resources/collections/{collectionId}';
final queryParameters = <String, dynamic>{};
@ -556,7 +554,7 @@ class CoreCollaborationResourcesClient {
}
// coverage:ignore-end
path = path.replaceAll('{collectionId}', Uri.encodeQueryComponent(collectionId.toString()));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -576,7 +574,7 @@ class CoreCollaborationResourcesClient {
Future<CoreCollaborationResourcesRenameCollectionResponseApplicationJson> renameCollection({
required final String collectionName,
required final int collectionId,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/collaboration/resources/collections/{collectionId}';
final queryParameters = <String, dynamic>{};
@ -599,7 +597,7 @@ class CoreCollaborationResourcesClient {
// coverage:ignore-end
queryParameters['collectionName'] = collectionName;
path = path.replaceAll('{collectionId}', Uri.encodeQueryComponent(collectionId.toString()));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'put',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -620,7 +618,7 @@ class CoreCollaborationResourcesClient {
required final String resourceType,
required final String resourceId,
required final int collectionId,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/collaboration/resources/collections/{collectionId}';
final queryParameters = <String, dynamic>{};
@ -644,7 +642,7 @@ class CoreCollaborationResourcesClient {
queryParameters['resourceType'] = resourceType;
queryParameters['resourceId'] = resourceId;
path = path.replaceAll('{collectionId}', Uri.encodeQueryComponent(collectionId.toString()));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'post',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -665,7 +663,7 @@ class CoreCollaborationResourcesClient {
required final String resourceType,
required final String resourceId,
required final int collectionId,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/collaboration/resources/collections/{collectionId}';
final queryParameters = <String, dynamic>{};
@ -689,7 +687,7 @@ class CoreCollaborationResourcesClient {
queryParameters['resourceType'] = resourceType;
queryParameters['resourceId'] = resourceId;
path = path.replaceAll('{collectionId}', Uri.encodeQueryComponent(collectionId.toString()));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'delete',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -709,7 +707,7 @@ class CoreCollaborationResourcesClient {
Future<CoreCollaborationResourcesGetCollectionsByResourceResponseApplicationJson> getCollectionsByResource({
required final String resourceType,
required final String resourceId,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/collaboration/resources/{resourceType}/{resourceId}';
final queryParameters = <String, dynamic>{};
@ -732,7 +730,7 @@ class CoreCollaborationResourcesClient {
// coverage:ignore-end
path = path.replaceAll('{resourceType}', Uri.encodeQueryComponent(resourceType));
path = path.replaceAll('{resourceId}', Uri.encodeQueryComponent(resourceId));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -753,7 +751,7 @@ class CoreCollaborationResourcesClient {
required final String name,
required final String baseResourceType,
required final String baseResourceId,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/collaboration/resources/{baseResourceType}/{baseResourceId}';
final queryParameters = <String, dynamic>{};
@ -777,7 +775,7 @@ class CoreCollaborationResourcesClient {
queryParameters['name'] = name;
path = path.replaceAll('{baseResourceType}', Uri.encodeQueryComponent(baseResourceType));
path = path.replaceAll('{baseResourceId}', Uri.encodeQueryComponent(baseResourceId));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'post',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -887,7 +885,7 @@ class CoreHoverCardClient {
/// Get the user details for a hovercard
Future<CoreHoverCardGetUserResponseApplicationJson> getUser({
required final String userId,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/hovercard/v1/{userId}';
final queryParameters = <String, dynamic>{};
@ -909,7 +907,7 @@ class CoreHoverCardClient {
}
// coverage:ignore-end
path = path.replaceAll('{userId}', Uri.encodeQueryComponent(userId));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -934,7 +932,7 @@ class CoreNavigationClient {
/// Get the apps navigation
Future<CoreNavigationGetAppsNavigationResponseApplicationJson> getAppsNavigation({
final int absolute = 0,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path = '/ocs/v2.php/core/navigation/apps';
final queryParameters = <String, dynamic>{};
@ -958,7 +956,7 @@ class CoreNavigationClient {
if (absolute != 0) {
queryParameters['absolute'] = absolute.toString();
}
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -977,7 +975,7 @@ class CoreNavigationClient {
/// Get the settings navigation
Future<CoreNavigationGetSettingsNavigationResponseApplicationJson> getSettingsNavigation({
final int absolute = 0,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path = '/ocs/v2.php/core/navigation/settings';
final queryParameters = <String, dynamic>{};
@ -1001,7 +999,7 @@ class CoreNavigationClient {
if (absolute != 0) {
queryParameters['absolute'] = absolute.toString();
}
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -1071,7 +1069,7 @@ class CoreOcsClient {
final CoreClient _rootClient;
/// Get the capabilities
Future<CoreOcsGetCapabilitiesResponseApplicationJson> getCapabilities({final String oCSAPIRequest = 'true'}) async {
Future<CoreOcsGetCapabilitiesResponseApplicationJson> getCapabilities({final bool oCSAPIRequest = true}) async {
const path = '/ocs/v2.php/cloud/capabilities';
final queryParameters = <String, dynamic>{};
final headers = <String, String>{
@ -1089,7 +1087,7 @@ class CoreOcsClient {
);
}
// coverage:ignore-end
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -1246,7 +1244,7 @@ class CoreProfileApiClient {
required final String paramId,
required final String visibility,
required final String targetUserId,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/profile/{targetUserId}';
final queryParameters = <String, dynamic>{};
@ -1270,7 +1268,7 @@ class CoreProfileApiClient {
queryParameters['paramId'] = paramId;
queryParameters['visibility'] = visibility;
path = path.replaceAll('{targetUserId}', Uri.encodeQueryComponent(targetUserId));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'put',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -1333,7 +1331,7 @@ class CoreReferenceApiClient {
/// Resolve a reference
Future<CoreReferenceApiResolveOneResponseApplicationJson> resolveOne({
required final String reference,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path = '/ocs/v2.php/references/resolve';
final queryParameters = <String, dynamic>{};
@ -1355,7 +1353,7 @@ class CoreReferenceApiClient {
}
// coverage:ignore-end
queryParameters['reference'] = reference;
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -1375,7 +1373,7 @@ class CoreReferenceApiClient {
Future<CoreReferenceApiResolveResponseApplicationJson> resolve({
required final List<String> references,
final int limit = 1,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path = '/ocs/v2.php/references/resolve';
final queryParameters = <String, dynamic>{};
@ -1400,7 +1398,7 @@ class CoreReferenceApiClient {
if (limit != 1) {
queryParameters['limit'] = limit.toString();
}
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'post',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -1421,7 +1419,7 @@ class CoreReferenceApiClient {
required final String text,
final int resolve = 0,
final int limit = 1,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path = '/ocs/v2.php/references/extract';
final queryParameters = <String, dynamic>{};
@ -1449,7 +1447,7 @@ class CoreReferenceApiClient {
if (limit != 1) {
queryParameters['limit'] = limit.toString();
}
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'post',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -1467,7 +1465,7 @@ class CoreReferenceApiClient {
/// Get the providers
Future<CoreReferenceApiGetProvidersInfoResponseApplicationJson> getProvidersInfo({
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path = '/ocs/v2.php/references/providers';
final queryParameters = <String, dynamic>{};
@ -1488,7 +1486,7 @@ class CoreReferenceApiClient {
throw Exception('Missing authentication for bearer_auth or basic_auth');
}
// coverage:ignore-end
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -1508,7 +1506,7 @@ class CoreReferenceApiClient {
Future<CoreReferenceApiTouchProviderResponseApplicationJson> touchProvider({
required final String providerId,
final int? timestamp,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/references/provider/{providerId}';
final queryParameters = <String, dynamic>{};
@ -1533,7 +1531,7 @@ class CoreReferenceApiClient {
if (timestamp != null) {
queryParameters['timestamp'] = timestamp.toString();
}
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'put',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -1556,7 +1554,7 @@ class CoreTextProcessingApiClient {
final CoreClient _rootClient;
/// This endpoint returns all available LanguageModel task types
Future<CoreTextProcessingApiTaskTypesResponseApplicationJson> taskTypes({final String oCSAPIRequest = 'true'}) async {
Future<CoreTextProcessingApiTaskTypesResponseApplicationJson> taskTypes({final bool oCSAPIRequest = true}) async {
const path = '/ocs/v2.php/textprocessing/tasktypes';
final queryParameters = <String, dynamic>{};
final headers = <String, String>{
@ -1574,7 +1572,7 @@ class CoreTextProcessingApiClient {
);
}
// coverage:ignore-end
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -1596,7 +1594,7 @@ class CoreTextProcessingApiClient {
required final String type,
required final String appId,
final String identifier = '',
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path = '/ocs/v2.php/textprocessing/schedule';
final queryParameters = <String, dynamic>{};
@ -1621,7 +1619,7 @@ class CoreTextProcessingApiClient {
if (identifier != '') {
queryParameters['identifier'] = identifier;
}
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'post',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -1640,7 +1638,7 @@ class CoreTextProcessingApiClient {
/// This endpoint allows checking the status and results of a task. Tasks are removed 1 week after receiving their last update.
Future<CoreTextProcessingApiGetTaskResponseApplicationJson> getTask({
required final int id,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/textprocessing/task/{id}';
final queryParameters = <String, dynamic>{};
@ -1660,7 +1658,7 @@ class CoreTextProcessingApiClient {
}
// coverage:ignore-end
path = path.replaceAll('{id}', Uri.encodeQueryComponent(id.toString()));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -1679,7 +1677,7 @@ class CoreTextProcessingApiClient {
/// This endpoint allows to delete a scheduled task for a user
Future<CoreTextProcessingApiDeleteTaskResponseApplicationJson> deleteTask({
required final int id,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/textprocessing/task/{id}';
final queryParameters = <String, dynamic>{};
@ -1701,7 +1699,7 @@ class CoreTextProcessingApiClient {
}
// coverage:ignore-end
path = path.replaceAll('{id}', Uri.encodeQueryComponent(id.toString()));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'delete',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -1721,7 +1719,7 @@ class CoreTextProcessingApiClient {
Future<CoreTextProcessingApiListTasksByAppResponseApplicationJson> listTasksByApp({
required final String appId,
final String? identifier,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/textprocessing/tasks/app/{appId}';
final queryParameters = <String, dynamic>{};
@ -1746,7 +1744,7 @@ class CoreTextProcessingApiClient {
if (identifier != null) {
queryParameters['identifier'] = identifier;
}
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -1769,7 +1767,7 @@ class CoreTranslationApiClient {
final CoreClient _rootClient;
/// Get the list of supported languages
Future<CoreTranslationApiLanguagesResponseApplicationJson> languages({final String oCSAPIRequest = 'true'}) async {
Future<CoreTranslationApiLanguagesResponseApplicationJson> languages({final bool oCSAPIRequest = true}) async {
const path = '/ocs/v2.php/translation/languages';
final queryParameters = <String, dynamic>{};
final headers = <String, String>{
@ -1787,7 +1785,7 @@ class CoreTranslationApiClient {
);
}
// coverage:ignore-end
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -1808,7 +1806,7 @@ class CoreTranslationApiClient {
required final String text,
required final String toLanguage,
final String? fromLanguage,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path = '/ocs/v2.php/translation/translate';
final queryParameters = <String, dynamic>{};
@ -1832,7 +1830,7 @@ class CoreTranslationApiClient {
if (fromLanguage != null) {
queryParameters['fromLanguage'] = fromLanguage;
}
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'post',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -1857,7 +1855,7 @@ class CoreUnifiedSearchClient {
/// Get the providers for unified search
Future<CoreUnifiedSearchGetProvidersResponseApplicationJson> getProviders({
final String from = '',
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path = '/ocs/v2.php/search/providers';
final queryParameters = <String, dynamic>{};
@ -1881,7 +1879,7 @@ class CoreUnifiedSearchClient {
if (from != '') {
queryParameters['from'] = from;
}
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -1905,7 +1903,7 @@ class CoreUnifiedSearchClient {
final int? limit,
final ContentString<CoreUnifiedSearchSearchCursor>? cursor,
final String from = '',
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/search/providers/{providerId}/search';
final queryParameters = <String, dynamic>{};
@ -1945,7 +1943,7 @@ class CoreUnifiedSearchClient {
if (from != '') {
queryParameters['from'] = from;
}
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -1968,7 +1966,7 @@ class CoreWhatsNewClient {
final CoreClient _rootClient;
/// Get the changes
Future<CoreWhatsNewGetResponseApplicationJson> $get({final String oCSAPIRequest = 'true'}) async {
Future<CoreWhatsNewGetResponseApplicationJson> $get({final bool oCSAPIRequest = true}) async {
const path = '/ocs/v2.php/core/whatsnew';
final queryParameters = <String, dynamic>{};
final headers = <String, String>{
@ -1988,7 +1986,7 @@ class CoreWhatsNewClient {
throw Exception('Missing authentication for bearer_auth or basic_auth');
}
// coverage:ignore-end
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -2007,7 +2005,7 @@ class CoreWhatsNewClient {
/// Dismiss the changes
Future<CoreWhatsNewDismissResponseApplicationJson> dismiss({
required final String version,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path = '/ocs/v2.php/core/whatsnew';
final queryParameters = <String, dynamic>{};
@ -2029,7 +2027,7 @@ class CoreWhatsNewClient {
}
// coverage:ignore-end
queryParameters['version'] = version;
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'post',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),

182
packages/nextcloud/lib/src/api/core.openapi.json

@ -1498,7 +1498,7 @@
],
"responses": {
"200": {
"description": "",
"description": "Login flow init returned",
"content": {
"application/json": {
"schema": {
@ -2054,16 +2054,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "Capabilities returned",
"content": {
"application/json": {
"schema": {
@ -2210,10 +2211,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -2310,10 +2312,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -2459,16 +2462,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "Autocomplete results returned",
"content": {
"application/json": {
"schema": {
@ -2522,10 +2526,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -2654,10 +2659,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -2722,10 +2728,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -2800,10 +2807,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -2878,10 +2886,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -2955,10 +2964,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -3071,10 +3081,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -3172,10 +3183,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -3305,10 +3317,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -3447,10 +3460,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -3589,10 +3603,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -3723,10 +3738,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -3841,10 +3857,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -3994,16 +4011,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "Reference returned",
"content": {
"application/json": {
"schema": {
@ -4086,16 +4104,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "References returned",
"content": {
"application/json": {
"schema": {
@ -4186,16 +4205,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "References returned",
"content": {
"application/json": {
"schema": {
@ -4258,16 +4278,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "Providers returned",
"content": {
"application/json": {
"schema": {
@ -4340,16 +4361,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "Provider touched",
"content": {
"application/json": {
"schema": {
@ -4435,10 +4457,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -4532,16 +4555,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "Providers returned",
"content": {
"application/json": {
"schema": {
@ -4665,10 +4689,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -4756,16 +4781,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "Supported languages returned",
"content": {
"application/json": {
"schema": {
@ -4879,10 +4905,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -5079,16 +5106,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "Task types returned",
"content": {
"application/json": {
"schema": {
@ -5203,10 +5231,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -5358,10 +5387,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -5510,10 +5540,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -5672,10 +5703,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],

14
packages/nextcloud/lib/src/api/dashboard.openapi.dart

@ -78,9 +78,7 @@ class DashboardDashboardApiClient {
final DashboardClient _rootClient;
/// Get the widgets
Future<DashboardDashboardApiGetWidgetsResponseApplicationJson> getWidgets({
final String oCSAPIRequest = 'true',
}) async {
Future<DashboardDashboardApiGetWidgetsResponseApplicationJson> getWidgets({final bool oCSAPIRequest = true}) async {
const path = '/ocs/v2.php/apps/dashboard/api/v1/widgets';
final queryParameters = <String, dynamic>{};
final headers = <String, String>{
@ -100,7 +98,7 @@ class DashboardDashboardApiClient {
throw Exception('Missing authentication for bearer_auth or basic_auth');
}
// coverage:ignore-end
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -121,7 +119,7 @@ class DashboardDashboardApiClient {
final ContentString<BuiltMap<String, String>>? sinceIds,
final int limit = 7,
final List<String> widgets = const <String>[],
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path = '/ocs/v2.php/apps/dashboard/api/v1/widget-items';
final queryParameters = <String, dynamic>{};
@ -156,7 +154,7 @@ class DashboardDashboardApiClient {
if (widgets != const <String>[]) {
queryParameters['widgets[]'] = widgets.map((final e) => e);
}
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -177,7 +175,7 @@ class DashboardDashboardApiClient {
final ContentString<BuiltMap<String, String>>? sinceIds,
final int limit = 7,
final List<String> widgets = const <String>[],
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path = '/ocs/v2.php/apps/dashboard/api/v2/widget-items';
final queryParameters = <String, dynamic>{};
@ -212,7 +210,7 @@ class DashboardDashboardApiClient {
if (widgets != const <String>[]) {
queryParameters['widgets[]'] = widgets.map((final e) => e);
}
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),

21
packages/nextcloud/lib/src/api/dashboard.openapi.json

@ -192,16 +192,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "Widgets returned",
"content": {
"application/json": {
"schema": {
@ -294,16 +295,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "Widget items returned",
"content": {
"application/json": {
"schema": {
@ -399,16 +401,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "Widget items returned",
"content": {
"application/json": {
"schema": {

4
packages/nextcloud/lib/src/api/dav.openapi.dart

@ -80,7 +80,7 @@ class DavDirectClient {
Future<DavDirectGetUrlResponseApplicationJson> getUrl({
required final int fileId,
final int? expirationTime,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path = '/ocs/v2.php/apps/dav/api/v1/direct';
final queryParameters = <String, dynamic>{};
@ -105,7 +105,7 @@ class DavDirectClient {
if (expirationTime != null) {
queryParameters['expirationTime'] = expirationTime.toString();
}
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'post',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),

5
packages/nextcloud/lib/src/api/dav.openapi.json

@ -108,10 +108,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],

160
packages/nextcloud/lib/src/api/files.openapi.dart

@ -128,43 +128,6 @@ class FilesApiClient {
}
throw await FilesApiException.fromResponse(response); // coverage:ignore-line
}
/// Get the service-worker Javascript for previews
Future<FilesResponse<String, FilesApiApiServiceWorkerHeaders>> serviceWorker() async {
const path = '/index.php/apps/files/preview-service-worker.js';
final queryParameters = <String, dynamic>{};
final headers = <String, String>{
'Accept': 'application/javascript',
};
Uint8List? body;
// coverage:ignore-start
if (_rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'bearer').isNotEmpty) {
headers.addAll(
_rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'bearer').headers,
);
} else if (_rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) {
headers.addAll(
_rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers,
);
}
// coverage:ignore-end
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
headers,
body,
);
if (response.statusCode == 200) {
return FilesResponse<String, FilesApiApiServiceWorkerHeaders>(
await response.body,
_jsonSerializers.deserialize(
response.responseHeaders,
specifiedType: const FullType(FilesApiApiServiceWorkerHeaders),
)! as FilesApiApiServiceWorkerHeaders,
);
}
throw await FilesApiException.fromResponse(response); // coverage:ignore-line
}
}
class FilesDirectEditingClient {
@ -173,7 +136,7 @@ class FilesDirectEditingClient {
final FilesClient _rootClient;
/// Get the direct editing capabilities
Future<FilesDirectEditingInfoResponseApplicationJson> info({final String oCSAPIRequest = 'true'}) async {
Future<FilesDirectEditingInfoResponseApplicationJson> info({final bool oCSAPIRequest = true}) async {
const path = '/ocs/v2.php/apps/files/api/v1/directEditing';
final queryParameters = <String, dynamic>{};
final headers = <String, String>{
@ -193,7 +156,7 @@ class FilesDirectEditingClient {
throw Exception('Missing authentication for bearer_auth or basic_auth');
}
// coverage:ignore-end
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -213,7 +176,7 @@ class FilesDirectEditingClient {
Future<FilesDirectEditingTemplatesResponseApplicationJson> templates({
required final String editorId,
required final String creatorId,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/apps/files/api/v1/directEditing/templates/{editorId}/{creatorId}';
final queryParameters = <String, dynamic>{};
@ -236,7 +199,7 @@ class FilesDirectEditingClient {
// coverage:ignore-end
path = path.replaceAll('{editorId}', Uri.encodeQueryComponent(editorId));
path = path.replaceAll('{creatorId}', Uri.encodeQueryComponent(creatorId));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -257,7 +220,7 @@ class FilesDirectEditingClient {
required final String path,
final String? editorId,
final int? fileId,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path0 = '/ocs/v2.php/apps/files/api/v1/directEditing/open';
final queryParameters = <String, dynamic>{};
@ -285,7 +248,7 @@ class FilesDirectEditingClient {
if (fileId != null) {
queryParameters['fileId'] = fileId.toString();
}
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'post',
Uri(path: path0, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -307,7 +270,7 @@ class FilesDirectEditingClient {
required final String editorId,
required final String creatorId,
final String? templateId,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path0 = '/ocs/v2.php/apps/files/api/v1/directEditing/create';
final queryParameters = <String, dynamic>{};
@ -334,7 +297,7 @@ class FilesDirectEditingClient {
if (templateId != null) {
queryParameters['templateId'] = templateId;
}
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'post',
Uri(path: path0, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -359,7 +322,7 @@ class FilesOpenLocalEditorClient {
/// Create a local editor
Future<FilesOpenLocalEditorCreateResponseApplicationJson> create({
required final String path,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path0 = '/ocs/v2.php/apps/files/api/v1/openlocaleditor';
final queryParameters = <String, dynamic>{};
@ -381,7 +344,7 @@ class FilesOpenLocalEditorClient {
}
// coverage:ignore-end
queryParameters['path'] = path;
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'post',
Uri(path: path0, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -401,7 +364,7 @@ class FilesOpenLocalEditorClient {
Future<FilesOpenLocalEditorValidateResponseApplicationJson> validate({
required final String path,
required final String token,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path0 = '/ocs/v2.php/apps/files/api/v1/openlocaleditor/{token}';
final queryParameters = <String, dynamic>{};
@ -424,7 +387,7 @@ class FilesOpenLocalEditorClient {
// coverage:ignore-end
queryParameters['path'] = path;
path0 = path0.replaceAll('{token}', Uri.encodeQueryComponent(token));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'post',
Uri(path: path0, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -447,7 +410,7 @@ class FilesTemplateClient {
final FilesClient _rootClient;
/// List the available templates
Future<FilesTemplateListResponseApplicationJson> list({final String oCSAPIRequest = 'true'}) async {
Future<FilesTemplateListResponseApplicationJson> list({final bool oCSAPIRequest = true}) async {
const path = '/ocs/v2.php/apps/files/api/v1/templates';
final queryParameters = <String, dynamic>{};
final headers = <String, String>{
@ -467,7 +430,7 @@ class FilesTemplateClient {
throw Exception('Missing authentication for bearer_auth or basic_auth');
}
// coverage:ignore-end
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -488,7 +451,7 @@ class FilesTemplateClient {
required final String filePath,
final String templatePath = '',
final String templateType = 'user',
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path = '/ocs/v2.php/apps/files/api/v1/templates/create';
final queryParameters = <String, dynamic>{};
@ -516,7 +479,7 @@ class FilesTemplateClient {
if (templateType != 'user') {
queryParameters['templateType'] = templateType;
}
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'post',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -536,7 +499,7 @@ class FilesTemplateClient {
Future<FilesTemplatePathResponseApplicationJson> path({
final String templatePath = '',
final int copySystemTemplates = 0,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path = '/ocs/v2.php/apps/files/api/v1/templates/path';
final queryParameters = <String, dynamic>{};
@ -563,7 +526,7 @@ class FilesTemplateClient {
if (copySystemTemplates != 0) {
queryParameters['copySystemTemplates'] = copySystemTemplates.toString();
}
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'post',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -589,7 +552,7 @@ class FilesTransferOwnershipClient {
Future<FilesTransferOwnershipTransferResponseApplicationJson> transfer({
required final String recipient,
required final String path,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path0 = '/ocs/v2.php/apps/files/api/v1/transferownership';
final queryParameters = <String, dynamic>{};
@ -612,7 +575,7 @@ class FilesTransferOwnershipClient {
// coverage:ignore-end
queryParameters['recipient'] = recipient;
queryParameters['path'] = path;
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'post',
Uri(path: path0, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -631,7 +594,7 @@ class FilesTransferOwnershipClient {
/// Accept an ownership transfer
Future<FilesTransferOwnershipAcceptResponseApplicationJson> accept({
required final int id,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/apps/files/api/v1/transferownership/{id}';
final queryParameters = <String, dynamic>{};
@ -653,7 +616,7 @@ class FilesTransferOwnershipClient {
}
// coverage:ignore-end
path = path.replaceAll('{id}', Uri.encodeQueryComponent(id.toString()));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'post',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -672,7 +635,7 @@ class FilesTransferOwnershipClient {
/// Reject an ownership transfer
Future<FilesTransferOwnershipRejectResponseApplicationJson> reject({
required final int id,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/apps/files/api/v1/transferownership/{id}';
final queryParameters = <String, dynamic>{};
@ -694,7 +657,7 @@ class FilesTransferOwnershipClient {
}
// coverage:ignore-end
path = path.replaceAll('{id}', Uri.encodeQueryComponent(id.toString()));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'delete',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -711,79 +674,6 @@ class FilesTransferOwnershipClient {
}
}
@BuiltValue(instantiable: false)
abstract interface class FilesApiApiServiceWorkerHeadersInterface {
@BuiltValueField(wireName: 'service-worker-allowed')
String? get serviceWorkerAllowed;
FilesApiApiServiceWorkerHeadersInterface rebuild(
final void Function(FilesApiApiServiceWorkerHeadersInterfaceBuilder) updates,
);
FilesApiApiServiceWorkerHeadersInterfaceBuilder toBuilder();
}
abstract class FilesApiApiServiceWorkerHeaders
implements
FilesApiApiServiceWorkerHeadersInterface,
Built<FilesApiApiServiceWorkerHeaders, FilesApiApiServiceWorkerHeadersBuilder> {
factory FilesApiApiServiceWorkerHeaders([final void Function(FilesApiApiServiceWorkerHeadersBuilder)? b]) =
_$FilesApiApiServiceWorkerHeaders;
// coverage:ignore-start
const FilesApiApiServiceWorkerHeaders._();
// coverage:ignore-end
// coverage:ignore-start
factory FilesApiApiServiceWorkerHeaders.fromJson(final Map<String, dynamic> json) =>
_jsonSerializers.deserializeWith(serializer, json)!;
// coverage:ignore-end
// coverage:ignore-start
Map<String, dynamic> toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map<String, dynamic>;
// coverage:ignore-end
@BuiltValueSerializer(custom: true)
static Serializer<FilesApiApiServiceWorkerHeaders> get serializer => _$FilesApiApiServiceWorkerHeadersSerializer();
}
class _$FilesApiApiServiceWorkerHeadersSerializer implements StructuredSerializer<FilesApiApiServiceWorkerHeaders> {
@override
final Iterable<Type> types = const [FilesApiApiServiceWorkerHeaders, _$FilesApiApiServiceWorkerHeaders];
@override
final String wireName = 'FilesApiApiServiceWorkerHeaders';
@override
Iterable<Object?> serialize(
final Serializers serializers,
final FilesApiApiServiceWorkerHeaders object, {
final FullType specifiedType = FullType.unspecified,
}) {
throw UnimplementedError();
}
@override
FilesApiApiServiceWorkerHeaders deserialize(
final Serializers serializers,
final Iterable<Object?> serialized, {
final FullType specifiedType = FullType.unspecified,
}) {
final result = FilesApiApiServiceWorkerHeadersBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final value = iterator.current! as String;
switch (key) {
case 'service-worker-allowed':
result.serviceWorkerAllowed = value;
}
}
return result.build();
}
}
@BuiltValue(instantiable: false)
abstract interface class FilesOCSMetaInterface {
String get status;
@ -2234,8 +2124,6 @@ abstract class FilesTemplate implements FilesTemplateInterface, Built<FilesTempl
// coverage:ignore-start
final Serializers _serializers = (Serializers().toBuilder()
..addBuilderFactory(const FullType(FilesApiApiServiceWorkerHeaders), FilesApiApiServiceWorkerHeaders.new)
..add(FilesApiApiServiceWorkerHeaders.serializer)
..addBuilderFactory(
const FullType(FilesDirectEditingInfoResponseApplicationJson),
FilesDirectEditingInfoResponseApplicationJson.new,

88
packages/nextcloud/lib/src/api/files.openapi.g.dart

@ -2285,94 +2285,6 @@ class _$FilesTemplateSerializer implements StructuredSerializer<FilesTemplate> {
}
}
abstract mixin class FilesApiApiServiceWorkerHeadersInterfaceBuilder {
void replace(FilesApiApiServiceWorkerHeadersInterface other);
void update(void Function(FilesApiApiServiceWorkerHeadersInterfaceBuilder) updates);
String? get serviceWorkerAllowed;
set serviceWorkerAllowed(String? serviceWorkerAllowed);
}
class _$FilesApiApiServiceWorkerHeaders extends FilesApiApiServiceWorkerHeaders {
@override
final String? serviceWorkerAllowed;
factory _$FilesApiApiServiceWorkerHeaders([void Function(FilesApiApiServiceWorkerHeadersBuilder)? updates]) =>
(FilesApiApiServiceWorkerHeadersBuilder()..update(updates))._build();
_$FilesApiApiServiceWorkerHeaders._({this.serviceWorkerAllowed}) : super._();
@override
FilesApiApiServiceWorkerHeaders rebuild(void Function(FilesApiApiServiceWorkerHeadersBuilder) updates) =>
(toBuilder()..update(updates)).build();
@override
FilesApiApiServiceWorkerHeadersBuilder toBuilder() => FilesApiApiServiceWorkerHeadersBuilder()..replace(this);
@override
bool operator ==(Object other) {
if (identical(other, this)) return true;
return other is FilesApiApiServiceWorkerHeaders && serviceWorkerAllowed == other.serviceWorkerAllowed;
}
@override
int get hashCode {
var _$hash = 0;
_$hash = $jc(_$hash, serviceWorkerAllowed.hashCode);
_$hash = $jf(_$hash);
return _$hash;
}
@override
String toString() {
return (newBuiltValueToStringHelper(r'FilesApiApiServiceWorkerHeaders')
..add('serviceWorkerAllowed', serviceWorkerAllowed))
.toString();
}
}
class FilesApiApiServiceWorkerHeadersBuilder
implements
Builder<FilesApiApiServiceWorkerHeaders, FilesApiApiServiceWorkerHeadersBuilder>,
FilesApiApiServiceWorkerHeadersInterfaceBuilder {
_$FilesApiApiServiceWorkerHeaders? _$v;
String? _serviceWorkerAllowed;
String? get serviceWorkerAllowed => _$this._serviceWorkerAllowed;
set serviceWorkerAllowed(covariant String? serviceWorkerAllowed) =>
_$this._serviceWorkerAllowed = serviceWorkerAllowed;
FilesApiApiServiceWorkerHeadersBuilder();
FilesApiApiServiceWorkerHeadersBuilder get _$this {
final $v = _$v;
if ($v != null) {
_serviceWorkerAllowed = $v.serviceWorkerAllowed;
_$v = null;
}
return this;
}
@override
void replace(covariant FilesApiApiServiceWorkerHeaders other) {
ArgumentError.checkNotNull(other, 'other');
_$v = other as _$FilesApiApiServiceWorkerHeaders;
}
@override
void update(void Function(FilesApiApiServiceWorkerHeadersBuilder)? updates) {
if (updates != null) updates(this);
}
@override
FilesApiApiServiceWorkerHeaders build() => _build();
_$FilesApiApiServiceWorkerHeaders _build() {
final _$result = _$v ?? _$FilesApiApiServiceWorkerHeaders._(serviceWorkerAllowed: serviceWorkerAllowed);
replace(_$result);
return _$result;
}
}
abstract mixin class FilesOCSMetaInterfaceBuilder {
void replace(FilesOCSMetaInterface other);
void update(void Function(FilesOCSMetaInterfaceBuilder) updates);

102
packages/nextcloud/lib/src/api/files.openapi.json

@ -333,44 +333,6 @@
}
}
},
"/index.php/apps/files/preview-service-worker.js": {
"get": {
"operationId": "api-service-worker",
"summary": "Get the service-worker Javascript for previews",
"tags": [
"api"
],
"security": [
{},
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"responses": {
"200": {
"description": "",
"headers": {
"Service-Worker-Allowed": {
"schema": {
"type": "string"
}
}
},
"content": {
"application/javascript": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
}
}
}
},
"/ocs/v2.php/apps/files/api/v1/directEditing": {
"get": {
"operationId": "direct_editing-info",
@ -390,16 +352,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "Direct editing capabilities returned",
"content": {
"application/json": {
"schema": {
@ -547,10 +510,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -709,10 +673,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -889,10 +854,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -1033,16 +999,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "Available templates returned",
"content": {
"application/json": {
"schema": {
@ -1123,10 +1090,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -1211,10 +1179,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -1314,10 +1283,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -1438,10 +1408,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -1560,10 +1531,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -1683,10 +1655,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -1811,10 +1784,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],

6
packages/nextcloud/lib/src/api/files_external.openapi.dart

@ -79,9 +79,7 @@ class FilesExternalApiClient {
final FilesExternalClient _rootClient;
/// Get the mount points visible for this user
Future<FilesExternalApiGetUserMountsResponseApplicationJson> getUserMounts({
final String oCSAPIRequest = 'true',
}) async {
Future<FilesExternalApiGetUserMountsResponseApplicationJson> getUserMounts({final bool oCSAPIRequest = true}) async {
const path = '/ocs/v2.php/apps/files_external/api/v1/mounts';
final queryParameters = <String, dynamic>{};
final headers = <String, String>{
@ -101,7 +99,7 @@ class FilesExternalApiClient {
throw Exception('Missing authentication for bearer_auth or basic_auth');
}
// coverage:ignore-end
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),

7
packages/nextcloud/lib/src/api/files_external.openapi.json

@ -190,16 +190,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "User mounts returned",
"content": {
"application/json": {
"schema": {

12
packages/nextcloud/lib/src/api/files_reminders.openapi.dart

@ -81,7 +81,7 @@ class FilesRemindersApiClient {
Future<FilesRemindersApiGetResponseApplicationJson> $get({
required final String version,
required final int fileId,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/apps/files_reminders/api/v{version}/{fileId}';
final queryParameters = <String, dynamic>{};
@ -109,7 +109,7 @@ class FilesRemindersApiClient {
}
path = path.replaceAll('{version}', Uri.encodeQueryComponent(version));
path = path.replaceAll('{fileId}', Uri.encodeQueryComponent(fileId.toString()));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -130,7 +130,7 @@ class FilesRemindersApiClient {
required final String dueDate,
required final String version,
required final int fileId,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/apps/files_reminders/api/v{version}/{fileId}';
final queryParameters = <String, dynamic>{};
@ -159,7 +159,7 @@ class FilesRemindersApiClient {
}
path = path.replaceAll('{version}', Uri.encodeQueryComponent(version));
path = path.replaceAll('{fileId}', Uri.encodeQueryComponent(fileId.toString()));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'put',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -183,7 +183,7 @@ class FilesRemindersApiClient {
Future<FilesRemindersApiRemoveResponseApplicationJson> remove({
required final String version,
required final int fileId,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/apps/files_reminders/api/v{version}/{fileId}';
final queryParameters = <String, dynamic>{};
@ -211,7 +211,7 @@ class FilesRemindersApiClient {
}
path = path.replaceAll('{version}', Uri.encodeQueryComponent(version));
path = path.replaceAll('{fileId}', Uri.encodeQueryComponent(fileId.toString()));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'delete',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),

15
packages/nextcloud/lib/src/api/files_reminders.openapi.json

@ -86,10 +86,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -209,10 +210,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -396,10 +398,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],

80
packages/nextcloud/lib/src/api/files_sharing.openapi.dart

@ -89,7 +89,7 @@ class FilesSharingDeletedShareapiClient {
final FilesSharingClient _rootClient;
/// Get a list of all deleted shares
Future<FilesSharingDeletedShareapiListResponseApplicationJson> list({final String oCSAPIRequest = 'true'}) async {
Future<FilesSharingDeletedShareapiListResponseApplicationJson> list({final bool oCSAPIRequest = true}) async {
const path = '/ocs/v2.php/apps/files_sharing/api/v1/deletedshares';
final queryParameters = <String, dynamic>{};
final headers = <String, String>{
@ -109,7 +109,7 @@ class FilesSharingDeletedShareapiClient {
throw Exception('Missing authentication for bearer_auth or basic_auth');
}
// coverage:ignore-end
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -128,7 +128,7 @@ class FilesSharingDeletedShareapiClient {
/// Undelete a deleted share
Future<FilesSharingDeletedShareapiUndeleteResponseApplicationJson> undelete({
required final String id,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/apps/files_sharing/api/v1/deletedshares/{id}';
final queryParameters = <String, dynamic>{};
@ -150,7 +150,7 @@ class FilesSharingDeletedShareapiClient {
}
// coverage:ignore-end
path = path.replaceAll('{id}', Uri.encodeQueryComponent(id));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'post',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -175,7 +175,7 @@ class FilesSharingPublicPreviewClient {
/// Get a direct link preview for a shared file
Future<Uint8List> directLink({
required final String token,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/index.php/s/{token}/preview';
final queryParameters = <String, dynamic>{};
@ -195,7 +195,7 @@ class FilesSharingPublicPreviewClient {
}
// coverage:ignore-end
path = path.replaceAll('{token}', Uri.encodeQueryComponent(token));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -215,7 +215,7 @@ class FilesSharingPublicPreviewClient {
final int x = 32,
final int y = 32,
final int a = 0,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/index.php/apps/files_sharing/publicpreview/{token}';
final queryParameters = <String, dynamic>{};
@ -247,7 +247,7 @@ class FilesSharingPublicPreviewClient {
if (a != 0) {
queryParameters['a'] = a.toString();
}
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -267,7 +267,7 @@ class FilesSharingRemoteClient {
final FilesSharingClient _rootClient;
/// Get a list of accepted remote shares
Future<FilesSharingRemoteGetSharesResponseApplicationJson> getShares({final String oCSAPIRequest = 'true'}) async {
Future<FilesSharingRemoteGetSharesResponseApplicationJson> getShares({final bool oCSAPIRequest = true}) async {
const path = '/ocs/v2.php/apps/files_sharing/api/v1/remote_shares';
final queryParameters = <String, dynamic>{};
final headers = <String, String>{
@ -287,7 +287,7 @@ class FilesSharingRemoteClient {
throw Exception('Missing authentication for bearer_auth or basic_auth');
}
// coverage:ignore-end
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -305,7 +305,7 @@ class FilesSharingRemoteClient {
/// Get list of pending remote shares
Future<FilesSharingRemoteGetOpenSharesResponseApplicationJson> getOpenShares({
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path = '/ocs/v2.php/apps/files_sharing/api/v1/remote_shares/pending';
final queryParameters = <String, dynamic>{};
@ -326,7 +326,7 @@ class FilesSharingRemoteClient {
throw Exception('Missing authentication for bearer_auth or basic_auth');
}
// coverage:ignore-end
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -345,7 +345,7 @@ class FilesSharingRemoteClient {
/// Accept a remote share
Future<FilesSharingRemoteAcceptShareResponseApplicationJson> acceptShare({
required final int id,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/apps/files_sharing/api/v1/remote_shares/pending/{id}';
final queryParameters = <String, dynamic>{};
@ -367,7 +367,7 @@ class FilesSharingRemoteClient {
}
// coverage:ignore-end
path = path.replaceAll('{id}', Uri.encodeQueryComponent(id.toString()));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'post',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -386,7 +386,7 @@ class FilesSharingRemoteClient {
/// Decline a remote share
Future<FilesSharingRemoteDeclineShareResponseApplicationJson> declineShare({
required final int id,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/apps/files_sharing/api/v1/remote_shares/pending/{id}';
final queryParameters = <String, dynamic>{};
@ -408,7 +408,7 @@ class FilesSharingRemoteClient {
}
// coverage:ignore-end
path = path.replaceAll('{id}', Uri.encodeQueryComponent(id.toString()));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'delete',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -427,7 +427,7 @@ class FilesSharingRemoteClient {
/// Get info of a remote share
Future<FilesSharingRemoteGetShareResponseApplicationJson> getShare({
required final int id,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/apps/files_sharing/api/v1/remote_shares/{id}';
final queryParameters = <String, dynamic>{};
@ -449,7 +449,7 @@ class FilesSharingRemoteClient {
}
// coverage:ignore-end
path = path.replaceAll('{id}', Uri.encodeQueryComponent(id.toString()));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -468,7 +468,7 @@ class FilesSharingRemoteClient {
/// Unshare a remote share
Future<FilesSharingRemoteUnshareResponseApplicationJson> unshare({
required final int id,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/apps/files_sharing/api/v1/remote_shares/{id}';
final queryParameters = <String, dynamic>{};
@ -490,7 +490,7 @@ class FilesSharingRemoteClient {
}
// coverage:ignore-end
path = path.replaceAll('{id}', Uri.encodeQueryComponent(id.toString()));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'delete',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -574,7 +574,7 @@ class FilesSharingShareapiClient {
final String subfiles = 'false',
final String path = '',
final String includeTags = 'false',
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path0 = '/ocs/v2.php/apps/files_sharing/api/v1/shares';
final queryParameters = <String, dynamic>{};
@ -610,7 +610,7 @@ class FilesSharingShareapiClient {
if (includeTags != 'false') {
queryParameters['include_tags'] = includeTags;
}
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path0, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -639,7 +639,7 @@ class FilesSharingShareapiClient {
final String note = '',
final String label = '',
final String? attributes,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path0 = '/ocs/v2.php/apps/files_sharing/api/v1/shares';
final queryParameters = <String, dynamic>{};
@ -693,7 +693,7 @@ class FilesSharingShareapiClient {
if (attributes != null) {
queryParameters['attributes'] = attributes;
}
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'post',
Uri(path: path0, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -712,7 +712,7 @@ class FilesSharingShareapiClient {
/// Get all shares relative to a file, including parent folders shares rights
Future<FilesSharingShareapiGetInheritedSharesResponseApplicationJson> getInheritedShares({
required final String path,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path0 = '/ocs/v2.php/apps/files_sharing/api/v1/shares/inherited';
final queryParameters = <String, dynamic>{};
@ -734,7 +734,7 @@ class FilesSharingShareapiClient {
}
// coverage:ignore-end
queryParameters['path'] = path;
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path0, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -752,7 +752,7 @@ class FilesSharingShareapiClient {
/// Get all shares that are still pending
Future<FilesSharingShareapiPendingSharesResponseApplicationJson> pendingShares({
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path = '/ocs/v2.php/apps/files_sharing/api/v1/shares/pending';
final queryParameters = <String, dynamic>{};
@ -773,7 +773,7 @@ class FilesSharingShareapiClient {
throw Exception('Missing authentication for bearer_auth or basic_auth');
}
// coverage:ignore-end
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -793,7 +793,7 @@ class FilesSharingShareapiClient {
Future<FilesSharingShareapiGetShareResponseApplicationJson> getShare({
required final String id,
final int includeTags = 0,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/apps/files_sharing/api/v1/shares/{id}';
final queryParameters = <String, dynamic>{};
@ -818,7 +818,7 @@ class FilesSharingShareapiClient {
if (includeTags != 0) {
queryParameters['include_tags'] = includeTags.toString();
}
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -846,7 +846,7 @@ class FilesSharingShareapiClient {
final String? label,
final String? hideDownload,
final String? attributes,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/apps/files_sharing/api/v1/shares/{id}';
final queryParameters = <String, dynamic>{};
@ -895,7 +895,7 @@ class FilesSharingShareapiClient {
if (attributes != null) {
queryParameters['attributes'] = attributes;
}
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'put',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -914,7 +914,7 @@ class FilesSharingShareapiClient {
/// Delete a share
Future<FilesSharingShareapiDeleteShareResponseApplicationJson> deleteShare({
required final String id,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/apps/files_sharing/api/v1/shares/{id}';
final queryParameters = <String, dynamic>{};
@ -936,7 +936,7 @@ class FilesSharingShareapiClient {
}
// coverage:ignore-end
path = path.replaceAll('{id}', Uri.encodeQueryComponent(id));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'delete',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -955,7 +955,7 @@ class FilesSharingShareapiClient {
/// Accept a share
Future<FilesSharingShareapiAcceptShareResponseApplicationJson> acceptShare({
required final String id,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/apps/files_sharing/api/v1/shares/pending/{id}';
final queryParameters = <String, dynamic>{};
@ -977,7 +977,7 @@ class FilesSharingShareapiClient {
}
// coverage:ignore-end
path = path.replaceAll('{id}', Uri.encodeQueryComponent(id));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'post',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -1009,7 +1009,7 @@ class FilesSharingShareesapiClient {
final int perPage = 200,
final ContentString<FilesSharingShareesapiSearchShareType>? shareType,
final int lookup = 0,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path = '/ocs/v2.php/apps/files_sharing/api/v1/sharees';
final queryParameters = <String, dynamic>{};
@ -1051,7 +1051,7 @@ class FilesSharingShareesapiClient {
if (lookup != 0) {
queryParameters['lookup'] = lookup.toString();
}
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -1078,7 +1078,7 @@ class FilesSharingShareesapiClient {
Future<FilesSharingShareesapiFindRecommendedResponseApplicationJson> findRecommended({
required final String itemType,
final ContentString<FilesSharingShareesapiFindRecommendedShareType>? shareType,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path = '/ocs/v2.php/apps/files_sharing/api/v1/sharees_recommended';
final queryParameters = <String, dynamic>{};
@ -1106,7 +1106,7 @@ class FilesSharingShareesapiClient {
specifiedType: const FullType(ContentString, [FullType(FilesSharingShareesapiFindRecommendedShareType)]),
);
}
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),

110
packages/nextcloud/lib/src/api/files_sharing.openapi.json

@ -1317,10 +1317,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -1490,10 +1491,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -1745,10 +1747,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -1917,10 +1920,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -2016,10 +2020,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -2099,16 +2104,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "Pending shares returned",
"content": {
"application/json": {
"schema": {
@ -2180,10 +2186,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -2339,10 +2346,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -2436,10 +2444,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -2523,10 +2532,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -2601,16 +2611,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "Deleted shares returned",
"content": {
"application/json": {
"schema": {
@ -2673,10 +2684,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -2815,10 +2827,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -2928,16 +2941,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "Recommended sharees returned",
"content": {
"application/json": {
"schema": {
@ -2988,16 +3002,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "Accepted remote shares returned",
"content": {
"application/json": {
"schema": {
@ -3051,16 +3066,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "Pending remote shares returned",
"content": {
"application/json": {
"schema": {
@ -3124,10 +3140,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -3200,10 +3217,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -3278,10 +3296,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -3356,10 +3375,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],

172
packages/nextcloud/lib/src/api/provisioning_api.openapi.dart

@ -89,7 +89,7 @@ class ProvisioningApiAppConfigClient {
/// Get a list of apps
///
/// This endpoint requires admin access
Future<ProvisioningApiAppConfigGetAppsResponseApplicationJson> getApps({final String oCSAPIRequest = 'true'}) async {
Future<ProvisioningApiAppConfigGetAppsResponseApplicationJson> getApps({final bool oCSAPIRequest = true}) async {
const path = '/ocs/v2.php/apps/provisioning_api/api/v1/config/apps';
final queryParameters = <String, dynamic>{};
final headers = <String, String>{
@ -109,7 +109,7 @@ class ProvisioningApiAppConfigClient {
throw Exception('Missing authentication for bearer_auth or basic_auth');
}
// coverage:ignore-end
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -130,7 +130,7 @@ class ProvisioningApiAppConfigClient {
/// This endpoint requires admin access
Future<ProvisioningApiAppConfigGetKeysResponseApplicationJson> getKeys({
required final String app,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/apps/provisioning_api/api/v1/config/apps/{app}';
final queryParameters = <String, dynamic>{};
@ -152,7 +152,7 @@ class ProvisioningApiAppConfigClient {
}
// coverage:ignore-end
path = path.replaceAll('{app}', Uri.encodeQueryComponent(app));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -175,7 +175,7 @@ class ProvisioningApiAppConfigClient {
required final String app,
required final String key,
final String defaultValue = '',
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/apps/provisioning_api/api/v1/config/apps/{app}/{key}';
final queryParameters = <String, dynamic>{};
@ -201,7 +201,7 @@ class ProvisioningApiAppConfigClient {
if (defaultValue != '') {
queryParameters['defaultValue'] = defaultValue;
}
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -222,7 +222,7 @@ class ProvisioningApiAppConfigClient {
required final String value,
required final String app,
required final String key,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/apps/provisioning_api/api/v1/config/apps/{app}/{key}';
final queryParameters = <String, dynamic>{};
@ -246,7 +246,7 @@ class ProvisioningApiAppConfigClient {
queryParameters['value'] = value;
path = path.replaceAll('{app}', Uri.encodeQueryComponent(app));
path = path.replaceAll('{key}', Uri.encodeQueryComponent(key));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'post',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -268,7 +268,7 @@ class ProvisioningApiAppConfigClient {
Future<ProvisioningApiAppConfigDeleteKeyResponseApplicationJson> deleteKey({
required final String app,
required final String key,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/apps/provisioning_api/api/v1/config/apps/{app}/{key}';
final queryParameters = <String, dynamic>{};
@ -291,7 +291,7 @@ class ProvisioningApiAppConfigClient {
// coverage:ignore-end
path = path.replaceAll('{app}', Uri.encodeQueryComponent(app));
path = path.replaceAll('{key}', Uri.encodeQueryComponent(key));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'delete',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -318,7 +318,7 @@ class ProvisioningApiAppsClient {
/// This endpoint requires admin access
Future<ProvisioningApiAppsGetAppsResponseApplicationJson> getApps({
final String? filter,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path = '/ocs/v2.php/cloud/apps';
final queryParameters = <String, dynamic>{};
@ -342,7 +342,7 @@ class ProvisioningApiAppsClient {
if (filter != null) {
queryParameters['filter'] = filter;
}
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -363,7 +363,7 @@ class ProvisioningApiAppsClient {
/// This endpoint requires admin access
Future<ProvisioningApiAppsGetAppInfoResponseApplicationJson> getAppInfo({
required final String app,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/cloud/apps/{app}';
final queryParameters = <String, dynamic>{};
@ -385,7 +385,7 @@ class ProvisioningApiAppsClient {
}
// coverage:ignore-end
path = path.replaceAll('{app}', Uri.encodeQueryComponent(app));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -406,7 +406,7 @@ class ProvisioningApiAppsClient {
/// This endpoint requires admin access
Future<ProvisioningApiAppsEnableResponseApplicationJson> enable({
required final String app,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/cloud/apps/{app}';
final queryParameters = <String, dynamic>{};
@ -428,7 +428,7 @@ class ProvisioningApiAppsClient {
}
// coverage:ignore-end
path = path.replaceAll('{app}', Uri.encodeQueryComponent(app));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'post',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -449,7 +449,7 @@ class ProvisioningApiAppsClient {
/// This endpoint requires admin access
Future<ProvisioningApiAppsDisableResponseApplicationJson> disable({
required final String app,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/cloud/apps/{app}';
final queryParameters = <String, dynamic>{};
@ -471,7 +471,7 @@ class ProvisioningApiAppsClient {
}
// coverage:ignore-end
path = path.replaceAll('{app}', Uri.encodeQueryComponent(app));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'delete',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -498,7 +498,7 @@ class ProvisioningApiGroupsClient {
final String search = '',
final int? limit,
final int offset = 0,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path = '/ocs/v2.php/cloud/groups';
final queryParameters = <String, dynamic>{};
@ -528,7 +528,7 @@ class ProvisioningApiGroupsClient {
if (offset != 0) {
queryParameters['offset'] = offset.toString();
}
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -550,7 +550,7 @@ class ProvisioningApiGroupsClient {
Future<ProvisioningApiGroupsAddGroupResponseApplicationJson> addGroup({
required final String groupid,
final String displayname = '',
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path = '/ocs/v2.php/cloud/groups';
final queryParameters = <String, dynamic>{};
@ -575,7 +575,7 @@ class ProvisioningApiGroupsClient {
if (displayname != '') {
queryParameters['displayname'] = displayname;
}
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'post',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -596,7 +596,7 @@ class ProvisioningApiGroupsClient {
final String search = '',
final int? limit,
final int offset = 0,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path = '/ocs/v2.php/cloud/groups/details';
final queryParameters = <String, dynamic>{};
@ -626,7 +626,7 @@ class ProvisioningApiGroupsClient {
if (offset != 0) {
queryParameters['offset'] = offset.toString();
}
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -645,7 +645,7 @@ class ProvisioningApiGroupsClient {
/// Get a list of users in the specified group
Future<ProvisioningApiGroupsGetGroupUsersResponseApplicationJson> getGroupUsers({
required final String groupId,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/cloud/groups/{groupId}/users';
final queryParameters = <String, dynamic>{};
@ -672,7 +672,7 @@ class ProvisioningApiGroupsClient {
); // coverage:ignore-line
}
path = path.replaceAll('{groupId}', Uri.encodeQueryComponent(groupId));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -694,7 +694,7 @@ class ProvisioningApiGroupsClient {
final String search = '',
final int? limit,
final int offset = 0,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/cloud/groups/{groupId}/users/details';
final queryParameters = <String, dynamic>{};
@ -730,7 +730,7 @@ class ProvisioningApiGroupsClient {
if (offset != 0) {
queryParameters['offset'] = offset.toString();
}
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -751,7 +751,7 @@ class ProvisioningApiGroupsClient {
/// This endpoint requires admin access
Future<ProvisioningApiGroupsGetSubAdminsOfGroupResponseApplicationJson> getSubAdminsOfGroup({
required final String groupId,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/cloud/groups/{groupId}/subadmins';
final queryParameters = <String, dynamic>{};
@ -778,7 +778,7 @@ class ProvisioningApiGroupsClient {
); // coverage:ignore-line
}
path = path.replaceAll('{groupId}', Uri.encodeQueryComponent(groupId));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -798,7 +798,7 @@ class ProvisioningApiGroupsClient {
@Deprecated('')
Future<ProvisioningApiGroupsGetGroupResponseApplicationJson> getGroup({
required final String groupId,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/cloud/groups/{groupId}';
final queryParameters = <String, dynamic>{};
@ -825,7 +825,7 @@ class ProvisioningApiGroupsClient {
); // coverage:ignore-line
}
path = path.replaceAll('{groupId}', Uri.encodeQueryComponent(groupId));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -848,7 +848,7 @@ class ProvisioningApiGroupsClient {
required final String key,
required final String value,
required final String groupId,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/cloud/groups/{groupId}';
final queryParameters = <String, dynamic>{};
@ -877,7 +877,7 @@ class ProvisioningApiGroupsClient {
); // coverage:ignore-line
}
path = path.replaceAll('{groupId}', Uri.encodeQueryComponent(groupId));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'put',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -898,7 +898,7 @@ class ProvisioningApiGroupsClient {
/// This endpoint requires admin access
Future<ProvisioningApiGroupsDeleteGroupResponseApplicationJson> deleteGroup({
required final String groupId,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/cloud/groups/{groupId}';
final queryParameters = <String, dynamic>{};
@ -925,7 +925,7 @@ class ProvisioningApiGroupsClient {
); // coverage:ignore-line
}
path = path.replaceAll('{groupId}', Uri.encodeQueryComponent(groupId));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'delete',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -952,7 +952,7 @@ class ProvisioningApiPreferencesClient {
required final String configValue,
required final String appId,
required final String configKey,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/apps/provisioning_api/api/v1/config/users/{appId}/{configKey}';
final queryParameters = <String, dynamic>{};
@ -976,7 +976,7 @@ class ProvisioningApiPreferencesClient {
queryParameters['configValue'] = configValue;
path = path.replaceAll('{appId}', Uri.encodeQueryComponent(appId));
path = path.replaceAll('{configKey}', Uri.encodeQueryComponent(configKey));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'post',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -996,7 +996,7 @@ class ProvisioningApiPreferencesClient {
Future<ProvisioningApiPreferencesDeletePreferenceResponseApplicationJson> deletePreference({
required final String appId,
required final String configKey,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/apps/provisioning_api/api/v1/config/users/{appId}/{configKey}';
final queryParameters = <String, dynamic>{};
@ -1019,7 +1019,7 @@ class ProvisioningApiPreferencesClient {
// coverage:ignore-end
path = path.replaceAll('{appId}', Uri.encodeQueryComponent(appId));
path = path.replaceAll('{configKey}', Uri.encodeQueryComponent(configKey));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'delete',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -1039,7 +1039,7 @@ class ProvisioningApiPreferencesClient {
Future<ProvisioningApiPreferencesSetMultiplePreferencesResponseApplicationJson> setMultiplePreferences({
required final ContentString<BuiltMap<String, String>> configs,
required final String appId,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/apps/provisioning_api/api/v1/config/users/{appId}';
final queryParameters = <String, dynamic>{};
@ -1067,7 +1067,7 @@ class ProvisioningApiPreferencesClient {
]),
);
path = path.replaceAll('{appId}', Uri.encodeQueryComponent(appId));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'post',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -1087,7 +1087,7 @@ class ProvisioningApiPreferencesClient {
Future<ProvisioningApiPreferencesDeleteMultiplePreferenceResponseApplicationJson> deleteMultiplePreference({
required final List<String> configKeys,
required final String appId,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/apps/provisioning_api/api/v1/config/users/{appId}';
final queryParameters = <String, dynamic>{};
@ -1110,7 +1110,7 @@ class ProvisioningApiPreferencesClient {
// coverage:ignore-end
queryParameters['configKeys[]'] = configKeys.map((final e) => e);
path = path.replaceAll('{appId}', Uri.encodeQueryComponent(appId));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'delete',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -1137,7 +1137,7 @@ class ProvisioningApiUsersClient {
final String search = '',
final int? limit,
final int offset = 0,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path = '/ocs/v2.php/cloud/users';
final queryParameters = <String, dynamic>{};
@ -1167,7 +1167,7 @@ class ProvisioningApiUsersClient {
if (offset != 0) {
queryParameters['offset'] = offset.toString();
}
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -1194,7 +1194,7 @@ class ProvisioningApiUsersClient {
final String quota = '',
final String language = '',
final String? manager,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path = '/ocs/v2.php/cloud/users';
final queryParameters = <String, dynamic>{};
@ -1240,7 +1240,7 @@ class ProvisioningApiUsersClient {
if (manager != null) {
queryParameters['manager'] = manager;
}
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'post',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -1261,7 +1261,7 @@ class ProvisioningApiUsersClient {
final String search = '',
final int? limit,
final int offset = 0,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path = '/ocs/v2.php/cloud/users/details';
final queryParameters = <String, dynamic>{};
@ -1291,7 +1291,7 @@ class ProvisioningApiUsersClient {
if (offset != 0) {
queryParameters['offset'] = offset.toString();
}
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -1311,7 +1311,7 @@ class ProvisioningApiUsersClient {
Future<ProvisioningApiUsersSearchByPhoneNumbersResponseApplicationJson> searchByPhoneNumbers({
required final String location,
required final ContentString<BuiltMap<String, BuiltList<String>>> search,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path = '/ocs/v2.php/cloud/users/search/by-phone';
final queryParameters = <String, dynamic>{};
@ -1342,7 +1342,7 @@ class ProvisioningApiUsersClient {
]),
]),
);
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'post',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -1361,7 +1361,7 @@ class ProvisioningApiUsersClient {
/// Get the details of a user
Future<ProvisioningApiUsersGetUserResponseApplicationJson> getUser({
required final String userId,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/cloud/users/{userId}';
final queryParameters = <String, dynamic>{};
@ -1383,7 +1383,7 @@ class ProvisioningApiUsersClient {
}
// coverage:ignore-end
path = path.replaceAll('{userId}', Uri.encodeQueryComponent(userId));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -1404,7 +1404,7 @@ class ProvisioningApiUsersClient {
required final String key,
required final String value,
required final String userId,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/cloud/users/{userId}';
final queryParameters = <String, dynamic>{};
@ -1428,7 +1428,7 @@ class ProvisioningApiUsersClient {
queryParameters['key'] = key;
queryParameters['value'] = value;
path = path.replaceAll('{userId}', Uri.encodeQueryComponent(userId));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'put',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -1447,7 +1447,7 @@ class ProvisioningApiUsersClient {
/// Delete a user
Future<ProvisioningApiUsersDeleteUserResponseApplicationJson> deleteUser({
required final String userId,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/cloud/users/{userId}';
final queryParameters = <String, dynamic>{};
@ -1469,7 +1469,7 @@ class ProvisioningApiUsersClient {
}
// coverage:ignore-end
path = path.replaceAll('{userId}', Uri.encodeQueryComponent(userId));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'delete',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -1487,7 +1487,7 @@ class ProvisioningApiUsersClient {
/// Get the details of the current user
Future<ProvisioningApiUsersGetCurrentUserResponseApplicationJson> getCurrentUser({
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path = '/ocs/v2.php/cloud/user';
final queryParameters = <String, dynamic>{};
@ -1508,7 +1508,7 @@ class ProvisioningApiUsersClient {
throw Exception('Missing authentication for bearer_auth or basic_auth');
}
// coverage:ignore-end
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -1526,7 +1526,7 @@ class ProvisioningApiUsersClient {
/// Get a list of fields that are editable for the current user
Future<ProvisioningApiUsersGetEditableFieldsResponseApplicationJson> getEditableFields({
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path = '/ocs/v2.php/cloud/user/fields';
final queryParameters = <String, dynamic>{};
@ -1547,7 +1547,7 @@ class ProvisioningApiUsersClient {
throw Exception('Missing authentication for bearer_auth or basic_auth');
}
// coverage:ignore-end
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -1566,7 +1566,7 @@ class ProvisioningApiUsersClient {
/// Get a list of fields that are editable for a user
Future<ProvisioningApiUsersGetEditableFieldsForUserResponseApplicationJson> getEditableFieldsForUser({
required final String userId,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/cloud/user/fields/{userId}';
final queryParameters = <String, dynamic>{};
@ -1588,7 +1588,7 @@ class ProvisioningApiUsersClient {
}
// coverage:ignore-end
path = path.replaceAll('{userId}', Uri.encodeQueryComponent(userId));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -1610,7 +1610,7 @@ class ProvisioningApiUsersClient {
required final String value,
required final String userId,
required final String collectionName,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/cloud/users/{userId}/{collectionName}';
final queryParameters = <String, dynamic>{};
@ -1640,7 +1640,7 @@ class ProvisioningApiUsersClient {
); // coverage:ignore-line
}
path = path.replaceAll('{collectionName}', Uri.encodeQueryComponent(collectionName));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'put',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -1659,7 +1659,7 @@ class ProvisioningApiUsersClient {
/// Wipe all devices of a user
Future<ProvisioningApiUsersWipeUserDevicesResponseApplicationJson> wipeUserDevices({
required final String userId,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/cloud/users/{userId}/wipe';
final queryParameters = <String, dynamic>{};
@ -1681,7 +1681,7 @@ class ProvisioningApiUsersClient {
}
// coverage:ignore-end
path = path.replaceAll('{userId}', Uri.encodeQueryComponent(userId));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'post',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -1700,7 +1700,7 @@ class ProvisioningApiUsersClient {
/// Enable a user
Future<ProvisioningApiUsersEnableUserResponseApplicationJson> enableUser({
required final String userId,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/cloud/users/{userId}/enable';
final queryParameters = <String, dynamic>{};
@ -1722,7 +1722,7 @@ class ProvisioningApiUsersClient {
}
// coverage:ignore-end
path = path.replaceAll('{userId}', Uri.encodeQueryComponent(userId));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'put',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -1741,7 +1741,7 @@ class ProvisioningApiUsersClient {
/// Disable a user
Future<ProvisioningApiUsersDisableUserResponseApplicationJson> disableUser({
required final String userId,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/cloud/users/{userId}/disable';
final queryParameters = <String, dynamic>{};
@ -1763,7 +1763,7 @@ class ProvisioningApiUsersClient {
}
// coverage:ignore-end
path = path.replaceAll('{userId}', Uri.encodeQueryComponent(userId));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'put',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -1782,7 +1782,7 @@ class ProvisioningApiUsersClient {
/// Get a list of groups the user belongs to
Future<ProvisioningApiUsersGetUsersGroupsResponseApplicationJson> getUsersGroups({
required final String userId,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/cloud/users/{userId}/groups';
final queryParameters = <String, dynamic>{};
@ -1804,7 +1804,7 @@ class ProvisioningApiUsersClient {
}
// coverage:ignore-end
path = path.replaceAll('{userId}', Uri.encodeQueryComponent(userId));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -1824,7 +1824,7 @@ class ProvisioningApiUsersClient {
Future<ProvisioningApiUsersAddToGroupResponseApplicationJson> addToGroup({
required final String userId,
final String groupid = '',
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/cloud/users/{userId}/groups';
final queryParameters = <String, dynamic>{};
@ -1849,7 +1849,7 @@ class ProvisioningApiUsersClient {
if (groupid != '') {
queryParameters['groupid'] = groupid;
}
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'post',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -1869,7 +1869,7 @@ class ProvisioningApiUsersClient {
Future<ProvisioningApiUsersRemoveFromGroupResponseApplicationJson> removeFromGroup({
required final String groupid,
required final String userId,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/cloud/users/{userId}/groups';
final queryParameters = <String, dynamic>{};
@ -1892,7 +1892,7 @@ class ProvisioningApiUsersClient {
// coverage:ignore-end
queryParameters['groupid'] = groupid;
path = path.replaceAll('{userId}', Uri.encodeQueryComponent(userId));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'delete',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -1913,7 +1913,7 @@ class ProvisioningApiUsersClient {
/// This endpoint requires admin access
Future<ProvisioningApiUsersGetUserSubAdminGroupsResponseApplicationJson> getUserSubAdminGroups({
required final String userId,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/cloud/users/{userId}/subadmins';
final queryParameters = <String, dynamic>{};
@ -1935,7 +1935,7 @@ class ProvisioningApiUsersClient {
}
// coverage:ignore-end
path = path.replaceAll('{userId}', Uri.encodeQueryComponent(userId));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -1957,7 +1957,7 @@ class ProvisioningApiUsersClient {
Future<ProvisioningApiUsersAddSubAdminResponseApplicationJson> addSubAdmin({
required final String groupid,
required final String userId,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/cloud/users/{userId}/subadmins';
final queryParameters = <String, dynamic>{};
@ -1980,7 +1980,7 @@ class ProvisioningApiUsersClient {
// coverage:ignore-end
queryParameters['groupid'] = groupid;
path = path.replaceAll('{userId}', Uri.encodeQueryComponent(userId));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'post',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -2002,7 +2002,7 @@ class ProvisioningApiUsersClient {
Future<ProvisioningApiUsersRemoveSubAdminResponseApplicationJson> removeSubAdmin({
required final String groupid,
required final String userId,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/cloud/users/{userId}/subadmins';
final queryParameters = <String, dynamic>{};
@ -2025,7 +2025,7 @@ class ProvisioningApiUsersClient {
// coverage:ignore-end
queryParameters['groupid'] = groupid;
path = path.replaceAll('{userId}', Uri.encodeQueryComponent(userId));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'delete',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -2044,7 +2044,7 @@ class ProvisioningApiUsersClient {
/// Resend the welcome message
Future<ProvisioningApiUsersResendWelcomeMessageResponseApplicationJson> resendWelcomeMessage({
required final String userId,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/cloud/users/{userId}/welcome';
final queryParameters = <String, dynamic>{};
@ -2066,7 +2066,7 @@ class ProvisioningApiUsersClient {
}
// coverage:ignore-end
path = path.replaceAll('{userId}', Uri.encodeQueryComponent(userId));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'post',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),

279
packages/nextcloud/lib/src/api/provisioning_api.openapi.json

@ -572,16 +572,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "Installed apps returned",
"content": {
"application/json": {
"schema": {
@ -653,16 +654,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "App info returned",
"content": {
"application/json": {
"schema": {
@ -721,16 +723,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "App enabled successfully",
"content": {
"application/json": {
"schema": {
@ -787,16 +790,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "App disabled successfully",
"content": {
"application/json": {
"schema": {
@ -874,16 +878,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "Groups returned",
"content": {
"application/json": {
"schema": {
@ -962,16 +967,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "Group created successfully",
"content": {
"application/json": {
"schema": {
@ -1049,16 +1055,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "Groups details returned",
"content": {
"application/json": {
"schema": {
@ -1130,10 +1137,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -1260,16 +1268,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "Group users details returned",
"content": {
"application/json": {
"schema": {
@ -1357,16 +1366,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "Sub admins returned",
"content": {
"application/json": {
"schema": {
@ -1431,16 +1441,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "Group users returned",
"content": {
"application/json": {
"schema": {
@ -1529,16 +1540,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "Group updated successfully",
"content": {
"application/json": {
"schema": {
@ -1596,16 +1608,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "Group deleted successfully",
"content": {
"application/json": {
"schema": {
@ -1683,16 +1696,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "Users returned",
"content": {
"application/json": {
"schema": {
@ -1839,10 +1853,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -1946,16 +1961,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "Users details returned",
"content": {
"application/json": {
"schema": {
@ -2061,10 +2077,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -2161,16 +2178,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "User returned",
"content": {
"application/json": {
"schema": {
@ -2246,16 +2264,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "User value edited successfully",
"content": {
"application/json": {
"schema": {
@ -2311,16 +2330,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "User deleted successfully",
"content": {
"application/json": {
"schema": {
@ -2369,16 +2389,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "Current user returned",
"content": {
"application/json": {
"schema": {
@ -2429,16 +2450,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "Editable fields returned",
"content": {
"application/json": {
"schema": {
@ -2501,16 +2523,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "Editable fields for user returned",
"content": {
"application/json": {
"schema": {
@ -2601,16 +2624,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "User values edited successfully",
"content": {
"application/json": {
"schema": {
@ -2668,16 +2692,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "Wiped all user devices successfully",
"content": {
"application/json": {
"schema": {
@ -2735,16 +2760,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "User enabled successfully",
"content": {
"application/json": {
"schema": {
@ -2802,16 +2828,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "User disabled successfully",
"content": {
"application/json": {
"schema": {
@ -2869,16 +2896,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "Users groups returned",
"content": {
"application/json": {
"schema": {
@ -2956,16 +2984,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "User added to group successfully",
"content": {
"application/json": {
"schema": {
@ -3030,16 +3059,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "User removed from group successfully",
"content": {
"application/json": {
"schema": {
@ -3098,16 +3128,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "User subadmin groups returned",
"content": {
"application/json": {
"schema": {
@ -3178,16 +3209,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "User added as group subadmin successfully",
"content": {
"application/json": {
"schema": {
@ -3253,16 +3285,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "User removed as group subadmin successfully",
"content": {
"application/json": {
"schema": {
@ -3320,16 +3353,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "Resent welcome message successfully",
"content": {
"application/json": {
"schema": {
@ -3379,16 +3413,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "Apps returned",
"content": {
"application/json": {
"schema": {
@ -3460,10 +3495,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -3605,10 +3641,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -3744,10 +3781,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -3865,10 +3903,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -3996,10 +4035,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -4098,10 +4138,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -4210,10 +4251,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -4315,10 +4357,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],

2
packages/nextcloud/lib/src/api/settings.openapi.json

@ -41,7 +41,7 @@
],
"responses": {
"200": {
"description": "",
"description": "Logfile returned",
"headers": {
"Content-Disposition": {
"schema": {

20
packages/nextcloud/lib/src/api/theming.openapi.dart

@ -315,7 +315,7 @@ class ThemingUserThemeClient {
final ThemingClient _rootClient;
/// Get the background image
Future<Uint8List> getBackground({final String oCSAPIRequest = 'true'}) async {
Future<Uint8List> getBackground({final bool oCSAPIRequest = true}) async {
const path = '/index.php/apps/theming/background';
final queryParameters = <String, dynamic>{};
final headers = <String, String>{
@ -335,7 +335,7 @@ class ThemingUserThemeClient {
throw Exception('Missing authentication for bearer_auth or basic_auth');
}
// coverage:ignore-end
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -353,7 +353,7 @@ class ThemingUserThemeClient {
required final String type,
final String value = '',
final String? color,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/index.php/apps/theming/background/{type}';
final queryParameters = <String, dynamic>{};
@ -381,7 +381,7 @@ class ThemingUserThemeClient {
if (color != null) {
queryParameters['color'] = color;
}
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'post',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -396,7 +396,7 @@ class ThemingUserThemeClient {
}
/// Delete the background
Future<ThemingBackground> deleteBackground({final String oCSAPIRequest = 'true'}) async {
Future<ThemingBackground> deleteBackground({final bool oCSAPIRequest = true}) async {
const path = '/index.php/apps/theming/background/custom';
final queryParameters = <String, dynamic>{};
final headers = <String, String>{
@ -416,7 +416,7 @@ class ThemingUserThemeClient {
throw Exception('Missing authentication for bearer_auth or basic_auth');
}
// coverage:ignore-end
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'delete',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -433,7 +433,7 @@ class ThemingUserThemeClient {
/// Enable theme
Future<ThemingUserThemeEnableThemeResponseApplicationJson> enableTheme({
required final String themeId,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/apps/theming/api/v1/theme/{themeId}/enable';
final queryParameters = <String, dynamic>{};
@ -455,7 +455,7 @@ class ThemingUserThemeClient {
}
// coverage:ignore-end
path = path.replaceAll('{themeId}', Uri.encodeQueryComponent(themeId));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'put',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -474,7 +474,7 @@ class ThemingUserThemeClient {
/// Disable theme
Future<ThemingUserThemeDisableThemeResponseApplicationJson> disableTheme({
required final String themeId,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/apps/theming/api/v1/theme/{themeId}';
final queryParameters = <String, dynamic>{};
@ -496,7 +496,7 @@ class ThemingUserThemeClient {
}
// coverage:ignore-end
path = path.replaceAll('{themeId}', Uri.encodeQueryComponent(themeId));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'delete',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),

29
packages/nextcloud/lib/src/api/theming.openapi.json

@ -310,7 +310,7 @@
],
"responses": {
"200": {
"description": "",
"description": "Manifest returned",
"content": {
"application/json": {
"schema": {
@ -595,10 +595,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -673,10 +674,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -749,16 +751,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "Background deleted successfully",
"content": {
"application/json": {
"schema": {
@ -798,10 +801,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -885,10 +889,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],

4
packages/nextcloud/lib/src/api/updatenotification.openapi.dart

@ -83,7 +83,7 @@ class UpdatenotificationApiClient {
Future<UpdatenotificationApiGetAppListResponseApplicationJson> getAppList({
required final String newVersion,
final UpdatenotificationApiGetAppListApiVersion apiVersion = UpdatenotificationApiGetAppListApiVersion.v1,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/apps/updatenotification/api/{apiVersion}/applist/{newVersion}';
final queryParameters = <String, dynamic>{};
@ -106,7 +106,7 @@ class UpdatenotificationApiClient {
// coverage:ignore-end
path = path.replaceAll('{newVersion}', Uri.encodeQueryComponent(newVersion));
path = path.replaceAll('{apiVersion}', Uri.encodeQueryComponent(apiVersion.name));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),

5
packages/nextcloud/lib/src/api/updatenotification.openapi.json

@ -104,10 +104,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],

42
packages/nextcloud/lib/src/api/user_status.openapi.dart

@ -87,7 +87,7 @@ class UserStatusHeartbeatClient {
/// Keep the status alive
Future<UserStatusHeartbeatHeartbeatResponseApplicationJson> heartbeat({
required final String status,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path = '/ocs/v2.php/apps/user_status/api/v1/heartbeat';
final queryParameters = <String, dynamic>{};
@ -109,7 +109,7 @@ class UserStatusHeartbeatClient {
}
// coverage:ignore-end
queryParameters['status'] = status;
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'put',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -132,9 +132,7 @@ class UserStatusPredefinedStatusClient {
final UserStatusClient _rootClient;
/// Get all predefined messages
Future<UserStatusPredefinedStatusFindAllResponseApplicationJson> findAll({
final String oCSAPIRequest = 'true',
}) async {
Future<UserStatusPredefinedStatusFindAllResponseApplicationJson> findAll({final bool oCSAPIRequest = true}) async {
const path = '/ocs/v2.php/apps/user_status/api/v1/predefined_statuses';
final queryParameters = <String, dynamic>{};
final headers = <String, String>{
@ -154,7 +152,7 @@ class UserStatusPredefinedStatusClient {
throw Exception('Missing authentication for bearer_auth or basic_auth');
}
// coverage:ignore-end
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -180,7 +178,7 @@ class UserStatusStatusesClient {
Future<UserStatusStatusesFindAllResponseApplicationJson> findAll({
final int? limit,
final int? offset,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path = '/ocs/v2.php/apps/user_status/api/v1/statuses';
final queryParameters = <String, dynamic>{};
@ -207,7 +205,7 @@ class UserStatusStatusesClient {
if (offset != null) {
queryParameters['offset'] = offset.toString();
}
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -226,7 +224,7 @@ class UserStatusStatusesClient {
/// Find the status of a user
Future<UserStatusStatusesFindResponseApplicationJson> find({
required final String userId,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/apps/user_status/api/v1/statuses/{userId}';
final queryParameters = <String, dynamic>{};
@ -248,7 +246,7 @@ class UserStatusStatusesClient {
}
// coverage:ignore-end
path = path.replaceAll('{userId}', Uri.encodeQueryComponent(userId));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -271,7 +269,7 @@ class UserStatusUserStatusClient {
final UserStatusClient _rootClient;
/// Get the status of the current user
Future<UserStatusUserStatusGetStatusResponseApplicationJson> getStatus({final String oCSAPIRequest = 'true'}) async {
Future<UserStatusUserStatusGetStatusResponseApplicationJson> getStatus({final bool oCSAPIRequest = true}) async {
const path = '/ocs/v2.php/apps/user_status/api/v1/user_status';
final queryParameters = <String, dynamic>{};
final headers = <String, String>{
@ -291,7 +289,7 @@ class UserStatusUserStatusClient {
throw Exception('Missing authentication for bearer_auth or basic_auth');
}
// coverage:ignore-end
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -310,7 +308,7 @@ class UserStatusUserStatusClient {
/// Update the status type of the current user
Future<UserStatusUserStatusSetStatusResponseApplicationJson> setStatus({
required final String statusType,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path = '/ocs/v2.php/apps/user_status/api/v1/user_status/status';
final queryParameters = <String, dynamic>{};
@ -332,7 +330,7 @@ class UserStatusUserStatusClient {
}
// coverage:ignore-end
queryParameters['statusType'] = statusType;
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'put',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -352,7 +350,7 @@ class UserStatusUserStatusClient {
Future<UserStatusUserStatusSetPredefinedMessageResponseApplicationJson> setPredefinedMessage({
required final String messageId,
final int? clearAt,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path = '/ocs/v2.php/apps/user_status/api/v1/user_status/message/predefined';
final queryParameters = <String, dynamic>{};
@ -377,7 +375,7 @@ class UserStatusUserStatusClient {
if (clearAt != null) {
queryParameters['clearAt'] = clearAt.toString();
}
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'put',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -398,7 +396,7 @@ class UserStatusUserStatusClient {
final String? statusIcon,
final String? message,
final int? clearAt,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path = '/ocs/v2.php/apps/user_status/api/v1/user_status/message/custom';
final queryParameters = <String, dynamic>{};
@ -428,7 +426,7 @@ class UserStatusUserStatusClient {
if (clearAt != null) {
queryParameters['clearAt'] = clearAt.toString();
}
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'put',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -446,7 +444,7 @@ class UserStatusUserStatusClient {
/// Clear the message of the current user
Future<UserStatusUserStatusClearMessageResponseApplicationJson> clearMessage({
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path = '/ocs/v2.php/apps/user_status/api/v1/user_status/message';
final queryParameters = <String, dynamic>{};
@ -467,7 +465,7 @@ class UserStatusUserStatusClient {
throw Exception('Missing authentication for bearer_auth or basic_auth');
}
// coverage:ignore-end
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'delete',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -486,7 +484,7 @@ class UserStatusUserStatusClient {
/// Revert the status to the previous status
Future<UserStatusUserStatusRevertStatusResponseApplicationJson> revertStatus({
required final String messageId,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
var path = '/ocs/v2.php/apps/user_status/api/v1/user_status/revert/{messageId}';
final queryParameters = <String, dynamic>{};
@ -508,7 +506,7 @@ class UserStatusUserStatusClient {
}
// coverage:ignore-end
path = path.replaceAll('{messageId}', Uri.encodeQueryComponent(messageId));
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'delete',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),

58
packages/nextcloud/lib/src/api/user_status.openapi.json

@ -235,16 +235,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "Statuses returned",
"content": {
"application/json": {
"schema": {
@ -307,16 +308,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "The status was found successfully",
"description": "Status returned",
"content": {
"application/json": {
"schema": {
@ -377,10 +379,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -456,10 +459,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -545,10 +549,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -643,10 +648,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -713,16 +719,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "Message cleared successfully",
"content": {
"application/json": {
"schema": {
@ -780,10 +787,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -845,16 +853,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "Predefined statuses returned",
"content": {
"application/json": {
"schema": {
@ -917,10 +926,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],

28
packages/nextcloud/lib/src/api/weather_status.openapi.dart

@ -80,7 +80,7 @@ class WeatherStatusWeatherStatusClient {
/// Change the weather status mode. There are currently 2 modes: - ask the browser - use the user defined address
Future<WeatherStatusWeatherStatusSetModeResponseApplicationJson> setMode({
required final int mode,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path = '/ocs/v2.php/apps/weather_status/api/v1/mode';
final queryParameters = <String, dynamic>{};
@ -102,7 +102,7 @@ class WeatherStatusWeatherStatusClient {
}
// coverage:ignore-end
queryParameters['mode'] = mode.toString();
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'put',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -120,7 +120,7 @@ class WeatherStatusWeatherStatusClient {
/// Try to use the address set in user personal settings as weather location
Future<WeatherStatusWeatherStatusUsePersonalAddressResponseApplicationJson> usePersonalAddress({
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path = '/ocs/v2.php/apps/weather_status/api/v1/use-personal';
final queryParameters = <String, dynamic>{};
@ -141,7 +141,7 @@ class WeatherStatusWeatherStatusClient {
throw Exception('Missing authentication for bearer_auth or basic_auth');
}
// coverage:ignore-end
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'put',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -159,7 +159,7 @@ class WeatherStatusWeatherStatusClient {
/// Get stored user location
Future<WeatherStatusWeatherStatusGetLocationResponseApplicationJson> getLocation({
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path = '/ocs/v2.php/apps/weather_status/api/v1/location';
final queryParameters = <String, dynamic>{};
@ -180,7 +180,7 @@ class WeatherStatusWeatherStatusClient {
throw Exception('Missing authentication for bearer_auth or basic_auth');
}
// coverage:ignore-end
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -201,7 +201,7 @@ class WeatherStatusWeatherStatusClient {
final String? address,
final num? lat,
final num? lon,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path = '/ocs/v2.php/apps/weather_status/api/v1/location';
final queryParameters = <String, dynamic>{};
@ -231,7 +231,7 @@ class WeatherStatusWeatherStatusClient {
if (lon != null) {
queryParameters['lon'] = lon.toString();
}
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'put',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -249,7 +249,7 @@ class WeatherStatusWeatherStatusClient {
/// Get forecast for current location
Future<WeatherStatusWeatherStatusGetForecastResponseApplicationJson> getForecast({
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path = '/ocs/v2.php/apps/weather_status/api/v1/forecast';
final queryParameters = <String, dynamic>{};
@ -270,7 +270,7 @@ class WeatherStatusWeatherStatusClient {
throw Exception('Missing authentication for bearer_auth or basic_auth');
}
// coverage:ignore-end
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -288,7 +288,7 @@ class WeatherStatusWeatherStatusClient {
/// Get favorites list
Future<WeatherStatusWeatherStatusGetFavoritesResponseApplicationJson> getFavorites({
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path = '/ocs/v2.php/apps/weather_status/api/v1/favorites';
final queryParameters = <String, dynamic>{};
@ -309,7 +309,7 @@ class WeatherStatusWeatherStatusClient {
throw Exception('Missing authentication for bearer_auth or basic_auth');
}
// coverage:ignore-end
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'get',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),
@ -328,7 +328,7 @@ class WeatherStatusWeatherStatusClient {
/// Set favorites list
Future<WeatherStatusWeatherStatusSetFavoritesResponseApplicationJson> setFavorites({
required final List<String> favorites,
final String oCSAPIRequest = 'true',
final bool oCSAPIRequest = true,
}) async {
const path = '/ocs/v2.php/apps/weather_status/api/v1/favorites';
final queryParameters = <String, dynamic>{};
@ -350,7 +350,7 @@ class WeatherStatusWeatherStatusClient {
}
// coverage:ignore-end
queryParameters['favorites[]'] = favorites.map((final e) => e);
headers['OCS-APIRequest'] = oCSAPIRequest;
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
final response = await _rootClient.doRequest(
'put',
Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null),

47
packages/nextcloud/lib/src/api/weather_status.openapi.json

@ -340,16 +340,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "Weather status mode updated",
"content": {
"application/json": {
"schema": {
@ -408,16 +409,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "Address updated",
"content": {
"application/json": {
"schema": {
@ -493,16 +495,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "Location returned",
"content": {
"application/json": {
"schema": {
@ -603,16 +606,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "Location updated",
"content": {
"application/json": {
"schema": {
@ -688,10 +692,11 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
@ -789,16 +794,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "Favorites returned",
"content": {
"application/json": {
"schema": {
@ -862,16 +868,17 @@
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "string",
"default": "true"
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "",
"description": "Favorites updated",
"content": {
"application/json": {
"schema": {

Loading…
Cancel
Save