Skip to content

Commit

Permalink
feat(interlink): add disapproved reason to link (#1750)
Browse files Browse the repository at this point in the history
  • Loading branch information
scaleway-bot authored Jan 30, 2025
1 parent 630b69f commit 2a13403
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 26 deletions.
8 changes: 6 additions & 2 deletions packages/clients/src/api/interlink/v1beta1/api.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
urlParams,
validatePathParam,
} from '../../../bridge'
import type { Region } from '../../../bridge'
import type { Region as ScwRegion } from '../../../bridge'
import {
marshalAttachRoutingPolicyRequest,
marshalAttachVpcRequest,
Expand Down Expand Up @@ -66,7 +66,11 @@ const jsonContentHeaders = {
*/
export class API extends ParentAPI {
/** Lists the available regions of the API. */
public static readonly LOCALITIES: Region[] = ['fr-par', 'nl-ams', 'pl-waw']
public static readonly LOCALITIES: ScwRegion[] = [
'fr-par',
'nl-ams',
'pl-waw',
]

protected pageOfListPartners = (
request: Readonly<ListPartnersRequest> = {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export const unmarshalLink = (data: unknown): Link => {
bgpV4Status: data.bgp_v4_status,
bgpV6Status: data.bgp_v6_status,
createdAt: unmarshalDate(data.created_at),
disapprovedReason: data.disapproved_reason,
enableRoutePropagation: data.enable_route_propagation,
id: data.id,
name: data.name,
Expand Down
53 changes: 29 additions & 24 deletions packages/clients/src/api/interlink/v1beta1/types.gen.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This file was automatically generated. DO NOT EDIT.
// If you have any remark or suggestion do not hesitate to open an issue.
import type { Region } from '../../../bridge'
import type { Region as ScwRegion } from '../../../bridge'

export type BgpStatus = 'unknown_bgp_status' | 'up' | 'down'

Expand Down Expand Up @@ -75,8 +75,13 @@ export interface Link {
updatedAt?: Date
/** Used to identify a link from a user or partner's point of view. */
pairingKey: string
/**
* Reason given by partner to explain why they did not approve the request for
* a hosted link.
*/
disapprovedReason?: string
/** Region of the link. */
region: Region
region: ScwRegion
}

export interface Partner {
Expand Down Expand Up @@ -118,7 +123,7 @@ export interface Pop {
*/
availableLinkBandwidthsMbps: number[]
/** Region of the PoP. */
region: Region
region: ScwRegion
}

export interface RoutingPolicy {
Expand All @@ -144,15 +149,15 @@ export interface RoutingPolicy {
/** Last modification date of the routing policy. */
updatedAt?: Date
/** Region of the routing policy. */
region: Region
region: ScwRegion
}

export type AttachRoutingPolicyRequest = {
/**
* Region to target. If none is passed will use default region from the
* config.
*/
region?: Region
region?: ScwRegion
/** ID of the link to attach a routing policy to. */
linkId: string
/** ID of the routing policy to be attached. */
Expand All @@ -164,7 +169,7 @@ export type AttachVpcRequest = {
* Region to target. If none is passed will use default region from the
* config.
*/
region?: Region
region?: ScwRegion
/** ID of the link to attach VPC to. */
linkId: string
/** ID of the VPC to attach. */
Expand All @@ -176,7 +181,7 @@ export type CreateLinkRequest = {
* Region to target. If none is passed will use default region from the
* config.
*/
region?: Region
region?: ScwRegion
/** ID of the Project to create the link in. */
projectId?: string
/** Name of the link. */
Expand Down Expand Up @@ -230,7 +235,7 @@ export type CreateRoutingPolicyRequest = {
* Region to target. If none is passed will use default region from the
* config.
*/
region?: Region
region?: ScwRegion
/** ID of the Project to create the routing policy in. */
projectId?: string
/** Name of the routing policy. */
Expand All @@ -251,7 +256,7 @@ export type DeleteLinkRequest = {
* Region to target. If none is passed will use default region from the
* config.
*/
region?: Region
region?: ScwRegion
/** ID of the link to delete. */
linkId: string
}
Expand All @@ -261,7 +266,7 @@ export type DeleteRoutingPolicyRequest = {
* Region to target. If none is passed will use default region from the
* config.
*/
region?: Region
region?: ScwRegion
/** ID of the routing policy to delete. */
routingPolicyId: string
}
Expand All @@ -271,7 +276,7 @@ export type DetachRoutingPolicyRequest = {
* Region to target. If none is passed will use default region from the
* config.
*/
region?: Region
region?: ScwRegion
/** ID of the link to detach a routing policy from. */
linkId: string
}
Expand All @@ -281,7 +286,7 @@ export type DetachVpcRequest = {
* Region to target. If none is passed will use default region from the
* config.
*/
region?: Region
region?: ScwRegion
/** ID of the link to detach the VPC from. */
linkId: string
}
Expand All @@ -291,7 +296,7 @@ export type DisableRoutePropagationRequest = {
* Region to target. If none is passed will use default region from the
* config.
*/
region?: Region
region?: ScwRegion
/** ID of the link on which to disable route propagation. */
linkId: string
}
Expand All @@ -301,7 +306,7 @@ export type EnableRoutePropagationRequest = {
* Region to target. If none is passed will use default region from the
* config.
*/
region?: Region
region?: ScwRegion
/** ID of the link on which to enable route propagation. */
linkId: string
}
Expand All @@ -311,7 +316,7 @@ export type GetLinkRequest = {
* Region to target. If none is passed will use default region from the
* config.
*/
region?: Region
region?: ScwRegion
/** ID of the link to get. */
linkId: string
}
Expand All @@ -321,7 +326,7 @@ export type GetPartnerRequest = {
* Region to target. If none is passed will use default region from the
* config.
*/
region?: Region
region?: ScwRegion
/** ID of partner to get. */
partnerId: string
}
Expand All @@ -331,7 +336,7 @@ export type GetPopRequest = {
* Region to target. If none is passed will use default region from the
* config.
*/
region?: Region
region?: ScwRegion
/** ID of PoP to get. */
popId: string
}
Expand All @@ -341,7 +346,7 @@ export type GetRoutingPolicyRequest = {
* Region to target. If none is passed will use default region from the
* config.
*/
region?: Region
region?: ScwRegion
/** ID of the routing policy to get. */
routingPolicyId: string
}
Expand All @@ -351,7 +356,7 @@ export type ListLinksRequest = {
* Region to target. If none is passed will use default region from the
* config.
*/
region?: Region
region?: ScwRegion
/** Order in which to return results. */
orderBy?: ListLinksRequestOrderBy
/** Page number to return. */
Expand Down Expand Up @@ -398,7 +403,7 @@ export type ListPartnersRequest = {
* Region to target. If none is passed will use default region from the
* config.
*/
region?: Region
region?: ScwRegion
/** Order in which to return results. */
orderBy?: ListPartnersRequestOrderBy
/** Page number to return. */
Expand All @@ -421,7 +426,7 @@ export type ListPopsRequest = {
* Region to target. If none is passed will use default region from the
* config.
*/
region?: Region
region?: ScwRegion
/** Order in which to return results. */
orderBy?: ListPopsRequestOrderBy
/** Page number to return. */
Expand Down Expand Up @@ -453,7 +458,7 @@ export type ListRoutingPoliciesRequest = {
* Region to target. If none is passed will use default region from the
* config.
*/
region?: Region
region?: ScwRegion
/** Order in which to return results. */
orderBy?: ListRoutingPoliciesRequestOrderBy
/** Page number to return. */
Expand All @@ -480,7 +485,7 @@ export type UpdateLinkRequest = {
* Region to target. If none is passed will use default region from the
* config.
*/
region?: Region
region?: ScwRegion
/** ID of the link to update. */
linkId: string
/** Name of the link. */
Expand All @@ -494,7 +499,7 @@ export type UpdateRoutingPolicyRequest = {
* Region to target. If none is passed will use default region from the
* config.
*/
region?: Region
region?: ScwRegion
/** ID of the routing policy to update. */
routingPolicyId: string
/** Name of the routing policy. */
Expand Down

0 comments on commit 2a13403

Please sign in to comment.