From cb8731e7e37fb6cd052f5dae6fdce46e6ca2409c Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Wed, 16 Apr 2025 08:54:20 +0000 Subject: [PATCH] fix(openapi): fix openapi def of batch re-run jobs --- backend/windmill-api/openapi.yaml | 6 +- cli/.gitignore | 1 + cli/gen/core/ApiError.ts | 21 - cli/gen/core/ApiRequestOptions.ts | 21 - cli/gen/core/ApiResult.ts | 7 - cli/gen/core/CancelablePromise.ts | 126 - cli/gen/core/OpenAPI.ts | 63 - cli/gen/core/request.ts | 350 -- cli/gen/index.ts | 6 - cli/gen/services.gen.ts | 8995 ----------------------------- cli/gen/types.gen.ts | 7828 ------------------------- 11 files changed, 5 insertions(+), 17419 deletions(-) delete mode 100644 cli/gen/core/ApiError.ts delete mode 100644 cli/gen/core/ApiRequestOptions.ts delete mode 100644 cli/gen/core/ApiResult.ts delete mode 100644 cli/gen/core/CancelablePromise.ts delete mode 100644 cli/gen/core/OpenAPI.ts delete mode 100644 cli/gen/core/request.ts delete mode 100644 cli/gen/index.ts delete mode 100644 cli/gen/services.gen.ts delete mode 100644 cli/gen/types.gen.ts diff --git a/backend/windmill-api/openapi.yaml b/backend/windmill-api/openapi.yaml index 2fd46fea08..5f677f5f58 100644 --- a/backend/windmill-api/openapi.yaml +++ b/backend/windmill-api/openapi.yaml @@ -6623,7 +6623,8 @@ paths: type: object additionalProperties: $ref: "#/components/schemas/InputTransform" - use_latest_version: 1.482.0 + use_latest_version: + type: boolean flow_options_by_path: type: object additionalProperties: @@ -6633,7 +6634,8 @@ paths: type: object additionalProperties: $ref: "#/components/schemas/InputTransform" - use_latest_version: 1.482.0 + use_latest_version: + type: boolean responses: "201": description: stream of created job uuids separated by \n. Lines may start with 'Error:' diff --git a/cli/.gitignore b/cli/.gitignore index 409ee189ef..d0b1f2c514 100644 --- a/cli/.gitignore +++ b/cli/.gitignore @@ -1 +1,2 @@ npm/ +gen/ \ No newline at end of file diff --git a/cli/gen/core/ApiError.ts b/cli/gen/core/ApiError.ts deleted file mode 100644 index 81aa78a668..0000000000 --- a/cli/gen/core/ApiError.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { ApiRequestOptions } from './ApiRequestOptions.ts'; -import type { ApiResult } from './ApiResult.ts'; - -export class ApiError extends Error { - public readonly url: string; - public readonly status: number; - public readonly statusText: string; - public readonly body: unknown; - public readonly request: ApiRequestOptions; - - constructor(request: ApiRequestOptions, response: ApiResult, message: string) { - super(message); - - this.name = 'ApiError'; - this.url = response.url; - this.status = response.status; - this.statusText = response.statusText; - this.body = response.body; - this.request = request; - } -} \ No newline at end of file diff --git a/cli/gen/core/ApiRequestOptions.ts b/cli/gen/core/ApiRequestOptions.ts deleted file mode 100644 index 939a0aa4c8..0000000000 --- a/cli/gen/core/ApiRequestOptions.ts +++ /dev/null @@ -1,21 +0,0 @@ -export type ApiRequestOptions = { - readonly body?: any; - readonly cookies?: Record; - readonly errors?: Record; - readonly formData?: Record | any[] | Blob | File; - readonly headers?: Record; - readonly mediaType?: string; - readonly method: - | 'DELETE' - | 'GET' - | 'HEAD' - | 'OPTIONS' - | 'PATCH' - | 'POST' - | 'PUT'; - readonly path?: Record; - readonly query?: Record; - readonly responseHeader?: string; - readonly responseTransformer?: (data: unknown) => Promise; - readonly url: string; -}; \ No newline at end of file diff --git a/cli/gen/core/ApiResult.ts b/cli/gen/core/ApiResult.ts deleted file mode 100644 index 4c58e39138..0000000000 --- a/cli/gen/core/ApiResult.ts +++ /dev/null @@ -1,7 +0,0 @@ -export type ApiResult = { - readonly body: TData; - readonly ok: boolean; - readonly status: number; - readonly statusText: string; - readonly url: string; -}; \ No newline at end of file diff --git a/cli/gen/core/CancelablePromise.ts b/cli/gen/core/CancelablePromise.ts deleted file mode 100644 index ccc082e8f2..0000000000 --- a/cli/gen/core/CancelablePromise.ts +++ /dev/null @@ -1,126 +0,0 @@ -export class CancelError extends Error { - constructor(message: string) { - super(message); - this.name = 'CancelError'; - } - - public get isCancelled(): boolean { - return true; - } -} - -export interface OnCancel { - readonly isResolved: boolean; - readonly isRejected: boolean; - readonly isCancelled: boolean; - - (cancelHandler: () => void): void; -} - -export class CancelablePromise implements Promise { - private _isResolved: boolean; - private _isRejected: boolean; - private _isCancelled: boolean; - readonly cancelHandlers: (() => void)[]; - readonly promise: Promise; - private _resolve?: (value: T | PromiseLike) => void; - private _reject?: (reason?: unknown) => void; - - constructor( - executor: ( - resolve: (value: T | PromiseLike) => void, - reject: (reason?: unknown) => void, - onCancel: OnCancel - ) => void - ) { - this._isResolved = false; - this._isRejected = false; - this._isCancelled = false; - this.cancelHandlers = []; - this.promise = new Promise((resolve, reject) => { - this._resolve = resolve; - this._reject = reject; - - const onResolve = (value: T | PromiseLike): void => { - if (this._isResolved || this._isRejected || this._isCancelled) { - return; - } - this._isResolved = true; - if (this._resolve) this._resolve(value); - }; - - const onReject = (reason?: unknown): void => { - if (this._isResolved || this._isRejected || this._isCancelled) { - return; - } - this._isRejected = true; - if (this._reject) this._reject(reason); - }; - - const onCancel = (cancelHandler: () => void): void => { - if (this._isResolved || this._isRejected || this._isCancelled) { - return; - } - this.cancelHandlers.push(cancelHandler); - }; - - Object.defineProperty(onCancel, 'isResolved', { - get: (): boolean => this._isResolved, - }); - - Object.defineProperty(onCancel, 'isRejected', { - get: (): boolean => this._isRejected, - }); - - Object.defineProperty(onCancel, 'isCancelled', { - get: (): boolean => this._isCancelled, - }); - - return executor(onResolve, onReject, onCancel as OnCancel); - }); - } - - get [Symbol.toStringTag]() { - return "Cancellable Promise"; - } - - public then( - onFulfilled?: ((value: T) => TResult1 | PromiseLike) | null, - onRejected?: ((reason: unknown) => TResult2 | PromiseLike) | null - ): Promise { - return this.promise.then(onFulfilled, onRejected); - } - - public catch( - onRejected?: ((reason: unknown) => TResult | PromiseLike) | null - ): Promise { - return this.promise.catch(onRejected); - } - - public finally(onFinally?: (() => void) | null): Promise { - return this.promise.finally(onFinally); - } - - public cancel(): void { - if (this._isResolved || this._isRejected || this._isCancelled) { - return; - } - this._isCancelled = true; - if (this.cancelHandlers.length) { - try { - for (const cancelHandler of this.cancelHandlers) { - cancelHandler(); - } - } catch (error) { - console.warn('Cancellation threw an error', error); - return; - } - } - this.cancelHandlers.length = 0; - if (this._reject) this._reject(new CancelError('Request aborted')); - } - - public get isCancelled(): boolean { - return this._isCancelled; - } -} \ No newline at end of file diff --git a/cli/gen/core/OpenAPI.ts b/cli/gen/core/OpenAPI.ts deleted file mode 100644 index 2938820ca7..0000000000 --- a/cli/gen/core/OpenAPI.ts +++ /dev/null @@ -1,63 +0,0 @@ -const getEnv = (key: string) => { - return Deno.env.get(key) -}; - -const baseUrl = getEnv("BASE_INTERNAL_URL") ?? getEnv("BASE_URL") ?? "http://localhost:8000"; -const baseUrlApi = (baseUrl ?? '') + "/api"; - -import type { ApiRequestOptions } from './ApiRequestOptions.ts'; - -type Headers = Record; -type Middleware = (value: T) => T | Promise; -type Resolver = (options: ApiRequestOptions) => Promise; - -export class Interceptors { - _fns: Middleware[]; - - constructor() { - this._fns = []; - } - - eject(fn: Middleware): void { - const index = this._fns.indexOf(fn); - if (index !== -1) { - this._fns = [...this._fns.slice(0, index), ...this._fns.slice(index + 1)]; - } - } - - use(fn: Middleware): void { - this._fns = [...this._fns, fn]; - } -} - -export type OpenAPIConfig = { - BASE: string; - CREDENTIALS: 'include' | 'omit' | 'same-origin'; - ENCODE_PATH?: ((path: string) => string) | undefined; - HEADERS?: Headers | Resolver | undefined; - PASSWORD?: string | Resolver | undefined; - TOKEN?: string | Resolver | undefined; - USERNAME?: string | Resolver | undefined; - VERSION: string; - WITH_CREDENTIALS: boolean; - interceptors: { - request: Interceptors; - response: Interceptors; - }; -}; - -export const OpenAPI: OpenAPIConfig = { - BASE: baseUrlApi, - CREDENTIALS: 'include', - ENCODE_PATH: undefined, - HEADERS: undefined, - PASSWORD: undefined, - TOKEN: getEnv("WM_TOKEN"), - USERNAME: undefined, - VERSION: '1.481.0', - WITH_CREDENTIALS: true, - interceptors: { - request: new Interceptors(), - response: new Interceptors(), - }, -}; \ No newline at end of file diff --git a/cli/gen/core/request.ts b/cli/gen/core/request.ts deleted file mode 100644 index ed11eb4482..0000000000 --- a/cli/gen/core/request.ts +++ /dev/null @@ -1,350 +0,0 @@ -import { ApiError } from './ApiError.ts'; -import type { ApiRequestOptions } from './ApiRequestOptions.ts'; -import type { ApiResult } from './ApiResult.ts'; -import { CancelablePromise } from './CancelablePromise.ts'; -import type { OnCancel } from './CancelablePromise.ts'; -import type { OpenAPIConfig } from './OpenAPI.ts'; - -export const isString = (value: unknown): value is string => { - return typeof value === 'string'; -}; - -export const isStringWithValue = (value: unknown): value is string => { - return isString(value) && value !== ''; -}; - -export const isBlob = (value: any): value is Blob => { - return value instanceof Blob; -}; - -export const isFormData = (value: unknown): value is FormData => { - return value instanceof FormData; -}; - -export const base64 = (str: string): string => { - try { - return btoa(str); - } catch (err) { - // @ts-ignore - return Buffer.from(str).toString('base64'); - } -}; - -export const getQueryString = (params: Record): string => { - const qs: string[] = []; - - const append = (key: string, value: unknown) => { - qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`); - }; - - const encodePair = (key: string, value: unknown) => { - if (value === undefined || value === null) { - return; - } - - if (value instanceof Date) { - append(key, value.toISOString()); - } else if (Array.isArray(value)) { - value.forEach(v => encodePair(key, v)); - } else if (typeof value === 'object') { - Object.entries(value).forEach(([k, v]) => encodePair(`${key}[${k}]`, v)); - } else { - append(key, value); - } - }; - - Object.entries(params).forEach(([key, value]) => encodePair(key, value)); - - return qs.length ? `?${qs.join('&')}` : ''; -}; - -const getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => { - const encoder = config.ENCODE_PATH || encodeURI; - - const path = options.url - .replace('{api-version}', config.VERSION) - .replace(/{(.*?)}/g, (substring: string, group: string) => { - if (options.path?.hasOwnProperty(group)) { - return encoder(String(options.path[group])); - } - return substring; - }); - - const url = config.BASE + path; - return options.query ? url + getQueryString(options.query) : url; -}; - -export const getFormData = (options: ApiRequestOptions): FormData | undefined => { - if (options.formData) { - const formData = new FormData(); - - const process = (key: string, value: unknown) => { - if (isString(value) || isBlob(value)) { - formData.append(key, value); - } else { - formData.append(key, JSON.stringify(value)); - } - }; - - Object.entries(options.formData) - .filter(([, value]) => value !== undefined && value !== null) - .forEach(([key, value]) => { - if (Array.isArray(value)) { - value.forEach(v => process(key, v)); - } else { - process(key, value); - } - }); - - return formData; - } - return undefined; -}; - -type Resolver = (options: ApiRequestOptions) => Promise; - -export const resolve = async (options: ApiRequestOptions, resolver?: T | Resolver): Promise => { - if (typeof resolver === 'function') { - return (resolver as Resolver)(options); - } - return resolver; -}; - -export const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptions): Promise => { - const [token, username, password, additionalHeaders] = await Promise.all([ - // @ts-ignore - resolve(options, config.TOKEN), - // @ts-ignore - resolve(options, config.USERNAME), - // @ts-ignore - resolve(options, config.PASSWORD), - // @ts-ignore - resolve(options, config.HEADERS), - ]); - - const headers = Object.entries({ - Accept: 'application/json', - ...additionalHeaders, - ...options.headers, - }) - .filter(([, value]) => value !== undefined && value !== null) - .reduce((headers, [key, value]) => ({ - ...headers, - [key]: String(value), - }), {} as Record); - - if (isStringWithValue(token)) { - headers['Authorization'] = `Bearer ${token}`; - } - - if (isStringWithValue(username) && isStringWithValue(password)) { - const credentials = base64(`${username}:${password}`); - headers['Authorization'] = `Basic ${credentials}`; - } - - if (options.body !== undefined) { - if (options.mediaType) { - headers['Content-Type'] = options.mediaType; - } else if (isBlob(options.body)) { - headers['Content-Type'] = options.body.type || 'application/octet-stream'; - } else if (isString(options.body)) { - headers['Content-Type'] = 'text/plain'; - } else if (!isFormData(options.body)) { - headers['Content-Type'] = 'application/json'; - } - } - - return new Headers(headers); -}; - -export const getRequestBody = (options: ApiRequestOptions): unknown => { - if (options.body !== undefined) { - if (options.mediaType?.includes('application/json') || options.mediaType?.includes('+json')) { - return JSON.stringify(options.body); - } else if (isString(options.body) || isBlob(options.body) || isFormData(options.body)) { - return options.body; - } else { - return JSON.stringify(options.body); - } - } - return undefined; -}; - -export const sendRequest = async ( - config: OpenAPIConfig, - options: ApiRequestOptions, - url: string, - body: any, - formData: FormData | undefined, - headers: Headers, - onCancel: OnCancel -): Promise => { - const controller = new AbortController(); - - let request: RequestInit = { - headers, - body: body ?? formData, - method: options.method, - signal: controller.signal, - }; - - if (config.WITH_CREDENTIALS) { - request.credentials = config.CREDENTIALS; - } - - for (const fn of config.interceptors.request._fns) { - request = await fn(request); - } - - onCancel(() => controller.abort()); - - return await fetch(url, request); -}; - -export const getResponseHeader = (response: Response, responseHeader?: string): string | undefined => { - if (responseHeader) { - const content = response.headers.get(responseHeader); - if (isString(content)) { - return content; - } - } - return undefined; -}; - -export const getResponseBody = async (response: Response): Promise => { - if (response.status !== 204) { - try { - const contentType = response.headers.get('Content-Type'); - if (contentType) { - const binaryTypes = ['application/octet-stream', 'application/pdf', 'application/zip', 'audio/', 'image/', 'video/']; - if (contentType.includes('application/json') || contentType.includes('+json')) { - return await response.json(); - } else if (binaryTypes.some(type => contentType.includes(type))) { - return await response.blob(); - } else if (contentType.includes('multipart/form-data')) { - return await response.formData(); - } else if (contentType.includes('text/')) { - return await response.text(); - } - } - } catch (error) { - console.error(error); - } - } - return undefined; -}; - -export const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult): void => { - const errors: Record = { - 400: 'Bad Request', - 401: 'Unauthorized', - 402: 'Payment Required', - 403: 'Forbidden', - 404: 'Not Found', - 405: 'Method Not Allowed', - 406: 'Not Acceptable', - 407: 'Proxy Authentication Required', - 408: 'Request Timeout', - 409: 'Conflict', - 410: 'Gone', - 411: 'Length Required', - 412: 'Precondition Failed', - 413: 'Payload Too Large', - 414: 'URI Too Long', - 415: 'Unsupported Media Type', - 416: 'Range Not Satisfiable', - 417: 'Expectation Failed', - 418: 'Im a teapot', - 421: 'Misdirected Request', - 422: 'Unprocessable Content', - 423: 'Locked', - 424: 'Failed Dependency', - 425: 'Too Early', - 426: 'Upgrade Required', - 428: 'Precondition Required', - 429: 'Too Many Requests', - 431: 'Request Header Fields Too Large', - 451: 'Unavailable For Legal Reasons', - 500: 'Internal Server Error', - 501: 'Not Implemented', - 502: 'Bad Gateway', - 503: 'Service Unavailable', - 504: 'Gateway Timeout', - 505: 'HTTP Version Not Supported', - 506: 'Variant Also Negotiates', - 507: 'Insufficient Storage', - 508: 'Loop Detected', - 510: 'Not Extended', - 511: 'Network Authentication Required', - ...options.errors, - } - - const error = errors[result.status]; - if (error) { - throw new ApiError(options, result, error); - } - - if (!result.ok) { - const errorStatus = result.status ?? 'unknown'; - const errorStatusText = result.statusText ?? 'unknown'; - const errorBody = (() => { - try { - return JSON.stringify(result.body, null, 2); - } catch (e) { - return undefined; - } - })(); - - throw new ApiError(options, result, - `Generic Error: status: ${errorStatus}; status text: ${errorStatusText}; body: ${errorBody}` - ); - } -}; - -/** - * Request method - * @param config The OpenAPI configuration object - * @param options The request options from the service - * @returns CancelablePromise - * @throws ApiError - */ -export const request = (config: OpenAPIConfig, options: ApiRequestOptions): CancelablePromise => { - return new CancelablePromise(async (resolve, reject, onCancel) => { - try { - const url = getUrl(config, options); - const formData = getFormData(options); - const body = getRequestBody(options); - const headers = await getHeaders(config, options); - - if (!onCancel.isCancelled) { - let response = await sendRequest(config, options, url, body, formData, headers, onCancel); - - for (const fn of config.interceptors.response._fns) { - response = await fn(response); - } - - const responseBody = await getResponseBody(response); - const responseHeader = getResponseHeader(response, options.responseHeader); - - let transformedBody = responseBody; - if (options.responseTransformer && response.ok) { - transformedBody = await options.responseTransformer(responseBody) - } - - const result: ApiResult = { - url, - ok: response.ok, - status: response.status, - statusText: response.statusText, - body: responseHeader ?? transformedBody, - }; - - catchErrorCodes(options, result); - - resolve(result.body); - } - } catch (error) { - reject(error); - } - }); -}; \ No newline at end of file diff --git a/cli/gen/index.ts b/cli/gen/index.ts deleted file mode 100644 index 77b08aeebb..0000000000 --- a/cli/gen/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts -export { ApiError } from './core/ApiError.ts'; -export { CancelablePromise, CancelError } from './core/CancelablePromise.ts'; -export { OpenAPI, type OpenAPIConfig } from './core/OpenAPI.ts'; -export * from './services.gen.ts'; -export * from './types.gen.ts'; \ No newline at end of file diff --git a/cli/gen/services.gen.ts b/cli/gen/services.gen.ts deleted file mode 100644 index a94a3a544d..0000000000 --- a/cli/gen/services.gen.ts +++ /dev/null @@ -1,8995 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -import type { CancelablePromise } from './core/CancelablePromise.ts'; -import { OpenAPI } from './core/OpenAPI.ts'; -import { request as __request } from './core/request.ts'; -import type { BackendVersionResponse, BackendUptodateResponse, GetLicenseIdResponse, GetOpenApiYamlResponse, GetAuditLogData, GetAuditLogResponse, ListAuditLogsData, ListAuditLogsResponse, LoginData, LoginResponse, LogoutResponse, GetUserData, GetUserResponse, UpdateUserData, UpdateUserResponse, IsOwnerOfPathData, IsOwnerOfPathResponse, SetPasswordData, SetPasswordResponse, SetPasswordForUserData, SetPasswordForUserResponse, SetLoginTypeForUserData, SetLoginTypeForUserResponse, CreateUserGloballyData, CreateUserGloballyResponse, GlobalUserUpdateData, GlobalUserUpdateResponse, GlobalUsernameInfoData, GlobalUsernameInfoResponse, GlobalUserRenameData, GlobalUserRenameResponse, GlobalUserDeleteData, GlobalUserDeleteResponse, GlobalUsersOverwriteData, GlobalUsersOverwriteResponse, GlobalUsersExportResponse, DeleteUserData, DeleteUserResponse, GetGlobalConnectedRepositoriesResponse, ListWorkspacesResponse, IsDomainAllowedResponse, ListUserWorkspacesResponse, ListWorkspacesAsSuperAdminData, ListWorkspacesAsSuperAdminResponse, CreateWorkspaceData, CreateWorkspaceResponse, ExistsWorkspaceData, ExistsWorkspaceResponse, ExistsUsernameData, ExistsUsernameResponse, GetGlobalData, GetGlobalResponse, SetGlobalData, SetGlobalResponse, GetLocalResponse, TestSmtpData, TestSmtpResponse, TestCriticalChannelsData, TestCriticalChannelsResponse, GetCriticalAlertsData, GetCriticalAlertsResponse, AcknowledgeCriticalAlertData, AcknowledgeCriticalAlertResponse, AcknowledgeAllCriticalAlertsResponse, TestLicenseKeyData, TestLicenseKeyResponse, TestObjectStorageConfigData, TestObjectStorageConfigResponse, SendStatsResponse, GetLatestKeyRenewalAttemptResponse, RenewLicenseKeyData, RenewLicenseKeyResponse, CreateCustomerPortalSessionData, CreateCustomerPortalSessionResponse, TestMetadataData, TestMetadataResponse, ListGlobalSettingsResponse, GetCurrentEmailResponse, RefreshUserTokenData, RefreshUserTokenResponse, GetTutorialProgressResponse, UpdateTutorialProgressData, UpdateTutorialProgressResponse, LeaveInstanceResponse, GetUsageResponse, GetRunnableResponse, GlobalWhoamiResponse, ListWorkspaceInvitesResponse, WhoamiData, WhoamiResponse, GetGithubAppTokenData, GetGithubAppTokenResponse, InstallFromWorkspaceData, InstallFromWorkspaceResponse, DeleteFromWorkspaceData, DeleteFromWorkspaceResponse, ExportInstallationData, ExportInstallationResponse, ImportInstallationData, ImportInstallationResponse, AcceptInviteData, AcceptInviteResponse, DeclineInviteData, DeclineInviteResponse, InviteUserData, InviteUserResponse, AddUserData, AddUserResponse, DeleteInviteData, DeleteInviteResponse, ArchiveWorkspaceData, ArchiveWorkspaceResponse, UnarchiveWorkspaceData, UnarchiveWorkspaceResponse, DeleteWorkspaceData, DeleteWorkspaceResponse, LeaveWorkspaceData, LeaveWorkspaceResponse, GetWorkspaceNameData, GetWorkspaceNameResponse, ChangeWorkspaceNameData, ChangeWorkspaceNameResponse, ChangeWorkspaceIdData, ChangeWorkspaceIdResponse, ChangeWorkspaceColorData, ChangeWorkspaceColorResponse, WhoisData, WhoisResponse, UpdateOperatorSettingsData, UpdateOperatorSettingsResponse, ExistsEmailData, ExistsEmailResponse, ListUsersAsSuperAdminData, ListUsersAsSuperAdminResponse, ListPendingInvitesData, ListPendingInvitesResponse, GetSettingsData, GetSettingsResponse, GetDeployToData, GetDeployToResponse, GetIsPremiumData, GetIsPremiumResponse, GetPremiumInfoData, GetPremiumInfoResponse, GetThresholdAlertData, GetThresholdAlertResponse, SetThresholdAlertData, SetThresholdAlertResponse, EditSlackCommandData, EditSlackCommandResponse, EditTeamsCommandData, EditTeamsCommandResponse, ListAvailableTeamsIdsData, ListAvailableTeamsIdsResponse, ListAvailableTeamsChannelsData, ListAvailableTeamsChannelsResponse, ConnectTeamsData, ConnectTeamsResponse, RunSlackMessageTestJobData, RunSlackMessageTestJobResponse, RunTeamsMessageTestJobData, RunTeamsMessageTestJobResponse, EditDeployToData, EditDeployToResponse, EditAutoInviteData, EditAutoInviteResponse, EditWebhookData, EditWebhookResponse, EditCopilotConfigData, EditCopilotConfigResponse, GetCopilotInfoData, GetCopilotInfoResponse, EditErrorHandlerData, EditErrorHandlerResponse, EditLargeFileStorageConfigData, EditLargeFileStorageConfigResponse, EditWorkspaceGitSyncConfigData, EditWorkspaceGitSyncConfigResponse, EditWorkspaceDeployUiSettingsData, EditWorkspaceDeployUiSettingsResponse, EditWorkspaceDefaultAppData, EditWorkspaceDefaultAppResponse, EditDefaultScriptsData, EditDefaultScriptsResponse, GetDefaultScriptsData, GetDefaultScriptsResponse, SetEnvironmentVariableData, SetEnvironmentVariableResponse, GetWorkspaceEncryptionKeyData, GetWorkspaceEncryptionKeyResponse, SetWorkspaceEncryptionKeyData, SetWorkspaceEncryptionKeyResponse, GetWorkspaceDefaultAppData, GetWorkspaceDefaultAppResponse, GetLargeFileStorageConfigData, GetLargeFileStorageConfigResponse, GetWorkspaceUsageData, GetWorkspaceUsageResponse, GetUsedTriggersData, GetUsedTriggersResponse, ListUsersData, ListUsersResponse, ListUsersUsageData, ListUsersUsageResponse, ListUsernamesData, ListUsernamesResponse, UsernameToEmailData, UsernameToEmailResponse, CreateTokenData, CreateTokenResponse, CreateTokenImpersonateData, CreateTokenImpersonateResponse, DeleteTokenData, DeleteTokenResponse, ListTokensData, ListTokensResponse, GetOidcTokenData, GetOidcTokenResponse, CreateVariableData, CreateVariableResponse, EncryptValueData, EncryptValueResponse, DeleteVariableData, DeleteVariableResponse, UpdateVariableData, UpdateVariableResponse, GetVariableData, GetVariableResponse, GetVariableValueData, GetVariableValueResponse, ExistsVariableData, ExistsVariableResponse, ListVariableData, ListVariableResponse, ListContextualVariablesData, ListContextualVariablesResponse, WorkspaceGetCriticalAlertsData, WorkspaceGetCriticalAlertsResponse, WorkspaceAcknowledgeCriticalAlertData, WorkspaceAcknowledgeCriticalAlertResponse, WorkspaceAcknowledgeAllCriticalAlertsData, WorkspaceAcknowledgeAllCriticalAlertsResponse, WorkspaceMuteCriticalAlertsUiData, WorkspaceMuteCriticalAlertsUiResponse, LoginWithOauthData, LoginWithOauthResponse, ConnectSlackCallbackData, ConnectSlackCallbackResponse, ConnectSlackCallbackInstanceData, ConnectSlackCallbackInstanceResponse, ConnectCallbackData, ConnectCallbackResponse, CreateAccountData, CreateAccountResponse, RefreshTokenData, RefreshTokenResponse, DisconnectAccountData, DisconnectAccountResponse, DisconnectSlackData, DisconnectSlackResponse, DisconnectTeamsData, DisconnectTeamsResponse, ListOauthLoginsResponse, ListOauthConnectsResponse, GetOauthConnectData, GetOauthConnectResponse, SyncTeamsResponse, SendMessageToConversationData, SendMessageToConversationResponse, CreateResourceData, CreateResourceResponse, DeleteResourceData, DeleteResourceResponse, UpdateResourceData, UpdateResourceResponse, UpdateResourceValueData, UpdateResourceValueResponse, GetResourceData, GetResourceResponse, GetResourceValueInterpolatedData, GetResourceValueInterpolatedResponse, GetResourceValueData, GetResourceValueResponse, ExistsResourceData, ExistsResourceResponse, ListResourceData, ListResourceResponse, ListSearchResourceData, ListSearchResourceResponse, ListResourceNamesData, ListResourceNamesResponse, CreateResourceTypeData, CreateResourceTypeResponse, FileResourceTypeToFileExtMapData, FileResourceTypeToFileExtMapResponse, DeleteResourceTypeData, DeleteResourceTypeResponse, UpdateResourceTypeData, UpdateResourceTypeResponse, GetResourceTypeData, GetResourceTypeResponse, ExistsResourceTypeData, ExistsResourceTypeResponse, ListResourceTypeData, ListResourceTypeResponse, ListResourceTypeNamesData, ListResourceTypeNamesResponse, QueryResourceTypesData, QueryResourceTypesResponse, ListHubIntegrationsData, ListHubIntegrationsResponse, ListHubFlowsResponse, GetHubFlowByIdData, GetHubFlowByIdResponse, ListHubAppsResponse, GetHubAppByIdData, GetHubAppByIdResponse, GetPublicAppByCustomPathData, GetPublicAppByCustomPathResponse, GetHubScriptContentByPathData, GetHubScriptContentByPathResponse, GetHubScriptByPathData, GetHubScriptByPathResponse, GetTopHubScriptsData, GetTopHubScriptsResponse, QueryHubScriptsData, QueryHubScriptsResponse, ListSearchScriptData, ListSearchScriptResponse, ListScriptsData, ListScriptsResponse, ListScriptPathsData, ListScriptPathsResponse, CreateDraftData, CreateDraftResponse, DeleteDraftData, DeleteDraftResponse, CreateScriptData, CreateScriptResponse, ToggleWorkspaceErrorHandlerForScriptData, ToggleWorkspaceErrorHandlerForScriptResponse, GetCustomTagsData, GetCustomTagsResponse, GeDefaultTagsResponse, IsDefaultTagsPerWorkspaceResponse, ArchiveScriptByPathData, ArchiveScriptByPathResponse, ArchiveScriptByHashData, ArchiveScriptByHashResponse, DeleteScriptByHashData, DeleteScriptByHashResponse, DeleteScriptByPathData, DeleteScriptByPathResponse, GetScriptByPathData, GetScriptByPathResponse, GetTriggersCountOfScriptData, GetTriggersCountOfScriptResponse, ListTokensOfScriptData, ListTokensOfScriptResponse, GetScriptByPathWithDraftData, GetScriptByPathWithDraftResponse, GetScriptHistoryByPathData, GetScriptHistoryByPathResponse, ListScriptPathsFromWorkspaceRunnableData, ListScriptPathsFromWorkspaceRunnableResponse, GetScriptLatestVersionData, GetScriptLatestVersionResponse, UpdateScriptHistoryData, UpdateScriptHistoryResponse, RawScriptByPathData, RawScriptByPathResponse, RawScriptByPathTokenedData, RawScriptByPathTokenedResponse, ExistsScriptByPathData, ExistsScriptByPathResponse, GetScriptByHashData, GetScriptByHashResponse, RawScriptByHashData, RawScriptByHashResponse, GetScriptDeploymentStatusData, GetScriptDeploymentStatusResponse, RunScriptByPathData, RunScriptByPathResponse, OpenaiSyncScriptByPathData, OpenaiSyncScriptByPathResponse, RunWaitResultScriptByPathData, RunWaitResultScriptByPathResponse, RunWaitResultScriptByPathGetData, RunWaitResultScriptByPathGetResponse, OpenaiSyncFlowByPathData, OpenaiSyncFlowByPathResponse, RunWaitResultFlowByPathData, RunWaitResultFlowByPathResponse, ResultByIdData, ResultByIdResponse, ListFlowPathsData, ListFlowPathsResponse, ListSearchFlowData, ListSearchFlowResponse, ListFlowsData, ListFlowsResponse, GetFlowHistoryData, GetFlowHistoryResponse, GetFlowLatestVersionData, GetFlowLatestVersionResponse, ListFlowPathsFromWorkspaceRunnableData, ListFlowPathsFromWorkspaceRunnableResponse, GetFlowVersionData, GetFlowVersionResponse, UpdateFlowHistoryData, UpdateFlowHistoryResponse, GetFlowByPathData, GetFlowByPathResponse, GetFlowDeploymentStatusData, GetFlowDeploymentStatusResponse, GetTriggersCountOfFlowData, GetTriggersCountOfFlowResponse, ListTokensOfFlowData, ListTokensOfFlowResponse, ToggleWorkspaceErrorHandlerForFlowData, ToggleWorkspaceErrorHandlerForFlowResponse, GetFlowByPathWithDraftData, GetFlowByPathWithDraftResponse, ExistsFlowByPathData, ExistsFlowByPathResponse, CreateFlowData, CreateFlowResponse, UpdateFlowData, UpdateFlowResponse, ArchiveFlowByPathData, ArchiveFlowByPathResponse, DeleteFlowByPathData, DeleteFlowByPathResponse, ListRawAppsData, ListRawAppsResponse, ExistsRawAppData, ExistsRawAppResponse, GetRawAppDataData, GetRawAppDataResponse, ListSearchAppData, ListSearchAppResponse, ListAppsData, ListAppsResponse, CreateAppData, CreateAppResponse, ExistsAppData, ExistsAppResponse, GetAppByPathData, GetAppByPathResponse, GetAppLiteByPathData, GetAppLiteByPathResponse, GetAppByPathWithDraftData, GetAppByPathWithDraftResponse, GetAppHistoryByPathData, GetAppHistoryByPathResponse, GetAppLatestVersionData, GetAppLatestVersionResponse, ListAppPathsFromWorkspaceRunnableData, ListAppPathsFromWorkspaceRunnableResponse, UpdateAppHistoryData, UpdateAppHistoryResponse, GetPublicAppBySecretData, GetPublicAppBySecretResponse, GetPublicResourceData, GetPublicResourceResponse, GetPublicSecretOfAppData, GetPublicSecretOfAppResponse, GetAppByVersionData, GetAppByVersionResponse, CreateRawAppData, CreateRawAppResponse, UpdateRawAppData, UpdateRawAppResponse, DeleteRawAppData, DeleteRawAppResponse, DeleteAppData, DeleteAppResponse, UpdateAppData, UpdateAppResponse, CustomPathExistsData, CustomPathExistsResponse, ExecuteComponentData, ExecuteComponentResponse, UploadS3FileFromAppData, UploadS3FileFromAppResponse, DeleteS3FileFromAppData, DeleteS3FileFromAppResponse, RunFlowByPathData, RunFlowByPathResponse, RestartFlowAtStepData, RestartFlowAtStepResponse, RunScriptByHashData, RunScriptByHashResponse, RunScriptPreviewData, RunScriptPreviewResponse, RunCodeWorkflowTaskData, RunCodeWorkflowTaskResponse, RunRawScriptDependenciesData, RunRawScriptDependenciesResponse, RunFlowPreviewData, RunFlowPreviewResponse, ListQueueData, ListQueueResponse, GetQueueCountData, GetQueueCountResponse, GetCompletedCountData, GetCompletedCountResponse, CountCompletedJobsData, CountCompletedJobsResponse, ListFilteredUuidsData, ListFilteredUuidsResponse, CancelSelectionData, CancelSelectionResponse, ListCompletedJobsData, ListCompletedJobsResponse, ListJobsData, ListJobsResponse, GetDbClockResponse, CountJobsByTagData, CountJobsByTagResponse, GetJobData, GetJobResponse, GetRootJobIdData, GetRootJobIdResponse, GetJobLogsData, GetJobLogsResponse, GetJobArgsData, GetJobArgsResponse, GetJobUpdatesData, GetJobUpdatesResponse, GetLogFileFromStoreData, GetLogFileFromStoreResponse, GetFlowDebugInfoData, GetFlowDebugInfoResponse, GetCompletedJobData, GetCompletedJobResponse, GetCompletedJobResultData, GetCompletedJobResultResponse, GetCompletedJobResultMaybeData, GetCompletedJobResultMaybeResponse, DeleteCompletedJobData, DeleteCompletedJobResponse, CancelQueuedJobData, CancelQueuedJobResponse, CancelPersistentQueuedJobsData, CancelPersistentQueuedJobsResponse, ForceCancelQueuedJobData, ForceCancelQueuedJobResponse, CreateJobSignatureData, CreateJobSignatureResponse, GetResumeUrlsData, GetResumeUrlsResponse, GetSlackApprovalPayloadData, GetSlackApprovalPayloadResponse, ResumeSuspendedJobGetData, ResumeSuspendedJobGetResponse, ResumeSuspendedJobPostData, ResumeSuspendedJobPostResponse, SetFlowUserStateData, SetFlowUserStateResponse, GetFlowUserStateData, GetFlowUserStateResponse, ResumeSuspendedFlowAsOwnerData, ResumeSuspendedFlowAsOwnerResponse, CancelSuspendedJobGetData, CancelSuspendedJobGetResponse, CancelSuspendedJobPostData, CancelSuspendedJobPostResponse, GetSuspendedJobFlowData, GetSuspendedJobFlowResponse, PreviewScheduleData, PreviewScheduleResponse, CreateScheduleData, CreateScheduleResponse, UpdateScheduleData, UpdateScheduleResponse, SetScheduleEnabledData, SetScheduleEnabledResponse, DeleteScheduleData, DeleteScheduleResponse, GetScheduleData, GetScheduleResponse, ExistsScheduleData, ExistsScheduleResponse, ListSchedulesData, ListSchedulesResponse, ListSchedulesWithJobsData, ListSchedulesWithJobsResponse, SetDefaultErrorOrRecoveryHandlerData, SetDefaultErrorOrRecoveryHandlerResponse, CreateHttpTriggerData, CreateHttpTriggerResponse, UpdateHttpTriggerData, UpdateHttpTriggerResponse, DeleteHttpTriggerData, DeleteHttpTriggerResponse, GetHttpTriggerData, GetHttpTriggerResponse, ListHttpTriggersData, ListHttpTriggersResponse, ExistsHttpTriggerData, ExistsHttpTriggerResponse, ExistsRouteData, ExistsRouteResponse, CreateWebsocketTriggerData, CreateWebsocketTriggerResponse, UpdateWebsocketTriggerData, UpdateWebsocketTriggerResponse, DeleteWebsocketTriggerData, DeleteWebsocketTriggerResponse, GetWebsocketTriggerData, GetWebsocketTriggerResponse, ListWebsocketTriggersData, ListWebsocketTriggersResponse, ExistsWebsocketTriggerData, ExistsWebsocketTriggerResponse, SetWebsocketTriggerEnabledData, SetWebsocketTriggerEnabledResponse, TestWebsocketConnectionData, TestWebsocketConnectionResponse, CreateKafkaTriggerData, CreateKafkaTriggerResponse, UpdateKafkaTriggerData, UpdateKafkaTriggerResponse, DeleteKafkaTriggerData, DeleteKafkaTriggerResponse, GetKafkaTriggerData, GetKafkaTriggerResponse, ListKafkaTriggersData, ListKafkaTriggersResponse, ExistsKafkaTriggerData, ExistsKafkaTriggerResponse, SetKafkaTriggerEnabledData, SetKafkaTriggerEnabledResponse, TestKafkaConnectionData, TestKafkaConnectionResponse, CreateNatsTriggerData, CreateNatsTriggerResponse, UpdateNatsTriggerData, UpdateNatsTriggerResponse, DeleteNatsTriggerData, DeleteNatsTriggerResponse, GetNatsTriggerData, GetNatsTriggerResponse, ListNatsTriggersData, ListNatsTriggersResponse, ExistsNatsTriggerData, ExistsNatsTriggerResponse, SetNatsTriggerEnabledData, SetNatsTriggerEnabledResponse, TestNatsConnectionData, TestNatsConnectionResponse, CreateSqsTriggerData, CreateSqsTriggerResponse, UpdateSqsTriggerData, UpdateSqsTriggerResponse, DeleteSqsTriggerData, DeleteSqsTriggerResponse, GetSqsTriggerData, GetSqsTriggerResponse, ListSqsTriggersData, ListSqsTriggersResponse, ExistsSqsTriggerData, ExistsSqsTriggerResponse, SetSqsTriggerEnabledData, SetSqsTriggerEnabledResponse, TestSqsConnectionData, TestSqsConnectionResponse, CreateMqttTriggerData, CreateMqttTriggerResponse, UpdateMqttTriggerData, UpdateMqttTriggerResponse, DeleteMqttTriggerData, DeleteMqttTriggerResponse, GetMqttTriggerData, GetMqttTriggerResponse, ListMqttTriggersData, ListMqttTriggersResponse, ExistsMqttTriggerData, ExistsMqttTriggerResponse, SetMqttTriggerEnabledData, SetMqttTriggerEnabledResponse, TestMqttConnectionData, TestMqttConnectionResponse, CreateGcpTriggerData, CreateGcpTriggerResponse, UpdateGcpTriggerData, UpdateGcpTriggerResponse, DeleteGcpTriggerData, DeleteGcpTriggerResponse, GetGcpTriggerData, GetGcpTriggerResponse, ListGcpTriggersData, ListGcpTriggersResponse, ExistsGcpTriggerData, ExistsGcpTriggerResponse, SetGcpTriggerEnabledData, SetGcpTriggerEnabledResponse, TestGcpConnectionData, TestGcpConnectionResponse, DeleteGcpSubscriptionData, DeleteGcpSubscriptionResponse, ListGoogleTopicsData, ListGoogleTopicsResponse, ListAllTgoogleTopicSubscriptionsData, ListAllTgoogleTopicSubscriptionsResponse, IsValidPostgresConfigurationData, IsValidPostgresConfigurationResponse, CreateTemplateScriptData, CreateTemplateScriptResponse, GetTemplateScriptData, GetTemplateScriptResponse, ListPostgresReplicationSlotData, ListPostgresReplicationSlotResponse, CreatePostgresReplicationSlotData, CreatePostgresReplicationSlotResponse, DeletePostgresReplicationSlotData, DeletePostgresReplicationSlotResponse, ListPostgresPublicationData, ListPostgresPublicationResponse, GetPostgresPublicationData, GetPostgresPublicationResponse, CreatePostgresPublicationData, CreatePostgresPublicationResponse, UpdatePostgresPublicationData, UpdatePostgresPublicationResponse, DeletePostgresPublicationData, DeletePostgresPublicationResponse, CreatePostgresTriggerData, CreatePostgresTriggerResponse, UpdatePostgresTriggerData, UpdatePostgresTriggerResponse, DeletePostgresTriggerData, DeletePostgresTriggerResponse, GetPostgresTriggerData, GetPostgresTriggerResponse, ListPostgresTriggersData, ListPostgresTriggersResponse, ExistsPostgresTriggerData, ExistsPostgresTriggerResponse, SetPostgresTriggerEnabledData, SetPostgresTriggerEnabledResponse, TestPostgresConnectionData, TestPostgresConnectionResponse, ListInstanceGroupsResponse, GetInstanceGroupData, GetInstanceGroupResponse, CreateInstanceGroupData, CreateInstanceGroupResponse, UpdateInstanceGroupData, UpdateInstanceGroupResponse, DeleteInstanceGroupData, DeleteInstanceGroupResponse, AddUserToInstanceGroupData, AddUserToInstanceGroupResponse, RemoveUserFromInstanceGroupData, RemoveUserFromInstanceGroupResponse, ExportInstanceGroupsResponse, OverwriteInstanceGroupsData, OverwriteInstanceGroupsResponse, ListGroupsData, ListGroupsResponse, ListGroupNamesData, ListGroupNamesResponse, CreateGroupData, CreateGroupResponse, UpdateGroupData, UpdateGroupResponse, DeleteGroupData, DeleteGroupResponse, GetGroupData, GetGroupResponse, AddUserToGroupData, AddUserToGroupResponse, RemoveUserToGroupData, RemoveUserToGroupResponse, ListFoldersData, ListFoldersResponse, ListFolderNamesData, ListFolderNamesResponse, CreateFolderData, CreateFolderResponse, UpdateFolderData, UpdateFolderResponse, DeleteFolderData, DeleteFolderResponse, GetFolderData, GetFolderResponse, ExistsFolderData, ExistsFolderResponse, GetFolderUsageData, GetFolderUsageResponse, AddOwnerToFolderData, AddOwnerToFolderResponse, RemoveOwnerToFolderData, RemoveOwnerToFolderResponse, ListWorkersData, ListWorkersResponse, ExistsWorkerWithTagData, ExistsWorkerWithTagResponse, GetQueueMetricsResponse, GetCountsOfJobsWaitingPerTagResponse, ListWorkerGroupsResponse, GetConfigData, GetConfigResponse, UpdateConfigData, UpdateConfigResponse, DeleteConfigData, DeleteConfigResponse, ListConfigsResponse, ListAutoscalingEventsData, ListAutoscalingEventsResponse, GetGranularAclsData, GetGranularAclsResponse, AddGranularAclsData, AddGranularAclsResponse, RemoveGranularAclsData, RemoveGranularAclsResponse, SetCaptureConfigData, SetCaptureConfigResponse, PingCaptureConfigData, PingCaptureConfigResponse, GetCaptureConfigsData, GetCaptureConfigsResponse, ListCapturesData, ListCapturesResponse, MoveCapturesAndConfigsData, MoveCapturesAndConfigsResponse, GetCaptureData, GetCaptureResponse, DeleteCaptureData, DeleteCaptureResponse, StarData, StarResponse, UnstarData, UnstarResponse, GetInputHistoryData, GetInputHistoryResponse, GetArgsFromHistoryOrSavedInputData, GetArgsFromHistoryOrSavedInputResponse, ListInputsData, ListInputsResponse, CreateInputData, CreateInputResponse, UpdateInputData, UpdateInputResponse, DeleteInputData, DeleteInputResponse, DuckdbConnectionSettingsData, DuckdbConnectionSettingsResponse, DuckdbConnectionSettingsV2Data, DuckdbConnectionSettingsV2Response, PolarsConnectionSettingsData, PolarsConnectionSettingsResponse, PolarsConnectionSettingsV2Data, PolarsConnectionSettingsV2Response, S3ResourceInfoData, S3ResourceInfoResponse, DatasetStorageTestConnectionData, DatasetStorageTestConnectionResponse, ListStoredFilesData, ListStoredFilesResponse, LoadFileMetadataData, LoadFileMetadataResponse, LoadFilePreviewData, LoadFilePreviewResponse, LoadParquetPreviewData, LoadParquetPreviewResponse, LoadTableRowCountData, LoadTableRowCountResponse, LoadCsvPreviewData, LoadCsvPreviewResponse, DeleteS3FileData, DeleteS3FileResponse, MoveS3FileData, MoveS3FileResponse, FileUploadData, FileUploadResponse, FileDownloadData, FileDownloadResponse, FileDownloadParquetAsCsvData, FileDownloadParquetAsCsvResponse, GetJobMetricsData, GetJobMetricsResponse, SetJobProgressData, SetJobProgressResponse, GetJobProgressData, GetJobProgressResponse, ListLogFilesData, ListLogFilesResponse, GetLogFileData, GetLogFileResponse, ListConcurrencyGroupsResponse, DeleteConcurrencyGroupData, DeleteConcurrencyGroupResponse, GetConcurrencyKeyData, GetConcurrencyKeyResponse, ListExtendedJobsData, ListExtendedJobsResponse, SearchJobsIndexData, SearchJobsIndexResponse, SearchLogsIndexData, SearchLogsIndexResponse, CountSearchLogsIndexData, CountSearchLogsIndexResponse, ClearIndexData, ClearIndexResponse } from './types.gen.ts'; - -/** - * get backend version - * @returns string git version of backend - * @throws ApiError - */ -export const backendVersion = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/version' -}); }; - -/** - * is backend up to date - * @returns string is backend up to date - * @throws ApiError - */ -export const backendUptodate = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/uptodate' -}); }; - -/** - * get license id - * @returns string get license id (empty if not ee) - * @throws ApiError - */ -export const getLicenseId = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/ee_license' -}); }; - -/** - * get openapi yaml spec - * @returns string openapi yaml file content - * @throws ApiError - */ -export const getOpenApiYaml = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/openapi.yaml' -}); }; - -/** - * get audit log (requires admin privilege) - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @returns AuditLog an audit log - * @throws ApiError - */ -export const getAuditLog = (data: GetAuditLogData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/audit/get/{id}', - path: { - workspace: data.workspace, - id: data.id - } -}); }; - -/** - * list audit logs (requires admin privilege) - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.before filter on started before (inclusive) timestamp - * @param data.after filter on created after (exclusive) timestamp - * @param data.username filter on exact username of user - * @param data.operation filter on exact or prefix name of operation - * @param data.operations comma separated list of exact operations to include - * @param data.excludeOperations comma separated list of operations to exclude - * @param data.resource filter on exact or prefix name of resource - * @param data.actionKind filter on type of operation - * @param data.allWorkspaces get audit logs for all workspaces - * @returns AuditLog a list of audit logs - * @throws ApiError - */ -export const listAuditLogs = (data: ListAuditLogsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/audit/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - before: data.before, - after: data.after, - username: data.username, - operation: data.operation, - operations: data.operations, - exclude_operations: data.excludeOperations, - resource: data.resource, - action_kind: data.actionKind, - all_workspaces: data.allWorkspaces - } -}); }; - -/** - * login with password - * @param data The data for the request. - * @param data.requestBody credentials - * @returns string Successfully authenticated. The session ID is returned in a cookie named `token` and as plaintext response. Preferred method of authorization is through the bearer token. The cookie is only for browser convenience. - * - * @throws ApiError - */ -export const login = (data: LoginData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/auth/login', - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * logout - * @returns string clear cookies and clear token (if applicable) - * @throws ApiError - */ -export const logout = (): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/auth/logout' -}); }; - -/** - * get user (require admin privilege) - * @param data The data for the request. - * @param data.workspace - * @param data.username - * @returns User user created - * @throws ApiError - */ -export const getUser = (data: GetUserData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/users/get/{username}', - path: { - workspace: data.workspace, - username: data.username - } -}); }; - -/** - * update user (require admin privilege) - * @param data The data for the request. - * @param data.workspace - * @param data.username - * @param data.requestBody new user - * @returns string edited user - * @throws ApiError - */ -export const updateUser = (data: UpdateUserData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/users/update/{username}', - path: { - workspace: data.workspace, - username: data.username - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * is owner of path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean is owner - * @throws ApiError - */ -export const isOwnerOfPath = (data: IsOwnerOfPathData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/users/is_owner/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * set password - * @param data The data for the request. - * @param data.requestBody set password - * @returns string password set - * @throws ApiError - */ -export const setPassword = (data: SetPasswordData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/users/setpassword', - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * set password for a specific user (require super admin) - * @param data The data for the request. - * @param data.user - * @param data.requestBody set password - * @returns string password set - * @throws ApiError - */ -export const setPasswordForUser = (data: SetPasswordForUserData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/users/set_password_of/{user}', - path: { - user: data.user - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * set login type for a specific user (require super admin) - * @param data The data for the request. - * @param data.user - * @param data.requestBody set login type - * @returns string login type set - * @throws ApiError - */ -export const setLoginTypeForUser = (data: SetLoginTypeForUserData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/users/set_login_type/{user}', - path: { - user: data.user - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * create user - * @param data The data for the request. - * @param data.requestBody user info - * @returns string user created - * @throws ApiError - */ -export const createUserGlobally = (data: CreateUserGloballyData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/users/create', - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * global update user (require super admin) - * @param data The data for the request. - * @param data.email - * @param data.requestBody new user info - * @returns string user updated - * @throws ApiError - */ -export const globalUserUpdate = (data: GlobalUserUpdateData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/users/update/{email}', - path: { - email: data.email - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * global username info (require super admin) - * @param data The data for the request. - * @param data.email - * @returns unknown user renamed - * @throws ApiError - */ -export const globalUsernameInfo = (data: GlobalUsernameInfoData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/users/username_info/{email}', - path: { - email: data.email - } -}); }; - -/** - * global rename user (require super admin) - * @param data The data for the request. - * @param data.email - * @param data.requestBody new username - * @returns string user renamed - * @throws ApiError - */ -export const globalUserRename = (data: GlobalUserRenameData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/users/rename/{email}', - path: { - email: data.email - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * global delete user (require super admin) - * @param data The data for the request. - * @param data.email - * @returns string user deleted - * @throws ApiError - */ -export const globalUserDelete = (data: GlobalUserDeleteData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/users/delete/{email}', - path: { - email: data.email - } -}); }; - -/** - * global overwrite users (require super admin and EE) - * @param data The data for the request. - * @param data.requestBody List of users - * @returns string Success message - * @throws ApiError - */ -export const globalUsersOverwrite = (data: GlobalUsersOverwriteData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/users/overwrite', - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * global export users (require super admin and EE) - * @returns ExportedUser exported users - * @throws ApiError - */ -export const globalUsersExport = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/users/export' -}); }; - -/** - * delete user (require admin privilege) - * @param data The data for the request. - * @param data.workspace - * @param data.username - * @returns string delete user - * @throws ApiError - */ -export const deleteUser = (data: DeleteUserData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/users/delete/{username}', - path: { - workspace: data.workspace, - username: data.username - } -}); }; - -/** - * get connected repositories - * @returns GithubInstallations connected repositories - * @throws ApiError - */ -export const getGlobalConnectedRepositories = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/github_app/connected_repositories' -}); }; - -/** - * list all workspaces visible to me - * @returns Workspace all workspaces - * @throws ApiError - */ -export const listWorkspaces = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/workspaces/list' -}); }; - -/** - * is domain allowed for auto invi - * @returns boolean domain allowed or not - * @throws ApiError - */ -export const isDomainAllowed = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/workspaces/allowed_domain_auto_invite' -}); }; - -/** - * list all workspaces visible to me with user info - * @returns UserWorkspaceList workspace with associated username - * @throws ApiError - */ -export const listUserWorkspaces = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/workspaces/users' -}); }; - -/** - * list all workspaces as super admin (require to be super admin) - * @param data The data for the request. - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @returns Workspace workspaces - * @throws ApiError - */ -export const listWorkspacesAsSuperAdmin = (data: ListWorkspacesAsSuperAdminData = {}): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/workspaces/list_as_superadmin', - query: { - page: data.page, - per_page: data.perPage - } -}); }; - -/** - * create workspace - * @param data The data for the request. - * @param data.requestBody new token - * @returns string token created - * @throws ApiError - */ -export const createWorkspace = (data: CreateWorkspaceData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/workspaces/create', - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * exists workspace - * @param data The data for the request. - * @param data.requestBody id of workspace - * @returns boolean status - * @throws ApiError - */ -export const existsWorkspace = (data: ExistsWorkspaceData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/workspaces/exists', - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * exists username - * @param data The data for the request. - * @param data.requestBody - * @returns boolean status - * @throws ApiError - */ -export const existsUsername = (data: ExistsUsernameData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/workspaces/exists_username', - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * get global settings - * @param data The data for the request. - * @param data.key - * @returns unknown status - * @throws ApiError - */ -export const getGlobal = (data: GetGlobalData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/settings/global/{key}', - path: { - key: data.key - } -}); }; - -/** - * post global settings - * @param data The data for the request. - * @param data.key - * @param data.requestBody value set - * @returns string status - * @throws ApiError - */ -export const setGlobal = (data: SetGlobalData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/settings/global/{key}', - path: { - key: data.key - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * get local settings - * @returns unknown status - * @throws ApiError - */ -export const getLocal = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/settings/local' -}); }; - -/** - * test smtp - * @param data The data for the request. - * @param data.requestBody test smtp payload - * @returns string status - * @throws ApiError - */ -export const testSmtp = (data: TestSmtpData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/settings/test_smtp', - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * test critical channels - * @param data The data for the request. - * @param data.requestBody test critical channel payload - * @returns string status - * @throws ApiError - */ -export const testCriticalChannels = (data: TestCriticalChannelsData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/settings/test_critical_channels', - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * Get all critical alerts - * @param data The data for the request. - * @param data.page - * @param data.pageSize - * @param data.acknowledged - * @returns unknown Successfully retrieved all critical alerts - * @throws ApiError - */ -export const getCriticalAlerts = (data: GetCriticalAlertsData = {}): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/settings/critical_alerts', - query: { - page: data.page, - page_size: data.pageSize, - acknowledged: data.acknowledged - } -}); }; - -/** - * Acknowledge a critical alert - * @param data The data for the request. - * @param data.id The ID of the critical alert to acknowledge - * @returns string Successfully acknowledged the critical alert - * @throws ApiError - */ -export const acknowledgeCriticalAlert = (data: AcknowledgeCriticalAlertData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/settings/critical_alerts/{id}/acknowledge', - path: { - id: data.id - } -}); }; - -/** - * Acknowledge all unacknowledged critical alerts - * @returns string Successfully acknowledged all unacknowledged critical alerts. - * @throws ApiError - */ -export const acknowledgeAllCriticalAlerts = (): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/settings/critical_alerts/acknowledge_all' -}); }; - -/** - * test license key - * @param data The data for the request. - * @param data.requestBody test license key - * @returns string status - * @throws ApiError - */ -export const testLicenseKey = (data: TestLicenseKeyData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/settings/test_license_key', - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * test object storage config - * @param data The data for the request. - * @param data.requestBody test object storage config - * @returns string status - * @throws ApiError - */ -export const testObjectStorageConfig = (data: TestObjectStorageConfigData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/settings/test_object_storage_config', - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * send stats - * @returns string status - * @throws ApiError - */ -export const sendStats = (): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/settings/send_stats' -}); }; - -/** - * get latest key renewal attempt - * @returns unknown status - * @throws ApiError - */ -export const getLatestKeyRenewalAttempt = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/settings/latest_key_renewal_attempt' -}); }; - -/** - * renew license key - * @param data The data for the request. - * @param data.licenseKey - * @returns string status - * @throws ApiError - */ -export const renewLicenseKey = (data: RenewLicenseKeyData = {}): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/settings/renew_license_key', - query: { - license_key: data.licenseKey - } -}); }; - -/** - * create customer portal session - * @param data The data for the request. - * @param data.licenseKey - * @returns string url to portal - * @throws ApiError - */ -export const createCustomerPortalSession = (data: CreateCustomerPortalSessionData = {}): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/settings/customer_portal', - query: { - license_key: data.licenseKey - } -}); }; - -/** - * test metadata - * @param data The data for the request. - * @param data.requestBody test metadata - * @returns string status - * @throws ApiError - */ -export const testMetadata = (data: TestMetadataData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/saml/test_metadata', - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * list global settings - * @returns GlobalSetting list of settings - * @throws ApiError - */ -export const listGlobalSettings = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/settings/list_global' -}); }; - -/** - * get current user email (if logged in) - * @returns string user email - * @throws ApiError - */ -export const getCurrentEmail = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/users/email' -}); }; - -/** - * refresh the current token - * @param data The data for the request. - * @param data.ifExpiringInLessThanS - * @returns string new token - * @throws ApiError - */ -export const refreshUserToken = (data: RefreshUserTokenData = {}): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/users/refresh_token', - query: { - if_expiring_in_less_than_s: data.ifExpiringInLessThanS - } -}); }; - -/** - * get tutorial progress - * @returns unknown tutorial progress - * @throws ApiError - */ -export const getTutorialProgress = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/users/tutorial_progress' -}); }; - -/** - * update tutorial progress - * @param data The data for the request. - * @param data.requestBody progress update - * @returns string tutorial progress - * @throws ApiError - */ -export const updateTutorialProgress = (data: UpdateTutorialProgressData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/users/tutorial_progress', - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * leave instance - * @returns string status - * @throws ApiError - */ -export const leaveInstance = (): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/users/leave_instance' -}); }; - -/** - * get current usage outside of premium workspaces - * @returns number free usage - * @throws ApiError - */ -export const getUsage = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/users/usage' -}); }; - -/** - * get all runnables in every workspace - * @returns unknown free all runnables - * @throws ApiError - */ -export const getRunnable = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/users/all_runnables' -}); }; - -/** - * get current global whoami (if logged in) - * @returns GlobalUserInfo user email - * @throws ApiError - */ -export const globalWhoami = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/users/whoami' -}); }; - -/** - * list all workspace invites - * @returns WorkspaceInvite list all workspace invites - * @throws ApiError - */ -export const listWorkspaceInvites = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/users/list_invites' -}); }; - -/** - * whoami - * @param data The data for the request. - * @param data.workspace - * @returns User user - * @throws ApiError - */ -export const whoami = (data: WhoamiData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/users/whoami', - path: { - workspace: data.workspace - } -}); }; - -/** - * get github app token - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody jwt job token - * @returns unknown github app token - * @throws ApiError - */ -export const getGithubAppToken = (data: GetGithubAppTokenData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/github_app/token', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * Install a GitHub installation from another workspace - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody - * @returns unknown Installation successfully copied - * @throws ApiError - */ -export const installFromWorkspace = (data: InstallFromWorkspaceData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/github_app/install_from_workspace', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * Delete a GitHub installation from a workspace - * Removes a GitHub installation from the specified workspace. Requires admin privileges. - * @param data The data for the request. - * @param data.workspace - * @param data.installationId The ID of the GitHub installation to delete - * @returns unknown Installation successfully deleted - * @throws ApiError - */ -export const deleteFromWorkspace = (data: DeleteFromWorkspaceData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/github_app/installation/{installation_id}', - path: { - workspace: data.workspace, - installation_id: data.installationId - } -}); }; - -/** - * Export GitHub installation JWT token - * Exports the JWT token for a specific GitHub installation in the workspace - * @param data The data for the request. - * @param data.workspace - * @param data.installationId - * @returns unknown Successfully exported the JWT token - * @throws ApiError - */ -export const exportInstallation = (data: ExportInstallationData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/github_app/export/{installationId}', - path: { - workspace: data.workspace, - installationId: data.installationId - } -}); }; - -/** - * Import GitHub installation from JWT token - * Imports a GitHub installation from a JWT token exported from another instance - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody - * @returns unknown Successfully imported the installation - * @throws ApiError - */ -export const importInstallation = (data: ImportInstallationData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/github_app/import', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * accept invite to workspace - * @param data The data for the request. - * @param data.requestBody accept invite - * @returns string status - * @throws ApiError - */ -export const acceptInvite = (data: AcceptInviteData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/users/accept_invite', - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * decline invite to workspace - * @param data The data for the request. - * @param data.requestBody decline invite - * @returns string status - * @throws ApiError - */ -export const declineInvite = (data: DeclineInviteData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/users/decline_invite', - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * invite user to workspace - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody WorkspaceInvite - * @returns string status - * @throws ApiError - */ -export const inviteUser = (data: InviteUserData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/invite_user', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * add user to workspace - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody WorkspaceInvite - * @returns string status - * @throws ApiError - */ -export const addUser = (data: AddUserData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/add_user', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * delete user invite - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody WorkspaceInvite - * @returns string status - * @throws ApiError - */ -export const deleteInvite = (data: DeleteInviteData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/delete_invite', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * archive workspace - * @param data The data for the request. - * @param data.workspace - * @returns string status - * @throws ApiError - */ -export const archiveWorkspace = (data: ArchiveWorkspaceData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/archive', - path: { - workspace: data.workspace - } -}); }; - -/** - * unarchive workspace - * @param data The data for the request. - * @param data.workspace - * @returns string status - * @throws ApiError - */ -export const unarchiveWorkspace = (data: UnarchiveWorkspaceData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/workspaces/unarchive/{workspace}', - path: { - workspace: data.workspace - } -}); }; - -/** - * delete workspace (require super admin) - * @param data The data for the request. - * @param data.workspace - * @returns string status - * @throws ApiError - */ -export const deleteWorkspace = (data: DeleteWorkspaceData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/workspaces/delete/{workspace}', - path: { - workspace: data.workspace - } -}); }; - -/** - * leave workspace - * @param data The data for the request. - * @param data.workspace - * @returns string status - * @throws ApiError - */ -export const leaveWorkspace = (data: LeaveWorkspaceData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/leave', - path: { - workspace: data.workspace - } -}); }; - -/** - * get workspace name - * @param data The data for the request. - * @param data.workspace - * @returns string status - * @throws ApiError - */ -export const getWorkspaceName = (data: GetWorkspaceNameData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/get_workspace_name', - path: { - workspace: data.workspace - } -}); }; - -/** - * change workspace name - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody - * @returns string status - * @throws ApiError - */ -export const changeWorkspaceName = (data: ChangeWorkspaceNameData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/change_workspace_name', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * change workspace id - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody - * @returns string status - * @throws ApiError - */ -export const changeWorkspaceId = (data: ChangeWorkspaceIdData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/change_workspace_id', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * change workspace id - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody - * @returns string status - * @throws ApiError - */ -export const changeWorkspaceColor = (data: ChangeWorkspaceColorData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/change_workspace_color', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * whois - * @param data The data for the request. - * @param data.workspace - * @param data.username - * @returns User user - * @throws ApiError - */ -export const whois = (data: WhoisData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/users/whois/{username}', - path: { - workspace: data.workspace, - username: data.username - } -}); }; - -/** - * Update operator settings for a workspace - * Updates the operator settings for a specific workspace. Requires workspace admin privileges. - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody - * @returns string Operator settings updated successfully - * @throws ApiError - */ -export const updateOperatorSettings = (data: UpdateOperatorSettingsData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/operator_settings', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * exists email - * @param data The data for the request. - * @param data.email - * @returns boolean user - * @throws ApiError - */ -export const existsEmail = (data: ExistsEmailData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/users/exists/{email}', - path: { - email: data.email - } -}); }; - -/** - * list all users as super admin (require to be super amdin) - * @param data The data for the request. - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.activeOnly filter only active users - * @returns GlobalUserInfo user - * @throws ApiError - */ -export const listUsersAsSuperAdmin = (data: ListUsersAsSuperAdminData = {}): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/users/list_as_super_admin', - query: { - page: data.page, - per_page: data.perPage, - active_only: data.activeOnly - } -}); }; - -/** - * list pending invites for a workspace - * @param data The data for the request. - * @param data.workspace - * @returns WorkspaceInvite user - * @throws ApiError - */ -export const listPendingInvites = (data: ListPendingInvitesData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/list_pending_invites', - path: { - workspace: data.workspace - } -}); }; - -/** - * get settings - * @param data The data for the request. - * @param data.workspace - * @returns unknown status - * @throws ApiError - */ -export const getSettings = (data: GetSettingsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/get_settings', - path: { - workspace: data.workspace - } -}); }; - -/** - * get deploy to - * @param data The data for the request. - * @param data.workspace - * @returns unknown status - * @throws ApiError - */ -export const getDeployTo = (data: GetDeployToData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/get_deploy_to', - path: { - workspace: data.workspace - } -}); }; - -/** - * get if workspace is premium - * @param data The data for the request. - * @param data.workspace - * @returns boolean status - * @throws ApiError - */ -export const getIsPremium = (data: GetIsPremiumData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/is_premium', - path: { - workspace: data.workspace - } -}); }; - -/** - * get premium info - * @param data The data for the request. - * @param data.workspace - * @returns unknown status - * @throws ApiError - */ -export const getPremiumInfo = (data: GetPremiumInfoData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/premium_info', - path: { - workspace: data.workspace - } -}); }; - -/** - * get threshold alert info - * @param data The data for the request. - * @param data.workspace - * @returns unknown status - * @throws ApiError - */ -export const getThresholdAlert = (data: GetThresholdAlertData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/threshold_alert', - path: { - workspace: data.workspace - } -}); }; - -/** - * set threshold alert info - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody threshold alert info - * @returns string status - * @throws ApiError - */ -export const setThresholdAlert = (data: SetThresholdAlertData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/threshold_alert', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * edit slack command - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody WorkspaceInvite - * @returns string status - * @throws ApiError - */ -export const editSlackCommand = (data: EditSlackCommandData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/edit_slack_command', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * edit teams command - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody WorkspaceInvite - * @returns string status - * @throws ApiError - */ -export const editTeamsCommand = (data: EditTeamsCommandData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/edit_teams_command', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * list available teams ids - * @param data The data for the request. - * @param data.workspace - * @returns unknown status - * @throws ApiError - */ -export const listAvailableTeamsIds = (data: ListAvailableTeamsIdsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/available_teams_ids', - path: { - workspace: data.workspace - } -}); }; - -/** - * list available teams channels - * @param data The data for the request. - * @param data.workspace - * @returns unknown status - * @throws ApiError - */ -export const listAvailableTeamsChannels = (data: ListAvailableTeamsChannelsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/available_teams_channels', - path: { - workspace: data.workspace - } -}); }; - -/** - * connect teams - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody connect teams - * @returns string status - * @throws ApiError - */ -export const connectTeams = (data: ConnectTeamsData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/connect_teams', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * run a job that sends a message to Slack - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody path to hub script to run and its corresponding args - * @returns unknown status - * @throws ApiError - */ -export const runSlackMessageTestJob = (data: RunSlackMessageTestJobData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/run_slack_message_test_job', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * run a job that sends a message to Teams - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody path to hub script to run and its corresponding args - * @returns unknown status - * @throws ApiError - */ -export const runTeamsMessageTestJob = (data: RunTeamsMessageTestJobData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/run_teams_message_test_job', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * edit deploy to - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody - * @returns string status - * @throws ApiError - */ -export const editDeployTo = (data: EditDeployToData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/edit_deploy_to', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * edit auto invite - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody WorkspaceInvite - * @returns string status - * @throws ApiError - */ -export const editAutoInvite = (data: EditAutoInviteData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/edit_auto_invite', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * edit webhook - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody WorkspaceWebhook - * @returns string status - * @throws ApiError - */ -export const editWebhook = (data: EditWebhookData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/edit_webhook', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * edit copilot config - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody WorkspaceCopilotConfig - * @returns string status - * @throws ApiError - */ -export const editCopilotConfig = (data: EditCopilotConfigData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/edit_copilot_config', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * get copilot info - * @param data The data for the request. - * @param data.workspace - * @returns AIConfig status - * @throws ApiError - */ -export const getCopilotInfo = (data: GetCopilotInfoData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/get_copilot_info', - path: { - workspace: data.workspace - } -}); }; - -/** - * edit error handler - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody WorkspaceErrorHandler - * @returns string status - * @throws ApiError - */ -export const editErrorHandler = (data: EditErrorHandlerData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/edit_error_handler', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * edit large file storage settings - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody LargeFileStorage info - * @returns unknown status - * @throws ApiError - */ -export const editLargeFileStorageConfig = (data: EditLargeFileStorageConfigData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/edit_large_file_storage_config', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * edit workspace git sync settings - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody Workspace Git sync settings - * @returns unknown status - * @throws ApiError - */ -export const editWorkspaceGitSyncConfig = (data: EditWorkspaceGitSyncConfigData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/edit_git_sync_config', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * edit workspace deploy ui settings - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody Workspace deploy UI settings - * @returns unknown status - * @throws ApiError - */ -export const editWorkspaceDeployUiSettings = (data: EditWorkspaceDeployUiSettingsData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/edit_deploy_ui_config', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * edit default app for workspace - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody Workspace default app - * @returns string status - * @throws ApiError - */ -export const editWorkspaceDefaultApp = (data: EditWorkspaceDefaultAppData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/edit_default_app', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * edit default scripts for workspace - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody Workspace default app - * @returns string status - * @throws ApiError - */ -export const editDefaultScripts = (data: EditDefaultScriptsData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/default_scripts', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * get default scripts for workspace - * @param data The data for the request. - * @param data.workspace - * @returns WorkspaceDefaultScripts status - * @throws ApiError - */ -export const getDefaultScripts = (data: GetDefaultScriptsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/default_scripts', - path: { - workspace: data.workspace - } -}); }; - -/** - * set environment variable - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody Workspace default app - * @returns string status - * @throws ApiError - */ -export const setEnvironmentVariable = (data: SetEnvironmentVariableData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/set_environment_variable', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * retrieves the encryption key for this workspace - * @param data The data for the request. - * @param data.workspace - * @returns unknown status - * @throws ApiError - */ -export const getWorkspaceEncryptionKey = (data: GetWorkspaceEncryptionKeyData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/encryption_key', - path: { - workspace: data.workspace - } -}); }; - -/** - * update the encryption key for this workspace - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody New encryption key - * @returns string status - * @throws ApiError - */ -export const setWorkspaceEncryptionKey = (data: SetWorkspaceEncryptionKeyData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/encryption_key', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * get default app for workspace - * @param data The data for the request. - * @param data.workspace - * @returns unknown status - * @throws ApiError - */ -export const getWorkspaceDefaultApp = (data: GetWorkspaceDefaultAppData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/default_app', - path: { - workspace: data.workspace - } -}); }; - -/** - * get large file storage config - * @param data The data for the request. - * @param data.workspace - * @returns LargeFileStorage status - * @throws ApiError - */ -export const getLargeFileStorageConfig = (data: GetLargeFileStorageConfigData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/get_large_file_storage_config', - path: { - workspace: data.workspace - } -}); }; - -/** - * get usage - * @param data The data for the request. - * @param data.workspace - * @returns number usage - * @throws ApiError - */ -export const getWorkspaceUsage = (data: GetWorkspaceUsageData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/usage', - path: { - workspace: data.workspace - } -}); }; - -/** - * get used triggers - * @param data The data for the request. - * @param data.workspace - * @returns unknown status - * @throws ApiError - */ -export const getUsedTriggers = (data: GetUsedTriggersData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/used_triggers', - path: { - workspace: data.workspace - } -}); }; - -/** - * list users - * @param data The data for the request. - * @param data.workspace - * @returns User user - * @throws ApiError - */ -export const listUsers = (data: ListUsersData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/users/list', - path: { - workspace: data.workspace - } -}); }; - -/** - * list users usage - * @param data The data for the request. - * @param data.workspace - * @returns UserUsage user - * @throws ApiError - */ -export const listUsersUsage = (data: ListUsersUsageData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/users/list_usage', - path: { - workspace: data.workspace - } -}); }; - -/** - * list usernames - * @param data The data for the request. - * @param data.workspace - * @returns string user - * @throws ApiError - */ -export const listUsernames = (data: ListUsernamesData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/users/list_usernames', - path: { - workspace: data.workspace - } -}); }; - -/** - * get email from username - * @param data The data for the request. - * @param data.workspace - * @param data.username - * @returns string email - * @throws ApiError - */ -export const usernameToEmail = (data: UsernameToEmailData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/users/username_to_email/{username}', - path: { - workspace: data.workspace, - username: data.username - } -}); }; - -/** - * create token - * @param data The data for the request. - * @param data.requestBody new token - * @returns string token created - * @throws ApiError - */ -export const createToken = (data: CreateTokenData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/users/tokens/create', - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * create token to impersonate a user (require superadmin) - * @param data The data for the request. - * @param data.requestBody new token - * @returns string token created - * @throws ApiError - */ -export const createTokenImpersonate = (data: CreateTokenImpersonateData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/users/tokens/impersonate', - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * delete token - * @param data The data for the request. - * @param data.tokenPrefix - * @returns string delete token - * @throws ApiError - */ -export const deleteToken = (data: DeleteTokenData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/users/tokens/delete/{token_prefix}', - path: { - token_prefix: data.tokenPrefix - } -}); }; - -/** - * list token - * @param data The data for the request. - * @param data.excludeEphemeral - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @returns TruncatedToken truncated token - * @throws ApiError - */ -export const listTokens = (data: ListTokensData = {}): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/users/tokens/list', - query: { - exclude_ephemeral: data.excludeEphemeral, - page: data.page, - per_page: data.perPage - } -}); }; - -/** - * get OIDC token (ee only) - * @param data The data for the request. - * @param data.workspace - * @param data.audience - * @returns string new oidc token - * @throws ApiError - */ -export const getOidcToken = (data: GetOidcTokenData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/oidc/token/{audience}', - path: { - workspace: data.workspace, - audience: data.audience - } -}); }; - -/** - * create variable - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new variable - * @param data.alreadyEncrypted - * @returns string variable created - * @throws ApiError - */ -export const createVariable = (data: CreateVariableData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/variables/create', - path: { - workspace: data.workspace - }, - query: { - already_encrypted: data.alreadyEncrypted - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * encrypt value - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new variable - * @returns string encrypted value - * @throws ApiError - */ -export const encryptValue = (data: EncryptValueData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/variables/encrypt', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * delete variable - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string variable deleted - * @throws ApiError - */ -export const deleteVariable = (data: DeleteVariableData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/variables/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * update variable - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated variable - * @param data.alreadyEncrypted - * @returns string variable updated - * @throws ApiError - */ -export const updateVariable = (data: UpdateVariableData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/variables/update/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - already_encrypted: data.alreadyEncrypted - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * get variable - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.decryptSecret ask to decrypt secret if this variable is secret - * (if not secret no effect, default: true) - * - * @param data.includeEncrypted ask to include the encrypted value if secret and decrypt secret is not true (default: false) - * - * @returns ListableVariable variable - * @throws ApiError - */ -export const getVariable = (data: GetVariableData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/variables/get/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - decrypt_secret: data.decryptSecret, - include_encrypted: data.includeEncrypted - } -}); }; - -/** - * get variable value - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string variable - * @throws ApiError - */ -export const getVariableValue = (data: GetVariableValueData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/variables/get_value/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * does variable exists at path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean variable - * @throws ApiError - */ -export const existsVariable = (data: ExistsVariableData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/variables/exists/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * list variables - * @param data The data for the request. - * @param data.workspace - * @param data.pathStart - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @returns ListableVariable variable list - * @throws ApiError - */ -export const listVariable = (data: ListVariableData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/variables/list', - path: { - workspace: data.workspace - }, - query: { - path_start: data.pathStart, - page: data.page, - per_page: data.perPage - } -}); }; - -/** - * list contextual variables - * @param data The data for the request. - * @param data.workspace - * @returns ContextualVariable contextual variable list - * @throws ApiError - */ -export const listContextualVariables = (data: ListContextualVariablesData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/variables/list_contextual', - path: { - workspace: data.workspace - } -}); }; - -/** - * Get all critical alerts for this workspace - * @param data The data for the request. - * @param data.workspace - * @param data.page - * @param data.pageSize - * @param data.acknowledged - * @returns unknown Successfully retrieved all critical alerts - * @throws ApiError - */ -export const workspaceGetCriticalAlerts = (data: WorkspaceGetCriticalAlertsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/critical_alerts', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - page_size: data.pageSize, - acknowledged: data.acknowledged - } -}); }; - -/** - * Acknowledge a critical alert for this workspace - * @param data The data for the request. - * @param data.workspace - * @param data.id The ID of the critical alert to acknowledge - * @returns string Successfully acknowledged the critical alert - * @throws ApiError - */ -export const workspaceAcknowledgeCriticalAlert = (data: WorkspaceAcknowledgeCriticalAlertData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/critical_alerts/{id}/acknowledge', - path: { - workspace: data.workspace, - id: data.id - } -}); }; - -/** - * Acknowledge all unacknowledged critical alerts for this workspace - * @param data The data for the request. - * @param data.workspace - * @returns string Successfully acknowledged all unacknowledged critical alerts. - * @throws ApiError - */ -export const workspaceAcknowledgeAllCriticalAlerts = (data: WorkspaceAcknowledgeAllCriticalAlertsData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/critical_alerts/acknowledge_all', - path: { - workspace: data.workspace - } -}); }; - -/** - * Mute critical alert UI for this workspace - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody Boolean flag to mute critical alerts. - * @returns string Successfully updated mute critical alert settings. - * @throws ApiError - */ -export const workspaceMuteCriticalAlertsUi = (data: WorkspaceMuteCriticalAlertsUiData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/critical_alerts/mute', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * login with oauth authorization flow - * @param data The data for the request. - * @param data.clientName - * @param data.requestBody Partially filled script - * @returns string Successfully authenticated. The session ID is returned in a cookie named `token` and as plaintext response. Preferred method of authorization is through the bearer token. The cookie is only for browser convenience. - * - * @throws ApiError - */ -export const loginWithOauth = (data: LoginWithOauthData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/oauth/login_callback/{client_name}', - path: { - client_name: data.clientName - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * connect slack callback - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody code endpoint - * @returns string slack token - * @throws ApiError - */ -export const connectSlackCallback = (data: ConnectSlackCallbackData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/oauth/connect_slack_callback', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * connect slack callback instance - * @param data The data for the request. - * @param data.requestBody code endpoint - * @returns string success message - * @throws ApiError - */ -export const connectSlackCallbackInstance = (data: ConnectSlackCallbackInstanceData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/oauth/connect_slack_callback', - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * connect callback - * @param data The data for the request. - * @param data.clientName - * @param data.requestBody code endpoint - * @returns TokenResponse oauth token - * @throws ApiError - */ -export const connectCallback = (data: ConnectCallbackData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/oauth/connect_callback/{client_name}', - path: { - client_name: data.clientName - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * create OAuth account - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody code endpoint - * @returns string account set - * @throws ApiError - */ -export const createAccount = (data: CreateAccountData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/oauth/create_account', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * refresh token - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.requestBody variable path - * @returns string token refreshed - * @throws ApiError - */ -export const refreshToken = (data: RefreshTokenData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/oauth/refresh_token/{id}', - path: { - workspace: data.workspace, - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * disconnect account - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @returns string disconnected client - * @throws ApiError - */ -export const disconnectAccount = (data: DisconnectAccountData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/oauth/disconnect/{id}', - path: { - workspace: data.workspace, - id: data.id - } -}); }; - -/** - * disconnect slack - * @param data The data for the request. - * @param data.workspace - * @returns string disconnected slack - * @throws ApiError - */ -export const disconnectSlack = (data: DisconnectSlackData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/oauth/disconnect_slack', - path: { - workspace: data.workspace - } -}); }; - -/** - * disconnect teams - * @param data The data for the request. - * @param data.workspace - * @returns string disconnected teams - * @throws ApiError - */ -export const disconnectTeams = (data: DisconnectTeamsData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/oauth/disconnect_teams', - path: { - workspace: data.workspace - } -}); }; - -/** - * list oauth logins - * @returns unknown list of oauth and saml login clients - * @throws ApiError - */ -export const listOauthLogins = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/oauth/list_logins' -}); }; - -/** - * list oauth connects - * @returns string list of oauth connects clients - * @throws ApiError - */ -export const listOauthConnects = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/oauth/list_connects' -}); }; - -/** - * get oauth connect - * @param data The data for the request. - * @param data.client client name - * @returns unknown get - * @throws ApiError - */ -export const getOauthConnect = (data: GetOauthConnectData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/oauth/get_connect/{client}', - path: { - client: data.client - } -}); }; - -/** - * synchronize Microsoft Teams information (teams/channels) - * @returns TeamInfo Teams information successfully synchronized - * @throws ApiError - */ -export const syncTeams = (): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/teams/sync' -}); }; - -/** - * send update to Microsoft Teams activity - * Respond to a Microsoft Teams activity after a workspace command is run - * @param data The data for the request. - * @param data.requestBody - * @returns unknown Activity processed successfully - * @throws ApiError - */ -export const sendMessageToConversation = (data: SendMessageToConversationData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/teams/activities', - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * create resource - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new resource - * @param data.updateIfExists - * @returns string resource created - * @throws ApiError - */ -export const createResource = (data: CreateResourceData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/resources/create', - path: { - workspace: data.workspace - }, - query: { - update_if_exists: data.updateIfExists - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * delete resource - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string resource deleted - * @throws ApiError - */ -export const deleteResource = (data: DeleteResourceData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/resources/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * update resource - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated resource - * @returns string resource updated - * @throws ApiError - */ -export const updateResource = (data: UpdateResourceData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/resources/update/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * update resource value - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated resource - * @returns string resource value updated - * @throws ApiError - */ -export const updateResourceValue = (data: UpdateResourceValueData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/resources/update_value/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * get resource - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns Resource resource - * @throws ApiError - */ -export const getResource = (data: GetResourceData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/resources/get/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get resource interpolated (variables and resources are fully unrolled) - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.jobId job id - * @returns unknown resource value - * @throws ApiError - */ -export const getResourceValueInterpolated = (data: GetResourceValueInterpolatedData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/resources/get_value_interpolated/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - job_id: data.jobId - } -}); }; - -/** - * get resource value - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns unknown resource value - * @throws ApiError - */ -export const getResourceValue = (data: GetResourceValueData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/resources/get_value/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * does resource exists - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean does resource exists - * @throws ApiError - */ -export const existsResource = (data: ExistsResourceData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/resources/exists/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * list resources - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.resourceType resource_types to list from, separated by ',', - * @param data.resourceTypeExclude resource_types to not list from, separated by ',', - * @param data.pathStart - * @returns ListableResource resource list - * @throws ApiError - */ -export const listResource = (data: ListResourceData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/resources/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - resource_type: data.resourceType, - resource_type_exclude: data.resourceTypeExclude, - path_start: data.pathStart - } -}); }; - -/** - * list resources for search - * @param data The data for the request. - * @param data.workspace - * @returns unknown resource list - * @throws ApiError - */ -export const listSearchResource = (data: ListSearchResourceData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/resources/list_search', - path: { - workspace: data.workspace - } -}); }; - -/** - * list resource names - * @param data The data for the request. - * @param data.workspace - * @param data.name - * @returns unknown resource list names - * @throws ApiError - */ -export const listResourceNames = (data: ListResourceNamesData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/resources/list_names/{name}', - path: { - workspace: data.workspace, - name: data.name - } -}); }; - -/** - * create resource_type - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new resource_type - * @returns string resource_type created - * @throws ApiError - */ -export const createResourceType = (data: CreateResourceTypeData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/resources/type/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * get map from resource type to format extension - * @param data The data for the request. - * @param data.workspace - * @returns unknown map from resource type to file ext - * @throws ApiError - */ -export const fileResourceTypeToFileExtMap = (data: FileResourceTypeToFileExtMapData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/resources/file_resource_type_to_file_ext_map', - path: { - workspace: data.workspace - } -}); }; - -/** - * delete resource_type - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string resource_type deleted - * @throws ApiError - */ -export const deleteResourceType = (data: DeleteResourceTypeData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/resources/type/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * update resource_type - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated resource_type - * @returns string resource_type updated - * @throws ApiError - */ -export const updateResourceType = (data: UpdateResourceTypeData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/resources/type/update/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * get resource_type - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns ResourceType resource_type deleted - * @throws ApiError - */ -export const getResourceType = (data: GetResourceTypeData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/resources/type/get/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * does resource_type exists - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean does resource_type exist - * @throws ApiError - */ -export const existsResourceType = (data: ExistsResourceTypeData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/resources/type/exists/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * list resource_types - * @param data The data for the request. - * @param data.workspace - * @returns ResourceType resource_type list - * @throws ApiError - */ -export const listResourceType = (data: ListResourceTypeData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/resources/type/list', - path: { - workspace: data.workspace - } -}); }; - -/** - * list resource_types names - * @param data The data for the request. - * @param data.workspace - * @returns string resource_type list - * @throws ApiError - */ -export const listResourceTypeNames = (data: ListResourceTypeNamesData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/resources/type/listnames', - path: { - workspace: data.workspace - } -}); }; - -/** - * query resource types by similarity - * @param data The data for the request. - * @param data.workspace - * @param data.text query text - * @param data.limit query limit - * @returns unknown resource type details - * @throws ApiError - */ -export const queryResourceTypes = (data: QueryResourceTypesData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/embeddings/query_resource_types', - path: { - workspace: data.workspace - }, - query: { - text: data.text, - limit: data.limit - } -}); }; - -/** - * list hub integrations - * @param data The data for the request. - * @param data.kind query integrations kind - * @returns unknown integrations details - * @throws ApiError - */ -export const listHubIntegrations = (data: ListHubIntegrationsData = {}): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/integrations/hub/list', - query: { - kind: data.kind - } -}); }; - -/** - * list all hub flows - * @returns unknown hub flows list - * @throws ApiError - */ -export const listHubFlows = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/flows/hub/list' -}); }; - -/** - * get hub flow by id - * @param data The data for the request. - * @param data.id - * @returns unknown flow - * @throws ApiError - */ -export const getHubFlowById = (data: GetHubFlowByIdData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/flows/hub/get/{id}', - path: { - id: data.id - } -}); }; - -/** - * list all hub apps - * @returns unknown hub apps list - * @throws ApiError - */ -export const listHubApps = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/apps/hub/list' -}); }; - -/** - * get hub app by id - * @param data The data for the request. - * @param data.id - * @returns unknown app - * @throws ApiError - */ -export const getHubAppById = (data: GetHubAppByIdData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/apps/hub/get/{id}', - path: { - id: data.id - } -}); }; - -/** - * get public app by custom path - * @param data The data for the request. - * @param data.customPath - * @returns unknown app details - * @throws ApiError - */ -export const getPublicAppByCustomPath = (data: GetPublicAppByCustomPathData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/apps_u/public_app_by_custom_path/{custom_path}', - path: { - custom_path: data.customPath - } -}); }; - -/** - * get hub script content by path - * @param data The data for the request. - * @param data.path - * @returns string script details - * @throws ApiError - */ -export const getHubScriptContentByPath = (data: GetHubScriptContentByPathData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/scripts/hub/get/{path}', - path: { - path: data.path - } -}); }; - -/** - * get full hub script by path - * @param data The data for the request. - * @param data.path - * @returns unknown script details - * @throws ApiError - */ -export const getHubScriptByPath = (data: GetHubScriptByPathData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/scripts/hub/get_full/{path}', - path: { - path: data.path - } -}); }; - -/** - * get top hub scripts - * @param data The data for the request. - * @param data.limit query limit - * @param data.app query scripts app - * @param data.kind query scripts kind - * @returns unknown hub scripts list - * @throws ApiError - */ -export const getTopHubScripts = (data: GetTopHubScriptsData = {}): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/scripts/hub/top', - query: { - limit: data.limit, - app: data.app, - kind: data.kind - } -}); }; - -/** - * query hub scripts by similarity - * @param data The data for the request. - * @param data.text query text - * @param data.kind query scripts kind - * @param data.limit query limit - * @param data.app query scripts app - * @returns unknown script details - * @throws ApiError - */ -export const queryHubScripts = (data: QueryHubScriptsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/embeddings/query_hub_scripts', - query: { - text: data.text, - kind: data.kind, - limit: data.limit, - app: data.app - } -}); }; - -/** - * list scripts for search - * @param data The data for the request. - * @param data.workspace - * @returns unknown script list - * @throws ApiError - */ -export const listSearchScript = (data: ListSearchScriptData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/scripts/list_search', - path: { - workspace: data.workspace - } -}); }; - -/** - * list all scripts - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.orderDesc order by desc order (default true) - * @param data.createdBy mask to filter exact matching user creator - * @param data.pathStart mask to filter matching starting path - * @param data.pathExact mask to filter exact matching path - * @param data.firstParentHash mask to filter scripts whom first direct parent has exact hash - * @param data.lastParentHash mask to filter scripts whom last parent in the chain has exact hash. - * Beware that each script stores only a limited number of parents. Hence - * the last parent hash for a script is not necessarily its top-most parent. - * To find the top-most parent you will have to jump from last to last hash - * until finding the parent - * - * @param data.parentHash is the hash present in the array of stored parent hashes for this script. - * The same warning applies than for last_parent_hash. A script only store a - * limited number of direct parent - * - * @param data.showArchived (default false) - * show only the archived files. - * when multiple archived hash share the same path, only the ones with the latest create_at - * are - * ed. - * - * @param data.includeWithoutMain (default false) - * include scripts without an exported main function - * - * @param data.includeDraftOnly (default false) - * include scripts that have no deployed version - * - * @param data.isTemplate (default regardless) - * if true show only the templates - * if false show only the non templates - * if not defined, show all regardless of if the script is a template - * - * @param data.kinds (default regardless) - * script kinds to filter, split by comma - * - * @param data.starredOnly (default false) - * show only the starred items - * - * @param data.withDeploymentMsg (default false) - * include deployment message - * - * @returns Script All scripts - * @throws ApiError - */ -export const listScripts = (data: ListScriptsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/scripts/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - order_desc: data.orderDesc, - created_by: data.createdBy, - path_start: data.pathStart, - path_exact: data.pathExact, - first_parent_hash: data.firstParentHash, - last_parent_hash: data.lastParentHash, - parent_hash: data.parentHash, - show_archived: data.showArchived, - include_without_main: data.includeWithoutMain, - include_draft_only: data.includeDraftOnly, - is_template: data.isTemplate, - kinds: data.kinds, - starred_only: data.starredOnly, - with_deployment_msg: data.withDeploymentMsg - } -}); }; - -/** - * list all scripts paths - * @param data The data for the request. - * @param data.workspace - * @returns string list of script paths - * @throws ApiError - */ -export const listScriptPaths = (data: ListScriptPathsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/scripts/list_paths', - path: { - workspace: data.workspace - } -}); }; - -/** - * create draft - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody - * @returns string draft created - * @throws ApiError - */ -export const createDraft = (data: CreateDraftData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/drafts/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * delete draft - * @param data The data for the request. - * @param data.workspace - * @param data.kind - * @param data.path - * @returns string draft deleted - * @throws ApiError - */ -export const deleteDraft = (data: DeleteDraftData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/drafts/delete/{kind}/{path}', - path: { - workspace: data.workspace, - kind: data.kind, - path: data.path - } -}); }; - -/** - * create script - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody Partially filled script - * @returns string script created - * @throws ApiError - */ -export const createScript = (data: CreateScriptData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/scripts/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * Toggle ON and OFF the workspace error handler for a given script - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody Workspace error handler enabled - * @returns string error handler toggled - * @throws ApiError - */ -export const toggleWorkspaceErrorHandlerForScript = (data: ToggleWorkspaceErrorHandlerForScriptData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/scripts/toggle_workspace_error_handler/p/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * get all instance custom tags (tags are used to dispatch jobs to different worker groups) - * @param data The data for the request. - * @param data.workspace - * @param data.showWorkspaceRestriction - * @returns string list of custom tags - * @throws ApiError - */ -export const getCustomTags = (data: GetCustomTagsData = {}): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/workers/custom_tags', - query: { - workspace: data.workspace, - show_workspace_restriction: data.showWorkspaceRestriction - } -}); }; - -/** - * get all instance default tags - * @returns string list of default tags - * @throws ApiError - */ -export const geDefaultTags = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/workers/get_default_tags' -}); }; - -/** - * is default tags per workspace - * @returns boolean is the default tags per workspace - * @throws ApiError - */ -export const isDefaultTagsPerWorkspace = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/workers/is_default_tags_per_workspace' -}); }; - -/** - * archive script by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string script archived - * @throws ApiError - */ -export const archiveScriptByPath = (data: ArchiveScriptByPathData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/scripts/archive/p/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * archive script by hash - * @param data The data for the request. - * @param data.workspace - * @param data.hash - * @returns Script script details - * @throws ApiError - */ -export const archiveScriptByHash = (data: ArchiveScriptByHashData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/scripts/archive/h/{hash}', - path: { - workspace: data.workspace, - hash: data.hash - } -}); }; - -/** - * delete script by hash (erase content but keep hash, require admin) - * @param data The data for the request. - * @param data.workspace - * @param data.hash - * @returns Script script details - * @throws ApiError - */ -export const deleteScriptByHash = (data: DeleteScriptByHashData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/scripts/delete/h/{hash}', - path: { - workspace: data.workspace, - hash: data.hash - } -}); }; - -/** - * delete script at a given path (require admin) - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.keepCaptures keep captures - * @returns string script path - * @throws ApiError - */ -export const deleteScriptByPath = (data: DeleteScriptByPathData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/scripts/delete/p/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - keep_captures: data.keepCaptures - } -}); }; - -/** - * get script by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.withStarredInfo - * @returns Script script details - * @throws ApiError - */ -export const getScriptByPath = (data: GetScriptByPathData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/scripts/get/p/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - with_starred_info: data.withStarredInfo - } -}); }; - -/** - * get triggers count of script - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns TriggersCount triggers count - * @throws ApiError - */ -export const getTriggersCountOfScript = (data: GetTriggersCountOfScriptData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/scripts/get_triggers_count/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get tokens with script scope - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns TruncatedToken tokens list - * @throws ApiError - */ -export const listTokensOfScript = (data: ListTokensOfScriptData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/scripts/list_tokens/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get script by path with draft - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns NewScriptWithDraft script details - * @throws ApiError - */ -export const getScriptByPathWithDraft = (data: GetScriptByPathWithDraftData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/scripts/get/draft/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get history of a script by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns ScriptHistory script history - * @throws ApiError - */ -export const getScriptHistoryByPath = (data: GetScriptHistoryByPathData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/scripts/history/p/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * list script paths using provided script as a relative import - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string list of script paths - * @throws ApiError - */ -export const listScriptPathsFromWorkspaceRunnable = (data: ListScriptPathsFromWorkspaceRunnableData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/scripts/list_paths_from_workspace_runnable/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get scripts's latest version (hash) - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns ScriptHistory Script version/hash - * @throws ApiError - */ -export const getScriptLatestVersion = (data: GetScriptLatestVersionData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/scripts/get_latest_version/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * update history of a script - * @param data The data for the request. - * @param data.workspace - * @param data.hash - * @param data.path - * @param data.requestBody Script deployment message - * @returns string success - * @throws ApiError - */ -export const updateScriptHistory = (data: UpdateScriptHistoryData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/scripts/history_update/h/{hash}/p/{path}', - path: { - workspace: data.workspace, - hash: data.hash, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * raw script by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string script content - * @throws ApiError - */ -export const rawScriptByPath = (data: RawScriptByPathData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/scripts/raw/p/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * raw script by path with a token (mostly used by lsp to be used with import maps to resolve scripts) - * @param data The data for the request. - * @param data.workspace - * @param data.token - * @param data.path - * @returns string script content - * @throws ApiError - */ -export const rawScriptByPathTokened = (data: RawScriptByPathTokenedData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/scripts_u/tokened_raw/{workspace}/{token}/{path}', - path: { - workspace: data.workspace, - token: data.token, - path: data.path - } -}); }; - -/** - * exists script by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean does it exists - * @throws ApiError - */ -export const existsScriptByPath = (data: ExistsScriptByPathData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/scripts/exists/p/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get script by hash - * @param data The data for the request. - * @param data.workspace - * @param data.hash - * @param data.withStarredInfo - * @returns Script script details - * @throws ApiError - */ -export const getScriptByHash = (data: GetScriptByHashData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/scripts/get/h/{hash}', - path: { - workspace: data.workspace, - hash: data.hash - }, - query: { - with_starred_info: data.withStarredInfo - } -}); }; - -/** - * raw script by hash - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string script content - * @throws ApiError - */ -export const rawScriptByHash = (data: RawScriptByHashData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/scripts/raw/h/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get script deployment status - * @param data The data for the request. - * @param data.workspace - * @param data.hash - * @returns unknown script details - * @throws ApiError - */ -export const getScriptDeploymentStatus = (data: GetScriptDeploymentStatusData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/scripts/deployment_status/h/{hash}', - path: { - workspace: data.workspace, - hash: data.hash - } -}); }; - -/** - * run script by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody script args - * @param data.scheduledFor when to schedule this job (leave empty for immediate run) - * @param data.scheduledInSecs schedule the script to execute in the number of seconds starting now - * @param data.skipPreprocessor skip the preprocessor - * @param data.parentJob The parent job that is at the origin and responsible for the execution of this script if any - * @param data.tag Override the tag to use - * @param data.cacheTtl Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl - * @param data.jobId The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) - * @param data.invisibleToOwner make the run invisible to the the script owner (default false) - * @returns string job created - * @throws ApiError - */ -export const runScriptByPath = (data: RunScriptByPathData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/run/p/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - scheduled_for: data.scheduledFor, - scheduled_in_secs: data.scheduledInSecs, - skip_preprocessor: data.skipPreprocessor, - parent_job: data.parentJob, - tag: data.tag, - cache_ttl: data.cacheTtl, - job_id: data.jobId, - invisible_to_owner: data.invisibleToOwner - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * run script by path in openai format - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody script args - * @param data.parentJob The parent job that is at the origin and responsible for the execution of this script if any - * @param data.jobId The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) - * @param data.includeHeader List of headers's keys (separated with ',') whove value are added to the args - * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key - * - * @param data.queueLimit The maximum size of the queue for which the request would get rejected if that job would push it above that limit - * - * @returns unknown job result - * @throws ApiError - */ -export const openaiSyncScriptByPath = (data: OpenaiSyncScriptByPathData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/openai_sync/p/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - parent_job: data.parentJob, - job_id: data.jobId, - include_header: data.includeHeader, - queue_limit: data.queueLimit - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * run script by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody script args - * @param data.parentJob The parent job that is at the origin and responsible for the execution of this script if any - * @param data.tag Override the tag to use - * @param data.cacheTtl Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl - * @param data.jobId The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) - * @param data.includeHeader List of headers's keys (separated with ',') whove value are added to the args - * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key - * - * @param data.queueLimit The maximum size of the queue for which the request would get rejected if that job would push it above that limit - * - * @returns unknown job result - * @throws ApiError - */ -export const runWaitResultScriptByPath = (data: RunWaitResultScriptByPathData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/run_wait_result/p/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - parent_job: data.parentJob, - tag: data.tag, - cache_ttl: data.cacheTtl, - job_id: data.jobId, - include_header: data.includeHeader, - queue_limit: data.queueLimit - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * run script by path with get - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.parentJob The parent job that is at the origin and responsible for the execution of this script if any - * @param data.tag Override the tag to use - * @param data.cacheTtl Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl - * @param data.jobId The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) - * @param data.includeHeader List of headers's keys (separated with ',') whove value are added to the args - * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key - * - * @param data.queueLimit The maximum size of the queue for which the request would get rejected if that job would push it above that limit - * - * @param data.payload The base64 encoded payload that has been encoded as a JSON. e.g how to encode such payload encodeURIComponent - * `encodeURIComponent(btoa(JSON.stringify({a: 2})))` - * - * @returns unknown job result - * @throws ApiError - */ -export const runWaitResultScriptByPathGet = (data: RunWaitResultScriptByPathGetData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/run_wait_result/p/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - parent_job: data.parentJob, - tag: data.tag, - cache_ttl: data.cacheTtl, - job_id: data.jobId, - include_header: data.includeHeader, - queue_limit: data.queueLimit, - payload: data.payload - } -}); }; - -/** - * run flow by path and wait until completion in openai format - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody script args - * @param data.includeHeader List of headers's keys (separated with ',') whove value are added to the args - * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key - * - * @param data.queueLimit The maximum size of the queue for which the request would get rejected if that job would push it above that limit - * - * @param data.jobId The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) - * @returns unknown job result - * @throws ApiError - */ -export const openaiSyncFlowByPath = (data: OpenaiSyncFlowByPathData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/openai_sync/f/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - include_header: data.includeHeader, - queue_limit: data.queueLimit, - job_id: data.jobId - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * run flow by path and wait until completion - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody script args - * @param data.includeHeader List of headers's keys (separated with ',') whove value are added to the args - * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key - * - * @param data.queueLimit The maximum size of the queue for which the request would get rejected if that job would push it above that limit - * - * @param data.jobId The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) - * @returns unknown job result - * @throws ApiError - */ -export const runWaitResultFlowByPath = (data: RunWaitResultFlowByPathData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/run_wait_result/f/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - include_header: data.includeHeader, - queue_limit: data.queueLimit, - job_id: data.jobId - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * get job result by id - * @param data The data for the request. - * @param data.workspace - * @param data.flowJobId - * @param data.nodeId - * @returns unknown job result - * @throws ApiError - */ -export const resultById = (data: ResultByIdData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/result_by_id/{flow_job_id}/{node_id}', - path: { - workspace: data.workspace, - flow_job_id: data.flowJobId, - node_id: data.nodeId - } -}); }; - -/** - * list all flow paths - * @param data The data for the request. - * @param data.workspace - * @returns string list of flow paths - * @throws ApiError - */ -export const listFlowPaths = (data: ListFlowPathsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/flows/list_paths', - path: { - workspace: data.workspace - } -}); }; - -/** - * list flows for search - * @param data The data for the request. - * @param data.workspace - * @returns unknown flow list - * @throws ApiError - */ -export const listSearchFlow = (data: ListSearchFlowData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/flows/list_search', - path: { - workspace: data.workspace - } -}); }; - -/** - * list all flows - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.orderDesc order by desc order (default true) - * @param data.createdBy mask to filter exact matching user creator - * @param data.pathStart mask to filter matching starting path - * @param data.pathExact mask to filter exact matching path - * @param data.showArchived (default false) - * show only the archived files. - * when multiple archived hash share the same path, only the ones with the latest create_at - * are displayed. - * - * @param data.starredOnly (default false) - * show only the starred items - * - * @param data.includeDraftOnly (default false) - * include items that have no deployed version - * - * @param data.withDeploymentMsg (default false) - * include deployment message - * - * @returns unknown All flow - * @throws ApiError - */ -export const listFlows = (data: ListFlowsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/flows/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - order_desc: data.orderDesc, - created_by: data.createdBy, - path_start: data.pathStart, - path_exact: data.pathExact, - show_archived: data.showArchived, - starred_only: data.starredOnly, - include_draft_only: data.includeDraftOnly, - with_deployment_msg: data.withDeploymentMsg - } -}); }; - -/** - * get flow history by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns FlowVersion Flow history - * @throws ApiError - */ -export const getFlowHistory = (data: GetFlowHistoryData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/flows/history/p/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get flow's latest version - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns FlowVersion Flow version - * @throws ApiError - */ -export const getFlowLatestVersion = (data: GetFlowLatestVersionData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/flows/get_latest_version/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * list flow paths from workspace runnable - * @param data The data for the request. - * @param data.workspace - * @param data.runnableKind - * @param data.path - * @returns string list of flow paths - * @throws ApiError - */ -export const listFlowPathsFromWorkspaceRunnable = (data: ListFlowPathsFromWorkspaceRunnableData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/flows/list_paths_from_workspace_runnable/{runnable_kind}/{path}', - path: { - workspace: data.workspace, - runnable_kind: data.runnableKind, - path: data.path - } -}); }; - -/** - * get flow version - * @param data The data for the request. - * @param data.workspace - * @param data.version - * @param data.path - * @returns Flow flow details - * @throws ApiError - */ -export const getFlowVersion = (data: GetFlowVersionData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/flows/get/v/{version}/p/{path}', - path: { - workspace: data.workspace, - version: data.version, - path: data.path - } -}); }; - -/** - * update flow history - * @param data The data for the request. - * @param data.workspace - * @param data.version - * @param data.path - * @param data.requestBody Flow deployment message - * @returns string success - * @throws ApiError - */ -export const updateFlowHistory = (data: UpdateFlowHistoryData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/flows/history_update/v/{version}/p/{path}', - path: { - workspace: data.workspace, - version: data.version, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * get flow by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.withStarredInfo - * @returns Flow flow details - * @throws ApiError - */ -export const getFlowByPath = (data: GetFlowByPathData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/flows/get/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - with_starred_info: data.withStarredInfo - } -}); }; - -/** - * get flow deployment status - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns unknown flow status - * @throws ApiError - */ -export const getFlowDeploymentStatus = (data: GetFlowDeploymentStatusData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/flows/deployment_status/p/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get triggers count of flow - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns TriggersCount triggers count - * @throws ApiError - */ -export const getTriggersCountOfFlow = (data: GetTriggersCountOfFlowData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/flows/get_triggers_count/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get tokens with flow scope - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns TruncatedToken tokens list - * @throws ApiError - */ -export const listTokensOfFlow = (data: ListTokensOfFlowData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/flows/list_tokens/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * Toggle ON and OFF the workspace error handler for a given flow - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody Workspace error handler enabled - * @returns string error handler toggled - * @throws ApiError - */ -export const toggleWorkspaceErrorHandlerForFlow = (data: ToggleWorkspaceErrorHandlerForFlowData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/flows/toggle_workspace_error_handler/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * get flow by path with draft - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns unknown flow details with draft - * @throws ApiError - */ -export const getFlowByPathWithDraft = (data: GetFlowByPathWithDraftData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/flows/get/draft/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * exists flow by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean flow details - * @throws ApiError - */ -export const existsFlowByPath = (data: ExistsFlowByPathData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/flows/exists/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * create flow - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody Partially filled flow - * @returns string flow created - * @throws ApiError - */ -export const createFlow = (data: CreateFlowData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/flows/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * update flow - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody Partially filled flow - * @returns string flow updated - * @throws ApiError - */ -export const updateFlow = (data: UpdateFlowData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/flows/update/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * archive flow by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody archiveFlow - * @returns string flow archived - * @throws ApiError - */ -export const archiveFlowByPath = (data: ArchiveFlowByPathData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/flows/archive/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * delete flow by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.keepCaptures keep captures - * @returns string flow delete - * @throws ApiError - */ -export const deleteFlowByPath = (data: DeleteFlowByPathData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/flows/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - keep_captures: data.keepCaptures - } -}); }; - -/** - * list all raw apps - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.orderDesc order by desc order (default true) - * @param data.createdBy mask to filter exact matching user creator - * @param data.pathStart mask to filter matching starting path - * @param data.pathExact mask to filter exact matching path - * @param data.starredOnly (default false) - * show only the starred items - * - * @returns ListableRawApp All raw apps - * @throws ApiError - */ -export const listRawApps = (data: ListRawAppsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/raw_apps/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - order_desc: data.orderDesc, - created_by: data.createdBy, - path_start: data.pathStart, - path_exact: data.pathExact, - starred_only: data.starredOnly - } -}); }; - -/** - * does an app exisst at path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean app exists - * @throws ApiError - */ -export const existsRawApp = (data: ExistsRawAppData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/raw_apps/exists/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get app by path - * @param data The data for the request. - * @param data.workspace - * @param data.version - * @param data.path - * @returns string app details - * @throws ApiError - */ -export const getRawAppData = (data: GetRawAppDataData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/apps/get_data/{version}/{path}', - path: { - workspace: data.workspace, - version: data.version, - path: data.path - } -}); }; - -/** - * list apps for search - * @param data The data for the request. - * @param data.workspace - * @returns unknown app list - * @throws ApiError - */ -export const listSearchApp = (data: ListSearchAppData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/apps/list_search', - path: { - workspace: data.workspace - } -}); }; - -/** - * list all apps - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.orderDesc order by desc order (default true) - * @param data.createdBy mask to filter exact matching user creator - * @param data.pathStart mask to filter matching starting path - * @param data.pathExact mask to filter exact matching path - * @param data.starredOnly (default false) - * show only the starred items - * - * @param data.includeDraftOnly (default false) - * include items that have no deployed version - * - * @param data.withDeploymentMsg (default false) - * include deployment message - * - * @returns ListableApp All apps - * @throws ApiError - */ -export const listApps = (data: ListAppsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/apps/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - order_desc: data.orderDesc, - created_by: data.createdBy, - path_start: data.pathStart, - path_exact: data.pathExact, - starred_only: data.starredOnly, - include_draft_only: data.includeDraftOnly, - with_deployment_msg: data.withDeploymentMsg - } -}); }; - -/** - * create app - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new app - * @returns string app created - * @throws ApiError - */ -export const createApp = (data: CreateAppData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/apps/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * does an app exisst at path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean app exists - * @throws ApiError - */ -export const existsApp = (data: ExistsAppData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/apps/exists/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get app by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.withStarredInfo - * @returns AppWithLastVersion app details - * @throws ApiError - */ -export const getAppByPath = (data: GetAppByPathData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/apps/get/p/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - with_starred_info: data.withStarredInfo - } -}); }; - -/** - * get app lite by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns AppWithLastVersion app lite details - * @throws ApiError - */ -export const getAppLiteByPath = (data: GetAppLiteByPathData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/apps/get/lite/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get app by path with draft - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns AppWithLastVersionWDraft app details with draft - * @throws ApiError - */ -export const getAppByPathWithDraft = (data: GetAppByPathWithDraftData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/apps/get/draft/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get app history by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns AppHistory app history - * @throws ApiError - */ -export const getAppHistoryByPath = (data: GetAppHistoryByPathData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/apps/history/p/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get apps's latest version - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns AppHistory App version - * @throws ApiError - */ -export const getAppLatestVersion = (data: GetAppLatestVersionData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/apps/get_latest_version/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * list app paths from workspace runnable - * @param data The data for the request. - * @param data.workspace - * @param data.runnableKind - * @param data.path - * @returns string list of app paths - * @throws ApiError - */ -export const listAppPathsFromWorkspaceRunnable = (data: ListAppPathsFromWorkspaceRunnableData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/apps/list_paths_from_workspace_runnable/{runnable_kind}/{path}', - path: { - workspace: data.workspace, - runnable_kind: data.runnableKind, - path: data.path - } -}); }; - -/** - * update app history - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.version - * @param data.requestBody App deployment message - * @returns string success - * @throws ApiError - */ -export const updateAppHistory = (data: UpdateAppHistoryData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/apps/history_update/a/{id}/v/{version}', - path: { - workspace: data.workspace, - id: data.id, - version: data.version - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * get public app by secret - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns AppWithLastVersion app details - * @throws ApiError - */ -export const getPublicAppBySecret = (data: GetPublicAppBySecretData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/apps_u/public_app/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get public resource - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns unknown resource value - * @throws ApiError - */ -export const getPublicResource = (data: GetPublicResourceData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/apps_u/public_resource/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get public secret of app - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string app secret - * @throws ApiError - */ -export const getPublicSecretOfApp = (data: GetPublicSecretOfAppData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/apps/secret_of/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get app by version - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @returns AppWithLastVersion app details - * @throws ApiError - */ -export const getAppByVersion = (data: GetAppByVersionData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/apps/get/v/{id}', - path: { - workspace: data.workspace, - id: data.id - } -}); }; - -/** - * create raw app - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new raw app - * @returns string raw app created - * @throws ApiError - */ -export const createRawApp = (data: CreateRawAppData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/raw_apps/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * update app - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updateraw app - * @returns string app updated - * @throws ApiError - */ -export const updateRawApp = (data: UpdateRawAppData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/raw_apps/update/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * delete raw app - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string app deleted - * @throws ApiError - */ -export const deleteRawApp = (data: DeleteRawAppData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/raw_apps/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * delete app - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string app deleted - * @throws ApiError - */ -export const deleteApp = (data: DeleteAppData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/apps/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * update app - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody update app - * @returns string app updated - * @throws ApiError - */ -export const updateApp = (data: UpdateAppData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/apps/update/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * check if custom path exists - * @param data The data for the request. - * @param data.workspace - * @param data.customPath - * @returns boolean custom path exists - * @throws ApiError - */ -export const customPathExists = (data: CustomPathExistsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/apps/custom_path_exists/{custom_path}', - path: { - workspace: data.workspace, - custom_path: data.customPath - } -}); }; - -/** - * executeComponent - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody update app - * @returns string job uuid - * @throws ApiError - */ -export const executeComponent = (data: ExecuteComponentData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/apps_u/execute_component/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * upload s3 file from app - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody File content - * @param data.fileKey - * @param data.fileExtension - * @param data.s3ResourcePath - * @param data.resourceType - * @param data.storage - * @param data.contentType - * @param data.contentDisposition - * @returns unknown file uploaded - * @throws ApiError - */ -export const uploadS3FileFromApp = (data: UploadS3FileFromAppData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/apps_u/upload_s3_file/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - file_key: data.fileKey, - file_extension: data.fileExtension, - s3_resource_path: data.s3ResourcePath, - resource_type: data.resourceType, - storage: data.storage, - content_type: data.contentType, - content_disposition: data.contentDisposition - }, - body: data.requestBody, - mediaType: 'application/octet-stream' -}); }; - -/** - * delete s3 file from app - * @param data The data for the request. - * @param data.workspace - * @param data.deleteToken - * @returns string file deleted - * @throws ApiError - */ -export const deleteS3FileFromApp = (data: DeleteS3FileFromAppData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/apps_u/delete_s3_file', - path: { - workspace: data.workspace - }, - query: { - delete_token: data.deleteToken - } -}); }; - -/** - * run flow by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody flow args - * @param data.scheduledFor when to schedule this job (leave empty for immediate run) - * @param data.scheduledInSecs schedule the script to execute in the number of seconds starting now - * @param data.skipPreprocessor skip the preprocessor - * @param data.parentJob The parent job that is at the origin and responsible for the execution of this script if any - * @param data.tag Override the tag to use - * @param data.jobId The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) - * @param data.includeHeader List of headers's keys (separated with ',') whove value are added to the args - * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key - * - * @param data.invisibleToOwner make the run invisible to the the flow owner (default false) - * @returns string job created - * @throws ApiError - */ -export const runFlowByPath = (data: RunFlowByPathData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/run/f/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - scheduled_for: data.scheduledFor, - scheduled_in_secs: data.scheduledInSecs, - skip_preprocessor: data.skipPreprocessor, - parent_job: data.parentJob, - tag: data.tag, - job_id: data.jobId, - include_header: data.includeHeader, - invisible_to_owner: data.invisibleToOwner - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * restart a completed flow at a given step - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.stepId step id to restart the flow from - * @param data.branchOrIterationN for branchall or loop, the iteration at which the flow should restart - * @param data.requestBody flow args - * @param data.scheduledFor when to schedule this job (leave empty for immediate run) - * @param data.scheduledInSecs schedule the script to execute in the number of seconds starting now - * @param data.parentJob The parent job that is at the origin and responsible for the execution of this script if any - * @param data.tag Override the tag to use - * @param data.jobId The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) - * @param data.includeHeader List of headers's keys (separated with ',') whove value are added to the args - * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key - * - * @param data.invisibleToOwner make the run invisible to the the flow owner (default false) - * @returns string job created - * @throws ApiError - */ -export const restartFlowAtStep = (data: RestartFlowAtStepData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/restart/f/{id}/from/{step_id}/{branch_or_iteration_n}', - path: { - workspace: data.workspace, - id: data.id, - step_id: data.stepId, - branch_or_iteration_n: data.branchOrIterationN - }, - query: { - scheduled_for: data.scheduledFor, - scheduled_in_secs: data.scheduledInSecs, - parent_job: data.parentJob, - tag: data.tag, - job_id: data.jobId, - include_header: data.includeHeader, - invisible_to_owner: data.invisibleToOwner - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * run script by hash - * @param data The data for the request. - * @param data.workspace - * @param data.hash - * @param data.requestBody Partially filled args - * @param data.scheduledFor when to schedule this job (leave empty for immediate run) - * @param data.scheduledInSecs schedule the script to execute in the number of seconds starting now - * @param data.skipPreprocessor skip the preprocessor - * @param data.parentJob The parent job that is at the origin and responsible for the execution of this script if any - * @param data.tag Override the tag to use - * @param data.cacheTtl Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl - * @param data.jobId The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) - * @param data.includeHeader List of headers's keys (separated with ',') whove value are added to the args - * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key - * - * @param data.invisibleToOwner make the run invisible to the the script owner (default false) - * @returns string job created - * @throws ApiError - */ -export const runScriptByHash = (data: RunScriptByHashData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/run/h/{hash}', - path: { - workspace: data.workspace, - hash: data.hash - }, - query: { - scheduled_for: data.scheduledFor, - scheduled_in_secs: data.scheduledInSecs, - skip_preprocessor: data.skipPreprocessor, - parent_job: data.parentJob, - tag: data.tag, - cache_ttl: data.cacheTtl, - job_id: data.jobId, - include_header: data.includeHeader, - invisible_to_owner: data.invisibleToOwner - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * run script preview - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody preview - * @param data.includeHeader List of headers's keys (separated with ',') whove value are added to the args - * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key - * - * @param data.invisibleToOwner make the run invisible to the the script owner (default false) - * @param data.jobId The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) - * @returns string job created - * @throws ApiError - */ -export const runScriptPreview = (data: RunScriptPreviewData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/run/preview', - path: { - workspace: data.workspace - }, - query: { - include_header: data.includeHeader, - invisible_to_owner: data.invisibleToOwner, - job_id: data.jobId - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * run code-workflow task - * @param data The data for the request. - * @param data.workspace - * @param data.jobId - * @param data.entrypoint - * @param data.requestBody preview - * @returns string job created - * @throws ApiError - */ -export const runCodeWorkflowTask = (data: RunCodeWorkflowTaskData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/workflow_as_code/{job_id}/{entrypoint}', - path: { - workspace: data.workspace, - job_id: data.jobId, - entrypoint: data.entrypoint - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * run a one-off dependencies job - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody raw script content - * @returns unknown dependency job result - * @throws ApiError - */ -export const runRawScriptDependencies = (data: RunRawScriptDependenciesData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/run/dependencies', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * run flow preview - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody preview - * @param data.includeHeader List of headers's keys (separated with ',') whove value are added to the args - * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key - * - * @param data.invisibleToOwner make the run invisible to the the script owner (default false) - * @param data.jobId The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) - * @returns string job created - * @throws ApiError - */ -export const runFlowPreview = (data: RunFlowPreviewData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/run/preview_flow', - path: { - workspace: data.workspace - }, - query: { - include_header: data.includeHeader, - invisible_to_owner: data.invisibleToOwner, - job_id: data.jobId - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * list all queued jobs - * @param data The data for the request. - * @param data.workspace - * @param data.orderDesc order by desc order (default true) - * @param data.createdBy mask to filter exact matching user creator - * @param data.parentJob The parent job that is at the origin and responsible for the execution of this script if any - * @param data.worker worker this job was ran on - * @param data.scriptPathExact mask to filter exact matching path - * @param data.scriptPathStart mask to filter matching starting path - * @param data.schedulePath mask to filter by schedule path - * @param data.scriptHash mask to filter exact matching path - * @param data.startedBefore filter on started before (inclusive) timestamp - * @param data.startedAfter filter on started after (exclusive) timestamp - * @param data.success filter on successful jobs - * @param data.scheduledForBeforeNow filter on jobs scheduled_for before now (hence waitinf for a worker) - * @param data.jobKinds filter on job kind (values 'preview', 'script', 'dependencies', 'flow') separated by, - * @param data.suspended filter on suspended jobs - * @param data.running filter on running jobs - * @param data.args filter on jobs containing those args as a json subset (@> in postgres) - * @param data.result filter on jobs containing those result as a json subset (@> in postgres) - * @param data.allowWildcards allow wildcards (*) in the filter of label, tag, worker - * @param data.tag filter on jobs with a given tag/worker group - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.allWorkspaces get jobs from all workspaces (only valid if request come from the `admins` workspace) - * @param data.isNotSchedule is not a scheduled job - * @returns QueuedJob All queued jobs - * @throws ApiError - */ -export const listQueue = (data: ListQueueData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/queue/list', - path: { - workspace: data.workspace - }, - query: { - order_desc: data.orderDesc, - created_by: data.createdBy, - parent_job: data.parentJob, - worker: data.worker, - script_path_exact: data.scriptPathExact, - script_path_start: data.scriptPathStart, - schedule_path: data.schedulePath, - script_hash: data.scriptHash, - started_before: data.startedBefore, - started_after: data.startedAfter, - success: data.success, - scheduled_for_before_now: data.scheduledForBeforeNow, - job_kinds: data.jobKinds, - suspended: data.suspended, - running: data.running, - args: data.args, - result: data.result, - allow_wildcards: data.allowWildcards, - tag: data.tag, - page: data.page, - per_page: data.perPage, - all_workspaces: data.allWorkspaces, - is_not_schedule: data.isNotSchedule - } -}); }; - -/** - * get queue count - * @param data The data for the request. - * @param data.workspace - * @param data.allWorkspaces get jobs from all workspaces (only valid if request come from the `admins` workspace) - * @returns unknown queue count - * @throws ApiError - */ -export const getQueueCount = (data: GetQueueCountData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/queue/count', - path: { - workspace: data.workspace - }, - query: { - all_workspaces: data.allWorkspaces - } -}); }; - -/** - * get completed count - * @param data The data for the request. - * @param data.workspace - * @returns unknown completed count - * @throws ApiError - */ -export const getCompletedCount = (data: GetCompletedCountData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/completed/count', - path: { - workspace: data.workspace - } -}); }; - -/** - * count number of completed jobs with filter - * @param data The data for the request. - * @param data.workspace - * @param data.completedAfterSAgo - * @param data.success - * @param data.tags - * @param data.allWorkspaces - * @returns number Count of completed jobs - * @throws ApiError - */ -export const countCompletedJobs = (data: CountCompletedJobsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/completed/count_jobs', - path: { - workspace: data.workspace - }, - query: { - completed_after_s_ago: data.completedAfterSAgo, - success: data.success, - tags: data.tags, - all_workspaces: data.allWorkspaces - } -}); }; - -/** - * get the ids of all jobs matching the given filters - * @param data The data for the request. - * @param data.workspace - * @param data.orderDesc order by desc order (default true) - * @param data.createdBy mask to filter exact matching user creator - * @param data.parentJob The parent job that is at the origin and responsible for the execution of this script if any - * @param data.scriptPathExact mask to filter exact matching path - * @param data.scriptPathStart mask to filter matching starting path - * @param data.schedulePath mask to filter by schedule path - * @param data.scriptHash mask to filter exact matching path - * @param data.startedBefore filter on started before (inclusive) timestamp - * @param data.startedAfter filter on started after (exclusive) timestamp - * @param data.success filter on successful jobs - * @param data.scheduledForBeforeNow filter on jobs scheduled_for before now (hence waitinf for a worker) - * @param data.jobKinds filter on job kind (values 'preview', 'script', 'dependencies', 'flow') separated by, - * @param data.suspended filter on suspended jobs - * @param data.running filter on running jobs - * @param data.args filter on jobs containing those args as a json subset (@> in postgres) - * @param data.result filter on jobs containing those result as a json subset (@> in postgres) - * @param data.allowWildcards allow wildcards (*) in the filter of label, tag, worker - * @param data.tag filter on jobs with a given tag/worker group - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.concurrencyKey - * @param data.allWorkspaces get jobs from all workspaces (only valid if request come from the `admins` workspace) - * @param data.isNotSchedule is not a scheduled job - * @returns string uuids of jobs - * @throws ApiError - */ -export const listFilteredUuids = (data: ListFilteredUuidsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/queue/list_filtered_uuids', - path: { - workspace: data.workspace - }, - query: { - order_desc: data.orderDesc, - created_by: data.createdBy, - parent_job: data.parentJob, - script_path_exact: data.scriptPathExact, - script_path_start: data.scriptPathStart, - schedule_path: data.schedulePath, - script_hash: data.scriptHash, - started_before: data.startedBefore, - started_after: data.startedAfter, - success: data.success, - scheduled_for_before_now: data.scheduledForBeforeNow, - job_kinds: data.jobKinds, - suspended: data.suspended, - running: data.running, - args: data.args, - result: data.result, - allow_wildcards: data.allowWildcards, - tag: data.tag, - page: data.page, - per_page: data.perPage, - concurrency_key: data.concurrencyKey, - all_workspaces: data.allWorkspaces, - is_not_schedule: data.isNotSchedule - } -}); }; - -/** - * cancel jobs based on the given uuids - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody uuids of the jobs to cancel - * @returns string uuids of canceled jobs - * @throws ApiError - */ -export const cancelSelection = (data: CancelSelectionData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/queue/cancel_selection', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * list all completed jobs - * @param data The data for the request. - * @param data.workspace - * @param data.orderDesc order by desc order (default true) - * @param data.createdBy mask to filter exact matching user creator - * @param data.label mask to filter exact matching job's label (job labels are completed jobs with as a result an object containing a string in the array at key 'wm_labels') - * @param data.worker worker this job was ran on - * @param data.parentJob The parent job that is at the origin and responsible for the execution of this script if any - * @param data.scriptPathExact mask to filter exact matching path - * @param data.scriptPathStart mask to filter matching starting path - * @param data.schedulePath mask to filter by schedule path - * @param data.scriptHash mask to filter exact matching path - * @param data.startedBefore filter on started before (inclusive) timestamp - * @param data.startedAfter filter on started after (exclusive) timestamp - * @param data.success filter on successful jobs - * @param data.jobKinds filter on job kind (values 'preview', 'script', 'dependencies', 'flow') separated by, - * @param data.args filter on jobs containing those args as a json subset (@> in postgres) - * @param data.result filter on jobs containing those result as a json subset (@> in postgres) - * @param data.allowWildcards allow wildcards (*) in the filter of label, tag, worker - * @param data.tag filter on jobs with a given tag/worker group - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.isSkipped is the job skipped - * @param data.isFlowStep is the job a flow step - * @param data.hasNullParent has null parent - * @param data.isNotSchedule is not a scheduled job - * @returns CompletedJob All completed jobs - * @throws ApiError - */ -export const listCompletedJobs = (data: ListCompletedJobsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/completed/list', - path: { - workspace: data.workspace - }, - query: { - order_desc: data.orderDesc, - created_by: data.createdBy, - label: data.label, - worker: data.worker, - parent_job: data.parentJob, - script_path_exact: data.scriptPathExact, - script_path_start: data.scriptPathStart, - schedule_path: data.schedulePath, - script_hash: data.scriptHash, - started_before: data.startedBefore, - started_after: data.startedAfter, - success: data.success, - job_kinds: data.jobKinds, - args: data.args, - result: data.result, - allow_wildcards: data.allowWildcards, - tag: data.tag, - page: data.page, - per_page: data.perPage, - is_skipped: data.isSkipped, - is_flow_step: data.isFlowStep, - has_null_parent: data.hasNullParent, - is_not_schedule: data.isNotSchedule - } -}); }; - -/** - * list all jobs - * @param data The data for the request. - * @param data.workspace - * @param data.createdBy mask to filter exact matching user creator - * @param data.label mask to filter exact matching job's label (job labels are completed jobs with as a result an object containing a string in the array at key 'wm_labels') - * @param data.worker worker this job was ran on - * @param data.parentJob The parent job that is at the origin and responsible for the execution of this script if any - * @param data.scriptPathExact mask to filter exact matching path - * @param data.scriptPathStart mask to filter matching starting path - * @param data.schedulePath mask to filter by schedule path - * @param data.scriptHash mask to filter exact matching path - * @param data.startedBefore filter on started before (inclusive) timestamp - * @param data.startedAfter filter on started after (exclusive) timestamp - * @param data.createdBefore filter on created before (inclusive) timestamp - * @param data.createdAfter filter on created after (exclusive) timestamp - * @param data.createdOrStartedBefore filter on created_at for non non started job and started_at otherwise before (inclusive) timestamp - * @param data.running filter on running jobs - * @param data.scheduledForBeforeNow filter on jobs scheduled_for before now (hence waitinf for a worker) - * @param data.createdOrStartedAfter filter on created_at for non non started job and started_at otherwise after (exclusive) timestamp - * @param data.createdOrStartedAfterCompletedJobs filter on created_at for non non started job and started_at otherwise after (exclusive) timestamp but only for the completed jobs - * @param data.jobKinds filter on job kind (values 'preview', 'script', 'dependencies', 'flow') separated by, - * @param data.suspended filter on suspended jobs - * @param data.args filter on jobs containing those args as a json subset (@> in postgres) - * @param data.tag filter on jobs with a given tag/worker group - * @param data.result filter on jobs containing those result as a json subset (@> in postgres) - * @param data.allowWildcards allow wildcards (*) in the filter of label, tag, worker - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.isSkipped is the job skipped - * @param data.isFlowStep is the job a flow step - * @param data.hasNullParent has null parent - * @param data.success filter on successful jobs - * @param data.allWorkspaces get jobs from all workspaces (only valid if request come from the `admins` workspace) - * @param data.isNotSchedule is not a scheduled job - * @returns Job All jobs - * @throws ApiError - */ -export const listJobs = (data: ListJobsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/list', - path: { - workspace: data.workspace - }, - query: { - created_by: data.createdBy, - label: data.label, - worker: data.worker, - parent_job: data.parentJob, - script_path_exact: data.scriptPathExact, - script_path_start: data.scriptPathStart, - schedule_path: data.schedulePath, - script_hash: data.scriptHash, - started_before: data.startedBefore, - started_after: data.startedAfter, - created_before: data.createdBefore, - created_after: data.createdAfter, - created_or_started_before: data.createdOrStartedBefore, - running: data.running, - scheduled_for_before_now: data.scheduledForBeforeNow, - created_or_started_after: data.createdOrStartedAfter, - created_or_started_after_completed_jobs: data.createdOrStartedAfterCompletedJobs, - job_kinds: data.jobKinds, - suspended: data.suspended, - args: data.args, - tag: data.tag, - result: data.result, - allow_wildcards: data.allowWildcards, - page: data.page, - per_page: data.perPage, - is_skipped: data.isSkipped, - is_flow_step: data.isFlowStep, - has_null_parent: data.hasNullParent, - success: data.success, - all_workspaces: data.allWorkspaces, - is_not_schedule: data.isNotSchedule - } -}); }; - -/** - * get db clock - * @returns number the timestamp of the db that can be used to compute the drift - * @throws ApiError - */ -export const getDbClock = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/jobs/db_clock' -}); }; - -/** - * Count jobs by tag - * @param data The data for the request. - * @param data.horizonSecs Past Time horizon in seconds (when to start the count = now - horizon) (default is 3600) - * @param data.workspaceId Specific workspace ID to filter results (optional) - * @returns unknown Job counts by tag - * @throws ApiError - */ -export const countJobsByTag = (data: CountJobsByTagData = {}): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/jobs/completed/count_by_tag', - query: { - horizon_secs: data.horizonSecs, - workspace_id: data.workspaceId - } -}); }; - -/** - * get job - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.noLogs - * @returns Job job details - * @throws ApiError - */ -export const getJob = (data: GetJobData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs_u/get/{id}', - path: { - workspace: data.workspace, - id: data.id - }, - query: { - no_logs: data.noLogs - } -}); }; - -/** - * get root job id - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @returns string get root job id - * @throws ApiError - */ -export const getRootJobId = (data: GetRootJobIdData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs_u/get_root_job_id/{id}', - path: { - workspace: data.workspace, - id: data.id - } -}); }; - -/** - * get job logs - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @returns string job details - * @throws ApiError - */ -export const getJobLogs = (data: GetJobLogsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs_u/get_logs/{id}', - path: { - workspace: data.workspace, - id: data.id - } -}); }; - -/** - * get job args - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @returns unknown job args - * @throws ApiError - */ -export const getJobArgs = (data: GetJobArgsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs_u/get_args/{id}', - path: { - workspace: data.workspace, - id: data.id - } -}); }; - -/** - * get job updates - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.running - * @param data.logOffset - * @param data.getProgress - * @returns unknown job details - * @throws ApiError - */ -export const getJobUpdates = (data: GetJobUpdatesData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs_u/getupdate/{id}', - path: { - workspace: data.workspace, - id: data.id - }, - query: { - running: data.running, - log_offset: data.logOffset, - get_progress: data.getProgress - } -}); }; - -/** - * get log file from object store - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns unknown job log - * @throws ApiError - */ -export const getLogFileFromStore = (data: GetLogFileFromStoreData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs_u/get_log_file/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get flow debug info - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @returns unknown flow debug info details - * @throws ApiError - */ -export const getFlowDebugInfo = (data: GetFlowDebugInfoData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs_u/get_flow_debug_info/{id}', - path: { - workspace: data.workspace, - id: data.id - } -}); }; - -/** - * get completed job - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @returns CompletedJob job details - * @throws ApiError - */ -export const getCompletedJob = (data: GetCompletedJobData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs_u/completed/get/{id}', - path: { - workspace: data.workspace, - id: data.id - } -}); }; - -/** - * get completed job result - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.suspendedJob - * @param data.resumeId - * @param data.secret - * @param data.approver - * @returns unknown result - * @throws ApiError - */ -export const getCompletedJobResult = (data: GetCompletedJobResultData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs_u/completed/get_result/{id}', - path: { - workspace: data.workspace, - id: data.id - }, - query: { - suspended_job: data.suspendedJob, - resume_id: data.resumeId, - secret: data.secret, - approver: data.approver - } -}); }; - -/** - * get completed job result if job is completed - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.getStarted - * @returns unknown result - * @throws ApiError - */ -export const getCompletedJobResultMaybe = (data: GetCompletedJobResultMaybeData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs_u/completed/get_result_maybe/{id}', - path: { - workspace: data.workspace, - id: data.id - }, - query: { - get_started: data.getStarted - } -}); }; - -/** - * delete completed job (erase content but keep run id) - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @returns CompletedJob job details - * @throws ApiError - */ -export const deleteCompletedJob = (data: DeleteCompletedJobData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/completed/delete/{id}', - path: { - workspace: data.workspace, - id: data.id - } -}); }; - -/** - * cancel queued or running job - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.requestBody reason - * @returns string job canceled - * @throws ApiError - */ -export const cancelQueuedJob = (data: CancelQueuedJobData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs_u/queue/cancel/{id}', - path: { - workspace: data.workspace, - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * cancel all queued jobs for persistent script - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody reason - * @returns string persistent job scaled down to zero - * @throws ApiError - */ -export const cancelPersistentQueuedJobs = (data: CancelPersistentQueuedJobsData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs_u/queue/cancel_persistent/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * force cancel queued job - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.requestBody reason - * @returns string job canceled - * @throws ApiError - */ -export const forceCancelQueuedJob = (data: ForceCancelQueuedJobData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs_u/queue/force_cancel/{id}', - path: { - workspace: data.workspace, - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * create an HMac signature given a job id and a resume id - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.resumeId - * @param data.approver - * @returns string job signature - * @throws ApiError - */ -export const createJobSignature = (data: CreateJobSignatureData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/job_signature/{id}/{resume_id}', - path: { - workspace: data.workspace, - id: data.id, - resume_id: data.resumeId - }, - query: { - approver: data.approver - } -}); }; - -/** - * get resume urls given a job_id, resume_id and a nonce to resume a flow - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.resumeId - * @param data.approver - * @returns unknown url endpoints - * @throws ApiError - */ -export const getResumeUrls = (data: GetResumeUrlsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/resume_urls/{id}/{resume_id}', - path: { - workspace: data.workspace, - id: data.id, - resume_id: data.resumeId - }, - query: { - approver: data.approver - } -}); }; - -/** - * generate interactive slack approval for suspended job - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.slackResourcePath - * @param data.channelId - * @param data.flowStepId - * @param data.approver - * @param data.message - * @param data.defaultArgsJson - * @param data.dynamicEnumsJson - * @returns unknown Interactive slack approval message sent successfully - * @throws ApiError - */ -export const getSlackApprovalPayload = (data: GetSlackApprovalPayloadData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/slack_approval/{id}', - path: { - workspace: data.workspace, - id: data.id - }, - query: { - approver: data.approver, - message: data.message, - slack_resource_path: data.slackResourcePath, - channel_id: data.channelId, - flow_step_id: data.flowStepId, - default_args_json: data.defaultArgsJson, - dynamic_enums_json: data.dynamicEnumsJson - } -}); }; - -/** - * resume a job for a suspended flow - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.resumeId - * @param data.signature - * @param data.payload The base64 encoded payload that has been encoded as a JSON. e.g how to encode such payload encodeURIComponent - * `encodeURIComponent(btoa(JSON.stringify({a: 2})))` - * - * @param data.approver - * @returns string job resumed - * @throws ApiError - */ -export const resumeSuspendedJobGet = (data: ResumeSuspendedJobGetData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs_u/resume/{id}/{resume_id}/{signature}', - path: { - workspace: data.workspace, - id: data.id, - resume_id: data.resumeId, - signature: data.signature - }, - query: { - payload: data.payload, - approver: data.approver - } -}); }; - -/** - * resume a job for a suspended flow - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.resumeId - * @param data.signature - * @param data.requestBody - * @param data.approver - * @returns string job resumed - * @throws ApiError - */ -export const resumeSuspendedJobPost = (data: ResumeSuspendedJobPostData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs_u/resume/{id}/{resume_id}/{signature}', - path: { - workspace: data.workspace, - id: data.id, - resume_id: data.resumeId, - signature: data.signature - }, - query: { - approver: data.approver - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * set flow user state at a given key - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.key - * @param data.requestBody new value - * @returns string flow user state updated - * @throws ApiError - */ -export const setFlowUserState = (data: SetFlowUserStateData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/flow/user_states/{id}/{key}', - path: { - workspace: data.workspace, - id: data.id, - key: data.key - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * get flow user state at a given key - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.key - * @returns unknown flow user state updated - * @throws ApiError - */ -export const getFlowUserState = (data: GetFlowUserStateData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/flow/user_states/{id}/{key}', - path: { - workspace: data.workspace, - id: data.id, - key: data.key - } -}); }; - -/** - * resume a job for a suspended flow as an owner - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.requestBody - * @returns string job resumed - * @throws ApiError - */ -export const resumeSuspendedFlowAsOwner = (data: ResumeSuspendedFlowAsOwnerData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/flow/resume/{id}', - path: { - workspace: data.workspace, - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * cancel a job for a suspended flow - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.resumeId - * @param data.signature - * @param data.approver - * @returns string job canceled - * @throws ApiError - */ -export const cancelSuspendedJobGet = (data: CancelSuspendedJobGetData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs_u/cancel/{id}/{resume_id}/{signature}', - path: { - workspace: data.workspace, - id: data.id, - resume_id: data.resumeId, - signature: data.signature - }, - query: { - approver: data.approver - } -}); }; - -/** - * cancel a job for a suspended flow - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.resumeId - * @param data.signature - * @param data.requestBody - * @param data.approver - * @returns string job canceled - * @throws ApiError - */ -export const cancelSuspendedJobPost = (data: CancelSuspendedJobPostData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs_u/cancel/{id}/{resume_id}/{signature}', - path: { - workspace: data.workspace, - id: data.id, - resume_id: data.resumeId, - signature: data.signature - }, - query: { - approver: data.approver - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * get parent flow job of suspended job - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.resumeId - * @param data.signature - * @param data.approver - * @returns unknown parent flow details - * @throws ApiError - */ -export const getSuspendedJobFlow = (data: GetSuspendedJobFlowData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs_u/get_flow/{id}/{resume_id}/{signature}', - path: { - workspace: data.workspace, - id: data.id, - resume_id: data.resumeId, - signature: data.signature - }, - query: { - approver: data.approver - } -}); }; - -/** - * preview schedule - * @param data The data for the request. - * @param data.requestBody schedule - * @returns string List of 5 estimated upcoming execution events (in UTC) - * @throws ApiError - */ -export const previewSchedule = (data: PreviewScheduleData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/schedules/preview', - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * create schedule - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new schedule - * @returns string schedule created - * @throws ApiError - */ -export const createSchedule = (data: CreateScheduleData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/schedules/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * update schedule - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated schedule - * @returns string schedule updated - * @throws ApiError - */ -export const updateSchedule = (data: UpdateScheduleData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/schedules/update/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * set enabled schedule - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated schedule enable - * @returns string schedule enabled set - * @throws ApiError - */ -export const setScheduleEnabled = (data: SetScheduleEnabledData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/schedules/setenabled/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * delete schedule - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string schedule deleted - * @throws ApiError - */ -export const deleteSchedule = (data: DeleteScheduleData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/schedules/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get schedule - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns Schedule schedule deleted - * @throws ApiError - */ -export const getSchedule = (data: GetScheduleData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/schedules/get/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * does schedule exists - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean schedule exists - * @throws ApiError - */ -export const existsSchedule = (data: ExistsScheduleData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/schedules/exists/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * list schedules - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.args filter on jobs containing those args as a json subset (@> in postgres) - * @param data.path filter by path - * @param data.isFlow - * @param data.pathStart - * @returns Schedule schedule list - * @throws ApiError - */ -export const listSchedules = (data: ListSchedulesData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/schedules/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - args: data.args, - path: data.path, - is_flow: data.isFlow, - path_start: data.pathStart - } -}); }; - -/** - * list schedules with last 20 jobs - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @returns ScheduleWJobs schedule list - * @throws ApiError - */ -export const listSchedulesWithJobs = (data: ListSchedulesWithJobsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/schedules/list_with_jobs', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage - } -}); }; - -/** - * Set default error or recoevery handler - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody Handler description - * @returns unknown default error handler set - * @throws ApiError - */ -export const setDefaultErrorOrRecoveryHandler = (data: SetDefaultErrorOrRecoveryHandlerData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/schedules/setdefaulthandler', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * create http trigger - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new http trigger - * @returns string http trigger created - * @throws ApiError - */ -export const createHttpTrigger = (data: CreateHttpTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/http_triggers/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * update http trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated trigger - * @returns string http trigger updated - * @throws ApiError - */ -export const updateHttpTrigger = (data: UpdateHttpTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/http_triggers/update/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * delete http trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string http trigger deleted - * @throws ApiError - */ -export const deleteHttpTrigger = (data: DeleteHttpTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/http_triggers/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get http trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns HttpTrigger http trigger deleted - * @throws ApiError - */ -export const getHttpTrigger = (data: GetHttpTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/http_triggers/get/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * list http triggers - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.path filter by path - * @param data.isFlow - * @param data.pathStart - * @returns HttpTrigger http trigger list - * @throws ApiError - */ -export const listHttpTriggers = (data: ListHttpTriggersData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/http_triggers/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - path: data.path, - is_flow: data.isFlow, - path_start: data.pathStart - } -}); }; - -/** - * does http trigger exists - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean http trigger exists - * @throws ApiError - */ -export const existsHttpTrigger = (data: ExistsHttpTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/http_triggers/exists/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * does route exists - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody route exists request - * @returns boolean route exists - * @throws ApiError - */ -export const existsRoute = (data: ExistsRouteData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/http_triggers/route_exists', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * create websocket trigger - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new websocket trigger - * @returns string websocket trigger created - * @throws ApiError - */ -export const createWebsocketTrigger = (data: CreateWebsocketTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/websocket_triggers/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * update websocket trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated trigger - * @returns string websocket trigger updated - * @throws ApiError - */ -export const updateWebsocketTrigger = (data: UpdateWebsocketTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/websocket_triggers/update/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * delete websocket trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string websocket trigger deleted - * @throws ApiError - */ -export const deleteWebsocketTrigger = (data: DeleteWebsocketTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/websocket_triggers/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get websocket trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns WebsocketTrigger websocket trigger deleted - * @throws ApiError - */ -export const getWebsocketTrigger = (data: GetWebsocketTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/websocket_triggers/get/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * list websocket triggers - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.path filter by path - * @param data.isFlow - * @param data.pathStart - * @returns WebsocketTrigger websocket trigger list - * @throws ApiError - */ -export const listWebsocketTriggers = (data: ListWebsocketTriggersData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/websocket_triggers/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - path: data.path, - is_flow: data.isFlow, - path_start: data.pathStart - } -}); }; - -/** - * does websocket trigger exists - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean websocket trigger exists - * @throws ApiError - */ -export const existsWebsocketTrigger = (data: ExistsWebsocketTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/websocket_triggers/exists/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * set enabled websocket trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated websocket trigger enable - * @returns string websocket trigger enabled set - * @throws ApiError - */ -export const setWebsocketTriggerEnabled = (data: SetWebsocketTriggerEnabledData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/websocket_triggers/setenabled/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * test websocket connection - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody test websocket connection - * @returns string successfuly connected to websocket - * @throws ApiError - */ -export const testWebsocketConnection = (data: TestWebsocketConnectionData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/websocket_triggers/test', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * create kafka trigger - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new kafka trigger - * @returns string kafka trigger created - * @throws ApiError - */ -export const createKafkaTrigger = (data: CreateKafkaTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/kafka_triggers/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * update kafka trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated trigger - * @returns string kafka trigger updated - * @throws ApiError - */ -export const updateKafkaTrigger = (data: UpdateKafkaTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/kafka_triggers/update/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * delete kafka trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string kafka trigger deleted - * @throws ApiError - */ -export const deleteKafkaTrigger = (data: DeleteKafkaTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/kafka_triggers/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get kafka trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns KafkaTrigger kafka trigger deleted - * @throws ApiError - */ -export const getKafkaTrigger = (data: GetKafkaTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/kafka_triggers/get/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * list kafka triggers - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.path filter by path - * @param data.isFlow - * @param data.pathStart - * @returns KafkaTrigger kafka trigger list - * @throws ApiError - */ -export const listKafkaTriggers = (data: ListKafkaTriggersData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/kafka_triggers/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - path: data.path, - is_flow: data.isFlow, - path_start: data.pathStart - } -}); }; - -/** - * does kafka trigger exists - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean kafka trigger exists - * @throws ApiError - */ -export const existsKafkaTrigger = (data: ExistsKafkaTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/kafka_triggers/exists/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * set enabled kafka trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated kafka trigger enable - * @returns string kafka trigger enabled set - * @throws ApiError - */ -export const setKafkaTriggerEnabled = (data: SetKafkaTriggerEnabledData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/kafka_triggers/setenabled/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * test kafka connection - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody test kafka connection - * @returns string successfuly connected to kafka brokers - * @throws ApiError - */ -export const testKafkaConnection = (data: TestKafkaConnectionData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/kafka_triggers/test', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * create nats trigger - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new nats trigger - * @returns string nats trigger created - * @throws ApiError - */ -export const createNatsTrigger = (data: CreateNatsTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/nats_triggers/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * update nats trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated trigger - * @returns string nats trigger updated - * @throws ApiError - */ -export const updateNatsTrigger = (data: UpdateNatsTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/nats_triggers/update/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * delete nats trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string nats trigger deleted - * @throws ApiError - */ -export const deleteNatsTrigger = (data: DeleteNatsTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/nats_triggers/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get nats trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns NatsTrigger nats trigger deleted - * @throws ApiError - */ -export const getNatsTrigger = (data: GetNatsTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/nats_triggers/get/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * list nats triggers - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.path filter by path - * @param data.isFlow - * @param data.pathStart - * @returns NatsTrigger nats trigger list - * @throws ApiError - */ -export const listNatsTriggers = (data: ListNatsTriggersData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/nats_triggers/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - path: data.path, - is_flow: data.isFlow, - path_start: data.pathStart - } -}); }; - -/** - * does nats trigger exists - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean nats trigger exists - * @throws ApiError - */ -export const existsNatsTrigger = (data: ExistsNatsTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/nats_triggers/exists/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * set enabled nats trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated nats trigger enable - * @returns string nats trigger enabled set - * @throws ApiError - */ -export const setNatsTriggerEnabled = (data: SetNatsTriggerEnabledData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/nats_triggers/setenabled/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * test NATS connection - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody test nats connection - * @returns string successfuly connected to NATS servers - * @throws ApiError - */ -export const testNatsConnection = (data: TestNatsConnectionData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/nats_triggers/test', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * create sqs trigger - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new sqs trigger - * @returns string sqs trigger created - * @throws ApiError - */ -export const createSqsTrigger = (data: CreateSqsTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/sqs_triggers/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * update sqs trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated trigger - * @returns string sqs trigger updated - * @throws ApiError - */ -export const updateSqsTrigger = (data: UpdateSqsTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/sqs_triggers/update/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * delete sqs trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string sqs trigger deleted - * @throws ApiError - */ -export const deleteSqsTrigger = (data: DeleteSqsTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/sqs_triggers/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get sqs trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns SqsTrigger sqs trigger deleted - * @throws ApiError - */ -export const getSqsTrigger = (data: GetSqsTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/sqs_triggers/get/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * list sqs triggers - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.path filter by path - * @param data.isFlow - * @param data.pathStart - * @returns SqsTrigger sqs trigger list - * @throws ApiError - */ -export const listSqsTriggers = (data: ListSqsTriggersData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/sqs_triggers/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - path: data.path, - is_flow: data.isFlow, - path_start: data.pathStart - } -}); }; - -/** - * does sqs trigger exists - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean sqs trigger exists - * @throws ApiError - */ -export const existsSqsTrigger = (data: ExistsSqsTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/sqs_triggers/exists/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * set enabled sqs trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated sqs trigger enable - * @returns string sqs trigger enabled set - * @throws ApiError - */ -export const setSqsTriggerEnabled = (data: SetSqsTriggerEnabledData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/sqs_triggers/setenabled/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * test sqs connection - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody test sqs connection - * @returns string successfuly connected to sqs - * @throws ApiError - */ -export const testSqsConnection = (data: TestSqsConnectionData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/sqs_triggers/test', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * create mqtt trigger - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new mqtt trigger - * @returns string mqtt trigger created - * @throws ApiError - */ -export const createMqttTrigger = (data: CreateMqttTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/mqtt_triggers/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * update mqtt trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated trigger - * @returns string mqtt trigger updated - * @throws ApiError - */ -export const updateMqttTrigger = (data: UpdateMqttTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/mqtt_triggers/update/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * delete mqtt trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string mqtt trigger deleted - * @throws ApiError - */ -export const deleteMqttTrigger = (data: DeleteMqttTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/mqtt_triggers/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get mqtt trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns MqttTrigger mqtt trigger deleted - * @throws ApiError - */ -export const getMqttTrigger = (data: GetMqttTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/mqtt_triggers/get/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * list mqtt triggers - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.path filter by path - * @param data.isFlow - * @param data.pathStart - * @returns MqttTrigger mqtt trigger list - * @throws ApiError - */ -export const listMqttTriggers = (data: ListMqttTriggersData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/mqtt_triggers/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - path: data.path, - is_flow: data.isFlow, - path_start: data.pathStart - } -}); }; - -/** - * does mqtt trigger exists - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean mqtt trigger exists - * @throws ApiError - */ -export const existsMqttTrigger = (data: ExistsMqttTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/mqtt_triggers/exists/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * set enabled mqtt trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated mqtt trigger enable - * @returns string mqtt trigger enabled set - * @throws ApiError - */ -export const setMqttTriggerEnabled = (data: SetMqttTriggerEnabledData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/mqtt_triggers/setenabled/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * test mqtt connection - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody test mqtt connection - * @returns string successfully connected to mqtt - * @throws ApiError - */ -export const testMqttConnection = (data: TestMqttConnectionData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/mqtt_triggers/test', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * create gcp trigger - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new gcp trigger - * @returns string gcp trigger created - * @throws ApiError - */ -export const createGcpTrigger = (data: CreateGcpTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/gcp_triggers/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * update gcp trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated trigger - * @returns string gcp trigger updated - * @throws ApiError - */ -export const updateGcpTrigger = (data: UpdateGcpTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/gcp_triggers/update/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * delete gcp trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string gcp trigger deleted - * @throws ApiError - */ -export const deleteGcpTrigger = (data: DeleteGcpTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/gcp_triggers/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get gcp trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns GcpTrigger gcp trigger deleted - * @throws ApiError - */ -export const getGcpTrigger = (data: GetGcpTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/gcp_triggers/get/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * list gcp triggers - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.path filter by path - * @param data.isFlow - * @param data.pathStart - * @returns GcpTrigger gcp trigger list - * @throws ApiError - */ -export const listGcpTriggers = (data: ListGcpTriggersData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/gcp_triggers/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - path: data.path, - is_flow: data.isFlow, - path_start: data.pathStart - } -}); }; - -/** - * does gcp trigger exists - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean gcp trigger exists - * @throws ApiError - */ -export const existsGcpTrigger = (data: ExistsGcpTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/gcp_triggers/exists/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * set enabled gcp trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated gcp trigger enable - * @returns string gcp trigger enabled set - * @throws ApiError - */ -export const setGcpTriggerEnabled = (data: SetGcpTriggerEnabledData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/gcp_triggers/setenabled/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * test gcp connection - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody test gcp connection - * @returns string try to connect to a gcp broker - * @throws ApiError - */ -export const testGcpConnection = (data: TestGcpConnectionData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/gcp_triggers/test', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * delete gcp trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody args to delete subscription from google cloud - * @returns string gcp trigger deleted - * @throws ApiError - */ -export const deleteGcpSubscription = (data: DeleteGcpSubscriptionData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/gcp_triggers/subscriptions/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * list all topics of google cloud service - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string get all google topics - * @throws ApiError - */ -export const listGoogleTopics = (data: ListGoogleTopicsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/gcp_triggers/topics/list/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * list all subscription of a give topic from google cloud service - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody args to get subscription's topic from google cloud - * @returns string get all google topic subscriptions name - * @throws ApiError - */ -export const listAllTgoogleTopicSubscriptions = (data: ListAllTgoogleTopicSubscriptionsData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/gcp_triggers/subscriptions/list/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * check if postgres configuration is set to logical - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean boolean that indicates if postgres is set to logical level or not - * @throws ApiError - */ -export const isValidPostgresConfiguration = (data: IsValidPostgresConfigurationData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/postgres_triggers/is_valid_postgres_configuration/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * create template script - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody template script - * @returns string custom id to retrieve template script - * @throws ApiError - */ -export const createTemplateScript = (data: CreateTemplateScriptData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/postgres_triggers/create_template_script', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * get template script - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @returns string template script - * @throws ApiError - */ -export const getTemplateScript = (data: GetTemplateScriptData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/postgres_triggers/get_template_script/{id}', - path: { - workspace: data.workspace, - id: data.id - } -}); }; - -/** - * list postgres replication slot - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns SlotList list postgres slot - * @throws ApiError - */ -export const listPostgresReplicationSlot = (data: ListPostgresReplicationSlotData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/postgres_triggers/slot/list/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * create replication slot for postgres - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody new slot for postgres - * @returns string slot created - * @throws ApiError - */ -export const createPostgresReplicationSlot = (data: CreatePostgresReplicationSlotData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/postgres_triggers/slot/create/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * delete postgres replication slot - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody replication slot of postgres - * @returns string postgres replication slot deleted - * @throws ApiError - */ -export const deletePostgresReplicationSlot = (data: DeletePostgresReplicationSlotData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/postgres_triggers/slot/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * list postgres publication - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string database publication list - * @throws ApiError - */ -export const listPostgresPublication = (data: ListPostgresPublicationData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/postgres_triggers/publication/list/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get postgres publication - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.publication - * @returns PublicationData postgres publication get - * @throws ApiError - */ -export const getPostgresPublication = (data: GetPostgresPublicationData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/postgres_triggers/publication/get/{publication}/{path}', - path: { - workspace: data.workspace, - path: data.path, - publication: data.publication - } -}); }; - -/** - * create publication for postgres - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.publication - * @param data.requestBody new publication for postgres - * @returns string publication created - * @throws ApiError - */ -export const createPostgresPublication = (data: CreatePostgresPublicationData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/postgres_triggers/publication/create/{publication}/{path}', - path: { - workspace: data.workspace, - path: data.path, - publication: data.publication - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * update publication for postgres - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.publication - * @param data.requestBody update publication for postgres - * @returns string publication updated - * @throws ApiError - */ -export const updatePostgresPublication = (data: UpdatePostgresPublicationData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/postgres_triggers/publication/update/{publication}/{path}', - path: { - workspace: data.workspace, - path: data.path, - publication: data.publication - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * delete postgres publication - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.publication - * @returns string postgres publication deleted - * @throws ApiError - */ -export const deletePostgresPublication = (data: DeletePostgresPublicationData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/postgres_triggers/publication/delete/{publication}/{path}', - path: { - workspace: data.workspace, - path: data.path, - publication: data.publication - } -}); }; - -/** - * create postgres trigger - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new postgres trigger - * @returns string postgres trigger created - * @throws ApiError - */ -export const createPostgresTrigger = (data: CreatePostgresTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/postgres_triggers/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * update postgres trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated trigger - * @returns string postgres trigger updated - * @throws ApiError - */ -export const updatePostgresTrigger = (data: UpdatePostgresTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/postgres_triggers/update/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * delete postgres trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string postgres trigger deleted - * @throws ApiError - */ -export const deletePostgresTrigger = (data: DeletePostgresTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/postgres_triggers/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get postgres trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns PostgresTrigger get postgres trigger - * @throws ApiError - */ -export const getPostgresTrigger = (data: GetPostgresTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/postgres_triggers/get/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * list postgres triggers - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.path filter by path - * @param data.isFlow - * @param data.pathStart - * @returns PostgresTrigger postgres trigger list - * @throws ApiError - */ -export const listPostgresTriggers = (data: ListPostgresTriggersData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/postgres_triggers/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - path: data.path, - is_flow: data.isFlow, - path_start: data.pathStart - } -}); }; - -/** - * does postgres trigger exists - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean postgres trigger exists - * @throws ApiError - */ -export const existsPostgresTrigger = (data: ExistsPostgresTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/postgres_triggers/exists/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * set enabled postgres trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated postgres trigger enable - * @returns string postgres trigger enabled set - * @throws ApiError - */ -export const setPostgresTriggerEnabled = (data: SetPostgresTriggerEnabledData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/postgres_triggers/setenabled/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * test postgres connection - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody test postgres connection - * @returns string successfuly connected to postgres - * @throws ApiError - */ -export const testPostgresConnection = (data: TestPostgresConnectionData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/postgres_triggers/test', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * list instance groups - * @returns InstanceGroup instance group list - * @throws ApiError - */ -export const listInstanceGroups = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/groups/list' -}); }; - -/** - * get instance group - * @param data The data for the request. - * @param data.name - * @returns InstanceGroup instance group - * @throws ApiError - */ -export const getInstanceGroup = (data: GetInstanceGroupData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/groups/get/{name}', - path: { - name: data.name - } -}); }; - -/** - * create instance group - * @param data The data for the request. - * @param data.requestBody create instance group - * @returns string instance group created - * @throws ApiError - */ -export const createInstanceGroup = (data: CreateInstanceGroupData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/groups/create', - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * update instance group - * @param data The data for the request. - * @param data.name - * @param data.requestBody update instance group - * @returns string instance group updated - * @throws ApiError - */ -export const updateInstanceGroup = (data: UpdateInstanceGroupData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/groups/update/{name}', - path: { - name: data.name - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * delete instance group - * @param data The data for the request. - * @param data.name - * @returns string instance group deleted - * @throws ApiError - */ -export const deleteInstanceGroup = (data: DeleteInstanceGroupData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/groups/delete/{name}', - path: { - name: data.name - } -}); }; - -/** - * add user to instance group - * @param data The data for the request. - * @param data.name - * @param data.requestBody user to add to instance group - * @returns string user added to instance group - * @throws ApiError - */ -export const addUserToInstanceGroup = (data: AddUserToInstanceGroupData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/groups/adduser/{name}', - path: { - name: data.name - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * remove user from instance group - * @param data The data for the request. - * @param data.name - * @param data.requestBody user to remove from instance group - * @returns string user removed from instance group - * @throws ApiError - */ -export const removeUserFromInstanceGroup = (data: RemoveUserFromInstanceGroupData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/groups/removeuser/{name}', - path: { - name: data.name - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * export instance groups - * @returns ExportedInstanceGroup exported instance groups - * @throws ApiError - */ -export const exportInstanceGroups = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/groups/export' -}); }; - -/** - * overwrite instance groups - * @param data The data for the request. - * @param data.requestBody overwrite instance groups - * @returns string success message - * @throws ApiError - */ -export const overwriteInstanceGroups = (data: OverwriteInstanceGroupsData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/groups/overwrite', - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * list groups - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @returns Group group list - * @throws ApiError - */ -export const listGroups = (data: ListGroupsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/groups/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage - } -}); }; - -/** - * list group names - * @param data The data for the request. - * @param data.workspace - * @param data.onlyMemberOf only list the groups the user is member of (default false) - * @returns string group list - * @throws ApiError - */ -export const listGroupNames = (data: ListGroupNamesData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/groups/listnames', - path: { - workspace: data.workspace - }, - query: { - only_member_of: data.onlyMemberOf - } -}); }; - -/** - * create group - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody create group - * @returns string group created - * @throws ApiError - */ -export const createGroup = (data: CreateGroupData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/groups/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * update group - * @param data The data for the request. - * @param data.workspace - * @param data.name - * @param data.requestBody updated group - * @returns string group updated - * @throws ApiError - */ -export const updateGroup = (data: UpdateGroupData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/groups/update/{name}', - path: { - workspace: data.workspace, - name: data.name - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * delete group - * @param data The data for the request. - * @param data.workspace - * @param data.name - * @returns string group deleted - * @throws ApiError - */ -export const deleteGroup = (data: DeleteGroupData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/groups/delete/{name}', - path: { - workspace: data.workspace, - name: data.name - } -}); }; - -/** - * get group - * @param data The data for the request. - * @param data.workspace - * @param data.name - * @returns Group group - * @throws ApiError - */ -export const getGroup = (data: GetGroupData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/groups/get/{name}', - path: { - workspace: data.workspace, - name: data.name - } -}); }; - -/** - * add user to group - * @param data The data for the request. - * @param data.workspace - * @param data.name - * @param data.requestBody added user to group - * @returns string user added to group - * @throws ApiError - */ -export const addUserToGroup = (data: AddUserToGroupData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/groups/adduser/{name}', - path: { - workspace: data.workspace, - name: data.name - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * remove user to group - * @param data The data for the request. - * @param data.workspace - * @param data.name - * @param data.requestBody added user to group - * @returns string user removed from group - * @throws ApiError - */ -export const removeUserToGroup = (data: RemoveUserToGroupData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/groups/removeuser/{name}', - path: { - workspace: data.workspace, - name: data.name - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * list folders - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @returns Folder folder list - * @throws ApiError - */ -export const listFolders = (data: ListFoldersData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/folders/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage - } -}); }; - -/** - * list folder names - * @param data The data for the request. - * @param data.workspace - * @param data.onlyMemberOf only list the folders the user is member of (default false) - * @returns string folder list - * @throws ApiError - */ -export const listFolderNames = (data: ListFolderNamesData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/folders/listnames', - path: { - workspace: data.workspace - }, - query: { - only_member_of: data.onlyMemberOf - } -}); }; - -/** - * create folder - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody create folder - * @returns string folder created - * @throws ApiError - */ -export const createFolder = (data: CreateFolderData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/folders/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * update folder - * @param data The data for the request. - * @param data.workspace - * @param data.name - * @param data.requestBody update folder - * @returns string folder updated - * @throws ApiError - */ -export const updateFolder = (data: UpdateFolderData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/folders/update/{name}', - path: { - workspace: data.workspace, - name: data.name - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * delete folder - * @param data The data for the request. - * @param data.workspace - * @param data.name - * @returns string folder deleted - * @throws ApiError - */ -export const deleteFolder = (data: DeleteFolderData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/folders/delete/{name}', - path: { - workspace: data.workspace, - name: data.name - } -}); }; - -/** - * get folder - * @param data The data for the request. - * @param data.workspace - * @param data.name - * @returns Folder folder - * @throws ApiError - */ -export const getFolder = (data: GetFolderData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/folders/get/{name}', - path: { - workspace: data.workspace, - name: data.name - } -}); }; - -/** - * exists folder - * @param data The data for the request. - * @param data.workspace - * @param data.name - * @returns boolean folder exists - * @throws ApiError - */ -export const existsFolder = (data: ExistsFolderData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/folders/exists/{name}', - path: { - workspace: data.workspace, - name: data.name - } -}); }; - -/** - * get folder usage - * @param data The data for the request. - * @param data.workspace - * @param data.name - * @returns unknown folder - * @throws ApiError - */ -export const getFolderUsage = (data: GetFolderUsageData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/folders/getusage/{name}', - path: { - workspace: data.workspace, - name: data.name - } -}); }; - -/** - * add owner to folder - * @param data The data for the request. - * @param data.workspace - * @param data.name - * @param data.requestBody owner user to folder - * @returns string owner added to folder - * @throws ApiError - */ -export const addOwnerToFolder = (data: AddOwnerToFolderData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/folders/addowner/{name}', - path: { - workspace: data.workspace, - name: data.name - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * remove owner to folder - * @param data The data for the request. - * @param data.workspace - * @param data.name - * @param data.requestBody added owner to folder - * @returns string owner removed from folder - * @throws ApiError - */ -export const removeOwnerToFolder = (data: RemoveOwnerToFolderData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/folders/removeowner/{name}', - path: { - workspace: data.workspace, - name: data.name - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * list workers - * @param data The data for the request. - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.pingSince number of seconds the worker must have had a last ping more recent of (default to 300) - * @returns WorkerPing a list of workers - * @throws ApiError - */ -export const listWorkers = (data: ListWorkersData = {}): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/workers/list', - query: { - page: data.page, - per_page: data.perPage, - ping_since: data.pingSince - } -}); }; - -/** - * exists worker with tag - * @param data The data for the request. - * @param data.tag - * @returns boolean whether a worker with the tag exists - * @throws ApiError - */ -export const existsWorkerWithTag = (data: ExistsWorkerWithTagData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/workers/exists_worker_with_tag', - query: { - tag: data.tag - } -}); }; - -/** - * get queue metrics - * @returns unknown metrics - * @throws ApiError - */ -export const getQueueMetrics = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/workers/queue_metrics' -}); }; - -/** - * get counts of jobs waiting for an executor per tag - * @returns number queue counts - * @throws ApiError - */ -export const getCountsOfJobsWaitingPerTag = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/workers/queue_counts' -}); }; - -/** - * list worker groups - * @returns unknown a list of worker group configs - * @throws ApiError - */ -export const listWorkerGroups = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/configs/list_worker_groups' -}); }; - -/** - * get config - * @param data The data for the request. - * @param data.name - * @returns unknown a config - * @throws ApiError - */ -export const getConfig = (data: GetConfigData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/configs/get/{name}', - path: { - name: data.name - } -}); }; - -/** - * Update config - * @param data The data for the request. - * @param data.name - * @param data.requestBody worker group - * @returns string Update a worker group - * @throws ApiError - */ -export const updateConfig = (data: UpdateConfigData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/configs/update/{name}', - path: { - name: data.name - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * Delete Config - * @param data The data for the request. - * @param data.name - * @returns string Delete config - * @throws ApiError - */ -export const deleteConfig = (data: DeleteConfigData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/configs/update/{name}', - path: { - name: data.name - } -}); }; - -/** - * list configs - * @returns Config list of configs - * @throws ApiError - */ -export const listConfigs = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/configs/list' -}); }; - -/** - * List autoscaling events - * @param data The data for the request. - * @param data.workerGroup - * @returns AutoscalingEvent List of autoscaling events - * @throws ApiError - */ -export const listAutoscalingEvents = (data: ListAutoscalingEventsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/configs/list_autoscaling_events/{worker_group}', - path: { - worker_group: data.workerGroup - } -}); }; - -/** - * get granular acls - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.kind - * @returns boolean acls - * @throws ApiError - */ -export const getGranularAcls = (data: GetGranularAclsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/acls/get/{kind}/{path}', - path: { - workspace: data.workspace, - path: data.path, - kind: data.kind - } -}); }; - -/** - * add granular acls - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.kind - * @param data.requestBody acl to add - * @returns string granular acl added - * @throws ApiError - */ -export const addGranularAcls = (data: AddGranularAclsData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/acls/add/{kind}/{path}', - path: { - workspace: data.workspace, - path: data.path, - kind: data.kind - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * remove granular acls - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.kind - * @param data.requestBody acl to add - * @returns string granular acl removed - * @throws ApiError - */ -export const removeGranularAcls = (data: RemoveGranularAclsData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/acls/remove/{kind}/{path}', - path: { - workspace: data.workspace, - path: data.path, - kind: data.kind - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * set capture config - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody capture config - * @returns unknown capture config set - * @throws ApiError - */ -export const setCaptureConfig = (data: SetCaptureConfigData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/capture/set_config', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * ping capture config - * @param data The data for the request. - * @param data.workspace - * @param data.triggerKind - * @param data.runnableKind - * @param data.path - * @returns unknown capture config pinged - * @throws ApiError - */ -export const pingCaptureConfig = (data: PingCaptureConfigData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/capture/ping_config/{trigger_kind}/{runnable_kind}/{path}', - path: { - workspace: data.workspace, - trigger_kind: data.triggerKind, - runnable_kind: data.runnableKind, - path: data.path - } -}); }; - -/** - * get capture configs for a script or flow - * @param data The data for the request. - * @param data.workspace - * @param data.runnableKind - * @param data.path - * @returns CaptureConfig capture configs for a script or flow - * @throws ApiError - */ -export const getCaptureConfigs = (data: GetCaptureConfigsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/capture/get_configs/{runnable_kind}/{path}', - path: { - workspace: data.workspace, - runnable_kind: data.runnableKind, - path: data.path - } -}); }; - -/** - * list captures for a script or flow - * @param data The data for the request. - * @param data.workspace - * @param data.runnableKind - * @param data.path - * @param data.triggerKind - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @returns Capture list of captures for a script or flow - * @throws ApiError - */ -export const listCaptures = (data: ListCapturesData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/capture/list/{runnable_kind}/{path}', - path: { - workspace: data.workspace, - runnable_kind: data.runnableKind, - path: data.path - }, - query: { - trigger_kind: data.triggerKind, - page: data.page, - per_page: data.perPage - } -}); }; - -/** - * move captures and configs for a script or flow - * @param data The data for the request. - * @param data.workspace - * @param data.runnableKind - * @param data.path - * @param data.requestBody move captures and configs to a new path - * @returns string captures and configs moved - * @throws ApiError - */ -export const moveCapturesAndConfigs = (data: MoveCapturesAndConfigsData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/capture/move/{runnable_kind}/{path}', - path: { - workspace: data.workspace, - runnable_kind: data.runnableKind, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * get a capture - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @returns Capture capture - * @throws ApiError - */ -export const getCapture = (data: GetCaptureData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/capture/{id}', - path: { - workspace: data.workspace, - id: data.id - } -}); }; - -/** - * delete a capture - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @returns unknown capture deleted - * @throws ApiError - */ -export const deleteCapture = (data: DeleteCaptureData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/capture/{id}', - path: { - workspace: data.workspace, - id: data.id - } -}); }; - -/** - * star item - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody - * @returns unknown star item - * @throws ApiError - */ -export const star = (data: StarData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/favorites/star', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * unstar item - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody - * @returns unknown unstar item - * @throws ApiError - */ -export const unstar = (data: UnstarData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/favorites/unstar', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * List Inputs used in previously completed jobs - * @param data The data for the request. - * @param data.workspace - * @param data.runnableId - * @param data.runnableType - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.args filter on jobs containing those args as a json subset (@> in postgres) - * @param data.includePreview - * @returns Input Input history for completed jobs - * @throws ApiError - */ -export const getInputHistory = (data: GetInputHistoryData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/inputs/history', - path: { - workspace: data.workspace - }, - query: { - runnable_id: data.runnableId, - runnable_type: data.runnableType, - page: data.page, - per_page: data.perPage, - args: data.args, - include_preview: data.includePreview - } -}); }; - -/** - * Get args from history or saved input - * @param data The data for the request. - * @param data.workspace - * @param data.jobOrInputId - * @param data.input - * @param data.allowLarge - * @returns unknown args - * @throws ApiError - */ -export const getArgsFromHistoryOrSavedInput = (data: GetArgsFromHistoryOrSavedInputData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/inputs/{jobOrInputId}/args', - path: { - workspace: data.workspace, - jobOrInputId: data.jobOrInputId - }, - query: { - input: data.input, - allow_large: data.allowLarge - } -}); }; - -/** - * List saved Inputs for a Runnable - * @param data The data for the request. - * @param data.workspace - * @param data.runnableId - * @param data.runnableType - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @returns Input Saved Inputs for a Runnable - * @throws ApiError - */ -export const listInputs = (data: ListInputsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/inputs/list', - path: { - workspace: data.workspace - }, - query: { - runnable_id: data.runnableId, - runnable_type: data.runnableType, - page: data.page, - per_page: data.perPage - } -}); }; - -/** - * Create an Input for future use in a script or flow - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody Input - * @param data.runnableId - * @param data.runnableType - * @returns string Input created - * @throws ApiError - */ -export const createInput = (data: CreateInputData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/inputs/create', - path: { - workspace: data.workspace - }, - query: { - runnable_id: data.runnableId, - runnable_type: data.runnableType - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * Update an Input - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody UpdateInput - * @returns string Input updated - * @throws ApiError - */ -export const updateInput = (data: UpdateInputData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/inputs/update', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * Delete a Saved Input - * @param data The data for the request. - * @param data.workspace - * @param data.input - * @returns string Input deleted - * @throws ApiError - */ -export const deleteInput = (data: DeleteInputData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/inputs/delete/{input}', - path: { - workspace: data.workspace, - input: data.input - } -}); }; - -/** - * Converts an S3 resource to the set of instructions necessary to connect DuckDB to an S3 bucket - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody S3 resource to connect to - * @returns unknown Connection settings - * @throws ApiError - */ -export const duckdbConnectionSettings = (data: DuckdbConnectionSettingsData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/job_helpers/duckdb_connection_settings', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * Converts an S3 resource to the set of instructions necessary to connect DuckDB to an S3 bucket - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody S3 resource path to use to generate the connection settings. If empty, the S3 resource defined in the workspace settings will be used - * @returns unknown Connection settings - * @throws ApiError - */ -export const duckdbConnectionSettingsV2 = (data: DuckdbConnectionSettingsV2Data): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/job_helpers/v2/duckdb_connection_settings', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * Converts an S3 resource to the set of arguments necessary to connect Polars to an S3 bucket - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody S3 resource to connect to - * @returns unknown Connection settings - * @throws ApiError - */ -export const polarsConnectionSettings = (data: PolarsConnectionSettingsData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/job_helpers/polars_connection_settings', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * Converts an S3 resource to the set of arguments necessary to connect Polars to an S3 bucket - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody S3 resource path to use to generate the connection settings. If empty, the S3 resource defined in the workspace settings will be used - * @returns unknown Connection settings - * @throws ApiError - */ -export const polarsConnectionSettingsV2 = (data: PolarsConnectionSettingsV2Data): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/job_helpers/v2/polars_connection_settings', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * Returns the s3 resource associated to the provided path, or the workspace default S3 resource - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody S3 resource path to use. If empty, the S3 resource defined in the workspace settings will be used - * @returns S3Resource Connection settings - * @throws ApiError - */ -export const s3ResourceInfo = (data: S3ResourceInfoData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/job_helpers/v2/s3_resource_info', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * Test connection to the workspace object storage - * @param data The data for the request. - * @param data.workspace - * @param data.storage - * @returns unknown Connection settings - * @throws ApiError - */ -export const datasetStorageTestConnection = (data: DatasetStorageTestConnectionData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/job_helpers/test_connection', - path: { - workspace: data.workspace - }, - query: { - storage: data.storage - } -}); }; - -/** - * List the file keys available in a workspace object storage - * @param data The data for the request. - * @param data.workspace - * @param data.maxKeys - * @param data.marker - * @param data.prefix - * @param data.storage - * @returns unknown List of file keys - * @throws ApiError - */ -export const listStoredFiles = (data: ListStoredFilesData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/job_helpers/list_stored_files', - path: { - workspace: data.workspace - }, - query: { - max_keys: data.maxKeys, - marker: data.marker, - prefix: data.prefix, - storage: data.storage - } -}); }; - -/** - * Load metadata of the file - * @param data The data for the request. - * @param data.workspace - * @param data.fileKey - * @param data.storage - * @returns WindmillFileMetadata FileMetadata - * @throws ApiError - */ -export const loadFileMetadata = (data: LoadFileMetadataData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/job_helpers/load_file_metadata', - path: { - workspace: data.workspace - }, - query: { - file_key: data.fileKey, - storage: data.storage - } -}); }; - -/** - * Load a preview of the file - * @param data The data for the request. - * @param data.workspace - * @param data.fileKey - * @param data.fileSizeInBytes - * @param data.fileMimeType - * @param data.csvSeparator - * @param data.csvHasHeader - * @param data.readBytesFrom - * @param data.readBytesLength - * @param data.storage - * @returns WindmillFilePreview FilePreview - * @throws ApiError - */ -export const loadFilePreview = (data: LoadFilePreviewData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/job_helpers/load_file_preview', - path: { - workspace: data.workspace - }, - query: { - file_key: data.fileKey, - file_size_in_bytes: data.fileSizeInBytes, - file_mime_type: data.fileMimeType, - csv_separator: data.csvSeparator, - csv_has_header: data.csvHasHeader, - read_bytes_from: data.readBytesFrom, - read_bytes_length: data.readBytesLength, - storage: data.storage - } -}); }; - -/** - * Load a preview of a parquet file - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.offset - * @param data.limit - * @param data.sortCol - * @param data.sortDesc - * @param data.searchCol - * @param data.searchTerm - * @param data.storage - * @returns unknown Parquet Preview - * @throws ApiError - */ -export const loadParquetPreview = (data: LoadParquetPreviewData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/job_helpers/load_parquet_preview/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - offset: data.offset, - limit: data.limit, - sort_col: data.sortCol, - sort_desc: data.sortDesc, - search_col: data.searchCol, - search_term: data.searchTerm, - storage: data.storage - } -}); }; - -/** - * Load the table row count - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.searchCol - * @param data.searchTerm - * @param data.storage - * @returns unknown Table count - * @throws ApiError - */ -export const loadTableRowCount = (data: LoadTableRowCountData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/job_helpers/load_table_count/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - search_col: data.searchCol, - search_term: data.searchTerm, - storage: data.storage - } -}); }; - -/** - * Load a preview of a csv file - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.offset - * @param data.limit - * @param data.sortCol - * @param data.sortDesc - * @param data.searchCol - * @param data.searchTerm - * @param data.storage - * @param data.csvSeparator - * @returns unknown Csv Preview - * @throws ApiError - */ -export const loadCsvPreview = (data: LoadCsvPreviewData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/job_helpers/load_csv_preview/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - offset: data.offset, - limit: data.limit, - sort_col: data.sortCol, - sort_desc: data.sortDesc, - search_col: data.searchCol, - search_term: data.searchTerm, - storage: data.storage, - csv_separator: data.csvSeparator - } -}); }; - -/** - * Permanently delete file from S3 - * @param data The data for the request. - * @param data.workspace - * @param data.fileKey - * @param data.storage - * @returns unknown Confirmation - * @throws ApiError - */ -export const deleteS3File = (data: DeleteS3FileData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/job_helpers/delete_s3_file', - path: { - workspace: data.workspace - }, - query: { - file_key: data.fileKey, - storage: data.storage - } -}); }; - -/** - * Move a S3 file from one path to the other within the same bucket - * @param data The data for the request. - * @param data.workspace - * @param data.srcFileKey - * @param data.destFileKey - * @param data.storage - * @returns unknown Confirmation - * @throws ApiError - */ -export const moveS3File = (data: MoveS3FileData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/job_helpers/move_s3_file', - path: { - workspace: data.workspace - }, - query: { - src_file_key: data.srcFileKey, - dest_file_key: data.destFileKey, - storage: data.storage - } -}); }; - -/** - * Upload file to S3 bucket - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody File content - * @param data.fileKey - * @param data.fileExtension - * @param data.s3ResourcePath - * @param data.resourceType - * @param data.storage - * @param data.contentType - * @param data.contentDisposition - * @returns unknown File upload status - * @throws ApiError - */ -export const fileUpload = (data: FileUploadData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/job_helpers/upload_s3_file', - path: { - workspace: data.workspace - }, - query: { - file_key: data.fileKey, - file_extension: data.fileExtension, - s3_resource_path: data.s3ResourcePath, - resource_type: data.resourceType, - storage: data.storage, - content_type: data.contentType, - content_disposition: data.contentDisposition - }, - body: data.requestBody, - mediaType: 'application/octet-stream' -}); }; - -/** - * Download file from S3 bucket - * @param data The data for the request. - * @param data.workspace - * @param data.fileKey - * @param data.s3ResourcePath - * @param data.resourceType - * @param data.storage - * @returns binary Chunk of the downloaded file - * @throws ApiError - */ -export const fileDownload = (data: FileDownloadData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/job_helpers/download_s3_file', - path: { - workspace: data.workspace - }, - query: { - file_key: data.fileKey, - s3_resource_path: data.s3ResourcePath, - resource_type: data.resourceType, - storage: data.storage - } -}); }; - -/** - * Download file to S3 bucket - * @param data The data for the request. - * @param data.workspace - * @param data.fileKey - * @param data.s3ResourcePath - * @param data.resourceType - * @returns string The downloaded file - * @throws ApiError - */ -export const fileDownloadParquetAsCsv = (data: FileDownloadParquetAsCsvData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/job_helpers/download_s3_parquet_file_as_csv', - path: { - workspace: data.workspace - }, - query: { - file_key: data.fileKey, - s3_resource_path: data.s3ResourcePath, - resource_type: data.resourceType - } -}); }; - -/** - * get job metrics - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.requestBody parameters for statistics retrieval - * @returns unknown job details - * @throws ApiError - */ -export const getJobMetrics = (data: GetJobMetricsData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/job_metrics/get/{id}', - path: { - workspace: data.workspace, - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * set job metrics - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.requestBody parameters for statistics retrieval - * @returns unknown Job progress updated - * @throws ApiError - */ -export const setJobProgress = (data: SetJobProgressData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/job_metrics/set_progress/{id}', - path: { - workspace: data.workspace, - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * get job progress - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @returns number job progress between 0 and 99 - * @throws ApiError - */ -export const getJobProgress = (data: GetJobProgressData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/job_metrics/get_progress/{id}', - path: { - workspace: data.workspace, - id: data.id - } -}); }; - -/** - * list log files ordered by timestamp - * @param data The data for the request. - * @param data.before filter on started before (inclusive) timestamp - * @param data.after filter on created after (exclusive) timestamp - * @param data.withError - * @returns unknown time - * @throws ApiError - */ -export const listLogFiles = (data: ListLogFilesData = {}): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/service_logs/list_files', - query: { - before: data.before, - after: data.after, - with_error: data.withError - } -}); }; - -/** - * get log file by path - * @param data The data for the request. - * @param data.path - * @returns string log stream - * @throws ApiError - */ -export const getLogFile = (data: GetLogFileData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/service_logs/get_log_file/{path}', - path: { - path: data.path - } -}); }; - -/** - * List all concurrency groups - * @returns ConcurrencyGroup all concurrency groups - * @throws ApiError - */ -export const listConcurrencyGroups = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/concurrency_groups/list' -}); }; - -/** - * Delete concurrency group - * @param data The data for the request. - * @param data.concurrencyId - * @returns unknown concurrency group removed - * @throws ApiError - */ -export const deleteConcurrencyGroup = (data: DeleteConcurrencyGroupData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/concurrency_groups/prune/{concurrency_id}', - path: { - concurrency_id: data.concurrencyId - } -}); }; - -/** - * Get the concurrency key for a job that has concurrency limits enabled - * @param data The data for the request. - * @param data.id - * @returns string concurrency key for given job - * @throws ApiError - */ -export const getConcurrencyKey = (data: GetConcurrencyKeyData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/concurrency_groups/{id}/key', - path: { - id: data.id - } -}); }; - -/** - * Get intervals of job runtime concurrency - * @param data The data for the request. - * @param data.workspace - * @param data.concurrencyKey - * @param data.rowLimit - * @param data.createdBy mask to filter exact matching user creator - * @param data.label mask to filter exact matching job's label (job labels are completed jobs with as a result an object containing a string in the array at key 'wm_labels') - * @param data.parentJob The parent job that is at the origin and responsible for the execution of this script if any - * @param data.scriptPathExact mask to filter exact matching path - * @param data.scriptPathStart mask to filter matching starting path - * @param data.schedulePath mask to filter by schedule path - * @param data.scriptHash mask to filter exact matching path - * @param data.startedBefore filter on started before (inclusive) timestamp - * @param data.startedAfter filter on started after (exclusive) timestamp - * @param data.createdOrStartedBefore filter on created_at for non non started job and started_at otherwise before (inclusive) timestamp - * @param data.running filter on running jobs - * @param data.scheduledForBeforeNow filter on jobs scheduled_for before now (hence waitinf for a worker) - * @param data.createdOrStartedAfter filter on created_at for non non started job and started_at otherwise after (exclusive) timestamp - * @param data.createdOrStartedAfterCompletedJobs filter on created_at for non non started job and started_at otherwise after (exclusive) timestamp but only for the completed jobs - * @param data.jobKinds filter on job kind (values 'preview', 'script', 'dependencies', 'flow') separated by, - * @param data.args filter on jobs containing those args as a json subset (@> in postgres) - * @param data.tag filter on jobs with a given tag/worker group - * @param data.result filter on jobs containing those result as a json subset (@> in postgres) - * @param data.allowWildcards allow wildcards (*) in the filter of label, tag, worker - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.isSkipped is the job skipped - * @param data.isFlowStep is the job a flow step - * @param data.hasNullParent has null parent - * @param data.success filter on successful jobs - * @param data.allWorkspaces get jobs from all workspaces (only valid if request come from the `admins` workspace) - * @param data.isNotSchedule is not a scheduled job - * @returns ExtendedJobs time - * @throws ApiError - */ -export const listExtendedJobs = (data: ListExtendedJobsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/concurrency_groups/list_jobs', - path: { - workspace: data.workspace - }, - query: { - concurrency_key: data.concurrencyKey, - row_limit: data.rowLimit, - created_by: data.createdBy, - label: data.label, - parent_job: data.parentJob, - script_path_exact: data.scriptPathExact, - script_path_start: data.scriptPathStart, - schedule_path: data.schedulePath, - script_hash: data.scriptHash, - started_before: data.startedBefore, - started_after: data.startedAfter, - created_or_started_before: data.createdOrStartedBefore, - running: data.running, - scheduled_for_before_now: data.scheduledForBeforeNow, - created_or_started_after: data.createdOrStartedAfter, - created_or_started_after_completed_jobs: data.createdOrStartedAfterCompletedJobs, - job_kinds: data.jobKinds, - args: data.args, - tag: data.tag, - result: data.result, - allow_wildcards: data.allowWildcards, - page: data.page, - per_page: data.perPage, - is_skipped: data.isSkipped, - is_flow_step: data.isFlowStep, - has_null_parent: data.hasNullParent, - success: data.success, - all_workspaces: data.allWorkspaces, - is_not_schedule: data.isNotSchedule - } -}); }; - -/** - * Search through jobs with a string query - * @param data The data for the request. - * @param data.workspace - * @param data.searchQuery - * @returns unknown search results - * @throws ApiError - */ -export const searchJobsIndex = (data: SearchJobsIndexData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/srch/w/{workspace}/index/search/job', - path: { - workspace: data.workspace - }, - query: { - search_query: data.searchQuery - } -}); }; - -/** - * Search through service logs with a string query - * @param data The data for the request. - * @param data.searchQuery - * @param data.mode - * @param data.hostname - * @param data.workerGroup - * @param data.minTs - * @param data.maxTs - * @returns unknown search results - * @throws ApiError - */ -export const searchLogsIndex = (data: SearchLogsIndexData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/srch/index/search/service_logs', - query: { - search_query: data.searchQuery, - mode: data.mode, - worker_group: data.workerGroup, - hostname: data.hostname, - min_ts: data.minTs, - max_ts: data.maxTs - } -}); }; - -/** - * Search and count the log line hits on every provided host - * @param data The data for the request. - * @param data.searchQuery - * @param data.minTs - * @param data.maxTs - * @returns unknown search results - * @throws ApiError - */ -export const countSearchLogsIndex = (data: CountSearchLogsIndexData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/srch/index/search/count_service_logs', - query: { - search_query: data.searchQuery, - min_ts: data.minTs, - max_ts: data.maxTs - } -}); }; - -/** - * Restart container and delete the index to recreate it. - * @param data The data for the request. - * @param data.idxName - * @returns string idx to be deleted and container restarting - * @throws ApiError - */ -export const clearIndex = (data: ClearIndexData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/srch/index/delete/{idx_name}', - path: { - idx_name: data.idxName - } -}); }; \ No newline at end of file diff --git a/cli/gen/types.gen.ts b/cli/gen/types.gen.ts deleted file mode 100644 index a7924d0b90..0000000000 --- a/cli/gen/types.gen.ts +++ /dev/null @@ -1,7828 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -export type AIProvider = 'openai' | 'azure_openai' | 'anthropic' | 'mistral' | 'deepseek' | 'googleai' | 'groq' | 'openrouter' | 'togetherai' | 'customai'; - -export type AIProviderModel = { - model: string; - provider: AIProvider; -}; - -export type AIProviderConfig = { - resource_path: string; - models: Array<(string)>; -}; - -export type AIConfig = { - providers?: { - [key: string]: AIProviderConfig; - }; - default_model?: AIProviderModel; - code_completion_model?: AIProviderModel; -}; - -export type Script = { - workspace_id?: string; - hash: string; - path: string; - /** - * The first element is the direct parent of the script, the second is the parent of the first, etc - * - */ - parent_hashes?: Array<(string)>; - summary: string; - description: string; - content: string; - created_by: string; - created_at: string; - archived: boolean; - schema?: { - [key: string]: unknown; - }; - deleted: boolean; - is_template: boolean; - extra_perms: { - [key: string]: (boolean); - }; - lock?: string; - lock_error_logs?: string; - language: ScriptLang; - kind: 'script' | 'failure' | 'trigger' | 'command' | 'approval' | 'preprocessor'; - starred: boolean; - tag?: string; - has_draft?: boolean; - draft_only?: boolean; - envs?: Array<(string)>; - concurrent_limit?: number; - concurrency_time_window_s?: number; - concurrency_key?: string; - cache_ttl?: number; - dedicated_worker?: boolean; - ws_error_handler_muted?: boolean; - priority?: number; - restart_unless_cancelled?: boolean; - timeout?: number; - delete_after_use?: boolean; - visible_to_runner_only?: boolean; - no_main_func: boolean; - codebase?: string; - has_preprocessor: boolean; - on_behalf_of_email?: string; -}; - -export type kind = 'script' | 'failure' | 'trigger' | 'command' | 'approval' | 'preprocessor'; - -export type NewScript = { - path: string; - parent_hash?: string; - summary: string; - description: string; - content: string; - schema?: { - [key: string]: unknown; - }; - is_template?: boolean; - lock?: string; - language: ScriptLang; - kind?: 'script' | 'failure' | 'trigger' | 'command' | 'approval' | 'preprocessor'; - tag?: string; - draft_only?: boolean; - envs?: Array<(string)>; - concurrent_limit?: number; - concurrency_time_window_s?: number; - cache_ttl?: number; - dedicated_worker?: boolean; - ws_error_handler_muted?: boolean; - priority?: number; - restart_unless_cancelled?: boolean; - timeout?: number; - delete_after_use?: boolean; - deployment_message?: string; - concurrency_key?: string; - visible_to_runner_only?: boolean; - no_main_func?: boolean; - codebase?: string; - has_preprocessor?: boolean; - on_behalf_of_email?: string; -}; - -export type NewScriptWithDraft = NewScript & { - draft?: NewScript; - hash: string; -}; - -export type ScriptHistory = { - script_hash: string; - deployment_msg?: string; -}; - -export type ScriptArgs = { - [key: string]: unknown; -}; - -export type Input = { - id: string; - name: string; - created_by: string; - created_at: string; - is_public: boolean; - success?: boolean; -}; - -export type CreateInput = { - name: string; - args: { - [key: string]: unknown; - }; -}; - -export type UpdateInput = { - id: string; - name: string; - is_public: boolean; -}; - -export type RunnableType = 'ScriptHash' | 'ScriptPath' | 'FlowPath'; - -export type QueuedJob = { - workspace_id?: string; - id: string; - parent_job?: string; - created_by?: string; - created_at?: string; - started_at?: string; - scheduled_for?: string; - running: boolean; - script_path?: string; - script_hash?: string; - args?: ScriptArgs; - logs?: string; - raw_code?: string; - canceled: boolean; - canceled_by?: string; - canceled_reason?: string; - last_ping?: string; - job_kind: 'script' | 'preview' | 'dependencies' | 'flowdependencies' | 'appdependencies' | 'flow' | 'flowpreview' | 'script_hub' | 'identity' | 'deploymentcallback' | 'singlescriptflow' | 'flowscript' | 'flownode' | 'appscript'; - schedule_path?: string; - /** - * The user (u/userfoo) or group (g/groupfoo) whom - * the execution of this script will be permissioned_as and by extension its DT_TOKEN. - * - */ - permissioned_as: string; - flow_status?: FlowStatus; - raw_flow?: FlowValue; - is_flow_step: boolean; - language?: ScriptLang; - email: string; - visible_to_owner: boolean; - mem_peak?: number; - tag: string; - priority?: number; - self_wait_time_ms?: number; - aggregate_wait_time_ms?: number; - suspend?: number; - preprocessed?: boolean; - worker?: string; -}; - -export type job_kind = 'script' | 'preview' | 'dependencies' | 'flowdependencies' | 'appdependencies' | 'flow' | 'flowpreview' | 'script_hub' | 'identity' | 'deploymentcallback' | 'singlescriptflow' | 'flowscript' | 'flownode' | 'appscript'; - -export type CompletedJob = { - workspace_id?: string; - id: string; - parent_job?: string; - created_by: string; - created_at: string; - started_at: string; - duration_ms: number; - success: boolean; - script_path?: string; - script_hash?: string; - args?: ScriptArgs; - result?: unknown; - logs?: string; - deleted?: boolean; - raw_code?: string; - canceled: boolean; - canceled_by?: string; - canceled_reason?: string; - job_kind: 'script' | 'preview' | 'dependencies' | 'flow' | 'flowdependencies' | 'appdependencies' | 'flowpreview' | 'script_hub' | 'identity' | 'deploymentcallback' | 'singlescriptflow' | 'flowscript' | 'flownode' | 'appscript'; - schedule_path?: string; - /** - * The user (u/userfoo) or group (g/groupfoo) whom - * the execution of this script will be permissioned_as and by extension its DT_TOKEN. - * - */ - permissioned_as: string; - flow_status?: FlowStatus; - raw_flow?: FlowValue; - is_flow_step: boolean; - language?: ScriptLang; - is_skipped: boolean; - email: string; - visible_to_owner: boolean; - mem_peak?: number; - tag: string; - priority?: number; - labels?: Array<(string)>; - self_wait_time_ms?: number; - aggregate_wait_time_ms?: number; - preprocessed?: boolean; - worker?: string; -}; - -export type ObscuredJob = { - typ?: string; - started_at?: string; - duration_ms?: number; -}; - -export type Job = (CompletedJob & { - type?: 'CompletedJob'; -}) | (QueuedJob & { - type?: 'QueuedJob'; -}); - -export type type = 'CompletedJob'; - -export type User = { - email: string; - username: string; - is_admin: boolean; - name?: string; - is_super_admin: boolean; - created_at: string; - operator: boolean; - disabled: boolean; - groups?: Array<(string)>; - folders: Array<(string)>; - folders_owners: Array<(string)>; -}; - -export type UserUsage = { - email?: string; - executions?: number; -}; - -export type Login = { - email: string; - password: string; -}; - -export type EditWorkspaceUser = { - is_admin?: boolean; - operator?: boolean; - disabled?: boolean; -}; - -export type TruncatedToken = { - label?: string; - expiration?: string; - token_prefix: string; - created_at: string; - last_used_at: string; - scopes?: Array<(string)>; - email?: string; -}; - -export type NewToken = { - label?: string; - expiration?: string; - scopes?: Array<(string)>; - workspace_id?: string; -}; - -export type NewTokenImpersonate = { - label?: string; - expiration?: string; - impersonate_email: string; - workspace_id?: string; -}; - -export type ListableVariable = { - workspace_id: string; - path: string; - value?: string; - is_secret: boolean; - description?: string; - account?: number; - is_oauth?: boolean; - extra_perms: { - [key: string]: (boolean); - }; - is_expired?: boolean; - refresh_error?: string; - is_linked?: boolean; - is_refreshed?: boolean; - expires_at?: string; -}; - -export type ContextualVariable = { - name: string; - value: string; - description: string; - is_custom: boolean; -}; - -export type CreateVariable = { - path: string; - value: string; - is_secret: boolean; - description: string; - account?: number; - is_oauth?: boolean; - expires_at?: string; -}; - -export type EditVariable = { - path?: string; - value?: string; - is_secret?: boolean; - description?: string; -}; - -export type AuditLog = { - id: number; - timestamp: string; - username: string; - operation: 'jobs.run' | 'jobs.run.script' | 'jobs.run.preview' | 'jobs.run.flow' | 'jobs.run.flow_preview' | 'jobs.run.script_hub' | 'jobs.run.dependencies' | 'jobs.run.identity' | 'jobs.run.noop' | 'jobs.flow_dependencies' | 'jobs' | 'jobs.cancel' | 'jobs.force_cancel' | 'jobs.disapproval' | 'jobs.delete' | 'account.delete' | 'ai.request' | 'resources.create' | 'resources.update' | 'resources.delete' | 'resource_types.create' | 'resource_types.update' | 'resource_types.delete' | 'schedule.create' | 'schedule.setenabled' | 'schedule.edit' | 'schedule.delete' | 'scripts.create' | 'scripts.update' | 'scripts.archive' | 'scripts.delete' | 'users.create' | 'users.delete' | 'users.update' | 'users.login' | 'users.login_failure' | 'users.logout' | 'users.accept_invite' | 'users.decline_invite' | 'users.token.create' | 'users.token.delete' | 'users.add_to_workspace' | 'users.add_global' | 'users.setpassword' | 'users.impersonate' | 'users.leave_workspace' | 'oauth.login' | 'oauth.login_failure' | 'oauth.signup' | 'variables.create' | 'variables.delete' | 'variables.update' | 'flows.create' | 'flows.update' | 'flows.delete' | 'flows.archive' | 'apps.create' | 'apps.update' | 'apps.delete' | 'folder.create' | 'folder.update' | 'folder.delete' | 'folder.add_owner' | 'folder.remove_owner' | 'group.create' | 'group.delete' | 'group.edit' | 'group.adduser' | 'group.removeuser' | 'igroup.create' | 'igroup.delete' | 'igroup.adduser' | 'igroup.removeuser' | 'variables.decrypt_secret' | 'workspaces.edit_command_script' | 'workspaces.edit_deploy_to' | 'workspaces.edit_auto_invite_domain' | 'workspaces.edit_webhook' | 'workspaces.edit_copilot_config' | 'workspaces.edit_error_handler' | 'workspaces.create' | 'workspaces.update' | 'workspaces.archive' | 'workspaces.unarchive' | 'workspaces.delete'; - action_kind: 'Created' | 'Updated' | 'Delete' | 'Execute'; - resource?: string; - parameters?: { - [key: string]: unknown; - }; -}; - -export type operation = 'jobs.run' | 'jobs.run.script' | 'jobs.run.preview' | 'jobs.run.flow' | 'jobs.run.flow_preview' | 'jobs.run.script_hub' | 'jobs.run.dependencies' | 'jobs.run.identity' | 'jobs.run.noop' | 'jobs.flow_dependencies' | 'jobs' | 'jobs.cancel' | 'jobs.force_cancel' | 'jobs.disapproval' | 'jobs.delete' | 'account.delete' | 'ai.request' | 'resources.create' | 'resources.update' | 'resources.delete' | 'resource_types.create' | 'resource_types.update' | 'resource_types.delete' | 'schedule.create' | 'schedule.setenabled' | 'schedule.edit' | 'schedule.delete' | 'scripts.create' | 'scripts.update' | 'scripts.archive' | 'scripts.delete' | 'users.create' | 'users.delete' | 'users.update' | 'users.login' | 'users.login_failure' | 'users.logout' | 'users.accept_invite' | 'users.decline_invite' | 'users.token.create' | 'users.token.delete' | 'users.add_to_workspace' | 'users.add_global' | 'users.setpassword' | 'users.impersonate' | 'users.leave_workspace' | 'oauth.login' | 'oauth.login_failure' | 'oauth.signup' | 'variables.create' | 'variables.delete' | 'variables.update' | 'flows.create' | 'flows.update' | 'flows.delete' | 'flows.archive' | 'apps.create' | 'apps.update' | 'apps.delete' | 'folder.create' | 'folder.update' | 'folder.delete' | 'folder.add_owner' | 'folder.remove_owner' | 'group.create' | 'group.delete' | 'group.edit' | 'group.adduser' | 'group.removeuser' | 'igroup.create' | 'igroup.delete' | 'igroup.adduser' | 'igroup.removeuser' | 'variables.decrypt_secret' | 'workspaces.edit_command_script' | 'workspaces.edit_deploy_to' | 'workspaces.edit_auto_invite_domain' | 'workspaces.edit_webhook' | 'workspaces.edit_copilot_config' | 'workspaces.edit_error_handler' | 'workspaces.create' | 'workspaces.update' | 'workspaces.archive' | 'workspaces.unarchive' | 'workspaces.delete'; - -export type action_kind = 'Created' | 'Updated' | 'Delete' | 'Execute'; - -export type MainArgSignature = { - type: 'Valid' | 'Invalid'; - error: string; - star_args: boolean; - star_kwargs?: boolean; - args: Array<{ - name: string; - typ: ('float' | 'int' | 'bool' | 'email' | 'unknown' | 'bytes' | 'dict' | 'datetime' | 'sql' | { - resource: (string) | null; -} | { - str: Array<(string)> | null; -} | { - object: Array<{ - key: string; - typ: ('float' | 'int' | 'bool' | 'email' | 'unknown' | 'bytes' | 'dict' | 'datetime' | 'sql' | { - str: unknown; -}); - }>; -} | { - list: (('float' | 'int' | 'bool' | 'email' | 'unknown' | 'bytes' | 'dict' | 'datetime' | 'sql' | { - str: unknown; -}) | null); -}); - has_default?: boolean; - default?: unknown; - }>; - no_main_func: (boolean) | null; - has_preprocessor: (boolean) | null; -}; - -export type type2 = 'Valid' | 'Invalid'; - -export type ScriptLang = 'python3' | 'deno' | 'go' | 'bash' | 'powershell' | 'postgresql' | 'mysql' | 'bigquery' | 'snowflake' | 'mssql' | 'oracledb' | 'graphql' | 'nativets' | 'bun' | 'php' | 'rust' | 'ansible' | 'csharp' | 'nu' | 'java'; - -export type Preview = { - content?: string; - path?: string; - args: ScriptArgs; - language?: ScriptLang; - tag?: string; - kind?: 'code' | 'identity' | 'http'; - dedicated_worker?: boolean; - lock?: string; -}; - -export type kind2 = 'code' | 'identity' | 'http'; - -export type WorkflowTask = { - args: ScriptArgs; -}; - -export type WorkflowStatusRecord = { - [key: string]: WorkflowStatus; -}; - -export type WorkflowStatus = { - scheduled_for?: string; - started_at?: string; - duration_ms?: number; - name?: string; -}; - -export type CreateResource = { - path: string; - value: unknown; - description?: string; - resource_type: string; -}; - -export type EditResource = { - path?: string; - description?: string; - value?: unknown; -}; - -export type Resource = { - workspace_id?: string; - path: string; - description?: string; - resource_type: string; - value?: unknown; - is_oauth: boolean; - extra_perms?: { - [key: string]: (boolean); - }; - created_by?: string; - edited_at?: string; -}; - -export type ListableResource = { - workspace_id?: string; - path: string; - description?: string; - resource_type: string; - value?: unknown; - is_oauth: boolean; - extra_perms?: { - [key: string]: (boolean); - }; - is_expired?: boolean; - refresh_error?: string; - is_linked: boolean; - is_refreshed: boolean; - account?: number; - created_by?: string; - edited_at?: string; -}; - -export type ResourceType = { - workspace_id?: string; - name: string; - schema?: unknown; - description?: string; - created_by?: string; - edited_at?: string; - format_extension?: string; -}; - -export type EditResourceType = { - schema?: unknown; - description?: string; -}; - -export type Schedule = { - path: string; - edited_by: string; - edited_at: string; - schedule: string; - timezone: string; - enabled: boolean; - script_path: string; - is_flow: boolean; - args?: ScriptArgs; - extra_perms: { - [key: string]: (boolean); - }; - email: string; - error?: string; - on_failure?: string; - on_failure_times?: number; - on_failure_exact?: boolean; - on_failure_extra_args?: ScriptArgs; - on_recovery?: string; - on_recovery_times?: number; - on_recovery_extra_args?: ScriptArgs; - on_success?: string; - on_success_extra_args?: ScriptArgs; - ws_error_handler_muted?: boolean; - retry?: Retry; - summary?: string; - description?: string; - no_flow_overlap?: boolean; - tag?: string; - paused_until?: string; - cron_version?: string; -}; - -export type ScheduleWJobs = Schedule & { - jobs?: Array<{ - id: string; - success: boolean; - duration_ms: number; - }>; -}; - -export type NewSchedule = { - path: string; - schedule: string; - timezone: string; - script_path: string; - is_flow: boolean; - args: ScriptArgs; - enabled?: boolean; - on_failure?: string; - on_failure_times?: number; - on_failure_exact?: boolean; - on_failure_extra_args?: ScriptArgs; - on_recovery?: string; - on_recovery_times?: number; - on_recovery_extra_args?: ScriptArgs; - on_success?: string; - on_success_extra_args?: ScriptArgs; - ws_error_handler_muted?: boolean; - retry?: Retry; - no_flow_overlap?: boolean; - summary?: string; - description?: string; - tag?: string; - paused_until?: string; - cron_version?: string; -}; - -export type EditSchedule = { - schedule: string; - timezone: string; - args: ScriptArgs; - on_failure?: string; - on_failure_times?: number; - on_failure_exact?: boolean; - on_failure_extra_args?: ScriptArgs; - on_recovery?: string; - on_recovery_times?: number; - on_recovery_extra_args?: ScriptArgs; - on_success?: string; - on_success_extra_args?: ScriptArgs; - ws_error_handler_muted?: boolean; - retry?: Retry; - no_flow_overlap?: boolean; - summary?: string; - description?: string; - tag?: string; - paused_until?: string; - cron_version?: string; -}; - -export type TriggerExtraProperty = { - path: string; - script_path: string; - email: string; - extra_perms: { - [key: string]: (boolean); - }; - workspace_id: string; - edited_by: string; - edited_at: string; - is_flow: boolean; -}; - -export type AuthenticationMethod = 'none' | 'windmill' | 'api_key' | 'basic_http' | 'custom_script' | 'signature'; - -export type HttpTrigger = TriggerExtraProperty & { - route_path: string; - static_asset_config?: { - s3: string; - storage?: string; - filename?: string; - }; - http_method: 'get' | 'post' | 'put' | 'delete' | 'patch'; - authentication_resource_path?: string; - is_async: boolean; - authentication_method: AuthenticationMethod; - is_static_website: boolean; - workspaced_route: boolean; - wrap_body: boolean; - raw_string: boolean; -}; - -export type http_method = 'get' | 'post' | 'put' | 'delete' | 'patch'; - -export type NewHttpTrigger = { - path: string; - script_path: string; - route_path: string; - workspaced_route?: boolean; - static_asset_config?: { - s3: string; - storage?: string; - filename?: string; - }; - is_flow: boolean; - http_method: 'get' | 'post' | 'put' | 'delete' | 'patch'; - authentication_resource_path?: string; - is_async: boolean; - authentication_method: AuthenticationMethod; - is_static_website: boolean; - wrap_body?: boolean; - raw_string?: boolean; -}; - -export type EditHttpTrigger = { - path: string; - script_path: string; - route_path?: string; - workspaced_route?: boolean; - static_asset_config?: { - s3: string; - storage?: string; - filename?: string; - }; - authentication_resource_path?: string; - is_flow: boolean; - http_method: 'get' | 'post' | 'put' | 'delete' | 'patch'; - is_async: boolean; - authentication_method: AuthenticationMethod; - is_static_website: boolean; - wrap_body?: boolean; - raw_string?: boolean; -}; - -export type TriggersCount = { - primary_schedule?: { - schedule?: string; - }; - schedule_count?: number; - http_routes_count?: number; - webhook_count?: number; - email_count?: number; - websocket_count?: number; - postgres_count?: number; - kafka_count?: number; - nats_count?: number; - mqtt_count?: number; - gcp_count?: number; - sqs_count?: number; -}; - -export type WebsocketTrigger = TriggerExtraProperty & { - url: string; - server_id?: string; - last_server_ping?: string; - error?: string; - enabled: boolean; - filters: Array<{ - key: string; - value: unknown; - }>; - initial_messages?: Array; - url_runnable_args?: ScriptArgs; - can_return_message: boolean; -}; - -export type NewWebsocketTrigger = { - path: string; - script_path: string; - is_flow: boolean; - url: string; - enabled?: boolean; - filters: Array<{ - key: string; - value: unknown; - }>; - initial_messages?: Array; - url_runnable_args?: ScriptArgs; - can_return_message: boolean; -}; - -export type EditWebsocketTrigger = { - url: string; - path: string; - script_path: string; - is_flow: boolean; - filters: Array<{ - key: string; - value: unknown; - }>; - initial_messages?: Array; - url_runnable_args?: ScriptArgs; - can_return_message: boolean; -}; - -export type WebsocketTriggerInitialMessage = { - raw_message: string; -} | { - runnable_result: { - path: string; - args: ScriptArgs; - is_flow: boolean; - }; -}; - -export type MqttQoS = 'qos0' | 'qos1' | 'qos2'; - -export type MqttV3Config = { - clean_session?: boolean; -}; - -export type MqttV5Config = { - clean_start?: boolean; - topic_alias?: number; - session_expiry_interval?: number; -}; - -export type MqttSubscribeTopic = { - qos: MqttQoS; - topic: string; -}; - -export type MqttClientVersion = 'v3' | 'v5'; - -export type MqttTrigger = TriggerExtraProperty & { - mqtt_resource_path: string; - subscribe_topics: Array; - v3_config?: MqttV3Config; - v5_config?: MqttV5Config; - client_id?: string; - client_version?: MqttClientVersion; - server_id?: string; - last_server_ping?: string; - error?: string; - enabled: boolean; -}; - -export type NewMqttTrigger = { - mqtt_resource_path: string; - subscribe_topics: Array; - client_id?: string; - v3_config?: MqttV3Config; - v5_config?: MqttV5Config; - client_version?: MqttClientVersion; - path: string; - script_path: string; - is_flow: boolean; - enabled?: boolean; -}; - -export type EditMqttTrigger = { - mqtt_resource_path: string; - subscribe_topics: Array; - client_id?: string; - v3_config?: MqttV3Config; - v5_config?: MqttV5Config; - client_version?: MqttClientVersion; - path: string; - script_path: string; - is_flow: boolean; - enabled: boolean; -}; - -export type DeliveryType = 'push' | 'pull'; - -export type PushConfig = { - audience?: string; - authenticate: boolean; - base_endpoint: string; -}; - -export type GcpTrigger = TriggerExtraProperty & { - gcp_resource_path: string; - topic_id: string; - subscription_id: string; - server_id?: string; - delivery_type: DeliveryType; - delivery_config?: PushConfig; - last_server_ping?: string; - error?: string; - enabled: boolean; -}; - -/** - * The mode of subscription. 'existing' means using an existing GCP subscription, while 'create_update' involves creating or updating a new subscription. - */ -export type SubscriptionMode = 'existing' | 'create_update'; - -export type GcpExistingSubscription = { - subscription_id: string; - base_endpoint: string; -}; - -export type GcpCreateUpdateSubscription = { - subscription_id?: string; - delivery_type: DeliveryType; - delivery_config?: PushConfig; -}; - -/** - * "This is a union type representing the subscription mode. - * - 'existing': Represents an existing GCP subscription, and should be accompanied by an 'ExistingGcpSubscription' object. - * - 'create_update': Represents a new or updated GCP subscription, and should be accompanied by a 'CreateUpdateConfig' object." - * - */ -export type GcpSubscriptionModeConfig = (GcpExistingSubscription | GcpCreateUpdateSubscription) & { - subscription_mode: SubscriptionMode; -}; - -export type NewGcpTrigger = { - gcp_resource_path: string; - topic_id: string; - subscription_mode: GcpSubscriptionModeConfig; - path: string; - script_path: string; - is_flow: boolean; - enabled?: boolean; -}; - -export type EditGcpTrigger = { - gcp_resource_path?: string; - topic_id: string; - subscription_mode: GcpSubscriptionModeConfig; - path: string; - script_path: string; - is_flow: boolean; - enabled: boolean; -}; - -export type GetAllTopicSubscription = { - topic_id: string; -}; - -export type DeleteGcpSubscription = { - subscription_id: string; -}; - -export type SqsTrigger = TriggerExtraProperty & { - queue_url: string; - aws_resource_path: string; - message_attributes?: Array<(string)>; - server_id?: string; - last_server_ping?: string; - error?: string; - enabled: boolean; -}; - -export type NewSqsTrigger = { - queue_url: string; - aws_resource_path: string; - message_attributes?: Array<(string)>; - path: string; - script_path: string; - is_flow: boolean; - enabled?: boolean; -}; - -export type EditSqsTrigger = { - queue_url: string; - aws_resource_path: string; - message_attributes?: Array<(string)>; - path: string; - script_path: string; - is_flow: boolean; - enabled: boolean; -}; - -export type Slot = { - name?: string; -}; - -export type SlotList = { - slot_name?: string; - active?: boolean; -}; - -export type PublicationData = { - table_to_track?: Array; - transaction_to_track: Array<(string)>; -}; - -export type TableToTrack = Array<{ - table_name: string; - columns_name?: Array<(string)>; - where_clause?: string; -}>; - -export type Relations = { - schema_name: string; - table_to_track: TableToTrack; -}; - -export type Language = 'Typescript'; - -export type TemplateScript = { - postgres_resource_path: string; - relations: Array; - language: Language; -}; - -export type PostgresTrigger = TriggerExtraProperty & { - enabled: boolean; - postgres_resource_path: string; - publication_name: string; - server_id?: string; - replication_slot_name: string; - error?: string; - last_server_ping?: string; -}; - -export type NewPostgresTrigger = { - replication_slot_name?: string; - publication_name?: string; - path: string; - script_path: string; - is_flow: boolean; - enabled: boolean; - postgres_resource_path: string; - publication?: PublicationData; -}; - -export type EditPostgresTrigger = { - replication_slot_name: string; - publication_name: string; - path: string; - script_path: string; - is_flow: boolean; - enabled: boolean; - postgres_resource_path: string; - publication?: PublicationData; -}; - -export type KafkaTrigger = TriggerExtraProperty & { - kafka_resource_path: string; - group_id: string; - topics: Array<(string)>; - server_id?: string; - last_server_ping?: string; - error?: string; - enabled: boolean; -}; - -export type NewKafkaTrigger = { - path: string; - script_path: string; - is_flow: boolean; - kafka_resource_path: string; - group_id: string; - topics: Array<(string)>; - enabled?: boolean; -}; - -export type EditKafkaTrigger = { - kafka_resource_path: string; - group_id: string; - topics: Array<(string)>; - path: string; - script_path: string; - is_flow: boolean; -}; - -export type NatsTrigger = TriggerExtraProperty & { - nats_resource_path: string; - use_jetstream: boolean; - stream_name?: string; - consumer_name?: string; - subjects: Array<(string)>; - server_id?: string; - last_server_ping?: string; - error?: string; - enabled: boolean; -}; - -export type NewNatsTrigger = { - path: string; - script_path: string; - is_flow: boolean; - nats_resource_path: string; - use_jetstream: boolean; - stream_name?: string; - consumer_name?: string; - subjects: Array<(string)>; - enabled?: boolean; -}; - -export type EditNatsTrigger = { - nats_resource_path: string; - use_jetstream: boolean; - stream_name?: string; - consumer_name?: string; - subjects: Array<(string)>; - path: string; - script_path: string; - is_flow: boolean; -}; - -export type Group = { - name: string; - summary?: string; - members?: Array<(string)>; - extra_perms?: { - [key: string]: (boolean); - }; -}; - -export type InstanceGroup = { - name: string; - summary?: string; - emails?: Array<(string)>; -}; - -export type Folder = { - name: string; - owners: Array<(string)>; - extra_perms: { - [key: string]: (boolean); - }; - summary?: string; - created_by?: string; - edited_at?: string; -}; - -export type WorkerPing = { - worker: string; - worker_instance: string; - last_ping?: number; - started_at: string; - ip: string; - jobs_executed: number; - custom_tags?: Array<(string)>; - worker_group: string; - wm_version: string; - last_job_id?: string; - last_job_workspace_id?: string; - occupancy_rate?: number; - occupancy_rate_15s?: number; - occupancy_rate_5m?: number; - occupancy_rate_30m?: number; - memory?: number; - vcpus?: number; - memory_usage?: number; - wm_memory_usage?: number; -}; - -export type UserWorkspaceList = { - email: string; - workspaces: Array<{ - id: string; - name: string; - username: string; - color: string; - operator_settings?: OperatorSettings; - }>; -}; - -export type CreateWorkspace = { - id: string; - name: string; - username?: string; - color?: string; -}; - -export type Workspace = { - id: string; - name: string; - owner: string; - domain?: string; - color?: string; -}; - -export type WorkspaceInvite = { - workspace_id: string; - email: string; - is_admin: boolean; - operator: boolean; -}; - -export type GlobalUserInfo = { - email: string; - login_type: 'password' | 'github'; - super_admin: boolean; - devops?: boolean; - verified: boolean; - name?: string; - company?: string; - username?: string; - operator_only?: boolean; -}; - -export type login_type = 'password' | 'github'; - -export type Flow = OpenFlow & FlowMetadata & { - lock_error_logs?: string; -}; - -export type ExtraPerms = { - [key: string]: (boolean); -}; - -export type FlowMetadata = { - workspace_id?: string; - path: string; - edited_by: string; - edited_at: string; - archived: boolean; - extra_perms: ExtraPerms; - starred?: boolean; - draft_only?: boolean; - tag?: string; - ws_error_handler_muted?: boolean; - priority?: number; - dedicated_worker?: boolean; - timeout?: number; - visible_to_runner_only?: boolean; - on_behalf_of_email?: string; -}; - -export type OpenFlowWPath = OpenFlow & { - path: string; - tag?: string; - ws_error_handler_muted?: boolean; - priority?: number; - dedicated_worker?: boolean; - timeout?: number; - visible_to_runner_only?: boolean; - on_behalf_of_email?: string; -}; - -export type FlowPreview = { - value: FlowValue; - path?: string; - args: ScriptArgs; - tag?: string; - restarted_from?: RestartedFrom; -}; - -export type RestartedFrom = { - flow_job_id?: string; - step_id?: string; - branch_or_iteration_n?: number; -}; - -export type Policy = { - triggerables?: { - [key: string]: { - [key: string]: unknown; - }; - }; - triggerables_v2?: { - [key: string]: { - [key: string]: unknown; - }; - }; - s3_inputs?: Array<{ - [key: string]: unknown; - }>; - allowed_s3_keys?: Array<{ - s3_path?: string; - resource?: string; - }>; - execution_mode?: 'viewer' | 'publisher' | 'anonymous'; - on_behalf_of?: string; - on_behalf_of_email?: string; -}; - -export type execution_mode = 'viewer' | 'publisher' | 'anonymous'; - -export type ListableApp = { - id: number; - workspace_id: string; - path: string; - summary: string; - version: number; - extra_perms: { - [key: string]: (boolean); - }; - starred?: boolean; - edited_at: string; - execution_mode: 'viewer' | 'publisher' | 'anonymous'; -}; - -export type ListableRawApp = { - workspace_id: string; - path: string; - summary: string; - extra_perms: { - [key: string]: (boolean); - }; - starred?: boolean; - version: number; - edited_at: string; -}; - -export type AppWithLastVersion = { - id: number; - workspace_id: string; - path: string; - summary: string; - versions: Array<(number)>; - created_by: string; - created_at: string; - value: { - [key: string]: unknown; - }; - policy: Policy; - execution_mode: 'viewer' | 'publisher' | 'anonymous'; - extra_perms: { - [key: string]: (boolean); - }; - custom_path?: string; -}; - -export type AppWithLastVersionWDraft = AppWithLastVersion & { - draft_only?: boolean; - draft?: unknown; -}; - -export type AppHistory = { - version: number; - deployment_msg?: string; -}; - -export type FlowVersion = { - id: number; - created_at: string; - deployment_msg?: string; -}; - -export type SlackToken = { - access_token: string; - team_id: string; - team_name: string; - bot: { - bot_access_token?: string; - }; -}; - -export type TokenResponse = { - access_token: string; - expires_in?: number; - refresh_token?: string; - scope?: Array<(string)>; -}; - -export type HubScriptKind = unknown; - -export type PolarsClientKwargs = { - region_name: string; -}; - -export type LargeFileStorage = { - type?: 'S3Storage' | 'AzureBlobStorage' | 'AzureWorkloadIdentity' | 'S3AwsOidc'; - s3_resource_path?: string; - azure_blob_resource_path?: string; - public_resource?: boolean; - secondary_storage?: { - [key: string]: { - type?: 'S3Storage' | 'AzureBlobStorage' | 'AzureWorkloadIdentity' | 'S3AwsOidc'; - s3_resource_path?: string; - azure_blob_resource_path?: string; - public_resource?: boolean; - }; - }; -}; - -export type type3 = 'S3Storage' | 'AzureBlobStorage' | 'AzureWorkloadIdentity' | 'S3AwsOidc'; - -export type WindmillLargeFile = { - s3: string; -}; - -export type WindmillFileMetadata = { - mime_type?: string; - size_in_bytes?: number; - last_modified?: string; - expires?: string; - version_id?: string; -}; - -export type WindmillFilePreview = { - msg?: string; - content?: string; - content_type: 'RawText' | 'Csv' | 'Parquet' | 'Unknown'; -}; - -export type content_type = 'RawText' | 'Csv' | 'Parquet' | 'Unknown'; - -export type S3Resource = { - bucket: string; - region: string; - endPoint: string; - useSSL: boolean; - accessKey?: string; - secretKey?: string; - pathStyle: boolean; -}; - -export type WorkspaceGitSyncSettings = { - include_path?: Array<(string)>; - include_type?: Array<('script' | 'flow' | 'app' | 'folder' | 'resource' | 'variable' | 'secret' | 'resourcetype' | 'schedule' | 'user' | 'group')>; - repositories?: Array; -}; - -export type WorkspaceDeployUISettings = { - include_path?: Array<(string)>; - include_type?: Array<('script' | 'flow' | 'app' | 'resource' | 'variable' | 'secret' | 'trigger')>; -}; - -export type WorkspaceDefaultScripts = { - order?: Array<(string)>; - hidden?: Array<(string)>; - default_script_content?: { - [key: string]: (string); - }; -}; - -export type GitRepositorySettings = { - script_path: string; - git_repo_resource_path: string; - use_individual_branch?: boolean; - group_by_folder?: boolean; - exclude_types_override?: Array<('script' | 'flow' | 'app' | 'folder' | 'resource' | 'variable' | 'secret' | 'resourcetype' | 'schedule' | 'user' | 'group')>; -}; - -export type UploadFilePart = { - part_number: number; - tag: string; -}; - -export type MetricMetadata = { - id: string; - name?: string; -}; - -export type ScalarMetric = { - metric_id?: string; - value: number; -}; - -export type TimeseriesMetric = { - metric_id?: string; - values: Array; -}; - -export type MetricDataPoint = { - timestamp: string; - value: number; -}; - -export type RawScriptForDependencies = { - raw_code: string; - path: string; - language: ScriptLang; -}; - -export type ConcurrencyGroup = { - concurrency_key: string; - total_running: number; -}; - -export type ExtendedJobs = { - jobs: Array; - obscured_jobs: Array; - /** - * Obscured jobs omitted for security because of too specific filtering - */ - omitted_obscured_jobs?: boolean; -}; - -export type ExportedUser = { - email: string; - password_hash?: string; - super_admin: boolean; - verified: boolean; - name?: string; - company?: string; - first_time_user: boolean; - username?: string; -}; - -export type GlobalSetting = { - name: string; - value: { - [key: string]: unknown; - }; -}; - -export type Config = { - name: string; - config?: { - [key: string]: unknown; - }; -}; - -export type ExportedInstanceGroup = { - name: string; - summary?: string; - emails?: Array<(string)>; - id?: string; - scim_display_name?: string; - external_id?: string; -}; - -export type JobSearchHit = { - dancer?: string; -}; - -export type LogSearchHit = { - dancer?: string; -}; - -export type AutoscalingEvent = { - id?: number; - worker_group?: string; - event_type?: string; - desired_workers?: number; - reason?: string; - applied_at?: string; -}; - -export type CriticalAlert = { - /** - * Unique identifier for the alert - */ - id?: number; - /** - * Type of alert (e.g., critical_error) - */ - alert_type?: string; - /** - * The message content of the alert - */ - message?: string; - /** - * Time when the alert was created - */ - created_at?: string; - /** - * Acknowledgment status of the alert, can be true, false, or null if not set - */ - acknowledged?: (boolean) | null; - /** - * Workspace id if the alert is in the scope of a workspace - */ - workspace_id?: (string) | null; -}; - -export type CaptureTriggerKind = 'webhook' | 'http' | 'websocket' | 'kafka' | 'email' | 'nats' | 'postgres' | 'sqs' | 'mqtt' | 'gcp'; - -export type Capture = { - trigger_kind: CaptureTriggerKind; - payload: unknown; - trigger_extra?: unknown; - id: number; - created_at: string; -}; - -export type CaptureConfig = { - trigger_config?: unknown; - trigger_kind: CaptureTriggerKind; - error?: string; - last_server_ping?: string; -}; - -export type OperatorSettings = { - /** - * Whether operators can view runs - */ - runs: boolean; - /** - * Whether operators can view schedules - */ - schedules: boolean; - /** - * Whether operators can view resources - */ - resources: boolean; - /** - * Whether operators can view variables - */ - variables: boolean; - /** - * Whether operators can view audit logs - */ - audit_logs: boolean; - /** - * Whether operators can view triggers - */ - triggers: boolean; - /** - * Whether operators can view groups page - */ - groups: boolean; - /** - * Whether operators can view folders page - */ - folders: boolean; - /** - * Whether operators can view workers page - */ - workers: boolean; -} | null; - -export type TeamInfo = { - /** - * The unique identifier of the Microsoft Teams team - */ - team_id: string; - /** - * The display name of the Microsoft Teams team - */ - team_name: string; - /** - * List of channels within the team - */ - channels: Array; -}; - -export type ChannelInfo = { - /** - * The unique identifier of the channel - */ - channel_id: string; - /** - * The display name of the channel - */ - channel_name: string; - /** - * The Microsoft Teams tenant identifier - */ - tenant_id: string; - /** - * The service URL for the channel - */ - service_url: string; -}; - -export type GithubInstallations = Array<{ - workspace_id?: string; - installation_id: number; - account_id: string; - repositories: Array<{ - name: string; - url: string; - }>; -}>; - -export type WorkspaceGithubInstallation = { - account_id: string; - installation_id: number; -}; - -export type OpenFlow = { - summary: string; - description?: string; - value: FlowValue; - schema?: { - [key: string]: unknown; - }; -}; - -export type FlowValue = { - modules: Array; - failure_module?: FlowModule; - preprocessor_module?: FlowModule; - same_worker?: boolean; - concurrent_limit?: number; - concurrency_key?: string; - concurrency_time_window_s?: number; - skip_expr?: string; - cache_ttl?: number; - priority?: number; - early_return?: string; -}; - -export type Retry = { - constant?: { - attempts?: number; - seconds?: number; - }; - exponential?: { - attempts?: number; - multiplier?: number; - seconds?: number; - random_factor?: number; - }; -}; - -export type FlowModule = { - id: string; - value: FlowModuleValue; - stop_after_if?: { - skip_if_stopped?: boolean; - expr: string; - }; - stop_after_all_iters_if?: { - skip_if_stopped?: boolean; - expr: string; - }; - skip_if?: { - expr: string; - }; - sleep?: InputTransform; - cache_ttl?: number; - timeout?: number; - delete_after_use?: boolean; - summary?: string; - mock?: { - enabled?: boolean; - return_value?: unknown; - }; - suspend?: { - required_events?: number; - timeout?: number; - resume_form?: { - schema?: { - [key: string]: unknown; - }; - }; - user_auth_required?: boolean; - user_groups_required?: InputTransform; - self_approval_disabled?: boolean; - hide_cancel?: boolean; - continue_on_disapprove_timeout?: boolean; - }; - priority?: number; - continue_on_error?: boolean; - retry?: Retry; -}; - -export type InputTransform = StaticTransform | JavascriptTransform; - -export type StaticTransform = { - value?: unknown; - type: 'static'; -}; - -export type JavascriptTransform = { - expr: string; - type: 'javascript'; -}; - -export type FlowModuleValue = RawScript | PathScript | PathFlow | ForloopFlow | WhileloopFlow | BranchOne | BranchAll | Identity; - -export type RawScript = { - input_transforms: { - [key: string]: InputTransform; - }; - content: string; - language: 'deno' | 'bun' | 'python3' | 'go' | 'bash' | 'powershell' | 'postgresql' | 'mysql' | 'bigquery' | 'snowflake' | 'mssql' | 'oracledb' | 'graphql' | 'nativets' | 'php'; - path?: string; - lock?: string; - type: 'rawscript'; - tag?: string; - concurrent_limit?: number; - concurrency_time_window_s?: number; - custom_concurrency_key?: string; - is_trigger?: boolean; -}; - -export type language = 'deno' | 'bun' | 'python3' | 'go' | 'bash' | 'powershell' | 'postgresql' | 'mysql' | 'bigquery' | 'snowflake' | 'mssql' | 'oracledb' | 'graphql' | 'nativets' | 'php'; - -export type PathScript = { - input_transforms: { - [key: string]: InputTransform; - }; - path: string; - hash?: string; - type: 'script'; - tag_override?: string; - is_trigger?: boolean; -}; - -export type PathFlow = { - input_transforms: { - [key: string]: InputTransform; - }; - path: string; - type: 'flow'; -}; - -export type ForloopFlow = { - modules: Array; - iterator: InputTransform; - skip_failures: boolean; - type: 'forloopflow'; - parallel?: boolean; - parallelism?: number; -}; - -export type WhileloopFlow = { - modules: Array; - skip_failures: boolean; - type: 'whileloopflow'; - parallel?: boolean; - parallelism?: number; -}; - -export type BranchOne = { - branches: Array<{ - summary?: string; - expr: string; - modules: Array; - }>; - default: Array; - type: 'branchone'; -}; - -export type BranchAll = { - branches: Array<{ - summary?: string; - skip_failure?: boolean; - modules: Array; - }>; - type: 'branchall'; - parallel?: boolean; -}; - -export type Identity = { - type: 'identity'; - flow?: boolean; -}; - -export type FlowStatus = { - step: number; - modules: Array; - user_states?: { - [key: string]: unknown; - }; - preprocessor_module?: (FlowStatusModule); - failure_module: (FlowStatusModule & { - parent_module?: string; -}); - retry?: { - fail_count?: number; - failed_jobs?: Array<(string)>; - }; -}; - -export type FlowStatusModule = { - type: 'WaitingForPriorSteps' | 'WaitingForEvents' | 'WaitingForExecutor' | 'InProgress' | 'Success' | 'Failure'; - id?: string; - job?: string; - count?: number; - progress?: number; - iterator?: { - index?: number; - itered?: Array; - args?: unknown; - }; - flow_jobs?: Array<(string)>; - flow_jobs_success?: Array<(boolean)>; - branch_chosen?: { - type: 'branch' | 'default'; - branch?: number; - }; - branchall?: { - branch: number; - len: number; - }; - approvers?: Array<{ - resume_id: number; - approver: string; - }>; - failed_retries?: Array<(string)>; - skipped?: boolean; -}; - -export type type4 = 'WaitingForPriorSteps' | 'WaitingForEvents' | 'WaitingForExecutor' | 'InProgress' | 'Success' | 'Failure'; - -export type ParameterId = string; - -export type ParameterKey = string; - -export type ParameterWorkspaceId = string; - -export type ParameterPublicationName = string; - -export type ParameterVersionId = number; - -export type ParameterToken = string; - -export type ParameterAccountId = number; - -export type ParameterClientName = string; - -export type ParameterScriptPath = string; - -export type ParameterScriptHash = string; - -export type ParameterJobId = string; - -export type ParameterPath = string; - -export type ParameterCustomPath = string; - -export type ParameterPathId = number; - -export type ParameterPathVersion = number; - -export type ParameterName = string; - -/** - * which page to return (start at 1, default 1) - */ -export type ParameterPage = number; - -/** - * number of items to return for a given page (default 30, max 100) - */ -export type ParameterPerPage = number; - -/** - * order by desc order (default true) - */ -export type ParameterOrderDesc = boolean; - -/** - * mask to filter exact matching user creator - */ -export type ParameterCreatedBy = string; - -/** - * mask to filter exact matching job's label (job labels are completed jobs with as a result an object containing a string in the array at key 'wm_labels') - */ -export type ParameterLabel = string; - -/** - * worker this job was ran on - */ -export type ParameterWorker = string; - -/** - * The parent job that is at the origin and responsible for the execution of this script if any - */ -export type ParameterParentJob = string; - -/** - * Override the tag to use - */ -export type ParameterWorkerTag = string; - -/** - * Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl - */ -export type ParameterCacheTtl = string; - -/** - * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) - */ -export type ParameterNewJobId = string; - -/** - * List of headers's keys (separated with ',') whove value are added to the args - * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key - * - */ -export type ParameterIncludeHeader = string; - -/** - * The maximum size of the queue for which the request would get rejected if that job would push it above that limit - * - */ -export type ParameterQueueLimit = string; - -/** - * The base64 encoded payload that has been encoded as a JSON. e.g how to encode such payload encodeURIComponent - * `encodeURIComponent(btoa(JSON.stringify({a: 2})))` - * - */ -export type ParameterPayload = string; - -/** - * mask to filter matching starting path - */ -export type ParameterScriptStartPath = string; - -/** - * mask to filter by schedule path - */ -export type ParameterSchedulePath = string; - -/** - * mask to filter exact matching path - */ -export type ParameterScriptExactPath = string; - -/** - * mask to filter exact matching path - */ -export type ParameterScriptExactHash = string; - -/** - * filter on created before (inclusive) timestamp - */ -export type ParameterCreatedBefore = string; - -/** - * filter on created after (exclusive) timestamp - */ -export type ParameterCreatedAfter = string; - -/** - * filter on started before (inclusive) timestamp - */ -export type ParameterStartedBefore = string; - -/** - * filter on started after (exclusive) timestamp - */ -export type ParameterStartedAfter = string; - -/** - * filter on started before (inclusive) timestamp - */ -export type ParameterBefore = string; - -/** - * filter on created_at for non non started job and started_at otherwise after (exclusive) timestamp - */ -export type ParameterCreatedOrStartedAfter = string; - -/** - * filter on created_at for non non started job and started_at otherwise after (exclusive) timestamp but only for the completed jobs - */ -export type ParameterCreatedOrStartedAfterCompletedJob = string; - -/** - * filter on created_at for non non started job and started_at otherwise before (inclusive) timestamp - */ -export type ParameterCreatedOrStartedBefore = string; - -/** - * filter on successful jobs - */ -export type ParameterSuccess = boolean; - -/** - * filter on jobs scheduled_for before now (hence waitinf for a worker) - */ -export type ParameterScheduledForBeforeNow = boolean; - -/** - * filter on suspended jobs - */ -export type ParameterSuspended = boolean; - -/** - * filter on running jobs - */ -export type ParameterRunning = boolean; - -/** - * allow wildcards (*) in the filter of label, tag, worker - */ -export type ParameterAllowWildcards = boolean; - -/** - * filter on jobs containing those args as a json subset (@> in postgres) - */ -export type ParameterArgsFilter = string; - -/** - * filter on jobs with a given tag/worker group - */ -export type ParameterTag = string; - -/** - * filter on jobs containing those result as a json subset (@> in postgres) - */ -export type ParameterResultFilter = string; - -/** - * filter on created after (exclusive) timestamp - */ -export type ParameterAfter = string; - -/** - * filter on exact username of user - */ -export type ParameterUsername = string; - -/** - * filter on exact or prefix name of operation - */ -export type ParameterOperation = string; - -/** - * filter on exact or prefix name of resource - */ -export type ParameterResourceName = string; - -/** - * filter on type of operation - */ -export type ParameterActionKind = 'Create' | 'Update' | 'Delete' | 'Execute'; - -/** - * filter on job kind (values 'preview', 'script', 'dependencies', 'flow') separated by, - */ -export type ParameterJobKinds = string; - -export type ParameterRunnableId = string; - -export type ParameterRunnableTypeQuery = RunnableType; - -export type ParameterInputId = string; - -export type ParameterGetStarted = boolean; - -export type ParameterConcurrencyId = string; - -export type ParameterRunnableKind = 'script' | 'flow'; - -export type BackendVersionResponse = (string); - -export type BackendUptodateResponse = (string); - -export type GetLicenseIdResponse = (string); - -export type GetOpenApiYamlResponse = (string); - -export type GetAuditLogData = { - id: number; - workspace: string; -}; - -export type GetAuditLogResponse = (AuditLog); - -export type ListAuditLogsData = { - /** - * filter on type of operation - */ - actionKind?: 'Create' | 'Update' | 'Delete' | 'Execute'; - /** - * filter on created after (exclusive) timestamp - */ - after?: string; - /** - * get audit logs for all workspaces - */ - allWorkspaces?: boolean; - /** - * filter on started before (inclusive) timestamp - */ - before?: string; - /** - * comma separated list of operations to exclude - */ - excludeOperations?: string; - /** - * filter on exact or prefix name of operation - */ - operation?: string; - /** - * comma separated list of exact operations to include - */ - operations?: string; - /** - * which page to return (start at 1, default 1) - */ - page?: number; - /** - * number of items to return for a given page (default 30, max 100) - */ - perPage?: number; - /** - * filter on exact or prefix name of resource - */ - resource?: string; - /** - * filter on exact username of user - */ - username?: string; - workspace: string; -}; - -export type ListAuditLogsResponse = (Array); - -export type LoginData = { - /** - * credentials - */ - requestBody: Login; -}; - -export type LoginResponse = (string); - -export type LogoutResponse = (string); - -export type GetUserData = { - username: string; - workspace: string; -}; - -export type GetUserResponse = (User); - -export type UpdateUserData = { - /** - * new user - */ - requestBody: EditWorkspaceUser; - username: string; - workspace: string; -}; - -export type UpdateUserResponse = (string); - -export type IsOwnerOfPathData = { - path: string; - workspace: string; -}; - -export type IsOwnerOfPathResponse = (boolean); - -export type SetPasswordData = { - /** - * set password - */ - requestBody: { - password: string; - }; -}; - -export type SetPasswordResponse = (string); - -export type SetPasswordForUserData = { - /** - * set password - */ - requestBody: { - password: string; - }; - user: string; -}; - -export type SetPasswordForUserResponse = (string); - -export type SetLoginTypeForUserData = { - /** - * set login type - */ - requestBody: { - login_type: string; - }; - user: string; -}; - -export type SetLoginTypeForUserResponse = (string); - -export type CreateUserGloballyData = { - /** - * user info - */ - requestBody: { - email: string; - password: string; - super_admin: boolean; - name?: string; - company?: string; - }; -}; - -export type CreateUserGloballyResponse = (string); - -export type GlobalUserUpdateData = { - email: string; - /** - * new user info - */ - requestBody: { - is_super_admin?: boolean; - is_devops?: boolean; - name?: string; - }; -}; - -export type GlobalUserUpdateResponse = (string); - -export type GlobalUsernameInfoData = { - email: string; -}; - -export type GlobalUsernameInfoResponse = ({ - username: string; - workspace_usernames: Array<{ - workspace_id: string; - username: string; - }>; -}); - -export type GlobalUserRenameData = { - email: string; - /** - * new username - */ - requestBody: { - new_username: string; - }; -}; - -export type GlobalUserRenameResponse = (string); - -export type GlobalUserDeleteData = { - email: string; -}; - -export type GlobalUserDeleteResponse = (string); - -export type GlobalUsersOverwriteData = { - /** - * List of users - */ - requestBody: Array; -}; - -export type GlobalUsersOverwriteResponse = (string); - -export type GlobalUsersExportResponse = (Array); - -export type DeleteUserData = { - username: string; - workspace: string; -}; - -export type DeleteUserResponse = (string); - -export type GetGlobalConnectedRepositoriesResponse = (GithubInstallations); - -export type ListWorkspacesResponse = (Array); - -export type IsDomainAllowedResponse = (boolean); - -export type ListUserWorkspacesResponse = (UserWorkspaceList); - -export type ListWorkspacesAsSuperAdminData = { - /** - * which page to return (start at 1, default 1) - */ - page?: number; - /** - * number of items to return for a given page (default 30, max 100) - */ - perPage?: number; -}; - -export type ListWorkspacesAsSuperAdminResponse = (Array); - -export type CreateWorkspaceData = { - /** - * new token - */ - requestBody: CreateWorkspace; -}; - -export type CreateWorkspaceResponse = (string); - -export type ExistsWorkspaceData = { - /** - * id of workspace - */ - requestBody: { - id: string; - }; -}; - -export type ExistsWorkspaceResponse = (boolean); - -export type ExistsUsernameData = { - requestBody: { - id: string; - username: string; - }; -}; - -export type ExistsUsernameResponse = (boolean); - -export type GetGlobalData = { - key: string; -}; - -export type GetGlobalResponse = (unknown); - -export type SetGlobalData = { - key: string; - /** - * value set - */ - requestBody: { - value?: unknown; - }; -}; - -export type SetGlobalResponse = (string); - -export type GetLocalResponse = (unknown); - -export type TestSmtpData = { - /** - * test smtp payload - */ - requestBody: { - to: string; - smtp: { - host: string; - username: string; - password: string; - port: number; - from: string; - tls_implicit: boolean; - disable_tls: boolean; - }; - }; -}; - -export type TestSmtpResponse = (string); - -export type TestCriticalChannelsData = { - /** - * test critical channel payload - */ - requestBody: Array<{ - email?: string; - slack_channel?: string; - }>; -}; - -export type TestCriticalChannelsResponse = (string); - -export type GetCriticalAlertsData = { - acknowledged?: (boolean) | null; - page?: number; - pageSize?: number; -}; - -export type GetCriticalAlertsResponse = ({ - alerts?: Array; - /** - * Total number of rows matching the query. - */ - total_rows?: number; - /** - * Total number of pages based on the page size. - */ - total_pages?: number; -}); - -export type AcknowledgeCriticalAlertData = { - /** - * The ID of the critical alert to acknowledge - */ - id: number; -}; - -export type AcknowledgeCriticalAlertResponse = (string); - -export type AcknowledgeAllCriticalAlertsResponse = (string); - -export type TestLicenseKeyData = { - /** - * test license key - */ - requestBody: { - license_key: string; - }; -}; - -export type TestLicenseKeyResponse = (string); - -export type TestObjectStorageConfigData = { - /** - * test object storage config - */ - requestBody: { - [key: string]: unknown; - }; -}; - -export type TestObjectStorageConfigResponse = (string); - -export type SendStatsResponse = (string); - -export type GetLatestKeyRenewalAttemptResponse = ({ - result: string; - attempted_at: string; -} | null); - -export type RenewLicenseKeyData = { - licenseKey?: string; -}; - -export type RenewLicenseKeyResponse = (string); - -export type CreateCustomerPortalSessionData = { - licenseKey?: string; -}; - -export type CreateCustomerPortalSessionResponse = (string); - -export type TestMetadataData = { - /** - * test metadata - */ - requestBody: string; -}; - -export type TestMetadataResponse = (string); - -export type ListGlobalSettingsResponse = (Array); - -export type GetCurrentEmailResponse = (string); - -export type RefreshUserTokenData = { - ifExpiringInLessThanS?: number; -}; - -export type RefreshUserTokenResponse = (string); - -export type GetTutorialProgressResponse = ({ - progress?: number; -}); - -export type UpdateTutorialProgressData = { - /** - * progress update - */ - requestBody: { - progress?: number; - }; -}; - -export type UpdateTutorialProgressResponse = (string); - -export type LeaveInstanceResponse = (string); - -export type GetUsageResponse = (number); - -export type GetRunnableResponse = ({ - workspace: string; - endpoint_async: string; - endpoint_sync: string; - endpoint_openai_sync: string; - summary: string; - description?: string; - kind: string; -}); - -export type GlobalWhoamiResponse = (GlobalUserInfo); - -export type ListWorkspaceInvitesResponse = (Array); - -export type WhoamiData = { - workspace: string; -}; - -export type WhoamiResponse = (User); - -export type GetGithubAppTokenData = { - /** - * jwt job token - */ - requestBody: { - job_token: string; - }; - workspace: string; -}; - -export type GetGithubAppTokenResponse = ({ - token: string; -}); - -export type InstallFromWorkspaceData = { - requestBody: { - /** - * The ID of the workspace containing the installation to copy - */ - source_workspace_id: string; - /** - * The ID of the GitHub installation to copy - */ - installation_id: number; - }; - workspace: string; -}; - -export type InstallFromWorkspaceResponse = (unknown); - -export type DeleteFromWorkspaceData = { - /** - * The ID of the GitHub installation to delete - */ - installationId: number; - workspace: string; -}; - -export type DeleteFromWorkspaceResponse = (unknown); - -export type ExportInstallationData = { - installationId: number; - workspace: string; -}; - -export type ExportInstallationResponse = ({ - jwt_token?: string; -}); - -export type ImportInstallationData = { - requestBody: { - jwt_token: string; - }; - workspace: string; -}; - -export type ImportInstallationResponse = (unknown); - -export type AcceptInviteData = { - /** - * accept invite - */ - requestBody: { - workspace_id: string; - username?: string; - }; -}; - -export type AcceptInviteResponse = (string); - -export type DeclineInviteData = { - /** - * decline invite - */ - requestBody: { - workspace_id: string; - }; -}; - -export type DeclineInviteResponse = (string); - -export type InviteUserData = { - /** - * WorkspaceInvite - */ - requestBody: { - email: string; - is_admin: boolean; - operator: boolean; - }; - workspace: string; -}; - -export type InviteUserResponse = (string); - -export type AddUserData = { - /** - * WorkspaceInvite - */ - requestBody: { - email: string; - is_admin: boolean; - username?: string; - operator: boolean; - }; - workspace: string; -}; - -export type AddUserResponse = (string); - -export type DeleteInviteData = { - /** - * WorkspaceInvite - */ - requestBody: { - email: string; - is_admin: boolean; - operator: boolean; - }; - workspace: string; -}; - -export type DeleteInviteResponse = (string); - -export type ArchiveWorkspaceData = { - workspace: string; -}; - -export type ArchiveWorkspaceResponse = (string); - -export type UnarchiveWorkspaceData = { - workspace: string; -}; - -export type UnarchiveWorkspaceResponse = (string); - -export type DeleteWorkspaceData = { - workspace: string; -}; - -export type DeleteWorkspaceResponse = (string); - -export type LeaveWorkspaceData = { - workspace: string; -}; - -export type LeaveWorkspaceResponse = (string); - -export type GetWorkspaceNameData = { - workspace: string; -}; - -export type GetWorkspaceNameResponse = (string); - -export type ChangeWorkspaceNameData = { - requestBody?: { - new_name?: string; - }; - workspace: string; -}; - -export type ChangeWorkspaceNameResponse = (string); - -export type ChangeWorkspaceIdData = { - requestBody?: { - new_id?: string; - new_name?: string; - }; - workspace: string; -}; - -export type ChangeWorkspaceIdResponse = (string); - -export type ChangeWorkspaceColorData = { - requestBody?: { - color?: string; - }; - workspace: string; -}; - -export type ChangeWorkspaceColorResponse = (string); - -export type WhoisData = { - username: string; - workspace: string; -}; - -export type WhoisResponse = (User); - -export type UpdateOperatorSettingsData = { - requestBody: OperatorSettings; - workspace: string; -}; - -export type UpdateOperatorSettingsResponse = (string); - -export type ExistsEmailData = { - email: string; -}; - -export type ExistsEmailResponse = (boolean); - -export type ListUsersAsSuperAdminData = { - /** - * filter only active users - */ - activeOnly?: boolean; - /** - * which page to return (start at 1, default 1) - */ - page?: number; - /** - * number of items to return for a given page (default 30, max 100) - */ - perPage?: number; -}; - -export type ListUsersAsSuperAdminResponse = (Array); - -export type ListPendingInvitesData = { - workspace: string; -}; - -export type ListPendingInvitesResponse = (Array); - -export type GetSettingsData = { - workspace: string; -}; - -export type GetSettingsResponse = ({ - workspace_id?: string; - slack_name?: string; - slack_team_id?: string; - slack_command_script?: string; - teams_team_id?: string; - teams_command_script?: string; - teams_team_name?: string; - auto_invite_domain?: string; - auto_invite_operator?: boolean; - auto_add?: boolean; - plan?: string; - customer_id?: string; - webhook?: string; - deploy_to?: string; - ai_config?: AIConfig; - error_handler?: string; - error_handler_extra_args?: ScriptArgs; - error_handler_muted_on_cancel: boolean; - large_file_storage?: LargeFileStorage; - git_sync?: WorkspaceGitSyncSettings; - deploy_ui?: WorkspaceDeployUISettings; - default_app?: string; - default_scripts?: WorkspaceDefaultScripts; - mute_critical_alerts?: boolean; - color?: string; - operator_settings?: OperatorSettings; -}); - -export type GetDeployToData = { - workspace: string; -}; - -export type GetDeployToResponse = ({ - deploy_to?: string; -}); - -export type GetIsPremiumData = { - workspace: string; -}; - -export type GetIsPremiumResponse = (boolean); - -export type GetPremiumInfoData = { - workspace: string; -}; - -export type GetPremiumInfoResponse = ({ - premium: boolean; - usage?: number; - owner: string; - status?: string; -}); - -export type GetThresholdAlertData = { - workspace: string; -}; - -export type GetThresholdAlertResponse = ({ - threshold_alert_amount?: number; - last_alert_sent?: string; -}); - -export type SetThresholdAlertData = { - /** - * threshold alert info - */ - requestBody: { - threshold_alert_amount?: number; - }; - workspace: string; -}; - -export type SetThresholdAlertResponse = (string); - -export type EditSlackCommandData = { - /** - * WorkspaceInvite - */ - requestBody: { - slack_command_script?: string; - }; - workspace: string; -}; - -export type EditSlackCommandResponse = (string); - -export type EditTeamsCommandData = { - /** - * WorkspaceInvite - */ - requestBody: { - slack_command_script?: string; - }; - workspace: string; -}; - -export type EditTeamsCommandResponse = (string); - -export type ListAvailableTeamsIdsData = { - workspace: string; -}; - -export type ListAvailableTeamsIdsResponse = (Array<{ - team_name?: string; - team_id?: string; -}>); - -export type ListAvailableTeamsChannelsData = { - workspace: string; -}; - -export type ListAvailableTeamsChannelsResponse = (Array<{ - channel_name?: string; - channel_id?: string; - service_url?: string; - tenant_id?: string; -}>); - -export type ConnectTeamsData = { - /** - * connect teams - */ - requestBody: { - team_id?: string; - team_name?: string; - }; - workspace: string; -}; - -export type ConnectTeamsResponse = (string); - -export type RunSlackMessageTestJobData = { - /** - * path to hub script to run and its corresponding args - */ - requestBody: { - hub_script_path?: string; - channel?: string; - test_msg?: string; - }; - workspace: string; -}; - -export type RunSlackMessageTestJobResponse = ({ - job_uuid?: string; -}); - -export type RunTeamsMessageTestJobData = { - /** - * path to hub script to run and its corresponding args - */ - requestBody: { - hub_script_path?: string; - channel?: string; - test_msg?: string; - }; - workspace: string; -}; - -export type RunTeamsMessageTestJobResponse = ({ - job_uuid?: string; -}); - -export type EditDeployToData = { - requestBody: { - deploy_to?: string; - }; - workspace: string; -}; - -export type EditDeployToResponse = (string); - -export type EditAutoInviteData = { - /** - * WorkspaceInvite - */ - requestBody: { - operator?: boolean; - invite_all?: boolean; - auto_add?: boolean; - }; - workspace: string; -}; - -export type EditAutoInviteResponse = (string); - -export type EditWebhookData = { - /** - * WorkspaceWebhook - */ - requestBody: { - webhook?: string; - }; - workspace: string; -}; - -export type EditWebhookResponse = (string); - -export type EditCopilotConfigData = { - /** - * WorkspaceCopilotConfig - */ - requestBody: AIConfig; - workspace: string; -}; - -export type EditCopilotConfigResponse = (string); - -export type GetCopilotInfoData = { - workspace: string; -}; - -export type GetCopilotInfoResponse = (AIConfig); - -export type EditErrorHandlerData = { - /** - * WorkspaceErrorHandler - */ - requestBody: { - error_handler?: string; - error_handler_extra_args?: ScriptArgs; - error_handler_muted_on_cancel?: boolean; - }; - workspace: string; -}; - -export type EditErrorHandlerResponse = (string); - -export type EditLargeFileStorageConfigData = { - /** - * LargeFileStorage info - */ - requestBody: { - large_file_storage?: LargeFileStorage; - }; - workspace: string; -}; - -export type EditLargeFileStorageConfigResponse = (unknown); - -export type EditWorkspaceGitSyncConfigData = { - /** - * Workspace Git sync settings - */ - requestBody: { - git_sync_settings?: WorkspaceGitSyncSettings; - }; - workspace: string; -}; - -export type EditWorkspaceGitSyncConfigResponse = (unknown); - -export type EditWorkspaceDeployUiSettingsData = { - /** - * Workspace deploy UI settings - */ - requestBody: { - deploy_ui_settings?: WorkspaceDeployUISettings; - }; - workspace: string; -}; - -export type EditWorkspaceDeployUiSettingsResponse = (unknown); - -export type EditWorkspaceDefaultAppData = { - /** - * Workspace default app - */ - requestBody: { - default_app_path?: string; - }; - workspace: string; -}; - -export type EditWorkspaceDefaultAppResponse = (string); - -export type EditDefaultScriptsData = { - /** - * Workspace default app - */ - requestBody?: WorkspaceDefaultScripts; - workspace: string; -}; - -export type EditDefaultScriptsResponse = (string); - -export type GetDefaultScriptsData = { - workspace: string; -}; - -export type GetDefaultScriptsResponse = (WorkspaceDefaultScripts); - -export type SetEnvironmentVariableData = { - /** - * Workspace default app - */ - requestBody: { - name: string; - value?: string; - }; - workspace: string; -}; - -export type SetEnvironmentVariableResponse = (string); - -export type GetWorkspaceEncryptionKeyData = { - workspace: string; -}; - -export type GetWorkspaceEncryptionKeyResponse = ({ - key: string; -}); - -export type SetWorkspaceEncryptionKeyData = { - /** - * New encryption key - */ - requestBody: { - new_key: string; - skip_reencrypt?: boolean; - }; - workspace: string; -}; - -export type SetWorkspaceEncryptionKeyResponse = (string); - -export type GetWorkspaceDefaultAppData = { - workspace: string; -}; - -export type GetWorkspaceDefaultAppResponse = ({ - default_app_path?: string; -}); - -export type GetLargeFileStorageConfigData = { - workspace: string; -}; - -export type GetLargeFileStorageConfigResponse = (LargeFileStorage); - -export type GetWorkspaceUsageData = { - workspace: string; -}; - -export type GetWorkspaceUsageResponse = (number); - -export type GetUsedTriggersData = { - workspace: string; -}; - -export type GetUsedTriggersResponse = ({ - http_routes_used: boolean; - websocket_used: boolean; - kafka_used: boolean; - nats_used: boolean; - postgres_used: boolean; - mqtt_used: boolean; - gcp_used: boolean; - sqs_used: boolean; -}); - -export type ListUsersData = { - workspace: string; -}; - -export type ListUsersResponse = (Array); - -export type ListUsersUsageData = { - workspace: string; -}; - -export type ListUsersUsageResponse = (Array); - -export type ListUsernamesData = { - workspace: string; -}; - -export type ListUsernamesResponse = (Array<(string)>); - -export type UsernameToEmailData = { - username: string; - workspace: string; -}; - -export type UsernameToEmailResponse = (string); - -export type CreateTokenData = { - /** - * new token - */ - requestBody: NewToken; -}; - -export type CreateTokenResponse = (string); - -export type CreateTokenImpersonateData = { - /** - * new token - */ - requestBody: NewTokenImpersonate; -}; - -export type CreateTokenImpersonateResponse = (string); - -export type DeleteTokenData = { - tokenPrefix: string; -}; - -export type DeleteTokenResponse = (string); - -export type ListTokensData = { - excludeEphemeral?: boolean; - /** - * which page to return (start at 1, default 1) - */ - page?: number; - /** - * number of items to return for a given page (default 30, max 100) - */ - perPage?: number; -}; - -export type ListTokensResponse = (Array); - -export type GetOidcTokenData = { - audience: string; - workspace: string; -}; - -export type GetOidcTokenResponse = (string); - -export type CreateVariableData = { - alreadyEncrypted?: boolean; - /** - * new variable - */ - requestBody: CreateVariable; - workspace: string; -}; - -export type CreateVariableResponse = (string); - -export type EncryptValueData = { - /** - * new variable - */ - requestBody: string; - workspace: string; -}; - -export type EncryptValueResponse = (string); - -export type DeleteVariableData = { - path: string; - workspace: string; -}; - -export type DeleteVariableResponse = (string); - -export type UpdateVariableData = { - alreadyEncrypted?: boolean; - path: string; - /** - * updated variable - */ - requestBody: EditVariable; - workspace: string; -}; - -export type UpdateVariableResponse = (string); - -export type GetVariableData = { - /** - * ask to decrypt secret if this variable is secret - * (if not secret no effect, default: true) - * - */ - decryptSecret?: boolean; - /** - * ask to include the encrypted value if secret and decrypt secret is not true (default: false) - * - */ - includeEncrypted?: boolean; - path: string; - workspace: string; -}; - -export type GetVariableResponse = (ListableVariable); - -export type GetVariableValueData = { - path: string; - workspace: string; -}; - -export type GetVariableValueResponse = (string); - -export type ExistsVariableData = { - path: string; - workspace: string; -}; - -export type ExistsVariableResponse = (boolean); - -export type ListVariableData = { - /** - * which page to return (start at 1, default 1) - */ - page?: number; - pathStart?: string; - /** - * number of items to return for a given page (default 30, max 100) - */ - perPage?: number; - workspace: string; -}; - -export type ListVariableResponse = (Array); - -export type ListContextualVariablesData = { - workspace: string; -}; - -export type ListContextualVariablesResponse = (Array); - -export type WorkspaceGetCriticalAlertsData = { - acknowledged?: (boolean) | null; - page?: number; - pageSize?: number; - workspace: string; -}; - -export type WorkspaceGetCriticalAlertsResponse = ({ - alerts?: Array; - /** - * Total number of rows matching the query. - */ - total_rows?: number; - /** - * Total number of pages based on the page size. - */ - total_pages?: number; -}); - -export type WorkspaceAcknowledgeCriticalAlertData = { - /** - * The ID of the critical alert to acknowledge - */ - id: number; - workspace: string; -}; - -export type WorkspaceAcknowledgeCriticalAlertResponse = (string); - -export type WorkspaceAcknowledgeAllCriticalAlertsData = { - workspace: string; -}; - -export type WorkspaceAcknowledgeAllCriticalAlertsResponse = (string); - -export type WorkspaceMuteCriticalAlertsUiData = { - /** - * Boolean flag to mute critical alerts. - */ - requestBody: { - /** - * Whether critical alerts should be muted. - */ - mute_critical_alerts?: boolean; - }; - workspace: string; -}; - -export type WorkspaceMuteCriticalAlertsUiResponse = (string); - -export type LoginWithOauthData = { - clientName: string; - /** - * Partially filled script - */ - requestBody: { - code?: string; - state?: string; - }; -}; - -export type LoginWithOauthResponse = (string); - -export type ConnectSlackCallbackData = { - /** - * code endpoint - */ - requestBody: { - code: string; - state: string; - }; - workspace: string; -}; - -export type ConnectSlackCallbackResponse = (string); - -export type ConnectSlackCallbackInstanceData = { - /** - * code endpoint - */ - requestBody: { - code: string; - state: string; - }; -}; - -export type ConnectSlackCallbackInstanceResponse = (string); - -export type ConnectCallbackData = { - clientName: string; - /** - * code endpoint - */ - requestBody: { - code: string; - state: string; - }; -}; - -export type ConnectCallbackResponse = (TokenResponse); - -export type CreateAccountData = { - /** - * code endpoint - */ - requestBody: { - refresh_token?: string; - expires_in: number; - client: string; - }; - workspace: string; -}; - -export type CreateAccountResponse = (string); - -export type RefreshTokenData = { - id: number; - /** - * variable path - */ - requestBody: { - path: string; - }; - workspace: string; -}; - -export type RefreshTokenResponse = (string); - -export type DisconnectAccountData = { - id: number; - workspace: string; -}; - -export type DisconnectAccountResponse = (string); - -export type DisconnectSlackData = { - workspace: string; -}; - -export type DisconnectSlackResponse = (string); - -export type DisconnectTeamsData = { - workspace: string; -}; - -export type DisconnectTeamsResponse = (string); - -export type ListOauthLoginsResponse = ({ - oauth: Array<{ - type: string; - display_name?: string; - }>; - saml?: string; -}); - -export type ListOauthConnectsResponse = (Array<(string)>); - -export type GetOauthConnectData = { - /** - * client name - */ - client: string; -}; - -export type GetOauthConnectResponse = ({ - extra_params?: { - [key: string]: unknown; - }; - scopes?: Array<(string)>; -}); - -export type SyncTeamsResponse = (Array); - -export type SendMessageToConversationData = { - requestBody: { - /** - * The ID of the Teams conversation/activity - */ - conversation_id: string; - /** - * Used for styling the card conditionally - */ - success?: boolean; - /** - * The message text to be sent in the Teams card - */ - text: string; - /** - * The card block to be sent in the Teams card - */ - card_block?: { - [key: string]: unknown; - }; - }; -}; - -export type SendMessageToConversationResponse = (unknown); - -export type CreateResourceData = { - /** - * new resource - */ - requestBody: CreateResource; - updateIfExists?: boolean; - workspace: string; -}; - -export type CreateResourceResponse = (string); - -export type DeleteResourceData = { - path: string; - workspace: string; -}; - -export type DeleteResourceResponse = (string); - -export type UpdateResourceData = { - path: string; - /** - * updated resource - */ - requestBody: EditResource; - workspace: string; -}; - -export type UpdateResourceResponse = (string); - -export type UpdateResourceValueData = { - path: string; - /** - * updated resource - */ - requestBody: { - value?: unknown; - }; - workspace: string; -}; - -export type UpdateResourceValueResponse = (string); - -export type GetResourceData = { - path: string; - workspace: string; -}; - -export type GetResourceResponse = (Resource); - -export type GetResourceValueInterpolatedData = { - /** - * job id - */ - jobId?: string; - path: string; - workspace: string; -}; - -export type GetResourceValueInterpolatedResponse = (unknown); - -export type GetResourceValueData = { - path: string; - workspace: string; -}; - -export type GetResourceValueResponse = (unknown); - -export type ExistsResourceData = { - path: string; - workspace: string; -}; - -export type ExistsResourceResponse = (boolean); - -export type ListResourceData = { - /** - * which page to return (start at 1, default 1) - */ - page?: number; - pathStart?: string; - /** - * number of items to return for a given page (default 30, max 100) - */ - perPage?: number; - /** - * resource_types to list from, separated by ',', - */ - resourceType?: string; - /** - * resource_types to not list from, separated by ',', - */ - resourceTypeExclude?: string; - workspace: string; -}; - -export type ListResourceResponse = (Array); - -export type ListSearchResourceData = { - workspace: string; -}; - -export type ListSearchResourceResponse = (Array<{ - path: string; - value: unknown; -}>); - -export type ListResourceNamesData = { - name: string; - workspace: string; -}; - -export type ListResourceNamesResponse = (Array<{ - name: string; - path: string; -}>); - -export type CreateResourceTypeData = { - /** - * new resource_type - */ - requestBody: ResourceType; - workspace: string; -}; - -export type CreateResourceTypeResponse = (string); - -export type FileResourceTypeToFileExtMapData = { - workspace: string; -}; - -export type FileResourceTypeToFileExtMapResponse = (unknown); - -export type DeleteResourceTypeData = { - path: string; - workspace: string; -}; - -export type DeleteResourceTypeResponse = (string); - -export type UpdateResourceTypeData = { - path: string; - /** - * updated resource_type - */ - requestBody: EditResourceType; - workspace: string; -}; - -export type UpdateResourceTypeResponse = (string); - -export type GetResourceTypeData = { - path: string; - workspace: string; -}; - -export type GetResourceTypeResponse = (ResourceType); - -export type ExistsResourceTypeData = { - path: string; - workspace: string; -}; - -export type ExistsResourceTypeResponse = (boolean); - -export type ListResourceTypeData = { - workspace: string; -}; - -export type ListResourceTypeResponse = (Array); - -export type ListResourceTypeNamesData = { - workspace: string; -}; - -export type ListResourceTypeNamesResponse = (Array<(string)>); - -export type QueryResourceTypesData = { - /** - * query limit - */ - limit?: number; - /** - * query text - */ - text: string; - workspace: string; -}; - -export type QueryResourceTypesResponse = (Array<{ - name: string; - score: number; - schema?: unknown; -}>); - -export type ListHubIntegrationsData = { - /** - * query integrations kind - */ - kind?: string; -}; - -export type ListHubIntegrationsResponse = (Array<{ - name: string; -}>); - -export type ListHubFlowsResponse = ({ - flows?: Array<{ - id: number; - flow_id: number; - summary: string; - apps: Array<(string)>; - approved: boolean; - votes: number; - }>; -}); - -export type GetHubFlowByIdData = { - id: number; -}; - -export type GetHubFlowByIdResponse = ({ - flow?: OpenFlow; -}); - -export type ListHubAppsResponse = ({ - apps?: Array<{ - id: number; - app_id: number; - summary: string; - apps: Array<(string)>; - approved: boolean; - votes: number; - }>; -}); - -export type GetHubAppByIdData = { - id: number; -}; - -export type GetHubAppByIdResponse = ({ - app: { - summary: string; - value: unknown; - }; -}); - -export type GetPublicAppByCustomPathData = { - customPath: string; -}; - -export type GetPublicAppByCustomPathResponse = ((AppWithLastVersion & { - workspace_id?: string; -})); - -export type GetHubScriptContentByPathData = { - path: string; -}; - -export type GetHubScriptContentByPathResponse = (string); - -export type GetHubScriptByPathData = { - path: string; -}; - -export type GetHubScriptByPathResponse = ({ - content: string; - lockfile?: string; - schema?: unknown; - language: string; - summary?: string; -}); - -export type GetTopHubScriptsData = { - /** - * query scripts app - */ - app?: string; - /** - * query scripts kind - */ - kind?: string; - /** - * query limit - */ - limit?: number; -}; - -export type GetTopHubScriptsResponse = ({ - asks?: Array<{ - id: number; - ask_id: number; - summary: string; - app: string; - version_id: number; - kind: HubScriptKind; - votes: number; - views: number; - }>; -}); - -export type QueryHubScriptsData = { - /** - * query scripts app - */ - app?: string; - /** - * query scripts kind - */ - kind?: string; - /** - * query limit - */ - limit?: number; - /** - * query text - */ - text: string; -}; - -export type QueryHubScriptsResponse = (Array<{ - ask_id: number; - id: number; - version_id: number; - summary: string; - app: string; - kind: HubScriptKind; - score: number; -}>); - -export type ListSearchScriptData = { - workspace: string; -}; - -export type ListSearchScriptResponse = (Array<{ - path: string; - content: string; -}>); - -export type ListScriptsData = { - /** - * mask to filter exact matching user creator - */ - createdBy?: string; - /** - * mask to filter scripts whom first direct parent has exact hash - */ - firstParentHash?: string; - /** - * (default false) - * include scripts that have no deployed version - * - */ - includeDraftOnly?: boolean; - /** - * (default false) - * include scripts without an exported main function - * - */ - includeWithoutMain?: boolean; - /** - * (default regardless) - * if true show only the templates - * if false show only the non templates - * if not defined, show all regardless of if the script is a template - * - */ - isTemplate?: boolean; - /** - * (default regardless) - * script kinds to filter, split by comma - * - */ - kinds?: string; - /** - * mask to filter scripts whom last parent in the chain has exact hash. - * Beware that each script stores only a limited number of parents. Hence - * the last parent hash for a script is not necessarily its top-most parent. - * To find the top-most parent you will have to jump from last to last hash - * until finding the parent - * - */ - lastParentHash?: string; - /** - * order by desc order (default true) - */ - orderDesc?: boolean; - /** - * which page to return (start at 1, default 1) - */ - page?: number; - /** - * is the hash present in the array of stored parent hashes for this script. - * The same warning applies than for last_parent_hash. A script only store a - * limited number of direct parent - * - */ - parentHash?: string; - /** - * mask to filter exact matching path - */ - pathExact?: string; - /** - * mask to filter matching starting path - */ - pathStart?: string; - /** - * number of items to return for a given page (default 30, max 100) - */ - perPage?: number; - /** - * (default false) - * show only the archived files. - * when multiple archived hash share the same path, only the ones with the latest create_at - * are - * ed. - * - */ - showArchived?: boolean; - /** - * (default false) - * show only the starred items - * - */ - starredOnly?: boolean; - /** - * (default false) - * include deployment message - * - */ - withDeploymentMsg?: boolean; - workspace: string; -}; - -export type ListScriptsResponse = (Array