mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-21 00:21:27 +00:00
`bun run generate` (openapi-generator typescript-axios) emits trailing spaces and extra blank lines, so every regeneration produced a noisy whitespace diff that masked real spec/client drift. Add a normalize-generated.ts post-generation pass that strips trailing whitespace and ends each file with exactly one newline, and chain it into the `generate` script. Establishes the normalized baseline across the generated client; running `generate` twice now yields no diff. No content changes — the entire diff is whitespace. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
122 lines
5.2 KiB
TypeScript
Generated
122 lines
5.2 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.1.0
|
|
*
|
|
*
|
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
* https://openapi-generator.tech
|
|
* Do not edit the class manually.
|
|
*/
|
|
|
|
|
|
import 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 { AggregateBilling } from '../models';
|
|
/**
|
|
* BillingApi - axios parameter creator
|
|
*/
|
|
export const BillingApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
return {
|
|
/**
|
|
* Returns aggregate token counts and billed totals across all completed runs since server start.
|
|
* @summary Aggregate Billing
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getAggregateBilling: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
const localVarPath = `/api/v1/billing`;
|
|
// 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,
|
|
};
|
|
},
|
|
}
|
|
};
|
|
|
|
/**
|
|
* BillingApi - functional programming interface
|
|
*/
|
|
export const BillingApiFp = function(configuration?: Configuration) {
|
|
const localVarAxiosParamCreator = BillingApiAxiosParamCreator(configuration)
|
|
return {
|
|
/**
|
|
* Returns aggregate token counts and billed totals across all completed runs since server start.
|
|
* @summary Aggregate Billing
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
async getAggregateBilling(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AggregateBilling>> {
|
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getAggregateBilling(options);
|
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
const localVarOperationServerBasePath = operationServerMap['BillingApi.getAggregateBilling']?.[localVarOperationServerIndex]?.url;
|
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
},
|
|
}
|
|
};
|
|
|
|
/**
|
|
* BillingApi - factory interface
|
|
*/
|
|
export const BillingApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
const localVarFp = BillingApiFp(configuration)
|
|
return {
|
|
/**
|
|
* Returns aggregate token counts and billed totals across all completed runs since server start.
|
|
* @summary Aggregate Billing
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
getAggregateBilling(options?: RawAxiosRequestConfig): AxiosPromise<AggregateBilling> {
|
|
return localVarFp.getAggregateBilling(options).then((request) => request(axios, basePath));
|
|
},
|
|
};
|
|
};
|
|
|
|
/**
|
|
* BillingApi - object-oriented interface
|
|
*/
|
|
export class BillingApi extends BaseAPI {
|
|
/**
|
|
* Returns aggregate token counts and billed totals across all completed runs since server start.
|
|
* @summary Aggregate Billing
|
|
* @param {*} [options] Override http request option.
|
|
* @throws {RequiredError}
|
|
*/
|
|
public getAggregateBilling(options?: RawAxiosRequestConfig) {
|
|
return BillingApiFp(this.configuration).getAggregateBilling(options).then((request) => request(this.axios, this.basePath));
|
|
}
|
|
}
|