From aab6e378f8eba392eba7f30ffccee54a97de8ba1 Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Tue, 14 Mar 2023 16:44:55 +0000 Subject: [PATCH] feat: update generated APIs --- .../clients/src/api/baremetal/v1/api.gen.ts | 84 ++++----- .../clients/src/api/baremetal/v1/types.gen.ts | 162 +++++++++--------- 2 files changed, 128 insertions(+), 118 deletions(-) diff --git a/packages/clients/src/api/baremetal/v1/api.gen.ts b/packages/clients/src/api/baremetal/v1/api.gen.ts index 5e7dc17a4..2680b907c 100644 --- a/packages/clients/src/api/baremetal/v1/api.gen.ts +++ b/packages/clients/src/api/baremetal/v1/api.gen.ts @@ -93,9 +93,9 @@ const jsonContentHeaders = { } /** - * Elastic metal API. + * Elastic Metal API. * - * This API allows to manage your Bare metal server. + * This API allows to manage your Elastic Metal server. */ export class API extends ParentAPI { /** Lists the available zones of the API. */ @@ -132,7 +132,7 @@ export class API extends ParentAPI { ) /** - * List elastic metal servers for organization. + * List Elastic Metal servers for a specific organization. * * @param request - The request {@link ListServersRequest} * @returns A Promise of ListServersResponse @@ -141,7 +141,8 @@ export class API extends ParentAPI { enrichForPagination('servers', this.pageOfListServers, request) /** - * Get the server associated with the given ID. + * Get full details of an existing Elastic Metal server associated with the + * ID. * * @param request - The request {@link GetServerRequest} * @returns A Promise of Server @@ -179,8 +180,8 @@ export class API extends ParentAPI { ) /** - * Create a new elastic metal server. Once the server is created, you probably - * want to install an OS. + * Create a new Elastic Metal server. Once the server is created, proceed with + * the [installation of an OS](#post-3e949e). * * @param request - The request {@link CreateServerRequest} * @returns A Promise of Server @@ -202,7 +203,9 @@ export class API extends ParentAPI { ) /** - * Update the server associated with the given ID. + * Update the server associated with the ID. You can update parameters such as + * the server's name, tags and description. Any parameters left null in the + * request body are not updated. * * @param request - The request {@link UpdateServerRequest} * @returns A Promise of Server @@ -224,7 +227,8 @@ export class API extends ParentAPI { ) /** - * Install an OS on the server associated with the given ID. + * Install an Operating System (OS) on the Elastic Metal server with a + * specific ID. * * @param request - The request {@link InstallServerRequest} * @returns A Promise of Server @@ -246,7 +250,7 @@ export class API extends ParentAPI { ) /** - * Give the ping status on the server associated with the given ID. + * Get the ping status of the server associated with the ID. * * @param request - The request {@link GetServerMetricsRequest} * @returns A Promise of GetServerMetricsResponse @@ -264,7 +268,7 @@ export class API extends ParentAPI { ) /** - * Delete the server associated with the given ID. + * Delete the server associated with the ID. * * @param request - The request {@link DeleteServerRequest} * @returns A Promise of Server @@ -282,8 +286,8 @@ export class API extends ParentAPI { ) /** - * Reboot the server associated with the given ID, use boot param to reboot in - * rescue. + * Reboot the Elastic Metal server associated with the ID, use the `boot_type` + * `rescue` to reboot the server in rescue mode. * * @param request - The request {@link RebootServerRequest} * @returns A Promise of Server @@ -305,7 +309,7 @@ export class API extends ParentAPI { ) /** - * Start the server associated with the given ID. + * Start the server associated with the ID. * * @param request - The request {@link StartServerRequest} * @returns A Promise of Server @@ -327,7 +331,8 @@ export class API extends ParentAPI { ) /** - * Stop the server associated with the given ID. + * Stop the server associated with the ID. The server remains allocated to + * your account and all data remains on the local storage of the server. * * @param request - The request {@link StopServerRequest} * @returns A Promise of Server @@ -369,7 +374,7 @@ export class API extends ParentAPI { ) /** - * List events associated to the given server ID. + * List event (i.e. start/stop/reboot) associated to the server ID. * * @param request - The request {@link ListServerEventsRequest} * @returns A Promise of ListServerEventsResponse @@ -378,17 +383,17 @@ export class API extends ParentAPI { enrichForPagination('events', this.pageOfListServerEvents, request) /** - * Start BMC (Baseboard Management Controller) access associated with the - * given ID. The BMC (Baseboard Management Controller) access is available one - * hour after the installation of the server. You need first to create an - * option Remote Access. You will find the ID and the price with a call to - * listOffers + * Start BMC (Baseboard Management Controller) access associated with the ID. + * The BMC (Baseboard Management Controller) access is available one hour + * after the installation of the server. You need first to create an option + * Remote Access. You will find the ID and the price with a call to listOffers * (https://developers.scaleway.com/en/products/baremetal/api/#get-78db92). - * Then you can add the option - * https://developers.scaleway.com/en/products/baremetal/api/#post-b14abd. Do - * not forget to delete the Option. After start BMC, you need to Get Remote - * Access to get the login/password - * https://developers.scaleway.com/en/products/baremetal/api/#get-cefc0f. + * Then add the option + * https://developers.scaleway.com/en/products/baremetal/api/#post-b14abd. + * After adding the BMC option, you need to Get Remote Access to get the + * login/password + * https://developers.scaleway.com/en/products/baremetal/api/#get-cefc0f. Do + * not forget to delete the Option after use. * * @param request - The request {@link StartBMCAccessRequest} * @returns A Promise of BMCAccess @@ -414,7 +419,7 @@ export class API extends ParentAPI { /** * Get the BMC (Baseboard Management Controller) access associated with the - * given ID. + * ID, including the URL and login information needed to connect. * * @param request - The request {@link GetBMCAccessRequest} * @returns A Promise of BMCAccess @@ -435,8 +440,7 @@ export class API extends ParentAPI { ) /** - * Stop BMC (Baseboard Management Controller) access associated with the given - * ID. + * Stop BMC (Baseboard Management Controller) access associated with the ID. * * @param request - The request {@link StopBMCAccessRequest} */ @@ -450,8 +454,8 @@ export class API extends ParentAPI { }) /** - * Configure ip associated with the given server ID and ipID. You can use this - * method to set a reverse dns for an IP. + * Configure the IP address associated with the server ID and IP ID. You can + * use this method to set a reverse DNS for an IP address. * * @param request - The request {@link UpdateIPRequest} * @returns A Promise of IP @@ -476,7 +480,7 @@ export class API extends ParentAPI { ) /** - * Add an option to a specific server. + * Add an option, such as Private Networks, to a specific server. * * @param request - The request {@link AddOptionServerRequest} * @returns A Promise of Server @@ -545,7 +549,7 @@ export class API extends ParentAPI { ) /** - * List all available server offers. + * List all available Elastic Metal server configurations. * * @param request - The request {@link ListOffersRequest} * @returns A Promise of ListOffersResponse @@ -554,7 +558,7 @@ export class API extends ParentAPI { enrichForPagination('offers', this.pageOfListOffers, request) /** - * Return specific offer for the given ID. + * Get details of an offer identified by its offer ID. * * @param request - The request {@link GetOfferRequest} * @returns A Promise of Offer @@ -572,7 +576,7 @@ export class API extends ParentAPI { ) /** - * Return specific option for the given ID. + * Return specific option for the ID. * * @param request - The request {@link GetOptionRequest} * @returns A Promise of Option @@ -697,7 +701,7 @@ export class API extends ParentAPI { ) /** - * List all available OS that can be install on an elastic metal server. + * List all OSes that are available for installation on Elastic Metal servers. * * @param request - The request {@link ListOSRequest} * @returns A Promise of ListOSResponse @@ -706,7 +710,7 @@ export class API extends ParentAPI { enrichForPagination('os', this.pageOfListOS, request) /** - * Return specific OS for the given ID. + * Return specific OS for the ID. * * @param request - The request {@link GetOSRequest} * @returns A Promise of OS @@ -730,7 +734,7 @@ export class PrivateNetworkAPI extends ParentAPI { public static readonly LOCALITIES: Zone[] = ['fr-par-2'] /** - * Add a server to a private network + * Add a server to a Private Network * * @param request - The request * {@link PrivateNetworkApiAddServerPrivateNetworkRequest} @@ -761,7 +765,7 @@ export class PrivateNetworkAPI extends ParentAPI { ) /** - * Set multiple private networks on a server + * Set multiple Private Networks on a server * * @param request - The request * {@link PrivateNetworkApiSetServerPrivateNetworksRequest} @@ -818,7 +822,7 @@ export class PrivateNetworkAPI extends ParentAPI { ) /** - * List the private networks of a server + * List the Private Networks of a server * * @param request - The request * {@link PrivateNetworkApiListServerPrivateNetworksRequest} @@ -834,7 +838,7 @@ export class PrivateNetworkAPI extends ParentAPI { ) /** - * Delete a private network + * Delete a Private Network * * @param request - The request * {@link PrivateNetworkApiDeleteServerPrivateNetworkRequest} diff --git a/packages/clients/src/api/baremetal/v1/types.gen.ts b/packages/clients/src/api/baremetal/v1/types.gen.ts index 8e338345a..21053efa6 100644 --- a/packages/clients/src/api/baremetal/v1/types.gen.ts +++ b/packages/clients/src/api/baremetal/v1/types.gen.ts @@ -97,9 +97,9 @@ export interface BMCAccess { export interface CPU { /** Name of the CPU. */ name: string - /** Number of cores of the CPU. */ + /** Number of CPU cores. */ coreCount: number - /** Number of threads of the CPU. */ + /** Number CPU threads. */ threadCount: number /** Frequency of the CPU in MHz. */ frequency: number @@ -109,17 +109,17 @@ export interface CPU { /** Create server request. install. */ export interface CreateServerRequestInstall { - /** ID of the OS to install on the server. */ + /** ID of the OS to installation on the server. */ osId: string /** Hostname of the server. */ hostname: string /** SSH key IDs authorized on the server. */ sshKeyIds: string[] - /** User used for the installation. */ + /** User for the installation. */ user?: string - /** Password used for the installation. */ + /** Password for the installation. */ password?: string - /** User used for the service to install. */ + /** Regular user that runs the service to be installed on the server. */ serviceUser?: string /** Password used for the service to install. */ servicePassword?: string @@ -135,7 +135,7 @@ export interface Disk { /** Get server metrics response. */ export interface GetServerMetricsResponse { - /** Timeseries of ping on the server. */ + /** Timeseries object representing pings on the server. */ pings?: TimeSeries } @@ -151,7 +151,7 @@ export interface IP { version: IPVersion /** Status of the reverse. */ reverseStatus: IPReverseStatus - /** A message related to the reverse status, in case of an error for example. */ + /** A message related to the reverse status, e.g. in case of an error. */ reverseStatusMessage: string } @@ -196,13 +196,13 @@ export interface ListServerPrivateNetworksResponse { export interface ListServersResponse { /** Total count of matching servers. */ totalCount: number - /** Servers that match filters. */ + /** Array of Elastic Metal server objects matching the filters in the request. */ servers: Server[] } /** List settings response. */ export interface ListSettingsResponse { - /** Total count of matching sttings. */ + /** Total count of matching settings. */ totalCount: number /** Settings that match filters. */ settings: Setting[] @@ -228,17 +228,17 @@ export interface OS { name: string /** Version of the OS. */ version: string - /** URL of this os's logo. */ + /** URL of this OS's logo. */ logoUrl: string - /** Define the SSH requirements to install the OS. */ + /** Object defining the SSH requirements to install the OS. */ ssh?: OSOSField - /** Define the username requirements to install the OS. */ + /** Object defining the username requirements to install the OS. */ user?: OSOSField - /** Define the password requirements to install the OS. */ + /** Object defining the password requirements to install the OS. */ password?: OSOSField - /** Define the username requirements to install the service. */ + /** Object defining the username requirements to install the service. */ serviceUser?: OSOSField - /** Define the password requirements to install the service. */ + /** Object defining the password requirements to install the service. */ servicePassword?: OSOSField /** State of OS. */ enabled: boolean @@ -260,7 +260,7 @@ export interface Offer { name: string /** Stock level. */ stock: OfferStock - /** Public Bandwidth available in bits/s with the offer. */ + /** Public bandwidth available (in bits/s) with the offer. */ bandwidth: number /** Commercial range of the offer. */ commercialRange: string @@ -269,11 +269,11 @@ export interface Offer { * payed until 12h32). */ pricePerHour?: Money - /** Price of the offer per months. */ + /** Monthly price of the offer, if subscribing on a monthly basis. */ pricePerMonth?: Money /** Disks specifications of the offer. */ disks: Disk[] - /** True if the offer is currently available. */ + /** Defines whether the offer is currently available. */ enable: boolean /** CPU specifications of the offer. */ cpus: CPU[] @@ -285,19 +285,22 @@ export interface Offer { persistentMemories: PersistentMemory[] /** Raid controller specifications of the offer. */ raidControllers: RaidController[] - /** Array of incompatible OS ids. */ + /** Array of OS images IDs incompatible with the server. */ incompatibleOsIds: string[] /** Period of subscription for the offer. */ subscriptionPeriod: OfferSubscriptionPeriod /** Operation path of the service. */ operationPath: string - /** Fee to pay on order. */ + /** + * One time fee invoiced by Scaleway for the setup and activation of the + * server. + */ fee?: Money - /** Options available on offer. */ + /** Available options for customization of the server. */ options: OfferOptionOffer[] /** Private bandwidth available in bits/s with the offer. */ privateBandwidth: number - /** The offer is shared or not. */ + /** Defines whether the offer's bandwidth is shared or not. */ sharedBandwidth: boolean /** Array of tags attached to the offer. */ tags: string[] @@ -330,7 +333,7 @@ export interface Option { id: string /** Name of the option. */ name: string - /** Is false if the option could not be added or removed. */ + /** Defines whether the option is manageable (could be added or removed). */ manageable: boolean } @@ -361,9 +364,9 @@ export interface Server { name: string /** Description of the server. */ description: string - /** Date of last modification of the server. */ + /** Last modification date of the server. */ updatedAt?: Date - /** Date of creation of the server. */ + /** Creation date of the server. */ createdAt?: Date /** Status of the server. */ status: ServerStatus @@ -371,7 +374,7 @@ export interface Server { offerId: string /** Offer name of the server. */ offerName: string - /** Array of customs tags attached to the server. */ + /** Array of custom tags attached to the server. */ tags: string[] /** Array of IPs attached to the server. */ ips: IP[] @@ -379,13 +382,13 @@ export interface Server { domain: string /** Boot type of the server. */ bootType: ServerBootType - /** The zone in which is the server. */ + /** Zone in which is the server located. */ zone: Zone - /** Configuration of installation. */ + /** Configuration of the installation. */ install?: ServerInstall - /** Server status of ping. */ + /** Status of server ping. */ pingStatus: ServerPingStatus - /** Options enabled on server. */ + /** Options enabled on the server. */ options: ServerOption[] /** Configuration of rescue boot. */ rescueServer?: ServerRescueServer @@ -393,7 +396,7 @@ export interface Server { /** Server event. */ export interface ServerEvent { - /** ID of the server for whom the action will be applied. */ + /** ID of the server to which the action will be applied. */ id: string /** The action that will be applied to the server. */ action: string @@ -407,23 +410,23 @@ export interface ServerEvent { export interface ServerInstall { /** ID of the OS. */ osId: string - /** Host defined in the server install. */ + /** Host defined during the server installation. */ hostname: string - /** SSH public key IDs defined in the server install. */ + /** SSH public key IDs defined during server installation. */ sshKeyIds: string[] - /** Status of the server install. */ + /** Status of the server installation. */ status: ServerInstallStatus /** - * User defined in the server install or the default one if none were + * User defined in the server installation, or the default user if none were * specified. */ user: string /** - * Service user defined in the server install or the default one if none were - * specified. + * Service user defined in the server installation, or the default user if + * none were specified. */ serviceUser: string - /** The address of the installed service. */ + /** Address of the installed service. */ serviceUrl: string } @@ -433,9 +436,9 @@ export interface ServerOption { id: string /** Name of the option. */ name: string - /** Status of the option. */ + /** Status of the option on this server. */ status: ServerOptionOptionStatus - /** Is false if the option could not be added or removed. */ + /** Defines whether the option can be managed (added or removed). */ manageable: boolean /** Auto expiration date for compatible options. */ expiresAt?: Date @@ -443,21 +446,21 @@ export interface ServerOption { /** Server private network. */ export interface ServerPrivateNetwork { - /** The private network ID. */ + /** The Private Network ID. */ id: string - /** The private network project ID. */ + /** The Private Network Project ID. */ projectId: string /** The server ID. */ serverId: string - /** The private network ID. */ + /** The Private Network ID. */ privateNetworkId: string - /** The VLAN ID associated to the private network. */ + /** The VLAN ID associated to the Private Network. */ vlan?: number - /** The configuration status of the private network. */ + /** The configuration status of the Private Network. */ status: ServerPrivateNetworkStatus - /** The private network creation date. */ + /** The Private Network creation date. */ createdAt?: Date - /** The date the private network was last modified. */ + /** The date the Private Network was last modified. */ updatedAt?: Date } @@ -481,7 +484,7 @@ export interface Setting { type: SettingType /** ID of the project ID. */ projectId: string - /** The setting is enable or disable. */ + /** Defines whether the setting is enabled. */ enabled: boolean } @@ -490,21 +493,21 @@ export type ListServersRequest = { zone?: Zone /** Page number. */ page?: number - /** Number of server per page. */ + /** Number of servers per page. */ pageSize?: number /** Order of the servers. */ orderBy?: ListServersRequestOrderBy - /** Filter by tags. */ + /** Tags to filter for. */ tags?: string[] - /** Filter by status. */ + /** Status to filter for. */ status?: string[] - /** Filter by name. */ + /** Names to filter for. */ name?: string - /** Filter by organization ID. */ + /** Organization ID to filter for. */ organizationId?: string - /** Filter by project ID. */ + /** Project ID to filter for. */ projectId?: string - /** Filter by option ID. */ + /** Option ID to filter for. */ optionId?: string } @@ -536,11 +539,14 @@ export type CreateServerRequest = { projectId?: string /** Name of the server (≠hostname). */ name: string - /** Description associated to the server, max 255 characters. */ + /** Description associated with the server, max 255 characters. */ description: string /** Tags to associate to the server. */ tags?: string[] - /** Configuration of installation. */ + /** + * Object describing the configuration details of the OS installation on the + * server. + */ install?: CreateServerRequestInstall /** IDs of options to enable on server. */ optionIds?: string[] @@ -554,11 +560,11 @@ export type UpdateServerRequest = { /** Name of the server (≠hostname), not updated if null. */ name?: string /** - * Description associated to the server, max 255 characters, not updated if + * Description associated with the server, max 255 characters, not updated if * null. */ description?: string - /** Tags associated to the server, not updated if null. */ + /** Tags associated with the server, not updated if null. */ tags?: string[] } @@ -567,7 +573,7 @@ export type InstallServerRequest = { zone?: Zone /** Server ID to install. */ serverId: string - /** ID of the OS to install on the server. */ + /** ID of the OS to installation on the server. */ osId: string /** Hostname of the server. */ hostname: string @@ -640,7 +646,7 @@ export type StartBMCAccessRequest = { zone?: Zone /** ID of the server. */ serverId: string - /** The IP authorized to connect to the given server. */ + /** The IP authorized to connect to the server. */ ip: string } @@ -696,7 +702,7 @@ export type ListOffersRequest = { page?: number /** Number of offers per page. */ pageSize?: number - /** Period of subscription to filter offers. */ + /** Subscription period type to filter offers by. */ subscriptionPeriod?: OfferSubscriptionPeriod } @@ -721,9 +727,9 @@ export type ListOptionsRequest = { page?: number /** Number of options per page. */ pageSize?: number - /** Filter options by offer_id. */ + /** Offer ID to filter options for. */ offerId?: string - /** Filter options by name. */ + /** Name to filter options for. */ name?: string } @@ -734,7 +740,7 @@ export type ListSettingsRequest = { page?: number /** Set the maximum list size. */ pageSize?: number - /** Order the response. */ + /** Sort order for items in the response. */ orderBy?: ListSettingsRequestOrderBy /** ID of the project. */ projectId?: string @@ -745,7 +751,7 @@ export type UpdateSettingRequest = { zone?: Zone /** ID of the setting. */ settingId: string - /** Enable/Disable the setting. */ + /** Defines whether the setting is enabled. */ enabled?: boolean } @@ -756,7 +762,7 @@ export type ListOSRequest = { page?: number /** Number of OS per page. */ pageSize?: number - /** Filter OS by offer ID. */ + /** Offer IDs to filter OSes for. */ offerId?: string } @@ -772,7 +778,7 @@ export type PrivateNetworkApiAddServerPrivateNetworkRequest = { zone?: Zone /** The ID of the server. */ serverId: string - /** The ID of the private network. */ + /** The ID of the Private Network. */ privateNetworkId: string } @@ -781,26 +787,26 @@ export type PrivateNetworkApiSetServerPrivateNetworksRequest = { zone?: Zone /** The ID of the server. */ serverId: string - /** The IDs of the private networks. */ + /** The IDs of the Private Networks. */ privateNetworkIds: string[] } export type PrivateNetworkApiListServerPrivateNetworksRequest = { /** Zone to target. If none is passed will use default zone from the config. */ zone?: Zone - /** The sort order for the returned private networks. */ + /** The sort order for the returned Private Networks. */ orderBy?: ListServerPrivateNetworksRequestOrderBy - /** The page number for the returned private networks. */ + /** The page number for the returned Private Networks. */ page?: number - /** The maximum number of private networks per page. */ + /** The maximum number of Private Networks per page. */ pageSize?: number - /** Filter private networks by server ID. */ + /** Filter Private Networks by server ID. */ serverId?: string - /** Filter private networks by private network ID. */ + /** Filter Private Networks by Private Network ID. */ privateNetworkId?: string - /** Filter private networks by organization ID. */ + /** Filter Private Networks by Organization ID. */ organizationId?: string - /** Filter private networks by project ID. */ + /** Filter Private Networks by Project ID. */ projectId?: string } @@ -809,6 +815,6 @@ export type PrivateNetworkApiDeleteServerPrivateNetworkRequest = { zone?: Zone /** The ID of the server. */ serverId: string - /** The ID of the private network. */ + /** The ID of the Private Network. */ privateNetworkId: string }