Module
x/windmill/windmill-api/services/VariableService.ts
Windmill deno client (separated from the main repo because most of the code is auto-generated from the openapi and not worth committing)
Extremely Popular
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250/* istanbul ignore file *//* tslint:disable *//* eslint-disable */import type { ContextualVariable } from '../models/ContextualVariable.ts';import type { CreateVariable } from '../models/CreateVariable.ts';import type { EditVariable } from '../models/EditVariable.ts';import type { ListableVariable } from '../models/ListableVariable.ts';
import type { CancelablePromise } from '../core/CancelablePromise.ts';import { OpenAPI } from '../core/OpenAPI.ts';import { request as __request } from '../core/request.ts';
export class VariableService {
/** * create variable * @returns string variable created * @throws ApiError */ public static createVariable({ workspace, requestBody, alreadyEncrypted, }: { workspace: string, /** * new variable */ requestBody: CreateVariable, alreadyEncrypted?: boolean, }): CancelablePromise<string> { return __request(OpenAPI, { method: 'POST', url: '/w/{workspace}/variables/create', path: { 'workspace': workspace, }, query: { 'already_encrypted': alreadyEncrypted, }, body: requestBody, mediaType: 'application/json', }); }
/** * encrypt value * @returns string encrypted value * @throws ApiError */ public static encryptValue({ workspace, requestBody, }: { workspace: string, /** * new variable */ requestBody: string, }): CancelablePromise<string> { return __request(OpenAPI, { method: 'POST', url: '/w/{workspace}/variables/encrypt', path: { 'workspace': workspace, }, body: requestBody, mediaType: 'application/json', }); }
/** * delete variable * @returns string variable deleted * @throws ApiError */ public static deleteVariable({ workspace, path, }: { workspace: string, path: string, }): CancelablePromise<string> { return __request(OpenAPI, { method: 'DELETE', url: '/w/{workspace}/variables/delete/{path}', path: { 'workspace': workspace, 'path': path, }, }); }
/** * update variable * @returns string variable updated * @throws ApiError */ public static updateVariable({ workspace, path, requestBody, alreadyEncrypted, }: { workspace: string, path: string, /** * updated variable */ requestBody: EditVariable, alreadyEncrypted?: boolean, }): CancelablePromise<string> { return __request(OpenAPI, { method: 'POST', url: '/w/{workspace}/variables/update/{path}', path: { 'workspace': workspace, 'path': path, }, query: { 'already_encrypted': alreadyEncrypted, }, body: requestBody, mediaType: 'application/json', }); }
/** * get variable * @returns ListableVariable variable * @throws ApiError */ public static getVariable({ workspace, path, decryptSecret, includeEncrypted, }: { workspace: string, path: string, /** * 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, }): CancelablePromise<ListableVariable> { return __request(OpenAPI, { method: 'GET', url: '/w/{workspace}/variables/get/{path}', path: { 'workspace': workspace, 'path': path, }, query: { 'decrypt_secret': decryptSecret, 'include_encrypted': includeEncrypted, }, }); }
/** * get variable value * @returns string variable * @throws ApiError */ public static getVariableValue({ workspace, path, }: { workspace: string, path: string, }): CancelablePromise<string> { return __request(OpenAPI, { method: 'GET', url: '/w/{workspace}/variables/get_value/{path}', path: { 'workspace': workspace, 'path': path, }, }); }
/** * does variable exists at path * @returns boolean variable * @throws ApiError */ public static existsVariable({ workspace, path, }: { workspace: string, path: string, }): CancelablePromise<boolean> { return __request(OpenAPI, { method: 'GET', url: '/w/{workspace}/variables/exists/{path}', path: { 'workspace': workspace, 'path': path, }, }); }
/** * list variables * @returns ListableVariable variable list * @throws ApiError */ public static listVariable({ workspace, }: { workspace: string, }): CancelablePromise<Array<ListableVariable>> { return __request(OpenAPI, { method: 'GET', url: '/w/{workspace}/variables/list', path: { 'workspace': workspace, }, }); }
/** * list contextual variables * @returns ContextualVariable contextual variable list * @throws ApiError */ public static listContextualVariables({ workspace, }: { workspace: string, }): CancelablePromise<Array<ContextualVariable>> { return __request(OpenAPI, { method: 'GET', url: '/w/{workspace}/variables/list_contextual', path: { 'workspace': workspace, }, }); }
}