@contentchef/contentchef-types 3.0.0-alpha.1 → 10.0.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.
@@ -1,75 +1,77 @@
1
- import { AuthorResponse } from './Author';
2
- import { ContentId, ContentResponse, FieldPath } from './Content';
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
- key: string;
8
- path: FieldPath;
9
- value: string;
10
- checksum: string;
7
+ key: string;
8
+ path: FieldPath;
9
+ value: string;
10
+ checksum: string;
11
11
  };
12
12
 
13
13
  export type ContentTranslation = {
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;
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
- contentId: ContentId;
28
- locale: string;
28
+ contentId: ContentId;
29
+ locale: string;
29
30
  };
30
31
 
31
- export type GetContentTranslationResponse = ContentTranslation & { translatedContent: ContentResponse; };
32
+ export type GetContentTranslationResponse = ContentTranslation & {
33
+ translatedContent: ContentResponse;
34
+ };
32
35
 
33
36
  export type CreateContentTranslationRequest = {
34
- contentId: ContentId;
35
- locale: string;
37
+ contentId: ContentId;
38
+ locale: string;
36
39
  };
37
40
 
38
41
  export type CreateContentTranslationResponse = ContentTranslation;
39
42
 
40
43
  export type UpdateContentTranslationRequest = {
41
- contentId: ContentId;
42
- locale: string;
43
- translations: Pick<FieldTranslation, 'path' | 'value'>[];
44
- checksum: string;
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
- UPTODATE = 0,
51
- TO_VERIFY = 1,
52
- INCOMPLETE = 2,
53
- MISSING = 3
53
+ UPTODATE = 0,
54
+ TO_VERIFY = 1,
55
+ INCOMPLETE = 2,
56
+ MISSING = 3,
54
57
  }
55
58
 
56
59
  export type ListContentTranslationRequest = {
57
- contentId: ContentId;
60
+ contentId: ContentId;
58
61
  };
59
62
 
60
63
  export type ListContentTranslationResponse = ContentTranslation[];
61
64
 
62
-
63
65
  export type DeleteContentTranslationRequest = {
64
- contentId: ContentId;
65
- locale: string;
66
+ contentId: ContentId;
67
+ locale: string;
66
68
  };
67
69
 
68
70
  export type DeleteContentTranslationResponse = boolean;
69
71
 
70
72
  export type CleanContentTranslationRequest = {
71
- contentId: ContentId;
72
- locales: string[];
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
  /**
@@ -205,16 +209,7 @@ export type CreateReleaseRequest = {};
205
209
  /**
206
210
  * This type represent the response of a create release API request
207
211
  */
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
- };
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,33 +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
- * The filters to apply to the list of release items
266
- */
267
- filters?: {
268
- search?: string;
269
- };
270
- };
271
-
272
- /**
273
- * This type represent the response of the list release items API request
274
- */
275
- 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.0.0-alpha.1",
3
+ "version": "10.0.0-alpha.5",
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": "baab29175bf34e3ecfb850bf9af1a6ba90c8a6ad"
37
38
  }