contentful 11.2.5 → 11.3.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/contentful.browser.js +147 -3
- package/dist/contentful.browser.min.js +1 -1
- package/dist/contentful.cjs +71 -3
- 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
|
@@ -15650,7 +15650,7 @@ function buildFullPath(baseURL, requestedURL) {
|
|
|
15650
15650
|
}
|
|
15651
15651
|
return requestedURL;
|
|
15652
15652
|
}
|
|
15653
|
-
const VERSION = "1.7.
|
|
15653
|
+
const VERSION = "1.7.9";
|
|
15654
15654
|
function parseProtocol(url) {
|
|
15655
15655
|
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
|
15656
15656
|
return match && match[1] || '';
|
|
@@ -22875,6 +22875,70 @@ function createContentfulApi({
|
|
|
22875
22875
|
removeUnresolved: withoutUnresolvableLinks !== null && withoutUnresolvableLinks !== void 0 ? withoutUnresolvableLinks : false
|
|
22876
22876
|
});
|
|
22877
22877
|
}
|
|
22878
|
+
function getConceptScheme(id, query = {}) {
|
|
22879
|
+
return internalGetConceptScheme(id, query);
|
|
22880
|
+
}
|
|
22881
|
+
async function internalGetConceptScheme(id, query = {}) {
|
|
22882
|
+
try {
|
|
22883
|
+
return get({
|
|
22884
|
+
context: 'environment',
|
|
22885
|
+
path: `taxonomy/concept-schemes/${id}`,
|
|
22886
|
+
config: createRequestConfig({
|
|
22887
|
+
query: normalizeSearchParameters(normalizeSelect(query))
|
|
22888
|
+
})
|
|
22889
|
+
});
|
|
22890
|
+
} catch (error) {
|
|
22891
|
+
errorHandler(error);
|
|
22892
|
+
}
|
|
22893
|
+
}
|
|
22894
|
+
function getConceptSchemes(query = {}) {
|
|
22895
|
+
return internalGetConceptSchemes(query);
|
|
22896
|
+
}
|
|
22897
|
+
async function internalGetConceptSchemes(query = {}) {
|
|
22898
|
+
try {
|
|
22899
|
+
return get({
|
|
22900
|
+
context: 'environment',
|
|
22901
|
+
path: 'taxonomy/concept-schemes',
|
|
22902
|
+
config: createRequestConfig({
|
|
22903
|
+
query: normalizeSearchParameters(normalizeSelect(query))
|
|
22904
|
+
})
|
|
22905
|
+
});
|
|
22906
|
+
} catch (error) {
|
|
22907
|
+
errorHandler(error);
|
|
22908
|
+
}
|
|
22909
|
+
}
|
|
22910
|
+
function getConcept(id, query = {}) {
|
|
22911
|
+
return internalGetConcept(id, query);
|
|
22912
|
+
}
|
|
22913
|
+
async function internalGetConcept(id, query = {}) {
|
|
22914
|
+
try {
|
|
22915
|
+
return get({
|
|
22916
|
+
context: 'environment',
|
|
22917
|
+
path: `taxonomy/concepts/${id}`,
|
|
22918
|
+
config: createRequestConfig({
|
|
22919
|
+
query: normalizeSearchParameters(normalizeSelect(query))
|
|
22920
|
+
})
|
|
22921
|
+
});
|
|
22922
|
+
} catch (error) {
|
|
22923
|
+
errorHandler(error);
|
|
22924
|
+
}
|
|
22925
|
+
}
|
|
22926
|
+
function getConcepts(query = {}) {
|
|
22927
|
+
return internalGetConcepts(query);
|
|
22928
|
+
}
|
|
22929
|
+
async function internalGetConcepts(query = {}) {
|
|
22930
|
+
try {
|
|
22931
|
+
return get({
|
|
22932
|
+
context: 'environment',
|
|
22933
|
+
path: 'taxonomy/concepts',
|
|
22934
|
+
config: createRequestConfig({
|
|
22935
|
+
query: normalizeSearchParameters(normalizeSelect(query))
|
|
22936
|
+
})
|
|
22937
|
+
});
|
|
22938
|
+
} catch (error) {
|
|
22939
|
+
errorHandler(error);
|
|
22940
|
+
}
|
|
22941
|
+
}
|
|
22878
22942
|
/*
|
|
22879
22943
|
* Switches BaseURL to use /environments path
|
|
22880
22944
|
* */
|
|
@@ -22882,7 +22946,7 @@ function createContentfulApi({
|
|
|
22882
22946
|
http.defaults.baseURL = getGlobalOptions().environmentBaseUrl;
|
|
22883
22947
|
}
|
|
22884
22948
|
return {
|
|
22885
|
-
version: "11.
|
|
22949
|
+
version: "11.3.0",
|
|
22886
22950
|
getSpace,
|
|
22887
22951
|
getContentType,
|
|
22888
22952
|
getContentTypes,
|
|
@@ -22895,6 +22959,10 @@ function createContentfulApi({
|
|
|
22895
22959
|
sync,
|
|
22896
22960
|
getEntry,
|
|
22897
22961
|
getEntries,
|
|
22962
|
+
getConceptScheme,
|
|
22963
|
+
getConceptSchemes,
|
|
22964
|
+
getConcept,
|
|
22965
|
+
getConcepts,
|
|
22898
22966
|
createAssetKey
|
|
22899
22967
|
};
|
|
22900
22968
|
}
|
|
@@ -23001,7 +23069,7 @@ function createClient(params) {
|
|
|
23001
23069
|
environment: 'master'
|
|
23002
23070
|
};
|
|
23003
23071
|
const config = Object.assign(Object.assign({}, defaultConfig), params);
|
|
23004
|
-
const userAgentHeader = getUserAgentHeader(`contentful.js/${"11.
|
|
23072
|
+
const userAgentHeader = getUserAgentHeader(`contentful.js/${"11.3.0"}`, config.application, config.integration);
|
|
23005
23073
|
config.headers = Object.assign(Object.assign({}, config.headers), {
|
|
23006
23074
|
'Content-Type': 'application/vnd.contentful.delivery.v1+json',
|
|
23007
23075
|
'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.0"}`, 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.0",
|
|
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
|
}
|