Skip to content

Commit 77ad561

Browse files
authored
docs(webhosting): revamp (#648)
1 parent 307b3c2 commit 77ad561

File tree

2 files changed

+106
-58
lines changed

2 files changed

+106
-58
lines changed

packages/clients/src/api/webhosting/v1alpha1/api.gen.ts

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,14 @@ const jsonContentHeaders = {
3636
'Content-Type': 'application/json; charset=utf-8',
3737
}
3838

39-
/** Webhosting API. */
39+
/** Web Hosting API. */
4040
export class API extends ParentAPI {
4141
/** Lists the available regions of the API. */
4242
public static readonly LOCALITIES: Region[] = ['fr-par']
4343

4444
/**
45-
* Create a hosting.
45+
* Order a Web Hosting plan. Order a Web Hosting plan, specifying the offer
46+
* type required via the `offer_id` parameter.
4647
*
4748
* @param request - The request {@link CreateHostingRequest}
4849
* @returns A Promise of Hosting
@@ -91,7 +92,9 @@ export class API extends ParentAPI {
9192
)
9293

9394
/**
94-
* List all hostings.
95+
* List all Web Hosting plans. List all of your existing Web Hosting plans.
96+
* Various filters are available to limit the results, including filtering by
97+
* domain, status, tag and Project ID.
9598
*
9699
* @param request - The request {@link ListHostingsRequest}
97100
* @returns A Promise of ListHostingsResponse
@@ -100,7 +103,8 @@ export class API extends ParentAPI {
100103
enrichForPagination('hostings', this.pageOfListHostings, request)
101104

102105
/**
103-
* Get a hosting. Get the details of a Hosting with the given ID.
106+
* Get a Web Hosting plan. Get the details of one of your existing Web Hosting
107+
* plans, specified by its `hosting_id`.
104108
*
105109
* @param request - The request {@link GetHostingRequest}
106110
* @returns A Promise of Hosting
@@ -138,7 +142,9 @@ export class API extends ParentAPI {
138142
)
139143

140144
/**
141-
* Update a hosting.
145+
* Update a Web Hosting plan. Update the details of one of your existing Web
146+
* Hosting plans, specified by its `hosting_id`. You can update parameters
147+
* including the contact email address, tags, options and offer.
142148
*
143149
* @param request - The request {@link UpdateHostingRequest}
144150
* @returns A Promise of Hosting
@@ -160,7 +166,10 @@ export class API extends ParentAPI {
160166
)
161167

162168
/**
163-
* Delete a hosting. Delete a hosting with the given ID.
169+
* Delete a Web Hosting plan. Delete a Web Hosting plan, specified by its
170+
* `hosting_id`. Note that deletion is not immediate: it will take place at
171+
* the end of the calendar month, after which time your Web Hosting plan and
172+
* all its data (files and emails) will be irreversibly lost.
164173
*
165174
* @param request - The request {@link DeleteHostingRequest}
166175
* @returns A Promise of Hosting
@@ -178,7 +187,12 @@ export class API extends ParentAPI {
178187
)
179188

180189
/**
181-
* Restore a hosting. Restore a hosting with the given ID.
190+
* Restore a Web Hosting plan. When you [delete a Web Hosting
191+
* plan](#path-hostings-delete-a-hosting), definitive deletion does not take
192+
* place until the end of the calendar month. In the time between initiating
193+
* the deletion, and definitive deletion at the end of the month, you can
194+
* choose to **restore** the Web Hosting plan, using this endpoint and
195+
* specifying its `hosting_id`.
182196
*
183197
* @param request - The request {@link RestoreHostingRequest}
184198
* @returns A Promise of Hosting
@@ -201,8 +215,8 @@ export class API extends ParentAPI {
201215
)
202216

203217
/**
204-
* Get the DNS records. The set of DNS record of a specific domain associated
205-
* to a hosting.
218+
* Get DNS records. Get the set of DNS records of a specified domain
219+
* associated with a Web Hosting plan.
206220
*
207221
* @param request - The request {@link GetDomainDnsRecordsRequest}
208222
* @returns A Promise of DnsRecords
@@ -220,7 +234,8 @@ export class API extends ParentAPI {
220234
)
221235

222236
/**
223-
* List all offers.
237+
* List all offers. List the different Web Hosting offers, and their options,
238+
* available to order from Scaleway.
224239
*
225240
* @param request - The request {@link ListOffersRequest}
226241
* @returns A Promise of ListOffersResponse

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

Lines changed: 81 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export interface DnsRecord {
4343
name: string
4444
/** Record type. */
4545
type: DnsRecordType
46-
/** Record time to live. */
46+
/** Record time-to-live. */
4747
ttl: number
4848
/** Record value. */
4949
value: string
@@ -65,39 +65,39 @@ export interface DnsRecords {
6565

6666
/** Hosting. */
6767
export interface Hosting {
68-
/** ID of the hosting. */
68+
/** ID of the Web Hosting plan. */
6969
id: string
70-
/** Organization ID of the hosting. */
70+
/** ID of the Scaleway Organization the Web Hosting plan belongs to. */
7171
organizationId: string
72-
/** Project ID of the hosting. */
72+
/** ID of the Scaleway Project the Web Hosting plan belongs to. */
7373
projectId: string
74-
/** Last update date. */
74+
/** Date on which the Web Hosting plan was last updated. */
7575
updatedAt?: Date
76-
/** Creation date. */
76+
/** Date on which the Web Hosting plan was created. */
7777
createdAt?: Date
78-
/** The hosting status. */
78+
/** Status of the Web Hosting plan. */
7979
status: HostingStatus
8080
/** Hostname of the host platform. */
8181
platformHostname: string
8282
/** Number of the host platform. */
8383
platformNumber?: number
84-
/** ID of the active offer. */
84+
/** ID of the active offer for the Web Hosting plan. */
8585
offerId: string
86-
/** Name of the active offer. */
86+
/** Name of the active offer for the Web Hosting plan. */
8787
offerName: string
88-
/** Main domain of the hosting. */
88+
/** Main domain associated with the Web Hosting plan. */
8989
domain: string
90-
/** Tags of the hosting. */
90+
/** List of tags associated with the Web Hosting plan. */
9191
tags: string[]
92-
/** Active options of the hosting. */
92+
/** Array of any options activated for the Web Hosting plan. */
9393
options: HostingOption[]
94-
/** DNS status of the hosting. */
94+
/** DNS status of the Web Hosting plan. */
9595
dnsStatus: HostingDnsStatus
96-
/** URL to connect to cPanel Dashboard and to Webmail interface. */
96+
/** URL to connect to cPanel dashboard and to Webmail interface. */
9797
cpanelUrls?: HostingCpanelUrls
98-
/** Main hosting cPanel username. */
98+
/** Main Web Hosting cPanel username. */
9999
username: string
100-
/** Region of the hosting. */
100+
/** Region where the Web Hosting plan is hosted. */
101101
region: Region
102102
}
103103

@@ -116,15 +116,15 @@ export interface HostingOption {
116116

117117
/** List hostings response. */
118118
export interface ListHostingsResponse {
119-
/** Number of returned hostings. */
119+
/** Number of Web Hosting plans returned. */
120120
totalCount: number
121-
/** List of hostings. */
121+
/** List of Web Hosting plans. */
122122
hostings: Hosting[]
123123
}
124124

125125
/** List offers response. */
126126
export interface ListOffersResponse {
127-
/** List of returned offers. */
127+
/** List of offers. */
128128
offers: Offer[]
129129
}
130130

@@ -134,7 +134,7 @@ export interface Nameserver {
134134
hostname: string
135135
/** Status of the nameserver. */
136136
status: NameserverStatus
137-
/** If the nameserver is the default. */
137+
/** Defines whether the nameserver is the default one. */
138138
isDefault: boolean
139139
}
140140

@@ -144,13 +144,16 @@ export interface Offer {
144144
id: string
145145
/** Unique identifier used for billing. */
146146
billingOperationPath: string
147-
/** Offer product. */
147+
/** Product constituting this offer. */
148148
product?: OfferProduct
149-
/** Offer price. */
149+
/** Price of this offer. */
150150
price?: Money
151-
/** If offer is available for a specific hosting. */
151+
/**
152+
* If a hosting_id was specified in the call, defines whether this offer is
153+
* available for that Web Hosting plan to migrate (update) to.
154+
*/
152155
available: boolean
153-
/** If not available, return quota warnings. */
156+
/** Quota warnings, if the offer is not available for the specified hosting_id. */
154157
quotaWarnings: OfferQuotaWarning[]
155158
}
156159

@@ -175,17 +178,20 @@ export type CreateHostingRequest = {
175178
* config.
176179
*/
177180
region?: Region
178-
/** ID of the selected offer for the hosting. */
181+
/** ID of the selected offer for the Web Hosting plan. */
179182
offerId: string
180-
/** Project ID of the hosting. */
183+
/** ID of the Scaleway Project in which to create the Web Hosting plan. */
181184
projectId?: string
182-
/** Contact email of the client for the hosting. */
185+
/** Contact email for the Web Hosting client. */
183186
email?: string
184-
/** The tags of the hosting. */
187+
/** List of tags for the Web Hosting plan. */
185188
tags?: string[]
186-
/** The domain name of the hosting. */
189+
/**
190+
* Domain name to link to the Web Hosting plan. You must already own this
191+
* domain name, and have completed the DNS validation process beforehand.
192+
*/
187193
domain: string
188-
/** IDs of the selected options for the hosting. */
194+
/** IDs of any selected additional options for the Web Hosting plan. */
189195
optionIds?: string[]
190196
}
191197

@@ -195,24 +201,42 @@ export type ListHostingsRequest = {
195201
* config.
196202
*/
197203
region?: Region
198-
/** A positive integer to choose the page to return. */
204+
/**
205+
* Page number to return, from the paginated results (must be a positive
206+
* integer).
207+
*/
199208
page?: number
200209
/**
201-
* A positive integer lower or equal to 100 to select the number of items to
202-
* return.
210+
* Number of Web Hosting plans to return (must be a positive integer lower or
211+
* equal to 100).
203212
*/
204213
pageSize?: number
205-
/** Define the order of the returned hostings. */
214+
/** Sort order for Web Hosting plans in the response. */
206215
orderBy?: ListHostingsRequestOrderBy
207-
/** Return hostings with these tags. */
216+
/**
217+
* Tags to filter for, only Web Hosting plans with matching tags will be
218+
* returned.
219+
*/
208220
tags?: string[]
209-
/** Return hostings with these statuses. */
221+
/**
222+
* Statuses to filter for, only Web Hosting plans with matching statuses will
223+
* be returned.
224+
*/
210225
statuses?: HostingStatus[]
211-
/** Return hostings with this domain. */
226+
/**
227+
* Domain to filter for, only Web Hosting plans associated with this domain
228+
* will be returned.
229+
*/
212230
domain?: string
213-
/** Return hostings from this project ID. */
231+
/**
232+
* Project ID to filter for, only Web Hosting plans from this Project will be
233+
* returned.
234+
*/
214235
projectId?: string
215-
/** Return hostings from this organization ID. */
236+
/**
237+
* Organization ID to filter for, only Web Hosting plans from this
238+
* Organization will be returned.
239+
*/
216240
organizationId?: string
217241
}
218242

@@ -234,13 +258,13 @@ export type UpdateHostingRequest = {
234258
region?: Region
235259
/** Hosting ID. */
236260
hostingId: string
237-
/** New contact email for the hosting. */
261+
/** New contact email for the Web Hosting plan. */
238262
email?: string
239-
/** New tags for the hosting. */
263+
/** New tags for the Web Hosting plan. */
240264
tags?: string[]
241-
/** New options IDs for the hosting. */
265+
/** IDs of the new options for the Web Hosting plan. */
242266
optionIds?: string[]
243-
/** New offer ID for the hosting. */
267+
/** ID of the new offer for the Web Hosting plan. */
244268
offerId?: string
245269
}
246270

@@ -270,7 +294,7 @@ export type GetDomainDnsRecordsRequest = {
270294
* config.
271295
*/
272296
region?: Region
273-
/** Domain associated to the DNS records. */
297+
/** Domain associated with the DNS records. */
274298
domain: string
275299
}
276300

@@ -280,12 +304,21 @@ export type ListOffersRequest = {
280304
* config.
281305
*/
282306
region?: Region
283-
/** Define the order of the returned hostings. */
307+
/** Sort order of offers in the response. */
284308
orderBy?: ListOffersRequestOrderBy
285-
/** Select only offers, no options. */
309+
/**
310+
* Defines whether the response should consist of offers only, without
311+
* options.
312+
*/
286313
withoutOptions: boolean
287-
/** Select only options. */
314+
/**
315+
* Defines whether the response should consist of options only, without
316+
* offers.
317+
*/
288318
onlyOptions: boolean
289-
/** Define a specific hosting id (optional). */
319+
/**
320+
* ID of a Web Hosting plan, to check compatibility with returned offers (in
321+
* case of wanting to update the plan).
322+
*/
290323
hostingId?: string
291324
}

0 commit comments

Comments
 (0)