Skip to content

Commit af68b5d

Browse files
stainless-app[bot]meorphis
authored andcommitted
feat(addressing)!: reshuffle relationship in the namespace to align with the product (#2290)
1 parent f870d7b commit af68b5d

File tree

9 files changed

+135
-153
lines changed

9 files changed

+135
-153
lines changed

api.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2834,32 +2834,30 @@ Methods:
28342834
- <code title="delete /accounts/{account_id}/addressing/prefixes/{prefix_id}/bindings/{binding_id}">client.addressing.prefixes.serviceBindings.<a href="./src/resources/addressing/prefixes/service-bindings.ts">delete</a>(prefixId, bindingId, { ...params }) -> ServiceBindingDeleteResponse</code>
28352835
- <code title="get /accounts/{account_id}/addressing/prefixes/{prefix_id}/bindings/{binding_id}">client.addressing.prefixes.serviceBindings.<a href="./src/resources/addressing/prefixes/service-bindings.ts">get</a>(prefixId, bindingId, { ...params }) -> ServiceBinding</code>
28362836

2837-
### BGP
2838-
2839-
#### Prefixes
2837+
### BGPPrefixes
28402838

28412839
Types:
28422840

2843-
- <code><a href="./src/resources/addressing/prefixes/bgp/prefixes.ts">BGPPrefix</a></code>
2841+
- <code><a href="./src/resources/addressing/prefixes/bgp-prefixes.ts">BGPPrefix</a></code>
28442842

28452843
Methods:
28462844

2847-
- <code title="post /accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/prefixes">client.addressing.prefixes.bgp.prefixes.<a href="./src/resources/addressing/prefixes/bgp/prefixes.ts">create</a>(prefixId, { ...params }) -> BGPPrefix</code>
2848-
- <code title="get /accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/prefixes">client.addressing.prefixes.bgp.prefixes.<a href="./src/resources/addressing/prefixes/bgp/prefixes.ts">list</a>(prefixId, { ...params }) -> BGPPrefixesSinglePage</code>
2849-
- <code title="patch /accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/prefixes/{bgp_prefix_id}">client.addressing.prefixes.bgp.prefixes.<a href="./src/resources/addressing/prefixes/bgp/prefixes.ts">edit</a>(prefixId, bgpPrefixId, { ...params }) -> BGPPrefix</code>
2850-
- <code title="get /accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/prefixes/{bgp_prefix_id}">client.addressing.prefixes.bgp.prefixes.<a href="./src/resources/addressing/prefixes/bgp/prefixes.ts">get</a>(prefixId, bgpPrefixId, { ...params }) -> BGPPrefix</code>
2845+
- <code title="post /accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/prefixes">client.addressing.prefixes.bgpPrefixes.<a href="./src/resources/addressing/prefixes/bgp-prefixes.ts">create</a>(prefixId, { ...params }) -> BGPPrefix</code>
2846+
- <code title="get /accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/prefixes">client.addressing.prefixes.bgpPrefixes.<a href="./src/resources/addressing/prefixes/bgp-prefixes.ts">list</a>(prefixId, { ...params }) -> BGPPrefixesSinglePage</code>
2847+
- <code title="patch /accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/prefixes/{bgp_prefix_id}">client.addressing.prefixes.bgpPrefixes.<a href="./src/resources/addressing/prefixes/bgp-prefixes.ts">edit</a>(prefixId, bgpPrefixId, { ...params }) -> BGPPrefix</code>
2848+
- <code title="get /accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/prefixes/{bgp_prefix_id}">client.addressing.prefixes.bgpPrefixes.<a href="./src/resources/addressing/prefixes/bgp-prefixes.ts">get</a>(prefixId, bgpPrefixId, { ...params }) -> BGPPrefix</code>
28512849

2852-
#### Statuses
2850+
### AdvertisementStatus
28532851

28542852
Types:
28552853

2856-
- <code><a href="./src/resources/addressing/prefixes/bgp/statuses.ts">StatusEditResponse</a></code>
2857-
- <code><a href="./src/resources/addressing/prefixes/bgp/statuses.ts">StatusGetResponse</a></code>
2854+
- <code><a href="./src/resources/addressing/prefixes/advertisement-status.ts">AdvertisementStatusEditResponse</a></code>
2855+
- <code><a href="./src/resources/addressing/prefixes/advertisement-status.ts">AdvertisementStatusGetResponse</a></code>
28582856

28592857
Methods:
28602858

2861-
- <code title="patch /accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/status">client.addressing.prefixes.bgp.statuses.<a href="./src/resources/addressing/prefixes/bgp/statuses.ts">edit</a>(prefixId, { ...params }) -> StatusEditResponse</code>
2862-
- <code title="get /accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/status">client.addressing.prefixes.bgp.statuses.<a href="./src/resources/addressing/prefixes/bgp/statuses.ts">get</a>(prefixId, { ...params }) -> StatusGetResponse</code>
2859+
- <code title="patch /accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/status">client.addressing.prefixes.advertisementStatus.<a href="./src/resources/addressing/prefixes/advertisement-status.ts">edit</a>(prefixId, { ...params }) -> AdvertisementStatusEditResponse</code>
2860+
- <code title="get /accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/status">client.addressing.prefixes.advertisementStatus.<a href="./src/resources/addressing/prefixes/advertisement-status.ts">get</a>(prefixId, { ...params }) -> AdvertisementStatusGetResponse</code>
28632861

28642862
### Delegations
28652863

Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
import { APIResource } from '../../../../resource';
4-
import * as Core from '../../../../core';
3+
import { APIResource } from '../../../resource';
4+
import * as Core from '../../../core';
55

6-
export class Statuses extends APIResource {
6+
export class AdvertisementStatus extends APIResource {
77
/**
88
* Advertise or withdraw BGP route for a prefix.
99
*/
1010
edit(
1111
prefixId: string,
12-
params: StatusEditParams,
12+
params: AdvertisementStatusEditParams,
1313
options?: Core.RequestOptions,
14-
): Core.APIPromise<StatusEditResponse> {
14+
): Core.APIPromise<AdvertisementStatusEditResponse> {
1515
const { account_id, ...body } = params;
1616
return (
1717
this._client.patch(`/accounts/${account_id}/addressing/prefixes/${prefixId}/bgp/status`, {
1818
body,
1919
...options,
20-
}) as Core.APIPromise<{ result: StatusEditResponse }>
20+
}) as Core.APIPromise<{ result: AdvertisementStatusEditResponse }>
2121
)._thenUnwrap((obj) => obj.result);
2222
}
2323

@@ -26,20 +26,20 @@ export class Statuses extends APIResource {
2626
*/
2727
get(
2828
prefixId: string,
29-
params: StatusGetParams,
29+
params: AdvertisementStatusGetParams,
3030
options?: Core.RequestOptions,
31-
): Core.APIPromise<StatusGetResponse> {
31+
): Core.APIPromise<AdvertisementStatusGetResponse> {
3232
const { account_id } = params;
3333
return (
3434
this._client.get(
3535
`/accounts/${account_id}/addressing/prefixes/${prefixId}/bgp/status`,
3636
options,
37-
) as Core.APIPromise<{ result: StatusGetResponse }>
37+
) as Core.APIPromise<{ result: AdvertisementStatusGetResponse }>
3838
)._thenUnwrap((obj) => obj.result);
3939
}
4040
}
4141

42-
export interface StatusEditResponse {
42+
export interface AdvertisementStatusEditResponse {
4343
/**
4444
* Enablement of prefix advertisement to the Internet.
4545
*/
@@ -52,7 +52,7 @@ export interface StatusEditResponse {
5252
advertised_modified_at?: string | null;
5353
}
5454

55-
export interface StatusGetResponse {
55+
export interface AdvertisementStatusGetResponse {
5656
/**
5757
* Enablement of prefix advertisement to the Internet.
5858
*/
@@ -65,7 +65,7 @@ export interface StatusGetResponse {
6565
advertised_modified_at?: string | null;
6666
}
6767

68-
export interface StatusEditParams {
68+
export interface AdvertisementStatusEditParams {
6969
/**
7070
* Path param: Identifier
7171
*/
@@ -77,18 +77,18 @@ export interface StatusEditParams {
7777
advertised: boolean;
7878
}
7979

80-
export interface StatusGetParams {
80+
export interface AdvertisementStatusGetParams {
8181
/**
8282
* Identifier
8383
*/
8484
account_id: string;
8585
}
8686

87-
export declare namespace Statuses {
87+
export declare namespace AdvertisementStatus {
8888
export {
89-
type StatusEditResponse as StatusEditResponse,
90-
type StatusGetResponse as StatusGetResponse,
91-
type StatusEditParams as StatusEditParams,
92-
type StatusGetParams as StatusGetParams,
89+
type AdvertisementStatusEditResponse as AdvertisementStatusEditResponse,
90+
type AdvertisementStatusGetResponse as AdvertisementStatusGetResponse,
91+
type AdvertisementStatusEditParams as AdvertisementStatusEditParams,
92+
type AdvertisementStatusGetParams as AdvertisementStatusGetParams,
9393
};
9494
}

src/resources/addressing/prefixes/bgp/prefixes.ts renamed to src/resources/addressing/prefixes/bgp-prefixes.ts

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
import { APIResource } from '../../../../resource';
4-
import * as Core from '../../../../core';
5-
import { SinglePage } from '../../../../pagination';
3+
import { APIResource } from '../../../resource';
4+
import * as Core from '../../../core';
5+
import { SinglePage } from '../../../pagination';
66

7-
export class Prefixes extends APIResource {
7+
export class BGPPrefixes extends APIResource {
88
/**
99
* Create a BGP prefix, controlling the BGP advertisement status of a specific
1010
* subnet. When created, BGP prefixes are initially withdrawn, and can be
1111
* advertised with the Update BGP Prefix API.
1212
*/
1313
create(
1414
prefixId: string,
15-
params: PrefixCreateParams,
15+
params: BGPPrefixCreateParams,
1616
options?: Core.RequestOptions,
1717
): Core.APIPromise<BGPPrefix> {
1818
const { account_id, ...body } = params;
@@ -32,7 +32,7 @@ export class Prefixes extends APIResource {
3232
*/
3333
list(
3434
prefixId: string,
35-
params: PrefixListParams,
35+
params: BGPPrefixListParams,
3636
options?: Core.RequestOptions,
3737
): Core.PagePromise<BGPPrefixesSinglePage, BGPPrefix> {
3838
const { account_id } = params;
@@ -50,7 +50,7 @@ export class Prefixes extends APIResource {
5050
edit(
5151
prefixId: string,
5252
bgpPrefixId: string,
53-
params: PrefixEditParams,
53+
params: BGPPrefixEditParams,
5454
options?: Core.RequestOptions,
5555
): Core.APIPromise<BGPPrefix> {
5656
const { account_id, ...body } = params;
@@ -68,7 +68,7 @@ export class Prefixes extends APIResource {
6868
get(
6969
prefixId: string,
7070
bgpPrefixId: string,
71-
params: PrefixGetParams,
71+
params: BGPPrefixGetParams,
7272
options?: Core.RequestOptions,
7373
): Core.APIPromise<BGPPrefix> {
7474
const { account_id } = params;
@@ -150,7 +150,7 @@ export namespace BGPPrefix {
150150
}
151151
}
152152

153-
export interface PrefixCreateParams {
153+
export interface BGPPrefixCreateParams {
154154
/**
155155
* Path param: Identifier
156156
*/
@@ -162,14 +162,14 @@ export interface PrefixCreateParams {
162162
cidr?: string;
163163
}
164164

165-
export interface PrefixListParams {
165+
export interface BGPPrefixListParams {
166166
/**
167167
* Identifier
168168
*/
169169
account_id: string;
170170
}
171171

172-
export interface PrefixEditParams {
172+
export interface BGPPrefixEditParams {
173173
/**
174174
* Path param: Identifier
175175
*/
@@ -178,31 +178,31 @@ export interface PrefixEditParams {
178178
/**
179179
* Body param:
180180
*/
181-
on_demand?: PrefixEditParams.OnDemand;
181+
on_demand?: BGPPrefixEditParams.OnDemand;
182182
}
183183

184-
export namespace PrefixEditParams {
184+
export namespace BGPPrefixEditParams {
185185
export interface OnDemand {
186186
advertised?: boolean;
187187
}
188188
}
189189

190-
export interface PrefixGetParams {
190+
export interface BGPPrefixGetParams {
191191
/**
192192
* Identifier
193193
*/
194194
account_id: string;
195195
}
196196

197-
Prefixes.BGPPrefixesSinglePage = BGPPrefixesSinglePage;
197+
BGPPrefixes.BGPPrefixesSinglePage = BGPPrefixesSinglePage;
198198

199-
export declare namespace Prefixes {
199+
export declare namespace BGPPrefixes {
200200
export {
201201
type BGPPrefix as BGPPrefix,
202202
BGPPrefixesSinglePage as BGPPrefixesSinglePage,
203-
type PrefixCreateParams as PrefixCreateParams,
204-
type PrefixListParams as PrefixListParams,
205-
type PrefixEditParams as PrefixEditParams,
206-
type PrefixGetParams as PrefixGetParams,
203+
type BGPPrefixCreateParams as BGPPrefixCreateParams,
204+
type BGPPrefixListParams as BGPPrefixListParams,
205+
type BGPPrefixEditParams as BGPPrefixEditParams,
206+
type BGPPrefixGetParams as BGPPrefixGetParams,
207207
};
208208
}

src/resources/addressing/prefixes/bgp/bgp.ts

Lines changed: 0 additions & 50 deletions
This file was deleted.

src/resources/addressing/prefixes/bgp/index.ts

Lines changed: 0 additions & 19 deletions
This file was deleted.

src/resources/addressing/prefixes/index.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
export { BGP } from './bgp/index';
3+
export {
4+
AdvertisementStatus,
5+
type AdvertisementStatusEditResponse,
6+
type AdvertisementStatusGetResponse,
7+
type AdvertisementStatusEditParams,
8+
type AdvertisementStatusGetParams,
9+
} from './advertisement-status';
10+
export {
11+
BGPPrefixesSinglePage,
12+
BGPPrefixes,
13+
type BGPPrefix,
14+
type BGPPrefixCreateParams,
15+
type BGPPrefixListParams,
16+
type BGPPrefixEditParams,
17+
type BGPPrefixGetParams,
18+
} from './bgp-prefixes';
419
export {
520
DelegationsSinglePage,
621
type Delegations,

0 commit comments

Comments
 (0)