feat: mostly terraform shenanigans, but TF can now create ssh keys and servers

This commit is contained in:
allanice001
2025-11-02 17:18:28 +00:00
parent 0d10d42442
commit 43f8549320
59 changed files with 6353 additions and 28 deletions

View File

@@ -103,6 +103,302 @@ paths:
summary: Begin social login
tags:
- Auth
/labels:
get:
description: "Returns node labels for the organization in X-Org-ID. Filters:\
\ `key`, `value`, and `q` (key contains). Add `include=node_pools` to include\
\ linked node groups."
operationId: ListLabels
parameters:
- description: Organization UUID
in: header
name: X-Org-ID
schema:
type: string
- description: Exact key
in: query
name: key
schema:
type: string
- description: Exact value
in: query
name: value
schema:
type: string
- description: Key contains (case-insensitive)
in: query
name: q
schema:
type: string
responses:
"200":
content:
application/json:
schema:
items:
$ref: "#/components/schemas/dto.LabelResponse"
type: array
description: OK
"401":
content:
application/json:
schema:
type: string
description: Unauthorized
"403":
content:
application/json:
schema:
type: string
description: organization required
"500":
content:
application/json:
schema:
type: string
description: failed to list node taints
security:
- BearerAuth: []
- OrgKeyAuth: []
- OrgSecretAuth: []
summary: List node labels (org scoped)
tags:
- Labels
post:
description: Creates a label.
operationId: CreateLabel
parameters:
- description: Organization UUID
in: header
name: X-Org-ID
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/dto.CreateLabelRequest"
description: Label payload
required: true
responses:
"201":
content:
application/json:
schema:
$ref: "#/components/schemas/dto.LabelResponse"
description: Created
"400":
content:
application/json:
schema:
type: string
description: invalid json / missing fields / invalid node_pool_ids
"401":
content:
application/json:
schema:
type: string
description: Unauthorized
"403":
content:
application/json:
schema:
type: string
description: organization required
"500":
content:
application/json:
schema:
type: string
description: create failed
security:
- BearerAuth: []
- OrgKeyAuth: []
- OrgSecretAuth: []
summary: Create label (org scoped)
tags:
- Labels
x-codegen-request-body-name: body
/labels/{id}:
delete:
description: Permanently deletes the label.
operationId: DeleteLabel
parameters:
- description: Organization UUID
in: header
name: X-Org-ID
schema:
type: string
- description: Label ID (UUID)
in: path
name: id
required: true
schema:
type: string
responses:
"204":
content:
application/json:
schema:
type: string
description: No Content
"400":
content:
application/json:
schema:
type: string
description: invalid id
"401":
content:
application/json:
schema:
type: string
description: Unauthorized
"403":
content:
application/json:
schema:
type: string
description: organization required
"500":
content:
application/json:
schema:
type: string
description: delete failed
security:
- BearerAuth: []
- OrgKeyAuth: []
- OrgSecretAuth: []
summary: Delete label (org scoped)
tags:
- Labels
get:
description: Returns one label.
operationId: GetLabel
parameters:
- description: Organization UUID
in: header
name: X-Org-ID
schema:
type: string
- description: Label ID (UUID)
in: path
name: id
required: true
schema:
type: string
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/dto.LabelResponse"
description: OK
"400":
content:
application/json:
schema:
type: string
description: invalid id
"401":
content:
application/json:
schema:
type: string
description: Unauthorized
"403":
content:
application/json:
schema:
type: string
description: organization required
"404":
content:
application/json:
schema:
type: string
description: not found
"500":
content:
application/json:
schema:
type: string
description: fetch failed
security:
- BearerAuth: []
- OrgKeyAuth: []
- OrgSecretAuth: []
summary: Get label by ID (org scoped)
tags:
- Labels
patch:
description: Partially update label fields.
operationId: UpdateLabel
parameters:
- description: Organization UUID
in: header
name: X-Org-ID
schema:
type: string
- description: Label ID (UUID)
in: path
name: id
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/dto.UpdateLabelRequest"
description: Fields to update
required: true
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/dto.LabelResponse"
description: OK
"400":
content:
application/json:
schema:
type: string
description: invalid id / invalid json
"401":
content:
application/json:
schema:
type: string
description: Unauthorized
"403":
content:
application/json:
schema:
type: string
description: organization required
"404":
content:
application/json:
schema:
type: string
description: not found
"500":
content:
application/json:
schema:
type: string
description: update failed
security:
- BearerAuth: []
- OrgKeyAuth: []
- OrgSecretAuth: []
summary: Update label (org scoped)
tags:
- Labels
x-codegen-request-body-name: body
/me:
get:
operationId: GetMe
@@ -1452,6 +1748,13 @@ components:
example: https://accounts.google.com/o/oauth2/v2/auth?client_id=...
type: string
type: object
dto.CreateLabelRequest:
properties:
key:
type: string
value:
type: string
type: object
dto.CreateSSHRequest:
properties:
bits:
@@ -1547,6 +1850,19 @@ components:
$ref: "#/components/schemas/dto.JWK"
type: array
type: object
dto.LabelResponse:
example:
id: id
value: value
key: key
properties:
id:
type: string
key:
type: string
value:
type: string
type: object
dto.LogoutRequest:
properties:
refresh_token:
@@ -1685,6 +2001,13 @@ components:
example: Bearer
type: string
type: object
dto.UpdateLabelRequest:
properties:
key:
type: string
value:
type: string
type: object
dto.UpdateServerRequest:
properties:
hostname: