@contentchef/contentchef-types 3.0.0-alpha.0 → 10.0.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/Content.d.ts +11 -11
- package/dist/api/ContentTranslation.d.ts +4 -3
- package/dist/api/PublishedContent.d.ts +5 -32
- package/dist/api/Space.d.ts +17 -0
- package/lib/api/Content.ts +602 -584
- package/lib/api/ContentTranslation.ts +37 -35
- package/lib/api/PublishedContent.ts +9 -37
- package/lib/api/Space.ts +19 -0
- package/package.json +3 -2
|
@@ -1,75 +1,77 @@
|
|
|
1
|
-
import { AuthorResponse } from
|
|
2
|
-
import { ContentId, ContentResponse, FieldPath } from
|
|
1
|
+
import { AuthorResponse } from "./Author";
|
|
2
|
+
import { ContentId, ContentResponse, FieldPath } from "./Content";
|
|
3
3
|
|
|
4
4
|
export type ContentTranslationId = number;
|
|
5
5
|
|
|
6
6
|
export type FieldTranslation = {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
key: string;
|
|
8
|
+
path: FieldPath;
|
|
9
|
+
value: string;
|
|
10
|
+
checksum: string;
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
export type ContentTranslation = {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
14
|
+
id: ContentTranslationId;
|
|
15
|
+
spaceId: string;
|
|
16
|
+
locale: string;
|
|
17
|
+
translations: FieldTranslation[];
|
|
18
|
+
createdDate: Date;
|
|
19
|
+
lastModifiedDate: Date;
|
|
20
|
+
author: AuthorResponse;
|
|
21
|
+
latestContributor: AuthorResponse;
|
|
22
|
+
content: ContentResponse;
|
|
23
|
+
status: ContentTranslationStatus;
|
|
24
|
+
version: number;
|
|
24
25
|
};
|
|
25
26
|
|
|
26
27
|
export type GetContentTranslationRequest = {
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
contentId: ContentId;
|
|
29
|
+
locale: string;
|
|
29
30
|
};
|
|
30
31
|
|
|
31
|
-
export type GetContentTranslationResponse = ContentTranslation & {
|
|
32
|
+
export type GetContentTranslationResponse = ContentTranslation & {
|
|
33
|
+
translatedContent: ContentResponse;
|
|
34
|
+
};
|
|
32
35
|
|
|
33
36
|
export type CreateContentTranslationRequest = {
|
|
34
|
-
|
|
35
|
-
|
|
37
|
+
contentId: ContentId;
|
|
38
|
+
locale: string;
|
|
36
39
|
};
|
|
37
40
|
|
|
38
41
|
export type CreateContentTranslationResponse = ContentTranslation;
|
|
39
42
|
|
|
40
43
|
export type UpdateContentTranslationRequest = {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
contentId: ContentId;
|
|
45
|
+
locale: string;
|
|
46
|
+
translations: Pick<FieldTranslation, "path" | "value">[];
|
|
47
|
+
checksum: string;
|
|
45
48
|
};
|
|
46
49
|
|
|
47
50
|
export type UpdateContentTranslationResponse = ContentTranslation;
|
|
48
51
|
|
|
49
52
|
export enum ContentTranslationStatus {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
53
|
+
UPTODATE = 0,
|
|
54
|
+
TO_VERIFY = 1,
|
|
55
|
+
INCOMPLETE = 2,
|
|
56
|
+
MISSING = 3,
|
|
54
57
|
}
|
|
55
58
|
|
|
56
59
|
export type ListContentTranslationRequest = {
|
|
57
|
-
|
|
60
|
+
contentId: ContentId;
|
|
58
61
|
};
|
|
59
62
|
|
|
60
63
|
export type ListContentTranslationResponse = ContentTranslation[];
|
|
61
64
|
|
|
62
|
-
|
|
63
65
|
export type DeleteContentTranslationRequest = {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
+
contentId: ContentId;
|
|
67
|
+
locale: string;
|
|
66
68
|
};
|
|
67
69
|
|
|
68
70
|
export type DeleteContentTranslationResponse = boolean;
|
|
69
71
|
|
|
70
72
|
export type CleanContentTranslationRequest = {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
+
contentId: ContentId;
|
|
74
|
+
locales: string[];
|
|
73
75
|
};
|
|
74
76
|
|
|
75
77
|
export type CleanContentTranslationResponse = boolean;
|
|
@@ -2,7 +2,6 @@ import { ContentId } from "./Content";
|
|
|
2
2
|
import { AuthorResponse } from "./Author";
|
|
3
3
|
import { ContentRepositoryId } from "./ContentRepository";
|
|
4
4
|
import { ContentTranslationStatus } from "./ContentTranslation";
|
|
5
|
-
import { PagedListResponse } from "./common";
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
7
|
* The published content unique id
|
|
@@ -190,6 +189,11 @@ export type SetStageContentsToLiveRequest = {
|
|
|
190
189
|
* The release id to publish to live
|
|
191
190
|
*/
|
|
192
191
|
releaseId: ReleaseId;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Skip validating linked contents resolution
|
|
195
|
+
*/
|
|
196
|
+
skipLinkedContentValidation?: boolean;
|
|
193
197
|
};
|
|
194
198
|
|
|
195
199
|
/**
|
|
@@ -202,19 +206,10 @@ export type SetStageContentsToLiveResponse = {};
|
|
|
202
206
|
*/
|
|
203
207
|
export type CreateReleaseRequest = {};
|
|
204
208
|
|
|
205
|
-
/**
|
|
206
|
-
* This type represent the response of a create release API request
|
|
207
|
-
*/
|
|
208
|
-
export type CreateReleaseResponse =
|
|
209
|
-
/**
|
|
210
|
-
* The release unique id
|
|
211
|
-
*/
|
|
212
|
-
releaseId: ReleaseId;
|
|
213
|
-
/**
|
|
214
|
-
* The number of items in the release
|
|
215
|
-
*/
|
|
216
|
-
releaseItemsCount: number;
|
|
217
|
-
};
|
|
209
|
+
/**
|
|
210
|
+
* This type represent the response of a create release API request
|
|
211
|
+
*/
|
|
212
|
+
export type CreateReleaseResponse = Release;
|
|
218
213
|
|
|
219
214
|
/**
|
|
220
215
|
* This type represent the data needed to make an update release API request
|
|
@@ -243,26 +238,3 @@ export type UpdateReleaseResponse = Release;
|
|
|
243
238
|
* This type represent the response of a get published content API request
|
|
244
239
|
*/
|
|
245
240
|
export type GetPublishedContentResponse = PublishedContentResponse | undefined;
|
|
246
|
-
|
|
247
|
-
/**
|
|
248
|
-
* This type represent the data needed to make a list release items API request
|
|
249
|
-
*/
|
|
250
|
-
export type ListReleaseItemsRequest = {
|
|
251
|
-
/**
|
|
252
|
-
* The release id to retrieve items from
|
|
253
|
-
*/
|
|
254
|
-
releaseId: number;
|
|
255
|
-
/**
|
|
256
|
-
* The contents to skip (used to paginate the result)
|
|
257
|
-
*/
|
|
258
|
-
skip: number;
|
|
259
|
-
/**
|
|
260
|
-
* The contents to take (used to paginate the result)
|
|
261
|
-
*/
|
|
262
|
-
take: number;
|
|
263
|
-
};
|
|
264
|
-
|
|
265
|
-
/**
|
|
266
|
-
* This type represent the response of the list release items API request
|
|
267
|
-
*/
|
|
268
|
-
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": "
|
|
3
|
+
"version": "10.0.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",
|
|
@@ -33,5 +33,6 @@
|
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"typescript": "^5.9.3"
|
|
36
|
-
}
|
|
36
|
+
},
|
|
37
|
+
"gitHead": "e3fc5951334f5cb34918aa048addb81afc90937f"
|
|
37
38
|
}
|