diff --git a/packages/shorebird_code_push_protocol/lib/src/messages/create_app/create_app_request.dart b/packages/shorebird_code_push_protocol/lib/src/messages/create_app/create_app_request.dart index 2ecd9ce9..0dc47f03 100644 --- a/packages/shorebird_code_push_protocol/lib/src/messages/create_app/create_app_request.dart +++ b/packages/shorebird_code_push_protocol/lib/src/messages/create_app/create_app_request.dart @@ -8,7 +8,10 @@ part 'create_app_request.g.dart'; @JsonSerializable() class CreateAppRequest { /// {@macro create_app_request} - const CreateAppRequest({required this.displayName}); + const CreateAppRequest({ + required this.displayName, + this.organizationId, + }); /// Converts a Map to a [CreateAppRequest] factory CreateAppRequest.fromJson(Map json) => @@ -19,4 +22,8 @@ class CreateAppRequest { /// The display name of the app. final String displayName; + + /// The id of organization that this app will belong to. If no id is provided, + /// this app will belong to the user's personal organization. + final int? organizationId; } diff --git a/packages/shorebird_code_push_protocol/lib/src/messages/create_app/create_app_request.g.dart b/packages/shorebird_code_push_protocol/lib/src/messages/create_app/create_app_request.g.dart index 283e0bda..fd91e54c 100644 --- a/packages/shorebird_code_push_protocol/lib/src/messages/create_app/create_app_request.g.dart +++ b/packages/shorebird_code_push_protocol/lib/src/messages/create_app/create_app_request.g.dart @@ -15,13 +15,19 @@ CreateAppRequest _$CreateAppRequestFromJson(Map json) => ($checkedConvert) { final val = CreateAppRequest( displayName: $checkedConvert('display_name', (v) => v as String), + organizationId: + $checkedConvert('organization_id', (v) => (v as num?)?.toInt()), ); return val; }, - fieldKeyMap: const {'displayName': 'display_name'}, + fieldKeyMap: const { + 'displayName': 'display_name', + 'organizationId': 'organization_id' + }, ); Map _$CreateAppRequestToJson(CreateAppRequest instance) => { 'display_name': instance.displayName, + 'organization_id': instance.organizationId, };