@contentchef/contentchef-types 2.6.1-alpha.0 → 2.7.0-alpha.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/api/PublishedContent.d.ts +6 -28
- package/dist/api/Space.d.ts +17 -0
- package/lib/api/PublishedContent.ts +160 -184
- package/lib/api/Space.ts +19 -0
- package/package.json +1 -1
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { ContentId } from
|
|
2
|
-
import { AuthorResponse } from
|
|
3
|
-
import { ContentRepositoryId } from
|
|
4
|
-
import { ContentTranslationStatus } from
|
|
5
|
-
import { PagedListResponse } from "./common";
|
|
1
|
+
import { ContentId } from './Content';
|
|
2
|
+
import { AuthorResponse } from './Author';
|
|
3
|
+
import { ContentRepositoryId } from './ContentRepository';
|
|
4
|
+
import { ContentTranslationStatus } from './ContentTranslation';
|
|
6
5
|
/**
|
|
7
6
|
* The published content unique id
|
|
8
7
|
*/
|
|
@@ -167,8 +166,8 @@ export type PublishedContentResponse = {
|
|
|
167
166
|
*/
|
|
168
167
|
createdDate: Date;
|
|
169
168
|
/**
|
|
170
|
-
|
|
171
|
-
|
|
169
|
+
* The update date of the related content
|
|
170
|
+
*/
|
|
172
171
|
lastModifiedDate: Date;
|
|
173
172
|
/**
|
|
174
173
|
* The creator of the content
|
|
@@ -221,24 +220,3 @@ export type UpdateReleaseResponse = Release;
|
|
|
221
220
|
* This type represent the response of a get published content API request
|
|
222
221
|
*/
|
|
223
222
|
export type GetPublishedContentResponse = PublishedContentResponse | undefined;
|
|
224
|
-
/**
|
|
225
|
-
* This type represent the data needed to make a list release items API request
|
|
226
|
-
*/
|
|
227
|
-
export type ListReleaseItemsRequest = {
|
|
228
|
-
/**
|
|
229
|
-
* The release id to retrieve items from
|
|
230
|
-
*/
|
|
231
|
-
releaseId: number;
|
|
232
|
-
/**
|
|
233
|
-
* The contents to skip (used to paginate the result)
|
|
234
|
-
*/
|
|
235
|
-
skip: number;
|
|
236
|
-
/**
|
|
237
|
-
* The contents to take (used to paginate the result)
|
|
238
|
-
*/
|
|
239
|
-
take: number;
|
|
240
|
-
};
|
|
241
|
-
/**
|
|
242
|
-
* This type represent the response of the list release items API request
|
|
243
|
-
*/
|
|
244
|
-
export type ListReleaseItemsResponse = PagedListResponse<ReleaseItem>;
|
package/dist/api/Space.d.ts
CHANGED
|
@@ -166,6 +166,10 @@ export type SpaceLocale = {
|
|
|
166
166
|
* Fallback locale (defaults to 'en')
|
|
167
167
|
*/
|
|
168
168
|
fallbackLocale: string;
|
|
169
|
+
/**
|
|
170
|
+
* List of locales that are enabled for publishing
|
|
171
|
+
*/
|
|
172
|
+
publishingLocales?: string[];
|
|
169
173
|
};
|
|
170
174
|
/**
|
|
171
175
|
* Return type of `getSpaceLocale`
|
|
@@ -223,3 +227,16 @@ export type UpdateSpaceFallbackLocaleRequest = {
|
|
|
223
227
|
* Return type of `updateSpacefallbackLocale`
|
|
224
228
|
*/
|
|
225
229
|
export type UpdateSpaceFallbackLocaleResponse = SpaceLocale;
|
|
230
|
+
/**
|
|
231
|
+
* Request type to update space's publishing locales
|
|
232
|
+
*/
|
|
233
|
+
export type UpdateSpacePublishingLocalesRequest = {
|
|
234
|
+
/**
|
|
235
|
+
* Locales to enable for publishing (must be a subset of space's supported locales)
|
|
236
|
+
*/
|
|
237
|
+
publishingLocales: string[];
|
|
238
|
+
};
|
|
239
|
+
/**
|
|
240
|
+
* Return type of `updateSpacePublishingLocales`
|
|
241
|
+
*/
|
|
242
|
+
export type UpdateSpacePublishingLocalesResponse = SpaceLocale;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { ContentId } from
|
|
2
|
-
import { AuthorResponse } from
|
|
3
|
-
import { ContentRepositoryId } from
|
|
4
|
-
import { ContentTranslationStatus } from
|
|
5
|
-
import { PagedListResponse } from "./common";
|
|
1
|
+
import { ContentId } from './Content';
|
|
2
|
+
import { AuthorResponse } from './Author';
|
|
3
|
+
import { ContentRepositoryId } from './ContentRepository';
|
|
4
|
+
import { ContentTranslationStatus } from './ContentTranslation';
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
7
|
* The published content unique id
|
|
@@ -21,175 +20,175 @@ export type ReleaseItemId = number;
|
|
|
21
20
|
* This type represent the model of a release item
|
|
22
21
|
*/
|
|
23
22
|
export type ReleaseItem = {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
23
|
+
/**
|
|
24
|
+
* The release item unique id
|
|
25
|
+
*/
|
|
26
|
+
id: ReleaseItemId;
|
|
27
|
+
/**
|
|
28
|
+
* The release item related space id
|
|
29
|
+
*/
|
|
30
|
+
spaceId: string;
|
|
31
|
+
/**
|
|
32
|
+
* The release item related content name
|
|
33
|
+
*/
|
|
34
|
+
contentName: string;
|
|
35
|
+
/**
|
|
36
|
+
* The release item related content id
|
|
37
|
+
*/
|
|
38
|
+
contentId: ContentId;
|
|
39
|
+
/**
|
|
40
|
+
* The release item related content tags
|
|
41
|
+
*/
|
|
42
|
+
contentTags: string[];
|
|
43
|
+
/**
|
|
44
|
+
* The release item related content definition mnemonic id
|
|
45
|
+
*/
|
|
46
|
+
contentDefinitionMnemonicId: string;
|
|
47
|
+
/**
|
|
48
|
+
* The release item related content repository unique id
|
|
49
|
+
*/
|
|
50
|
+
contentRepositoryId: ContentRepositoryId;
|
|
51
|
+
/**
|
|
52
|
+
* The release item related content published id
|
|
53
|
+
*/
|
|
54
|
+
publishedContentId: PublishedContentId;
|
|
55
|
+
/**
|
|
56
|
+
* The release item related content public id
|
|
57
|
+
*/
|
|
58
|
+
publicId: string;
|
|
59
|
+
/**
|
|
60
|
+
* The release item related content online date
|
|
61
|
+
*/
|
|
62
|
+
onlineDate?: Date;
|
|
63
|
+
/**
|
|
64
|
+
* The release item related content offline date
|
|
65
|
+
*/
|
|
66
|
+
offlineDate?: Date;
|
|
67
|
+
/**
|
|
68
|
+
* Mark if the release item have to be publish
|
|
69
|
+
*/
|
|
70
|
+
toPublish: boolean;
|
|
72
71
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
72
|
+
/**
|
|
73
|
+
* Content`s locale
|
|
74
|
+
*/
|
|
75
|
+
contentLocale: string;
|
|
76
|
+
/**
|
|
77
|
+
* Status of the ContentTranslation (defined if content is derived from a translation)
|
|
78
|
+
*/
|
|
79
|
+
translationStatus?: ContentTranslationStatus;
|
|
81
80
|
};
|
|
82
81
|
|
|
83
82
|
/**
|
|
84
83
|
* This type represent the model of a release
|
|
85
84
|
*/
|
|
86
85
|
export type Release = {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
86
|
+
/**
|
|
87
|
+
* The Release unique id
|
|
88
|
+
*/
|
|
89
|
+
id: ReleaseId;
|
|
90
|
+
/**
|
|
91
|
+
* The release related space id
|
|
92
|
+
*/
|
|
93
|
+
spaceId: string;
|
|
94
|
+
/**
|
|
95
|
+
* The list of content item in the release
|
|
96
|
+
*/
|
|
97
|
+
releaseItems: ReleaseItem[];
|
|
98
|
+
/**
|
|
99
|
+
* Mark if the release is archived
|
|
100
|
+
*/
|
|
101
|
+
archived: boolean;
|
|
103
102
|
};
|
|
104
103
|
|
|
105
104
|
/**
|
|
106
105
|
* This type represent the data needed to make a get published content API request
|
|
107
106
|
*/
|
|
108
107
|
export type GetPublishedContentRequest = {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
108
|
+
/**
|
|
109
|
+
* This published content public id
|
|
110
|
+
*/
|
|
111
|
+
publicId: string;
|
|
112
|
+
/**
|
|
113
|
+
* The date where to find the published content
|
|
114
|
+
*/
|
|
115
|
+
targetDate?: Date;
|
|
116
|
+
/**
|
|
117
|
+
* This publishing channel of the content
|
|
118
|
+
*/
|
|
119
|
+
publishingChannel: string;
|
|
121
120
|
};
|
|
122
121
|
|
|
123
122
|
/**
|
|
124
123
|
* This type represent the model of a published content
|
|
125
124
|
*/
|
|
126
125
|
export type PublishedContentResponse = {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
126
|
+
/**
|
|
127
|
+
* The published content unique id
|
|
128
|
+
*/
|
|
129
|
+
id: PublishedContentId;
|
|
130
|
+
/**
|
|
131
|
+
* The related content unique id
|
|
132
|
+
*/
|
|
133
|
+
contentId: ContentId
|
|
134
|
+
/**
|
|
135
|
+
* The published content current version
|
|
136
|
+
*/
|
|
137
|
+
contentVersion: number;
|
|
138
|
+
/**
|
|
139
|
+
* The publishing channels where the content is published
|
|
140
|
+
*/
|
|
141
|
+
contentChannels: string[];
|
|
142
|
+
/**
|
|
143
|
+
* The published content tags
|
|
144
|
+
*/
|
|
145
|
+
contentTags: string[];
|
|
146
|
+
/**
|
|
147
|
+
* The published content related content definition mnemonic id
|
|
148
|
+
*/
|
|
149
|
+
contentDefinitionMnemonicId: string;
|
|
150
|
+
/**
|
|
151
|
+
* The published content related content repository id
|
|
152
|
+
*/
|
|
153
|
+
contentRepositoryId: ContentRepositoryId;
|
|
154
|
+
/**
|
|
155
|
+
* The published content public id
|
|
156
|
+
*/
|
|
157
|
+
publicId: string;
|
|
158
|
+
/**
|
|
159
|
+
* The published content payload
|
|
160
|
+
*/
|
|
161
|
+
payload: object;
|
|
162
|
+
/**
|
|
163
|
+
* The published content online date
|
|
164
|
+
*/
|
|
165
|
+
onlineDate?: Date;
|
|
166
|
+
/**
|
|
167
|
+
* The published content offline date
|
|
168
|
+
*/
|
|
169
|
+
offlineDate?: Date;
|
|
170
|
+
/**
|
|
171
|
+
* The creation date of the related content
|
|
172
|
+
*/
|
|
173
|
+
createdDate: Date;
|
|
174
|
+
/**
|
|
175
|
+
* The update date of the related content
|
|
176
|
+
*/
|
|
177
|
+
lastModifiedDate: Date;
|
|
178
|
+
/**
|
|
179
|
+
* The creator of the content
|
|
180
|
+
*/
|
|
181
|
+
author: AuthorResponse;
|
|
183
182
|
};
|
|
184
183
|
|
|
185
184
|
/**
|
|
186
185
|
* This type represent the data needed to make a set stage content to live API request
|
|
187
186
|
*/
|
|
188
187
|
export type SetStageContentsToLiveRequest = {
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
188
|
+
/**
|
|
189
|
+
* The release id to publish to live
|
|
190
|
+
*/
|
|
191
|
+
releaseId: ReleaseId;
|
|
193
192
|
};
|
|
194
193
|
|
|
195
194
|
/**
|
|
@@ -211,18 +210,18 @@ export type CreateReleaseResponse = Release;
|
|
|
211
210
|
* This type represent the data needed to make an update release API request
|
|
212
211
|
*/
|
|
213
212
|
export type UpdateReleaseRequest = {
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
213
|
+
/**
|
|
214
|
+
* The release unique id to update
|
|
215
|
+
*/
|
|
216
|
+
releaseId: ReleaseId;
|
|
217
|
+
/**
|
|
218
|
+
* The release item to publish
|
|
219
|
+
*/
|
|
220
|
+
itemsToPromote: ReleaseItemId[];
|
|
221
|
+
/**
|
|
222
|
+
* Mark if all the puslished content in stage have to be publish to live
|
|
223
|
+
*/
|
|
224
|
+
includeAll?: boolean;
|
|
226
225
|
};
|
|
227
226
|
|
|
228
227
|
/**
|
|
@@ -234,26 +233,3 @@ export type UpdateReleaseResponse = Release;
|
|
|
234
233
|
* This type represent the response of a get published content API request
|
|
235
234
|
*/
|
|
236
235
|
export type GetPublishedContentResponse = PublishedContentResponse | undefined;
|
|
237
|
-
|
|
238
|
-
/**
|
|
239
|
-
* This type represent the data needed to make a list release items API request
|
|
240
|
-
*/
|
|
241
|
-
export type ListReleaseItemsRequest = {
|
|
242
|
-
/**
|
|
243
|
-
* The release id to retrieve items from
|
|
244
|
-
*/
|
|
245
|
-
releaseId: number;
|
|
246
|
-
/**
|
|
247
|
-
* The contents to skip (used to paginate the result)
|
|
248
|
-
*/
|
|
249
|
-
skip: number;
|
|
250
|
-
/**
|
|
251
|
-
* The contents to take (used to paginate the result)
|
|
252
|
-
*/
|
|
253
|
-
take: number;
|
|
254
|
-
};
|
|
255
|
-
|
|
256
|
-
/**
|
|
257
|
-
* This type represent the response of the list release items API request
|
|
258
|
-
*/
|
|
259
|
-
export type ListReleaseItemsResponse = PagedListResponse<ReleaseItem>;
|
package/lib/api/Space.ts
CHANGED
|
@@ -178,6 +178,11 @@ export type SpaceLocale = {
|
|
|
178
178
|
* Fallback locale (defaults to 'en')
|
|
179
179
|
*/
|
|
180
180
|
fallbackLocale: string;
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* List of locales that are enabled for publishing
|
|
184
|
+
*/
|
|
185
|
+
publishingLocales?: string[];
|
|
181
186
|
}
|
|
182
187
|
|
|
183
188
|
/**
|
|
@@ -239,3 +244,17 @@ export type UpdateSpaceDefaultLocaleResponse = SpaceLocale;
|
|
|
239
244
|
* Return type of `updateSpacefallbackLocale`
|
|
240
245
|
*/
|
|
241
246
|
export type UpdateSpaceFallbackLocaleResponse = SpaceLocale;
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* Request type to update space's publishing locales
|
|
250
|
+
*/
|
|
251
|
+
export type UpdateSpacePublishingLocalesRequest = {
|
|
252
|
+
/**
|
|
253
|
+
* Locales to enable for publishing (must be a subset of space's supported locales)
|
|
254
|
+
*/
|
|
255
|
+
publishingLocales: string[];
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Return type of `updateSpacePublishingLocales`
|
|
259
|
+
*/
|
|
260
|
+
export type UpdateSpacePublishingLocalesResponse = SpaceLocale;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentchef/contentchef-types",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0-alpha.0",
|
|
4
4
|
"description": "ContentChef types",
|
|
5
5
|
"author": "PierpaoloIannone <piannone@byte-code.com>",
|
|
6
6
|
"homepage": "https://github.com/ContentChef/contentchef-management-js-client#readme",
|