@contentchef/contentchef-types 10.1.0-alpha.5 → 10.1.0-alpha.7
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 +36 -2
- package/dist/api/PublishedContent.js +9 -0
- package/dist/api/UnpublishRequest.d.ts +97 -0
- package/dist/api/UnpublishRequest.js +7 -0
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.js +1 -0
- package/lib/api/PublishedContent.ts +38 -2
- package/lib/api/UnpublishRequest.ts +104 -0
- package/lib/api/index.ts +1 -0
- package/package.json +2 -2
|
@@ -222,7 +222,29 @@ export type UpdateReleaseRequest = {
|
|
|
222
222
|
*/
|
|
223
223
|
export type UpdateReleaseResponse = Release;
|
|
224
224
|
/**
|
|
225
|
-
* This
|
|
225
|
+
* This enum represent the comparison operators available to a release item date filter
|
|
226
|
+
*/
|
|
227
|
+
export declare enum DateFilterOperator {
|
|
228
|
+
lte = "lte",
|
|
229
|
+
gte = "gte"
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* This type represent a filter applied to one of the release item date fields
|
|
233
|
+
*/
|
|
234
|
+
export type ReleaseItemDateFilter = {
|
|
235
|
+
/**
|
|
236
|
+
* The date to compare the release item date field with, as an ISO 8601 string
|
|
237
|
+
*/
|
|
238
|
+
value: string;
|
|
239
|
+
/**
|
|
240
|
+
* The comparison to apply to the release item date field.
|
|
241
|
+
* Defaults to [[DateFilterOperator.lte]], i.e. "at or before"
|
|
242
|
+
*/
|
|
243
|
+
operator?: DateFilterOperator;
|
|
244
|
+
};
|
|
245
|
+
/**
|
|
246
|
+
* This type represent the filters that can be applied to release items in the release V2 API requests.
|
|
247
|
+
* When more than one filter is given they are combined with AND
|
|
226
248
|
*/
|
|
227
249
|
export type ReleaseItemFilters = {
|
|
228
250
|
/**
|
|
@@ -241,6 +263,16 @@ export type ReleaseItemFilters = {
|
|
|
241
263
|
* Match only the release items that are (or are not) currently selected to be published
|
|
242
264
|
*/
|
|
243
265
|
toPublish?: boolean;
|
|
266
|
+
/**
|
|
267
|
+
* Match only the release items whose related content online date satisfies the filter.
|
|
268
|
+
* Release items with no online date never match, whatever the operator
|
|
269
|
+
*/
|
|
270
|
+
onlineDate?: ReleaseItemDateFilter;
|
|
271
|
+
/**
|
|
272
|
+
* Match only the release items whose related content offline date satisfies the filter.
|
|
273
|
+
* Release items with no offline date never match, whatever the operator
|
|
274
|
+
*/
|
|
275
|
+
offlineDate?: ReleaseItemDateFilter;
|
|
244
276
|
};
|
|
245
277
|
/**
|
|
246
278
|
* This type represent the data needed to make a create release V2 API request
|
|
@@ -272,7 +304,9 @@ export type UpdateReleaseV2Request = {
|
|
|
272
304
|
includeAll?: boolean;
|
|
273
305
|
/**
|
|
274
306
|
* 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
|
|
307
|
+
* A toPublish filter is evaluated against the selection before the update.
|
|
308
|
+
* The filters are the same ones accepted by [[ListReleaseItemsV2Request]], so a selection can be
|
|
309
|
+
* previewed with `listReleaseItemsV2` and then applied by passing the very same filters here
|
|
276
310
|
*/
|
|
277
311
|
filters?: ReleaseItemFilters;
|
|
278
312
|
/**
|
|
@@ -1,2 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DateFilterOperator = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* This enum represent the comparison operators available to a release item date filter
|
|
6
|
+
*/
|
|
7
|
+
var DateFilterOperator;
|
|
8
|
+
(function (DateFilterOperator) {
|
|
9
|
+
DateFilterOperator["lte"] = "lte";
|
|
10
|
+
DateFilterOperator["gte"] = "gte";
|
|
11
|
+
})(DateFilterOperator || (exports.DateFilterOperator = DateFilterOperator = {}));
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { ContentId } from './Content';
|
|
2
|
+
import { AuthorResponse } from './Author';
|
|
3
|
+
/**
|
|
4
|
+
* The unpublish request unique id
|
|
5
|
+
*/
|
|
6
|
+
export type UnpublishRequestId = number;
|
|
7
|
+
/**
|
|
8
|
+
* This type represent the data needed to make an unpublish content API request
|
|
9
|
+
*/
|
|
10
|
+
export type UnpublishContentRequest = {
|
|
11
|
+
/**
|
|
12
|
+
* The content id to unpublish. Every staged locale of the content is unpublished
|
|
13
|
+
*/
|
|
14
|
+
contentId: number;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* This type represent the response of an unpublish content API request
|
|
18
|
+
*/
|
|
19
|
+
export type UnpublishContentResponse = {
|
|
20
|
+
/**
|
|
21
|
+
* The staged content version that has been removed.
|
|
22
|
+
* Undefined when nothing was staged, meaning the request was a no-op
|
|
23
|
+
*/
|
|
24
|
+
contentVersion?: number;
|
|
25
|
+
/**
|
|
26
|
+
* The content locales whose staged content has actually been removed or reverted to its live version
|
|
27
|
+
*/
|
|
28
|
+
locales: string[];
|
|
29
|
+
/**
|
|
30
|
+
* The number of release items dropped from the non archived releases containing the content
|
|
31
|
+
*/
|
|
32
|
+
removedReleaseItems: number;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* This type represent the data needed to make a list unpublish requests API request
|
|
36
|
+
*/
|
|
37
|
+
export type ListUnpublishRequestsRequest = {
|
|
38
|
+
/**
|
|
39
|
+
* The content id to list the unpublish requests of
|
|
40
|
+
*/
|
|
41
|
+
contentId: number;
|
|
42
|
+
/**
|
|
43
|
+
* The content version to list the unpublish requests of.
|
|
44
|
+
* When omitted the whole unpublish history of the content is returned
|
|
45
|
+
*/
|
|
46
|
+
contentVersion?: number;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* This type represent the model of an unpublish request, the audit record of a content
|
|
50
|
+
* having been unpublished. It is written after the unpublish has been applied, so it always
|
|
51
|
+
* describes a completed unpublish
|
|
52
|
+
*/
|
|
53
|
+
export type UnpublishRequestResponse = {
|
|
54
|
+
/**
|
|
55
|
+
* The unpublish request unique id
|
|
56
|
+
*/
|
|
57
|
+
id: UnpublishRequestId;
|
|
58
|
+
/**
|
|
59
|
+
* The author that unpublished the content
|
|
60
|
+
*/
|
|
61
|
+
author: AuthorResponse;
|
|
62
|
+
/**
|
|
63
|
+
* The unique id of the unpublished content
|
|
64
|
+
*/
|
|
65
|
+
contentId: ContentId;
|
|
66
|
+
/**
|
|
67
|
+
* The unpublished content version
|
|
68
|
+
*/
|
|
69
|
+
contentVersion: number;
|
|
70
|
+
/**
|
|
71
|
+
* The content locales that have been unpublished
|
|
72
|
+
*/
|
|
73
|
+
locales: string[];
|
|
74
|
+
/**
|
|
75
|
+
* The date the content has been unpublished, as opposed to [[createdDate]]
|
|
76
|
+
* which is the date this audit record has been written
|
|
77
|
+
*/
|
|
78
|
+
unpublishedDate: Date;
|
|
79
|
+
/**
|
|
80
|
+
* The unpublish request creation date
|
|
81
|
+
*/
|
|
82
|
+
createdDate: Date;
|
|
83
|
+
/**
|
|
84
|
+
* The unpublish request last modified date
|
|
85
|
+
*/
|
|
86
|
+
lastModifiedDate: Date;
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* This type represent the response of a list unpublish requests API request, sorted by
|
|
90
|
+
* [[UnpublishRequestResponse.unpublishedDate]] descending.
|
|
91
|
+
* Only the [[MAX_LISTED_UNPUBLISH_REQUESTS]] most recent unpublish requests are returned
|
|
92
|
+
*/
|
|
93
|
+
export type ListUnpublishRequestsResponse = UnpublishRequestResponse[];
|
|
94
|
+
/**
|
|
95
|
+
* The maximum number of unpublish requests returned by a list unpublish requests API request
|
|
96
|
+
*/
|
|
97
|
+
export declare const MAX_LISTED_UNPUBLISH_REQUESTS = 5;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MAX_LISTED_UNPUBLISH_REQUESTS = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* The maximum number of unpublish requests returned by a list unpublish requests API request
|
|
6
|
+
*/
|
|
7
|
+
exports.MAX_LISTED_UNPUBLISH_REQUESTS = 5;
|
package/dist/api/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export * from './PublishedContent';
|
|
|
13
13
|
export * from './PublishingRequest';
|
|
14
14
|
export * from './Space';
|
|
15
15
|
export * from './Subscription';
|
|
16
|
+
export * from './UnpublishRequest';
|
|
16
17
|
export * from './User';
|
|
17
18
|
export * from './UserConsents';
|
|
18
19
|
export * from './UserPermission';
|
package/dist/api/index.js
CHANGED
|
@@ -29,6 +29,7 @@ __exportStar(require("./PublishedContent"), exports);
|
|
|
29
29
|
__exportStar(require("./PublishingRequest"), exports);
|
|
30
30
|
__exportStar(require("./Space"), exports);
|
|
31
31
|
__exportStar(require("./Subscription"), exports);
|
|
32
|
+
__exportStar(require("./UnpublishRequest"), exports);
|
|
32
33
|
__exportStar(require("./User"), exports);
|
|
33
34
|
__exportStar(require("./UserConsents"), exports);
|
|
34
35
|
__exportStar(require("./UserPermission"), exports);
|
|
@@ -236,7 +236,31 @@ export type UpdateReleaseRequest = {
|
|
|
236
236
|
export type UpdateReleaseResponse = Release;
|
|
237
237
|
|
|
238
238
|
/**
|
|
239
|
-
* This
|
|
239
|
+
* This enum represent the comparison operators available to a release item date filter
|
|
240
|
+
*/
|
|
241
|
+
export enum DateFilterOperator {
|
|
242
|
+
lte = "lte",
|
|
243
|
+
gte = "gte",
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* This type represent a filter applied to one of the release item date fields
|
|
248
|
+
*/
|
|
249
|
+
export type ReleaseItemDateFilter = {
|
|
250
|
+
/**
|
|
251
|
+
* The date to compare the release item date field with, as an ISO 8601 string
|
|
252
|
+
*/
|
|
253
|
+
value: string;
|
|
254
|
+
/**
|
|
255
|
+
* The comparison to apply to the release item date field.
|
|
256
|
+
* Defaults to [[DateFilterOperator.lte]], i.e. "at or before"
|
|
257
|
+
*/
|
|
258
|
+
operator?: DateFilterOperator;
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* This type represent the filters that can be applied to release items in the release V2 API requests.
|
|
263
|
+
* When more than one filter is given they are combined with AND
|
|
240
264
|
*/
|
|
241
265
|
export type ReleaseItemFilters = {
|
|
242
266
|
/**
|
|
@@ -255,6 +279,16 @@ export type ReleaseItemFilters = {
|
|
|
255
279
|
* Match only the release items that are (or are not) currently selected to be published
|
|
256
280
|
*/
|
|
257
281
|
toPublish?: boolean;
|
|
282
|
+
/**
|
|
283
|
+
* Match only the release items whose related content online date satisfies the filter.
|
|
284
|
+
* Release items with no online date never match, whatever the operator
|
|
285
|
+
*/
|
|
286
|
+
onlineDate?: ReleaseItemDateFilter;
|
|
287
|
+
/**
|
|
288
|
+
* Match only the release items whose related content offline date satisfies the filter.
|
|
289
|
+
* Release items with no offline date never match, whatever the operator
|
|
290
|
+
*/
|
|
291
|
+
offlineDate?: ReleaseItemDateFilter;
|
|
258
292
|
};
|
|
259
293
|
|
|
260
294
|
/**
|
|
@@ -289,7 +323,9 @@ export type UpdateReleaseV2Request = {
|
|
|
289
323
|
includeAll?: boolean;
|
|
290
324
|
/**
|
|
291
325
|
* 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
|
|
326
|
+
* A toPublish filter is evaluated against the selection before the update.
|
|
327
|
+
* The filters are the same ones accepted by [[ListReleaseItemsV2Request]], so a selection can be
|
|
328
|
+
* previewed with `listReleaseItemsV2` and then applied by passing the very same filters here
|
|
293
329
|
*/
|
|
294
330
|
filters?: ReleaseItemFilters;
|
|
295
331
|
/**
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { ContentId } from './Content';
|
|
2
|
+
import { AuthorResponse } from './Author';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The unpublish request unique id
|
|
6
|
+
*/
|
|
7
|
+
export type UnpublishRequestId = number;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* This type represent the data needed to make an unpublish content API request
|
|
11
|
+
*/
|
|
12
|
+
export type UnpublishContentRequest = {
|
|
13
|
+
/**
|
|
14
|
+
* The content id to unpublish. Every staged locale of the content is unpublished
|
|
15
|
+
*/
|
|
16
|
+
contentId: number;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* This type represent the response of an unpublish content API request
|
|
21
|
+
*/
|
|
22
|
+
export type UnpublishContentResponse = {
|
|
23
|
+
/**
|
|
24
|
+
* The staged content version that has been removed.
|
|
25
|
+
* Undefined when nothing was staged, meaning the request was a no-op
|
|
26
|
+
*/
|
|
27
|
+
contentVersion?: number;
|
|
28
|
+
/**
|
|
29
|
+
* The content locales whose staged content has actually been removed or reverted to its live version
|
|
30
|
+
*/
|
|
31
|
+
locales: string[];
|
|
32
|
+
/**
|
|
33
|
+
* The number of release items dropped from the non archived releases containing the content
|
|
34
|
+
*/
|
|
35
|
+
removedReleaseItems: number;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* This type represent the data needed to make a list unpublish requests API request
|
|
40
|
+
*/
|
|
41
|
+
export type ListUnpublishRequestsRequest = {
|
|
42
|
+
/**
|
|
43
|
+
* The content id to list the unpublish requests of
|
|
44
|
+
*/
|
|
45
|
+
contentId: number;
|
|
46
|
+
/**
|
|
47
|
+
* The content version to list the unpublish requests of.
|
|
48
|
+
* When omitted the whole unpublish history of the content is returned
|
|
49
|
+
*/
|
|
50
|
+
contentVersion?: number;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* This type represent the model of an unpublish request, the audit record of a content
|
|
55
|
+
* having been unpublished. It is written after the unpublish has been applied, so it always
|
|
56
|
+
* describes a completed unpublish
|
|
57
|
+
*/
|
|
58
|
+
export type UnpublishRequestResponse = {
|
|
59
|
+
/**
|
|
60
|
+
* The unpublish request unique id
|
|
61
|
+
*/
|
|
62
|
+
id: UnpublishRequestId;
|
|
63
|
+
/**
|
|
64
|
+
* The author that unpublished the content
|
|
65
|
+
*/
|
|
66
|
+
author: AuthorResponse;
|
|
67
|
+
/**
|
|
68
|
+
* The unique id of the unpublished content
|
|
69
|
+
*/
|
|
70
|
+
contentId: ContentId;
|
|
71
|
+
/**
|
|
72
|
+
* The unpublished content version
|
|
73
|
+
*/
|
|
74
|
+
contentVersion: number;
|
|
75
|
+
/**
|
|
76
|
+
* The content locales that have been unpublished
|
|
77
|
+
*/
|
|
78
|
+
locales: string[];
|
|
79
|
+
/**
|
|
80
|
+
* The date the content has been unpublished, as opposed to [[createdDate]]
|
|
81
|
+
* which is the date this audit record has been written
|
|
82
|
+
*/
|
|
83
|
+
unpublishedDate: Date;
|
|
84
|
+
/**
|
|
85
|
+
* The unpublish request creation date
|
|
86
|
+
*/
|
|
87
|
+
createdDate: Date;
|
|
88
|
+
/**
|
|
89
|
+
* The unpublish request last modified date
|
|
90
|
+
*/
|
|
91
|
+
lastModifiedDate: Date;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* This type represent the response of a list unpublish requests API request, sorted by
|
|
96
|
+
* [[UnpublishRequestResponse.unpublishedDate]] descending.
|
|
97
|
+
* Only the [[MAX_LISTED_UNPUBLISH_REQUESTS]] most recent unpublish requests are returned
|
|
98
|
+
*/
|
|
99
|
+
export type ListUnpublishRequestsResponse = UnpublishRequestResponse[];
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* The maximum number of unpublish requests returned by a list unpublish requests API request
|
|
103
|
+
*/
|
|
104
|
+
export const MAX_LISTED_UNPUBLISH_REQUESTS = 5;
|
package/lib/api/index.ts
CHANGED
|
@@ -13,6 +13,7 @@ export * from './PublishedContent';
|
|
|
13
13
|
export * from './PublishingRequest';
|
|
14
14
|
export * from './Space';
|
|
15
15
|
export * from './Subscription';
|
|
16
|
+
export * from './UnpublishRequest';
|
|
16
17
|
export * from './User';
|
|
17
18
|
export * from './UserConsents';
|
|
18
19
|
export * from './UserPermission';
|
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.7",
|
|
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": "32486d3ee511a086801ccf537683912616e17884"
|
|
38
38
|
}
|