Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ export const unmarshalServer = (data: unknown): Server => {
createdAt: unmarshalDate(data.created_at),
deletableAt: unmarshalDate(data.deletable_at),
deletionScheduled: data.deletion_scheduled,
delivered: data.delivered,
id: data.id,
ip: data.ip,
name: data.name,
Expand Down
8 changes: 8 additions & 0 deletions packages/clients/src/api/applesilicon/v1alpha1/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,14 @@ export interface Server {
deletionScheduled: boolean
/** Zone of the server. */
zone: Zone
/**
* Set to true once the server has completed its provisioning steps and is
* ready to use. Some OS configurations might require a reinstallation of the
* server before delivery depending on the available stock. A reinstallation
* after the initial delivery will not change this flag and can be tracked
* using the server status.
*/
delivered: boolean
}

export type CreateServerRequest = {
Expand Down
6 changes: 4 additions & 2 deletions packages/clients/src/api/edge_services/v1alpha1/api.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -831,8 +831,10 @@ export class API extends ParentAPI {
})

/**
* Gives information on current edge-services subscription plan and used
* resources with associated price.
* Gives information on the currently selected Edge Services subscription
* plan, resource usage and associated billing information for this calendar
* month (including whether consumption falls within or exceeds the currently
* selected subscription plan.).
*
* @param request - The request {@link GetBillingRequest}
* @returns A Promise of GetBillingResponse
Expand Down
34 changes: 25 additions & 9 deletions packages/clients/src/api/edge_services/v1alpha1/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ export interface PlanDetails {
planName: PlanName
/** Amount of egress data from cache included in subscription plan. */
packageGb: number
/** Number of pipeline included in subscription plan. */
/** Number of pipelines included in subscription plan. */
pipelineLimit: number
}

Expand Down Expand Up @@ -509,23 +509,39 @@ export type GetBillingRequest = {
}

export interface GetBillingResponse {
/** Information on the current edge-service subscription plan. */
/**
* Information on the currently-selected, active Edge Services subscription
* plan.
*/
currentPlan?: PlanDetails
/** Price of the current subscription plan. */
planCost?: Money
/** Total number of pipeline currently configured. */
/** Total number of pipelines currently configured. */
pipelineNumber: number
/** Cost to date of the pipelines not included in the plans. */
/**
* Cost to date (this month) of pipelines not included in the subscription
* plan.
*/
extraPipelinesCost?: Money
/** Total amount of data egressed from cache in current subscription plan. */
/**
* Total amount of data egressed from the cache (this month), included in the
* active subscription plan.
*/
currentPlanCacheUsage: number
/** Total amount of data egressed from cache not included in the plans. */
/**
* Total amount of data egressed from cache (this month), not included in the
* active subscription plan.
*/
extraCacheUsage: number
/** Cost to date of the data egressed from cache not included in the plans. */
/**
* Cost to date (this month) of the data egressed from the cache that is not
* included in the active subscription plan.
*/
extraCacheCost?: Money
/**
* Total cost to date of edge-service product for the month including current
* plan, previous plans, extra pipelines and extra egress cache data.
* Total cost to date (this month) of all Edge Services resources including
* active subscription plan, previously active plans, extra pipelines and
* extra egress cache data.
*/
totalCost?: Money
}
Expand Down
2 changes: 2 additions & 0 deletions packages/clients/src/api/index.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import * as Lb from './lb/index.gen'
import * as LlmInference from './llm_inference/index.gen'
import * as Marketplace from './marketplace/index.gen'
import * as Mnq from './mnq/index.gen'
import * as Mongodb from './mongodb/index.gen'
import * as Qaas from './qaas/index.gen'
import * as Rdb from './rdb/index.gen'
import * as Redis from './redis/index.gen'
Expand Down Expand Up @@ -69,6 +70,7 @@ export {
LlmInference,
Marketplace,
Mnq,
Mongodb,
Qaas,
Rdb,
Redis,
Expand Down
51 changes: 0 additions & 51 deletions packages/clients/src/api/instance/v1/api.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ import {
unmarshalCreateVolumeResponse,
unmarshalDetachServerVolumeResponse,
unmarshalExportSnapshotResponse,
unmarshalGetBootscriptResponse,
unmarshalGetDashboardResponse,
unmarshalGetImageResponse,
unmarshalGetIpResponse,
Expand All @@ -66,7 +65,6 @@ import {
unmarshalGetServerTypesAvailabilityResponse,
unmarshalGetSnapshotResponse,
unmarshalGetVolumeResponse,
unmarshalListBootscriptsResponse,
unmarshalListImagesResponse,
unmarshalListIpsResponse,
unmarshalListPlacementGroupsResponse,
Expand Down Expand Up @@ -137,8 +135,6 @@ import type {
DetachServerVolumeResponse,
ExportSnapshotRequest,
ExportSnapshotResponse,
GetBootscriptRequest,
GetBootscriptResponse,
GetDashboardRequest,
GetDashboardResponse,
GetImageRequest,
Expand All @@ -163,8 +159,6 @@ import type {
GetSnapshotResponse,
GetVolumeRequest,
GetVolumeResponse,
ListBootscriptsRequest,
ListBootscriptsResponse,
ListDefaultSecurityGroupRulesRequest,
ListImagesRequest,
ListImagesResponse,
Expand Down Expand Up @@ -1520,51 +1514,6 @@ export class API extends ParentAPI {
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/private_nics/${validatePathParam('privateNicId', request.privateNicId)}`,
})

protected pageOfListBootscripts = (
request: Readonly<ListBootscriptsRequest> = {},
) =>
this.client.fetch<ListBootscriptsResponse>(
{
method: 'GET',
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/bootscripts`,
urlParams: urlParams(
['arch', request.arch],
['default', request.default],
['page', request.page],
['per_page', request.perPage ?? this.client.settings.defaultPageSize],
['public', request.public],
['title', request.title],
),
},
unmarshalListBootscriptsResponse,
)

/**
* List bootscripts.
*
* @deprecated
* @param request - The request {@link ListBootscriptsRequest}
* @returns A Promise of ListBootscriptsResponse
*/
listBootscripts = (request: Readonly<ListBootscriptsRequest> = {}) =>
enrichForPagination('bootscripts', this.pageOfListBootscripts, request)

/**
* Get bootscripts. Get details of a bootscript with the specified ID.
*
* @deprecated
* @param request - The request {@link GetBootscriptRequest}
* @returns A Promise of GetBootscriptResponse
*/
getBootscript = (request: Readonly<GetBootscriptRequest>) =>
this.client.fetch<GetBootscriptResponse>(
{
method: 'GET',
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/bootscripts/${validatePathParam('bootscriptId', request.bootscriptId)}`,
},
unmarshalGetBootscriptResponse,
)

getDashboard = (request: Readonly<GetDashboardRequest> = {}) =>
this.client.fetch<GetDashboardResponse>(
{
Expand Down
43 changes: 0 additions & 43 deletions packages/clients/src/api/instance/v1/marshalling.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ import type {
DetachServerVolumeResponse,
ExportSnapshotRequest,
ExportSnapshotResponse,
GetBootscriptResponse,
GetDashboardResponse,
GetImageResponse,
GetIpResponse,
Expand All @@ -53,7 +52,6 @@ import type {
GetVolumeResponse,
Image,
Ip,
ListBootscriptsResponse,
ListImagesResponse,
ListIpsResponse,
ListPlacementGroupsResponse,
Expand Down Expand Up @@ -399,9 +397,6 @@ const unmarshalServer = (data: unknown): Server => {
allowedActions: data.allowed_actions,
arch: data.arch,
bootType: data.boot_type,
bootscript: data.bootscript
? unmarshalBootscript(data.bootscript)
: undefined,
commercialType: data.commercial_type,
creationDate: unmarshalDate(data.creation_date),
dynamicIpRequired: data.dynamic_ip_required,
Expand Down Expand Up @@ -746,22 +741,6 @@ export const unmarshalExportSnapshotResponse = (
} as ExportSnapshotResponse
}

export const unmarshalGetBootscriptResponse = (
data: unknown,
): GetBootscriptResponse => {
if (!isJSONObject(data)) {
throw new TypeError(
`Unmarshalling the type 'GetBootscriptResponse' failed as data isn't a dictionary.`,
)
}

return {
bootscript: data.bootscript
? unmarshalBootscript(data.bootscript)
: undefined,
} as GetBootscriptResponse
}

const unmarshalDashboard = (data: unknown): Dashboard => {
if (!isJSONObject(data)) {
throw new TypeError(
Expand Down Expand Up @@ -993,21 +972,6 @@ export const unmarshalGetVolumeResponse = (
} as GetVolumeResponse
}

export const unmarshalListBootscriptsResponse = (
data: unknown,
): ListBootscriptsResponse => {
if (!isJSONObject(data)) {
throw new TypeError(
`Unmarshalling the type 'ListBootscriptsResponse' failed as data isn't a dictionary.`,
)
}

return {
bootscripts: unmarshalArrayOfObject(data.bootscripts, unmarshalBootscript),
totalCount: data.total_count,
} as ListBootscriptsResponse
}

export const unmarshalListImagesResponse = (
data: unknown,
): ListImagesResponse => {
Expand Down Expand Up @@ -1679,7 +1643,6 @@ export const marshalCreateImageRequest = (
defaults: DefaultValues,
): Record<string, unknown> => ({
arch: request.arch,
default_bootscript: request.defaultBootscript,
extra_volumes:
request.extraVolumes !== undefined
? Object.entries(request.extraVolumes).reduce(
Expand Down Expand Up @@ -1824,7 +1787,6 @@ export const marshalCreateServerRequest = (
): Record<string, unknown> => ({
admin_password_encryption_ssh_key_id: request.adminPasswordEncryptionSshKeyId,
boot_type: request.bootType,
bootscript: request.bootscript,
commercial_type: request.commercialType,
dynamic_ip_required: request.dynamicIpRequired,
enable_ipv6: request.enableIpv6,
Expand Down Expand Up @@ -2258,10 +2220,6 @@ export const marshalSetServerRequest = (
request.allowedActions !== undefined ? request.allowedActions : undefined,
arch: request.arch,
boot_type: request.bootType,
bootscript:
request.bootscript !== undefined
? marshalBootscript(request.bootscript, defaults)
: undefined,
commercial_type: request.commercialType,
creation_date: request.creationDate,
dynamic_ip_required: request.dynamicIpRequired,
Expand Down Expand Up @@ -2456,7 +2414,6 @@ export const marshalUpdateServerRequest = (
): Record<string, unknown> => ({
admin_password_encryption_ssh_key_id: request.adminPasswordEncryptionSshKeyId,
boot_type: request.bootType,
bootscript: request.bootscript,
commercial_type: request.commercialType,
dynamic_ip_required: request.dynamicIpRequired,
enable_ipv6: request.enableIpv6,
Expand Down
Loading
Loading