@configura/web-api-auth 2.1.0-alpha.3 → 2.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.
|
@@ -14,7 +14,7 @@ export interface DtoAuthAPIConfig {
|
|
|
14
14
|
export interface DtoAuthorizeRequest {
|
|
15
15
|
permissions?: Array<DtoCataloguePermission>;
|
|
16
16
|
}
|
|
17
|
-
/** AuthorizeResponse */
|
|
17
|
+
/** AuthorizeResponse - The response to an authorize request. It contains an endpoint, a session token and an API session. The endpoint is the URL to access the API. The secret token is used to validate each request to the API. The API session contains information about the user's catalogue access. */
|
|
18
18
|
export interface DtoAuthorizeResponse {
|
|
19
19
|
endpoint: string;
|
|
20
20
|
secretToken: string;
|
|
@@ -86,7 +86,7 @@ export interface DtoProductParamsWithCid extends DtoCatalogueParamsWithCid {
|
|
|
86
86
|
export interface DtoProductParamsWithCidAndLang extends DtoProductParamsWithCid {
|
|
87
87
|
lang: string;
|
|
88
88
|
}
|
|
89
|
-
/** RefreshSessionTokenResponse */
|
|
89
|
+
/** RefreshSessionTokenResponse - The response to a refresh session token request. It contains a new API session. */
|
|
90
90
|
export interface DtoRefreshSessionTokenResponse {
|
|
91
91
|
apiSession: DtoCatalogueAPISession;
|
|
92
92
|
}
|
package/dist/CatalogueAuthAPI.js
CHANGED
|
@@ -15,6 +15,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.DTO_OPERATION_ID_TO_DEBIT_GROUP = exports.CatalogueAuthAPI = exports.DtoAPIError = exports.dtoRenderFormatNames = exports.dtoExportFormatNames = void 0;
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
19
|
+
// @ts-ignore
|
|
20
|
+
const package_json_1 = __importDefault(require("../package.json"));
|
|
18
21
|
const http_1 = __importDefault(require("http"));
|
|
19
22
|
const https_1 = __importDefault(require("https"));
|
|
20
23
|
exports.dtoExportFormatNames = ["glb", "gltf", "fbx", "dwg", "cmdrw", "cmfav", "cmsym"];
|
|
@@ -71,7 +74,7 @@ class CatalogueAuthAPI {
|
|
|
71
74
|
const url = `/v1/authorize`;
|
|
72
75
|
const options = {
|
|
73
76
|
method: "POST",
|
|
74
|
-
headers: { "X-API-Key": this.auth.secretToken || "" },
|
|
77
|
+
headers: { "X-API-Key": this.auth.secretToken || "", "X-SDK-Version": package_json_1.default.version },
|
|
75
78
|
body: JSON.stringify(body),
|
|
76
79
|
};
|
|
77
80
|
return this.fetch(this.auth.endpoint + url, options);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@configura/web-api-auth",
|
|
3
|
-
"version": "2.1.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -21,5 +21,5 @@
|
|
|
21
21
|
"publishConfig": {
|
|
22
22
|
"access": "public"
|
|
23
23
|
},
|
|
24
|
-
"gitHead": "
|
|
24
|
+
"gitHead": "caedf95f12d9b911f239c7a976242d166fb33a7c"
|
|
25
25
|
}
|