Skip to content

Commit

Permalink
feat(webhosting): add public v1 offer name and quota warning (#1694)
Browse files Browse the repository at this point in the history
  • Loading branch information
scaleway-bot authored Dec 26, 2024
1 parent a815ea9 commit 7e9abe7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/clients/src/api/webhosting/v1/marshalling.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,10 @@ const unmarshalOffer = (data: unknown): Offer => {
controlPanelName: data.control_panel_name,
endOfLife: data.end_of_life,
id: data.id,
name: data.name,
options: unmarshalArrayOfObject(data.options, unmarshalOfferOption),
price: data.price ? unmarshalMoney(data.price) : undefined,
quotaWarning: data.quota_warning,
} as Offer
}

Expand Down
14 changes: 13 additions & 1 deletion packages/clients/src/api/webhosting/v1/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,13 @@ export type OfferOptionName =
| 'ram_gb'
| 'backup'
| 'dedicated_ip'
| 'email_storage_gb'
| 'database_count'

export type OfferOptionWarning = 'unknown_warning' | 'quota_exceeded_warning'
export type OfferOptionWarning =
| 'unknown_warning'
| 'quota_exceeded_warning'
| 'usage_low_warning'

export type PlatformPlatformGroup = 'unknown_group' | 'default' | 'premium'

Expand Down Expand Up @@ -169,6 +174,8 @@ export interface HostingUser {
export interface Offer {
/** Offer ID. */
id: string
/** Offer name. */
name: string
/** Unique identifier used for billing. */
billingOperationPath: string
/** Options available for the offer. */
Expand All @@ -184,6 +191,11 @@ export interface Offer {
controlPanelName: string
/** Indicates if the offer has reached its end of life. */
endOfLife: boolean
/**
* Defines a warning if the maximum value for an option in the offer is
* exceeded.
*/
quotaWarning: OfferOptionWarning
}

export interface Platform {
Expand Down

0 comments on commit 7e9abe7

Please sign in to comment.