Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(interlink): add disapproved reason to link #1750

Merged
merged 1 commit into from
Jan 30, 2025
Merged
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
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
Loading