Browse Source

fix(nextcloud): Fix dashboard widgets API

Signed-off-by: jld3103 <jld3103yt@gmail.com>
pull/837/head
jld3103 1 year ago
parent
commit
f8396ef109
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 2
      external/nextcloud-server
  2. 247
      packages/nextcloud/lib/src/api/core.openapi.dart
  3. 664
      packages/nextcloud/lib/src/api/core.openapi.g.dart
  4. 109
      packages/nextcloud/lib/src/api/core.openapi.json
  5. 7
      packages/nextcloud/lib/src/api/dashboard.openapi.dart
  6. 17
      packages/nextcloud/lib/src/api/dashboard.openapi.g.dart
  7. 4
      packages/nextcloud/lib/src/api/dashboard.openapi.json

2
external/nextcloud-server vendored

@ -1 +1 @@
Subproject commit 5d20baec01daec7b7aefe7cb17f8db5611dcd176 Subproject commit 3c5d8410fa3d3f4ded01eed8c5cf1718532c174e

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

@ -78,6 +78,7 @@ class CoreClient extends DynamiteClient {
CoreGuestAvatarClient get guestAvatar => CoreGuestAvatarClient(this); CoreGuestAvatarClient get guestAvatar => CoreGuestAvatarClient(this);
CoreHoverCardClient get hoverCard => CoreHoverCardClient(this); CoreHoverCardClient get hoverCard => CoreHoverCardClient(this);
CoreNavigationClient get navigation => CoreNavigationClient(this); CoreNavigationClient get navigation => CoreNavigationClient(this);
CoreOcmClient get ocm => CoreOcmClient(this);
CoreOcsClient get ocs => CoreOcsClient(this); CoreOcsClient get ocs => CoreOcsClient(this);
CorePreviewClient get preview => CorePreviewClient(this); CorePreviewClient get preview => CorePreviewClient(this);
CoreProfileApiClient get profileApi => CoreProfileApiClient(this); CoreProfileApiClient get profileApi => CoreProfileApiClient(this);
@ -998,6 +999,53 @@ class CoreNavigationClient {
} }
} }
/// Controller about the endpoint /ocm-provider/
class CoreOcmClient {
CoreOcmClient(this._rootClient);
final CoreClient _rootClient;
/// generate a OCMProvider with local data and send it as DataResponse. This replaces the old PHP file ocm-provider/index.php
Future<CoreResponse<CoreOcmDiscoveryResponseApplicationJson, CoreOcmOcmDiscoveryHeaders>> discovery() async {
const path = '/index.php/ocm-provider';
final queryParameters = <String, dynamic>{};
final headers = <String, String>{
'Accept': 'application/json',
};
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 CoreResponse<CoreOcmDiscoveryResponseApplicationJson, CoreOcmOcmDiscoveryHeaders>(
_jsonSerializers.deserialize(
await response.jsonBody,
specifiedType: const FullType(CoreOcmDiscoveryResponseApplicationJson),
)! as CoreOcmDiscoveryResponseApplicationJson,
_jsonSerializers.deserialize(
response.responseHeaders,
specifiedType: const FullType(CoreOcmOcmDiscoveryHeaders),
)! as CoreOcmOcmDiscoveryHeaders,
);
}
throw await CoreApiException.fromResponse(response); // coverage:ignore-line
}
}
class CoreOcsClient { class CoreOcsClient {
CoreOcsClient(this._rootClient); CoreOcsClient(this._rootClient);
@ -3664,6 +3712,182 @@ abstract class CoreNavigationGetSettingsNavigationResponseApplicationJson
_$coreNavigationGetSettingsNavigationResponseApplicationJsonSerializer; _$coreNavigationGetSettingsNavigationResponseApplicationJsonSerializer;
} }
@BuiltValue(instantiable: false)
abstract interface class CoreOcmOcmDiscoveryHeadersInterface {
@BuiltValueField(wireName: 'x-nextcloud-ocm-providers')
bool? get xNextcloudOcmProviders;
CoreOcmOcmDiscoveryHeadersInterface rebuild(final void Function(CoreOcmOcmDiscoveryHeadersInterfaceBuilder) updates);
CoreOcmOcmDiscoveryHeadersInterfaceBuilder toBuilder();
}
abstract class CoreOcmOcmDiscoveryHeaders
implements
CoreOcmOcmDiscoveryHeadersInterface,
Built<CoreOcmOcmDiscoveryHeaders, CoreOcmOcmDiscoveryHeadersBuilder> {
factory CoreOcmOcmDiscoveryHeaders([final void Function(CoreOcmOcmDiscoveryHeadersBuilder)? b]) =
_$CoreOcmOcmDiscoveryHeaders;
// coverage:ignore-start
const CoreOcmOcmDiscoveryHeaders._();
// coverage:ignore-end
// coverage:ignore-start
factory CoreOcmOcmDiscoveryHeaders.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<CoreOcmOcmDiscoveryHeaders> get serializer => _$CoreOcmOcmDiscoveryHeadersSerializer();
}
class _$CoreOcmOcmDiscoveryHeadersSerializer implements StructuredSerializer<CoreOcmOcmDiscoveryHeaders> {
@override
final Iterable<Type> types = const [CoreOcmOcmDiscoveryHeaders, _$CoreOcmOcmDiscoveryHeaders];
@override
final String wireName = 'CoreOcmOcmDiscoveryHeaders';
@override
Iterable<Object?> serialize(
final Serializers serializers,
final CoreOcmOcmDiscoveryHeaders object, {
final FullType specifiedType = FullType.unspecified,
}) {
throw UnimplementedError();
}
@override
CoreOcmOcmDiscoveryHeaders deserialize(
final Serializers serializers,
final Iterable<Object?> serialized, {
final FullType specifiedType = FullType.unspecified,
}) {
final result = CoreOcmOcmDiscoveryHeadersBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final value = iterator.current! as String;
switch (key) {
case 'x-nextcloud-ocm-providers':
result.xNextcloudOcmProviders = (value == 'true');
}
}
return result.build();
}
}
@BuiltValue(instantiable: false)
abstract interface class CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_ProtocolsInterface {
String get webdav;
CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_ProtocolsInterface rebuild(
final void Function(CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_ProtocolsInterfaceBuilder) updates,
);
CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_ProtocolsInterfaceBuilder toBuilder();
}
abstract class CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_Protocols
implements
CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_ProtocolsInterface,
Built<CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_Protocols,
CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_ProtocolsBuilder> {
factory CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_Protocols([
final void Function(CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_ProtocolsBuilder)? b,
]) = _$CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_Protocols;
// coverage:ignore-start
const CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_Protocols._();
// coverage:ignore-end
// coverage:ignore-start
factory CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_Protocols.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<CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_Protocols> get serializer =>
_$coreOcmDiscoveryResponseApplicationJsonResourceTypesProtocolsSerializer;
}
@BuiltValue(instantiable: false)
abstract interface class CoreOcmDiscoveryResponseApplicationJson_ResourceTypesInterface {
String get name;
BuiltList<String> get shareTypes;
CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_Protocols get protocols;
CoreOcmDiscoveryResponseApplicationJson_ResourceTypesInterface rebuild(
final void Function(CoreOcmDiscoveryResponseApplicationJson_ResourceTypesInterfaceBuilder) updates,
);
CoreOcmDiscoveryResponseApplicationJson_ResourceTypesInterfaceBuilder toBuilder();
}
abstract class CoreOcmDiscoveryResponseApplicationJson_ResourceTypes
implements
CoreOcmDiscoveryResponseApplicationJson_ResourceTypesInterface,
Built<CoreOcmDiscoveryResponseApplicationJson_ResourceTypes,
CoreOcmDiscoveryResponseApplicationJson_ResourceTypesBuilder> {
factory CoreOcmDiscoveryResponseApplicationJson_ResourceTypes([
final void Function(CoreOcmDiscoveryResponseApplicationJson_ResourceTypesBuilder)? b,
]) = _$CoreOcmDiscoveryResponseApplicationJson_ResourceTypes;
// coverage:ignore-start
const CoreOcmDiscoveryResponseApplicationJson_ResourceTypes._();
// coverage:ignore-end
// coverage:ignore-start
factory CoreOcmDiscoveryResponseApplicationJson_ResourceTypes.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<CoreOcmDiscoveryResponseApplicationJson_ResourceTypes> get serializer =>
_$coreOcmDiscoveryResponseApplicationJsonResourceTypesSerializer;
}
@BuiltValue(instantiable: false)
abstract interface class CoreOcmDiscoveryResponseApplicationJsonInterface {
bool get enabled;
String get apiVersion;
String get endPoint;
BuiltList<CoreOcmDiscoveryResponseApplicationJson_ResourceTypes> get resourceTypes;
CoreOcmDiscoveryResponseApplicationJsonInterface rebuild(
final void Function(CoreOcmDiscoveryResponseApplicationJsonInterfaceBuilder) updates,
);
CoreOcmDiscoveryResponseApplicationJsonInterfaceBuilder toBuilder();
}
abstract class CoreOcmDiscoveryResponseApplicationJson
implements
CoreOcmDiscoveryResponseApplicationJsonInterface,
Built<CoreOcmDiscoveryResponseApplicationJson, CoreOcmDiscoveryResponseApplicationJsonBuilder> {
factory CoreOcmDiscoveryResponseApplicationJson([
final void Function(CoreOcmDiscoveryResponseApplicationJsonBuilder)? b,
]) = _$CoreOcmDiscoveryResponseApplicationJson;
// coverage:ignore-start
const CoreOcmDiscoveryResponseApplicationJson._();
// coverage:ignore-end
// coverage:ignore-start
factory CoreOcmDiscoveryResponseApplicationJson.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<CoreOcmDiscoveryResponseApplicationJson> get serializer =>
_$coreOcmDiscoveryResponseApplicationJsonSerializer;
}
@BuiltValue(instantiable: false) @BuiltValue(instantiable: false)
abstract interface class CoreOcsGetCapabilitiesResponseApplicationJson_Ocs_Data_VersionInterface { abstract interface class CoreOcsGetCapabilitiesResponseApplicationJson_Ocs_Data_VersionInterface {
int get major; int get major;
@ -7734,6 +7958,28 @@ final Serializers _serializers = (Serializers().toBuilder()
CoreNavigationGetSettingsNavigationResponseApplicationJson_Ocs.new, CoreNavigationGetSettingsNavigationResponseApplicationJson_Ocs.new,
) )
..add(CoreNavigationGetSettingsNavigationResponseApplicationJson_Ocs.serializer) ..add(CoreNavigationGetSettingsNavigationResponseApplicationJson_Ocs.serializer)
..addBuilderFactory(const FullType(CoreOcmOcmDiscoveryHeaders), CoreOcmOcmDiscoveryHeaders.new)
..add(CoreOcmOcmDiscoveryHeaders.serializer)
..addBuilderFactory(
const FullType(CoreOcmDiscoveryResponseApplicationJson),
CoreOcmDiscoveryResponseApplicationJson.new,
)
..add(CoreOcmDiscoveryResponseApplicationJson.serializer)
..addBuilderFactory(
const FullType(CoreOcmDiscoveryResponseApplicationJson_ResourceTypes),
CoreOcmDiscoveryResponseApplicationJson_ResourceTypes.new,
)
..add(CoreOcmDiscoveryResponseApplicationJson_ResourceTypes.serializer)
..addBuilderFactory(const FullType(BuiltList, [FullType(String)]), ListBuilder<String>.new)
..addBuilderFactory(
const FullType(CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_Protocols),
CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_Protocols.new,
)
..add(CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_Protocols.serializer)
..addBuilderFactory(
const FullType(BuiltList, [FullType(CoreOcmDiscoveryResponseApplicationJson_ResourceTypes)]),
ListBuilder<CoreOcmDiscoveryResponseApplicationJson_ResourceTypes>.new,
)
..addBuilderFactory( ..addBuilderFactory(
const FullType(CoreOcsGetCapabilitiesResponseApplicationJson), const FullType(CoreOcsGetCapabilitiesResponseApplicationJson),
CoreOcsGetCapabilitiesResponseApplicationJson.new, CoreOcsGetCapabilitiesResponseApplicationJson.new,
@ -7861,7 +8107,6 @@ final Serializers _serializers = (Serializers().toBuilder()
..add(CoreNotesCapabilities.serializer) ..add(CoreNotesCapabilities.serializer)
..addBuilderFactory(const FullType(CoreNotesCapabilities_Notes), CoreNotesCapabilities_Notes.new) ..addBuilderFactory(const FullType(CoreNotesCapabilities_Notes), CoreNotesCapabilities_Notes.new)
..add(CoreNotesCapabilities_Notes.serializer) ..add(CoreNotesCapabilities_Notes.serializer)
..addBuilderFactory(const FullType(BuiltList, [FullType(String)]), ListBuilder<String>.new)
..addBuilderFactory(const FullType(CoreNotificationsCapabilities), CoreNotificationsCapabilities.new) ..addBuilderFactory(const FullType(CoreNotificationsCapabilities), CoreNotificationsCapabilities.new)
..add(CoreNotificationsCapabilities.serializer) ..add(CoreNotificationsCapabilities.serializer)
..addBuilderFactory( ..addBuilderFactory(

664
packages/nextcloud/lib/src/api/core.openapi.g.dart

@ -107,6 +107,14 @@ Serializer<CoreNavigationGetSettingsNavigationResponseApplicationJson_Ocs>
Serializer<CoreNavigationGetSettingsNavigationResponseApplicationJson> Serializer<CoreNavigationGetSettingsNavigationResponseApplicationJson>
_$coreNavigationGetSettingsNavigationResponseApplicationJsonSerializer = _$coreNavigationGetSettingsNavigationResponseApplicationJsonSerializer =
_$CoreNavigationGetSettingsNavigationResponseApplicationJsonSerializer(); _$CoreNavigationGetSettingsNavigationResponseApplicationJsonSerializer();
Serializer<CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_Protocols>
_$coreOcmDiscoveryResponseApplicationJsonResourceTypesProtocolsSerializer =
_$CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_ProtocolsSerializer();
Serializer<CoreOcmDiscoveryResponseApplicationJson_ResourceTypes>
_$coreOcmDiscoveryResponseApplicationJsonResourceTypesSerializer =
_$CoreOcmDiscoveryResponseApplicationJson_ResourceTypesSerializer();
Serializer<CoreOcmDiscoveryResponseApplicationJson> _$coreOcmDiscoveryResponseApplicationJsonSerializer =
_$CoreOcmDiscoveryResponseApplicationJsonSerializer();
Serializer<CoreOcsGetCapabilitiesResponseApplicationJson_Ocs_Data_Version> Serializer<CoreOcsGetCapabilitiesResponseApplicationJson_Ocs_Data_Version>
_$coreOcsGetCapabilitiesResponseApplicationJsonOcsDataVersionSerializer = _$coreOcsGetCapabilitiesResponseApplicationJsonOcsDataVersionSerializer =
_$CoreOcsGetCapabilitiesResponseApplicationJson_Ocs_Data_VersionSerializer(); _$CoreOcsGetCapabilitiesResponseApplicationJson_Ocs_Data_VersionSerializer();
@ -2523,6 +2531,168 @@ class _$CoreNavigationGetSettingsNavigationResponseApplicationJsonSerializer
} }
} }
class _$CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_ProtocolsSerializer
implements StructuredSerializer<CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_Protocols> {
@override
final Iterable<Type> types = const [
CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_Protocols,
_$CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_Protocols
];
@override
final String wireName = 'CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_Protocols';
@override
Iterable<Object?> serialize(
Serializers serializers, CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_Protocols object,
{FullType specifiedType = FullType.unspecified}) {
final result = <Object?>[
'webdav',
serializers.serialize(object.webdav, specifiedType: const FullType(String)),
];
return result;
}
@override
CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_Protocols deserialize(
Serializers serializers, Iterable<Object?> serialized,
{FullType specifiedType = FullType.unspecified}) {
final result = CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_ProtocolsBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final Object? value = iterator.current;
switch (key) {
case 'webdav':
result.webdav = serializers.deserialize(value, specifiedType: const FullType(String))! as String;
break;
}
}
return result.build();
}
}
class _$CoreOcmDiscoveryResponseApplicationJson_ResourceTypesSerializer
implements StructuredSerializer<CoreOcmDiscoveryResponseApplicationJson_ResourceTypes> {
@override
final Iterable<Type> types = const [
CoreOcmDiscoveryResponseApplicationJson_ResourceTypes,
_$CoreOcmDiscoveryResponseApplicationJson_ResourceTypes
];
@override
final String wireName = 'CoreOcmDiscoveryResponseApplicationJson_ResourceTypes';
@override
Iterable<Object?> serialize(Serializers serializers, CoreOcmDiscoveryResponseApplicationJson_ResourceTypes object,
{FullType specifiedType = FullType.unspecified}) {
final result = <Object?>[
'name',
serializers.serialize(object.name, specifiedType: const FullType(String)),
'shareTypes',
serializers.serialize(object.shareTypes, specifiedType: const FullType(BuiltList, [FullType(String)])),
'protocols',
serializers.serialize(object.protocols,
specifiedType: const FullType(CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_Protocols)),
];
return result;
}
@override
CoreOcmDiscoveryResponseApplicationJson_ResourceTypes deserialize(
Serializers serializers, Iterable<Object?> serialized,
{FullType specifiedType = FullType.unspecified}) {
final result = CoreOcmDiscoveryResponseApplicationJson_ResourceTypesBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final Object? value = iterator.current;
switch (key) {
case 'name':
result.name = serializers.deserialize(value, specifiedType: const FullType(String))! as String;
break;
case 'shareTypes':
result.shareTypes.replace(serializers.deserialize(value,
specifiedType: const FullType(BuiltList, [FullType(String)]))! as BuiltList<Object?>);
break;
case 'protocols':
result.protocols.replace(serializers.deserialize(value,
specifiedType: const FullType(CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_Protocols))!
as CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_Protocols);
break;
}
}
return result.build();
}
}
class _$CoreOcmDiscoveryResponseApplicationJsonSerializer
implements StructuredSerializer<CoreOcmDiscoveryResponseApplicationJson> {
@override
final Iterable<Type> types = const [
CoreOcmDiscoveryResponseApplicationJson,
_$CoreOcmDiscoveryResponseApplicationJson
];
@override
final String wireName = 'CoreOcmDiscoveryResponseApplicationJson';
@override
Iterable<Object?> serialize(Serializers serializers, CoreOcmDiscoveryResponseApplicationJson object,
{FullType specifiedType = FullType.unspecified}) {
final result = <Object?>[
'enabled',
serializers.serialize(object.enabled, specifiedType: const FullType(bool)),
'apiVersion',
serializers.serialize(object.apiVersion, specifiedType: const FullType(String)),
'endPoint',
serializers.serialize(object.endPoint, specifiedType: const FullType(String)),
'resourceTypes',
serializers.serialize(object.resourceTypes,
specifiedType: const FullType(BuiltList, [FullType(CoreOcmDiscoveryResponseApplicationJson_ResourceTypes)])),
];
return result;
}
@override
CoreOcmDiscoveryResponseApplicationJson deserialize(Serializers serializers, Iterable<Object?> serialized,
{FullType specifiedType = FullType.unspecified}) {
final result = CoreOcmDiscoveryResponseApplicationJsonBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final Object? value = iterator.current;
switch (key) {
case 'enabled':
result.enabled = serializers.deserialize(value, specifiedType: const FullType(bool))! as bool;
break;
case 'apiVersion':
result.apiVersion = serializers.deserialize(value, specifiedType: const FullType(String))! as String;
break;
case 'endPoint':
result.endPoint = serializers.deserialize(value, specifiedType: const FullType(String))! as String;
break;
case 'resourceTypes':
result.resourceTypes.replace(serializers.deserialize(value,
specifiedType:
const FullType(BuiltList, [FullType(CoreOcmDiscoveryResponseApplicationJson_ResourceTypes)]))!
as BuiltList<Object?>);
break;
}
}
return result.build();
}
}
class _$CoreOcsGetCapabilitiesResponseApplicationJson_Ocs_Data_VersionSerializer class _$CoreOcsGetCapabilitiesResponseApplicationJson_Ocs_Data_VersionSerializer
implements StructuredSerializer<CoreOcsGetCapabilitiesResponseApplicationJson_Ocs_Data_Version> { implements StructuredSerializer<CoreOcsGetCapabilitiesResponseApplicationJson_Ocs_Data_Version> {
@override @override
@ -13439,6 +13609,500 @@ class CoreNavigationGetSettingsNavigationResponseApplicationJsonBuilder
} }
} }
abstract mixin class CoreOcmOcmDiscoveryHeadersInterfaceBuilder {
void replace(CoreOcmOcmDiscoveryHeadersInterface other);
void update(void Function(CoreOcmOcmDiscoveryHeadersInterfaceBuilder) updates);
bool? get xNextcloudOcmProviders;
set xNextcloudOcmProviders(bool? xNextcloudOcmProviders);
}
class _$CoreOcmOcmDiscoveryHeaders extends CoreOcmOcmDiscoveryHeaders {
@override
final bool? xNextcloudOcmProviders;
factory _$CoreOcmOcmDiscoveryHeaders([void Function(CoreOcmOcmDiscoveryHeadersBuilder)? updates]) =>
(CoreOcmOcmDiscoveryHeadersBuilder()..update(updates))._build();
_$CoreOcmOcmDiscoveryHeaders._({this.xNextcloudOcmProviders}) : super._();
@override
CoreOcmOcmDiscoveryHeaders rebuild(void Function(CoreOcmOcmDiscoveryHeadersBuilder) updates) =>
(toBuilder()..update(updates)).build();
@override
CoreOcmOcmDiscoveryHeadersBuilder toBuilder() => CoreOcmOcmDiscoveryHeadersBuilder()..replace(this);
@override
bool operator ==(Object other) {
if (identical(other, this)) return true;
return other is CoreOcmOcmDiscoveryHeaders && xNextcloudOcmProviders == other.xNextcloudOcmProviders;
}
@override
int get hashCode {
var _$hash = 0;
_$hash = $jc(_$hash, xNextcloudOcmProviders.hashCode);
_$hash = $jf(_$hash);
return _$hash;
}
@override
String toString() {
return (newBuiltValueToStringHelper(r'CoreOcmOcmDiscoveryHeaders')
..add('xNextcloudOcmProviders', xNextcloudOcmProviders))
.toString();
}
}
class CoreOcmOcmDiscoveryHeadersBuilder
implements
Builder<CoreOcmOcmDiscoveryHeaders, CoreOcmOcmDiscoveryHeadersBuilder>,
CoreOcmOcmDiscoveryHeadersInterfaceBuilder {
_$CoreOcmOcmDiscoveryHeaders? _$v;
bool? _xNextcloudOcmProviders;
bool? get xNextcloudOcmProviders => _$this._xNextcloudOcmProviders;
set xNextcloudOcmProviders(covariant bool? xNextcloudOcmProviders) =>
_$this._xNextcloudOcmProviders = xNextcloudOcmProviders;
CoreOcmOcmDiscoveryHeadersBuilder();
CoreOcmOcmDiscoveryHeadersBuilder get _$this {
final $v = _$v;
if ($v != null) {
_xNextcloudOcmProviders = $v.xNextcloudOcmProviders;
_$v = null;
}
return this;
}
@override
void replace(covariant CoreOcmOcmDiscoveryHeaders other) {
ArgumentError.checkNotNull(other, 'other');
_$v = other as _$CoreOcmOcmDiscoveryHeaders;
}
@override
void update(void Function(CoreOcmOcmDiscoveryHeadersBuilder)? updates) {
if (updates != null) updates(this);
}
@override
CoreOcmOcmDiscoveryHeaders build() => _build();
_$CoreOcmOcmDiscoveryHeaders _build() {
final _$result = _$v ?? _$CoreOcmOcmDiscoveryHeaders._(xNextcloudOcmProviders: xNextcloudOcmProviders);
replace(_$result);
return _$result;
}
}
abstract mixin class CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_ProtocolsInterfaceBuilder {
void replace(CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_ProtocolsInterface other);
void update(void Function(CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_ProtocolsInterfaceBuilder) updates);
String? get webdav;
set webdav(String? webdav);
}
class _$CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_Protocols
extends CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_Protocols {
@override
final String webdav;
factory _$CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_Protocols(
[void Function(CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_ProtocolsBuilder)? updates]) =>
(CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_ProtocolsBuilder()..update(updates))._build();
_$CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_Protocols._({required this.webdav}) : super._() {
BuiltValueNullFieldError.checkNotNull(
webdav, r'CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_Protocols', 'webdav');
}
@override
CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_Protocols rebuild(
void Function(CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_ProtocolsBuilder) updates) =>
(toBuilder()..update(updates)).build();
@override
CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_ProtocolsBuilder toBuilder() =>
CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_ProtocolsBuilder()..replace(this);
@override
bool operator ==(Object other) {
if (identical(other, this)) return true;
return other is CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_Protocols && webdav == other.webdav;
}
@override
int get hashCode {
var _$hash = 0;
_$hash = $jc(_$hash, webdav.hashCode);
_$hash = $jf(_$hash);
return _$hash;
}
@override
String toString() {
return (newBuiltValueToStringHelper(r'CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_Protocols')
..add('webdav', webdav))
.toString();
}
}
class CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_ProtocolsBuilder
implements
Builder<CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_Protocols,
CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_ProtocolsBuilder>,
CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_ProtocolsInterfaceBuilder {
_$CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_Protocols? _$v;
String? _webdav;
String? get webdav => _$this._webdav;
set webdav(covariant String? webdav) => _$this._webdav = webdav;
CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_ProtocolsBuilder();
CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_ProtocolsBuilder get _$this {
final $v = _$v;
if ($v != null) {
_webdav = $v.webdav;
_$v = null;
}
return this;
}
@override
void replace(covariant CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_Protocols other) {
ArgumentError.checkNotNull(other, 'other');
_$v = other as _$CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_Protocols;
}
@override
void update(void Function(CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_ProtocolsBuilder)? updates) {
if (updates != null) updates(this);
}
@override
CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_Protocols build() => _build();
_$CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_Protocols _build() {
final _$result = _$v ??
_$CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_Protocols._(
webdav: BuiltValueNullFieldError.checkNotNull(
webdav, r'CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_Protocols', 'webdav'));
replace(_$result);
return _$result;
}
}
abstract mixin class CoreOcmDiscoveryResponseApplicationJson_ResourceTypesInterfaceBuilder {
void replace(CoreOcmDiscoveryResponseApplicationJson_ResourceTypesInterface other);
void update(void Function(CoreOcmDiscoveryResponseApplicationJson_ResourceTypesInterfaceBuilder) updates);
String? get name;
set name(String? name);
ListBuilder<String> get shareTypes;
set shareTypes(ListBuilder<String>? shareTypes);
CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_ProtocolsBuilder get protocols;
set protocols(CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_ProtocolsBuilder? protocols);
}
class _$CoreOcmDiscoveryResponseApplicationJson_ResourceTypes
extends CoreOcmDiscoveryResponseApplicationJson_ResourceTypes {
@override
final String name;
@override
final BuiltList<String> shareTypes;
@override
final CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_Protocols protocols;
factory _$CoreOcmDiscoveryResponseApplicationJson_ResourceTypes(
[void Function(CoreOcmDiscoveryResponseApplicationJson_ResourceTypesBuilder)? updates]) =>
(CoreOcmDiscoveryResponseApplicationJson_ResourceTypesBuilder()..update(updates))._build();
_$CoreOcmDiscoveryResponseApplicationJson_ResourceTypes._(
{required this.name, required this.shareTypes, required this.protocols})
: super._() {
BuiltValueNullFieldError.checkNotNull(name, r'CoreOcmDiscoveryResponseApplicationJson_ResourceTypes', 'name');
BuiltValueNullFieldError.checkNotNull(
shareTypes, r'CoreOcmDiscoveryResponseApplicationJson_ResourceTypes', 'shareTypes');
BuiltValueNullFieldError.checkNotNull(
protocols, r'CoreOcmDiscoveryResponseApplicationJson_ResourceTypes', 'protocols');
}
@override
CoreOcmDiscoveryResponseApplicationJson_ResourceTypes rebuild(
void Function(CoreOcmDiscoveryResponseApplicationJson_ResourceTypesBuilder) updates) =>
(toBuilder()..update(updates)).build();
@override
CoreOcmDiscoveryResponseApplicationJson_ResourceTypesBuilder toBuilder() =>
CoreOcmDiscoveryResponseApplicationJson_ResourceTypesBuilder()..replace(this);
@override
bool operator ==(Object other) {
if (identical(other, this)) return true;
return other is CoreOcmDiscoveryResponseApplicationJson_ResourceTypes &&
name == other.name &&
shareTypes == other.shareTypes &&
protocols == other.protocols;
}
@override
int get hashCode {
var _$hash = 0;
_$hash = $jc(_$hash, name.hashCode);
_$hash = $jc(_$hash, shareTypes.hashCode);
_$hash = $jc(_$hash, protocols.hashCode);
_$hash = $jf(_$hash);
return _$hash;
}
@override
String toString() {
return (newBuiltValueToStringHelper(r'CoreOcmDiscoveryResponseApplicationJson_ResourceTypes')
..add('name', name)
..add('shareTypes', shareTypes)
..add('protocols', protocols))
.toString();
}
}
class CoreOcmDiscoveryResponseApplicationJson_ResourceTypesBuilder
implements
Builder<CoreOcmDiscoveryResponseApplicationJson_ResourceTypes,
CoreOcmDiscoveryResponseApplicationJson_ResourceTypesBuilder>,
CoreOcmDiscoveryResponseApplicationJson_ResourceTypesInterfaceBuilder {
_$CoreOcmDiscoveryResponseApplicationJson_ResourceTypes? _$v;
String? _name;
String? get name => _$this._name;
set name(covariant String? name) => _$this._name = name;
ListBuilder<String>? _shareTypes;
ListBuilder<String> get shareTypes => _$this._shareTypes ??= ListBuilder<String>();
set shareTypes(covariant ListBuilder<String>? shareTypes) => _$this._shareTypes = shareTypes;
CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_ProtocolsBuilder? _protocols;
CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_ProtocolsBuilder get protocols =>
_$this._protocols ??= CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_ProtocolsBuilder();
set protocols(covariant CoreOcmDiscoveryResponseApplicationJson_ResourceTypes_ProtocolsBuilder? protocols) =>
_$this._protocols = protocols;
CoreOcmDiscoveryResponseApplicationJson_ResourceTypesBuilder();
CoreOcmDiscoveryResponseApplicationJson_ResourceTypesBuilder get _$this {
final $v = _$v;
if ($v != null) {
_name = $v.name;
_shareTypes = $v.shareTypes.toBuilder();
_protocols = $v.protocols.toBuilder();
_$v = null;
}
return this;
}
@override
void replace(covariant CoreOcmDiscoveryResponseApplicationJson_ResourceTypes other) {
ArgumentError.checkNotNull(other, 'other');
_$v = other as _$CoreOcmDiscoveryResponseApplicationJson_ResourceTypes;
}
@override
void update(void Function(CoreOcmDiscoveryResponseApplicationJson_ResourceTypesBuilder)? updates) {
if (updates != null) updates(this);
}
@override
CoreOcmDiscoveryResponseApplicationJson_ResourceTypes build() => _build();
_$CoreOcmDiscoveryResponseApplicationJson_ResourceTypes _build() {
_$CoreOcmDiscoveryResponseApplicationJson_ResourceTypes _$result;
try {
_$result = _$v ??
_$CoreOcmDiscoveryResponseApplicationJson_ResourceTypes._(
name: BuiltValueNullFieldError.checkNotNull(
name, r'CoreOcmDiscoveryResponseApplicationJson_ResourceTypes', 'name'),
shareTypes: shareTypes.build(),
protocols: protocols.build());
} catch (_) {
late String _$failedField;
try {
_$failedField = 'shareTypes';
shareTypes.build();
_$failedField = 'protocols';
protocols.build();
} catch (e) {
throw BuiltValueNestedFieldError(
r'CoreOcmDiscoveryResponseApplicationJson_ResourceTypes', _$failedField, e.toString());
}
rethrow;
}
replace(_$result);
return _$result;
}
}
abstract mixin class CoreOcmDiscoveryResponseApplicationJsonInterfaceBuilder {
void replace(CoreOcmDiscoveryResponseApplicationJsonInterface other);
void update(void Function(CoreOcmDiscoveryResponseApplicationJsonInterfaceBuilder) updates);
bool? get enabled;
set enabled(bool? enabled);
String? get apiVersion;
set apiVersion(String? apiVersion);
String? get endPoint;
set endPoint(String? endPoint);
ListBuilder<CoreOcmDiscoveryResponseApplicationJson_ResourceTypes> get resourceTypes;
set resourceTypes(ListBuilder<CoreOcmDiscoveryResponseApplicationJson_ResourceTypes>? resourceTypes);
}
class _$CoreOcmDiscoveryResponseApplicationJson extends CoreOcmDiscoveryResponseApplicationJson {
@override
final bool enabled;
@override
final String apiVersion;
@override
final String endPoint;
@override
final BuiltList<CoreOcmDiscoveryResponseApplicationJson_ResourceTypes> resourceTypes;
factory _$CoreOcmDiscoveryResponseApplicationJson(
[void Function(CoreOcmDiscoveryResponseApplicationJsonBuilder)? updates]) =>
(CoreOcmDiscoveryResponseApplicationJsonBuilder()..update(updates))._build();
_$CoreOcmDiscoveryResponseApplicationJson._(
{required this.enabled, required this.apiVersion, required this.endPoint, required this.resourceTypes})
: super._() {
BuiltValueNullFieldError.checkNotNull(enabled, r'CoreOcmDiscoveryResponseApplicationJson', 'enabled');
BuiltValueNullFieldError.checkNotNull(apiVersion, r'CoreOcmDiscoveryResponseApplicationJson', 'apiVersion');
BuiltValueNullFieldError.checkNotNull(endPoint, r'CoreOcmDiscoveryResponseApplicationJson', 'endPoint');
BuiltValueNullFieldError.checkNotNull(resourceTypes, r'CoreOcmDiscoveryResponseApplicationJson', 'resourceTypes');
}
@override
CoreOcmDiscoveryResponseApplicationJson rebuild(
void Function(CoreOcmDiscoveryResponseApplicationJsonBuilder) updates) =>
(toBuilder()..update(updates)).build();
@override
CoreOcmDiscoveryResponseApplicationJsonBuilder toBuilder() =>
CoreOcmDiscoveryResponseApplicationJsonBuilder()..replace(this);
@override
bool operator ==(Object other) {
if (identical(other, this)) return true;
return other is CoreOcmDiscoveryResponseApplicationJson &&
enabled == other.enabled &&
apiVersion == other.apiVersion &&
endPoint == other.endPoint &&
resourceTypes == other.resourceTypes;
}
@override
int get hashCode {
var _$hash = 0;
_$hash = $jc(_$hash, enabled.hashCode);
_$hash = $jc(_$hash, apiVersion.hashCode);
_$hash = $jc(_$hash, endPoint.hashCode);
_$hash = $jc(_$hash, resourceTypes.hashCode);
_$hash = $jf(_$hash);
return _$hash;
}
@override
String toString() {
return (newBuiltValueToStringHelper(r'CoreOcmDiscoveryResponseApplicationJson')
..add('enabled', enabled)
..add('apiVersion', apiVersion)
..add('endPoint', endPoint)
..add('resourceTypes', resourceTypes))
.toString();
}
}
class CoreOcmDiscoveryResponseApplicationJsonBuilder
implements
Builder<CoreOcmDiscoveryResponseApplicationJson, CoreOcmDiscoveryResponseApplicationJsonBuilder>,
CoreOcmDiscoveryResponseApplicationJsonInterfaceBuilder {
_$CoreOcmDiscoveryResponseApplicationJson? _$v;
bool? _enabled;
bool? get enabled => _$this._enabled;
set enabled(covariant bool? enabled) => _$this._enabled = enabled;
String? _apiVersion;
String? get apiVersion => _$this._apiVersion;
set apiVersion(covariant String? apiVersion) => _$this._apiVersion = apiVersion;
String? _endPoint;
String? get endPoint => _$this._endPoint;
set endPoint(covariant String? endPoint) => _$this._endPoint = endPoint;
ListBuilder<CoreOcmDiscoveryResponseApplicationJson_ResourceTypes>? _resourceTypes;
ListBuilder<CoreOcmDiscoveryResponseApplicationJson_ResourceTypes> get resourceTypes =>
_$this._resourceTypes ??= ListBuilder<CoreOcmDiscoveryResponseApplicationJson_ResourceTypes>();
set resourceTypes(covariant ListBuilder<CoreOcmDiscoveryResponseApplicationJson_ResourceTypes>? resourceTypes) =>
_$this._resourceTypes = resourceTypes;
CoreOcmDiscoveryResponseApplicationJsonBuilder();
CoreOcmDiscoveryResponseApplicationJsonBuilder get _$this {
final $v = _$v;
if ($v != null) {
_enabled = $v.enabled;
_apiVersion = $v.apiVersion;
_endPoint = $v.endPoint;
_resourceTypes = $v.resourceTypes.toBuilder();
_$v = null;
}
return this;
}
@override
void replace(covariant CoreOcmDiscoveryResponseApplicationJson other) {
ArgumentError.checkNotNull(other, 'other');
_$v = other as _$CoreOcmDiscoveryResponseApplicationJson;
}
@override
void update(void Function(CoreOcmDiscoveryResponseApplicationJsonBuilder)? updates) {
if (updates != null) updates(this);
}
@override
CoreOcmDiscoveryResponseApplicationJson build() => _build();
_$CoreOcmDiscoveryResponseApplicationJson _build() {
_$CoreOcmDiscoveryResponseApplicationJson _$result;
try {
_$result = _$v ??
_$CoreOcmDiscoveryResponseApplicationJson._(
enabled:
BuiltValueNullFieldError.checkNotNull(enabled, r'CoreOcmDiscoveryResponseApplicationJson', 'enabled'),
apiVersion: BuiltValueNullFieldError.checkNotNull(
apiVersion, r'CoreOcmDiscoveryResponseApplicationJson', 'apiVersion'),
endPoint: BuiltValueNullFieldError.checkNotNull(
endPoint, r'CoreOcmDiscoveryResponseApplicationJson', 'endPoint'),
resourceTypes: resourceTypes.build());
} catch (_) {
late String _$failedField;
try {
_$failedField = 'resourceTypes';
resourceTypes.build();
} catch (e) {
throw BuiltValueNestedFieldError(r'CoreOcmDiscoveryResponseApplicationJson', _$failedField, e.toString());
}
rethrow;
}
replace(_$result);
return _$result;
}
}
abstract mixin class CoreOcsGetCapabilitiesResponseApplicationJson_Ocs_Data_VersionInterfaceBuilder { abstract mixin class CoreOcsGetCapabilitiesResponseApplicationJson_Ocs_Data_VersionInterfaceBuilder {
void replace(CoreOcsGetCapabilitiesResponseApplicationJson_Ocs_Data_VersionInterface other); void replace(CoreOcsGetCapabilitiesResponseApplicationJson_Ocs_Data_VersionInterface other);
void update(void Function(CoreOcsGetCapabilitiesResponseApplicationJson_Ocs_Data_VersionInterfaceBuilder) updates); void update(void Function(CoreOcsGetCapabilitiesResponseApplicationJson_Ocs_Data_VersionInterfaceBuilder) updates);

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

@ -1929,6 +1929,111 @@
} }
} }
}, },
"/index.php/ocm-provider": {
"get": {
"operationId": "ocm-discovery",
"summary": "generate a OCMProvider with local data and send it as DataResponse. This replaces the old PHP file ocm-provider/index.php",
"tags": [
"ocm"
],
"security": [
{},
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"responses": {
"200": {
"description": "OCM Provider details returned",
"headers": {
"X-NEXTCLOUD-OCM-PROVIDERS": {
"schema": {
"type": "boolean"
}
}
},
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"enabled",
"apiVersion",
"endPoint",
"resourceTypes"
],
"properties": {
"enabled": {
"type": "boolean"
},
"apiVersion": {
"type": "string"
},
"endPoint": {
"type": "string"
},
"resourceTypes": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"shareTypes",
"protocols"
],
"properties": {
"name": {
"type": "string"
},
"shareTypes": {
"type": "array",
"items": {
"type": "string"
}
},
"protocols": {
"type": "object",
"required": [
"webdav"
],
"properties": {
"webdav": {
"type": "string"
}
}
}
}
}
}
}
}
}
}
},
"500": {
"description": "OCM not supported",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"message"
],
"properties": {
"message": {
"type": "string"
}
}
}
}
}
}
}
}
},
"/ocs/v2.php/cloud/capabilities": { "/ocs/v2.php/cloud/capabilities": {
"get": { "get": {
"operationId": "ocs-get-capabilities", "operationId": "ocs-get-capabilities",
@ -5683,6 +5788,10 @@
{ {
"name": "guest_avatar", "name": "guest_avatar",
"description": "This controller handles guest avatar requests." "description": "This controller handles guest avatar requests."
},
{
"name": "ocm",
"description": "Controller about the endpoint /ocm-provider/"
} }
] ]
} }

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

@ -329,7 +329,7 @@ abstract class DashboardWidget implements DashboardWidgetInterface, Built<Dashbo
@BuiltValue(instantiable: false) @BuiltValue(instantiable: false)
abstract interface class DashboardDashboardApiGetWidgetsResponseApplicationJson_OcsInterface { abstract interface class DashboardDashboardApiGetWidgetsResponseApplicationJson_OcsInterface {
DashboardOCSMeta get meta; DashboardOCSMeta get meta;
BuiltList<DashboardWidget> get data; BuiltMap<String, DashboardWidget> get data;
DashboardDashboardApiGetWidgetsResponseApplicationJson_OcsInterface rebuild( DashboardDashboardApiGetWidgetsResponseApplicationJson_OcsInterface rebuild(
final void Function(DashboardDashboardApiGetWidgetsResponseApplicationJson_OcsInterfaceBuilder) updates, final void Function(DashboardDashboardApiGetWidgetsResponseApplicationJson_OcsInterfaceBuilder) updates,
); );
@ -615,7 +615,10 @@ final Serializers _serializers = (Serializers().toBuilder()
const FullType(BuiltList, [FullType(DashboardWidget_Buttons)]), const FullType(BuiltList, [FullType(DashboardWidget_Buttons)]),
ListBuilder<DashboardWidget_Buttons>.new, ListBuilder<DashboardWidget_Buttons>.new,
) )
..addBuilderFactory(const FullType(BuiltList, [FullType(DashboardWidget)]), ListBuilder<DashboardWidget>.new) ..addBuilderFactory(
const FullType(BuiltMap, [FullType(String), FullType(DashboardWidget)]),
MapBuilder<String, DashboardWidget>.new,
)
..addBuilderFactory( ..addBuilderFactory(
const FullType(BuiltMap, [FullType(String), FullType(String)]), const FullType(BuiltMap, [FullType(String), FullType(String)]),
MapBuilder<String, String>.new, MapBuilder<String, String>.new,

17
packages/nextcloud/lib/src/api/dashboard.openapi.g.dart

@ -260,7 +260,8 @@ class _$DashboardDashboardApiGetWidgetsResponseApplicationJson_OcsSerializer
'meta', 'meta',
serializers.serialize(object.meta, specifiedType: const FullType(DashboardOCSMeta)), serializers.serialize(object.meta, specifiedType: const FullType(DashboardOCSMeta)),
'data', 'data',
serializers.serialize(object.data, specifiedType: const FullType(BuiltList, [FullType(DashboardWidget)])), serializers.serialize(object.data,
specifiedType: const FullType(BuiltMap, [FullType(String), FullType(DashboardWidget)])),
]; ];
return result; return result;
@ -284,7 +285,7 @@ class _$DashboardDashboardApiGetWidgetsResponseApplicationJson_OcsSerializer
break; break;
case 'data': case 'data':
result.data.replace(serializers.deserialize(value, result.data.replace(serializers.deserialize(value,
specifiedType: const FullType(BuiltList, [FullType(DashboardWidget)]))! as BuiltList<Object?>); specifiedType: const FullType(BuiltMap, [FullType(String), FullType(DashboardWidget)]))!);
break; break;
} }
} }
@ -1179,8 +1180,8 @@ abstract mixin class DashboardDashboardApiGetWidgetsResponseApplicationJson_OcsI
DashboardOCSMetaBuilder get meta; DashboardOCSMetaBuilder get meta;
set meta(DashboardOCSMetaBuilder? meta); set meta(DashboardOCSMetaBuilder? meta);
ListBuilder<DashboardWidget> get data; MapBuilder<String, DashboardWidget> get data;
set data(ListBuilder<DashboardWidget>? data); set data(MapBuilder<String, DashboardWidget>? data);
} }
class _$DashboardDashboardApiGetWidgetsResponseApplicationJson_Ocs class _$DashboardDashboardApiGetWidgetsResponseApplicationJson_Ocs
@ -1188,7 +1189,7 @@ class _$DashboardDashboardApiGetWidgetsResponseApplicationJson_Ocs
@override @override
final DashboardOCSMeta meta; final DashboardOCSMeta meta;
@override @override
final BuiltList<DashboardWidget> data; final BuiltMap<String, DashboardWidget> data;
factory _$DashboardDashboardApiGetWidgetsResponseApplicationJson_Ocs( factory _$DashboardDashboardApiGetWidgetsResponseApplicationJson_Ocs(
[void Function(DashboardDashboardApiGetWidgetsResponseApplicationJson_OcsBuilder)? updates]) => [void Function(DashboardDashboardApiGetWidgetsResponseApplicationJson_OcsBuilder)? updates]) =>
@ -1245,9 +1246,9 @@ class DashboardDashboardApiGetWidgetsResponseApplicationJson_OcsBuilder
DashboardOCSMetaBuilder get meta => _$this._meta ??= DashboardOCSMetaBuilder(); DashboardOCSMetaBuilder get meta => _$this._meta ??= DashboardOCSMetaBuilder();
set meta(covariant DashboardOCSMetaBuilder? meta) => _$this._meta = meta; set meta(covariant DashboardOCSMetaBuilder? meta) => _$this._meta = meta;
ListBuilder<DashboardWidget>? _data; MapBuilder<String, DashboardWidget>? _data;
ListBuilder<DashboardWidget> get data => _$this._data ??= ListBuilder<DashboardWidget>(); MapBuilder<String, DashboardWidget> get data => _$this._data ??= MapBuilder<String, DashboardWidget>();
set data(covariant ListBuilder<DashboardWidget>? data) => _$this._data = data; set data(covariant MapBuilder<String, DashboardWidget>? data) => _$this._data = data;
DashboardDashboardApiGetWidgetsResponseApplicationJson_OcsBuilder(); DashboardDashboardApiGetWidgetsResponseApplicationJson_OcsBuilder();

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

@ -221,8 +221,8 @@
"$ref": "#/components/schemas/OCSMeta" "$ref": "#/components/schemas/OCSMeta"
}, },
"data": { "data": {
"type": "array", "type": "object",
"items": { "additionalProperties": {
"$ref": "#/components/schemas/Widget" "$ref": "#/components/schemas/Widget"
} }
} }

Loading…
Cancel
Save