@datocms/cma-client 5.2.0-alpha.3 → 5.2.0-alpha.5
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/README.md +4 -0
- package/dist/cjs/generated/Client.js +3 -3
- package/dist/cjs/generated/Client.js.map +1 -1
- package/dist/cjs/generated/resources/ItemType.js +12 -12
- package/dist/cjs/generated/resources/Role.js +8 -8
- package/dist/cjs/generated/resources/Role.js.map +1 -1
- package/dist/cjs/generated/resources/{SiteSearchSource.js → SearchIndex.js} +59 -71
- package/dist/cjs/generated/resources/SearchIndex.js.map +1 -0
- package/dist/cjs/generated/resources/{SiteSearchSourceEvent.js → SearchIndexEvent.js} +19 -19
- package/dist/cjs/generated/resources/SearchIndexEvent.js.map +1 -0
- package/dist/cjs/generated/resources/index.js +5 -5
- package/dist/cjs/generated/resources/index.js.map +1 -1
- package/dist/cjs/utilities/schemaRepository.js +131 -0
- package/dist/cjs/utilities/schemaRepository.js.map +1 -1
- package/dist/esm/generated/ApiTypes.d.ts +273 -270
- package/dist/esm/generated/Client.d.ts +2 -2
- package/dist/esm/generated/Client.js +3 -3
- package/dist/esm/generated/Client.js.map +1 -1
- package/dist/esm/generated/RawApiTypes.d.ts +265 -258
- package/dist/esm/generated/resources/ItemType.d.ts +12 -12
- package/dist/esm/generated/resources/ItemType.js +12 -12
- package/dist/esm/generated/resources/Role.js +8 -8
- package/dist/esm/generated/resources/Role.js.map +1 -1
- package/dist/esm/generated/resources/SearchIndex.d.ts +132 -0
- package/dist/esm/generated/resources/{SiteSearchSource.js → SearchIndex.js} +58 -70
- package/dist/esm/generated/resources/SearchIndex.js.map +1 -0
- package/dist/esm/generated/resources/SearchIndexEvent.d.ts +61 -0
- package/dist/esm/generated/resources/{SiteSearchSourceEvent.js → SearchIndexEvent.js} +18 -18
- package/dist/esm/generated/resources/SearchIndexEvent.js.map +1 -0
- package/dist/esm/generated/resources/index.d.ts +2 -2
- package/dist/esm/generated/resources/index.js +2 -2
- package/dist/esm/generated/resources/index.js.map +1 -1
- package/dist/esm/utilities/schemaRepository.d.ts +42 -2
- package/dist/esm/utilities/schemaRepository.js +132 -1
- package/dist/esm/utilities/schemaRepository.js.map +1 -1
- package/dist/types/generated/ApiTypes.d.ts +273 -270
- package/dist/types/generated/Client.d.ts +2 -2
- package/dist/types/generated/RawApiTypes.d.ts +265 -258
- package/dist/types/generated/resources/ItemType.d.ts +12 -12
- package/dist/types/generated/resources/SearchIndex.d.ts +132 -0
- package/dist/types/generated/resources/SearchIndexEvent.d.ts +61 -0
- package/dist/types/generated/resources/index.d.ts +2 -2
- package/dist/types/utilities/schemaRepository.d.ts +42 -2
- package/package.json +3 -3
- package/resources.json +83 -85
- package/src/generated/ApiTypes.ts +274 -272
- package/src/generated/Client.ts +5 -5
- package/src/generated/RawApiTypes.ts +266 -259
- package/src/generated/resources/ItemType.ts +12 -12
- package/src/generated/resources/Role.ts +8 -8
- package/src/generated/resources/SearchIndex.ts +243 -0
- package/src/generated/resources/{SiteSearchSourceEvent.ts → SearchIndexEvent.ts} +32 -34
- package/src/generated/resources/index.ts +2 -2
- package/src/utilities/schemaRepository.ts +167 -9
- package/dist/cjs/generated/resources/SiteSearchSource.js.map +0 -1
- package/dist/cjs/generated/resources/SiteSearchSourceEvent.js.map +0 -1
- package/dist/esm/generated/resources/SiteSearchSource.d.ts +0 -132
- package/dist/esm/generated/resources/SiteSearchSource.js.map +0 -1
- package/dist/esm/generated/resources/SiteSearchSourceEvent.d.ts +0 -61
- package/dist/esm/generated/resources/SiteSearchSourceEvent.js.map +0 -1
- package/dist/types/generated/resources/SiteSearchSource.d.ts +0 -132
- package/dist/types/generated/resources/SiteSearchSourceEvent.d.ts +0 -61
- package/src/generated/resources/SiteSearchSource.ts +0 -267
|
@@ -4,7 +4,7 @@ import type * as RawApiTypes from '../RawApiTypes';
|
|
|
4
4
|
export default class ItemType extends BaseResource {
|
|
5
5
|
static readonly TYPE: "item_type";
|
|
6
6
|
/**
|
|
7
|
-
* Create a new model
|
|
7
|
+
* Create a new model/block model
|
|
8
8
|
*
|
|
9
9
|
* Read more: https://www.datocms.com/docs/content-management-api/resources/item-type/create
|
|
10
10
|
*
|
|
@@ -13,7 +13,7 @@ export default class ItemType extends BaseResource {
|
|
|
13
13
|
*/
|
|
14
14
|
create(body: ApiTypes.ItemTypeCreateSchema, queryParams?: ApiTypes.ItemTypeCreateHrefSchema): Promise<ApiTypes.ItemType>;
|
|
15
15
|
/**
|
|
16
|
-
* Create a new model
|
|
16
|
+
* Create a new model/block model
|
|
17
17
|
*
|
|
18
18
|
* Read more: https://www.datocms.com/docs/content-management-api/resources/item-type/create
|
|
19
19
|
*
|
|
@@ -22,7 +22,7 @@ export default class ItemType extends BaseResource {
|
|
|
22
22
|
*/
|
|
23
23
|
rawCreate(body: RawApiTypes.ItemTypeCreateSchema, queryParams?: RawApiTypes.ItemTypeCreateHrefSchema): Promise<RawApiTypes.ItemTypeCreateTargetSchema>;
|
|
24
24
|
/**
|
|
25
|
-
* Update a model
|
|
25
|
+
* Update a model/block model
|
|
26
26
|
*
|
|
27
27
|
* Read more: https://www.datocms.com/docs/content-management-api/resources/item-type/update
|
|
28
28
|
*
|
|
@@ -31,7 +31,7 @@ export default class ItemType extends BaseResource {
|
|
|
31
31
|
*/
|
|
32
32
|
update(itemTypeId: string | ApiTypes.ItemTypeData, body: ApiTypes.ItemTypeUpdateSchema): Promise<ApiTypes.ItemType>;
|
|
33
33
|
/**
|
|
34
|
-
* Update a model
|
|
34
|
+
* Update a model/block model
|
|
35
35
|
*
|
|
36
36
|
* Read more: https://www.datocms.com/docs/content-management-api/resources/item-type/update
|
|
37
37
|
*
|
|
@@ -40,7 +40,7 @@ export default class ItemType extends BaseResource {
|
|
|
40
40
|
*/
|
|
41
41
|
rawUpdate(itemTypeId: string, body: RawApiTypes.ItemTypeUpdateSchema): Promise<RawApiTypes.ItemTypeUpdateJobSchema>;
|
|
42
42
|
/**
|
|
43
|
-
* List all models
|
|
43
|
+
* List all models/block models
|
|
44
44
|
*
|
|
45
45
|
* Read more: https://www.datocms.com/docs/content-management-api/resources/item-type/instances
|
|
46
46
|
*
|
|
@@ -49,7 +49,7 @@ export default class ItemType extends BaseResource {
|
|
|
49
49
|
*/
|
|
50
50
|
list(): Promise<ApiTypes.ItemTypeInstancesTargetSchema>;
|
|
51
51
|
/**
|
|
52
|
-
* List all models
|
|
52
|
+
* List all models/block models
|
|
53
53
|
*
|
|
54
54
|
* Read more: https://www.datocms.com/docs/content-management-api/resources/item-type/instances
|
|
55
55
|
*
|
|
@@ -58,7 +58,7 @@ export default class ItemType extends BaseResource {
|
|
|
58
58
|
*/
|
|
59
59
|
rawList(): Promise<RawApiTypes.ItemTypeInstancesTargetSchema>;
|
|
60
60
|
/**
|
|
61
|
-
* Retrieve a model
|
|
61
|
+
* Retrieve a model/block model
|
|
62
62
|
*
|
|
63
63
|
* Read more: https://www.datocms.com/docs/content-management-api/resources/item-type/self
|
|
64
64
|
*
|
|
@@ -67,7 +67,7 @@ export default class ItemType extends BaseResource {
|
|
|
67
67
|
*/
|
|
68
68
|
find(itemTypeId: string | ApiTypes.ItemTypeData): Promise<ApiTypes.ItemType>;
|
|
69
69
|
/**
|
|
70
|
-
* Retrieve a model
|
|
70
|
+
* Retrieve a model/block model
|
|
71
71
|
*
|
|
72
72
|
* Read more: https://www.datocms.com/docs/content-management-api/resources/item-type/self
|
|
73
73
|
*
|
|
@@ -76,7 +76,7 @@ export default class ItemType extends BaseResource {
|
|
|
76
76
|
*/
|
|
77
77
|
rawFind(itemTypeId: string): Promise<RawApiTypes.ItemTypeSelfTargetSchema>;
|
|
78
78
|
/**
|
|
79
|
-
* Duplicate model
|
|
79
|
+
* Duplicate model/block model
|
|
80
80
|
*
|
|
81
81
|
* Read more: https://www.datocms.com/docs/content-management-api/resources/item-type/duplicate
|
|
82
82
|
*
|
|
@@ -85,7 +85,7 @@ export default class ItemType extends BaseResource {
|
|
|
85
85
|
*/
|
|
86
86
|
duplicate(itemTypeId: string | ApiTypes.ItemTypeData): Promise<ApiTypes.ItemType>;
|
|
87
87
|
/**
|
|
88
|
-
* Duplicate model
|
|
88
|
+
* Duplicate model/block model
|
|
89
89
|
*
|
|
90
90
|
* Read more: https://www.datocms.com/docs/content-management-api/resources/item-type/duplicate
|
|
91
91
|
*
|
|
@@ -94,7 +94,7 @@ export default class ItemType extends BaseResource {
|
|
|
94
94
|
*/
|
|
95
95
|
rawDuplicate(itemTypeId: string): Promise<RawApiTypes.ItemTypeDuplicateTargetSchema>;
|
|
96
96
|
/**
|
|
97
|
-
* Delete a model
|
|
97
|
+
* Delete a model/block model
|
|
98
98
|
*
|
|
99
99
|
* Read more: https://www.datocms.com/docs/content-management-api/resources/item-type/destroy
|
|
100
100
|
*
|
|
@@ -103,7 +103,7 @@ export default class ItemType extends BaseResource {
|
|
|
103
103
|
*/
|
|
104
104
|
destroy(itemTypeId: string | ApiTypes.ItemTypeData, queryParams?: ApiTypes.ItemTypeDestroyHrefSchema): Promise<ApiTypes.ItemType>;
|
|
105
105
|
/**
|
|
106
|
-
* Delete a model
|
|
106
|
+
* Delete a model/block model
|
|
107
107
|
*
|
|
108
108
|
* Read more: https://www.datocms.com/docs/content-management-api/resources/item-type/destroy
|
|
109
109
|
*
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import BaseResource from '../../BaseResource';
|
|
2
|
+
import type * as ApiTypes from '../ApiTypes';
|
|
3
|
+
import type * as RawApiTypes from '../RawApiTypes';
|
|
4
|
+
export default class SearchIndex extends BaseResource {
|
|
5
|
+
static readonly TYPE: "search_index";
|
|
6
|
+
/**
|
|
7
|
+
* List all search indexes for a site
|
|
8
|
+
*
|
|
9
|
+
* Read more: https://www.datocms.com/docs/content-management-api/resources/search-index/instances
|
|
10
|
+
*
|
|
11
|
+
* @throws {ApiError}
|
|
12
|
+
* @throws {TimeoutError}
|
|
13
|
+
*/
|
|
14
|
+
list(): Promise<ApiTypes.SearchIndexInstancesTargetSchema>;
|
|
15
|
+
/**
|
|
16
|
+
* List all search indexes for a site
|
|
17
|
+
*
|
|
18
|
+
* Read more: https://www.datocms.com/docs/content-management-api/resources/search-index/instances
|
|
19
|
+
*
|
|
20
|
+
* @throws {ApiError}
|
|
21
|
+
* @throws {TimeoutError}
|
|
22
|
+
*/
|
|
23
|
+
rawList(): Promise<RawApiTypes.SearchIndexInstancesTargetSchema>;
|
|
24
|
+
/**
|
|
25
|
+
* Retrieve a search index
|
|
26
|
+
*
|
|
27
|
+
* Read more: https://www.datocms.com/docs/content-management-api/resources/search-index/self
|
|
28
|
+
*
|
|
29
|
+
* @throws {ApiError}
|
|
30
|
+
* @throws {TimeoutError}
|
|
31
|
+
*/
|
|
32
|
+
find(searchIndexId: string | ApiTypes.SearchIndexData): Promise<ApiTypes.SearchIndex>;
|
|
33
|
+
/**
|
|
34
|
+
* Retrieve a search index
|
|
35
|
+
*
|
|
36
|
+
* Read more: https://www.datocms.com/docs/content-management-api/resources/search-index/self
|
|
37
|
+
*
|
|
38
|
+
* @throws {ApiError}
|
|
39
|
+
* @throws {TimeoutError}
|
|
40
|
+
*/
|
|
41
|
+
rawFind(searchIndexId: string): Promise<RawApiTypes.SearchIndexSelfTargetSchema>;
|
|
42
|
+
/**
|
|
43
|
+
* Create a search index
|
|
44
|
+
*
|
|
45
|
+
* Read more: https://www.datocms.com/docs/content-management-api/resources/search-index/create
|
|
46
|
+
*
|
|
47
|
+
* @throws {ApiError}
|
|
48
|
+
* @throws {TimeoutError}
|
|
49
|
+
*/
|
|
50
|
+
create(body: ApiTypes.SearchIndexCreateSchema): Promise<ApiTypes.SearchIndex>;
|
|
51
|
+
/**
|
|
52
|
+
* Create a search index
|
|
53
|
+
*
|
|
54
|
+
* Read more: https://www.datocms.com/docs/content-management-api/resources/search-index/create
|
|
55
|
+
*
|
|
56
|
+
* @throws {ApiError}
|
|
57
|
+
* @throws {TimeoutError}
|
|
58
|
+
*/
|
|
59
|
+
rawCreate(body: RawApiTypes.SearchIndexCreateSchema): Promise<RawApiTypes.SearchIndexCreateTargetSchema>;
|
|
60
|
+
/**
|
|
61
|
+
* Update a search index
|
|
62
|
+
*
|
|
63
|
+
* Read more: https://www.datocms.com/docs/content-management-api/resources/search-index/update
|
|
64
|
+
*
|
|
65
|
+
* @throws {ApiError}
|
|
66
|
+
* @throws {TimeoutError}
|
|
67
|
+
*/
|
|
68
|
+
update(searchIndexId: string | ApiTypes.SearchIndexData, body: ApiTypes.SearchIndexUpdateSchema): Promise<ApiTypes.SearchIndex>;
|
|
69
|
+
/**
|
|
70
|
+
* Update a search index
|
|
71
|
+
*
|
|
72
|
+
* Read more: https://www.datocms.com/docs/content-management-api/resources/search-index/update
|
|
73
|
+
*
|
|
74
|
+
* @throws {ApiError}
|
|
75
|
+
* @throws {TimeoutError}
|
|
76
|
+
*/
|
|
77
|
+
rawUpdate(searchIndexId: string, body: RawApiTypes.SearchIndexUpdateSchema): Promise<RawApiTypes.SearchIndexUpdateTargetSchema>;
|
|
78
|
+
/**
|
|
79
|
+
* Trigger the indexing process
|
|
80
|
+
*
|
|
81
|
+
* Read more: https://www.datocms.com/docs/content-management-api/resources/search-index/trigger
|
|
82
|
+
*
|
|
83
|
+
* @throws {ApiError}
|
|
84
|
+
* @throws {TimeoutError}
|
|
85
|
+
*/
|
|
86
|
+
trigger(searchIndexId: string | ApiTypes.SearchIndexData): Promise<void>;
|
|
87
|
+
/**
|
|
88
|
+
* Trigger the indexing process
|
|
89
|
+
*
|
|
90
|
+
* Read more: https://www.datocms.com/docs/content-management-api/resources/search-index/trigger
|
|
91
|
+
*
|
|
92
|
+
* @throws {ApiError}
|
|
93
|
+
* @throws {TimeoutError}
|
|
94
|
+
*/
|
|
95
|
+
rawTrigger(searchIndexId: string): Promise<void>;
|
|
96
|
+
/**
|
|
97
|
+
* Abort a the current indexing process and mark it as failed
|
|
98
|
+
*
|
|
99
|
+
* Read more: https://www.datocms.com/docs/content-management-api/resources/search-index/abort
|
|
100
|
+
*
|
|
101
|
+
* @throws {ApiError}
|
|
102
|
+
* @throws {TimeoutError}
|
|
103
|
+
*/
|
|
104
|
+
abort(searchIndexId: string | ApiTypes.SearchIndexData): Promise<void>;
|
|
105
|
+
/**
|
|
106
|
+
* Abort a the current indexing process and mark it as failed
|
|
107
|
+
*
|
|
108
|
+
* Read more: https://www.datocms.com/docs/content-management-api/resources/search-index/abort
|
|
109
|
+
*
|
|
110
|
+
* @throws {ApiError}
|
|
111
|
+
* @throws {TimeoutError}
|
|
112
|
+
*/
|
|
113
|
+
rawAbort(searchIndexId: string): Promise<void>;
|
|
114
|
+
/**
|
|
115
|
+
* Delete a search index
|
|
116
|
+
*
|
|
117
|
+
* Read more: https://www.datocms.com/docs/content-management-api/resources/search-index/destroy
|
|
118
|
+
*
|
|
119
|
+
* @throws {ApiError}
|
|
120
|
+
* @throws {TimeoutError}
|
|
121
|
+
*/
|
|
122
|
+
destroy(searchIndexId: string | ApiTypes.SearchIndexData): Promise<ApiTypes.SearchIndex>;
|
|
123
|
+
/**
|
|
124
|
+
* Delete a search index
|
|
125
|
+
*
|
|
126
|
+
* Read more: https://www.datocms.com/docs/content-management-api/resources/search-index/destroy
|
|
127
|
+
*
|
|
128
|
+
* @throws {ApiError}
|
|
129
|
+
* @throws {TimeoutError}
|
|
130
|
+
*/
|
|
131
|
+
rawDestroy(searchIndexId: string): Promise<RawApiTypes.SearchIndexDestroyTargetSchema>;
|
|
132
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import * as Utils from '@datocms/rest-client-utils';
|
|
2
|
+
import BaseResource from '../../BaseResource';
|
|
3
|
+
import type * as ApiTypes from '../ApiTypes';
|
|
4
|
+
import type * as RawApiTypes from '../RawApiTypes';
|
|
5
|
+
export default class SearchIndexEvent extends BaseResource {
|
|
6
|
+
static readonly TYPE: "search_index_event";
|
|
7
|
+
/**
|
|
8
|
+
* List all search indexing events
|
|
9
|
+
*
|
|
10
|
+
* Read more: https://www.datocms.com/docs/content-management-api/resources/search-index_event/instances
|
|
11
|
+
*
|
|
12
|
+
* @throws {ApiError}
|
|
13
|
+
* @throws {TimeoutError}
|
|
14
|
+
*/
|
|
15
|
+
list(queryParams?: ApiTypes.SearchIndexEventInstancesHrefSchema): Promise<ApiTypes.SearchIndexEventInstancesTargetSchema>;
|
|
16
|
+
/**
|
|
17
|
+
* List all search indexing events
|
|
18
|
+
*
|
|
19
|
+
* Read more: https://www.datocms.com/docs/content-management-api/resources/search-index_event/instances
|
|
20
|
+
*
|
|
21
|
+
* @throws {ApiError}
|
|
22
|
+
* @throws {TimeoutError}
|
|
23
|
+
*/
|
|
24
|
+
rawList(queryParams?: RawApiTypes.SearchIndexEventInstancesHrefSchema): Promise<RawApiTypes.SearchIndexEventInstancesTargetSchema>;
|
|
25
|
+
/**
|
|
26
|
+
* Async iterator to auto-paginate over elements returned by list()
|
|
27
|
+
*
|
|
28
|
+
* Read more: https://www.datocms.com/docs/content-management-api/resources/search-index_event/instances
|
|
29
|
+
*
|
|
30
|
+
* @throws {ApiError}
|
|
31
|
+
* @throws {TimeoutError}
|
|
32
|
+
*/
|
|
33
|
+
listPagedIterator(queryParams?: Utils.OmitFromKnownKeys<ApiTypes.SearchIndexEventInstancesHrefSchema, 'page'>, iteratorOptions?: Utils.IteratorOptions): AsyncGenerator<ApiTypes.SearchIndexEvent, void, unknown>;
|
|
34
|
+
/**
|
|
35
|
+
* Async iterator to auto-paginate over elements returned by rawList()
|
|
36
|
+
*
|
|
37
|
+
* Read more: https://www.datocms.com/docs/content-management-api/resources/search-index_event/instances
|
|
38
|
+
*
|
|
39
|
+
* @throws {ApiError}
|
|
40
|
+
* @throws {TimeoutError}
|
|
41
|
+
*/
|
|
42
|
+
rawListPagedIterator(queryParams?: Utils.OmitFromKnownKeys<RawApiTypes.SearchIndexEventInstancesHrefSchema, 'page'>, iteratorOptions?: Utils.IteratorOptions): AsyncGenerator<RawApiTypes.SearchIndexEvent, void, unknown>;
|
|
43
|
+
/**
|
|
44
|
+
* Retrieve a search indexing event
|
|
45
|
+
*
|
|
46
|
+
* Read more: https://www.datocms.com/docs/content-management-api/resources/search-index_event/self
|
|
47
|
+
*
|
|
48
|
+
* @throws {ApiError}
|
|
49
|
+
* @throws {TimeoutError}
|
|
50
|
+
*/
|
|
51
|
+
find(searchIndexEventId: string | ApiTypes.SearchIndexEventData): Promise<ApiTypes.SearchIndexEvent>;
|
|
52
|
+
/**
|
|
53
|
+
* Retrieve a search indexing event
|
|
54
|
+
*
|
|
55
|
+
* Read more: https://www.datocms.com/docs/content-management-api/resources/search-index_event/self
|
|
56
|
+
*
|
|
57
|
+
* @throws {ApiError}
|
|
58
|
+
* @throws {TimeoutError}
|
|
59
|
+
*/
|
|
60
|
+
rawFind(searchIndexEventId: string): Promise<RawApiTypes.SearchIndexEventSelfTargetSchema>;
|
|
61
|
+
}
|
|
@@ -15,7 +15,7 @@ export { default as JobResult } from './JobResult';
|
|
|
15
15
|
export { default as SubscriptionLimit } from './SubscriptionLimit';
|
|
16
16
|
export { default as SubscriptionFeature } from './SubscriptionFeature';
|
|
17
17
|
export { default as BuildEvent } from './BuildEvent';
|
|
18
|
-
export { default as
|
|
18
|
+
export { default as SearchIndexEvent } from './SearchIndexEvent';
|
|
19
19
|
export { default as Item } from './Item';
|
|
20
20
|
export { default as ItemVersion } from './ItemVersion';
|
|
21
21
|
export { default as Upload } from './Upload';
|
|
@@ -29,7 +29,7 @@ export { default as MaintenanceMode } from './MaintenanceMode';
|
|
|
29
29
|
export { default as Webhook } from './Webhook';
|
|
30
30
|
export { default as WebhookCall } from './WebhookCall';
|
|
31
31
|
export { default as BuildTrigger } from './BuildTrigger';
|
|
32
|
-
export { default as
|
|
32
|
+
export { default as SearchIndex } from './SearchIndex';
|
|
33
33
|
export { default as ItemTypeFilter } from './ItemTypeFilter';
|
|
34
34
|
export { default as UploadFilter } from './UploadFilter';
|
|
35
35
|
export { default as SiteInvitation } from './SiteInvitation';
|
|
@@ -194,7 +194,7 @@ export declare class SchemaRepository {
|
|
|
194
194
|
* @param itemType - The item type to get fields for
|
|
195
195
|
* @returns Promise that resolves to an array of fields
|
|
196
196
|
*/
|
|
197
|
-
getRawItemTypeFields(itemType: RawApiTypes.ItemType): Promise<RawApiTypes.Field[]>;
|
|
197
|
+
getRawItemTypeFields(itemType: ApiTypes.ItemType | RawApiTypes.ItemType): Promise<RawApiTypes.Field[]>;
|
|
198
198
|
/**
|
|
199
199
|
* Gets all fieldsets for a given item type.
|
|
200
200
|
* Fieldsets are cached after the first request for performance.
|
|
@@ -208,7 +208,7 @@ export declare class SchemaRepository {
|
|
|
208
208
|
* @param itemType - The item type to get fieldsets for
|
|
209
209
|
* @returns Promise that resolves to an array of fieldsets
|
|
210
210
|
*/
|
|
211
|
-
getRawItemTypeFieldsets(itemType: RawApiTypes.ItemType): Promise<RawApiTypes.Fieldset[]>;
|
|
211
|
+
getRawItemTypeFieldsets(itemType: ApiTypes.ItemType | RawApiTypes.ItemType): Promise<RawApiTypes.Fieldset[]>;
|
|
212
212
|
/**
|
|
213
213
|
* Loads and caches all plugins from the DatoCMS API.
|
|
214
214
|
* This method is called lazily and caches the result for subsequent calls.
|
|
@@ -285,5 +285,45 @@ export declare class SchemaRepository {
|
|
|
285
285
|
* @returns Promise that resolves to array of models that embed these blocks
|
|
286
286
|
*/
|
|
287
287
|
getModelsEmbeddingBlocks(blocks: Array<ApiTypes.ItemType | RawApiTypes.ItemType>): Promise<Array<ApiTypes.ItemType>>;
|
|
288
|
+
/**
|
|
289
|
+
* Gets all block models that are directly or indirectly nested within the given item types.
|
|
290
|
+
* This method recursively traverses the schema to find all blocks that are nested
|
|
291
|
+
* within the provided item types, either directly through block fields or indirectly through
|
|
292
|
+
* other nested block models.
|
|
293
|
+
*
|
|
294
|
+
* @param itemTypes - Array of item types to find nested blocks for
|
|
295
|
+
* @returns Promise that resolves to array of all block models nested in these item types
|
|
296
|
+
*/
|
|
297
|
+
getRawNestedBlocks(itemTypes: Array<ApiTypes.ItemType | RawApiTypes.ItemType>): Promise<Array<RawApiTypes.ItemType>>;
|
|
298
|
+
/**
|
|
299
|
+
* Gets all block models that are directly or indirectly nested within the given item types.
|
|
300
|
+
* This method recursively traverses the schema to find all blocks that are nested
|
|
301
|
+
* within the provided item types, either directly through block fields or indirectly through
|
|
302
|
+
* other nested block models.
|
|
303
|
+
*
|
|
304
|
+
* @param itemTypes - Array of item types to find nested blocks for
|
|
305
|
+
* @returns Promise that resolves to array of all block models nested in these item types
|
|
306
|
+
*/
|
|
307
|
+
getNestedBlocks(itemTypes: Array<ApiTypes.ItemType | RawApiTypes.ItemType>): Promise<Array<ApiTypes.ItemType>>;
|
|
308
|
+
/**
|
|
309
|
+
* Gets all models that are directly or indirectly nested/referenced within the given item types.
|
|
310
|
+
* This method recursively traverses the schema to find all models that are referenced
|
|
311
|
+
* by the provided item types through link fields, either directly or indirectly through
|
|
312
|
+
* other referenced blocks.
|
|
313
|
+
*
|
|
314
|
+
* @param itemTypes - Array of item types to find nested models for
|
|
315
|
+
* @returns Promise that resolves to array of all models nested in these item types
|
|
316
|
+
*/
|
|
317
|
+
getRawNestedModels(itemTypes: Array<ApiTypes.ItemType | RawApiTypes.ItemType>): Promise<Array<RawApiTypes.ItemType>>;
|
|
318
|
+
/**
|
|
319
|
+
* Gets all models that are directly or indirectly nested/referenced within the given item types.
|
|
320
|
+
* This method recursively traverses the schema to find all models that are referenced
|
|
321
|
+
* by the provided item types through link fields, either directly or indirectly through
|
|
322
|
+
* other referenced blocks.
|
|
323
|
+
*
|
|
324
|
+
* @param itemTypes - Array of item types to find nested models for
|
|
325
|
+
* @returns Promise that resolves to array of all models nested in these item types
|
|
326
|
+
*/
|
|
327
|
+
getNestedModels(itemTypes: Array<ApiTypes.ItemType | RawApiTypes.ItemType>): Promise<Array<ApiTypes.ItemType>>;
|
|
288
328
|
}
|
|
289
329
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datocms/cma-client",
|
|
3
|
-
"version": "5.2.0-alpha.
|
|
3
|
+
"version": "5.2.0-alpha.5",
|
|
4
4
|
"description": "JS client for DatoCMS REST Content Management API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"datocms",
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"uuid": "^9.0.1"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@datocms/dashboard-client": "^5.2.0-alpha.
|
|
45
|
+
"@datocms/dashboard-client": "^5.2.0-alpha.5",
|
|
46
46
|
"@types/uuid": "^9.0.7"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "9f4282b559889e0e27011246d4ebe42d9c0f8cb8"
|
|
49
49
|
}
|