# ScriptService | windmill-client
Documentation for windmill-client

# Class ScriptService

- Defined in src/services.gen.ts:3101

#####
Index

### Constructors

constructor

### Methods

archiveScriptByHash
archiveScriptByPath
createScript
deleteScriptByHash
deleteScriptByPath
existsScriptByPath
getHubScriptByPath
getHubScriptContentByPath
getScriptByHash
getScriptByPath
getScriptByPathWithDraft
getScriptDeploymentStatus
getScriptHistoryByPath
getTopHubScripts
listScriptPaths
listScripts
listSearchScript
queryHubScripts
rawScriptByHash
rawScriptByPath
rawScriptByPathTokened
toggleWorkspaceErrorHandlerForScript
updateScriptHistory

##
Constructors

### constructor

- new ScriptService(): ScriptService

- #### Returns ScriptService

##
Methods

### `Static` archiveScriptByHash

- archiveScriptByHash(data): CancelablePromise < Script >

- archive script by hash

  #### Parameters

  - data: ArchiveScriptByHashData

    The data for the request.

  #### Returns CancelablePromise < Script >

  Script script details

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:3353

### `Static` archiveScriptByPath

- archiveScriptByPath(data): CancelablePromise <string>

- archive script by path

  #### Parameters

  - data: ArchiveScriptByPathData

    The data for the request.

  #### Returns CancelablePromise <string>

  string script archived

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:3334

### `Static` createScript

- createScript(data): CancelablePromise <string>

- create script

  #### Parameters

  - data: CreateScriptData

    The data for the request.

  #### Returns CancelablePromise <string>

  string script created

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:3292

### `Static` deleteScriptByHash

- deleteScriptByHash(data): CancelablePromise < Script >

- delete script by hash (erase content but keep hash, require admin)

  #### Parameters

  - data: DeleteScriptByHashData

    The data for the request.

  #### Returns CancelablePromise < Script >

  Script script details

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:3372

### `Static` deleteScriptByPath

- deleteScriptByPath(data): CancelablePromise <string>

- delete all scripts at a given path (require admin)

  #### Parameters

  - data: DeleteScriptByPathData

    The data for the request.

  #### Returns CancelablePromise <string>

  string script path

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:3391

### `Static` existsScriptByPath

- existsScriptByPath(data): CancelablePromise <boolean>

- exists script by path

  #### Parameters

  - data: ExistsScriptByPathData

    The data for the request.

  #### Returns CancelablePromise <boolean>

  boolean does it exists

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:3531

### `Static` getHubScriptByPath

- getHubScriptByPath(data): CancelablePromise < GetHubScriptByPathResponse >

- get full hub script by path

  #### Parameters

  - data: GetHubScriptByPathData

    The data for the request.

  #### Returns CancelablePromise < GetHubScriptByPathResponse >

  unknown script details

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:3126

### `Static` getHubScriptContentByPath

- getHubScriptContentByPath(data): CancelablePromise <string>

- get hub script content by path

  #### Parameters

  - data: GetHubScriptContentByPathData

    The data for the request.

  #### Returns CancelablePromise <string>

  string script details

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:3109

### `Static` getScriptByHash

- getScriptByHash(data): CancelablePromise < Script >

- get script by hash

  #### Parameters

  - data: GetScriptByHashData

    The data for the request.

  #### Returns CancelablePromise < Script >

  Script script details

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:3550

### `Static` getScriptByPath

- getScriptByPath(data): CancelablePromise < Script >

- get script by path

  #### Parameters

  - data: GetScriptByPathData

    The data for the request.

  #### Returns CancelablePromise < Script >

  Script script details

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:3410

### `Static` getScriptByPathWithDraft

- getScriptByPathWithDraft(data): CancelablePromise < NewScriptWithDraft >

- get script by path with draft

  #### Parameters

  - data: GetScriptByPathWithDraftData

    The data for the request.

  #### Returns CancelablePromise < NewScriptWithDraft >

  NewScriptWithDraft script details

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:3429

### `Static` getScriptDeploymentStatus

- getScriptDeploymentStatus(data): CancelablePromise < GetScriptDeploymentStatusResponse >

- get script deployment status

  #### Parameters

  - data: GetScriptDeploymentStatusData

    The data for the request.

  #### Returns CancelablePromise < GetScriptDeploymentStatusResponse >

  unknown script details

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:3588

### `Static` getScriptHistoryByPath

- getScriptHistoryByPath(data): CancelablePromise < GetScriptHistoryByPathResponse >

- get history of a script by path

  #### Parameters

  - data: GetScriptHistoryByPathData

    The data for the request.

  #### Returns CancelablePromise < GetScriptHistoryByPathResponse >

  ScriptHistory script history

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:3448

### `Static` getTopHubScripts

- getTopHubScripts(data?): CancelablePromise < GetTopHubScriptsResponse >

- get top hub scripts

  #### Parameters

  - data: GetTopHubScriptsData = {}

    The data for the request.

  #### Returns CancelablePromise < GetTopHubScriptsResponse >

  unknown hub scripts list

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:3145

### `Static` listScriptPaths

- listScriptPaths(data): CancelablePromise < ListScriptPathsResponse >

- list all scripts paths

  #### Parameters

  - data: ListScriptPathsData

    The data for the request.

  #### Returns CancelablePromise < ListScriptPathsResponse >

  string list of script paths

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:3274

### `Static` listScripts

- listScripts(data): CancelablePromise < ListScriptsResponse >

- list all scripts

  #### Parameters

  - data: ListScriptsData

    The data for the request.

  #### Returns CancelablePromise < ListScriptsResponse >

  Script All scripts

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:3241

### `Static` listSearchScript

- listSearchScript(data): CancelablePromise < ListSearchScriptResponse >

- list scripts for search

  #### Parameters

  - data: ListSearchScriptData

    The data for the request.

  #### Returns CancelablePromise < ListSearchScriptResponse >

  unknown script list

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:3187

### `Static` queryHubScripts

- queryHubScripts(data): CancelablePromise < QueryHubScriptsResponse >

- query hub scripts by similarity

  #### Parameters

  - data: QueryHubScriptsData

    The data for the request.

  #### Returns CancelablePromise < QueryHubScriptsResponse >

  unknown script details

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:3167

### `Static` rawScriptByHash

- rawScriptByHash(data): CancelablePromise <string>

- raw script by hash

  #### Parameters

  - data: RawScriptByHashData

    The data for the request.

  #### Returns CancelablePromise <string>

  string script content

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:3569

### `Static` rawScriptByPath

- rawScriptByPath(data): CancelablePromise <string>

- raw script by path

  #### Parameters

  - data: RawScriptByPathData

    The data for the request.

  #### Returns CancelablePromise <string>

  string script content

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:3491

### `Static` rawScriptByPathTokened

- rawScriptByPathTokened(data): CancelablePromise <string>

- raw script by path with a token (mostly used by lsp to be used with import maps to resolve scripts)

  #### Parameters

  - data: RawScriptByPathTokenedData

    The data for the request.

  #### Returns CancelablePromise <string>

  string script content

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:3511

### `Static` toggleWorkspaceErrorHandlerForScript

- toggleWorkspaceErrorHandlerForScript(data): CancelablePromise <string>

- Toggle ON and OFF the workspace error handler for a given script

  #### Parameters

  - data: ToggleWorkspaceErrorHandlerForScriptData

    The data for the request.

  #### Returns CancelablePromise <string>

  string error handler toggled

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:3313

### `Static` updateScriptHistory

- updateScriptHistory(data): CancelablePromise <string>

- update history of a script

  #### Parameters

  - data: UpdateScriptHistoryData

    The data for the request.

  #### Returns CancelablePromise <string>

  string success

  #### Throws

  ApiError

  - Defined in src/services.gen.ts:3469