@guardian/content-api-models 4.0.1-SNAPSHOT
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/auxiliaryatomevent/v1/auxiliaryAtom.d.ts +14 -0
- package/auxiliaryatomevent/v1/auxiliaryAtom.js +70 -0
- package/auxiliaryatomevent/v1/auxiliaryAtomEvent.d.ts +17 -0
- package/auxiliaryatomevent/v1/auxiliaryAtomEvent.js +100 -0
- package/auxiliaryatomevent/v1/eventType.d.ts +9 -0
- package/auxiliaryatomevent/v1/eventType.js +13 -0
- package/crier/event/v1/deletedContent.d.ts +14 -0
- package/crier/event/v1/deletedContent.js +70 -0
- package/crier/event/v1/event.d.ts +21 -0
- package/crier/event/v1/event.js +116 -0
- package/crier/event/v1/eventPayload.d.ts +27 -0
- package/crier/event/v1/eventPayload.js +118 -0
- package/crier/event/v1/eventType.d.ts +10 -0
- package/crier/event/v1/eventType.js +14 -0
- package/crier/event/v1/itemType.d.ts +12 -0
- package/crier/event/v1/itemType.js +16 -0
- package/crier/event/v1/retrievableContent.d.ts +21 -0
- package/crier/event/v1/retrievableContent.js +145 -0
- package/fastly/event/v1/contentDecachedEvent.d.ts +19 -0
- package/fastly/event/v1/contentDecachedEvent.js +100 -0
- package/fastly/event/v1/eventType.d.ts +9 -0
- package/fastly/event/v1/eventType.js +13 -0
- package/package.json +24 -0
- package/tsconfig.json +14 -0
- package/v1/aliasPath.d.ts +15 -0
- package/v1/aliasPath.js +71 -0
- package/v1/asset.d.ts +18 -0
- package/v1/asset.js +101 -0
- package/v1/assetFields.d.ts +85 -0
- package/v1/assetFields.js +1106 -0
- package/v1/assetType.d.ts +13 -0
- package/v1/assetType.js +17 -0
- package/v1/atomUsageResponse.d.ts +20 -0
- package/v1/atomUsageResponse.js +174 -0
- package/v1/atoms.d.ts +29 -0
- package/v1/atoms.js +490 -0
- package/v1/atomsResponse.d.ts +21 -0
- package/v1/atomsResponse.js +175 -0
- package/v1/audioElementFields.d.ts +25 -0
- package/v1/audioElementFields.js +235 -0
- package/v1/block.d.ts +30 -0
- package/v1/block.js +283 -0
- package/v1/blockAttributes.d.ts +18 -0
- package/v1/blockAttributes.js +116 -0
- package/v1/blockElement.d.ts +60 -0
- package/v1/blockElement.js +451 -0
- package/v1/blocks.d.ts +19 -0
- package/v1/blocks.js +144 -0
- package/v1/calloutElementFields.d.ts +17 -0
- package/v1/calloutElementFields.js +115 -0
- package/v1/capiDateTime.d.ts +15 -0
- package/v1/capiDateTime.js +70 -0
- package/v1/cartoonElementFields.d.ts +22 -0
- package/v1/cartoonElementFields.js +190 -0
- package/v1/cartoonImage.d.ts +17 -0
- package/v1/cartoonImage.js +115 -0
- package/v1/cartoonVariant.d.ts +15 -0
- package/v1/cartoonVariant.js +85 -0
- package/v1/channelFields.d.ts +15 -0
- package/v1/channelFields.js +71 -0
- package/v1/codeElementFields.d.ts +14 -0
- package/v1/codeElementFields.js +70 -0
- package/v1/commentElementFields.d.ts +24 -0
- package/v1/commentElementFields.js +220 -0
- package/v1/content.d.ts +53 -0
- package/v1/content.js +516 -0
- package/v1/contentAtomElementFields.d.ts +16 -0
- package/v1/contentAtomElementFields.js +100 -0
- package/v1/contentChannel.d.ts +15 -0
- package/v1/contentChannel.js +71 -0
- package/v1/contentFields.d.ts +67 -0
- package/v1/contentFields.js +821 -0
- package/v1/contentStats.d.ts +27 -0
- package/v1/contentStats.js +265 -0
- package/v1/contentType.d.ts +15 -0
- package/v1/contentType.js +19 -0
- package/v1/crossword.d.ts +31 -0
- package/v1/crossword.js +268 -0
- package/v1/crosswordCreator.d.ts +14 -0
- package/v1/crosswordCreator.js +70 -0
- package/v1/crosswordDimensions.d.ts +14 -0
- package/v1/crosswordDimensions.js +70 -0
- package/v1/crosswordEntry.d.ts +26 -0
- package/v1/crosswordEntry.js +249 -0
- package/v1/crosswordPosition.d.ts +14 -0
- package/v1/crosswordPosition.js +70 -0
- package/v1/crosswordType.d.ts +15 -0
- package/v1/crosswordType.js +19 -0
- package/v1/debug.d.ts +18 -0
- package/v1/debug.js +101 -0
- package/v1/edition.d.ts +17 -0
- package/v1/edition.js +115 -0
- package/v1/editionsResponse.d.ts +17 -0
- package/v1/editionsResponse.js +115 -0
- package/v1/element.d.ts +19 -0
- package/v1/element.js +130 -0
- package/v1/elementType.d.ts +30 -0
- package/v1/elementType.js +34 -0
- package/v1/embedElementFields.d.ts +20 -0
- package/v1/embedElementFields.js +160 -0
- package/v1/embedReach.d.ts +14 -0
- package/v1/embedReach.js +69 -0
- package/v1/embedTracking.d.ts +14 -0
- package/v1/embedTracking.js +58 -0
- package/v1/embedTracksType.d.ts +10 -0
- package/v1/embedTracksType.js +14 -0
- package/v1/entitiesResponse.d.ts +16 -0
- package/v1/entitiesResponse.js +100 -0
- package/v1/errorResponse.d.ts +14 -0
- package/v1/errorResponse.js +70 -0
- package/v1/imageElementFields.d.ts +26 -0
- package/v1/imageElementFields.js +250 -0
- package/v1/instagramElementFields.d.ts +23 -0
- package/v1/instagramElementFields.js +205 -0
- package/v1/interactiveElementFields.d.ts +24 -0
- package/v1/interactiveElementFields.js +220 -0
- package/v1/itemResponse.d.ts +53 -0
- package/v1/itemResponse.js +676 -0
- package/v1/membershipElementFields.d.ts +25 -0
- package/v1/membershipElementFields.js +221 -0
- package/v1/membershipPlaceholder.d.ts +13 -0
- package/v1/membershipPlaceholder.js +55 -0
- package/v1/membershipTier.d.ts +9 -0
- package/v1/membershipTier.js +13 -0
- package/v1/mostViewedVideo.d.ts +14 -0
- package/v1/mostViewedVideo.js +70 -0
- package/v1/networkFront.d.ts +18 -0
- package/v1/networkFront.js +130 -0
- package/v1/office.d.ts +10 -0
- package/v1/office.js +14 -0
- package/v1/package.d.ts +18 -0
- package/v1/package.js +116 -0
- package/v1/packageArticle.d.ts +16 -0
- package/v1/packageArticle.js +72 -0
- package/v1/packagesResponse.d.ts +22 -0
- package/v1/packagesResponse.js +190 -0
- package/v1/pillar.d.ts +15 -0
- package/v1/pillar.js +99 -0
- package/v1/pillarsResponse.d.ts +16 -0
- package/v1/pillarsResponse.js +100 -0
- package/v1/platformType.d.ts +10 -0
- package/v1/platformType.js +14 -0
- package/v1/podcast.d.ts +25 -0
- package/v1/podcast.js +235 -0
- package/v1/podcastCategory.d.ts +14 -0
- package/v1/podcastCategory.js +70 -0
- package/v1/pullquoteElementFields.d.ts +17 -0
- package/v1/pullquoteElementFields.js +115 -0
- package/v1/recipeElementFields.d.ts +13 -0
- package/v1/recipeElementFields.js +55 -0
- package/v1/reference.d.ts +14 -0
- package/v1/reference.js +70 -0
- package/v1/richLinkElementFields.d.ts +19 -0
- package/v1/richLinkElementFields.js +131 -0
- package/v1/rights.d.ts +15 -0
- package/v1/rights.js +89 -0
- package/v1/searchResponse.d.ts +22 -0
- package/v1/searchResponse.js +190 -0
- package/v1/section.d.ts +20 -0
- package/v1/section.js +159 -0
- package/v1/sectionsResponse.d.ts +17 -0
- package/v1/sectionsResponse.js +115 -0
- package/v1/sponsorship.d.ts +27 -0
- package/v1/sponsorship.js +208 -0
- package/v1/sponsorshipLogoDimensions.d.ts +14 -0
- package/v1/sponsorshipLogoDimensions.js +70 -0
- package/v1/sponsorshipTargeting.d.ts +15 -0
- package/v1/sponsorshipTargeting.js +85 -0
- package/v1/sponsorshipType.d.ts +10 -0
- package/v1/sponsorshipType.js +14 -0
- package/v1/standardElementFields.d.ts +25 -0
- package/v1/standardElementFields.js +235 -0
- package/v1/tag.d.ts +42 -0
- package/v1/tag.js +486 -0
- package/v1/tagType.d.ts +19 -0
- package/v1/tagType.js +23 -0
- package/v1/tagsResponse.d.ts +21 -0
- package/v1/tagsResponse.js +175 -0
- package/v1/textElementFields.d.ts +14 -0
- package/v1/textElementFields.js +70 -0
- package/v1/tweetElementFields.d.ts +20 -0
- package/v1/tweetElementFields.js +160 -0
- package/v1/user.d.ts +15 -0
- package/v1/user.js +85 -0
- package/v1/videoElementFields.d.ts +33 -0
- package/v1/videoElementFields.js +355 -0
- package/v1/videoStatsResponse.d.ts +15 -0
- package/v1/videoStatsResponse.js +85 -0
- package/v1/vineElementFields.d.ts +24 -0
- package/v1/vineElementFields.js +220 -0
- package/v1/witnessElementFields.d.ts +40 -0
- package/v1/witnessElementFields.js +446 -0
|
@@ -0,0 +1,355 @@
|
|
|
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.VideoElementFieldsSerde = void 0;
|
|
9
|
+
var thrift_1 = require("thrift");
|
|
10
|
+
var VideoElementFieldsSerde = /** @class */ (function () {
|
|
11
|
+
function VideoElementFieldsSerde() {
|
|
12
|
+
}
|
|
13
|
+
VideoElementFieldsSerde.read = function (protocol) {
|
|
14
|
+
protocol.readStructBegin();
|
|
15
|
+
var result = {};
|
|
16
|
+
while (true) {
|
|
17
|
+
var ret = protocol.readFieldBegin();
|
|
18
|
+
var ftype = ret.ftype;
|
|
19
|
+
var fid = ret.fid;
|
|
20
|
+
if (ftype === thrift_1.Thrift.Type.STOP) {
|
|
21
|
+
break;
|
|
22
|
+
}
|
|
23
|
+
switch (fid) {
|
|
24
|
+
case 1:
|
|
25
|
+
if (ftype === thrift_1.Thrift.Type.STRING) {
|
|
26
|
+
var value1 = protocol.readString();
|
|
27
|
+
result.url = value1;
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
protocol.skip(ftype);
|
|
31
|
+
}
|
|
32
|
+
break;
|
|
33
|
+
case 2:
|
|
34
|
+
if (ftype === thrift_1.Thrift.Type.STRING) {
|
|
35
|
+
var value1 = protocol.readString();
|
|
36
|
+
result.description = value1;
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
protocol.skip(ftype);
|
|
40
|
+
}
|
|
41
|
+
break;
|
|
42
|
+
case 3:
|
|
43
|
+
if (ftype === thrift_1.Thrift.Type.STRING) {
|
|
44
|
+
var value1 = protocol.readString();
|
|
45
|
+
result.title = value1;
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
protocol.skip(ftype);
|
|
49
|
+
}
|
|
50
|
+
break;
|
|
51
|
+
case 4:
|
|
52
|
+
if (ftype === thrift_1.Thrift.Type.STRING) {
|
|
53
|
+
var value1 = protocol.readString();
|
|
54
|
+
result.html = value1;
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
protocol.skip(ftype);
|
|
58
|
+
}
|
|
59
|
+
break;
|
|
60
|
+
case 5:
|
|
61
|
+
if (ftype === thrift_1.Thrift.Type.STRING) {
|
|
62
|
+
var value1 = protocol.readString();
|
|
63
|
+
result.source = value1;
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
protocol.skip(ftype);
|
|
67
|
+
}
|
|
68
|
+
break;
|
|
69
|
+
case 6:
|
|
70
|
+
if (ftype === thrift_1.Thrift.Type.STRING) {
|
|
71
|
+
var value1 = protocol.readString();
|
|
72
|
+
result.credit = value1;
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
protocol.skip(ftype);
|
|
76
|
+
}
|
|
77
|
+
break;
|
|
78
|
+
case 7:
|
|
79
|
+
if (ftype === thrift_1.Thrift.Type.STRING) {
|
|
80
|
+
var value1 = protocol.readString();
|
|
81
|
+
result.caption = value1;
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
protocol.skip(ftype);
|
|
85
|
+
}
|
|
86
|
+
break;
|
|
87
|
+
case 8:
|
|
88
|
+
if (ftype === thrift_1.Thrift.Type.I32) {
|
|
89
|
+
var value1 = protocol.readI32();
|
|
90
|
+
result.height = value1;
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
protocol.skip(ftype);
|
|
94
|
+
}
|
|
95
|
+
break;
|
|
96
|
+
case 9:
|
|
97
|
+
if (ftype === thrift_1.Thrift.Type.I32) {
|
|
98
|
+
var value1 = protocol.readI32();
|
|
99
|
+
result.width = value1;
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
protocol.skip(ftype);
|
|
103
|
+
}
|
|
104
|
+
break;
|
|
105
|
+
case 10:
|
|
106
|
+
if (ftype === thrift_1.Thrift.Type.I32) {
|
|
107
|
+
var value1 = protocol.readI32();
|
|
108
|
+
result.duration = value1;
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
protocol.skip(ftype);
|
|
112
|
+
}
|
|
113
|
+
break;
|
|
114
|
+
case 11:
|
|
115
|
+
if (ftype === thrift_1.Thrift.Type.STRING) {
|
|
116
|
+
var value1 = protocol.readString();
|
|
117
|
+
result.contentAuthSystem = value1;
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
protocol.skip(ftype);
|
|
121
|
+
}
|
|
122
|
+
break;
|
|
123
|
+
case 12:
|
|
124
|
+
if (ftype === thrift_1.Thrift.Type.STRING) {
|
|
125
|
+
var value1 = protocol.readString();
|
|
126
|
+
result.embeddable = value1;
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
protocol.skip(ftype);
|
|
130
|
+
}
|
|
131
|
+
break;
|
|
132
|
+
case 13:
|
|
133
|
+
if (ftype === thrift_1.Thrift.Type.BOOL) {
|
|
134
|
+
var value1 = protocol.readBool();
|
|
135
|
+
result.isInappropriateForAdverts = value1;
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
protocol.skip(ftype);
|
|
139
|
+
}
|
|
140
|
+
break;
|
|
141
|
+
case 14:
|
|
142
|
+
if (ftype === thrift_1.Thrift.Type.STRING) {
|
|
143
|
+
var value1 = protocol.readString();
|
|
144
|
+
result.mediaId = value1;
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
protocol.skip(ftype);
|
|
148
|
+
}
|
|
149
|
+
break;
|
|
150
|
+
case 15:
|
|
151
|
+
if (ftype === thrift_1.Thrift.Type.STRING) {
|
|
152
|
+
var value1 = protocol.readString();
|
|
153
|
+
result.stillImageUrl = value1;
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
protocol.skip(ftype);
|
|
157
|
+
}
|
|
158
|
+
break;
|
|
159
|
+
case 16:
|
|
160
|
+
if (ftype === thrift_1.Thrift.Type.STRING) {
|
|
161
|
+
var value1 = protocol.readString();
|
|
162
|
+
result.thumbnailUrl = value1;
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
protocol.skip(ftype);
|
|
166
|
+
}
|
|
167
|
+
break;
|
|
168
|
+
case 17:
|
|
169
|
+
if (ftype === thrift_1.Thrift.Type.STRING) {
|
|
170
|
+
var value1 = protocol.readString();
|
|
171
|
+
result.shortUrl = value1;
|
|
172
|
+
}
|
|
173
|
+
else {
|
|
174
|
+
protocol.skip(ftype);
|
|
175
|
+
}
|
|
176
|
+
break;
|
|
177
|
+
case 18:
|
|
178
|
+
if (ftype === thrift_1.Thrift.Type.STRING) {
|
|
179
|
+
var value1 = protocol.readString();
|
|
180
|
+
result.role = value1;
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
protocol.skip(ftype);
|
|
184
|
+
}
|
|
185
|
+
break;
|
|
186
|
+
case 19:
|
|
187
|
+
if (ftype === thrift_1.Thrift.Type.STRING) {
|
|
188
|
+
var value1 = protocol.readString();
|
|
189
|
+
result.originalUrl = value1;
|
|
190
|
+
}
|
|
191
|
+
else {
|
|
192
|
+
protocol.skip(ftype);
|
|
193
|
+
}
|
|
194
|
+
break;
|
|
195
|
+
case 20:
|
|
196
|
+
if (ftype === thrift_1.Thrift.Type.STRING) {
|
|
197
|
+
var value1 = protocol.readString();
|
|
198
|
+
result.sourceDomain = value1;
|
|
199
|
+
}
|
|
200
|
+
else {
|
|
201
|
+
protocol.skip(ftype);
|
|
202
|
+
}
|
|
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;
|
|
213
|
+
default:
|
|
214
|
+
protocol.skip(ftype);
|
|
215
|
+
}
|
|
216
|
+
protocol.readFieldEnd();
|
|
217
|
+
}
|
|
218
|
+
protocol.readStructEnd();
|
|
219
|
+
// @ts-ignore
|
|
220
|
+
return result;
|
|
221
|
+
};
|
|
222
|
+
VideoElementFieldsSerde.write = function (protocol, value0) {
|
|
223
|
+
protocol.writeStructBegin('VideoElementFields');
|
|
224
|
+
if (value0.url !== null && value0.url !== undefined) {
|
|
225
|
+
var value1 = value0.url;
|
|
226
|
+
protocol.writeFieldBegin('url', thrift_1.Thrift.Type.STRING, 1);
|
|
227
|
+
protocol.writeString(value1);
|
|
228
|
+
protocol.writeFieldEnd();
|
|
229
|
+
}
|
|
230
|
+
if (value0.description !== null && value0.description !== undefined) {
|
|
231
|
+
var value1 = value0.description;
|
|
232
|
+
protocol.writeFieldBegin('description', thrift_1.Thrift.Type.STRING, 2);
|
|
233
|
+
protocol.writeString(value1);
|
|
234
|
+
protocol.writeFieldEnd();
|
|
235
|
+
}
|
|
236
|
+
if (value0.title !== null && value0.title !== undefined) {
|
|
237
|
+
var value1 = value0.title;
|
|
238
|
+
protocol.writeFieldBegin('title', thrift_1.Thrift.Type.STRING, 3);
|
|
239
|
+
protocol.writeString(value1);
|
|
240
|
+
protocol.writeFieldEnd();
|
|
241
|
+
}
|
|
242
|
+
if (value0.html !== null && value0.html !== undefined) {
|
|
243
|
+
var value1 = value0.html;
|
|
244
|
+
protocol.writeFieldBegin('html', thrift_1.Thrift.Type.STRING, 4);
|
|
245
|
+
protocol.writeString(value1);
|
|
246
|
+
protocol.writeFieldEnd();
|
|
247
|
+
}
|
|
248
|
+
if (value0.source !== null && value0.source !== undefined) {
|
|
249
|
+
var value1 = value0.source;
|
|
250
|
+
protocol.writeFieldBegin('source', thrift_1.Thrift.Type.STRING, 5);
|
|
251
|
+
protocol.writeString(value1);
|
|
252
|
+
protocol.writeFieldEnd();
|
|
253
|
+
}
|
|
254
|
+
if (value0.credit !== null && value0.credit !== undefined) {
|
|
255
|
+
var value1 = value0.credit;
|
|
256
|
+
protocol.writeFieldBegin('credit', thrift_1.Thrift.Type.STRING, 6);
|
|
257
|
+
protocol.writeString(value1);
|
|
258
|
+
protocol.writeFieldEnd();
|
|
259
|
+
}
|
|
260
|
+
if (value0.caption !== null && value0.caption !== undefined) {
|
|
261
|
+
var value1 = value0.caption;
|
|
262
|
+
protocol.writeFieldBegin('caption', thrift_1.Thrift.Type.STRING, 7);
|
|
263
|
+
protocol.writeString(value1);
|
|
264
|
+
protocol.writeFieldEnd();
|
|
265
|
+
}
|
|
266
|
+
if (value0.height !== null && value0.height !== undefined) {
|
|
267
|
+
var value1 = value0.height;
|
|
268
|
+
protocol.writeFieldBegin('height', thrift_1.Thrift.Type.I32, 8);
|
|
269
|
+
protocol.writeI32(value1);
|
|
270
|
+
protocol.writeFieldEnd();
|
|
271
|
+
}
|
|
272
|
+
if (value0.width !== null && value0.width !== undefined) {
|
|
273
|
+
var value1 = value0.width;
|
|
274
|
+
protocol.writeFieldBegin('width', thrift_1.Thrift.Type.I32, 9);
|
|
275
|
+
protocol.writeI32(value1);
|
|
276
|
+
protocol.writeFieldEnd();
|
|
277
|
+
}
|
|
278
|
+
if (value0.duration !== null && value0.duration !== undefined) {
|
|
279
|
+
var value1 = value0.duration;
|
|
280
|
+
protocol.writeFieldBegin('duration', thrift_1.Thrift.Type.I32, 10);
|
|
281
|
+
protocol.writeI32(value1);
|
|
282
|
+
protocol.writeFieldEnd();
|
|
283
|
+
}
|
|
284
|
+
if (value0.contentAuthSystem !== null && value0.contentAuthSystem !== undefined) {
|
|
285
|
+
var value1 = value0.contentAuthSystem;
|
|
286
|
+
protocol.writeFieldBegin('contentAuthSystem', thrift_1.Thrift.Type.STRING, 11);
|
|
287
|
+
protocol.writeString(value1);
|
|
288
|
+
protocol.writeFieldEnd();
|
|
289
|
+
}
|
|
290
|
+
if (value0.embeddable !== null && value0.embeddable !== undefined) {
|
|
291
|
+
var value1 = value0.embeddable;
|
|
292
|
+
protocol.writeFieldBegin('embeddable', thrift_1.Thrift.Type.STRING, 12);
|
|
293
|
+
protocol.writeString(value1);
|
|
294
|
+
protocol.writeFieldEnd();
|
|
295
|
+
}
|
|
296
|
+
if (value0.isInappropriateForAdverts !== null && value0.isInappropriateForAdverts !== undefined) {
|
|
297
|
+
var value1 = value0.isInappropriateForAdverts;
|
|
298
|
+
protocol.writeFieldBegin('isInappropriateForAdverts', thrift_1.Thrift.Type.BOOL, 13);
|
|
299
|
+
protocol.writeBool(value1);
|
|
300
|
+
protocol.writeFieldEnd();
|
|
301
|
+
}
|
|
302
|
+
if (value0.mediaId !== null && value0.mediaId !== undefined) {
|
|
303
|
+
var value1 = value0.mediaId;
|
|
304
|
+
protocol.writeFieldBegin('mediaId', thrift_1.Thrift.Type.STRING, 14);
|
|
305
|
+
protocol.writeString(value1);
|
|
306
|
+
protocol.writeFieldEnd();
|
|
307
|
+
}
|
|
308
|
+
if (value0.stillImageUrl !== null && value0.stillImageUrl !== undefined) {
|
|
309
|
+
var value1 = value0.stillImageUrl;
|
|
310
|
+
protocol.writeFieldBegin('stillImageUrl', thrift_1.Thrift.Type.STRING, 15);
|
|
311
|
+
protocol.writeString(value1);
|
|
312
|
+
protocol.writeFieldEnd();
|
|
313
|
+
}
|
|
314
|
+
if (value0.thumbnailUrl !== null && value0.thumbnailUrl !== undefined) {
|
|
315
|
+
var value1 = value0.thumbnailUrl;
|
|
316
|
+
protocol.writeFieldBegin('thumbnailUrl', thrift_1.Thrift.Type.STRING, 16);
|
|
317
|
+
protocol.writeString(value1);
|
|
318
|
+
protocol.writeFieldEnd();
|
|
319
|
+
}
|
|
320
|
+
if (value0.shortUrl !== null && value0.shortUrl !== undefined) {
|
|
321
|
+
var value1 = value0.shortUrl;
|
|
322
|
+
protocol.writeFieldBegin('shortUrl', thrift_1.Thrift.Type.STRING, 17);
|
|
323
|
+
protocol.writeString(value1);
|
|
324
|
+
protocol.writeFieldEnd();
|
|
325
|
+
}
|
|
326
|
+
if (value0.role !== null && value0.role !== undefined) {
|
|
327
|
+
var value1 = value0.role;
|
|
328
|
+
protocol.writeFieldBegin('role', thrift_1.Thrift.Type.STRING, 18);
|
|
329
|
+
protocol.writeString(value1);
|
|
330
|
+
protocol.writeFieldEnd();
|
|
331
|
+
}
|
|
332
|
+
if (value0.originalUrl !== null && value0.originalUrl !== undefined) {
|
|
333
|
+
var value1 = value0.originalUrl;
|
|
334
|
+
protocol.writeFieldBegin('originalUrl', thrift_1.Thrift.Type.STRING, 19);
|
|
335
|
+
protocol.writeString(value1);
|
|
336
|
+
protocol.writeFieldEnd();
|
|
337
|
+
}
|
|
338
|
+
if (value0.sourceDomain !== null && value0.sourceDomain !== undefined) {
|
|
339
|
+
var value1 = value0.sourceDomain;
|
|
340
|
+
protocol.writeFieldBegin('sourceDomain', thrift_1.Thrift.Type.STRING, 20);
|
|
341
|
+
protocol.writeString(value1);
|
|
342
|
+
protocol.writeFieldEnd();
|
|
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
|
+
}
|
|
350
|
+
protocol.writeFieldStop();
|
|
351
|
+
protocol.writeStructEnd();
|
|
352
|
+
};
|
|
353
|
+
return VideoElementFieldsSerde;
|
|
354
|
+
}());
|
|
355
|
+
exports.VideoElementFieldsSerde = VideoElementFieldsSerde;
|
|
@@ -0,0 +1,15 @@
|
|
|
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 { MostViewedVideo } from './mostViewedVideo';
|
|
8
|
+
export interface VideoStatsResponse {
|
|
9
|
+
status: string;
|
|
10
|
+
mostViewedVideos: MostViewedVideo[];
|
|
11
|
+
}
|
|
12
|
+
export declare class VideoStatsResponseSerde {
|
|
13
|
+
static read(protocol: TProtocol): VideoStatsResponse;
|
|
14
|
+
static write(protocol: TProtocol, value0: VideoStatsResponse): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
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.VideoStatsResponseSerde = void 0;
|
|
9
|
+
var thrift_1 = require("thrift");
|
|
10
|
+
var mostViewedVideo_1 = require("./mostViewedVideo");
|
|
11
|
+
var VideoStatsResponseSerde = /** @class */ (function () {
|
|
12
|
+
function VideoStatsResponseSerde() {
|
|
13
|
+
}
|
|
14
|
+
VideoStatsResponseSerde.read = function (protocol) {
|
|
15
|
+
var _a;
|
|
16
|
+
protocol.readStructBegin();
|
|
17
|
+
var result = {};
|
|
18
|
+
while (true) {
|
|
19
|
+
var ret = protocol.readFieldBegin();
|
|
20
|
+
var ftype = ret.ftype;
|
|
21
|
+
var fid = ret.fid;
|
|
22
|
+
if (ftype === thrift_1.Thrift.Type.STOP) {
|
|
23
|
+
break;
|
|
24
|
+
}
|
|
25
|
+
switch (fid) {
|
|
26
|
+
case 1:
|
|
27
|
+
if (ftype === thrift_1.Thrift.Type.STRING) {
|
|
28
|
+
var value1 = protocol.readString();
|
|
29
|
+
result.status = value1;
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
protocol.skip(ftype);
|
|
33
|
+
}
|
|
34
|
+
break;
|
|
35
|
+
case 2:
|
|
36
|
+
if (ftype === thrift_1.Thrift.Type.LIST) {
|
|
37
|
+
var listInfo1 = protocol.readListBegin();
|
|
38
|
+
var listSize1 = (_a = listInfo1.size) !== null && _a !== void 0 ? _a : 0;
|
|
39
|
+
var value1 = [];
|
|
40
|
+
if (listInfo1.etype === thrift_1.Thrift.Type.STRUCT) {
|
|
41
|
+
for (var i = 0; i < listSize1; i++) {
|
|
42
|
+
var value2 = mostViewedVideo_1.MostViewedVideoSerde.read(protocol);
|
|
43
|
+
value1.push(value2);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
protocol.readListEnd();
|
|
47
|
+
result.mostViewedVideos = value1;
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
protocol.skip(ftype);
|
|
51
|
+
}
|
|
52
|
+
break;
|
|
53
|
+
default:
|
|
54
|
+
protocol.skip(ftype);
|
|
55
|
+
}
|
|
56
|
+
protocol.readFieldEnd();
|
|
57
|
+
}
|
|
58
|
+
protocol.readStructEnd();
|
|
59
|
+
// @ts-ignore
|
|
60
|
+
return result;
|
|
61
|
+
};
|
|
62
|
+
VideoStatsResponseSerde.write = function (protocol, value0) {
|
|
63
|
+
protocol.writeStructBegin('VideoStatsResponse');
|
|
64
|
+
if (value0.status !== null && value0.status !== undefined) {
|
|
65
|
+
var value1 = value0.status;
|
|
66
|
+
protocol.writeFieldBegin('status', thrift_1.Thrift.Type.STRING, 1);
|
|
67
|
+
protocol.writeString(value1);
|
|
68
|
+
protocol.writeFieldEnd();
|
|
69
|
+
}
|
|
70
|
+
if (value0.mostViewedVideos !== null && value0.mostViewedVideos !== undefined) {
|
|
71
|
+
var value1 = value0.mostViewedVideos;
|
|
72
|
+
protocol.writeFieldBegin('mostViewedVideos', thrift_1.Thrift.Type.LIST, 2);
|
|
73
|
+
protocol.writeListBegin(thrift_1.Thrift.Type.STRUCT, value1.length);
|
|
74
|
+
value1.forEach(function (value2) {
|
|
75
|
+
mostViewedVideo_1.MostViewedVideoSerde.write(protocol, value2);
|
|
76
|
+
});
|
|
77
|
+
protocol.writeListEnd();
|
|
78
|
+
protocol.writeFieldEnd();
|
|
79
|
+
}
|
|
80
|
+
protocol.writeFieldStop();
|
|
81
|
+
protocol.writeStructEnd();
|
|
82
|
+
};
|
|
83
|
+
return VideoStatsResponseSerde;
|
|
84
|
+
}());
|
|
85
|
+
exports.VideoStatsResponseSerde = VideoStatsResponseSerde;
|
|
@@ -0,0 +1,24 @@
|
|
|
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 VineElementFields {
|
|
8
|
+
originalUrl: string;
|
|
9
|
+
title: string;
|
|
10
|
+
source: string;
|
|
11
|
+
authorUrl: string;
|
|
12
|
+
authorUsername: string;
|
|
13
|
+
html?: string;
|
|
14
|
+
width?: number;
|
|
15
|
+
height?: number;
|
|
16
|
+
alt?: string;
|
|
17
|
+
caption?: string;
|
|
18
|
+
role?: string;
|
|
19
|
+
sourceDomain?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare class VineElementFieldsSerde {
|
|
22
|
+
static read(protocol: TProtocol): VineElementFields;
|
|
23
|
+
static write(protocol: TProtocol, value0: VineElementFields): void;
|
|
24
|
+
}
|