@contentchef/contentchef-types 10.0.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.
|
@@ -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
|
*/
|
|
@@ -119,3 +119,71 @@ export type ListPublishingRequestsResponse = PublishingRequestResponse[];
|
|
|
119
119
|
* This type represent the response of a create publishing request API request
|
|
120
120
|
*/
|
|
121
121
|
export type CreatePublishingRequestResponse = PublishingRequestResponse;
|
|
122
|
+
/**
|
|
123
|
+
* The maximum number of items that can be sent in a single bulk publishing request
|
|
124
|
+
*/
|
|
125
|
+
export declare const MAX_BULK_PUBLISHING_REQUESTS = 50;
|
|
126
|
+
/**
|
|
127
|
+
* This type represent a single item of a bulk publishing request
|
|
128
|
+
*/
|
|
129
|
+
export type BulkPublishingRequestItem = PublishingRequestRequest;
|
|
130
|
+
/**
|
|
131
|
+
* This type represent the data needed to make a bulk create publishing request API request
|
|
132
|
+
*/
|
|
133
|
+
export type CreateBulkPublishingRequestRequest = {
|
|
134
|
+
/**
|
|
135
|
+
* The list of contents (and their version) to create a publishing request for.
|
|
136
|
+
* Must contain between 1 and [[MAX_BULK_PUBLISHING_REQUESTS]] items.
|
|
137
|
+
* Duplicate content id / version pairs are deduplicated server-side.
|
|
138
|
+
*/
|
|
139
|
+
requests: BulkPublishingRequestItem[];
|
|
140
|
+
};
|
|
141
|
+
/**
|
|
142
|
+
* This enum represent the outcome of a single item within a bulk publishing request
|
|
143
|
+
*/
|
|
144
|
+
export declare enum BulkPublishingRequestStatus {
|
|
145
|
+
ACCEPTED = "accepted",
|
|
146
|
+
FAILED = "failed"
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* This type represent the error attached to a failed bulk publishing request item
|
|
150
|
+
*/
|
|
151
|
+
export type BulkPublishingRequestError = {
|
|
152
|
+
/**
|
|
153
|
+
* The error type discriminator
|
|
154
|
+
*/
|
|
155
|
+
type: string;
|
|
156
|
+
/**
|
|
157
|
+
* The human readable error message
|
|
158
|
+
*/
|
|
159
|
+
message: string;
|
|
160
|
+
};
|
|
161
|
+
/**
|
|
162
|
+
* This type represent the outcome of a single item within a bulk publishing request
|
|
163
|
+
*/
|
|
164
|
+
export type BulkPublishingRequestResult = {
|
|
165
|
+
/**
|
|
166
|
+
* The content id the result refers to
|
|
167
|
+
*/
|
|
168
|
+
contentId: number;
|
|
169
|
+
/**
|
|
170
|
+
* The content version the result refers to
|
|
171
|
+
*/
|
|
172
|
+
contentVersion: number;
|
|
173
|
+
/**
|
|
174
|
+
* Whether the publishing request for this item was accepted or failed
|
|
175
|
+
*/
|
|
176
|
+
status: BulkPublishingRequestStatus;
|
|
177
|
+
/**
|
|
178
|
+
* The created publishing request unique id, present only when [[status]] is `accepted`
|
|
179
|
+
*/
|
|
180
|
+
publishingRequestId?: PublishingRequestId;
|
|
181
|
+
/**
|
|
182
|
+
* The error describing why the item failed, present only when [[status]] is `failed`
|
|
183
|
+
*/
|
|
184
|
+
error?: BulkPublishingRequestError;
|
|
185
|
+
};
|
|
186
|
+
/**
|
|
187
|
+
* This type represent the response of a bulk create publishing request API request
|
|
188
|
+
*/
|
|
189
|
+
export type CreateBulkPublishingRequestResponse = BulkPublishingRequestResult[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PublishingStatus = void 0;
|
|
3
|
+
exports.BulkPublishingRequestStatus = exports.MAX_BULK_PUBLISHING_REQUESTS = exports.PublishingStatus = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* This enum represent the available publishing request status
|
|
6
6
|
*/
|
|
@@ -11,3 +11,15 @@ var PublishingStatus;
|
|
|
11
11
|
PublishingStatus["PUBLISHED"] = "published";
|
|
12
12
|
PublishingStatus["FAILED"] = "failed";
|
|
13
13
|
})(PublishingStatus || (exports.PublishingStatus = PublishingStatus = {}));
|
|
14
|
+
/**
|
|
15
|
+
* The maximum number of items that can be sent in a single bulk publishing request
|
|
16
|
+
*/
|
|
17
|
+
exports.MAX_BULK_PUBLISHING_REQUESTS = 50;
|
|
18
|
+
/**
|
|
19
|
+
* This enum represent the outcome of a single item within a bulk publishing request
|
|
20
|
+
*/
|
|
21
|
+
var BulkPublishingRequestStatus;
|
|
22
|
+
(function (BulkPublishingRequestStatus) {
|
|
23
|
+
BulkPublishingRequestStatus["ACCEPTED"] = "accepted";
|
|
24
|
+
BulkPublishingRequestStatus["FAILED"] = "failed";
|
|
25
|
+
})(BulkPublishingRequestStatus || (exports.BulkPublishingRequestStatus = BulkPublishingRequestStatus = {}));
|
|
@@ -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
|
*/
|
|
@@ -126,3 +126,78 @@ export type ListPublishingRequestsResponse = PublishingRequestResponse[];
|
|
|
126
126
|
* This type represent the response of a create publishing request API request
|
|
127
127
|
*/
|
|
128
128
|
export type CreatePublishingRequestResponse = PublishingRequestResponse;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* The maximum number of items that can be sent in a single bulk publishing request
|
|
132
|
+
*/
|
|
133
|
+
export const MAX_BULK_PUBLISHING_REQUESTS = 50;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* This type represent a single item of a bulk publishing request
|
|
137
|
+
*/
|
|
138
|
+
export type BulkPublishingRequestItem = PublishingRequestRequest;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* This type represent the data needed to make a bulk create publishing request API request
|
|
142
|
+
*/
|
|
143
|
+
export type CreateBulkPublishingRequestRequest = {
|
|
144
|
+
/**
|
|
145
|
+
* The list of contents (and their version) to create a publishing request for.
|
|
146
|
+
* Must contain between 1 and [[MAX_BULK_PUBLISHING_REQUESTS]] items.
|
|
147
|
+
* Duplicate content id / version pairs are deduplicated server-side.
|
|
148
|
+
*/
|
|
149
|
+
requests: BulkPublishingRequestItem[];
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* This enum represent the outcome of a single item within a bulk publishing request
|
|
154
|
+
*/
|
|
155
|
+
export enum BulkPublishingRequestStatus {
|
|
156
|
+
ACCEPTED = 'accepted',
|
|
157
|
+
FAILED = 'failed'
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* This type represent the error attached to a failed bulk publishing request item
|
|
162
|
+
*/
|
|
163
|
+
export type BulkPublishingRequestError = {
|
|
164
|
+
/**
|
|
165
|
+
* The error type discriminator
|
|
166
|
+
*/
|
|
167
|
+
type: string;
|
|
168
|
+
/**
|
|
169
|
+
* The human readable error message
|
|
170
|
+
*/
|
|
171
|
+
message: string;
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* This type represent the outcome of a single item within a bulk publishing request
|
|
176
|
+
*/
|
|
177
|
+
export type BulkPublishingRequestResult = {
|
|
178
|
+
/**
|
|
179
|
+
* The content id the result refers to
|
|
180
|
+
*/
|
|
181
|
+
contentId: number;
|
|
182
|
+
/**
|
|
183
|
+
* The content version the result refers to
|
|
184
|
+
*/
|
|
185
|
+
contentVersion: number;
|
|
186
|
+
/**
|
|
187
|
+
* Whether the publishing request for this item was accepted or failed
|
|
188
|
+
*/
|
|
189
|
+
status: BulkPublishingRequestStatus;
|
|
190
|
+
/**
|
|
191
|
+
* The created publishing request unique id, present only when [[status]] is `accepted`
|
|
192
|
+
*/
|
|
193
|
+
publishingRequestId?: PublishingRequestId;
|
|
194
|
+
/**
|
|
195
|
+
* The error describing why the item failed, present only when [[status]] is `failed`
|
|
196
|
+
*/
|
|
197
|
+
error?: BulkPublishingRequestError;
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* This type represent the response of a bulk create publishing request API request
|
|
202
|
+
*/
|
|
203
|
+
export type CreateBulkPublishingRequestResponse = BulkPublishingRequestResult[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentchef/contentchef-types",
|
|
3
|
-
"version": "10.0.
|
|
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
|
}
|