@contentchef/contentchef-types 10.1.0-alpha.0 → 10.1.0-alpha.1
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 +117 -0
- package/lib/api/PublishedContent.ts +124 -0
- package/package.json +2 -2
|
@@ -2,6 +2,7 @@ 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";
|
|
5
6
|
/**
|
|
6
7
|
* The published content unique id
|
|
7
8
|
*/
|
|
@@ -220,6 +221,122 @@ export type UpdateReleaseRequest = {
|
|
|
220
221
|
* This type represent the response of an update release API request
|
|
221
222
|
*/
|
|
222
223
|
export type UpdateReleaseResponse = Release;
|
|
224
|
+
/**
|
|
225
|
+
* This type represent the filters that can be applied to release items in the release V2 API requests
|
|
226
|
+
*/
|
|
227
|
+
export type ReleaseItemFilters = {
|
|
228
|
+
/**
|
|
229
|
+
* Case insensitive search applied to the release item content name and public id
|
|
230
|
+
*/
|
|
231
|
+
search?: string;
|
|
232
|
+
/**
|
|
233
|
+
* The release item related content locale
|
|
234
|
+
*/
|
|
235
|
+
locale?: string;
|
|
236
|
+
/**
|
|
237
|
+
* The release item related content definition mnemonic ids
|
|
238
|
+
*/
|
|
239
|
+
contentDefinitionMnemonicIds?: string[];
|
|
240
|
+
/**
|
|
241
|
+
* Match only the release items that are (or are not) currently selected to be published
|
|
242
|
+
*/
|
|
243
|
+
toPublish?: boolean;
|
|
244
|
+
};
|
|
245
|
+
/**
|
|
246
|
+
* This type represent the data needed to make a create release V2 API request
|
|
247
|
+
*/
|
|
248
|
+
export type CreateReleaseV2Request = {};
|
|
249
|
+
/**
|
|
250
|
+
* This type represent the response of a create release V2 API request.
|
|
251
|
+
* Unlike [[CreateReleaseResponse]] it does not return the release items, only their count
|
|
252
|
+
*/
|
|
253
|
+
export type CreateReleaseV2Response = Omit<Release, "releaseItems"> & {
|
|
254
|
+
/**
|
|
255
|
+
* The number of items in the drafted release
|
|
256
|
+
*/
|
|
257
|
+
itemsCount: number;
|
|
258
|
+
};
|
|
259
|
+
/**
|
|
260
|
+
* This type represent the data needed to make an update release V2 API request.
|
|
261
|
+
* The selection of items to publish is replaced atomically: exactly one of
|
|
262
|
+
* [[includeAll]], [[filters]] or [[releaseItemIds]] must be provided
|
|
263
|
+
*/
|
|
264
|
+
export type UpdateReleaseV2Request = {
|
|
265
|
+
/**
|
|
266
|
+
* The release unique id to update
|
|
267
|
+
*/
|
|
268
|
+
releaseId: ReleaseId;
|
|
269
|
+
/**
|
|
270
|
+
* When true, select all the release items to be published
|
|
271
|
+
*/
|
|
272
|
+
includeAll?: boolean;
|
|
273
|
+
/**
|
|
274
|
+
* Select the release items matching the given filters. Empty filters select all the release items.
|
|
275
|
+
* A toPublish filter is evaluated against the selection before the update
|
|
276
|
+
*/
|
|
277
|
+
filters?: ReleaseItemFilters;
|
|
278
|
+
/**
|
|
279
|
+
* Select the release items with the given ids. An empty list deselects all the release items
|
|
280
|
+
*/
|
|
281
|
+
releaseItemIds?: ReleaseItemId[];
|
|
282
|
+
};
|
|
283
|
+
/**
|
|
284
|
+
* This type represent the response of an update release V2 API request
|
|
285
|
+
*/
|
|
286
|
+
export type UpdateReleaseV2Response = {
|
|
287
|
+
/**
|
|
288
|
+
* The updated release unique id
|
|
289
|
+
*/
|
|
290
|
+
releaseId: ReleaseId;
|
|
291
|
+
/**
|
|
292
|
+
* The number of release items selected to be published
|
|
293
|
+
*/
|
|
294
|
+
selectedCount: number;
|
|
295
|
+
/**
|
|
296
|
+
* The total number of items in the release
|
|
297
|
+
*/
|
|
298
|
+
totalCount: number;
|
|
299
|
+
};
|
|
300
|
+
/**
|
|
301
|
+
* This type represent the data needed to make a list release items V2 API request
|
|
302
|
+
*/
|
|
303
|
+
export type ListReleaseItemsV2Request = {
|
|
304
|
+
/**
|
|
305
|
+
* The release unique id
|
|
306
|
+
*/
|
|
307
|
+
releaseId: ReleaseId;
|
|
308
|
+
/**
|
|
309
|
+
* The number of release items to skip
|
|
310
|
+
*/
|
|
311
|
+
skip: number;
|
|
312
|
+
/**
|
|
313
|
+
* The number of release items to return (between 1 and 100)
|
|
314
|
+
*/
|
|
315
|
+
take: number;
|
|
316
|
+
/**
|
|
317
|
+
* The filters to apply to the returned page of release items
|
|
318
|
+
*/
|
|
319
|
+
filters?: ReleaseItemFilters;
|
|
320
|
+
};
|
|
321
|
+
/**
|
|
322
|
+
* This type represent the response of a list release items V2 API request.
|
|
323
|
+
* The facets ([[locales]], [[contentDefinitionMnemonicIds]]) and [[selectedCount]] are computed
|
|
324
|
+
* over the whole release, ignoring the request filters
|
|
325
|
+
*/
|
|
326
|
+
export type ListReleaseItemsV2Response = PagedListResponse<ReleaseItem> & {
|
|
327
|
+
/**
|
|
328
|
+
* The number of release items selected to be published in the whole release
|
|
329
|
+
*/
|
|
330
|
+
selectedCount: number;
|
|
331
|
+
/**
|
|
332
|
+
* The distinct content locales present in the whole release
|
|
333
|
+
*/
|
|
334
|
+
locales: string[];
|
|
335
|
+
/**
|
|
336
|
+
* The distinct content definition mnemonic ids present in the whole release
|
|
337
|
+
*/
|
|
338
|
+
contentDefinitionMnemonicIds: string[];
|
|
339
|
+
};
|
|
223
340
|
/**
|
|
224
341
|
* This type represent the response of a get published content API request
|
|
225
342
|
*/
|
|
@@ -2,6 +2,7 @@ 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";
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* The published content unique id
|
|
@@ -234,6 +235,129 @@ export type UpdateReleaseRequest = {
|
|
|
234
235
|
*/
|
|
235
236
|
export type UpdateReleaseResponse = Release;
|
|
236
237
|
|
|
238
|
+
/**
|
|
239
|
+
* This type represent the filters that can be applied to release items in the release V2 API requests
|
|
240
|
+
*/
|
|
241
|
+
export type ReleaseItemFilters = {
|
|
242
|
+
/**
|
|
243
|
+
* Case insensitive search applied to the release item content name and public id
|
|
244
|
+
*/
|
|
245
|
+
search?: string;
|
|
246
|
+
/**
|
|
247
|
+
* The release item related content locale
|
|
248
|
+
*/
|
|
249
|
+
locale?: string;
|
|
250
|
+
/**
|
|
251
|
+
* The release item related content definition mnemonic ids
|
|
252
|
+
*/
|
|
253
|
+
contentDefinitionMnemonicIds?: string[];
|
|
254
|
+
/**
|
|
255
|
+
* Match only the release items that are (or are not) currently selected to be published
|
|
256
|
+
*/
|
|
257
|
+
toPublish?: boolean;
|
|
258
|
+
};
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* This type represent the data needed to make a create release V2 API request
|
|
262
|
+
*/
|
|
263
|
+
export type CreateReleaseV2Request = {};
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* This type represent the response of a create release V2 API request.
|
|
267
|
+
* Unlike [[CreateReleaseResponse]] it does not return the release items, only their count
|
|
268
|
+
*/
|
|
269
|
+
export type CreateReleaseV2Response = Omit<Release, "releaseItems"> & {
|
|
270
|
+
/**
|
|
271
|
+
* The number of items in the drafted release
|
|
272
|
+
*/
|
|
273
|
+
itemsCount: number;
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* This type represent the data needed to make an update release V2 API request.
|
|
278
|
+
* The selection of items to publish is replaced atomically: exactly one of
|
|
279
|
+
* [[includeAll]], [[filters]] or [[releaseItemIds]] must be provided
|
|
280
|
+
*/
|
|
281
|
+
export type UpdateReleaseV2Request = {
|
|
282
|
+
/**
|
|
283
|
+
* The release unique id to update
|
|
284
|
+
*/
|
|
285
|
+
releaseId: ReleaseId;
|
|
286
|
+
/**
|
|
287
|
+
* When true, select all the release items to be published
|
|
288
|
+
*/
|
|
289
|
+
includeAll?: boolean;
|
|
290
|
+
/**
|
|
291
|
+
* Select the release items matching the given filters. Empty filters select all the release items.
|
|
292
|
+
* A toPublish filter is evaluated against the selection before the update
|
|
293
|
+
*/
|
|
294
|
+
filters?: ReleaseItemFilters;
|
|
295
|
+
/**
|
|
296
|
+
* Select the release items with the given ids. An empty list deselects all the release items
|
|
297
|
+
*/
|
|
298
|
+
releaseItemIds?: ReleaseItemId[];
|
|
299
|
+
};
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* This type represent the response of an update release V2 API request
|
|
303
|
+
*/
|
|
304
|
+
export type UpdateReleaseV2Response = {
|
|
305
|
+
/**
|
|
306
|
+
* The updated release unique id
|
|
307
|
+
*/
|
|
308
|
+
releaseId: ReleaseId;
|
|
309
|
+
/**
|
|
310
|
+
* The number of release items selected to be published
|
|
311
|
+
*/
|
|
312
|
+
selectedCount: number;
|
|
313
|
+
/**
|
|
314
|
+
* The total number of items in the release
|
|
315
|
+
*/
|
|
316
|
+
totalCount: number;
|
|
317
|
+
};
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* This type represent the data needed to make a list release items V2 API request
|
|
321
|
+
*/
|
|
322
|
+
export type ListReleaseItemsV2Request = {
|
|
323
|
+
/**
|
|
324
|
+
* The release unique id
|
|
325
|
+
*/
|
|
326
|
+
releaseId: ReleaseId;
|
|
327
|
+
/**
|
|
328
|
+
* The number of release items to skip
|
|
329
|
+
*/
|
|
330
|
+
skip: number;
|
|
331
|
+
/**
|
|
332
|
+
* The number of release items to return (between 1 and 100)
|
|
333
|
+
*/
|
|
334
|
+
take: number;
|
|
335
|
+
/**
|
|
336
|
+
* The filters to apply to the returned page of release items
|
|
337
|
+
*/
|
|
338
|
+
filters?: ReleaseItemFilters;
|
|
339
|
+
};
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* This type represent the response of a list release items V2 API request.
|
|
343
|
+
* The facets ([[locales]], [[contentDefinitionMnemonicIds]]) and [[selectedCount]] are computed
|
|
344
|
+
* over the whole release, ignoring the request filters
|
|
345
|
+
*/
|
|
346
|
+
export type ListReleaseItemsV2Response = PagedListResponse<ReleaseItem> & {
|
|
347
|
+
/**
|
|
348
|
+
* The number of release items selected to be published in the whole release
|
|
349
|
+
*/
|
|
350
|
+
selectedCount: number;
|
|
351
|
+
/**
|
|
352
|
+
* The distinct content locales present in the whole release
|
|
353
|
+
*/
|
|
354
|
+
locales: string[];
|
|
355
|
+
/**
|
|
356
|
+
* The distinct content definition mnemonic ids present in the whole release
|
|
357
|
+
*/
|
|
358
|
+
contentDefinitionMnemonicIds: string[];
|
|
359
|
+
};
|
|
360
|
+
|
|
237
361
|
/**
|
|
238
362
|
* This type represent the response of a get published content API request
|
|
239
363
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentchef/contentchef-types",
|
|
3
|
-
"version": "10.1.0-alpha.
|
|
3
|
+
"version": "10.1.0-alpha.1",
|
|
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",
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"typescript": "^5.9.3"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "05e45ae2e7f58035520a882982dceabef27a063d"
|
|
38
38
|
}
|