diff --git a/packages/neon_framework/packages/talk_app/lib/src/widgets/message.dart b/packages/neon_framework/packages/talk_app/lib/src/widgets/message.dart index 75a92559b81..7a617523733 100644 --- a/packages/neon_framework/packages/talk_app/lib/src/widgets/message.dart +++ b/packages/neon_framework/packages/talk_app/lib/src/widgets/message.dart @@ -8,6 +8,7 @@ import 'package:neon_framework/models.dart'; import 'package:neon_framework/theme.dart'; import 'package:neon_framework/utils.dart'; import 'package:neon_framework/widgets.dart'; +import 'package:nextcloud/core.dart' as core; import 'package:nextcloud/spreed.dart' as spreed; import 'package:talk_app/l10n/localizations.dart'; import 'package:talk_app/src/blocs/message_bloc.dart'; @@ -55,7 +56,7 @@ TextSpan buildChatMessage({ message = message.replaceAll('\n', ' '); } - final unusedParameters = {}; + final unusedParameters = {}; var parts = [message]; for (final entry in chatMessage.messageParameters.entries) { @@ -71,7 +72,9 @@ TextSpan buildChatMessage({ } if (!found) { - unusedParameters[entry.key] = entry.value; + unusedParameters[entry.key] = core.RichObjectParameter.fromJson( + entry.value.map((key, value) => MapEntry(key, value.toString())).toMap(), + ); } parts = newParts; @@ -111,7 +114,9 @@ TextSpan buildChatMessage({ if ('{${entry.key}}' == part) { children.add( buildRichObjectParameter( - parameter: entry.value, + parameter: core.RichObjectParameter.fromJson( + entry.value.map((key, value) => MapEntry(key, value.toString())).toMap(), + ), textStyle: style, isPreview: isPreview, ), @@ -157,7 +162,7 @@ TextSpan buildChatMessage({ /// Renders a rich object [parameter] to be interactive. InlineSpan buildRichObjectParameter({ - required spreed.RichObjectParameter parameter, + required core.RichObjectParameter parameter, required TextStyle? textStyle, required bool isPreview, }) { @@ -171,19 +176,19 @@ InlineSpan buildRichObjectParameter({ return WidgetSpan( alignment: PlaceholderAlignment.middle, child: switch (parameter.type) { - spreed.RichObjectParameter_Type.user || - spreed.RichObjectParameter_Type.call || - spreed.RichObjectParameter_Type.guest || - spreed.RichObjectParameter_Type.userGroup => + core.RichObjectParameter_Type.user || + core.RichObjectParameter_Type.call || + core.RichObjectParameter_Type.guest || + core.RichObjectParameter_Type.userGroup => TalkRichObjectMention( parameter: parameter, textStyle: textStyle, ), - spreed.RichObjectParameter_Type.file => TalkRichObjectFile( + core.RichObjectParameter_Type.file => TalkRichObjectFile( parameter: parameter, textStyle: textStyle, ), - spreed.RichObjectParameter_Type.deckCard => TalkRichObjectDeckCard( + core.RichObjectParameter_Type.deckCard => TalkRichObjectDeckCard( parameter: parameter, ), _ => TalkRichObjectFallback( diff --git a/packages/neon_framework/packages/talk_app/lib/src/widgets/rich_object/deck_card.dart b/packages/neon_framework/packages/talk_app/lib/src/widgets/rich_object/deck_card.dart index 0490e46fffd..c1ca12374b2 100644 --- a/packages/neon_framework/packages/talk_app/lib/src/widgets/rich_object/deck_card.dart +++ b/packages/neon_framework/packages/talk_app/lib/src/widgets/rich_object/deck_card.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_material_design_icons/flutter_material_design_icons.dart'; import 'package:neon_framework/models.dart'; import 'package:neon_framework/utils.dart'; -import 'package:nextcloud/spreed.dart' as spreed; +import 'package:nextcloud/core.dart' as core; /// Widget to display a Deck card from a rich object. class TalkRichObjectDeckCard extends StatelessWidget { @@ -13,7 +13,7 @@ class TalkRichObjectDeckCard extends StatelessWidget { }); /// The parameter to display. - final spreed.RichObjectParameter parameter; + final core.RichObjectParameter parameter; @override Widget build(BuildContext context) { diff --git a/packages/neon_framework/packages/talk_app/lib/src/widgets/rich_object/fallback.dart b/packages/neon_framework/packages/talk_app/lib/src/widgets/rich_object/fallback.dart index 72c495bb778..a35a31482a0 100644 --- a/packages/neon_framework/packages/talk_app/lib/src/widgets/rich_object/fallback.dart +++ b/packages/neon_framework/packages/talk_app/lib/src/widgets/rich_object/fallback.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:neon_framework/models.dart'; import 'package:neon_framework/utils.dart'; import 'package:neon_framework/widgets.dart'; -import 'package:nextcloud/spreed.dart' as spreed; +import 'package:nextcloud/core.dart' as core; /// Widget used to render rich object parameters with unknown types. class TalkRichObjectFallback extends StatelessWidget { @@ -14,7 +14,7 @@ class TalkRichObjectFallback extends StatelessWidget { }); /// The parameter to display. - final spreed.RichObjectParameter parameter; + final core.RichObjectParameter parameter; /// The TextStyle to applied to all text elements in this rich object. final TextStyle? textStyle; diff --git a/packages/neon_framework/packages/talk_app/lib/src/widgets/rich_object/file.dart b/packages/neon_framework/packages/talk_app/lib/src/widgets/rich_object/file.dart index 4c524062224..37a0c99637b 100644 --- a/packages/neon_framework/packages/talk_app/lib/src/widgets/rich_object/file.dart +++ b/packages/neon_framework/packages/talk_app/lib/src/widgets/rich_object/file.dart @@ -3,7 +3,6 @@ import 'package:neon_framework/models.dart'; import 'package:neon_framework/utils.dart'; import 'package:neon_framework/widgets.dart'; import 'package:nextcloud/core.dart' as core; -import 'package:nextcloud/spreed.dart' as spreed; /// Displays a file from a rich object. class TalkRichObjectFile extends StatelessWidget { @@ -15,13 +14,11 @@ class TalkRichObjectFile extends StatelessWidget { }); /// The parameter to display. - final spreed.RichObjectParameter parameter; + final core.RichObjectParameter parameter; /// The TextStyle to applied to all text elements in this rich object. final TextStyle? textStyle; - int _parseDimension(({int? $int, String? string}) dimension) => dimension.$int ?? int.parse(dimension.string!); - @override Widget build(BuildContext context) { final child = LayoutBuilder( @@ -35,8 +32,8 @@ class TalkRichObjectFile extends StatelessWidget { if (parameter.width != null && parameter.height != null) { deviceSize = Size( - _parseDimension(parameter.width!).toDouble(), - _parseDimension(parameter.height!).toDouble(), + int.parse(parameter.width!).toDouble(), + int.parse(parameter.height!).toDouble(), ); // Convert to logical pixels diff --git a/packages/neon_framework/packages/talk_app/lib/src/widgets/rich_object/mention.dart b/packages/neon_framework/packages/talk_app/lib/src/widgets/rich_object/mention.dart index 2a7297f0ee6..f260839b5ee 100644 --- a/packages/neon_framework/packages/talk_app/lib/src/widgets/rich_object/mention.dart +++ b/packages/neon_framework/packages/talk_app/lib/src/widgets/rich_object/mention.dart @@ -5,7 +5,7 @@ import 'package:neon_framework/models.dart'; import 'package:neon_framework/theme.dart'; import 'package:neon_framework/utils.dart'; import 'package:neon_framework/widgets.dart'; -import 'package:nextcloud/spreed.dart' as spreed; +import 'package:nextcloud/core.dart' as core; /// Displays a mention chip from a rich object. class TalkRichObjectMention extends StatelessWidget { @@ -17,7 +17,7 @@ class TalkRichObjectMention extends StatelessWidget { }); /// The parameter to display. - final spreed.RichObjectParameter parameter; + final core.RichObjectParameter parameter; /// The TextStyle to applied to all text elements in this rich object. final TextStyle? textStyle; @@ -28,7 +28,7 @@ class TalkRichObjectMention extends StatelessWidget { final bool highlight; switch (parameter.type) { - case spreed.RichObjectParameter_Type.user: + case core.RichObjectParameter_Type.user: final account = NeonProvider.of(context); highlight = account.username == parameter.id; @@ -37,7 +37,7 @@ class TalkRichObjectMention extends StatelessWidget { account: NeonProvider.of(context), userStatusBloc: null, ); - case spreed.RichObjectParameter_Type.call: + case core.RichObjectParameter_Type.call: highlight = true; child = CircleAvatar( child: ClipOval( @@ -47,13 +47,13 @@ class TalkRichObjectMention extends StatelessWidget { ), ), ); - case spreed.RichObjectParameter_Type.guest: + case core.RichObjectParameter_Type.guest: // TODO: Add highlighting when the mention is about the current guest user. highlight = false; child = CircleAvatar( child: Icon(AdaptiveIcons.person), ); - case spreed.RichObjectParameter_Type.userGroup: + case core.RichObjectParameter_Type.userGroup: final userDetailsBloc = NeonProvider.of(context); final groups = userDetailsBloc.userDetails.valueOrNull?.data?.groups ?? BuiltList(); diff --git a/packages/neon_framework/packages/talk_app/pubspec.yaml b/packages/neon_framework/packages/talk_app/pubspec.yaml index bd74699670b..c6ec1796f68 100644 --- a/packages/neon_framework/packages/talk_app/pubspec.yaml +++ b/packages/neon_framework/packages/talk_app/pubspec.yaml @@ -31,6 +31,7 @@ dependencies: dev_dependencies: build_runner: ^2.4.12 + built_value: ^8.9.2 custom_lint: ^0.6.5 flutter_keyboard_visibility: ^6.0.0 flutter_test: diff --git a/packages/neon_framework/packages/talk_app/test/message_test.dart b/packages/neon_framework/packages/talk_app/test/message_test.dart index e674d060b2d..4652415cd3f 100644 --- a/packages/neon_framework/packages/talk_app/test/message_test.dart +++ b/packages/neon_framework/packages/talk_app/test/message_test.dart @@ -1,4 +1,5 @@ import 'package:built_collection/built_collection.dart'; +import 'package:built_value/json_object.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; @@ -1520,10 +1521,10 @@ void main() { group(isPreview ? 'As preview' : 'Complete', () { group('Mention', () { for (final type in [ - spreed.RichObjectParameter_Type.user, - spreed.RichObjectParameter_Type.call, - spreed.RichObjectParameter_Type.guest, - spreed.RichObjectParameter_Type.userGroup, + core.RichObjectParameter_Type.user, + core.RichObjectParameter_Type.call, + core.RichObjectParameter_Type.guest, + core.RichObjectParameter_Type.userGroup, ]) { testWidgets(type.value, (tester) async { final userDetails = MockUserDetails(); @@ -1543,7 +1544,7 @@ void main() { ], child: RichText( text: buildRichObjectParameter( - parameter: spreed.RichObjectParameter( + parameter: core.RichObjectParameter( (b) => b ..type = type ..id = '' @@ -1573,9 +1574,9 @@ void main() { ], child: RichText( text: buildRichObjectParameter( - parameter: spreed.RichObjectParameter( + parameter: core.RichObjectParameter( (b) => b - ..type = spreed.RichObjectParameter_Type.file + ..type = core.RichObjectParameter_Type.file ..id = '0' ..name = 'name', ), @@ -1595,9 +1596,9 @@ void main() { TestApp( child: RichText( text: buildRichObjectParameter( - parameter: spreed.RichObjectParameter( + parameter: core.RichObjectParameter( (b) => b - ..type = spreed.RichObjectParameter_Type.deckCard + ..type = core.RichObjectParameter_Type.deckCard ..id = '' ..name = 'name' ..boardname = 'boardname' @@ -1619,9 +1620,9 @@ void main() { TestApp( child: RichText( text: buildRichObjectParameter( - parameter: spreed.RichObjectParameter( + parameter: core.RichObjectParameter( (b) => b - ..type = spreed.RichObjectParameter_Type.addressbook + ..type = core.RichObjectParameter_Type.addressbook ..id = '' ..name = 'name', ), @@ -1671,12 +1672,11 @@ void main() { when(() => chatMessage.message).thenReturn('test'); when(() => chatMessage.messageParameters).thenReturn( BuiltMap({ - type: spreed.RichObjectParameter( - (b) => b - ..type = spreed.RichObjectParameter_Type.user - ..id = '' - ..name = '', - ), + type: BuiltMap({ + 'type': JsonObject('user'), + 'id': JsonObject(''), + 'name': JsonObject(''), + }), }), ); @@ -1696,12 +1696,11 @@ void main() { when(() => chatMessage.message).thenReturn('test'); when(() => chatMessage.messageParameters).thenReturn( BuiltMap({ - 'file': spreed.RichObjectParameter( - (b) => b - ..type = spreed.RichObjectParameter_Type.file - ..id = '' - ..name = '', - ), + 'file': BuiltMap({ + 'type': JsonObject('file'), + 'id': JsonObject(''), + 'name': JsonObject(''), + }), }), ); @@ -1723,18 +1722,16 @@ void main() { when(() => chatMessage.message).thenReturn('123 {actor1} 456 {actor2} 789'); when(() => chatMessage.messageParameters).thenReturn( BuiltMap({ - 'actor1': spreed.RichObjectParameter( - (b) => b - ..type = spreed.RichObjectParameter_Type.user - ..id = '' - ..name = '', - ), - 'actor2': spreed.RichObjectParameter( - (b) => b - ..type = spreed.RichObjectParameter_Type.user - ..id = '' - ..name = '', - ), + 'actor1': BuiltMap({ + 'type': JsonObject('user'), + 'id': JsonObject(''), + 'name': JsonObject(''), + }), + 'actor2': BuiltMap({ + 'type': JsonObject('user'), + 'id': JsonObject(''), + 'name': JsonObject(''), + }), }), ); diff --git a/packages/neon_framework/packages/talk_app/test/rich_object_test.dart b/packages/neon_framework/packages/talk_app/test/rich_object_test.dart index e510bbfe93a..94cb7d15885 100644 --- a/packages/neon_framework/packages/talk_app/test/rich_object_test.dart +++ b/packages/neon_framework/packages/talk_app/test/rich_object_test.dart @@ -8,7 +8,7 @@ import 'package:neon_framework/testing.dart'; import 'package:neon_framework/theme.dart'; import 'package:neon_framework/utils.dart'; import 'package:neon_framework/widgets.dart'; -import 'package:nextcloud/spreed.dart' as spreed; +import 'package:nextcloud/core.dart' as core; import 'package:provider/provider.dart'; import 'package:rxdart/rxdart.dart'; import 'package:talk_app/src/widgets/rich_object/deck_card.dart'; @@ -44,9 +44,9 @@ void main() { Provider.value(value: account), ], child: TalkRichObjectDeckCard( - parameter: spreed.RichObjectParameter( + parameter: core.RichObjectParameter( (b) => b - ..type = spreed.RichObjectParameter_Type.deckCard + ..type = core.RichObjectParameter_Type.deckCard ..id = '' ..name = 'name' ..boardname = 'boardname' @@ -76,9 +76,9 @@ void main() { Provider.value(value: account), ], child: TalkRichObjectMention( - parameter: spreed.RichObjectParameter( + parameter: core.RichObjectParameter( (b) => b - ..type = spreed.RichObjectParameter_Type.user + ..type = core.RichObjectParameter_Type.user ..id = 'username' ..name = 'name', ), @@ -101,9 +101,9 @@ void main() { Provider.value(value: account), ], child: TalkRichObjectMention( - parameter: spreed.RichObjectParameter( + parameter: core.RichObjectParameter( (b) => b - ..type = spreed.RichObjectParameter_Type.user + ..type = core.RichObjectParameter_Type.user ..id = 'other' ..name = 'name', ), @@ -127,9 +127,9 @@ void main() { Provider.value(value: account), ], child: TalkRichObjectMention( - parameter: spreed.RichObjectParameter( + parameter: core.RichObjectParameter( (b) => b - ..type = spreed.RichObjectParameter_Type.call + ..type = core.RichObjectParameter_Type.call ..id = '' ..name = 'name' ..iconUrl = '', @@ -150,9 +150,9 @@ void main() { await tester.pumpWidgetWithAccessibility( TestApp( child: TalkRichObjectMention( - parameter: spreed.RichObjectParameter( + parameter: core.RichObjectParameter( (b) => b - ..type = spreed.RichObjectParameter_Type.guest + ..type = core.RichObjectParameter_Type.guest ..id = '' ..name = 'name', ), @@ -181,9 +181,9 @@ void main() { NeonProvider.value(value: userDetailsBloc), ], child: TalkRichObjectMention( - parameter: spreed.RichObjectParameter( + parameter: core.RichObjectParameter( (b) => b - ..type = spreed.RichObjectParameter_Type.userGroup + ..type = core.RichObjectParameter_Type.userGroup ..id = 'group' ..name = 'name', ), @@ -204,9 +204,9 @@ void main() { NeonProvider.value(value: userDetailsBloc), ], child: TalkRichObjectMention( - parameter: spreed.RichObjectParameter( + parameter: core.RichObjectParameter( (b) => b - ..type = spreed.RichObjectParameter_Type.userGroup + ..type = core.RichObjectParameter_Type.userGroup ..id = 'other' ..name = 'name', ), @@ -235,9 +235,9 @@ void main() { Provider.value(value: account), ], child: TalkRichObjectFile( - parameter: spreed.RichObjectParameter( + parameter: core.RichObjectParameter( (b) => b - ..type = spreed.RichObjectParameter_Type.file + ..type = core.RichObjectParameter_Type.file ..id = '0' ..name = 'name' ..previewAvailable = 'no' @@ -260,9 +260,9 @@ void main() { Provider.value(value: account), ], child: TalkRichObjectFile( - parameter: spreed.RichObjectParameter( + parameter: core.RichObjectParameter( (b) => b - ..type = spreed.RichObjectParameter_Type.file + ..type = core.RichObjectParameter_Type.file ..id = '0' ..name = 'name' ..previewAvailable = 'no' @@ -284,9 +284,9 @@ void main() { Provider.value(value: account), ], child: TalkRichObjectFile( - parameter: spreed.RichObjectParameter( + parameter: core.RichObjectParameter( (b) => b - ..type = spreed.RichObjectParameter_Type.file + ..type = core.RichObjectParameter_Type.file ..id = '0' ..name = 'name' ..previewAvailable = 'yes' @@ -320,15 +320,15 @@ void main() { Provider.value(value: account), ], child: TalkRichObjectFile( - parameter: spreed.RichObjectParameter( + parameter: core.RichObjectParameter( (b) => b - ..type = spreed.RichObjectParameter_Type.file + ..type = core.RichObjectParameter_Type.file ..id = '0' ..name = 'name' ..previewAvailable = 'yes' ..path = 'path' - ..width = ($int: width, string: null) - ..height = ($int: height, string: null), + ..width = width.toString() + ..height = height.toString(), ), textStyle: null, ), @@ -353,15 +353,15 @@ void main() { Provider.value(value: account), ], child: TalkRichObjectFile( - parameter: spreed.RichObjectParameter( + parameter: core.RichObjectParameter( (b) => b - ..type = spreed.RichObjectParameter_Type.file + ..type = core.RichObjectParameter_Type.file ..id = '0' ..name = 'name' ..previewAvailable = 'yes' ..path = 'path' - ..width = ($int: (maxWidth * widthFactor) * pixelRatio, string: null) - ..height = ($int: (maxHeight * heightFactor) * pixelRatio, string: null), + ..width = ((maxWidth * widthFactor) * pixelRatio).toString() + ..height = ((maxHeight * heightFactor) * pixelRatio).toString(), ), textStyle: null, ), @@ -387,9 +387,9 @@ void main() { Provider.value(value: account), ], child: TalkRichObjectFile( - parameter: spreed.RichObjectParameter( + parameter: core.RichObjectParameter( (b) => b - ..type = spreed.RichObjectParameter_Type.file + ..type = core.RichObjectParameter_Type.file ..id = '0' ..name = 'name' ..previewAvailable = 'yes' @@ -420,9 +420,9 @@ void main() { Provider.value(value: account), ], child: TalkRichObjectFallback( - parameter: spreed.RichObjectParameter( + parameter: core.RichObjectParameter( (b) => b - ..type = spreed.RichObjectParameter_Type.calendarEvent + ..type = core.RichObjectParameter_Type.calendarEvent ..id = '' ..name = 'name' ..link = '/link', @@ -440,9 +440,9 @@ void main() { await tester.pumpWidgetWithAccessibility( TestApp( child: TalkRichObjectFallback( - parameter: spreed.RichObjectParameter( + parameter: core.RichObjectParameter( (b) => b - ..type = spreed.RichObjectParameter_Type.addressbook + ..type = core.RichObjectParameter_Type.addressbook ..id = '' ..name = 'name', ), @@ -465,9 +465,9 @@ void main() { Provider.value(value: account), ], child: TalkRichObjectFallback( - parameter: spreed.RichObjectParameter( + parameter: core.RichObjectParameter( (b) => b - ..type = spreed.RichObjectParameter_Type.addressbook + ..type = core.RichObjectParameter_Type.addressbook ..id = '' ..name = 'name' ..iconUrl = '', diff --git a/packages/nextcloud/lib/src/api/core/core.openapi.dart b/packages/nextcloud/lib/src/api/core/core.openapi.dart index 9826522fb01..1f85d1dd179 100644 --- a/packages/nextcloud/lib/src/api/core/core.openapi.dart +++ b/packages/nextcloud/lib/src/api/core/core.openapi.dart @@ -26696,6 +26696,320 @@ abstract class PublicCapabilities } } +class RichObjectParameter_Type extends EnumClass { + const RichObjectParameter_Type._(super.name); + + /// `addressbook` + static const RichObjectParameter_Type addressbook = _$richObjectParameterTypeAddressbook; + + /// `addressbook-contact` + @BuiltValueEnumConst(wireName: 'addressbook-contact') + static const RichObjectParameter_Type addressbookContact = _$richObjectParameterTypeAddressbookContact; + + /// `announcement` + static const RichObjectParameter_Type announcement = _$richObjectParameterTypeAnnouncement; + + /// `app` + static const RichObjectParameter_Type app = _$richObjectParameterTypeApp; + + /// `calendar` + static const RichObjectParameter_Type calendar = _$richObjectParameterTypeCalendar; + + /// `calendar-event` + @BuiltValueEnumConst(wireName: 'calendar-event') + static const RichObjectParameter_Type calendarEvent = _$richObjectParameterTypeCalendarEvent; + + /// `call` + static const RichObjectParameter_Type call = _$richObjectParameterTypeCall; + + /// `circle` + static const RichObjectParameter_Type circle = _$richObjectParameterTypeCircle; + + /// `deck-board` + @BuiltValueEnumConst(wireName: 'deck-board') + static const RichObjectParameter_Type deckBoard = _$richObjectParameterTypeDeckBoard; + + /// `deck-card` + @BuiltValueEnumConst(wireName: 'deck-card') + static const RichObjectParameter_Type deckCard = _$richObjectParameterTypeDeckCard; + + /// `email` + static const RichObjectParameter_Type email = _$richObjectParameterTypeEmail; + + /// `file` + static const RichObjectParameter_Type file = _$richObjectParameterTypeFile; + + /// `forms-form` + @BuiltValueEnumConst(wireName: 'forms-form') + static const RichObjectParameter_Type formsForm = _$richObjectParameterTypeFormsForm; + + /// `guest` + static const RichObjectParameter_Type guest = _$richObjectParameterTypeGuest; + + /// `highlight` + static const RichObjectParameter_Type highlight = _$richObjectParameterTypeHighlight; + + /// `geo-location` + @BuiltValueEnumConst(wireName: 'geo-location') + static const RichObjectParameter_Type geoLocation = _$richObjectParameterTypeGeoLocation; + + /// `open-graph` + @BuiltValueEnumConst(wireName: 'open-graph') + static const RichObjectParameter_Type openGraph = _$richObjectParameterTypeOpenGraph; + + /// `pending-federated-share` + @BuiltValueEnumConst(wireName: 'pending-federated-share') + static const RichObjectParameter_Type pendingFederatedShare = _$richObjectParameterTypePendingFederatedShare; + + /// `systemtag` + static const RichObjectParameter_Type systemtag = _$richObjectParameterTypeSystemtag; + + /// `talk-attachment` + @BuiltValueEnumConst(wireName: 'talk-attachment') + static const RichObjectParameter_Type talkAttachment = _$richObjectParameterTypeTalkAttachment; + + /// `talk-poll` + @BuiltValueEnumConst(wireName: 'talk-poll') + static const RichObjectParameter_Type talkPoll = _$richObjectParameterTypeTalkPoll; + + /// `user` + static const RichObjectParameter_Type user = _$richObjectParameterTypeUser; + + /// `user-group` + @BuiltValueEnumConst(wireName: 'user-group') + static const RichObjectParameter_Type userGroup = _$richObjectParameterTypeUserGroup; + + /// Returns a set with all values this enum contains. + // coverage:ignore-start + static BuiltSet get values => _$richObjectParameterTypeValues; + // coverage:ignore-end + + /// Returns the enum value associated to the [name]. + static RichObjectParameter_Type valueOf(String name) => _$valueOfRichObjectParameter_Type(name); + + /// Returns the serialized value of this enum value. + String get value => _$jsonSerializers.serializeWith(serializer, this)! as String; + + /// Serializer for RichObjectParameter_Type. + @BuiltValueSerializer(custom: true) + static Serializer get serializer => const _$RichObjectParameter_TypeSerializer(); +} + +class _$RichObjectParameter_TypeSerializer implements PrimitiveSerializer { + const _$RichObjectParameter_TypeSerializer(); + + static const Map _toWire = { + RichObjectParameter_Type.addressbook: 'addressbook', + RichObjectParameter_Type.addressbookContact: 'addressbook-contact', + RichObjectParameter_Type.announcement: 'announcement', + RichObjectParameter_Type.app: 'app', + RichObjectParameter_Type.calendar: 'calendar', + RichObjectParameter_Type.calendarEvent: 'calendar-event', + RichObjectParameter_Type.call: 'call', + RichObjectParameter_Type.circle: 'circle', + RichObjectParameter_Type.deckBoard: 'deck-board', + RichObjectParameter_Type.deckCard: 'deck-card', + RichObjectParameter_Type.email: 'email', + RichObjectParameter_Type.file: 'file', + RichObjectParameter_Type.formsForm: 'forms-form', + RichObjectParameter_Type.guest: 'guest', + RichObjectParameter_Type.highlight: 'highlight', + RichObjectParameter_Type.geoLocation: 'geo-location', + RichObjectParameter_Type.openGraph: 'open-graph', + RichObjectParameter_Type.pendingFederatedShare: 'pending-federated-share', + RichObjectParameter_Type.systemtag: 'systemtag', + RichObjectParameter_Type.talkAttachment: 'talk-attachment', + RichObjectParameter_Type.talkPoll: 'talk-poll', + RichObjectParameter_Type.user: 'user', + RichObjectParameter_Type.userGroup: 'user-group', + }; + + static const Map _fromWire = { + 'addressbook': RichObjectParameter_Type.addressbook, + 'addressbook-contact': RichObjectParameter_Type.addressbookContact, + 'announcement': RichObjectParameter_Type.announcement, + 'app': RichObjectParameter_Type.app, + 'calendar': RichObjectParameter_Type.calendar, + 'calendar-event': RichObjectParameter_Type.calendarEvent, + 'call': RichObjectParameter_Type.call, + 'circle': RichObjectParameter_Type.circle, + 'deck-board': RichObjectParameter_Type.deckBoard, + 'deck-card': RichObjectParameter_Type.deckCard, + 'email': RichObjectParameter_Type.email, + 'file': RichObjectParameter_Type.file, + 'forms-form': RichObjectParameter_Type.formsForm, + 'guest': RichObjectParameter_Type.guest, + 'highlight': RichObjectParameter_Type.highlight, + 'geo-location': RichObjectParameter_Type.geoLocation, + 'open-graph': RichObjectParameter_Type.openGraph, + 'pending-federated-share': RichObjectParameter_Type.pendingFederatedShare, + 'systemtag': RichObjectParameter_Type.systemtag, + 'talk-attachment': RichObjectParameter_Type.talkAttachment, + 'talk-poll': RichObjectParameter_Type.talkPoll, + 'user': RichObjectParameter_Type.user, + 'user-group': RichObjectParameter_Type.userGroup, + }; + + @override + Iterable get types => const [RichObjectParameter_Type]; + + @override + String get wireName => 'RichObjectParameter_Type'; + + @override + Object serialize( + Serializers serializers, + RichObjectParameter_Type object, { + FullType specifiedType = FullType.unspecified, + }) => + _toWire[object]!; + + @override + RichObjectParameter_Type deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) => + _fromWire[serialized]!; +} + +@BuiltValue(instantiable: false) +sealed class $RichObjectParameterInterface { + RichObjectParameter_Type get type; + String get id; + String get name; + + /// The full URL to the file. + String? get link; + + /// The type of the call: one2one, group or public. + @BuiltValueField(wireName: 'call-type') + String? get callType; + + /// The icon url to use as avatar. + @BuiltValueField(wireName: 'icon-url') + String? get iconUrl; + + /// The id of a message that was referred to. + @BuiltValueField(wireName: 'message-id') + String? get messageId; + + /// The display name of board which contains the card. + String? get boardname; + + /// The display name of the stack which contains the card in the board. + String? get stackname; + + /// The file size in bytes. + String? get size; + + /// The full path of the file for the user, should not start with a slash. + String? get path; + + /// The mimetype of the file/folder to allow clients to show a placeholder. + String? get mimetype; + + /// Whether or not a preview is available. If `no` the mimetype icon should be used. + @BuiltValueField(wireName: 'preview-available') + String? get previewAvailable; + + /// The mtime of the file/folder as unix timestamp. + String? get mtime; + + /// The ETag of the file/folder. + String? get etag; + + /// The permissions on the file/folder. + String? get permissions; + + /// The width in pixels if the file is an image. + String? get width; + + /// The height in pixels if the file is an image. + String? get height; + + /// The blurhash of the image. + String? get blurhash; + + /// The latitude of the location MUST be the same as in the id. + String? get latitude; + + /// The longitude of the location MUST be the same as in the id. + String? get longitude; + + /// The open graph description from the website. + String? get description; + + /// The full URL of the open graph thumbnail. + String? get thumb; + + /// The name of the described website. + String? get website; + + /// If the user can see the systemtag. + String? get visibility; + + /// If the user can assign the systemtag. + String? get assignable; + + /// The token of the conversation. + String? get conversation; + + /// The URL of the instance the user lives on. + String? get server; + + /// Rebuilds the instance. + /// + /// The result is the same as this instance but with [updates] applied. + /// [updates] is a function that takes a builder [$RichObjectParameterInterfaceBuilder]. + $RichObjectParameterInterface rebuild(void Function($RichObjectParameterInterfaceBuilder) updates); + + /// Converts the instance to a builder [$RichObjectParameterInterfaceBuilder]. + $RichObjectParameterInterfaceBuilder toBuilder(); + @BuiltValueHook(initializeBuilder: true) + static void _defaults($RichObjectParameterInterfaceBuilder b) {} + @BuiltValueHook(finalizeBuilder: true) + static void _validate($RichObjectParameterInterfaceBuilder b) {} +} + +abstract class RichObjectParameter + implements $RichObjectParameterInterface, Built { + /// Creates a new RichObjectParameter object using the builder pattern. + factory RichObjectParameter([void Function(RichObjectParameterBuilder)? b]) = _$RichObjectParameter; + + // coverage:ignore-start + const RichObjectParameter._(); + // coverage:ignore-end + + /// Creates a new object from the given [json] data. + /// + /// Use [toJson] to serialize it back into json. + // coverage:ignore-start + factory RichObjectParameter.fromJson(Map json) => + _$jsonSerializers.deserializeWith(serializer, json)!; + // coverage:ignore-end + + /// Parses this object into a json like map. + /// + /// Use the fromJson factory to revive it again. + // coverage:ignore-start + Map toJson() => _$jsonSerializers.serializeWith(serializer, this)! as Map; + // coverage:ignore-end + + /// Serializer for RichObjectParameter. + static Serializer get serializer => _$richObjectParameterSerializer; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(RichObjectParameterBuilder b) { + $RichObjectParameterInterface._defaults(b); + } + + @BuiltValueHook(finalizeBuilder: true) + static void _validate(RichObjectParameterBuilder b) { + $RichObjectParameterInterface._validate(b); + } +} + /// Serialization extension for `AutocompleteResult_Status`. extension $AutocompleteResult_StatusExtension on AutocompleteResult_Status { /// Serializer for AutocompleteResult_Status. @@ -29097,7 +29411,10 @@ final Serializers _$serializers = (Serializers().toBuilder() ..addBuilderFactory(const FullType(PublicCapabilities), PublicCapabilitiesBuilder.new) ..add(PublicCapabilities.serializer) ..addBuilderFactory(const FullType(PublicCapabilities_Bruteforce), PublicCapabilities_BruteforceBuilder.new) - ..add(PublicCapabilities_Bruteforce.serializer)) + ..add(PublicCapabilities_Bruteforce.serializer) + ..addBuilderFactory(const FullType(RichObjectParameter), RichObjectParameterBuilder.new) + ..add(RichObjectParameter.serializer) + ..add(RichObjectParameter_Type.serializer)) .build(); /// Serializer for all values in this library. diff --git a/packages/nextcloud/lib/src/api/core/core.openapi.g.dart b/packages/nextcloud/lib/src/api/core/core.openapi.g.dart index 8ee78ac12d5..4434e5b1caa 100644 --- a/packages/nextcloud/lib/src/api/core/core.openapi.g.dart +++ b/packages/nextcloud/lib/src/api/core/core.openapi.g.dart @@ -554,6 +554,112 @@ final BuiltSet _$textToImageTaskStatusValues = _$textToImageTaskStatus$4, ]); +const RichObjectParameter_Type _$richObjectParameterTypeAddressbook = RichObjectParameter_Type._('addressbook'); +const RichObjectParameter_Type _$richObjectParameterTypeAddressbookContact = + RichObjectParameter_Type._('addressbookContact'); +const RichObjectParameter_Type _$richObjectParameterTypeAnnouncement = RichObjectParameter_Type._('announcement'); +const RichObjectParameter_Type _$richObjectParameterTypeApp = RichObjectParameter_Type._('app'); +const RichObjectParameter_Type _$richObjectParameterTypeCalendar = RichObjectParameter_Type._('calendar'); +const RichObjectParameter_Type _$richObjectParameterTypeCalendarEvent = RichObjectParameter_Type._('calendarEvent'); +const RichObjectParameter_Type _$richObjectParameterTypeCall = RichObjectParameter_Type._('call'); +const RichObjectParameter_Type _$richObjectParameterTypeCircle = RichObjectParameter_Type._('circle'); +const RichObjectParameter_Type _$richObjectParameterTypeDeckBoard = RichObjectParameter_Type._('deckBoard'); +const RichObjectParameter_Type _$richObjectParameterTypeDeckCard = RichObjectParameter_Type._('deckCard'); +const RichObjectParameter_Type _$richObjectParameterTypeEmail = RichObjectParameter_Type._('email'); +const RichObjectParameter_Type _$richObjectParameterTypeFile = RichObjectParameter_Type._('file'); +const RichObjectParameter_Type _$richObjectParameterTypeFormsForm = RichObjectParameter_Type._('formsForm'); +const RichObjectParameter_Type _$richObjectParameterTypeGuest = RichObjectParameter_Type._('guest'); +const RichObjectParameter_Type _$richObjectParameterTypeHighlight = RichObjectParameter_Type._('highlight'); +const RichObjectParameter_Type _$richObjectParameterTypeGeoLocation = RichObjectParameter_Type._('geoLocation'); +const RichObjectParameter_Type _$richObjectParameterTypeOpenGraph = RichObjectParameter_Type._('openGraph'); +const RichObjectParameter_Type _$richObjectParameterTypePendingFederatedShare = + RichObjectParameter_Type._('pendingFederatedShare'); +const RichObjectParameter_Type _$richObjectParameterTypeSystemtag = RichObjectParameter_Type._('systemtag'); +const RichObjectParameter_Type _$richObjectParameterTypeTalkAttachment = RichObjectParameter_Type._('talkAttachment'); +const RichObjectParameter_Type _$richObjectParameterTypeTalkPoll = RichObjectParameter_Type._('talkPoll'); +const RichObjectParameter_Type _$richObjectParameterTypeUser = RichObjectParameter_Type._('user'); +const RichObjectParameter_Type _$richObjectParameterTypeUserGroup = RichObjectParameter_Type._('userGroup'); + +RichObjectParameter_Type _$valueOfRichObjectParameter_Type(String name) { + switch (name) { + case 'addressbook': + return _$richObjectParameterTypeAddressbook; + case 'addressbookContact': + return _$richObjectParameterTypeAddressbookContact; + case 'announcement': + return _$richObjectParameterTypeAnnouncement; + case 'app': + return _$richObjectParameterTypeApp; + case 'calendar': + return _$richObjectParameterTypeCalendar; + case 'calendarEvent': + return _$richObjectParameterTypeCalendarEvent; + case 'call': + return _$richObjectParameterTypeCall; + case 'circle': + return _$richObjectParameterTypeCircle; + case 'deckBoard': + return _$richObjectParameterTypeDeckBoard; + case 'deckCard': + return _$richObjectParameterTypeDeckCard; + case 'email': + return _$richObjectParameterTypeEmail; + case 'file': + return _$richObjectParameterTypeFile; + case 'formsForm': + return _$richObjectParameterTypeFormsForm; + case 'guest': + return _$richObjectParameterTypeGuest; + case 'highlight': + return _$richObjectParameterTypeHighlight; + case 'geoLocation': + return _$richObjectParameterTypeGeoLocation; + case 'openGraph': + return _$richObjectParameterTypeOpenGraph; + case 'pendingFederatedShare': + return _$richObjectParameterTypePendingFederatedShare; + case 'systemtag': + return _$richObjectParameterTypeSystemtag; + case 'talkAttachment': + return _$richObjectParameterTypeTalkAttachment; + case 'talkPoll': + return _$richObjectParameterTypeTalkPoll; + case 'user': + return _$richObjectParameterTypeUser; + case 'userGroup': + return _$richObjectParameterTypeUserGroup; + default: + throw ArgumentError(name); + } +} + +final BuiltSet _$richObjectParameterTypeValues = + BuiltSet(const [ + _$richObjectParameterTypeAddressbook, + _$richObjectParameterTypeAddressbookContact, + _$richObjectParameterTypeAnnouncement, + _$richObjectParameterTypeApp, + _$richObjectParameterTypeCalendar, + _$richObjectParameterTypeCalendarEvent, + _$richObjectParameterTypeCall, + _$richObjectParameterTypeCircle, + _$richObjectParameterTypeDeckBoard, + _$richObjectParameterTypeDeckCard, + _$richObjectParameterTypeEmail, + _$richObjectParameterTypeFile, + _$richObjectParameterTypeFormsForm, + _$richObjectParameterTypeGuest, + _$richObjectParameterTypeHighlight, + _$richObjectParameterTypeGeoLocation, + _$richObjectParameterTypeOpenGraph, + _$richObjectParameterTypePendingFederatedShare, + _$richObjectParameterTypeSystemtag, + _$richObjectParameterTypeTalkAttachment, + _$richObjectParameterTypeTalkPoll, + _$richObjectParameterTypeUser, + _$richObjectParameterTypeUserGroup, +]); + Serializer _$statusSerializer = _$StatusSerializer(); Serializer _$oCSMetaSerializer = _$OCSMetaSerializer(); Serializer @@ -1209,6 +1315,7 @@ Serializer _$capabilitiesSerializer = _$CapabilitiesSerializer(); Serializer _$publicCapabilitiesBruteforceSerializer = _$PublicCapabilities_BruteforceSerializer(); Serializer _$publicCapabilitiesSerializer = _$PublicCapabilitiesSerializer(); +Serializer _$richObjectParameterSerializer = _$RichObjectParameterSerializer(); class _$StatusSerializer implements StructuredSerializer { @override @@ -15256,6 +15363,280 @@ class _$PublicCapabilitiesSerializer implements StructuredSerializer { + @override + final Iterable types = const [RichObjectParameter, _$RichObjectParameter]; + @override + final String wireName = 'RichObjectParameter'; + + @override + Iterable serialize(Serializers serializers, RichObjectParameter object, + {FullType specifiedType = FullType.unspecified}) { + final result = [ + 'type', + serializers.serialize(object.type, specifiedType: const FullType(RichObjectParameter_Type)), + 'id', + serializers.serialize(object.id, specifiedType: const FullType(String)), + 'name', + serializers.serialize(object.name, specifiedType: const FullType(String)), + ]; + Object? value; + value = object.link; + if (value != null) { + result + ..add('link') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + value = object.callType; + if (value != null) { + result + ..add('call-type') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + value = object.iconUrl; + if (value != null) { + result + ..add('icon-url') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + value = object.messageId; + if (value != null) { + result + ..add('message-id') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + value = object.boardname; + if (value != null) { + result + ..add('boardname') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + value = object.stackname; + if (value != null) { + result + ..add('stackname') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + value = object.size; + if (value != null) { + result + ..add('size') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + value = object.path; + if (value != null) { + result + ..add('path') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + value = object.mimetype; + if (value != null) { + result + ..add('mimetype') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + value = object.previewAvailable; + if (value != null) { + result + ..add('preview-available') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + value = object.mtime; + if (value != null) { + result + ..add('mtime') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + value = object.etag; + if (value != null) { + result + ..add('etag') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + value = object.permissions; + if (value != null) { + result + ..add('permissions') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + value = object.width; + if (value != null) { + result + ..add('width') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + value = object.height; + if (value != null) { + result + ..add('height') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + value = object.blurhash; + if (value != null) { + result + ..add('blurhash') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + value = object.latitude; + if (value != null) { + result + ..add('latitude') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + value = object.longitude; + if (value != null) { + result + ..add('longitude') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + value = object.description; + if (value != null) { + result + ..add('description') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + value = object.thumb; + if (value != null) { + result + ..add('thumb') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + value = object.website; + if (value != null) { + result + ..add('website') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + value = object.visibility; + if (value != null) { + result + ..add('visibility') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + value = object.assignable; + if (value != null) { + result + ..add('assignable') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + value = object.conversation; + if (value != null) { + result + ..add('conversation') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + value = object.server; + if (value != null) { + result + ..add('server') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + return result; + } + + @override + RichObjectParameter deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = RichObjectParameterBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'type': + result.type = serializers.deserialize(value, specifiedType: const FullType(RichObjectParameter_Type))! + as RichObjectParameter_Type; + break; + case 'id': + result.id = serializers.deserialize(value, specifiedType: const FullType(String))! as String; + break; + case 'name': + result.name = serializers.deserialize(value, specifiedType: const FullType(String))! as String; + break; + case 'link': + result.link = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + case 'call-type': + result.callType = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + case 'icon-url': + result.iconUrl = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + case 'message-id': + result.messageId = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + case 'boardname': + result.boardname = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + case 'stackname': + result.stackname = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + case 'size': + result.size = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + case 'path': + result.path = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + case 'mimetype': + result.mimetype = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + case 'preview-available': + result.previewAvailable = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + case 'mtime': + result.mtime = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + case 'etag': + result.etag = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + case 'permissions': + result.permissions = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + case 'width': + result.width = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + case 'height': + result.height = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + case 'blurhash': + result.blurhash = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + case 'latitude': + result.latitude = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + case 'longitude': + result.longitude = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + case 'description': + result.description = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + case 'thumb': + result.thumb = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + case 'website': + result.website = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + case 'visibility': + result.visibility = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + case 'assignable': + result.assignable = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + case 'conversation': + result.conversation = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + case 'server': + result.server = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + } + } + + return result.build(); + } +} + abstract mixin class $StatusInterfaceBuilder { void replace($StatusInterface other); void update(void Function($StatusInterfaceBuilder) updates); @@ -50205,4 +50586,506 @@ class PublicCapabilitiesBuilder } } +abstract mixin class $RichObjectParameterInterfaceBuilder { + void replace($RichObjectParameterInterface other); + void update(void Function($RichObjectParameterInterfaceBuilder) updates); + RichObjectParameter_Type? get type; + set type(RichObjectParameter_Type? type); + + String? get id; + set id(String? id); + + String? get name; + set name(String? name); + + String? get link; + set link(String? link); + + String? get callType; + set callType(String? callType); + + String? get iconUrl; + set iconUrl(String? iconUrl); + + String? get messageId; + set messageId(String? messageId); + + String? get boardname; + set boardname(String? boardname); + + String? get stackname; + set stackname(String? stackname); + + String? get size; + set size(String? size); + + String? get path; + set path(String? path); + + String? get mimetype; + set mimetype(String? mimetype); + + String? get previewAvailable; + set previewAvailable(String? previewAvailable); + + String? get mtime; + set mtime(String? mtime); + + String? get etag; + set etag(String? etag); + + String? get permissions; + set permissions(String? permissions); + + String? get width; + set width(String? width); + + String? get height; + set height(String? height); + + String? get blurhash; + set blurhash(String? blurhash); + + String? get latitude; + set latitude(String? latitude); + + String? get longitude; + set longitude(String? longitude); + + String? get description; + set description(String? description); + + String? get thumb; + set thumb(String? thumb); + + String? get website; + set website(String? website); + + String? get visibility; + set visibility(String? visibility); + + String? get assignable; + set assignable(String? assignable); + + String? get conversation; + set conversation(String? conversation); + + String? get server; + set server(String? server); +} + +class _$RichObjectParameter extends RichObjectParameter { + @override + final RichObjectParameter_Type type; + @override + final String id; + @override + final String name; + @override + final String? link; + @override + final String? callType; + @override + final String? iconUrl; + @override + final String? messageId; + @override + final String? boardname; + @override + final String? stackname; + @override + final String? size; + @override + final String? path; + @override + final String? mimetype; + @override + final String? previewAvailable; + @override + final String? mtime; + @override + final String? etag; + @override + final String? permissions; + @override + final String? width; + @override + final String? height; + @override + final String? blurhash; + @override + final String? latitude; + @override + final String? longitude; + @override + final String? description; + @override + final String? thumb; + @override + final String? website; + @override + final String? visibility; + @override + final String? assignable; + @override + final String? conversation; + @override + final String? server; + + factory _$RichObjectParameter([void Function(RichObjectParameterBuilder)? updates]) => + (RichObjectParameterBuilder()..update(updates))._build(); + + _$RichObjectParameter._( + {required this.type, + required this.id, + required this.name, + this.link, + this.callType, + this.iconUrl, + this.messageId, + this.boardname, + this.stackname, + this.size, + this.path, + this.mimetype, + this.previewAvailable, + this.mtime, + this.etag, + this.permissions, + this.width, + this.height, + this.blurhash, + this.latitude, + this.longitude, + this.description, + this.thumb, + this.website, + this.visibility, + this.assignable, + this.conversation, + this.server}) + : super._() { + BuiltValueNullFieldError.checkNotNull(type, r'RichObjectParameter', 'type'); + BuiltValueNullFieldError.checkNotNull(id, r'RichObjectParameter', 'id'); + BuiltValueNullFieldError.checkNotNull(name, r'RichObjectParameter', 'name'); + } + + @override + RichObjectParameter rebuild(void Function(RichObjectParameterBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + RichObjectParameterBuilder toBuilder() => RichObjectParameterBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is RichObjectParameter && + type == other.type && + id == other.id && + name == other.name && + link == other.link && + callType == other.callType && + iconUrl == other.iconUrl && + messageId == other.messageId && + boardname == other.boardname && + stackname == other.stackname && + size == other.size && + path == other.path && + mimetype == other.mimetype && + previewAvailable == other.previewAvailable && + mtime == other.mtime && + etag == other.etag && + permissions == other.permissions && + width == other.width && + height == other.height && + blurhash == other.blurhash && + latitude == other.latitude && + longitude == other.longitude && + description == other.description && + thumb == other.thumb && + website == other.website && + visibility == other.visibility && + assignable == other.assignable && + conversation == other.conversation && + server == other.server; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, type.hashCode); + _$hash = $jc(_$hash, id.hashCode); + _$hash = $jc(_$hash, name.hashCode); + _$hash = $jc(_$hash, link.hashCode); + _$hash = $jc(_$hash, callType.hashCode); + _$hash = $jc(_$hash, iconUrl.hashCode); + _$hash = $jc(_$hash, messageId.hashCode); + _$hash = $jc(_$hash, boardname.hashCode); + _$hash = $jc(_$hash, stackname.hashCode); + _$hash = $jc(_$hash, size.hashCode); + _$hash = $jc(_$hash, path.hashCode); + _$hash = $jc(_$hash, mimetype.hashCode); + _$hash = $jc(_$hash, previewAvailable.hashCode); + _$hash = $jc(_$hash, mtime.hashCode); + _$hash = $jc(_$hash, etag.hashCode); + _$hash = $jc(_$hash, permissions.hashCode); + _$hash = $jc(_$hash, width.hashCode); + _$hash = $jc(_$hash, height.hashCode); + _$hash = $jc(_$hash, blurhash.hashCode); + _$hash = $jc(_$hash, latitude.hashCode); + _$hash = $jc(_$hash, longitude.hashCode); + _$hash = $jc(_$hash, description.hashCode); + _$hash = $jc(_$hash, thumb.hashCode); + _$hash = $jc(_$hash, website.hashCode); + _$hash = $jc(_$hash, visibility.hashCode); + _$hash = $jc(_$hash, assignable.hashCode); + _$hash = $jc(_$hash, conversation.hashCode); + _$hash = $jc(_$hash, server.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper(r'RichObjectParameter') + ..add('type', type) + ..add('id', id) + ..add('name', name) + ..add('link', link) + ..add('callType', callType) + ..add('iconUrl', iconUrl) + ..add('messageId', messageId) + ..add('boardname', boardname) + ..add('stackname', stackname) + ..add('size', size) + ..add('path', path) + ..add('mimetype', mimetype) + ..add('previewAvailable', previewAvailable) + ..add('mtime', mtime) + ..add('etag', etag) + ..add('permissions', permissions) + ..add('width', width) + ..add('height', height) + ..add('blurhash', blurhash) + ..add('latitude', latitude) + ..add('longitude', longitude) + ..add('description', description) + ..add('thumb', thumb) + ..add('website', website) + ..add('visibility', visibility) + ..add('assignable', assignable) + ..add('conversation', conversation) + ..add('server', server)) + .toString(); + } +} + +class RichObjectParameterBuilder + implements Builder, $RichObjectParameterInterfaceBuilder { + _$RichObjectParameter? _$v; + + RichObjectParameter_Type? _type; + RichObjectParameter_Type? get type => _$this._type; + set type(covariant RichObjectParameter_Type? type) => _$this._type = type; + + String? _id; + String? get id => _$this._id; + set id(covariant String? id) => _$this._id = id; + + String? _name; + String? get name => _$this._name; + set name(covariant String? name) => _$this._name = name; + + String? _link; + String? get link => _$this._link; + set link(covariant String? link) => _$this._link = link; + + String? _callType; + String? get callType => _$this._callType; + set callType(covariant String? callType) => _$this._callType = callType; + + String? _iconUrl; + String? get iconUrl => _$this._iconUrl; + set iconUrl(covariant String? iconUrl) => _$this._iconUrl = iconUrl; + + String? _messageId; + String? get messageId => _$this._messageId; + set messageId(covariant String? messageId) => _$this._messageId = messageId; + + String? _boardname; + String? get boardname => _$this._boardname; + set boardname(covariant String? boardname) => _$this._boardname = boardname; + + String? _stackname; + String? get stackname => _$this._stackname; + set stackname(covariant String? stackname) => _$this._stackname = stackname; + + String? _size; + String? get size => _$this._size; + set size(covariant String? size) => _$this._size = size; + + String? _path; + String? get path => _$this._path; + set path(covariant String? path) => _$this._path = path; + + String? _mimetype; + String? get mimetype => _$this._mimetype; + set mimetype(covariant String? mimetype) => _$this._mimetype = mimetype; + + String? _previewAvailable; + String? get previewAvailable => _$this._previewAvailable; + set previewAvailable(covariant String? previewAvailable) => _$this._previewAvailable = previewAvailable; + + String? _mtime; + String? get mtime => _$this._mtime; + set mtime(covariant String? mtime) => _$this._mtime = mtime; + + String? _etag; + String? get etag => _$this._etag; + set etag(covariant String? etag) => _$this._etag = etag; + + String? _permissions; + String? get permissions => _$this._permissions; + set permissions(covariant String? permissions) => _$this._permissions = permissions; + + String? _width; + String? get width => _$this._width; + set width(covariant String? width) => _$this._width = width; + + String? _height; + String? get height => _$this._height; + set height(covariant String? height) => _$this._height = height; + + String? _blurhash; + String? get blurhash => _$this._blurhash; + set blurhash(covariant String? blurhash) => _$this._blurhash = blurhash; + + String? _latitude; + String? get latitude => _$this._latitude; + set latitude(covariant String? latitude) => _$this._latitude = latitude; + + String? _longitude; + String? get longitude => _$this._longitude; + set longitude(covariant String? longitude) => _$this._longitude = longitude; + + String? _description; + String? get description => _$this._description; + set description(covariant String? description) => _$this._description = description; + + String? _thumb; + String? get thumb => _$this._thumb; + set thumb(covariant String? thumb) => _$this._thumb = thumb; + + String? _website; + String? get website => _$this._website; + set website(covariant String? website) => _$this._website = website; + + String? _visibility; + String? get visibility => _$this._visibility; + set visibility(covariant String? visibility) => _$this._visibility = visibility; + + String? _assignable; + String? get assignable => _$this._assignable; + set assignable(covariant String? assignable) => _$this._assignable = assignable; + + String? _conversation; + String? get conversation => _$this._conversation; + set conversation(covariant String? conversation) => _$this._conversation = conversation; + + String? _server; + String? get server => _$this._server; + set server(covariant String? server) => _$this._server = server; + + RichObjectParameterBuilder() { + RichObjectParameter._defaults(this); + } + + RichObjectParameterBuilder get _$this { + final $v = _$v; + if ($v != null) { + _type = $v.type; + _id = $v.id; + _name = $v.name; + _link = $v.link; + _callType = $v.callType; + _iconUrl = $v.iconUrl; + _messageId = $v.messageId; + _boardname = $v.boardname; + _stackname = $v.stackname; + _size = $v.size; + _path = $v.path; + _mimetype = $v.mimetype; + _previewAvailable = $v.previewAvailable; + _mtime = $v.mtime; + _etag = $v.etag; + _permissions = $v.permissions; + _width = $v.width; + _height = $v.height; + _blurhash = $v.blurhash; + _latitude = $v.latitude; + _longitude = $v.longitude; + _description = $v.description; + _thumb = $v.thumb; + _website = $v.website; + _visibility = $v.visibility; + _assignable = $v.assignable; + _conversation = $v.conversation; + _server = $v.server; + _$v = null; + } + return this; + } + + @override + void replace(covariant RichObjectParameter other) { + ArgumentError.checkNotNull(other, 'other'); + _$v = other as _$RichObjectParameter; + } + + @override + void update(void Function(RichObjectParameterBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + RichObjectParameter build() => _build(); + + _$RichObjectParameter _build() { + RichObjectParameter._validate(this); + final _$result = _$v ?? + _$RichObjectParameter._( + type: BuiltValueNullFieldError.checkNotNull(type, r'RichObjectParameter', 'type'), + id: BuiltValueNullFieldError.checkNotNull(id, r'RichObjectParameter', 'id'), + name: BuiltValueNullFieldError.checkNotNull(name, r'RichObjectParameter', 'name'), + link: link, + callType: callType, + iconUrl: iconUrl, + messageId: messageId, + boardname: boardname, + stackname: stackname, + size: size, + path: path, + mimetype: mimetype, + previewAvailable: previewAvailable, + mtime: mtime, + etag: etag, + permissions: permissions, + width: width, + height: height, + blurhash: blurhash, + latitude: latitude, + longitude: longitude, + description: description, + thumb: thumb, + website: website, + visibility: visibility, + assignable: assignable, + conversation: conversation, + server: server); + replace(_$result); + return _$result; + } +} + // ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/packages/nextcloud/lib/src/api/core/core.openapi.json b/packages/nextcloud/lib/src/api/core/core.openapi.json index 26cc8cb058c..2586a8d2960 100644 --- a/packages/nextcloud/lib/src/api/core/core.openapi.json +++ b/packages/nextcloud/lib/src/api/core/core.openapi.json @@ -2119,6 +2119,175 @@ } } } + }, + "RichObjectParameter": { + "type": "object", + "required": [ + "type", + "id", + "name" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "addressbook", + "addressbook-contact", + "announcement", + "app", + "calendar", + "calendar-event", + "call", + "circle", + "deck-board", + "deck-card", + "email", + "file", + "forms-form", + "guest", + "highlight", + "geo-location", + "open-graph", + "pending-federated-share", + "systemtag", + "talk-attachment", + "talk-poll", + "user", + "user-group" + ] + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "link": { + "type": "string", + "description": "The full URL to the file", + "example": "http://localhost/index.php/apps/announcements/#23" + }, + "call-type": { + "type": "string", + "description": "The type of the call: one2one, group or public", + "example": "one2one" + }, + "icon-url": { + "type": "string", + "description": "The icon url to use as avatar", + "example": "https://localhost/ocs/v2.php/apps/spreed/api/v1/room/R4nd0mToken/avatar" + }, + "message-id": { + "type": "string", + "description": "The id of a message that was referred to", + "example": "12345" + }, + "boardname": { + "type": "string", + "description": "The display name of board which contains the card", + "example": "Personal" + }, + "stackname": { + "type": "string", + "description": "The display name of the stack which contains the card in the board", + "example": "To do" + }, + "size": { + "type": "string", + "description": "The file size in bytes", + "example": "3145728" + }, + "path": { + "type": "string", + "description": "The full path of the file for the user, should not start with a slash", + "example": "path/to/file.txt" + }, + "mimetype": { + "type": "string", + "description": "The mimetype of the file/folder to allow clients to show a placeholder", + "example": "text/plain" + }, + "preview-available": { + "type": "string", + "description": "Whether or not a preview is available. If `no` the mimetype icon should be used", + "example": "yes" + }, + "mtime": { + "type": "string", + "description": "The mtime of the file/folder as unix timestamp", + "example": "1661854213" + }, + "etag": { + "type": "string", + "description": "The ETag of the file/folder", + "example": "abcdefghi" + }, + "permissions": { + "type": "string", + "description": "The permissions on the file/folder", + "example": "3" + }, + "width": { + "type": "string", + "description": "The width in pixels if the file is an image", + "example": "1920" + }, + "height": { + "type": "string", + "description": "The height in pixels if the file is an image", + "example": "1080" + }, + "blurhash": { + "type": "string", + "description": "The blurhash of the image", + "example": "LEHV9uae2yk8pyo0adR*.7kCMdnj" + }, + "latitude": { + "type": "string", + "description": "The latitude of the location MUST be the same as in the id", + "example": "52.5450511" + }, + "longitude": { + "type": "string", + "description": "The longitude of the location MUST be the same as in the id", + "example": "13.3741463" + }, + "description": { + "type": "string", + "description": "The open graph description from the website", + "example": "This is the description of the website" + }, + "thumb": { + "type": "string", + "description": "The full URL of the open graph thumbnail", + "example": "http://localhost/index.php/apps/mood/data/image?url=https%3A%2F%2Fthumb.example.com%2Fimage.png" + }, + "website": { + "type": "string", + "description": "The name of the described website", + "example": "Nextcloud - App Store" + }, + "visibility": { + "type": "string", + "description": "If the user can see the systemtag", + "example": "1" + }, + "assignable": { + "type": "string", + "description": "If the user can assign the systemtag", + "example": "0" + }, + "conversation": { + "type": "string", + "description": "The token of the conversation", + "example": "a1b2c3d4" + }, + "server": { + "type": "string", + "description": "The URL of the instance the user lives on", + "example": "localhost" + } + } } } }, diff --git a/packages/nextcloud/lib/src/api/spreed/patches/1-message-parameters.json b/packages/nextcloud/lib/src/api/core/patches/0-rich-object-parameter.json similarity index 96% rename from packages/nextcloud/lib/src/api/spreed/patches/1-message-parameters.json rename to packages/nextcloud/lib/src/api/core/patches/0-rich-object-parameter.json index 466fc86133f..9b4159858cc 100644 --- a/packages/nextcloud/lib/src/api/spreed/patches/1-message-parameters.json +++ b/packages/nextcloud/lib/src/api/core/patches/0-rich-object-parameter.json @@ -1,11 +1,4 @@ [ - { - "op": "replace", - "path": "/components/schemas/BaseMessage/properties/messageParameters/additionalProperties", - "value": { - "$ref": "#/components/schemas/RichObjectParameter" - } - }, { "op": "add", "path": "/components/schemas/RichObjectParameter", diff --git a/packages/nextcloud/lib/src/api/core/patches/0-compatibility-29.json b/packages/nextcloud/lib/src/api/core/patches/1-compatibility-29.json similarity index 100% rename from packages/nextcloud/lib/src/api/core/patches/0-compatibility-29.json rename to packages/nextcloud/lib/src/api/core/patches/1-compatibility-29.json diff --git a/packages/nextcloud/lib/src/api/core/patches/1-compatibility-28.json b/packages/nextcloud/lib/src/api/core/patches/2-compatibility-28.json similarity index 100% rename from packages/nextcloud/lib/src/api/core/patches/1-compatibility-28.json rename to packages/nextcloud/lib/src/api/core/patches/2-compatibility-28.json diff --git a/packages/nextcloud/lib/src/api/notifications/notifications.openapi.dart b/packages/nextcloud/lib/src/api/notifications/notifications.openapi.dart index 5393e031667..58cbd2f550e 100644 --- a/packages/nextcloud/lib/src/api/notifications/notifications.openapi.dart +++ b/packages/nextcloud/lib/src/api/notifications/notifications.openapi.dart @@ -1596,352 +1596,6 @@ abstract class ApiGenerateNotificationResponseApplicationJson } } -class RichObjectParameter_CallType extends EnumClass { - const RichObjectParameter_CallType._(super.name); - - /// `one2one` - static const RichObjectParameter_CallType one2one = _$richObjectParameterCallTypeOne2one; - - /// `group` - static const RichObjectParameter_CallType group = _$richObjectParameterCallTypeGroup; - - /// `public` - static const RichObjectParameter_CallType public = _$richObjectParameterCallTypePublic; - - /// Returns a set with all values this enum contains. - // coverage:ignore-start - static BuiltSet get values => _$richObjectParameterCallTypeValues; - // coverage:ignore-end - - /// Returns the enum value associated to the [name]. - static RichObjectParameter_CallType valueOf(String name) => _$valueOfRichObjectParameter_CallType(name); - - /// Returns the serialized value of this enum value. - String get value => _$jsonSerializers.serializeWith(serializer, this)! as String; - - /// Serializer for RichObjectParameter_CallType. - @BuiltValueSerializer(custom: true) - static Serializer get serializer => const _$RichObjectParameter_CallTypeSerializer(); -} - -class _$RichObjectParameter_CallTypeSerializer implements PrimitiveSerializer { - const _$RichObjectParameter_CallTypeSerializer(); - - static const Map _toWire = { - RichObjectParameter_CallType.one2one: 'one2one', - RichObjectParameter_CallType.group: 'group', - RichObjectParameter_CallType.public: 'public', - }; - - static const Map _fromWire = { - 'one2one': RichObjectParameter_CallType.one2one, - 'group': RichObjectParameter_CallType.group, - 'public': RichObjectParameter_CallType.public, - }; - - @override - Iterable get types => const [RichObjectParameter_CallType]; - - @override - String get wireName => 'RichObjectParameter_CallType'; - - @override - Object serialize( - Serializers serializers, - RichObjectParameter_CallType object, { - FullType specifiedType = FullType.unspecified, - }) => - _toWire[object]!; - - @override - RichObjectParameter_CallType deserialize( - Serializers serializers, - Object serialized, { - FullType specifiedType = FullType.unspecified, - }) => - _fromWire[serialized]!; -} - -class RichObjectParameter_PreviewAvailable extends EnumClass { - const RichObjectParameter_PreviewAvailable._(super.name); - - /// `yes` - static const RichObjectParameter_PreviewAvailable yes = _$richObjectParameterPreviewAvailableYes; - - /// `no` - static const RichObjectParameter_PreviewAvailable no = _$richObjectParameterPreviewAvailableNo; - - /// Returns a set with all values this enum contains. - // coverage:ignore-start - static BuiltSet get values => _$richObjectParameterPreviewAvailableValues; - // coverage:ignore-end - - /// Returns the enum value associated to the [name]. - static RichObjectParameter_PreviewAvailable valueOf(String name) => - _$valueOfRichObjectParameter_PreviewAvailable(name); - - /// Returns the serialized value of this enum value. - String get value => _$jsonSerializers.serializeWith(serializer, this)! as String; - - /// Serializer for RichObjectParameter_PreviewAvailable. - @BuiltValueSerializer(custom: true) - static Serializer get serializer => - const _$RichObjectParameter_PreviewAvailableSerializer(); -} - -class _$RichObjectParameter_PreviewAvailableSerializer - implements PrimitiveSerializer { - const _$RichObjectParameter_PreviewAvailableSerializer(); - - static const Map _toWire = - { - RichObjectParameter_PreviewAvailable.yes: 'yes', - RichObjectParameter_PreviewAvailable.no: 'no', - }; - - static const Map _fromWire = - { - 'yes': RichObjectParameter_PreviewAvailable.yes, - 'no': RichObjectParameter_PreviewAvailable.no, - }; - - @override - Iterable get types => const [RichObjectParameter_PreviewAvailable]; - - @override - String get wireName => 'RichObjectParameter_PreviewAvailable'; - - @override - Object serialize( - Serializers serializers, - RichObjectParameter_PreviewAvailable object, { - FullType specifiedType = FullType.unspecified, - }) => - _toWire[object]!; - - @override - RichObjectParameter_PreviewAvailable deserialize( - Serializers serializers, - Object serialized, { - FullType specifiedType = FullType.unspecified, - }) => - _fromWire[serialized]!; -} - -class RichObjectParameter_Visibility extends EnumClass { - const RichObjectParameter_Visibility._(super.name); - - /// `0` - @BuiltValueEnumConst(wireName: '0') - static const RichObjectParameter_Visibility $0 = _$richObjectParameterVisibility$0; - - /// `1` - @BuiltValueEnumConst(wireName: '1') - static const RichObjectParameter_Visibility $1 = _$richObjectParameterVisibility$1; - - /// Returns a set with all values this enum contains. - // coverage:ignore-start - static BuiltSet get values => _$richObjectParameterVisibilityValues; - // coverage:ignore-end - - /// Returns the enum value associated to the [name]. - static RichObjectParameter_Visibility valueOf(String name) => _$valueOfRichObjectParameter_Visibility(name); - - /// Returns the serialized value of this enum value. - String get value => _$jsonSerializers.serializeWith(serializer, this)! as String; - - /// Serializer for RichObjectParameter_Visibility. - @BuiltValueSerializer(custom: true) - static Serializer get serializer => - const _$RichObjectParameter_VisibilitySerializer(); -} - -class _$RichObjectParameter_VisibilitySerializer implements PrimitiveSerializer { - const _$RichObjectParameter_VisibilitySerializer(); - - static const Map _toWire = { - RichObjectParameter_Visibility.$0: '0', - RichObjectParameter_Visibility.$1: '1', - }; - - static const Map _fromWire = { - '0': RichObjectParameter_Visibility.$0, - '1': RichObjectParameter_Visibility.$1, - }; - - @override - Iterable get types => const [RichObjectParameter_Visibility]; - - @override - String get wireName => 'RichObjectParameter_Visibility'; - - @override - Object serialize( - Serializers serializers, - RichObjectParameter_Visibility object, { - FullType specifiedType = FullType.unspecified, - }) => - _toWire[object]!; - - @override - RichObjectParameter_Visibility deserialize( - Serializers serializers, - Object serialized, { - FullType specifiedType = FullType.unspecified, - }) => - _fromWire[serialized]!; -} - -class RichObjectParameter_Assignable extends EnumClass { - const RichObjectParameter_Assignable._(super.name); - - /// `0` - @BuiltValueEnumConst(wireName: '0') - static const RichObjectParameter_Assignable $0 = _$richObjectParameterAssignable$0; - - /// `1` - @BuiltValueEnumConst(wireName: '1') - static const RichObjectParameter_Assignable $1 = _$richObjectParameterAssignable$1; - - /// Returns a set with all values this enum contains. - // coverage:ignore-start - static BuiltSet get values => _$richObjectParameterAssignableValues; - // coverage:ignore-end - - /// Returns the enum value associated to the [name]. - static RichObjectParameter_Assignable valueOf(String name) => _$valueOfRichObjectParameter_Assignable(name); - - /// Returns the serialized value of this enum value. - String get value => _$jsonSerializers.serializeWith(serializer, this)! as String; - - /// Serializer for RichObjectParameter_Assignable. - @BuiltValueSerializer(custom: true) - static Serializer get serializer => - const _$RichObjectParameter_AssignableSerializer(); -} - -class _$RichObjectParameter_AssignableSerializer implements PrimitiveSerializer { - const _$RichObjectParameter_AssignableSerializer(); - - static const Map _toWire = { - RichObjectParameter_Assignable.$0: '0', - RichObjectParameter_Assignable.$1: '1', - }; - - static const Map _fromWire = { - '0': RichObjectParameter_Assignable.$0, - '1': RichObjectParameter_Assignable.$1, - }; - - @override - Iterable get types => const [RichObjectParameter_Assignable]; - - @override - String get wireName => 'RichObjectParameter_Assignable'; - - @override - Object serialize( - Serializers serializers, - RichObjectParameter_Assignable object, { - FullType specifiedType = FullType.unspecified, - }) => - _toWire[object]!; - - @override - RichObjectParameter_Assignable deserialize( - Serializers serializers, - Object serialized, { - FullType specifiedType = FullType.unspecified, - }) => - _fromWire[serialized]!; -} - -@BuiltValue(instantiable: false) -sealed class $RichObjectParameterInterface { - String get type; - String get id; - String get name; - String? get server; - String? get link; - @BuiltValueField(wireName: 'call-type') - RichObjectParameter_CallType? get callType; - @BuiltValueField(wireName: 'icon-url') - String? get iconUrl; - @BuiltValueField(wireName: 'message-id') - String? get messageId; - String? get boardname; - String? get stackname; - String? get size; - String? get path; - String? get mimetype; - @BuiltValueField(wireName: 'preview-available') - RichObjectParameter_PreviewAvailable? get previewAvailable; - String? get mtime; - String? get latitude; - String? get longitude; - String? get description; - String? get thumb; - String? get website; - RichObjectParameter_Visibility? get visibility; - RichObjectParameter_Assignable? get assignable; - String? get conversation; - String? get etag; - String? get permissions; - String? get width; - String? get height; - - /// Rebuilds the instance. - /// - /// The result is the same as this instance but with [updates] applied. - /// [updates] is a function that takes a builder [$RichObjectParameterInterfaceBuilder]. - $RichObjectParameterInterface rebuild(void Function($RichObjectParameterInterfaceBuilder) updates); - - /// Converts the instance to a builder [$RichObjectParameterInterfaceBuilder]. - $RichObjectParameterInterfaceBuilder toBuilder(); - @BuiltValueHook(initializeBuilder: true) - static void _defaults($RichObjectParameterInterfaceBuilder b) {} - @BuiltValueHook(finalizeBuilder: true) - static void _validate($RichObjectParameterInterfaceBuilder b) {} -} - -abstract class RichObjectParameter - implements $RichObjectParameterInterface, Built { - /// Creates a new RichObjectParameter object using the builder pattern. - factory RichObjectParameter([void Function(RichObjectParameterBuilder)? b]) = _$RichObjectParameter; - - // coverage:ignore-start - const RichObjectParameter._(); - // coverage:ignore-end - - /// Creates a new object from the given [json] data. - /// - /// Use [toJson] to serialize it back into json. - // coverage:ignore-start - factory RichObjectParameter.fromJson(Map json) => - _$jsonSerializers.deserializeWith(serializer, json)!; - // coverage:ignore-end - - /// Parses this object into a json like map. - /// - /// Use the fromJson factory to revive it again. - // coverage:ignore-start - Map toJson() => _$jsonSerializers.serializeWith(serializer, this)! as Map; - // coverage:ignore-end - - /// Serializer for RichObjectParameter. - static Serializer get serializer => _$richObjectParameterSerializer; - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(RichObjectParameterBuilder b) { - $RichObjectParameterInterface._defaults(b); - } - - @BuiltValueHook(finalizeBuilder: true) - static void _validate(RichObjectParameterBuilder b) { - $RichObjectParameterInterface._validate(b); - } -} - @BuiltValue(instantiable: false) sealed class $ApiGenerateNotificationV3RequestApplicationJsonInterface { static final _$subject = _$jsonSerializers.deserialize( @@ -1956,13 +1610,19 @@ sealed class $ApiGenerateNotificationV3RequestApplicationJsonInterface { static final _$subjectParameters = _$jsonSerializers.deserialize( const {}, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(RichObjectParameter)]), - )! as BuiltMap; + specifiedType: const FullType(BuiltMap, [ + FullType(String), + FullType(BuiltMap, [FullType(String), FullType(JsonObject)]), + ]), + )! as BuiltMap>; static final _$messageParameters = _$jsonSerializers.deserialize( const {}, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(RichObjectParameter)]), - )! as BuiltMap; + specifiedType: const FullType(BuiltMap, [ + FullType(String), + FullType(BuiltMap, [FullType(String), FullType(JsonObject)]), + ]), + )! as BuiltMap>; /// Subject of the notification. String get subject; @@ -1971,10 +1631,10 @@ sealed class $ApiGenerateNotificationV3RequestApplicationJsonInterface { String get message; /// Rich objects to fill the subject placeholders, {@see \OCP\RichObjectStrings\Definitions}. - BuiltMap get subjectParameters; + BuiltMap> get subjectParameters; /// Rich objects to fill the message placeholders, {@see \OCP\RichObjectStrings\Definitions}. - BuiltMap get messageParameters; + BuiltMap> get messageParameters; /// Rebuilds the instance. /// @@ -2373,9 +2033,9 @@ sealed class $NotificationInterface { String get link; BuiltList get actions; String? get subjectRich; - BuiltMap? get subjectRichParameters; + BuiltMap>? get subjectRichParameters; String? get messageRich; - BuiltMap? get messageRichParameters; + BuiltMap>? get messageRichParameters; String? get icon; bool? get shouldNotify; @@ -4601,15 +4261,16 @@ final Serializers _$serializers = (Serializers().toBuilder() ApiGenerateNotificationV3RequestApplicationJsonBuilder.new, ) ..add(ApiGenerateNotificationV3RequestApplicationJson.serializer) - ..addBuilderFactory(const FullType(RichObjectParameter), RichObjectParameterBuilder.new) - ..add(RichObjectParameter.serializer) - ..add(RichObjectParameter_CallType.serializer) - ..add(RichObjectParameter_PreviewAvailable.serializer) - ..add(RichObjectParameter_Visibility.serializer) - ..add(RichObjectParameter_Assignable.serializer) ..addBuilderFactory( - const FullType(BuiltMap, [FullType(String), FullType(RichObjectParameter)]), - MapBuilder.new, + const FullType(BuiltMap, [FullType(String), FullType(JsonObject)]), + MapBuilder.new, + ) + ..addBuilderFactory( + const FullType(BuiltMap, [ + FullType(String), + FullType(BuiltMap, [FullType(String), FullType(JsonObject)]), + ]), + MapBuilder>.new, ) ..addBuilderFactory( const FullType(ApiGenerateNotificationV3ResponseApplicationJson), diff --git a/packages/nextcloud/lib/src/api/notifications/notifications.openapi.g.dart b/packages/nextcloud/lib/src/api/notifications/notifications.openapi.g.dart index b6794e0efca..3bba995b19e 100644 --- a/packages/nextcloud/lib/src/api/notifications/notifications.openapi.g.dart +++ b/packages/nextcloud/lib/src/api/notifications/notifications.openapi.g.dart @@ -28,92 +28,6 @@ final BuiltSet _$apiGenerateNotificationApiVe _$apiGenerateNotificationApiVersionV2, ]); -const RichObjectParameter_CallType _$richObjectParameterCallTypeOne2one = RichObjectParameter_CallType._('one2one'); -const RichObjectParameter_CallType _$richObjectParameterCallTypeGroup = RichObjectParameter_CallType._('group'); -const RichObjectParameter_CallType _$richObjectParameterCallTypePublic = RichObjectParameter_CallType._('public'); - -RichObjectParameter_CallType _$valueOfRichObjectParameter_CallType(String name) { - switch (name) { - case 'one2one': - return _$richObjectParameterCallTypeOne2one; - case 'group': - return _$richObjectParameterCallTypeGroup; - case 'public': - return _$richObjectParameterCallTypePublic; - default: - throw ArgumentError(name); - } -} - -final BuiltSet _$richObjectParameterCallTypeValues = - BuiltSet(const [ - _$richObjectParameterCallTypeOne2one, - _$richObjectParameterCallTypeGroup, - _$richObjectParameterCallTypePublic, -]); - -const RichObjectParameter_PreviewAvailable _$richObjectParameterPreviewAvailableYes = - RichObjectParameter_PreviewAvailable._('yes'); -const RichObjectParameter_PreviewAvailable _$richObjectParameterPreviewAvailableNo = - RichObjectParameter_PreviewAvailable._('no'); - -RichObjectParameter_PreviewAvailable _$valueOfRichObjectParameter_PreviewAvailable(String name) { - switch (name) { - case 'yes': - return _$richObjectParameterPreviewAvailableYes; - case 'no': - return _$richObjectParameterPreviewAvailableNo; - default: - throw ArgumentError(name); - } -} - -final BuiltSet _$richObjectParameterPreviewAvailableValues = - BuiltSet(const [ - _$richObjectParameterPreviewAvailableYes, - _$richObjectParameterPreviewAvailableNo, -]); - -const RichObjectParameter_Visibility _$richObjectParameterVisibility$0 = RichObjectParameter_Visibility._('\$0'); -const RichObjectParameter_Visibility _$richObjectParameterVisibility$1 = RichObjectParameter_Visibility._('\$1'); - -RichObjectParameter_Visibility _$valueOfRichObjectParameter_Visibility(String name) { - switch (name) { - case '\$0': - return _$richObjectParameterVisibility$0; - case '\$1': - return _$richObjectParameterVisibility$1; - default: - throw ArgumentError(name); - } -} - -final BuiltSet _$richObjectParameterVisibilityValues = - BuiltSet(const [ - _$richObjectParameterVisibility$0, - _$richObjectParameterVisibility$1, -]); - -const RichObjectParameter_Assignable _$richObjectParameterAssignable$0 = RichObjectParameter_Assignable._('\$0'); -const RichObjectParameter_Assignable _$richObjectParameterAssignable$1 = RichObjectParameter_Assignable._('\$1'); - -RichObjectParameter_Assignable _$valueOfRichObjectParameter_Assignable(String name) { - switch (name) { - case '\$0': - return _$richObjectParameterAssignable$0; - case '\$1': - return _$richObjectParameterAssignable$1; - default: - throw ArgumentError(name); - } -} - -final BuiltSet _$richObjectParameterAssignableValues = - BuiltSet(const [ - _$richObjectParameterAssignable$0, - _$richObjectParameterAssignable$1, -]); - const EndpointListNotificationsApiVersion _$endpointListNotificationsApiVersionV1 = EndpointListNotificationsApiVersion._('v1'); const EndpointListNotificationsApiVersion _$endpointListNotificationsApiVersionV2 = @@ -296,7 +210,6 @@ Serializer _$ApiGenerateNotificationResponseApplicationJson_OcsSerializer(); Serializer _$apiGenerateNotificationResponseApplicationJsonSerializer = _$ApiGenerateNotificationResponseApplicationJsonSerializer(); -Serializer _$richObjectParameterSerializer = _$RichObjectParameterSerializer(); Serializer _$apiGenerateNotificationV3RequestApplicationJsonSerializer = _$ApiGenerateNotificationV3RequestApplicationJsonSerializer(); @@ -580,275 +493,6 @@ class _$ApiGenerateNotificationResponseApplicationJsonSerializer } } -class _$RichObjectParameterSerializer implements StructuredSerializer { - @override - final Iterable types = const [RichObjectParameter, _$RichObjectParameter]; - @override - final String wireName = 'RichObjectParameter'; - - @override - Iterable serialize(Serializers serializers, RichObjectParameter object, - {FullType specifiedType = FullType.unspecified}) { - final result = [ - 'type', - serializers.serialize(object.type, specifiedType: const FullType(String)), - 'id', - serializers.serialize(object.id, specifiedType: const FullType(String)), - 'name', - serializers.serialize(object.name, specifiedType: const FullType(String)), - ]; - Object? value; - value = object.server; - if (value != null) { - result - ..add('server') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - value = object.link; - if (value != null) { - result - ..add('link') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - value = object.callType; - if (value != null) { - result - ..add('call-type') - ..add(serializers.serialize(value, specifiedType: const FullType(RichObjectParameter_CallType))); - } - value = object.iconUrl; - if (value != null) { - result - ..add('icon-url') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - value = object.messageId; - if (value != null) { - result - ..add('message-id') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - value = object.boardname; - if (value != null) { - result - ..add('boardname') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - value = object.stackname; - if (value != null) { - result - ..add('stackname') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - value = object.size; - if (value != null) { - result - ..add('size') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - value = object.path; - if (value != null) { - result - ..add('path') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - value = object.mimetype; - if (value != null) { - result - ..add('mimetype') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - value = object.previewAvailable; - if (value != null) { - result - ..add('preview-available') - ..add(serializers.serialize(value, specifiedType: const FullType(RichObjectParameter_PreviewAvailable))); - } - value = object.mtime; - if (value != null) { - result - ..add('mtime') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - value = object.latitude; - if (value != null) { - result - ..add('latitude') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - value = object.longitude; - if (value != null) { - result - ..add('longitude') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - value = object.description; - if (value != null) { - result - ..add('description') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - value = object.thumb; - if (value != null) { - result - ..add('thumb') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - value = object.website; - if (value != null) { - result - ..add('website') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - value = object.visibility; - if (value != null) { - result - ..add('visibility') - ..add(serializers.serialize(value, specifiedType: const FullType(RichObjectParameter_Visibility))); - } - value = object.assignable; - if (value != null) { - result - ..add('assignable') - ..add(serializers.serialize(value, specifiedType: const FullType(RichObjectParameter_Assignable))); - } - value = object.conversation; - if (value != null) { - result - ..add('conversation') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - value = object.etag; - if (value != null) { - result - ..add('etag') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - value = object.permissions; - if (value != null) { - result - ..add('permissions') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - value = object.width; - if (value != null) { - result - ..add('width') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - value = object.height; - if (value != null) { - result - ..add('height') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - return result; - } - - @override - RichObjectParameter deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = RichObjectParameterBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current! as String; - iterator.moveNext(); - final Object? value = iterator.current; - switch (key) { - case 'type': - result.type = serializers.deserialize(value, specifiedType: const FullType(String))! as String; - break; - case 'id': - result.id = serializers.deserialize(value, specifiedType: const FullType(String))! as String; - break; - case 'name': - result.name = serializers.deserialize(value, specifiedType: const FullType(String))! as String; - break; - case 'server': - result.server = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - case 'link': - result.link = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - case 'call-type': - result.callType = serializers.deserialize(value, specifiedType: const FullType(RichObjectParameter_CallType)) - as RichObjectParameter_CallType?; - break; - case 'icon-url': - result.iconUrl = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - case 'message-id': - result.messageId = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - case 'boardname': - result.boardname = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - case 'stackname': - result.stackname = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - case 'size': - result.size = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - case 'path': - result.path = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - case 'mimetype': - result.mimetype = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - case 'preview-available': - result.previewAvailable = - serializers.deserialize(value, specifiedType: const FullType(RichObjectParameter_PreviewAvailable)) - as RichObjectParameter_PreviewAvailable?; - break; - case 'mtime': - result.mtime = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - case 'latitude': - result.latitude = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - case 'longitude': - result.longitude = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - case 'description': - result.description = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - case 'thumb': - result.thumb = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - case 'website': - result.website = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - case 'visibility': - result.visibility = serializers.deserialize(value, - specifiedType: const FullType(RichObjectParameter_Visibility)) as RichObjectParameter_Visibility?; - break; - case 'assignable': - result.assignable = serializers.deserialize(value, - specifiedType: const FullType(RichObjectParameter_Assignable)) as RichObjectParameter_Assignable?; - break; - case 'conversation': - result.conversation = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - case 'etag': - result.etag = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - case 'permissions': - result.permissions = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - case 'width': - result.width = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - case 'height': - result.height = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - } - } - - return result.build(); - } -} - class _$ApiGenerateNotificationV3RequestApplicationJsonSerializer implements StructuredSerializer { @override @@ -869,10 +513,16 @@ class _$ApiGenerateNotificationV3RequestApplicationJsonSerializer serializers.serialize(object.message, specifiedType: const FullType(String)), 'subjectParameters', serializers.serialize(object.subjectParameters, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(RichObjectParameter)])), + specifiedType: const FullType(BuiltMap, [ + FullType(String), + FullType(BuiltMap, [FullType(String), FullType(JsonObject)]) + ])), 'messageParameters', serializers.serialize(object.messageParameters, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(RichObjectParameter)])), + specifiedType: const FullType(BuiltMap, [ + FullType(String), + FullType(BuiltMap, [FullType(String), FullType(JsonObject)]) + ])), ]; return result; @@ -897,11 +547,17 @@ class _$ApiGenerateNotificationV3RequestApplicationJsonSerializer break; case 'subjectParameters': result.subjectParameters.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(RichObjectParameter)]))!); + specifiedType: const FullType(BuiltMap, [ + FullType(String), + FullType(BuiltMap, [FullType(String), FullType(JsonObject)]) + ]))!); break; case 'messageParameters': result.messageParameters.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(RichObjectParameter)]))!); + specifiedType: const FullType(BuiltMap, [ + FullType(String), + FullType(BuiltMap, [FullType(String), FullType(JsonObject)]) + ]))!); break; } } @@ -1145,7 +801,10 @@ class _$NotificationSerializer implements StructuredSerializer { result ..add('subjectRichParameters') ..add(serializers.serialize(value, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(RichObjectParameter)]))); + specifiedType: const FullType(BuiltMap, [ + FullType(String), + FullType(BuiltMap, [FullType(String), FullType(JsonObject)]) + ]))); } value = object.messageRich; if (value != null) { @@ -1158,7 +817,10 @@ class _$NotificationSerializer implements StructuredSerializer { result ..add('messageRichParameters') ..add(serializers.serialize(value, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(RichObjectParameter)]))); + specifiedType: const FullType(BuiltMap, [ + FullType(String), + FullType(BuiltMap, [FullType(String), FullType(JsonObject)]) + ]))); } value = object.icon; if (value != null) { @@ -1222,14 +884,20 @@ class _$NotificationSerializer implements StructuredSerializer { break; case 'subjectRichParameters': result.subjectRichParameters.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(RichObjectParameter)]))!); + specifiedType: const FullType(BuiltMap, [ + FullType(String), + FullType(BuiltMap, [FullType(String), FullType(JsonObject)]) + ]))!); break; case 'messageRich': result.messageRich = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; break; case 'messageRichParameters': result.messageRichParameters.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(RichObjectParameter)]))!); + specifiedType: const FullType(BuiltMap, [ + FullType(String), + FullType(BuiltMap, [FullType(String), FullType(JsonObject)]) + ]))!); break; case 'icon': result.icon = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; @@ -2948,494 +2616,6 @@ class ApiGenerateNotificationResponseApplicationJsonBuilder } } -abstract mixin class $RichObjectParameterInterfaceBuilder { - void replace($RichObjectParameterInterface other); - void update(void Function($RichObjectParameterInterfaceBuilder) updates); - String? get type; - set type(String? type); - - String? get id; - set id(String? id); - - String? get name; - set name(String? name); - - String? get server; - set server(String? server); - - String? get link; - set link(String? link); - - RichObjectParameter_CallType? get callType; - set callType(RichObjectParameter_CallType? callType); - - String? get iconUrl; - set iconUrl(String? iconUrl); - - String? get messageId; - set messageId(String? messageId); - - String? get boardname; - set boardname(String? boardname); - - String? get stackname; - set stackname(String? stackname); - - String? get size; - set size(String? size); - - String? get path; - set path(String? path); - - String? get mimetype; - set mimetype(String? mimetype); - - RichObjectParameter_PreviewAvailable? get previewAvailable; - set previewAvailable(RichObjectParameter_PreviewAvailable? previewAvailable); - - String? get mtime; - set mtime(String? mtime); - - String? get latitude; - set latitude(String? latitude); - - String? get longitude; - set longitude(String? longitude); - - String? get description; - set description(String? description); - - String? get thumb; - set thumb(String? thumb); - - String? get website; - set website(String? website); - - RichObjectParameter_Visibility? get visibility; - set visibility(RichObjectParameter_Visibility? visibility); - - RichObjectParameter_Assignable? get assignable; - set assignable(RichObjectParameter_Assignable? assignable); - - String? get conversation; - set conversation(String? conversation); - - String? get etag; - set etag(String? etag); - - String? get permissions; - set permissions(String? permissions); - - String? get width; - set width(String? width); - - String? get height; - set height(String? height); -} - -class _$RichObjectParameter extends RichObjectParameter { - @override - final String type; - @override - final String id; - @override - final String name; - @override - final String? server; - @override - final String? link; - @override - final RichObjectParameter_CallType? callType; - @override - final String? iconUrl; - @override - final String? messageId; - @override - final String? boardname; - @override - final String? stackname; - @override - final String? size; - @override - final String? path; - @override - final String? mimetype; - @override - final RichObjectParameter_PreviewAvailable? previewAvailable; - @override - final String? mtime; - @override - final String? latitude; - @override - final String? longitude; - @override - final String? description; - @override - final String? thumb; - @override - final String? website; - @override - final RichObjectParameter_Visibility? visibility; - @override - final RichObjectParameter_Assignable? assignable; - @override - final String? conversation; - @override - final String? etag; - @override - final String? permissions; - @override - final String? width; - @override - final String? height; - - factory _$RichObjectParameter([void Function(RichObjectParameterBuilder)? updates]) => - (RichObjectParameterBuilder()..update(updates))._build(); - - _$RichObjectParameter._( - {required this.type, - required this.id, - required this.name, - this.server, - this.link, - this.callType, - this.iconUrl, - this.messageId, - this.boardname, - this.stackname, - this.size, - this.path, - this.mimetype, - this.previewAvailable, - this.mtime, - this.latitude, - this.longitude, - this.description, - this.thumb, - this.website, - this.visibility, - this.assignable, - this.conversation, - this.etag, - this.permissions, - this.width, - this.height}) - : super._() { - BuiltValueNullFieldError.checkNotNull(type, r'RichObjectParameter', 'type'); - BuiltValueNullFieldError.checkNotNull(id, r'RichObjectParameter', 'id'); - BuiltValueNullFieldError.checkNotNull(name, r'RichObjectParameter', 'name'); - } - - @override - RichObjectParameter rebuild(void Function(RichObjectParameterBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - RichObjectParameterBuilder toBuilder() => RichObjectParameterBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is RichObjectParameter && - type == other.type && - id == other.id && - name == other.name && - server == other.server && - link == other.link && - callType == other.callType && - iconUrl == other.iconUrl && - messageId == other.messageId && - boardname == other.boardname && - stackname == other.stackname && - size == other.size && - path == other.path && - mimetype == other.mimetype && - previewAvailable == other.previewAvailable && - mtime == other.mtime && - latitude == other.latitude && - longitude == other.longitude && - description == other.description && - thumb == other.thumb && - website == other.website && - visibility == other.visibility && - assignable == other.assignable && - conversation == other.conversation && - etag == other.etag && - permissions == other.permissions && - width == other.width && - height == other.height; - } - - @override - int get hashCode { - var _$hash = 0; - _$hash = $jc(_$hash, type.hashCode); - _$hash = $jc(_$hash, id.hashCode); - _$hash = $jc(_$hash, name.hashCode); - _$hash = $jc(_$hash, server.hashCode); - _$hash = $jc(_$hash, link.hashCode); - _$hash = $jc(_$hash, callType.hashCode); - _$hash = $jc(_$hash, iconUrl.hashCode); - _$hash = $jc(_$hash, messageId.hashCode); - _$hash = $jc(_$hash, boardname.hashCode); - _$hash = $jc(_$hash, stackname.hashCode); - _$hash = $jc(_$hash, size.hashCode); - _$hash = $jc(_$hash, path.hashCode); - _$hash = $jc(_$hash, mimetype.hashCode); - _$hash = $jc(_$hash, previewAvailable.hashCode); - _$hash = $jc(_$hash, mtime.hashCode); - _$hash = $jc(_$hash, latitude.hashCode); - _$hash = $jc(_$hash, longitude.hashCode); - _$hash = $jc(_$hash, description.hashCode); - _$hash = $jc(_$hash, thumb.hashCode); - _$hash = $jc(_$hash, website.hashCode); - _$hash = $jc(_$hash, visibility.hashCode); - _$hash = $jc(_$hash, assignable.hashCode); - _$hash = $jc(_$hash, conversation.hashCode); - _$hash = $jc(_$hash, etag.hashCode); - _$hash = $jc(_$hash, permissions.hashCode); - _$hash = $jc(_$hash, width.hashCode); - _$hash = $jc(_$hash, height.hashCode); - _$hash = $jf(_$hash); - return _$hash; - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'RichObjectParameter') - ..add('type', type) - ..add('id', id) - ..add('name', name) - ..add('server', server) - ..add('link', link) - ..add('callType', callType) - ..add('iconUrl', iconUrl) - ..add('messageId', messageId) - ..add('boardname', boardname) - ..add('stackname', stackname) - ..add('size', size) - ..add('path', path) - ..add('mimetype', mimetype) - ..add('previewAvailable', previewAvailable) - ..add('mtime', mtime) - ..add('latitude', latitude) - ..add('longitude', longitude) - ..add('description', description) - ..add('thumb', thumb) - ..add('website', website) - ..add('visibility', visibility) - ..add('assignable', assignable) - ..add('conversation', conversation) - ..add('etag', etag) - ..add('permissions', permissions) - ..add('width', width) - ..add('height', height)) - .toString(); - } -} - -class RichObjectParameterBuilder - implements Builder, $RichObjectParameterInterfaceBuilder { - _$RichObjectParameter? _$v; - - String? _type; - String? get type => _$this._type; - set type(covariant String? type) => _$this._type = type; - - String? _id; - String? get id => _$this._id; - set id(covariant String? id) => _$this._id = id; - - String? _name; - String? get name => _$this._name; - set name(covariant String? name) => _$this._name = name; - - String? _server; - String? get server => _$this._server; - set server(covariant String? server) => _$this._server = server; - - String? _link; - String? get link => _$this._link; - set link(covariant String? link) => _$this._link = link; - - RichObjectParameter_CallType? _callType; - RichObjectParameter_CallType? get callType => _$this._callType; - set callType(covariant RichObjectParameter_CallType? callType) => _$this._callType = callType; - - String? _iconUrl; - String? get iconUrl => _$this._iconUrl; - set iconUrl(covariant String? iconUrl) => _$this._iconUrl = iconUrl; - - String? _messageId; - String? get messageId => _$this._messageId; - set messageId(covariant String? messageId) => _$this._messageId = messageId; - - String? _boardname; - String? get boardname => _$this._boardname; - set boardname(covariant String? boardname) => _$this._boardname = boardname; - - String? _stackname; - String? get stackname => _$this._stackname; - set stackname(covariant String? stackname) => _$this._stackname = stackname; - - String? _size; - String? get size => _$this._size; - set size(covariant String? size) => _$this._size = size; - - String? _path; - String? get path => _$this._path; - set path(covariant String? path) => _$this._path = path; - - String? _mimetype; - String? get mimetype => _$this._mimetype; - set mimetype(covariant String? mimetype) => _$this._mimetype = mimetype; - - RichObjectParameter_PreviewAvailable? _previewAvailable; - RichObjectParameter_PreviewAvailable? get previewAvailable => _$this._previewAvailable; - set previewAvailable(covariant RichObjectParameter_PreviewAvailable? previewAvailable) => - _$this._previewAvailable = previewAvailable; - - String? _mtime; - String? get mtime => _$this._mtime; - set mtime(covariant String? mtime) => _$this._mtime = mtime; - - String? _latitude; - String? get latitude => _$this._latitude; - set latitude(covariant String? latitude) => _$this._latitude = latitude; - - String? _longitude; - String? get longitude => _$this._longitude; - set longitude(covariant String? longitude) => _$this._longitude = longitude; - - String? _description; - String? get description => _$this._description; - set description(covariant String? description) => _$this._description = description; - - String? _thumb; - String? get thumb => _$this._thumb; - set thumb(covariant String? thumb) => _$this._thumb = thumb; - - String? _website; - String? get website => _$this._website; - set website(covariant String? website) => _$this._website = website; - - RichObjectParameter_Visibility? _visibility; - RichObjectParameter_Visibility? get visibility => _$this._visibility; - set visibility(covariant RichObjectParameter_Visibility? visibility) => _$this._visibility = visibility; - - RichObjectParameter_Assignable? _assignable; - RichObjectParameter_Assignable? get assignable => _$this._assignable; - set assignable(covariant RichObjectParameter_Assignable? assignable) => _$this._assignable = assignable; - - String? _conversation; - String? get conversation => _$this._conversation; - set conversation(covariant String? conversation) => _$this._conversation = conversation; - - String? _etag; - String? get etag => _$this._etag; - set etag(covariant String? etag) => _$this._etag = etag; - - String? _permissions; - String? get permissions => _$this._permissions; - set permissions(covariant String? permissions) => _$this._permissions = permissions; - - String? _width; - String? get width => _$this._width; - set width(covariant String? width) => _$this._width = width; - - String? _height; - String? get height => _$this._height; - set height(covariant String? height) => _$this._height = height; - - RichObjectParameterBuilder() { - RichObjectParameter._defaults(this); - } - - RichObjectParameterBuilder get _$this { - final $v = _$v; - if ($v != null) { - _type = $v.type; - _id = $v.id; - _name = $v.name; - _server = $v.server; - _link = $v.link; - _callType = $v.callType; - _iconUrl = $v.iconUrl; - _messageId = $v.messageId; - _boardname = $v.boardname; - _stackname = $v.stackname; - _size = $v.size; - _path = $v.path; - _mimetype = $v.mimetype; - _previewAvailable = $v.previewAvailable; - _mtime = $v.mtime; - _latitude = $v.latitude; - _longitude = $v.longitude; - _description = $v.description; - _thumb = $v.thumb; - _website = $v.website; - _visibility = $v.visibility; - _assignable = $v.assignable; - _conversation = $v.conversation; - _etag = $v.etag; - _permissions = $v.permissions; - _width = $v.width; - _height = $v.height; - _$v = null; - } - return this; - } - - @override - void replace(covariant RichObjectParameter other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$RichObjectParameter; - } - - @override - void update(void Function(RichObjectParameterBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - RichObjectParameter build() => _build(); - - _$RichObjectParameter _build() { - RichObjectParameter._validate(this); - final _$result = _$v ?? - _$RichObjectParameter._( - type: BuiltValueNullFieldError.checkNotNull(type, r'RichObjectParameter', 'type'), - id: BuiltValueNullFieldError.checkNotNull(id, r'RichObjectParameter', 'id'), - name: BuiltValueNullFieldError.checkNotNull(name, r'RichObjectParameter', 'name'), - server: server, - link: link, - callType: callType, - iconUrl: iconUrl, - messageId: messageId, - boardname: boardname, - stackname: stackname, - size: size, - path: path, - mimetype: mimetype, - previewAvailable: previewAvailable, - mtime: mtime, - latitude: latitude, - longitude: longitude, - description: description, - thumb: thumb, - website: website, - visibility: visibility, - assignable: assignable, - conversation: conversation, - etag: etag, - permissions: permissions, - width: width, - height: height); - replace(_$result); - return _$result; - } -} - abstract mixin class $ApiGenerateNotificationV3RequestApplicationJsonInterfaceBuilder { void replace($ApiGenerateNotificationV3RequestApplicationJsonInterface other); void update(void Function($ApiGenerateNotificationV3RequestApplicationJsonInterfaceBuilder) updates); @@ -3445,11 +2625,11 @@ abstract mixin class $ApiGenerateNotificationV3RequestApplicationJsonInterfaceBu String? get message; set message(String? message); - MapBuilder get subjectParameters; - set subjectParameters(MapBuilder? subjectParameters); + MapBuilder> get subjectParameters; + set subjectParameters(MapBuilder>? subjectParameters); - MapBuilder get messageParameters; - set messageParameters(MapBuilder? messageParameters); + MapBuilder> get messageParameters; + set messageParameters(MapBuilder>? messageParameters); } class _$ApiGenerateNotificationV3RequestApplicationJson extends ApiGenerateNotificationV3RequestApplicationJson { @@ -3458,9 +2638,9 @@ class _$ApiGenerateNotificationV3RequestApplicationJson extends ApiGenerateNotif @override final String message; @override - final BuiltMap subjectParameters; + final BuiltMap> subjectParameters; @override - final BuiltMap messageParameters; + final BuiltMap> messageParameters; factory _$ApiGenerateNotificationV3RequestApplicationJson( [void Function(ApiGenerateNotificationV3RequestApplicationJsonBuilder)? updates]) => @@ -3533,16 +2713,16 @@ class ApiGenerateNotificationV3RequestApplicationJsonBuilder String? get message => _$this._message; set message(covariant String? message) => _$this._message = message; - MapBuilder? _subjectParameters; - MapBuilder get subjectParameters => - _$this._subjectParameters ??= MapBuilder(); - set subjectParameters(covariant MapBuilder? subjectParameters) => + MapBuilder>? _subjectParameters; + MapBuilder> get subjectParameters => + _$this._subjectParameters ??= MapBuilder>(); + set subjectParameters(covariant MapBuilder>? subjectParameters) => _$this._subjectParameters = subjectParameters; - MapBuilder? _messageParameters; - MapBuilder get messageParameters => - _$this._messageParameters ??= MapBuilder(); - set messageParameters(covariant MapBuilder? messageParameters) => + MapBuilder>? _messageParameters; + MapBuilder> get messageParameters => + _$this._messageParameters ??= MapBuilder>(); + set messageParameters(covariant MapBuilder>? messageParameters) => _$this._messageParameters = messageParameters; ApiGenerateNotificationV3RequestApplicationJsonBuilder() { @@ -4115,14 +3295,14 @@ abstract mixin class $NotificationInterfaceBuilder { String? get subjectRich; set subjectRich(String? subjectRich); - MapBuilder get subjectRichParameters; - set subjectRichParameters(MapBuilder? subjectRichParameters); + MapBuilder> get subjectRichParameters; + set subjectRichParameters(MapBuilder>? subjectRichParameters); String? get messageRich; set messageRich(String? messageRich); - MapBuilder get messageRichParameters; - set messageRichParameters(MapBuilder? messageRichParameters); + MapBuilder> get messageRichParameters; + set messageRichParameters(MapBuilder>? messageRichParameters); String? get icon; set icon(String? icon); @@ -4155,11 +3335,11 @@ class _$Notification extends Notification { @override final String? subjectRich; @override - final BuiltMap? subjectRichParameters; + final BuiltMap>? subjectRichParameters; @override final String? messageRich; @override - final BuiltMap? messageRichParameters; + final BuiltMap>? messageRichParameters; @override final String? icon; @override @@ -4319,20 +3499,20 @@ class NotificationBuilder implements Builder, String? get subjectRich => _$this._subjectRich; set subjectRich(covariant String? subjectRich) => _$this._subjectRich = subjectRich; - MapBuilder? _subjectRichParameters; - MapBuilder get subjectRichParameters => - _$this._subjectRichParameters ??= MapBuilder(); - set subjectRichParameters(covariant MapBuilder? subjectRichParameters) => + MapBuilder>? _subjectRichParameters; + MapBuilder> get subjectRichParameters => + _$this._subjectRichParameters ??= MapBuilder>(); + set subjectRichParameters(covariant MapBuilder>? subjectRichParameters) => _$this._subjectRichParameters = subjectRichParameters; String? _messageRich; String? get messageRich => _$this._messageRich; set messageRich(covariant String? messageRich) => _$this._messageRich = messageRich; - MapBuilder? _messageRichParameters; - MapBuilder get messageRichParameters => - _$this._messageRichParameters ??= MapBuilder(); - set messageRichParameters(covariant MapBuilder? messageRichParameters) => + MapBuilder>? _messageRichParameters; + MapBuilder> get messageRichParameters => + _$this._messageRichParameters ??= MapBuilder>(); + set messageRichParameters(covariant MapBuilder>? messageRichParameters) => _$this._messageRichParameters = messageRichParameters; String? _icon; diff --git a/packages/nextcloud/lib/src/api/notifications/notifications.openapi.json b/packages/nextcloud/lib/src/api/notifications/notifications.openapi.json index a008476c7fd..e9801be3c3e 100644 --- a/packages/nextcloud/lib/src/api/notifications/notifications.openapi.json +++ b/packages/nextcloud/lib/src/api/notifications/notifications.openapi.json @@ -112,7 +112,10 @@ "subjectRichParameters": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/RichObjectParameter" + "type": "object", + "additionalProperties": { + "type": "object" + } } }, "messageRich": { @@ -121,7 +124,10 @@ "messageRichParameters": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/RichObjectParameter" + "type": "object", + "additionalProperties": { + "type": "object" + } } }, "icon": { @@ -197,114 +203,6 @@ "type": "string" } } - }, - "RichObjectParameter": { - "type": "object", - "required": [ - "type", - "id", - "name" - ], - "properties": { - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "server": { - "type": "string" - }, - "link": { - "type": "string" - }, - "call-type": { - "type": "string", - "enum": [ - "one2one", - "group", - "public" - ] - }, - "icon-url": { - "type": "string" - }, - "message-id": { - "type": "string" - }, - "boardname": { - "type": "string" - }, - "stackname": { - "type": "string" - }, - "size": { - "type": "string" - }, - "path": { - "type": "string" - }, - "mimetype": { - "type": "string" - }, - "preview-available": { - "type": "string", - "enum": [ - "yes", - "no" - ] - }, - "mtime": { - "type": "string" - }, - "latitude": { - "type": "string" - }, - "longitude": { - "type": "string" - }, - "description": { - "type": "string" - }, - "thumb": { - "type": "string" - }, - "website": { - "type": "string" - }, - "visibility": { - "type": "string", - "enum": [ - "0", - "1" - ] - }, - "assignable": { - "type": "string", - "enum": [ - "0", - "1" - ] - }, - "conversation": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "permissions": { - "type": "string" - }, - "width": { - "type": "string" - }, - "height": { - "type": "string" - } - } } } }, @@ -1231,7 +1129,10 @@ "default": {}, "description": "Rich objects to fill the subject placeholders, {@see \\OCP\\RichObjectStrings\\Definitions}", "additionalProperties": { - "$ref": "#/components/schemas/RichObjectParameter" + "type": "object", + "additionalProperties": { + "type": "object" + } } }, "messageParameters": { @@ -1239,7 +1140,10 @@ "default": {}, "description": "Rich objects to fill the message placeholders, {@see \\OCP\\RichObjectStrings\\Definitions}", "additionalProperties": { - "$ref": "#/components/schemas/RichObjectParameter" + "type": "object", + "additionalProperties": { + "type": "object" + } } } } diff --git a/packages/nextcloud/lib/src/api/notifications/patches/0-rich-parameters.json b/packages/nextcloud/lib/src/api/notifications/patches/0-rich-parameters.json new file mode 100644 index 00000000000..4d47231a49e --- /dev/null +++ b/packages/nextcloud/lib/src/api/notifications/patches/0-rich-parameters.json @@ -0,0 +1,46 @@ +[ + { + "op": "remove", + "path": "/components/schemas/RichObjectParameter" + }, + { + "op": "replace", + "path": "/components/schemas/Notification/properties/subjectRichParameters/additionalProperties", + "value": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + }, + { + "op": "replace", + "path": "/components/schemas/Notification/properties/messageRichParameters/additionalProperties", + "value": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + }, + { + "op": "replace", + "path": "/paths/~1ocs~1v2.php~1apps~1notifications~1api~1{apiVersion3}~1admin_notifications~1{userId}/post/requestBody/content/application~1json/schema/properties/subjectParameters/additionalProperties", + "value": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + }, + { + "op": "replace", + "path": "/paths/~1ocs~1v2.php~1apps~1notifications~1api~1{apiVersion3}~1admin_notifications~1{userId}/post/requestBody/content/application~1json/schema/properties/messageParameters/additionalProperties", + "value": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } +] diff --git a/packages/nextcloud/lib/src/api/spreed/patches/1-rich-parameters.json b/packages/nextcloud/lib/src/api/spreed/patches/1-rich-parameters.json new file mode 100644 index 00000000000..451821c9525 --- /dev/null +++ b/packages/nextcloud/lib/src/api/spreed/patches/1-rich-parameters.json @@ -0,0 +1,19 @@ +[ + { + "op": "remove", + "path": "/components/schemas/RichObjectParameter" + }, + { + "op": "replace", + "path": "/components/schemas/BaseMessage/properties/messageParameters", + "value": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } + } +] diff --git a/packages/nextcloud/lib/src/api/spreed/patches/3-compatibility-18.json b/packages/nextcloud/lib/src/api/spreed/patches/3-compatibility-18.json index 2eb47481f23..aaab2a135a4 100644 --- a/packages/nextcloud/lib/src/api/spreed/patches/3-compatibility-18.json +++ b/packages/nextcloud/lib/src/api/spreed/patches/3-compatibility-18.json @@ -8,53 +8,5 @@ "op": "replace", "path": "/components/schemas/ChatMentionSuggestion/required", "value": ["id", "label", "source"] - }, - { - "op": "remove", - "path": "/components/schemas/RichObjectParameter/properties/width/type" - }, - { - "op": "add", - "path": "/components/schemas/RichObjectParameter/properties/width/oneOf", - "value": [ - { - "type": "string" - }, - { - "type": "integer" - } - ] - }, - { - "op": "remove", - "path": "/components/schemas/RichObjectParameter/properties/height/type" - }, - { - "op": "add", - "path": "/components/schemas/RichObjectParameter/properties/height/oneOf", - "value": [ - { - "type": "string" - }, - { - "type": "integer" - } - ] - }, - { - "op": "remove", - "path": "/components/schemas/RichObjectParameter/properties/size/type" - }, - { - "op": "add", - "path": "/components/schemas/RichObjectParameter/properties/size/oneOf", - "value": [ - { - "type": "string" - }, - { - "type": "integer" - } - ] } ] diff --git a/packages/nextcloud/lib/src/api/spreed/spreed.openapi.dart b/packages/nextcloud/lib/src/api/spreed/spreed.openapi.dart index 8ec26d09741..8d9734f4b28 100644 --- a/packages/nextcloud/lib/src/api/spreed/spreed.openapi.dart +++ b/packages/nextcloud/lib/src/api/spreed/spreed.openapi.dart @@ -16437,333 +16437,6 @@ class _$ActorTypeSerializer implements PrimitiveSerializer { _fromWire[serialized]!; } -class RichObjectParameter_Type extends EnumClass { - const RichObjectParameter_Type._(super.name); - - /// `addressbook` - static const RichObjectParameter_Type addressbook = _$richObjectParameterTypeAddressbook; - - /// `addressbook-contact` - @BuiltValueEnumConst(wireName: 'addressbook-contact') - static const RichObjectParameter_Type addressbookContact = _$richObjectParameterTypeAddressbookContact; - - /// `announcement` - static const RichObjectParameter_Type announcement = _$richObjectParameterTypeAnnouncement; - - /// `app` - static const RichObjectParameter_Type app = _$richObjectParameterTypeApp; - - /// `calendar` - static const RichObjectParameter_Type calendar = _$richObjectParameterTypeCalendar; - - /// `calendar-event` - @BuiltValueEnumConst(wireName: 'calendar-event') - static const RichObjectParameter_Type calendarEvent = _$richObjectParameterTypeCalendarEvent; - - /// `call` - static const RichObjectParameter_Type call = _$richObjectParameterTypeCall; - - /// `circle` - static const RichObjectParameter_Type circle = _$richObjectParameterTypeCircle; - - /// `deck-board` - @BuiltValueEnumConst(wireName: 'deck-board') - static const RichObjectParameter_Type deckBoard = _$richObjectParameterTypeDeckBoard; - - /// `deck-card` - @BuiltValueEnumConst(wireName: 'deck-card') - static const RichObjectParameter_Type deckCard = _$richObjectParameterTypeDeckCard; - - /// `email` - static const RichObjectParameter_Type email = _$richObjectParameterTypeEmail; - - /// `file` - static const RichObjectParameter_Type file = _$richObjectParameterTypeFile; - - /// `forms-form` - @BuiltValueEnumConst(wireName: 'forms-form') - static const RichObjectParameter_Type formsForm = _$richObjectParameterTypeFormsForm; - - /// `guest` - static const RichObjectParameter_Type guest = _$richObjectParameterTypeGuest; - - /// `highlight` - static const RichObjectParameter_Type highlight = _$richObjectParameterTypeHighlight; - - /// `geo-location` - @BuiltValueEnumConst(wireName: 'geo-location') - static const RichObjectParameter_Type geoLocation = _$richObjectParameterTypeGeoLocation; - - /// `open-graph` - @BuiltValueEnumConst(wireName: 'open-graph') - static const RichObjectParameter_Type openGraph = _$richObjectParameterTypeOpenGraph; - - /// `pending-federated-share` - @BuiltValueEnumConst(wireName: 'pending-federated-share') - static const RichObjectParameter_Type pendingFederatedShare = _$richObjectParameterTypePendingFederatedShare; - - /// `systemtag` - static const RichObjectParameter_Type systemtag = _$richObjectParameterTypeSystemtag; - - /// `talk-attachment` - @BuiltValueEnumConst(wireName: 'talk-attachment') - static const RichObjectParameter_Type talkAttachment = _$richObjectParameterTypeTalkAttachment; - - /// `talk-poll` - @BuiltValueEnumConst(wireName: 'talk-poll') - static const RichObjectParameter_Type talkPoll = _$richObjectParameterTypeTalkPoll; - - /// `user` - static const RichObjectParameter_Type user = _$richObjectParameterTypeUser; - - /// `user-group` - @BuiltValueEnumConst(wireName: 'user-group') - static const RichObjectParameter_Type userGroup = _$richObjectParameterTypeUserGroup; - - /// Returns a set with all values this enum contains. - // coverage:ignore-start - static BuiltSet get values => _$richObjectParameterTypeValues; - // coverage:ignore-end - - /// Returns the enum value associated to the [name]. - static RichObjectParameter_Type valueOf(String name) => _$valueOfRichObjectParameter_Type(name); - - /// Returns the serialized value of this enum value. - String get value => _$jsonSerializers.serializeWith(serializer, this)! as String; - - /// Serializer for RichObjectParameter_Type. - @BuiltValueSerializer(custom: true) - static Serializer get serializer => const _$RichObjectParameter_TypeSerializer(); -} - -class _$RichObjectParameter_TypeSerializer implements PrimitiveSerializer { - const _$RichObjectParameter_TypeSerializer(); - - static const Map _toWire = { - RichObjectParameter_Type.addressbook: 'addressbook', - RichObjectParameter_Type.addressbookContact: 'addressbook-contact', - RichObjectParameter_Type.announcement: 'announcement', - RichObjectParameter_Type.app: 'app', - RichObjectParameter_Type.calendar: 'calendar', - RichObjectParameter_Type.calendarEvent: 'calendar-event', - RichObjectParameter_Type.call: 'call', - RichObjectParameter_Type.circle: 'circle', - RichObjectParameter_Type.deckBoard: 'deck-board', - RichObjectParameter_Type.deckCard: 'deck-card', - RichObjectParameter_Type.email: 'email', - RichObjectParameter_Type.file: 'file', - RichObjectParameter_Type.formsForm: 'forms-form', - RichObjectParameter_Type.guest: 'guest', - RichObjectParameter_Type.highlight: 'highlight', - RichObjectParameter_Type.geoLocation: 'geo-location', - RichObjectParameter_Type.openGraph: 'open-graph', - RichObjectParameter_Type.pendingFederatedShare: 'pending-federated-share', - RichObjectParameter_Type.systemtag: 'systemtag', - RichObjectParameter_Type.talkAttachment: 'talk-attachment', - RichObjectParameter_Type.talkPoll: 'talk-poll', - RichObjectParameter_Type.user: 'user', - RichObjectParameter_Type.userGroup: 'user-group', - }; - - static const Map _fromWire = { - 'addressbook': RichObjectParameter_Type.addressbook, - 'addressbook-contact': RichObjectParameter_Type.addressbookContact, - 'announcement': RichObjectParameter_Type.announcement, - 'app': RichObjectParameter_Type.app, - 'calendar': RichObjectParameter_Type.calendar, - 'calendar-event': RichObjectParameter_Type.calendarEvent, - 'call': RichObjectParameter_Type.call, - 'circle': RichObjectParameter_Type.circle, - 'deck-board': RichObjectParameter_Type.deckBoard, - 'deck-card': RichObjectParameter_Type.deckCard, - 'email': RichObjectParameter_Type.email, - 'file': RichObjectParameter_Type.file, - 'forms-form': RichObjectParameter_Type.formsForm, - 'guest': RichObjectParameter_Type.guest, - 'highlight': RichObjectParameter_Type.highlight, - 'geo-location': RichObjectParameter_Type.geoLocation, - 'open-graph': RichObjectParameter_Type.openGraph, - 'pending-federated-share': RichObjectParameter_Type.pendingFederatedShare, - 'systemtag': RichObjectParameter_Type.systemtag, - 'talk-attachment': RichObjectParameter_Type.talkAttachment, - 'talk-poll': RichObjectParameter_Type.talkPoll, - 'user': RichObjectParameter_Type.user, - 'user-group': RichObjectParameter_Type.userGroup, - }; - - @override - Iterable get types => const [RichObjectParameter_Type]; - - @override - String get wireName => 'RichObjectParameter_Type'; - - @override - Object serialize( - Serializers serializers, - RichObjectParameter_Type object, { - FullType specifiedType = FullType.unspecified, - }) => - _toWire[object]!; - - @override - RichObjectParameter_Type deserialize( - Serializers serializers, - Object serialized, { - FullType specifiedType = FullType.unspecified, - }) => - _fromWire[serialized]!; -} - -/// The file size in bytes. -typedef RichObjectParameter_Size = ({int? $int, String? string}); - -/// The width in pixels if the file is an image. -typedef RichObjectParameter_Width = ({int? $int, String? string}); - -/// The height in pixels if the file is an image. -typedef RichObjectParameter_Height = ({int? $int, String? string}); - -@BuiltValue(instantiable: false) -sealed class $RichObjectParameterInterface { - RichObjectParameter_Type get type; - String get id; - String get name; - - /// The full URL to the file. - String? get link; - - /// The type of the call: one2one, group or public. - @BuiltValueField(wireName: 'call-type') - String? get callType; - - /// The icon url to use as avatar. - @BuiltValueField(wireName: 'icon-url') - String? get iconUrl; - - /// The id of a message that was referred to. - @BuiltValueField(wireName: 'message-id') - String? get messageId; - - /// The display name of board which contains the card. - String? get boardname; - - /// The display name of the stack which contains the card in the board. - String? get stackname; - - /// The file size in bytes. - RichObjectParameter_Size? get size; - - /// The full path of the file for the user, should not start with a slash. - String? get path; - - /// The mimetype of the file/folder to allow clients to show a placeholder. - String? get mimetype; - - /// Whether or not a preview is available. If `no` the mimetype icon should be used. - @BuiltValueField(wireName: 'preview-available') - String? get previewAvailable; - - /// The mtime of the file/folder as unix timestamp. - String? get mtime; - - /// The ETag of the file/folder. - String? get etag; - - /// The permissions on the file/folder. - String? get permissions; - - /// The width in pixels if the file is an image. - RichObjectParameter_Width? get width; - - /// The height in pixels if the file is an image. - RichObjectParameter_Height? get height; - - /// The blurhash of the image. - String? get blurhash; - - /// The latitude of the location MUST be the same as in the id. - String? get latitude; - - /// The longitude of the location MUST be the same as in the id. - String? get longitude; - - /// The open graph description from the website. - String? get description; - - /// The full URL of the open graph thumbnail. - String? get thumb; - - /// The name of the described website. - String? get website; - - /// If the user can see the systemtag. - String? get visibility; - - /// If the user can assign the systemtag. - String? get assignable; - - /// The token of the conversation. - String? get conversation; - - /// The URL of the instance the user lives on. - String? get server; - - /// Rebuilds the instance. - /// - /// The result is the same as this instance but with [updates] applied. - /// [updates] is a function that takes a builder [$RichObjectParameterInterfaceBuilder]. - $RichObjectParameterInterface rebuild(void Function($RichObjectParameterInterfaceBuilder) updates); - - /// Converts the instance to a builder [$RichObjectParameterInterfaceBuilder]. - $RichObjectParameterInterfaceBuilder toBuilder(); - @BuiltValueHook(initializeBuilder: true) - static void _defaults($RichObjectParameterInterfaceBuilder b) {} - @BuiltValueHook(finalizeBuilder: true) - static void _validate($RichObjectParameterInterfaceBuilder b) { - b.size?.validateOneOf(); - b.width?.validateOneOf(); - b.height?.validateOneOf(); - } -} - -abstract class RichObjectParameter - implements $RichObjectParameterInterface, Built { - /// Creates a new RichObjectParameter object using the builder pattern. - factory RichObjectParameter([void Function(RichObjectParameterBuilder)? b]) = _$RichObjectParameter; - - // coverage:ignore-start - const RichObjectParameter._(); - // coverage:ignore-end - - /// Creates a new object from the given [json] data. - /// - /// Use [toJson] to serialize it back into json. - // coverage:ignore-start - factory RichObjectParameter.fromJson(Map json) => - _$jsonSerializers.deserializeWith(serializer, json)!; - // coverage:ignore-end - - /// Parses this object into a json like map. - /// - /// Use the fromJson factory to revive it again. - // coverage:ignore-start - Map toJson() => _$jsonSerializers.serializeWith(serializer, this)! as Map; - // coverage:ignore-end - - /// Serializer for RichObjectParameter. - static Serializer get serializer => _$richObjectParameterSerializer; - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(RichObjectParameterBuilder b) { - $RichObjectParameterInterface._defaults(b); - } - - @BuiltValueHook(finalizeBuilder: true) - static void _validate(RichObjectParameterBuilder b) { - $RichObjectParameterInterface._validate(b); - } -} - class MessageType extends EnumClass { const MessageType._(super.name); @@ -16878,7 +16551,7 @@ sealed class $BaseMessageInterface { ActorType get actorType; int get expirationTimestamp; String get message; - BuiltMap get messageParameters; + BuiltMap> get messageParameters; MessageType get messageType; String get systemMessage; @@ -51235,44 +50908,6 @@ abstract class PublicCapabilities0 typedef PublicCapabilities = ({BuiltList? builtListNever, PublicCapabilities0? publicCapabilities0}); -/// Serialization extension for `RichObjectParameter_Size`. -extension $RichObjectParameter_SizeExtension on RichObjectParameter_Size { - /// Serializer for RichObjectParameter_Size. - @BuiltValueSerializer(custom: true) - static Serializer get serializer => $b2c4857c0136baea42828d89c87c757dExtension._serializer; - - /// Creates a new object from the given [json] data. - /// - /// Use `toJson` to serialize it back into json. - static RichObjectParameter_Size fromJson(Object? json) => $b2c4857c0136baea42828d89c87c757dExtension._fromJson(json); -} - -/// Serialization extension for `RichObjectParameter_Width`. -extension $RichObjectParameter_WidthExtension on RichObjectParameter_Width { - /// Serializer for RichObjectParameter_Width. - @BuiltValueSerializer(custom: true) - static Serializer get serializer => $b2c4857c0136baea42828d89c87c757dExtension._serializer; - - /// Creates a new object from the given [json] data. - /// - /// Use `toJson` to serialize it back into json. - static RichObjectParameter_Width fromJson(Object? json) => $b2c4857c0136baea42828d89c87c757dExtension._fromJson(json); -} - -/// Serialization extension for `RichObjectParameter_Height`. -extension $RichObjectParameter_HeightExtension on RichObjectParameter_Height { - /// Serializer for RichObjectParameter_Height. - @BuiltValueSerializer(custom: true) - static Serializer get serializer => - $b2c4857c0136baea42828d89c87c757dExtension._serializer; - - /// Creates a new object from the given [json] data. - /// - /// Use `toJson` to serialize it back into json. - static RichObjectParameter_Height fromJson(Object? json) => - $b2c4857c0136baea42828d89c87c757dExtension._fromJson(json); -} - /// Serialization extension for `RoomLastMessage`. extension $RoomLastMessageExtension on RoomLastMessage { /// Serializer for RoomLastMessage. @@ -51397,88 +51032,6 @@ extension $PublicCapabilitiesExtension on PublicCapabilities { static PublicCapabilities fromJson(Object? json) => $bc4aac45771b11649d372f39a92b1cf3Extension._fromJson(json); } -typedef _$b2c4857c0136baea42828d89c87c757d = ({int? $int, String? string}); - -/// @nodoc -// ignore: library_private_types_in_public_api -extension $b2c4857c0136baea42828d89c87c757dExtension on _$b2c4857c0136baea42828d89c87c757d { - List get _values => [$int, string]; - List get _names => const [r'$int', 'string']; - - /// {@macro Dynamite.validateOneOf} - void validateOneOf() => _i4.validateOneOf( - _values, - _names, - ); - - /// {@macro Dynamite.validateAnyOf} - void validateAnyOf() => _i4.validateAnyOf( - _values, - _names, - ); - static Serializer<_$b2c4857c0136baea42828d89c87c757d> get _serializer => - const _$b2c4857c0136baea42828d89c87c757dSerializer(); - static _$b2c4857c0136baea42828d89c87c757d _fromJson(Object? json) => - _$jsonSerializers.deserializeWith(_serializer, json)!; - - /// Parses this object into a json like map. - /// - /// Use the fromJson factory to revive it again. - Object? toJson() => _$jsonSerializers.serializeWith(_serializer, this); -} - -class _$b2c4857c0136baea42828d89c87c757dSerializer implements PrimitiveSerializer<_$b2c4857c0136baea42828d89c87c757d> { - const _$b2c4857c0136baea42828d89c87c757dSerializer(); - - @override - Iterable get types => const [_$b2c4857c0136baea42828d89c87c757d]; - - @override - String get wireName => r'_$b2c4857c0136baea42828d89c87c757d'; - - @override - Object serialize( - Serializers serializers, - _$b2c4857c0136baea42828d89c87c757d object, { - FullType specifiedType = FullType.unspecified, - }) { - dynamic value; - value = object.$int; - if (value != null) { - return serializers.serialize(value, specifiedType: const FullType(int))!; - } - value = object.string; - if (value != null) { - return serializers.serialize(value, specifiedType: const FullType(String))!; - } -// Should not be possible after validation. - throw StateError('Tried to serialize without any value.'); - } - - @override - _$b2c4857c0136baea42828d89c87c757d deserialize( - Serializers serializers, - Object data, { - FullType specifiedType = FullType.unspecified, - }) { - int? $int; - try { - $int = serializers.deserialize( - data, - specifiedType: const FullType(int), - )! as int; - } catch (_) {} - String? string; - try { - string = serializers.deserialize( - data, - specifiedType: const FullType(String), - )! as String; - } catch (_) {} - return ($int: $int, string: string); - } -} - typedef _$4b3c240037cf48d36f81308e641eef98 = ({BaseMessage? baseMessage, ChatMessage? chatMessage}); /// @nodoc @@ -52080,6 +51633,88 @@ class _$973dc40faeda3fa3aa7e7b9895ee7a34Serializer implements PrimitiveSerialize } } +typedef _$b2c4857c0136baea42828d89c87c757d = ({int? $int, String? string}); + +/// @nodoc +// ignore: library_private_types_in_public_api +extension $b2c4857c0136baea42828d89c87c757dExtension on _$b2c4857c0136baea42828d89c87c757d { + List get _values => [$int, string]; + List get _names => const [r'$int', 'string']; + + /// {@macro Dynamite.validateOneOf} + void validateOneOf() => _i4.validateOneOf( + _values, + _names, + ); + + /// {@macro Dynamite.validateAnyOf} + void validateAnyOf() => _i4.validateAnyOf( + _values, + _names, + ); + static Serializer<_$b2c4857c0136baea42828d89c87c757d> get _serializer => + const _$b2c4857c0136baea42828d89c87c757dSerializer(); + static _$b2c4857c0136baea42828d89c87c757d _fromJson(Object? json) => + _$jsonSerializers.deserializeWith(_serializer, json)!; + + /// Parses this object into a json like map. + /// + /// Use the fromJson factory to revive it again. + Object? toJson() => _$jsonSerializers.serializeWith(_serializer, this); +} + +class _$b2c4857c0136baea42828d89c87c757dSerializer implements PrimitiveSerializer<_$b2c4857c0136baea42828d89c87c757d> { + const _$b2c4857c0136baea42828d89c87c757dSerializer(); + + @override + Iterable get types => const [_$b2c4857c0136baea42828d89c87c757d]; + + @override + String get wireName => r'_$b2c4857c0136baea42828d89c87c757d'; + + @override + Object serialize( + Serializers serializers, + _$b2c4857c0136baea42828d89c87c757d object, { + FullType specifiedType = FullType.unspecified, + }) { + dynamic value; + value = object.$int; + if (value != null) { + return serializers.serialize(value, specifiedType: const FullType(int))!; + } + value = object.string; + if (value != null) { + return serializers.serialize(value, specifiedType: const FullType(String))!; + } +// Should not be possible after validation. + throw StateError('Tried to serialize without any value.'); + } + + @override + _$b2c4857c0136baea42828d89c87c757d deserialize( + Serializers serializers, + Object data, { + FullType specifiedType = FullType.unspecified, + }) { + int? $int; + try { + $int = serializers.deserialize( + data, + specifiedType: const FullType(int), + )! as int; + } catch (_) {} + String? string; + try { + string = serializers.deserialize( + data, + specifiedType: const FullType(String), + )! as String; + } catch (_) {} + return ($int: $int, string: string); + } +} + typedef _$bc4aac45771b11649d372f39a92b1cf3 = ({ BuiltList? builtListNever, PublicCapabilities0? publicCapabilities0 @@ -52195,13 +51830,16 @@ final Serializers _$serializers = (Serializers().toBuilder() ..add(ChatMessage.serializer) ..addBuilderFactory(const FullType(BaseMessage), BaseMessageBuilder.new) ..add(BaseMessage.serializer) - ..addBuilderFactory(const FullType(RichObjectParameter), RichObjectParameterBuilder.new) - ..add(RichObjectParameter.serializer) - ..add(RichObjectParameter_Type.serializer) - ..add($b2c4857c0136baea42828d89c87c757dExtension._serializer) ..addBuilderFactory( - const FullType(BuiltMap, [FullType(String), FullType(RichObjectParameter)]), - MapBuilder.new, + const FullType(BuiltMap, [FullType(String), FullType(JsonObject)]), + MapBuilder.new, + ) + ..addBuilderFactory( + const FullType(BuiltMap, [ + FullType(String), + FullType(BuiltMap, [FullType(String), FullType(JsonObject)]), + ]), + MapBuilder>.new, ) ..add(MessageType.serializer) ..add(ChatMessage_Deleted.serializer) @@ -53031,10 +52669,6 @@ final Serializers _$serializers = (Serializers().toBuilder() HostedSignalingServerRequestTrialResponseApplicationJson_OcsBuilder.new, ) ..add(HostedSignalingServerRequestTrialResponseApplicationJson_Ocs.serializer) - ..addBuilderFactory( - const FullType(BuiltMap, [FullType(String), FullType(JsonObject)]), - MapBuilder.new, - ) ..add(HostedSignalingServerDeleteAccountApiVersion.serializer) ..add(SignalingPullMessagesApiVersion.serializer) ..addBuilderFactory( @@ -54029,6 +53663,7 @@ final Serializers _$serializers = (Serializers().toBuilder() ) ..add(SettingsSetUserSettingRequestApplicationJson.serializer) ..add(SettingsSetUserSettingRequestApplicationJson_Key.serializer) + ..add($b2c4857c0136baea42828d89c87c757dExtension._serializer) ..addBuilderFactory( const FullType(SettingsSetUserSettingResponseApplicationJson), SettingsSetUserSettingResponseApplicationJsonBuilder.new, @@ -54181,7 +53816,6 @@ final Serializers _$jsonSerializers = (_$serializers.toBuilder() ..addPlugin( _i8.StandardJsonPlugin( typesToLeaveAsList: const { - _$b2c4857c0136baea42828d89c87c757d, _$4b3c240037cf48d36f81308e641eef98, _$bed8482b7c93ae2974fa4be6ae42b9b1, _$eef5a337590648ee15c9b8f9dd9d6a36, @@ -54189,6 +53823,7 @@ final Serializers _$jsonSerializers = (_$serializers.toBuilder() _$1df642f5035aea3b22543ab331c3fb01, _$bd993fb3f40af33e8594d0d698208560, _$973dc40faeda3fa3aa7e7b9895ee7a34, + _$b2c4857c0136baea42828d89c87c757d, _$bc4aac45771b11649d372f39a92b1cf3, }, ), diff --git a/packages/nextcloud/lib/src/api/spreed/spreed.openapi.g.dart b/packages/nextcloud/lib/src/api/spreed/spreed.openapi.g.dart index 17eb94cf9ff..4cc0ab68074 100644 --- a/packages/nextcloud/lib/src/api/spreed/spreed.openapi.g.dart +++ b/packages/nextcloud/lib/src/api/spreed/spreed.openapi.g.dart @@ -105,112 +105,6 @@ final BuiltSet _$actorTypeValues = BuiltSet(const _$richObjectParameterTypeValues = - BuiltSet(const [ - _$richObjectParameterTypeAddressbook, - _$richObjectParameterTypeAddressbookContact, - _$richObjectParameterTypeAnnouncement, - _$richObjectParameterTypeApp, - _$richObjectParameterTypeCalendar, - _$richObjectParameterTypeCalendarEvent, - _$richObjectParameterTypeCall, - _$richObjectParameterTypeCircle, - _$richObjectParameterTypeDeckBoard, - _$richObjectParameterTypeDeckCard, - _$richObjectParameterTypeEmail, - _$richObjectParameterTypeFile, - _$richObjectParameterTypeFormsForm, - _$richObjectParameterTypeGuest, - _$richObjectParameterTypeHighlight, - _$richObjectParameterTypeGeoLocation, - _$richObjectParameterTypeOpenGraph, - _$richObjectParameterTypePendingFederatedShare, - _$richObjectParameterTypeSystemtag, - _$richObjectParameterTypeTalkAttachment, - _$richObjectParameterTypeTalkPoll, - _$richObjectParameterTypeUser, - _$richObjectParameterTypeUserGroup, -]); - const MessageType _$messageTypeComment = MessageType._('comment'); const MessageType _$messageTypeSystem = MessageType._('system'); const MessageType _$messageTypeObjectShared = MessageType._('objectShared'); @@ -3166,7 +3060,6 @@ final BuiltSet _$signalingBackendApiVersionValues = ]); Serializer _$oCSMetaSerializer = _$OCSMetaSerializer(); -Serializer _$richObjectParameterSerializer = _$RichObjectParameterSerializer(); Serializer _$baseMessageSerializer = _$BaseMessageSerializer(); Serializer _$chatMessageSerializer = _$ChatMessageSerializer(); Serializer _$roomSerializer = _$RoomSerializer(); @@ -4087,283 +3980,6 @@ class _$OCSMetaSerializer implements StructuredSerializer { } } -class _$RichObjectParameterSerializer implements StructuredSerializer { - @override - final Iterable types = const [RichObjectParameter, _$RichObjectParameter]; - @override - final String wireName = 'RichObjectParameter'; - - @override - Iterable serialize(Serializers serializers, RichObjectParameter object, - {FullType specifiedType = FullType.unspecified}) { - final result = [ - 'type', - serializers.serialize(object.type, specifiedType: const FullType(RichObjectParameter_Type)), - 'id', - serializers.serialize(object.id, specifiedType: const FullType(String)), - 'name', - serializers.serialize(object.name, specifiedType: const FullType(String)), - ]; - Object? value; - value = object.link; - if (value != null) { - result - ..add('link') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - value = object.callType; - if (value != null) { - result - ..add('call-type') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - value = object.iconUrl; - if (value != null) { - result - ..add('icon-url') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - value = object.messageId; - if (value != null) { - result - ..add('message-id') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - value = object.boardname; - if (value != null) { - result - ..add('boardname') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - value = object.stackname; - if (value != null) { - result - ..add('stackname') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - value = object.size; - if (value != null) { - result - ..add('size') - ..add(serializers.serialize(value, specifiedType: const FullType(RichObjectParameter_Size))); - } - value = object.path; - if (value != null) { - result - ..add('path') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - value = object.mimetype; - if (value != null) { - result - ..add('mimetype') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - value = object.previewAvailable; - if (value != null) { - result - ..add('preview-available') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - value = object.mtime; - if (value != null) { - result - ..add('mtime') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - value = object.etag; - if (value != null) { - result - ..add('etag') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - value = object.permissions; - if (value != null) { - result - ..add('permissions') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - value = object.width; - if (value != null) { - result - ..add('width') - ..add(serializers.serialize(value, specifiedType: const FullType(RichObjectParameter_Width))); - } - value = object.height; - if (value != null) { - result - ..add('height') - ..add(serializers.serialize(value, specifiedType: const FullType(RichObjectParameter_Height))); - } - value = object.blurhash; - if (value != null) { - result - ..add('blurhash') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - value = object.latitude; - if (value != null) { - result - ..add('latitude') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - value = object.longitude; - if (value != null) { - result - ..add('longitude') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - value = object.description; - if (value != null) { - result - ..add('description') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - value = object.thumb; - if (value != null) { - result - ..add('thumb') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - value = object.website; - if (value != null) { - result - ..add('website') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - value = object.visibility; - if (value != null) { - result - ..add('visibility') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - value = object.assignable; - if (value != null) { - result - ..add('assignable') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - value = object.conversation; - if (value != null) { - result - ..add('conversation') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - value = object.server; - if (value != null) { - result - ..add('server') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - return result; - } - - @override - RichObjectParameter deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = RichObjectParameterBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current! as String; - iterator.moveNext(); - final Object? value = iterator.current; - switch (key) { - case 'type': - result.type = serializers.deserialize(value, specifiedType: const FullType(RichObjectParameter_Type))! - as RichObjectParameter_Type; - break; - case 'id': - result.id = serializers.deserialize(value, specifiedType: const FullType(String))! as String; - break; - case 'name': - result.name = serializers.deserialize(value, specifiedType: const FullType(String))! as String; - break; - case 'link': - result.link = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - case 'call-type': - result.callType = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - case 'icon-url': - result.iconUrl = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - case 'message-id': - result.messageId = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - case 'boardname': - result.boardname = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - case 'stackname': - result.stackname = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - case 'size': - result.size = serializers.deserialize(value, specifiedType: const FullType(RichObjectParameter_Size)) - as RichObjectParameter_Size?; - break; - case 'path': - result.path = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - case 'mimetype': - result.mimetype = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - case 'preview-available': - result.previewAvailable = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - case 'mtime': - result.mtime = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - case 'etag': - result.etag = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - case 'permissions': - result.permissions = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - case 'width': - result.width = serializers.deserialize(value, specifiedType: const FullType(RichObjectParameter_Width)) - as RichObjectParameter_Width?; - break; - case 'height': - result.height = serializers.deserialize(value, specifiedType: const FullType(RichObjectParameter_Height)) - as RichObjectParameter_Height?; - break; - case 'blurhash': - result.blurhash = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - case 'latitude': - result.latitude = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - case 'longitude': - result.longitude = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - case 'description': - result.description = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - case 'thumb': - result.thumb = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - case 'website': - result.website = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - case 'visibility': - result.visibility = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - case 'assignable': - result.assignable = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - case 'conversation': - result.conversation = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - case 'server': - result.server = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - } - } - - return result.build(); - } -} - class _$BaseMessageSerializer implements StructuredSerializer { @override final Iterable types = const [BaseMessage, _$BaseMessage]; @@ -4386,7 +4002,10 @@ class _$BaseMessageSerializer implements StructuredSerializer { serializers.serialize(object.message, specifiedType: const FullType(String)), 'messageParameters', serializers.serialize(object.messageParameters, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(RichObjectParameter)])), + specifiedType: const FullType(BuiltMap, [ + FullType(String), + FullType(BuiltMap, [FullType(String), FullType(JsonObject)]) + ])), 'messageType', serializers.serialize(object.messageType, specifiedType: const FullType(MessageType)), 'systemMessage', @@ -4424,7 +4043,10 @@ class _$BaseMessageSerializer implements StructuredSerializer { break; case 'messageParameters': result.messageParameters.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(RichObjectParameter)]))!); + specifiedType: const FullType(BuiltMap, [ + FullType(String), + FullType(BuiltMap, [FullType(String), FullType(JsonObject)]) + ]))!); break; case 'messageType': result.messageType = @@ -4477,7 +4099,10 @@ class _$ChatMessageSerializer implements StructuredSerializer { serializers.serialize(object.message, specifiedType: const FullType(String)), 'messageParameters', serializers.serialize(object.messageParameters, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(RichObjectParameter)])), + specifiedType: const FullType(BuiltMap, [ + FullType(String), + FullType(BuiltMap, [FullType(String), FullType(JsonObject)]) + ])), 'messageType', serializers.serialize(object.messageType, specifiedType: const FullType(MessageType)), 'systemMessage', @@ -4604,7 +4229,10 @@ class _$ChatMessageSerializer implements StructuredSerializer { break; case 'messageParameters': result.messageParameters.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(RichObjectParameter)]))!); + specifiedType: const FullType(BuiltMap, [ + FullType(String), + FullType(BuiltMap, [FullType(String), FullType(JsonObject)]) + ]))!); break; case 'messageType': result.messageType = @@ -8620,7 +8248,10 @@ class _$ChatMessageWithParentSerializer implements StructuredSerializer, $OCSMetaInterf } } -abstract mixin class $RichObjectParameterInterfaceBuilder { - void replace($RichObjectParameterInterface other); - void update(void Function($RichObjectParameterInterfaceBuilder) updates); - RichObjectParameter_Type? get type; - set type(RichObjectParameter_Type? type); - - String? get id; - set id(String? id); - - String? get name; - set name(String? name); - - String? get link; - set link(String? link); - - String? get callType; - set callType(String? callType); - - String? get iconUrl; - set iconUrl(String? iconUrl); - - String? get messageId; - set messageId(String? messageId); - - String? get boardname; - set boardname(String? boardname); - - String? get stackname; - set stackname(String? stackname); - - RichObjectParameter_Size? get size; - set size(RichObjectParameter_Size? size); - - String? get path; - set path(String? path); - - String? get mimetype; - set mimetype(String? mimetype); - - String? get previewAvailable; - set previewAvailable(String? previewAvailable); - - String? get mtime; - set mtime(String? mtime); - - String? get etag; - set etag(String? etag); - - String? get permissions; - set permissions(String? permissions); - - RichObjectParameter_Width? get width; - set width(RichObjectParameter_Width? width); - - RichObjectParameter_Height? get height; - set height(RichObjectParameter_Height? height); - - String? get blurhash; - set blurhash(String? blurhash); - - String? get latitude; - set latitude(String? latitude); - - String? get longitude; - set longitude(String? longitude); - - String? get description; - set description(String? description); - - String? get thumb; - set thumb(String? thumb); - - String? get website; - set website(String? website); - - String? get visibility; - set visibility(String? visibility); - - String? get assignable; - set assignable(String? assignable); - - String? get conversation; - set conversation(String? conversation); - - String? get server; - set server(String? server); -} - -class _$RichObjectParameter extends RichObjectParameter { - @override - final RichObjectParameter_Type type; - @override - final String id; - @override - final String name; - @override - final String? link; - @override - final String? callType; - @override - final String? iconUrl; - @override - final String? messageId; - @override - final String? boardname; - @override - final String? stackname; - @override - final RichObjectParameter_Size? size; - @override - final String? path; - @override - final String? mimetype; - @override - final String? previewAvailable; - @override - final String? mtime; - @override - final String? etag; - @override - final String? permissions; - @override - final RichObjectParameter_Width? width; - @override - final RichObjectParameter_Height? height; - @override - final String? blurhash; - @override - final String? latitude; - @override - final String? longitude; - @override - final String? description; - @override - final String? thumb; - @override - final String? website; - @override - final String? visibility; - @override - final String? assignable; - @override - final String? conversation; - @override - final String? server; - - factory _$RichObjectParameter([void Function(RichObjectParameterBuilder)? updates]) => - (RichObjectParameterBuilder()..update(updates))._build(); - - _$RichObjectParameter._( - {required this.type, - required this.id, - required this.name, - this.link, - this.callType, - this.iconUrl, - this.messageId, - this.boardname, - this.stackname, - this.size, - this.path, - this.mimetype, - this.previewAvailable, - this.mtime, - this.etag, - this.permissions, - this.width, - this.height, - this.blurhash, - this.latitude, - this.longitude, - this.description, - this.thumb, - this.website, - this.visibility, - this.assignable, - this.conversation, - this.server}) - : super._() { - BuiltValueNullFieldError.checkNotNull(type, r'RichObjectParameter', 'type'); - BuiltValueNullFieldError.checkNotNull(id, r'RichObjectParameter', 'id'); - BuiltValueNullFieldError.checkNotNull(name, r'RichObjectParameter', 'name'); - } - - @override - RichObjectParameter rebuild(void Function(RichObjectParameterBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - RichObjectParameterBuilder toBuilder() => RichObjectParameterBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - final dynamic _$dynamicOther = other; - return other is RichObjectParameter && - type == other.type && - id == other.id && - name == other.name && - link == other.link && - callType == other.callType && - iconUrl == other.iconUrl && - messageId == other.messageId && - boardname == other.boardname && - stackname == other.stackname && - size == _$dynamicOther.size && - path == other.path && - mimetype == other.mimetype && - previewAvailable == other.previewAvailable && - mtime == other.mtime && - etag == other.etag && - permissions == other.permissions && - width == _$dynamicOther.width && - height == _$dynamicOther.height && - blurhash == other.blurhash && - latitude == other.latitude && - longitude == other.longitude && - description == other.description && - thumb == other.thumb && - website == other.website && - visibility == other.visibility && - assignable == other.assignable && - conversation == other.conversation && - server == other.server; - } - - @override - int get hashCode { - var _$hash = 0; - _$hash = $jc(_$hash, type.hashCode); - _$hash = $jc(_$hash, id.hashCode); - _$hash = $jc(_$hash, name.hashCode); - _$hash = $jc(_$hash, link.hashCode); - _$hash = $jc(_$hash, callType.hashCode); - _$hash = $jc(_$hash, iconUrl.hashCode); - _$hash = $jc(_$hash, messageId.hashCode); - _$hash = $jc(_$hash, boardname.hashCode); - _$hash = $jc(_$hash, stackname.hashCode); - _$hash = $jc(_$hash, size.hashCode); - _$hash = $jc(_$hash, path.hashCode); - _$hash = $jc(_$hash, mimetype.hashCode); - _$hash = $jc(_$hash, previewAvailable.hashCode); - _$hash = $jc(_$hash, mtime.hashCode); - _$hash = $jc(_$hash, etag.hashCode); - _$hash = $jc(_$hash, permissions.hashCode); - _$hash = $jc(_$hash, width.hashCode); - _$hash = $jc(_$hash, height.hashCode); - _$hash = $jc(_$hash, blurhash.hashCode); - _$hash = $jc(_$hash, latitude.hashCode); - _$hash = $jc(_$hash, longitude.hashCode); - _$hash = $jc(_$hash, description.hashCode); - _$hash = $jc(_$hash, thumb.hashCode); - _$hash = $jc(_$hash, website.hashCode); - _$hash = $jc(_$hash, visibility.hashCode); - _$hash = $jc(_$hash, assignable.hashCode); - _$hash = $jc(_$hash, conversation.hashCode); - _$hash = $jc(_$hash, server.hashCode); - _$hash = $jf(_$hash); - return _$hash; - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'RichObjectParameter') - ..add('type', type) - ..add('id', id) - ..add('name', name) - ..add('link', link) - ..add('callType', callType) - ..add('iconUrl', iconUrl) - ..add('messageId', messageId) - ..add('boardname', boardname) - ..add('stackname', stackname) - ..add('size', size) - ..add('path', path) - ..add('mimetype', mimetype) - ..add('previewAvailable', previewAvailable) - ..add('mtime', mtime) - ..add('etag', etag) - ..add('permissions', permissions) - ..add('width', width) - ..add('height', height) - ..add('blurhash', blurhash) - ..add('latitude', latitude) - ..add('longitude', longitude) - ..add('description', description) - ..add('thumb', thumb) - ..add('website', website) - ..add('visibility', visibility) - ..add('assignable', assignable) - ..add('conversation', conversation) - ..add('server', server)) - .toString(); - } -} - -class RichObjectParameterBuilder - implements Builder, $RichObjectParameterInterfaceBuilder { - _$RichObjectParameter? _$v; - - RichObjectParameter_Type? _type; - RichObjectParameter_Type? get type => _$this._type; - set type(covariant RichObjectParameter_Type? type) => _$this._type = type; - - String? _id; - String? get id => _$this._id; - set id(covariant String? id) => _$this._id = id; - - String? _name; - String? get name => _$this._name; - set name(covariant String? name) => _$this._name = name; - - String? _link; - String? get link => _$this._link; - set link(covariant String? link) => _$this._link = link; - - String? _callType; - String? get callType => _$this._callType; - set callType(covariant String? callType) => _$this._callType = callType; - - String? _iconUrl; - String? get iconUrl => _$this._iconUrl; - set iconUrl(covariant String? iconUrl) => _$this._iconUrl = iconUrl; - - String? _messageId; - String? get messageId => _$this._messageId; - set messageId(covariant String? messageId) => _$this._messageId = messageId; - - String? _boardname; - String? get boardname => _$this._boardname; - set boardname(covariant String? boardname) => _$this._boardname = boardname; - - String? _stackname; - String? get stackname => _$this._stackname; - set stackname(covariant String? stackname) => _$this._stackname = stackname; - - RichObjectParameter_Size? _size; - RichObjectParameter_Size? get size => _$this._size; - set size(covariant RichObjectParameter_Size? size) => _$this._size = size; - - String? _path; - String? get path => _$this._path; - set path(covariant String? path) => _$this._path = path; - - String? _mimetype; - String? get mimetype => _$this._mimetype; - set mimetype(covariant String? mimetype) => _$this._mimetype = mimetype; - - String? _previewAvailable; - String? get previewAvailable => _$this._previewAvailable; - set previewAvailable(covariant String? previewAvailable) => _$this._previewAvailable = previewAvailable; - - String? _mtime; - String? get mtime => _$this._mtime; - set mtime(covariant String? mtime) => _$this._mtime = mtime; - - String? _etag; - String? get etag => _$this._etag; - set etag(covariant String? etag) => _$this._etag = etag; - - String? _permissions; - String? get permissions => _$this._permissions; - set permissions(covariant String? permissions) => _$this._permissions = permissions; - - RichObjectParameter_Width? _width; - RichObjectParameter_Width? get width => _$this._width; - set width(covariant RichObjectParameter_Width? width) => _$this._width = width; - - RichObjectParameter_Height? _height; - RichObjectParameter_Height? get height => _$this._height; - set height(covariant RichObjectParameter_Height? height) => _$this._height = height; - - String? _blurhash; - String? get blurhash => _$this._blurhash; - set blurhash(covariant String? blurhash) => _$this._blurhash = blurhash; - - String? _latitude; - String? get latitude => _$this._latitude; - set latitude(covariant String? latitude) => _$this._latitude = latitude; - - String? _longitude; - String? get longitude => _$this._longitude; - set longitude(covariant String? longitude) => _$this._longitude = longitude; - - String? _description; - String? get description => _$this._description; - set description(covariant String? description) => _$this._description = description; - - String? _thumb; - String? get thumb => _$this._thumb; - set thumb(covariant String? thumb) => _$this._thumb = thumb; - - String? _website; - String? get website => _$this._website; - set website(covariant String? website) => _$this._website = website; - - String? _visibility; - String? get visibility => _$this._visibility; - set visibility(covariant String? visibility) => _$this._visibility = visibility; - - String? _assignable; - String? get assignable => _$this._assignable; - set assignable(covariant String? assignable) => _$this._assignable = assignable; - - String? _conversation; - String? get conversation => _$this._conversation; - set conversation(covariant String? conversation) => _$this._conversation = conversation; - - String? _server; - String? get server => _$this._server; - set server(covariant String? server) => _$this._server = server; - - RichObjectParameterBuilder() { - RichObjectParameter._defaults(this); - } - - RichObjectParameterBuilder get _$this { - final $v = _$v; - if ($v != null) { - _type = $v.type; - _id = $v.id; - _name = $v.name; - _link = $v.link; - _callType = $v.callType; - _iconUrl = $v.iconUrl; - _messageId = $v.messageId; - _boardname = $v.boardname; - _stackname = $v.stackname; - _size = $v.size; - _path = $v.path; - _mimetype = $v.mimetype; - _previewAvailable = $v.previewAvailable; - _mtime = $v.mtime; - _etag = $v.etag; - _permissions = $v.permissions; - _width = $v.width; - _height = $v.height; - _blurhash = $v.blurhash; - _latitude = $v.latitude; - _longitude = $v.longitude; - _description = $v.description; - _thumb = $v.thumb; - _website = $v.website; - _visibility = $v.visibility; - _assignable = $v.assignable; - _conversation = $v.conversation; - _server = $v.server; - _$v = null; - } - return this; - } - - @override - void replace(covariant RichObjectParameter other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$RichObjectParameter; - } - - @override - void update(void Function(RichObjectParameterBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - RichObjectParameter build() => _build(); - - _$RichObjectParameter _build() { - RichObjectParameter._validate(this); - final _$result = _$v ?? - _$RichObjectParameter._( - type: BuiltValueNullFieldError.checkNotNull(type, r'RichObjectParameter', 'type'), - id: BuiltValueNullFieldError.checkNotNull(id, r'RichObjectParameter', 'id'), - name: BuiltValueNullFieldError.checkNotNull(name, r'RichObjectParameter', 'name'), - link: link, - callType: callType, - iconUrl: iconUrl, - messageId: messageId, - boardname: boardname, - stackname: stackname, - size: size, - path: path, - mimetype: mimetype, - previewAvailable: previewAvailable, - mtime: mtime, - etag: etag, - permissions: permissions, - width: width, - height: height, - blurhash: blurhash, - latitude: latitude, - longitude: longitude, - description: description, - thumb: thumb, - website: website, - visibility: visibility, - assignable: assignable, - conversation: conversation, - server: server); - replace(_$result); - return _$result; - } -} - abstract mixin class $BaseMessageInterfaceBuilder { void replace($BaseMessageInterface other); void update(void Function($BaseMessageInterfaceBuilder) updates); @@ -23855,8 +22986,8 @@ abstract mixin class $BaseMessageInterfaceBuilder { String? get message; set message(String? message); - MapBuilder get messageParameters; - set messageParameters(MapBuilder? messageParameters); + MapBuilder> get messageParameters; + set messageParameters(MapBuilder>? messageParameters); MessageType? get messageType; set messageType(MessageType? messageType); @@ -23877,7 +23008,7 @@ class _$BaseMessage extends BaseMessage { @override final String message; @override - final BuiltMap messageParameters; + final BuiltMap> messageParameters; @override final MessageType messageType; @override @@ -23979,10 +23110,10 @@ class BaseMessageBuilder implements Builder, $B String? get message => _$this._message; set message(covariant String? message) => _$this._message = message; - MapBuilder? _messageParameters; - MapBuilder get messageParameters => - _$this._messageParameters ??= MapBuilder(); - set messageParameters(covariant MapBuilder? messageParameters) => + MapBuilder>? _messageParameters; + MapBuilder> get messageParameters => + _$this._messageParameters ??= MapBuilder>(); + set messageParameters(covariant MapBuilder>? messageParameters) => _$this._messageParameters = messageParameters; MessageType? _messageType; @@ -24118,8 +23249,8 @@ abstract mixin class $ChatMessageInterfaceBuilder implements $BaseMessageInterfa String? get message; set message(covariant String? message); - MapBuilder get messageParameters; - set messageParameters(covariant MapBuilder? messageParameters); + MapBuilder> get messageParameters; + set messageParameters(covariant MapBuilder>? messageParameters); MessageType? get messageType; set messageType(covariant MessageType? messageType); @@ -24168,7 +23299,7 @@ class _$ChatMessage extends ChatMessage { @override final String message; @override - final BuiltMap messageParameters; + final BuiltMap> messageParameters; @override final MessageType messageType; @override @@ -24390,10 +23521,10 @@ class ChatMessageBuilder implements Builder, $C String? get message => _$this._message; set message(covariant String? message) => _$this._message = message; - MapBuilder? _messageParameters; - MapBuilder get messageParameters => - _$this._messageParameters ??= MapBuilder(); - set messageParameters(covariant MapBuilder? messageParameters) => + MapBuilder>? _messageParameters; + MapBuilder> get messageParameters => + _$this._messageParameters ??= MapBuilder>(); + set messageParameters(covariant MapBuilder>? messageParameters) => _$this._messageParameters = messageParameters; MessageType? _messageType; @@ -34630,8 +33761,8 @@ abstract mixin class $ChatMessageWithParentInterfaceBuilder implements $ChatMess String? get message; set message(covariant String? message); - MapBuilder get messageParameters; - set messageParameters(covariant MapBuilder? messageParameters); + MapBuilder> get messageParameters; + set messageParameters(covariant MapBuilder>? messageParameters); MessageType? get messageType; set messageType(covariant MessageType? messageType); @@ -34682,7 +33813,7 @@ class _$ChatMessageWithParent extends ChatMessageWithParent { @override final String message; @override - final BuiltMap messageParameters; + final BuiltMap> messageParameters; @override final MessageType messageType; @override @@ -34915,10 +34046,10 @@ class ChatMessageWithParentBuilder String? get message => _$this._message; set message(covariant String? message) => _$this._message = message; - MapBuilder? _messageParameters; - MapBuilder get messageParameters => - _$this._messageParameters ??= MapBuilder(); - set messageParameters(covariant MapBuilder? messageParameters) => + MapBuilder>? _messageParameters; + MapBuilder> get messageParameters => + _$this._messageParameters ??= MapBuilder>(); + set messageParameters(covariant MapBuilder>? messageParameters) => _$this._messageParameters = messageParameters; MessageType? _messageType; diff --git a/packages/nextcloud/lib/src/api/spreed/spreed.openapi.json b/packages/nextcloud/lib/src/api/spreed/spreed.openapi.json index 13645af1a06..18ce6029afd 100644 --- a/packages/nextcloud/lib/src/api/spreed/spreed.openapi.json +++ b/packages/nextcloud/lib/src/api/spreed/spreed.openapi.json @@ -98,7 +98,10 @@ "messageParameters": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/RichObjectParameter" + "type": "object", + "additionalProperties": { + "type": "object" + } } }, "messageType": { @@ -977,196 +980,6 @@ } } }, - "RichObjectParameter": { - "type": "object", - "required": [ - "type", - "id", - "name" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "addressbook", - "addressbook-contact", - "announcement", - "app", - "calendar", - "calendar-event", - "call", - "circle", - "deck-board", - "deck-card", - "email", - "file", - "forms-form", - "guest", - "highlight", - "geo-location", - "open-graph", - "pending-federated-share", - "systemtag", - "talk-attachment", - "talk-poll", - "user", - "user-group" - ] - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "link": { - "type": "string", - "description": "The full URL to the file", - "example": "http://localhost/index.php/apps/announcements/#23" - }, - "call-type": { - "type": "string", - "description": "The type of the call: one2one, group or public", - "example": "one2one" - }, - "icon-url": { - "type": "string", - "description": "The icon url to use as avatar", - "example": "https://localhost/ocs/v2.php/apps/spreed/api/v1/room/R4nd0mToken/avatar" - }, - "message-id": { - "type": "string", - "description": "The id of a message that was referred to", - "example": "12345" - }, - "boardname": { - "type": "string", - "description": "The display name of board which contains the card", - "example": "Personal" - }, - "stackname": { - "type": "string", - "description": "The display name of the stack which contains the card in the board", - "example": "To do" - }, - "size": { - "description": "The file size in bytes", - "example": "3145728", - "oneOf": [ - { - "type": "string" - }, - { - "type": "integer" - } - ] - }, - "path": { - "type": "string", - "description": "The full path of the file for the user, should not start with a slash", - "example": "path/to/file.txt" - }, - "mimetype": { - "type": "string", - "description": "The mimetype of the file/folder to allow clients to show a placeholder", - "example": "text/plain" - }, - "preview-available": { - "type": "string", - "description": "Whether or not a preview is available. If `no` the mimetype icon should be used", - "example": "yes" - }, - "mtime": { - "type": "string", - "description": "The mtime of the file/folder as unix timestamp", - "example": "1661854213" - }, - "etag": { - "type": "string", - "description": "The ETag of the file/folder", - "example": "abcdefghi" - }, - "permissions": { - "type": "string", - "description": "The permissions on the file/folder", - "example": "3" - }, - "width": { - "description": "The width in pixels if the file is an image", - "example": "1920", - "oneOf": [ - { - "type": "string" - }, - { - "type": "integer" - } - ] - }, - "height": { - "description": "The height in pixels if the file is an image", - "example": "1080", - "oneOf": [ - { - "type": "string" - }, - { - "type": "integer" - } - ] - }, - "blurhash": { - "type": "string", - "description": "The blurhash of the image", - "example": "LEHV9uae2yk8pyo0adR*.7kCMdnj" - }, - "latitude": { - "type": "string", - "description": "The latitude of the location MUST be the same as in the id", - "example": "52.5450511" - }, - "longitude": { - "type": "string", - "description": "The longitude of the location MUST be the same as in the id", - "example": "13.3741463" - }, - "description": { - "type": "string", - "description": "The open graph description from the website", - "example": "This is the description of the website" - }, - "thumb": { - "type": "string", - "description": "The full URL of the open graph thumbnail", - "example": "http://localhost/index.php/apps/mood/data/image?url=https%3A%2F%2Fthumb.example.com%2Fimage.png" - }, - "website": { - "type": "string", - "description": "The name of the described website", - "example": "Nextcloud - App Store" - }, - "visibility": { - "type": "string", - "description": "If the user can see the systemtag", - "example": "1" - }, - "assignable": { - "type": "string", - "description": "If the user can assign the systemtag", - "example": "0" - }, - "conversation": { - "type": "string", - "description": "The token of the conversation", - "example": "a1b2c3d4" - }, - "server": { - "type": "string", - "description": "The URL of the instance the user lives on", - "example": "localhost" - } - } - }, "Room": { "type": "object", "required": [ diff --git a/tool/generate-rich-objects-patch.php b/tool/generate-rich-objects-patch.php index b81518e8aab..d4ae30edb76 100755 --- a/tool/generate-rich-objects-patch.php +++ b/tool/generate-rich-objects-patch.php @@ -26,13 +26,6 @@ } $patch = [ - [ - 'op' => 'replace', - 'path' => '/components/schemas/BaseMessage/properties/messageParameters/additionalProperties', - 'value' => [ - '$ref' => '#/components/schemas/RichObjectParameter', - ], - ], [ 'op' => 'add', 'path' => '/components/schemas/RichObjectParameter', @@ -48,7 +41,7 @@ if ($data === false) { throw new RuntimeException('Failed to encode JSON'); } -$success = file_put_contents('packages/nextcloud/lib/src/api/spreed/patches/1-message-parameters.json', $data); +$success = file_put_contents('packages/nextcloud/lib/src/api/core/patches/0-rich-object-parameter.json', $data); if ($success === false) { throw new RuntimeException('Failed to write JSON'); }