groupdocs-parser-cloud 23.7.0 → 25.9.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/LICENSE +1 -1
- package/lib/api_client.d.ts +17 -17
- package/lib/api_client.js +135 -125
- package/lib/api_error.d.ts +56 -56
- package/lib/api_error.js +81 -80
- package/lib/auth.d.ts +23 -22
- package/lib/auth.js +96 -71
- package/lib/configuration.d.ts +39 -39
- package/lib/configuration.js +56 -55
- package/lib/model.d.ts +2211 -2206
- package/lib/model.js +2180 -2169
- package/lib/package_version.d.ts +4 -4
- package/lib/package_version.js +30 -29
- package/lib/parser_api.d.ts +269 -270
- package/lib/parser_api.js +903 -893
- package/lib/serializer.d.ts +14 -14
- package/lib/serializer.js +171 -170
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/package.json +16 -14
package/LICENSE
CHANGED
package/lib/api_client.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Configuration } from "./configuration";
|
|
3
|
-
/**
|
|
4
|
-
* Invoke api method
|
|
5
|
-
* @param requestOptions Request parameters
|
|
6
|
-
* @param config Configuration
|
|
7
|
-
* @param skipAuth If enabled, auth is not applied to request
|
|
8
|
-
*/
|
|
9
|
-
export declare function invokeApiMethod(requestOptions:
|
|
10
|
-
/**
|
|
11
|
-
* Add parameter to query
|
|
12
|
-
* @param url url
|
|
13
|
-
* @param queryParameters queryParameters
|
|
14
|
-
* @param parameterName parameterName
|
|
15
|
-
* @param parameterValue parameterValue
|
|
16
|
-
*/
|
|
17
|
-
export declare function addQueryParameterToUrl(url: any, queryParameters: any, parameterName: any, parameterValue: any): any;
|
|
1
|
+
import { AxiosResponse, RawAxiosRequestConfig } from "axios";
|
|
2
|
+
import { Configuration } from "./configuration";
|
|
3
|
+
/**
|
|
4
|
+
* Invoke api method
|
|
5
|
+
* @param requestOptions Request parameters
|
|
6
|
+
* @param config Configuration
|
|
7
|
+
* @param skipAuth If enabled, auth is not applied to request
|
|
8
|
+
*/
|
|
9
|
+
export declare function invokeApiMethod(requestOptions: RawAxiosRequestConfig, config: Configuration, skipAuth?: boolean): Promise<AxiosResponse>;
|
|
10
|
+
/**
|
|
11
|
+
* Add parameter to query
|
|
12
|
+
* @param url url
|
|
13
|
+
* @param queryParameters queryParameters
|
|
14
|
+
* @param parameterName parameterName
|
|
15
|
+
* @param parameterValue parameterValue
|
|
16
|
+
*/
|
|
17
|
+
export declare function addQueryParameterToUrl(url: any, queryParameters: any, parameterName: any, parameterValue: any): any;
|
package/lib/api_client.js
CHANGED
|
@@ -1,125 +1,135 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* The MIT License (MIT)
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c)
|
|
6
|
-
*
|
|
7
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
9
|
-
* in the Software without restriction, including without limitation the rights
|
|
10
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
12
|
-
* furnished to do so, subject to the following conditions:
|
|
13
|
-
*
|
|
14
|
-
* The above copyright notice and this permission notice shall be included in all
|
|
15
|
-
* copies or substantial portions of the Software.
|
|
16
|
-
*
|
|
17
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
-
* SOFTWARE.
|
|
24
|
-
*/
|
|
25
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
-
return
|
|
27
|
-
|
|
28
|
-
function
|
|
29
|
-
function
|
|
30
|
-
step(
|
|
31
|
-
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
*
|
|
41
|
-
* @param
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
*
|
|
52
|
-
* @param
|
|
53
|
-
* @param
|
|
54
|
-
* @param
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Invoke api method
|
|
73
|
-
* @param requestOptions request parameters
|
|
74
|
-
* @param config Configuration
|
|
75
|
-
* @param skipAuth If enabled, auth is not applied to request
|
|
76
|
-
*/
|
|
77
|
-
function invokeApiMethodInternal(requestOptions, config, skipAuth) {
|
|
78
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
79
|
-
if (config.debugging === true) {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
86
|
-
if (!requestOptions.headers) {
|
|
87
|
-
requestOptions.headers = {};
|
|
88
|
-
}
|
|
89
|
-
requestOptions.headers["x-groupdocs-client"] = "node.js sdk";
|
|
90
|
-
requestOptions.headers["x-groupdocs-client-version"] = package_version_1.PackageVersion;
|
|
91
|
-
const auth = config.authentication;
|
|
92
|
-
if (!skipAuth) {
|
|
93
|
-
yield auth.applyToRequest(requestOptions, config);
|
|
94
|
-
}
|
|
95
|
-
return new Promise((resolve, reject) => {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* The MIT License (MIT)
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Aspose Pty Ltd
|
|
6
|
+
*
|
|
7
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
* in the Software without restriction, including without limitation the rights
|
|
10
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
* furnished to do so, subject to the following conditions:
|
|
13
|
+
*
|
|
14
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
15
|
+
* copies or substantial portions of the Software.
|
|
16
|
+
*
|
|
17
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
+
* SOFTWARE.
|
|
24
|
+
*/
|
|
25
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
+
exports.invokeApiMethod = invokeApiMethod;
|
|
36
|
+
exports.addQueryParameterToUrl = addQueryParameterToUrl;
|
|
37
|
+
const axios_1 = require("axios");
|
|
38
|
+
const package_version_1 = require("./package_version");
|
|
39
|
+
/**
|
|
40
|
+
* Invoke api method
|
|
41
|
+
* @param requestOptions Request parameters
|
|
42
|
+
* @param config Configuration
|
|
43
|
+
* @param skipAuth If enabled, auth is not applied to request
|
|
44
|
+
*/
|
|
45
|
+
function invokeApiMethod(requestOptions, config, skipAuth) {
|
|
46
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
+
return yield invokeApiMethodInternal(requestOptions, config, skipAuth);
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Add parameter to query
|
|
52
|
+
* @param url url
|
|
53
|
+
* @param queryParameters queryParameters
|
|
54
|
+
* @param parameterName parameterName
|
|
55
|
+
* @param parameterValue parameterValue
|
|
56
|
+
*/
|
|
57
|
+
function addQueryParameterToUrl(url, queryParameters, parameterName, parameterValue) {
|
|
58
|
+
if (parameterValue !== undefined) {
|
|
59
|
+
if (url.indexOf("{" + parameterName + "}") >= 0) {
|
|
60
|
+
url = url.replace("{" + parameterName + "}", String(parameterValue));
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
queryParameters[parameterName] = String(parameterValue);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
url = url.replace("/{" + parameterName + "}", "");
|
|
68
|
+
}
|
|
69
|
+
return url;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Invoke api method
|
|
73
|
+
* @param requestOptions request parameters
|
|
74
|
+
* @param config Configuration
|
|
75
|
+
* @param skipAuth If enabled, auth is not applied to request
|
|
76
|
+
*/
|
|
77
|
+
function invokeApiMethodInternal(requestOptions, config, skipAuth) {
|
|
78
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
79
|
+
// if (config.debugging === true) {
|
|
80
|
+
// requestDebug(request, (type, data) => {
|
|
81
|
+
// const toLog = {};
|
|
82
|
+
// toLog[type] = data;
|
|
83
|
+
// console.log(JSON.stringify(toLog, undefined, 2));
|
|
84
|
+
// });
|
|
85
|
+
// }
|
|
86
|
+
if (!requestOptions.headers) {
|
|
87
|
+
requestOptions.headers = {};
|
|
88
|
+
}
|
|
89
|
+
requestOptions.headers["x-groupdocs-client"] = "node.js sdk";
|
|
90
|
+
requestOptions.headers["x-groupdocs-client-version"] = package_version_1.PackageVersion;
|
|
91
|
+
const auth = config.authentication;
|
|
92
|
+
if (!skipAuth) {
|
|
93
|
+
yield auth.applyToRequest(requestOptions, config);
|
|
94
|
+
}
|
|
95
|
+
return new Promise((resolve, reject) => {
|
|
96
|
+
(0, axios_1.default)(requestOptions)
|
|
97
|
+
.then((response) => {
|
|
98
|
+
if (response.status >= 200 && response.status <= 299) {
|
|
99
|
+
resolve(response);
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
reject({ message: response.data, code: response.status });
|
|
103
|
+
}
|
|
104
|
+
})
|
|
105
|
+
.catch((error) => {
|
|
106
|
+
try {
|
|
107
|
+
const response = error.response;
|
|
108
|
+
let bodyContent = response.data;
|
|
109
|
+
if (bodyContent instanceof Buffer) {
|
|
110
|
+
bodyContent = JSON.parse(bodyContent.toString("utf8"));
|
|
111
|
+
}
|
|
112
|
+
if (bodyContent.error) {
|
|
113
|
+
if (bodyContent.error.message) {
|
|
114
|
+
reject({ message: bodyContent.error.message, code: bodyContent.error.code });
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
reject({ message: bodyContent.error, code: response.status });
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
if (bodyContent.message) {
|
|
122
|
+
reject({ message: bodyContent.message, code: bodyContent.code });
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
reject({ message: bodyContent, code: response.status });
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
catch (error) {
|
|
130
|
+
reject({ message: "Error while parse server error: " + error });
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
});
|
|
135
|
+
}
|
package/lib/api_error.d.ts
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Describes API error.
|
|
3
|
-
*/
|
|
4
|
-
export declare class ApiError {
|
|
5
|
-
/**
|
|
6
|
-
* Attribute type map
|
|
7
|
-
*/
|
|
8
|
-
static attributeTypeMap: Array<{
|
|
9
|
-
name: string;
|
|
10
|
-
baseName: string;
|
|
11
|
-
type: string;
|
|
12
|
-
}>;
|
|
13
|
-
/**
|
|
14
|
-
* Returns attribute type map
|
|
15
|
-
*/
|
|
16
|
-
static getAttributeTypeMap(): {
|
|
17
|
-
name: string;
|
|
18
|
-
baseName: string;
|
|
19
|
-
type: string;
|
|
20
|
-
}[];
|
|
21
|
-
/**
|
|
22
|
-
* Error.
|
|
23
|
-
*/
|
|
24
|
-
error: Error;
|
|
25
|
-
constructor(init?: Partial<ApiError>);
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Error.
|
|
29
|
-
*/
|
|
30
|
-
export declare class Error {
|
|
31
|
-
/**
|
|
32
|
-
* Attribute type map
|
|
33
|
-
*/
|
|
34
|
-
static attributeTypeMap: Array<{
|
|
35
|
-
name: string;
|
|
36
|
-
baseName: string;
|
|
37
|
-
type: string;
|
|
38
|
-
}>;
|
|
39
|
-
/**
|
|
40
|
-
* Returns attribute type map
|
|
41
|
-
*/
|
|
42
|
-
static getAttributeTypeMap(): {
|
|
43
|
-
name: string;
|
|
44
|
-
baseName: string;
|
|
45
|
-
type: string;
|
|
46
|
-
}[];
|
|
47
|
-
/**
|
|
48
|
-
* Error code.
|
|
49
|
-
*/
|
|
50
|
-
code: string;
|
|
51
|
-
/**
|
|
52
|
-
* Error message
|
|
53
|
-
*/
|
|
54
|
-
message: string;
|
|
55
|
-
constructor(init?: Partial<Error>);
|
|
56
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Describes API error.
|
|
3
|
+
*/
|
|
4
|
+
export declare class ApiError {
|
|
5
|
+
/**
|
|
6
|
+
* Attribute type map
|
|
7
|
+
*/
|
|
8
|
+
static attributeTypeMap: Array<{
|
|
9
|
+
name: string;
|
|
10
|
+
baseName: string;
|
|
11
|
+
type: string;
|
|
12
|
+
}>;
|
|
13
|
+
/**
|
|
14
|
+
* Returns attribute type map
|
|
15
|
+
*/
|
|
16
|
+
static getAttributeTypeMap(): {
|
|
17
|
+
name: string;
|
|
18
|
+
baseName: string;
|
|
19
|
+
type: string;
|
|
20
|
+
}[];
|
|
21
|
+
/**
|
|
22
|
+
* Error.
|
|
23
|
+
*/
|
|
24
|
+
error: Error;
|
|
25
|
+
constructor(init?: Partial<ApiError>);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Error.
|
|
29
|
+
*/
|
|
30
|
+
export declare class Error {
|
|
31
|
+
/**
|
|
32
|
+
* Attribute type map
|
|
33
|
+
*/
|
|
34
|
+
static attributeTypeMap: Array<{
|
|
35
|
+
name: string;
|
|
36
|
+
baseName: string;
|
|
37
|
+
type: string;
|
|
38
|
+
}>;
|
|
39
|
+
/**
|
|
40
|
+
* Returns attribute type map
|
|
41
|
+
*/
|
|
42
|
+
static getAttributeTypeMap(): {
|
|
43
|
+
name: string;
|
|
44
|
+
baseName: string;
|
|
45
|
+
type: string;
|
|
46
|
+
}[];
|
|
47
|
+
/**
|
|
48
|
+
* Error code.
|
|
49
|
+
*/
|
|
50
|
+
code: string;
|
|
51
|
+
/**
|
|
52
|
+
* Error message
|
|
53
|
+
*/
|
|
54
|
+
message: string;
|
|
55
|
+
constructor(init?: Partial<Error>);
|
|
56
|
+
}
|
package/lib/api_error.js
CHANGED
|
@@ -1,80 +1,81 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* The MIT License (MIT)
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c)
|
|
6
|
-
*
|
|
7
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
9
|
-
* in the Software without restriction, including without limitation the rights
|
|
10
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
12
|
-
* furnished to do so, subject to the following conditions:
|
|
13
|
-
*
|
|
14
|
-
* The above copyright notice and this permission notice shall be included in all
|
|
15
|
-
* copies or substantial portions of the Software.
|
|
16
|
-
*
|
|
17
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
-
* SOFTWARE.
|
|
24
|
-
*/
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* The MIT License (MIT)
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Aspose Pty Ltd
|
|
6
|
+
*
|
|
7
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
* in the Software without restriction, including without limitation the rights
|
|
10
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
* furnished to do so, subject to the following conditions:
|
|
13
|
+
*
|
|
14
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
15
|
+
* copies or substantial portions of the Software.
|
|
16
|
+
*
|
|
17
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
+
* SOFTWARE.
|
|
24
|
+
*/
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.Error = exports.ApiError = void 0;
|
|
27
|
+
/**
|
|
28
|
+
* Describes API error.
|
|
29
|
+
*/
|
|
30
|
+
class ApiError {
|
|
31
|
+
/**
|
|
32
|
+
* Returns attribute type map
|
|
33
|
+
*/
|
|
34
|
+
static getAttributeTypeMap() {
|
|
35
|
+
return ApiError.attributeTypeMap;
|
|
36
|
+
}
|
|
37
|
+
constructor(init) {
|
|
38
|
+
Object.assign(this, init);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.ApiError = ApiError;
|
|
42
|
+
/**
|
|
43
|
+
* Attribute type map
|
|
44
|
+
*/
|
|
45
|
+
ApiError.attributeTypeMap = [
|
|
46
|
+
{
|
|
47
|
+
name: "error",
|
|
48
|
+
baseName: "error",
|
|
49
|
+
type: "Error",
|
|
50
|
+
}
|
|
51
|
+
];
|
|
52
|
+
/**
|
|
53
|
+
* Error.
|
|
54
|
+
*/
|
|
55
|
+
class Error {
|
|
56
|
+
/**
|
|
57
|
+
* Returns attribute type map
|
|
58
|
+
*/
|
|
59
|
+
static getAttributeTypeMap() {
|
|
60
|
+
return Error.attributeTypeMap;
|
|
61
|
+
}
|
|
62
|
+
constructor(init) {
|
|
63
|
+
Object.assign(this, init);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
exports.Error = Error;
|
|
67
|
+
/**
|
|
68
|
+
* Attribute type map
|
|
69
|
+
*/
|
|
70
|
+
Error.attributeTypeMap = [
|
|
71
|
+
{
|
|
72
|
+
name: "code",
|
|
73
|
+
baseName: "code",
|
|
74
|
+
type: "string",
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
name: "message",
|
|
78
|
+
baseName: "message",
|
|
79
|
+
type: "string",
|
|
80
|
+
}
|
|
81
|
+
];
|
package/lib/auth.d.ts
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Configuration } from "./configuration";
|
|
3
|
-
/**
|
|
4
|
-
* Authentication logic for api calls
|
|
5
|
-
*/
|
|
6
|
-
export interface IAuthentication {
|
|
7
|
-
/**
|
|
8
|
-
* Apply authentication settings to header and query params.
|
|
9
|
-
*/
|
|
10
|
-
applyToRequest(requestOptions:
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Implements OAuth authentication
|
|
14
|
-
*/
|
|
15
|
-
export declare class OAuth implements IAuthentication {
|
|
16
|
-
private accessToken;
|
|
17
|
-
/**
|
|
18
|
-
* Apply authentication settings to header and query params
|
|
19
|
-
*/
|
|
20
|
-
applyToRequest(requestOptions:
|
|
21
|
-
private _requestToken;
|
|
22
|
-
|
|
1
|
+
import { RawAxiosRequestConfig } from "axios";
|
|
2
|
+
import { Configuration } from "./configuration";
|
|
3
|
+
/**
|
|
4
|
+
* Authentication logic for api calls
|
|
5
|
+
*/
|
|
6
|
+
export interface IAuthentication {
|
|
7
|
+
/**
|
|
8
|
+
* Apply authentication settings to header and query params.
|
|
9
|
+
*/
|
|
10
|
+
applyToRequest(requestOptions: RawAxiosRequestConfig, configuration: Configuration): void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Implements OAuth authentication
|
|
14
|
+
*/
|
|
15
|
+
export declare class OAuth implements IAuthentication {
|
|
16
|
+
private accessToken;
|
|
17
|
+
/**
|
|
18
|
+
* Apply authentication settings to header and query params
|
|
19
|
+
*/
|
|
20
|
+
applyToRequest(requestOptions: RawAxiosRequestConfig, configuration: Configuration): Promise<void>;
|
|
21
|
+
private _requestToken;
|
|
22
|
+
private isTokenValid;
|
|
23
|
+
}
|