@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,10 +1,10 @@
1
- import { AuthorResponse } from './Author';
2
- import { PublishingChannelId, PublishingChannelResponse } from './Channel';
3
- import { PagedListResponse } from './common';
4
- import { ContentDefinitionId, ContentDefinitionResponse } from './ContentDefinition';
5
- import { SchemaTypeIds } from './ContentDefinitionSchema';
6
- import { ContentRepositoryId, ContentRepositoryResponse } from './ContentRepository';
7
- import { ContentTranslation, ContentTranslationStatus } from './ContentTranslation';
1
+ import { AuthorResponse } from "./Author";
2
+ import { PublishingChannelId, PublishingChannelResponse } from "./Channel";
3
+ import { PagedListResponse } from "./common";
4
+ import { ContentDefinitionId, ContentDefinitionResponse } from "./ContentDefinition";
5
+ import { SchemaTypeIds } from "./ContentDefinitionSchema";
6
+ import { ContentRepositoryId, ContentRepositoryResponse } from "./ContentRepository";
7
+ import { ContentTranslation, ContentTranslationStatus } from "./ContentTranslation";
8
8
  /**
9
9
  * This type represent the content unique id type
10
10
  */
@@ -202,7 +202,7 @@ export type CreateContentRequest = {
202
202
  locale?: string;
203
203
  /**
204
204
  * Controls if translations should be ignored when publishing
205
- */
205
+ */
206
206
  contentLocalizationSettings?: LocalizationSettings;
207
207
  /**
208
208
  * will bypass content definition mnemonicId validation for every linked-content field
@@ -259,7 +259,7 @@ export type UpdateContentRequest = {
259
259
  offlineDate?: Date;
260
260
  /**
261
261
  * Controls if translations should be ignored when publishing
262
- */
262
+ */
263
263
  contentLocalizationSettings?: LocalizationSettings;
264
264
  /**
265
265
  * will bypass content definition mnemonicId validation for every linked-content field
@@ -433,7 +433,7 @@ export type ListContentsItem = {
433
433
  /**
434
434
  * Translations of the content
435
435
  */
436
- translations: ContentTranslation[];
436
+ translations: Pick<ContentTranslation, "id" | "spaceId" | "locale" | "createdDate" | "lastModifiedDate" | "status" | "version">[];
437
437
  };
438
438
  /**
439
439
  * This type represent the response of the list content API request
@@ -556,7 +556,7 @@ export type ContentResponse = {
556
556
  status?: ContentStatus;
557
557
  /**
558
558
  * Controls if translations should be ignored when publishing
559
- */
559
+ */
560
560
  contentLocalizationSettings?: LocalizationSettings;
561
561
  /**
562
562
  * Content's checksum (it's different whenever at least one localized field changes)
@@ -1,5 +1,5 @@
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
  export type ContentTranslationId = number;
4
4
  export type FieldTranslation = {
5
5
  key: string;
@@ -18,6 +18,7 @@ export type ContentTranslation = {
18
18
  latestContributor: AuthorResponse;
19
19
  content: ContentResponse;
20
20
  status: ContentTranslationStatus;
21
+ version: number;
21
22
  };
22
23
  export type GetContentTranslationRequest = {
23
24
  contentId: ContentId;
@@ -34,7 +35,7 @@ export type CreateContentTranslationResponse = ContentTranslation;
34
35
  export type UpdateContentTranslationRequest = {
35
36
  contentId: ContentId;
36
37
  locale: string;
37
- translations: Pick<FieldTranslation, 'path' | 'value'>[];
38
+ translations: Pick<FieldTranslation, "path" | "value">[];
38
39
  checksum: string;
39
40
  };
40
41
  export type UpdateContentTranslationResponse = ContentTranslation;
@@ -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
  * The published content unique id
8
7
  */
@@ -183,6 +182,10 @@ export type SetStageContentsToLiveRequest = {
183
182
  * The release id to publish to live
184
183
  */
185
184
  releaseId: ReleaseId;
185
+ /**
186
+ * Skip validating linked contents resolution
187
+ */
188
+ skipLinkedContentValidation?: boolean;
186
189
  };
187
190
  /**
188
191
  * This type represent the response of a set stage content to live API request
@@ -195,16 +198,7 @@ export type CreateReleaseRequest = {};
195
198
  /**
196
199
  * This type represent the response of a create release API request
197
200
  */
198
- export type CreateReleaseResponse = {
199
- /**
200
- * The release unique id
201
- */
202
- releaseId: ReleaseId;
203
- /**
204
- * The number of items in the release
205
- */
206
- releaseItemsCount: number;
207
- };
201
+ export type CreateReleaseResponse = Release;
208
202
  /**
209
203
  * This type represent the data needed to make an update release API request
210
204
  */
@@ -230,30 +224,3 @@ export type UpdateReleaseResponse = Release;
230
224
  * This type represent the response of a get published content API request
231
225
  */
232
226
  export type GetPublishedContentResponse = PublishedContentResponse | undefined;
233
- /**
234
- * This type represent the data needed to make a list release items API request
235
- */
236
- export type ListReleaseItemsRequest = {
237
- /**
238
- * The release id to retrieve items from
239
- */
240
- releaseId: number;
241
- /**
242
- * The contents to skip (used to paginate the result)
243
- */
244
- skip: number;
245
- /**
246
- * The contents to take (used to paginate the result)
247
- */
248
- take: number;
249
- /**
250
- * The filters to apply to the list of release items
251
- */
252
- filters?: {
253
- search?: string;
254
- };
255
- };
256
- /**
257
- * This type represent the response of the list release items API request
258
- */
259
- export type ListReleaseItemsResponse = PagedListResponse<ReleaseItem>;
@@ -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;