Skip to content

Commit a78b5e0

Browse files
committed
feat: update generated APIs
1 parent d77bf41 commit a78b5e0

File tree

7 files changed

+193
-11
lines changed

7 files changed

+193
-11
lines changed

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/index.gen.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ export type {
4848
ListPipelinesRequest,
4949
ListPipelinesRequestOrderBy,
5050
ListPipelinesResponse,
51+
ListPipelinesWithStagesRequest,
52+
ListPipelinesWithStagesRequestOrderBy,
53+
ListPipelinesWithStagesResponse,
5154
ListPlansResponse,
5255
ListPurgeRequestsRequest,
5356
ListPurgeRequestsRequestOrderBy,
@@ -61,6 +64,7 @@ export type {
6164
PipelineErrorSeverity,
6265
PipelineErrorStage,
6366
PipelineErrorType,
67+
PipelineStages,
6468
PipelineStatus,
6569
Plan,
6670
PlanDetails,

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/index.gen.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import * as Lb from './lb/index.gen'
2929
import * as LlmInference from './llm_inference/index.gen'
3030
import * as Marketplace from './marketplace/index.gen'
3131
import * as Mnq from './mnq/index.gen'
32+
import * as Mongodb from './mongodb/index.gen'
3233
import * as Qaas from './qaas/index.gen'
3334
import * as Rdb from './rdb/index.gen'
3435
import * as Redis from './redis/index.gen'
@@ -69,6 +70,7 @@ export {
6970
LlmInference,
7071
Marketplace,
7172
Mnq,
73+
Mongodb,
7274
Qaas,
7375
Rdb,
7476
Redis,
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/**
2+
* This file is automatically generated from /scripts/generate.js PLEASE DO NOT
3+
* EDIT HERE
4+
*/
5+
6+
export * as v1alpha1 from './v1alpha1/index.gen'
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
// This file was automatically generated. DO NOT EDIT.
2+
// If you have any remark or suggestion do not hesitate to open an issue.
3+
export { API } from './api.gen'
4+
export * from './content.gen'
5+
export type {
6+
CreateInstanceRequest,
7+
CreateInstanceRequestVolumeDetails,
8+
CreateSnapshotRequest,
9+
DeleteInstanceRequest,
10+
DeleteSnapshotRequest,
11+
Endpoint,
12+
EndpointPrivateNetworkDetails,
13+
EndpointPublicDetails,
14+
EndpointSpec,
15+
EndpointSpecPrivateNetworkDetails,
16+
EndpointSpecPublicDetails,
17+
GetInstanceCertificateRequest,
18+
GetInstanceRequest,
19+
Instance,
20+
InstanceSetting,
21+
InstanceStatus,
22+
ListInstancesRequest,
23+
ListInstancesRequestOrderBy,
24+
ListInstancesResponse,
25+
ListNodeTypesRequest,
26+
ListNodeTypesResponse,
27+
ListSnapshotsRequest,
28+
ListSnapshotsRequestOrderBy,
29+
ListSnapshotsResponse,
30+
ListUsersRequest,
31+
ListUsersRequestOrderBy,
32+
ListUsersResponse,
33+
ListVersionsRequest,
34+
ListVersionsResponse,
35+
NodeType,
36+
NodeTypeStock,
37+
NodeTypeVolumeType,
38+
RestoreSnapshotRequest,
39+
RestoreSnapshotRequestVolumeDetails,
40+
Setting,
41+
SettingPropertyType,
42+
Snapshot,
43+
SnapshotStatus,
44+
SnapshotVolumeType,
45+
UpdateInstanceRequest,
46+
UpdateSnapshotRequest,
47+
UpdateUserRequest,
48+
UpgradeInstanceRequest,
49+
User,
50+
Version,
51+
Volume,
52+
VolumeType,
53+
} from './types.gen'
54+
export * as ValidationRules from './validation-rules.gen'

0 commit comments

Comments
 (0)