vrchat 1.0.2 â 1.3.1
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/upload.yaml +18 -0
- package/.openapi-generator/FILES +8 -9
- package/.openapi-generator-ignore +29 -28
- package/LICENSE +20 -20
- package/README.md +53 -53
- package/api.ts +1013 -260
- package/base.ts +1 -2
- package/common.ts +1 -2
- package/configuration.ts +1 -2
- package/dist/api.d.ts +6566 -6134
- package/dist/api.js +7401 -6709
- package/dist/base.d.ts +54 -55
- package/dist/base.js +79 -80
- package/dist/common.d.ts +64 -65
- package/dist/common.js +233 -234
- package/dist/configuration.d.ts +82 -83
- package/dist/configuration.js +43 -44
- package/dist/index.d.ts +12 -13
- package/dist/index.js +26 -27
- package/example.js +21 -21
- package/generate.sh +29 -24
- package/index.ts +1 -2
- package/openapitools.json +7 -7
- package/package.json +1 -1
- package/git_push.sh +0 -58
package/dist/base.d.ts
CHANGED
|
@@ -1,55 +1,54 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* VRChat API Documentation
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
*
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
*
|
|
27
|
-
* @
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
*
|
|
36
|
-
* @
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
protected
|
|
41
|
-
protected
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
*
|
|
47
|
-
* @
|
|
48
|
-
* @
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* VRChat API Documentation
|
|
3
|
+
*
|
|
4
|
+
* The version of the OpenAPI document: 1.3.1
|
|
5
|
+
* Contact: me@ruby.js.org
|
|
6
|
+
*
|
|
7
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
8
|
+
* https://openapi-generator.tech
|
|
9
|
+
* Do not edit the class manually.
|
|
10
|
+
*/
|
|
11
|
+
import { Configuration } from "./configuration";
|
|
12
|
+
import { AxiosInstance } from 'axios';
|
|
13
|
+
export declare const BASE_PATH: string;
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @export
|
|
17
|
+
*/
|
|
18
|
+
export declare const COLLECTION_FORMATS: {
|
|
19
|
+
csv: string;
|
|
20
|
+
ssv: string;
|
|
21
|
+
tsv: string;
|
|
22
|
+
pipes: string;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface RequestArgs
|
|
28
|
+
*/
|
|
29
|
+
export interface RequestArgs {
|
|
30
|
+
url: string;
|
|
31
|
+
options: any;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
* @export
|
|
36
|
+
* @class BaseAPI
|
|
37
|
+
*/
|
|
38
|
+
export declare class BaseAPI {
|
|
39
|
+
protected basePath: string;
|
|
40
|
+
protected axios: AxiosInstance;
|
|
41
|
+
protected configuration: Configuration | undefined;
|
|
42
|
+
constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @export
|
|
47
|
+
* @class RequiredError
|
|
48
|
+
* @extends {Error}
|
|
49
|
+
*/
|
|
50
|
+
export declare class RequiredError extends Error {
|
|
51
|
+
field: string;
|
|
52
|
+
name: "RequiredError";
|
|
53
|
+
constructor(field: string, msg?: string);
|
|
54
|
+
}
|
package/dist/base.js
CHANGED
|
@@ -1,80 +1,79 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* tslint:disable */
|
|
3
|
-
/* eslint-disable */
|
|
4
|
-
/**
|
|
5
|
-
* VRChat API Documentation
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
({
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
-
if (
|
|
52
|
-
|
|
53
|
-
this.
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
this.
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
*
|
|
66
|
-
* @
|
|
67
|
-
* @
|
|
68
|
-
|
|
69
|
-
*/
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
_this.
|
|
75
|
-
_this
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
exports.RequiredError = RequiredError;
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* VRChat API Documentation
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.3.1
|
|
8
|
+
* Contact: me@ruby.js.org
|
|
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
|
+
var __extends = (this && this.__extends) || (function () {
|
|
15
|
+
var extendStatics = function (d, b) {
|
|
16
|
+
extendStatics = Object.setPrototypeOf ||
|
|
17
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
18
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
19
|
+
return extendStatics(d, b);
|
|
20
|
+
};
|
|
21
|
+
return function (d, b) {
|
|
22
|
+
extendStatics(d, b);
|
|
23
|
+
function __() { this.constructor = d; }
|
|
24
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
25
|
+
};
|
|
26
|
+
})();
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
|
|
29
|
+
// Some imports not used depending on template conditions
|
|
30
|
+
// @ts-ignore
|
|
31
|
+
var axios_1 = require("axios");
|
|
32
|
+
exports.BASE_PATH = "https://api.vrchat.cloud/api/1".replace(/\/+$/, "");
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
* @export
|
|
36
|
+
*/
|
|
37
|
+
exports.COLLECTION_FORMATS = {
|
|
38
|
+
csv: ",",
|
|
39
|
+
ssv: " ",
|
|
40
|
+
tsv: "\t",
|
|
41
|
+
pipes: "|",
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @export
|
|
46
|
+
* @class BaseAPI
|
|
47
|
+
*/
|
|
48
|
+
var BaseAPI = /** @class */ (function () {
|
|
49
|
+
function BaseAPI(configuration, basePath, axios) {
|
|
50
|
+
if (basePath === void 0) { basePath = exports.BASE_PATH; }
|
|
51
|
+
if (axios === void 0) { axios = axios_1.default; }
|
|
52
|
+
this.basePath = basePath;
|
|
53
|
+
this.axios = axios;
|
|
54
|
+
if (configuration) {
|
|
55
|
+
this.configuration = configuration;
|
|
56
|
+
this.basePath = configuration.basePath || this.basePath;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return BaseAPI;
|
|
60
|
+
}());
|
|
61
|
+
exports.BaseAPI = BaseAPI;
|
|
62
|
+
;
|
|
63
|
+
/**
|
|
64
|
+
*
|
|
65
|
+
* @export
|
|
66
|
+
* @class RequiredError
|
|
67
|
+
* @extends {Error}
|
|
68
|
+
*/
|
|
69
|
+
var RequiredError = /** @class */ (function (_super) {
|
|
70
|
+
__extends(RequiredError, _super);
|
|
71
|
+
function RequiredError(field, msg) {
|
|
72
|
+
var _this = _super.call(this, msg) || this;
|
|
73
|
+
_this.field = field;
|
|
74
|
+
_this.name = "RequiredError";
|
|
75
|
+
return _this;
|
|
76
|
+
}
|
|
77
|
+
return RequiredError;
|
|
78
|
+
}(Error));
|
|
79
|
+
exports.RequiredError = RequiredError;
|
package/dist/common.d.ts
CHANGED
|
@@ -1,65 +1,64 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* VRChat API Documentation
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
*
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
*
|
|
22
|
-
* @
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
-
export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => (axios?: AxiosInstance, basePath?: string) => Promise<import("axios").AxiosResponse<any>>;
|
|
1
|
+
/**
|
|
2
|
+
* VRChat API Documentation
|
|
3
|
+
*
|
|
4
|
+
* The version of the OpenAPI document: 1.3.1
|
|
5
|
+
* Contact: me@ruby.js.org
|
|
6
|
+
*
|
|
7
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
8
|
+
* https://openapi-generator.tech
|
|
9
|
+
* Do not edit the class manually.
|
|
10
|
+
*/
|
|
11
|
+
import { Configuration } from "./configuration";
|
|
12
|
+
import { RequestArgs } from "./base";
|
|
13
|
+
import { AxiosInstance } from 'axios';
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @export
|
|
17
|
+
*/
|
|
18
|
+
export declare const DUMMY_BASE_URL = "https://example.com";
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @throws {RequiredError}
|
|
22
|
+
* @export
|
|
23
|
+
*/
|
|
24
|
+
export declare const assertParamExists: (functionName: string, paramName: string, paramValue: unknown) => void;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @export
|
|
28
|
+
*/
|
|
29
|
+
export declare const setApiKeyToObject: (object: any, keyParamName: string, configuration?: Configuration) => Promise<void>;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @export
|
|
33
|
+
*/
|
|
34
|
+
export declare const setBasicAuthToObject: (object: any, configuration?: Configuration) => void;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @export
|
|
38
|
+
*/
|
|
39
|
+
export declare const setBearerAuthToObject: (object: any, configuration?: Configuration) => Promise<void>;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @export
|
|
43
|
+
*/
|
|
44
|
+
export declare const setOAuthToObject: (object: any, name: string, scopes: string[], configuration?: Configuration) => Promise<void>;
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @export
|
|
48
|
+
*/
|
|
49
|
+
export declare const setSearchParams: (url: URL, ...objects: any[]) => void;
|
|
50
|
+
/**
|
|
51
|
+
*
|
|
52
|
+
* @export
|
|
53
|
+
*/
|
|
54
|
+
export declare const serializeDataIfNeeded: (value: any, requestOptions: any, configuration?: Configuration) => any;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @export
|
|
58
|
+
*/
|
|
59
|
+
export declare const toPathString: (url: URL) => string;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @export
|
|
63
|
+
*/
|
|
64
|
+
export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => (axios?: AxiosInstance, basePath?: string) => Promise<import("axios").AxiosResponse<any>>;
|
package/dist/common.js
CHANGED
|
@@ -1,234 +1,233 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* tslint:disable */
|
|
3
|
-
/* eslint-disable */
|
|
4
|
-
/**
|
|
5
|
-
* VRChat API Documentation
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
s
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
function
|
|
30
|
-
function
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
var
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
function
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
if (
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
case
|
|
46
|
-
case
|
|
47
|
-
case
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
if (
|
|
51
|
-
if (op[0] ===
|
|
52
|
-
if (
|
|
53
|
-
if (t
|
|
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
|
-
|
|
81
|
-
*
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
if (!(
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
case
|
|
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
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
if (!(
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
case
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
*
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
if (!(
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
case
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
*
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
var
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
var
|
|
186
|
-
|
|
187
|
-
var object
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
*
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
var
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
*
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
*
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
if (
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
};
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* VRChat API Documentation
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.3.1
|
|
8
|
+
* Contact: me@ruby.js.org
|
|
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
|
+
var __assign = (this && this.__assign) || function () {
|
|
15
|
+
__assign = Object.assign || function(t) {
|
|
16
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
17
|
+
s = arguments[i];
|
|
18
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
19
|
+
t[p] = s[p];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
return __assign.apply(this, arguments);
|
|
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
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
35
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
36
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
37
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
38
|
+
function step(op) {
|
|
39
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
40
|
+
while (_) try {
|
|
41
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
42
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
43
|
+
switch (op[0]) {
|
|
44
|
+
case 0: case 1: t = op; break;
|
|
45
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
46
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
47
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
48
|
+
default:
|
|
49
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
50
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
51
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
52
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
53
|
+
if (t[2]) _.ops.pop();
|
|
54
|
+
_.trys.pop(); continue;
|
|
55
|
+
}
|
|
56
|
+
op = body.call(thisArg, _);
|
|
57
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
58
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
62
|
+
exports.createRequestFunction = exports.toPathString = exports.serializeDataIfNeeded = exports.setSearchParams = exports.setOAuthToObject = exports.setBearerAuthToObject = exports.setBasicAuthToObject = exports.setApiKeyToObject = exports.assertParamExists = exports.DUMMY_BASE_URL = void 0;
|
|
63
|
+
var base_1 = require("./base");
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @export
|
|
67
|
+
*/
|
|
68
|
+
exports.DUMMY_BASE_URL = 'https://example.com';
|
|
69
|
+
/**
|
|
70
|
+
*
|
|
71
|
+
* @throws {RequiredError}
|
|
72
|
+
* @export
|
|
73
|
+
*/
|
|
74
|
+
exports.assertParamExists = function (functionName, paramName, paramValue) {
|
|
75
|
+
if (paramValue === null || paramValue === undefined) {
|
|
76
|
+
throw new base_1.RequiredError(paramName, "Required parameter " + paramName + " was null or undefined when calling " + functionName + ".");
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
* @export
|
|
82
|
+
*/
|
|
83
|
+
exports.setApiKeyToObject = function (object, keyParamName, configuration) {
|
|
84
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
85
|
+
var localVarApiKeyValue, _a;
|
|
86
|
+
return __generator(this, function (_b) {
|
|
87
|
+
switch (_b.label) {
|
|
88
|
+
case 0:
|
|
89
|
+
if (!(configuration && configuration.apiKey)) return [3 /*break*/, 5];
|
|
90
|
+
if (!(typeof configuration.apiKey === 'function')) return [3 /*break*/, 2];
|
|
91
|
+
return [4 /*yield*/, configuration.apiKey(keyParamName)];
|
|
92
|
+
case 1:
|
|
93
|
+
_a = _b.sent();
|
|
94
|
+
return [3 /*break*/, 4];
|
|
95
|
+
case 2: return [4 /*yield*/, configuration.apiKey];
|
|
96
|
+
case 3:
|
|
97
|
+
_a = _b.sent();
|
|
98
|
+
_b.label = 4;
|
|
99
|
+
case 4:
|
|
100
|
+
localVarApiKeyValue = _a;
|
|
101
|
+
object[keyParamName] = localVarApiKeyValue;
|
|
102
|
+
_b.label = 5;
|
|
103
|
+
case 5: return [2 /*return*/];
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
*
|
|
110
|
+
* @export
|
|
111
|
+
*/
|
|
112
|
+
exports.setBasicAuthToObject = function (object, configuration) {
|
|
113
|
+
if (configuration && (configuration.username || configuration.password)) {
|
|
114
|
+
object["auth"] = { username: configuration.username, password: configuration.password };
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
/**
|
|
118
|
+
*
|
|
119
|
+
* @export
|
|
120
|
+
*/
|
|
121
|
+
exports.setBearerAuthToObject = function (object, configuration) {
|
|
122
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
123
|
+
var accessToken, _a;
|
|
124
|
+
return __generator(this, function (_b) {
|
|
125
|
+
switch (_b.label) {
|
|
126
|
+
case 0:
|
|
127
|
+
if (!(configuration && configuration.accessToken)) return [3 /*break*/, 5];
|
|
128
|
+
if (!(typeof configuration.accessToken === 'function')) return [3 /*break*/, 2];
|
|
129
|
+
return [4 /*yield*/, configuration.accessToken()];
|
|
130
|
+
case 1:
|
|
131
|
+
_a = _b.sent();
|
|
132
|
+
return [3 /*break*/, 4];
|
|
133
|
+
case 2: return [4 /*yield*/, configuration.accessToken];
|
|
134
|
+
case 3:
|
|
135
|
+
_a = _b.sent();
|
|
136
|
+
_b.label = 4;
|
|
137
|
+
case 4:
|
|
138
|
+
accessToken = _a;
|
|
139
|
+
object["Authorization"] = "Bearer " + accessToken;
|
|
140
|
+
_b.label = 5;
|
|
141
|
+
case 5: return [2 /*return*/];
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
});
|
|
145
|
+
};
|
|
146
|
+
/**
|
|
147
|
+
*
|
|
148
|
+
* @export
|
|
149
|
+
*/
|
|
150
|
+
exports.setOAuthToObject = function (object, name, scopes, configuration) {
|
|
151
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
152
|
+
var localVarAccessTokenValue, _a;
|
|
153
|
+
return __generator(this, function (_b) {
|
|
154
|
+
switch (_b.label) {
|
|
155
|
+
case 0:
|
|
156
|
+
if (!(configuration && configuration.accessToken)) return [3 /*break*/, 5];
|
|
157
|
+
if (!(typeof configuration.accessToken === 'function')) return [3 /*break*/, 2];
|
|
158
|
+
return [4 /*yield*/, configuration.accessToken(name, scopes)];
|
|
159
|
+
case 1:
|
|
160
|
+
_a = _b.sent();
|
|
161
|
+
return [3 /*break*/, 4];
|
|
162
|
+
case 2: return [4 /*yield*/, configuration.accessToken];
|
|
163
|
+
case 3:
|
|
164
|
+
_a = _b.sent();
|
|
165
|
+
_b.label = 4;
|
|
166
|
+
case 4:
|
|
167
|
+
localVarAccessTokenValue = _a;
|
|
168
|
+
object["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
|
169
|
+
_b.label = 5;
|
|
170
|
+
case 5: return [2 /*return*/];
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
});
|
|
174
|
+
};
|
|
175
|
+
/**
|
|
176
|
+
*
|
|
177
|
+
* @export
|
|
178
|
+
*/
|
|
179
|
+
exports.setSearchParams = function (url) {
|
|
180
|
+
var objects = [];
|
|
181
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
182
|
+
objects[_i - 1] = arguments[_i];
|
|
183
|
+
}
|
|
184
|
+
var searchParams = new URLSearchParams(url.search);
|
|
185
|
+
for (var _a = 0, objects_1 = objects; _a < objects_1.length; _a++) {
|
|
186
|
+
var object = objects_1[_a];
|
|
187
|
+
for (var key in object) {
|
|
188
|
+
if (Array.isArray(object[key])) {
|
|
189
|
+
searchParams.delete(key);
|
|
190
|
+
for (var _b = 0, _c = object[key]; _b < _c.length; _b++) {
|
|
191
|
+
var item = _c[_b];
|
|
192
|
+
searchParams.append(key, item);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
else {
|
|
196
|
+
searchParams.set(key, object[key]);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
url.search = searchParams.toString();
|
|
201
|
+
};
|
|
202
|
+
/**
|
|
203
|
+
*
|
|
204
|
+
* @export
|
|
205
|
+
*/
|
|
206
|
+
exports.serializeDataIfNeeded = function (value, requestOptions, configuration) {
|
|
207
|
+
var nonString = typeof value !== 'string';
|
|
208
|
+
var needsSerialization = nonString && configuration && configuration.isJsonMime
|
|
209
|
+
? configuration.isJsonMime(requestOptions.headers['Content-Type'])
|
|
210
|
+
: nonString;
|
|
211
|
+
return needsSerialization
|
|
212
|
+
? JSON.stringify(value !== undefined ? value : {})
|
|
213
|
+
: (value || "");
|
|
214
|
+
};
|
|
215
|
+
/**
|
|
216
|
+
*
|
|
217
|
+
* @export
|
|
218
|
+
*/
|
|
219
|
+
exports.toPathString = function (url) {
|
|
220
|
+
return url.pathname + url.search + url.hash;
|
|
221
|
+
};
|
|
222
|
+
/**
|
|
223
|
+
*
|
|
224
|
+
* @export
|
|
225
|
+
*/
|
|
226
|
+
exports.createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
|
|
227
|
+
return function (axios, basePath) {
|
|
228
|
+
if (axios === void 0) { axios = globalAxios; }
|
|
229
|
+
if (basePath === void 0) { basePath = BASE_PATH; }
|
|
230
|
+
var axiosRequestArgs = __assign(__assign({}, axiosArgs.options), { url: ((configuration === null || configuration === void 0 ? void 0 : configuration.basePath) || basePath) + axiosArgs.url });
|
|
231
|
+
return axios.request(axiosRequestArgs);
|
|
232
|
+
};
|
|
233
|
+
};
|