Files
autoglue/sdk/ts

@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 http://localhost:8080/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
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

Authorization

Authentication schemes defined for the API:

ApiKeyAuth

  • Type: API key
  • API key parameter name: X-API-KEY
  • Location: HTTP header

BearerAuth

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

OrgKeyAuth

  • Type: API key
  • API key parameter name: X-ORG-KEY
  • Location: HTTP header

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

License