@configura/web-api 2.2.0-alpha.0 → 2.2.0-alpha.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/dist/CatalogueAPI.js +17 -14
- package/package.json +3 -3
package/dist/CatalogueAPI.js
CHANGED
|
@@ -9,6 +9,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
10
10
|
});
|
|
11
11
|
};
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
13
|
+
// @ts-ignore
|
|
14
|
+
import packageInfo from "../package.json";
|
|
12
15
|
export const dtoExportFormatNames = ["glb", "gltf", "fbx", "dwg", "cmdrw", "cmfav", "cmsym"];
|
|
13
16
|
export const dtoExportStatusStatusNames = ["pending", "running", "finished", "failed"];
|
|
14
17
|
export const dtoNoteSeverityNames = ["Information", "Critical", "Warning"];
|
|
@@ -71,7 +74,7 @@ export class CatalogueAPI {
|
|
|
71
74
|
const url = `/v1/access-token/public/${encodeURIComponent(params.accessTokenId)}/authorize`;
|
|
72
75
|
const options = {
|
|
73
76
|
method: "POST",
|
|
74
|
-
headers: {},
|
|
77
|
+
headers: { "X-SDK-Version": packageInfo.version },
|
|
75
78
|
};
|
|
76
79
|
if (this._alternativeReferer) {
|
|
77
80
|
options.headers["Alternative-Referer"] = this._alternativeReferer;
|
|
@@ -87,7 +90,7 @@ export class CatalogueAPI {
|
|
|
87
90
|
const url = `/v1/catalogue/${encodeURIComponent(params.lang)}/${encodeURIComponent(params.enterprise)}/${encodeURIComponent(params.prdCat)}/${encodeURIComponent(params.prdCatVersion)}/${encodeURIComponent(params.vendor)}/${encodeURIComponent(params.priceList)}/application-areas`;
|
|
88
91
|
const options = {
|
|
89
92
|
method: "GET",
|
|
90
|
-
headers: { "X-API-Key": this.auth.secretToken || "" },
|
|
93
|
+
headers: { "X-API-Key": this.auth.secretToken || "", "X-SDK-Version": packageInfo.version },
|
|
91
94
|
};
|
|
92
95
|
if (this._alternativeReferer) {
|
|
93
96
|
options.headers["Alternative-Referer"] = this._alternativeReferer;
|
|
@@ -103,7 +106,7 @@ export class CatalogueAPI {
|
|
|
103
106
|
const url = `/v1/catalogue/${encodeURIComponent(params.lang)}/${encodeURIComponent(params.enterprise)}/${encodeURIComponent(params.prdCat)}/${encodeURIComponent(params.prdCatVersion)}/${encodeURIComponent(params.vendor)}/${encodeURIComponent(params.priceList)}/export/${encodeURIComponent(params.partNumber)}`;
|
|
104
107
|
const options = {
|
|
105
108
|
method: "POST",
|
|
106
|
-
headers: { "X-API-Key": this.auth.secretToken || "" },
|
|
109
|
+
headers: { "X-API-Key": this.auth.secretToken || "", "X-SDK-Version": packageInfo.version },
|
|
107
110
|
body: JSON.stringify(body),
|
|
108
111
|
};
|
|
109
112
|
if (this._alternativeReferer) {
|
|
@@ -120,7 +123,7 @@ export class CatalogueAPI {
|
|
|
120
123
|
const url = `/v1/catalogue/${encodeURIComponent(params.lang)}/${encodeURIComponent(params.enterprise)}/${encodeURIComponent(params.prdCat)}/${encodeURIComponent(params.prdCatVersion)}/${encodeURIComponent(params.vendor)}/${encodeURIComponent(params.priceList)}/price-lists`;
|
|
121
124
|
const options = {
|
|
122
125
|
method: "GET",
|
|
123
|
-
headers: { "X-API-Key": this.auth.secretToken || "" },
|
|
126
|
+
headers: { "X-API-Key": this.auth.secretToken || "", "X-SDK-Version": packageInfo.version },
|
|
124
127
|
};
|
|
125
128
|
if (this._alternativeReferer) {
|
|
126
129
|
options.headers["Alternative-Referer"] = this._alternativeReferer;
|
|
@@ -136,7 +139,7 @@ export class CatalogueAPI {
|
|
|
136
139
|
const url = `/v1/catalogue/${encodeURIComponent(params.lang)}/${encodeURIComponent(params.enterprise)}/${encodeURIComponent(params.prdCat)}/${encodeURIComponent(params.prdCatVersion)}/${encodeURIComponent(params.vendor)}/${encodeURIComponent(params.priceList)}/product-v2/${encodeURIComponent(params.partNumber)}`;
|
|
137
140
|
const options = {
|
|
138
141
|
method: "GET",
|
|
139
|
-
headers: { "X-API-Key": this.auth.secretToken || "" },
|
|
142
|
+
headers: { "X-API-Key": this.auth.secretToken || "", "X-SDK-Version": packageInfo.version },
|
|
140
143
|
};
|
|
141
144
|
if (this._alternativeReferer) {
|
|
142
145
|
options.headers["Alternative-Referer"] = this._alternativeReferer;
|
|
@@ -152,7 +155,7 @@ export class CatalogueAPI {
|
|
|
152
155
|
const url = `/v1/catalogue/${encodeURIComponent(params.lang)}/${encodeURIComponent(params.enterprise)}/${encodeURIComponent(params.prdCat)}/${encodeURIComponent(params.prdCatVersion)}/${encodeURIComponent(params.vendor)}/${encodeURIComponent(params.priceList)}/product-v3/${encodeURIComponent(params.partNumber)}`;
|
|
153
156
|
const options = {
|
|
154
157
|
method: "GET",
|
|
155
|
-
headers: { "X-API-Key": this.auth.secretToken || "" },
|
|
158
|
+
headers: { "X-API-Key": this.auth.secretToken || "", "X-SDK-Version": packageInfo.version },
|
|
156
159
|
};
|
|
157
160
|
if (this._alternativeReferer) {
|
|
158
161
|
options.headers["Alternative-Referer"] = this._alternativeReferer;
|
|
@@ -168,7 +171,7 @@ export class CatalogueAPI {
|
|
|
168
171
|
const url = `/v1/catalogue/${encodeURIComponent(params.lang)}/${encodeURIComponent(params.enterprise)}/${encodeURIComponent(params.prdCat)}/${encodeURIComponent(params.prdCatVersion)}/${encodeURIComponent(params.vendor)}/${encodeURIComponent(params.priceList)}/product/${encodeURIComponent(params.partNumber)}/render`;
|
|
169
172
|
const options = {
|
|
170
173
|
method: "POST",
|
|
171
|
-
headers: { "X-API-Key": this.auth.secretToken || "" },
|
|
174
|
+
headers: { "X-API-Key": this.auth.secretToken || "", "X-SDK-Version": packageInfo.version },
|
|
172
175
|
body: JSON.stringify(body),
|
|
173
176
|
};
|
|
174
177
|
if (this._alternativeReferer) {
|
|
@@ -185,7 +188,7 @@ export class CatalogueAPI {
|
|
|
185
188
|
const url = `/v1/catalogue/${encodeURIComponent(params.lang)}/${encodeURIComponent(params.enterprise)}/${encodeURIComponent(params.prdCat)}/${encodeURIComponent(params.prdCatVersion)}/${encodeURIComponent(params.vendor)}/${encodeURIComponent(params.priceList)}/product/${encodeURIComponent(params.partNumber)}/validate`;
|
|
186
189
|
const options = {
|
|
187
190
|
method: "POST",
|
|
188
|
-
headers: { "X-API-Key": this.auth.secretToken || "" },
|
|
191
|
+
headers: { "X-API-Key": this.auth.secretToken || "", "X-SDK-Version": packageInfo.version },
|
|
189
192
|
body: JSON.stringify(body),
|
|
190
193
|
};
|
|
191
194
|
if (this._alternativeReferer) {
|
|
@@ -202,7 +205,7 @@ export class CatalogueAPI {
|
|
|
202
205
|
const url = `/v1/catalogue/${encodeURIComponent(params.lang)}/${encodeURIComponent(params.enterprise)}/${encodeURIComponent(params.prdCat)}/${encodeURIComponent(params.prdCatVersion)}/${encodeURIComponent(params.vendor)}/${encodeURIComponent(params.priceList)}/product/${encodeURIComponent(params.partNumber)}/validate-v2`;
|
|
203
206
|
const options = {
|
|
204
207
|
method: "POST",
|
|
205
|
-
headers: { "X-API-Key": this.auth.secretToken || "" },
|
|
208
|
+
headers: { "X-API-Key": this.auth.secretToken || "", "X-SDK-Version": packageInfo.version },
|
|
206
209
|
body: JSON.stringify(body),
|
|
207
210
|
};
|
|
208
211
|
if (this._alternativeReferer) {
|
|
@@ -219,7 +222,7 @@ export class CatalogueAPI {
|
|
|
219
222
|
const url = `/v1/catalogue/${encodeURIComponent(params.lang)}/${encodeURIComponent(params.enterprise)}/${encodeURIComponent(params.prdCat)}/${encodeURIComponent(params.prdCatVersion)}/${encodeURIComponent(params.vendor)}/${encodeURIComponent(params.priceList)}/toc`;
|
|
220
223
|
const options = {
|
|
221
224
|
method: "GET",
|
|
222
|
-
headers: { "X-API-Key": this.auth.secretToken || "" },
|
|
225
|
+
headers: { "X-API-Key": this.auth.secretToken || "", "X-SDK-Version": packageInfo.version },
|
|
223
226
|
};
|
|
224
227
|
if (this._alternativeReferer) {
|
|
225
228
|
options.headers["Alternative-Referer"] = this._alternativeReferer;
|
|
@@ -235,7 +238,7 @@ export class CatalogueAPI {
|
|
|
235
238
|
const url = `/v1/catalogue/${encodeURIComponent(params.lang)}/${encodeURIComponent(params.enterprise)}/${encodeURIComponent(params.prdCat)}/${encodeURIComponent(params.prdCatVersion)}/${encodeURIComponent(params.vendor)}/${encodeURIComponent(params.priceList)}/toc/flat`;
|
|
236
239
|
const options = {
|
|
237
240
|
method: "GET",
|
|
238
|
-
headers: { "X-API-Key": this.auth.secretToken || "" },
|
|
241
|
+
headers: { "X-API-Key": this.auth.secretToken || "", "X-SDK-Version": packageInfo.version },
|
|
239
242
|
};
|
|
240
243
|
if (this._alternativeReferer) {
|
|
241
244
|
options.headers["Alternative-Referer"] = this._alternativeReferer;
|
|
@@ -251,7 +254,7 @@ export class CatalogueAPI {
|
|
|
251
254
|
const url = `/v1/export/${encodeURIComponent(params.uuid)}`;
|
|
252
255
|
const options = {
|
|
253
256
|
method: "GET",
|
|
254
|
-
headers: { "X-API-Key": this.auth.secretToken || "" },
|
|
257
|
+
headers: { "X-API-Key": this.auth.secretToken || "", "X-SDK-Version": packageInfo.version },
|
|
255
258
|
};
|
|
256
259
|
if (this._alternativeReferer) {
|
|
257
260
|
options.headers["Alternative-Referer"] = this._alternativeReferer;
|
|
@@ -267,7 +270,7 @@ export class CatalogueAPI {
|
|
|
267
270
|
const url = `/v1/render/${encodeURIComponent(params.uuid)}`;
|
|
268
271
|
const options = {
|
|
269
272
|
method: "GET",
|
|
270
|
-
headers: { "X-API-Key": this.auth.secretToken || "" },
|
|
273
|
+
headers: { "X-API-Key": this.auth.secretToken || "", "X-SDK-Version": packageInfo.version },
|
|
271
274
|
};
|
|
272
275
|
if (this._alternativeReferer) {
|
|
273
276
|
options.headers["Alternative-Referer"] = this._alternativeReferer;
|
|
@@ -283,7 +286,7 @@ export class CatalogueAPI {
|
|
|
283
286
|
const url = `/v1/session-token/refresh`;
|
|
284
287
|
const options = {
|
|
285
288
|
method: "POST",
|
|
286
|
-
headers: { "X-API-Key": this.auth.secretToken || "" },
|
|
289
|
+
headers: { "X-API-Key": this.auth.secretToken || "", "X-SDK-Version": packageInfo.version },
|
|
287
290
|
};
|
|
288
291
|
if (this._alternativeReferer) {
|
|
289
292
|
options.headers["Alternative-Referer"] = this._alternativeReferer;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@configura/web-api",
|
|
3
|
-
"version": "2.2.0-alpha.
|
|
3
|
+
"version": "2.2.0-alpha.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"access": "public"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@configura/web-utilities": "2.2.0-alpha.
|
|
26
|
+
"@configura/web-utilities": "2.2.0-alpha.1"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "6a254fe163bdb33a2a22ffde0cda8c818fec7f31"
|
|
29
29
|
}
|