mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-20 00:11:34 +00:00
The WriteBlobResponse field rename (id -> hash) is a breaking change to the wire contract with no compatibility shim, so signal it in the spec version. There is no runtime version handshake; clients generated from the older spec fail on the missing field until rebuilt. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
280 lines
14 KiB
TypeScript
Generated
280 lines
14 KiB
TypeScript
Generated
/* tslint:disable */
|
|
/* eslint-disable */
|
|
/**
|
|
* Fabro Run API
|
|
* HTTP API for managing Fabro workflow run executions.
|
|
*
|
|
* The version of the OpenAPI document: 0.2.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, replaceWithSerializableTypeIfNeeded } from '../common';
|
|
// @ts-ignore
|
|
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
|
|
// @ts-ignore
|
|
import type { CreateSecretRequest } from '../models';
|
|
// @ts-ignore
|
|
import type { DeleteSecretRequest } from '../models';
|
|
// @ts-ignore
|
|
import type { ErrorResponse } from '../models';
|
|
// @ts-ignore
|
|
import type { SecretListResponse } from '../models';
|
|
// @ts-ignore
|
|
import type { SecretMetadata } from '../models';
|
|
/**
|
|
* SecretsApi - axios parameter creator
|
|
*/
|
|
export const SecretsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
return {
|
|
/**
|
|
* Stores a secret in the workflow-visible vault. Anything stored here may be used by workflows.
|
|
* @summary Store or update a vault secret
|
|
* @param {CreateSecretRequest} createSecretRequest
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
createSecret: async (createSecretRequest: CreateSecretRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'createSecretRequest' is not null or undefined
|
|
assertParamExists('createSecret', 'createSecretRequest', createSecretRequest)
|
|
const localVarPath = `/api/v1/secrets`;
|
|
// 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 SessionCookie required
|
|
|
|
// authentication BearerAuth required
|
|
// http bearer authentication required
|
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
|
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
localVarHeaderParameter['Accept'] = 'application/json';
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
localVarRequestOptions.data = serializeDataIfNeeded(createSecretRequest, localVarRequestOptions, configuration)
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
options: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
*
|
|
* @summary Delete a vault secret
|
|
* @param {DeleteSecretRequest} deleteSecretRequest
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
deleteSecretByName: async (deleteSecretRequest: DeleteSecretRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
// verify required parameter 'deleteSecretRequest' is not null or undefined
|
|
assertParamExists('deleteSecretByName', 'deleteSecretRequest', deleteSecretRequest)
|
|
const localVarPath = `/api/v1/secrets`;
|
|
// 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 SessionCookie required
|
|
|
|
// authentication BearerAuth required
|
|
// http bearer authentication required
|
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
|
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
localVarHeaderParameter['Accept'] = 'application/json';
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
localVarRequestOptions.data = serializeDataIfNeeded(deleteSecretRequest, localVarRequestOptions, configuration)
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
options: localVarRequestOptions,
|
|
};
|
|
},
|
|
/**
|
|
* Returns workflow-visible vault secret names and timestamps. Secret values are never exposed.
|
|
* @summary List vault secrets
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
listSecrets: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
const localVarPath = `/api/v1/secrets`;
|
|
// 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 SessionCookie required
|
|
|
|
// authentication BearerAuth required
|
|
// http bearer authentication required
|
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
|
|
localVarHeaderParameter['Accept'] = 'application/json';
|
|
|
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
|
|
return {
|
|
url: toPathString(localVarUrlObj),
|
|
options: localVarRequestOptions,
|
|
};
|
|
},
|
|
}
|
|
};
|
|
|
|
/**
|
|
* SecretsApi - functional programming interface
|
|
*/
|
|
export const SecretsApiFp = function(configuration?: Configuration) {
|
|
const localVarAxiosParamCreator = SecretsApiAxiosParamCreator(configuration)
|
|
return {
|
|
/**
|
|
* Stores a secret in the workflow-visible vault. Anything stored here may be used by workflows.
|
|
* @summary Store or update a vault secret
|
|
* @param {CreateSecretRequest} createSecretRequest
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async createSecret(createSecretRequest: CreateSecretRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SecretMetadata>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.createSecret(createSecretRequest, options);
|
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
const localVarOperationServerBasePath = operationServerMap['SecretsApi.createSecret']?.[localVarOperationServerIndex]?.url;
|
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
},
|
|
/**
|
|
*
|
|
* @summary Delete a vault secret
|
|
* @param {DeleteSecretRequest} deleteSecretRequest
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async deleteSecretByName(deleteSecretRequest: DeleteSecretRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteSecretByName(deleteSecretRequest, options);
|
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
const localVarOperationServerBasePath = operationServerMap['SecretsApi.deleteSecretByName']?.[localVarOperationServerIndex]?.url;
|
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
},
|
|
/**
|
|
* Returns workflow-visible vault secret names and timestamps. Secret values are never exposed.
|
|
* @summary List vault secrets
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async listSecrets(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SecretListResponse>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.listSecrets(options);
|
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
const localVarOperationServerBasePath = operationServerMap['SecretsApi.listSecrets']?.[localVarOperationServerIndex]?.url;
|
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
},
|
|
}
|
|
};
|
|
|
|
/**
|
|
* SecretsApi - factory interface
|
|
*/
|
|
export const SecretsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
const localVarFp = SecretsApiFp(configuration)
|
|
return {
|
|
/**
|
|
* Stores a secret in the workflow-visible vault. Anything stored here may be used by workflows.
|
|
* @summary Store or update a vault secret
|
|
* @param {CreateSecretRequest} createSecretRequest
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
createSecret(createSecretRequest: CreateSecretRequest, options?: RawAxiosRequestConfig): AxiosPromise<SecretMetadata> {
|
|
return localVarFp.createSecret(createSecretRequest, options).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
*
|
|
* @summary Delete a vault secret
|
|
* @param {DeleteSecretRequest} deleteSecretRequest
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
deleteSecretByName(deleteSecretRequest: DeleteSecretRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
|
return localVarFp.deleteSecretByName(deleteSecretRequest, options).then((request) => request(axios, basePath));
|
|
},
|
|
/**
|
|
* Returns workflow-visible vault secret names and timestamps. Secret values are never exposed.
|
|
* @summary List vault secrets
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
listSecrets(options?: RawAxiosRequestConfig): AxiosPromise<SecretListResponse> {
|
|
return localVarFp.listSecrets(options).then((request) => request(axios, basePath));
|
|
},
|
|
};
|
|
};
|
|
|
|
/**
|
|
* SecretsApi - object-oriented interface
|
|
*/
|
|
export class SecretsApi extends BaseAPI {
|
|
/**
|
|
* Stores a secret in the workflow-visible vault. Anything stored here may be used by workflows.
|
|
* @summary Store or update a vault secret
|
|
* @param {CreateSecretRequest} createSecretRequest
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
public createSecret(createSecretRequest: CreateSecretRequest, options?: RawAxiosRequestConfig) {
|
|
return SecretsApiFp(this.configuration).createSecret(createSecretRequest, options).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
*
|
|
* @summary Delete a vault secret
|
|
* @param {DeleteSecretRequest} deleteSecretRequest
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
public deleteSecretByName(deleteSecretRequest: DeleteSecretRequest, options?: RawAxiosRequestConfig) {
|
|
return SecretsApiFp(this.configuration).deleteSecretByName(deleteSecretRequest, options).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
|
|
/**
|
|
* Returns workflow-visible vault secret names and timestamps. Secret values are never exposed.
|
|
* @summary List vault secrets
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
public listSecrets(options?: RawAxiosRequestConfig) {
|
|
return SecretsApiFp(this.configuration).listSecrets(options).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
}
|