Browse Source

fix(nextcloud): Fix provisioning_api quota fields

Signed-off-by: jld3103 <jld3103yt@gmail.com>
pull/999/head
jld3103 1 year ago
parent
commit
5385d3d920
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 2
      external/nextcloud-server
  2. 18
      packages/neon/neon/lib/src/pages/account_settings.dart
  3. 608
      packages/nextcloud/lib/src/api/provisioning_api.openapi.dart
  4. 5811
      packages/nextcloud/lib/src/api/provisioning_api.openapi.g.dart
  5. 139
      packages/nextcloud/lib/src/api/provisioning_api.openapi.json

2
external/nextcloud-server vendored

@ -1 +1 @@
Subproject commit c88b02abff69ff25262b1760bc0beacca23c61ac Subproject commit 06b35808a89bd844f8101527a1654f2d06cc6ae3

18
packages/neon/neon/lib/src/pages/account_settings.dart

@ -79,7 +79,12 @@ class AccountSettingsPage extends StatelessWidget {
final body = ResultBuilder<provisioning_api.UserDetails>.behaviorSubject( final body = ResultBuilder<provisioning_api.UserDetails>.behaviorSubject(
stream: userDetailsBloc.userDetails, stream: userDetailsBloc.userDetails,
builder: (final context, final userDetails) => SettingsList( builder: (final context, final userDetails) {
final quotaRelative = userDetails.data?.quota.relative?.$int ?? userDetails.data?.quota.relative?.$num ?? 0;
final quotaTotal = userDetails.data?.quota.total?.$int ?? userDetails.data?.quota.total?.$num ?? 0;
final quotaUsed = userDetails.data?.quota.used?.$int ?? userDetails.data?.quota.used?.$num ?? 0;
return SettingsList(
categories: [ categories: [
SettingsCategory( SettingsCategory(
title: Text(NeonLocalizations.of(context).accountOptionsCategoryStorageInfo), title: Text(NeonLocalizations.of(context).accountOptionsCategoryStorageInfo),
@ -90,7 +95,7 @@ class AccountSettingsPage extends StatelessWidget {
children: [ children: [
if (userDetails.hasData) ...[ if (userDetails.hasData) ...[
LinearProgressIndicator( LinearProgressIndicator(
value: (userDetails.requireData.quota.relative ?? 0) / 100, value: quotaRelative / 100,
backgroundColor: Theme.of(context).colorScheme.primary.withOpacity(0.3), backgroundColor: Theme.of(context).colorScheme.primary.withOpacity(0.3),
), ),
const SizedBox( const SizedBox(
@ -98,9 +103,9 @@ class AccountSettingsPage extends StatelessWidget {
), ),
Text( Text(
NeonLocalizations.of(context).accountOptionsQuotaUsedOf( NeonLocalizations.of(context).accountOptionsQuotaUsedOf(
filesize(userDetails.requireData.quota.used ?? 0, 1), filesize(quotaUsed, 1),
filesize(userDetails.requireData.quota.total ?? 0, 1), filesize(quotaTotal, 1),
(userDetails.requireData.quota.relative ?? 0).toString(), quotaRelative.toString(),
), ),
), ),
], ],
@ -125,7 +130,8 @@ class AccountSettingsPage extends StatelessWidget {
], ],
), ),
], ],
), );
},
); );
return Scaffold( return Scaffold(

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

@ -2621,6 +2621,105 @@ class UsersClient {
); );
} }
/// Get the list of disabled users and their details.
///
/// Returns a [Future] containing a [DynamiteResponse] with the status code, deserialized body and headers.
/// Throws a [DynamiteApiException] if the API call does not return an expected status code.
///
/// Parameters:
/// * [limit] Limit the amount of users returned.
/// * [offset] Offset. Defaults to `0`.
/// * [oCSAPIRequest] Required to be true for the API request to pass. Defaults to `true`.
///
/// Status codes:
/// * 200: Disabled users details returned
///
/// See:
/// * [getDisabledUsersDetailsRaw] for an experimental operation that returns a [DynamiteRawResponse] that can be serialized.
Future<DynamiteResponse<UsersGetDisabledUsersDetailsResponseApplicationJson, void>> getDisabledUsersDetails({
final int? limit,
final int offset = 0,
final bool oCSAPIRequest = true,
}) async {
final rawResponse = getDisabledUsersDetailsRaw(
limit: limit,
offset: offset,
oCSAPIRequest: oCSAPIRequest,
);
return rawResponse.future;
}
/// Get the list of disabled users and their details.
///
/// This method and the response it returns is experimental. The API might change without a major version bump.
///
/// Returns a [Future] containing a [DynamiteRawResponse] with the raw [HttpClientResponse] and serialization helpers.
/// Throws a [DynamiteApiException] if the API call does not return an expected status code.
///
/// Parameters:
/// * [limit] Limit the amount of users returned.
/// * [offset] Offset. Defaults to `0`.
/// * [oCSAPIRequest] Required to be true for the API request to pass. Defaults to `true`.
///
/// Status codes:
/// * 200: Disabled users details returned
///
/// See:
/// * [getDisabledUsersDetails] for an operation that returns a [DynamiteResponse] with a stable API.
@experimental
DynamiteRawResponse<UsersGetDisabledUsersDetailsResponseApplicationJson, void> getDisabledUsersDetailsRaw({
final int? limit,
final int offset = 0,
final bool oCSAPIRequest = true,
}) {
final queryParameters = <String, dynamic>{};
final headers = <String, String>{
'Accept': 'application/json',
};
Uint8List? body;
// coverage:ignore-start
final authentication = _rootClient.authentications.firstWhereOrNull(
(final auth) => switch (auth) {
DynamiteHttpBearerAuthentication() || DynamiteHttpBasicAuthentication() => true,
_ => false,
},
);
if (authentication != null) {
headers.addAll(
authentication.headers,
);
} else {
throw Exception('Missing authentication for bearer_auth or basic_auth');
}
// coverage:ignore-end
if (limit != null) {
queryParameters['limit'] = limit.toString();
}
if (offset != 0) {
queryParameters['offset'] = offset.toString();
}
headers['OCS-APIRequest'] = oCSAPIRequest.toString();
const path = '/ocs/v2.php/cloud/users/disabled';
final uri = Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null);
return DynamiteRawResponse<UsersGetDisabledUsersDetailsResponseApplicationJson, void>(
response: _rootClient.executeRequest(
'get',
uri,
headers,
body,
const {200},
),
bodyType: const FullType(UsersGetDisabledUsersDetailsResponseApplicationJson),
headersType: null,
serializers: _jsonSerializers,
);
}
/// Search users by their phone numbers. /// Search users by their phone numbers.
/// ///
/// Returns a [Future] containing a [DynamiteResponse] with the status code, deserialized body and headers. /// Returns a [Future] containing a [DynamiteResponse] with the status code, deserialized body and headers.
@ -5579,6 +5678,68 @@ abstract class UserDetails_BackendCapabilities
static Serializer<UserDetails_BackendCapabilities> get serializer => _$userDetailsBackendCapabilitiesSerializer; static Serializer<UserDetails_BackendCapabilities> get serializer => _$userDetailsBackendCapabilitiesSerializer;
} }
@BuiltValue(instantiable: false)
abstract interface class UserDetailsQuota_FreeInterface {
num? get $num;
int? get $int;
}
abstract class UserDetailsQuota_Free
implements UserDetailsQuota_FreeInterface, Built<UserDetailsQuota_Free, UserDetailsQuota_FreeBuilder> {
factory UserDetailsQuota_Free([final void Function(UserDetailsQuota_FreeBuilder)? b]) = _$UserDetailsQuota_Free;
// coverage:ignore-start
const UserDetailsQuota_Free._();
// coverage:ignore-end
// coverage:ignore-start
factory UserDetailsQuota_Free.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<UserDetailsQuota_Free> get serializer => _$UserDetailsQuota_FreeSerializer();
JsonObject get data;
}
class _$UserDetailsQuota_FreeSerializer implements PrimitiveSerializer<UserDetailsQuota_Free> {
@override
final Iterable<Type> types = const [UserDetailsQuota_Free, _$UserDetailsQuota_Free];
@override
final String wireName = 'UserDetailsQuota_Free';
@override
Object serialize(
final Serializers serializers,
final UserDetailsQuota_Free object, {
final FullType specifiedType = FullType.unspecified,
}) =>
object.data.value;
@override
UserDetailsQuota_Free deserialize(
final Serializers serializers,
final Object data, {
final FullType specifiedType = FullType.unspecified,
}) {
final result = UserDetailsQuota_FreeBuilder()..data = JsonObject(data);
try {
result._$num = _jsonSerializers.deserialize(data, specifiedType: const FullType(num))! as num;
} catch (_) {}
try {
result._$int = _jsonSerializers.deserialize(data, specifiedType: const FullType(int))! as int;
} catch (_) {}
assert([result._$num, result._$int].where((final x) => x != null).isNotEmpty, 'Need oneOf for ${result._data}');
return result.build();
}
}
@BuiltValue(instantiable: false) @BuiltValue(instantiable: false)
abstract interface class UserDetailsQuota_QuotaInterface { abstract interface class UserDetailsQuota_QuotaInterface {
num? get $num; num? get $num;
@ -5648,13 +5809,200 @@ class _$UserDetailsQuota_QuotaSerializer implements PrimitiveSerializer<UserDeta
} }
} }
@BuiltValue(instantiable: false)
abstract interface class UserDetailsQuota_RelativeInterface {
num? get $num;
int? get $int;
}
abstract class UserDetailsQuota_Relative
implements UserDetailsQuota_RelativeInterface, Built<UserDetailsQuota_Relative, UserDetailsQuota_RelativeBuilder> {
factory UserDetailsQuota_Relative([final void Function(UserDetailsQuota_RelativeBuilder)? b]) =
_$UserDetailsQuota_Relative;
// coverage:ignore-start
const UserDetailsQuota_Relative._();
// coverage:ignore-end
// coverage:ignore-start
factory UserDetailsQuota_Relative.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<UserDetailsQuota_Relative> get serializer => _$UserDetailsQuota_RelativeSerializer();
JsonObject get data;
}
class _$UserDetailsQuota_RelativeSerializer implements PrimitiveSerializer<UserDetailsQuota_Relative> {
@override
final Iterable<Type> types = const [UserDetailsQuota_Relative, _$UserDetailsQuota_Relative];
@override
final String wireName = 'UserDetailsQuota_Relative';
@override
Object serialize(
final Serializers serializers,
final UserDetailsQuota_Relative object, {
final FullType specifiedType = FullType.unspecified,
}) =>
object.data.value;
@override
UserDetailsQuota_Relative deserialize(
final Serializers serializers,
final Object data, {
final FullType specifiedType = FullType.unspecified,
}) {
final result = UserDetailsQuota_RelativeBuilder()..data = JsonObject(data);
try {
result._$num = _jsonSerializers.deserialize(data, specifiedType: const FullType(num))! as num;
} catch (_) {}
try {
result._$int = _jsonSerializers.deserialize(data, specifiedType: const FullType(int))! as int;
} catch (_) {}
assert([result._$num, result._$int].where((final x) => x != null).isNotEmpty, 'Need oneOf for ${result._data}');
return result.build();
}
}
@BuiltValue(instantiable: false)
abstract interface class UserDetailsQuota_TotalInterface {
num? get $num;
int? get $int;
}
abstract class UserDetailsQuota_Total
implements UserDetailsQuota_TotalInterface, Built<UserDetailsQuota_Total, UserDetailsQuota_TotalBuilder> {
factory UserDetailsQuota_Total([final void Function(UserDetailsQuota_TotalBuilder)? b]) = _$UserDetailsQuota_Total;
// coverage:ignore-start
const UserDetailsQuota_Total._();
// coverage:ignore-end
// coverage:ignore-start
factory UserDetailsQuota_Total.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<UserDetailsQuota_Total> get serializer => _$UserDetailsQuota_TotalSerializer();
JsonObject get data;
}
class _$UserDetailsQuota_TotalSerializer implements PrimitiveSerializer<UserDetailsQuota_Total> {
@override
final Iterable<Type> types = const [UserDetailsQuota_Total, _$UserDetailsQuota_Total];
@override
final String wireName = 'UserDetailsQuota_Total';
@override
Object serialize(
final Serializers serializers,
final UserDetailsQuota_Total object, {
final FullType specifiedType = FullType.unspecified,
}) =>
object.data.value;
@override
UserDetailsQuota_Total deserialize(
final Serializers serializers,
final Object data, {
final FullType specifiedType = FullType.unspecified,
}) {
final result = UserDetailsQuota_TotalBuilder()..data = JsonObject(data);
try {
result._$num = _jsonSerializers.deserialize(data, specifiedType: const FullType(num))! as num;
} catch (_) {}
try {
result._$int = _jsonSerializers.deserialize(data, specifiedType: const FullType(int))! as int;
} catch (_) {}
assert([result._$num, result._$int].where((final x) => x != null).isNotEmpty, 'Need oneOf for ${result._data}');
return result.build();
}
}
@BuiltValue(instantiable: false)
abstract interface class UserDetailsQuota_UsedInterface {
num? get $num;
int? get $int;
}
abstract class UserDetailsQuota_Used
implements UserDetailsQuota_UsedInterface, Built<UserDetailsQuota_Used, UserDetailsQuota_UsedBuilder> {
factory UserDetailsQuota_Used([final void Function(UserDetailsQuota_UsedBuilder)? b]) = _$UserDetailsQuota_Used;
// coverage:ignore-start
const UserDetailsQuota_Used._();
// coverage:ignore-end
// coverage:ignore-start
factory UserDetailsQuota_Used.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<UserDetailsQuota_Used> get serializer => _$UserDetailsQuota_UsedSerializer();
JsonObject get data;
}
class _$UserDetailsQuota_UsedSerializer implements PrimitiveSerializer<UserDetailsQuota_Used> {
@override
final Iterable<Type> types = const [UserDetailsQuota_Used, _$UserDetailsQuota_Used];
@override
final String wireName = 'UserDetailsQuota_Used';
@override
Object serialize(
final Serializers serializers,
final UserDetailsQuota_Used object, {
final FullType specifiedType = FullType.unspecified,
}) =>
object.data.value;
@override
UserDetailsQuota_Used deserialize(
final Serializers serializers,
final Object data, {
final FullType specifiedType = FullType.unspecified,
}) {
final result = UserDetailsQuota_UsedBuilder()..data = JsonObject(data);
try {
result._$num = _jsonSerializers.deserialize(data, specifiedType: const FullType(num))! as num;
} catch (_) {}
try {
result._$int = _jsonSerializers.deserialize(data, specifiedType: const FullType(int))! as int;
} catch (_) {}
assert([result._$num, result._$int].where((final x) => x != null).isNotEmpty, 'Need oneOf for ${result._data}');
return result.build();
}
}
@BuiltValue(instantiable: false) @BuiltValue(instantiable: false)
abstract interface class UserDetailsQuotaInterface { abstract interface class UserDetailsQuotaInterface {
num? get free; UserDetailsQuota_Free? get free;
UserDetailsQuota_Quota? get quota; UserDetailsQuota_Quota? get quota;
num? get relative; UserDetailsQuota_Relative? get relative;
num? get total; UserDetailsQuota_Total? get total;
num? get used; UserDetailsQuota_Used? get used;
} }
abstract class UserDetailsQuota implements UserDetailsQuotaInterface, Built<UserDetailsQuota, UserDetailsQuotaBuilder> { abstract class UserDetailsQuota implements UserDetailsQuotaInterface, Built<UserDetailsQuota, UserDetailsQuotaBuilder> {
@ -6866,6 +7214,218 @@ abstract class UsersGetUsersDetailsResponseApplicationJson
_$usersGetUsersDetailsResponseApplicationJsonSerializer; _$usersGetUsersDetailsResponseApplicationJsonSerializer;
} }
@BuiltValue(instantiable: false)
abstract interface class UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users1Interface {
String get id;
}
abstract class UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users1
implements
UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users1Interface,
Built<UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users1,
UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users1Builder> {
factory UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users1([
final void Function(UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users1Builder)? b,
]) = _$UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users1;
// coverage:ignore-start
const UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users1._();
// coverage:ignore-end
// coverage:ignore-start
factory UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users1.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
static Serializer<UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users1> get serializer =>
_$usersGetDisabledUsersDetailsResponseApplicationJsonOcsDataUsers1Serializer;
}
@BuiltValue(instantiable: false)
abstract interface class UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_UsersInterface {
UserDetails? get userDetails;
UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users1?
get usersGetDisabledUsersDetailsResponseApplicationJsonOcsDataUsers1;
}
abstract class UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users
implements
UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_UsersInterface,
Built<UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users,
UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_UsersBuilder> {
factory UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users([
final void Function(UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_UsersBuilder)? b,
]) = _$UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users;
// coverage:ignore-start
const UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users._();
// coverage:ignore-end
// coverage:ignore-start
factory UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users.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<UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users> get serializer =>
_$UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_UsersSerializer();
JsonObject get data;
}
class _$UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_UsersSerializer
implements PrimitiveSerializer<UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users> {
@override
final Iterable<Type> types = const [
UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users,
_$UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users,
];
@override
final String wireName = 'UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users';
@override
Object serialize(
final Serializers serializers,
final UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users object, {
final FullType specifiedType = FullType.unspecified,
}) =>
object.data.value;
@override
UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users deserialize(
final Serializers serializers,
final Object data, {
final FullType specifiedType = FullType.unspecified,
}) {
final result = UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_UsersBuilder()..data = JsonObject(data);
try {
result._userDetails =
(_jsonSerializers.deserialize(data, specifiedType: const FullType(UserDetails))! as UserDetails).toBuilder();
} catch (_) {}
try {
result._usersGetDisabledUsersDetailsResponseApplicationJsonOcsDataUsers1 = (_jsonSerializers.deserialize(
data,
specifiedType: const FullType(UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users1),
)! as UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users1)
.toBuilder();
} catch (_) {}
assert(
[result._userDetails, result._usersGetDisabledUsersDetailsResponseApplicationJsonOcsDataUsers1]
.where((final x) => x != null)
.isNotEmpty,
'Need oneOf for ${result._data}',
);
return result.build();
}
}
@BuiltValue(instantiable: false)
abstract interface class UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_DataInterface {
BuiltMap<String, UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users> get users;
}
abstract class UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data
implements
UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_DataInterface,
Built<UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data,
UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_DataBuilder> {
factory UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data([
final void Function(UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_DataBuilder)? b,
]) = _$UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data;
// coverage:ignore-start
const UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data._();
// coverage:ignore-end
// coverage:ignore-start
factory UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data.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
static Serializer<UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data> get serializer =>
_$usersGetDisabledUsersDetailsResponseApplicationJsonOcsDataSerializer;
}
@BuiltValue(instantiable: false)
abstract interface class UsersGetDisabledUsersDetailsResponseApplicationJson_OcsInterface {
OCSMeta get meta;
UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data get data;
}
abstract class UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs
implements
UsersGetDisabledUsersDetailsResponseApplicationJson_OcsInterface,
Built<UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs,
UsersGetDisabledUsersDetailsResponseApplicationJson_OcsBuilder> {
factory UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs([
final void Function(UsersGetDisabledUsersDetailsResponseApplicationJson_OcsBuilder)? b,
]) = _$UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs;
// coverage:ignore-start
const UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs._();
// coverage:ignore-end
// coverage:ignore-start
factory UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs.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
static Serializer<UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs> get serializer =>
_$usersGetDisabledUsersDetailsResponseApplicationJsonOcsSerializer;
}
@BuiltValue(instantiable: false)
abstract interface class UsersGetDisabledUsersDetailsResponseApplicationJsonInterface {
UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs get ocs;
}
abstract class UsersGetDisabledUsersDetailsResponseApplicationJson
implements
UsersGetDisabledUsersDetailsResponseApplicationJsonInterface,
Built<UsersGetDisabledUsersDetailsResponseApplicationJson,
UsersGetDisabledUsersDetailsResponseApplicationJsonBuilder> {
factory UsersGetDisabledUsersDetailsResponseApplicationJson([
final void Function(UsersGetDisabledUsersDetailsResponseApplicationJsonBuilder)? b,
]) = _$UsersGetDisabledUsersDetailsResponseApplicationJson;
// coverage:ignore-start
const UsersGetDisabledUsersDetailsResponseApplicationJson._();
// coverage:ignore-end
// coverage:ignore-start
factory UsersGetDisabledUsersDetailsResponseApplicationJson.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
static Serializer<UsersGetDisabledUsersDetailsResponseApplicationJson> get serializer =>
_$usersGetDisabledUsersDetailsResponseApplicationJsonSerializer;
}
@BuiltValue(instantiable: false) @BuiltValue(instantiable: false)
abstract interface class UsersSearchByPhoneNumbersResponseApplicationJson_OcsInterface { abstract interface class UsersSearchByPhoneNumbersResponseApplicationJson_OcsInterface {
OCSMeta get meta; OCSMeta get meta;
@ -8257,8 +8817,16 @@ final Serializers _serializers = (Serializers().toBuilder()
..add(UserDetails_BackendCapabilities.serializer) ..add(UserDetails_BackendCapabilities.serializer)
..addBuilderFactory(const FullType(UserDetailsQuota), UserDetailsQuota.new) ..addBuilderFactory(const FullType(UserDetailsQuota), UserDetailsQuota.new)
..add(UserDetailsQuota.serializer) ..add(UserDetailsQuota.serializer)
..addBuilderFactory(const FullType(UserDetailsQuota_Free), UserDetailsQuota_Free.new)
..add(UserDetailsQuota_Free.serializer)
..addBuilderFactory(const FullType(UserDetailsQuota_Quota), UserDetailsQuota_Quota.new) ..addBuilderFactory(const FullType(UserDetailsQuota_Quota), UserDetailsQuota_Quota.new)
..add(UserDetailsQuota_Quota.serializer) ..add(UserDetailsQuota_Quota.serializer)
..addBuilderFactory(const FullType(UserDetailsQuota_Relative), UserDetailsQuota_Relative.new)
..add(UserDetailsQuota_Relative.serializer)
..addBuilderFactory(const FullType(UserDetailsQuota_Total), UserDetailsQuota_Total.new)
..add(UserDetailsQuota_Total.serializer)
..addBuilderFactory(const FullType(UserDetailsQuota_Used), UserDetailsQuota_Used.new)
..add(UserDetailsQuota_Used.serializer)
..addBuilderFactory( ..addBuilderFactory(
const FullType(GroupsGetGroupUsersDetailsResponseApplicationJson_Ocs_Data_Users1), const FullType(GroupsGetGroupUsersDetailsResponseApplicationJson_Ocs_Data_Users1),
GroupsGetGroupUsersDetailsResponseApplicationJson_Ocs_Data_Users1.new, GroupsGetGroupUsersDetailsResponseApplicationJson_Ocs_Data_Users1.new,
@ -8426,6 +8994,38 @@ final Serializers _serializers = (Serializers().toBuilder()
), ),
MapBuilder<String, UsersGetUsersDetailsResponseApplicationJson_Ocs_Data_Users>.new, MapBuilder<String, UsersGetUsersDetailsResponseApplicationJson_Ocs_Data_Users>.new,
) )
..addBuilderFactory(
const FullType(UsersGetDisabledUsersDetailsResponseApplicationJson),
UsersGetDisabledUsersDetailsResponseApplicationJson.new,
)
..add(UsersGetDisabledUsersDetailsResponseApplicationJson.serializer)
..addBuilderFactory(
const FullType(UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs),
UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs.new,
)
..add(UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs.serializer)
..addBuilderFactory(
const FullType(UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data),
UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data.new,
)
..add(UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data.serializer)
..addBuilderFactory(
const FullType(UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users),
UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users.new,
)
..add(UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users.serializer)
..addBuilderFactory(
const FullType(UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users1),
UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users1.new,
)
..add(UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users1.serializer)
..addBuilderFactory(
const FullType(
BuiltMap,
[FullType(String), FullType(UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users)],
),
MapBuilder<String, UsersGetDisabledUsersDetailsResponseApplicationJson_Ocs_Data_Users>.new,
)
..addBuilderFactory( ..addBuilderFactory(
const FullType(BuiltMap, [ const FullType(BuiltMap, [
FullType(String), FullType(String),

5811
packages/nextcloud/lib/src/api/provisioning_api.openapi.g.dart

File diff suppressed because it is too large Load Diff

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

@ -508,9 +508,17 @@
"type": "object", "type": "object",
"properties": { "properties": {
"free": { "free": {
"oneOf": [
{
"type": "number", "type": "number",
"format": "float" "format": "float"
}, },
{
"type": "integer",
"format": "int64"
}
]
},
"quota": { "quota": {
"oneOf": [ "oneOf": [
{ {
@ -527,16 +535,40 @@
] ]
}, },
"relative": { "relative": {
"oneOf": [
{
"type": "number", "type": "number",
"format": "float" "format": "float"
}, },
{
"type": "integer",
"format": "int64"
}
]
},
"total": { "total": {
"oneOf": [
{
"type": "number", "type": "number",
"format": "float" "format": "float"
}, },
{
"type": "integer",
"format": "int64"
}
]
},
"used": { "used": {
"oneOf": [
{
"type": "number", "type": "number",
"format": "float" "format": "float"
},
{
"type": "integer",
"format": "int64"
}
]
} }
} }
} }
@ -2029,6 +2061,113 @@
} }
} }
}, },
"/ocs/v2.php/cloud/users/disabled": {
"get": {
"operationId": "users-get-disabled-users-details",
"summary": "Get the list of disabled users and their details",
"tags": [
"users"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "limit",
"in": "query",
"description": "Limit the amount of users returned",
"schema": {
"type": "integer",
"format": "int64",
"nullable": true
}
},
{
"name": "offset",
"in": "query",
"description": "Offset",
"schema": {
"type": "integer",
"format": "int64",
"default": 0
}
},
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "Disabled users details returned",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"type": "object",
"required": [
"users"
],
"properties": {
"users": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"$ref": "#/components/schemas/UserDetails"
},
{
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string"
}
}
}
]
}
}
}
}
}
}
}
}
}
}
}
}
}
},
"/ocs/v2.php/cloud/users/search/by-phone": { "/ocs/v2.php/cloud/users/search/by-phone": {
"post": { "post": {
"operationId": "users-search-by-phone-numbers", "operationId": "users-search-by-phone-numbers",

Loading…
Cancel
Save