Skip to content

Commit d843ab1

Browse files
author
serverpod_cloud
committed
feat: 784471944584cf9ebbc4d6d0e2b9cc0f18e19bd4
1 parent 24cf209 commit d843ab1

1 file changed

Lines changed: 18 additions & 4 deletions

File tree

ground_control_client/lib/src/protocol/client.dart

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,16 @@ class EndpointAdminProjects extends _i1.EndpointRef {
210210
/// infrastructure on behalf of a user.
211211
/// Executes the same deletion code path as the regular deleteProject endpoint,
212212
/// but bypasses project-level authorization.
213-
_i2.Future<_i3.Project> deleteProject({required String cloudProjectId}) =>
213+
///
214+
/// If [keepEmptySubscription] is true, the project's subscription is not
215+
/// terminated even if it has no more resource products.
216+
_i2.Future<_i3.Project> deleteProject({
217+
required String cloudProjectId,
218+
bool? keepEmptySubscription,
219+
}) =>
214220
caller.callServerEndpoint<_i3.Project>('adminProjects', 'deleteProject', {
215221
'cloudProjectId': cloudProjectId,
222+
'keepEmptySubscription': keepEmptySubscription,
216223
});
217224

218225
/// Redeploys a capsule using its current image.
@@ -1080,7 +1087,9 @@ class EndpointProjects extends _i1.EndpointRef {
10801087

10811088
/// Creates a new project with basic setup.
10821089
///
1083-
/// The [cloudProjectId] must be globally unique.
1090+
/// Currently also creates its capsule.
1091+
///
1092+
/// [cloudProjectId] is the id of the new project, it must be valid and globally unique.
10841093
///
10851094
/// [underSubscriptionId] optionally specifies a subscription to procure the
10861095
/// project under, or the user's first found subscription will be used.
@@ -1089,9 +1098,10 @@ class EndpointProjects extends _i1.EndpointRef {
10891098
/// [projectProductName] optionally specify the project product name to use,
10901099
/// defaults to the first available bundled product for the subscription plan.
10911100
///
1101+
/// Throws [ProcurementDeniedException] if the project procurement fails or the subscription is invalid.
10921102
/// Throws [InvalidValueException] if the project name is invalid.
1093-
/// Throws [NotFoundException] if the subscription or the product is not found.
1094-
/// Throws [ProcurementDeniedException] if the procurement fails.
1103+
/// Throws [DuplicateEntryException] if the project id already exists.
1104+
/// Throws [NoSubscriptionException] if no subscription was provided and the user has no subscription.
10951105
_i2.Future<_i3.Project> createProject({
10961106
required String cloudProjectId,
10971107
String? underSubscriptionId,
@@ -1140,6 +1150,10 @@ class EndpointProjects extends _i1.EndpointRef {
11401150
/// Archives a project and its capsule and permanently deletes its infrastructure.
11411151
/// The id of the project is not available for reuse but the same string can
11421152
/// be assigned as the "name" of another capsule.
1153+
///
1154+
/// The project's subscription is terminated immediately if it has no more resource products.
1155+
///
1156+
/// If the project does not exist or is archived, [NotFoundException] is thrown.
11431157
_i2.Future<_i3.Project> deleteProject({required String cloudProjectId}) =>
11441158
caller.callServerEndpoint<_i3.Project>('projects', 'deleteProject', {
11451159
'cloudProjectId': cloudProjectId,

0 commit comments

Comments
 (0)