Skip to content

Commit a9d31b4

Browse files
authored
Merge branch 'main' into v1.5592.0
2 parents c685ac0 + c5aab4c commit a9d31b4

File tree

9 files changed

+139
-164
lines changed

9 files changed

+139
-164
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ export const unmarshalServer = (data: unknown): Server => {
141141
createdAt: unmarshalDate(data.created_at),
142142
deletableAt: unmarshalDate(data.deletable_at),
143143
deletionScheduled: data.deletion_scheduled,
144+
delivered: data.delivered,
144145
id: data.id,
145146
ip: data.ip,
146147
name: data.name,

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,14 @@ export interface Server {
128128
deletionScheduled: boolean
129129
/** Zone of the server. */
130130
zone: Zone
131+
/**
132+
* Set to true once the server has completed its provisioning steps and is
133+
* ready to use. Some OS configurations might require a reinstallation of the
134+
* server before delivery depending on the available stock. A reinstallation
135+
* after the initial delivery will not change this flag and can be tracked
136+
* using the server status.
137+
*/
138+
delivered: boolean
131139
}
132140

133141
export type CreateServerRequest = {

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

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ import {
3939
unmarshalListCacheStagesResponse,
4040
unmarshalListDNSStagesResponse,
4141
unmarshalListPipelinesResponse,
42+
unmarshalListPipelinesWithStagesResponse,
4243
unmarshalListPlansResponse,
4344
unmarshalListPurgeRequestsResponse,
4445
unmarshalListTLSStagesResponse,
@@ -86,6 +87,8 @@ import type {
8687
ListDNSStagesResponse,
8788
ListPipelinesRequest,
8889
ListPipelinesResponse,
90+
ListPipelinesWithStagesRequest,
91+
ListPipelinesWithStagesResponse,
8992
ListPlansResponse,
9093
ListPurgeRequestsRequest,
9194
ListPurgeRequestsResponse,
@@ -202,6 +205,37 @@ export class API extends ParentAPI {
202205
options,
203206
)
204207

208+
protected pageOfListPipelinesWithStages = (
209+
request: Readonly<ListPipelinesWithStagesRequest> = {},
210+
) =>
211+
this.client.fetch<ListPipelinesWithStagesResponse>(
212+
{
213+
method: 'GET',
214+
path: `/edge-services/v1alpha1/pipelines-stages`,
215+
urlParams: urlParams(
216+
['name', request.name],
217+
['order_by', request.orderBy],
218+
['organization_id', request.organizationId],
219+
['page', request.page],
220+
[
221+
'page_size',
222+
request.pageSize ?? this.client.settings.defaultPageSize,
223+
],
224+
['project_id', request.projectId],
225+
),
226+
},
227+
unmarshalListPipelinesWithStagesResponse,
228+
)
229+
230+
listPipelinesWithStages = (
231+
request: Readonly<ListPipelinesWithStagesRequest> = {},
232+
) =>
233+
enrichForPagination(
234+
'pipelines',
235+
this.pageOfListPipelinesWithStages,
236+
request,
237+
)
238+
205239
/**
206240
* Update pipeline. Update the parameters of an existing pipeline, specified
207241
* by its `pipeline_id`. Parameters which can be updated include the `name`,
@@ -831,8 +865,10 @@ export class API extends ParentAPI {
831865
})
832866

833867
/**
834-
* Gives information on current edge-services subscription plan and used
835-
* resources with associated price.
868+
* Gives information on the currently selected Edge Services subscription
869+
* plan, resource usage and associated billing information for this calendar
870+
* month (including whether consumption falls within or exceeds the currently
871+
* selected subscription plan.).
836872
*
837873
* @param request - The request {@link GetBillingRequest}
838874
* @returns A Promise of GetBillingResponse

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

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,13 @@ import type {
3030
ListCacheStagesResponse,
3131
ListDNSStagesResponse,
3232
ListPipelinesResponse,
33+
ListPipelinesWithStagesResponse,
3334
ListPlansResponse,
3435
ListPurgeRequestsResponse,
3536
ListTLSStagesResponse,
3637
Pipeline,
3738
PipelineError,
39+
PipelineStages,
3840
Plan,
3941
PlanDetails,
4042
PurgeRequest,
@@ -229,6 +231,25 @@ export const unmarshalTLSStage = (data: unknown): TLSStage => {
229231
} as TLSStage
230232
}
231233

234+
export const unmarshalPipelineStages = (data: unknown): PipelineStages => {
235+
if (!isJSONObject(data)) {
236+
throw new TypeError(
237+
`Unmarshalling the type 'PipelineStages' failed as data isn't a dictionary.`,
238+
)
239+
}
240+
241+
return {
242+
backendStages: unmarshalArrayOfObject(
243+
data.backend_stages,
244+
unmarshalBackendStage,
245+
),
246+
cacheStages: unmarshalArrayOfObject(data.cache_stages, unmarshalCacheStage),
247+
dnsStages: unmarshalArrayOfObject(data.dns_stages, unmarshalDNSStage),
248+
pipeline: data.pipeline ? unmarshalPipeline(data.pipeline) : undefined,
249+
tlsStages: unmarshalArrayOfObject(data.tls_stages, unmarshalTLSStage),
250+
} as PipelineStages
251+
}
252+
232253
export const unmarshalPurgeRequest = (data: unknown): PurgeRequest => {
233254
if (!isJSONObject(data)) {
234255
throw new TypeError(
@@ -391,6 +412,21 @@ export const unmarshalListPipelinesResponse = (
391412
} as ListPipelinesResponse
392413
}
393414

415+
export const unmarshalListPipelinesWithStagesResponse = (
416+
data: unknown,
417+
): ListPipelinesWithStagesResponse => {
418+
if (!isJSONObject(data)) {
419+
throw new TypeError(
420+
`Unmarshalling the type 'ListPipelinesWithStagesResponse' failed as data isn't a dictionary.`,
421+
)
422+
}
423+
424+
return {
425+
pipelines: unmarshalArrayOfObject(data.pipelines, unmarshalPipelineStages),
426+
totalCount: data.total_count,
427+
} as ListPipelinesWithStagesResponse
428+
}
429+
394430
export const unmarshalListPlansResponse = (
395431
data: unknown,
396432
): ListPlansResponse => {

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

Lines changed: 53 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ export type ListPipelinesRequestOrderBy =
2424
| 'name_asc'
2525
| 'name_desc'
2626

27+
export type ListPipelinesWithStagesRequestOrderBy =
28+
| 'created_at_asc'
29+
| 'created_at_desc'
30+
| 'name_asc'
31+
| 'name_desc'
32+
2733
export type ListPurgeRequestsRequestOrderBy =
2834
| 'created_at_asc'
2935
| 'created_at_desc'
@@ -283,10 +289,18 @@ export interface PlanDetails {
283289
planName: PlanName
284290
/** Amount of egress data from cache included in subscription plan. */
285291
packageGb: number
286-
/** Number of pipeline included in subscription plan. */
292+
/** Number of pipelines included in subscription plan. */
287293
pipelineLimit: number
288294
}
289295

296+
export interface PipelineStages {
297+
pipeline?: Pipeline
298+
dnsStages: DNSStage[]
299+
tlsStages: TLSStage[]
300+
cacheStages: CacheStage[]
301+
backendStages: BackendStage[]
302+
}
303+
290304
export interface PurgeRequest {
291305
/** ID of the purge request. */
292306
id: string
@@ -509,23 +523,39 @@ export type GetBillingRequest = {
509523
}
510524

511525
export interface GetBillingResponse {
512-
/** Information on the current edge-service subscription plan. */
526+
/**
527+
* Information on the currently-selected, active Edge Services subscription
528+
* plan.
529+
*/
513530
currentPlan?: PlanDetails
514531
/** Price of the current subscription plan. */
515532
planCost?: Money
516-
/** Total number of pipeline currently configured. */
533+
/** Total number of pipelines currently configured. */
517534
pipelineNumber: number
518-
/** Cost to date of the pipelines not included in the plans. */
535+
/**
536+
* Cost to date (this month) of pipelines not included in the subscription
537+
* plan.
538+
*/
519539
extraPipelinesCost?: Money
520-
/** Total amount of data egressed from cache in current subscription plan. */
540+
/**
541+
* Total amount of data egressed from the cache (this month), included in the
542+
* active subscription plan.
543+
*/
521544
currentPlanCacheUsage: number
522-
/** Total amount of data egressed from cache not included in the plans. */
545+
/**
546+
* Total amount of data egressed from cache (this month), not included in the
547+
* active subscription plan.
548+
*/
523549
extraCacheUsage: number
524-
/** Cost to date of the data egressed from cache not included in the plans. */
550+
/**
551+
* Cost to date (this month) of the data egressed from the cache that is not
552+
* included in the active subscription plan.
553+
*/
525554
extraCacheCost?: Money
526555
/**
527-
* Total cost to date of edge-service product for the month including current
528-
* plan, previous plans, extra pipelines and extra egress cache data.
556+
* Total cost to date (this month) of all Edge Services resources including
557+
* active subscription plan, previously active plans, extra pipelines and
558+
* extra egress cache data.
529559
*/
530560
totalCost?: Money
531561
}
@@ -693,6 +723,20 @@ export interface ListPipelinesResponse {
693723
totalCount: number
694724
}
695725

726+
export type ListPipelinesWithStagesRequest = {
727+
orderBy?: ListPipelinesWithStagesRequestOrderBy
728+
page?: number
729+
pageSize?: number
730+
name?: string
731+
organizationId?: string
732+
projectId?: string
733+
}
734+
735+
export interface ListPipelinesWithStagesResponse {
736+
pipelines: PipelineStages[]
737+
totalCount: number
738+
}
739+
696740
export interface ListPlansResponse {
697741
totalCount: number
698742
plans: PlanDetails[]

packages/clients/src/api/instance/v1/api.gen.ts

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ import {
5353
unmarshalCreateVolumeResponse,
5454
unmarshalDetachServerVolumeResponse,
5555
unmarshalExportSnapshotResponse,
56-
unmarshalGetBootscriptResponse,
5756
unmarshalGetDashboardResponse,
5857
unmarshalGetImageResponse,
5958
unmarshalGetIpResponse,
@@ -66,7 +65,6 @@ import {
6665
unmarshalGetServerTypesAvailabilityResponse,
6766
unmarshalGetSnapshotResponse,
6867
unmarshalGetVolumeResponse,
69-
unmarshalListBootscriptsResponse,
7068
unmarshalListImagesResponse,
7169
unmarshalListIpsResponse,
7270
unmarshalListPlacementGroupsResponse,
@@ -137,8 +135,6 @@ import type {
137135
DetachServerVolumeResponse,
138136
ExportSnapshotRequest,
139137
ExportSnapshotResponse,
140-
GetBootscriptRequest,
141-
GetBootscriptResponse,
142138
GetDashboardRequest,
143139
GetDashboardResponse,
144140
GetImageRequest,
@@ -163,8 +159,6 @@ import type {
163159
GetSnapshotResponse,
164160
GetVolumeRequest,
165161
GetVolumeResponse,
166-
ListBootscriptsRequest,
167-
ListBootscriptsResponse,
168162
ListDefaultSecurityGroupRulesRequest,
169163
ListImagesRequest,
170164
ListImagesResponse,
@@ -1520,51 +1514,6 @@ export class API extends ParentAPI {
15201514
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/private_nics/${validatePathParam('privateNicId', request.privateNicId)}`,
15211515
})
15221516

1523-
protected pageOfListBootscripts = (
1524-
request: Readonly<ListBootscriptsRequest> = {},
1525-
) =>
1526-
this.client.fetch<ListBootscriptsResponse>(
1527-
{
1528-
method: 'GET',
1529-
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/bootscripts`,
1530-
urlParams: urlParams(
1531-
['arch', request.arch],
1532-
['default', request.default],
1533-
['page', request.page],
1534-
['per_page', request.perPage ?? this.client.settings.defaultPageSize],
1535-
['public', request.public],
1536-
['title', request.title],
1537-
),
1538-
},
1539-
unmarshalListBootscriptsResponse,
1540-
)
1541-
1542-
/**
1543-
* List bootscripts.
1544-
*
1545-
* @deprecated
1546-
* @param request - The request {@link ListBootscriptsRequest}
1547-
* @returns A Promise of ListBootscriptsResponse
1548-
*/
1549-
listBootscripts = (request: Readonly<ListBootscriptsRequest> = {}) =>
1550-
enrichForPagination('bootscripts', this.pageOfListBootscripts, request)
1551-
1552-
/**
1553-
* Get bootscripts. Get details of a bootscript with the specified ID.
1554-
*
1555-
* @deprecated
1556-
* @param request - The request {@link GetBootscriptRequest}
1557-
* @returns A Promise of GetBootscriptResponse
1558-
*/
1559-
getBootscript = (request: Readonly<GetBootscriptRequest>) =>
1560-
this.client.fetch<GetBootscriptResponse>(
1561-
{
1562-
method: 'GET',
1563-
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/bootscripts/${validatePathParam('bootscriptId', request.bootscriptId)}`,
1564-
},
1565-
unmarshalGetBootscriptResponse,
1566-
)
1567-
15681517
getDashboard = (request: Readonly<GetDashboardRequest> = {}) =>
15691518
this.client.fetch<GetDashboardResponse>(
15701519
{

0 commit comments

Comments
 (0)