@triveria/admin 0.0.163 → 0.0.165
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/api.d.ts +2 -2
- package/api.js +16 -7
- package/common.d.ts +6 -0
- package/common.js +18 -3
- package/configuration.d.ts +24 -0
- package/configuration.js +3 -3
- package/package.json +1 -1
package/api.d.ts
CHANGED
|
@@ -14,8 +14,8 @@ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
|
14
14
|
import type { RequestArgs } from './base';
|
|
15
15
|
import { BaseAPI } from './base';
|
|
16
16
|
export declare const AdminRole: {
|
|
17
|
-
readonly
|
|
18
|
-
readonly
|
|
17
|
+
readonly WalletAdminManagerWallet: "wallet:admin:manager:wallet";
|
|
18
|
+
readonly WalletAdminManagerUser: "wallet:admin:manager:user";
|
|
19
19
|
};
|
|
20
20
|
export type AdminRole = typeof AdminRole[keyof typeof AdminRole];
|
|
21
21
|
/**
|
package/api.js
CHANGED
|
@@ -33,13 +33,13 @@ const common_1 = require("./common");
|
|
|
33
33
|
// @ts-ignore
|
|
34
34
|
const base_1 = require("./base");
|
|
35
35
|
exports.AdminRole = {
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
WalletAdminManagerWallet: 'wallet:admin:manager:wallet',
|
|
37
|
+
WalletAdminManagerUser: 'wallet:admin:manager:user',
|
|
38
38
|
};
|
|
39
39
|
exports.HealthStatusStatusEnum = {
|
|
40
40
|
Ok: 'ok',
|
|
41
41
|
Limited: 'limited',
|
|
42
|
-
Critical: 'critical'
|
|
42
|
+
Critical: 'critical',
|
|
43
43
|
};
|
|
44
44
|
/**
|
|
45
45
|
* DefaultApi - axios parameter creator
|
|
@@ -67,6 +67,7 @@ const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
67
67
|
// http bearer authentication required
|
|
68
68
|
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
69
69
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
70
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
70
71
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
71
72
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
72
73
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
@@ -86,7 +87,7 @@ const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
86
87
|
// verify required parameter 'applicationId' is not null or undefined
|
|
87
88
|
(0, common_1.assertParamExists)('applicationDelete', 'applicationId', applicationId);
|
|
88
89
|
const localVarPath = `/applications/{application_id}`
|
|
89
|
-
.replace(
|
|
90
|
+
.replace('{application_id}', encodeURIComponent(String(applicationId)));
|
|
90
91
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
91
92
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
92
93
|
let baseOptions;
|
|
@@ -99,6 +100,7 @@ const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
99
100
|
// authentication accessToken required
|
|
100
101
|
// http bearer authentication required
|
|
101
102
|
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
103
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
102
104
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
103
105
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
104
106
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
@@ -117,7 +119,7 @@ const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
117
119
|
// verify required parameter 'applicationId' is not null or undefined
|
|
118
120
|
(0, common_1.assertParamExists)('applicationGet', 'applicationId', applicationId);
|
|
119
121
|
const localVarPath = `/applications/{application_id}`
|
|
120
|
-
.replace(
|
|
122
|
+
.replace('{application_id}', encodeURIComponent(String(applicationId)));
|
|
121
123
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
122
124
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
123
125
|
let baseOptions;
|
|
@@ -130,6 +132,7 @@ const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
130
132
|
// authentication accessToken required
|
|
131
133
|
// http bearer authentication required
|
|
132
134
|
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
135
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
133
136
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
134
137
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
135
138
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
@@ -157,6 +160,7 @@ const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
157
160
|
// authentication accessToken required
|
|
158
161
|
// http bearer authentication required
|
|
159
162
|
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
163
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
160
164
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
161
165
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
162
166
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
@@ -181,6 +185,7 @@ const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
181
185
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
182
186
|
const localVarHeaderParameter = {};
|
|
183
187
|
const localVarQueryParameter = {};
|
|
188
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
184
189
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
185
190
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
186
191
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
@@ -208,6 +213,7 @@ const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
208
213
|
// authentication accessToken required
|
|
209
214
|
// http bearer authentication required
|
|
210
215
|
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
216
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
211
217
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
212
218
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
213
219
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
@@ -226,7 +232,7 @@ const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
226
232
|
// verify required parameter 'ownerId' is not null or undefined
|
|
227
233
|
(0, common_1.assertParamExists)('ownerGetById', 'ownerId', ownerId);
|
|
228
234
|
const localVarPath = `/admin/owners/{owner_id}`
|
|
229
|
-
.replace(
|
|
235
|
+
.replace('{owner_id}', encodeURIComponent(String(ownerId)));
|
|
230
236
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
231
237
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
232
238
|
let baseOptions;
|
|
@@ -239,6 +245,7 @@ const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
239
245
|
// authentication accessToken required
|
|
240
246
|
// http bearer authentication required
|
|
241
247
|
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
248
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
242
249
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
243
250
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
244
251
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
@@ -258,7 +265,7 @@ const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
258
265
|
// verify required parameter 'ownerId' is not null or undefined
|
|
259
266
|
(0, common_1.assertParamExists)('ownerUpdate', 'ownerId', ownerId);
|
|
260
267
|
const localVarPath = `/admin/owners/{owner_id}`
|
|
261
|
-
.replace(
|
|
268
|
+
.replace('{owner_id}', encodeURIComponent(String(ownerId)));
|
|
262
269
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
263
270
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
264
271
|
let baseOptions;
|
|
@@ -272,6 +279,7 @@ const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
272
279
|
// http bearer authentication required
|
|
273
280
|
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
274
281
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
282
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
275
283
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
276
284
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
277
285
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
@@ -300,6 +308,7 @@ const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
300
308
|
// authentication accessToken required
|
|
301
309
|
// http bearer authentication required
|
|
302
310
|
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
311
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
303
312
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
304
313
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
305
314
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
package/common.d.ts
CHANGED
|
@@ -23,6 +23,12 @@ export declare const setBasicAuthToObject: (object: any, configuration?: Configu
|
|
|
23
23
|
export declare const setBearerAuthToObject: (object: any, configuration?: Configuration) => Promise<void>;
|
|
24
24
|
export declare const setOAuthToObject: (object: any, name: string, scopes: string[], configuration?: Configuration) => Promise<void>;
|
|
25
25
|
export declare const setSearchParams: (url: URL, ...objects: any[]) => void;
|
|
26
|
+
/**
|
|
27
|
+
* JSON serialization helper function which replaces instances of unserializable types with serializable ones.
|
|
28
|
+
* This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
|
|
29
|
+
* Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
|
|
30
|
+
*/
|
|
31
|
+
export declare const replaceWithSerializableTypeIfNeeded: (key: string, value: any) => any;
|
|
26
32
|
export declare const serializeDataIfNeeded: (value: any, requestOptions: any, configuration?: Configuration) => any;
|
|
27
33
|
export declare const toPathString: (url: URL) => string;
|
|
28
34
|
export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T, any>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
|
package/common.js
CHANGED
|
@@ -22,7 +22,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.createRequestFunction = exports.toPathString = exports.serializeDataIfNeeded = exports.setSearchParams = exports.setOAuthToObject = exports.setBearerAuthToObject = exports.setBasicAuthToObject = exports.setApiKeyToObject = exports.assertParamExists = exports.DUMMY_BASE_URL = void 0;
|
|
25
|
+
exports.createRequestFunction = exports.toPathString = exports.serializeDataIfNeeded = exports.replaceWithSerializableTypeIfNeeded = exports.setSearchParams = exports.setOAuthToObject = exports.setBearerAuthToObject = exports.setBasicAuthToObject = exports.setApiKeyToObject = exports.assertParamExists = exports.DUMMY_BASE_URL = void 0;
|
|
26
26
|
const base_1 = require("./base");
|
|
27
27
|
exports.DUMMY_BASE_URL = 'https://example.com';
|
|
28
28
|
/**
|
|
@@ -78,7 +78,7 @@ function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
|
|
|
78
78
|
if (parameter == null)
|
|
79
79
|
return;
|
|
80
80
|
if (typeof parameter === "object") {
|
|
81
|
-
if (Array.isArray(parameter)) {
|
|
81
|
+
if (Array.isArray(parameter) || parameter instanceof Set) {
|
|
82
82
|
parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
|
83
83
|
}
|
|
84
84
|
else {
|
|
@@ -100,13 +100,28 @@ const setSearchParams = function (url, ...objects) {
|
|
|
100
100
|
url.search = searchParams.toString();
|
|
101
101
|
};
|
|
102
102
|
exports.setSearchParams = setSearchParams;
|
|
103
|
+
/**
|
|
104
|
+
* JSON serialization helper function which replaces instances of unserializable types with serializable ones.
|
|
105
|
+
* This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
|
|
106
|
+
* Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
|
|
107
|
+
*/
|
|
108
|
+
// @ts-ignore
|
|
109
|
+
const replaceWithSerializableTypeIfNeeded = function (key, value) {
|
|
110
|
+
if (value instanceof Set) {
|
|
111
|
+
return Array.from(value);
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
return value;
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
exports.replaceWithSerializableTypeIfNeeded = replaceWithSerializableTypeIfNeeded;
|
|
103
118
|
const serializeDataIfNeeded = function (value, requestOptions, configuration) {
|
|
104
119
|
const nonString = typeof value !== 'string';
|
|
105
120
|
const needsSerialization = nonString && configuration && configuration.isJsonMime
|
|
106
121
|
? configuration.isJsonMime(requestOptions.headers['Content-Type'])
|
|
107
122
|
: nonString;
|
|
108
123
|
return needsSerialization
|
|
109
|
-
? JSON.stringify(value !== undefined ? value : {})
|
|
124
|
+
? JSON.stringify(value !== undefined ? value : {}, exports.replaceWithSerializableTypeIfNeeded)
|
|
110
125
|
: (value || "");
|
|
111
126
|
};
|
|
112
127
|
exports.serializeDataIfNeeded = serializeDataIfNeeded;
|
package/configuration.d.ts
CHANGED
|
@@ -9,11 +9,23 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
interface AWSv4Configuration {
|
|
13
|
+
options?: {
|
|
14
|
+
region?: string;
|
|
15
|
+
service?: string;
|
|
16
|
+
};
|
|
17
|
+
credentials?: {
|
|
18
|
+
accessKeyId?: string;
|
|
19
|
+
secretAccessKey?: string;
|
|
20
|
+
sessionToken?: string;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
12
23
|
export interface ConfigurationParameters {
|
|
13
24
|
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
|
14
25
|
username?: string;
|
|
15
26
|
password?: string;
|
|
16
27
|
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
|
28
|
+
awsv4?: AWSv4Configuration;
|
|
17
29
|
basePath?: string;
|
|
18
30
|
serverIndex?: number;
|
|
19
31
|
baseOptions?: any;
|
|
@@ -39,6 +51,17 @@ export declare class Configuration {
|
|
|
39
51
|
* @param scopes oauth2 scope
|
|
40
52
|
*/
|
|
41
53
|
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
|
54
|
+
/**
|
|
55
|
+
* parameter for aws4 signature security
|
|
56
|
+
* @param {Object} AWS4Signature - AWS4 Signature security
|
|
57
|
+
* @param {string} options.region - aws region
|
|
58
|
+
* @param {string} options.service - name of the service.
|
|
59
|
+
* @param {string} credentials.accessKeyId - aws access key id
|
|
60
|
+
* @param {string} credentials.secretAccessKey - aws access key
|
|
61
|
+
* @param {string} credentials.sessionToken - aws session token
|
|
62
|
+
* @memberof Configuration
|
|
63
|
+
*/
|
|
64
|
+
awsv4?: AWSv4Configuration;
|
|
42
65
|
/**
|
|
43
66
|
* override base path
|
|
44
67
|
*/
|
|
@@ -72,3 +95,4 @@ export declare class Configuration {
|
|
|
72
95
|
*/
|
|
73
96
|
isJsonMime(mime: string): boolean;
|
|
74
97
|
}
|
|
98
|
+
export {};
|
package/configuration.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/* tslint:disable */
|
|
3
|
-
/* eslint-disable */
|
|
4
3
|
/**
|
|
5
4
|
* Triveria Admin API
|
|
6
5
|
* Triveria Admin API allows to manage Wallet API keys and services.
|
|
@@ -21,6 +20,7 @@ class Configuration {
|
|
|
21
20
|
this.username = param.username;
|
|
22
21
|
this.password = param.password;
|
|
23
22
|
this.accessToken = param.accessToken;
|
|
23
|
+
this.awsv4 = param.awsv4;
|
|
24
24
|
this.basePath = param.basePath;
|
|
25
25
|
this.serverIndex = param.serverIndex;
|
|
26
26
|
this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({}, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
|
|
@@ -37,8 +37,8 @@ class Configuration {
|
|
|
37
37
|
* @return True if the given MIME is JSON, false otherwise.
|
|
38
38
|
*/
|
|
39
39
|
isJsonMime(mime) {
|
|
40
|
-
const jsonMime =
|
|
41
|
-
return mime !== null &&
|
|
40
|
+
const jsonMime = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i;
|
|
41
|
+
return mime !== null && jsonMime.test(mime);
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
exports.Configuration = Configuration;
|