windmill-utils-internal
Version:
Internal utility functions for Windmill
1,897 lines • 343 kB
JavaScript
// This file is auto-generated by @hey-api/openapi-ts
import { OpenAPI } from './core/OpenAPI';
import { request as __request } from './core/request';
/**
* get backend version
* @returns string git version of backend
* @throws ApiError
*/
export const backendVersion = () => {
return __request(OpenAPI, {
method: 'GET',
url: '/version'
});
};
/**
* is backend up to date
* @returns string is backend up to date
* @throws ApiError
*/
export const backendUptodate = () => {
return __request(OpenAPI, {
method: 'GET',
url: '/uptodate'
});
};
/**
* get license id
* @returns string get license id (empty if not ee)
* @throws ApiError
*/
export const getLicenseId = () => {
return __request(OpenAPI, {
method: 'GET',
url: '/ee_license'
});
};
/**
* query Windmill AI documentation assistant (EE only)
* @param data The data for the request.
* @param data.requestBody query to send to the AI documentation assistant
* @returns unknown AI documentation assistant response
* @throws ApiError
*/
export const queryDocumentation = (data) => {
return __request(OpenAPI, {
method: 'POST',
url: '/inkeep',
body: data.requestBody,
mediaType: 'application/json',
errors: {
403: 'Enterprise Edition required'
}
});
};
/**
* get openapi yaml spec
* @returns string openapi yaml file content
* @throws ApiError
*/
export const getOpenApiYaml = () => {
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) => {
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) => {
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) => {
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 = () => {
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) => {
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) => {
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) => {
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) => {
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) => {
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) => {
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) => {
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) => {
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) => {
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) => {
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) => {
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) => {
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 = () => {
return __request(OpenAPI, {
method: 'GET',
url: '/users/export'
});
};
/**
* Submit user onboarding data
* @param data The data for the request.
* @param data.requestBody
* @returns string Onboarding data submitted successfully
* @throws ApiError
*/
export const submitOnboardingData = (data) => {
return __request(OpenAPI, {
method: 'POST',
url: '/users/onboarding',
body: data.requestBody,
mediaType: 'application/json'
});
};
/**
* 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) => {
return __request(OpenAPI, {
method: 'DELETE',
url: '/w/{workspace}/users/delete/{username}',
path: {
workspace: data.workspace,
username: data.username
}
});
};
/**
* convert manual user to group user (require admin privilege)
* @param data The data for the request.
* @param data.workspace
* @param data.username
* @returns string convert user to group user
* @throws ApiError
*/
export const convertUserToGroup = (data) => {
return __request(OpenAPI, {
method: 'POST',
url: '/w/{workspace}/users/convert_to_group/{username}',
path: {
workspace: data.workspace,
username: data.username
}
});
};
/**
* get connected repositories
* @param data The data for the request.
* @param data.page Page number for pagination (default 1)
* @returns GithubInstallations connected repositories
* @throws ApiError
*/
export const getGlobalConnectedRepositories = (data = {}) => {
return __request(OpenAPI, {
method: 'GET',
url: '/github_app/connected_repositories',
query: {
page: data.page
}
});
};
/**
* list all workspaces visible to me
* @returns Workspace all workspaces
* @throws ApiError
*/
export const listWorkspaces = () => {
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 = () => {
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 = () => {
return __request(OpenAPI, {
method: 'GET',
url: '/workspaces/users'
});
};
/**
* get workspace as super admin (require to be super admin)
* @param data The data for the request.
* @param data.workspace
* @returns Workspace workspace
* @throws ApiError
*/
export const getWorkspaceAsSuperAdmin = (data) => {
return __request(OpenAPI, {
method: 'GET',
url: '/w/{workspace}/workspaces/get_as_superadmin',
path: {
workspace: data.workspace
}
});
};
/**
* 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 = {}) => {
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) => {
return __request(OpenAPI, {
method: 'POST',
url: '/workspaces/create',
body: data.requestBody,
mediaType: 'application/json'
});
};
/**
* create forked workspace branch with git sync
* @param data The data for the request.
* @param data.workspace
* @param data.requestBody new forked workspace
* @returns string forked workspace branch created
* @throws ApiError
*/
export const createWorkspaceForkGitBranch = (data) => {
return __request(OpenAPI, {
method: 'POST',
url: '/w/{workspace}/workspaces/create_workspace_fork_branch',
path: {
workspace: data.workspace
},
body: data.requestBody,
mediaType: 'application/json'
});
};
/**
* create forked workspace
* @param data The data for the request.
* @param data.workspace
* @param data.requestBody new forked workspace
* @returns string forked workspace created
* @throws ApiError
*/
export const createWorkspaceFork = (data) => {
return __request(OpenAPI, {
method: 'POST',
url: '/w/{workspace}/workspaces/create_fork',
path: {
workspace: data.workspace
},
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) => {
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) => {
return __request(OpenAPI, {
method: 'POST',
url: '/workspaces/exists_username',
body: data.requestBody,
mediaType: 'application/json'
});
};
/**
* Refreshes the password for the custom_instance_user
* @returns unknown Success
* @throws ApiError
*/
export const refreshCustomInstanceUserPwd = () => {
return __request(OpenAPI, {
method: 'POST',
url: '/settings/refresh_custom_instance_user_pwd'
});
};
/**
* Returns the set-up statuses of custom instance pg databases
* @returns CustomInstanceDb Statuses of all custom instance dbs
* @throws ApiError
*/
export const listCustomInstanceDbs = () => {
return __request(OpenAPI, {
method: 'POST',
url: '/settings/list_custom_instance_pg_databases'
});
};
/**
* Runs CREATE DATABASE on the Windmill Postgres and grants access to the custom_instance_user
* @param data The data for the request.
* @param data.name The name of the database to create
* @param data.requestBody
* @returns CustomInstanceDb status
* @throws ApiError
*/
export const setupCustomInstanceDb = (data) => {
return __request(OpenAPI, {
method: 'POST',
url: '/settings/setup_custom_instance_pg_database/{name}',
path: {
name: data.name
},
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) => {
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) => {
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 = () => {
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) => {
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) => {
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 = {}) => {
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) => {
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 = () => {
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) => {
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) => {
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 = () => {
return __request(OpenAPI, {
method: 'POST',
url: '/settings/send_stats'
});
};
/**
* get latest key renewal attempt
* @returns unknown status
* @throws ApiError
*/
export const getLatestKeyRenewalAttempt = () => {
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 = {}) => {
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 = {}) => {
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) => {
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 = () => {
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 = () => {
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 = {}) => {
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 = () => {
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) => {
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 = () => {
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 = () => {
return __request(OpenAPI, {
method: 'GET',
url: '/users/usage'
});
};
/**
* get all runnables in every workspace
* @returns unknown free all runnables
* @throws ApiError
*/
export const getRunnable = () => {
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 = () => {
return __request(OpenAPI, {
method: 'GET',
url: '/users/whoami'
});
};
/**
* list all workspace invites
* @returns WorkspaceInvite list all workspace invites
* @throws ApiError
*/
export const listWorkspaceInvites = () => {
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) => {
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) => {
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) => {
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) => {
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) => {
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) => {
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) => {
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) => {
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) => {
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) => {
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) => {
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) => {
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) => {
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
* @param data.onlyDeleteForks
* @returns string status
* @throws ApiError
*/
export const deleteWorkspace = (data) => {
return __request(OpenAPI, {
method: 'DELETE',
url: '/workspaces/delete/{workspace}',
path: {
workspace: data.workspace
},
query: {
only_delete_forks: data.onlyDeleteForks
}
});
};
/**
* leave workspace
* @param data The data for the request.
* @param data.workspace
* @returns string status
* @throws ApiError
*/
export const leaveWorkspace = (data) => {
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) => {
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) => {
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) => {
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) => {
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) => {
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) => {
return __request(OpenAPI, {
method: 'POST',
url: '/w/{workspace}/workspaces/operator_settings',
path: {
workspace: data.workspace
},
body: data.requestBody,
mediaType: 'application/json'
});
};
/**
* Compare two workspaces
* Compares the current workspace with a target workspace to find differences in scripts, flows, apps, resources, and variables. Returns information about items that are ahead, behind, or in conflict.
* @param data The data for the request.
* @param data.workspace
* @param data.targetWorkspaceId The ID of the workspace to compare with
* @returns WorkspaceComparison Workspace comparison results
* @throws ApiError
*/
export const compareWorkspaces = (data) => {
return __request(OpenAPI, {
method: 'GET',
url: '/w/{workspace}/workspaces/compare/{target_workspace_id}',
path: {
workspace: data.workspace,
target_workspace_id: data.targetWorkspaceId
}
});
};
/**
* Resets the ahead and behind deployement counter after a deployement
* This endpoint should be called after a fork deployement
* @param data The data for the request.
* @param data.workspace
* @param data.forkWorkspaceId The ID of the workspace to compare with
* @returns unknown status
* @throws ApiError
*/
export const resetDiffTally = (data) => {
return __request(OpenAPI, {
method: 'POST',
url: '/w/{workspace}/workspaces/reset_diff_tally/{fork_workspace_id}',
path: {
workspace: data.workspace,
fork_workspace_id: data.forkWorkspaceId
}
});
};
/**
* exists email
* @param data The data for the request.
* @param data.email
* @returns boolean user
* @throws ApiError
*/
export const existsEmail = (data) => {
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 = {}) => {
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) => {
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) => {
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) => {
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) => {
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
* @param data.skipSubscriptionFetch skip fetching subscription status from stripe
* @returns unknown status
* @throws ApiError
*/
export const getPremiumInfo = (data) => {
return __request(OpenAPI, {
method: 'GET',
url: '/w/{workspace}/workspaces/premium_info',
path: {
workspace: data.workspace
},
query: {
skip_subscription_fetch: data.skipSubscriptionFetch
}
});
};
/**
* get threshold alert info
* @param data The data for the request.
* @param data.workspace
* @returns unknown status
* @throws ApiError
*/
export const getThresholdAlert = (data) => {
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) => {
return __request(OpenAPI, {
method: 'POST',
url: '/w/{workspace}/workspaces/threshold_alert',
path: {
workspace: data.workspace
},
body: data.requestBody,
mediaType: 'application/json'
});
};
/**
* rebuild dependency map
* @param data The data for the request.
* @param data.workspace
* @returns string status
* @throws ApiError
*/
export const rebuildDependencyMap = (data) => {
return __request(OpenAPI, {
method: 'POST',
url: '/w/{workspace}/workspaces/rebuild_dependency_map',
path: {
workspace: data.workspace
}
});
};
/**
* get dependents of an imported path
* @param data The data for the request.
* @param data.workspace
* @param data.importedPath The imported path to get dependents for
* @returns DependencyDependent list of dependents
* @throws ApiError
*/
export const getDependents = (data) => {
return __request(OpenAPI, {
method: 'GET',
url: '/w/{workspace}/workspaces/get_dependents/{imported_path}',
path: {
workspace: data.workspace,
imported_path: data.importedPath
}
});
};
/**
* get dependents amounts for multiple imported paths
* @param data The data for the request.
* @param data.workspace
* @param data.requestBody List of imported paths to get dependents counts for
* @returns DependentsAmount list of dependents amounts
* @throws ApiError
*/
export const getDependentsAmounts = (data) => {
return __request(OpenAPI, {
method: 'POST',
url: '/w/{workspace}/workspaces/get_dependents_amounts',
path: {
workspace: data.workspace
},
body: data.requestBody,
mediaType: 'application/json'
});
};
/**
* get dependency map
* @param data The data for the request.
* @param data.workspace
* @returns DependencyMap dmap
* @throws ApiError
*/
export const getDependencyMap = (data) => {
return __request(OpenAPI, {
method: 'GET',
url: '/w/{workspace}/workspaces/get_dependency_map',
path: {
workspace: data.workspace
}
});
};
/**
* 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) => {
return __request(OpenAPI, {
method: 'POST',
url: '/w/{workspace}/workspaces/edit_slack_command',
path: {
workspace: data.workspace
},
body: data.requestBody,
mediaType: 'application/json'
});
};
/**
* get workspace slack oauth config
* @param data The data for the request.
* @param data.workspace
* @returns unknown slack oauth config
* @throws ApiError
*/
export const getWorkspaceSlackOauthConfig = (data) => {
return __request(OpenAPI, {
method: 'GET',
url: '/w/{workspace}/workspaces/slack_oauth_config',
path: {
workspace: data.workspace
}
});
};
/**
* set workspace slack oauth config
* @param data The data for the request.
* @param data.workspace
* @param data.requestBody Slack OAuth Configuration
* @returns string status
* @throws ApiError
*/
export const setWorkspaceSlackOauthConfig = (data) => {
return __request(OpenAPI, {
method: 'POST',
url: '/w/{workspace}/workspaces/slack_oauth_config',
path: {
workspace: data.workspace
},
body: data.requestBody,
mediaType: 'application/json'
});
};
/**
* delete workspace slack oauth config
* @param data The data for the request.
* @param data.workspace
* @returns string status
* @throws ApiError
*/
export const deleteWorkspaceSlackOauthConfig = (data) => {
return __request(OpenAPI, {
method: 'DELETE',
url: '/w/{workspace}/workspaces/slack_oauth_config',
path: {
workspace: data.workspace
}
});
};
/**
* 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) => {
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
* @param data.search Search teams by name. If omitted, returns first page of all teams.
* @param data.nextLink Pagination cursor URL from previous response. Pass this to fetch the next page of results.
* @returns unknown status
* @throws ApiError
*/
export const listAvailableTeamsIds = (data) => {
return __request(OpenAPI, {
method: 'GET',
url: '/w/{workspace}/workspaces/available_teams_ids',
path: {
workspace: data.workspace
},
query: {
search: data.search,
next_link: data.nextLink
}
});
};
/**
* list available channels for a specific team
* @param data The data for the request.
* @param data.workspace
* @param data.teamId Microsoft Teams team ID
* @returns unknown List of channels for the specified team
* @throws ApiError
*/
export const listAvailableTeamsChannels = (data) => {
return __request(OpenAPI, {
method: 'GET',
url: '/w/{workspace}/workspaces/available_teams_channels',
path: {
workspace: data.workspace
},
query: {
team_id: data.teamId
}
});
};
/**
* 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) => {
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) => {
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) => {
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) => {
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) => {
return __request(OpenAPI, {
method: 'POST',
url: '/w/{workspace}/workspaces/edit_auto_invite',
path: {
workspace: data.workspace
},
body: data.requestBody,
mediaType: 'application/json'
});
};
/**
* edit instance groups
* @param data The data for the request.
* @param data.workspace
* @param data.requestBody Instance Groups Configuration
* @returns string status
* @throws ApiError
*/
export const editInstanceGroups = (data) => {
return __request(OpenAPI, {
method: 'POST',
url: '/w/{workspace}/workspaces/edit_instance_groups',
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) => {
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) => {
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.wo