mirror of
https://github.com/GlueOps/autoglue.git
synced 2026-02-13 12:50:05 +01:00
20 KiB
20 KiB
@glueops/autoglue-sdk-go@0.1.0
A TypeScript SDK client for the localhost API.
Usage
First, install the SDK from npm.
npm install @glueops/autoglue-sdk-go --save
Next, try it out.
import {
Configuration,
AnnotationsApi,
} from '@glueops/autoglue-sdk-go';
import type { CreateAnnotationRequest } from '@glueops/autoglue-sdk-go';
async function example() {
console.log("🚀 Testing @glueops/autoglue-sdk-go SDK...");
const config = new Configuration({
// To configure API key authorization: OrgKeyAuth
apiKey: "YOUR API KEY",
// To configure API key authorization: OrgSecretAuth
apiKey: "YOUR API KEY",
// To configure API key authorization: BearerAuth
apiKey: "YOUR API KEY",
});
const api = new AnnotationsApi(config);
const body = {
// DtoCreateAnnotationRequest | Annotation payload
body: ...,
// string | Organization UUID (optional)
xOrgID: xOrgID_example,
} satisfies CreateAnnotationRequest;
try {
const data = await api.createAnnotation(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
Documentation
API Endpoints
All URIs are relative to /api/v1
| Class | Method | HTTP request | Description |
|---|---|---|---|
| AnnotationsApi | createAnnotation | POST /annotations | Create annotation (org scoped) |
| AnnotationsApi | deleteAnnotation | DELETE /annotations/{id} | Delete annotation (org scoped) |
| AnnotationsApi | getAnnotation | GET /annotations/{id} | Get annotation by ID (org scoped) |
| AnnotationsApi | listAnnotations | GET /annotations | List annotations (org scoped) |
| AnnotationsApi | updateAnnotation | PATCH /annotations/{id} | Update annotation (org scoped) |
| ArcherAdminApi | adminCancelArcherJob | POST /admin/archer/jobs/{id}/cancel | Cancel an Archer job (admin) |
| ArcherAdminApi | adminEnqueueArcherJob | POST /admin/archer/jobs | Enqueue a new Archer job (admin) |
| ArcherAdminApi | adminListArcherJobs | GET /admin/archer/jobs | List Archer jobs (admin) |
| ArcherAdminApi | adminListArcherQueues | GET /admin/archer/queues | List Archer queues (admin) |
| ArcherAdminApi | adminRetryArcherJob | POST /admin/archer/jobs/{id}/retry | Retry a failed/canceled Archer job (admin) |
| AuthApi | authCallback | GET /auth/{provider}/callback | Handle social login callback |
| AuthApi | authStart | POST /auth/{provider}/start | Begin social login |
| AuthApi | getJWKS | GET /.well-known/jwks.json | Get JWKS |
| AuthApi | logout | POST /auth/logout | Revoke refresh token family (logout everywhere) |
| AuthApi | refresh | POST /auth/refresh | Rotate refresh token |
| HealthApi | healthCheckOperationId | GET /healthz | Basic health check |
| LabelsApi | createLabel | POST /labels | Create label (org scoped) |
| LabelsApi | deleteLabel | DELETE /labels/{id} | Delete label (org scoped) |
| LabelsApi | getLabel | GET /labels/{id} | Get label by ID (org scoped) |
| LabelsApi | listLabels | GET /labels | List node labels (org scoped) |
| LabelsApi | updateLabel | PATCH /labels/{id} | Update label (org scoped) |
| MeApi | getMe | GET /me | Get current user profile |
| MeApi | updateMe | PATCH /me | Update current user profile |
| MeAPIKeysApi | createUserAPIKey | POST /me/api-keys | Create a new user API key |
| MeAPIKeysApi | deleteUserAPIKey | DELETE /me/api-keys/{id} | Delete a user API key |
| MeAPIKeysApi | listUserAPIKeys | GET /me/api-keys | List my API keys |
| NodePoolsApi | attachNodePoolAnnotations | POST /node-pools/{id}/annotations | Attach annotation to a node pool (org scoped) |
| NodePoolsApi | attachNodePoolLabels | POST /node-pools/{id}/labels | Attach labels to a node pool (org scoped) |
| NodePoolsApi | attachNodePoolServers | POST /node-pools/{id}/servers | Attach servers to a node pool (org scoped) |
| NodePoolsApi | attachNodePoolTaints | POST /node-pools/{id}/taints | Attach taints to a node pool (org scoped) |
| NodePoolsApi | createNodePool | POST /node-pools | Create node pool (org scoped) |
| NodePoolsApi | deleteNodePool | DELETE /node-pools/{id} | Delete node pool (org scoped) |
| NodePoolsApi | detachNodePoolAnnotation | DELETE /node-pools/{id}/annotations/{annotationId} | Detach one annotation from a node pool (org scoped) |
| NodePoolsApi | detachNodePoolLabel | DELETE /node-pools/{id}/labels/{labelId} | Detach one label from a node pool (org scoped) |
| NodePoolsApi | detachNodePoolServer | DELETE /node-pools/{id}/servers/{serverId} | Detach one server from a node pool (org scoped) |
| NodePoolsApi | detachNodePoolTaint | DELETE /node-pools/{id}/taints/{taintId} | Detach one taint from a node pool (org scoped) |
| NodePoolsApi | getNodePool | GET /node-pools/{id} | Get node pool by ID (org scoped) |
| NodePoolsApi | listNodePoolAnnotations | GET /node-pools/{id}/annotations | List annotations attached to a node pool (org scoped) |
| NodePoolsApi | listNodePoolLabels | GET /node-pools/{id}/labels | List labels attached to a node pool (org scoped) |
| NodePoolsApi | listNodePoolServers | GET /node-pools/{id}/servers | List servers attached to a node pool (org scoped) |
| NodePoolsApi | listNodePoolTaints | GET /node-pools/{id}/taints | List taints attached to a node pool (org scoped) |
| NodePoolsApi | listNodePools | GET /node-pools | List node pools (org scoped) |
| NodePoolsApi | updateNodePool | PATCH /node-pools/{id} | Update node pool (org scoped) |
| OrgsApi | addOrUpdateMember | POST /orgs/{id}/members | Add or update a member (owner/admin) |
| OrgsApi | createOrg | POST /orgs | Create organization |
| OrgsApi | createOrgKey | POST /orgs/{id}/api-keys | Create org key/secret pair (owner/admin) |
| OrgsApi | deleteOrg | DELETE /orgs/{id} | Delete organization (owner) |
| OrgsApi | deleteOrgKey | DELETE /orgs/{id}/api-keys/{key_id} | Delete org key (owner/admin) |
| OrgsApi | getOrg | GET /orgs/{id} | Get organization |
| OrgsApi | listMembers | GET /orgs/{id}/members | List members in org |
| OrgsApi | listMyOrgs | GET /orgs | List organizations I belong to |
| OrgsApi | listOrgKeys | GET /orgs/{id}/api-keys | List org-scoped API keys (no secrets) |
| OrgsApi | removeMember | DELETE /orgs/{id}/members/{user_id} | Remove a member (owner/admin) |
| OrgsApi | updateOrg | PATCH /orgs/{id} | Update organization (owner/admin) |
| ServersApi | createServer | POST /servers | Create server (org scoped) |
| ServersApi | deleteServer | DELETE /servers/{id} | Delete server (org scoped) |
| ServersApi | getServer | GET /servers/{id} | Get server by ID (org scoped) |
| ServersApi | listServers | GET /servers | List servers (org scoped) |
| ServersApi | updateServer | PATCH /servers/{id} | Update server (org scoped) |
| SshApi | createSSHKey | POST /ssh | Create ssh keypair (org scoped) |
| SshApi | deleteSSHKey | DELETE /ssh/{id} | Delete ssh keypair (org scoped) |
| SshApi | downloadSSHKey | GET /ssh/{id}/download | Download ssh key files by ID (org scoped) |
| SshApi | getSSHKey | GET /ssh/{id} | Get ssh key by ID (org scoped) |
| SshApi | listPublicSshKeys | GET /ssh | List ssh keys (org scoped) |
| TaintsApi | createTaint | POST /taints | Create node taint (org scoped) |
| TaintsApi | deleteTaint | DELETE /taints/{id} | Delete taint (org scoped) |
| TaintsApi | getTaint | GET /taints/{id} | Get node taint by ID (org scoped) |
| TaintsApi | listTaints | GET /taints | List node pool taints (org scoped) |
| TaintsApi | updateTaint | PATCH /taints/{id} | Update node taint (org scoped) |
Models
- DtoAnnotationResponse
- DtoAttachAnnotationsRequest
- DtoAttachLabelsRequest
- DtoAttachServersRequest
- DtoAttachTaintsRequest
- DtoAuthStartResponse
- DtoCreateAnnotationRequest
- DtoCreateLabelRequest
- DtoCreateNodePoolRequest
- DtoCreateSSHRequest
- DtoCreateServerRequest
- DtoCreateTaintRequest
- DtoJWK
- DtoJWKS
- DtoJob
- DtoJobStatus
- DtoLabelResponse
- DtoLogoutRequest
- DtoNodePoolResponse
- DtoPageJob
- DtoQueueInfo
- DtoRefreshRequest
- DtoServerResponse
- DtoSshResponse
- DtoSshRevealResponse
- DtoTaintResponse
- DtoTokenPair
- DtoUpdateAnnotationRequest
- DtoUpdateLabelRequest
- DtoUpdateNodePoolRequest
- DtoUpdateServerRequest
- DtoUpdateTaintRequest
- HandlersCreateUserKeyRequest
- HandlersHealthStatus
- HandlersMeResponse
- HandlersMemberOut
- HandlersMemberUpsertReq
- HandlersOrgCreateReq
- HandlersOrgKeyCreateReq
- HandlersOrgKeyCreateResp
- HandlersOrgUpdateReq
- HandlersUpdateMeRequest
- HandlersUserAPIKeyOut
- ModelsAPIKey
- ModelsOrganization
- ModelsUser
- ModelsUserEmail
- UtilsErrorResponse
Authorization
Authentication schemes defined for the API:
ApiKeyAuth
BearerAuth
OrgKeyAuth
OrgSecretAuth
- Type: API key
- API key parameter name:
X-ORG-SECRET - Location: HTTP header
About
This TypeScript SDK client supports the Fetch API and is automatically generated by the OpenAPI Generator project:
- API version:
1.0 - Package version:
0.1.0 - Generator version:
7.17.0 - Build package:
org.openapitools.codegen.languages.TypeScriptFetchClientCodegen
The generated npm module supports the following:
- Environments
- Node.js
- Webpack
- Browserify
- Language levels
- ES5 - you must have a Promises/A+ library installed
- ES6
- Module systems
- CommonJS
- ES6 module system
Development
Building
To build the TypeScript source code, you need to have Node.js and npm installed. After cloning the repository, navigate to the project directory and run:
npm install
npm run build
Publishing
Once you've built the package, you can publish it to npm:
npm publish