A TypeScript SDK client for the localhost API.
First, install the SDK from npm.
npm install @saiden/tensors --saveNext, try it out.
import {
Configuration,
AuthApi,
} from '@saiden/tensors';
import type { AuthSuccessAuthSuccessGetRequest } from '@saiden/tensors';
async function example() {
console.log("🚀 Testing @saiden/tensors SDK...");
const api = new AuthApi();
try {
const data = await api.authSuccessAuthSuccessGet();
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);All URIs are relative to http://localhost
| Class | Method | HTTP request | Description |
|---|---|---|---|
| AuthApi | authSuccessAuthSuccessGet | GET /auth/success | Auth Success |
| AuthApi | githubAuthAuthGithubGet | GET /auth/github | Github Auth |
| AuthApi | githubCallbackAuthCallbackGet | GET /auth/callback | Github Callback |
| AuthApi | loginPageAuthLoginGet | GET /auth/login | Login Page |
| AuthApi | logoutAuthLogoutGet | GET /auth/logout | Logout |
| AuthApi | verifyTokenAuthVerifyGet | GET /auth/verify | Verify Token |
| CivitAIApi | getModelApiCivitaiModelModelIdGet | GET /api/civitai/model/{model_id} | Get Model |
| ComfyUIAPIApi | comfyuiClearQueueApiComfyuiQueueDelete | DELETE /api/comfyui/queue | Comfyui Clear Queue |
| ComfyUIAPIApi | comfyuiGenerateApiComfyuiGeneratePost | POST /api/comfyui/generate | Comfyui Generate |
| ComfyUIAPIApi | comfyuiHistoryDetailApiComfyuiHistoryPromptIdGet | GET /api/comfyui/history/{prompt_id} | Comfyui History Detail |
| ComfyUIAPIApi | comfyuiHistoryListApiComfyuiHistoryGet | GET /api/comfyui/history | Comfyui History List |
| ComfyUIAPIApi | comfyuiImageApiComfyuiImageFilenameGet | GET /api/comfyui/image/{filename} | Comfyui Image |
| ComfyUIAPIApi | comfyuiModelsApiComfyuiModelsGet | GET /api/comfyui/models | Comfyui Models |
| ComfyUIAPIApi | comfyuiQueueApiComfyuiQueueGet | GET /api/comfyui/queue | Comfyui Queue |
| ComfyUIAPIApi | comfyuiStatusApiComfyuiStatusGet | GET /api/comfyui/status | Comfyui Status |
| ComfyUIAPIApi | comfyuiWorkflowApiComfyuiWorkflowPost | POST /api/comfyui/workflow | Comfyui Workflow |
| DatabaseApi | cacheModelApiDbCachePost | POST /api/db/cache | Cache Model |
| DatabaseApi | getFileApiDbFilesFileIdGet | GET /api/db/files/{file_id} | Get File |
| DatabaseApi | getModelApiDbModelsCivitaiIdGet | GET /api/db/models/{civitai_id} | Get Model |
| DatabaseApi | getStatsApiDbStatsGet | GET /api/db/stats | Get Stats |
| DatabaseApi | getTriggersByPathApiDbTriggersGet | GET /api/db/triggers | Get Triggers By Path |
| DatabaseApi | getTriggersByVersionApiDbTriggersVersionIdGet | GET /api/db/triggers/{version_id} | Get Triggers By Version |
| DatabaseApi | linkFilesApiDbLinkPost | POST /api/db/link | Link Files |
| DatabaseApi | listFilesApiDbFilesGet | GET /api/db/files | List Files |
| DatabaseApi | scanDirectoryApiDbScanPost | POST /api/db/scan | Scan Directory |
| DatabaseApi | searchModelsApiDbModelsGet | GET /api/db/models | Search Models |
| DefaultApi | statusStatusGet | GET /status | Status |
| DownloadApi | getDownloadStatusApiDownloadStatusDownloadIdGet | GET /api/download/status/{download_id} | Get Download Status |
| DownloadApi | listActiveDownloadsApiDownloadActiveGet | GET /api/download/active | List Active Downloads |
| DownloadApi | startDownloadApiDownloadPost | POST /api/download | Start Download |
| GalleryApi | deleteImageApiImagesImageIdDelete | DELETE /api/images/{image_id} | Delete Image |
| GalleryApi | editImageMetadataApiImagesImageIdEditPost | POST /api/images/{image_id}/edit | Edit Image Metadata |
| GalleryApi | galleryStatsApiImagesStatsSummaryGet | GET /api/images/stats/summary | Gallery Stats |
| GalleryApi | getImageApiImagesImageIdGet | GET /api/images/{image_id} | Get Image |
| GalleryApi | getImageMetadataApiImagesImageIdMetaGet | GET /api/images/{image_id}/meta | Get Image Metadata |
| GalleryApi | listImagesApiImagesGet | GET /api/images | List Images |
| SearchApi | searchModelsApiSearchGet | GET /api/search | Search Models |
- CacheRequest
- DownloadRequest
- GenerateRequest
- GenerateResponse
- HTTPValidationError
- LocationInner
- MetadataUpdate
- ModelsResponse
- Provider
- QueueStatusResponse
- ScanRequest
- SortOrder
- SystemStatsResponse
- ValidationError
- WorkflowRequest
- WorkflowResponse
Authentication schemes defined for the API:
- Type: API key
- API key parameter name:
api_key - Location: URL query string
This TypeScript SDK client supports the Fetch API and is automatically generated by the OpenAPI Generator project:
- API version:
0.1.18 - Package version:
0.1.20 - Generator version:
7.20.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
To build the TypeScript source code, you need to have Node.js and npm installed. After cloning the repository, navigate to the project directory and run:
npm install
npm run buildOnce you've built the package, you can publish it to npm:
npm publish