diff --git a/packages/shorebird_code_push_protocol/lib/src/messages/get_release_patches/get_release_patches.dart b/packages/shorebird_code_push_protocol/lib/src/messages/get_release_patches/get_release_patches.dart deleted file mode 100644 index 77d0e8f8..00000000 --- a/packages/shorebird_code_push_protocol/lib/src/messages/get_release_patches/get_release_patches.dart +++ /dev/null @@ -1 +0,0 @@ -export 'get_release_patches_response.dart'; diff --git a/packages/shorebird_code_push_protocol/lib/src/messages/get_release_patches/get_release_patches_response.dart b/packages/shorebird_code_push_protocol/lib/src/messages/get_release_patches/get_release_patches_response.dart deleted file mode 100644 index 2c0c2873..00000000 --- a/packages/shorebird_code_push_protocol/lib/src/messages/get_release_patches/get_release_patches_response.dart +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:json_annotation/json_annotation.dart'; -import 'package:shorebird_code_push_protocol/shorebird_code_push_protocol.dart'; - -part 'get_release_patches_response.g.dart'; - -/// {@template get_release_patches_response} -/// The response to /api/v1/apps/$appId/releases/$releaseId/patches -/// {@endtemplate} -@JsonSerializable() -class GetReleasePatchesResponse { - /// {@macro get_release_patches_response} - const GetReleasePatchesResponse({required this.patches}); - - /// Converts a Map to a [GetReleasePatchesResponse] - factory GetReleasePatchesResponse.fromJson(Map json) => - _$GetReleasePatchesResponseFromJson(json); - - /// Converts a [GetReleasePatchesResponse] to a Map - Json toJson() => _$GetReleasePatchesResponseToJson(this); - - /// Patch numbers for a given release mapped to their artifacts. - final Map> patches; -} diff --git a/packages/shorebird_code_push_protocol/lib/src/messages/get_release_patches/get_release_patches_response.g.dart b/packages/shorebird_code_push_protocol/lib/src/messages/get_release_patches/get_release_patches_response.g.dart deleted file mode 100644 index fe05628b..00000000 --- a/packages/shorebird_code_push_protocol/lib/src/messages/get_release_patches/get_release_patches_response.g.dart +++ /dev/null @@ -1,38 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -// ignore_for_file: implicit_dynamic_parameter, require_trailing_commas, cast_nullable_to_non_nullable, lines_longer_than_80_chars - -part of 'get_release_patches_response.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -GetReleasePatchesResponse _$GetReleasePatchesResponseFromJson( - Map json) => - $checkedCreate( - 'GetReleasePatchesResponse', - json, - ($checkedConvert) { - final val = GetReleasePatchesResponse( - patches: $checkedConvert( - 'patches', - (v) => (v as Map).map( - (k, e) => MapEntry( - int.parse(k), - (e as List) - .map((e) => PatchArtifact.fromJson( - e as Map)) - .toList()), - )), - ); - return val; - }, - ); - -Map _$GetReleasePatchesResponseToJson( - GetReleasePatchesResponse instance) => - { - 'patches': instance.patches.map( - (k, e) => MapEntry(k.toString(), e.map((e) => e.toJson()).toList())), - }; diff --git a/packages/shorebird_code_push_protocol/lib/src/messages/messages.dart b/packages/shorebird_code_push_protocol/lib/src/messages/messages.dart index 53f1af2c..f949c755 100644 --- a/packages/shorebird_code_push_protocol/lib/src/messages/messages.dart +++ b/packages/shorebird_code_push_protocol/lib/src/messages/messages.dart @@ -13,7 +13,6 @@ export 'create_user/create_user.dart'; export 'get_apps/get_apps.dart'; export 'get_overages/get_overages.dart'; export 'get_release_artifacts/get_release_artifacts.dart'; -export 'get_release_patches/get_release_patches.dart'; export 'get_releases/get_releases.dart'; export 'get_usage/get_usage.dart'; export 'promote_patch/promote_patch.dart'; diff --git a/packages/shorebird_code_push_protocol/test/src/messages/get_release_patches/get_release_patches_response_test.dart b/packages/shorebird_code_push_protocol/test/src/messages/get_release_patches/get_release_patches_response_test.dart deleted file mode 100644 index c93fde83..00000000 --- a/packages/shorebird_code_push_protocol/test/src/messages/get_release_patches/get_release_patches_response_test.dart +++ /dev/null @@ -1,61 +0,0 @@ -import 'package:shorebird_code_push_protocol/shorebird_code_push_protocol.dart'; -import 'package:test/test.dart'; - -void main() { - group(GetReleasePatchesResponse, () { - test('can be (de)serialized', () { - final response = GetReleasePatchesResponse( - patches: { - 1: [ - PatchArtifact( - id: 1, - patchId: 1, - arch: 'aarch64', - platform: ReleasePlatform.android, - url: 'https://example.com', - size: 42, - hash: 'sha256:1234567890', - createdAt: DateTime(2023), - ), - PatchArtifact( - id: 2, - patchId: 1, - arch: 'aarch64', - platform: ReleasePlatform.android, - url: 'https://example.com', - size: 42, - hash: 'sha256:1234567890', - createdAt: DateTime(2023), - ), - ], - 2: [ - PatchArtifact( - id: 3, - patchId: 2, - arch: 'aarch64', - platform: ReleasePlatform.android, - url: 'https://example.com', - size: 42, - hash: 'sha256:1234567890', - createdAt: DateTime(2023), - ), - PatchArtifact( - id: 4, - patchId: 3, - arch: 'aarch64', - platform: ReleasePlatform.android, - url: 'https://example.com', - size: 42, - hash: 'sha256:1234567890', - createdAt: DateTime(2023), - ), - ], - }, - ); - expect( - GetReleasePatchesResponse.fromJson(response.toJson()).toJson(), - equals(response.toJson()), - ); - }); - }); -}