@guardian/content-api-models 17.4.0-beta.0 → 17.5.0-beta.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.
- package/crier/event/v1/eventPayload.d.ts +1 -1
- package/package.json +1 -1
- package/v1/audioElementFields.d.ts +1 -0
- package/v1/audioElementFields.js +15 -0
- package/v1/blockElement.d.ts +2 -0
- package/v1/blockElement.js +16 -0
- package/v1/calloutElementFields.d.ts +14 -0
- package/v1/{contentChannel.js → calloutElementFields.js} +19 -20
- package/v1/commentElementFields.d.ts +1 -0
- package/v1/commentElementFields.js +15 -0
- package/v1/content.d.ts +0 -2
- package/v1/content.js +1 -30
- package/v1/contentAtomElementFields.d.ts +1 -0
- package/v1/contentAtomElementFields.js +15 -0
- package/v1/contentStats.d.ts +1 -0
- package/v1/contentStats.js +15 -0
- package/v1/elementType.d.ts +2 -1
- package/v1/elementType.js +1 -0
- package/v1/tweetElementFields.d.ts +1 -0
- package/v1/tweetElementFields.js +15 -0
- package/v1/videoElementFields.d.ts +1 -0
- package/v1/videoElementFields.js +15 -0
- package/v1/channelFields.d.ts +0 -15
- package/v1/channelFields.js +0 -71
- package/v1/contentChannel.d.ts +0 -15
|
@@ -8,7 +8,7 @@ import { Content } from '../../../v1/content';
|
|
|
8
8
|
import { DeletedContent } from './deletedContent';
|
|
9
9
|
import { RetrievableContent } from './retrievableContent';
|
|
10
10
|
import { Atom } from '@guardian/content-atom-model/atom';
|
|
11
|
-
export
|
|
11
|
+
export type EventPayload = {
|
|
12
12
|
kind: "content";
|
|
13
13
|
content: Content;
|
|
14
14
|
} | {
|
package/package.json
CHANGED
package/v1/audioElementFields.js
CHANGED
|
@@ -129,6 +129,15 @@ var AudioElementFieldsSerde = /** @class */ (function () {
|
|
|
129
129
|
protocol.skip(ftype);
|
|
130
130
|
}
|
|
131
131
|
break;
|
|
132
|
+
case 15:
|
|
133
|
+
if (ftype === thrift_1.Thrift.Type.BOOL) {
|
|
134
|
+
var value1 = protocol.readBool();
|
|
135
|
+
result.isMandatory = value1;
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
protocol.skip(ftype);
|
|
139
|
+
}
|
|
140
|
+
break;
|
|
132
141
|
default:
|
|
133
142
|
protocol.skip(ftype);
|
|
134
143
|
}
|
|
@@ -212,6 +221,12 @@ var AudioElementFieldsSerde = /** @class */ (function () {
|
|
|
212
221
|
protocol.writeString(value1);
|
|
213
222
|
protocol.writeFieldEnd();
|
|
214
223
|
}
|
|
224
|
+
if (value0.isMandatory !== null && value0.isMandatory !== undefined) {
|
|
225
|
+
var value1 = value0.isMandatory;
|
|
226
|
+
protocol.writeFieldBegin('isMandatory', thrift_1.Thrift.Type.BOOL, 15);
|
|
227
|
+
protocol.writeBool(value1);
|
|
228
|
+
protocol.writeFieldEnd();
|
|
229
|
+
}
|
|
215
230
|
protocol.writeFieldStop();
|
|
216
231
|
protocol.writeStructEnd();
|
|
217
232
|
};
|
package/v1/blockElement.d.ts
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import { TProtocol } from 'thrift';
|
|
7
7
|
import { Asset } from './asset';
|
|
8
8
|
import { AudioElementFields } from './audioElementFields';
|
|
9
|
+
import { CalloutElementFields } from './calloutElementFields';
|
|
9
10
|
import { CodeElementFields } from './codeElementFields';
|
|
10
11
|
import { CommentElementFields } from './commentElementFields';
|
|
11
12
|
import { ContentAtomElementFields } from './contentAtomElementFields';
|
|
@@ -47,6 +48,7 @@ export interface BlockElement {
|
|
|
47
48
|
contentAtomTypeData?: ContentAtomElementFields;
|
|
48
49
|
tracking?: EmbedTracking;
|
|
49
50
|
codeTypeData?: CodeElementFields;
|
|
51
|
+
calloutTypeData?: CalloutElementFields;
|
|
50
52
|
}
|
|
51
53
|
export declare class BlockElementSerde {
|
|
52
54
|
static read(protocol: TProtocol): BlockElement;
|
package/v1/blockElement.js
CHANGED
|
@@ -9,6 +9,7 @@ exports.BlockElementSerde = void 0;
|
|
|
9
9
|
var thrift_1 = require("thrift");
|
|
10
10
|
var asset_1 = require("./asset");
|
|
11
11
|
var audioElementFields_1 = require("./audioElementFields");
|
|
12
|
+
var calloutElementFields_1 = require("./calloutElementFields");
|
|
12
13
|
var codeElementFields_1 = require("./codeElementFields");
|
|
13
14
|
var commentElementFields_1 = require("./commentElementFields");
|
|
14
15
|
var contentAtomElementFields_1 = require("./contentAtomElementFields");
|
|
@@ -248,6 +249,15 @@ var BlockElementSerde = /** @class */ (function () {
|
|
|
248
249
|
protocol.skip(ftype);
|
|
249
250
|
}
|
|
250
251
|
break;
|
|
252
|
+
case 23:
|
|
253
|
+
if (ftype === thrift_1.Thrift.Type.STRUCT) {
|
|
254
|
+
var value1 = calloutElementFields_1.CalloutElementFieldsSerde.read(protocol);
|
|
255
|
+
result.calloutTypeData = value1;
|
|
256
|
+
}
|
|
257
|
+
else {
|
|
258
|
+
protocol.skip(ftype);
|
|
259
|
+
}
|
|
260
|
+
break;
|
|
251
261
|
default:
|
|
252
262
|
protocol.skip(ftype);
|
|
253
263
|
}
|
|
@@ -395,6 +405,12 @@ var BlockElementSerde = /** @class */ (function () {
|
|
|
395
405
|
codeElementFields_1.CodeElementFieldsSerde.write(protocol, value1);
|
|
396
406
|
protocol.writeFieldEnd();
|
|
397
407
|
}
|
|
408
|
+
if (value0.calloutTypeData !== null && value0.calloutTypeData !== undefined) {
|
|
409
|
+
var value1 = value0.calloutTypeData;
|
|
410
|
+
protocol.writeFieldBegin('calloutTypeData', thrift_1.Thrift.Type.STRUCT, 23);
|
|
411
|
+
calloutElementFields_1.CalloutElementFieldsSerde.write(protocol, value1);
|
|
412
|
+
protocol.writeFieldEnd();
|
|
413
|
+
}
|
|
398
414
|
protocol.writeFieldStop();
|
|
399
415
|
protocol.writeStructEnd();
|
|
400
416
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Autogenerated by scrooge-generator-extras
|
|
3
|
+
*
|
|
4
|
+
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
|
5
|
+
*/
|
|
6
|
+
import { TProtocol } from 'thrift';
|
|
7
|
+
export interface CalloutElementFields {
|
|
8
|
+
campaignId?: string;
|
|
9
|
+
isNonCollapsible?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare class CalloutElementFieldsSerde {
|
|
12
|
+
static read(protocol: TProtocol): CalloutElementFields;
|
|
13
|
+
static write(protocol: TProtocol, value0: CalloutElementFields): void;
|
|
14
|
+
}
|
|
@@ -5,13 +5,12 @@
|
|
|
5
5
|
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.
|
|
8
|
+
exports.CalloutElementFieldsSerde = void 0;
|
|
9
9
|
var thrift_1 = require("thrift");
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
function ContentChannelSerde() {
|
|
10
|
+
var CalloutElementFieldsSerde = /** @class */ (function () {
|
|
11
|
+
function CalloutElementFieldsSerde() {
|
|
13
12
|
}
|
|
14
|
-
|
|
13
|
+
CalloutElementFieldsSerde.read = function (protocol) {
|
|
15
14
|
protocol.readStructBegin();
|
|
16
15
|
var result = {};
|
|
17
16
|
while (true) {
|
|
@@ -25,16 +24,16 @@ var ContentChannelSerde = /** @class */ (function () {
|
|
|
25
24
|
case 1:
|
|
26
25
|
if (ftype === thrift_1.Thrift.Type.STRING) {
|
|
27
26
|
var value1 = protocol.readString();
|
|
28
|
-
result.
|
|
27
|
+
result.campaignId = value1;
|
|
29
28
|
}
|
|
30
29
|
else {
|
|
31
30
|
protocol.skip(ftype);
|
|
32
31
|
}
|
|
33
32
|
break;
|
|
34
33
|
case 2:
|
|
35
|
-
if (ftype === thrift_1.Thrift.Type.
|
|
36
|
-
var value1 =
|
|
37
|
-
result.
|
|
34
|
+
if (ftype === thrift_1.Thrift.Type.BOOL) {
|
|
35
|
+
var value1 = protocol.readBool();
|
|
36
|
+
result.isNonCollapsible = value1;
|
|
38
37
|
}
|
|
39
38
|
else {
|
|
40
39
|
protocol.skip(ftype);
|
|
@@ -49,23 +48,23 @@ var ContentChannelSerde = /** @class */ (function () {
|
|
|
49
48
|
// @ts-ignore
|
|
50
49
|
return result;
|
|
51
50
|
};
|
|
52
|
-
|
|
53
|
-
protocol.writeStructBegin('
|
|
54
|
-
if (value0.
|
|
55
|
-
var value1 = value0.
|
|
56
|
-
protocol.writeFieldBegin('
|
|
51
|
+
CalloutElementFieldsSerde.write = function (protocol, value0) {
|
|
52
|
+
protocol.writeStructBegin('CalloutElementFields');
|
|
53
|
+
if (value0.campaignId !== null && value0.campaignId !== undefined) {
|
|
54
|
+
var value1 = value0.campaignId;
|
|
55
|
+
protocol.writeFieldBegin('campaignId', thrift_1.Thrift.Type.STRING, 1);
|
|
57
56
|
protocol.writeString(value1);
|
|
58
57
|
protocol.writeFieldEnd();
|
|
59
58
|
}
|
|
60
|
-
if (value0.
|
|
61
|
-
var value1 = value0.
|
|
62
|
-
protocol.writeFieldBegin('
|
|
63
|
-
|
|
59
|
+
if (value0.isNonCollapsible !== null && value0.isNonCollapsible !== undefined) {
|
|
60
|
+
var value1 = value0.isNonCollapsible;
|
|
61
|
+
protocol.writeFieldBegin('isNonCollapsible', thrift_1.Thrift.Type.BOOL, 2);
|
|
62
|
+
protocol.writeBool(value1);
|
|
64
63
|
protocol.writeFieldEnd();
|
|
65
64
|
}
|
|
66
65
|
protocol.writeFieldStop();
|
|
67
66
|
protocol.writeStructEnd();
|
|
68
67
|
};
|
|
69
|
-
return
|
|
68
|
+
return CalloutElementFieldsSerde;
|
|
70
69
|
}());
|
|
71
|
-
exports.
|
|
70
|
+
exports.CalloutElementFieldsSerde = CalloutElementFieldsSerde;
|
|
@@ -120,6 +120,15 @@ var CommentElementFieldsSerde = /** @class */ (function () {
|
|
|
120
120
|
protocol.skip(ftype);
|
|
121
121
|
}
|
|
122
122
|
break;
|
|
123
|
+
case 12:
|
|
124
|
+
if (ftype === thrift_1.Thrift.Type.BOOL) {
|
|
125
|
+
var value1 = protocol.readBool();
|
|
126
|
+
result.isMandatory = value1;
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
protocol.skip(ftype);
|
|
130
|
+
}
|
|
131
|
+
break;
|
|
123
132
|
default:
|
|
124
133
|
protocol.skip(ftype);
|
|
125
134
|
}
|
|
@@ -197,6 +206,12 @@ var CommentElementFieldsSerde = /** @class */ (function () {
|
|
|
197
206
|
protocol.writeString(value1);
|
|
198
207
|
protocol.writeFieldEnd();
|
|
199
208
|
}
|
|
209
|
+
if (value0.isMandatory !== null && value0.isMandatory !== undefined) {
|
|
210
|
+
var value1 = value0.isMandatory;
|
|
211
|
+
protocol.writeFieldBegin('isMandatory', thrift_1.Thrift.Type.BOOL, 12);
|
|
212
|
+
protocol.writeBool(value1);
|
|
213
|
+
protocol.writeFieldEnd();
|
|
214
|
+
}
|
|
200
215
|
protocol.writeFieldStop();
|
|
201
216
|
protocol.writeStructEnd();
|
|
202
217
|
};
|
package/v1/content.d.ts
CHANGED
|
@@ -8,7 +8,6 @@ import { AliasPath } from './aliasPath';
|
|
|
8
8
|
import { Atoms } from './atoms';
|
|
9
9
|
import { Blocks } from './blocks';
|
|
10
10
|
import { CapiDateTime } from './capiDateTime';
|
|
11
|
-
import { ContentChannel } from './contentChannel';
|
|
12
11
|
import { ContentFields } from './contentFields';
|
|
13
12
|
import { ContentStats } from './contentStats';
|
|
14
13
|
import { ContentType } from './contentType';
|
|
@@ -45,7 +44,6 @@ export interface Content {
|
|
|
45
44
|
pillarId?: string;
|
|
46
45
|
pillarName?: string;
|
|
47
46
|
aliasPaths?: AliasPath[];
|
|
48
|
-
channels?: ContentChannel[];
|
|
49
47
|
}
|
|
50
48
|
export declare class ContentSerde {
|
|
51
49
|
static read(protocol: TProtocol): Content;
|
package/v1/content.js
CHANGED
|
@@ -11,7 +11,6 @@ var aliasPath_1 = require("./aliasPath");
|
|
|
11
11
|
var atoms_1 = require("./atoms");
|
|
12
12
|
var blocks_1 = require("./blocks");
|
|
13
13
|
var capiDateTime_1 = require("./capiDateTime");
|
|
14
|
-
var contentChannel_1 = require("./contentChannel");
|
|
15
14
|
var contentFields_1 = require("./contentFields");
|
|
16
15
|
var contentStats_1 = require("./contentStats");
|
|
17
16
|
var contentType_1 = require("./contentType");
|
|
@@ -26,7 +25,7 @@ var ContentSerde = /** @class */ (function () {
|
|
|
26
25
|
function ContentSerde() {
|
|
27
26
|
}
|
|
28
27
|
ContentSerde.read = function (protocol) {
|
|
29
|
-
var _a, _b, _c, _d
|
|
28
|
+
var _a, _b, _c, _d;
|
|
30
29
|
protocol.readStructBegin();
|
|
31
30
|
var result = {
|
|
32
31
|
type: contentType_1.ContentType.ARTICLE,
|
|
@@ -303,24 +302,6 @@ var ContentSerde = /** @class */ (function () {
|
|
|
303
302
|
protocol.skip(ftype);
|
|
304
303
|
}
|
|
305
304
|
break;
|
|
306
|
-
case 28:
|
|
307
|
-
if (ftype === thrift_1.Thrift.Type.LIST) {
|
|
308
|
-
var listInfo1 = protocol.readListBegin();
|
|
309
|
-
var listSize1 = (_e = listInfo1.size) !== null && _e !== void 0 ? _e : 0;
|
|
310
|
-
var value1 = [];
|
|
311
|
-
if (listInfo1.etype === thrift_1.Thrift.Type.STRUCT) {
|
|
312
|
-
for (var i = 0; i < listSize1; i++) {
|
|
313
|
-
var value2 = contentChannel_1.ContentChannelSerde.read(protocol);
|
|
314
|
-
value1.push(value2);
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
protocol.readListEnd();
|
|
318
|
-
result.channels = value1;
|
|
319
|
-
}
|
|
320
|
-
else {
|
|
321
|
-
protocol.skip(ftype);
|
|
322
|
-
}
|
|
323
|
-
break;
|
|
324
305
|
default:
|
|
325
306
|
protocol.skip(ftype);
|
|
326
307
|
}
|
|
@@ -498,16 +479,6 @@ var ContentSerde = /** @class */ (function () {
|
|
|
498
479
|
protocol.writeListEnd();
|
|
499
480
|
protocol.writeFieldEnd();
|
|
500
481
|
}
|
|
501
|
-
if (value0.channels !== null && value0.channels !== undefined) {
|
|
502
|
-
var value1 = value0.channels;
|
|
503
|
-
protocol.writeFieldBegin('channels', thrift_1.Thrift.Type.LIST, 28);
|
|
504
|
-
protocol.writeListBegin(thrift_1.Thrift.Type.STRUCT, value1.length);
|
|
505
|
-
value1.forEach(function (value2) {
|
|
506
|
-
contentChannel_1.ContentChannelSerde.write(protocol, value2);
|
|
507
|
-
});
|
|
508
|
-
protocol.writeListEnd();
|
|
509
|
-
protocol.writeFieldEnd();
|
|
510
|
-
}
|
|
511
482
|
protocol.writeFieldStop();
|
|
512
483
|
protocol.writeStructEnd();
|
|
513
484
|
};
|
|
@@ -48,6 +48,15 @@ var ContentAtomElementFieldsSerde = /** @class */ (function () {
|
|
|
48
48
|
protocol.skip(ftype);
|
|
49
49
|
}
|
|
50
50
|
break;
|
|
51
|
+
case 4:
|
|
52
|
+
if (ftype === thrift_1.Thrift.Type.BOOL) {
|
|
53
|
+
var value1 = protocol.readBool();
|
|
54
|
+
result.isMandatory = value1;
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
protocol.skip(ftype);
|
|
58
|
+
}
|
|
59
|
+
break;
|
|
51
60
|
default:
|
|
52
61
|
protocol.skip(ftype);
|
|
53
62
|
}
|
|
@@ -77,6 +86,12 @@ var ContentAtomElementFieldsSerde = /** @class */ (function () {
|
|
|
77
86
|
protocol.writeString(value1);
|
|
78
87
|
protocol.writeFieldEnd();
|
|
79
88
|
}
|
|
89
|
+
if (value0.isMandatory !== null && value0.isMandatory !== undefined) {
|
|
90
|
+
var value1 = value0.isMandatory;
|
|
91
|
+
protocol.writeFieldBegin('isMandatory', thrift_1.Thrift.Type.BOOL, 4);
|
|
92
|
+
protocol.writeBool(value1);
|
|
93
|
+
protocol.writeFieldEnd();
|
|
94
|
+
}
|
|
80
95
|
protocol.writeFieldStop();
|
|
81
96
|
protocol.writeStructEnd();
|
|
82
97
|
};
|
package/v1/contentStats.d.ts
CHANGED
package/v1/contentStats.js
CHANGED
|
@@ -147,6 +147,15 @@ var ContentStatsSerde = /** @class */ (function () {
|
|
|
147
147
|
protocol.skip(ftype);
|
|
148
148
|
}
|
|
149
149
|
break;
|
|
150
|
+
case 15:
|
|
151
|
+
if (ftype === thrift_1.Thrift.Type.I32) {
|
|
152
|
+
var value1 = protocol.readI32();
|
|
153
|
+
result.callouts = value1;
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
protocol.skip(ftype);
|
|
157
|
+
}
|
|
158
|
+
break;
|
|
150
159
|
default:
|
|
151
160
|
protocol.skip(ftype);
|
|
152
161
|
}
|
|
@@ -242,6 +251,12 @@ var ContentStatsSerde = /** @class */ (function () {
|
|
|
242
251
|
protocol.writeI32(value1);
|
|
243
252
|
protocol.writeFieldEnd();
|
|
244
253
|
}
|
|
254
|
+
if (value0.callouts !== null && value0.callouts !== undefined) {
|
|
255
|
+
var value1 = value0.callouts;
|
|
256
|
+
protocol.writeFieldBegin('callouts', thrift_1.Thrift.Type.I32, 15);
|
|
257
|
+
protocol.writeI32(value1);
|
|
258
|
+
protocol.writeFieldEnd();
|
|
259
|
+
}
|
|
245
260
|
protocol.writeFieldStop();
|
|
246
261
|
protocol.writeStructEnd();
|
|
247
262
|
};
|
package/v1/elementType.d.ts
CHANGED
package/v1/elementType.js
CHANGED
|
@@ -28,4 +28,5 @@ var ElementType;
|
|
|
28
28
|
ElementType[ElementType["INSTAGRAM"] = 17] = "INSTAGRAM";
|
|
29
29
|
ElementType[ElementType["CONTENTATOM"] = 18] = "CONTENTATOM";
|
|
30
30
|
ElementType[ElementType["VINE"] = 19] = "VINE";
|
|
31
|
+
ElementType[ElementType["CALLOUT"] = 20] = "CALLOUT";
|
|
31
32
|
})(ElementType = exports.ElementType || (exports.ElementType = {}));
|
package/v1/tweetElementFields.js
CHANGED
|
@@ -84,6 +84,15 @@ var TweetElementFieldsSerde = /** @class */ (function () {
|
|
|
84
84
|
protocol.skip(ftype);
|
|
85
85
|
}
|
|
86
86
|
break;
|
|
87
|
+
case 10:
|
|
88
|
+
if (ftype === thrift_1.Thrift.Type.BOOL) {
|
|
89
|
+
var value1 = protocol.readBool();
|
|
90
|
+
result.isMandatory = value1;
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
protocol.skip(ftype);
|
|
94
|
+
}
|
|
95
|
+
break;
|
|
87
96
|
default:
|
|
88
97
|
protocol.skip(ftype);
|
|
89
98
|
}
|
|
@@ -137,6 +146,12 @@ var TweetElementFieldsSerde = /** @class */ (function () {
|
|
|
137
146
|
protocol.writeString(value1);
|
|
138
147
|
protocol.writeFieldEnd();
|
|
139
148
|
}
|
|
149
|
+
if (value0.isMandatory !== null && value0.isMandatory !== undefined) {
|
|
150
|
+
var value1 = value0.isMandatory;
|
|
151
|
+
protocol.writeFieldBegin('isMandatory', thrift_1.Thrift.Type.BOOL, 10);
|
|
152
|
+
protocol.writeBool(value1);
|
|
153
|
+
protocol.writeFieldEnd();
|
|
154
|
+
}
|
|
140
155
|
protocol.writeFieldStop();
|
|
141
156
|
protocol.writeStructEnd();
|
|
142
157
|
};
|
package/v1/videoElementFields.js
CHANGED
|
@@ -201,6 +201,15 @@ var VideoElementFieldsSerde = /** @class */ (function () {
|
|
|
201
201
|
protocol.skip(ftype);
|
|
202
202
|
}
|
|
203
203
|
break;
|
|
204
|
+
case 21:
|
|
205
|
+
if (ftype === thrift_1.Thrift.Type.BOOL) {
|
|
206
|
+
var value1 = protocol.readBool();
|
|
207
|
+
result.isMandatory = value1;
|
|
208
|
+
}
|
|
209
|
+
else {
|
|
210
|
+
protocol.skip(ftype);
|
|
211
|
+
}
|
|
212
|
+
break;
|
|
204
213
|
default:
|
|
205
214
|
protocol.skip(ftype);
|
|
206
215
|
}
|
|
@@ -332,6 +341,12 @@ var VideoElementFieldsSerde = /** @class */ (function () {
|
|
|
332
341
|
protocol.writeString(value1);
|
|
333
342
|
protocol.writeFieldEnd();
|
|
334
343
|
}
|
|
344
|
+
if (value0.isMandatory !== null && value0.isMandatory !== undefined) {
|
|
345
|
+
var value1 = value0.isMandatory;
|
|
346
|
+
protocol.writeFieldBegin('isMandatory', thrift_1.Thrift.Type.BOOL, 21);
|
|
347
|
+
protocol.writeBool(value1);
|
|
348
|
+
protocol.writeFieldEnd();
|
|
349
|
+
}
|
|
335
350
|
protocol.writeFieldStop();
|
|
336
351
|
protocol.writeStructEnd();
|
|
337
352
|
};
|
package/v1/channelFields.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Autogenerated by scrooge-generator-extras
|
|
3
|
-
*
|
|
4
|
-
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
|
5
|
-
*/
|
|
6
|
-
import { TProtocol } from 'thrift';
|
|
7
|
-
import { CapiDateTime } from './capiDateTime';
|
|
8
|
-
export interface ChannelFields {
|
|
9
|
-
isAvailable: boolean;
|
|
10
|
-
publicationDate?: CapiDateTime;
|
|
11
|
-
}
|
|
12
|
-
export declare class ChannelFieldsSerde {
|
|
13
|
-
static read(protocol: TProtocol): ChannelFields;
|
|
14
|
-
static write(protocol: TProtocol, value0: ChannelFields): void;
|
|
15
|
-
}
|
package/v1/channelFields.js
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Autogenerated by scrooge-generator-extras
|
|
4
|
-
*
|
|
5
|
-
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
|
6
|
-
*/
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.ChannelFieldsSerde = void 0;
|
|
9
|
-
var thrift_1 = require("thrift");
|
|
10
|
-
var capiDateTime_1 = require("./capiDateTime");
|
|
11
|
-
var ChannelFieldsSerde = /** @class */ (function () {
|
|
12
|
-
function ChannelFieldsSerde() {
|
|
13
|
-
}
|
|
14
|
-
ChannelFieldsSerde.read = function (protocol) {
|
|
15
|
-
protocol.readStructBegin();
|
|
16
|
-
var result = {};
|
|
17
|
-
while (true) {
|
|
18
|
-
var ret = protocol.readFieldBegin();
|
|
19
|
-
var ftype = ret.ftype;
|
|
20
|
-
var fid = ret.fid;
|
|
21
|
-
if (ftype === thrift_1.Thrift.Type.STOP) {
|
|
22
|
-
break;
|
|
23
|
-
}
|
|
24
|
-
switch (fid) {
|
|
25
|
-
case 1:
|
|
26
|
-
if (ftype === thrift_1.Thrift.Type.BOOL) {
|
|
27
|
-
var value1 = protocol.readBool();
|
|
28
|
-
result.isAvailable = value1;
|
|
29
|
-
}
|
|
30
|
-
else {
|
|
31
|
-
protocol.skip(ftype);
|
|
32
|
-
}
|
|
33
|
-
break;
|
|
34
|
-
case 2:
|
|
35
|
-
if (ftype === thrift_1.Thrift.Type.STRUCT) {
|
|
36
|
-
var value1 = capiDateTime_1.CapiDateTimeSerde.read(protocol);
|
|
37
|
-
result.publicationDate = value1;
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
protocol.skip(ftype);
|
|
41
|
-
}
|
|
42
|
-
break;
|
|
43
|
-
default:
|
|
44
|
-
protocol.skip(ftype);
|
|
45
|
-
}
|
|
46
|
-
protocol.readFieldEnd();
|
|
47
|
-
}
|
|
48
|
-
protocol.readStructEnd();
|
|
49
|
-
// @ts-ignore
|
|
50
|
-
return result;
|
|
51
|
-
};
|
|
52
|
-
ChannelFieldsSerde.write = function (protocol, value0) {
|
|
53
|
-
protocol.writeStructBegin('ChannelFields');
|
|
54
|
-
if (value0.isAvailable !== null && value0.isAvailable !== undefined) {
|
|
55
|
-
var value1 = value0.isAvailable;
|
|
56
|
-
protocol.writeFieldBegin('isAvailable', thrift_1.Thrift.Type.BOOL, 1);
|
|
57
|
-
protocol.writeBool(value1);
|
|
58
|
-
protocol.writeFieldEnd();
|
|
59
|
-
}
|
|
60
|
-
if (value0.publicationDate !== null && value0.publicationDate !== undefined) {
|
|
61
|
-
var value1 = value0.publicationDate;
|
|
62
|
-
protocol.writeFieldBegin('publicationDate', thrift_1.Thrift.Type.STRUCT, 2);
|
|
63
|
-
capiDateTime_1.CapiDateTimeSerde.write(protocol, value1);
|
|
64
|
-
protocol.writeFieldEnd();
|
|
65
|
-
}
|
|
66
|
-
protocol.writeFieldStop();
|
|
67
|
-
protocol.writeStructEnd();
|
|
68
|
-
};
|
|
69
|
-
return ChannelFieldsSerde;
|
|
70
|
-
}());
|
|
71
|
-
exports.ChannelFieldsSerde = ChannelFieldsSerde;
|
package/v1/contentChannel.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Autogenerated by scrooge-generator-extras
|
|
3
|
-
*
|
|
4
|
-
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
|
5
|
-
*/
|
|
6
|
-
import { TProtocol } from 'thrift';
|
|
7
|
-
import { ChannelFields } from './channelFields';
|
|
8
|
-
export interface ContentChannel {
|
|
9
|
-
channelId: string;
|
|
10
|
-
fields: ChannelFields;
|
|
11
|
-
}
|
|
12
|
-
export declare class ContentChannelSerde {
|
|
13
|
-
static read(protocol: TProtocol): ContentChannel;
|
|
14
|
-
static write(protocol: TProtocol, value0: ContentChannel): void;
|
|
15
|
-
}
|