mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-10-10 03:30:59 +00:00
Move preview URL endpoint to new Sandbox tag and shorten summary
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
4fdcd77dde
commit
3d27d1fb72
6 changed files with 140 additions and 84 deletions
|
|
@ -407,8 +407,8 @@ paths:
|
|||
/runs/{id}/preview:
|
||||
post:
|
||||
operationId: generatePreviewUrl
|
||||
tags: [Runs]
|
||||
summary: Generate a sandbox preview URL
|
||||
tags: [Sandbox]
|
||||
summary: Preview URL
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/RunId"
|
||||
requestBody:
|
||||
|
|
|
|||
|
|
@ -407,8 +407,8 @@ paths:
|
|||
/runs/{id}/preview:
|
||||
post:
|
||||
operationId: generatePreviewUrl
|
||||
tags: [Runs]
|
||||
summary: Generate a sandbox preview URL
|
||||
tags: [Sandbox]
|
||||
summary: Preview URL
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/RunId"
|
||||
requestBody:
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ api/projects-api.ts
|
|||
api/retros-api.ts
|
||||
api/run-internals-api.ts
|
||||
api/runs-api.ts
|
||||
api/sandbox-api.ts
|
||||
api/sessions-api.ts
|
||||
api/settings-api.ts
|
||||
api/usage-api.ts
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ export * from './api/projects-api';
|
|||
export * from './api/retros-api';
|
||||
export * from './api/run-internals-api';
|
||||
export * from './api/runs-api';
|
||||
export * from './api/sandbox-api';
|
||||
export * from './api/sessions-api';
|
||||
export * from './api/settings-api';
|
||||
export * from './api/usage-api';
|
||||
|
|
|
|||
|
|
@ -26,10 +26,6 @@ import type { CancelRun200Response } from '../models';
|
|||
// @ts-ignore
|
||||
import type { ErrorResponse } from '../models';
|
||||
// @ts-ignore
|
||||
import type { PreviewUrlRequest } from '../models';
|
||||
// @ts-ignore
|
||||
import type { PreviewUrlResponse } from '../models';
|
||||
// @ts-ignore
|
||||
import type { RunFiles } from '../models';
|
||||
// @ts-ignore
|
||||
import type { RunListItem } from '../models';
|
||||
|
|
@ -80,45 +76,6 @@ export const RunsApiAxiosParamCreator = function (configuration?: Configuration)
|
|||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Generate a sandbox preview URL
|
||||
* @param {string} id
|
||||
* @param {PreviewUrlRequest} previewUrlRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
generatePreviewUrl: async (id: string, previewUrlRequest: PreviewUrlRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
assertParamExists('generatePreviewUrl', 'id', id)
|
||||
// verify required parameter 'previewUrlRequest' is not null or undefined
|
||||
assertParamExists('generatePreviewUrl', 'previewUrlRequest', previewUrlRequest)
|
||||
const localVarPath = `/runs/{id}/preview`
|
||||
.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;
|
||||
|
||||
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(previewUrlRequest, localVarRequestOptions, configuration)
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary List Run Files
|
||||
|
|
@ -381,20 +338,6 @@ export const RunsApiFp = function(configuration?: Configuration) {
|
|||
const localVarOperationServerBasePath = operationServerMap['RunsApi.cancelRun']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Generate a sandbox preview URL
|
||||
* @param {string} id
|
||||
* @param {PreviewUrlRequest} previewUrlRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async generatePreviewUrl(id: string, previewUrlRequest: PreviewUrlRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PreviewUrlResponse>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.generatePreviewUrl(id, previewUrlRequest, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['RunsApi.generatePreviewUrl']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary List Run Files
|
||||
|
|
@ -505,17 +448,6 @@ export const RunsApiFactory = function (configuration?: Configuration, basePath?
|
|||
cancelRun(id: string, options?: RawAxiosRequestConfig): AxiosPromise<CancelRun200Response> {
|
||||
return localVarFp.cancelRun(id, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Generate a sandbox preview URL
|
||||
* @param {string} id
|
||||
* @param {PreviewUrlRequest} previewUrlRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
generatePreviewUrl(id: string, previewUrlRequest: PreviewUrlRequest, options?: RawAxiosRequestConfig): AxiosPromise<PreviewUrlResponse> {
|
||||
return localVarFp.generatePreviewUrl(id, previewUrlRequest, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary List Run Files
|
||||
|
|
@ -604,18 +536,6 @@ export class RunsApi extends BaseAPI {
|
|||
return RunsApiFp(this.configuration).cancelRun(id, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Generate a sandbox preview URL
|
||||
* @param {string} id
|
||||
* @param {PreviewUrlRequest} previewUrlRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public generatePreviewUrl(id: string, previewUrlRequest: PreviewUrlRequest, options?: RawAxiosRequestConfig) {
|
||||
return RunsApiFp(this.configuration).generatePreviewUrl(id, previewUrlRequest, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary List Run Files
|
||||
|
|
|
|||
134
packages/arc-api-client/src/api/sandbox-api.ts
Normal file
134
packages/arc-api-client/src/api/sandbox-api.ts
Normal file
|
|
@ -0,0 +1,134 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc 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 { PreviewUrlRequest } from '../models';
|
||||
// @ts-ignore
|
||||
import type { PreviewUrlResponse } from '../models';
|
||||
/**
|
||||
* SandboxApi - axios parameter creator
|
||||
*/
|
||||
export const SandboxApiAxiosParamCreator = function (configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary Preview URL
|
||||
* @param {string} id
|
||||
* @param {PreviewUrlRequest} previewUrlRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
generatePreviewUrl: async (id: string, previewUrlRequest: PreviewUrlRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
assertParamExists('generatePreviewUrl', 'id', id)
|
||||
// verify required parameter 'previewUrlRequest' is not null or undefined
|
||||
assertParamExists('generatePreviewUrl', 'previewUrlRequest', previewUrlRequest)
|
||||
const localVarPath = `/runs/{id}/preview`
|
||||
.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;
|
||||
|
||||
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(previewUrlRequest, localVarRequestOptions, configuration)
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* SandboxApi - functional programming interface
|
||||
*/
|
||||
export const SandboxApiFp = function(configuration?: Configuration) {
|
||||
const localVarAxiosParamCreator = SandboxApiAxiosParamCreator(configuration)
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary Preview URL
|
||||
* @param {string} id
|
||||
* @param {PreviewUrlRequest} previewUrlRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async generatePreviewUrl(id: string, previewUrlRequest: PreviewUrlRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PreviewUrlResponse>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.generatePreviewUrl(id, previewUrlRequest, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['SandboxApi.generatePreviewUrl']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* SandboxApi - factory interface
|
||||
*/
|
||||
export const SandboxApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||
const localVarFp = SandboxApiFp(configuration)
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary Preview URL
|
||||
* @param {string} id
|
||||
* @param {PreviewUrlRequest} previewUrlRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
generatePreviewUrl(id: string, previewUrlRequest: PreviewUrlRequest, options?: RawAxiosRequestConfig): AxiosPromise<PreviewUrlResponse> {
|
||||
return localVarFp.generatePreviewUrl(id, previewUrlRequest, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* SandboxApi - object-oriented interface
|
||||
*/
|
||||
export class SandboxApi extends BaseAPI {
|
||||
/**
|
||||
*
|
||||
* @summary Preview URL
|
||||
* @param {string} id
|
||||
* @param {PreviewUrlRequest} previewUrlRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public generatePreviewUrl(id: string, previewUrlRequest: PreviewUrlRequest, options?: RawAxiosRequestConfig) {
|
||||
return SandboxApiFp(this.configuration).generatePreviewUrl(id, previewUrlRequest, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Add table
Reference in a new issue