contentful 11.2.6 → 11.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/dist/contentful.browser.js +149 -2
- package/dist/contentful.browser.min.js +1 -1
- package/dist/contentful.cjs +73 -2
- package/dist/esm/contentful.js +1 -1
- package/dist/esm/create-contentful-api.js +73 -1
- package/dist/stats-browser-min.html +1 -1
- package/dist/types/types/client.d.ts +75 -1
- package/dist/types/types/concept-scheme.d.ts +35 -0
- package/dist/types/types/concept.d.ts +59 -0
- package/dist/types/types/index.d.ts +2 -0
- package/dist/types/types/query/order.d.ts +3 -0
- package/dist/types/types/query/query.d.ts +11 -1
- package/package.json +1 -1
package/dist/contentful.cjs
CHANGED
|
@@ -22070,6 +22070,9 @@ var getIdsFromUrn = function getIdsFromUrn(urn) {
|
|
|
22070
22070
|
if (!regExp.test(urn)) {
|
|
22071
22071
|
return undefined;
|
|
22072
22072
|
}
|
|
22073
|
+
|
|
22074
|
+
// eslint-disable-next-line no-unused-vars
|
|
22075
|
+
|
|
22073
22076
|
var _urn$match = urn.match(regExp),
|
|
22074
22077
|
_urn$match2 = _slicedToArray(_urn$match, 4);
|
|
22075
22078
|
_urn$match2[0];
|
|
@@ -22875,6 +22878,70 @@ function createContentfulApi({
|
|
|
22875
22878
|
removeUnresolved: withoutUnresolvableLinks !== null && withoutUnresolvableLinks !== void 0 ? withoutUnresolvableLinks : false
|
|
22876
22879
|
});
|
|
22877
22880
|
}
|
|
22881
|
+
function getConceptScheme(id, query = {}) {
|
|
22882
|
+
return internalGetConceptScheme(id, query);
|
|
22883
|
+
}
|
|
22884
|
+
async function internalGetConceptScheme(id, query = {}) {
|
|
22885
|
+
try {
|
|
22886
|
+
return get({
|
|
22887
|
+
context: 'environment',
|
|
22888
|
+
path: `taxonomy/concept-schemes/${id}`,
|
|
22889
|
+
config: createRequestConfig({
|
|
22890
|
+
query: normalizeSearchParameters(normalizeSelect(query))
|
|
22891
|
+
})
|
|
22892
|
+
});
|
|
22893
|
+
} catch (error) {
|
|
22894
|
+
errorHandler(error);
|
|
22895
|
+
}
|
|
22896
|
+
}
|
|
22897
|
+
function getConceptSchemes(query = {}) {
|
|
22898
|
+
return internalGetConceptSchemes(query);
|
|
22899
|
+
}
|
|
22900
|
+
async function internalGetConceptSchemes(query = {}) {
|
|
22901
|
+
try {
|
|
22902
|
+
return get({
|
|
22903
|
+
context: 'environment',
|
|
22904
|
+
path: 'taxonomy/concept-schemes',
|
|
22905
|
+
config: createRequestConfig({
|
|
22906
|
+
query: normalizeSearchParameters(normalizeSelect(query))
|
|
22907
|
+
})
|
|
22908
|
+
});
|
|
22909
|
+
} catch (error) {
|
|
22910
|
+
errorHandler(error);
|
|
22911
|
+
}
|
|
22912
|
+
}
|
|
22913
|
+
function getConcept(id, query = {}) {
|
|
22914
|
+
return internalGetConcept(id, query);
|
|
22915
|
+
}
|
|
22916
|
+
async function internalGetConcept(id, query = {}) {
|
|
22917
|
+
try {
|
|
22918
|
+
return get({
|
|
22919
|
+
context: 'environment',
|
|
22920
|
+
path: `taxonomy/concepts/${id}`,
|
|
22921
|
+
config: createRequestConfig({
|
|
22922
|
+
query: normalizeSearchParameters(normalizeSelect(query))
|
|
22923
|
+
})
|
|
22924
|
+
});
|
|
22925
|
+
} catch (error) {
|
|
22926
|
+
errorHandler(error);
|
|
22927
|
+
}
|
|
22928
|
+
}
|
|
22929
|
+
function getConcepts(query = {}) {
|
|
22930
|
+
return internalGetConcepts(query);
|
|
22931
|
+
}
|
|
22932
|
+
async function internalGetConcepts(query = {}) {
|
|
22933
|
+
try {
|
|
22934
|
+
return get({
|
|
22935
|
+
context: 'environment',
|
|
22936
|
+
path: 'taxonomy/concepts',
|
|
22937
|
+
config: createRequestConfig({
|
|
22938
|
+
query: normalizeSearchParameters(normalizeSelect(query))
|
|
22939
|
+
})
|
|
22940
|
+
});
|
|
22941
|
+
} catch (error) {
|
|
22942
|
+
errorHandler(error);
|
|
22943
|
+
}
|
|
22944
|
+
}
|
|
22878
22945
|
/*
|
|
22879
22946
|
* Switches BaseURL to use /environments path
|
|
22880
22947
|
* */
|
|
@@ -22882,7 +22949,7 @@ function createContentfulApi({
|
|
|
22882
22949
|
http.defaults.baseURL = getGlobalOptions().environmentBaseUrl;
|
|
22883
22950
|
}
|
|
22884
22951
|
return {
|
|
22885
|
-
version: "11.
|
|
22952
|
+
version: "11.3.1",
|
|
22886
22953
|
getSpace,
|
|
22887
22954
|
getContentType,
|
|
22888
22955
|
getContentTypes,
|
|
@@ -22895,6 +22962,10 @@ function createContentfulApi({
|
|
|
22895
22962
|
sync,
|
|
22896
22963
|
getEntry,
|
|
22897
22964
|
getEntries,
|
|
22965
|
+
getConceptScheme,
|
|
22966
|
+
getConceptSchemes,
|
|
22967
|
+
getConcept,
|
|
22968
|
+
getConcepts,
|
|
22898
22969
|
createAssetKey
|
|
22899
22970
|
};
|
|
22900
22971
|
}
|
|
@@ -23001,7 +23072,7 @@ function createClient(params) {
|
|
|
23001
23072
|
environment: 'master'
|
|
23002
23073
|
};
|
|
23003
23074
|
const config = Object.assign(Object.assign({}, defaultConfig), params);
|
|
23004
|
-
const userAgentHeader = getUserAgentHeader(`contentful.js/${"11.
|
|
23075
|
+
const userAgentHeader = getUserAgentHeader(`contentful.js/${"11.3.1"}`, config.application, config.integration);
|
|
23005
23076
|
config.headers = Object.assign(Object.assign({}, config.headers), {
|
|
23006
23077
|
'Content-Type': 'application/vnd.contentful.delivery.v1+json',
|
|
23007
23078
|
'X-Contentful-User-Agent': userAgentHeader
|
package/dist/esm/contentful.js
CHANGED
|
@@ -37,7 +37,7 @@ function createClient(params) {
|
|
|
37
37
|
environment: 'master',
|
|
38
38
|
};
|
|
39
39
|
const config = Object.assign(Object.assign({}, defaultConfig), params);
|
|
40
|
-
const userAgentHeader = getUserAgentHeader(`contentful.js/${"11.
|
|
40
|
+
const userAgentHeader = getUserAgentHeader(`contentful.js/${"11.3.1"}`, config.application, config.integration);
|
|
41
41
|
config.headers = Object.assign(Object.assign({}, config.headers), { 'Content-Type': 'application/vnd.contentful.delivery.v1+json', 'X-Contentful-User-Agent': userAgentHeader });
|
|
42
42
|
const http = createHttpClient(axios, config);
|
|
43
43
|
if (!http.defaults.baseURL) {
|
|
@@ -293,6 +293,74 @@ function createContentfulApi({ http, getGlobalOptions }, options) {
|
|
|
293
293
|
removeUnresolved: withoutUnresolvableLinks !== null && withoutUnresolvableLinks !== void 0 ? withoutUnresolvableLinks : false,
|
|
294
294
|
});
|
|
295
295
|
}
|
|
296
|
+
function getConceptScheme(id, query = {}) {
|
|
297
|
+
return internalGetConceptScheme(id, query);
|
|
298
|
+
}
|
|
299
|
+
async function internalGetConceptScheme(id, query = {}) {
|
|
300
|
+
try {
|
|
301
|
+
return get({
|
|
302
|
+
context: 'environment',
|
|
303
|
+
path: `taxonomy/concept-schemes/${id}`,
|
|
304
|
+
config: createRequestConfig({
|
|
305
|
+
query: normalizeSearchParameters(normalizeSelect(query)),
|
|
306
|
+
}),
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
catch (error) {
|
|
310
|
+
errorHandler(error);
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
function getConceptSchemes(query = {}) {
|
|
314
|
+
return internalGetConceptSchemes(query);
|
|
315
|
+
}
|
|
316
|
+
async function internalGetConceptSchemes(query = {}) {
|
|
317
|
+
try {
|
|
318
|
+
return get({
|
|
319
|
+
context: 'environment',
|
|
320
|
+
path: 'taxonomy/concept-schemes',
|
|
321
|
+
config: createRequestConfig({
|
|
322
|
+
query: normalizeSearchParameters(normalizeSelect(query)),
|
|
323
|
+
}),
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
catch (error) {
|
|
327
|
+
errorHandler(error);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
function getConcept(id, query = {}) {
|
|
331
|
+
return internalGetConcept(id, query);
|
|
332
|
+
}
|
|
333
|
+
async function internalGetConcept(id, query = {}) {
|
|
334
|
+
try {
|
|
335
|
+
return get({
|
|
336
|
+
context: 'environment',
|
|
337
|
+
path: `taxonomy/concepts/${id}`,
|
|
338
|
+
config: createRequestConfig({
|
|
339
|
+
query: normalizeSearchParameters(normalizeSelect(query)),
|
|
340
|
+
}),
|
|
341
|
+
});
|
|
342
|
+
}
|
|
343
|
+
catch (error) {
|
|
344
|
+
errorHandler(error);
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
function getConcepts(query = {}) {
|
|
348
|
+
return internalGetConcepts(query);
|
|
349
|
+
}
|
|
350
|
+
async function internalGetConcepts(query = {}) {
|
|
351
|
+
try {
|
|
352
|
+
return get({
|
|
353
|
+
context: 'environment',
|
|
354
|
+
path: 'taxonomy/concepts',
|
|
355
|
+
config: createRequestConfig({
|
|
356
|
+
query: normalizeSearchParameters(normalizeSelect(query)),
|
|
357
|
+
}),
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
catch (error) {
|
|
361
|
+
errorHandler(error);
|
|
362
|
+
}
|
|
363
|
+
}
|
|
296
364
|
/*
|
|
297
365
|
* Switches BaseURL to use /environments path
|
|
298
366
|
* */
|
|
@@ -300,7 +368,7 @@ function createContentfulApi({ http, getGlobalOptions }, options) {
|
|
|
300
368
|
http.defaults.baseURL = getGlobalOptions().environmentBaseUrl;
|
|
301
369
|
}
|
|
302
370
|
return {
|
|
303
|
-
version: "11.
|
|
371
|
+
version: "11.3.1",
|
|
304
372
|
getSpace,
|
|
305
373
|
getContentType,
|
|
306
374
|
getContentTypes,
|
|
@@ -313,6 +381,10 @@ function createContentfulApi({ http, getGlobalOptions }, options) {
|
|
|
313
381
|
sync,
|
|
314
382
|
getEntry,
|
|
315
383
|
getEntries,
|
|
384
|
+
getConceptScheme,
|
|
385
|
+
getConceptSchemes,
|
|
386
|
+
getConcept,
|
|
387
|
+
getConcepts,
|
|
316
388
|
createAssetKey,
|
|
317
389
|
};
|
|
318
390
|
}
|