Skip to content

Commit 79c21cd

Browse files
feat(apple_silicon): adapt public API for automatic server deletion (#1384)
Co-authored-by: Rémy Léone <[email protected]>
1 parent cb84762 commit 79c21cd

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

packages/clients/src/api/applesilicon/v1alpha1/marshalling.gen.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ export const unmarshalServer = (data: unknown): Server => {
140140
return {
141141
createdAt: unmarshalDate(data.created_at),
142142
deletableAt: unmarshalDate(data.deletable_at),
143+
deletionScheduled: data.deletion_scheduled,
143144
id: data.id,
144145
ip: data.ip,
145146
name: data.name,
@@ -220,4 +221,5 @@ export const marshalUpdateServerRequest = (
220221
defaults: DefaultValues,
221222
): Record<string, unknown> => ({
222223
name: request.name,
224+
schedule_deletion: request.scheduleDeletion,
223225
})

packages/clients/src/api/applesilicon/v1alpha1/types.gen.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,14 @@ export interface Server {
118118
createdAt?: Date
119119
/** Date on which the server was last updated. */
120120
updatedAt?: Date
121-
/** Date on which the server was last deleted. */
121+
/** Date from which the server can be deleted. */
122122
deletableAt?: Date
123+
/**
124+
* Set to true to mark the server for automatic deletion depending on
125+
* `deletable_at` date. Set to false to cancel an existing deletion schedule.
126+
* Leave unset otherwise.
127+
*/
128+
deletionScheduled: boolean
123129
/** Zone of the server. */
124130
zone: Zone
125131
}
@@ -256,4 +262,6 @@ export type UpdateServerRequest = {
256262
serverId: string
257263
/** Updated name for your server. */
258264
name?: string
265+
/** Specify whether the server should be flagged for automatic deletion. */
266+
scheduleDeletion?: boolean
259267
}

0 commit comments

Comments
 (0)