diff --git a/packages/clients/src/api/cockpit/v1beta1/api.gen.ts b/packages/clients/src/api/cockpit/v1beta1/api.gen.ts index 3b005a6e9..b5f962773 100644 --- a/packages/clients/src/api/cockpit/v1beta1/api.gen.ts +++ b/packages/clients/src/api/cockpit/v1beta1/api.gen.ts @@ -73,14 +73,16 @@ const jsonContentHeaders = { } /** - * Cockpit API. + * Cockpit API documentation. * - * This API allows to manage Cockpits. Cockpit API. + * Cockpit's API allows you to monitor your applications and their + * infrastructure. Cockpit's API allows you to activate your Cockpit on your + * Projects. Scaleway's Cockpit stores metrics and logs and provides a dedicated + * Grafana for dashboarding to visualize them. */ export class API extends ParentAPI { /** - * Activate a cockpit. Activate a cockpit associated with the given project - * ID. + * Activate a Cockpit. Activate the Cockpit of the specified Project ID. * * @param request - The request {@link ActivateCockpitRequest} * @returns A Promise of Cockpit @@ -99,7 +101,7 @@ export class API extends ParentAPI { ) /** - * Get cockpit. Get the cockpit associated with the given project ID. + * Get a Cockpit. Retrieve the Cockpit of the specified Project ID. * * @param request - The request {@link GetCockpitRequest} * @returns A Promise of Cockpit @@ -138,7 +140,8 @@ export class API extends ParentAPI { ) /** - * Get cockpit metrics. Get the cockpit metrics with the given project ID. + * Get Cockpit metrics. Get metrics from your Cockpit with the specified + * Project ID. * * @param request - The request {@link GetCockpitMetricsRequest} * @returns A Promise of CockpitMetrics @@ -162,8 +165,7 @@ export class API extends ParentAPI { ) /** - * Deactivate a cockpit. Deactivate a cockpit associated with the given - * project ID. + * Deactivate a Cockpit. Deactivate the Cockpit of the specified Project ID. * * @param request - The request {@link DeactivateCockpitRequest} * @returns A Promise of Cockpit @@ -182,8 +184,8 @@ export class API extends ParentAPI { ) /** - * Reset Grafana. Reset the Grafana of your cockpit associated with the given - * project ID. + * Reset a Grafana. Reset your Cockpit's Grafana associated with the specified + * Project ID. * * @param request - The request {@link ResetCockpitGrafanaRequest} * @returns A Promise of Cockpit @@ -202,7 +204,7 @@ export class API extends ParentAPI { ) /** - * Create a token. Create a token associated with the given project ID. + * Create a token. Create a token associated with the specified Project ID. * * @param request - The request {@link CreateTokenRequest} * @returns A Promise of Token @@ -242,7 +244,7 @@ export class API extends ParentAPI { ) /** - * List tokens. List tokens associated with the given project ID. + * List tokens. Get a list of tokens associated with the specified Project ID. * * @param request - The request {@link ListTokensRequest} * @returns A Promise of ListTokensResponse @@ -251,7 +253,7 @@ export class API extends ParentAPI { enrichForPagination('tokens', this.pageOfListTokens, request) /** - * Get token. Get the token associated with the given ID. + * Get a token. Retrieve the token associated with the specified token ID. * * @param request - The request {@link GetTokenRequest} * @returns A Promise of Token @@ -269,7 +271,7 @@ export class API extends ParentAPI { ) /** - * Delete token. Delete the token associated with the given ID. + * Delete a token. Delete the token associated with the specified token ID. * * @param request - The request {@link DeleteTokenRequest} */ @@ -283,7 +285,7 @@ export class API extends ParentAPI { }) /** - * Create an alert contact point. Create an alert contact point for the + * Create a contact point. Create a contact point to receive alerts for the * default receiver. * * @param request - The request {@link CreateContactPointRequest} @@ -325,8 +327,8 @@ export class API extends ParentAPI { ) /** - * List alert contact points. List alert contact points associated with the - * given cockpit ID. + * List contact points. Get a list of contact points for the Cockpit + * associated with the specified Project ID. * * @param request - The request {@link ListContactPointsRequest} * @returns A Promise of ListContactPointsResponse @@ -335,8 +337,8 @@ export class API extends ParentAPI { enrichForPagination('contactPoints', this.pageOfListContactPoints, request) /** - * Delete an alert contact point. Delete an alert contact point for the - * default receiver. + * Delete an alert contact point. Delete a contact point for the default + * receiver. * * @param request - The request {@link DeleteContactPointRequest} */ @@ -351,7 +353,8 @@ export class API extends ParentAPI { }) /** - * Enable managed alerts. + * Enable managed alerts. Enable the sending of managed alerts for the + * specified Project's Cockpit. * * @param request - The request {@link EnableManagedAlertsRequest} */ @@ -366,7 +369,8 @@ export class API extends ParentAPI { }) /** - * Disable managed alerts. + * Disable managed alerts. Disable the sending of managed alerts for the + * specified Project's Cockpit. * * @param request - The request {@link DisableManagedAlertsRequest} */ @@ -383,7 +387,8 @@ export class API extends ParentAPI { }) /** - * Trigger a test alert. Trigger a test alert to all receivers. + * Trigger a test alert. Trigger a test alert to all of the Cockpit's + * receivers. * * @param request - The request {@link TriggerTestAlertRequest} */ @@ -398,7 +403,9 @@ export class API extends ParentAPI { }) /** - * Create a grafana user. Create a grafana user for your grafana instance. + * Create a Grafana user. Create a Grafana user for your Cockpit's Grafana + * instance. Make sure you save the automatically-generated password and the + * Grafana user ID. * * @param request - The request {@link CreateGrafanaUserRequest} * @returns A Promise of GrafanaUser @@ -440,8 +447,8 @@ export class API extends ParentAPI { ) /** - * List grafana users. List grafana users who are able to connect to your - * grafana instance. + * List Grafana users. Get a list of Grafana users who are able to connect to + * the Cockpit's Grafana instance. * * @param request - The request {@link ListGrafanaUsersRequest} * @returns A Promise of ListGrafanaUsersResponse @@ -450,7 +457,8 @@ export class API extends ParentAPI { enrichForPagination('grafanaUsers', this.pageOfListGrafanaUsers, request) /** - * Delete a grafana user. Delete a grafana user from your grafana instance. + * Delete a Grafana user. Delete a Grafana user from a Grafana instance, + * specified by the Cockpit's Project ID and the Grafana user ID. * * @param request - The request {@link DeleteGrafanaUserRequest} */ @@ -468,8 +476,8 @@ export class API extends ParentAPI { }) /** - * Reset Grafana user password. Reset the Grafana user password from your - * grafana instance. + * Reset a Grafana user's password. Reset a Grafana user's password specified + * by the Cockpit's Project ID and the Grafana user ID. * * @param request - The request {@link ResetGrafanaUserPasswordRequest} * @returns A Promise of GrafanaUser @@ -510,7 +518,7 @@ export class API extends ParentAPI { ) /** - * List plans. List all pricing plans. + * List pricing plans. Get a list of all pricing plans available. * * @param request - The request {@link ListPlansRequest} * @returns A Promise of ListPlansResponse @@ -519,7 +527,9 @@ export class API extends ParentAPI { enrichForPagination('plans', this.pageOfListPlans, request) /** - * Select pricing plan. Select the wanted pricing plan. + * Select pricing plan. Select your chosen pricing plan for your Cockpit, + * specifying the Cockpit's Project ID and the pricing plan's ID in the + * request. * * @param request - The request {@link SelectPlanRequest} * @returns A Promise of SelectPlanResponse diff --git a/packages/clients/src/api/cockpit/v1beta1/types.gen.ts b/packages/clients/src/api/cockpit/v1beta1/types.gen.ts index 12dcc3ebe..4f249d1b4 100644 --- a/packages/clients/src/api/cockpit/v1beta1/types.gen.ts +++ b/packages/clients/src/api/cockpit/v1beta1/types.gen.ts @@ -26,40 +26,44 @@ export type PlanName = 'unknown_name' | 'free' | 'premium' | 'custom' /** Cockpit. */ export interface Cockpit { - /** Project ID. */ + /** ID of the Project the Cockpit belongs to. */ projectId: string - /** Created at. */ + /** Date and time of the Cockpit's creation. */ createdAt?: Date - /** Updated at. */ + /** Date and time of the Cockpit's last update. */ updatedAt?: Date - /** Endpoints. */ + /** Endpoints of the Cockpit. */ endpoints?: CockpitEndpoints - /** Status. */ + /** Status of the Cockpit. */ status: CockpitStatus - /** Managed alerts enabled. */ + /** Specifies whether managed alerts are enabled or disabled. */ managedAlertsEnabled: boolean - /** Pricing plan. */ + /** Pricing plan information. */ plan?: Plan } /** Cockpit. endpoints. */ export interface CockpitEndpoints { + /** URL for metrics. */ metricsUrl: string + /** URL for logs. */ logsUrl: string + /** URL for the alert manager. */ alertmanagerUrl: string + /** URL for the Grafana dashboard. */ grafanaUrl: string } -/** Cockpit metrics. */ +/** Metrics for a given Cockpit. Cockpit metrics. */ export interface CockpitMetrics { - /** Timeseries array. */ + /** Time series array. */ timeseries: TimeSeries[] } -/** Alert contact point. Contact point. */ +/** Contact point. */ export interface ContactPoint { /** - * Alert contact point configuration. + * Contact point configuration. * * One-of ('configuration'): at most one of 'email' could be set. */ @@ -72,138 +76,174 @@ export interface ContactPointEmail { /** Grafana user. */ export interface GrafanaUser { + /** ID of the Grafana user. */ id: number + /** Username of the Grafana user. */ login: string + /** Role assigned to the Grafana user. */ role: GrafanaUserRole + /** The Grafana user's password. */ password?: string } -/** List contact points response. */ +/** Response returned when listing contact points. List contact points response. */ export interface ListContactPointsResponse { - /** Total count of contact points. */ + /** Count of all contact points created. */ totalCount: number - /** Contact points array. */ + /** Array of contact points. */ contactPoints: ContactPoint[] - /** Has receivers other than default. */ + /** + * Specifies whether the contact point has other receivers than the default + * receiver. + */ hasAdditionalReceivers: boolean - /** Has unmanaged contact points. */ + /** Specifies whether there are unmanaged contact points. */ hasAdditionalContactPoints: boolean } -/** List grafana users response. */ +/** Response returned when listing Grafana users. List grafana users response. */ export interface ListGrafanaUsersResponse { + /** Count of all Grafana users. */ totalCount: number + /** Information on all Grafana users. */ grafanaUsers: GrafanaUser[] } -/** List all pricing plans response. List plans response. */ +/** Response returned when listing all pricing plans. List plans response. */ export interface ListPlansResponse { + /** Count of all pricing plans. */ totalCount: number + /** Information on plans. */ plans: Plan[] } /** List tokens response. */ export interface ListTokensResponse { + /** Count of all tokens created. */ totalCount: number + /** List of all tokens created. */ tokens: Token[] } -/** Plan. */ +/** Pricing plan. Plan. */ export interface Plan { - /** Plan id. */ + /** ID of a given pricing plan. */ id: string - /** Plan name. */ + /** Name of a given pricing plan. */ name: PlanName /** Retention for metrics. */ retentionMetricsInterval?: string /** Retention for logs. */ retentionLogsInterval?: string - /** Ingestion price for 1million samples in cents. */ + /** Ingestion price for 1 million samples in cents. */ sampleIngestionPrice: number - /** Ingestion price in cents for 1 Go of logs. */ + /** Ingestion price for 1 GB of logs in cents. */ logsIngestionPrice: number /** Retention price in euros per month. */ retentionPrice: number } -/** Select pricing plan response. Select plan response. */ +/** Response returned when selecting a pricing plan. Select plan response. */ export interface SelectPlanResponse {} /** Token. */ export interface Token { + /** ID of the token. */ id: string + /** ID of the Project. */ projectId: string + /** Name of the token. */ name: string + /** Date and time of the token's creation. */ createdAt?: Date + /** Date and time of the token's last update. */ updatedAt?: Date + /** Token's permissions. */ scopes?: TokenScopes + /** Token's secret key. */ secretKey?: string } /** Token scopes. */ export interface TokenScopes { + /** Permission to fetch metrics. */ queryMetrics: boolean + /** Permission to write metrics. */ writeMetrics: boolean + /** Permission to setup metrics rules. */ setupMetricsRules: boolean + /** Permission to fetch logs. */ queryLogs: boolean + /** Permission to write logs. */ writeLogs: boolean + /** Permission to setup logs rules. */ setupLogsRules: boolean + /** Permission to setup alerts. */ setupAlerts: boolean } export type ActivateCockpitRequest = { + /** ID of the Project the Cockpit belongs to. */ projectId?: string } export type GetCockpitRequest = { + /** ID of the Project the Cockpit belongs to. */ projectId?: string } export type GetCockpitMetricsRequest = { - /** Project ID. */ + /** ID of the Project the Cockpit belongs to. */ projectId?: string - /** - * Start date. Start date, if omited, query will be instant query and End Date - * will be used as query time. - */ + /** Desired time range's start date for the metrics. */ startDate?: Date - /** End date. End date, if omited set to now. */ + /** Desired time range's end date for the metrics. */ endDate?: Date - /** Metric name. */ + /** Name of the metric requested. */ metricName?: string } export type DeactivateCockpitRequest = { + /** ID of the Project the Cockpit belongs to. */ projectId?: string } export type ResetCockpitGrafanaRequest = { + /** ID of the Project the Cockpit belongs to. */ projectId?: string } export type CreateTokenRequest = { + /** ID of the Project. */ projectId?: string + /** Name of the token. */ name?: string + /** Token's permissions. */ scopes?: TokenScopes } export type ListTokensRequest = { + /** Page number. */ page?: number + /** Page size. */ pageSize?: number orderBy?: ListTokensRequestOrderBy + /** ID of the Project. */ projectId?: string } export type GetTokenRequest = { + /** ID of the token. */ tokenId: string } export type DeleteTokenRequest = { + /** ID of the token. */ tokenId: string } export type CreateContactPointRequest = { - /** Project ID. */ + /** ID of the Project in which to create the contact point. */ projectId?: string /** Contact point to create. */ contactPoint?: ContactPoint @@ -214,21 +254,24 @@ export type ListContactPointsRequest = { page?: number /** Page size. */ pageSize?: number - /** Project ID. */ + /** ID of the Project from which to list the contact points. */ projectId?: string } export type DeleteContactPointRequest = { + /** ID of the Project. */ projectId?: string /** Contact point to delete. */ contactPoint?: ContactPoint } export type EnableManagedAlertsRequest = { + /** ID of the Project. */ projectId?: string } export type DisableManagedAlertsRequest = { + /** ID of the Project. */ projectId?: string } @@ -237,35 +280,49 @@ export type TriggerTestAlertRequest = { } export type CreateGrafanaUserRequest = { + /** ID of the Project. */ projectId?: string + /** Username of the Grafana user. */ login: string + /** Role assigned to the Grafana user. */ role?: GrafanaUserRole } export type ListGrafanaUsersRequest = { + /** Page number. */ page?: number + /** Page size. */ pageSize?: number orderBy?: ListGrafanaUsersRequestOrderBy + /** ID of the Project. */ projectId?: string } export type DeleteGrafanaUserRequest = { + /** ID of the Grafana user. */ grafanaUserId: number + /** ID of the Project. */ projectId?: string } export type ResetGrafanaUserPasswordRequest = { + /** ID of the Grafana user. */ grafanaUserId: number + /** ID of the Project. */ projectId?: string } export type ListPlansRequest = { + /** Page number. */ page?: number + /** Page size. */ pageSize?: number orderBy?: ListPlansRequestOrderBy } export type SelectPlanRequest = { + /** ID of the Project. */ projectId?: string + /** ID of the pricing plan. */ planId: string }