Skip to content

Commit 77d40ba

Browse files
author
serverpod_cloud
committed
feat(gc): 01a3bdf51af81270433b083ff80b100dfe961bae
1 parent 0846a04 commit 77d40ba

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

ground_control_client/lib/src/protocol/client.dart

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,39 @@ class EndpointLogs extends _i1.EndpointRef {
532532
);
533533
}
534534

535+
/// Endpoint for managing subscription plans.
536+
/// {@category Endpoint}
537+
class EndpointPlans extends _i1.EndpointRef {
538+
EndpointPlans(_i1.EndpointCaller caller) : super(caller);
539+
540+
@override
541+
String get name => 'plans';
542+
543+
/// Procures a subscription plan.
544+
_i2.Future<void> procurePlan({required String planName}) =>
545+
caller.callServerEndpoint<void>(
546+
'plans',
547+
'procurePlan',
548+
{'planName': planName},
549+
);
550+
551+
/// Fetches the names of the procured subscription plans.
552+
_i2.Future<List<String>> listProcuredPlanNames() =>
553+
caller.callServerEndpoint<List<String>>(
554+
'plans',
555+
'listProcuredPlanNames',
556+
{},
557+
);
558+
559+
/// Fetches the names of the available subscription plans.
560+
_i2.Future<List<String>> listPlanNames() =>
561+
caller.callServerEndpoint<List<String>>(
562+
'plans',
563+
'listPlanNames',
564+
{},
565+
);
566+
}
567+
535568
/// Endpoint for database management.
536569
/// {@category Endpoint}
537570
class EndpointDatabase extends _i1.EndpointRef {
@@ -925,6 +958,7 @@ class Client extends _i1.ServerpodClientShared {
925958
deploy = EndpointDeploy(this);
926959
environmentVariables = EndpointEnvironmentVariables(this);
927960
logs = EndpointLogs(this);
961+
plans = EndpointPlans(this);
928962
database = EndpointDatabase(this);
929963
infraResources = EndpointInfraResources(this);
930964
projects = EndpointProjects(this);
@@ -953,6 +987,8 @@ class Client extends _i1.ServerpodClientShared {
953987

954988
late final EndpointLogs logs;
955989

990+
late final EndpointPlans plans;
991+
956992
late final EndpointDatabase database;
957993

958994
late final EndpointInfraResources infraResources;
@@ -980,6 +1016,7 @@ class Client extends _i1.ServerpodClientShared {
9801016
'deploy': deploy,
9811017
'environmentVariables': environmentVariables,
9821018
'logs': logs,
1019+
'plans': plans,
9831020
'database': database,
9841021
'infraResources': infraResources,
9851022
'projects': projects,

0 commit comments

Comments
 (0)