@contentchef/contentchef-types 10.0.0-alpha.5 → 10.1.0-alpha.0
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.
|
@@ -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 = {}));
|
|
@@ -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.
|
|
3
|
+
"version": "10.1.0-alpha.0",
|
|
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": "b8990446304be212c6953c04b2a148669d190cf9"
|
|
38
38
|
}
|