@daytonaio/api-client 0.15.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +3 -3
- package/.openapi-generator/VERSION +1 -1
- package/.openapi-generator-ignore +7 -0
- package/api/api-keys-api.ts +396 -324
- package/api/docker-registry-api.ts +703 -549
- package/api/images-api.ts +576 -346
- package/api/nodes-api.ts +250 -213
- package/api/organizations-api.ts +2203 -1671
- package/api/preview-api.ts +326 -0
- package/api/toolbox-api.ts +4507 -3186
- package/api/users-api.ts +317 -271
- package/api/workspace-api.ts +1482 -969
- package/api.ts +10 -12
- package/base.ts +35 -30
- package/common.ts +78 -66
- package/configuration.ts +102 -89
- package/dist/api/api-keys-api.js +54 -63
- package/dist/api/docker-registry-api.js +102 -107
- package/dist/api/images-api.d.ts +42 -0
- package/dist/api/images-api.js +146 -66
- package/dist/api/nodes-api.js +37 -47
- package/dist/api/organizations-api.js +341 -336
- package/dist/api/preview-api.d.ts +143 -0
- package/dist/api/preview-api.js +266 -0
- package/dist/api/toolbox-api.js +601 -569
- package/dist/api/users-api.js +49 -59
- package/dist/api/workspace-api.d.ts +50 -4
- package/dist/api/workspace-api.js +291 -190
- package/dist/api.d.ts +1 -0
- package/dist/api.js +1 -0
- package/dist/base.js +6 -7
- package/dist/common.d.ts +3 -3
- package/dist/common.js +27 -45
- package/dist/configuration.js +2 -1
- package/dist/esm/api/api-keys-api.js +55 -64
- package/dist/esm/api/docker-registry-api.js +103 -108
- package/dist/esm/api/images-api.d.ts +42 -0
- package/dist/esm/api/images-api.js +147 -67
- package/dist/esm/api/nodes-api.js +38 -48
- package/dist/esm/api/organizations-api.js +342 -337
- package/dist/esm/api/preview-api.d.ts +143 -0
- package/dist/esm/api/preview-api.js +259 -0
- package/dist/esm/api/toolbox-api.js +602 -570
- package/dist/esm/api/users-api.js +50 -60
- package/dist/esm/api/workspace-api.d.ts +50 -4
- package/dist/esm/api/workspace-api.js +292 -191
- package/dist/esm/api.d.ts +1 -0
- package/dist/esm/api.js +1 -0
- package/dist/esm/base.js +6 -7
- package/dist/esm/common.d.ts +3 -3
- package/dist/esm/common.js +28 -46
- package/dist/esm/configuration.js +2 -1
- package/dist/esm/index.d.ts +3 -3
- package/dist/esm/index.js +3 -3
- package/dist/esm/models/api-key-list.d.ts +12 -12
- package/dist/esm/models/api-key-list.js +6 -6
- package/dist/esm/models/api-key-response.d.ts +12 -12
- package/dist/esm/models/api-key-response.js +6 -6
- package/dist/esm/models/command.d.ts +3 -3
- package/dist/esm/models/completion-context.d.ts +2 -2
- package/dist/esm/models/completion-item.d.ts +7 -7
- package/dist/esm/models/completion-list.d.ts +2 -2
- package/dist/esm/models/create-api-key.d.ts +9 -9
- package/dist/esm/models/create-api-key.js +6 -6
- package/dist/esm/models/create-docker-registry.d.ts +8 -8
- package/dist/esm/models/create-docker-registry.js +1 -1
- package/dist/esm/models/create-image.d.ts +8 -2
- package/dist/esm/models/create-node.d.ts +13 -13
- package/dist/esm/models/create-node.js +2 -2
- package/dist/esm/models/create-organization-invitation.d.ts +6 -6
- package/dist/esm/models/create-organization-invitation.js +1 -1
- package/dist/esm/models/create-organization-quota.d.ts +11 -11
- package/dist/esm/models/create-organization-role.d.ts +10 -10
- package/dist/esm/models/create-organization-role.js +6 -6
- package/dist/esm/models/create-organization.d.ts +12 -12
- package/dist/esm/models/create-session-request.d.ts +1 -1
- package/dist/esm/models/create-user.d.ts +15 -4
- package/dist/esm/models/create-user.js +4 -1
- package/dist/esm/models/create-workspace.d.ts +16 -16
- package/dist/esm/models/create-workspace.js +2 -2
- package/dist/esm/models/docker-registry.d.ts +11 -11
- package/dist/esm/models/docker-registry.js +1 -1
- package/dist/esm/models/execute-request.d.ts +3 -3
- package/dist/esm/models/execute-response.d.ts +2 -2
- package/dist/esm/models/file-info.d.ts +8 -8
- package/dist/esm/models/file-status.d.ts +4 -4
- package/dist/esm/models/git-add-request.d.ts +2 -2
- package/dist/esm/models/git-branch-request.d.ts +2 -2
- package/dist/esm/models/git-clone-request.d.ts +6 -6
- package/dist/esm/models/git-commit-info.d.ts +5 -5
- package/dist/esm/models/git-commit-request.d.ts +4 -4
- package/dist/esm/models/git-commit-response.d.ts +1 -1
- package/dist/esm/models/git-repo-request.d.ts +3 -3
- package/dist/esm/models/git-status.d.ts +4 -4
- package/dist/esm/models/image-dto.d.ts +20 -14
- package/dist/esm/models/image-state.d.ts +1 -1
- package/dist/esm/models/image-state.js +1 -1
- package/dist/esm/models/index.d.ts +2 -0
- package/dist/esm/models/index.js +2 -0
- package/dist/esm/models/list-branch-response.d.ts +1 -1
- package/dist/esm/models/lsp-completion-params.d.ts +5 -5
- package/dist/esm/models/lsp-document-request.d.ts +3 -3
- package/dist/esm/models/lsp-location.d.ts +2 -2
- package/dist/esm/models/lsp-server-request.d.ts +2 -2
- package/dist/esm/models/lsp-symbol.d.ts +3 -3
- package/dist/esm/models/match.d.ts +3 -3
- package/dist/esm/models/organization-invitation.d.ts +21 -15
- package/dist/esm/models/organization-invitation.js +2 -2
- package/dist/esm/models/organization-role.d.ts +16 -16
- package/dist/esm/models/organization-role.js +6 -6
- package/dist/esm/models/organization-user.d.ts +11 -11
- package/dist/esm/models/organization-user.js +1 -1
- package/dist/esm/models/organization.d.ts +8 -8
- package/dist/esm/models/paginated-images-dto.d.ts +4 -4
- package/dist/esm/models/port-preview-url.d.ts +30 -0
- package/dist/esm/models/port-preview-url.js +14 -0
- package/dist/esm/models/position.d.ts +2 -2
- package/dist/esm/models/project-dir-response.d.ts +1 -1
- package/dist/esm/models/range.d.ts +2 -2
- package/dist/esm/models/registry-push-access-dto.d.ts +6 -6
- package/dist/esm/models/replace-request.d.ts +3 -3
- package/dist/esm/models/replace-result.d.ts +3 -3
- package/dist/esm/models/search-files-response.d.ts +1 -1
- package/dist/esm/models/session-execute-request.d.ts +9 -2
- package/dist/esm/models/session-execute-response.d.ts +3 -3
- package/dist/esm/models/session.d.ts +2 -2
- package/dist/esm/models/set-image-general-status.d.ts +24 -0
- package/dist/esm/models/set-image-general-status.js +14 -0
- package/dist/esm/models/toggle-state.d.ts +1 -1
- package/dist/esm/models/update-assigned-organization-roles.d.ts +1 -1
- package/dist/esm/models/update-docker-registry.d.ts +3 -3
- package/dist/esm/models/update-organization-invitation.d.ts +5 -5
- package/dist/esm/models/update-organization-invitation.js +1 -1
- package/dist/esm/models/update-organization-member-role.d.ts +2 -2
- package/dist/esm/models/update-organization-member-role.js +1 -1
- package/dist/esm/models/update-organization-quota.d.ts +11 -11
- package/dist/esm/models/update-organization-role.d.ts +10 -10
- package/dist/esm/models/update-organization-role.js +6 -6
- package/dist/esm/models/usage-overview.d.ts +15 -15
- package/dist/esm/models/user-public-key.d.ts +2 -2
- package/dist/esm/models/user.d.ts +4 -4
- package/dist/esm/models/workspace-info.d.ts +3 -3
- package/dist/esm/models/workspace-labels.d.ts +1 -1
- package/dist/esm/models/workspace-state.d.ts +1 -1
- package/dist/esm/models/workspace-state.js +1 -1
- package/dist/esm/models/workspace.d.ts +19 -19
- package/dist/esm/models/workspace.js +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/models/api-key-list.d.ts +12 -12
- package/dist/models/api-key-list.js +6 -6
- package/dist/models/api-key-response.d.ts +12 -12
- package/dist/models/api-key-response.js +6 -6
- package/dist/models/command.d.ts +3 -3
- package/dist/models/completion-context.d.ts +2 -2
- package/dist/models/completion-item.d.ts +7 -7
- package/dist/models/completion-list.d.ts +2 -2
- package/dist/models/create-api-key.d.ts +9 -9
- package/dist/models/create-api-key.js +6 -6
- package/dist/models/create-docker-registry.d.ts +8 -8
- package/dist/models/create-docker-registry.js +1 -1
- package/dist/models/create-image.d.ts +8 -2
- package/dist/models/create-node.d.ts +13 -13
- package/dist/models/create-node.js +2 -2
- package/dist/models/create-organization-invitation.d.ts +6 -6
- package/dist/models/create-organization-invitation.js +1 -1
- package/dist/models/create-organization-quota.d.ts +11 -11
- package/dist/models/create-organization-role.d.ts +10 -10
- package/dist/models/create-organization-role.js +6 -6
- package/dist/models/create-organization.d.ts +12 -12
- package/dist/models/create-session-request.d.ts +1 -1
- package/dist/models/create-user.d.ts +15 -4
- package/dist/models/create-user.js +5 -0
- package/dist/models/create-workspace.d.ts +16 -16
- package/dist/models/create-workspace.js +2 -2
- package/dist/models/docker-registry.d.ts +11 -11
- package/dist/models/docker-registry.js +1 -1
- package/dist/models/execute-request.d.ts +3 -3
- package/dist/models/execute-response.d.ts +2 -2
- package/dist/models/file-info.d.ts +8 -8
- package/dist/models/file-status.d.ts +4 -4
- package/dist/models/git-add-request.d.ts +2 -2
- package/dist/models/git-branch-request.d.ts +2 -2
- package/dist/models/git-clone-request.d.ts +6 -6
- package/dist/models/git-commit-info.d.ts +5 -5
- package/dist/models/git-commit-request.d.ts +4 -4
- package/dist/models/git-commit-response.d.ts +1 -1
- package/dist/models/git-repo-request.d.ts +3 -3
- package/dist/models/git-status.d.ts +4 -4
- package/dist/models/image-dto.d.ts +20 -14
- package/dist/models/image-state.d.ts +1 -1
- package/dist/models/image-state.js +1 -1
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/dist/models/list-branch-response.d.ts +1 -1
- package/dist/models/lsp-completion-params.d.ts +5 -5
- package/dist/models/lsp-document-request.d.ts +3 -3
- package/dist/models/lsp-location.d.ts +2 -2
- package/dist/models/lsp-server-request.d.ts +2 -2
- package/dist/models/lsp-symbol.d.ts +3 -3
- package/dist/models/match.d.ts +3 -3
- package/dist/models/organization-invitation.d.ts +21 -15
- package/dist/models/organization-invitation.js +2 -2
- package/dist/models/organization-role.d.ts +16 -16
- package/dist/models/organization-role.js +6 -6
- package/dist/models/organization-user.d.ts +11 -11
- package/dist/models/organization-user.js +1 -1
- package/dist/models/organization.d.ts +8 -8
- package/dist/models/paginated-images-dto.d.ts +4 -4
- package/dist/models/port-preview-url.d.ts +30 -0
- package/dist/models/port-preview-url.js +15 -0
- package/dist/models/position.d.ts +2 -2
- package/dist/models/project-dir-response.d.ts +1 -1
- package/dist/models/range.d.ts +2 -2
- package/dist/models/registry-push-access-dto.d.ts +6 -6
- package/dist/models/replace-request.d.ts +3 -3
- package/dist/models/replace-result.d.ts +3 -3
- package/dist/models/search-files-response.d.ts +1 -1
- package/dist/models/session-execute-request.d.ts +9 -2
- package/dist/models/session-execute-response.d.ts +3 -3
- package/dist/models/session.d.ts +2 -2
- package/dist/models/set-image-general-status.d.ts +24 -0
- package/dist/models/set-image-general-status.js +15 -0
- package/dist/models/toggle-state.d.ts +1 -1
- package/dist/models/update-assigned-organization-roles.d.ts +1 -1
- package/dist/models/update-docker-registry.d.ts +3 -3
- package/dist/models/update-organization-invitation.d.ts +5 -5
- package/dist/models/update-organization-invitation.js +1 -1
- package/dist/models/update-organization-member-role.d.ts +2 -2
- package/dist/models/update-organization-member-role.js +1 -1
- package/dist/models/update-organization-quota.d.ts +11 -11
- package/dist/models/update-organization-role.d.ts +10 -10
- package/dist/models/update-organization-role.js +6 -6
- package/dist/models/usage-overview.d.ts +15 -15
- package/dist/models/user-public-key.d.ts +2 -2
- package/dist/models/user.d.ts +4 -4
- package/dist/models/workspace-info.d.ts +3 -3
- package/dist/models/workspace-labels.d.ts +1 -1
- package/dist/models/workspace-state.d.ts +1 -1
- package/dist/models/workspace-state.js +1 -1
- package/dist/models/workspace.d.ts +19 -19
- package/dist/models/workspace.js +1 -1
- package/index.ts +4 -5
- package/models/api-key-list.ts +34 -38
- package/models/api-key-response.ts +35 -38
- package/models/command.ts +20 -23
- package/models/completion-context.ts +14 -17
- package/models/completion-item.ts +44 -47
- package/models/completion-list.ts +15 -17
- package/models/create-api-key.ts +22 -26
- package/models/create-docker-registry.ts +51 -54
- package/models/create-image.ts +20 -17
- package/models/create-node.ts +78 -82
- package/models/create-organization-invitation.ts +31 -34
- package/models/create-organization-quota.ts +68 -71
- package/models/create-organization-role.ts +29 -32
- package/models/create-organization.ts +74 -77
- package/models/create-session-request.ts +8 -11
- package/models/create-user.ts +39 -28
- package/models/create-workspace.ts +96 -100
- package/models/docker-registry.ts +57 -60
- package/models/execute-request.ts +20 -23
- package/models/execute-response.ts +14 -17
- package/models/file-info.ts +50 -53
- package/models/file-status.ts +26 -29
- package/models/git-add-request.ts +14 -17
- package/models/git-branch-request.ts +14 -17
- package/models/git-clone-request.ts +38 -41
- package/models/git-commit-info.ts +32 -35
- package/models/git-commit-request.ts +26 -29
- package/models/git-commit-response.ts +8 -11
- package/models/git-repo-request.ts +20 -23
- package/models/git-status.ts +33 -35
- package/models/image-dto.ts +75 -73
- package/models/image-state.ts +12 -17
- package/models/index.ts +70 -68
- package/models/list-branch-response.ts +8 -11
- package/models/lsp-completion-params.ts +34 -36
- package/models/lsp-document-request.ts +20 -23
- package/models/lsp-location.ts +15 -17
- package/models/lsp-server-request.ts +14 -17
- package/models/lsp-symbol.ts +21 -23
- package/models/match.ts +20 -23
- package/models/organization-invitation.ts +81 -76
- package/models/organization-role.ts +53 -56
- package/models/organization-user.ts +55 -58
- package/models/organization.ts +38 -41
- package/models/paginated-images-dto.ts +27 -29
- package/models/port-preview-url.ts +33 -0
- package/models/position.ts +14 -17
- package/models/project-dir-response.ts +8 -11
- package/models/range.ts +15 -17
- package/models/registry-push-access-dto.ts +38 -41
- package/models/replace-request.ts +20 -23
- package/models/replace-result.ts +20 -23
- package/models/search-files-response.ts +8 -11
- package/models/session-execute-request.ts +21 -17
- package/models/session-execute-response.ts +20 -23
- package/models/session.ts +15 -17
- package/models/set-image-general-status.ts +27 -0
- package/models/toggle-state.ts +8 -11
- package/models/update-assigned-organization-roles.ts +8 -11
- package/models/update-docker-registry.ts +20 -23
- package/models/update-organization-invitation.ts +25 -28
- package/models/update-organization-member-role.ts +13 -16
- package/models/update-organization-quota.ts +68 -71
- package/models/update-organization-role.ts +29 -32
- package/models/usage-overview.ts +92 -95
- package/models/user-public-key.ts +14 -17
- package/models/user.ts +27 -29
- package/models/workspace-info.ts +20 -23
- package/models/workspace-labels.ts +8 -11
- package/models/workspace-state.ts +19 -24
- package/models/workspace.ts +119 -122
- package/package.json +2 -2
- package/project.json +49 -0
- package/tsconfig.json +3 -8
- package/README.md +0 -46
- package/git_push.sh +0 -57
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Daytona Workspaces
|
|
5
|
+
* Daytona Workspaces API Docs
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import type { Configuration } from '../configuration'
|
|
16
|
+
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'
|
|
17
|
+
import globalAxios from 'axios'
|
|
18
|
+
// Some imports not used depending on template conditions
|
|
19
|
+
// @ts-ignore
|
|
20
|
+
import {
|
|
21
|
+
DUMMY_BASE_URL,
|
|
22
|
+
assertParamExists,
|
|
23
|
+
setApiKeyToObject,
|
|
24
|
+
setBasicAuthToObject,
|
|
25
|
+
setBearerAuthToObject,
|
|
26
|
+
setOAuthToObject,
|
|
27
|
+
setSearchParams,
|
|
28
|
+
serializeDataIfNeeded,
|
|
29
|
+
toPathString,
|
|
30
|
+
createRequestFunction,
|
|
31
|
+
} from '../common'
|
|
32
|
+
// @ts-ignore
|
|
33
|
+
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'
|
|
34
|
+
/**
|
|
35
|
+
* PreviewApi - axios parameter creator
|
|
36
|
+
* @export
|
|
37
|
+
*/
|
|
38
|
+
export const PreviewApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
39
|
+
return {
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @summary Check if user has access to the workspace
|
|
43
|
+
* @param {string} workspaceId
|
|
44
|
+
* @param {*} [options] Override http request option.
|
|
45
|
+
* @throws {RequiredError}
|
|
46
|
+
*/
|
|
47
|
+
hasWorkspaceAccess: async (workspaceId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
48
|
+
// verify required parameter 'workspaceId' is not null or undefined
|
|
49
|
+
assertParamExists('hasWorkspaceAccess', 'workspaceId', workspaceId)
|
|
50
|
+
const localVarPath = `/preview/{workspaceId}/access`.replace(
|
|
51
|
+
`{${'workspaceId'}}`,
|
|
52
|
+
encodeURIComponent(String(workspaceId)),
|
|
53
|
+
)
|
|
54
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
55
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL)
|
|
56
|
+
let baseOptions
|
|
57
|
+
if (configuration) {
|
|
58
|
+
baseOptions = configuration.baseOptions
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }
|
|
62
|
+
const localVarHeaderParameter = {} as any
|
|
63
|
+
const localVarQueryParameter = {} as any
|
|
64
|
+
|
|
65
|
+
// authentication oauth2 required
|
|
66
|
+
// oauth required
|
|
67
|
+
await setOAuthToObject(localVarHeaderParameter, 'oauth2', ['openid', 'profile', 'email'], configuration)
|
|
68
|
+
|
|
69
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter)
|
|
70
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}
|
|
71
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }
|
|
72
|
+
|
|
73
|
+
return {
|
|
74
|
+
url: toPathString(localVarUrlObj),
|
|
75
|
+
options: localVarRequestOptions,
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
/**
|
|
79
|
+
*
|
|
80
|
+
* @summary Check if workspace auth token is valid
|
|
81
|
+
* @param {string} workspaceId ID of the workspace
|
|
82
|
+
* @param {string} authToken Auth token of the workspace
|
|
83
|
+
* @param {*} [options] Override http request option.
|
|
84
|
+
* @throws {RequiredError}
|
|
85
|
+
*/
|
|
86
|
+
isValidAuthToken: async (
|
|
87
|
+
workspaceId: string,
|
|
88
|
+
authToken: string,
|
|
89
|
+
options: RawAxiosRequestConfig = {},
|
|
90
|
+
): Promise<RequestArgs> => {
|
|
91
|
+
// verify required parameter 'workspaceId' is not null or undefined
|
|
92
|
+
assertParamExists('isValidAuthToken', 'workspaceId', workspaceId)
|
|
93
|
+
// verify required parameter 'authToken' is not null or undefined
|
|
94
|
+
assertParamExists('isValidAuthToken', 'authToken', authToken)
|
|
95
|
+
const localVarPath = `/preview/{workspaceId}/validate/{authToken}`
|
|
96
|
+
.replace(`{${'workspaceId'}}`, encodeURIComponent(String(workspaceId)))
|
|
97
|
+
.replace(`{${'authToken'}}`, encodeURIComponent(String(authToken)))
|
|
98
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
99
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL)
|
|
100
|
+
let baseOptions
|
|
101
|
+
if (configuration) {
|
|
102
|
+
baseOptions = configuration.baseOptions
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }
|
|
106
|
+
const localVarHeaderParameter = {} as any
|
|
107
|
+
const localVarQueryParameter = {} as any
|
|
108
|
+
|
|
109
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter)
|
|
110
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}
|
|
111
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }
|
|
112
|
+
|
|
113
|
+
return {
|
|
114
|
+
url: toPathString(localVarUrlObj),
|
|
115
|
+
options: localVarRequestOptions,
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
/**
|
|
119
|
+
*
|
|
120
|
+
* @summary Check if workspace is public
|
|
121
|
+
* @param {string} workspaceId ID of the workspace
|
|
122
|
+
* @param {*} [options] Override http request option.
|
|
123
|
+
* @throws {RequiredError}
|
|
124
|
+
*/
|
|
125
|
+
isWorkspacePublic: async (workspaceId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
126
|
+
// verify required parameter 'workspaceId' is not null or undefined
|
|
127
|
+
assertParamExists('isWorkspacePublic', 'workspaceId', workspaceId)
|
|
128
|
+
const localVarPath = `/preview/{workspaceId}/public`.replace(
|
|
129
|
+
`{${'workspaceId'}}`,
|
|
130
|
+
encodeURIComponent(String(workspaceId)),
|
|
131
|
+
)
|
|
132
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
133
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL)
|
|
134
|
+
let baseOptions
|
|
135
|
+
if (configuration) {
|
|
136
|
+
baseOptions = configuration.baseOptions
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }
|
|
140
|
+
const localVarHeaderParameter = {} as any
|
|
141
|
+
const localVarQueryParameter = {} as any
|
|
142
|
+
|
|
143
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter)
|
|
144
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}
|
|
145
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }
|
|
146
|
+
|
|
147
|
+
return {
|
|
148
|
+
url: toPathString(localVarUrlObj),
|
|
149
|
+
options: localVarRequestOptions,
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* PreviewApi - functional programming interface
|
|
157
|
+
* @export
|
|
158
|
+
*/
|
|
159
|
+
export const PreviewApiFp = function (configuration?: Configuration) {
|
|
160
|
+
const localVarAxiosParamCreator = PreviewApiAxiosParamCreator(configuration)
|
|
161
|
+
return {
|
|
162
|
+
/**
|
|
163
|
+
*
|
|
164
|
+
* @summary Check if user has access to the workspace
|
|
165
|
+
* @param {string} workspaceId
|
|
166
|
+
* @param {*} [options] Override http request option.
|
|
167
|
+
* @throws {RequiredError}
|
|
168
|
+
*/
|
|
169
|
+
async hasWorkspaceAccess(
|
|
170
|
+
workspaceId: string,
|
|
171
|
+
options?: RawAxiosRequestConfig,
|
|
172
|
+
): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
173
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.hasWorkspaceAccess(workspaceId, options)
|
|
174
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0
|
|
175
|
+
const localVarOperationServerBasePath =
|
|
176
|
+
operationServerMap['PreviewApi.hasWorkspaceAccess']?.[localVarOperationServerIndex]?.url
|
|
177
|
+
return (axios, basePath) =>
|
|
178
|
+
createRequestFunction(
|
|
179
|
+
localVarAxiosArgs,
|
|
180
|
+
globalAxios,
|
|
181
|
+
BASE_PATH,
|
|
182
|
+
configuration,
|
|
183
|
+
)(axios, localVarOperationServerBasePath || basePath)
|
|
184
|
+
},
|
|
185
|
+
/**
|
|
186
|
+
*
|
|
187
|
+
* @summary Check if workspace auth token is valid
|
|
188
|
+
* @param {string} workspaceId ID of the workspace
|
|
189
|
+
* @param {string} authToken Auth token of the workspace
|
|
190
|
+
* @param {*} [options] Override http request option.
|
|
191
|
+
* @throws {RequiredError}
|
|
192
|
+
*/
|
|
193
|
+
async isValidAuthToken(
|
|
194
|
+
workspaceId: string,
|
|
195
|
+
authToken: string,
|
|
196
|
+
options?: RawAxiosRequestConfig,
|
|
197
|
+
): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<boolean>> {
|
|
198
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.isValidAuthToken(workspaceId, authToken, options)
|
|
199
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0
|
|
200
|
+
const localVarOperationServerBasePath =
|
|
201
|
+
operationServerMap['PreviewApi.isValidAuthToken']?.[localVarOperationServerIndex]?.url
|
|
202
|
+
return (axios, basePath) =>
|
|
203
|
+
createRequestFunction(
|
|
204
|
+
localVarAxiosArgs,
|
|
205
|
+
globalAxios,
|
|
206
|
+
BASE_PATH,
|
|
207
|
+
configuration,
|
|
208
|
+
)(axios, localVarOperationServerBasePath || basePath)
|
|
209
|
+
},
|
|
210
|
+
/**
|
|
211
|
+
*
|
|
212
|
+
* @summary Check if workspace is public
|
|
213
|
+
* @param {string} workspaceId ID of the workspace
|
|
214
|
+
* @param {*} [options] Override http request option.
|
|
215
|
+
* @throws {RequiredError}
|
|
216
|
+
*/
|
|
217
|
+
async isWorkspacePublic(
|
|
218
|
+
workspaceId: string,
|
|
219
|
+
options?: RawAxiosRequestConfig,
|
|
220
|
+
): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<boolean>> {
|
|
221
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.isWorkspacePublic(workspaceId, options)
|
|
222
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0
|
|
223
|
+
const localVarOperationServerBasePath =
|
|
224
|
+
operationServerMap['PreviewApi.isWorkspacePublic']?.[localVarOperationServerIndex]?.url
|
|
225
|
+
return (axios, basePath) =>
|
|
226
|
+
createRequestFunction(
|
|
227
|
+
localVarAxiosArgs,
|
|
228
|
+
globalAxios,
|
|
229
|
+
BASE_PATH,
|
|
230
|
+
configuration,
|
|
231
|
+
)(axios, localVarOperationServerBasePath || basePath)
|
|
232
|
+
},
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* PreviewApi - factory interface
|
|
238
|
+
* @export
|
|
239
|
+
*/
|
|
240
|
+
export const PreviewApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
241
|
+
const localVarFp = PreviewApiFp(configuration)
|
|
242
|
+
return {
|
|
243
|
+
/**
|
|
244
|
+
*
|
|
245
|
+
* @summary Check if user has access to the workspace
|
|
246
|
+
* @param {string} workspaceId
|
|
247
|
+
* @param {*} [options] Override http request option.
|
|
248
|
+
* @throws {RequiredError}
|
|
249
|
+
*/
|
|
250
|
+
hasWorkspaceAccess(workspaceId: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
|
251
|
+
return localVarFp.hasWorkspaceAccess(workspaceId, options).then((request) => request(axios, basePath))
|
|
252
|
+
},
|
|
253
|
+
/**
|
|
254
|
+
*
|
|
255
|
+
* @summary Check if workspace auth token is valid
|
|
256
|
+
* @param {string} workspaceId ID of the workspace
|
|
257
|
+
* @param {string} authToken Auth token of the workspace
|
|
258
|
+
* @param {*} [options] Override http request option.
|
|
259
|
+
* @throws {RequiredError}
|
|
260
|
+
*/
|
|
261
|
+
isValidAuthToken(workspaceId: string, authToken: string, options?: RawAxiosRequestConfig): AxiosPromise<boolean> {
|
|
262
|
+
return localVarFp.isValidAuthToken(workspaceId, authToken, options).then((request) => request(axios, basePath))
|
|
263
|
+
},
|
|
264
|
+
/**
|
|
265
|
+
*
|
|
266
|
+
* @summary Check if workspace is public
|
|
267
|
+
* @param {string} workspaceId ID of the workspace
|
|
268
|
+
* @param {*} [options] Override http request option.
|
|
269
|
+
* @throws {RequiredError}
|
|
270
|
+
*/
|
|
271
|
+
isWorkspacePublic(workspaceId: string, options?: RawAxiosRequestConfig): AxiosPromise<boolean> {
|
|
272
|
+
return localVarFp.isWorkspacePublic(workspaceId, options).then((request) => request(axios, basePath))
|
|
273
|
+
},
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* PreviewApi - object-oriented interface
|
|
279
|
+
* @export
|
|
280
|
+
* @class PreviewApi
|
|
281
|
+
* @extends {BaseAPI}
|
|
282
|
+
*/
|
|
283
|
+
export class PreviewApi extends BaseAPI {
|
|
284
|
+
/**
|
|
285
|
+
*
|
|
286
|
+
* @summary Check if user has access to the workspace
|
|
287
|
+
* @param {string} workspaceId
|
|
288
|
+
* @param {*} [options] Override http request option.
|
|
289
|
+
* @throws {RequiredError}
|
|
290
|
+
* @memberof PreviewApi
|
|
291
|
+
*/
|
|
292
|
+
public hasWorkspaceAccess(workspaceId: string, options?: RawAxiosRequestConfig) {
|
|
293
|
+
return PreviewApiFp(this.configuration)
|
|
294
|
+
.hasWorkspaceAccess(workspaceId, options)
|
|
295
|
+
.then((request) => request(this.axios, this.basePath))
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
*
|
|
300
|
+
* @summary Check if workspace auth token is valid
|
|
301
|
+
* @param {string} workspaceId ID of the workspace
|
|
302
|
+
* @param {string} authToken Auth token of the workspace
|
|
303
|
+
* @param {*} [options] Override http request option.
|
|
304
|
+
* @throws {RequiredError}
|
|
305
|
+
* @memberof PreviewApi
|
|
306
|
+
*/
|
|
307
|
+
public isValidAuthToken(workspaceId: string, authToken: string, options?: RawAxiosRequestConfig) {
|
|
308
|
+
return PreviewApiFp(this.configuration)
|
|
309
|
+
.isValidAuthToken(workspaceId, authToken, options)
|
|
310
|
+
.then((request) => request(this.axios, this.basePath))
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
*
|
|
315
|
+
* @summary Check if workspace is public
|
|
316
|
+
* @param {string} workspaceId ID of the workspace
|
|
317
|
+
* @param {*} [options] Override http request option.
|
|
318
|
+
* @throws {RequiredError}
|
|
319
|
+
* @memberof PreviewApi
|
|
320
|
+
*/
|
|
321
|
+
public isWorkspacePublic(workspaceId: string, options?: RawAxiosRequestConfig) {
|
|
322
|
+
return PreviewApiFp(this.configuration)
|
|
323
|
+
.isWorkspacePublic(workspaceId, options)
|
|
324
|
+
.then((request) => request(this.axios, this.basePath))
|
|
325
|
+
}
|
|
326
|
+
}
|