Skip to content

Commit 7e9abe7

Browse files
authored
feat(webhosting): add public v1 offer name and quota warning (#1694)
1 parent a815ea9 commit 7e9abe7

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

packages/clients/src/api/webhosting/v1/marshalling.gen.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,10 @@ const unmarshalOffer = (data: unknown): Offer => {
243243
controlPanelName: data.control_panel_name,
244244
endOfLife: data.end_of_life,
245245
id: data.id,
246+
name: data.name,
246247
options: unmarshalArrayOfObject(data.options, unmarshalOfferOption),
247248
price: data.price ? unmarshalMoney(data.price) : undefined,
249+
quotaWarning: data.quota_warning,
248250
} as Offer
249251
}
250252

packages/clients/src/api/webhosting/v1/types.gen.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,13 @@ export type OfferOptionName =
6565
| 'ram_gb'
6666
| 'backup'
6767
| 'dedicated_ip'
68+
| 'email_storage_gb'
69+
| 'database_count'
6870

69-
export type OfferOptionWarning = 'unknown_warning' | 'quota_exceeded_warning'
71+
export type OfferOptionWarning =
72+
| 'unknown_warning'
73+
| 'quota_exceeded_warning'
74+
| 'usage_low_warning'
7075

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

@@ -169,6 +174,8 @@ export interface HostingUser {
169174
export interface Offer {
170175
/** Offer ID. */
171176
id: string
177+
/** Offer name. */
178+
name: string
172179
/** Unique identifier used for billing. */
173180
billingOperationPath: string
174181
/** Options available for the offer. */
@@ -184,6 +191,11 @@ export interface Offer {
184191
controlPanelName: string
185192
/** Indicates if the offer has reached its end of life. */
186193
endOfLife: boolean
194+
/**
195+
* Defines a warning if the maximum value for an option in the offer is
196+
* exceeded.
197+
*/
198+
quotaWarning: OfferOptionWarning
187199
}
188200

189201
export interface Platform {

0 commit comments

Comments
 (0)