diff --git a/openapi.yaml b/openapi.yaml new file mode 100644 index 0000000..c780dbf --- /dev/null +++ b/openapi.yaml @@ -0,0 +1,1341 @@ +openapi: 3.0.3 +info: + title: Low-Code Engine API + description: API documentation for the Low-Code Engine platform that provides query execution, database management, and project administration capabilities. + version: 1.0.0 + contact: + name: Low-Code Engine Team +servers: + - url: http://localhost:3000 + description: Development server +security: + - ApiKeyAuth: [] +paths: + # API Controller + /api/token/generate: + post: + tags: + - API Tokens + summary: Generate API token + description: Generate a new API token for a project + security: + - ApiKeyAuth: [] + - AdminAuth: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - id + properties: + id: + type: string + description: Project ID + responses: + "200": + description: Token generated successfully + content: + application/json: + schema: + $ref: "#/components/schemas/Token" + "400": + description: Project ID is required + "401": + description: Unauthorized + "403": + description: Admin access required + + /api/token/revoke/{token}: + delete: + tags: + - API Tokens + summary: Revoke API token + description: Revoke an existing API token + security: + - ApiKeyAuth: [] + - AdminAuth: [] + parameters: + - name: token + in: path + required: true + schema: + type: string + description: Token to revoke + responses: + "200": + description: Token revoked successfully + "401": + description: Unauthorized + "403": + description: Admin access required + "404": + description: Token not found + + # Database Manager Controller + /database/create: + post: + tags: + - Database Management + summary: Create database + description: Create a new database for a project + security: + - ApiKeyAuth: [] + - AdminAuth: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - projectId + properties: + projectId: + type: string + description: Project ID + responses: + "200": + description: Database created successfully + content: + application/json: + schema: + $ref: "#/components/schemas/Database" + "401": + description: Unauthorized + "403": + description: Admin access required + + /database/node/create: + post: + tags: + - Database Management + summary: Add database node + description: Add a new database node to the system + security: + - ApiKeyAuth: [] + - AdminAuth: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - host + - port + - username + - password + properties: + host: + type: string + description: Database host + port: + type: integer + description: Database port + username: + type: string + description: Database username + password: + type: string + description: Database password + responses: + "200": + description: Database node created successfully + content: + application/json: + schema: + $ref: "#/components/schemas/DatabaseNode" + "401": + description: Unauthorized + "403": + description: Admin access required + + /database/tables/{databaseId}: + get: + tags: + - Database Management + summary: Get database tables + description: Retrieve list of tables in a database + security: + - ApiKeyAuth: [] + parameters: + - name: databaseId + in: path + required: true + schema: + type: string + description: Database ID + responses: + "200": + description: Tables retrieved successfully + content: + application/json: + schema: + type: array + items: + type: string + "401": + description: Unauthorized + "404": + description: Database not found + + /database/columns/{databaseId}/{tableName}: + get: + tags: + - Database Management + summary: Get table columns + description: Retrieve columns information for a specific table + security: + - ApiKeyAuth: [] + parameters: + - name: databaseId + in: path + required: true + schema: + type: string + description: Database ID + - name: tableName + in: path + required: true + schema: + type: string + description: Table name + responses: + "200": + description: Columns retrieved successfully + content: + application/json: + schema: + type: array + items: + type: object + "401": + description: Unauthorized + "404": + description: Database or table not found + + /database/migration/up/{databaseId}: + get: + tags: + - Database Management + summary: Run migrations up + description: Execute pending database migrations + security: + - ApiKeyAuth: [] + parameters: + - name: databaseId + in: path + required: true + schema: + type: string + description: Database ID + responses: + "200": + description: Migrations executed successfully + "401": + description: Unauthorized + "404": + description: Database not found + + /database/migration/down/{databaseId}: + get: + tags: + - Database Management + summary: Run migrations down + description: Rollback database migrations + security: + - ApiKeyAuth: [] + parameters: + - name: databaseId + in: path + required: true + schema: + type: string + description: Database ID + responses: + "200": + description: Migrations rolled back successfully + "401": + description: Unauthorized + "404": + description: Database not found + + /database/migration/create: + post: + tags: + - Database Management + summary: Create migration + description: Create a new database migration + security: + - ApiKeyAuth: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - up + - down + - databaseId + properties: + up: + type: string + description: Migration up SQL + down: + type: string + description: Migration down SQL + databaseId: + type: string + description: Database ID + responses: + "200": + description: Migration created successfully + content: + application/json: + schema: + $ref: "#/components/schemas/Migration" + "401": + description: Unauthorized + + /database/query/{databaseId}: + post: + tags: + - Database Management + summary: Run database query + description: Execute a SQL query on the database + security: + - ApiKeyAuth: [] + parameters: + - name: databaseId + in: path + required: true + schema: + type: string + description: Database ID + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - query + properties: + query: + type: string + description: SQL query to execute + responses: + "200": + description: Query executed successfully + content: + application/json: + schema: + type: object + "401": + description: Unauthorized + "404": + description: Database not found + + # Project Controller + /project/create: + put: + tags: + - Project Management + summary: Create project + description: Create a new project with database + security: + - ApiKeyAuth: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - name + properties: + name: + type: string + description: Project name + responses: + "200": + description: Project created successfully + content: + application/json: + schema: + $ref: "#/components/schemas/Project" + "401": + description: Unauthorized + + /project/create-without-db: + put: + tags: + - Project Management + summary: Create project without database + description: Create a new project without creating a database + security: + - ApiKeyAuth: [] + - AdminAuth: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - name + properties: + name: + type: string + description: Project name + responses: + "200": + description: Project created successfully + content: + application/json: + schema: + $ref: "#/components/schemas/Project" + "401": + description: Unauthorized + "403": + description: Admin access required + + /project/settings/create: + put: + tags: + - Project Management + summary: Create project setting + description: Create a new project setting + security: + - ApiKeyAuth: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - key + - value + properties: + key: + type: string + description: Setting key + value: + type: string + description: Setting value + responses: + "200": + description: Setting created successfully + content: + application/json: + schema: + $ref: "#/components/schemas/ProjectSetting" + "401": + description: Unauthorized + + /project/settings/delete/{key}: + delete: + tags: + - Project Management + summary: Delete project setting + description: Delete a project setting by key + security: + - ApiKeyAuth: [] + parameters: + - name: key + in: path + required: true + schema: + type: string + description: Setting key to delete + responses: + "200": + description: Setting deleted successfully + "401": + description: Unauthorized + "404": + description: Setting not found + + /project/settings: + get: + tags: + - Project Management + summary: Get all project settings + description: Retrieve all settings for the current project + security: + - ApiKeyAuth: [] + responses: + "200": + description: Settings retrieved successfully + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/ProjectSetting" + "401": + description: Unauthorized + + /project/api-tokens: + get: + tags: + - Project Management + summary: Get all API tokens + description: Retrieve all API tokens for the current project + security: + - ApiKeyAuth: [] + - AdminAuth: [] + responses: + "200": + description: API tokens retrieved successfully + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/Token" + "401": + description: Unauthorized + "403": + description: Admin access required + + # Redis Manager Controller + /redis/node/create: + post: + tags: + - Redis Management + summary: Add Redis node + description: Add a new Redis node to the system + security: + - ApiKeyAuth: [] + - AdminAuth: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - host + - port + - user + - password + properties: + host: + type: string + description: Redis host + port: + type: integer + description: Redis port + user: + type: string + description: Redis username + password: + type: string + description: Redis password + responses: + "200": + description: Redis node created successfully + content: + application/json: + schema: + $ref: "#/components/schemas/RedisNode" + "401": + description: Unauthorized + "403": + description: Admin access required + + # Function Controller + /functions/create: + post: + tags: + - Functions + summary: Create function + description: Create a new function in the project + security: + - ApiKeyAuth: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - name + - source + properties: + name: + type: string + description: Function name + source: + type: string + description: Function source code + responses: + "200": + description: Function created successfully + content: + application/json: + schema: + $ref: "#/components/schemas/Function" + "401": + description: Unauthorized + + /functions/delete: + post: + tags: + - Functions + summary: Delete function + description: Delete a function from the project + security: + - ApiKeyAuth: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - name + properties: + name: + type: string + description: Function name to delete + responses: + "200": + description: Function deleted successfully + "401": + description: Unauthorized + "404": + description: Function not found + + # Logger Controller + /logger/{id}/{traceId}: + get: + tags: + - Logging + summary: Get log by trace ID + description: Retrieve log entries by trace ID + security: + - ApiKeyAuth: [] + parameters: + - name: id + in: path + required: true + schema: + type: string + description: Log ID + - name: traceId + in: path + required: true + schema: + type: string + description: Trace ID + responses: + "200": + description: Log retrieved successfully + content: + application/json: + schema: + $ref: "#/components/schemas/Log" + "401": + description: Unauthorized + "404": + description: Log not found + + /logger/{id}/findAll: + post: + tags: + - Logging + summary: Find all logs + description: Find all logs for a project with filtering + security: + - ApiKeyAuth: [] + parameters: + - name: id + in: path + required: true + schema: + type: string + description: Project ID + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - limit + - offset + properties: + traceId: + type: string + description: Filter by trace ID + fromDate: + type: string + format: date-time + description: Filter from date + toDate: + type: string + format: date-time + description: Filter to date + url: + type: string + description: Filter by URL + limit: + type: integer + description: Number of results to return + offset: + type: integer + description: Number of results to skip + responses: + "200": + description: Logs retrieved successfully + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/Log" + "401": + description: Unauthorized + + /logger/{id}/find: + post: + tags: + - Logging + summary: Find logs for query + description: Find logs for a specific query with filtering + security: + - ApiKeyAuth: [] + - QueryGuard: [] + parameters: + - name: id + in: path + required: true + schema: + type: string + description: Query ID + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - limit + - offset + properties: + traceId: + type: string + description: Filter by trace ID + fromDate: + type: string + format: date-time + description: Filter from date + toDate: + type: string + format: date-time + description: Filter to date + url: + type: string + description: Filter by URL + limit: + type: integer + description: Number of results to return + offset: + type: integer + description: Number of results to skip + responses: + "200": + description: Logs retrieved successfully + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/Log" + "401": + description: Unauthorized + "403": + description: Query access required + + # Query Controller (via BaseQueryController) + /query/create: + post: + tags: + - Queries + summary: Create query + description: Create a new query in the project + security: + - ApiKeyAuth: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - source + properties: + source: + type: string + description: Query source code + responses: + "200": + description: Query created successfully + content: + application/json: + schema: + $ref: "#/components/schemas/Query" + "401": + description: Unauthorized + + /query/update/{id}: + post: + tags: + - Queries + summary: Update query + description: Update an existing query + security: + - ApiKeyAuth: [] + - QueryGuard: [] + parameters: + - name: id + in: path + required: true + schema: + type: string + description: Query ID + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + source: + type: string + description: Updated query source code + responses: + "200": + description: Query updated successfully + content: + application/json: + schema: + $ref: "#/components/schemas/Query" + "401": + description: Unauthorized + "403": + description: Query access required + "404": + description: Query not found + + /query/run/{id}: + post: + tags: + - Queries + summary: Run query + description: Execute a query with provided data + security: + - ApiKeyAuth: [] + - QueryGuard: [] + parameters: + - name: id + in: path + required: true + schema: + type: string + description: Query ID + - name: x-trace-id + in: header + required: false + schema: + type: string + description: Trace ID for logging + requestBody: + required: true + content: + application/json: + schema: + type: object + description: Query execution data + responses: + "200": + description: Query executed successfully + content: + application/json: + schema: + type: object + "302": + description: Redirect response + "401": + description: Unauthorized + "403": + description: Query access required + "404": + description: Query not found + "500": + description: Internal Server Error + + /query/delete/{id}: + delete: + tags: + - Queries + summary: Delete query + description: Delete an existing query + security: + - ApiKeyAuth: [] + - QueryGuard: [] + parameters: + - name: id + in: path + required: true + schema: + type: string + description: Query ID + responses: + "200": + description: Query deleted successfully + "401": + description: Unauthorized + "403": + description: Query access required + "404": + description: Query not found + + # Command Controller (via BaseQueryController) + /command/create: + post: + tags: + - Commands + summary: Create command + description: Create a new command in the project + security: + - ApiKeyAuth: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - source + properties: + source: + type: string + description: Command source code + responses: + "200": + description: Command created successfully + content: + application/json: + schema: + $ref: "#/components/schemas/Query" + "401": + description: Unauthorized + + /command/update/{id}: + post: + tags: + - Commands + summary: Update command + description: Update an existing command + security: + - ApiKeyAuth: [] + - QueryGuard: [] + parameters: + - name: id + in: path + required: true + schema: + type: string + description: Command ID + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + source: + type: string + description: Updated command source code + responses: + "200": + description: Command updated successfully + content: + application/json: + schema: + $ref: "#/components/schemas/Query" + "401": + description: Unauthorized + "403": + description: Query access required + "404": + description: Command not found + + /command/run/{id}: + post: + tags: + - Commands + summary: Run command + description: Execute a command with provided data + security: + - ApiKeyAuth: [] + - QueryGuard: [] + parameters: + - name: id + in: path + required: true + schema: + type: string + description: Command ID + - name: x-trace-id + in: header + required: false + schema: + type: string + description: Trace ID for logging + requestBody: + required: true + content: + application/json: + schema: + type: object + description: Command execution data + responses: + "200": + description: Command executed successfully + content: + application/json: + schema: + type: object + "302": + description: Redirect response + "401": + description: Unauthorized + "403": + description: Query access required + "404": + description: Command not found + "500": + description: Internal Server Error + + /command/delete/{id}: + delete: + tags: + - Commands + summary: Delete command + description: Delete an existing command + security: + - ApiKeyAuth: [] + - QueryGuard: [] + parameters: + - name: id + in: path + required: true + schema: + type: string + description: Command ID + responses: + "200": + description: Command deleted successfully + "401": + description: Unauthorized + "403": + description: Query access required + "404": + description: Command not found + +components: + securitySchemes: + ApiKeyAuth: + type: apiKey + in: header + name: Authorization + description: API token for authentication + AdminAuth: + type: apiKey + in: header + name: x-admin-token + description: Admin token for administrative operations + QueryGuard: + type: apiKey + in: header + name: x-query-access + description: Query-specific access token + + schemas: + Token: + type: object + properties: + token: + type: string + format: uuid + description: Unique token identifier + isActive: + type: boolean + description: Whether the token is active + isAdmin: + type: boolean + description: Whether the token has admin privileges + project: + $ref: "#/components/schemas/Project" + + Project: + type: object + properties: + id: + type: string + format: uuid + description: Unique project identifier + name: + type: string + description: Project name + apiTokens: + type: array + items: + $ref: "#/components/schemas/Token" + database: + $ref: "#/components/schemas/Database" + queries: + type: array + items: + $ref: "#/components/schemas/Query" + functions: + type: array + items: + $ref: "#/components/schemas/Function" + settings: + type: array + items: + $ref: "#/components/schemas/ProjectSetting" + + Query: + type: object + properties: + id: + type: string + format: uuid + description: Unique query identifier + source: + type: string + description: Query source code + isActive: + type: integer + description: Whether the query is active (1 = active, 0 = inactive) + isCommand: + type: integer + description: Whether this is a command (1 = command, 0 = query) + project: + $ref: "#/components/schemas/Project" + logs: + type: array + items: + $ref: "#/components/schemas/Log" + + Database: + type: object + properties: + id: + type: string + format: uuid + description: Unique database identifier + q_username: + type: string + description: Query username for database access + c_username: + type: string + description: Command username for database access + password: + type: string + description: Database password + database: + type: string + description: Database name + migrations: + type: array + items: + $ref: "#/components/schemas/Migration" + project: + $ref: "#/components/schemas/Project" + node: + $ref: "#/components/schemas/DatabaseNode" + + DatabaseNode: + type: object + properties: + id: + type: string + format: uuid + description: Unique database node identifier + host: + type: string + description: Database host + port: + type: integer + description: Database port + username: + type: string + description: Database username + password: + type: string + description: Database password + databases: + type: array + items: + $ref: "#/components/schemas/Database" + + Migration: + type: object + properties: + id: + type: string + format: uuid + description: Unique migration identifier + up: + type: string + description: Migration up SQL + down: + type: string + description: Migration down SQL + database: + $ref: "#/components/schemas/Database" + + RedisNode: + type: object + properties: + id: + type: string + format: uuid + description: Unique Redis node identifier + host: + type: string + description: Redis host + port: + type: integer + description: Redis port + user: + type: string + description: Redis username + password: + type: string + description: Redis password + projects: + type: array + items: + $ref: "#/components/schemas/Project" + + Function: + type: object + properties: + id: + type: string + format: uuid + description: Unique function identifier + name: + type: string + description: Function name + source: + type: string + description: Function source code + project: + $ref: "#/components/schemas/Project" + + ProjectSetting: + type: object + properties: + id: + type: string + format: uuid + description: Unique setting identifier + key: + type: string + description: Setting key + value: + type: string + description: Setting value + project: + $ref: "#/components/schemas/Project" + + Log: + type: object + properties: + id: + type: string + format: uuid + description: Unique log identifier + traceId: + type: string + description: Trace ID for tracking requests + startTime: + type: integer + description: Request start timestamp + endTime: + type: integer + description: Request end timestamp + payload: + type: object + description: Request payload + headers: + type: object + description: Request headers + cookies: + type: string + description: Request cookies + url: + type: string + description: Request URL + response: + type: object + description: Response data + content: + type: array + items: + type: object + properties: + content: + type: string + description: Log content + type: + type: string + description: Log type (info, error, warning) + timeStamp: + type: integer + description: Log entry timestamp + project: + $ref: "#/components/schemas/Project" + query: + $ref: "#/components/schemas/Query" + + Error: + type: object + properties: + error: + type: string + description: Error message + details: + type: string + description: Error details + +tags: + - name: API Tokens + description: API token management operations + - name: Database Management + description: Database and database node management + - name: Project Management + description: Project and project settings management + - name: Redis Management + description: Redis node management + - name: Functions + description: Function management operations + - name: Logging + description: Log retrieval and management + - name: Queries + description: Query management and execution + - name: Commands + description: Command management and execution diff --git a/out/ts/.gitignore b/out/ts/.gitignore new file mode 100644 index 0000000..149b576 --- /dev/null +++ b/out/ts/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/out/ts/.npmignore b/out/ts/.npmignore new file mode 100644 index 0000000..999d88d --- /dev/null +++ b/out/ts/.npmignore @@ -0,0 +1 @@ +# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm \ No newline at end of file diff --git a/out/ts/.openapi-generator-ignore b/out/ts/.openapi-generator-ignore new file mode 100644 index 0000000..7484ee5 --- /dev/null +++ b/out/ts/.openapi-generator-ignore @@ -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 diff --git a/out/ts/.openapi-generator/FILES b/out/ts/.openapi-generator/FILES new file mode 100644 index 0000000..6fb5b77 --- /dev/null +++ b/out/ts/.openapi-generator/FILES @@ -0,0 +1,44 @@ +.gitignore +.npmignore +.openapi-generator-ignore +api.ts +base.ts +common.ts +configuration.ts +docs/APITokensApi.md +docs/ApiTokenGeneratePostRequest.md +docs/CommandCreatePostRequest.md +docs/CommandUpdateIdPostRequest.md +docs/CommandsApi.md +docs/Database.md +docs/DatabaseCreatePostRequest.md +docs/DatabaseManagementApi.md +docs/DatabaseMigrationCreatePostRequest.md +docs/DatabaseNode.md +docs/DatabaseNodeCreatePostRequest.md +docs/DatabaseQueryDatabaseIdPostRequest.md +docs/Error.md +docs/Function.md +docs/FunctionsApi.md +docs/FunctionsCreatePostRequest.md +docs/FunctionsDeletePostRequest.md +docs/Log.md +docs/LogContentInner.md +docs/LoggerIdFindAllPostRequest.md +docs/LoggingApi.md +docs/Migration.md +docs/Project.md +docs/ProjectCreatePutRequest.md +docs/ProjectManagementApi.md +docs/ProjectSetting.md +docs/ProjectSettingsCreatePutRequest.md +docs/QueriesApi.md +docs/Query.md +docs/QueryCreatePostRequest.md +docs/QueryUpdateIdPostRequest.md +docs/RedisManagementApi.md +docs/RedisNode.md +docs/RedisNodeCreatePostRequest.md +docs/Token.md +git_push.sh +index.ts diff --git a/out/ts/.openapi-generator/VERSION b/out/ts/.openapi-generator/VERSION new file mode 100644 index 0000000..9e0e9bc --- /dev/null +++ b/out/ts/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.17.0-SNAPSHOT diff --git a/out/ts/api.ts b/out/ts/api.ts new file mode 100644 index 0000000..8df8c6a --- /dev/null +++ b/out/ts/api.ts @@ -0,0 +1,2944 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Low-Code Engine API + * API documentation for the Low-Code Engine platform that provides query execution, database management, and project administration capabilities. + * + * The version of the OpenAPI document: 1.0.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 type { Configuration } from './configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +import type { RequestArgs } from './base'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base'; + +export interface ApiTokenGeneratePostRequest { + /** + * Project ID + */ + 'id': string; +} +export interface CommandCreatePostRequest { + /** + * Command source code + */ + 'source': string; +} +export interface CommandUpdateIdPostRequest { + /** + * Updated command source code + */ + 'source'?: string; +} +export interface Database { + /** + * Unique database identifier + */ + 'id'?: string; + /** + * Query username for database access + */ + 'q_username'?: string; + /** + * Command username for database access + */ + 'c_username'?: string; + /** + * Database password + */ + 'password'?: string; + /** + * Database name + */ + 'database'?: string; + 'migrations'?: Array; + 'project'?: Project; + 'node'?: DatabaseNode; +} +export interface DatabaseCreatePostRequest { + /** + * Project ID + */ + 'projectId': string; +} +export interface DatabaseMigrationCreatePostRequest { + /** + * Migration up SQL + */ + 'up': string; + /** + * Migration down SQL + */ + 'down': string; + /** + * Database ID + */ + 'databaseId': string; +} +export interface DatabaseNode { + /** + * Unique database node identifier + */ + 'id'?: string; + /** + * Database host + */ + 'host'?: string; + /** + * Database port + */ + 'port'?: number; + /** + * Database username + */ + 'username'?: string; + /** + * Database password + */ + 'password'?: string; + 'databases'?: Array; +} +export interface DatabaseNodeCreatePostRequest { + /** + * Database host + */ + 'host': string; + /** + * Database port + */ + 'port': number; + /** + * Database username + */ + 'username': string; + /** + * Database password + */ + 'password': string; +} +export interface DatabaseQueryDatabaseIdPostRequest { + /** + * SQL query to execute + */ + 'query': string; +} +export interface Function { + /** + * Unique function identifier + */ + 'id'?: string; + /** + * Function name + */ + 'name'?: string; + /** + * Function source code + */ + 'source'?: string; + 'project'?: Project; +} +export interface FunctionsCreatePostRequest { + /** + * Function name + */ + 'name': string; + /** + * Function source code + */ + 'source': string; +} +export interface FunctionsDeletePostRequest { + /** + * Function name to delete + */ + 'name': string; +} +export interface Log { + /** + * Unique log identifier + */ + 'id'?: string; + /** + * Trace ID for tracking requests + */ + 'traceId'?: string; + /** + * Request start timestamp + */ + 'startTime'?: number; + /** + * Request end timestamp + */ + 'endTime'?: number; + /** + * Request payload + */ + 'payload'?: object; + /** + * Request headers + */ + 'headers'?: object; + /** + * Request cookies + */ + 'cookies'?: string; + /** + * Request URL + */ + 'url'?: string; + /** + * Response data + */ + 'response'?: object; + 'content'?: Array; + 'project'?: Project; + 'query'?: Query; +} +export interface LogContentInner { + /** + * Log content + */ + 'content'?: string; + /** + * Log type (info, error, warning) + */ + 'type'?: string; + /** + * Log entry timestamp + */ + 'timeStamp'?: number; +} +export interface LoggerIdFindAllPostRequest { + /** + * Filter by trace ID + */ + 'traceId'?: string; + /** + * Filter from date + */ + 'fromDate'?: string; + /** + * Filter to date + */ + 'toDate'?: string; + /** + * Filter by URL + */ + 'url'?: string; + /** + * Number of results to return + */ + 'limit': number; + /** + * Number of results to skip + */ + 'offset': number; +} +export interface Migration { + /** + * Unique migration identifier + */ + 'id'?: string; + /** + * Migration up SQL + */ + 'up'?: string; + /** + * Migration down SQL + */ + 'down'?: string; + 'database'?: Database; +} +export interface ModelError { + /** + * Error message + */ + 'error'?: string; + /** + * Error details + */ + 'details'?: string; +} +export interface Project { + /** + * Unique project identifier + */ + 'id'?: string; + /** + * Project name + */ + 'name'?: string; + 'apiTokens'?: Array; + 'database'?: Database; + 'queries'?: Array; + 'functions'?: Array; + 'settings'?: Array; +} +export interface ProjectCreatePutRequest { + /** + * Project name + */ + 'name': string; +} +export interface ProjectSetting { + /** + * Unique setting identifier + */ + 'id'?: string; + /** + * Setting key + */ + 'key'?: string; + /** + * Setting value + */ + 'value'?: string; + 'project'?: Project; +} +export interface ProjectSettingsCreatePutRequest { + /** + * Setting key + */ + 'key': string; + /** + * Setting value + */ + 'value': string; +} +export interface Query { + /** + * Unique query identifier + */ + 'id'?: string; + /** + * Query source code + */ + 'source'?: string; + /** + * Whether the query is active (1 = active, 0 = inactive) + */ + 'isActive'?: number; + /** + * Whether this is a command (1 = command, 0 = query) + */ + 'isCommand'?: number; + 'project'?: Project; + 'logs'?: Array; +} +export interface QueryCreatePostRequest { + /** + * Query source code + */ + 'source': string; +} +export interface QueryUpdateIdPostRequest { + /** + * Updated query source code + */ + 'source'?: string; +} +export interface RedisNode { + /** + * Unique Redis node identifier + */ + 'id'?: string; + /** + * Redis host + */ + 'host'?: string; + /** + * Redis port + */ + 'port'?: number; + /** + * Redis username + */ + 'user'?: string; + /** + * Redis password + */ + 'password'?: string; + 'projects'?: Array; +} +export interface RedisNodeCreatePostRequest { + /** + * Redis host + */ + 'host': string; + /** + * Redis port + */ + 'port': number; + /** + * Redis username + */ + 'user': string; + /** + * Redis password + */ + 'password': string; +} +export interface Token { + /** + * Unique token identifier + */ + 'token'?: string; + /** + * Whether the token is active + */ + 'isActive'?: boolean; + /** + * Whether the token has admin privileges + */ + 'isAdmin'?: boolean; + 'project'?: Project; +} + +/** + * APITokensApi - axios parameter creator + */ +export const APITokensApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Generate a new API token for a project + * @summary Generate API token + * @param {ApiTokenGeneratePostRequest} apiTokenGeneratePostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTokenGeneratePost: async (apiTokenGeneratePostRequest: ApiTokenGeneratePostRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'apiTokenGeneratePostRequest' is not null or undefined + assertParamExists('apiTokenGeneratePost', 'apiTokenGeneratePostRequest', apiTokenGeneratePostRequest) + const localVarPath = `/api/token/generate`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication AdminAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-admin-token", configuration) + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(apiTokenGeneratePostRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Revoke an existing API token + * @summary Revoke API token + * @param {string} token Token to revoke + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTokenRevokeTokenDelete: async (token: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'token' is not null or undefined + assertParamExists('apiTokenRevokeTokenDelete', 'token', token) + const localVarPath = `/api/token/revoke/{token}` + .replace(`{${"token"}}`, encodeURIComponent(String(token))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication AdminAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-admin-token", configuration) + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * APITokensApi - functional programming interface + */ +export const APITokensApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = APITokensApiAxiosParamCreator(configuration) + return { + /** + * Generate a new API token for a project + * @summary Generate API token + * @param {ApiTokenGeneratePostRequest} apiTokenGeneratePostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTokenGeneratePost(apiTokenGeneratePostRequest: ApiTokenGeneratePostRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.apiTokenGeneratePost(apiTokenGeneratePostRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['APITokensApi.apiTokenGeneratePost']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Revoke an existing API token + * @summary Revoke API token + * @param {string} token Token to revoke + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTokenRevokeTokenDelete(token: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.apiTokenRevokeTokenDelete(token, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['APITokensApi.apiTokenRevokeTokenDelete']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * APITokensApi - factory interface + */ +export const APITokensApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = APITokensApiFp(configuration) + return { + /** + * Generate a new API token for a project + * @summary Generate API token + * @param {ApiTokenGeneratePostRequest} apiTokenGeneratePostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTokenGeneratePost(apiTokenGeneratePostRequest: ApiTokenGeneratePostRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.apiTokenGeneratePost(apiTokenGeneratePostRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Revoke an existing API token + * @summary Revoke API token + * @param {string} token Token to revoke + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTokenRevokeTokenDelete(token: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.apiTokenRevokeTokenDelete(token, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * APITokensApi - object-oriented interface + */ +export class APITokensApi extends BaseAPI { + /** + * Generate a new API token for a project + * @summary Generate API token + * @param {ApiTokenGeneratePostRequest} apiTokenGeneratePostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public apiTokenGeneratePost(apiTokenGeneratePostRequest: ApiTokenGeneratePostRequest, options?: RawAxiosRequestConfig) { + return APITokensApiFp(this.configuration).apiTokenGeneratePost(apiTokenGeneratePostRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Revoke an existing API token + * @summary Revoke API token + * @param {string} token Token to revoke + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public apiTokenRevokeTokenDelete(token: string, options?: RawAxiosRequestConfig) { + return APITokensApiFp(this.configuration).apiTokenRevokeTokenDelete(token, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * CommandsApi - axios parameter creator + */ +export const CommandsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Create a new command in the project + * @summary Create command + * @param {CommandCreatePostRequest} commandCreatePostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + commandCreatePost: async (commandCreatePostRequest: CommandCreatePostRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'commandCreatePostRequest' is not null or undefined + assertParamExists('commandCreatePost', 'commandCreatePostRequest', commandCreatePostRequest) + const localVarPath = `/command/create`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(commandCreatePostRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Delete an existing command + * @summary Delete command + * @param {string} id Command ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + commandDeleteIdDelete: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('commandDeleteIdDelete', 'id', id) + const localVarPath = `/command/delete/{id}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication QueryGuard required + await setApiKeyToObject(localVarHeaderParameter, "x-query-access", configuration) + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Execute a command with provided data + * @summary Run command + * @param {string} id Command ID + * @param {object} body + * @param {string} [xTraceId] Trace ID for logging + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + commandRunIdPost: async (id: string, body: object, xTraceId?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('commandRunIdPost', 'id', id) + // verify required parameter 'body' is not null or undefined + assertParamExists('commandRunIdPost', 'body', body) + const localVarPath = `/command/run/{id}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication QueryGuard required + await setApiKeyToObject(localVarHeaderParameter, "x-query-access", configuration) + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + if (xTraceId != null) { + localVarHeaderParameter['x-trace-id'] = String(xTraceId); + } + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Update an existing command + * @summary Update command + * @param {string} id Command ID + * @param {CommandUpdateIdPostRequest} commandUpdateIdPostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + commandUpdateIdPost: async (id: string, commandUpdateIdPostRequest: CommandUpdateIdPostRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('commandUpdateIdPost', 'id', id) + // verify required parameter 'commandUpdateIdPostRequest' is not null or undefined + assertParamExists('commandUpdateIdPost', 'commandUpdateIdPostRequest', commandUpdateIdPostRequest) + const localVarPath = `/command/update/{id}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication QueryGuard required + await setApiKeyToObject(localVarHeaderParameter, "x-query-access", configuration) + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(commandUpdateIdPostRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * CommandsApi - functional programming interface + */ +export const CommandsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = CommandsApiAxiosParamCreator(configuration) + return { + /** + * Create a new command in the project + * @summary Create command + * @param {CommandCreatePostRequest} commandCreatePostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async commandCreatePost(commandCreatePostRequest: CommandCreatePostRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.commandCreatePost(commandCreatePostRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['CommandsApi.commandCreatePost']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Delete an existing command + * @summary Delete command + * @param {string} id Command ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async commandDeleteIdDelete(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.commandDeleteIdDelete(id, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['CommandsApi.commandDeleteIdDelete']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Execute a command with provided data + * @summary Run command + * @param {string} id Command ID + * @param {object} body + * @param {string} [xTraceId] Trace ID for logging + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async commandRunIdPost(id: string, body: object, xTraceId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.commandRunIdPost(id, body, xTraceId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['CommandsApi.commandRunIdPost']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Update an existing command + * @summary Update command + * @param {string} id Command ID + * @param {CommandUpdateIdPostRequest} commandUpdateIdPostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async commandUpdateIdPost(id: string, commandUpdateIdPostRequest: CommandUpdateIdPostRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.commandUpdateIdPost(id, commandUpdateIdPostRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['CommandsApi.commandUpdateIdPost']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * CommandsApi - factory interface + */ +export const CommandsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = CommandsApiFp(configuration) + return { + /** + * Create a new command in the project + * @summary Create command + * @param {CommandCreatePostRequest} commandCreatePostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + commandCreatePost(commandCreatePostRequest: CommandCreatePostRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.commandCreatePost(commandCreatePostRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Delete an existing command + * @summary Delete command + * @param {string} id Command ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + commandDeleteIdDelete(id: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.commandDeleteIdDelete(id, options).then((request) => request(axios, basePath)); + }, + /** + * Execute a command with provided data + * @summary Run command + * @param {string} id Command ID + * @param {object} body + * @param {string} [xTraceId] Trace ID for logging + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + commandRunIdPost(id: string, body: object, xTraceId?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.commandRunIdPost(id, body, xTraceId, options).then((request) => request(axios, basePath)); + }, + /** + * Update an existing command + * @summary Update command + * @param {string} id Command ID + * @param {CommandUpdateIdPostRequest} commandUpdateIdPostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + commandUpdateIdPost(id: string, commandUpdateIdPostRequest: CommandUpdateIdPostRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.commandUpdateIdPost(id, commandUpdateIdPostRequest, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * CommandsApi - object-oriented interface + */ +export class CommandsApi extends BaseAPI { + /** + * Create a new command in the project + * @summary Create command + * @param {CommandCreatePostRequest} commandCreatePostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public commandCreatePost(commandCreatePostRequest: CommandCreatePostRequest, options?: RawAxiosRequestConfig) { + return CommandsApiFp(this.configuration).commandCreatePost(commandCreatePostRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Delete an existing command + * @summary Delete command + * @param {string} id Command ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public commandDeleteIdDelete(id: string, options?: RawAxiosRequestConfig) { + return CommandsApiFp(this.configuration).commandDeleteIdDelete(id, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Execute a command with provided data + * @summary Run command + * @param {string} id Command ID + * @param {object} body + * @param {string} [xTraceId] Trace ID for logging + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public commandRunIdPost(id: string, body: object, xTraceId?: string, options?: RawAxiosRequestConfig) { + return CommandsApiFp(this.configuration).commandRunIdPost(id, body, xTraceId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Update an existing command + * @summary Update command + * @param {string} id Command ID + * @param {CommandUpdateIdPostRequest} commandUpdateIdPostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public commandUpdateIdPost(id: string, commandUpdateIdPostRequest: CommandUpdateIdPostRequest, options?: RawAxiosRequestConfig) { + return CommandsApiFp(this.configuration).commandUpdateIdPost(id, commandUpdateIdPostRequest, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * DatabaseManagementApi - axios parameter creator + */ +export const DatabaseManagementApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Retrieve columns information for a specific table + * @summary Get table columns + * @param {string} databaseId Database ID + * @param {string} tableName Table name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + databaseColumnsDatabaseIdTableNameGet: async (databaseId: string, tableName: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'databaseId' is not null or undefined + assertParamExists('databaseColumnsDatabaseIdTableNameGet', 'databaseId', databaseId) + // verify required parameter 'tableName' is not null or undefined + assertParamExists('databaseColumnsDatabaseIdTableNameGet', 'tableName', tableName) + const localVarPath = `/database/columns/{databaseId}/{tableName}` + .replace(`{${"databaseId"}}`, encodeURIComponent(String(databaseId))) + .replace(`{${"tableName"}}`, encodeURIComponent(String(tableName))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Create a new database for a project + * @summary Create database + * @param {DatabaseCreatePostRequest} databaseCreatePostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + databaseCreatePost: async (databaseCreatePostRequest: DatabaseCreatePostRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'databaseCreatePostRequest' is not null or undefined + assertParamExists('databaseCreatePost', 'databaseCreatePostRequest', databaseCreatePostRequest) + const localVarPath = `/database/create`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication AdminAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-admin-token", configuration) + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(databaseCreatePostRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Create a new database migration + * @summary Create migration + * @param {DatabaseMigrationCreatePostRequest} databaseMigrationCreatePostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + databaseMigrationCreatePost: async (databaseMigrationCreatePostRequest: DatabaseMigrationCreatePostRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'databaseMigrationCreatePostRequest' is not null or undefined + assertParamExists('databaseMigrationCreatePost', 'databaseMigrationCreatePostRequest', databaseMigrationCreatePostRequest) + const localVarPath = `/database/migration/create`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(databaseMigrationCreatePostRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Rollback database migrations + * @summary Run migrations down + * @param {string} databaseId Database ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + databaseMigrationDownDatabaseIdGet: async (databaseId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'databaseId' is not null or undefined + assertParamExists('databaseMigrationDownDatabaseIdGet', 'databaseId', databaseId) + const localVarPath = `/database/migration/down/{databaseId}` + .replace(`{${"databaseId"}}`, encodeURIComponent(String(databaseId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Execute pending database migrations + * @summary Run migrations up + * @param {string} databaseId Database ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + databaseMigrationUpDatabaseIdGet: async (databaseId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'databaseId' is not null or undefined + assertParamExists('databaseMigrationUpDatabaseIdGet', 'databaseId', databaseId) + const localVarPath = `/database/migration/up/{databaseId}` + .replace(`{${"databaseId"}}`, encodeURIComponent(String(databaseId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Add a new database node to the system + * @summary Add database node + * @param {DatabaseNodeCreatePostRequest} databaseNodeCreatePostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + databaseNodeCreatePost: async (databaseNodeCreatePostRequest: DatabaseNodeCreatePostRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'databaseNodeCreatePostRequest' is not null or undefined + assertParamExists('databaseNodeCreatePost', 'databaseNodeCreatePostRequest', databaseNodeCreatePostRequest) + const localVarPath = `/database/node/create`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication AdminAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-admin-token", configuration) + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(databaseNodeCreatePostRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Execute a SQL query on the database + * @summary Run database query + * @param {string} databaseId Database ID + * @param {DatabaseQueryDatabaseIdPostRequest} databaseQueryDatabaseIdPostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + databaseQueryDatabaseIdPost: async (databaseId: string, databaseQueryDatabaseIdPostRequest: DatabaseQueryDatabaseIdPostRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'databaseId' is not null or undefined + assertParamExists('databaseQueryDatabaseIdPost', 'databaseId', databaseId) + // verify required parameter 'databaseQueryDatabaseIdPostRequest' is not null or undefined + assertParamExists('databaseQueryDatabaseIdPost', 'databaseQueryDatabaseIdPostRequest', databaseQueryDatabaseIdPostRequest) + const localVarPath = `/database/query/{databaseId}` + .replace(`{${"databaseId"}}`, encodeURIComponent(String(databaseId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(databaseQueryDatabaseIdPostRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Retrieve list of tables in a database + * @summary Get database tables + * @param {string} databaseId Database ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + databaseTablesDatabaseIdGet: async (databaseId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'databaseId' is not null or undefined + assertParamExists('databaseTablesDatabaseIdGet', 'databaseId', databaseId) + const localVarPath = `/database/tables/{databaseId}` + .replace(`{${"databaseId"}}`, encodeURIComponent(String(databaseId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * DatabaseManagementApi - functional programming interface + */ +export const DatabaseManagementApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = DatabaseManagementApiAxiosParamCreator(configuration) + return { + /** + * Retrieve columns information for a specific table + * @summary Get table columns + * @param {string} databaseId Database ID + * @param {string} tableName Table name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async databaseColumnsDatabaseIdTableNameGet(databaseId: string, tableName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.databaseColumnsDatabaseIdTableNameGet(databaseId, tableName, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DatabaseManagementApi.databaseColumnsDatabaseIdTableNameGet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Create a new database for a project + * @summary Create database + * @param {DatabaseCreatePostRequest} databaseCreatePostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async databaseCreatePost(databaseCreatePostRequest: DatabaseCreatePostRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.databaseCreatePost(databaseCreatePostRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DatabaseManagementApi.databaseCreatePost']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Create a new database migration + * @summary Create migration + * @param {DatabaseMigrationCreatePostRequest} databaseMigrationCreatePostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async databaseMigrationCreatePost(databaseMigrationCreatePostRequest: DatabaseMigrationCreatePostRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.databaseMigrationCreatePost(databaseMigrationCreatePostRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DatabaseManagementApi.databaseMigrationCreatePost']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Rollback database migrations + * @summary Run migrations down + * @param {string} databaseId Database ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async databaseMigrationDownDatabaseIdGet(databaseId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.databaseMigrationDownDatabaseIdGet(databaseId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DatabaseManagementApi.databaseMigrationDownDatabaseIdGet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Execute pending database migrations + * @summary Run migrations up + * @param {string} databaseId Database ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async databaseMigrationUpDatabaseIdGet(databaseId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.databaseMigrationUpDatabaseIdGet(databaseId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DatabaseManagementApi.databaseMigrationUpDatabaseIdGet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Add a new database node to the system + * @summary Add database node + * @param {DatabaseNodeCreatePostRequest} databaseNodeCreatePostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async databaseNodeCreatePost(databaseNodeCreatePostRequest: DatabaseNodeCreatePostRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.databaseNodeCreatePost(databaseNodeCreatePostRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DatabaseManagementApi.databaseNodeCreatePost']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Execute a SQL query on the database + * @summary Run database query + * @param {string} databaseId Database ID + * @param {DatabaseQueryDatabaseIdPostRequest} databaseQueryDatabaseIdPostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async databaseQueryDatabaseIdPost(databaseId: string, databaseQueryDatabaseIdPostRequest: DatabaseQueryDatabaseIdPostRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.databaseQueryDatabaseIdPost(databaseId, databaseQueryDatabaseIdPostRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DatabaseManagementApi.databaseQueryDatabaseIdPost']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Retrieve list of tables in a database + * @summary Get database tables + * @param {string} databaseId Database ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async databaseTablesDatabaseIdGet(databaseId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.databaseTablesDatabaseIdGet(databaseId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DatabaseManagementApi.databaseTablesDatabaseIdGet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * DatabaseManagementApi - factory interface + */ +export const DatabaseManagementApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = DatabaseManagementApiFp(configuration) + return { + /** + * Retrieve columns information for a specific table + * @summary Get table columns + * @param {string} databaseId Database ID + * @param {string} tableName Table name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + databaseColumnsDatabaseIdTableNameGet(databaseId: string, tableName: string, options?: RawAxiosRequestConfig): AxiosPromise> { + return localVarFp.databaseColumnsDatabaseIdTableNameGet(databaseId, tableName, options).then((request) => request(axios, basePath)); + }, + /** + * Create a new database for a project + * @summary Create database + * @param {DatabaseCreatePostRequest} databaseCreatePostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + databaseCreatePost(databaseCreatePostRequest: DatabaseCreatePostRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.databaseCreatePost(databaseCreatePostRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Create a new database migration + * @summary Create migration + * @param {DatabaseMigrationCreatePostRequest} databaseMigrationCreatePostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + databaseMigrationCreatePost(databaseMigrationCreatePostRequest: DatabaseMigrationCreatePostRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.databaseMigrationCreatePost(databaseMigrationCreatePostRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Rollback database migrations + * @summary Run migrations down + * @param {string} databaseId Database ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + databaseMigrationDownDatabaseIdGet(databaseId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.databaseMigrationDownDatabaseIdGet(databaseId, options).then((request) => request(axios, basePath)); + }, + /** + * Execute pending database migrations + * @summary Run migrations up + * @param {string} databaseId Database ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + databaseMigrationUpDatabaseIdGet(databaseId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.databaseMigrationUpDatabaseIdGet(databaseId, options).then((request) => request(axios, basePath)); + }, + /** + * Add a new database node to the system + * @summary Add database node + * @param {DatabaseNodeCreatePostRequest} databaseNodeCreatePostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + databaseNodeCreatePost(databaseNodeCreatePostRequest: DatabaseNodeCreatePostRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.databaseNodeCreatePost(databaseNodeCreatePostRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Execute a SQL query on the database + * @summary Run database query + * @param {string} databaseId Database ID + * @param {DatabaseQueryDatabaseIdPostRequest} databaseQueryDatabaseIdPostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + databaseQueryDatabaseIdPost(databaseId: string, databaseQueryDatabaseIdPostRequest: DatabaseQueryDatabaseIdPostRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.databaseQueryDatabaseIdPost(databaseId, databaseQueryDatabaseIdPostRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Retrieve list of tables in a database + * @summary Get database tables + * @param {string} databaseId Database ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + databaseTablesDatabaseIdGet(databaseId: string, options?: RawAxiosRequestConfig): AxiosPromise> { + return localVarFp.databaseTablesDatabaseIdGet(databaseId, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * DatabaseManagementApi - object-oriented interface + */ +export class DatabaseManagementApi extends BaseAPI { + /** + * Retrieve columns information for a specific table + * @summary Get table columns + * @param {string} databaseId Database ID + * @param {string} tableName Table name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public databaseColumnsDatabaseIdTableNameGet(databaseId: string, tableName: string, options?: RawAxiosRequestConfig) { + return DatabaseManagementApiFp(this.configuration).databaseColumnsDatabaseIdTableNameGet(databaseId, tableName, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Create a new database for a project + * @summary Create database + * @param {DatabaseCreatePostRequest} databaseCreatePostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public databaseCreatePost(databaseCreatePostRequest: DatabaseCreatePostRequest, options?: RawAxiosRequestConfig) { + return DatabaseManagementApiFp(this.configuration).databaseCreatePost(databaseCreatePostRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Create a new database migration + * @summary Create migration + * @param {DatabaseMigrationCreatePostRequest} databaseMigrationCreatePostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public databaseMigrationCreatePost(databaseMigrationCreatePostRequest: DatabaseMigrationCreatePostRequest, options?: RawAxiosRequestConfig) { + return DatabaseManagementApiFp(this.configuration).databaseMigrationCreatePost(databaseMigrationCreatePostRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Rollback database migrations + * @summary Run migrations down + * @param {string} databaseId Database ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public databaseMigrationDownDatabaseIdGet(databaseId: string, options?: RawAxiosRequestConfig) { + return DatabaseManagementApiFp(this.configuration).databaseMigrationDownDatabaseIdGet(databaseId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Execute pending database migrations + * @summary Run migrations up + * @param {string} databaseId Database ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public databaseMigrationUpDatabaseIdGet(databaseId: string, options?: RawAxiosRequestConfig) { + return DatabaseManagementApiFp(this.configuration).databaseMigrationUpDatabaseIdGet(databaseId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Add a new database node to the system + * @summary Add database node + * @param {DatabaseNodeCreatePostRequest} databaseNodeCreatePostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public databaseNodeCreatePost(databaseNodeCreatePostRequest: DatabaseNodeCreatePostRequest, options?: RawAxiosRequestConfig) { + return DatabaseManagementApiFp(this.configuration).databaseNodeCreatePost(databaseNodeCreatePostRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Execute a SQL query on the database + * @summary Run database query + * @param {string} databaseId Database ID + * @param {DatabaseQueryDatabaseIdPostRequest} databaseQueryDatabaseIdPostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public databaseQueryDatabaseIdPost(databaseId: string, databaseQueryDatabaseIdPostRequest: DatabaseQueryDatabaseIdPostRequest, options?: RawAxiosRequestConfig) { + return DatabaseManagementApiFp(this.configuration).databaseQueryDatabaseIdPost(databaseId, databaseQueryDatabaseIdPostRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Retrieve list of tables in a database + * @summary Get database tables + * @param {string} databaseId Database ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public databaseTablesDatabaseIdGet(databaseId: string, options?: RawAxiosRequestConfig) { + return DatabaseManagementApiFp(this.configuration).databaseTablesDatabaseIdGet(databaseId, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * FunctionsApi - axios parameter creator + */ +export const FunctionsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Create a new function in the project + * @summary Create function + * @param {FunctionsCreatePostRequest} functionsCreatePostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + functionsCreatePost: async (functionsCreatePostRequest: FunctionsCreatePostRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'functionsCreatePostRequest' is not null or undefined + assertParamExists('functionsCreatePost', 'functionsCreatePostRequest', functionsCreatePostRequest) + const localVarPath = `/functions/create`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(functionsCreatePostRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Delete a function from the project + * @summary Delete function + * @param {FunctionsDeletePostRequest} functionsDeletePostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + functionsDeletePost: async (functionsDeletePostRequest: FunctionsDeletePostRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'functionsDeletePostRequest' is not null or undefined + assertParamExists('functionsDeletePost', 'functionsDeletePostRequest', functionsDeletePostRequest) + const localVarPath = `/functions/delete`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(functionsDeletePostRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * FunctionsApi - functional programming interface + */ +export const FunctionsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = FunctionsApiAxiosParamCreator(configuration) + return { + /** + * Create a new function in the project + * @summary Create function + * @param {FunctionsCreatePostRequest} functionsCreatePostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async functionsCreatePost(functionsCreatePostRequest: FunctionsCreatePostRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.functionsCreatePost(functionsCreatePostRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['FunctionsApi.functionsCreatePost']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Delete a function from the project + * @summary Delete function + * @param {FunctionsDeletePostRequest} functionsDeletePostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async functionsDeletePost(functionsDeletePostRequest: FunctionsDeletePostRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.functionsDeletePost(functionsDeletePostRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['FunctionsApi.functionsDeletePost']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * FunctionsApi - factory interface + */ +export const FunctionsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = FunctionsApiFp(configuration) + return { + /** + * Create a new function in the project + * @summary Create function + * @param {FunctionsCreatePostRequest} functionsCreatePostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + functionsCreatePost(functionsCreatePostRequest: FunctionsCreatePostRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.functionsCreatePost(functionsCreatePostRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Delete a function from the project + * @summary Delete function + * @param {FunctionsDeletePostRequest} functionsDeletePostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + functionsDeletePost(functionsDeletePostRequest: FunctionsDeletePostRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.functionsDeletePost(functionsDeletePostRequest, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * FunctionsApi - object-oriented interface + */ +export class FunctionsApi extends BaseAPI { + /** + * Create a new function in the project + * @summary Create function + * @param {FunctionsCreatePostRequest} functionsCreatePostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public functionsCreatePost(functionsCreatePostRequest: FunctionsCreatePostRequest, options?: RawAxiosRequestConfig) { + return FunctionsApiFp(this.configuration).functionsCreatePost(functionsCreatePostRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Delete a function from the project + * @summary Delete function + * @param {FunctionsDeletePostRequest} functionsDeletePostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public functionsDeletePost(functionsDeletePostRequest: FunctionsDeletePostRequest, options?: RawAxiosRequestConfig) { + return FunctionsApiFp(this.configuration).functionsDeletePost(functionsDeletePostRequest, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * LoggingApi - axios parameter creator + */ +export const LoggingApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Find all logs for a project with filtering + * @summary Find all logs + * @param {string} id Project ID + * @param {LoggerIdFindAllPostRequest} loggerIdFindAllPostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + loggerIdFindAllPost: async (id: string, loggerIdFindAllPostRequest: LoggerIdFindAllPostRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('loggerIdFindAllPost', 'id', id) + // verify required parameter 'loggerIdFindAllPostRequest' is not null or undefined + assertParamExists('loggerIdFindAllPost', 'loggerIdFindAllPostRequest', loggerIdFindAllPostRequest) + const localVarPath = `/logger/{id}/findAll` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(loggerIdFindAllPostRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Find logs for a specific query with filtering + * @summary Find logs for query + * @param {string} id Query ID + * @param {LoggerIdFindAllPostRequest} loggerIdFindAllPostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + loggerIdFindPost: async (id: string, loggerIdFindAllPostRequest: LoggerIdFindAllPostRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('loggerIdFindPost', 'id', id) + // verify required parameter 'loggerIdFindAllPostRequest' is not null or undefined + assertParamExists('loggerIdFindPost', 'loggerIdFindAllPostRequest', loggerIdFindAllPostRequest) + const localVarPath = `/logger/{id}/find` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication QueryGuard required + await setApiKeyToObject(localVarHeaderParameter, "x-query-access", configuration) + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(loggerIdFindAllPostRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Retrieve log entries by trace ID + * @summary Get log by trace ID + * @param {string} id Log ID + * @param {string} traceId Trace ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + loggerIdTraceIdGet: async (id: string, traceId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('loggerIdTraceIdGet', 'id', id) + // verify required parameter 'traceId' is not null or undefined + assertParamExists('loggerIdTraceIdGet', 'traceId', traceId) + const localVarPath = `/logger/{id}/{traceId}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))) + .replace(`{${"traceId"}}`, encodeURIComponent(String(traceId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * LoggingApi - functional programming interface + */ +export const LoggingApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = LoggingApiAxiosParamCreator(configuration) + return { + /** + * Find all logs for a project with filtering + * @summary Find all logs + * @param {string} id Project ID + * @param {LoggerIdFindAllPostRequest} loggerIdFindAllPostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async loggerIdFindAllPost(id: string, loggerIdFindAllPostRequest: LoggerIdFindAllPostRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.loggerIdFindAllPost(id, loggerIdFindAllPostRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['LoggingApi.loggerIdFindAllPost']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Find logs for a specific query with filtering + * @summary Find logs for query + * @param {string} id Query ID + * @param {LoggerIdFindAllPostRequest} loggerIdFindAllPostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async loggerIdFindPost(id: string, loggerIdFindAllPostRequest: LoggerIdFindAllPostRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.loggerIdFindPost(id, loggerIdFindAllPostRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['LoggingApi.loggerIdFindPost']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Retrieve log entries by trace ID + * @summary Get log by trace ID + * @param {string} id Log ID + * @param {string} traceId Trace ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async loggerIdTraceIdGet(id: string, traceId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.loggerIdTraceIdGet(id, traceId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['LoggingApi.loggerIdTraceIdGet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * LoggingApi - factory interface + */ +export const LoggingApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = LoggingApiFp(configuration) + return { + /** + * Find all logs for a project with filtering + * @summary Find all logs + * @param {string} id Project ID + * @param {LoggerIdFindAllPostRequest} loggerIdFindAllPostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + loggerIdFindAllPost(id: string, loggerIdFindAllPostRequest: LoggerIdFindAllPostRequest, options?: RawAxiosRequestConfig): AxiosPromise> { + return localVarFp.loggerIdFindAllPost(id, loggerIdFindAllPostRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Find logs for a specific query with filtering + * @summary Find logs for query + * @param {string} id Query ID + * @param {LoggerIdFindAllPostRequest} loggerIdFindAllPostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + loggerIdFindPost(id: string, loggerIdFindAllPostRequest: LoggerIdFindAllPostRequest, options?: RawAxiosRequestConfig): AxiosPromise> { + return localVarFp.loggerIdFindPost(id, loggerIdFindAllPostRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Retrieve log entries by trace ID + * @summary Get log by trace ID + * @param {string} id Log ID + * @param {string} traceId Trace ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + loggerIdTraceIdGet(id: string, traceId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.loggerIdTraceIdGet(id, traceId, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * LoggingApi - object-oriented interface + */ +export class LoggingApi extends BaseAPI { + /** + * Find all logs for a project with filtering + * @summary Find all logs + * @param {string} id Project ID + * @param {LoggerIdFindAllPostRequest} loggerIdFindAllPostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public loggerIdFindAllPost(id: string, loggerIdFindAllPostRequest: LoggerIdFindAllPostRequest, options?: RawAxiosRequestConfig) { + return LoggingApiFp(this.configuration).loggerIdFindAllPost(id, loggerIdFindAllPostRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Find logs for a specific query with filtering + * @summary Find logs for query + * @param {string} id Query ID + * @param {LoggerIdFindAllPostRequest} loggerIdFindAllPostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public loggerIdFindPost(id: string, loggerIdFindAllPostRequest: LoggerIdFindAllPostRequest, options?: RawAxiosRequestConfig) { + return LoggingApiFp(this.configuration).loggerIdFindPost(id, loggerIdFindAllPostRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Retrieve log entries by trace ID + * @summary Get log by trace ID + * @param {string} id Log ID + * @param {string} traceId Trace ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public loggerIdTraceIdGet(id: string, traceId: string, options?: RawAxiosRequestConfig) { + return LoggingApiFp(this.configuration).loggerIdTraceIdGet(id, traceId, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * ProjectManagementApi - axios parameter creator + */ +export const ProjectManagementApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Retrieve all API tokens for the current project + * @summary Get all API tokens + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + projectApiTokensGet: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/project/api-tokens`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication AdminAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-admin-token", configuration) + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Create a new project with database + * @summary Create project + * @param {ProjectCreatePutRequest} projectCreatePutRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + projectCreatePut: async (projectCreatePutRequest: ProjectCreatePutRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'projectCreatePutRequest' is not null or undefined + assertParamExists('projectCreatePut', 'projectCreatePutRequest', projectCreatePutRequest) + const localVarPath = `/project/create`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(projectCreatePutRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Create a new project without creating a database + * @summary Create project without database + * @param {ProjectCreatePutRequest} projectCreatePutRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + projectCreateWithoutDbPut: async (projectCreatePutRequest: ProjectCreatePutRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'projectCreatePutRequest' is not null or undefined + assertParamExists('projectCreateWithoutDbPut', 'projectCreatePutRequest', projectCreatePutRequest) + const localVarPath = `/project/create-without-db`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication AdminAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-admin-token", configuration) + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(projectCreatePutRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Create a new project setting + * @summary Create project setting + * @param {ProjectSettingsCreatePutRequest} projectSettingsCreatePutRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + projectSettingsCreatePut: async (projectSettingsCreatePutRequest: ProjectSettingsCreatePutRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'projectSettingsCreatePutRequest' is not null or undefined + assertParamExists('projectSettingsCreatePut', 'projectSettingsCreatePutRequest', projectSettingsCreatePutRequest) + const localVarPath = `/project/settings/create`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(projectSettingsCreatePutRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Delete a project setting by key + * @summary Delete project setting + * @param {string} key Setting key to delete + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + projectSettingsDeleteKeyDelete: async (key: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'key' is not null or undefined + assertParamExists('projectSettingsDeleteKeyDelete', 'key', key) + const localVarPath = `/project/settings/delete/{key}` + .replace(`{${"key"}}`, encodeURIComponent(String(key))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Retrieve all settings for the current project + * @summary Get all project settings + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + projectSettingsGet: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/project/settings`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * ProjectManagementApi - functional programming interface + */ +export const ProjectManagementApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = ProjectManagementApiAxiosParamCreator(configuration) + return { + /** + * Retrieve all API tokens for the current project + * @summary Get all API tokens + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async projectApiTokensGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.projectApiTokensGet(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ProjectManagementApi.projectApiTokensGet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Create a new project with database + * @summary Create project + * @param {ProjectCreatePutRequest} projectCreatePutRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async projectCreatePut(projectCreatePutRequest: ProjectCreatePutRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.projectCreatePut(projectCreatePutRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ProjectManagementApi.projectCreatePut']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Create a new project without creating a database + * @summary Create project without database + * @param {ProjectCreatePutRequest} projectCreatePutRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async projectCreateWithoutDbPut(projectCreatePutRequest: ProjectCreatePutRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.projectCreateWithoutDbPut(projectCreatePutRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ProjectManagementApi.projectCreateWithoutDbPut']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Create a new project setting + * @summary Create project setting + * @param {ProjectSettingsCreatePutRequest} projectSettingsCreatePutRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async projectSettingsCreatePut(projectSettingsCreatePutRequest: ProjectSettingsCreatePutRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.projectSettingsCreatePut(projectSettingsCreatePutRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ProjectManagementApi.projectSettingsCreatePut']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Delete a project setting by key + * @summary Delete project setting + * @param {string} key Setting key to delete + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async projectSettingsDeleteKeyDelete(key: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.projectSettingsDeleteKeyDelete(key, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ProjectManagementApi.projectSettingsDeleteKeyDelete']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Retrieve all settings for the current project + * @summary Get all project settings + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async projectSettingsGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.projectSettingsGet(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ProjectManagementApi.projectSettingsGet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * ProjectManagementApi - factory interface + */ +export const ProjectManagementApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = ProjectManagementApiFp(configuration) + return { + /** + * Retrieve all API tokens for the current project + * @summary Get all API tokens + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + projectApiTokensGet(options?: RawAxiosRequestConfig): AxiosPromise> { + return localVarFp.projectApiTokensGet(options).then((request) => request(axios, basePath)); + }, + /** + * Create a new project with database + * @summary Create project + * @param {ProjectCreatePutRequest} projectCreatePutRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + projectCreatePut(projectCreatePutRequest: ProjectCreatePutRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.projectCreatePut(projectCreatePutRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Create a new project without creating a database + * @summary Create project without database + * @param {ProjectCreatePutRequest} projectCreatePutRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + projectCreateWithoutDbPut(projectCreatePutRequest: ProjectCreatePutRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.projectCreateWithoutDbPut(projectCreatePutRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Create a new project setting + * @summary Create project setting + * @param {ProjectSettingsCreatePutRequest} projectSettingsCreatePutRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + projectSettingsCreatePut(projectSettingsCreatePutRequest: ProjectSettingsCreatePutRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.projectSettingsCreatePut(projectSettingsCreatePutRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Delete a project setting by key + * @summary Delete project setting + * @param {string} key Setting key to delete + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + projectSettingsDeleteKeyDelete(key: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.projectSettingsDeleteKeyDelete(key, options).then((request) => request(axios, basePath)); + }, + /** + * Retrieve all settings for the current project + * @summary Get all project settings + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + projectSettingsGet(options?: RawAxiosRequestConfig): AxiosPromise> { + return localVarFp.projectSettingsGet(options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * ProjectManagementApi - object-oriented interface + */ +export class ProjectManagementApi extends BaseAPI { + /** + * Retrieve all API tokens for the current project + * @summary Get all API tokens + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public projectApiTokensGet(options?: RawAxiosRequestConfig) { + return ProjectManagementApiFp(this.configuration).projectApiTokensGet(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Create a new project with database + * @summary Create project + * @param {ProjectCreatePutRequest} projectCreatePutRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public projectCreatePut(projectCreatePutRequest: ProjectCreatePutRequest, options?: RawAxiosRequestConfig) { + return ProjectManagementApiFp(this.configuration).projectCreatePut(projectCreatePutRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Create a new project without creating a database + * @summary Create project without database + * @param {ProjectCreatePutRequest} projectCreatePutRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public projectCreateWithoutDbPut(projectCreatePutRequest: ProjectCreatePutRequest, options?: RawAxiosRequestConfig) { + return ProjectManagementApiFp(this.configuration).projectCreateWithoutDbPut(projectCreatePutRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Create a new project setting + * @summary Create project setting + * @param {ProjectSettingsCreatePutRequest} projectSettingsCreatePutRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public projectSettingsCreatePut(projectSettingsCreatePutRequest: ProjectSettingsCreatePutRequest, options?: RawAxiosRequestConfig) { + return ProjectManagementApiFp(this.configuration).projectSettingsCreatePut(projectSettingsCreatePutRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Delete a project setting by key + * @summary Delete project setting + * @param {string} key Setting key to delete + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public projectSettingsDeleteKeyDelete(key: string, options?: RawAxiosRequestConfig) { + return ProjectManagementApiFp(this.configuration).projectSettingsDeleteKeyDelete(key, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Retrieve all settings for the current project + * @summary Get all project settings + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public projectSettingsGet(options?: RawAxiosRequestConfig) { + return ProjectManagementApiFp(this.configuration).projectSettingsGet(options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * QueriesApi - axios parameter creator + */ +export const QueriesApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Create a new query in the project + * @summary Create query + * @param {QueryCreatePostRequest} queryCreatePostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + queryCreatePost: async (queryCreatePostRequest: QueryCreatePostRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'queryCreatePostRequest' is not null or undefined + assertParamExists('queryCreatePost', 'queryCreatePostRequest', queryCreatePostRequest) + const localVarPath = `/query/create`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(queryCreatePostRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Delete an existing query + * @summary Delete query + * @param {string} id Query ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + queryDeleteIdDelete: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('queryDeleteIdDelete', 'id', id) + const localVarPath = `/query/delete/{id}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication QueryGuard required + await setApiKeyToObject(localVarHeaderParameter, "x-query-access", configuration) + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Execute a query with provided data + * @summary Run query + * @param {string} id Query ID + * @param {object} body + * @param {string} [xTraceId] Trace ID for logging + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + queryRunIdPost: async (id: string, body: object, xTraceId?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('queryRunIdPost', 'id', id) + // verify required parameter 'body' is not null or undefined + assertParamExists('queryRunIdPost', 'body', body) + const localVarPath = `/query/run/{id}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication QueryGuard required + await setApiKeyToObject(localVarHeaderParameter, "x-query-access", configuration) + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + if (xTraceId != null) { + localVarHeaderParameter['x-trace-id'] = String(xTraceId); + } + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Update an existing query + * @summary Update query + * @param {string} id Query ID + * @param {QueryUpdateIdPostRequest} queryUpdateIdPostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + queryUpdateIdPost: async (id: string, queryUpdateIdPostRequest: QueryUpdateIdPostRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('queryUpdateIdPost', 'id', id) + // verify required parameter 'queryUpdateIdPostRequest' is not null or undefined + assertParamExists('queryUpdateIdPost', 'queryUpdateIdPostRequest', queryUpdateIdPostRequest) + const localVarPath = `/query/update/{id}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication QueryGuard required + await setApiKeyToObject(localVarHeaderParameter, "x-query-access", configuration) + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(queryUpdateIdPostRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * QueriesApi - functional programming interface + */ +export const QueriesApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = QueriesApiAxiosParamCreator(configuration) + return { + /** + * Create a new query in the project + * @summary Create query + * @param {QueryCreatePostRequest} queryCreatePostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async queryCreatePost(queryCreatePostRequest: QueryCreatePostRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.queryCreatePost(queryCreatePostRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['QueriesApi.queryCreatePost']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Delete an existing query + * @summary Delete query + * @param {string} id Query ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async queryDeleteIdDelete(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.queryDeleteIdDelete(id, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['QueriesApi.queryDeleteIdDelete']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Execute a query with provided data + * @summary Run query + * @param {string} id Query ID + * @param {object} body + * @param {string} [xTraceId] Trace ID for logging + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async queryRunIdPost(id: string, body: object, xTraceId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.queryRunIdPost(id, body, xTraceId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['QueriesApi.queryRunIdPost']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Update an existing query + * @summary Update query + * @param {string} id Query ID + * @param {QueryUpdateIdPostRequest} queryUpdateIdPostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async queryUpdateIdPost(id: string, queryUpdateIdPostRequest: QueryUpdateIdPostRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.queryUpdateIdPost(id, queryUpdateIdPostRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['QueriesApi.queryUpdateIdPost']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * QueriesApi - factory interface + */ +export const QueriesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = QueriesApiFp(configuration) + return { + /** + * Create a new query in the project + * @summary Create query + * @param {QueryCreatePostRequest} queryCreatePostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + queryCreatePost(queryCreatePostRequest: QueryCreatePostRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.queryCreatePost(queryCreatePostRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Delete an existing query + * @summary Delete query + * @param {string} id Query ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + queryDeleteIdDelete(id: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.queryDeleteIdDelete(id, options).then((request) => request(axios, basePath)); + }, + /** + * Execute a query with provided data + * @summary Run query + * @param {string} id Query ID + * @param {object} body + * @param {string} [xTraceId] Trace ID for logging + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + queryRunIdPost(id: string, body: object, xTraceId?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.queryRunIdPost(id, body, xTraceId, options).then((request) => request(axios, basePath)); + }, + /** + * Update an existing query + * @summary Update query + * @param {string} id Query ID + * @param {QueryUpdateIdPostRequest} queryUpdateIdPostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + queryUpdateIdPost(id: string, queryUpdateIdPostRequest: QueryUpdateIdPostRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.queryUpdateIdPost(id, queryUpdateIdPostRequest, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * QueriesApi - object-oriented interface + */ +export class QueriesApi extends BaseAPI { + /** + * Create a new query in the project + * @summary Create query + * @param {QueryCreatePostRequest} queryCreatePostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public queryCreatePost(queryCreatePostRequest: QueryCreatePostRequest, options?: RawAxiosRequestConfig) { + return QueriesApiFp(this.configuration).queryCreatePost(queryCreatePostRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Delete an existing query + * @summary Delete query + * @param {string} id Query ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public queryDeleteIdDelete(id: string, options?: RawAxiosRequestConfig) { + return QueriesApiFp(this.configuration).queryDeleteIdDelete(id, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Execute a query with provided data + * @summary Run query + * @param {string} id Query ID + * @param {object} body + * @param {string} [xTraceId] Trace ID for logging + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public queryRunIdPost(id: string, body: object, xTraceId?: string, options?: RawAxiosRequestConfig) { + return QueriesApiFp(this.configuration).queryRunIdPost(id, body, xTraceId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Update an existing query + * @summary Update query + * @param {string} id Query ID + * @param {QueryUpdateIdPostRequest} queryUpdateIdPostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public queryUpdateIdPost(id: string, queryUpdateIdPostRequest: QueryUpdateIdPostRequest, options?: RawAxiosRequestConfig) { + return QueriesApiFp(this.configuration).queryUpdateIdPost(id, queryUpdateIdPostRequest, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * RedisManagementApi - axios parameter creator + */ +export const RedisManagementApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Add a new Redis node to the system + * @summary Add Redis node + * @param {RedisNodeCreatePostRequest} redisNodeCreatePostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + redisNodeCreatePost: async (redisNodeCreatePostRequest: RedisNodeCreatePostRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'redisNodeCreatePostRequest' is not null or undefined + assertParamExists('redisNodeCreatePost', 'redisNodeCreatePostRequest', redisNodeCreatePostRequest) + const localVarPath = `/redis/node/create`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication AdminAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-admin-token", configuration) + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(redisNodeCreatePostRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * RedisManagementApi - functional programming interface + */ +export const RedisManagementApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = RedisManagementApiAxiosParamCreator(configuration) + return { + /** + * Add a new Redis node to the system + * @summary Add Redis node + * @param {RedisNodeCreatePostRequest} redisNodeCreatePostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async redisNodeCreatePost(redisNodeCreatePostRequest: RedisNodeCreatePostRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.redisNodeCreatePost(redisNodeCreatePostRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['RedisManagementApi.redisNodeCreatePost']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * RedisManagementApi - factory interface + */ +export const RedisManagementApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = RedisManagementApiFp(configuration) + return { + /** + * Add a new Redis node to the system + * @summary Add Redis node + * @param {RedisNodeCreatePostRequest} redisNodeCreatePostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + redisNodeCreatePost(redisNodeCreatePostRequest: RedisNodeCreatePostRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.redisNodeCreatePost(redisNodeCreatePostRequest, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * RedisManagementApi - object-oriented interface + */ +export class RedisManagementApi extends BaseAPI { + /** + * Add a new Redis node to the system + * @summary Add Redis node + * @param {RedisNodeCreatePostRequest} redisNodeCreatePostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public redisNodeCreatePost(redisNodeCreatePostRequest: RedisNodeCreatePostRequest, options?: RawAxiosRequestConfig) { + return RedisManagementApiFp(this.configuration).redisNodeCreatePost(redisNodeCreatePostRequest, options).then((request) => request(this.axios, this.basePath)); + } +} + + + diff --git a/out/ts/base.ts b/out/ts/base.ts new file mode 100644 index 0000000..01dbe6a --- /dev/null +++ b/out/ts/base.ts @@ -0,0 +1,62 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Low-Code Engine API + * API documentation for the Low-Code Engine platform that provides query execution, database management, and project administration capabilities. + * + * The version of the OpenAPI document: 1.0.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 type { Configuration } from './configuration'; +// Some imports not used depending on template conditions +// @ts-ignore +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; + +export const BASE_PATH = "http://localhost:3000".replace(/\/+$/, ""); + +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +export interface RequestArgs { + url: string; + options: RawAxiosRequestConfig; +} + +export class BaseAPI { + protected configuration: Configuration | undefined; + + constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath ?? basePath; + } + } +}; + +export class RequiredError extends Error { + constructor(public field: string, msg?: string) { + super(msg); + this.name = "RequiredError" + } +} + +interface ServerMap { + [key: string]: { + url: string, + description: string, + }[]; +} + +export const operationServerMap: ServerMap = { +} diff --git a/out/ts/common.ts b/out/ts/common.ts new file mode 100644 index 0000000..ebc1912 --- /dev/null +++ b/out/ts/common.ts @@ -0,0 +1,113 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Low-Code Engine API + * API documentation for the Low-Code Engine platform that provides query execution, database management, and project administration capabilities. + * + * The version of the OpenAPI document: 1.0.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 type { Configuration } from "./configuration"; +import type { RequestArgs } from "./base"; +import type { AxiosInstance, AxiosResponse } from 'axios'; +import { RequiredError } from "./base"; + +export const DUMMY_BASE_URL = 'https://example.com' + +/** + * + * @throws {RequiredError} + */ +export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); + } +} + +export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey(keyParamName) + : await configuration.apiKey; + object[keyParamName] = localVarApiKeyValue; + } +} + +export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { + if (configuration && (configuration.username || configuration.password)) { + object["auth"] = { username: configuration.username, password: configuration.password }; + } +} + +export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + object["Authorization"] = "Bearer " + accessToken; + } +} + +export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? await configuration.accessToken(name, scopes) + : await configuration.accessToken; + object["Authorization"] = "Bearer " + localVarAccessTokenValue; + } +} + + +function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { + if (parameter == null) return; + if (typeof parameter === "object") { + if (Array.isArray(parameter)) { + (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); + } + else { + Object.keys(parameter).forEach(currentKey => + setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) + ); + } + } + else { + if (urlSearchParams.has(key)) { + urlSearchParams.append(key, parameter); + } + else { + urlSearchParams.set(key, parameter); + } + } +} + +export const setSearchParams = function (url: URL, ...objects: any[]) { + const searchParams = new URLSearchParams(url.search); + setFlattenedQueryParams(searchParams, objects); + url.search = searchParams.toString(); +} + +export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { + const nonString = typeof value !== 'string'; + const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers['Content-Type']) + : nonString; + return needsSerialization + ? JSON.stringify(value !== undefined ? value : {}) + : (value || ""); +} + +export const toPathString = function (url: URL) { + return url.pathname + url.search + url.hash +} + +export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { + return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url}; + return axios.request(axiosRequestArgs); + }; +} diff --git a/out/ts/configuration.ts b/out/ts/configuration.ts new file mode 100644 index 0000000..ffd362f --- /dev/null +++ b/out/ts/configuration.ts @@ -0,0 +1,121 @@ +/* tslint:disable */ +/** + * Low-Code Engine API + * API documentation for the Low-Code Engine platform that provides query execution, database management, and project administration capabilities. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +interface AWSv4Configuration { + options?: { + region?: string + service?: string + } + credentials?: { + accessKeyId?: string + secretAccessKey?: string, + sessionToken?: string + } +} + +export interface ConfigurationParameters { + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + username?: string; + password?: string; + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + awsv4?: AWSv4Configuration; + basePath?: string; + serverIndex?: number; + baseOptions?: any; + formDataCtor?: new () => any; +} + +export class Configuration { + /** + * parameter for apiKey security + * @param name security name + */ + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + /** + * parameter for basic security + */ + username?: string; + /** + * parameter for basic security + */ + password?: string; + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + */ + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * parameter for aws4 signature security + * @param {Object} AWS4Signature - AWS4 Signature security + * @param {string} options.region - aws region + * @param {string} options.service - name of the service. + * @param {string} credentials.accessKeyId - aws access key id + * @param {string} credentials.secretAccessKey - aws access key + * @param {string} credentials.sessionToken - aws session token + * @memberof Configuration + */ + awsv4?: AWSv4Configuration; + /** + * override base path + */ + basePath?: string; + /** + * override server index + */ + serverIndex?: number; + /** + * base options for axios calls + */ + baseOptions?: any; + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any; + + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey; + this.username = param.username; + this.password = param.password; + this.accessToken = param.accessToken; + this.awsv4 = param.awsv4; + this.basePath = param.basePath; + this.serverIndex = param.serverIndex; + this.baseOptions = { + ...param.baseOptions, + headers: { + ...param.baseOptions?.headers, + }, + }; + this.formDataCtor = param.formDataCtor; + } + + /** + * 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. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } +} diff --git a/out/ts/docs/APITokensApi.md b/out/ts/docs/APITokensApi.md new file mode 100644 index 0000000..42b8c49 --- /dev/null +++ b/out/ts/docs/APITokensApi.md @@ -0,0 +1,118 @@ +# APITokensApi + +All URIs are relative to *http://localhost:3000* + +|Method | HTTP request | Description| +|------------- | ------------- | -------------| +|[**apiTokenGeneratePost**](#apitokengeneratepost) | **POST** /api/token/generate | Generate API token| +|[**apiTokenRevokeTokenDelete**](#apitokenrevoketokendelete) | **DELETE** /api/token/revoke/{token} | Revoke API token| + +# **apiTokenGeneratePost** +> Token apiTokenGeneratePost(apiTokenGeneratePostRequest) + +Generate a new API token for a project + +### Example + +```typescript +import { + APITokensApi, + Configuration, + ApiTokenGeneratePostRequest +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new APITokensApi(configuration); + +let apiTokenGeneratePostRequest: ApiTokenGeneratePostRequest; // + +const { status, data } = await apiInstance.apiTokenGeneratePost( + apiTokenGeneratePostRequest +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **apiTokenGeneratePostRequest** | **ApiTokenGeneratePostRequest**| | | + + +### Return type + +**Token** + +### Authorization + +[AdminAuth](../README.md#AdminAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Token generated successfully | - | +|**400** | Project ID is required | - | +|**401** | Unauthorized | - | +|**403** | Admin access required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **apiTokenRevokeTokenDelete** +> apiTokenRevokeTokenDelete() + +Revoke an existing API token + +### Example + +```typescript +import { + APITokensApi, + Configuration +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new APITokensApi(configuration); + +let token: string; //Token to revoke (default to undefined) + +const { status, data } = await apiInstance.apiTokenRevokeTokenDelete( + token +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **token** | [**string**] | Token to revoke | defaults to undefined| + + +### Return type + +void (empty response body) + +### Authorization + +[AdminAuth](../README.md#AdminAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Token revoked successfully | - | +|**401** | Unauthorized | - | +|**403** | Admin access required | - | +|**404** | Token not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/out/ts/docs/ApiTokenGeneratePostRequest.md b/out/ts/docs/ApiTokenGeneratePostRequest.md new file mode 100644 index 0000000..eed3825 --- /dev/null +++ b/out/ts/docs/ApiTokenGeneratePostRequest.md @@ -0,0 +1,20 @@ +# ApiTokenGeneratePostRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Project ID | [default to undefined] + +## Example + +```typescript +import { ApiTokenGeneratePostRequest } from './api'; + +const instance: ApiTokenGeneratePostRequest = { + id, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/out/ts/docs/CommandCreatePostRequest.md b/out/ts/docs/CommandCreatePostRequest.md new file mode 100644 index 0000000..f9eac5c --- /dev/null +++ b/out/ts/docs/CommandCreatePostRequest.md @@ -0,0 +1,20 @@ +# CommandCreatePostRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**source** | **string** | Command source code | [default to undefined] + +## Example + +```typescript +import { CommandCreatePostRequest } from './api'; + +const instance: CommandCreatePostRequest = { + source, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/out/ts/docs/CommandUpdateIdPostRequest.md b/out/ts/docs/CommandUpdateIdPostRequest.md new file mode 100644 index 0000000..7a50e6d --- /dev/null +++ b/out/ts/docs/CommandUpdateIdPostRequest.md @@ -0,0 +1,20 @@ +# CommandUpdateIdPostRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**source** | **string** | Updated command source code | [optional] [default to undefined] + +## Example + +```typescript +import { CommandUpdateIdPostRequest } from './api'; + +const instance: CommandUpdateIdPostRequest = { + source, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/out/ts/docs/CommandsApi.md b/out/ts/docs/CommandsApi.md new file mode 100644 index 0000000..5608355 --- /dev/null +++ b/out/ts/docs/CommandsApi.md @@ -0,0 +1,238 @@ +# CommandsApi + +All URIs are relative to *http://localhost:3000* + +|Method | HTTP request | Description| +|------------- | ------------- | -------------| +|[**commandCreatePost**](#commandcreatepost) | **POST** /command/create | Create command| +|[**commandDeleteIdDelete**](#commanddeleteiddelete) | **DELETE** /command/delete/{id} | Delete command| +|[**commandRunIdPost**](#commandrunidpost) | **POST** /command/run/{id} | Run command| +|[**commandUpdateIdPost**](#commandupdateidpost) | **POST** /command/update/{id} | Update command| + +# **commandCreatePost** +> Query commandCreatePost(commandCreatePostRequest) + +Create a new command in the project + +### Example + +```typescript +import { + CommandsApi, + Configuration, + CommandCreatePostRequest +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new CommandsApi(configuration); + +let commandCreatePostRequest: CommandCreatePostRequest; // + +const { status, data } = await apiInstance.commandCreatePost( + commandCreatePostRequest +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **commandCreatePostRequest** | **CommandCreatePostRequest**| | | + + +### Return type + +**Query** + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Command created successfully | - | +|**401** | Unauthorized | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **commandDeleteIdDelete** +> commandDeleteIdDelete() + +Delete an existing command + +### Example + +```typescript +import { + CommandsApi, + Configuration +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new CommandsApi(configuration); + +let id: string; //Command ID (default to undefined) + +const { status, data } = await apiInstance.commandDeleteIdDelete( + id +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **id** | [**string**] | Command ID | defaults to undefined| + + +### Return type + +void (empty response body) + +### Authorization + +[QueryGuard](../README.md#QueryGuard), [ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Command deleted successfully | - | +|**401** | Unauthorized | - | +|**403** | Query access required | - | +|**404** | Command not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **commandRunIdPost** +> object commandRunIdPost(body) + +Execute a command with provided data + +### Example + +```typescript +import { + CommandsApi, + Configuration +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new CommandsApi(configuration); + +let id: string; //Command ID (default to undefined) +let body: object; // +let xTraceId: string; //Trace ID for logging (optional) (default to undefined) + +const { status, data } = await apiInstance.commandRunIdPost( + id, + body, + xTraceId +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **body** | **object**| | | +| **id** | [**string**] | Command ID | defaults to undefined| +| **xTraceId** | [**string**] | Trace ID for logging | (optional) defaults to undefined| + + +### Return type + +**object** + +### Authorization + +[QueryGuard](../README.md#QueryGuard), [ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Command executed successfully | - | +|**302** | Redirect response | - | +|**401** | Unauthorized | - | +|**403** | Query access required | - | +|**404** | Command not found | - | +|**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **commandUpdateIdPost** +> Query commandUpdateIdPost(commandUpdateIdPostRequest) + +Update an existing command + +### Example + +```typescript +import { + CommandsApi, + Configuration, + CommandUpdateIdPostRequest +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new CommandsApi(configuration); + +let id: string; //Command ID (default to undefined) +let commandUpdateIdPostRequest: CommandUpdateIdPostRequest; // + +const { status, data } = await apiInstance.commandUpdateIdPost( + id, + commandUpdateIdPostRequest +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **commandUpdateIdPostRequest** | **CommandUpdateIdPostRequest**| | | +| **id** | [**string**] | Command ID | defaults to undefined| + + +### Return type + +**Query** + +### Authorization + +[QueryGuard](../README.md#QueryGuard), [ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Command updated successfully | - | +|**401** | Unauthorized | - | +|**403** | Query access required | - | +|**404** | Command not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/out/ts/docs/Database.md b/out/ts/docs/Database.md new file mode 100644 index 0000000..35352fd --- /dev/null +++ b/out/ts/docs/Database.md @@ -0,0 +1,34 @@ +# Database + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique database identifier | [optional] [default to undefined] +**q_username** | **string** | Query username for database access | [optional] [default to undefined] +**c_username** | **string** | Command username for database access | [optional] [default to undefined] +**password** | **string** | Database password | [optional] [default to undefined] +**database** | **string** | Database name | [optional] [default to undefined] +**migrations** | [**Array<Migration>**](Migration.md) | | [optional] [default to undefined] +**project** | [**Project**](Project.md) | | [optional] [default to undefined] +**node** | [**DatabaseNode**](DatabaseNode.md) | | [optional] [default to undefined] + +## Example + +```typescript +import { Database } from './api'; + +const instance: Database = { + id, + q_username, + c_username, + password, + database, + migrations, + project, + node, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/out/ts/docs/DatabaseCreatePostRequest.md b/out/ts/docs/DatabaseCreatePostRequest.md new file mode 100644 index 0000000..4c0b77a --- /dev/null +++ b/out/ts/docs/DatabaseCreatePostRequest.md @@ -0,0 +1,20 @@ +# DatabaseCreatePostRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**projectId** | **string** | Project ID | [default to undefined] + +## Example + +```typescript +import { DatabaseCreatePostRequest } from './api'; + +const instance: DatabaseCreatePostRequest = { + projectId, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/out/ts/docs/DatabaseManagementApi.md b/out/ts/docs/DatabaseManagementApi.md new file mode 100644 index 0000000..fbdb60a --- /dev/null +++ b/out/ts/docs/DatabaseManagementApi.md @@ -0,0 +1,448 @@ +# DatabaseManagementApi + +All URIs are relative to *http://localhost:3000* + +|Method | HTTP request | Description| +|------------- | ------------- | -------------| +|[**databaseColumnsDatabaseIdTableNameGet**](#databasecolumnsdatabaseidtablenameget) | **GET** /database/columns/{databaseId}/{tableName} | Get table columns| +|[**databaseCreatePost**](#databasecreatepost) | **POST** /database/create | Create database| +|[**databaseMigrationCreatePost**](#databasemigrationcreatepost) | **POST** /database/migration/create | Create migration| +|[**databaseMigrationDownDatabaseIdGet**](#databasemigrationdowndatabaseidget) | **GET** /database/migration/down/{databaseId} | Run migrations down| +|[**databaseMigrationUpDatabaseIdGet**](#databasemigrationupdatabaseidget) | **GET** /database/migration/up/{databaseId} | Run migrations up| +|[**databaseNodeCreatePost**](#databasenodecreatepost) | **POST** /database/node/create | Add database node| +|[**databaseQueryDatabaseIdPost**](#databasequerydatabaseidpost) | **POST** /database/query/{databaseId} | Run database query| +|[**databaseTablesDatabaseIdGet**](#databasetablesdatabaseidget) | **GET** /database/tables/{databaseId} | Get database tables| + +# **databaseColumnsDatabaseIdTableNameGet** +> Array databaseColumnsDatabaseIdTableNameGet() + +Retrieve columns information for a specific table + +### Example + +```typescript +import { + DatabaseManagementApi, + Configuration +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new DatabaseManagementApi(configuration); + +let databaseId: string; //Database ID (default to undefined) +let tableName: string; //Table name (default to undefined) + +const { status, data } = await apiInstance.databaseColumnsDatabaseIdTableNameGet( + databaseId, + tableName +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **databaseId** | [**string**] | Database ID | defaults to undefined| +| **tableName** | [**string**] | Table name | defaults to undefined| + + +### Return type + +**Array** + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Columns retrieved successfully | - | +|**401** | Unauthorized | - | +|**404** | Database or table not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **databaseCreatePost** +> Database databaseCreatePost(databaseCreatePostRequest) + +Create a new database for a project + +### Example + +```typescript +import { + DatabaseManagementApi, + Configuration, + DatabaseCreatePostRequest +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new DatabaseManagementApi(configuration); + +let databaseCreatePostRequest: DatabaseCreatePostRequest; // + +const { status, data } = await apiInstance.databaseCreatePost( + databaseCreatePostRequest +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **databaseCreatePostRequest** | **DatabaseCreatePostRequest**| | | + + +### Return type + +**Database** + +### Authorization + +[AdminAuth](../README.md#AdminAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Database created successfully | - | +|**401** | Unauthorized | - | +|**403** | Admin access required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **databaseMigrationCreatePost** +> Migration databaseMigrationCreatePost(databaseMigrationCreatePostRequest) + +Create a new database migration + +### Example + +```typescript +import { + DatabaseManagementApi, + Configuration, + DatabaseMigrationCreatePostRequest +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new DatabaseManagementApi(configuration); + +let databaseMigrationCreatePostRequest: DatabaseMigrationCreatePostRequest; // + +const { status, data } = await apiInstance.databaseMigrationCreatePost( + databaseMigrationCreatePostRequest +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **databaseMigrationCreatePostRequest** | **DatabaseMigrationCreatePostRequest**| | | + + +### Return type + +**Migration** + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Migration created successfully | - | +|**401** | Unauthorized | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **databaseMigrationDownDatabaseIdGet** +> databaseMigrationDownDatabaseIdGet() + +Rollback database migrations + +### Example + +```typescript +import { + DatabaseManagementApi, + Configuration +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new DatabaseManagementApi(configuration); + +let databaseId: string; //Database ID (default to undefined) + +const { status, data } = await apiInstance.databaseMigrationDownDatabaseIdGet( + databaseId +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **databaseId** | [**string**] | Database ID | defaults to undefined| + + +### Return type + +void (empty response body) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Migrations rolled back successfully | - | +|**401** | Unauthorized | - | +|**404** | Database not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **databaseMigrationUpDatabaseIdGet** +> databaseMigrationUpDatabaseIdGet() + +Execute pending database migrations + +### Example + +```typescript +import { + DatabaseManagementApi, + Configuration +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new DatabaseManagementApi(configuration); + +let databaseId: string; //Database ID (default to undefined) + +const { status, data } = await apiInstance.databaseMigrationUpDatabaseIdGet( + databaseId +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **databaseId** | [**string**] | Database ID | defaults to undefined| + + +### Return type + +void (empty response body) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Migrations executed successfully | - | +|**401** | Unauthorized | - | +|**404** | Database not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **databaseNodeCreatePost** +> DatabaseNode databaseNodeCreatePost(databaseNodeCreatePostRequest) + +Add a new database node to the system + +### Example + +```typescript +import { + DatabaseManagementApi, + Configuration, + DatabaseNodeCreatePostRequest +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new DatabaseManagementApi(configuration); + +let databaseNodeCreatePostRequest: DatabaseNodeCreatePostRequest; // + +const { status, data } = await apiInstance.databaseNodeCreatePost( + databaseNodeCreatePostRequest +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **databaseNodeCreatePostRequest** | **DatabaseNodeCreatePostRequest**| | | + + +### Return type + +**DatabaseNode** + +### Authorization + +[AdminAuth](../README.md#AdminAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Database node created successfully | - | +|**401** | Unauthorized | - | +|**403** | Admin access required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **databaseQueryDatabaseIdPost** +> object databaseQueryDatabaseIdPost(databaseQueryDatabaseIdPostRequest) + +Execute a SQL query on the database + +### Example + +```typescript +import { + DatabaseManagementApi, + Configuration, + DatabaseQueryDatabaseIdPostRequest +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new DatabaseManagementApi(configuration); + +let databaseId: string; //Database ID (default to undefined) +let databaseQueryDatabaseIdPostRequest: DatabaseQueryDatabaseIdPostRequest; // + +const { status, data } = await apiInstance.databaseQueryDatabaseIdPost( + databaseId, + databaseQueryDatabaseIdPostRequest +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **databaseQueryDatabaseIdPostRequest** | **DatabaseQueryDatabaseIdPostRequest**| | | +| **databaseId** | [**string**] | Database ID | defaults to undefined| + + +### Return type + +**object** + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Query executed successfully | - | +|**401** | Unauthorized | - | +|**404** | Database not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **databaseTablesDatabaseIdGet** +> Array databaseTablesDatabaseIdGet() + +Retrieve list of tables in a database + +### Example + +```typescript +import { + DatabaseManagementApi, + Configuration +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new DatabaseManagementApi(configuration); + +let databaseId: string; //Database ID (default to undefined) + +const { status, data } = await apiInstance.databaseTablesDatabaseIdGet( + databaseId +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **databaseId** | [**string**] | Database ID | defaults to undefined| + + +### Return type + +**Array** + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Tables retrieved successfully | - | +|**401** | Unauthorized | - | +|**404** | Database not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/out/ts/docs/DatabaseMigrationCreatePostRequest.md b/out/ts/docs/DatabaseMigrationCreatePostRequest.md new file mode 100644 index 0000000..6d07845 --- /dev/null +++ b/out/ts/docs/DatabaseMigrationCreatePostRequest.md @@ -0,0 +1,24 @@ +# DatabaseMigrationCreatePostRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**up** | **string** | Migration up SQL | [default to undefined] +**down** | **string** | Migration down SQL | [default to undefined] +**databaseId** | **string** | Database ID | [default to undefined] + +## Example + +```typescript +import { DatabaseMigrationCreatePostRequest } from './api'; + +const instance: DatabaseMigrationCreatePostRequest = { + up, + down, + databaseId, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/out/ts/docs/DatabaseNode.md b/out/ts/docs/DatabaseNode.md new file mode 100644 index 0000000..5604c71 --- /dev/null +++ b/out/ts/docs/DatabaseNode.md @@ -0,0 +1,30 @@ +# DatabaseNode + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique database node identifier | [optional] [default to undefined] +**host** | **string** | Database host | [optional] [default to undefined] +**port** | **number** | Database port | [optional] [default to undefined] +**username** | **string** | Database username | [optional] [default to undefined] +**password** | **string** | Database password | [optional] [default to undefined] +**databases** | [**Array<Database>**](Database.md) | | [optional] [default to undefined] + +## Example + +```typescript +import { DatabaseNode } from './api'; + +const instance: DatabaseNode = { + id, + host, + port, + username, + password, + databases, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/out/ts/docs/DatabaseNodeCreatePostRequest.md b/out/ts/docs/DatabaseNodeCreatePostRequest.md new file mode 100644 index 0000000..b64a825 --- /dev/null +++ b/out/ts/docs/DatabaseNodeCreatePostRequest.md @@ -0,0 +1,26 @@ +# DatabaseNodeCreatePostRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**host** | **string** | Database host | [default to undefined] +**port** | **number** | Database port | [default to undefined] +**username** | **string** | Database username | [default to undefined] +**password** | **string** | Database password | [default to undefined] + +## Example + +```typescript +import { DatabaseNodeCreatePostRequest } from './api'; + +const instance: DatabaseNodeCreatePostRequest = { + host, + port, + username, + password, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/out/ts/docs/DatabaseQueryDatabaseIdPostRequest.md b/out/ts/docs/DatabaseQueryDatabaseIdPostRequest.md new file mode 100644 index 0000000..ce9d135 --- /dev/null +++ b/out/ts/docs/DatabaseQueryDatabaseIdPostRequest.md @@ -0,0 +1,20 @@ +# DatabaseQueryDatabaseIdPostRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**query** | **string** | SQL query to execute | [default to undefined] + +## Example + +```typescript +import { DatabaseQueryDatabaseIdPostRequest } from './api'; + +const instance: DatabaseQueryDatabaseIdPostRequest = { + query, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/out/ts/docs/Error.md b/out/ts/docs/Error.md new file mode 100644 index 0000000..bc06791 --- /dev/null +++ b/out/ts/docs/Error.md @@ -0,0 +1,22 @@ +# ModelError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **string** | Error message | [optional] [default to undefined] +**details** | **string** | Error details | [optional] [default to undefined] + +## Example + +```typescript +import { ModelError } from './api'; + +const instance: ModelError = { + error, + details, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/out/ts/docs/Function.md b/out/ts/docs/Function.md new file mode 100644 index 0000000..1ea6195 --- /dev/null +++ b/out/ts/docs/Function.md @@ -0,0 +1,26 @@ +# Function + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique function identifier | [optional] [default to undefined] +**name** | **string** | Function name | [optional] [default to undefined] +**source** | **string** | Function source code | [optional] [default to undefined] +**project** | [**Project**](Project.md) | | [optional] [default to undefined] + +## Example + +```typescript +import { Function } from './api'; + +const instance: Function = { + id, + name, + source, + project, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/out/ts/docs/FunctionsApi.md b/out/ts/docs/FunctionsApi.md new file mode 100644 index 0000000..3f72c72 --- /dev/null +++ b/out/ts/docs/FunctionsApi.md @@ -0,0 +1,116 @@ +# FunctionsApi + +All URIs are relative to *http://localhost:3000* + +|Method | HTTP request | Description| +|------------- | ------------- | -------------| +|[**functionsCreatePost**](#functionscreatepost) | **POST** /functions/create | Create function| +|[**functionsDeletePost**](#functionsdeletepost) | **POST** /functions/delete | Delete function| + +# **functionsCreatePost** +> Function functionsCreatePost(functionsCreatePostRequest) + +Create a new function in the project + +### Example + +```typescript +import { + FunctionsApi, + Configuration, + FunctionsCreatePostRequest +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new FunctionsApi(configuration); + +let functionsCreatePostRequest: FunctionsCreatePostRequest; // + +const { status, data } = await apiInstance.functionsCreatePost( + functionsCreatePostRequest +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **functionsCreatePostRequest** | **FunctionsCreatePostRequest**| | | + + +### Return type + +**Function** + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Function created successfully | - | +|**401** | Unauthorized | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **functionsDeletePost** +> functionsDeletePost(functionsDeletePostRequest) + +Delete a function from the project + +### Example + +```typescript +import { + FunctionsApi, + Configuration, + FunctionsDeletePostRequest +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new FunctionsApi(configuration); + +let functionsDeletePostRequest: FunctionsDeletePostRequest; // + +const { status, data } = await apiInstance.functionsDeletePost( + functionsDeletePostRequest +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **functionsDeletePostRequest** | **FunctionsDeletePostRequest**| | | + + +### Return type + +void (empty response body) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Function deleted successfully | - | +|**401** | Unauthorized | - | +|**404** | Function not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/out/ts/docs/FunctionsCreatePostRequest.md b/out/ts/docs/FunctionsCreatePostRequest.md new file mode 100644 index 0000000..3ba932c --- /dev/null +++ b/out/ts/docs/FunctionsCreatePostRequest.md @@ -0,0 +1,22 @@ +# FunctionsCreatePostRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Function name | [default to undefined] +**source** | **string** | Function source code | [default to undefined] + +## Example + +```typescript +import { FunctionsCreatePostRequest } from './api'; + +const instance: FunctionsCreatePostRequest = { + name, + source, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/out/ts/docs/FunctionsDeletePostRequest.md b/out/ts/docs/FunctionsDeletePostRequest.md new file mode 100644 index 0000000..4cdc3d0 --- /dev/null +++ b/out/ts/docs/FunctionsDeletePostRequest.md @@ -0,0 +1,20 @@ +# FunctionsDeletePostRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Function name to delete | [default to undefined] + +## Example + +```typescript +import { FunctionsDeletePostRequest } from './api'; + +const instance: FunctionsDeletePostRequest = { + name, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/out/ts/docs/Log.md b/out/ts/docs/Log.md new file mode 100644 index 0000000..ac364cc --- /dev/null +++ b/out/ts/docs/Log.md @@ -0,0 +1,42 @@ +# Log + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique log identifier | [optional] [default to undefined] +**traceId** | **string** | Trace ID for tracking requests | [optional] [default to undefined] +**startTime** | **number** | Request start timestamp | [optional] [default to undefined] +**endTime** | **number** | Request end timestamp | [optional] [default to undefined] +**payload** | **object** | Request payload | [optional] [default to undefined] +**headers** | **object** | Request headers | [optional] [default to undefined] +**cookies** | **string** | Request cookies | [optional] [default to undefined] +**url** | **string** | Request URL | [optional] [default to undefined] +**response** | **object** | Response data | [optional] [default to undefined] +**content** | [**Array<LogContentInner>**](LogContentInner.md) | | [optional] [default to undefined] +**project** | [**Project**](Project.md) | | [optional] [default to undefined] +**query** | [**Query**](Query.md) | | [optional] [default to undefined] + +## Example + +```typescript +import { Log } from './api'; + +const instance: Log = { + id, + traceId, + startTime, + endTime, + payload, + headers, + cookies, + url, + response, + content, + project, + query, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/out/ts/docs/LogContentInner.md b/out/ts/docs/LogContentInner.md new file mode 100644 index 0000000..7c8d170 --- /dev/null +++ b/out/ts/docs/LogContentInner.md @@ -0,0 +1,24 @@ +# LogContentInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | **string** | Log content | [optional] [default to undefined] +**type** | **string** | Log type (info, error, warning) | [optional] [default to undefined] +**timeStamp** | **number** | Log entry timestamp | [optional] [default to undefined] + +## Example + +```typescript +import { LogContentInner } from './api'; + +const instance: LogContentInner = { + content, + type, + timeStamp, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/out/ts/docs/LoggerIdFindAllPostRequest.md b/out/ts/docs/LoggerIdFindAllPostRequest.md new file mode 100644 index 0000000..8300cfa --- /dev/null +++ b/out/ts/docs/LoggerIdFindAllPostRequest.md @@ -0,0 +1,30 @@ +# LoggerIdFindAllPostRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**traceId** | **string** | Filter by trace ID | [optional] [default to undefined] +**fromDate** | **string** | Filter from date | [optional] [default to undefined] +**toDate** | **string** | Filter to date | [optional] [default to undefined] +**url** | **string** | Filter by URL | [optional] [default to undefined] +**limit** | **number** | Number of results to return | [default to undefined] +**offset** | **number** | Number of results to skip | [default to undefined] + +## Example + +```typescript +import { LoggerIdFindAllPostRequest } from './api'; + +const instance: LoggerIdFindAllPostRequest = { + traceId, + fromDate, + toDate, + url, + limit, + offset, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/out/ts/docs/LoggingApi.md b/out/ts/docs/LoggingApi.md new file mode 100644 index 0000000..a5906ac --- /dev/null +++ b/out/ts/docs/LoggingApi.md @@ -0,0 +1,179 @@ +# LoggingApi + +All URIs are relative to *http://localhost:3000* + +|Method | HTTP request | Description| +|------------- | ------------- | -------------| +|[**loggerIdFindAllPost**](#loggeridfindallpost) | **POST** /logger/{id}/findAll | Find all logs| +|[**loggerIdFindPost**](#loggeridfindpost) | **POST** /logger/{id}/find | Find logs for query| +|[**loggerIdTraceIdGet**](#loggeridtraceidget) | **GET** /logger/{id}/{traceId} | Get log by trace ID| + +# **loggerIdFindAllPost** +> Array loggerIdFindAllPost(loggerIdFindAllPostRequest) + +Find all logs for a project with filtering + +### Example + +```typescript +import { + LoggingApi, + Configuration, + LoggerIdFindAllPostRequest +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new LoggingApi(configuration); + +let id: string; //Project ID (default to undefined) +let loggerIdFindAllPostRequest: LoggerIdFindAllPostRequest; // + +const { status, data } = await apiInstance.loggerIdFindAllPost( + id, + loggerIdFindAllPostRequest +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **loggerIdFindAllPostRequest** | **LoggerIdFindAllPostRequest**| | | +| **id** | [**string**] | Project ID | defaults to undefined| + + +### Return type + +**Array** + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Logs retrieved successfully | - | +|**401** | Unauthorized | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **loggerIdFindPost** +> Array loggerIdFindPost(loggerIdFindAllPostRequest) + +Find logs for a specific query with filtering + +### Example + +```typescript +import { + LoggingApi, + Configuration, + LoggerIdFindAllPostRequest +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new LoggingApi(configuration); + +let id: string; //Query ID (default to undefined) +let loggerIdFindAllPostRequest: LoggerIdFindAllPostRequest; // + +const { status, data } = await apiInstance.loggerIdFindPost( + id, + loggerIdFindAllPostRequest +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **loggerIdFindAllPostRequest** | **LoggerIdFindAllPostRequest**| | | +| **id** | [**string**] | Query ID | defaults to undefined| + + +### Return type + +**Array** + +### Authorization + +[QueryGuard](../README.md#QueryGuard), [ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Logs retrieved successfully | - | +|**401** | Unauthorized | - | +|**403** | Query access required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **loggerIdTraceIdGet** +> Log loggerIdTraceIdGet() + +Retrieve log entries by trace ID + +### Example + +```typescript +import { + LoggingApi, + Configuration +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new LoggingApi(configuration); + +let id: string; //Log ID (default to undefined) +let traceId: string; //Trace ID (default to undefined) + +const { status, data } = await apiInstance.loggerIdTraceIdGet( + id, + traceId +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **id** | [**string**] | Log ID | defaults to undefined| +| **traceId** | [**string**] | Trace ID | defaults to undefined| + + +### Return type + +**Log** + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Log retrieved successfully | - | +|**401** | Unauthorized | - | +|**404** | Log not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/out/ts/docs/Migration.md b/out/ts/docs/Migration.md new file mode 100644 index 0000000..e1e9b73 --- /dev/null +++ b/out/ts/docs/Migration.md @@ -0,0 +1,26 @@ +# Migration + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique migration identifier | [optional] [default to undefined] +**up** | **string** | Migration up SQL | [optional] [default to undefined] +**down** | **string** | Migration down SQL | [optional] [default to undefined] +**database** | [**Database**](Database.md) | | [optional] [default to undefined] + +## Example + +```typescript +import { Migration } from './api'; + +const instance: Migration = { + id, + up, + down, + database, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/out/ts/docs/Project.md b/out/ts/docs/Project.md new file mode 100644 index 0000000..0a376e6 --- /dev/null +++ b/out/ts/docs/Project.md @@ -0,0 +1,32 @@ +# Project + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique project identifier | [optional] [default to undefined] +**name** | **string** | Project name | [optional] [default to undefined] +**apiTokens** | [**Array<Token>**](Token.md) | | [optional] [default to undefined] +**database** | [**Database**](Database.md) | | [optional] [default to undefined] +**queries** | [**Array<Query>**](Query.md) | | [optional] [default to undefined] +**functions** | [**Array<Function>**](Function.md) | | [optional] [default to undefined] +**settings** | [**Array<ProjectSetting>**](ProjectSetting.md) | | [optional] [default to undefined] + +## Example + +```typescript +import { Project } from './api'; + +const instance: Project = { + id, + name, + apiTokens, + database, + queries, + functions, + settings, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/out/ts/docs/ProjectCreatePutRequest.md b/out/ts/docs/ProjectCreatePutRequest.md new file mode 100644 index 0000000..7bf679c --- /dev/null +++ b/out/ts/docs/ProjectCreatePutRequest.md @@ -0,0 +1,20 @@ +# ProjectCreatePutRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Project name | [default to undefined] + +## Example + +```typescript +import { ProjectCreatePutRequest } from './api'; + +const instance: ProjectCreatePutRequest = { + name, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/out/ts/docs/ProjectManagementApi.md b/out/ts/docs/ProjectManagementApi.md new file mode 100644 index 0000000..43d9500 --- /dev/null +++ b/out/ts/docs/ProjectManagementApi.md @@ -0,0 +1,317 @@ +# ProjectManagementApi + +All URIs are relative to *http://localhost:3000* + +|Method | HTTP request | Description| +|------------- | ------------- | -------------| +|[**projectApiTokensGet**](#projectapitokensget) | **GET** /project/api-tokens | Get all API tokens| +|[**projectCreatePut**](#projectcreateput) | **PUT** /project/create | Create project| +|[**projectCreateWithoutDbPut**](#projectcreatewithoutdbput) | **PUT** /project/create-without-db | Create project without database| +|[**projectSettingsCreatePut**](#projectsettingscreateput) | **PUT** /project/settings/create | Create project setting| +|[**projectSettingsDeleteKeyDelete**](#projectsettingsdeletekeydelete) | **DELETE** /project/settings/delete/{key} | Delete project setting| +|[**projectSettingsGet**](#projectsettingsget) | **GET** /project/settings | Get all project settings| + +# **projectApiTokensGet** +> Array projectApiTokensGet() + +Retrieve all API tokens for the current project + +### Example + +```typescript +import { + ProjectManagementApi, + Configuration +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new ProjectManagementApi(configuration); + +const { status, data } = await apiInstance.projectApiTokensGet(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**Array** + +### Authorization + +[AdminAuth](../README.md#AdminAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | API tokens retrieved successfully | - | +|**401** | Unauthorized | - | +|**403** | Admin access required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **projectCreatePut** +> Project projectCreatePut(projectCreatePutRequest) + +Create a new project with database + +### Example + +```typescript +import { + ProjectManagementApi, + Configuration, + ProjectCreatePutRequest +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new ProjectManagementApi(configuration); + +let projectCreatePutRequest: ProjectCreatePutRequest; // + +const { status, data } = await apiInstance.projectCreatePut( + projectCreatePutRequest +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **projectCreatePutRequest** | **ProjectCreatePutRequest**| | | + + +### Return type + +**Project** + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Project created successfully | - | +|**401** | Unauthorized | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **projectCreateWithoutDbPut** +> Project projectCreateWithoutDbPut(projectCreatePutRequest) + +Create a new project without creating a database + +### Example + +```typescript +import { + ProjectManagementApi, + Configuration, + ProjectCreatePutRequest +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new ProjectManagementApi(configuration); + +let projectCreatePutRequest: ProjectCreatePutRequest; // + +const { status, data } = await apiInstance.projectCreateWithoutDbPut( + projectCreatePutRequest +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **projectCreatePutRequest** | **ProjectCreatePutRequest**| | | + + +### Return type + +**Project** + +### Authorization + +[AdminAuth](../README.md#AdminAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Project created successfully | - | +|**401** | Unauthorized | - | +|**403** | Admin access required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **projectSettingsCreatePut** +> ProjectSetting projectSettingsCreatePut(projectSettingsCreatePutRequest) + +Create a new project setting + +### Example + +```typescript +import { + ProjectManagementApi, + Configuration, + ProjectSettingsCreatePutRequest +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new ProjectManagementApi(configuration); + +let projectSettingsCreatePutRequest: ProjectSettingsCreatePutRequest; // + +const { status, data } = await apiInstance.projectSettingsCreatePut( + projectSettingsCreatePutRequest +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **projectSettingsCreatePutRequest** | **ProjectSettingsCreatePutRequest**| | | + + +### Return type + +**ProjectSetting** + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Setting created successfully | - | +|**401** | Unauthorized | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **projectSettingsDeleteKeyDelete** +> projectSettingsDeleteKeyDelete() + +Delete a project setting by key + +### Example + +```typescript +import { + ProjectManagementApi, + Configuration +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new ProjectManagementApi(configuration); + +let key: string; //Setting key to delete (default to undefined) + +const { status, data } = await apiInstance.projectSettingsDeleteKeyDelete( + key +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **key** | [**string**] | Setting key to delete | defaults to undefined| + + +### Return type + +void (empty response body) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Setting deleted successfully | - | +|**401** | Unauthorized | - | +|**404** | Setting not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **projectSettingsGet** +> Array projectSettingsGet() + +Retrieve all settings for the current project + +### Example + +```typescript +import { + ProjectManagementApi, + Configuration +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new ProjectManagementApi(configuration); + +const { status, data } = await apiInstance.projectSettingsGet(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**Array** + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Settings retrieved successfully | - | +|**401** | Unauthorized | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/out/ts/docs/ProjectSetting.md b/out/ts/docs/ProjectSetting.md new file mode 100644 index 0000000..7910c16 --- /dev/null +++ b/out/ts/docs/ProjectSetting.md @@ -0,0 +1,26 @@ +# ProjectSetting + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique setting identifier | [optional] [default to undefined] +**key** | **string** | Setting key | [optional] [default to undefined] +**value** | **string** | Setting value | [optional] [default to undefined] +**project** | [**Project**](Project.md) | | [optional] [default to undefined] + +## Example + +```typescript +import { ProjectSetting } from './api'; + +const instance: ProjectSetting = { + id, + key, + value, + project, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/out/ts/docs/ProjectSettingsCreatePutRequest.md b/out/ts/docs/ProjectSettingsCreatePutRequest.md new file mode 100644 index 0000000..ca1b897 --- /dev/null +++ b/out/ts/docs/ProjectSettingsCreatePutRequest.md @@ -0,0 +1,22 @@ +# ProjectSettingsCreatePutRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**key** | **string** | Setting key | [default to undefined] +**value** | **string** | Setting value | [default to undefined] + +## Example + +```typescript +import { ProjectSettingsCreatePutRequest } from './api'; + +const instance: ProjectSettingsCreatePutRequest = { + key, + value, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/out/ts/docs/QueriesApi.md b/out/ts/docs/QueriesApi.md new file mode 100644 index 0000000..04de72d --- /dev/null +++ b/out/ts/docs/QueriesApi.md @@ -0,0 +1,238 @@ +# QueriesApi + +All URIs are relative to *http://localhost:3000* + +|Method | HTTP request | Description| +|------------- | ------------- | -------------| +|[**queryCreatePost**](#querycreatepost) | **POST** /query/create | Create query| +|[**queryDeleteIdDelete**](#querydeleteiddelete) | **DELETE** /query/delete/{id} | Delete query| +|[**queryRunIdPost**](#queryrunidpost) | **POST** /query/run/{id} | Run query| +|[**queryUpdateIdPost**](#queryupdateidpost) | **POST** /query/update/{id} | Update query| + +# **queryCreatePost** +> Query queryCreatePost(queryCreatePostRequest) + +Create a new query in the project + +### Example + +```typescript +import { + QueriesApi, + Configuration, + QueryCreatePostRequest +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new QueriesApi(configuration); + +let queryCreatePostRequest: QueryCreatePostRequest; // + +const { status, data } = await apiInstance.queryCreatePost( + queryCreatePostRequest +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **queryCreatePostRequest** | **QueryCreatePostRequest**| | | + + +### Return type + +**Query** + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Query created successfully | - | +|**401** | Unauthorized | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **queryDeleteIdDelete** +> queryDeleteIdDelete() + +Delete an existing query + +### Example + +```typescript +import { + QueriesApi, + Configuration +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new QueriesApi(configuration); + +let id: string; //Query ID (default to undefined) + +const { status, data } = await apiInstance.queryDeleteIdDelete( + id +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **id** | [**string**] | Query ID | defaults to undefined| + + +### Return type + +void (empty response body) + +### Authorization + +[QueryGuard](../README.md#QueryGuard), [ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Query deleted successfully | - | +|**401** | Unauthorized | - | +|**403** | Query access required | - | +|**404** | Query not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **queryRunIdPost** +> object queryRunIdPost(body) + +Execute a query with provided data + +### Example + +```typescript +import { + QueriesApi, + Configuration +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new QueriesApi(configuration); + +let id: string; //Query ID (default to undefined) +let body: object; // +let xTraceId: string; //Trace ID for logging (optional) (default to undefined) + +const { status, data } = await apiInstance.queryRunIdPost( + id, + body, + xTraceId +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **body** | **object**| | | +| **id** | [**string**] | Query ID | defaults to undefined| +| **xTraceId** | [**string**] | Trace ID for logging | (optional) defaults to undefined| + + +### Return type + +**object** + +### Authorization + +[QueryGuard](../README.md#QueryGuard), [ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Query executed successfully | - | +|**302** | Redirect response | - | +|**401** | Unauthorized | - | +|**403** | Query access required | - | +|**404** | Query not found | - | +|**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **queryUpdateIdPost** +> Query queryUpdateIdPost(queryUpdateIdPostRequest) + +Update an existing query + +### Example + +```typescript +import { + QueriesApi, + Configuration, + QueryUpdateIdPostRequest +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new QueriesApi(configuration); + +let id: string; //Query ID (default to undefined) +let queryUpdateIdPostRequest: QueryUpdateIdPostRequest; // + +const { status, data } = await apiInstance.queryUpdateIdPost( + id, + queryUpdateIdPostRequest +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **queryUpdateIdPostRequest** | **QueryUpdateIdPostRequest**| | | +| **id** | [**string**] | Query ID | defaults to undefined| + + +### Return type + +**Query** + +### Authorization + +[QueryGuard](../README.md#QueryGuard), [ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Query updated successfully | - | +|**401** | Unauthorized | - | +|**403** | Query access required | - | +|**404** | Query not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/out/ts/docs/Query.md b/out/ts/docs/Query.md new file mode 100644 index 0000000..4acfe01 --- /dev/null +++ b/out/ts/docs/Query.md @@ -0,0 +1,30 @@ +# Query + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique query identifier | [optional] [default to undefined] +**source** | **string** | Query source code | [optional] [default to undefined] +**isActive** | **number** | Whether the query is active (1 = active, 0 = inactive) | [optional] [default to undefined] +**isCommand** | **number** | Whether this is a command (1 = command, 0 = query) | [optional] [default to undefined] +**project** | [**Project**](Project.md) | | [optional] [default to undefined] +**logs** | [**Array<Log>**](Log.md) | | [optional] [default to undefined] + +## Example + +```typescript +import { Query } from './api'; + +const instance: Query = { + id, + source, + isActive, + isCommand, + project, + logs, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/out/ts/docs/QueryCreatePostRequest.md b/out/ts/docs/QueryCreatePostRequest.md new file mode 100644 index 0000000..e050938 --- /dev/null +++ b/out/ts/docs/QueryCreatePostRequest.md @@ -0,0 +1,20 @@ +# QueryCreatePostRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**source** | **string** | Query source code | [default to undefined] + +## Example + +```typescript +import { QueryCreatePostRequest } from './api'; + +const instance: QueryCreatePostRequest = { + source, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/out/ts/docs/QueryUpdateIdPostRequest.md b/out/ts/docs/QueryUpdateIdPostRequest.md new file mode 100644 index 0000000..2c519be --- /dev/null +++ b/out/ts/docs/QueryUpdateIdPostRequest.md @@ -0,0 +1,20 @@ +# QueryUpdateIdPostRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**source** | **string** | Updated query source code | [optional] [default to undefined] + +## Example + +```typescript +import { QueryUpdateIdPostRequest } from './api'; + +const instance: QueryUpdateIdPostRequest = { + source, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/out/ts/docs/RedisManagementApi.md b/out/ts/docs/RedisManagementApi.md new file mode 100644 index 0000000..aea03bd --- /dev/null +++ b/out/ts/docs/RedisManagementApi.md @@ -0,0 +1,62 @@ +# RedisManagementApi + +All URIs are relative to *http://localhost:3000* + +|Method | HTTP request | Description| +|------------- | ------------- | -------------| +|[**redisNodeCreatePost**](#redisnodecreatepost) | **POST** /redis/node/create | Add Redis node| + +# **redisNodeCreatePost** +> RedisNode redisNodeCreatePost(redisNodeCreatePostRequest) + +Add a new Redis node to the system + +### Example + +```typescript +import { + RedisManagementApi, + Configuration, + RedisNodeCreatePostRequest +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new RedisManagementApi(configuration); + +let redisNodeCreatePostRequest: RedisNodeCreatePostRequest; // + +const { status, data } = await apiInstance.redisNodeCreatePost( + redisNodeCreatePostRequest +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **redisNodeCreatePostRequest** | **RedisNodeCreatePostRequest**| | | + + +### Return type + +**RedisNode** + +### Authorization + +[AdminAuth](../README.md#AdminAuth), [ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Redis node created successfully | - | +|**401** | Unauthorized | - | +|**403** | Admin access required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/out/ts/docs/RedisNode.md b/out/ts/docs/RedisNode.md new file mode 100644 index 0000000..db73bc5 --- /dev/null +++ b/out/ts/docs/RedisNode.md @@ -0,0 +1,30 @@ +# RedisNode + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique Redis node identifier | [optional] [default to undefined] +**host** | **string** | Redis host | [optional] [default to undefined] +**port** | **number** | Redis port | [optional] [default to undefined] +**user** | **string** | Redis username | [optional] [default to undefined] +**password** | **string** | Redis password | [optional] [default to undefined] +**projects** | [**Array<Project>**](Project.md) | | [optional] [default to undefined] + +## Example + +```typescript +import { RedisNode } from './api'; + +const instance: RedisNode = { + id, + host, + port, + user, + password, + projects, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/out/ts/docs/RedisNodeCreatePostRequest.md b/out/ts/docs/RedisNodeCreatePostRequest.md new file mode 100644 index 0000000..679f4dc --- /dev/null +++ b/out/ts/docs/RedisNodeCreatePostRequest.md @@ -0,0 +1,26 @@ +# RedisNodeCreatePostRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**host** | **string** | Redis host | [default to undefined] +**port** | **number** | Redis port | [default to undefined] +**user** | **string** | Redis username | [default to undefined] +**password** | **string** | Redis password | [default to undefined] + +## Example + +```typescript +import { RedisNodeCreatePostRequest } from './api'; + +const instance: RedisNodeCreatePostRequest = { + host, + port, + user, + password, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/out/ts/docs/Token.md b/out/ts/docs/Token.md new file mode 100644 index 0000000..cd5f2a0 --- /dev/null +++ b/out/ts/docs/Token.md @@ -0,0 +1,26 @@ +# Token + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token** | **string** | Unique token identifier | [optional] [default to undefined] +**isActive** | **boolean** | Whether the token is active | [optional] [default to undefined] +**isAdmin** | **boolean** | Whether the token has admin privileges | [optional] [default to undefined] +**project** | [**Project**](Project.md) | | [optional] [default to undefined] + +## Example + +```typescript +import { Token } from './api'; + +const instance: Token = { + token, + isActive, + isAdmin, + project, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/out/ts/git_push.sh b/out/ts/git_push.sh new file mode 100644 index 0000000..f53a75d --- /dev/null +++ b/out/ts/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/out/ts/index.ts b/out/ts/index.ts new file mode 100644 index 0000000..39a040d --- /dev/null +++ b/out/ts/index.ts @@ -0,0 +1,18 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Low-Code Engine API + * API documentation for the Low-Code Engine platform that provides query execution, database management, and project administration capabilities. + * + * The version of the OpenAPI document: 1.0.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 * from "./api"; +export * from "./configuration"; +