Skip to content

Commit

Permalink
feat(tool,nextcloud): Add drop_account app
Browse files Browse the repository at this point in the history
Signed-off-by: provokateurin <[email protected]>
  • Loading branch information
provokateurin committed Feb 29, 2024
1 parent cea5d73 commit 0b9f502
Show file tree
Hide file tree
Showing 15 changed files with 1,486 additions and 23 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@
[submodule "external/nextcloud-openapi-extractor"]
path = external/nextcloud-openapi-extractor
url = https://github.com/nextcloud/openapi-extractor.git
[submodule "external/nextcloud-drop_account"]
path = external/nextcloud-drop_account
url = https://framagit.org/framasoft/nextcloud/drop_account.git
1 change: 1 addition & 0 deletions external/nextcloud-drop_account
Submodule nextcloud-drop_account added at 7829dd
1 change: 1 addition & 0 deletions packages/neon_framework/test/weather_status_bloc_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ core.OcsGetCapabilitiesResponseApplicationJson_Ocs_Data buildCapabilities({requi
..capabilities = (
commentsCapabilities: null,
davCapabilities: null,
dropAccountCapabilities: null,
filesCapabilities: null,
filesSharingCapabilities: null,
filesTrashbinCapabilities: null,
Expand Down
17 changes: 9 additions & 8 deletions packages/nextcloud/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,15 @@ These OpenAPI specifications are [generated](https://github.com/nextcloud/openap

## Compatibility/Support policy

| Component | Supported versions (1) |
|-----------------------------------------------------------------|------------------------|
| [Server](https://github.com/nextcloud/server) (2) | 26 - 28 |
| [News app](https://github.com/nextcloud/news) | 21 - 25 |
| [Notes app](https://github.com/nextcloud/notes) | 4.7 - 4.9 |
| [Notifications app](https://github.com/nextcloud/notifications) | 26 - 28 |
| [Talk app](https://github.com/nextcloud/spreed) | 16 - 18 |
| [NextPush app](https://codeberg.org/NextPush/uppush) | 1.3 - 1.4 |
| Component | Supported versions (1) |
|------------------------------------------------------------------------------------|------------------------|
| [Server](https://github.com/nextcloud/server) (2) | 26 - 28 |
| [News app](https://github.com/nextcloud/news) | 21 - 25 |
| [Notes app](https://github.com/nextcloud/notes) | 4.7 - 4.9 |
| [Notifications app](https://github.com/nextcloud/notifications) | 26 - 28 |
| [Talk app](https://github.com/nextcloud/spreed) | 16 - 18 |
| [NextPush app](https://codeberg.org/NextPush/uppush) | 1.3 - 1.4 |
| [User account deletion app](https://framagit.org/framasoft/nextcloud/drop_account) | 2.3 - 2.4 |

1: Other versions might be supported too or at least mostly working, but we do not test against those.
2: Server includes the following apps: comments, core, dashboard, dav, files, files_external, files_reminders, files_sharing, files_trashbin, files_versions, provisioning_api, settings, sharebymail, theming, updatenotification, user_status, weather_status and WebDAV.
Expand Down
1 change: 1 addition & 0 deletions packages/nextcloud/lib/drop_account.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export 'src/api/drop_account.openapi.dart';
3 changes: 3 additions & 0 deletions packages/nextcloud/lib/ids.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ final class AppIDs {
/// ID for the dav app.
static const dav = 'dav';

/// ID for the drop_account app.
static const dropAccount = 'drop_account';

/// ID for the files app.
static const files = 'files';

Expand Down
169 changes: 154 additions & 15 deletions packages/nextcloud/lib/src/api/core.openapi.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7338,6 +7338,120 @@ abstract class DavCapabilities implements $DavCapabilitiesInterface, Built<DavCa
static Serializer<DavCapabilities> get serializer => _$davCapabilitiesSerializer;
}

@BuiltValue(instantiable: false)
abstract interface class $DropAccountCapabilities_DropAccount_DelayInterface {
bool get enabled;
int get hours;
}

abstract class DropAccountCapabilities_DropAccount_Delay
implements
$DropAccountCapabilities_DropAccount_DelayInterface,
Built<DropAccountCapabilities_DropAccount_Delay, DropAccountCapabilities_DropAccount_DelayBuilder> {
/// Creates a new DropAccountCapabilities_DropAccount_Delay object using the builder pattern.
factory DropAccountCapabilities_DropAccount_Delay([
void Function(DropAccountCapabilities_DropAccount_DelayBuilder)? b,
]) = _$DropAccountCapabilities_DropAccount_Delay;

// coverage:ignore-start
const DropAccountCapabilities_DropAccount_Delay._();
// coverage:ignore-end

/// Creates a new object from the given [json] data.
///
/// Use [toJson] to serialize it back into json.
// coverage:ignore-start
factory DropAccountCapabilities_DropAccount_Delay.fromJson(Map<String, dynamic> 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<String, dynamic> toJson() => _$jsonSerializers.serializeWith(serializer, this)! as Map<String, dynamic>;
// coverage:ignore-end

/// Serializer for DropAccountCapabilities_DropAccount_Delay.
static Serializer<DropAccountCapabilities_DropAccount_Delay> get serializer =>
_$dropAccountCapabilitiesDropAccountDelaySerializer;
}

@BuiltValue(instantiable: false)
abstract interface class $DropAccountCapabilities_DropAccountInterface {
bool get enabled;
@BuiltValueField(wireName: 'api-version')
String get apiVersion;
DropAccountCapabilities_DropAccount_Delay get delay;
String? get details;
}

abstract class DropAccountCapabilities_DropAccount
implements
$DropAccountCapabilities_DropAccountInterface,
Built<DropAccountCapabilities_DropAccount, DropAccountCapabilities_DropAccountBuilder> {
/// Creates a new DropAccountCapabilities_DropAccount object using the builder pattern.
factory DropAccountCapabilities_DropAccount([void Function(DropAccountCapabilities_DropAccountBuilder)? b]) =
_$DropAccountCapabilities_DropAccount;

// coverage:ignore-start
const DropAccountCapabilities_DropAccount._();
// coverage:ignore-end

/// Creates a new object from the given [json] data.
///
/// Use [toJson] to serialize it back into json.
// coverage:ignore-start
factory DropAccountCapabilities_DropAccount.fromJson(Map<String, dynamic> 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<String, dynamic> toJson() => _$jsonSerializers.serializeWith(serializer, this)! as Map<String, dynamic>;
// coverage:ignore-end

/// Serializer for DropAccountCapabilities_DropAccount.
static Serializer<DropAccountCapabilities_DropAccount> get serializer =>
_$dropAccountCapabilitiesDropAccountSerializer;
}

@BuiltValue(instantiable: false)
abstract interface class $DropAccountCapabilitiesInterface {
@BuiltValueField(wireName: 'drop-account')
DropAccountCapabilities_DropAccount get dropAccount;
}

abstract class DropAccountCapabilities
implements $DropAccountCapabilitiesInterface, Built<DropAccountCapabilities, DropAccountCapabilitiesBuilder> {
/// Creates a new DropAccountCapabilities object using the builder pattern.
factory DropAccountCapabilities([void Function(DropAccountCapabilitiesBuilder)? b]) = _$DropAccountCapabilities;

// coverage:ignore-start
const DropAccountCapabilities._();
// coverage:ignore-end

/// Creates a new object from the given [json] data.
///
/// Use [toJson] to serialize it back into json.
// coverage:ignore-start
factory DropAccountCapabilities.fromJson(Map<String, dynamic> 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<String, dynamic> toJson() => _$jsonSerializers.serializeWith(serializer, this)! as Map<String, dynamic>;
// coverage:ignore-end

/// Serializer for DropAccountCapabilities.
static Serializer<DropAccountCapabilities> get serializer => _$dropAccountCapabilitiesSerializer;
}

@BuiltValue(instantiable: false)
abstract interface class $FilesCapabilities_Files_DirectEditingInterface {
String get url;
Expand Down Expand Up @@ -9285,6 +9399,7 @@ abstract class NotesCapabilities
typedef OcsGetCapabilitiesResponseApplicationJson_Ocs_Data_Capabilities = ({
CommentsCapabilities? commentsCapabilities,
DavCapabilities? davCapabilities,
DropAccountCapabilities? dropAccountCapabilities,
FilesCapabilities? filesCapabilities,
FilesSharingCapabilities? filesSharingCapabilities,
FilesTrashbinCapabilities? filesTrashbinCapabilities,
Expand Down Expand Up @@ -12904,13 +13019,13 @@ extension $OcsGetCapabilitiesResponseApplicationJson_Ocs_Data_CapabilitiesExtens
/// Serializer for OcsGetCapabilitiesResponseApplicationJson_Ocs_Data_Capabilities.
@BuiltValueSerializer(custom: true)
static Serializer<OcsGetCapabilitiesResponseApplicationJson_Ocs_Data_Capabilities> get serializer =>
$3dc1754764311166375258bea55197c8Extension._serializer;
$d7df54b8bef6b092d401eed2bcfbb6f0Extension._serializer;

/// Creates a new object from the given [json] data.
///
/// Use `toJson` to serialize it back into json.
static OcsGetCapabilitiesResponseApplicationJson_Ocs_Data_Capabilities fromJson(Object? json) =>
$3dc1754764311166375258bea55197c8Extension._fromJson(json);
$d7df54b8bef6b092d401eed2bcfbb6f0Extension._fromJson(json);
}

/// Serialization extension for `UnifiedSearchSearchCursor`.
Expand Down Expand Up @@ -13230,9 +13345,10 @@ class _$06c2e47196a84ebc3718dccf9eb4b29dSerializer implements PrimitiveSerialize
}
}

typedef _$3dc1754764311166375258bea55197c8 = ({
typedef _$d7df54b8bef6b092d401eed2bcfbb6f0 = ({
CommentsCapabilities? commentsCapabilities,
DavCapabilities? davCapabilities,
DropAccountCapabilities? dropAccountCapabilities,
FilesCapabilities? filesCapabilities,
FilesSharingCapabilities? filesSharingCapabilities,
FilesTrashbinCapabilities? filesTrashbinCapabilities,
Expand All @@ -13249,10 +13365,11 @@ typedef _$3dc1754764311166375258bea55197c8 = ({

/// @nodoc
// ignore: library_private_types_in_public_api
extension $3dc1754764311166375258bea55197c8Extension on _$3dc1754764311166375258bea55197c8 {
extension $d7df54b8bef6b092d401eed2bcfbb6f0Extension on _$d7df54b8bef6b092d401eed2bcfbb6f0 {
List<dynamic> get _values => [
commentsCapabilities,
davCapabilities,
dropAccountCapabilities,
filesCapabilities,
filesSharingCapabilities,
filesTrashbinCapabilities,
Expand All @@ -13272,9 +13389,9 @@ extension $3dc1754764311166375258bea55197c8Extension on _$3dc1754764311166375258

/// {@macro Dynamite.validateAnyOf}
void validateAnyOf() => _i2.validateAnyOf(_values);
static Serializer<_$3dc1754764311166375258bea55197c8> get _serializer =>
const _$3dc1754764311166375258bea55197c8Serializer();
static _$3dc1754764311166375258bea55197c8 _fromJson(Object? json) =>
static Serializer<_$d7df54b8bef6b092d401eed2bcfbb6f0> get _serializer =>
const _$d7df54b8bef6b092d401eed2bcfbb6f0Serializer();
static _$d7df54b8bef6b092d401eed2bcfbb6f0 _fromJson(Object? json) =>
_$jsonSerializers.deserializeWith(_serializer, json)!;

/// Parses this object into a json like map.
Expand All @@ -13283,19 +13400,19 @@ extension $3dc1754764311166375258bea55197c8Extension on _$3dc1754764311166375258
Object? toJson() => _$jsonSerializers.serializeWith(_serializer, this);
}

class _$3dc1754764311166375258bea55197c8Serializer implements PrimitiveSerializer<_$3dc1754764311166375258bea55197c8> {
const _$3dc1754764311166375258bea55197c8Serializer();
class _$d7df54b8bef6b092d401eed2bcfbb6f0Serializer implements PrimitiveSerializer<_$d7df54b8bef6b092d401eed2bcfbb6f0> {
const _$d7df54b8bef6b092d401eed2bcfbb6f0Serializer();

@override
Iterable<Type> get types => const [_$3dc1754764311166375258bea55197c8];
Iterable<Type> get types => const [_$d7df54b8bef6b092d401eed2bcfbb6f0];

@override
String get wireName => r'_$3dc1754764311166375258bea55197c8';
String get wireName => r'_$d7df54b8bef6b092d401eed2bcfbb6f0';

@override
Object serialize(
Serializers serializers,
_$3dc1754764311166375258bea55197c8 object, {
_$d7df54b8bef6b092d401eed2bcfbb6f0 object, {
FullType specifiedType = FullType.unspecified,
}) {
dynamic value;
Expand All @@ -13307,6 +13424,10 @@ class _$3dc1754764311166375258bea55197c8Serializer implements PrimitiveSerialize
if (value != null) {
return serializers.serialize(value, specifiedType: const FullType(DavCapabilities))!;
}
value = object.dropAccountCapabilities;
if (value != null) {
return serializers.serialize(value, specifiedType: const FullType(DropAccountCapabilities))!;
}
value = object.filesCapabilities;
if (value != null) {
return serializers.serialize(value, specifiedType: const FullType(FilesCapabilities))!;
Expand Down Expand Up @@ -13360,7 +13481,7 @@ class _$3dc1754764311166375258bea55197c8Serializer implements PrimitiveSerialize
}

@override
_$3dc1754764311166375258bea55197c8 deserialize(
_$d7df54b8bef6b092d401eed2bcfbb6f0 deserialize(
Serializers serializers,
Object data, {
FullType specifiedType = FullType.unspecified,
Expand All @@ -13375,6 +13496,11 @@ class _$3dc1754764311166375258bea55197c8Serializer implements PrimitiveSerialize
davCapabilities =
serializers.deserialize(data, specifiedType: const FullType(DavCapabilities))! as DavCapabilities;
} catch (_) {}
DropAccountCapabilities? dropAccountCapabilities;
try {
dropAccountCapabilities = serializers.deserialize(data, specifiedType: const FullType(DropAccountCapabilities))!
as DropAccountCapabilities;
} catch (_) {}
FilesCapabilities? filesCapabilities;
try {
filesCapabilities =
Expand Down Expand Up @@ -13454,6 +13580,7 @@ class _$3dc1754764311166375258bea55197c8Serializer implements PrimitiveSerialize
return (
commentsCapabilities: commentsCapabilities,
davCapabilities: davCapabilities,
dropAccountCapabilities: dropAccountCapabilities,
filesCapabilities: filesCapabilities,
filesSharingCapabilities: filesSharingCapabilities,
filesTrashbinCapabilities: filesTrashbinCapabilities,
Expand Down Expand Up @@ -13736,6 +13863,18 @@ final Serializers _$serializers = (Serializers().toBuilder()
..add(DavCapabilities.serializer)
..addBuilderFactory(const FullType(DavCapabilities_Dav), DavCapabilities_DavBuilder.new)
..add(DavCapabilities_Dav.serializer)
..addBuilderFactory(const FullType(DropAccountCapabilities), DropAccountCapabilitiesBuilder.new)
..add(DropAccountCapabilities.serializer)
..addBuilderFactory(
const FullType(DropAccountCapabilities_DropAccount),
DropAccountCapabilities_DropAccountBuilder.new,
)
..add(DropAccountCapabilities_DropAccount.serializer)
..addBuilderFactory(
const FullType(DropAccountCapabilities_DropAccount_Delay),
DropAccountCapabilities_DropAccount_DelayBuilder.new,
)
..add(DropAccountCapabilities_DropAccount_Delay.serializer)
..addBuilderFactory(const FullType(FilesCapabilities), FilesCapabilitiesBuilder.new)
..add(FilesCapabilities.serializer)
..addBuilderFactory(const FullType(FilesCapabilities_Files), FilesCapabilities_FilesBuilder.new)
Expand Down Expand Up @@ -13934,7 +14073,7 @@ final Serializers _$serializers = (Serializers().toBuilder()
..add(NotesCapabilities.serializer)
..addBuilderFactory(const FullType(NotesCapabilities_Notes), NotesCapabilities_NotesBuilder.new)
..add(NotesCapabilities_Notes.serializer)
..add($3dc1754764311166375258bea55197c8Extension._serializer)
..add($d7df54b8bef6b092d401eed2bcfbb6f0Extension._serializer)
..add(PreviewGetPreviewByFileIdA.serializer)
..add(PreviewGetPreviewByFileIdForceIcon.serializer)
..add(PreviewGetPreviewByFileIdMimeFallback.serializer)
Expand Down Expand Up @@ -14330,7 +14469,7 @@ final Serializers _$jsonSerializers = (_$serializers.toBuilder()
_$b2c4857c0136baea42828d89c87c757d,
_$46564992d3ed3482aa6c1162698aac99,
_$06c2e47196a84ebc3718dccf9eb4b29d,
_$3dc1754764311166375258bea55197c8,
_$d7df54b8bef6b092d401eed2bcfbb6f0,
},
),
)
Expand Down
Loading

0 comments on commit 0b9f502

Please sign in to comment.