Skip to content
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
2 changes: 1 addition & 1 deletion OMICRON_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
863b79d5cd0eed19f2768e0b54800c2425412955
3e5bafe8ad9d19de5db48fb50bbe2e9437f82e86
1 change: 1 addition & 0 deletions oxide-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Make sure to use the SDK compatible with your Oxide system version.

| System version | `@oxide/api` version | npm tag |
| --- | --- | --- |
| [21](https://docs.oxide.computer/release-notes/system/21) | 0.8.0 | `rel21` |
| [20](https://docs.oxide.computer/release-notes/system/20) | 0.7.0 | `rel20` |
| [19](https://docs.oxide.computer/release-notes/system/19) | 0.6.0 | `rel19` |
| [18](https://docs.oxide.computer/release-notes/system/18) | 0.5.1 | `rel18` |
Expand Down
4 changes: 2 additions & 2 deletions oxide-api/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion oxide-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@oxide/api",
"version": "0.7.1",
"version": "0.8.0",
"description": "TypeScript client for the Oxide API",
"engines": {
"node": ">=18"
Expand Down
38 changes: 37 additions & 1 deletion oxide-api/src/Api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -939,6 +939,20 @@ export type BgpConfigResultsPage = {
nextPage?: string | null;
};

/**
* Parameters for updating a BGP configuration
*
* If a value is not specified, it will remain unchanged.
*/
export type BgpConfigUpdate = {
/** Update the BGP announce set associated with this configuration. */
bgpAnnounceSetId?: NameOrId | null;
description?: string | null;
/** Update the maximum number of equal-cost paths. */
maxPaths?: MaxPathConfig | null;
name?: Name | null;
};

/**
* Route exported to a peer.
*/
Expand Down Expand Up @@ -7120,6 +7134,10 @@ export interface NetworkingBgpConfigListQueryParams {
sortBy?: NameOrIdSortMode;
}

export interface NetworkingBgpConfigUpdateQueryParams {
nameOrId: NameOrId;
}

export interface NetworkingBgpConfigDeleteQueryParams {
nameOrId: NameOrId;
}
Expand Down Expand Up @@ -7641,7 +7659,7 @@ export class Api {
* Pulled from info.version in the OpenAPI schema. Sent in the
* `api-version` header on all requests.
*/
apiVersion = "2026060800.0.0";
apiVersion = "2026061000.0.0";

constructor({ host = "", baseParams = {}, token }: ApiConfig = {}) {
this.host = host;
Expand Down Expand Up @@ -11190,6 +11208,24 @@ export class Api {
...params,
});
},
/**
* Update the mutable fields of an existing BGP configuration
*/
networkingBgpConfigUpdate: (
{
query,
body,
}: { query: NetworkingBgpConfigUpdateQueryParams; body: BgpConfigUpdate },
params: FetchParams = {},
) => {
return this.request<BgpConfig>({
path: `/v1/system/networking/bgp`,
method: "PUT",
body,
query,
...params,
});
},
/**
* Create BGP configuration
*/
Expand Down
34 changes: 33 additions & 1 deletion oxide-openapi-gen-ts/src/__snapshots__/Api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -954,6 +954,18 @@ export type BgpConfigResultsPage =
/** token used to fetch the next page of results (if any) */
"nextPage"?: string | null,};

/**
* Parameters for updating a BGP configuration
*
* If a value is not specified, it will remain unchanged.
*/
export type BgpConfigUpdate =
{
/** Update the BGP announce set associated with this configuration. */
"bgpAnnounceSetId"?: NameOrId | null,"description"?: string | null,
/** Update the maximum number of equal-cost paths. */
"maxPaths"?: MaxPathConfig | null,"name"?: Name | null,};

/**
* Route exported to a peer.
*/
Expand Down Expand Up @@ -7285,6 +7297,10 @@ export interface NetworkingBgpConfigListQueryParams {
sortBy?: NameOrIdSortMode,
}

export interface NetworkingBgpConfigUpdateQueryParams {
nameOrId: NameOrId,
}

export interface NetworkingBgpConfigDeleteQueryParams {
nameOrId: NameOrId,
}
Expand Down Expand Up @@ -7806,7 +7822,7 @@ export interface ApiConfig {
* Pulled from info.version in the OpenAPI schema. Sent in the
* `api-version` header on all requests.
*/
apiVersion = "2026060800.0.0";
apiVersion = "2026061000.0.0";

constructor({ host = "", baseParams = {}, token }: ApiConfig = {}) {
this.host = host;
Expand Down Expand Up @@ -10904,6 +10920,22 @@ params: FetchParams = {}) => {
})
},
/**
* Update the mutable fields of an existing BGP configuration
*/
networkingBgpConfigUpdate: ({
query, body, }: {query: NetworkingBgpConfigUpdateQueryParams,
body: BgpConfigUpdate,
},
params: FetchParams = {}) => {
return this.request<BgpConfig>({
path: `/v1/system/networking/bgp`,
method: "PUT",
body,
query,
...params,
})
},
/**
* Create BGP configuration
*/
networkingBgpConfigCreate: ({
Expand Down
3 changes: 3 additions & 0 deletions oxide-openapi-gen-ts/src/__snapshots__/msw-handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,8 @@ export interface MSWHandlers {
networkingBfdStatus: (params: { req: Request, cookies: Record<string, string> }) => Promisable<HandlerResult<Api.BfdStatus[]>>,
/** `GET /v1/system/networking/bgp` */
networkingBgpConfigList: (params: { query: Api.NetworkingBgpConfigListQueryParams, req: Request, cookies: Record<string, string> }) => Promisable<HandlerResult<Api.BgpConfigResultsPage>>,
/** `PUT /v1/system/networking/bgp` */
networkingBgpConfigUpdate: (params: { query: Api.NetworkingBgpConfigUpdateQueryParams, body: Json<Api.BgpConfigUpdate>, req: Request, cookies: Record<string, string> }) => Promisable<HandlerResult<Api.BgpConfig>>,
/** `POST /v1/system/networking/bgp` */
networkingBgpConfigCreate: (params: { body: Json<Api.BgpConfigCreate>, req: Request, cookies: Record<string, string> }) => Promisable<HandlerResult<Api.BgpConfig>>,
/** `DELETE /v1/system/networking/bgp` */
Expand Down Expand Up @@ -985,6 +987,7 @@ http.post('/v1/system/networking/bfd-disable', handler(handlers['networkingBfdDi
http.post('/v1/system/networking/bfd-enable', handler(handlers['networkingBfdEnable'], null, schema.BfdSessionEnable)),
http.get('/v1/system/networking/bfd-status', handler(handlers['networkingBfdStatus'], null, null)),
http.get('/v1/system/networking/bgp', handler(handlers['networkingBgpConfigList'], schema.NetworkingBgpConfigListParams, null)),
http.put('/v1/system/networking/bgp', handler(handlers['networkingBgpConfigUpdate'], schema.NetworkingBgpConfigUpdateParams, schema.BgpConfigUpdate)),
http.post('/v1/system/networking/bgp', handler(handlers['networkingBgpConfigCreate'], null, schema.BgpConfigCreate)),
http.delete('/v1/system/networking/bgp', handler(handlers['networkingBgpConfigDelete'], schema.NetworkingBgpConfigDeleteParams, null)),
http.get('/v1/system/networking/bgp-announce-set', handler(handlers['networkingBgpAnnounceSetList'], schema.NetworkingBgpAnnounceSetListParams, null)),
Expand Down
1 change: 1 addition & 0 deletions oxide-openapi-gen-ts/src/__snapshots__/type-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ assert<Equals<A.MaxPathConfig, z.infer<typeof V.MaxPathConfig>>>();
assert<Equals<A.BgpConfig, z.infer<typeof V.BgpConfig>>>();
assert<Equals<A.BgpConfigCreate, z.infer<typeof V.BgpConfigCreate>>>();
assert<Equals<A.BgpConfigResultsPage, z.infer<typeof V.BgpConfigResultsPage>>>();
assert<Equals<A.BgpConfigUpdate, z.infer<typeof V.BgpConfigUpdate>>>();
assert<Equals<A.BgpExported, z.infer<typeof V.BgpExported>>>();
assert<Equals<A.BgpImported, z.infer<typeof V.BgpImported>>>();
assert<Equals<A.RouterLifetimeConfig, z.infer<typeof V.RouterLifetimeConfig>>>();
Expand Down
19 changes: 19 additions & 0 deletions oxide-openapi-gen-ts/src/__snapshots__/validate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,17 @@ export const BgpConfigResultsPage = z.preprocess(processResponseBody,z.object({"
"nextPage": z.string().nullable().optional(),
}))

/**
* Parameters for updating a BGP configuration
*
* If a value is not specified, it will remain unchanged.
*/
export const BgpConfigUpdate = z.preprocess(processResponseBody,z.object({"bgpAnnounceSetId": NameOrId.nullable().optional(),
"description": z.string().nullable().optional(),
"maxPaths": MaxPathConfig.nullable().optional(),
"name": Name.nullable().optional(),
}))

/**
* Route exported to a peer.
*/
Expand Down Expand Up @@ -6286,6 +6297,14 @@ export const NetworkingBgpConfigListParams = z.preprocess(processResponseBody, z
}),
}))

export const NetworkingBgpConfigUpdateParams = z.preprocess(processResponseBody, z.object({
path: z.object({
}),
query: z.object({
nameOrId: NameOrId,
}),
}))

export const NetworkingBgpConfigCreateParams = z.preprocess(processResponseBody, z.object({
path: z.object({
}),
Expand Down
Loading