@platzio/sdk 0.6.0-beta.3 → 0.7.0-beta.2
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/.github/workflows/release.yaml +17 -5
- package/AGENTS.md +9 -0
- package/dist/index.d.mts +586 -5347
- package/dist/index.d.ts +586 -5347
- package/dist/index.js +262 -435
- package/dist/index.mjs +258 -432
- package/openapi.yaml +1461 -1596
- package/package.json +3 -3
- package/src/.openapi-generator/FILES +190 -0
- package/src/.openapi-generator/VERSION +1 -1
- package/src/api.ts +565 -5536
- package/src/base.ts +0 -24
- package/src/common.ts +19 -42
- package/src/configuration.ts +32 -21
- package/src/docs/AuthenticationApi.md +147 -0
- package/src/docs/Bot.md +24 -0
- package/src/docs/BotToken.md +26 -0
- package/src/docs/BotTokensApi.md +215 -0
- package/src/docs/BotsApi.md +164 -0
- package/src/docs/ChartExt.md +30 -0
- package/src/docs/ChartExtActionEndpoint.md +8 -0
- package/src/docs/ChartExtActionMethod.md +16 -0
- package/src/docs/ChartExtActionTarget.md +24 -0
- package/src/docs/ChartExtActionUserDeploymentRole.md +10 -0
- package/src/docs/ChartExtActionV0.md +40 -0
- package/src/docs/ChartExtActionV1Beta1.md +24 -0
- package/src/docs/ChartExtActions.md +22 -0
- package/src/docs/ChartExtActionsV0.md +22 -0
- package/src/docs/ChartExtCardinality.md +10 -0
- package/src/docs/ChartExtDeploymentDisplay.md +22 -0
- package/src/docs/ChartExtDeploymentDisplayIcon.md +20 -0
- package/src/docs/ChartExtDeploymentDisplayName.md +20 -0
- package/src/docs/ChartExtDeploymentDisplayNameInputField.md +20 -0
- package/src/docs/ChartExtDeploymentDisplayNameOneOf.md +20 -0
- package/src/docs/ChartExtFeatures.md +36 -0
- package/src/docs/ChartExtFeaturesSpec.md +32 -0
- package/src/docs/ChartExtFeaturesV0.md +30 -0
- package/src/docs/ChartExtFeaturesV1Beta1.md +24 -0
- package/src/docs/ChartExtFeaturesV1Beta2.md +24 -0
- package/src/docs/ChartExtIngress.md +22 -0
- package/src/docs/ChartExtIngressHostnameFormat.md +10 -0
- package/src/docs/ChartExtKindAction.md +8 -0
- package/src/docs/ChartExtKindFeatures.md +8 -0
- package/src/docs/ChartExtKindResourceType.md +8 -0
- package/src/docs/ChartExtKindValuesUi.md +8 -0
- package/src/docs/ChartExtResourceLifecycleActionV1Beta1.md +22 -0
- package/src/docs/ChartExtResourceLifecycleV1Beta1.md +24 -0
- package/src/docs/ChartExtResourceTypeV1Beta1.md +26 -0
- package/src/docs/ChartExtResourceTypeV1Beta1Spec.md +30 -0
- package/src/docs/ChartExtStatusFeature.md +24 -0
- package/src/docs/ChartExtVersionV1Beta1.md +8 -0
- package/src/docs/ChartExtVersionV1Beta2.md +8 -0
- package/src/docs/ChartMetadata.md +28 -0
- package/src/docs/CreateBotToken.md +20 -0
- package/src/docs/CreateDeploymentTask.md +24 -0
- package/src/docs/CreateUserToken.md +20 -0
- package/src/docs/CreatedBotToken.md +20 -0
- package/src/docs/CreatedUserToken.md +20 -0
- package/src/docs/DbEvent.md +24 -0
- package/src/docs/DbEventData.md +20 -0
- package/src/docs/DbEventOperation.md +12 -0
- package/src/docs/DbTable.md +40 -0
- package/src/docs/DbTableOrDeploymentResource.md +22 -0
- package/src/docs/DbTableOrDeploymentResourceOneOf.md +22 -0
- package/src/docs/Deployment.md +46 -0
- package/src/docs/DeploymentInstallTask.md +24 -0
- package/src/docs/DeploymentInvokeActionTask.md +24 -0
- package/src/docs/DeploymentKind.md +24 -0
- package/src/docs/DeploymentKindsApi.md +164 -0
- package/src/docs/DeploymentPermission.md +30 -0
- package/src/docs/DeploymentPermissionsApi.md +212 -0
- package/src/docs/DeploymentRecreaseTask.md +26 -0
- package/src/docs/DeploymentReinstallTask.md +20 -0
- package/src/docs/DeploymentReportedMetric.md +26 -0
- package/src/docs/DeploymentReportedNotice.md +22 -0
- package/src/docs/DeploymentReportedNoticeLevel.md +12 -0
- package/src/docs/DeploymentReportedStatus.md +26 -0
- package/src/docs/DeploymentReportedStatusColor.md +16 -0
- package/src/docs/DeploymentReportedStatusContent.md +26 -0
- package/src/docs/DeploymentReportedStatusSummary.md +22 -0
- package/src/docs/DeploymentResource.md +36 -0
- package/src/docs/DeploymentResourceSyncStatus.md +16 -0
- package/src/docs/DeploymentResourceType.md +30 -0
- package/src/docs/DeploymentResourceTypesApi.md +115 -0
- package/src/docs/DeploymentResourcesApi.md +267 -0
- package/src/docs/DeploymentRestartK8sResourceTask.md +22 -0
- package/src/docs/DeploymentStatus.md +24 -0
- package/src/docs/DeploymentTask.md +48 -0
- package/src/docs/DeploymentTaskOperation.md +32 -0
- package/src/docs/DeploymentTaskOperationOneOf.md +20 -0
- package/src/docs/DeploymentTaskOperationOneOf1.md +20 -0
- package/src/docs/DeploymentTaskOperationOneOf2.md +20 -0
- package/src/docs/DeploymentTaskOperationOneOf3.md +20 -0
- package/src/docs/DeploymentTaskOperationOneOf4.md +20 -0
- package/src/docs/DeploymentTaskOperationOneOf5.md +20 -0
- package/src/docs/DeploymentTaskOperationOneOf6.md +20 -0
- package/src/docs/DeploymentTaskStatus.md +16 -0
- package/src/docs/DeploymentTasksApi.md +164 -0
- package/src/docs/DeploymentUpgradeTask.md +28 -0
- package/src/docs/DeploymentsApi.md +276 -0
- package/src/docs/Env.md +30 -0
- package/src/docs/EnvUserPermission.md +28 -0
- package/src/docs/EnvUserPermissionsApi.md +212 -0
- package/src/docs/EnvUserRole.md +10 -0
- package/src/docs/EnvsApi.md +270 -0
- package/src/docs/FinishGoogleLoginResponse.md +20 -0
- package/src/docs/HelmChart.md +50 -0
- package/src/docs/HelmChartsApi.md +112 -0
- package/src/docs/HelmRegistriesApi.md +167 -0
- package/src/docs/HelmRegistry.md +34 -0
- package/src/docs/HelmRegistryProvider.md +10 -0
- package/src/docs/HelmTagFormat.md +24 -0
- package/src/docs/HelmTagFormatsApi.md +212 -0
- package/src/docs/K8sCluster.md +48 -0
- package/src/docs/K8sResource.md +36 -0
- package/src/docs/KubernetesClustersApi.md +218 -0
- package/src/docs/KubernetesResourcesApi.md +118 -0
- package/src/docs/MeResponse.md +24 -0
- package/src/docs/MeResponseOneOf.md +20 -0
- package/src/docs/MeResponseOneOf1.md +20 -0
- package/src/docs/MeResponseOneOf2.md +20 -0
- package/src/docs/MeResponseOneOf2Deployment.md +22 -0
- package/src/docs/NewDeployment.md +30 -0
- package/src/docs/NewDeploymentPermission.md +26 -0
- package/src/docs/NewDeploymentResource.md +32 -0
- package/src/docs/NewEnv.md +22 -0
- package/src/docs/NewEnvUserPermission.md +24 -0
- package/src/docs/NewHelmTagFormat.md +20 -0
- package/src/docs/NewSecret.md +26 -0
- package/src/docs/OAuth2Response.md +20 -0
- package/src/docs/PaginatedBot.md +26 -0
- package/src/docs/PaginatedBotItemsInner.md +24 -0
- package/src/docs/PaginatedBotToken.md +26 -0
- package/src/docs/PaginatedBotTokenItemsInner.md +26 -0
- package/src/docs/PaginatedDeployment.md +26 -0
- package/src/docs/PaginatedDeploymentItemsInner.md +46 -0
- package/src/docs/PaginatedDeploymentKind.md +26 -0
- package/src/docs/PaginatedDeploymentKindItemsInner.md +24 -0
- package/src/docs/PaginatedDeploymentPermission.md +26 -0
- package/src/docs/PaginatedDeploymentPermissionItemsInner.md +30 -0
- package/src/docs/PaginatedDeploymentResource.md +26 -0
- package/src/docs/PaginatedDeploymentResourceItemsInner.md +36 -0
- package/src/docs/PaginatedDeploymentResourceType.md +26 -0
- package/src/docs/PaginatedDeploymentResourceTypeItemsInner.md +30 -0
- package/src/docs/PaginatedDeploymentTask.md +26 -0
- package/src/docs/PaginatedDeploymentTaskItemsInner.md +48 -0
- package/src/docs/PaginatedEnv.md +26 -0
- package/src/docs/PaginatedEnvItemsInner.md +30 -0
- package/src/docs/PaginatedEnvUserPermission.md +26 -0
- package/src/docs/PaginatedEnvUserPermissionItemsInner.md +28 -0
- package/src/docs/PaginatedHelmChart.md +26 -0
- package/src/docs/PaginatedHelmChartItemsInner.md +50 -0
- package/src/docs/PaginatedHelmRegistry.md +26 -0
- package/src/docs/PaginatedHelmRegistryItemsInner.md +34 -0
- package/src/docs/PaginatedHelmTagFormat.md +26 -0
- package/src/docs/PaginatedHelmTagFormatItemsInner.md +24 -0
- package/src/docs/PaginatedK8sCluster.md +26 -0
- package/src/docs/PaginatedK8sClusterItemsInner.md +48 -0
- package/src/docs/PaginatedK8sResource.md +26 -0
- package/src/docs/PaginatedK8sResourceItemsInner.md +36 -0
- package/src/docs/PaginatedSecret.md +26 -0
- package/src/docs/PaginatedSecretItemsInner.md +30 -0
- package/src/docs/PaginatedUser.md +26 -0
- package/src/docs/PaginatedUserItemsInner.md +30 -0
- package/src/docs/PaginatedUserToken.md +26 -0
- package/src/docs/PaginatedUserTokenItemsInner.md +24 -0
- package/src/docs/Secret.md +30 -0
- package/src/docs/SecretsApi.md +273 -0
- package/src/docs/SerializedUiSchemaInputType.md +24 -0
- package/src/docs/ServerApi.md +51 -0
- package/src/docs/ServerInfo.md +20 -0
- package/src/docs/StartGoogleLoginResponse.md +20 -0
- package/src/docs/UiSchema.md +26 -0
- package/src/docs/UiSchemaFieldValuePair.md +22 -0
- package/src/docs/UiSchemaInput.md +50 -0
- package/src/docs/UiSchemaInputFieldOption.md +24 -0
- package/src/docs/UiSchemaInputFieldValue.md +22 -0
- package/src/docs/UiSchemaInputRef.md +22 -0
- package/src/docs/UiSchemaInputRefField.md +20 -0
- package/src/docs/UiSchemaInputRefOneOf.md +20 -0
- package/src/docs/UiSchemaInputRefOneOf1.md +20 -0
- package/src/docs/UiSchemaInputRefProperty.md +22 -0
- package/src/docs/UiSchemaInputSingleType.md +20 -0
- package/src/docs/UiSchemaInputSingleTypeOneOf.md +20 -0
- package/src/docs/UiSchemaInputSingleTypeOneOfCollectionSelect.md +20 -0
- package/src/docs/UiSchemaInputType.md +22 -0
- package/src/docs/UiSchemaOutputValue.md +22 -0
- package/src/docs/UiSchemaOutputs.md +22 -0
- package/src/docs/UiSchemaV0.md +22 -0
- package/src/docs/UiSchemaV1Beta1.md +26 -0
- package/src/docs/UpdateBot.md +20 -0
- package/src/docs/UpdateDeployment.md +32 -0
- package/src/docs/UpdateDeploymentKind.md +20 -0
- package/src/docs/UpdateDeploymentResource.md +22 -0
- package/src/docs/UpdateEnv.md +26 -0
- package/src/docs/UpdateHelmRegistry.md +20 -0
- package/src/docs/UpdateK8sCluster.md +32 -0
- package/src/docs/UpdateSecret.md +22 -0
- package/src/docs/UpdateUser.md +22 -0
- package/src/docs/User.md +30 -0
- package/src/docs/UserDeploymentRole.md +10 -0
- package/src/docs/UserToken.md +24 -0
- package/src/docs/UserTokensApi.md +212 -0
- package/src/docs/UsersApi.md +170 -0
- package/tsconfig.json +1 -0
package/src/base.ts
CHANGED
|
@@ -21,10 +21,6 @@ import globalAxios from 'axios';
|
|
|
21
21
|
|
|
22
22
|
export const BASE_PATH = "http://localhost".replace(/\/+$/, "");
|
|
23
23
|
|
|
24
|
-
/**
|
|
25
|
-
*
|
|
26
|
-
* @export
|
|
27
|
-
*/
|
|
28
24
|
export const COLLECTION_FORMATS = {
|
|
29
25
|
csv: ",",
|
|
30
26
|
ssv: " ",
|
|
@@ -32,21 +28,11 @@ export const COLLECTION_FORMATS = {
|
|
|
32
28
|
pipes: "|",
|
|
33
29
|
};
|
|
34
30
|
|
|
35
|
-
/**
|
|
36
|
-
*
|
|
37
|
-
* @export
|
|
38
|
-
* @interface RequestArgs
|
|
39
|
-
*/
|
|
40
31
|
export interface RequestArgs {
|
|
41
32
|
url: string;
|
|
42
33
|
options: RawAxiosRequestConfig;
|
|
43
34
|
}
|
|
44
35
|
|
|
45
|
-
/**
|
|
46
|
-
*
|
|
47
|
-
* @export
|
|
48
|
-
* @class BaseAPI
|
|
49
|
-
*/
|
|
50
36
|
export class BaseAPI {
|
|
51
37
|
protected configuration: Configuration | undefined;
|
|
52
38
|
|
|
@@ -58,12 +44,6 @@ export class BaseAPI {
|
|
|
58
44
|
}
|
|
59
45
|
};
|
|
60
46
|
|
|
61
|
-
/**
|
|
62
|
-
*
|
|
63
|
-
* @export
|
|
64
|
-
* @class RequiredError
|
|
65
|
-
* @extends {Error}
|
|
66
|
-
*/
|
|
67
47
|
export class RequiredError extends Error {
|
|
68
48
|
constructor(public field: string, msg?: string) {
|
|
69
49
|
super(msg);
|
|
@@ -78,9 +58,5 @@ interface ServerMap {
|
|
|
78
58
|
}[];
|
|
79
59
|
}
|
|
80
60
|
|
|
81
|
-
/**
|
|
82
|
-
*
|
|
83
|
-
* @export
|
|
84
|
-
*/
|
|
85
61
|
export const operationServerMap: ServerMap = {
|
|
86
62
|
}
|
package/src/common.ts
CHANGED
|
@@ -12,22 +12,16 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
|
|
16
15
|
import type { Configuration } from "./configuration";
|
|
17
16
|
import type { RequestArgs } from "./base";
|
|
18
17
|
import type { AxiosInstance, AxiosResponse } from 'axios';
|
|
19
18
|
import { RequiredError } from "./base";
|
|
20
19
|
|
|
21
|
-
/**
|
|
22
|
-
*
|
|
23
|
-
* @export
|
|
24
|
-
*/
|
|
25
20
|
export const DUMMY_BASE_URL = 'https://example.com'
|
|
26
21
|
|
|
27
22
|
/**
|
|
28
23
|
*
|
|
29
24
|
* @throws {RequiredError}
|
|
30
|
-
* @export
|
|
31
25
|
*/
|
|
32
26
|
export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) {
|
|
33
27
|
if (paramValue === null || paramValue === undefined) {
|
|
@@ -35,10 +29,6 @@ export const assertParamExists = function (functionName: string, paramName: stri
|
|
|
35
29
|
}
|
|
36
30
|
}
|
|
37
31
|
|
|
38
|
-
/**
|
|
39
|
-
*
|
|
40
|
-
* @export
|
|
41
|
-
*/
|
|
42
32
|
export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) {
|
|
43
33
|
if (configuration && configuration.apiKey) {
|
|
44
34
|
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
@@ -48,20 +38,12 @@ export const setApiKeyToObject = async function (object: any, keyParamName: stri
|
|
|
48
38
|
}
|
|
49
39
|
}
|
|
50
40
|
|
|
51
|
-
/**
|
|
52
|
-
*
|
|
53
|
-
* @export
|
|
54
|
-
*/
|
|
55
41
|
export const setBasicAuthToObject = function (object: any, configuration?: Configuration) {
|
|
56
42
|
if (configuration && (configuration.username || configuration.password)) {
|
|
57
43
|
object["auth"] = { username: configuration.username, password: configuration.password };
|
|
58
44
|
}
|
|
59
45
|
}
|
|
60
46
|
|
|
61
|
-
/**
|
|
62
|
-
*
|
|
63
|
-
* @export
|
|
64
|
-
*/
|
|
65
47
|
export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) {
|
|
66
48
|
if (configuration && configuration.accessToken) {
|
|
67
49
|
const accessToken = typeof configuration.accessToken === 'function'
|
|
@@ -71,10 +53,6 @@ export const setBearerAuthToObject = async function (object: any, configuration?
|
|
|
71
53
|
}
|
|
72
54
|
}
|
|
73
55
|
|
|
74
|
-
/**
|
|
75
|
-
*
|
|
76
|
-
* @export
|
|
77
|
-
*/
|
|
78
56
|
export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) {
|
|
79
57
|
if (configuration && configuration.accessToken) {
|
|
80
58
|
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
|
@@ -84,32 +62,29 @@ export const setOAuthToObject = async function (object: any, name: string, scope
|
|
|
84
62
|
}
|
|
85
63
|
}
|
|
86
64
|
|
|
65
|
+
|
|
87
66
|
function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
|
|
88
67
|
if (parameter == null) return;
|
|
89
68
|
if (typeof parameter === "object") {
|
|
90
|
-
if (Array.isArray(parameter)) {
|
|
69
|
+
if (Array.isArray(parameter) || parameter instanceof Set) {
|
|
91
70
|
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
|
92
|
-
}
|
|
71
|
+
}
|
|
93
72
|
else {
|
|
94
|
-
Object.keys(parameter).forEach(currentKey =>
|
|
73
|
+
Object.keys(parameter).forEach(currentKey =>
|
|
95
74
|
setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`)
|
|
96
75
|
);
|
|
97
76
|
}
|
|
98
|
-
}
|
|
77
|
+
}
|
|
99
78
|
else {
|
|
100
79
|
if (urlSearchParams.has(key)) {
|
|
101
80
|
urlSearchParams.append(key, parameter);
|
|
102
|
-
}
|
|
81
|
+
}
|
|
103
82
|
else {
|
|
104
83
|
urlSearchParams.set(key, parameter);
|
|
105
84
|
}
|
|
106
85
|
}
|
|
107
86
|
}
|
|
108
87
|
|
|
109
|
-
/**
|
|
110
|
-
*
|
|
111
|
-
* @export
|
|
112
|
-
*/
|
|
113
88
|
export const setSearchParams = function (url: URL, ...objects: any[]) {
|
|
114
89
|
const searchParams = new URLSearchParams(url.search);
|
|
115
90
|
setFlattenedQueryParams(searchParams, objects);
|
|
@@ -117,31 +92,33 @@ export const setSearchParams = function (url: URL, ...objects: any[]) {
|
|
|
117
92
|
}
|
|
118
93
|
|
|
119
94
|
/**
|
|
120
|
-
*
|
|
121
|
-
*
|
|
95
|
+
* JSON serialization helper function which replaces instances of unserializable types with serializable ones.
|
|
96
|
+
* This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
|
|
97
|
+
* Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
|
|
122
98
|
*/
|
|
99
|
+
// @ts-ignore
|
|
100
|
+
export const replaceWithSerializableTypeIfNeeded = function(key: string, value: any) {
|
|
101
|
+
if (value instanceof Set) {
|
|
102
|
+
return Array.from(value);
|
|
103
|
+
} else {
|
|
104
|
+
return value;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
123
108
|
export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) {
|
|
124
109
|
const nonString = typeof value !== 'string';
|
|
125
110
|
const needsSerialization = nonString && configuration && configuration.isJsonMime
|
|
126
111
|
? configuration.isJsonMime(requestOptions.headers['Content-Type'])
|
|
127
112
|
: nonString;
|
|
128
113
|
return needsSerialization
|
|
129
|
-
? JSON.stringify(value !== undefined ? value : {})
|
|
114
|
+
? JSON.stringify(value !== undefined ? value : {}, replaceWithSerializableTypeIfNeeded)
|
|
130
115
|
: (value || "");
|
|
131
116
|
}
|
|
132
117
|
|
|
133
|
-
/**
|
|
134
|
-
*
|
|
135
|
-
* @export
|
|
136
|
-
*/
|
|
137
118
|
export const toPathString = function (url: URL) {
|
|
138
119
|
return url.pathname + url.search + url.hash
|
|
139
120
|
}
|
|
140
121
|
|
|
141
|
-
/**
|
|
142
|
-
*
|
|
143
|
-
* @export
|
|
144
|
-
*/
|
|
145
122
|
export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) {
|
|
146
123
|
return <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
147
124
|
const axiosRequestArgs = {...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url};
|
package/src/configuration.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
2
|
/**
|
|
4
3
|
* platz-api
|
|
5
4
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
@@ -12,12 +11,24 @@
|
|
|
12
11
|
* Do not edit the class manually.
|
|
13
12
|
*/
|
|
14
13
|
|
|
14
|
+
interface AWSv4Configuration {
|
|
15
|
+
options?: {
|
|
16
|
+
region?: string
|
|
17
|
+
service?: string
|
|
18
|
+
}
|
|
19
|
+
credentials?: {
|
|
20
|
+
accessKeyId?: string
|
|
21
|
+
secretAccessKey?: string,
|
|
22
|
+
sessionToken?: string
|
|
23
|
+
}
|
|
24
|
+
}
|
|
15
25
|
|
|
16
26
|
export interface ConfigurationParameters {
|
|
17
27
|
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
|
18
28
|
username?: string;
|
|
19
29
|
password?: string;
|
|
20
30
|
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
|
31
|
+
awsv4?: AWSv4Configuration;
|
|
21
32
|
basePath?: string;
|
|
22
33
|
serverIndex?: number;
|
|
23
34
|
baseOptions?: any;
|
|
@@ -28,49 +39,43 @@ export class Configuration {
|
|
|
28
39
|
/**
|
|
29
40
|
* parameter for apiKey security
|
|
30
41
|
* @param name security name
|
|
31
|
-
* @memberof Configuration
|
|
32
42
|
*/
|
|
33
43
|
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
|
34
44
|
/**
|
|
35
45
|
* parameter for basic security
|
|
36
|
-
*
|
|
37
|
-
* @type {string}
|
|
38
|
-
* @memberof Configuration
|
|
39
46
|
*/
|
|
40
47
|
username?: string;
|
|
41
48
|
/**
|
|
42
49
|
* parameter for basic security
|
|
43
|
-
*
|
|
44
|
-
* @type {string}
|
|
45
|
-
* @memberof Configuration
|
|
46
50
|
*/
|
|
47
51
|
password?: string;
|
|
48
52
|
/**
|
|
49
53
|
* parameter for oauth2 security
|
|
50
54
|
* @param name security name
|
|
51
55
|
* @param scopes oauth2 scope
|
|
52
|
-
* @memberof Configuration
|
|
53
56
|
*/
|
|
54
57
|
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
|
55
58
|
/**
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
* @
|
|
59
|
+
* parameter for aws4 signature security
|
|
60
|
+
* @param {Object} AWS4Signature - AWS4 Signature security
|
|
61
|
+
* @param {string} options.region - aws region
|
|
62
|
+
* @param {string} options.service - name of the service.
|
|
63
|
+
* @param {string} credentials.accessKeyId - aws access key id
|
|
64
|
+
* @param {string} credentials.secretAccessKey - aws access key
|
|
65
|
+
* @param {string} credentials.sessionToken - aws session token
|
|
59
66
|
* @memberof Configuration
|
|
60
67
|
*/
|
|
68
|
+
awsv4?: AWSv4Configuration;
|
|
69
|
+
/**
|
|
70
|
+
* override base path
|
|
71
|
+
*/
|
|
61
72
|
basePath?: string;
|
|
62
73
|
/**
|
|
63
74
|
* override server index
|
|
64
|
-
*
|
|
65
|
-
* @type {number}
|
|
66
|
-
* @memberof Configuration
|
|
67
75
|
*/
|
|
68
76
|
serverIndex?: number;
|
|
69
77
|
/**
|
|
70
78
|
* base options for axios calls
|
|
71
|
-
*
|
|
72
|
-
* @type {any}
|
|
73
|
-
* @memberof Configuration
|
|
74
79
|
*/
|
|
75
80
|
baseOptions?: any;
|
|
76
81
|
/**
|
|
@@ -87,9 +92,15 @@ export class Configuration {
|
|
|
87
92
|
this.username = param.username;
|
|
88
93
|
this.password = param.password;
|
|
89
94
|
this.accessToken = param.accessToken;
|
|
95
|
+
this.awsv4 = param.awsv4;
|
|
90
96
|
this.basePath = param.basePath;
|
|
91
97
|
this.serverIndex = param.serverIndex;
|
|
92
|
-
this.baseOptions =
|
|
98
|
+
this.baseOptions = {
|
|
99
|
+
...param.baseOptions,
|
|
100
|
+
headers: {
|
|
101
|
+
...param.baseOptions?.headers,
|
|
102
|
+
},
|
|
103
|
+
};
|
|
93
104
|
this.formDataCtor = param.formDataCtor;
|
|
94
105
|
}
|
|
95
106
|
|
|
@@ -104,7 +115,7 @@ export class Configuration {
|
|
|
104
115
|
* @return True if the given MIME is JSON, false otherwise.
|
|
105
116
|
*/
|
|
106
117
|
public isJsonMime(mime: string): boolean {
|
|
107
|
-
const jsonMime: RegExp =
|
|
108
|
-
return mime !== null &&
|
|
118
|
+
const jsonMime: RegExp = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i;
|
|
119
|
+
return mime !== null && jsonMime.test(mime);
|
|
109
120
|
}
|
|
110
121
|
}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# AuthenticationApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://localhost*
|
|
4
|
+
|
|
5
|
+
|Method | HTTP request | Description|
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
|[**authMe**](#authme) | **GET** /api/v2/auth/me | |
|
|
8
|
+
|[**finishGoogleLogin**](#finishgooglelogin) | **POST** /api/v2/auth/google/callback | |
|
|
9
|
+
|[**startGoogleLogin**](#startgooglelogin) | **GET** /api/v2/auth/google | |
|
|
10
|
+
|
|
11
|
+
# **authMe**
|
|
12
|
+
> MeResponse authMe()
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import {
|
|
19
|
+
AuthenticationApi,
|
|
20
|
+
Configuration
|
|
21
|
+
} from './api';
|
|
22
|
+
|
|
23
|
+
const configuration = new Configuration();
|
|
24
|
+
const apiInstance = new AuthenticationApi(configuration);
|
|
25
|
+
|
|
26
|
+
const { status, data } = await apiInstance.authMe();
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Parameters
|
|
30
|
+
This endpoint does not have any parameters.
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### Return type
|
|
34
|
+
|
|
35
|
+
**MeResponse**
|
|
36
|
+
|
|
37
|
+
### Authorization
|
|
38
|
+
|
|
39
|
+
[access_token](../README.md#access_token), [user_token](../README.md#user_token)
|
|
40
|
+
|
|
41
|
+
### HTTP request headers
|
|
42
|
+
|
|
43
|
+
- **Content-Type**: Not defined
|
|
44
|
+
- **Accept**: application/json
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
### HTTP response details
|
|
48
|
+
| Status code | Description | Response headers |
|
|
49
|
+
|-------------|-------------|------------------|
|
|
50
|
+
|**200** | | - |
|
|
51
|
+
|
|
52
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
53
|
+
|
|
54
|
+
# **finishGoogleLogin**
|
|
55
|
+
> FinishGoogleLoginResponse finishGoogleLogin(oAuth2Response)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
### Example
|
|
59
|
+
|
|
60
|
+
```typescript
|
|
61
|
+
import {
|
|
62
|
+
AuthenticationApi,
|
|
63
|
+
Configuration,
|
|
64
|
+
OAuth2Response
|
|
65
|
+
} from './api';
|
|
66
|
+
|
|
67
|
+
const configuration = new Configuration();
|
|
68
|
+
const apiInstance = new AuthenticationApi(configuration);
|
|
69
|
+
|
|
70
|
+
let oAuth2Response: OAuth2Response; //
|
|
71
|
+
|
|
72
|
+
const { status, data } = await apiInstance.finishGoogleLogin(
|
|
73
|
+
oAuth2Response
|
|
74
|
+
);
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Parameters
|
|
78
|
+
|
|
79
|
+
|Name | Type | Description | Notes|
|
|
80
|
+
|------------- | ------------- | ------------- | -------------|
|
|
81
|
+
| **oAuth2Response** | **OAuth2Response**| | |
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
### Return type
|
|
85
|
+
|
|
86
|
+
**FinishGoogleLoginResponse**
|
|
87
|
+
|
|
88
|
+
### Authorization
|
|
89
|
+
|
|
90
|
+
No authorization required
|
|
91
|
+
|
|
92
|
+
### HTTP request headers
|
|
93
|
+
|
|
94
|
+
- **Content-Type**: application/json
|
|
95
|
+
- **Accept**: application/json
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
### HTTP response details
|
|
99
|
+
| Status code | Description | Response headers |
|
|
100
|
+
|-------------|-------------|------------------|
|
|
101
|
+
|**200** | | - |
|
|
102
|
+
|
|
103
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
104
|
+
|
|
105
|
+
# **startGoogleLogin**
|
|
106
|
+
> StartGoogleLoginResponse startGoogleLogin()
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
### Example
|
|
110
|
+
|
|
111
|
+
```typescript
|
|
112
|
+
import {
|
|
113
|
+
AuthenticationApi,
|
|
114
|
+
Configuration
|
|
115
|
+
} from './api';
|
|
116
|
+
|
|
117
|
+
const configuration = new Configuration();
|
|
118
|
+
const apiInstance = new AuthenticationApi(configuration);
|
|
119
|
+
|
|
120
|
+
const { status, data } = await apiInstance.startGoogleLogin();
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Parameters
|
|
124
|
+
This endpoint does not have any parameters.
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
### Return type
|
|
128
|
+
|
|
129
|
+
**StartGoogleLoginResponse**
|
|
130
|
+
|
|
131
|
+
### Authorization
|
|
132
|
+
|
|
133
|
+
No authorization required
|
|
134
|
+
|
|
135
|
+
### HTTP request headers
|
|
136
|
+
|
|
137
|
+
- **Content-Type**: Not defined
|
|
138
|
+
- **Accept**: application/json
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
### HTTP response details
|
|
142
|
+
| Status code | Description | Response headers |
|
|
143
|
+
|-------------|-------------|------------------|
|
|
144
|
+
|**200** | | - |
|
|
145
|
+
|
|
146
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
147
|
+
|
package/src/docs/Bot.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Bot
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**id** | **string** | | [default to undefined]
|
|
9
|
+
**created_at** | **string** | | [default to undefined]
|
|
10
|
+
**display_name** | **string** | | [default to undefined]
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import { Bot } from './api';
|
|
16
|
+
|
|
17
|
+
const instance: Bot = {
|
|
18
|
+
id,
|
|
19
|
+
created_at,
|
|
20
|
+
display_name,
|
|
21
|
+
};
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# BotToken
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**id** | **string** | | [default to undefined]
|
|
9
|
+
**bot_id** | **string** | | [default to undefined]
|
|
10
|
+
**created_at** | **string** | | [default to undefined]
|
|
11
|
+
**created_by_user_id** | **string** | | [default to undefined]
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { BotToken } from './api';
|
|
17
|
+
|
|
18
|
+
const instance: BotToken = {
|
|
19
|
+
id,
|
|
20
|
+
bot_id,
|
|
21
|
+
created_at,
|
|
22
|
+
created_by_user_id,
|
|
23
|
+
};
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|