@coscine/api-client 1.0.0 → 1.1.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/dist/index.js +80 -8
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +83 -11
- package/dist/index.umd.js.map +1 -1
- package/dist/lib/Coscine.Api.Metadata/api.js +67 -1
- package/dist/lib/Coscine.Api.Metadata/api.js.map +1 -1
- package/dist/lib/Coscine.Api.Metadata/base.js +1 -1
- package/dist/lib/Coscine.Api.Metadata/common.js +1 -1
- package/dist/lib/Coscine.Api.Metadata/configuration.js +1 -1
- package/dist/lib/Coscine.Api.Metadata/index.js +1 -1
- package/dist/lib/apis.js +1 -1
- package/dist/lib/apis.js.map +1 -1
- package/dist/lib/axios-basic.js +7 -3
- package/dist/lib/axios-basic.js.map +1 -1
- package/dist/types/Coscine.Api.Metadata/api.d.ts +65 -1
- package/dist/types/Coscine.Api.Metadata/base.d.ts +1 -1
- package/dist/types/Coscine.Api.Metadata/common.d.ts +1 -1
- package/dist/types/Coscine.Api.Metadata/configuration.d.ts +1 -1
- package/dist/types/Coscine.Api.Metadata/index.d.ts +1 -1
- package/dist/types/apis.d.ts +1 -0
- package/dist/types/index.d.ts +2 -0
- package/package.json +4 -3
package/dist/index.js
CHANGED
|
@@ -2401,7 +2401,7 @@ const setSearchParams$a = function (url, ...objects) {
|
|
|
2401
2401
|
*
|
|
2402
2402
|
* @export
|
|
2403
2403
|
*/
|
|
2404
|
-
const serializeDataIfNeeded$
|
|
2404
|
+
const serializeDataIfNeeded$7 = function (value, requestOptions, configuration) {
|
|
2405
2405
|
const nonString = typeof value !== 'string';
|
|
2406
2406
|
const needsSerialization = nonString && configuration && configuration.isJsonMime
|
|
2407
2407
|
? configuration.isJsonMime(requestOptions.headers['Content-Type'])
|
|
@@ -2492,7 +2492,7 @@ const AdminApiAxiosParamCreator = function (configuration) {
|
|
|
2492
2492
|
setSearchParams$a(localVarUrlObj, localVarQueryParameter, options.query);
|
|
2493
2493
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2494
2494
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2495
|
-
localVarRequestOptions.data = serializeDataIfNeeded$
|
|
2495
|
+
localVarRequestOptions.data = serializeDataIfNeeded$7(updateQuotaParameterObject, localVarRequestOptions, configuration);
|
|
2496
2496
|
return {
|
|
2497
2497
|
url: toPathString$a(localVarUrlObj),
|
|
2498
2498
|
options: localVarRequestOptions,
|
|
@@ -2636,7 +2636,7 @@ const setSearchParams$9 = function (url, ...objects) {
|
|
|
2636
2636
|
*
|
|
2637
2637
|
* @export
|
|
2638
2638
|
*/
|
|
2639
|
-
const serializeDataIfNeeded$
|
|
2639
|
+
const serializeDataIfNeeded$6 = function (value, requestOptions, configuration) {
|
|
2640
2640
|
const nonString = typeof value !== 'string';
|
|
2641
2641
|
const needsSerialization = nonString && configuration && configuration.isJsonMime
|
|
2642
2642
|
? configuration.isJsonMime(requestOptions.headers['Content-Type'])
|
|
@@ -2797,7 +2797,7 @@ const BlobApiAxiosParamCreator = function (configuration) {
|
|
|
2797
2797
|
setSearchParams$9(localVarUrlObj, localVarQueryParameter, options.query);
|
|
2798
2798
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2799
2799
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2800
|
-
localVarRequestOptions.data = serializeDataIfNeeded$
|
|
2800
|
+
localVarRequestOptions.data = serializeDataIfNeeded$6(body, localVarRequestOptions, configuration);
|
|
2801
2801
|
return {
|
|
2802
2802
|
url: toPathString$9(localVarUrlObj),
|
|
2803
2803
|
options: localVarRequestOptions,
|
|
@@ -3058,6 +3058,19 @@ const setSearchParams$8 = function (url, ...objects) {
|
|
|
3058
3058
|
}
|
|
3059
3059
|
url.search = searchParams.toString();
|
|
3060
3060
|
};
|
|
3061
|
+
/**
|
|
3062
|
+
*
|
|
3063
|
+
* @export
|
|
3064
|
+
*/
|
|
3065
|
+
const serializeDataIfNeeded$5 = function (value, requestOptions, configuration) {
|
|
3066
|
+
const nonString = typeof value !== 'string';
|
|
3067
|
+
const needsSerialization = nonString && configuration && configuration.isJsonMime
|
|
3068
|
+
? configuration.isJsonMime(requestOptions.headers['Content-Type'])
|
|
3069
|
+
: nonString;
|
|
3070
|
+
return needsSerialization
|
|
3071
|
+
? JSON.stringify(value !== undefined ? value : {})
|
|
3072
|
+
: (value || "");
|
|
3073
|
+
};
|
|
3061
3074
|
/**
|
|
3062
3075
|
*
|
|
3063
3076
|
* @export
|
|
@@ -3269,6 +3282,38 @@ const MetadataApiAxiosParamCreator = function (configuration) {
|
|
|
3269
3282
|
options: localVarRequestOptions,
|
|
3270
3283
|
};
|
|
3271
3284
|
}),
|
|
3285
|
+
/**
|
|
3286
|
+
*
|
|
3287
|
+
* @summary Create a request for storing a given application profile.
|
|
3288
|
+
* @param {ApplicationProfile} applicationProfile Object describing the application profile
|
|
3289
|
+
* @param {*} [options] Override http request option.
|
|
3290
|
+
* @throws {RequiredError}
|
|
3291
|
+
*/
|
|
3292
|
+
metadataSaveApplicationProfile: (applicationProfile, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
3293
|
+
// verify required parameter 'applicationProfile' is not null or undefined
|
|
3294
|
+
assertParamExists$8('metadataSaveApplicationProfile', 'applicationProfile', applicationProfile);
|
|
3295
|
+
const localVarPath = `/Metadata/profiles`;
|
|
3296
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3297
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$8);
|
|
3298
|
+
let baseOptions;
|
|
3299
|
+
if (configuration) {
|
|
3300
|
+
baseOptions = configuration.baseOptions;
|
|
3301
|
+
}
|
|
3302
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
|
|
3303
|
+
const localVarHeaderParameter = {};
|
|
3304
|
+
const localVarQueryParameter = {};
|
|
3305
|
+
// authentication JWT token required
|
|
3306
|
+
yield setApiKeyToObject$8(localVarHeaderParameter, "Authorization", configuration);
|
|
3307
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
3308
|
+
setSearchParams$8(localVarUrlObj, localVarQueryParameter, options.query);
|
|
3309
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3310
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3311
|
+
localVarRequestOptions.data = serializeDataIfNeeded$5(applicationProfile, localVarRequestOptions, configuration);
|
|
3312
|
+
return {
|
|
3313
|
+
url: toPathString$8(localVarUrlObj),
|
|
3314
|
+
options: localVarRequestOptions,
|
|
3315
|
+
};
|
|
3316
|
+
}),
|
|
3272
3317
|
};
|
|
3273
3318
|
};
|
|
3274
3319
|
/**
|
|
@@ -3356,6 +3401,19 @@ const MetadataApiFp = function (configuration) {
|
|
|
3356
3401
|
return createRequestFunction$8(localVarAxiosArgs, axios, BASE_PATH$8, configuration);
|
|
3357
3402
|
});
|
|
3358
3403
|
},
|
|
3404
|
+
/**
|
|
3405
|
+
*
|
|
3406
|
+
* @summary Create a request for storing a given application profile.
|
|
3407
|
+
* @param {ApplicationProfile} applicationProfile Object describing the application profile
|
|
3408
|
+
* @param {*} [options] Override http request option.
|
|
3409
|
+
* @throws {RequiredError}
|
|
3410
|
+
*/
|
|
3411
|
+
metadataSaveApplicationProfile(applicationProfile, options) {
|
|
3412
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3413
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.metadataSaveApplicationProfile(applicationProfile, options);
|
|
3414
|
+
return createRequestFunction$8(localVarAxiosArgs, axios, BASE_PATH$8, configuration);
|
|
3415
|
+
});
|
|
3416
|
+
},
|
|
3359
3417
|
};
|
|
3360
3418
|
};
|
|
3361
3419
|
/**
|
|
@@ -3425,6 +3483,16 @@ const MetadataApiFactory = function (configuration, basePath, axios) {
|
|
|
3425
3483
|
metadataGetVocabulary(path, options) {
|
|
3426
3484
|
return localVarFp.metadataGetVocabulary(path, options).then((request) => request(axios, basePath));
|
|
3427
3485
|
},
|
|
3486
|
+
/**
|
|
3487
|
+
*
|
|
3488
|
+
* @summary Create a request for storing a given application profile.
|
|
3489
|
+
* @param {ApplicationProfile} applicationProfile Object describing the application profile
|
|
3490
|
+
* @param {*} [options] Override http request option.
|
|
3491
|
+
* @throws {RequiredError}
|
|
3492
|
+
*/
|
|
3493
|
+
metadataSaveApplicationProfile(applicationProfile, options) {
|
|
3494
|
+
return localVarFp.metadataSaveApplicationProfile(applicationProfile, options).then((request) => request(axios, basePath));
|
|
3495
|
+
},
|
|
3428
3496
|
};
|
|
3429
3497
|
};
|
|
3430
3498
|
|
|
@@ -8312,7 +8380,7 @@ const UserApiFactory = function (configuration, basePath, axios) {
|
|
|
8312
8380
|
};
|
|
8313
8381
|
|
|
8314
8382
|
let accessToken = '';
|
|
8315
|
-
if (typeof coscine !== 'undefined') {
|
|
8383
|
+
if (typeof coscine !== 'undefined' && typeof coscine.authorization !== 'undefined') {
|
|
8316
8384
|
accessToken = coscine.authorization.bearer;
|
|
8317
8385
|
}
|
|
8318
8386
|
const getHostName = () => {
|
|
@@ -8359,9 +8427,13 @@ const authHeaderKey = 'Authorization';
|
|
|
8359
8427
|
const clientCorrolationIdKey = 'X-Coscine-Logging-CorrelationId';
|
|
8360
8428
|
function setHeader(request) {
|
|
8361
8429
|
if (typeof coscine !== "undefined") {
|
|
8362
|
-
|
|
8363
|
-
|
|
8364
|
-
|
|
8430
|
+
if (typeof coscine.authorization !== "undefined") {
|
|
8431
|
+
request.headers.common[authHeaderKey] =
|
|
8432
|
+
'Bearer ' + coscine.authorization.bearer;
|
|
8433
|
+
}
|
|
8434
|
+
if (typeof coscine.clientcorrolation !== "undefined") {
|
|
8435
|
+
request.headers.common[clientCorrolationIdKey] = coscine.clientcorrolation.id;
|
|
8436
|
+
}
|
|
8365
8437
|
}
|
|
8366
8438
|
}
|
|
8367
8439
|
instance.interceptors.request.use((request) => {
|