contentful 11.2.6 → 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.
@@ -0,0 +1,59 @@
1
+ import { Link } from './link';
2
+ import { LocaleCode } from './locale';
3
+ type ISODateString = string;
4
+ export type ConceptSys = {
5
+ id: string;
6
+ type: 'TaxonomyConcept';
7
+ createdAt: ISODateString;
8
+ updatedAt: ISODateString;
9
+ version: number;
10
+ };
11
+ export interface Concept<Locales extends LocaleCode> {
12
+ sys: ConceptSys;
13
+ uri?: string;
14
+ prefLabel: {
15
+ [locale in Locales]: string;
16
+ };
17
+ altLabels?: {
18
+ [locale in Locales]: string[];
19
+ };
20
+ hiddenLabels?: {
21
+ [locale in Locales]: string[];
22
+ };
23
+ note?: {
24
+ [locale in Locales]: string;
25
+ } | null;
26
+ changeNote?: {
27
+ [locale in Locales]: string;
28
+ } | null;
29
+ definition?: {
30
+ [locale in Locales]: string;
31
+ } | null;
32
+ editorialNote?: {
33
+ [locale in Locales]: string;
34
+ } | null;
35
+ example?: {
36
+ [locale in Locales]: string;
37
+ } | null;
38
+ historyNote?: {
39
+ [locale in Locales]: string;
40
+ } | null;
41
+ scopeNote?: {
42
+ [locale in Locales]: string;
43
+ } | null;
44
+ notations?: string[];
45
+ broader?: Link<'TaxonomyConcept'>[];
46
+ related?: Link<'TaxonomyConcept'>[];
47
+ }
48
+ export type ConceptCollection<Locale extends LocaleCode> = {
49
+ sys: {
50
+ type: 'Array';
51
+ };
52
+ items: Concept<Locale>[];
53
+ limit: number;
54
+ pages?: {
55
+ prev?: string;
56
+ next?: string;
57
+ };
58
+ };
59
+ export {};
@@ -2,6 +2,8 @@ export * from './asset.js';
2
2
  export * from './asset-key.js';
3
3
  export { AddChainModifier, ChainModifiers, ContentfulClientApi } from './client.js';
4
4
  export * from './collection.js';
5
+ export * from './concept-scheme.js';
6
+ export * from './concept.js';
5
7
  export * from './content-type.js';
6
8
  export * from './entry.js';
7
9
  export * from './link.js';
@@ -39,3 +39,6 @@ export type AssetOrderFilter = {
39
39
  export type TagOrderFilter = {
40
40
  order?: (OrderFilterPaths<TagSys, 'sys'> | 'name' | '-name')[];
41
41
  };
42
+ export type TaxonomyOrderFilter = {
43
+ order?: ('sys.createdAt' | 'sys.updatedAt' | 'prefLabel')[];
44
+ };
@@ -7,7 +7,7 @@ import { TagSys } from '../tag.js';
7
7
  import { EntryFieldsEqualityFilter, EntryFieldsInequalityFilter, EqualityFilter, InequalityFilter } from './equality.js';
8
8
  import { EntryFieldsExistenceFilter, ExistenceFilter } from './existence.js';
9
9
  import { LocationSearchFilters } from './location.js';
10
- import { AssetOrderFilter, EntryOrderFilter, EntryOrderFilterWithFields, TagOrderFilter } from './order.js';
10
+ import { AssetOrderFilter, TaxonomyOrderFilter, EntryOrderFilter, EntryOrderFilterWithFields, TagOrderFilter } from './order.js';
11
11
  import { EntryFieldsRangeFilters, RangeFilters } from './range.js';
12
12
  import { ReferenceSearchFilters } from './reference.js';
13
13
  import { EntryFieldsFullTextSearchFilters, FullTextSearchFilters } from './search.js';
@@ -112,3 +112,13 @@ export type TagNameFilters = {
112
112
  * @category Query
113
113
  */
114
114
  export type TagQueries = TagNameFilters & SysQueries<Pick<TagSys, 'createdAt' | 'updatedAt' | 'visibility' | 'id' | 'type'>> & TagOrderFilter & FixedPagedOptions;
115
+ type CursorPaginationOptions = {
116
+ limit?: number;
117
+ prevPage?: string;
118
+ nextPage?: string;
119
+ };
120
+ export type ConceptsQueries = CursorPaginationOptions & TaxonomyOrderFilter & {
121
+ concept_scheme?: string;
122
+ };
123
+ export type ConceptSchemesQueries = CursorPaginationOptions & TaxonomyOrderFilter;
124
+ export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "contentful",
3
3
  "description": "Client for Contentful's Content Delivery API",
4
- "version": "11.2.6",
4
+ "version": "11.3.0",
5
5
  "homepage": "https://www.contentful.com/developers/documentation/content-delivery-api/",
6
6
  "type": "module",
7
7
  "exports": {