feat: sdk migration in progress

This commit is contained in:
allanice001
2025-11-02 13:19:30 +00:00
commit 0d10d42442
492 changed files with 71067 additions and 0 deletions

4
sdk/ts/.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
wwwroot/*.js
node_modules
typings
dist

1
sdk/ts/.npmignore Normal file
View File

@@ -0,0 +1 @@
README.md

View File

@@ -0,0 +1,23 @@
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.
# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md

View File

@@ -0,0 +1,85 @@
.gitignore
.npmignore
.openapi-generator-ignore
README.md
docs/AuthApi.md
docs/DtoAuthStartResponse.md
docs/DtoCreateSSHRequest.md
docs/DtoCreateServerRequest.md
docs/DtoCreateTaintRequest.md
docs/DtoJWK.md
docs/DtoJWKS.md
docs/DtoLogoutRequest.md
docs/DtoRefreshRequest.md
docs/DtoServerResponse.md
docs/DtoSshResponse.md
docs/DtoSshRevealResponse.md
docs/DtoTaintResponse.md
docs/DtoTokenPair.md
docs/DtoUpdateServerRequest.md
docs/DtoUpdateTaintRequest.md
docs/HandlersCreateUserKeyRequest.md
docs/HandlersMeResponse.md
docs/HandlersMemberOut.md
docs/HandlersMemberUpsertReq.md
docs/HandlersOrgCreateReq.md
docs/HandlersOrgKeyCreateReq.md
docs/HandlersOrgKeyCreateResp.md
docs/HandlersOrgUpdateReq.md
docs/HandlersUpdateMeRequest.md
docs/HandlersUserAPIKeyOut.md
docs/MeAPIKeysApi.md
docs/MeApi.md
docs/ModelsAPIKey.md
docs/ModelsOrganization.md
docs/ModelsUser.md
docs/ModelsUserEmail.md
docs/OrgsApi.md
docs/ServersApi.md
docs/SshApi.md
docs/TaintsApi.md
docs/UtilsErrorResponse.md
package.json
src/apis/AuthApi.ts
src/apis/MeAPIKeysApi.ts
src/apis/MeApi.ts
src/apis/OrgsApi.ts
src/apis/ServersApi.ts
src/apis/SshApi.ts
src/apis/TaintsApi.ts
src/apis/index.ts
src/index.ts
src/models/DtoAuthStartResponse.ts
src/models/DtoCreateSSHRequest.ts
src/models/DtoCreateServerRequest.ts
src/models/DtoCreateTaintRequest.ts
src/models/DtoJWK.ts
src/models/DtoJWKS.ts
src/models/DtoLogoutRequest.ts
src/models/DtoRefreshRequest.ts
src/models/DtoServerResponse.ts
src/models/DtoSshResponse.ts
src/models/DtoSshRevealResponse.ts
src/models/DtoTaintResponse.ts
src/models/DtoTokenPair.ts
src/models/DtoUpdateServerRequest.ts
src/models/DtoUpdateTaintRequest.ts
src/models/HandlersCreateUserKeyRequest.ts
src/models/HandlersMeResponse.ts
src/models/HandlersMemberOut.ts
src/models/HandlersMemberUpsertReq.ts
src/models/HandlersOrgCreateReq.ts
src/models/HandlersOrgKeyCreateReq.ts
src/models/HandlersOrgKeyCreateResp.ts
src/models/HandlersOrgUpdateReq.ts
src/models/HandlersUpdateMeRequest.ts
src/models/HandlersUserAPIKeyOut.ts
src/models/ModelsAPIKey.ts
src/models/ModelsOrganization.ts
src/models/ModelsUser.ts
src/models/ModelsUserEmail.ts
src/models/UtilsErrorResponse.ts
src/models/index.ts
src/runtime.ts
tsconfig.esm.json
tsconfig.json

View File

@@ -0,0 +1 @@
7.17.0

196
sdk/ts/README.md Normal file
View File

@@ -0,0 +1,196 @@
# @glueops/autoglue-sdk@0.1.0
A TypeScript SDK client for the localhost API.
## Usage
First, install the SDK from npm.
```bash
npm install @glueops/autoglue-sdk --save
```
Next, try it out.
```ts
import { Configuration, AuthApi } from "@glueops/autoglue-sdk";
import type { AuthCallbackRequest } from "@glueops/autoglue-sdk";
async function example() {
console.log("🚀 Testing @glueops/autoglue-sdk SDK...");
const api = new AuthApi();
const body = {
// string | google|github
provider: provider_example,
} satisfies AuthCallbackRequest;
try {
const data = await api.authCallback(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 |
| -------------- | ------------------------------------------------------------- | --------------------------------------- | ----------------------------------------------- |
| _AuthApi_ | [**authCallback**](docs/AuthApi.md#authcallback) | **GET** /auth/{provider}/callback | Handle social login callback |
| _AuthApi_ | [**authStart**](docs/AuthApi.md#authstart) | **POST** /auth/{provider}/start | Begin social login |
| _AuthApi_ | [**getJWKS**](docs/AuthApi.md#getjwks) | **GET** /.well-known/jwks.json | Get JWKS |
| _AuthApi_ | [**logout**](docs/AuthApi.md#logout) | **POST** /auth/logout | Revoke refresh token family (logout everywhere) |
| _AuthApi_ | [**refresh**](docs/AuthApi.md#refresh) | **POST** /auth/refresh | Rotate refresh token |
| _MeApi_ | [**getMe**](docs/MeApi.md#getme) | **GET** /me | Get current user profile |
| _MeApi_ | [**updateMe**](docs/MeApi.md#updateme) | **PATCH** /me | Update current user profile |
| _MeAPIKeysApi_ | [**createUserAPIKey**](docs/MeAPIKeysApi.md#createuserapikey) | **POST** /me/api-keys | Create a new user API key |
| _MeAPIKeysApi_ | [**deleteUserAPIKey**](docs/MeAPIKeysApi.md#deleteuserapikey) | **DELETE** /me/api-keys/{id} | Delete a user API key |
| _MeAPIKeysApi_ | [**listUserAPIKeys**](docs/MeAPIKeysApi.md#listuserapikeys) | **GET** /me/api-keys | List my API keys |
| _OrgsApi_ | [**addOrUpdateMember**](docs/OrgsApi.md#addorupdatemember) | **POST** /orgs/{id}/members | Add or update a member (owner/admin) |
| _OrgsApi_ | [**createOrg**](docs/OrgsApi.md#createorg) | **POST** /orgs | Create organization |
| _OrgsApi_ | [**createOrgKey**](docs/OrgsApi.md#createorgkey) | **POST** /orgs/{id}/api-keys | Create org key/secret pair (owner/admin) |
| _OrgsApi_ | [**deleteOrg**](docs/OrgsApi.md#deleteorg) | **DELETE** /orgs/{id} | Delete organization (owner) |
| _OrgsApi_ | [**deleteOrgKey**](docs/OrgsApi.md#deleteorgkey) | **DELETE** /orgs/{id}/api-keys/{key_id} | Delete org key (owner/admin) |
| _OrgsApi_ | [**getOrg**](docs/OrgsApi.md#getorg) | **GET** /orgs/{id} | Get organization |
| _OrgsApi_ | [**listMembers**](docs/OrgsApi.md#listmembers) | **GET** /orgs/{id}/members | List members in org |
| _OrgsApi_ | [**listMyOrgs**](docs/OrgsApi.md#listmyorgs) | **GET** /orgs | List organizations I belong to |
| _OrgsApi_ | [**listOrgKeys**](docs/OrgsApi.md#listorgkeys) | **GET** /orgs/{id}/api-keys | List org-scoped API keys (no secrets) |
| _OrgsApi_ | [**removeMember**](docs/OrgsApi.md#removemember) | **DELETE** /orgs/{id}/members/{user_id} | Remove a member (owner/admin) |
| _OrgsApi_ | [**updateOrg**](docs/OrgsApi.md#updateorg) | **PATCH** /orgs/{id} | Update organization (owner/admin) |
| _ServersApi_ | [**createServer**](docs/ServersApi.md#createserver) | **POST** /servers | Create server (org scoped) |
| _ServersApi_ | [**deleteServer**](docs/ServersApi.md#deleteserver) | **DELETE** /servers/{id} | Delete server (org scoped) |
| _ServersApi_ | [**getServer**](docs/ServersApi.md#getserver) | **GET** /servers/{id} | Get server by ID (org scoped) |
| _ServersApi_ | [**listServers**](docs/ServersApi.md#listservers) | **GET** /servers | List servers (org scoped) |
| _ServersApi_ | [**updateServer**](docs/ServersApi.md#updateserver) | **PATCH** /servers/{id} | Update server (org scoped) |
| _SshApi_ | [**createSSHKey**](docs/SshApi.md#createsshkey) | **POST** /ssh | Create ssh keypair (org scoped) |
| _SshApi_ | [**deleteSSHKey**](docs/SshApi.md#deletesshkey) | **DELETE** /ssh/{id} | Delete ssh keypair (org scoped) |
| _SshApi_ | [**downloadSSHKey**](docs/SshApi.md#downloadsshkey) | **GET** /ssh/{id}/download | Download ssh key files by ID (org scoped) |
| _SshApi_ | [**getSSHKey**](docs/SshApi.md#getsshkey) | **GET** /ssh/{id} | Get ssh key by ID (org scoped) |
| _SshApi_ | [**listPublicSshKeys**](docs/SshApi.md#listpublicsshkeys) | **GET** /ssh | List ssh keys (org scoped) |
| _TaintsApi_ | [**createTaint**](docs/TaintsApi.md#createtaint) | **POST** /taints | Create node taint (org scoped) |
| _TaintsApi_ | [**deleteTaint**](docs/TaintsApi.md#deletetaint) | **DELETE** /taints/{id} | Delete taint (org scoped) |
| _TaintsApi_ | [**getTaint**](docs/TaintsApi.md#gettaint) | **GET** /taints/{id} | Get node taint by ID (org scoped) |
| _TaintsApi_ | [**listTaints**](docs/TaintsApi.md#listtaints) | **GET** /taints | List node pool taints (org scoped) |
| _TaintsApi_ | [**updateTaint**](docs/TaintsApi.md#updatetaint) | **PATCH** /taints/{id} | Update node taint (org scoped) |
### Models
- [DtoAuthStartResponse](docs/DtoAuthStartResponse.md)
- [DtoCreateSSHRequest](docs/DtoCreateSSHRequest.md)
- [DtoCreateServerRequest](docs/DtoCreateServerRequest.md)
- [DtoCreateTaintRequest](docs/DtoCreateTaintRequest.md)
- [DtoJWK](docs/DtoJWK.md)
- [DtoJWKS](docs/DtoJWKS.md)
- [DtoLogoutRequest](docs/DtoLogoutRequest.md)
- [DtoRefreshRequest](docs/DtoRefreshRequest.md)
- [DtoServerResponse](docs/DtoServerResponse.md)
- [DtoSshResponse](docs/DtoSshResponse.md)
- [DtoSshRevealResponse](docs/DtoSshRevealResponse.md)
- [DtoTaintResponse](docs/DtoTaintResponse.md)
- [DtoTokenPair](docs/DtoTokenPair.md)
- [DtoUpdateServerRequest](docs/DtoUpdateServerRequest.md)
- [DtoUpdateTaintRequest](docs/DtoUpdateTaintRequest.md)
- [HandlersCreateUserKeyRequest](docs/HandlersCreateUserKeyRequest.md)
- [HandlersMeResponse](docs/HandlersMeResponse.md)
- [HandlersMemberOut](docs/HandlersMemberOut.md)
- [HandlersMemberUpsertReq](docs/HandlersMemberUpsertReq.md)
- [HandlersOrgCreateReq](docs/HandlersOrgCreateReq.md)
- [HandlersOrgKeyCreateReq](docs/HandlersOrgKeyCreateReq.md)
- [HandlersOrgKeyCreateResp](docs/HandlersOrgKeyCreateResp.md)
- [HandlersOrgUpdateReq](docs/HandlersOrgUpdateReq.md)
- [HandlersUpdateMeRequest](docs/HandlersUpdateMeRequest.md)
- [HandlersUserAPIKeyOut](docs/HandlersUserAPIKeyOut.md)
- [ModelsAPIKey](docs/ModelsAPIKey.md)
- [ModelsOrganization](docs/ModelsOrganization.md)
- [ModelsUser](docs/ModelsUser.md)
- [ModelsUserEmail](docs/ModelsUserEmail.md)
- [UtilsErrorResponse](docs/UtilsErrorResponse.md)
### Authorization
Authentication schemes defined for the API:
<a id="ApiKeyAuth"></a>
#### ApiKeyAuth
- **Type**: API key
- **API key parameter name**: `X-API-KEY`
- **Location**: HTTP header
<a id="BearerAuth"></a>
#### BearerAuth
- **Type**: API key
- **API key parameter name**: `Authorization`
- **Location**: HTTP header
<a id="OrgKeyAuth"></a>
#### OrgKeyAuth
- **Type**: API key
- **API key parameter name**: `X-ORG-KEY`
- **Location**: HTTP header
<a id="OrgSecretAuth"></a>
#### OrgSecretAuth
- **Type**: API key
- **API key parameter name**: `X-ORG-SECRET`
- **Location**: HTTP header
## About
This TypeScript SDK client supports the [Fetch API](https://fetch.spec.whatwg.org/)
and is automatically generated by the
[OpenAPI Generator](https://openapi-generator.tech) 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:
```bash
npm install
npm run build
```
### Publishing
Once you've built the package, you can publish it to npm:
```bash
npm publish
```
## License
[]()

314
sdk/ts/docs/AuthApi.md Normal file
View File

@@ -0,0 +1,314 @@
# AuthApi
All URIs are relative to _http://localhost:8080/api/v1_
| Method | HTTP request | Description |
| ------------------------------------------- | --------------------------------- | ----------------------------------------------- |
| [**authCallback**](AuthApi.md#authcallback) | **GET** /auth/{provider}/callback | Handle social login callback |
| [**authStart**](AuthApi.md#authstart) | **POST** /auth/{provider}/start | Begin social login |
| [**getJWKS**](AuthApi.md#getjwks) | **GET** /.well-known/jwks.json | Get JWKS |
| [**logout**](AuthApi.md#logout) | **POST** /auth/logout | Revoke refresh token family (logout everywhere) |
| [**refresh**](AuthApi.md#refresh) | **POST** /auth/refresh | Rotate refresh token |
## authCallback
> DtoTokenPair authCallback(provider)
Handle social login callback
### Example
```ts
import { Configuration, AuthApi } from "@glueops/autoglue-sdk";
import type { AuthCallbackRequest } from "@glueops/autoglue-sdk";
async function example() {
console.log("🚀 Testing @glueops/autoglue-sdk SDK...");
const api = new AuthApi();
const body = {
// string | google|github
provider: provider_example,
} satisfies AuthCallbackRequest;
try {
const data = await api.authCallback(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
| Name | Type | Description | Notes |
| ------------ | -------- | ----------- | ------ | ------------------------- |
| **provider** | `string` | google | github | [Defaults to `undefined`] |
### Return type
[**DtoTokenPair**](DtoTokenPair.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `application/json`
### HTTP response details
| Status code | Description | Response headers |
| ----------- | ----------- | ---------------- |
| **200** | OK | - |
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
## authStart
> DtoAuthStartResponse authStart(provider)
Begin social login
Returns provider authorization URL for the frontend to redirect
### Example
```ts
import { Configuration, AuthApi } from "@glueops/autoglue-sdk";
import type { AuthStartRequest } from "@glueops/autoglue-sdk";
async function example() {
console.log("🚀 Testing @glueops/autoglue-sdk SDK...");
const api = new AuthApi();
const body = {
// string | google|github
provider: provider_example,
} satisfies AuthStartRequest;
try {
const data = await api.authStart(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
| Name | Type | Description | Notes |
| ------------ | -------- | ----------- | ------ | ------------------------- |
| **provider** | `string` | google | github | [Defaults to `undefined`] |
### Return type
[**DtoAuthStartResponse**](DtoAuthStartResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `application/json`
### HTTP response details
| Status code | Description | Response headers |
| ----------- | ----------- | ---------------- |
| **200** | OK | - |
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
## getJWKS
> DtoJWKS getJWKS()
Get JWKS
Returns the JSON Web Key Set for token verification
### Example
```ts
import { Configuration, AuthApi } from "@glueops/autoglue-sdk";
import type { GetJWKSRequest } from "@glueops/autoglue-sdk";
async function example() {
console.log("🚀 Testing @glueops/autoglue-sdk SDK...");
const api = new AuthApi();
try {
const data = await api.getJWKS();
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**DtoJWKS**](DtoJWKS.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `application/json`
### HTTP response details
| Status code | Description | Response headers |
| ----------- | ----------- | ---------------- |
| **200** | OK | - |
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
## logout
> logout(body)
Revoke refresh token family (logout everywhere)
### Example
```ts
import {
Configuration,
AuthApi,
} from '@glueops/autoglue-sdk';
import type { LogoutRequest } from '@glueops/autoglue-sdk';
async function example() {
console.log("🚀 Testing @glueops/autoglue-sdk SDK...");
const api = new AuthApi();
const body = {
// DtoLogoutRequest | Refresh token
body: ...,
} satisfies LogoutRequest;
try {
const data = await api.logout(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
| Name | Type | Description | Notes |
| -------- | --------------------------------------- | ------------- | ----- |
| **body** | [DtoLogoutRequest](DtoLogoutRequest.md) | Refresh token | |
### Return type
`void` (Empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: `application/json`
- **Accept**: Not defined
### HTTP response details
| Status code | Description | Response headers |
| ----------- | ----------- | ---------------- |
| **204** | No Content | - |
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
## refresh
> DtoTokenPair refresh(body)
Rotate refresh token
### Example
```ts
import {
Configuration,
AuthApi,
} from '@glueops/autoglue-sdk';
import type { RefreshRequest } from '@glueops/autoglue-sdk';
async function example() {
console.log("🚀 Testing @glueops/autoglue-sdk SDK...");
const api = new AuthApi();
const body = {
// DtoRefreshRequest | Refresh token
body: ...,
} satisfies RefreshRequest;
try {
const data = await api.refresh(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
| Name | Type | Description | Notes |
| -------- | ----------------------------------------- | ------------- | ----- |
| **body** | [DtoRefreshRequest](DtoRefreshRequest.md) | Refresh token | |
### Return type
[**DtoTokenPair**](DtoTokenPair.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: `application/json`
- **Accept**: `application/json`
### HTTP response details
| Status code | Description | Response headers |
| ----------- | ----------- | ---------------- |
| **200** | OK | - |
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,30 @@
# DtoAuthStartResponse
## Properties
| Name | Type |
| ---------- | ------ |
| `auth_url` | string |
## Example
```typescript
import type { DtoAuthStartResponse } from '@glueops/autoglue-sdk'
// TODO: Update the object below with actual values
const example = {
"auth_url": https://accounts.google.com/o/oauth2/v2/auth?client_id=...,
} satisfies DtoAuthStartResponse
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as DtoAuthStartResponse
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,36 @@
# DtoCreateSSHRequest
## Properties
| Name | Type |
| --------- | ------ |
| `bits` | number |
| `comment` | string |
| `name` | string |
| `type` | string |
## Example
```typescript
import type { DtoCreateSSHRequest } from '@glueops/autoglue-sdk'
// TODO: Update the object below with actual values
const example = {
"bits": null,
"comment": deploy@autoglue,
"name": null,
"type": null,
} satisfies DtoCreateSSHRequest
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as DtoCreateSSHRequest
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,42 @@
# DtoCreateServerRequest
## Properties
| Name | Type |
| -------------------- | ------ |
| `hostname` | string |
| `private_ip_address` | string |
| `public_ip_address` | string |
| `role` | string |
| `ssh_key_id` | string |
| `ssh_user` | string |
| `status` | string |
## Example
```typescript
import type { DtoCreateServerRequest } from "@glueops/autoglue-sdk";
// TODO: Update the object below with actual values
const example = {
hostname: null,
private_ip_address: null,
public_ip_address: null,
role: master | worker | bastion,
ssh_key_id: null,
ssh_user: null,
status: pending | provisioning | ready | failed,
} satisfies DtoCreateServerRequest;
console.log(example);
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example);
console.log(exampleJSON);
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as DtoCreateServerRequest;
console.log(exampleParsed);
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,34 @@
# DtoCreateTaintRequest
## Properties
| Name | Type |
| -------- | ------ |
| `effect` | string |
| `key` | string |
| `value` | string |
## Example
```typescript
import type { DtoCreateTaintRequest } from "@glueops/autoglue-sdk";
// TODO: Update the object below with actual values
const example = {
effect: null,
key: null,
value: null,
} satisfies DtoCreateTaintRequest;
console.log(example);
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example);
console.log(exampleJSON);
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as DtoCreateTaintRequest;
console.log(exampleParsed);
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

42
sdk/ts/docs/DtoJWK.md Normal file
View File

@@ -0,0 +1,42 @@
# DtoJWK
## Properties
| Name | Type |
| ----- | ------ |
| `alg` | string |
| `e` | string |
| `kid` | string |
| `kty` | string |
| `n` | string |
| `use` | string |
| `x` | string |
## Example
```typescript
import type { DtoJWK } from '@glueops/autoglue-sdk'
// TODO: Update the object below with actual values
const example = {
"alg": RS256,
"e": AQAB,
"kid": 7c6f1d0a-7a98-4e6a-9dbf-6b1af4b9f345,
"kty": RSA,
"n": null,
"use": sig,
"x": null,
} satisfies DtoJWK
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as DtoJWK
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

30
sdk/ts/docs/DtoJWKS.md Normal file
View File

@@ -0,0 +1,30 @@
# DtoJWKS
## Properties
| Name | Type |
| ------ | -------------------------------- |
| `keys` | [Array&lt;DtoJWK&gt;](DtoJWK.md) |
## Example
```typescript
import type { DtoJWKS } from "@glueops/autoglue-sdk";
// TODO: Update the object below with actual values
const example = {
keys: null,
} satisfies DtoJWKS;
console.log(example);
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example);
console.log(exampleJSON);
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as DtoJWKS;
console.log(exampleParsed);
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,30 @@
# DtoLogoutRequest
## Properties
| Name | Type |
| --------------- | ------ |
| `refresh_token` | string |
## Example
```typescript
import type { DtoLogoutRequest } from '@glueops/autoglue-sdk'
// TODO: Update the object below with actual values
const example = {
"refresh_token": m0l9o8rT3t0V8d3eFf...,
} satisfies DtoLogoutRequest
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as DtoLogoutRequest
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,30 @@
# DtoRefreshRequest
## Properties
| Name | Type |
| --------------- | ------ |
| `refresh_token` | string |
## Example
```typescript
import type { DtoRefreshRequest } from '@glueops/autoglue-sdk'
// TODO: Update the object below with actual values
const example = {
"refresh_token": m0l9o8rT3t0V8d3eFf...,
} satisfies DtoRefreshRequest
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as DtoRefreshRequest
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,50 @@
# DtoServerResponse
## Properties
| Name | Type |
| -------------------- | ------ |
| `created_at` | string |
| `hostname` | string |
| `id` | string |
| `organization_id` | string |
| `private_ip_address` | string |
| `public_ip_address` | string |
| `role` | string |
| `ssh_key_id` | string |
| `ssh_user` | string |
| `status` | string |
| `updated_at` | string |
## Example
```typescript
import type { DtoServerResponse } from "@glueops/autoglue-sdk";
// TODO: Update the object below with actual values
const example = {
created_at: null,
hostname: null,
id: null,
organization_id: null,
private_ip_address: null,
public_ip_address: null,
role: null,
ssh_key_id: null,
ssh_user: null,
status: null,
updated_at: null,
} satisfies DtoServerResponse;
console.log(example);
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example);
console.log(exampleJSON);
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as DtoServerResponse;
console.log(exampleParsed);
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,42 @@
# DtoSshResponse
## Properties
| Name | Type |
| ----------------- | ------ |
| `created_at` | string |
| `fingerprint` | string |
| `id` | string |
| `name` | string |
| `organization_id` | string |
| `public_key` | string |
| `updated_at` | string |
## Example
```typescript
import type { DtoSshResponse } from "@glueops/autoglue-sdk";
// TODO: Update the object below with actual values
const example = {
created_at: null,
fingerprint: null,
id: null,
name: null,
organization_id: null,
public_key: null,
updated_at: null,
} satisfies DtoSshResponse;
console.log(example);
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example);
console.log(exampleJSON);
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as DtoSshResponse;
console.log(exampleParsed);
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,44 @@
# DtoSshRevealResponse
## Properties
| Name | Type |
| ----------------- | ------ |
| `created_at` | string |
| `fingerprint` | string |
| `id` | string |
| `name` | string |
| `organization_id` | string |
| `private_key` | string |
| `public_key` | string |
| `updated_at` | string |
## Example
```typescript
import type { DtoSshRevealResponse } from "@glueops/autoglue-sdk";
// TODO: Update the object below with actual values
const example = {
created_at: null,
fingerprint: null,
id: null,
name: null,
organization_id: null,
private_key: null,
public_key: null,
updated_at: null,
} satisfies DtoSshRevealResponse;
console.log(example);
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example);
console.log(exampleJSON);
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as DtoSshRevealResponse;
console.log(exampleParsed);
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,36 @@
# DtoTaintResponse
## Properties
| Name | Type |
| -------- | ------ |
| `effect` | string |
| `id` | string |
| `key` | string |
| `value` | string |
## Example
```typescript
import type { DtoTaintResponse } from "@glueops/autoglue-sdk";
// TODO: Update the object below with actual values
const example = {
effect: null,
id: null,
key: null,
value: null,
} satisfies DtoTaintResponse;
console.log(example);
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example);
console.log(exampleJSON);
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as DtoTaintResponse;
console.log(exampleParsed);
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,36 @@
# DtoTokenPair
## Properties
| Name | Type |
| --------------- | ------ |
| `access_token` | string |
| `expires_in` | number |
| `refresh_token` | string |
| `token_type` | string |
## Example
```typescript
import type { DtoTokenPair } from '@glueops/autoglue-sdk'
// TODO: Update the object below with actual values
const example = {
"access_token": eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Ij...,
"expires_in": 3600,
"refresh_token": m0l9o8rT3t0V8d3eFf....,
"token_type": Bearer,
} satisfies DtoTokenPair
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as DtoTokenPair
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,42 @@
# DtoUpdateServerRequest
## Properties
| Name | Type |
| -------------------- | ------ |
| `hostname` | string |
| `private_ip_address` | string |
| `public_ip_address` | string |
| `role` | string |
| `ssh_key_id` | string |
| `ssh_user` | string |
| `status` | string |
## Example
```typescript
import type { DtoUpdateServerRequest } from "@glueops/autoglue-sdk";
// TODO: Update the object below with actual values
const example = {
hostname: null,
private_ip_address: null,
public_ip_address: null,
role: master | worker | bastion,
ssh_key_id: null,
ssh_user: null,
status: pending | provisioning | ready | failed,
} satisfies DtoUpdateServerRequest;
console.log(example);
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example);
console.log(exampleJSON);
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as DtoUpdateServerRequest;
console.log(exampleParsed);
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,34 @@
# DtoUpdateTaintRequest
## Properties
| Name | Type |
| -------- | ------ |
| `effect` | string |
| `key` | string |
| `value` | string |
## Example
```typescript
import type { DtoUpdateTaintRequest } from "@glueops/autoglue-sdk";
// TODO: Update the object below with actual values
const example = {
effect: null,
key: null,
value: null,
} satisfies DtoUpdateTaintRequest;
console.log(example);
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example);
console.log(exampleJSON);
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as DtoUpdateTaintRequest;
console.log(exampleParsed);
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,32 @@
# HandlersCreateUserKeyRequest
## Properties
| Name | Type |
| ------------------ | ------ |
| `expires_in_hours` | number |
| `name` | string |
## Example
```typescript
import type { HandlersCreateUserKeyRequest } from "@glueops/autoglue-sdk";
// TODO: Update the object below with actual values
const example = {
expires_in_hours: null,
name: null,
} satisfies HandlersCreateUserKeyRequest;
console.log(example);
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example);
console.log(exampleJSON);
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as HandlersCreateUserKeyRequest;
console.log(exampleParsed);
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,46 @@
# HandlersMeResponse
## Properties
| Name | Type |
| --------------- | -------------------------------------------------------- |
| `avatar_url` | string |
| `created_at` | Date |
| `display_name` | string |
| `emails` | [Array&lt;ModelsUserEmail&gt;](ModelsUserEmail.md) |
| `id` | string |
| `is_disabled` | boolean |
| `organizations` | [Array&lt;ModelsOrganization&gt;](ModelsOrganization.md) |
| `primary_email` | string |
| `updated_at` | Date |
## Example
```typescript
import type { HandlersMeResponse } from "@glueops/autoglue-sdk";
// TODO: Update the object below with actual values
const example = {
avatar_url: null,
created_at: null,
display_name: null,
emails: null,
id: null,
is_disabled: null,
organizations: null,
primary_email: null,
updated_at: null,
} satisfies HandlersMeResponse;
console.log(example);
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example);
console.log(exampleJSON);
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as HandlersMeResponse;
console.log(exampleParsed);
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,34 @@
# HandlersMemberOut
## Properties
| Name | Type |
| --------- | ------ |
| `email` | string |
| `role` | string |
| `user_id` | string |
## Example
```typescript
import type { HandlersMemberOut } from "@glueops/autoglue-sdk";
// TODO: Update the object below with actual values
const example = {
email: null,
role: null,
user_id: null,
} satisfies HandlersMemberOut;
console.log(example);
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example);
console.log(exampleJSON);
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as HandlersMemberOut;
console.log(exampleParsed);
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,32 @@
# HandlersMemberUpsertReq
## Properties
| Name | Type |
| --------- | ------ |
| `role` | string |
| `user_id` | string |
## Example
```typescript
import type { HandlersMemberUpsertReq } from "@glueops/autoglue-sdk";
// TODO: Update the object below with actual values
const example = {
role: member,
user_id: null,
} satisfies HandlersMemberUpsertReq;
console.log(example);
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example);
console.log(exampleJSON);
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as HandlersMemberUpsertReq;
console.log(exampleParsed);
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,32 @@
# HandlersOrgCreateReq
## Properties
| Name | Type |
| -------- | ------ |
| `domain` | string |
| `name` | string |
## Example
```typescript
import type { HandlersOrgCreateReq } from '@glueops/autoglue-sdk'
// TODO: Update the object below with actual values
const example = {
"domain": acme.com,
"name": Acme Corp,
} satisfies HandlersOrgCreateReq
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as HandlersOrgCreateReq
console.log(exampleParsed)
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,32 @@
# HandlersOrgKeyCreateReq
## Properties
| Name | Type |
| ------------------ | ------ |
| `expires_in_hours` | number |
| `name` | string |
## Example
```typescript
import type { HandlersOrgKeyCreateReq } from "@glueops/autoglue-sdk";
// TODO: Update the object below with actual values
const example = {
expires_in_hours: 720,
name: automation - bot,
} satisfies HandlersOrgKeyCreateReq;
console.log(example);
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example);
console.log(exampleJSON);
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as HandlersOrgKeyCreateReq;
console.log(exampleParsed);
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,42 @@
# HandlersOrgKeyCreateResp
## Properties
| Name | Type |
| ------------ | ------ |
| `created_at` | string |
| `expires_at` | string |
| `id` | string |
| `name` | string |
| `org_key` | string |
| `org_secret` | string |
| `scope` | string |
## Example
```typescript
import type { HandlersOrgKeyCreateResp } from "@glueops/autoglue-sdk";
// TODO: Update the object below with actual values
const example = {
created_at: null,
expires_at: null,
id: null,
name: null,
org_key: null,
org_secret: null,
scope: null,
} satisfies HandlersOrgKeyCreateResp;
console.log(example);
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example);
console.log(exampleJSON);
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as HandlersOrgKeyCreateResp;
console.log(exampleParsed);
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,32 @@
# HandlersOrgUpdateReq
## Properties
| Name | Type |
| -------- | ------ |
| `domain` | string |
| `name` | string |
## Example
```typescript
import type { HandlersOrgUpdateReq } from "@glueops/autoglue-sdk";
// TODO: Update the object below with actual values
const example = {
domain: null,
name: null,
} satisfies HandlersOrgUpdateReq;
console.log(example);
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example);
console.log(exampleJSON);
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as HandlersOrgUpdateReq;
console.log(exampleParsed);
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,30 @@
# HandlersUpdateMeRequest
## Properties
| Name | Type |
| -------------- | ------ |
| `display_name` | string |
## Example
```typescript
import type { HandlersUpdateMeRequest } from "@glueops/autoglue-sdk";
// TODO: Update the object below with actual values
const example = {
display_name: null,
} satisfies HandlersUpdateMeRequest;
console.log(example);
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example);
console.log(exampleJSON);
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as HandlersUpdateMeRequest;
console.log(exampleParsed);
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,42 @@
# HandlersUserAPIKeyOut
## Properties
| Name | Type |
| -------------- | ------ |
| `created_at` | string |
| `expires_at` | string |
| `id` | string |
| `last_used_at` | string |
| `name` | string |
| `plain` | string |
| `scope` | string |
## Example
```typescript
import type { HandlersUserAPIKeyOut } from "@glueops/autoglue-sdk";
// TODO: Update the object below with actual values
const example = {
created_at: null,
expires_at: null,
id: null,
last_used_at: null,
name: null,
plain: null,
scope: null,
} satisfies HandlersUserAPIKeyOut;
console.log(example);
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example);
console.log(exampleJSON);
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as HandlersUserAPIKeyOut;
console.log(exampleParsed);
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

203
sdk/ts/docs/MeAPIKeysApi.md Normal file
View File

@@ -0,0 +1,203 @@
# MeAPIKeysApi
All URIs are relative to _http://localhost:8080/api/v1_
| Method | HTTP request | Description |
| -------------------------------------------------------- | ---------------------------- | ------------------------- |
| [**createUserAPIKey**](MeAPIKeysApi.md#createuserapikey) | **POST** /me/api-keys | Create a new user API key |
| [**deleteUserAPIKey**](MeAPIKeysApi.md#deleteuserapikey) | **DELETE** /me/api-keys/{id} | Delete a user API key |
| [**listUserAPIKeys**](MeAPIKeysApi.md#listuserapikeys) | **GET** /me/api-keys | List my API keys |
## createUserAPIKey
> HandlersUserAPIKeyOut createUserAPIKey(body)
Create a new user API key
Returns the plaintext key once. Store it securely on the client side.
### Example
```ts
import {
Configuration,
MeAPIKeysApi,
} from '@glueops/autoglue-sdk';
import type { CreateUserAPIKeyRequest } from '@glueops/autoglue-sdk';
async function example() {
console.log("🚀 Testing @glueops/autoglue-sdk SDK...");
const config = new Configuration({
// To configure API key authorization: ApiKeyAuth
apiKey: "YOUR API KEY",
// To configure API key authorization: BearerAuth
apiKey: "YOUR API KEY",
});
const api = new MeAPIKeysApi(config);
const body = {
// HandlersCreateUserKeyRequest | Key options
body: ...,
} satisfies CreateUserAPIKeyRequest;
try {
const data = await api.createUserAPIKey(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
| Name | Type | Description | Notes |
| -------- | --------------------------------------------------------------- | ----------- | ----- |
| **body** | [HandlersCreateUserKeyRequest](HandlersCreateUserKeyRequest.md) | Key options | |
### Return type
[**HandlersUserAPIKeyOut**](HandlersUserAPIKeyOut.md)
### Authorization
[ApiKeyAuth](../README.md#ApiKeyAuth), [BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: `application/json`
- **Accept**: `application/json`
### HTTP response details
| Status code | Description | Response headers |
| ----------- | ----------- | ---------------- |
| **201** | Created | - |
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
## deleteUserAPIKey
> deleteUserAPIKey(id)
Delete a user API key
### Example
```ts
import { Configuration, MeAPIKeysApi } from "@glueops/autoglue-sdk";
import type { DeleteUserAPIKeyRequest } from "@glueops/autoglue-sdk";
async function example() {
console.log("🚀 Testing @glueops/autoglue-sdk SDK...");
const config = new Configuration({
// To configure API key authorization: BearerAuth
apiKey: "YOUR API KEY",
});
const api = new MeAPIKeysApi(config);
const body = {
// string | Key ID (UUID)
id: id_example,
} satisfies DeleteUserAPIKeyRequest;
try {
const data = await api.deleteUserAPIKey(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
| Name | Type | Description | Notes |
| ------ | -------- | ------------- | ------------------------- |
| **id** | `string` | Key ID (UUID) | [Defaults to `undefined`] |
### Return type
`void` (Empty response body)
### Authorization
[BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
### HTTP response details
| Status code | Description | Response headers |
| ----------- | ----------- | ---------------- |
| **204** | No Content | - |
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
## listUserAPIKeys
> Array&lt;HandlersUserAPIKeyOut&gt; listUserAPIKeys()
List my API keys
### Example
```ts
import { Configuration, MeAPIKeysApi } from "@glueops/autoglue-sdk";
import type { ListUserAPIKeysRequest } from "@glueops/autoglue-sdk";
async function example() {
console.log("🚀 Testing @glueops/autoglue-sdk SDK...");
const config = new Configuration({
// To configure API key authorization: ApiKeyAuth
apiKey: "YOUR API KEY",
// To configure API key authorization: BearerAuth
apiKey: "YOUR API KEY",
});
const api = new MeAPIKeysApi(config);
try {
const data = await api.listUserAPIKeys();
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**Array&lt;HandlersUserAPIKeyOut&gt;**](HandlersUserAPIKeyOut.md)
### Authorization
[ApiKeyAuth](../README.md#ApiKeyAuth), [BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `application/json`
### HTTP response details
| Status code | Description | Response headers |
| ----------- | ----------- | ---------------- |
| **200** | OK | - |
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

136
sdk/ts/docs/MeApi.md Normal file
View File

@@ -0,0 +1,136 @@
# MeApi
All URIs are relative to _http://localhost:8080/api/v1_
| Method | HTTP request | Description |
| --------------------------------- | ------------- | --------------------------- |
| [**getMe**](MeApi.md#getme) | **GET** /me | Get current user profile |
| [**updateMe**](MeApi.md#updateme) | **PATCH** /me | Update current user profile |
## getMe
> HandlersMeResponse getMe()
Get current user profile
### Example
```ts
import { Configuration, MeApi } from "@glueops/autoglue-sdk";
import type { GetMeRequest } from "@glueops/autoglue-sdk";
async function example() {
console.log("🚀 Testing @glueops/autoglue-sdk SDK...");
const config = new Configuration({
// To configure API key authorization: ApiKeyAuth
apiKey: "YOUR API KEY",
// To configure API key authorization: BearerAuth
apiKey: "YOUR API KEY",
});
const api = new MeApi(config);
try {
const data = await api.getMe();
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**HandlersMeResponse**](HandlersMeResponse.md)
### Authorization
[ApiKeyAuth](../README.md#ApiKeyAuth), [BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `application/json`
### HTTP response details
| Status code | Description | Response headers |
| ----------- | ----------- | ---------------- |
| **200** | OK | - |
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
## updateMe
> ModelsUser updateMe(body)
Update current user profile
### Example
```ts
import {
Configuration,
MeApi,
} from '@glueops/autoglue-sdk';
import type { UpdateMeRequest } from '@glueops/autoglue-sdk';
async function example() {
console.log("🚀 Testing @glueops/autoglue-sdk SDK...");
const config = new Configuration({
// To configure API key authorization: ApiKeyAuth
apiKey: "YOUR API KEY",
// To configure API key authorization: BearerAuth
apiKey: "YOUR API KEY",
});
const api = new MeApi(config);
const body = {
// HandlersUpdateMeRequest | Patch profile
body: ...,
} satisfies UpdateMeRequest;
try {
const data = await api.updateMe(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
| Name | Type | Description | Notes |
| -------- | ----------------------------------------------------- | ------------- | ----- |
| **body** | [HandlersUpdateMeRequest](HandlersUpdateMeRequest.md) | Patch profile | |
### Return type
[**ModelsUser**](ModelsUser.md)
### Authorization
[ApiKeyAuth](../README.md#ApiKeyAuth), [BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: `application/json`
- **Accept**: `application/json`
### HTTP response details
| Status code | Description | Response headers |
| ----------- | ----------- | ---------------- |
| **200** | OK | - |
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,50 @@
# ModelsAPIKey
## Properties
| Name | Type |
| -------------- | ------- |
| `created_at` | Date |
| `expires_at` | Date |
| `id` | string |
| `last_used_at` | Date |
| `name` | string |
| `org_id` | string |
| `prefix` | string |
| `revoked` | boolean |
| `scope` | string |
| `updated_at` | Date |
| `user_id` | string |
## Example
```typescript
import type { ModelsAPIKey } from "@glueops/autoglue-sdk";
// TODO: Update the object below with actual values
const example = {
created_at: null,
expires_at: null,
id: null,
last_used_at: null,
name: null,
org_id: null,
prefix: null,
revoked: null,
scope: null,
updated_at: null,
user_id: null,
} satisfies ModelsAPIKey;
console.log(example);
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example);
console.log(exampleJSON);
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as ModelsAPIKey;
console.log(exampleParsed);
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,38 @@
# ModelsOrganization
## Properties
| Name | Type |
| ------------ | ------ |
| `created_at` | Date |
| `domain` | string |
| `id` | string |
| `name` | string |
| `updated_at` | Date |
## Example
```typescript
import type { ModelsOrganization } from "@glueops/autoglue-sdk";
// TODO: Update the object below with actual values
const example = {
created_at: null,
domain: null,
id: null,
name: null,
updated_at: null,
} satisfies ModelsOrganization;
console.log(example);
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example);
console.log(exampleJSON);
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as ModelsOrganization;
console.log(exampleParsed);
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

42
sdk/ts/docs/ModelsUser.md Normal file
View File

@@ -0,0 +1,42 @@
# ModelsUser
## Properties
| Name | Type |
| --------------- | ------- |
| `avatar_url` | string |
| `created_at` | Date |
| `display_name` | string |
| `id` | string |
| `is_disabled` | boolean |
| `primary_email` | string |
| `updated_at` | Date |
## Example
```typescript
import type { ModelsUser } from "@glueops/autoglue-sdk";
// TODO: Update the object below with actual values
const example = {
avatar_url: null,
created_at: null,
display_name: null,
id: null,
is_disabled: null,
primary_email: null,
updated_at: null,
} satisfies ModelsUser;
console.log(example);
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example);
console.log(exampleJSON);
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as ModelsUser;
console.log(exampleParsed);
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,44 @@
# ModelsUserEmail
## Properties
| Name | Type |
| ------------- | --------------------------- |
| `created_at` | Date |
| `email` | string |
| `id` | string |
| `is_primary` | boolean |
| `is_verified` | boolean |
| `updated_at` | Date |
| `user` | [ModelsUser](ModelsUser.md) |
| `user_id` | string |
## Example
```typescript
import type { ModelsUserEmail } from "@glueops/autoglue-sdk";
// TODO: Update the object below with actual values
const example = {
created_at: null,
email: null,
id: null,
is_primary: null,
is_verified: null,
updated_at: null,
user: null,
user_id: null,
} satisfies ModelsUserEmail;
console.log(example);
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example);
console.log(exampleJSON);
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as ModelsUserEmail;
console.log(exampleParsed);
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

757
sdk/ts/docs/OrgsApi.md Normal file
View File

@@ -0,0 +1,757 @@
# OrgsApi
All URIs are relative to _http://localhost:8080/api/v1_
| Method | HTTP request | Description |
| ----------------------------------------------------- | --------------------------------------- | ---------------------------------------- |
| [**addOrUpdateMember**](OrgsApi.md#addorupdatemember) | **POST** /orgs/{id}/members | Add or update a member (owner/admin) |
| [**createOrg**](OrgsApi.md#createorg) | **POST** /orgs | Create organization |
| [**createOrgKey**](OrgsApi.md#createorgkey) | **POST** /orgs/{id}/api-keys | Create org key/secret pair (owner/admin) |
| [**deleteOrg**](OrgsApi.md#deleteorg) | **DELETE** /orgs/{id} | Delete organization (owner) |
| [**deleteOrgKey**](OrgsApi.md#deleteorgkey) | **DELETE** /orgs/{id}/api-keys/{key_id} | Delete org key (owner/admin) |
| [**getOrg**](OrgsApi.md#getorg) | **GET** /orgs/{id} | Get organization |
| [**listMembers**](OrgsApi.md#listmembers) | **GET** /orgs/{id}/members | List members in org |
| [**listMyOrgs**](OrgsApi.md#listmyorgs) | **GET** /orgs | List organizations I belong to |
| [**listOrgKeys**](OrgsApi.md#listorgkeys) | **GET** /orgs/{id}/api-keys | List org-scoped API keys (no secrets) |
| [**removeMember**](OrgsApi.md#removemember) | **DELETE** /orgs/{id}/members/{user_id} | Remove a member (owner/admin) |
| [**updateOrg**](OrgsApi.md#updateorg) | **PATCH** /orgs/{id} | Update organization (owner/admin) |
## addOrUpdateMember
> HandlersMemberOut addOrUpdateMember(id, body)
Add or update a member (owner/admin)
### Example
```ts
import {
Configuration,
OrgsApi,
} from '@glueops/autoglue-sdk';
import type { AddOrUpdateMemberRequest } from '@glueops/autoglue-sdk';
async function example() {
console.log("🚀 Testing @glueops/autoglue-sdk SDK...");
const config = new Configuration({
// To configure API key authorization: BearerAuth
apiKey: "YOUR API KEY",
});
const api = new OrgsApi(config);
const body = {
// string | Org ID (UUID)
id: id_example,
// HandlersMemberUpsertReq | User & role
body: ...,
} satisfies AddOrUpdateMemberRequest;
try {
const data = await api.addOrUpdateMember(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
| Name | Type | Description | Notes |
| -------- | ----------------------------------------------------- | --------------- | ------------------------- |
| **id** | `string` | Org ID (UUID) | [Defaults to `undefined`] |
| **body** | [HandlersMemberUpsertReq](HandlersMemberUpsertReq.md) | User &amp; role | |
### Return type
[**HandlersMemberOut**](HandlersMemberOut.md)
### Authorization
[BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: `application/json`
- **Accept**: `application/json`
### HTTP response details
| Status code | Description | Response headers |
| ----------- | ------------ | ---------------- |
| **200** | OK | - |
| **401** | Unauthorized | - |
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
## createOrg
> ModelsOrganization createOrg(body)
Create organization
### Example
```ts
import {
Configuration,
OrgsApi,
} from '@glueops/autoglue-sdk';
import type { CreateOrgRequest } from '@glueops/autoglue-sdk';
async function example() {
console.log("🚀 Testing @glueops/autoglue-sdk SDK...");
const config = new Configuration({
// To configure API key authorization: BearerAuth
apiKey: "YOUR API KEY",
});
const api = new OrgsApi(config);
const body = {
// HandlersOrgCreateReq | Org payload
body: ...,
} satisfies CreateOrgRequest;
try {
const data = await api.createOrg(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
| Name | Type | Description | Notes |
| -------- | ----------------------------------------------- | ----------- | ----- |
| **body** | [HandlersOrgCreateReq](HandlersOrgCreateReq.md) | Org payload | |
### Return type
[**ModelsOrganization**](ModelsOrganization.md)
### Authorization
[BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: `application/json`
- **Accept**: `application/json`
### HTTP response details
| Status code | Description | Response headers |
| ----------- | ------------ | ---------------- |
| **201** | Created | - |
| **400** | Bad Request | - |
| **401** | Unauthorized | - |
| **409** | Conflict | - |
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
## createOrgKey
> HandlersOrgKeyCreateResp createOrgKey(id, body)
Create org key/secret pair (owner/admin)
### Example
```ts
import {
Configuration,
OrgsApi,
} from '@glueops/autoglue-sdk';
import type { CreateOrgKeyRequest } from '@glueops/autoglue-sdk';
async function example() {
console.log("🚀 Testing @glueops/autoglue-sdk SDK...");
const config = new Configuration({
// To configure API key authorization: BearerAuth
apiKey: "YOUR API KEY",
});
const api = new OrgsApi(config);
const body = {
// string | Org ID (UUID)
id: id_example,
// HandlersOrgKeyCreateReq | Key name + optional expiry
body: ...,
} satisfies CreateOrgKeyRequest;
try {
const data = await api.createOrgKey(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
| Name | Type | Description | Notes |
| -------- | ----------------------------------------------------- | -------------------------- | ------------------------- |
| **id** | `string` | Org ID (UUID) | [Defaults to `undefined`] |
| **body** | [HandlersOrgKeyCreateReq](HandlersOrgKeyCreateReq.md) | Key name + optional expiry | |
### Return type
[**HandlersOrgKeyCreateResp**](HandlersOrgKeyCreateResp.md)
### Authorization
[BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: `application/json`
- **Accept**: `application/json`
### HTTP response details
| Status code | Description | Response headers |
| ----------- | ------------ | ---------------- |
| **201** | Created | - |
| **401** | Unauthorized | - |
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
## deleteOrg
> deleteOrg(id)
Delete organization (owner)
### Example
```ts
import { Configuration, OrgsApi } from "@glueops/autoglue-sdk";
import type { DeleteOrgRequest } from "@glueops/autoglue-sdk";
async function example() {
console.log("🚀 Testing @glueops/autoglue-sdk SDK...");
const config = new Configuration({
// To configure API key authorization: BearerAuth
apiKey: "YOUR API KEY",
});
const api = new OrgsApi(config);
const body = {
// string | Org ID (UUID)
id: id_example,
} satisfies DeleteOrgRequest;
try {
const data = await api.deleteOrg(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
| Name | Type | Description | Notes |
| ------ | -------- | ------------- | ------------------------- |
| **id** | `string` | Org ID (UUID) | [Defaults to `undefined`] |
### Return type
`void` (Empty response body)
### Authorization
[BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `application/json`
### HTTP response details
| Status code | Description | Response headers |
| ----------- | ------------ | ---------------- |
| **204** | Deleted | - |
| **401** | Unauthorized | - |
| **404** | Not Found | - |
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
## deleteOrgKey
> deleteOrgKey(id, keyId)
Delete org key (owner/admin)
### Example
```ts
import { Configuration, OrgsApi } from "@glueops/autoglue-sdk";
import type { DeleteOrgKeyRequest } from "@glueops/autoglue-sdk";
async function example() {
console.log("🚀 Testing @glueops/autoglue-sdk SDK...");
const config = new Configuration({
// To configure API key authorization: BearerAuth
apiKey: "YOUR API KEY",
});
const api = new OrgsApi(config);
const body = {
// string | Org ID (UUID)
id: id_example,
// string | Key ID (UUID)
keyId: keyId_example,
} satisfies DeleteOrgKeyRequest;
try {
const data = await api.deleteOrgKey(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
| Name | Type | Description | Notes |
| --------- | -------- | ------------- | ------------------------- |
| **id** | `string` | Org ID (UUID) | [Defaults to `undefined`] |
| **keyId** | `string` | Key ID (UUID) | [Defaults to `undefined`] |
### Return type
`void` (Empty response body)
### Authorization
[BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `application/json`
### HTTP response details
| Status code | Description | Response headers |
| ----------- | ------------ | ---------------- |
| **204** | Deleted | - |
| **401** | Unauthorized | - |
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
## getOrg
> ModelsOrganization getOrg(id)
Get organization
### Example
```ts
import { Configuration, OrgsApi } from "@glueops/autoglue-sdk";
import type { GetOrgRequest } from "@glueops/autoglue-sdk";
async function example() {
console.log("🚀 Testing @glueops/autoglue-sdk SDK...");
const config = new Configuration({
// To configure API key authorization: BearerAuth
apiKey: "YOUR API KEY",
});
const api = new OrgsApi(config);
const body = {
// string | Org ID (UUID)
id: id_example,
} satisfies GetOrgRequest;
try {
const data = await api.getOrg(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
| Name | Type | Description | Notes |
| ------ | -------- | ------------- | ------------------------- |
| **id** | `string` | Org ID (UUID) | [Defaults to `undefined`] |
### Return type
[**ModelsOrganization**](ModelsOrganization.md)
### Authorization
[BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `application/json`
### HTTP response details
| Status code | Description | Response headers |
| ----------- | ------------ | ---------------- |
| **200** | OK | - |
| **401** | Unauthorized | - |
| **404** | Not Found | - |
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
## listMembers
> Array&lt;HandlersMemberOut&gt; listMembers(id)
List members in org
### Example
```ts
import { Configuration, OrgsApi } from "@glueops/autoglue-sdk";
import type { ListMembersRequest } from "@glueops/autoglue-sdk";
async function example() {
console.log("🚀 Testing @glueops/autoglue-sdk SDK...");
const config = new Configuration({
// To configure API key authorization: BearerAuth
apiKey: "YOUR API KEY",
});
const api = new OrgsApi(config);
const body = {
// string | Org ID (UUID)
id: id_example,
} satisfies ListMembersRequest;
try {
const data = await api.listMembers(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
| Name | Type | Description | Notes |
| ------ | -------- | ------------- | ------------------------- |
| **id** | `string` | Org ID (UUID) | [Defaults to `undefined`] |
### Return type
[**Array&lt;HandlersMemberOut&gt;**](HandlersMemberOut.md)
### Authorization
[BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `application/json`
### HTTP response details
| Status code | Description | Response headers |
| ----------- | ------------ | ---------------- |
| **200** | OK | - |
| **401** | Unauthorized | - |
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
## listMyOrgs
> Array&lt;ModelsOrganization&gt; listMyOrgs()
List organizations I belong to
### Example
```ts
import { Configuration, OrgsApi } from "@glueops/autoglue-sdk";
import type { ListMyOrgsRequest } from "@glueops/autoglue-sdk";
async function example() {
console.log("🚀 Testing @glueops/autoglue-sdk SDK...");
const config = new Configuration({
// To configure API key authorization: BearerAuth
apiKey: "YOUR API KEY",
});
const api = new OrgsApi(config);
try {
const data = await api.listMyOrgs();
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**Array&lt;ModelsOrganization&gt;**](ModelsOrganization.md)
### Authorization
[BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `application/json`
### HTTP response details
| Status code | Description | Response headers |
| ----------- | ------------ | ---------------- |
| **200** | OK | - |
| **401** | Unauthorized | - |
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
## listOrgKeys
> Array&lt;ModelsAPIKey&gt; listOrgKeys(id)
List org-scoped API keys (no secrets)
### Example
```ts
import { Configuration, OrgsApi } from "@glueops/autoglue-sdk";
import type { ListOrgKeysRequest } from "@glueops/autoglue-sdk";
async function example() {
console.log("🚀 Testing @glueops/autoglue-sdk SDK...");
const config = new Configuration({
// To configure API key authorization: BearerAuth
apiKey: "YOUR API KEY",
});
const api = new OrgsApi(config);
const body = {
// string | Org ID (UUID)
id: id_example,
} satisfies ListOrgKeysRequest;
try {
const data = await api.listOrgKeys(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
| Name | Type | Description | Notes |
| ------ | -------- | ------------- | ------------------------- |
| **id** | `string` | Org ID (UUID) | [Defaults to `undefined`] |
### Return type
[**Array&lt;ModelsAPIKey&gt;**](ModelsAPIKey.md)
### Authorization
[BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `application/json`
### HTTP response details
| Status code | Description | Response headers |
| ----------- | ------------ | ---------------- |
| **200** | OK | - |
| **401** | Unauthorized | - |
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
## removeMember
> removeMember(id, userId)
Remove a member (owner/admin)
### Example
```ts
import { Configuration, OrgsApi } from "@glueops/autoglue-sdk";
import type { RemoveMemberRequest } from "@glueops/autoglue-sdk";
async function example() {
console.log("🚀 Testing @glueops/autoglue-sdk SDK...");
const config = new Configuration({
// To configure API key authorization: BearerAuth
apiKey: "YOUR API KEY",
});
const api = new OrgsApi(config);
const body = {
// string | Org ID (UUID)
id: id_example,
// string | User ID (UUID)
userId: userId_example,
} satisfies RemoveMemberRequest;
try {
const data = await api.removeMember(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
| Name | Type | Description | Notes |
| ---------- | -------- | -------------- | ------------------------- |
| **id** | `string` | Org ID (UUID) | [Defaults to `undefined`] |
| **userId** | `string` | User ID (UUID) | [Defaults to `undefined`] |
### Return type
`void` (Empty response body)
### Authorization
[BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `application/json`
### HTTP response details
| Status code | Description | Response headers |
| ----------- | ------------ | ---------------- |
| **204** | Removed | - |
| **401** | Unauthorized | - |
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
## updateOrg
> ModelsOrganization updateOrg(id, body)
Update organization (owner/admin)
### Example
```ts
import {
Configuration,
OrgsApi,
} from '@glueops/autoglue-sdk';
import type { UpdateOrgRequest } from '@glueops/autoglue-sdk';
async function example() {
console.log("🚀 Testing @glueops/autoglue-sdk SDK...");
const config = new Configuration({
// To configure API key authorization: BearerAuth
apiKey: "YOUR API KEY",
});
const api = new OrgsApi(config);
const body = {
// string | Org ID (UUID)
id: id_example,
// HandlersOrgUpdateReq | Update payload
body: ...,
} satisfies UpdateOrgRequest;
try {
const data = await api.updateOrg(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
| Name | Type | Description | Notes |
| -------- | ----------------------------------------------- | -------------- | ------------------------- |
| **id** | `string` | Org ID (UUID) | [Defaults to `undefined`] |
| **body** | [HandlersOrgUpdateReq](HandlersOrgUpdateReq.md) | Update payload | |
### Return type
[**ModelsOrganization**](ModelsOrganization.md)
### Authorization
[BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: `application/json`
- **Accept**: `application/json`
### HTTP response details
| Status code | Description | Response headers |
| ----------- | ------------ | ---------------- |
| **200** | OK | - |
| **401** | Unauthorized | - |
| **404** | Not Found | - |
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

409
sdk/ts/docs/ServersApi.md Normal file
View File

@@ -0,0 +1,409 @@
# ServersApi
All URIs are relative to _http://localhost:8080/api/v1_
| Method | HTTP request | Description |
| ---------------------------------------------- | ------------------------ | ----------------------------- |
| [**createServer**](ServersApi.md#createserver) | **POST** /servers | Create server (org scoped) |
| [**deleteServer**](ServersApi.md#deleteserver) | **DELETE** /servers/{id} | Delete server (org scoped) |
| [**getServer**](ServersApi.md#getserver) | **GET** /servers/{id} | Get server by ID (org scoped) |
| [**listServers**](ServersApi.md#listservers) | **GET** /servers | List servers (org scoped) |
| [**updateServer**](ServersApi.md#updateserver) | **PATCH** /servers/{id} | Update server (org scoped) |
## createServer
> DtoServerResponse createServer(body, xOrgID)
Create server (org scoped)
Creates a server bound to the org in X-Org-ID. Validates that ssh_key_id belongs to the org.
### Example
```ts
import {
Configuration,
ServersApi,
} from '@glueops/autoglue-sdk';
import type { CreateServerRequest } from '@glueops/autoglue-sdk';
async function example() {
console.log("🚀 Testing @glueops/autoglue-sdk 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 ServersApi(config);
const body = {
// DtoCreateServerRequest | Server payload
body: ...,
// string | Organization UUID (optional)
xOrgID: xOrgID_example,
} satisfies CreateServerRequest;
try {
const data = await api.createServer(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
| Name | Type | Description | Notes |
| ---------- | --------------------------------------------------- | ----------------- | ------------------------------------ |
| **body** | [DtoCreateServerRequest](DtoCreateServerRequest.md) | Server payload | |
| **xOrgID** | `string` | Organization UUID | [Optional] [Defaults to `undefined`] |
### Return type
[**DtoServerResponse**](DtoServerResponse.md)
### Authorization
[OrgKeyAuth](../README.md#OrgKeyAuth), [OrgSecretAuth](../README.md#OrgSecretAuth), [BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: `application/json`
- **Accept**: `application/json`
### HTTP response details
| Status code | Description | Response headers |
| ----------- | ------------------------------------------------------------------- | ---------------- |
| **201** | Created | - |
| **400** | invalid json / missing fields / invalid status / invalid ssh_key_id | - |
| **401** | Unauthorized | - |
| **403** | organization required | - |
| **500** | create failed | - |
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
## deleteServer
> string deleteServer(id, xOrgID)
Delete server (org scoped)
Permanently deletes the server.
### Example
```ts
import { Configuration, ServersApi } from "@glueops/autoglue-sdk";
import type { DeleteServerRequest } from "@glueops/autoglue-sdk";
async function example() {
console.log("🚀 Testing @glueops/autoglue-sdk 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 ServersApi(config);
const body = {
// string | Server ID (UUID)
id: id_example,
// string | Organization UUID (optional)
xOrgID: xOrgID_example,
} satisfies DeleteServerRequest;
try {
const data = await api.deleteServer(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
| Name | Type | Description | Notes |
| ---------- | -------- | ----------------- | ------------------------------------ |
| **id** | `string` | Server ID (UUID) | [Defaults to `undefined`] |
| **xOrgID** | `string` | Organization UUID | [Optional] [Defaults to `undefined`] |
### Return type
**string**
### Authorization
[OrgKeyAuth](../README.md#OrgKeyAuth), [OrgSecretAuth](../README.md#OrgSecretAuth), [BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `application/json`
### HTTP response details
| Status code | Description | Response headers |
| ----------- | --------------------- | ---------------- |
| **204** | No Content | - |
| **400** | invalid id | - |
| **401** | Unauthorized | - |
| **403** | organization required | - |
| **500** | delete failed | - |
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
## getServer
> DtoServerResponse getServer(id, xOrgID)
Get server by ID (org scoped)
Returns one server in the given organization.
### Example
```ts
import { Configuration, ServersApi } from "@glueops/autoglue-sdk";
import type { GetServerRequest } from "@glueops/autoglue-sdk";
async function example() {
console.log("🚀 Testing @glueops/autoglue-sdk 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 ServersApi(config);
const body = {
// string | Server ID (UUID)
id: id_example,
// string | Organization UUID (optional)
xOrgID: xOrgID_example,
} satisfies GetServerRequest;
try {
const data = await api.getServer(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
| Name | Type | Description | Notes |
| ---------- | -------- | ----------------- | ------------------------------------ |
| **id** | `string` | Server ID (UUID) | [Defaults to `undefined`] |
| **xOrgID** | `string` | Organization UUID | [Optional] [Defaults to `undefined`] |
### Return type
[**DtoServerResponse**](DtoServerResponse.md)
### Authorization
[OrgKeyAuth](../README.md#OrgKeyAuth), [OrgSecretAuth](../README.md#OrgSecretAuth), [BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `application/json`
### HTTP response details
| Status code | Description | Response headers |
| ----------- | --------------------- | ---------------- |
| **200** | OK | - |
| **400** | invalid id | - |
| **401** | Unauthorized | - |
| **403** | organization required | - |
| **404** | not found | - |
| **500** | fetch failed | - |
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
## listServers
> Array&lt;DtoServerResponse&gt; listServers(xOrgID, status, role)
List servers (org scoped)
Returns servers for the organization in X-Org-ID. Optional filters: status, role.
### Example
```ts
import { Configuration, ServersApi } from "@glueops/autoglue-sdk";
import type { ListServersRequest } from "@glueops/autoglue-sdk";
async function example() {
console.log("🚀 Testing @glueops/autoglue-sdk 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 ServersApi(config);
const body = {
// string | Organization UUID (optional)
xOrgID: xOrgID_example,
// string | Filter by status (pending|provisioning|ready|failed) (optional)
status: status_example,
// string | Filter by role (optional)
role: role_example,
} satisfies ListServersRequest;
try {
const data = await api.listServers(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
| Name | Type | Description | Notes |
| ---------- | -------- | ------------------------- | ------------------------------------ | ----- | ------- | ------------------------------------ |
| **xOrgID** | `string` | Organization UUID | [Optional] [Defaults to `undefined`] |
| **status** | `string` | Filter by status (pending | provisioning | ready | failed) | [Optional] [Defaults to `undefined`] |
| **role** | `string` | Filter by role | [Optional] [Defaults to `undefined`] |
### Return type
[**Array&lt;DtoServerResponse&gt;**](DtoServerResponse.md)
### Authorization
[OrgKeyAuth](../README.md#OrgKeyAuth), [OrgSecretAuth](../README.md#OrgSecretAuth), [BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `application/json`
### HTTP response details
| Status code | Description | Response headers |
| ----------- | ---------------------- | ---------------- |
| **200** | OK | - |
| **401** | Unauthorized | - |
| **403** | organization required | - |
| **500** | failed to list servers | - |
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
## updateServer
> DtoServerResponse updateServer(id, body, xOrgID)
Update server (org scoped)
Partially update fields; changing ssh_key_id validates ownership.
### Example
```ts
import {
Configuration,
ServersApi,
} from '@glueops/autoglue-sdk';
import type { UpdateServerRequest } from '@glueops/autoglue-sdk';
async function example() {
console.log("🚀 Testing @glueops/autoglue-sdk 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 ServersApi(config);
const body = {
// string | Server ID (UUID)
id: id_example,
// DtoUpdateServerRequest | Fields to update
body: ...,
// string | Organization UUID (optional)
xOrgID: xOrgID_example,
} satisfies UpdateServerRequest;
try {
const data = await api.updateServer(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
| Name | Type | Description | Notes |
| ---------- | --------------------------------------------------- | ----------------- | ------------------------------------ |
| **id** | `string` | Server ID (UUID) | [Defaults to `undefined`] |
| **body** | [DtoUpdateServerRequest](DtoUpdateServerRequest.md) | Fields to update | |
| **xOrgID** | `string` | Organization UUID | [Optional] [Defaults to `undefined`] |
### Return type
[**DtoServerResponse**](DtoServerResponse.md)
### Authorization
[OrgKeyAuth](../README.md#OrgKeyAuth), [OrgSecretAuth](../README.md#OrgSecretAuth), [BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: `application/json`
- **Accept**: `application/json`
### HTTP response details
| Status code | Description | Response headers |
| ----------- | --------------------------------------------------------------- | ---------------- |
| **200** | OK | - |
| **400** | invalid id / invalid json / invalid status / invalid ssh_key_id | - |
| **401** | Unauthorized | - |
| **403** | organization required | - |
| **404** | not found | - |
| **500** | update failed | - |
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

403
sdk/ts/docs/SshApi.md Normal file
View File

@@ -0,0 +1,403 @@
# SshApi
All URIs are relative to _http://localhost:8080/api/v1_
| Method | HTTP request | Description |
| ---------------------------------------------------- | -------------------------- | ----------------------------------------- |
| [**createSSHKey**](SshApi.md#createsshkey) | **POST** /ssh | Create ssh keypair (org scoped) |
| [**deleteSSHKey**](SshApi.md#deletesshkey) | **DELETE** /ssh/{id} | Delete ssh keypair (org scoped) |
| [**downloadSSHKey**](SshApi.md#downloadsshkey) | **GET** /ssh/{id}/download | Download ssh key files by ID (org scoped) |
| [**getSSHKey**](SshApi.md#getsshkey) | **GET** /ssh/{id} | Get ssh key by ID (org scoped) |
| [**listPublicSshKeys**](SshApi.md#listpublicsshkeys) | **GET** /ssh | List ssh keys (org scoped) |
## createSSHKey
> DtoSshResponse createSSHKey(body, xOrgID)
Create ssh keypair (org scoped)
Generates an RSA or ED25519 keypair, saves it, and returns metadata. For RSA you may set bits (2048/3072/4096). Default is 4096. ED25519 ignores bits.
### Example
```ts
import {
Configuration,
SshApi,
} from '@glueops/autoglue-sdk';
import type { CreateSSHKeyRequest } from '@glueops/autoglue-sdk';
async function example() {
console.log("🚀 Testing @glueops/autoglue-sdk 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 SshApi(config);
const body = {
// DtoCreateSSHRequest | Key generation options
body: ...,
// string | Organization UUID (optional)
xOrgID: xOrgID_example,
} satisfies CreateSSHKeyRequest;
try {
const data = await api.createSSHKey(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
| Name | Type | Description | Notes |
| ---------- | --------------------------------------------- | ---------------------- | ------------------------------------ |
| **body** | [DtoCreateSSHRequest](DtoCreateSSHRequest.md) | Key generation options | |
| **xOrgID** | `string` | Organization UUID | [Optional] [Defaults to `undefined`] |
### Return type
[**DtoSshResponse**](DtoSshResponse.md)
### Authorization
[OrgKeyAuth](../README.md#OrgKeyAuth), [OrgSecretAuth](../README.md#OrgSecretAuth), [BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: `application/json`
- **Accept**: `application/json`
### HTTP response details
| Status code | Description | Response headers |
| ----------- | --------------------------- | ---------------- |
| **201** | Created | - |
| **400** | invalid json / invalid bits | - |
| **401** | Unauthorized | - |
| **403** | organization required | - |
| **500** | generation/create failed | - |
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
## deleteSSHKey
> string deleteSSHKey(id, xOrgID)
Delete ssh keypair (org scoped)
Permanently deletes a keypair.
### Example
```ts
import { Configuration, SshApi } from "@glueops/autoglue-sdk";
import type { DeleteSSHKeyRequest } from "@glueops/autoglue-sdk";
async function example() {
console.log("🚀 Testing @glueops/autoglue-sdk 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 SshApi(config);
const body = {
// string | SSH Key ID (UUID)
id: id_example,
// string | Organization UUID (optional)
xOrgID: xOrgID_example,
} satisfies DeleteSSHKeyRequest;
try {
const data = await api.deleteSSHKey(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
| Name | Type | Description | Notes |
| ---------- | -------- | ----------------- | ------------------------------------ |
| **id** | `string` | SSH Key ID (UUID) | [Defaults to `undefined`] |
| **xOrgID** | `string` | Organization UUID | [Optional] [Defaults to `undefined`] |
### Return type
**string**
### Authorization
[OrgKeyAuth](../README.md#OrgKeyAuth), [OrgSecretAuth](../README.md#OrgSecretAuth), [BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `application/json`
### HTTP response details
| Status code | Description | Response headers |
| ----------- | --------------------- | ---------------- |
| **204** | No Content | - |
| **400** | invalid id | - |
| **401** | Unauthorized | - |
| **403** | organization required | - |
| **500** | delete failed | - |
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
## downloadSSHKey
> string downloadSSHKey(xOrgID, id, part)
Download ssh key files by ID (org scoped)
Download &#x60;part&#x3D;public|private|both&#x60; of the keypair. &#x60;both&#x60; returns a zip file.
### Example
```ts
import { Configuration, SshApi } from "@glueops/autoglue-sdk";
import type { DownloadSSHKeyRequest } from "@glueops/autoglue-sdk";
async function example() {
console.log("🚀 Testing @glueops/autoglue-sdk 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 SshApi(config);
const body = {
// string | Organization UUID
xOrgID: xOrgID_example,
// string | SSH Key ID (UUID)
id: id_example,
// 'public' | 'private' | 'both' | Which part to download
part: part_example,
} satisfies DownloadSSHKeyRequest;
try {
const data = await api.downloadSSHKey(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
| Name | Type | Description | Notes |
| ---------- | --------------------------- | ---------------------- | ------------------------------------------------------- |
| **xOrgID** | `string` | Organization UUID | [Defaults to `undefined`] |
| **id** | `string` | SSH Key ID (UUID) | [Defaults to `undefined`] |
| **part** | `public`, `private`, `both` | Which part to download | [Defaults to `undefined`] [Enum: public, private, both] |
### Return type
**string**
### Authorization
[OrgKeyAuth](../README.md#OrgKeyAuth), [OrgSecretAuth](../README.md#OrgSecretAuth), [BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `application/json`
### HTTP response details
| Status code | Description | Response headers |
| ----------- | ------------------------- | ---------------- |
| **200** | file content | - |
| **400** | invalid id / invalid part | - |
| **401** | Unauthorized | - |
| **403** | organization required | - |
| **404** | not found | - |
| **500** | download failed | - |
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
## getSSHKey
> DtoSshRevealResponse getSSHKey(id, xOrgID, reveal)
Get ssh key by ID (org scoped)
Returns public key fields. Append &#x60;?reveal&#x3D;true&#x60; to include the private key PEM.
### Example
```ts
import { Configuration, SshApi } from "@glueops/autoglue-sdk";
import type { GetSSHKeyRequest } from "@glueops/autoglue-sdk";
async function example() {
console.log("🚀 Testing @glueops/autoglue-sdk 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 SshApi(config);
const body = {
// string | SSH Key ID (UUID)
id: id_example,
// string | Organization UUID (optional)
xOrgID: xOrgID_example,
// boolean | Reveal private key PEM (optional)
reveal: true,
} satisfies GetSSHKeyRequest;
try {
const data = await api.getSSHKey(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
| Name | Type | Description | Notes |
| ---------- | --------- | ---------------------- | ------------------------------------ |
| **id** | `string` | SSH Key ID (UUID) | [Defaults to `undefined`] |
| **xOrgID** | `string` | Organization UUID | [Optional] [Defaults to `undefined`] |
| **reveal** | `boolean` | Reveal private key PEM | [Optional] [Defaults to `undefined`] |
### Return type
[**DtoSshRevealResponse**](DtoSshRevealResponse.md)
### Authorization
[OrgKeyAuth](../README.md#OrgKeyAuth), [OrgSecretAuth](../README.md#OrgSecretAuth), [BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `application/json`
### HTTP response details
| Status code | Description | Response headers |
| ----------- | --------------------- | ---------------- |
| **200** | When reveal&#x3D;true | - |
| **400** | invalid id | - |
| **401** | Unauthorized | - |
| **403** | organization required | - |
| **404** | not found | - |
| **500** | fetch failed | - |
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
## listPublicSshKeys
> Array&lt;DtoSshResponse&gt; listPublicSshKeys(xOrgID)
List ssh keys (org scoped)
Returns ssh keys for the organization in X-Org-ID.
### Example
```ts
import { Configuration, SshApi } from "@glueops/autoglue-sdk";
import type { ListPublicSshKeysRequest } from "@glueops/autoglue-sdk";
async function example() {
console.log("🚀 Testing @glueops/autoglue-sdk 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 SshApi(config);
const body = {
// string | Organization UUID (optional)
xOrgID: xOrgID_example,
} satisfies ListPublicSshKeysRequest;
try {
const data = await api.listPublicSshKeys(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
| Name | Type | Description | Notes |
| ---------- | -------- | ----------------- | ------------------------------------ |
| **xOrgID** | `string` | Organization UUID | [Optional] [Defaults to `undefined`] |
### Return type
[**Array&lt;DtoSshResponse&gt;**](DtoSshResponse.md)
### Authorization
[OrgKeyAuth](../README.md#OrgKeyAuth), [OrgSecretAuth](../README.md#OrgSecretAuth), [BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `application/json`
### HTTP response details
| Status code | Description | Response headers |
| ----------- | --------------------- | ---------------- |
| **200** | OK | - |
| **401** | Unauthorized | - |
| **403** | organization required | - |
| **500** | failed to list keys | - |
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

410
sdk/ts/docs/TaintsApi.md Normal file
View File

@@ -0,0 +1,410 @@
# TaintsApi
All URIs are relative to _http://localhost:8080/api/v1_
| Method | HTTP request | Description |
| ------------------------------------------- | ----------------------- | ---------------------------------- |
| [**createTaint**](TaintsApi.md#createtaint) | **POST** /taints | Create node taint (org scoped) |
| [**deleteTaint**](TaintsApi.md#deletetaint) | **DELETE** /taints/{id} | Delete taint (org scoped) |
| [**getTaint**](TaintsApi.md#gettaint) | **GET** /taints/{id} | Get node taint by ID (org scoped) |
| [**listTaints**](TaintsApi.md#listtaints) | **GET** /taints | List node pool taints (org scoped) |
| [**updateTaint**](TaintsApi.md#updatetaint) | **PATCH** /taints/{id} | Update node taint (org scoped) |
## createTaint
> DtoTaintResponse createTaint(body, xOrgID)
Create node taint (org scoped)
Creates a taint.
### Example
```ts
import {
Configuration,
TaintsApi,
} from '@glueops/autoglue-sdk';
import type { CreateTaintRequest } from '@glueops/autoglue-sdk';
async function example() {
console.log("🚀 Testing @glueops/autoglue-sdk 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 TaintsApi(config);
const body = {
// DtoCreateTaintRequest | Taint payload
body: ...,
// string | Organization UUID (optional)
xOrgID: xOrgID_example,
} satisfies CreateTaintRequest;
try {
const data = await api.createTaint(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
| Name | Type | Description | Notes |
| ---------- | ------------------------------------------------- | ----------------- | ------------------------------------ |
| **body** | [DtoCreateTaintRequest](DtoCreateTaintRequest.md) | Taint payload | |
| **xOrgID** | `string` | Organization UUID | [Optional] [Defaults to `undefined`] |
### Return type
[**DtoTaintResponse**](DtoTaintResponse.md)
### Authorization
[OrgKeyAuth](../README.md#OrgKeyAuth), [OrgSecretAuth](../README.md#OrgSecretAuth), [BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: `application/json`
- **Accept**: `application/json`
### HTTP response details
| Status code | Description | Response headers |
| ----------- | ----------------------------------------------------- | ---------------- |
| **201** | Created | - |
| **400** | invalid json / missing fields / invalid node_pool_ids | - |
| **401** | Unauthorized | - |
| **403** | organization required | - |
| **500** | create failed | - |
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
## deleteTaint
> string deleteTaint(id, xOrgID)
Delete taint (org scoped)
Permanently deletes the taint.
### Example
```ts
import { Configuration, TaintsApi } from "@glueops/autoglue-sdk";
import type { DeleteTaintRequest } from "@glueops/autoglue-sdk";
async function example() {
console.log("🚀 Testing @glueops/autoglue-sdk 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 TaintsApi(config);
const body = {
// string | Node Taint ID (UUID)
id: id_example,
// string | Organization UUID (optional)
xOrgID: xOrgID_example,
} satisfies DeleteTaintRequest;
try {
const data = await api.deleteTaint(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
| Name | Type | Description | Notes |
| ---------- | -------- | -------------------- | ------------------------------------ |
| **id** | `string` | Node Taint ID (UUID) | [Defaults to `undefined`] |
| **xOrgID** | `string` | Organization UUID | [Optional] [Defaults to `undefined`] |
### Return type
**string**
### Authorization
[OrgKeyAuth](../README.md#OrgKeyAuth), [OrgSecretAuth](../README.md#OrgSecretAuth), [BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `application/json`
### HTTP response details
| Status code | Description | Response headers |
| ----------- | --------------------- | ---------------- |
| **204** | No Content | - |
| **400** | invalid id | - |
| **401** | Unauthorized | - |
| **403** | organization required | - |
| **500** | delete failed | - |
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
## getTaint
> DtoTaintResponse getTaint(id, xOrgID)
Get node taint by ID (org scoped)
### Example
```ts
import { Configuration, TaintsApi } from "@glueops/autoglue-sdk";
import type { GetTaintRequest } from "@glueops/autoglue-sdk";
async function example() {
console.log("🚀 Testing @glueops/autoglue-sdk 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 TaintsApi(config);
const body = {
// string | Node Taint ID (UUID)
id: id_example,
// string | Organization UUID (optional)
xOrgID: xOrgID_example,
} satisfies GetTaintRequest;
try {
const data = await api.getTaint(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
| Name | Type | Description | Notes |
| ---------- | -------- | -------------------- | ------------------------------------ |
| **id** | `string` | Node Taint ID (UUID) | [Defaults to `undefined`] |
| **xOrgID** | `string` | Organization UUID | [Optional] [Defaults to `undefined`] |
### Return type
[**DtoTaintResponse**](DtoTaintResponse.md)
### Authorization
[OrgKeyAuth](../README.md#OrgKeyAuth), [OrgSecretAuth](../README.md#OrgSecretAuth), [BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `application/json`
### HTTP response details
| Status code | Description | Response headers |
| ----------- | --------------------- | ---------------- |
| **200** | OK | - |
| **400** | invalid id | - |
| **401** | Unauthorized | - |
| **403** | organization required | - |
| **404** | not found | - |
| **500** | fetch failed | - |
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
## listTaints
> Array&lt;DtoTaintResponse&gt; listTaints(xOrgID, key, value, q)
List node pool taints (org scoped)
Returns node taints for the organization in X-Org-ID. Filters: &#x60;key&#x60;, &#x60;value&#x60;, and &#x60;q&#x60; (key contains). Add &#x60;include&#x3D;node_pools&#x60; to include linked node pools.
### Example
```ts
import { Configuration, TaintsApi } from "@glueops/autoglue-sdk";
import type { ListTaintsRequest } from "@glueops/autoglue-sdk";
async function example() {
console.log("🚀 Testing @glueops/autoglue-sdk 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 TaintsApi(config);
const body = {
// string | Organization UUID (optional)
xOrgID: xOrgID_example,
// string | Exact key (optional)
key: key_example,
// string | Exact value (optional)
value: value_example,
// string | key contains (case-insensitive) (optional)
q: q_example,
} satisfies ListTaintsRequest;
try {
const data = await api.listTaints(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
| Name | Type | Description | Notes |
| ---------- | -------- | ------------------------------- | ------------------------------------ |
| **xOrgID** | `string` | Organization UUID | [Optional] [Defaults to `undefined`] |
| **key** | `string` | Exact key | [Optional] [Defaults to `undefined`] |
| **value** | `string` | Exact value | [Optional] [Defaults to `undefined`] |
| **q** | `string` | key contains (case-insensitive) | [Optional] [Defaults to `undefined`] |
### Return type
[**Array&lt;DtoTaintResponse&gt;**](DtoTaintResponse.md)
### Authorization
[OrgKeyAuth](../README.md#OrgKeyAuth), [OrgSecretAuth](../README.md#OrgSecretAuth), [BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `application/json`
### HTTP response details
| Status code | Description | Response headers |
| ----------- | -------------------------- | ---------------- |
| **200** | OK | - |
| **401** | Unauthorized | - |
| **403** | organization required | - |
| **500** | failed to list node taints | - |
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
## updateTaint
> DtoTaintResponse updateTaint(id, body, xOrgID)
Update node taint (org scoped)
Partially update taint fields.
### Example
```ts
import {
Configuration,
TaintsApi,
} from '@glueops/autoglue-sdk';
import type { UpdateTaintRequest } from '@glueops/autoglue-sdk';
async function example() {
console.log("🚀 Testing @glueops/autoglue-sdk 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 TaintsApi(config);
const body = {
// string | Node Taint ID (UUID)
id: id_example,
// DtoUpdateTaintRequest | Fields to update
body: ...,
// string | Organization UUID (optional)
xOrgID: xOrgID_example,
} satisfies UpdateTaintRequest;
try {
const data = await api.updateTaint(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
### Parameters
| Name | Type | Description | Notes |
| ---------- | ------------------------------------------------- | -------------------- | ------------------------------------ |
| **id** | `string` | Node Taint ID (UUID) | [Defaults to `undefined`] |
| **body** | [DtoUpdateTaintRequest](DtoUpdateTaintRequest.md) | Fields to update | |
| **xOrgID** | `string` | Organization UUID | [Optional] [Defaults to `undefined`] |
### Return type
[**DtoTaintResponse**](DtoTaintResponse.md)
### Authorization
[OrgKeyAuth](../README.md#OrgKeyAuth), [OrgSecretAuth](../README.md#OrgSecretAuth), [BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: `application/json`
- **Accept**: `application/json`
### HTTP response details
| Status code | Description | Response headers |
| ----------- | ------------------------- | ---------------- |
| **200** | OK | - |
| **400** | invalid id / invalid json | - |
| **401** | Unauthorized | - |
| **403** | organization required | - |
| **404** | not found | - |
| **500** | update failed | - |
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,32 @@
# UtilsErrorResponse
## Properties
| Name | Type |
| --------- | ------ |
| `code` | string |
| `message` | string |
## Example
```typescript
import type { UtilsErrorResponse } from "@glueops/autoglue-sdk";
// TODO: Update the object below with actual values
const example = {
code: null,
message: null,
} satisfies UtilsErrorResponse;
console.log(example);
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example);
console.log(exampleJSON);
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as UtilsErrorResponse;
console.log(exampleParsed);
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

21
sdk/ts/package.json Normal file
View File

@@ -0,0 +1,21 @@
{
"name": "@glueops/autoglue-sdk",
"version": "0.1.0",
"description": "OpenAPI client for @glueops/autoglue-sdk",
"author": "OpenAPI-Generator",
"repository": {
"type": "git",
"url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
},
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"module": "./dist/esm/index.js",
"sideEffects": false,
"scripts": {
"build": "tsc && tsc -p tsconfig.esm.json",
"prepare": "npm run build"
},
"devDependencies": {
"typescript": "^4.0 || ^5.0"
}
}

294
sdk/ts/src/apis/AuthApi.ts Normal file
View File

@@ -0,0 +1,294 @@
/* tslint:disable */
/* eslint-disable */
/**
* AutoGlue API
* API for managing K3s clusters across cloud providers
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import * as runtime from "../runtime";
import type {
DtoAuthStartResponse,
DtoJWKS,
DtoLogoutRequest,
DtoRefreshRequest,
DtoTokenPair,
} from "../models/index";
import {
DtoAuthStartResponseFromJSON,
DtoAuthStartResponseToJSON,
DtoJWKSFromJSON,
DtoJWKSToJSON,
DtoLogoutRequestFromJSON,
DtoLogoutRequestToJSON,
DtoRefreshRequestFromJSON,
DtoRefreshRequestToJSON,
DtoTokenPairFromJSON,
DtoTokenPairToJSON,
} from "../models/index";
export interface AuthCallbackRequest {
provider: string;
}
export interface AuthStartRequest {
provider: string;
}
export interface LogoutRequest {
body: DtoLogoutRequest;
}
export interface RefreshRequest {
body: DtoRefreshRequest;
}
/**
*
*/
export class AuthApi extends runtime.BaseAPI {
/**
* Handle social login callback
*/
async authCallbackRaw(
requestParameters: AuthCallbackRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<runtime.ApiResponse<DtoTokenPair>> {
if (requestParameters["provider"] == null) {
throw new runtime.RequiredError(
"provider",
'Required parameter "provider" was null or undefined when calling authCallback().',
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
let urlPath = `/auth/{provider}/callback`;
urlPath = urlPath.replace(
`{${"provider"}}`,
encodeURIComponent(String(requestParameters["provider"])),
);
const response = await this.request(
{
path: urlPath,
method: "GET",
headers: headerParameters,
query: queryParameters,
},
initOverrides,
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
DtoTokenPairFromJSON(jsonValue),
);
}
/**
* Handle social login callback
*/
async authCallback(
requestParameters: AuthCallbackRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<DtoTokenPair> {
const response = await this.authCallbackRaw(
requestParameters,
initOverrides,
);
return await response.value();
}
/**
* Returns provider authorization URL for the frontend to redirect
* Begin social login
*/
async authStartRaw(
requestParameters: AuthStartRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<runtime.ApiResponse<DtoAuthStartResponse>> {
if (requestParameters["provider"] == null) {
throw new runtime.RequiredError(
"provider",
'Required parameter "provider" was null or undefined when calling authStart().',
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
let urlPath = `/auth/{provider}/start`;
urlPath = urlPath.replace(
`{${"provider"}}`,
encodeURIComponent(String(requestParameters["provider"])),
);
const response = await this.request(
{
path: urlPath,
method: "POST",
headers: headerParameters,
query: queryParameters,
},
initOverrides,
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
DtoAuthStartResponseFromJSON(jsonValue),
);
}
/**
* Returns provider authorization URL for the frontend to redirect
* Begin social login
*/
async authStart(
requestParameters: AuthStartRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<DtoAuthStartResponse> {
const response = await this.authStartRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Returns the JSON Web Key Set for token verification
* Get JWKS
*/
async getJWKSRaw(
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<runtime.ApiResponse<DtoJWKS>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
let urlPath = `/.well-known/jwks.json`;
const response = await this.request(
{
path: urlPath,
method: "GET",
headers: headerParameters,
query: queryParameters,
},
initOverrides,
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
DtoJWKSFromJSON(jsonValue),
);
}
/**
* Returns the JSON Web Key Set for token verification
* Get JWKS
*/
async getJWKS(
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<DtoJWKS> {
const response = await this.getJWKSRaw(initOverrides);
return await response.value();
}
/**
* Revoke refresh token family (logout everywhere)
*/
async logoutRaw(
requestParameters: LogoutRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<runtime.ApiResponse<void>> {
if (requestParameters["body"] == null) {
throw new runtime.RequiredError(
"body",
'Required parameter "body" was null or undefined when calling logout().',
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters["Content-Type"] = "application/json";
let urlPath = `/auth/logout`;
const response = await this.request(
{
path: urlPath,
method: "POST",
headers: headerParameters,
query: queryParameters,
body: DtoLogoutRequestToJSON(requestParameters["body"]),
},
initOverrides,
);
return new runtime.VoidApiResponse(response);
}
/**
* Revoke refresh token family (logout everywhere)
*/
async logout(
requestParameters: LogoutRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<void> {
await this.logoutRaw(requestParameters, initOverrides);
}
/**
* Rotate refresh token
*/
async refreshRaw(
requestParameters: RefreshRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<runtime.ApiResponse<DtoTokenPair>> {
if (requestParameters["body"] == null) {
throw new runtime.RequiredError(
"body",
'Required parameter "body" was null or undefined when calling refresh().',
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters["Content-Type"] = "application/json";
let urlPath = `/auth/refresh`;
const response = await this.request(
{
path: urlPath,
method: "POST",
headers: headerParameters,
query: queryParameters,
body: DtoRefreshRequestToJSON(requestParameters["body"]),
},
initOverrides,
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
DtoTokenPairFromJSON(jsonValue),
);
}
/**
* Rotate refresh token
*/
async refresh(
requestParameters: RefreshRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<DtoTokenPair> {
const response = await this.refreshRaw(requestParameters, initOverrides);
return await response.value();
}
}

View File

@@ -0,0 +1,201 @@
/* tslint:disable */
/* eslint-disable */
/**
* AutoGlue API
* API for managing K3s clusters across cloud providers
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import * as runtime from "../runtime";
import type {
HandlersCreateUserKeyRequest,
HandlersUserAPIKeyOut,
} from "../models/index";
import {
HandlersCreateUserKeyRequestFromJSON,
HandlersCreateUserKeyRequestToJSON,
HandlersUserAPIKeyOutFromJSON,
HandlersUserAPIKeyOutToJSON,
} from "../models/index";
export interface CreateUserAPIKeyRequest {
body: HandlersCreateUserKeyRequest;
}
export interface DeleteUserAPIKeyRequest {
id: string;
}
/**
*
*/
export class MeAPIKeysApi extends runtime.BaseAPI {
/**
* Returns the plaintext key once. Store it securely on the client side.
* Create a new user API key
*/
async createUserAPIKeyRaw(
requestParameters: CreateUserAPIKeyRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<runtime.ApiResponse<HandlersUserAPIKeyOut>> {
if (requestParameters["body"] == null) {
throw new runtime.RequiredError(
"body",
'Required parameter "body" was null or undefined when calling createUserAPIKey().',
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters["Content-Type"] = "application/json";
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-API-KEY"] =
await this.configuration.apiKey("X-API-KEY"); // ApiKeyAuth authentication
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] =
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
}
let urlPath = `/me/api-keys`;
const response = await this.request(
{
path: urlPath,
method: "POST",
headers: headerParameters,
query: queryParameters,
body: HandlersCreateUserKeyRequestToJSON(requestParameters["body"]),
},
initOverrides,
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
HandlersUserAPIKeyOutFromJSON(jsonValue),
);
}
/**
* Returns the plaintext key once. Store it securely on the client side.
* Create a new user API key
*/
async createUserAPIKey(
requestParameters: CreateUserAPIKeyRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<HandlersUserAPIKeyOut> {
const response = await this.createUserAPIKeyRaw(
requestParameters,
initOverrides,
);
return await response.value();
}
/**
* Delete a user API key
*/
async deleteUserAPIKeyRaw(
requestParameters: DeleteUserAPIKeyRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<runtime.ApiResponse<void>> {
if (requestParameters["id"] == null) {
throw new runtime.RequiredError(
"id",
'Required parameter "id" was null or undefined when calling deleteUserAPIKey().',
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] =
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
}
let urlPath = `/me/api-keys/{id}`;
urlPath = urlPath.replace(
`{${"id"}}`,
encodeURIComponent(String(requestParameters["id"])),
);
const response = await this.request(
{
path: urlPath,
method: "DELETE",
headers: headerParameters,
query: queryParameters,
},
initOverrides,
);
return new runtime.VoidApiResponse(response);
}
/**
* Delete a user API key
*/
async deleteUserAPIKey(
requestParameters: DeleteUserAPIKeyRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<void> {
await this.deleteUserAPIKeyRaw(requestParameters, initOverrides);
}
/**
* List my API keys
*/
async listUserAPIKeysRaw(
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<runtime.ApiResponse<Array<HandlersUserAPIKeyOut>>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-API-KEY"] =
await this.configuration.apiKey("X-API-KEY"); // ApiKeyAuth authentication
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] =
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
}
let urlPath = `/me/api-keys`;
const response = await this.request(
{
path: urlPath,
method: "GET",
headers: headerParameters,
query: queryParameters,
},
initOverrides,
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
jsonValue.map(HandlersUserAPIKeyOutFromJSON),
);
}
/**
* List my API keys
*/
async listUserAPIKeys(
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<Array<HandlersUserAPIKeyOut>> {
const response = await this.listUserAPIKeysRaw(initOverrides);
return await response.value();
}
}

143
sdk/ts/src/apis/MeApi.ts Normal file
View File

@@ -0,0 +1,143 @@
/* tslint:disable */
/* eslint-disable */
/**
* AutoGlue API
* API for managing K3s clusters across cloud providers
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import * as runtime from "../runtime";
import type {
HandlersMeResponse,
HandlersUpdateMeRequest,
ModelsUser,
} from "../models/index";
import {
HandlersMeResponseFromJSON,
HandlersMeResponseToJSON,
HandlersUpdateMeRequestFromJSON,
HandlersUpdateMeRequestToJSON,
ModelsUserFromJSON,
ModelsUserToJSON,
} from "../models/index";
export interface UpdateMeRequest {
body: HandlersUpdateMeRequest;
}
/**
*
*/
export class MeApi extends runtime.BaseAPI {
/**
* Get current user profile
*/
async getMeRaw(
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<runtime.ApiResponse<HandlersMeResponse>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-API-KEY"] =
await this.configuration.apiKey("X-API-KEY"); // ApiKeyAuth authentication
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] =
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
}
let urlPath = `/me`;
const response = await this.request(
{
path: urlPath,
method: "GET",
headers: headerParameters,
query: queryParameters,
},
initOverrides,
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
HandlersMeResponseFromJSON(jsonValue),
);
}
/**
* Get current user profile
*/
async getMe(
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<HandlersMeResponse> {
const response = await this.getMeRaw(initOverrides);
return await response.value();
}
/**
* Update current user profile
*/
async updateMeRaw(
requestParameters: UpdateMeRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<runtime.ApiResponse<ModelsUser>> {
if (requestParameters["body"] == null) {
throw new runtime.RequiredError(
"body",
'Required parameter "body" was null or undefined when calling updateMe().',
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters["Content-Type"] = "application/json";
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-API-KEY"] =
await this.configuration.apiKey("X-API-KEY"); // ApiKeyAuth authentication
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] =
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
}
let urlPath = `/me`;
const response = await this.request(
{
path: urlPath,
method: "PATCH",
headers: headerParameters,
query: queryParameters,
body: HandlersUpdateMeRequestToJSON(requestParameters["body"]),
},
initOverrides,
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
ModelsUserFromJSON(jsonValue),
);
}
/**
* Update current user profile
*/
async updateMe(
requestParameters: UpdateMeRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<ModelsUser> {
const response = await this.updateMeRaw(requestParameters, initOverrides);
return await response.value();
}
}

742
sdk/ts/src/apis/OrgsApi.ts Normal file
View File

@@ -0,0 +1,742 @@
/* tslint:disable */
/* eslint-disable */
/**
* AutoGlue API
* API for managing K3s clusters across cloud providers
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import * as runtime from "../runtime";
import type {
HandlersMemberOut,
HandlersMemberUpsertReq,
HandlersOrgCreateReq,
HandlersOrgKeyCreateReq,
HandlersOrgKeyCreateResp,
HandlersOrgUpdateReq,
ModelsAPIKey,
ModelsOrganization,
UtilsErrorResponse,
} from "../models/index";
import {
HandlersMemberOutFromJSON,
HandlersMemberOutToJSON,
HandlersMemberUpsertReqFromJSON,
HandlersMemberUpsertReqToJSON,
HandlersOrgCreateReqFromJSON,
HandlersOrgCreateReqToJSON,
HandlersOrgKeyCreateReqFromJSON,
HandlersOrgKeyCreateReqToJSON,
HandlersOrgKeyCreateRespFromJSON,
HandlersOrgKeyCreateRespToJSON,
HandlersOrgUpdateReqFromJSON,
HandlersOrgUpdateReqToJSON,
ModelsAPIKeyFromJSON,
ModelsAPIKeyToJSON,
ModelsOrganizationFromJSON,
ModelsOrganizationToJSON,
UtilsErrorResponseFromJSON,
UtilsErrorResponseToJSON,
} from "../models/index";
export interface AddOrUpdateMemberRequest {
id: string;
body: HandlersMemberUpsertReq;
}
export interface CreateOrgRequest {
body: HandlersOrgCreateReq;
}
export interface CreateOrgKeyRequest {
id: string;
body: HandlersOrgKeyCreateReq;
}
export interface DeleteOrgRequest {
id: string;
}
export interface DeleteOrgKeyRequest {
id: string;
keyId: string;
}
export interface GetOrgRequest {
id: string;
}
export interface ListMembersRequest {
id: string;
}
export interface ListOrgKeysRequest {
id: string;
}
export interface RemoveMemberRequest {
id: string;
userId: string;
}
export interface UpdateOrgRequest {
id: string;
body: HandlersOrgUpdateReq;
}
/**
*
*/
export class OrgsApi extends runtime.BaseAPI {
/**
* Add or update a member (owner/admin)
*/
async addOrUpdateMemberRaw(
requestParameters: AddOrUpdateMemberRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<runtime.ApiResponse<HandlersMemberOut>> {
if (requestParameters["id"] == null) {
throw new runtime.RequiredError(
"id",
'Required parameter "id" was null or undefined when calling addOrUpdateMember().',
);
}
if (requestParameters["body"] == null) {
throw new runtime.RequiredError(
"body",
'Required parameter "body" was null or undefined when calling addOrUpdateMember().',
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters["Content-Type"] = "application/json";
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] =
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
}
let urlPath = `/orgs/{id}/members`;
urlPath = urlPath.replace(
`{${"id"}}`,
encodeURIComponent(String(requestParameters["id"])),
);
const response = await this.request(
{
path: urlPath,
method: "POST",
headers: headerParameters,
query: queryParameters,
body: HandlersMemberUpsertReqToJSON(requestParameters["body"]),
},
initOverrides,
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
HandlersMemberOutFromJSON(jsonValue),
);
}
/**
* Add or update a member (owner/admin)
*/
async addOrUpdateMember(
requestParameters: AddOrUpdateMemberRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<HandlersMemberOut> {
const response = await this.addOrUpdateMemberRaw(
requestParameters,
initOverrides,
);
return await response.value();
}
/**
* Create organization
*/
async createOrgRaw(
requestParameters: CreateOrgRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<runtime.ApiResponse<ModelsOrganization>> {
if (requestParameters["body"] == null) {
throw new runtime.RequiredError(
"body",
'Required parameter "body" was null or undefined when calling createOrg().',
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters["Content-Type"] = "application/json";
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] =
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
}
let urlPath = `/orgs`;
const response = await this.request(
{
path: urlPath,
method: "POST",
headers: headerParameters,
query: queryParameters,
body: HandlersOrgCreateReqToJSON(requestParameters["body"]),
},
initOverrides,
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
ModelsOrganizationFromJSON(jsonValue),
);
}
/**
* Create organization
*/
async createOrg(
requestParameters: CreateOrgRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<ModelsOrganization> {
const response = await this.createOrgRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Create org key/secret pair (owner/admin)
*/
async createOrgKeyRaw(
requestParameters: CreateOrgKeyRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<runtime.ApiResponse<HandlersOrgKeyCreateResp>> {
if (requestParameters["id"] == null) {
throw new runtime.RequiredError(
"id",
'Required parameter "id" was null or undefined when calling createOrgKey().',
);
}
if (requestParameters["body"] == null) {
throw new runtime.RequiredError(
"body",
'Required parameter "body" was null or undefined when calling createOrgKey().',
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters["Content-Type"] = "application/json";
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] =
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
}
let urlPath = `/orgs/{id}/api-keys`;
urlPath = urlPath.replace(
`{${"id"}}`,
encodeURIComponent(String(requestParameters["id"])),
);
const response = await this.request(
{
path: urlPath,
method: "POST",
headers: headerParameters,
query: queryParameters,
body: HandlersOrgKeyCreateReqToJSON(requestParameters["body"]),
},
initOverrides,
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
HandlersOrgKeyCreateRespFromJSON(jsonValue),
);
}
/**
* Create org key/secret pair (owner/admin)
*/
async createOrgKey(
requestParameters: CreateOrgKeyRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<HandlersOrgKeyCreateResp> {
const response = await this.createOrgKeyRaw(
requestParameters,
initOverrides,
);
return await response.value();
}
/**
* Delete organization (owner)
*/
async deleteOrgRaw(
requestParameters: DeleteOrgRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<runtime.ApiResponse<void>> {
if (requestParameters["id"] == null) {
throw new runtime.RequiredError(
"id",
'Required parameter "id" was null or undefined when calling deleteOrg().',
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] =
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
}
let urlPath = `/orgs/{id}`;
urlPath = urlPath.replace(
`{${"id"}}`,
encodeURIComponent(String(requestParameters["id"])),
);
const response = await this.request(
{
path: urlPath,
method: "DELETE",
headers: headerParameters,
query: queryParameters,
},
initOverrides,
);
return new runtime.VoidApiResponse(response);
}
/**
* Delete organization (owner)
*/
async deleteOrg(
requestParameters: DeleteOrgRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<void> {
await this.deleteOrgRaw(requestParameters, initOverrides);
}
/**
* Delete org key (owner/admin)
*/
async deleteOrgKeyRaw(
requestParameters: DeleteOrgKeyRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<runtime.ApiResponse<void>> {
if (requestParameters["id"] == null) {
throw new runtime.RequiredError(
"id",
'Required parameter "id" was null or undefined when calling deleteOrgKey().',
);
}
if (requestParameters["keyId"] == null) {
throw new runtime.RequiredError(
"keyId",
'Required parameter "keyId" was null or undefined when calling deleteOrgKey().',
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] =
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
}
let urlPath = `/orgs/{id}/api-keys/{key_id}`;
urlPath = urlPath.replace(
`{${"id"}}`,
encodeURIComponent(String(requestParameters["id"])),
);
urlPath = urlPath.replace(
`{${"key_id"}}`,
encodeURIComponent(String(requestParameters["keyId"])),
);
const response = await this.request(
{
path: urlPath,
method: "DELETE",
headers: headerParameters,
query: queryParameters,
},
initOverrides,
);
return new runtime.VoidApiResponse(response);
}
/**
* Delete org key (owner/admin)
*/
async deleteOrgKey(
requestParameters: DeleteOrgKeyRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<void> {
await this.deleteOrgKeyRaw(requestParameters, initOverrides);
}
/**
* Get organization
*/
async getOrgRaw(
requestParameters: GetOrgRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<runtime.ApiResponse<ModelsOrganization>> {
if (requestParameters["id"] == null) {
throw new runtime.RequiredError(
"id",
'Required parameter "id" was null or undefined when calling getOrg().',
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] =
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
}
let urlPath = `/orgs/{id}`;
urlPath = urlPath.replace(
`{${"id"}}`,
encodeURIComponent(String(requestParameters["id"])),
);
const response = await this.request(
{
path: urlPath,
method: "GET",
headers: headerParameters,
query: queryParameters,
},
initOverrides,
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
ModelsOrganizationFromJSON(jsonValue),
);
}
/**
* Get organization
*/
async getOrg(
requestParameters: GetOrgRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<ModelsOrganization> {
const response = await this.getOrgRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* List members in org
*/
async listMembersRaw(
requestParameters: ListMembersRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<runtime.ApiResponse<Array<HandlersMemberOut>>> {
if (requestParameters["id"] == null) {
throw new runtime.RequiredError(
"id",
'Required parameter "id" was null or undefined when calling listMembers().',
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] =
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
}
let urlPath = `/orgs/{id}/members`;
urlPath = urlPath.replace(
`{${"id"}}`,
encodeURIComponent(String(requestParameters["id"])),
);
const response = await this.request(
{
path: urlPath,
method: "GET",
headers: headerParameters,
query: queryParameters,
},
initOverrides,
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
jsonValue.map(HandlersMemberOutFromJSON),
);
}
/**
* List members in org
*/
async listMembers(
requestParameters: ListMembersRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<Array<HandlersMemberOut>> {
const response = await this.listMembersRaw(
requestParameters,
initOverrides,
);
return await response.value();
}
/**
* List organizations I belong to
*/
async listMyOrgsRaw(
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<runtime.ApiResponse<Array<ModelsOrganization>>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] =
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
}
let urlPath = `/orgs`;
const response = await this.request(
{
path: urlPath,
method: "GET",
headers: headerParameters,
query: queryParameters,
},
initOverrides,
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
jsonValue.map(ModelsOrganizationFromJSON),
);
}
/**
* List organizations I belong to
*/
async listMyOrgs(
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<Array<ModelsOrganization>> {
const response = await this.listMyOrgsRaw(initOverrides);
return await response.value();
}
/**
* List org-scoped API keys (no secrets)
*/
async listOrgKeysRaw(
requestParameters: ListOrgKeysRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<runtime.ApiResponse<Array<ModelsAPIKey>>> {
if (requestParameters["id"] == null) {
throw new runtime.RequiredError(
"id",
'Required parameter "id" was null or undefined when calling listOrgKeys().',
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] =
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
}
let urlPath = `/orgs/{id}/api-keys`;
urlPath = urlPath.replace(
`{${"id"}}`,
encodeURIComponent(String(requestParameters["id"])),
);
const response = await this.request(
{
path: urlPath,
method: "GET",
headers: headerParameters,
query: queryParameters,
},
initOverrides,
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
jsonValue.map(ModelsAPIKeyFromJSON),
);
}
/**
* List org-scoped API keys (no secrets)
*/
async listOrgKeys(
requestParameters: ListOrgKeysRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<Array<ModelsAPIKey>> {
const response = await this.listOrgKeysRaw(
requestParameters,
initOverrides,
);
return await response.value();
}
/**
* Remove a member (owner/admin)
*/
async removeMemberRaw(
requestParameters: RemoveMemberRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<runtime.ApiResponse<void>> {
if (requestParameters["id"] == null) {
throw new runtime.RequiredError(
"id",
'Required parameter "id" was null or undefined when calling removeMember().',
);
}
if (requestParameters["userId"] == null) {
throw new runtime.RequiredError(
"userId",
'Required parameter "userId" was null or undefined when calling removeMember().',
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] =
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
}
let urlPath = `/orgs/{id}/members/{user_id}`;
urlPath = urlPath.replace(
`{${"id"}}`,
encodeURIComponent(String(requestParameters["id"])),
);
urlPath = urlPath.replace(
`{${"user_id"}}`,
encodeURIComponent(String(requestParameters["userId"])),
);
const response = await this.request(
{
path: urlPath,
method: "DELETE",
headers: headerParameters,
query: queryParameters,
},
initOverrides,
);
return new runtime.VoidApiResponse(response);
}
/**
* Remove a member (owner/admin)
*/
async removeMember(
requestParameters: RemoveMemberRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<void> {
await this.removeMemberRaw(requestParameters, initOverrides);
}
/**
* Update organization (owner/admin)
*/
async updateOrgRaw(
requestParameters: UpdateOrgRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<runtime.ApiResponse<ModelsOrganization>> {
if (requestParameters["id"] == null) {
throw new runtime.RequiredError(
"id",
'Required parameter "id" was null or undefined when calling updateOrg().',
);
}
if (requestParameters["body"] == null) {
throw new runtime.RequiredError(
"body",
'Required parameter "body" was null or undefined when calling updateOrg().',
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters["Content-Type"] = "application/json";
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] =
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
}
let urlPath = `/orgs/{id}`;
urlPath = urlPath.replace(
`{${"id"}}`,
encodeURIComponent(String(requestParameters["id"])),
);
const response = await this.request(
{
path: urlPath,
method: "PATCH",
headers: headerParameters,
query: queryParameters,
body: HandlersOrgUpdateReqToJSON(requestParameters["body"]),
},
initOverrides,
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
ModelsOrganizationFromJSON(jsonValue),
);
}
/**
* Update organization (owner/admin)
*/
async updateOrg(
requestParameters: UpdateOrgRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<ModelsOrganization> {
const response = await this.updateOrgRaw(requestParameters, initOverrides);
return await response.value();
}
}

View File

@@ -0,0 +1,435 @@
/* tslint:disable */
/* eslint-disable */
/**
* AutoGlue API
* API for managing K3s clusters across cloud providers
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import * as runtime from "../runtime";
import type {
DtoCreateServerRequest,
DtoServerResponse,
DtoUpdateServerRequest,
} from "../models/index";
import {
DtoCreateServerRequestFromJSON,
DtoCreateServerRequestToJSON,
DtoServerResponseFromJSON,
DtoServerResponseToJSON,
DtoUpdateServerRequestFromJSON,
DtoUpdateServerRequestToJSON,
} from "../models/index";
export interface CreateServerRequest {
body: DtoCreateServerRequest;
xOrgID?: string;
}
export interface DeleteServerRequest {
id: string;
xOrgID?: string;
}
export interface GetServerRequest {
id: string;
xOrgID?: string;
}
export interface ListServersRequest {
xOrgID?: string;
status?: string;
role?: string;
}
export interface UpdateServerRequest {
id: string;
body: DtoUpdateServerRequest;
xOrgID?: string;
}
/**
*
*/
export class ServersApi extends runtime.BaseAPI {
/**
* Creates a server bound to the org in X-Org-ID. Validates that ssh_key_id belongs to the org.
* Create server (org scoped)
*/
async createServerRaw(
requestParameters: CreateServerRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<runtime.ApiResponse<DtoServerResponse>> {
if (requestParameters["body"] == null) {
throw new runtime.RequiredError(
"body",
'Required parameter "body" was null or undefined when calling createServer().',
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters["Content-Type"] = "application/json";
if (requestParameters["xOrgID"] != null) {
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-ORG-KEY"] =
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-ORG-SECRET"] =
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] =
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
}
let urlPath = `/servers`;
const response = await this.request(
{
path: urlPath,
method: "POST",
headers: headerParameters,
query: queryParameters,
body: DtoCreateServerRequestToJSON(requestParameters["body"]),
},
initOverrides,
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
DtoServerResponseFromJSON(jsonValue),
);
}
/**
* Creates a server bound to the org in X-Org-ID. Validates that ssh_key_id belongs to the org.
* Create server (org scoped)
*/
async createServer(
requestParameters: CreateServerRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<DtoServerResponse> {
const response = await this.createServerRaw(
requestParameters,
initOverrides,
);
return await response.value();
}
/**
* Permanently deletes the server.
* Delete server (org scoped)
*/
async deleteServerRaw(
requestParameters: DeleteServerRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<runtime.ApiResponse<string>> {
if (requestParameters["id"] == null) {
throw new runtime.RequiredError(
"id",
'Required parameter "id" was null or undefined when calling deleteServer().',
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (requestParameters["xOrgID"] != null) {
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-ORG-KEY"] =
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-ORG-SECRET"] =
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] =
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
}
let urlPath = `/servers/{id}`;
urlPath = urlPath.replace(
`{${"id"}}`,
encodeURIComponent(String(requestParameters["id"])),
);
const response = await this.request(
{
path: urlPath,
method: "DELETE",
headers: headerParameters,
query: queryParameters,
},
initOverrides,
);
if (this.isJsonMime(response.headers.get("content-type"))) {
return new runtime.JSONApiResponse<string>(response);
} else {
return new runtime.TextApiResponse(response) as any;
}
}
/**
* Permanently deletes the server.
* Delete server (org scoped)
*/
async deleteServer(
requestParameters: DeleteServerRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<string> {
const response = await this.deleteServerRaw(
requestParameters,
initOverrides,
);
return await response.value();
}
/**
* Returns one server in the given organization.
* Get server by ID (org scoped)
*/
async getServerRaw(
requestParameters: GetServerRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<runtime.ApiResponse<DtoServerResponse>> {
if (requestParameters["id"] == null) {
throw new runtime.RequiredError(
"id",
'Required parameter "id" was null or undefined when calling getServer().',
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (requestParameters["xOrgID"] != null) {
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-ORG-KEY"] =
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-ORG-SECRET"] =
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] =
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
}
let urlPath = `/servers/{id}`;
urlPath = urlPath.replace(
`{${"id"}}`,
encodeURIComponent(String(requestParameters["id"])),
);
const response = await this.request(
{
path: urlPath,
method: "GET",
headers: headerParameters,
query: queryParameters,
},
initOverrides,
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
DtoServerResponseFromJSON(jsonValue),
);
}
/**
* Returns one server in the given organization.
* Get server by ID (org scoped)
*/
async getServer(
requestParameters: GetServerRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<DtoServerResponse> {
const response = await this.getServerRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Returns servers for the organization in X-Org-ID. Optional filters: status, role.
* List servers (org scoped)
*/
async listServersRaw(
requestParameters: ListServersRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<runtime.ApiResponse<Array<DtoServerResponse>>> {
const queryParameters: any = {};
if (requestParameters["status"] != null) {
queryParameters["status"] = requestParameters["status"];
}
if (requestParameters["role"] != null) {
queryParameters["role"] = requestParameters["role"];
}
const headerParameters: runtime.HTTPHeaders = {};
if (requestParameters["xOrgID"] != null) {
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-ORG-KEY"] =
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-ORG-SECRET"] =
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] =
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
}
let urlPath = `/servers`;
const response = await this.request(
{
path: urlPath,
method: "GET",
headers: headerParameters,
query: queryParameters,
},
initOverrides,
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
jsonValue.map(DtoServerResponseFromJSON),
);
}
/**
* Returns servers for the organization in X-Org-ID. Optional filters: status, role.
* List servers (org scoped)
*/
async listServers(
requestParameters: ListServersRequest = {},
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<Array<DtoServerResponse>> {
const response = await this.listServersRaw(
requestParameters,
initOverrides,
);
return await response.value();
}
/**
* Partially update fields; changing ssh_key_id validates ownership.
* Update server (org scoped)
*/
async updateServerRaw(
requestParameters: UpdateServerRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<runtime.ApiResponse<DtoServerResponse>> {
if (requestParameters["id"] == null) {
throw new runtime.RequiredError(
"id",
'Required parameter "id" was null or undefined when calling updateServer().',
);
}
if (requestParameters["body"] == null) {
throw new runtime.RequiredError(
"body",
'Required parameter "body" was null or undefined when calling updateServer().',
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters["Content-Type"] = "application/json";
if (requestParameters["xOrgID"] != null) {
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-ORG-KEY"] =
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-ORG-SECRET"] =
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] =
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
}
let urlPath = `/servers/{id}`;
urlPath = urlPath.replace(
`{${"id"}}`,
encodeURIComponent(String(requestParameters["id"])),
);
const response = await this.request(
{
path: urlPath,
method: "PATCH",
headers: headerParameters,
query: queryParameters,
body: DtoUpdateServerRequestToJSON(requestParameters["body"]),
},
initOverrides,
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
DtoServerResponseFromJSON(jsonValue),
);
}
/**
* Partially update fields; changing ssh_key_id validates ownership.
* Update server (org scoped)
*/
async updateServer(
requestParameters: UpdateServerRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<DtoServerResponse> {
const response = await this.updateServerRaw(
requestParameters,
initOverrides,
);
return await response.value();
}
}

451
sdk/ts/src/apis/SshApi.ts Normal file
View File

@@ -0,0 +1,451 @@
/* tslint:disable */
/* eslint-disable */
/**
* AutoGlue API
* API for managing K3s clusters across cloud providers
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import * as runtime from "../runtime";
import type {
DtoCreateSSHRequest,
DtoSshResponse,
DtoSshRevealResponse,
} from "../models/index";
import {
DtoCreateSSHRequestFromJSON,
DtoCreateSSHRequestToJSON,
DtoSshResponseFromJSON,
DtoSshResponseToJSON,
DtoSshRevealResponseFromJSON,
DtoSshRevealResponseToJSON,
} from "../models/index";
export interface CreateSSHKeyRequest {
body: DtoCreateSSHRequest;
xOrgID?: string;
}
export interface DeleteSSHKeyRequest {
id: string;
xOrgID?: string;
}
export interface DownloadSSHKeyRequest {
xOrgID: string;
id: string;
part: DownloadSSHKeyPartEnum;
}
export interface GetSSHKeyRequest {
id: string;
xOrgID?: string;
reveal?: boolean;
}
export interface ListPublicSshKeysRequest {
xOrgID?: string;
}
/**
*
*/
export class SshApi extends runtime.BaseAPI {
/**
* Generates an RSA or ED25519 keypair, saves it, and returns metadata. For RSA you may set bits (2048/3072/4096). Default is 4096. ED25519 ignores bits.
* Create ssh keypair (org scoped)
*/
async createSSHKeyRaw(
requestParameters: CreateSSHKeyRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<runtime.ApiResponse<DtoSshResponse>> {
if (requestParameters["body"] == null) {
throw new runtime.RequiredError(
"body",
'Required parameter "body" was null or undefined when calling createSSHKey().',
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters["Content-Type"] = "application/json";
if (requestParameters["xOrgID"] != null) {
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-ORG-KEY"] =
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-ORG-SECRET"] =
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] =
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
}
let urlPath = `/ssh`;
const response = await this.request(
{
path: urlPath,
method: "POST",
headers: headerParameters,
query: queryParameters,
body: DtoCreateSSHRequestToJSON(requestParameters["body"]),
},
initOverrides,
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
DtoSshResponseFromJSON(jsonValue),
);
}
/**
* Generates an RSA or ED25519 keypair, saves it, and returns metadata. For RSA you may set bits (2048/3072/4096). Default is 4096. ED25519 ignores bits.
* Create ssh keypair (org scoped)
*/
async createSSHKey(
requestParameters: CreateSSHKeyRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<DtoSshResponse> {
const response = await this.createSSHKeyRaw(
requestParameters,
initOverrides,
);
return await response.value();
}
/**
* Permanently deletes a keypair.
* Delete ssh keypair (org scoped)
*/
async deleteSSHKeyRaw(
requestParameters: DeleteSSHKeyRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<runtime.ApiResponse<string>> {
if (requestParameters["id"] == null) {
throw new runtime.RequiredError(
"id",
'Required parameter "id" was null or undefined when calling deleteSSHKey().',
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (requestParameters["xOrgID"] != null) {
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-ORG-KEY"] =
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-ORG-SECRET"] =
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] =
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
}
let urlPath = `/ssh/{id}`;
urlPath = urlPath.replace(
`{${"id"}}`,
encodeURIComponent(String(requestParameters["id"])),
);
const response = await this.request(
{
path: urlPath,
method: "DELETE",
headers: headerParameters,
query: queryParameters,
},
initOverrides,
);
if (this.isJsonMime(response.headers.get("content-type"))) {
return new runtime.JSONApiResponse<string>(response);
} else {
return new runtime.TextApiResponse(response) as any;
}
}
/**
* Permanently deletes a keypair.
* Delete ssh keypair (org scoped)
*/
async deleteSSHKey(
requestParameters: DeleteSSHKeyRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<string> {
const response = await this.deleteSSHKeyRaw(
requestParameters,
initOverrides,
);
return await response.value();
}
/**
* Download `part=public|private|both` of the keypair. `both` returns a zip file.
* Download ssh key files by ID (org scoped)
*/
async downloadSSHKeyRaw(
requestParameters: DownloadSSHKeyRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<runtime.ApiResponse<string>> {
if (requestParameters["xOrgID"] == null) {
throw new runtime.RequiredError(
"xOrgID",
'Required parameter "xOrgID" was null or undefined when calling downloadSSHKey().',
);
}
if (requestParameters["id"] == null) {
throw new runtime.RequiredError(
"id",
'Required parameter "id" was null or undefined when calling downloadSSHKey().',
);
}
if (requestParameters["part"] == null) {
throw new runtime.RequiredError(
"part",
'Required parameter "part" was null or undefined when calling downloadSSHKey().',
);
}
const queryParameters: any = {};
if (requestParameters["part"] != null) {
queryParameters["part"] = requestParameters["part"];
}
const headerParameters: runtime.HTTPHeaders = {};
if (requestParameters["xOrgID"] != null) {
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-ORG-KEY"] =
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-ORG-SECRET"] =
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] =
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
}
let urlPath = `/ssh/{id}/download`;
urlPath = urlPath.replace(
`{${"id"}}`,
encodeURIComponent(String(requestParameters["id"])),
);
const response = await this.request(
{
path: urlPath,
method: "GET",
headers: headerParameters,
query: queryParameters,
},
initOverrides,
);
if (this.isJsonMime(response.headers.get("content-type"))) {
return new runtime.JSONApiResponse<string>(response);
} else {
return new runtime.TextApiResponse(response) as any;
}
}
/**
* Download `part=public|private|both` of the keypair. `both` returns a zip file.
* Download ssh key files by ID (org scoped)
*/
async downloadSSHKey(
requestParameters: DownloadSSHKeyRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<string> {
const response = await this.downloadSSHKeyRaw(
requestParameters,
initOverrides,
);
return await response.value();
}
/**
* Returns public key fields. Append `?reveal=true` to include the private key PEM.
* Get ssh key by ID (org scoped)
*/
async getSSHKeyRaw(
requestParameters: GetSSHKeyRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<runtime.ApiResponse<DtoSshRevealResponse>> {
if (requestParameters["id"] == null) {
throw new runtime.RequiredError(
"id",
'Required parameter "id" was null or undefined when calling getSSHKey().',
);
}
const queryParameters: any = {};
if (requestParameters["reveal"] != null) {
queryParameters["reveal"] = requestParameters["reveal"];
}
const headerParameters: runtime.HTTPHeaders = {};
if (requestParameters["xOrgID"] != null) {
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-ORG-KEY"] =
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-ORG-SECRET"] =
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] =
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
}
let urlPath = `/ssh/{id}`;
urlPath = urlPath.replace(
`{${"id"}}`,
encodeURIComponent(String(requestParameters["id"])),
);
const response = await this.request(
{
path: urlPath,
method: "GET",
headers: headerParameters,
query: queryParameters,
},
initOverrides,
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
DtoSshRevealResponseFromJSON(jsonValue),
);
}
/**
* Returns public key fields. Append `?reveal=true` to include the private key PEM.
* Get ssh key by ID (org scoped)
*/
async getSSHKey(
requestParameters: GetSSHKeyRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<DtoSshRevealResponse> {
const response = await this.getSSHKeyRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Returns ssh keys for the organization in X-Org-ID.
* List ssh keys (org scoped)
*/
async listPublicSshKeysRaw(
requestParameters: ListPublicSshKeysRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<runtime.ApiResponse<Array<DtoSshResponse>>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (requestParameters["xOrgID"] != null) {
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-ORG-KEY"] =
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-ORG-SECRET"] =
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] =
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
}
let urlPath = `/ssh`;
const response = await this.request(
{
path: urlPath,
method: "GET",
headers: headerParameters,
query: queryParameters,
},
initOverrides,
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
jsonValue.map(DtoSshResponseFromJSON),
);
}
/**
* Returns ssh keys for the organization in X-Org-ID.
* List ssh keys (org scoped)
*/
async listPublicSshKeys(
requestParameters: ListPublicSshKeysRequest = {},
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<Array<DtoSshResponse>> {
const response = await this.listPublicSshKeysRaw(
requestParameters,
initOverrides,
);
return await response.value();
}
}
/**
* @export
*/
export const DownloadSSHKeyPartEnum = {
public: "public",
private: "private",
both: "both",
} as const;
export type DownloadSSHKeyPartEnum =
(typeof DownloadSSHKeyPartEnum)[keyof typeof DownloadSSHKeyPartEnum];

View File

@@ -0,0 +1,435 @@
/* tslint:disable */
/* eslint-disable */
/**
* AutoGlue API
* API for managing K3s clusters across cloud providers
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import * as runtime from "../runtime";
import type {
DtoCreateTaintRequest,
DtoTaintResponse,
DtoUpdateTaintRequest,
} from "../models/index";
import {
DtoCreateTaintRequestFromJSON,
DtoCreateTaintRequestToJSON,
DtoTaintResponseFromJSON,
DtoTaintResponseToJSON,
DtoUpdateTaintRequestFromJSON,
DtoUpdateTaintRequestToJSON,
} from "../models/index";
export interface CreateTaintRequest {
body: DtoCreateTaintRequest;
xOrgID?: string;
}
export interface DeleteTaintRequest {
id: string;
xOrgID?: string;
}
export interface GetTaintRequest {
id: string;
xOrgID?: string;
}
export interface ListTaintsRequest {
xOrgID?: string;
key?: string;
value?: string;
q?: string;
}
export interface UpdateTaintRequest {
id: string;
body: DtoUpdateTaintRequest;
xOrgID?: string;
}
/**
*
*/
export class TaintsApi extends runtime.BaseAPI {
/**
* Creates a taint.
* Create node taint (org scoped)
*/
async createTaintRaw(
requestParameters: CreateTaintRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<runtime.ApiResponse<DtoTaintResponse>> {
if (requestParameters["body"] == null) {
throw new runtime.RequiredError(
"body",
'Required parameter "body" was null or undefined when calling createTaint().',
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters["Content-Type"] = "application/json";
if (requestParameters["xOrgID"] != null) {
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-ORG-KEY"] =
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-ORG-SECRET"] =
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] =
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
}
let urlPath = `/taints`;
const response = await this.request(
{
path: urlPath,
method: "POST",
headers: headerParameters,
query: queryParameters,
body: DtoCreateTaintRequestToJSON(requestParameters["body"]),
},
initOverrides,
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
DtoTaintResponseFromJSON(jsonValue),
);
}
/**
* Creates a taint.
* Create node taint (org scoped)
*/
async createTaint(
requestParameters: CreateTaintRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<DtoTaintResponse> {
const response = await this.createTaintRaw(
requestParameters,
initOverrides,
);
return await response.value();
}
/**
* Permanently deletes the taint.
* Delete taint (org scoped)
*/
async deleteTaintRaw(
requestParameters: DeleteTaintRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<runtime.ApiResponse<string>> {
if (requestParameters["id"] == null) {
throw new runtime.RequiredError(
"id",
'Required parameter "id" was null or undefined when calling deleteTaint().',
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (requestParameters["xOrgID"] != null) {
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-ORG-KEY"] =
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-ORG-SECRET"] =
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] =
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
}
let urlPath = `/taints/{id}`;
urlPath = urlPath.replace(
`{${"id"}}`,
encodeURIComponent(String(requestParameters["id"])),
);
const response = await this.request(
{
path: urlPath,
method: "DELETE",
headers: headerParameters,
query: queryParameters,
},
initOverrides,
);
if (this.isJsonMime(response.headers.get("content-type"))) {
return new runtime.JSONApiResponse<string>(response);
} else {
return new runtime.TextApiResponse(response) as any;
}
}
/**
* Permanently deletes the taint.
* Delete taint (org scoped)
*/
async deleteTaint(
requestParameters: DeleteTaintRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<string> {
const response = await this.deleteTaintRaw(
requestParameters,
initOverrides,
);
return await response.value();
}
/**
* Get node taint by ID (org scoped)
*/
async getTaintRaw(
requestParameters: GetTaintRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<runtime.ApiResponse<DtoTaintResponse>> {
if (requestParameters["id"] == null) {
throw new runtime.RequiredError(
"id",
'Required parameter "id" was null or undefined when calling getTaint().',
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (requestParameters["xOrgID"] != null) {
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-ORG-KEY"] =
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-ORG-SECRET"] =
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] =
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
}
let urlPath = `/taints/{id}`;
urlPath = urlPath.replace(
`{${"id"}}`,
encodeURIComponent(String(requestParameters["id"])),
);
const response = await this.request(
{
path: urlPath,
method: "GET",
headers: headerParameters,
query: queryParameters,
},
initOverrides,
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
DtoTaintResponseFromJSON(jsonValue),
);
}
/**
* Get node taint by ID (org scoped)
*/
async getTaint(
requestParameters: GetTaintRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<DtoTaintResponse> {
const response = await this.getTaintRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Returns node taints for the organization in X-Org-ID. Filters: `key`, `value`, and `q` (key contains). Add `include=node_pools` to include linked node pools.
* List node pool taints (org scoped)
*/
async listTaintsRaw(
requestParameters: ListTaintsRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<runtime.ApiResponse<Array<DtoTaintResponse>>> {
const queryParameters: any = {};
if (requestParameters["key"] != null) {
queryParameters["key"] = requestParameters["key"];
}
if (requestParameters["value"] != null) {
queryParameters["value"] = requestParameters["value"];
}
if (requestParameters["q"] != null) {
queryParameters["q"] = requestParameters["q"];
}
const headerParameters: runtime.HTTPHeaders = {};
if (requestParameters["xOrgID"] != null) {
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-ORG-KEY"] =
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-ORG-SECRET"] =
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] =
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
}
let urlPath = `/taints`;
const response = await this.request(
{
path: urlPath,
method: "GET",
headers: headerParameters,
query: queryParameters,
},
initOverrides,
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
jsonValue.map(DtoTaintResponseFromJSON),
);
}
/**
* Returns node taints for the organization in X-Org-ID. Filters: `key`, `value`, and `q` (key contains). Add `include=node_pools` to include linked node pools.
* List node pool taints (org scoped)
*/
async listTaints(
requestParameters: ListTaintsRequest = {},
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<Array<DtoTaintResponse>> {
const response = await this.listTaintsRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Partially update taint fields.
* Update node taint (org scoped)
*/
async updateTaintRaw(
requestParameters: UpdateTaintRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<runtime.ApiResponse<DtoTaintResponse>> {
if (requestParameters["id"] == null) {
throw new runtime.RequiredError(
"id",
'Required parameter "id" was null or undefined when calling updateTaint().',
);
}
if (requestParameters["body"] == null) {
throw new runtime.RequiredError(
"body",
'Required parameter "body" was null or undefined when calling updateTaint().',
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters["Content-Type"] = "application/json";
if (requestParameters["xOrgID"] != null) {
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-ORG-KEY"] =
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-ORG-SECRET"] =
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
}
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] =
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
}
let urlPath = `/taints/{id}`;
urlPath = urlPath.replace(
`{${"id"}}`,
encodeURIComponent(String(requestParameters["id"])),
);
const response = await this.request(
{
path: urlPath,
method: "PATCH",
headers: headerParameters,
query: queryParameters,
body: DtoUpdateTaintRequestToJSON(requestParameters["body"]),
},
initOverrides,
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
DtoTaintResponseFromJSON(jsonValue),
);
}
/**
* Partially update taint fields.
* Update node taint (org scoped)
*/
async updateTaint(
requestParameters: UpdateTaintRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<DtoTaintResponse> {
const response = await this.updateTaintRaw(
requestParameters,
initOverrides,
);
return await response.value();
}
}

9
sdk/ts/src/apis/index.ts Normal file
View File

@@ -0,0 +1,9 @@
/* tslint:disable */
/* eslint-disable */
export * from "./AuthApi";
export * from "./MeApi";
export * from "./MeAPIKeysApi";
export * from "./OrgsApi";
export * from "./ServersApi";
export * from "./SshApi";
export * from "./TaintsApi";

5
sdk/ts/src/index.ts Normal file
View File

@@ -0,0 +1,5 @@
/* tslint:disable */
/* eslint-disable */
export * from "./runtime";
export * from "./apis/index";
export * from "./models/index";

View File

@@ -0,0 +1,70 @@
/* tslint:disable */
/* eslint-disable */
/**
* AutoGlue API
* API for managing K3s clusters across cloud providers
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from "../runtime";
/**
*
* @export
* @interface DtoAuthStartResponse
*/
export interface DtoAuthStartResponse {
/**
*
* @type {string}
* @memberof DtoAuthStartResponse
*/
auth_url?: string;
}
/**
* Check if a given object implements the DtoAuthStartResponse interface.
*/
export function instanceOfDtoAuthStartResponse(
value: object,
): value is DtoAuthStartResponse {
return true;
}
export function DtoAuthStartResponseFromJSON(json: any): DtoAuthStartResponse {
return DtoAuthStartResponseFromJSONTyped(json, false);
}
export function DtoAuthStartResponseFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): DtoAuthStartResponse {
if (json == null) {
return json;
}
return {
auth_url: json["auth_url"] == null ? undefined : json["auth_url"],
};
}
export function DtoAuthStartResponseToJSON(json: any): DtoAuthStartResponse {
return DtoAuthStartResponseToJSONTyped(json, false);
}
export function DtoAuthStartResponseToJSONTyped(
value?: DtoAuthStartResponse | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
auth_url: value["auth_url"],
};
}

View File

@@ -0,0 +1,94 @@
/* tslint:disable */
/* eslint-disable */
/**
* AutoGlue API
* API for managing K3s clusters across cloud providers
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from "../runtime";
/**
*
* @export
* @interface DtoCreateSSHRequest
*/
export interface DtoCreateSSHRequest {
/**
* Only for RSA
* @type {number}
* @memberof DtoCreateSSHRequest
*/
bits?: number;
/**
*
* @type {string}
* @memberof DtoCreateSSHRequest
*/
comment?: string;
/**
*
* @type {string}
* @memberof DtoCreateSSHRequest
*/
name?: string;
/**
* "rsa" (default) or "ed25519"
* @type {string}
* @memberof DtoCreateSSHRequest
*/
type?: string;
}
/**
* Check if a given object implements the DtoCreateSSHRequest interface.
*/
export function instanceOfDtoCreateSSHRequest(
value: object,
): value is DtoCreateSSHRequest {
return true;
}
export function DtoCreateSSHRequestFromJSON(json: any): DtoCreateSSHRequest {
return DtoCreateSSHRequestFromJSONTyped(json, false);
}
export function DtoCreateSSHRequestFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): DtoCreateSSHRequest {
if (json == null) {
return json;
}
return {
bits: json["bits"] == null ? undefined : json["bits"],
comment: json["comment"] == null ? undefined : json["comment"],
name: json["name"] == null ? undefined : json["name"],
type: json["type"] == null ? undefined : json["type"],
};
}
export function DtoCreateSSHRequestToJSON(json: any): DtoCreateSSHRequest {
return DtoCreateSSHRequestToJSONTyped(json, false);
}
export function DtoCreateSSHRequestToJSONTyped(
value?: DtoCreateSSHRequest | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
bits: value["bits"],
comment: value["comment"],
name: value["name"],
type: value["type"],
};
}

View File

@@ -0,0 +1,126 @@
/* tslint:disable */
/* eslint-disable */
/**
* AutoGlue API
* API for managing K3s clusters across cloud providers
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from "../runtime";
/**
*
* @export
* @interface DtoCreateServerRequest
*/
export interface DtoCreateServerRequest {
/**
*
* @type {string}
* @memberof DtoCreateServerRequest
*/
hostname?: string;
/**
*
* @type {string}
* @memberof DtoCreateServerRequest
*/
private_ip_address?: string;
/**
*
* @type {string}
* @memberof DtoCreateServerRequest
*/
public_ip_address?: string;
/**
*
* @type {string}
* @memberof DtoCreateServerRequest
*/
role?: string;
/**
*
* @type {string}
* @memberof DtoCreateServerRequest
*/
ssh_key_id?: string;
/**
*
* @type {string}
* @memberof DtoCreateServerRequest
*/
ssh_user?: string;
/**
*
* @type {string}
* @memberof DtoCreateServerRequest
*/
status?: string;
}
/**
* Check if a given object implements the DtoCreateServerRequest interface.
*/
export function instanceOfDtoCreateServerRequest(
value: object,
): value is DtoCreateServerRequest {
return true;
}
export function DtoCreateServerRequestFromJSON(
json: any,
): DtoCreateServerRequest {
return DtoCreateServerRequestFromJSONTyped(json, false);
}
export function DtoCreateServerRequestFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): DtoCreateServerRequest {
if (json == null) {
return json;
}
return {
hostname: json["hostname"] == null ? undefined : json["hostname"],
private_ip_address:
json["private_ip_address"] == null
? undefined
: json["private_ip_address"],
public_ip_address:
json["public_ip_address"] == null ? undefined : json["public_ip_address"],
role: json["role"] == null ? undefined : json["role"],
ssh_key_id: json["ssh_key_id"] == null ? undefined : json["ssh_key_id"],
ssh_user: json["ssh_user"] == null ? undefined : json["ssh_user"],
status: json["status"] == null ? undefined : json["status"],
};
}
export function DtoCreateServerRequestToJSON(
json: any,
): DtoCreateServerRequest {
return DtoCreateServerRequestToJSONTyped(json, false);
}
export function DtoCreateServerRequestToJSONTyped(
value?: DtoCreateServerRequest | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
hostname: value["hostname"],
private_ip_address: value["private_ip_address"],
public_ip_address: value["public_ip_address"],
role: value["role"],
ssh_key_id: value["ssh_key_id"],
ssh_user: value["ssh_user"],
status: value["status"],
};
}

View File

@@ -0,0 +1,88 @@
/* tslint:disable */
/* eslint-disable */
/**
* AutoGlue API
* API for managing K3s clusters across cloud providers
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from "../runtime";
/**
*
* @export
* @interface DtoCreateTaintRequest
*/
export interface DtoCreateTaintRequest {
/**
*
* @type {string}
* @memberof DtoCreateTaintRequest
*/
effect?: string;
/**
*
* @type {string}
* @memberof DtoCreateTaintRequest
*/
key?: string;
/**
*
* @type {string}
* @memberof DtoCreateTaintRequest
*/
value?: string;
}
/**
* Check if a given object implements the DtoCreateTaintRequest interface.
*/
export function instanceOfDtoCreateTaintRequest(
value: object,
): value is DtoCreateTaintRequest {
return true;
}
export function DtoCreateTaintRequestFromJSON(
json: any,
): DtoCreateTaintRequest {
return DtoCreateTaintRequestFromJSONTyped(json, false);
}
export function DtoCreateTaintRequestFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): DtoCreateTaintRequest {
if (json == null) {
return json;
}
return {
effect: json["effect"] == null ? undefined : json["effect"],
key: json["key"] == null ? undefined : json["key"],
value: json["value"] == null ? undefined : json["value"],
};
}
export function DtoCreateTaintRequestToJSON(json: any): DtoCreateTaintRequest {
return DtoCreateTaintRequestToJSONTyped(json, false);
}
export function DtoCreateTaintRequestToJSONTyped(
value?: DtoCreateTaintRequest | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
effect: value["effect"],
key: value["key"],
value: value["value"],
};
}

116
sdk/ts/src/models/DtoJWK.ts Normal file
View File

@@ -0,0 +1,116 @@
/* tslint:disable */
/* eslint-disable */
/**
* AutoGlue API
* API for managing K3s clusters across cloud providers
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from "../runtime";
/**
*
* @export
* @interface DtoJWK
*/
export interface DtoJWK {
/**
*
* @type {string}
* @memberof DtoJWK
*/
alg?: string;
/**
*
* @type {string}
* @memberof DtoJWK
*/
e?: string;
/**
*
* @type {string}
* @memberof DtoJWK
*/
kid?: string;
/**
*
* @type {string}
* @memberof DtoJWK
*/
kty?: string;
/**
*
* @type {string}
* @memberof DtoJWK
*/
n?: string;
/**
*
* @type {string}
* @memberof DtoJWK
*/
use?: string;
/**
*
* @type {string}
* @memberof DtoJWK
*/
x?: string;
}
/**
* Check if a given object implements the DtoJWK interface.
*/
export function instanceOfDtoJWK(value: object): value is DtoJWK {
return true;
}
export function DtoJWKFromJSON(json: any): DtoJWK {
return DtoJWKFromJSONTyped(json, false);
}
export function DtoJWKFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): DtoJWK {
if (json == null) {
return json;
}
return {
alg: json["alg"] == null ? undefined : json["alg"],
e: json["e"] == null ? undefined : json["e"],
kid: json["kid"] == null ? undefined : json["kid"],
kty: json["kty"] == null ? undefined : json["kty"],
n: json["n"] == null ? undefined : json["n"],
use: json["use"] == null ? undefined : json["use"],
x: json["x"] == null ? undefined : json["x"],
};
}
export function DtoJWKToJSON(json: any): DtoJWK {
return DtoJWKToJSONTyped(json, false);
}
export function DtoJWKToJSONTyped(
value?: DtoJWK | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
alg: value["alg"],
e: value["e"],
kid: value["kid"],
kty: value["kty"],
n: value["n"],
use: value["use"],
x: value["x"],
};
}

View File

@@ -0,0 +1,82 @@
/* tslint:disable */
/* eslint-disable */
/**
* AutoGlue API
* API for managing K3s clusters across cloud providers
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from "../runtime";
import type { DtoJWK } from "./DtoJWK";
import {
DtoJWKFromJSON,
DtoJWKFromJSONTyped,
DtoJWKToJSON,
DtoJWKToJSONTyped,
} from "./DtoJWK";
/**
*
* @export
* @interface DtoJWKS
*/
export interface DtoJWKS {
/**
*
* @type {Array<DtoJWK>}
* @memberof DtoJWKS
*/
keys?: Array<DtoJWK>;
}
/**
* Check if a given object implements the DtoJWKS interface.
*/
export function instanceOfDtoJWKS(value: object): value is DtoJWKS {
return true;
}
export function DtoJWKSFromJSON(json: any): DtoJWKS {
return DtoJWKSFromJSONTyped(json, false);
}
export function DtoJWKSFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): DtoJWKS {
if (json == null) {
return json;
}
return {
keys:
json["keys"] == null
? undefined
: (json["keys"] as Array<any>).map(DtoJWKFromJSON),
};
}
export function DtoJWKSToJSON(json: any): DtoJWKS {
return DtoJWKSToJSONTyped(json, false);
}
export function DtoJWKSToJSONTyped(
value?: DtoJWKS | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
keys:
value["keys"] == null
? undefined
: (value["keys"] as Array<any>).map(DtoJWKToJSON),
};
}

View File

@@ -0,0 +1,71 @@
/* tslint:disable */
/* eslint-disable */
/**
* AutoGlue API
* API for managing K3s clusters across cloud providers
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from "../runtime";
/**
*
* @export
* @interface DtoLogoutRequest
*/
export interface DtoLogoutRequest {
/**
*
* @type {string}
* @memberof DtoLogoutRequest
*/
refresh_token?: string;
}
/**
* Check if a given object implements the DtoLogoutRequest interface.
*/
export function instanceOfDtoLogoutRequest(
value: object,
): value is DtoLogoutRequest {
return true;
}
export function DtoLogoutRequestFromJSON(json: any): DtoLogoutRequest {
return DtoLogoutRequestFromJSONTyped(json, false);
}
export function DtoLogoutRequestFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): DtoLogoutRequest {
if (json == null) {
return json;
}
return {
refresh_token:
json["refresh_token"] == null ? undefined : json["refresh_token"],
};
}
export function DtoLogoutRequestToJSON(json: any): DtoLogoutRequest {
return DtoLogoutRequestToJSONTyped(json, false);
}
export function DtoLogoutRequestToJSONTyped(
value?: DtoLogoutRequest | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
refresh_token: value["refresh_token"],
};
}

View File

@@ -0,0 +1,71 @@
/* tslint:disable */
/* eslint-disable */
/**
* AutoGlue API
* API for managing K3s clusters across cloud providers
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from "../runtime";
/**
*
* @export
* @interface DtoRefreshRequest
*/
export interface DtoRefreshRequest {
/**
*
* @type {string}
* @memberof DtoRefreshRequest
*/
refresh_token?: string;
}
/**
* Check if a given object implements the DtoRefreshRequest interface.
*/
export function instanceOfDtoRefreshRequest(
value: object,
): value is DtoRefreshRequest {
return true;
}
export function DtoRefreshRequestFromJSON(json: any): DtoRefreshRequest {
return DtoRefreshRequestFromJSONTyped(json, false);
}
export function DtoRefreshRequestFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): DtoRefreshRequest {
if (json == null) {
return json;
}
return {
refresh_token:
json["refresh_token"] == null ? undefined : json["refresh_token"],
};
}
export function DtoRefreshRequestToJSON(json: any): DtoRefreshRequest {
return DtoRefreshRequestToJSONTyped(json, false);
}
export function DtoRefreshRequestToJSONTyped(
value?: DtoRefreshRequest | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
refresh_token: value["refresh_token"],
};
}

View File

@@ -0,0 +1,155 @@
/* tslint:disable */
/* eslint-disable */
/**
* AutoGlue API
* API for managing K3s clusters across cloud providers
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from "../runtime";
/**
*
* @export
* @interface DtoServerResponse
*/
export interface DtoServerResponse {
/**
*
* @type {string}
* @memberof DtoServerResponse
*/
created_at?: string;
/**
*
* @type {string}
* @memberof DtoServerResponse
*/
hostname?: string;
/**
*
* @type {string}
* @memberof DtoServerResponse
*/
id?: string;
/**
*
* @type {string}
* @memberof DtoServerResponse
*/
organization_id?: string;
/**
*
* @type {string}
* @memberof DtoServerResponse
*/
private_ip_address?: string;
/**
*
* @type {string}
* @memberof DtoServerResponse
*/
public_ip_address?: string;
/**
*
* @type {string}
* @memberof DtoServerResponse
*/
role?: string;
/**
*
* @type {string}
* @memberof DtoServerResponse
*/
ssh_key_id?: string;
/**
*
* @type {string}
* @memberof DtoServerResponse
*/
ssh_user?: string;
/**
*
* @type {string}
* @memberof DtoServerResponse
*/
status?: string;
/**
*
* @type {string}
* @memberof DtoServerResponse
*/
updated_at?: string;
}
/**
* Check if a given object implements the DtoServerResponse interface.
*/
export function instanceOfDtoServerResponse(
value: object,
): value is DtoServerResponse {
return true;
}
export function DtoServerResponseFromJSON(json: any): DtoServerResponse {
return DtoServerResponseFromJSONTyped(json, false);
}
export function DtoServerResponseFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): DtoServerResponse {
if (json == null) {
return json;
}
return {
created_at: json["created_at"] == null ? undefined : json["created_at"],
hostname: json["hostname"] == null ? undefined : json["hostname"],
id: json["id"] == null ? undefined : json["id"],
organization_id:
json["organization_id"] == null ? undefined : json["organization_id"],
private_ip_address:
json["private_ip_address"] == null
? undefined
: json["private_ip_address"],
public_ip_address:
json["public_ip_address"] == null ? undefined : json["public_ip_address"],
role: json["role"] == null ? undefined : json["role"],
ssh_key_id: json["ssh_key_id"] == null ? undefined : json["ssh_key_id"],
ssh_user: json["ssh_user"] == null ? undefined : json["ssh_user"],
status: json["status"] == null ? undefined : json["status"],
updated_at: json["updated_at"] == null ? undefined : json["updated_at"],
};
}
export function DtoServerResponseToJSON(json: any): DtoServerResponse {
return DtoServerResponseToJSONTyped(json, false);
}
export function DtoServerResponseToJSONTyped(
value?: DtoServerResponse | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
created_at: value["created_at"],
hostname: value["hostname"],
id: value["id"],
organization_id: value["organization_id"],
private_ip_address: value["private_ip_address"],
public_ip_address: value["public_ip_address"],
role: value["role"],
ssh_key_id: value["ssh_key_id"],
ssh_user: value["ssh_user"],
status: value["status"],
updated_at: value["updated_at"],
};
}

View File

@@ -0,0 +1,119 @@
/* tslint:disable */
/* eslint-disable */
/**
* AutoGlue API
* API for managing K3s clusters across cloud providers
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from "../runtime";
/**
*
* @export
* @interface DtoSshResponse
*/
export interface DtoSshResponse {
/**
*
* @type {string}
* @memberof DtoSshResponse
*/
created_at?: string;
/**
*
* @type {string}
* @memberof DtoSshResponse
*/
fingerprint?: string;
/**
*
* @type {string}
* @memberof DtoSshResponse
*/
id?: string;
/**
*
* @type {string}
* @memberof DtoSshResponse
*/
name?: string;
/**
*
* @type {string}
* @memberof DtoSshResponse
*/
organization_id?: string;
/**
*
* @type {string}
* @memberof DtoSshResponse
*/
public_key?: string;
/**
*
* @type {string}
* @memberof DtoSshResponse
*/
updated_at?: string;
}
/**
* Check if a given object implements the DtoSshResponse interface.
*/
export function instanceOfDtoSshResponse(
value: object,
): value is DtoSshResponse {
return true;
}
export function DtoSshResponseFromJSON(json: any): DtoSshResponse {
return DtoSshResponseFromJSONTyped(json, false);
}
export function DtoSshResponseFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): DtoSshResponse {
if (json == null) {
return json;
}
return {
created_at: json["created_at"] == null ? undefined : json["created_at"],
fingerprint: json["fingerprint"] == null ? undefined : json["fingerprint"],
id: json["id"] == null ? undefined : json["id"],
name: json["name"] == null ? undefined : json["name"],
organization_id:
json["organization_id"] == null ? undefined : json["organization_id"],
public_key: json["public_key"] == null ? undefined : json["public_key"],
updated_at: json["updated_at"] == null ? undefined : json["updated_at"],
};
}
export function DtoSshResponseToJSON(json: any): DtoSshResponse {
return DtoSshResponseToJSONTyped(json, false);
}
export function DtoSshResponseToJSONTyped(
value?: DtoSshResponse | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
created_at: value["created_at"],
fingerprint: value["fingerprint"],
id: value["id"],
name: value["name"],
organization_id: value["organization_id"],
public_key: value["public_key"],
updated_at: value["updated_at"],
};
}

View File

@@ -0,0 +1,127 @@
/* tslint:disable */
/* eslint-disable */
/**
* AutoGlue API
* API for managing K3s clusters across cloud providers
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from "../runtime";
/**
*
* @export
* @interface DtoSshRevealResponse
*/
export interface DtoSshRevealResponse {
/**
*
* @type {string}
* @memberof DtoSshRevealResponse
*/
created_at?: string;
/**
*
* @type {string}
* @memberof DtoSshRevealResponse
*/
fingerprint?: string;
/**
*
* @type {string}
* @memberof DtoSshRevealResponse
*/
id?: string;
/**
*
* @type {string}
* @memberof DtoSshRevealResponse
*/
name?: string;
/**
*
* @type {string}
* @memberof DtoSshRevealResponse
*/
organization_id?: string;
/**
*
* @type {string}
* @memberof DtoSshRevealResponse
*/
private_key?: string;
/**
*
* @type {string}
* @memberof DtoSshRevealResponse
*/
public_key?: string;
/**
*
* @type {string}
* @memberof DtoSshRevealResponse
*/
updated_at?: string;
}
/**
* Check if a given object implements the DtoSshRevealResponse interface.
*/
export function instanceOfDtoSshRevealResponse(
value: object,
): value is DtoSshRevealResponse {
return true;
}
export function DtoSshRevealResponseFromJSON(json: any): DtoSshRevealResponse {
return DtoSshRevealResponseFromJSONTyped(json, false);
}
export function DtoSshRevealResponseFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): DtoSshRevealResponse {
if (json == null) {
return json;
}
return {
created_at: json["created_at"] == null ? undefined : json["created_at"],
fingerprint: json["fingerprint"] == null ? undefined : json["fingerprint"],
id: json["id"] == null ? undefined : json["id"],
name: json["name"] == null ? undefined : json["name"],
organization_id:
json["organization_id"] == null ? undefined : json["organization_id"],
private_key: json["private_key"] == null ? undefined : json["private_key"],
public_key: json["public_key"] == null ? undefined : json["public_key"],
updated_at: json["updated_at"] == null ? undefined : json["updated_at"],
};
}
export function DtoSshRevealResponseToJSON(json: any): DtoSshRevealResponse {
return DtoSshRevealResponseToJSONTyped(json, false);
}
export function DtoSshRevealResponseToJSONTyped(
value?: DtoSshRevealResponse | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
created_at: value["created_at"],
fingerprint: value["fingerprint"],
id: value["id"],
name: value["name"],
organization_id: value["organization_id"],
private_key: value["private_key"],
public_key: value["public_key"],
updated_at: value["updated_at"],
};
}

View File

@@ -0,0 +1,94 @@
/* tslint:disable */
/* eslint-disable */
/**
* AutoGlue API
* API for managing K3s clusters across cloud providers
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from "../runtime";
/**
*
* @export
* @interface DtoTaintResponse
*/
export interface DtoTaintResponse {
/**
*
* @type {string}
* @memberof DtoTaintResponse
*/
effect?: string;
/**
*
* @type {string}
* @memberof DtoTaintResponse
*/
id?: string;
/**
*
* @type {string}
* @memberof DtoTaintResponse
*/
key?: string;
/**
*
* @type {string}
* @memberof DtoTaintResponse
*/
value?: string;
}
/**
* Check if a given object implements the DtoTaintResponse interface.
*/
export function instanceOfDtoTaintResponse(
value: object,
): value is DtoTaintResponse {
return true;
}
export function DtoTaintResponseFromJSON(json: any): DtoTaintResponse {
return DtoTaintResponseFromJSONTyped(json, false);
}
export function DtoTaintResponseFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): DtoTaintResponse {
if (json == null) {
return json;
}
return {
effect: json["effect"] == null ? undefined : json["effect"],
id: json["id"] == null ? undefined : json["id"],
key: json["key"] == null ? undefined : json["key"],
value: json["value"] == null ? undefined : json["value"],
};
}
export function DtoTaintResponseToJSON(json: any): DtoTaintResponse {
return DtoTaintResponseToJSONTyped(json, false);
}
export function DtoTaintResponseToJSONTyped(
value?: DtoTaintResponse | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
effect: value["effect"],
id: value["id"],
key: value["key"],
value: value["value"],
};
}

View File

@@ -0,0 +1,94 @@
/* tslint:disable */
/* eslint-disable */
/**
* AutoGlue API
* API for managing K3s clusters across cloud providers
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from "../runtime";
/**
*
* @export
* @interface DtoTokenPair
*/
export interface DtoTokenPair {
/**
*
* @type {string}
* @memberof DtoTokenPair
*/
access_token?: string;
/**
*
* @type {number}
* @memberof DtoTokenPair
*/
expires_in?: number;
/**
*
* @type {string}
* @memberof DtoTokenPair
*/
refresh_token?: string;
/**
*
* @type {string}
* @memberof DtoTokenPair
*/
token_type?: string;
}
/**
* Check if a given object implements the DtoTokenPair interface.
*/
export function instanceOfDtoTokenPair(value: object): value is DtoTokenPair {
return true;
}
export function DtoTokenPairFromJSON(json: any): DtoTokenPair {
return DtoTokenPairFromJSONTyped(json, false);
}
export function DtoTokenPairFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): DtoTokenPair {
if (json == null) {
return json;
}
return {
access_token:
json["access_token"] == null ? undefined : json["access_token"],
expires_in: json["expires_in"] == null ? undefined : json["expires_in"],
refresh_token:
json["refresh_token"] == null ? undefined : json["refresh_token"],
token_type: json["token_type"] == null ? undefined : json["token_type"],
};
}
export function DtoTokenPairToJSON(json: any): DtoTokenPair {
return DtoTokenPairToJSONTyped(json, false);
}
export function DtoTokenPairToJSONTyped(
value?: DtoTokenPair | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
access_token: value["access_token"],
expires_in: value["expires_in"],
refresh_token: value["refresh_token"],
token_type: value["token_type"],
};
}

View File

@@ -0,0 +1,126 @@
/* tslint:disable */
/* eslint-disable */
/**
* AutoGlue API
* API for managing K3s clusters across cloud providers
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from "../runtime";
/**
*
* @export
* @interface DtoUpdateServerRequest
*/
export interface DtoUpdateServerRequest {
/**
*
* @type {string}
* @memberof DtoUpdateServerRequest
*/
hostname?: string;
/**
*
* @type {string}
* @memberof DtoUpdateServerRequest
*/
private_ip_address?: string;
/**
*
* @type {string}
* @memberof DtoUpdateServerRequest
*/
public_ip_address?: string;
/**
*
* @type {string}
* @memberof DtoUpdateServerRequest
*/
role?: string;
/**
*
* @type {string}
* @memberof DtoUpdateServerRequest
*/
ssh_key_id?: string;
/**
*
* @type {string}
* @memberof DtoUpdateServerRequest
*/
ssh_user?: string;
/**
*
* @type {string}
* @memberof DtoUpdateServerRequest
*/
status?: string;
}
/**
* Check if a given object implements the DtoUpdateServerRequest interface.
*/
export function instanceOfDtoUpdateServerRequest(
value: object,
): value is DtoUpdateServerRequest {
return true;
}
export function DtoUpdateServerRequestFromJSON(
json: any,
): DtoUpdateServerRequest {
return DtoUpdateServerRequestFromJSONTyped(json, false);
}
export function DtoUpdateServerRequestFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): DtoUpdateServerRequest {
if (json == null) {
return json;
}
return {
hostname: json["hostname"] == null ? undefined : json["hostname"],
private_ip_address:
json["private_ip_address"] == null
? undefined
: json["private_ip_address"],
public_ip_address:
json["public_ip_address"] == null ? undefined : json["public_ip_address"],
role: json["role"] == null ? undefined : json["role"],
ssh_key_id: json["ssh_key_id"] == null ? undefined : json["ssh_key_id"],
ssh_user: json["ssh_user"] == null ? undefined : json["ssh_user"],
status: json["status"] == null ? undefined : json["status"],
};
}
export function DtoUpdateServerRequestToJSON(
json: any,
): DtoUpdateServerRequest {
return DtoUpdateServerRequestToJSONTyped(json, false);
}
export function DtoUpdateServerRequestToJSONTyped(
value?: DtoUpdateServerRequest | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
hostname: value["hostname"],
private_ip_address: value["private_ip_address"],
public_ip_address: value["public_ip_address"],
role: value["role"],
ssh_key_id: value["ssh_key_id"],
ssh_user: value["ssh_user"],
status: value["status"],
};
}

View File

@@ -0,0 +1,88 @@
/* tslint:disable */
/* eslint-disable */
/**
* AutoGlue API
* API for managing K3s clusters across cloud providers
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from "../runtime";
/**
*
* @export
* @interface DtoUpdateTaintRequest
*/
export interface DtoUpdateTaintRequest {
/**
*
* @type {string}
* @memberof DtoUpdateTaintRequest
*/
effect?: string;
/**
*
* @type {string}
* @memberof DtoUpdateTaintRequest
*/
key?: string;
/**
*
* @type {string}
* @memberof DtoUpdateTaintRequest
*/
value?: string;
}
/**
* Check if a given object implements the DtoUpdateTaintRequest interface.
*/
export function instanceOfDtoUpdateTaintRequest(
value: object,
): value is DtoUpdateTaintRequest {
return true;
}
export function DtoUpdateTaintRequestFromJSON(
json: any,
): DtoUpdateTaintRequest {
return DtoUpdateTaintRequestFromJSONTyped(json, false);
}
export function DtoUpdateTaintRequestFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): DtoUpdateTaintRequest {
if (json == null) {
return json;
}
return {
effect: json["effect"] == null ? undefined : json["effect"],
key: json["key"] == null ? undefined : json["key"],
value: json["value"] == null ? undefined : json["value"],
};
}
export function DtoUpdateTaintRequestToJSON(json: any): DtoUpdateTaintRequest {
return DtoUpdateTaintRequestToJSONTyped(json, false);
}
export function DtoUpdateTaintRequestToJSONTyped(
value?: DtoUpdateTaintRequest | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
effect: value["effect"],
key: value["key"],
value: value["value"],
};
}

View File

@@ -0,0 +1,83 @@
/* tslint:disable */
/* eslint-disable */
/**
* AutoGlue API
* API for managing K3s clusters across cloud providers
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from "../runtime";
/**
*
* @export
* @interface HandlersCreateUserKeyRequest
*/
export interface HandlersCreateUserKeyRequest {
/**
* optional TTL
* @type {number}
* @memberof HandlersCreateUserKeyRequest
*/
expires_in_hours?: number;
/**
*
* @type {string}
* @memberof HandlersCreateUserKeyRequest
*/
name?: string;
}
/**
* Check if a given object implements the HandlersCreateUserKeyRequest interface.
*/
export function instanceOfHandlersCreateUserKeyRequest(
value: object,
): value is HandlersCreateUserKeyRequest {
return true;
}
export function HandlersCreateUserKeyRequestFromJSON(
json: any,
): HandlersCreateUserKeyRequest {
return HandlersCreateUserKeyRequestFromJSONTyped(json, false);
}
export function HandlersCreateUserKeyRequestFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): HandlersCreateUserKeyRequest {
if (json == null) {
return json;
}
return {
expires_in_hours:
json["expires_in_hours"] == null ? undefined : json["expires_in_hours"],
name: json["name"] == null ? undefined : json["name"],
};
}
export function HandlersCreateUserKeyRequestToJSON(
json: any,
): HandlersCreateUserKeyRequest {
return HandlersCreateUserKeyRequestToJSONTyped(json, false);
}
export function HandlersCreateUserKeyRequestToJSONTyped(
value?: HandlersCreateUserKeyRequest | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
expires_in_hours: value["expires_in_hours"],
name: value["name"],
};
}

View File

@@ -0,0 +1,171 @@
/* tslint:disable */
/* eslint-disable */
/**
* AutoGlue API
* API for managing K3s clusters across cloud providers
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from "../runtime";
import type { ModelsUserEmail } from "./ModelsUserEmail";
import {
ModelsUserEmailFromJSON,
ModelsUserEmailFromJSONTyped,
ModelsUserEmailToJSON,
ModelsUserEmailToJSONTyped,
} from "./ModelsUserEmail";
import type { ModelsOrganization } from "./ModelsOrganization";
import {
ModelsOrganizationFromJSON,
ModelsOrganizationFromJSONTyped,
ModelsOrganizationToJSON,
ModelsOrganizationToJSONTyped,
} from "./ModelsOrganization";
/**
*
* @export
* @interface HandlersMeResponse
*/
export interface HandlersMeResponse {
/**
*
* @type {string}
* @memberof HandlersMeResponse
*/
avatar_url?: string;
/**
*
* @type {Date}
* @memberof HandlersMeResponse
*/
created_at?: Date;
/**
*
* @type {string}
* @memberof HandlersMeResponse
*/
display_name?: string;
/**
*
* @type {Array<ModelsUserEmail>}
* @memberof HandlersMeResponse
*/
emails?: Array<ModelsUserEmail>;
/**
* example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
* @type {string}
* @memberof HandlersMeResponse
*/
id?: string;
/**
*
* @type {boolean}
* @memberof HandlersMeResponse
*/
is_disabled?: boolean;
/**
*
* @type {Array<ModelsOrganization>}
* @memberof HandlersMeResponse
*/
organizations?: Array<ModelsOrganization>;
/**
*
* @type {string}
* @memberof HandlersMeResponse
*/
primary_email?: string;
/**
*
* @type {Date}
* @memberof HandlersMeResponse
*/
updated_at?: Date;
}
/**
* Check if a given object implements the HandlersMeResponse interface.
*/
export function instanceOfHandlersMeResponse(
value: object,
): value is HandlersMeResponse {
return true;
}
export function HandlersMeResponseFromJSON(json: any): HandlersMeResponse {
return HandlersMeResponseFromJSONTyped(json, false);
}
export function HandlersMeResponseFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): HandlersMeResponse {
if (json == null) {
return json;
}
return {
avatar_url: json["avatar_url"] == null ? undefined : json["avatar_url"],
created_at:
json["created_at"] == null ? undefined : new Date(json["created_at"]),
display_name:
json["display_name"] == null ? undefined : json["display_name"],
emails:
json["emails"] == null
? undefined
: (json["emails"] as Array<any>).map(ModelsUserEmailFromJSON),
id: json["id"] == null ? undefined : json["id"],
is_disabled: json["is_disabled"] == null ? undefined : json["is_disabled"],
organizations:
json["organizations"] == null
? undefined
: (json["organizations"] as Array<any>).map(ModelsOrganizationFromJSON),
primary_email:
json["primary_email"] == null ? undefined : json["primary_email"],
updated_at:
json["updated_at"] == null ? undefined : new Date(json["updated_at"]),
};
}
export function HandlersMeResponseToJSON(json: any): HandlersMeResponse {
return HandlersMeResponseToJSONTyped(json, false);
}
export function HandlersMeResponseToJSONTyped(
value?: HandlersMeResponse | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
avatar_url: value["avatar_url"],
created_at:
value["created_at"] == null
? value["created_at"]
: value["created_at"].toISOString(),
display_name: value["display_name"],
emails:
value["emails"] == null
? undefined
: (value["emails"] as Array<any>).map(ModelsUserEmailToJSON),
id: value["id"],
is_disabled: value["is_disabled"],
organizations:
value["organizations"] == null
? undefined
: (value["organizations"] as Array<any>).map(ModelsOrganizationToJSON),
primary_email: value["primary_email"],
updated_at:
value["updated_at"] == null
? value["updated_at"]
: value["updated_at"].toISOString(),
};
}

View File

@@ -0,0 +1,86 @@
/* tslint:disable */
/* eslint-disable */
/**
* AutoGlue API
* API for managing K3s clusters across cloud providers
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from "../runtime";
/**
*
* @export
* @interface HandlersMemberOut
*/
export interface HandlersMemberOut {
/**
*
* @type {string}
* @memberof HandlersMemberOut
*/
email?: string;
/**
* owner/admin/member
* @type {string}
* @memberof HandlersMemberOut
*/
role?: string;
/**
*
* @type {string}
* @memberof HandlersMemberOut
*/
user_id?: string;
}
/**
* Check if a given object implements the HandlersMemberOut interface.
*/
export function instanceOfHandlersMemberOut(
value: object,
): value is HandlersMemberOut {
return true;
}
export function HandlersMemberOutFromJSON(json: any): HandlersMemberOut {
return HandlersMemberOutFromJSONTyped(json, false);
}
export function HandlersMemberOutFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): HandlersMemberOut {
if (json == null) {
return json;
}
return {
email: json["email"] == null ? undefined : json["email"],
role: json["role"] == null ? undefined : json["role"],
user_id: json["user_id"] == null ? undefined : json["user_id"],
};
}
export function HandlersMemberOutToJSON(json: any): HandlersMemberOut {
return HandlersMemberOutToJSONTyped(json, false);
}
export function HandlersMemberOutToJSONTyped(
value?: HandlersMemberOut | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
email: value["email"],
role: value["role"],
user_id: value["user_id"],
};
}

View File

@@ -0,0 +1,82 @@
/* tslint:disable */
/* eslint-disable */
/**
* AutoGlue API
* API for managing K3s clusters across cloud providers
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from "../runtime";
/**
*
* @export
* @interface HandlersMemberUpsertReq
*/
export interface HandlersMemberUpsertReq {
/**
*
* @type {string}
* @memberof HandlersMemberUpsertReq
*/
role?: string;
/**
*
* @type {string}
* @memberof HandlersMemberUpsertReq
*/
user_id?: string;
}
/**
* Check if a given object implements the HandlersMemberUpsertReq interface.
*/
export function instanceOfHandlersMemberUpsertReq(
value: object,
): value is HandlersMemberUpsertReq {
return true;
}
export function HandlersMemberUpsertReqFromJSON(
json: any,
): HandlersMemberUpsertReq {
return HandlersMemberUpsertReqFromJSONTyped(json, false);
}
export function HandlersMemberUpsertReqFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): HandlersMemberUpsertReq {
if (json == null) {
return json;
}
return {
role: json["role"] == null ? undefined : json["role"],
user_id: json["user_id"] == null ? undefined : json["user_id"],
};
}
export function HandlersMemberUpsertReqToJSON(
json: any,
): HandlersMemberUpsertReq {
return HandlersMemberUpsertReqToJSONTyped(json, false);
}
export function HandlersMemberUpsertReqToJSONTyped(
value?: HandlersMemberUpsertReq | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
role: value["role"],
user_id: value["user_id"],
};
}

View File

@@ -0,0 +1,78 @@
/* tslint:disable */
/* eslint-disable */
/**
* AutoGlue API
* API for managing K3s clusters across cloud providers
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from "../runtime";
/**
*
* @export
* @interface HandlersOrgCreateReq
*/
export interface HandlersOrgCreateReq {
/**
*
* @type {string}
* @memberof HandlersOrgCreateReq
*/
domain?: string;
/**
*
* @type {string}
* @memberof HandlersOrgCreateReq
*/
name?: string;
}
/**
* Check if a given object implements the HandlersOrgCreateReq interface.
*/
export function instanceOfHandlersOrgCreateReq(
value: object,
): value is HandlersOrgCreateReq {
return true;
}
export function HandlersOrgCreateReqFromJSON(json: any): HandlersOrgCreateReq {
return HandlersOrgCreateReqFromJSONTyped(json, false);
}
export function HandlersOrgCreateReqFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): HandlersOrgCreateReq {
if (json == null) {
return json;
}
return {
domain: json["domain"] == null ? undefined : json["domain"],
name: json["name"] == null ? undefined : json["name"],
};
}
export function HandlersOrgCreateReqToJSON(json: any): HandlersOrgCreateReq {
return HandlersOrgCreateReqToJSONTyped(json, false);
}
export function HandlersOrgCreateReqToJSONTyped(
value?: HandlersOrgCreateReq | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
domain: value["domain"],
name: value["name"],
};
}

View File

@@ -0,0 +1,83 @@
/* tslint:disable */
/* eslint-disable */
/**
* AutoGlue API
* API for managing K3s clusters across cloud providers
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from "../runtime";
/**
*
* @export
* @interface HandlersOrgKeyCreateReq
*/
export interface HandlersOrgKeyCreateReq {
/**
*
* @type {number}
* @memberof HandlersOrgKeyCreateReq
*/
expires_in_hours?: number;
/**
*
* @type {string}
* @memberof HandlersOrgKeyCreateReq
*/
name?: string;
}
/**
* Check if a given object implements the HandlersOrgKeyCreateReq interface.
*/
export function instanceOfHandlersOrgKeyCreateReq(
value: object,
): value is HandlersOrgKeyCreateReq {
return true;
}
export function HandlersOrgKeyCreateReqFromJSON(
json: any,
): HandlersOrgKeyCreateReq {
return HandlersOrgKeyCreateReqFromJSONTyped(json, false);
}
export function HandlersOrgKeyCreateReqFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): HandlersOrgKeyCreateReq {
if (json == null) {
return json;
}
return {
expires_in_hours:
json["expires_in_hours"] == null ? undefined : json["expires_in_hours"],
name: json["name"] == null ? undefined : json["name"],
};
}
export function HandlersOrgKeyCreateReqToJSON(
json: any,
): HandlersOrgKeyCreateReq {
return HandlersOrgKeyCreateReqToJSONTyped(json, false);
}
export function HandlersOrgKeyCreateReqToJSONTyped(
value?: HandlersOrgKeyCreateReq | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
expires_in_hours: value["expires_in_hours"],
name: value["name"],
};
}

View File

@@ -0,0 +1,122 @@
/* tslint:disable */
/* eslint-disable */
/**
* AutoGlue API
* API for managing K3s clusters across cloud providers
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from "../runtime";
/**
*
* @export
* @interface HandlersOrgKeyCreateResp
*/
export interface HandlersOrgKeyCreateResp {
/**
*
* @type {string}
* @memberof HandlersOrgKeyCreateResp
*/
created_at?: string;
/**
*
* @type {string}
* @memberof HandlersOrgKeyCreateResp
*/
expires_at?: string;
/**
*
* @type {string}
* @memberof HandlersOrgKeyCreateResp
*/
id?: string;
/**
*
* @type {string}
* @memberof HandlersOrgKeyCreateResp
*/
name?: string;
/**
* shown once:
* @type {string}
* @memberof HandlersOrgKeyCreateResp
*/
org_key?: string;
/**
* shown once:
* @type {string}
* @memberof HandlersOrgKeyCreateResp
*/
org_secret?: string;
/**
* "org"
* @type {string}
* @memberof HandlersOrgKeyCreateResp
*/
scope?: string;
}
/**
* Check if a given object implements the HandlersOrgKeyCreateResp interface.
*/
export function instanceOfHandlersOrgKeyCreateResp(
value: object,
): value is HandlersOrgKeyCreateResp {
return true;
}
export function HandlersOrgKeyCreateRespFromJSON(
json: any,
): HandlersOrgKeyCreateResp {
return HandlersOrgKeyCreateRespFromJSONTyped(json, false);
}
export function HandlersOrgKeyCreateRespFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): HandlersOrgKeyCreateResp {
if (json == null) {
return json;
}
return {
created_at: json["created_at"] == null ? undefined : json["created_at"],
expires_at: json["expires_at"] == null ? undefined : json["expires_at"],
id: json["id"] == null ? undefined : json["id"],
name: json["name"] == null ? undefined : json["name"],
org_key: json["org_key"] == null ? undefined : json["org_key"],
org_secret: json["org_secret"] == null ? undefined : json["org_secret"],
scope: json["scope"] == null ? undefined : json["scope"],
};
}
export function HandlersOrgKeyCreateRespToJSON(
json: any,
): HandlersOrgKeyCreateResp {
return HandlersOrgKeyCreateRespToJSONTyped(json, false);
}
export function HandlersOrgKeyCreateRespToJSONTyped(
value?: HandlersOrgKeyCreateResp | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
created_at: value["created_at"],
expires_at: value["expires_at"],
id: value["id"],
name: value["name"],
org_key: value["org_key"],
org_secret: value["org_secret"],
scope: value["scope"],
};
}

View File

@@ -0,0 +1,78 @@
/* tslint:disable */
/* eslint-disable */
/**
* AutoGlue API
* API for managing K3s clusters across cloud providers
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from "../runtime";
/**
*
* @export
* @interface HandlersOrgUpdateReq
*/
export interface HandlersOrgUpdateReq {
/**
*
* @type {string}
* @memberof HandlersOrgUpdateReq
*/
domain?: string;
/**
*
* @type {string}
* @memberof HandlersOrgUpdateReq
*/
name?: string;
}
/**
* Check if a given object implements the HandlersOrgUpdateReq interface.
*/
export function instanceOfHandlersOrgUpdateReq(
value: object,
): value is HandlersOrgUpdateReq {
return true;
}
export function HandlersOrgUpdateReqFromJSON(json: any): HandlersOrgUpdateReq {
return HandlersOrgUpdateReqFromJSONTyped(json, false);
}
export function HandlersOrgUpdateReqFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): HandlersOrgUpdateReq {
if (json == null) {
return json;
}
return {
domain: json["domain"] == null ? undefined : json["domain"],
name: json["name"] == null ? undefined : json["name"],
};
}
export function HandlersOrgUpdateReqToJSON(json: any): HandlersOrgUpdateReq {
return HandlersOrgUpdateReqToJSONTyped(json, false);
}
export function HandlersOrgUpdateReqToJSONTyped(
value?: HandlersOrgUpdateReq | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
domain: value["domain"],
name: value["name"],
};
}

View File

@@ -0,0 +1,75 @@
/* tslint:disable */
/* eslint-disable */
/**
* AutoGlue API
* API for managing K3s clusters across cloud providers
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from "../runtime";
/**
*
* @export
* @interface HandlersUpdateMeRequest
*/
export interface HandlersUpdateMeRequest {
/**
*
* @type {string}
* @memberof HandlersUpdateMeRequest
*/
display_name?: string;
}
/**
* Check if a given object implements the HandlersUpdateMeRequest interface.
*/
export function instanceOfHandlersUpdateMeRequest(
value: object,
): value is HandlersUpdateMeRequest {
return true;
}
export function HandlersUpdateMeRequestFromJSON(
json: any,
): HandlersUpdateMeRequest {
return HandlersUpdateMeRequestFromJSONTyped(json, false);
}
export function HandlersUpdateMeRequestFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): HandlersUpdateMeRequest {
if (json == null) {
return json;
}
return {
display_name:
json["display_name"] == null ? undefined : json["display_name"],
};
}
export function HandlersUpdateMeRequestToJSON(
json: any,
): HandlersUpdateMeRequest {
return HandlersUpdateMeRequestToJSONTyped(json, false);
}
export function HandlersUpdateMeRequestToJSONTyped(
value?: HandlersUpdateMeRequest | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
display_name: value["display_name"],
};
}

View File

@@ -0,0 +1,121 @@
/* tslint:disable */
/* eslint-disable */
/**
* AutoGlue API
* API for managing K3s clusters across cloud providers
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from "../runtime";
/**
*
* @export
* @interface HandlersUserAPIKeyOut
*/
export interface HandlersUserAPIKeyOut {
/**
*
* @type {string}
* @memberof HandlersUserAPIKeyOut
*/
created_at?: string;
/**
*
* @type {string}
* @memberof HandlersUserAPIKeyOut
*/
expires_at?: string;
/**
*
* @type {string}
* @memberof HandlersUserAPIKeyOut
*/
id?: string;
/**
*
* @type {string}
* @memberof HandlersUserAPIKeyOut
*/
last_used_at?: string;
/**
*
* @type {string}
* @memberof HandlersUserAPIKeyOut
*/
name?: string;
/**
* Shown only on create:
* @type {string}
* @memberof HandlersUserAPIKeyOut
*/
plain?: string;
/**
* "user"
* @type {string}
* @memberof HandlersUserAPIKeyOut
*/
scope?: string;
}
/**
* Check if a given object implements the HandlersUserAPIKeyOut interface.
*/
export function instanceOfHandlersUserAPIKeyOut(
value: object,
): value is HandlersUserAPIKeyOut {
return true;
}
export function HandlersUserAPIKeyOutFromJSON(
json: any,
): HandlersUserAPIKeyOut {
return HandlersUserAPIKeyOutFromJSONTyped(json, false);
}
export function HandlersUserAPIKeyOutFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): HandlersUserAPIKeyOut {
if (json == null) {
return json;
}
return {
created_at: json["created_at"] == null ? undefined : json["created_at"],
expires_at: json["expires_at"] == null ? undefined : json["expires_at"],
id: json["id"] == null ? undefined : json["id"],
last_used_at:
json["last_used_at"] == null ? undefined : json["last_used_at"],
name: json["name"] == null ? undefined : json["name"],
plain: json["plain"] == null ? undefined : json["plain"],
scope: json["scope"] == null ? undefined : json["scope"],
};
}
export function HandlersUserAPIKeyOutToJSON(json: any): HandlersUserAPIKeyOut {
return HandlersUserAPIKeyOutToJSONTyped(json, false);
}
export function HandlersUserAPIKeyOutToJSONTyped(
value?: HandlersUserAPIKeyOut | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
created_at: value["created_at"],
expires_at: value["expires_at"],
id: value["id"],
last_used_at: value["last_used_at"],
name: value["name"],
plain: value["plain"],
scope: value["scope"],
};
}

View File

@@ -0,0 +1,164 @@
/* tslint:disable */
/* eslint-disable */
/**
* AutoGlue API
* API for managing K3s clusters across cloud providers
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from "../runtime";
/**
*
* @export
* @interface ModelsAPIKey
*/
export interface ModelsAPIKey {
/**
*
* @type {Date}
* @memberof ModelsAPIKey
*/
created_at?: Date;
/**
*
* @type {Date}
* @memberof ModelsAPIKey
*/
expires_at?: Date;
/**
*
* @type {string}
* @memberof ModelsAPIKey
*/
id?: string;
/**
*
* @type {Date}
* @memberof ModelsAPIKey
*/
last_used_at?: Date;
/**
*
* @type {string}
* @memberof ModelsAPIKey
*/
name?: string;
/**
*
* @type {string}
* @memberof ModelsAPIKey
*/
org_id?: string;
/**
*
* @type {string}
* @memberof ModelsAPIKey
*/
prefix?: string;
/**
*
* @type {boolean}
* @memberof ModelsAPIKey
*/
revoked?: boolean;
/**
*
* @type {string}
* @memberof ModelsAPIKey
*/
scope?: string;
/**
*
* @type {Date}
* @memberof ModelsAPIKey
*/
updated_at?: Date;
/**
*
* @type {string}
* @memberof ModelsAPIKey
*/
user_id?: string;
}
/**
* Check if a given object implements the ModelsAPIKey interface.
*/
export function instanceOfModelsAPIKey(value: object): value is ModelsAPIKey {
return true;
}
export function ModelsAPIKeyFromJSON(json: any): ModelsAPIKey {
return ModelsAPIKeyFromJSONTyped(json, false);
}
export function ModelsAPIKeyFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): ModelsAPIKey {
if (json == null) {
return json;
}
return {
created_at:
json["created_at"] == null ? undefined : new Date(json["created_at"]),
expires_at:
json["expires_at"] == null ? undefined : new Date(json["expires_at"]),
id: json["id"] == null ? undefined : json["id"],
last_used_at:
json["last_used_at"] == null ? undefined : new Date(json["last_used_at"]),
name: json["name"] == null ? undefined : json["name"],
org_id: json["org_id"] == null ? undefined : json["org_id"],
prefix: json["prefix"] == null ? undefined : json["prefix"],
revoked: json["revoked"] == null ? undefined : json["revoked"],
scope: json["scope"] == null ? undefined : json["scope"],
updated_at:
json["updated_at"] == null ? undefined : new Date(json["updated_at"]),
user_id: json["user_id"] == null ? undefined : json["user_id"],
};
}
export function ModelsAPIKeyToJSON(json: any): ModelsAPIKey {
return ModelsAPIKeyToJSONTyped(json, false);
}
export function ModelsAPIKeyToJSONTyped(
value?: ModelsAPIKey | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
created_at:
value["created_at"] == null
? value["created_at"]
: value["created_at"].toISOString(),
expires_at:
value["expires_at"] == null
? value["expires_at"]
: value["expires_at"].toISOString(),
id: value["id"],
last_used_at:
value["last_used_at"] == null
? value["last_used_at"]
: value["last_used_at"].toISOString(),
name: value["name"],
org_id: value["org_id"],
prefix: value["prefix"],
revoked: value["revoked"],
scope: value["scope"],
updated_at:
value["updated_at"] == null
? value["updated_at"]
: value["updated_at"].toISOString(),
user_id: value["user_id"],
};
}

View File

@@ -0,0 +1,110 @@
/* tslint:disable */
/* eslint-disable */
/**
* AutoGlue API
* API for managing K3s clusters across cloud providers
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from "../runtime";
/**
*
* @export
* @interface ModelsOrganization
*/
export interface ModelsOrganization {
/**
*
* @type {Date}
* @memberof ModelsOrganization
*/
created_at?: Date;
/**
*
* @type {string}
* @memberof ModelsOrganization
*/
domain?: string;
/**
* example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
* @type {string}
* @memberof ModelsOrganization
*/
id?: string;
/**
*
* @type {string}
* @memberof ModelsOrganization
*/
name?: string;
/**
*
* @type {Date}
* @memberof ModelsOrganization
*/
updated_at?: Date;
}
/**
* Check if a given object implements the ModelsOrganization interface.
*/
export function instanceOfModelsOrganization(
value: object,
): value is ModelsOrganization {
return true;
}
export function ModelsOrganizationFromJSON(json: any): ModelsOrganization {
return ModelsOrganizationFromJSONTyped(json, false);
}
export function ModelsOrganizationFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): ModelsOrganization {
if (json == null) {
return json;
}
return {
created_at:
json["created_at"] == null ? undefined : new Date(json["created_at"]),
domain: json["domain"] == null ? undefined : json["domain"],
id: json["id"] == null ? undefined : json["id"],
name: json["name"] == null ? undefined : json["name"],
updated_at:
json["updated_at"] == null ? undefined : new Date(json["updated_at"]),
};
}
export function ModelsOrganizationToJSON(json: any): ModelsOrganization {
return ModelsOrganizationToJSONTyped(json, false);
}
export function ModelsOrganizationToJSONTyped(
value?: ModelsOrganization | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
created_at:
value["created_at"] == null
? value["created_at"]
: value["created_at"].toISOString(),
domain: value["domain"],
id: value["id"],
name: value["name"],
updated_at:
value["updated_at"] == null
? value["updated_at"]
: value["updated_at"].toISOString(),
};
}

View File

@@ -0,0 +1,126 @@
/* tslint:disable */
/* eslint-disable */
/**
* AutoGlue API
* API for managing K3s clusters across cloud providers
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from "../runtime";
/**
*
* @export
* @interface ModelsUser
*/
export interface ModelsUser {
/**
*
* @type {string}
* @memberof ModelsUser
*/
avatar_url?: string;
/**
*
* @type {Date}
* @memberof ModelsUser
*/
created_at?: Date;
/**
*
* @type {string}
* @memberof ModelsUser
*/
display_name?: string;
/**
* example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
* @type {string}
* @memberof ModelsUser
*/
id?: string;
/**
*
* @type {boolean}
* @memberof ModelsUser
*/
is_disabled?: boolean;
/**
*
* @type {string}
* @memberof ModelsUser
*/
primary_email?: string;
/**
*
* @type {Date}
* @memberof ModelsUser
*/
updated_at?: Date;
}
/**
* Check if a given object implements the ModelsUser interface.
*/
export function instanceOfModelsUser(value: object): value is ModelsUser {
return true;
}
export function ModelsUserFromJSON(json: any): ModelsUser {
return ModelsUserFromJSONTyped(json, false);
}
export function ModelsUserFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): ModelsUser {
if (json == null) {
return json;
}
return {
avatar_url: json["avatar_url"] == null ? undefined : json["avatar_url"],
created_at:
json["created_at"] == null ? undefined : new Date(json["created_at"]),
display_name:
json["display_name"] == null ? undefined : json["display_name"],
id: json["id"] == null ? undefined : json["id"],
is_disabled: json["is_disabled"] == null ? undefined : json["is_disabled"],
primary_email:
json["primary_email"] == null ? undefined : json["primary_email"],
updated_at:
json["updated_at"] == null ? undefined : new Date(json["updated_at"]),
};
}
export function ModelsUserToJSON(json: any): ModelsUser {
return ModelsUserToJSONTyped(json, false);
}
export function ModelsUserToJSONTyped(
value?: ModelsUser | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
avatar_url: value["avatar_url"],
created_at:
value["created_at"] == null
? value["created_at"]
: value["created_at"].toISOString(),
display_name: value["display_name"],
id: value["id"],
is_disabled: value["is_disabled"],
primary_email: value["primary_email"],
updated_at:
value["updated_at"] == null
? value["updated_at"]
: value["updated_at"].toISOString(),
};
}

View File

@@ -0,0 +1,142 @@
/* tslint:disable */
/* eslint-disable */
/**
* AutoGlue API
* API for managing K3s clusters across cloud providers
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from "../runtime";
import type { ModelsUser } from "./ModelsUser";
import {
ModelsUserFromJSON,
ModelsUserFromJSONTyped,
ModelsUserToJSON,
ModelsUserToJSONTyped,
} from "./ModelsUser";
/**
*
* @export
* @interface ModelsUserEmail
*/
export interface ModelsUserEmail {
/**
*
* @type {Date}
* @memberof ModelsUserEmail
*/
created_at?: Date;
/**
*
* @type {string}
* @memberof ModelsUserEmail
*/
email?: string;
/**
* example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
* @type {string}
* @memberof ModelsUserEmail
*/
id?: string;
/**
*
* @type {boolean}
* @memberof ModelsUserEmail
*/
is_primary?: boolean;
/**
*
* @type {boolean}
* @memberof ModelsUserEmail
*/
is_verified?: boolean;
/**
*
* @type {Date}
* @memberof ModelsUserEmail
*/
updated_at?: Date;
/**
*
* @type {ModelsUser}
* @memberof ModelsUserEmail
*/
user?: ModelsUser;
/**
*
* @type {string}
* @memberof ModelsUserEmail
*/
user_id?: string;
}
/**
* Check if a given object implements the ModelsUserEmail interface.
*/
export function instanceOfModelsUserEmail(
value: object,
): value is ModelsUserEmail {
return true;
}
export function ModelsUserEmailFromJSON(json: any): ModelsUserEmail {
return ModelsUserEmailFromJSONTyped(json, false);
}
export function ModelsUserEmailFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): ModelsUserEmail {
if (json == null) {
return json;
}
return {
created_at:
json["created_at"] == null ? undefined : new Date(json["created_at"]),
email: json["email"] == null ? undefined : json["email"],
id: json["id"] == null ? undefined : json["id"],
is_primary: json["is_primary"] == null ? undefined : json["is_primary"],
is_verified: json["is_verified"] == null ? undefined : json["is_verified"],
updated_at:
json["updated_at"] == null ? undefined : new Date(json["updated_at"]),
user: json["user"] == null ? undefined : ModelsUserFromJSON(json["user"]),
user_id: json["user_id"] == null ? undefined : json["user_id"],
};
}
export function ModelsUserEmailToJSON(json: any): ModelsUserEmail {
return ModelsUserEmailToJSONTyped(json, false);
}
export function ModelsUserEmailToJSONTyped(
value?: ModelsUserEmail | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
created_at:
value["created_at"] == null
? value["created_at"]
: value["created_at"].toISOString(),
email: value["email"],
id: value["id"],
is_primary: value["is_primary"],
is_verified: value["is_verified"],
updated_at:
value["updated_at"] == null
? value["updated_at"]
: value["updated_at"].toISOString(),
user: ModelsUserToJSON(value["user"]),
user_id: value["user_id"],
};
}

View File

@@ -0,0 +1,80 @@
/* tslint:disable */
/* eslint-disable */
/**
* AutoGlue API
* API for managing K3s clusters across cloud providers
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from "../runtime";
/**
*
* @export
* @interface UtilsErrorResponse
*/
export interface UtilsErrorResponse {
/**
* A machine-readable error code, e.g. "validation_error"
* example: validation_error
* @type {string}
* @memberof UtilsErrorResponse
*/
code?: string;
/**
* Human-readable message
* example: slug is required
* @type {string}
* @memberof UtilsErrorResponse
*/
message?: string;
}
/**
* Check if a given object implements the UtilsErrorResponse interface.
*/
export function instanceOfUtilsErrorResponse(
value: object,
): value is UtilsErrorResponse {
return true;
}
export function UtilsErrorResponseFromJSON(json: any): UtilsErrorResponse {
return UtilsErrorResponseFromJSONTyped(json, false);
}
export function UtilsErrorResponseFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): UtilsErrorResponse {
if (json == null) {
return json;
}
return {
code: json["code"] == null ? undefined : json["code"],
message: json["message"] == null ? undefined : json["message"],
};
}
export function UtilsErrorResponseToJSON(json: any): UtilsErrorResponse {
return UtilsErrorResponseToJSONTyped(json, false);
}
export function UtilsErrorResponseToJSONTyped(
value?: UtilsErrorResponse | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
code: value["code"],
message: value["message"],
};
}

View File

@@ -0,0 +1,32 @@
/* tslint:disable */
/* eslint-disable */
export * from "./DtoAuthStartResponse";
export * from "./DtoCreateSSHRequest";
export * from "./DtoCreateServerRequest";
export * from "./DtoCreateTaintRequest";
export * from "./DtoJWK";
export * from "./DtoJWKS";
export * from "./DtoLogoutRequest";
export * from "./DtoRefreshRequest";
export * from "./DtoServerResponse";
export * from "./DtoSshResponse";
export * from "./DtoSshRevealResponse";
export * from "./DtoTaintResponse";
export * from "./DtoTokenPair";
export * from "./DtoUpdateServerRequest";
export * from "./DtoUpdateTaintRequest";
export * from "./HandlersCreateUserKeyRequest";
export * from "./HandlersMeResponse";
export * from "./HandlersMemberOut";
export * from "./HandlersMemberUpsertReq";
export * from "./HandlersOrgCreateReq";
export * from "./HandlersOrgKeyCreateReq";
export * from "./HandlersOrgKeyCreateResp";
export * from "./HandlersOrgUpdateReq";
export * from "./HandlersUpdateMeRequest";
export * from "./HandlersUserAPIKeyOut";
export * from "./ModelsAPIKey";
export * from "./ModelsOrganization";
export * from "./ModelsUser";
export * from "./ModelsUserEmail";
export * from "./UtilsErrorResponse";

530
sdk/ts/src/runtime.ts Normal file
View File

@@ -0,0 +1,530 @@
/* tslint:disable */
/* eslint-disable */
/**
* AutoGlue API
* API for managing K3s clusters across cloud providers
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export const BASE_PATH = "http://localhost:8080/api/v1".replace(/\/+$/, "");
export interface ConfigurationParameters {
basePath?: string; // override base path
fetchApi?: FetchAPI; // override for fetch implementation
middleware?: Middleware[]; // middleware to apply before/after fetch requests
queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings
username?: string; // parameter for basic security
password?: string; // parameter for basic security
apiKey?:
| string
| Promise<string>
| ((name: string) => string | Promise<string>); // parameter for apiKey security
accessToken?:
| string
| Promise<string>
| ((name?: string, scopes?: string[]) => string | Promise<string>); // parameter for oauth2 security
headers?: HTTPHeaders; //header params we want to use on every request
credentials?: RequestCredentials; //value for the credentials param we want to use on each request
}
export class Configuration {
constructor(private configuration: ConfigurationParameters = {}) {}
set config(configuration: Configuration) {
this.configuration = configuration;
}
get basePath(): string {
return this.configuration.basePath != null
? this.configuration.basePath
: BASE_PATH;
}
get fetchApi(): FetchAPI | undefined {
return this.configuration.fetchApi;
}
get middleware(): Middleware[] {
return this.configuration.middleware || [];
}
get queryParamsStringify(): (params: HTTPQuery) => string {
return this.configuration.queryParamsStringify || querystring;
}
get username(): string | undefined {
return this.configuration.username;
}
get password(): string | undefined {
return this.configuration.password;
}
get apiKey(): ((name: string) => string | Promise<string>) | undefined {
const apiKey = this.configuration.apiKey;
if (apiKey) {
return typeof apiKey === "function" ? apiKey : () => apiKey;
}
return undefined;
}
get accessToken():
| ((name?: string, scopes?: string[]) => string | Promise<string>)
| undefined {
const accessToken = this.configuration.accessToken;
if (accessToken) {
return typeof accessToken === "function"
? accessToken
: async () => accessToken;
}
return undefined;
}
get headers(): HTTPHeaders | undefined {
return this.configuration.headers;
}
get credentials(): RequestCredentials | undefined {
return this.configuration.credentials;
}
}
export const DefaultConfig = new Configuration();
/**
* This is the base class for all generated API classes.
*/
export class BaseAPI {
private static readonly jsonRegex = new RegExp(
"^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$",
"i",
);
private middleware: Middleware[];
constructor(protected configuration = DefaultConfig) {
this.middleware = configuration.middleware;
}
withMiddleware<T extends BaseAPI>(this: T, ...middlewares: Middleware[]) {
const next = this.clone<T>();
next.middleware = next.middleware.concat(...middlewares);
return next;
}
withPreMiddleware<T extends BaseAPI>(
this: T,
...preMiddlewares: Array<Middleware["pre"]>
) {
const middlewares = preMiddlewares.map((pre) => ({ pre }));
return this.withMiddleware<T>(...middlewares);
}
withPostMiddleware<T extends BaseAPI>(
this: T,
...postMiddlewares: Array<Middleware["post"]>
) {
const middlewares = postMiddlewares.map((post) => ({ post }));
return this.withMiddleware<T>(...middlewares);
}
/**
* Check if the given MIME is a JSON MIME.
* JSON MIME examples:
* application/json
* application/json; charset=UTF8
* APPLICATION/JSON
* application/vnd.company+json
* @param mime - MIME (Multipurpose Internet Mail Extensions)
* @return True if the given MIME is JSON, false otherwise.
*/
protected isJsonMime(mime: string | null | undefined): boolean {
if (!mime) {
return false;
}
return BaseAPI.jsonRegex.test(mime);
}
protected async request(
context: RequestOpts,
initOverrides?: RequestInit | InitOverrideFunction,
): Promise<Response> {
const { url, init } = await this.createFetchParams(context, initOverrides);
const response = await this.fetchApi(url, init);
if (response && response.status >= 200 && response.status < 300) {
return response;
}
throw new ResponseError(response, "Response returned an error code");
}
private async createFetchParams(
context: RequestOpts,
initOverrides?: RequestInit | InitOverrideFunction,
) {
let url = this.configuration.basePath + context.path;
if (
context.query !== undefined &&
Object.keys(context.query).length !== 0
) {
// only add the querystring to the URL if there are query parameters.
// this is done to avoid urls ending with a "?" character which buggy webservers
// do not handle correctly sometimes.
url += "?" + this.configuration.queryParamsStringify(context.query);
}
const headers = Object.assign(
{},
this.configuration.headers,
context.headers,
);
Object.keys(headers).forEach((key) =>
headers[key] === undefined ? delete headers[key] : {},
);
const initOverrideFn =
typeof initOverrides === "function"
? initOverrides
: async () => initOverrides;
const initParams = {
method: context.method,
headers,
body: context.body,
credentials: this.configuration.credentials,
};
const overriddenInit: RequestInit = {
...initParams,
...(await initOverrideFn({
init: initParams,
context,
})),
};
let body: any;
if (
isFormData(overriddenInit.body) ||
overriddenInit.body instanceof URLSearchParams ||
isBlob(overriddenInit.body)
) {
body = overriddenInit.body;
} else if (this.isJsonMime(headers["Content-Type"])) {
body = JSON.stringify(overriddenInit.body);
} else {
body = overriddenInit.body;
}
const init: RequestInit = {
...overriddenInit,
body,
};
return { url, init };
}
private fetchApi = async (url: string, init: RequestInit) => {
let fetchParams = { url, init };
for (const middleware of this.middleware) {
if (middleware.pre) {
fetchParams =
(await middleware.pre({
fetch: this.fetchApi,
...fetchParams,
})) || fetchParams;
}
}
let response: Response | undefined = undefined;
try {
response = await (this.configuration.fetchApi || fetch)(
fetchParams.url,
fetchParams.init,
);
} catch (e) {
for (const middleware of this.middleware) {
if (middleware.onError) {
response =
(await middleware.onError({
fetch: this.fetchApi,
url: fetchParams.url,
init: fetchParams.init,
error: e,
response: response ? response.clone() : undefined,
})) || response;
}
}
if (response === undefined) {
if (e instanceof Error) {
throw new FetchError(
e,
"The request failed and the interceptors did not return an alternative response",
);
} else {
throw e;
}
}
}
for (const middleware of this.middleware) {
if (middleware.post) {
response =
(await middleware.post({
fetch: this.fetchApi,
url: fetchParams.url,
init: fetchParams.init,
response: response.clone(),
})) || response;
}
}
return response;
};
/**
* Create a shallow clone of `this` by constructing a new instance
* and then shallow cloning data members.
*/
private clone<T extends BaseAPI>(this: T): T {
const constructor = this.constructor as any;
const next = new constructor(this.configuration);
next.middleware = this.middleware.slice();
return next;
}
}
function isBlob(value: any): value is Blob {
return typeof Blob !== "undefined" && value instanceof Blob;
}
function isFormData(value: any): value is FormData {
return typeof FormData !== "undefined" && value instanceof FormData;
}
export class ResponseError extends Error {
override name: "ResponseError" = "ResponseError";
constructor(
public response: Response,
msg?: string,
) {
super(msg);
}
}
export class FetchError extends Error {
override name: "FetchError" = "FetchError";
constructor(
public cause: Error,
msg?: string,
) {
super(msg);
}
}
export class RequiredError extends Error {
override name: "RequiredError" = "RequiredError";
constructor(
public field: string,
msg?: string,
) {
super(msg);
}
}
export const COLLECTION_FORMATS = {
csv: ",",
ssv: " ",
tsv: "\t",
pipes: "|",
};
export type FetchAPI = WindowOrWorkerGlobalScope["fetch"];
export type Json = any;
export type HTTPMethod =
| "GET"
| "POST"
| "PUT"
| "PATCH"
| "DELETE"
| "OPTIONS"
| "HEAD";
export type HTTPHeaders = { [key: string]: string };
export type HTTPQuery = {
[key: string]:
| string
| number
| null
| boolean
| Array<string | number | null | boolean>
| Set<string | number | null | boolean>
| HTTPQuery;
};
export type HTTPBody = Json | FormData | URLSearchParams;
export type HTTPRequestInit = {
headers?: HTTPHeaders;
method: HTTPMethod;
credentials?: RequestCredentials;
body?: HTTPBody;
};
export type ModelPropertyNaming =
| "camelCase"
| "snake_case"
| "PascalCase"
| "original";
export type InitOverrideFunction = (requestContext: {
init: HTTPRequestInit;
context: RequestOpts;
}) => Promise<RequestInit>;
export interface FetchParams {
url: string;
init: RequestInit;
}
export interface RequestOpts {
path: string;
method: HTTPMethod;
headers: HTTPHeaders;
query?: HTTPQuery;
body?: HTTPBody;
}
export function querystring(params: HTTPQuery, prefix: string = ""): string {
return Object.keys(params)
.map((key) => querystringSingleKey(key, params[key], prefix))
.filter((part) => part.length > 0)
.join("&");
}
function querystringSingleKey(
key: string,
value:
| string
| number
| null
| undefined
| boolean
| Array<string | number | null | boolean>
| Set<string | number | null | boolean>
| HTTPQuery,
keyPrefix: string = "",
): string {
const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key);
if (value instanceof Array) {
const multiValue = value
.map((singleValue) => encodeURIComponent(String(singleValue)))
.join(`&${encodeURIComponent(fullKey)}=`);
return `${encodeURIComponent(fullKey)}=${multiValue}`;
}
if (value instanceof Set) {
const valueAsArray = Array.from(value);
return querystringSingleKey(key, valueAsArray, keyPrefix);
}
if (value instanceof Date) {
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`;
}
if (value instanceof Object) {
return querystring(value as HTTPQuery, fullKey);
}
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
}
export function exists(json: any, key: string) {
const value = json[key];
return value !== null && value !== undefined;
}
export function mapValues(data: any, fn: (item: any) => any) {
const result: { [key: string]: any } = {};
for (const key of Object.keys(data)) {
result[key] = fn(data[key]);
}
return result;
}
export function canConsumeForm(consumes: Consume[]): boolean {
for (const consume of consumes) {
if ("multipart/form-data" === consume.contentType) {
return true;
}
}
return false;
}
export interface Consume {
contentType: string;
}
export interface RequestContext {
fetch: FetchAPI;
url: string;
init: RequestInit;
}
export interface ResponseContext {
fetch: FetchAPI;
url: string;
init: RequestInit;
response: Response;
}
export interface ErrorContext {
fetch: FetchAPI;
url: string;
init: RequestInit;
error: unknown;
response?: Response;
}
export interface Middleware {
pre?(context: RequestContext): Promise<FetchParams | void>;
post?(context: ResponseContext): Promise<Response | void>;
onError?(context: ErrorContext): Promise<Response | void>;
}
export interface ApiResponse<T> {
raw: Response;
value(): Promise<T>;
}
export interface ResponseTransformer<T> {
(json: any): T;
}
export class JSONApiResponse<T> {
constructor(
public raw: Response,
private transformer: ResponseTransformer<T> = (jsonValue: any) => jsonValue,
) {}
async value(): Promise<T> {
return this.transformer(await this.raw.json());
}
}
export class VoidApiResponse {
constructor(public raw: Response) {}
async value(): Promise<void> {
return undefined;
}
}
export class BlobApiResponse {
constructor(public raw: Response) {}
async value(): Promise<Blob> {
return await this.raw.blob();
}
}
export class TextApiResponse {
constructor(public raw: Response) {}
async value(): Promise<string> {
return await this.raw.text();
}
}

7
sdk/ts/tsconfig.esm.json Normal file
View File

@@ -0,0 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "esnext",
"outDir": "dist/esm"
}
}

11
sdk/ts/tsconfig.json Normal file
View File

@@ -0,0 +1,11 @@
{
"compilerOptions": {
"declaration": true,
"target": "es6",
"module": "commonjs",
"moduleResolution": "node",
"outDir": "dist",
"typeRoots": ["node_modules/@types"]
},
"exclude": ["dist", "node_modules"]
}