diff --git a/OMICRON_VERSION b/OMICRON_VERSION index f9d26fc..4f26d5d 100644 --- a/OMICRON_VERSION +++ b/OMICRON_VERSION @@ -1 +1 @@ -863b79d5cd0eed19f2768e0b54800c2425412955 +3e5bafe8ad9d19de5db48fb50bbe2e9437f82e86 diff --git a/oxide-api/README.md b/oxide-api/README.md index 75ffbfd..d6ab15e 100644 --- a/oxide-api/README.md +++ b/oxide-api/README.md @@ -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` | diff --git a/oxide-api/package-lock.json b/oxide-api/package-lock.json index 829d1a3..d61522d 100644 --- a/oxide-api/package-lock.json +++ b/oxide-api/package-lock.json @@ -1,12 +1,12 @@ { "name": "@oxide/api", - "version": "0.7.1", + "version": "0.8.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@oxide/api", - "version": "0.7.1", + "version": "0.8.0", "license": "MPL-2.0", "devDependencies": { "tsdown": "^0.22.3", diff --git a/oxide-api/package.json b/oxide-api/package.json index 2952fee..e1ce7d9 100644 --- a/oxide-api/package.json +++ b/oxide-api/package.json @@ -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" diff --git a/oxide-api/src/Api.ts b/oxide-api/src/Api.ts index 3298520..6703dd0 100644 --- a/oxide-api/src/Api.ts +++ b/oxide-api/src/Api.ts @@ -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. */ @@ -7120,6 +7134,10 @@ export interface NetworkingBgpConfigListQueryParams { sortBy?: NameOrIdSortMode; } +export interface NetworkingBgpConfigUpdateQueryParams { + nameOrId: NameOrId; +} + export interface NetworkingBgpConfigDeleteQueryParams { nameOrId: NameOrId; } @@ -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; @@ -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({ + path: `/v1/system/networking/bgp`, + method: "PUT", + body, + query, + ...params, + }); + }, /** * Create BGP configuration */ diff --git a/oxide-openapi-gen-ts/src/__snapshots__/Api.ts b/oxide-openapi-gen-ts/src/__snapshots__/Api.ts index 74b49e6..479379c 100644 --- a/oxide-openapi-gen-ts/src/__snapshots__/Api.ts +++ b/oxide-openapi-gen-ts/src/__snapshots__/Api.ts @@ -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. */ @@ -7285,6 +7297,10 @@ export interface NetworkingBgpConfigListQueryParams { sortBy?: NameOrIdSortMode, } +export interface NetworkingBgpConfigUpdateQueryParams { + nameOrId: NameOrId, +} + export interface NetworkingBgpConfigDeleteQueryParams { nameOrId: NameOrId, } @@ -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; @@ -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({ + path: `/v1/system/networking/bgp`, + method: "PUT", + body, + query, + ...params, + }) + }, +/** * Create BGP configuration */ networkingBgpConfigCreate: ({ diff --git a/oxide-openapi-gen-ts/src/__snapshots__/msw-handlers.ts b/oxide-openapi-gen-ts/src/__snapshots__/msw-handlers.ts index ad17369..fbcfeda 100644 --- a/oxide-openapi-gen-ts/src/__snapshots__/msw-handlers.ts +++ b/oxide-openapi-gen-ts/src/__snapshots__/msw-handlers.ts @@ -464,6 +464,8 @@ export interface MSWHandlers { networkingBfdStatus: (params: { req: Request, cookies: Record }) => Promisable>, /** `GET /v1/system/networking/bgp` */ networkingBgpConfigList: (params: { query: Api.NetworkingBgpConfigListQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `PUT /v1/system/networking/bgp` */ + networkingBgpConfigUpdate: (params: { query: Api.NetworkingBgpConfigUpdateQueryParams, body: Json, req: Request, cookies: Record }) => Promisable>, /** `POST /v1/system/networking/bgp` */ networkingBgpConfigCreate: (params: { body: Json, req: Request, cookies: Record }) => Promisable>, /** `DELETE /v1/system/networking/bgp` */ @@ -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)), diff --git a/oxide-openapi-gen-ts/src/__snapshots__/type-test.ts b/oxide-openapi-gen-ts/src/__snapshots__/type-test.ts index aa8160a..1e823ab 100644 --- a/oxide-openapi-gen-ts/src/__snapshots__/type-test.ts +++ b/oxide-openapi-gen-ts/src/__snapshots__/type-test.ts @@ -85,6 +85,7 @@ assert>>(); assert>>(); assert>>(); assert>>(); +assert>>(); assert>>(); assert>>(); assert>>(); diff --git a/oxide-openapi-gen-ts/src/__snapshots__/validate.ts b/oxide-openapi-gen-ts/src/__snapshots__/validate.ts index 9ae2715..8f605d4 100644 --- a/oxide-openapi-gen-ts/src/__snapshots__/validate.ts +++ b/oxide-openapi-gen-ts/src/__snapshots__/validate.ts @@ -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. */ @@ -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({ }),