@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.
Files changed (192) hide show
  1. package/auxiliaryatomevent/v1/auxiliaryAtom.d.ts +14 -0
  2. package/auxiliaryatomevent/v1/auxiliaryAtom.js +70 -0
  3. package/auxiliaryatomevent/v1/auxiliaryAtomEvent.d.ts +17 -0
  4. package/auxiliaryatomevent/v1/auxiliaryAtomEvent.js +100 -0
  5. package/auxiliaryatomevent/v1/eventType.d.ts +9 -0
  6. package/auxiliaryatomevent/v1/eventType.js +13 -0
  7. package/crier/event/v1/deletedContent.d.ts +14 -0
  8. package/crier/event/v1/deletedContent.js +70 -0
  9. package/crier/event/v1/event.d.ts +21 -0
  10. package/crier/event/v1/event.js +116 -0
  11. package/crier/event/v1/eventPayload.d.ts +27 -0
  12. package/crier/event/v1/eventPayload.js +118 -0
  13. package/crier/event/v1/eventType.d.ts +10 -0
  14. package/crier/event/v1/eventType.js +14 -0
  15. package/crier/event/v1/itemType.d.ts +12 -0
  16. package/crier/event/v1/itemType.js +16 -0
  17. package/crier/event/v1/retrievableContent.d.ts +21 -0
  18. package/crier/event/v1/retrievableContent.js +145 -0
  19. package/fastly/event/v1/contentDecachedEvent.d.ts +19 -0
  20. package/fastly/event/v1/contentDecachedEvent.js +100 -0
  21. package/fastly/event/v1/eventType.d.ts +9 -0
  22. package/fastly/event/v1/eventType.js +13 -0
  23. package/package.json +24 -0
  24. package/tsconfig.json +14 -0
  25. package/v1/aliasPath.d.ts +15 -0
  26. package/v1/aliasPath.js +71 -0
  27. package/v1/asset.d.ts +18 -0
  28. package/v1/asset.js +101 -0
  29. package/v1/assetFields.d.ts +85 -0
  30. package/v1/assetFields.js +1106 -0
  31. package/v1/assetType.d.ts +13 -0
  32. package/v1/assetType.js +17 -0
  33. package/v1/atomUsageResponse.d.ts +20 -0
  34. package/v1/atomUsageResponse.js +174 -0
  35. package/v1/atoms.d.ts +29 -0
  36. package/v1/atoms.js +490 -0
  37. package/v1/atomsResponse.d.ts +21 -0
  38. package/v1/atomsResponse.js +175 -0
  39. package/v1/audioElementFields.d.ts +25 -0
  40. package/v1/audioElementFields.js +235 -0
  41. package/v1/block.d.ts +30 -0
  42. package/v1/block.js +283 -0
  43. package/v1/blockAttributes.d.ts +18 -0
  44. package/v1/blockAttributes.js +116 -0
  45. package/v1/blockElement.d.ts +60 -0
  46. package/v1/blockElement.js +451 -0
  47. package/v1/blocks.d.ts +19 -0
  48. package/v1/blocks.js +144 -0
  49. package/v1/calloutElementFields.d.ts +17 -0
  50. package/v1/calloutElementFields.js +115 -0
  51. package/v1/capiDateTime.d.ts +15 -0
  52. package/v1/capiDateTime.js +70 -0
  53. package/v1/cartoonElementFields.d.ts +22 -0
  54. package/v1/cartoonElementFields.js +190 -0
  55. package/v1/cartoonImage.d.ts +17 -0
  56. package/v1/cartoonImage.js +115 -0
  57. package/v1/cartoonVariant.d.ts +15 -0
  58. package/v1/cartoonVariant.js +85 -0
  59. package/v1/channelFields.d.ts +15 -0
  60. package/v1/channelFields.js +71 -0
  61. package/v1/codeElementFields.d.ts +14 -0
  62. package/v1/codeElementFields.js +70 -0
  63. package/v1/commentElementFields.d.ts +24 -0
  64. package/v1/commentElementFields.js +220 -0
  65. package/v1/content.d.ts +53 -0
  66. package/v1/content.js +516 -0
  67. package/v1/contentAtomElementFields.d.ts +16 -0
  68. package/v1/contentAtomElementFields.js +100 -0
  69. package/v1/contentChannel.d.ts +15 -0
  70. package/v1/contentChannel.js +71 -0
  71. package/v1/contentFields.d.ts +67 -0
  72. package/v1/contentFields.js +821 -0
  73. package/v1/contentStats.d.ts +27 -0
  74. package/v1/contentStats.js +265 -0
  75. package/v1/contentType.d.ts +15 -0
  76. package/v1/contentType.js +19 -0
  77. package/v1/crossword.d.ts +31 -0
  78. package/v1/crossword.js +268 -0
  79. package/v1/crosswordCreator.d.ts +14 -0
  80. package/v1/crosswordCreator.js +70 -0
  81. package/v1/crosswordDimensions.d.ts +14 -0
  82. package/v1/crosswordDimensions.js +70 -0
  83. package/v1/crosswordEntry.d.ts +26 -0
  84. package/v1/crosswordEntry.js +249 -0
  85. package/v1/crosswordPosition.d.ts +14 -0
  86. package/v1/crosswordPosition.js +70 -0
  87. package/v1/crosswordType.d.ts +15 -0
  88. package/v1/crosswordType.js +19 -0
  89. package/v1/debug.d.ts +18 -0
  90. package/v1/debug.js +101 -0
  91. package/v1/edition.d.ts +17 -0
  92. package/v1/edition.js +115 -0
  93. package/v1/editionsResponse.d.ts +17 -0
  94. package/v1/editionsResponse.js +115 -0
  95. package/v1/element.d.ts +19 -0
  96. package/v1/element.js +130 -0
  97. package/v1/elementType.d.ts +30 -0
  98. package/v1/elementType.js +34 -0
  99. package/v1/embedElementFields.d.ts +20 -0
  100. package/v1/embedElementFields.js +160 -0
  101. package/v1/embedReach.d.ts +14 -0
  102. package/v1/embedReach.js +69 -0
  103. package/v1/embedTracking.d.ts +14 -0
  104. package/v1/embedTracking.js +58 -0
  105. package/v1/embedTracksType.d.ts +10 -0
  106. package/v1/embedTracksType.js +14 -0
  107. package/v1/entitiesResponse.d.ts +16 -0
  108. package/v1/entitiesResponse.js +100 -0
  109. package/v1/errorResponse.d.ts +14 -0
  110. package/v1/errorResponse.js +70 -0
  111. package/v1/imageElementFields.d.ts +26 -0
  112. package/v1/imageElementFields.js +250 -0
  113. package/v1/instagramElementFields.d.ts +23 -0
  114. package/v1/instagramElementFields.js +205 -0
  115. package/v1/interactiveElementFields.d.ts +24 -0
  116. package/v1/interactiveElementFields.js +220 -0
  117. package/v1/itemResponse.d.ts +53 -0
  118. package/v1/itemResponse.js +676 -0
  119. package/v1/membershipElementFields.d.ts +25 -0
  120. package/v1/membershipElementFields.js +221 -0
  121. package/v1/membershipPlaceholder.d.ts +13 -0
  122. package/v1/membershipPlaceholder.js +55 -0
  123. package/v1/membershipTier.d.ts +9 -0
  124. package/v1/membershipTier.js +13 -0
  125. package/v1/mostViewedVideo.d.ts +14 -0
  126. package/v1/mostViewedVideo.js +70 -0
  127. package/v1/networkFront.d.ts +18 -0
  128. package/v1/networkFront.js +130 -0
  129. package/v1/office.d.ts +10 -0
  130. package/v1/office.js +14 -0
  131. package/v1/package.d.ts +18 -0
  132. package/v1/package.js +116 -0
  133. package/v1/packageArticle.d.ts +16 -0
  134. package/v1/packageArticle.js +72 -0
  135. package/v1/packagesResponse.d.ts +22 -0
  136. package/v1/packagesResponse.js +190 -0
  137. package/v1/pillar.d.ts +15 -0
  138. package/v1/pillar.js +99 -0
  139. package/v1/pillarsResponse.d.ts +16 -0
  140. package/v1/pillarsResponse.js +100 -0
  141. package/v1/platformType.d.ts +10 -0
  142. package/v1/platformType.js +14 -0
  143. package/v1/podcast.d.ts +25 -0
  144. package/v1/podcast.js +235 -0
  145. package/v1/podcastCategory.d.ts +14 -0
  146. package/v1/podcastCategory.js +70 -0
  147. package/v1/pullquoteElementFields.d.ts +17 -0
  148. package/v1/pullquoteElementFields.js +115 -0
  149. package/v1/recipeElementFields.d.ts +13 -0
  150. package/v1/recipeElementFields.js +55 -0
  151. package/v1/reference.d.ts +14 -0
  152. package/v1/reference.js +70 -0
  153. package/v1/richLinkElementFields.d.ts +19 -0
  154. package/v1/richLinkElementFields.js +131 -0
  155. package/v1/rights.d.ts +15 -0
  156. package/v1/rights.js +89 -0
  157. package/v1/searchResponse.d.ts +22 -0
  158. package/v1/searchResponse.js +190 -0
  159. package/v1/section.d.ts +20 -0
  160. package/v1/section.js +159 -0
  161. package/v1/sectionsResponse.d.ts +17 -0
  162. package/v1/sectionsResponse.js +115 -0
  163. package/v1/sponsorship.d.ts +27 -0
  164. package/v1/sponsorship.js +208 -0
  165. package/v1/sponsorshipLogoDimensions.d.ts +14 -0
  166. package/v1/sponsorshipLogoDimensions.js +70 -0
  167. package/v1/sponsorshipTargeting.d.ts +15 -0
  168. package/v1/sponsorshipTargeting.js +85 -0
  169. package/v1/sponsorshipType.d.ts +10 -0
  170. package/v1/sponsorshipType.js +14 -0
  171. package/v1/standardElementFields.d.ts +25 -0
  172. package/v1/standardElementFields.js +235 -0
  173. package/v1/tag.d.ts +42 -0
  174. package/v1/tag.js +486 -0
  175. package/v1/tagType.d.ts +19 -0
  176. package/v1/tagType.js +23 -0
  177. package/v1/tagsResponse.d.ts +21 -0
  178. package/v1/tagsResponse.js +175 -0
  179. package/v1/textElementFields.d.ts +14 -0
  180. package/v1/textElementFields.js +70 -0
  181. package/v1/tweetElementFields.d.ts +20 -0
  182. package/v1/tweetElementFields.js +160 -0
  183. package/v1/user.d.ts +15 -0
  184. package/v1/user.js +85 -0
  185. package/v1/videoElementFields.d.ts +33 -0
  186. package/v1/videoElementFields.js +355 -0
  187. package/v1/videoStatsResponse.d.ts +15 -0
  188. package/v1/videoStatsResponse.js +85 -0
  189. package/v1/vineElementFields.d.ts +24 -0
  190. package/v1/vineElementFields.js +220 -0
  191. package/v1/witnessElementFields.d.ts +40 -0
  192. package/v1/witnessElementFields.js +446 -0
@@ -0,0 +1,676 @@
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.ItemResponseSerde = void 0;
9
+ var thrift_1 = require("thrift");
10
+ var content_1 = require("./content");
11
+ var edition_1 = require("./edition");
12
+ var package_1 = require("./package");
13
+ var section_1 = require("./section");
14
+ var tag_1 = require("./tag");
15
+ var atom_1 = require("@guardian/content-atom-model/atom");
16
+ var ItemResponseSerde = /** @class */ (function () {
17
+ function ItemResponseSerde() {
18
+ }
19
+ ItemResponseSerde.read = function (protocol) {
20
+ var _a, _b, _c, _d, _e, _f, _g, _h;
21
+ protocol.readStructBegin();
22
+ var result = {};
23
+ while (true) {
24
+ var ret = protocol.readFieldBegin();
25
+ var ftype = ret.ftype;
26
+ var fid = ret.fid;
27
+ if (ftype === thrift_1.Thrift.Type.STOP) {
28
+ break;
29
+ }
30
+ switch (fid) {
31
+ case 1:
32
+ if (ftype === thrift_1.Thrift.Type.STRING) {
33
+ var value1 = protocol.readString();
34
+ result.status = value1;
35
+ }
36
+ else {
37
+ protocol.skip(ftype);
38
+ }
39
+ break;
40
+ case 2:
41
+ if (ftype === thrift_1.Thrift.Type.STRING) {
42
+ var value1 = protocol.readString();
43
+ result.userTier = value1;
44
+ }
45
+ else {
46
+ protocol.skip(ftype);
47
+ }
48
+ break;
49
+ case 3:
50
+ if (ftype === thrift_1.Thrift.Type.I32) {
51
+ var value1 = protocol.readI32();
52
+ result.total = value1;
53
+ }
54
+ else {
55
+ protocol.skip(ftype);
56
+ }
57
+ break;
58
+ case 4:
59
+ if (ftype === thrift_1.Thrift.Type.I32) {
60
+ var value1 = protocol.readI32();
61
+ result.startIndex = value1;
62
+ }
63
+ else {
64
+ protocol.skip(ftype);
65
+ }
66
+ break;
67
+ case 5:
68
+ if (ftype === thrift_1.Thrift.Type.I32) {
69
+ var value1 = protocol.readI32();
70
+ result.pageSize = value1;
71
+ }
72
+ else {
73
+ protocol.skip(ftype);
74
+ }
75
+ break;
76
+ case 6:
77
+ if (ftype === thrift_1.Thrift.Type.I32) {
78
+ var value1 = protocol.readI32();
79
+ result.currentPage = value1;
80
+ }
81
+ else {
82
+ protocol.skip(ftype);
83
+ }
84
+ break;
85
+ case 7:
86
+ if (ftype === thrift_1.Thrift.Type.I32) {
87
+ var value1 = protocol.readI32();
88
+ result.pages = value1;
89
+ }
90
+ else {
91
+ protocol.skip(ftype);
92
+ }
93
+ break;
94
+ case 8:
95
+ if (ftype === thrift_1.Thrift.Type.STRING) {
96
+ var value1 = protocol.readString();
97
+ result.orderBy = value1;
98
+ }
99
+ else {
100
+ protocol.skip(ftype);
101
+ }
102
+ break;
103
+ case 9:
104
+ if (ftype === thrift_1.Thrift.Type.STRUCT) {
105
+ var value1 = content_1.ContentSerde.read(protocol);
106
+ result.content = value1;
107
+ }
108
+ else {
109
+ protocol.skip(ftype);
110
+ }
111
+ break;
112
+ case 10:
113
+ if (ftype === thrift_1.Thrift.Type.STRUCT) {
114
+ var value1 = tag_1.TagSerde.read(protocol);
115
+ result.tag = value1;
116
+ }
117
+ else {
118
+ protocol.skip(ftype);
119
+ }
120
+ break;
121
+ case 11:
122
+ if (ftype === thrift_1.Thrift.Type.STRUCT) {
123
+ var value1 = edition_1.EditionSerde.read(protocol);
124
+ result.edition = value1;
125
+ }
126
+ else {
127
+ protocol.skip(ftype);
128
+ }
129
+ break;
130
+ case 12:
131
+ if (ftype === thrift_1.Thrift.Type.STRUCT) {
132
+ var value1 = section_1.SectionSerde.read(protocol);
133
+ result.section = value1;
134
+ }
135
+ else {
136
+ protocol.skip(ftype);
137
+ }
138
+ break;
139
+ case 13:
140
+ if (ftype === thrift_1.Thrift.Type.LIST) {
141
+ var listInfo1 = protocol.readListBegin();
142
+ var listSize1 = (_a = listInfo1.size) !== null && _a !== void 0 ? _a : 0;
143
+ var value1 = [];
144
+ if (listInfo1.etype === thrift_1.Thrift.Type.STRUCT) {
145
+ for (var i = 0; i < listSize1; i++) {
146
+ var value2 = content_1.ContentSerde.read(protocol);
147
+ value1.push(value2);
148
+ }
149
+ }
150
+ protocol.readListEnd();
151
+ result.results = value1;
152
+ }
153
+ else {
154
+ protocol.skip(ftype);
155
+ }
156
+ break;
157
+ case 14:
158
+ if (ftype === thrift_1.Thrift.Type.STRUCT) {
159
+ var value1 = atom_1.AtomSerde.read(protocol);
160
+ result.quiz = value1;
161
+ }
162
+ else {
163
+ protocol.skip(ftype);
164
+ }
165
+ break;
166
+ case 15:
167
+ if (ftype === thrift_1.Thrift.Type.LIST) {
168
+ var listInfo1 = protocol.readListBegin();
169
+ var listSize1 = (_b = listInfo1.size) !== null && _b !== void 0 ? _b : 0;
170
+ var value1 = [];
171
+ if (listInfo1.etype === thrift_1.Thrift.Type.STRUCT) {
172
+ for (var i = 0; i < listSize1; i++) {
173
+ var value2 = content_1.ContentSerde.read(protocol);
174
+ value1.push(value2);
175
+ }
176
+ }
177
+ protocol.readListEnd();
178
+ result.relatedContent = value1;
179
+ }
180
+ else {
181
+ protocol.skip(ftype);
182
+ }
183
+ break;
184
+ case 16:
185
+ if (ftype === thrift_1.Thrift.Type.LIST) {
186
+ var listInfo1 = protocol.readListBegin();
187
+ var listSize1 = (_c = listInfo1.size) !== null && _c !== void 0 ? _c : 0;
188
+ var value1 = [];
189
+ if (listInfo1.etype === thrift_1.Thrift.Type.STRUCT) {
190
+ for (var i = 0; i < listSize1; i++) {
191
+ var value2 = content_1.ContentSerde.read(protocol);
192
+ value1.push(value2);
193
+ }
194
+ }
195
+ protocol.readListEnd();
196
+ result.storyPackage = value1;
197
+ }
198
+ else {
199
+ protocol.skip(ftype);
200
+ }
201
+ break;
202
+ case 17:
203
+ if (ftype === thrift_1.Thrift.Type.LIST) {
204
+ var listInfo1 = protocol.readListBegin();
205
+ var listSize1 = (_d = listInfo1.size) !== null && _d !== void 0 ? _d : 0;
206
+ var value1 = [];
207
+ if (listInfo1.etype === thrift_1.Thrift.Type.STRUCT) {
208
+ for (var i = 0; i < listSize1; i++) {
209
+ var value2 = content_1.ContentSerde.read(protocol);
210
+ value1.push(value2);
211
+ }
212
+ }
213
+ protocol.readListEnd();
214
+ result.editorsPicks = value1;
215
+ }
216
+ else {
217
+ protocol.skip(ftype);
218
+ }
219
+ break;
220
+ case 18:
221
+ if (ftype === thrift_1.Thrift.Type.LIST) {
222
+ var listInfo1 = protocol.readListBegin();
223
+ var listSize1 = (_e = listInfo1.size) !== null && _e !== void 0 ? _e : 0;
224
+ var value1 = [];
225
+ if (listInfo1.etype === thrift_1.Thrift.Type.STRUCT) {
226
+ for (var i = 0; i < listSize1; i++) {
227
+ var value2 = content_1.ContentSerde.read(protocol);
228
+ value1.push(value2);
229
+ }
230
+ }
231
+ protocol.readListEnd();
232
+ result.mostViewed = value1;
233
+ }
234
+ else {
235
+ protocol.skip(ftype);
236
+ }
237
+ break;
238
+ case 19:
239
+ if (ftype === thrift_1.Thrift.Type.LIST) {
240
+ var listInfo1 = protocol.readListBegin();
241
+ var listSize1 = (_f = listInfo1.size) !== null && _f !== void 0 ? _f : 0;
242
+ var value1 = [];
243
+ if (listInfo1.etype === thrift_1.Thrift.Type.STRUCT) {
244
+ for (var i = 0; i < listSize1; i++) {
245
+ var value2 = content_1.ContentSerde.read(protocol);
246
+ value1.push(value2);
247
+ }
248
+ }
249
+ protocol.readListEnd();
250
+ result.leadContent = value1;
251
+ }
252
+ else {
253
+ protocol.skip(ftype);
254
+ }
255
+ break;
256
+ case 20:
257
+ if (ftype === thrift_1.Thrift.Type.LIST) {
258
+ var listInfo1 = protocol.readListBegin();
259
+ var listSize1 = (_g = listInfo1.size) !== null && _g !== void 0 ? _g : 0;
260
+ var value1 = [];
261
+ if (listInfo1.etype === thrift_1.Thrift.Type.STRUCT) {
262
+ for (var i = 0; i < listSize1; i++) {
263
+ var value2 = package_1.PackageSerde.read(protocol);
264
+ value1.push(value2);
265
+ }
266
+ }
267
+ protocol.readListEnd();
268
+ result.packages = value1;
269
+ }
270
+ else {
271
+ protocol.skip(ftype);
272
+ }
273
+ break;
274
+ case 21:
275
+ if (ftype === thrift_1.Thrift.Type.LIST) {
276
+ var listInfo1 = protocol.readListBegin();
277
+ var listSize1 = (_h = listInfo1.size) !== null && _h !== void 0 ? _h : 0;
278
+ var value1 = [];
279
+ if (listInfo1.etype === thrift_1.Thrift.Type.STRUCT) {
280
+ for (var i = 0; i < listSize1; i++) {
281
+ var value2 = atom_1.AtomSerde.read(protocol);
282
+ value1.push(value2);
283
+ }
284
+ }
285
+ protocol.readListEnd();
286
+ result.viewpoints = value1;
287
+ }
288
+ else {
289
+ protocol.skip(ftype);
290
+ }
291
+ break;
292
+ case 22:
293
+ if (ftype === thrift_1.Thrift.Type.STRUCT) {
294
+ var value1 = atom_1.AtomSerde.read(protocol);
295
+ result.media = value1;
296
+ }
297
+ else {
298
+ protocol.skip(ftype);
299
+ }
300
+ break;
301
+ case 23:
302
+ if (ftype === thrift_1.Thrift.Type.STRUCT) {
303
+ var value1 = atom_1.AtomSerde.read(protocol);
304
+ result.explainer = value1;
305
+ }
306
+ else {
307
+ protocol.skip(ftype);
308
+ }
309
+ break;
310
+ case 24:
311
+ if (ftype === thrift_1.Thrift.Type.STRUCT) {
312
+ var value1 = atom_1.AtomSerde.read(protocol);
313
+ result.cta = value1;
314
+ }
315
+ else {
316
+ protocol.skip(ftype);
317
+ }
318
+ break;
319
+ case 25:
320
+ if (ftype === thrift_1.Thrift.Type.STRUCT) {
321
+ var value1 = atom_1.AtomSerde.read(protocol);
322
+ result.interactive = value1;
323
+ }
324
+ else {
325
+ protocol.skip(ftype);
326
+ }
327
+ break;
328
+ case 26:
329
+ if (ftype === thrift_1.Thrift.Type.STRUCT) {
330
+ var value1 = atom_1.AtomSerde.read(protocol);
331
+ result.review = value1;
332
+ }
333
+ else {
334
+ protocol.skip(ftype);
335
+ }
336
+ break;
337
+ case 27:
338
+ if (ftype === thrift_1.Thrift.Type.STRUCT) {
339
+ var value1 = atom_1.AtomSerde.read(protocol);
340
+ result.recipe = value1;
341
+ }
342
+ else {
343
+ protocol.skip(ftype);
344
+ }
345
+ break;
346
+ case 30:
347
+ if (ftype === thrift_1.Thrift.Type.STRUCT) {
348
+ var value1 = atom_1.AtomSerde.read(protocol);
349
+ result.qanda = value1;
350
+ }
351
+ else {
352
+ protocol.skip(ftype);
353
+ }
354
+ break;
355
+ case 31:
356
+ if (ftype === thrift_1.Thrift.Type.STRUCT) {
357
+ var value1 = atom_1.AtomSerde.read(protocol);
358
+ result.guide = value1;
359
+ }
360
+ else {
361
+ protocol.skip(ftype);
362
+ }
363
+ break;
364
+ case 32:
365
+ if (ftype === thrift_1.Thrift.Type.STRUCT) {
366
+ var value1 = atom_1.AtomSerde.read(protocol);
367
+ result.profile = value1;
368
+ }
369
+ else {
370
+ protocol.skip(ftype);
371
+ }
372
+ break;
373
+ case 33:
374
+ if (ftype === thrift_1.Thrift.Type.STRUCT) {
375
+ var value1 = atom_1.AtomSerde.read(protocol);
376
+ result.timeline = value1;
377
+ }
378
+ else {
379
+ protocol.skip(ftype);
380
+ }
381
+ break;
382
+ case 34:
383
+ if (ftype === thrift_1.Thrift.Type.STRUCT) {
384
+ var value1 = atom_1.AtomSerde.read(protocol);
385
+ result.commonsdivision = value1;
386
+ }
387
+ else {
388
+ protocol.skip(ftype);
389
+ }
390
+ break;
391
+ case 35:
392
+ if (ftype === thrift_1.Thrift.Type.STRUCT) {
393
+ var value1 = atom_1.AtomSerde.read(protocol);
394
+ result.chart = value1;
395
+ }
396
+ else {
397
+ protocol.skip(ftype);
398
+ }
399
+ break;
400
+ case 36:
401
+ if (ftype === thrift_1.Thrift.Type.STRUCT) {
402
+ var value1 = atom_1.AtomSerde.read(protocol);
403
+ result.audio = value1;
404
+ }
405
+ else {
406
+ protocol.skip(ftype);
407
+ }
408
+ break;
409
+ case 37:
410
+ if (ftype === thrift_1.Thrift.Type.STRUCT) {
411
+ var value1 = atom_1.AtomSerde.read(protocol);
412
+ result.emailsignup = value1;
413
+ }
414
+ else {
415
+ protocol.skip(ftype);
416
+ }
417
+ break;
418
+ default:
419
+ protocol.skip(ftype);
420
+ }
421
+ protocol.readFieldEnd();
422
+ }
423
+ protocol.readStructEnd();
424
+ // @ts-ignore
425
+ return result;
426
+ };
427
+ ItemResponseSerde.write = function (protocol, value0) {
428
+ protocol.writeStructBegin('ItemResponse');
429
+ if (value0.status !== null && value0.status !== undefined) {
430
+ var value1 = value0.status;
431
+ protocol.writeFieldBegin('status', thrift_1.Thrift.Type.STRING, 1);
432
+ protocol.writeString(value1);
433
+ protocol.writeFieldEnd();
434
+ }
435
+ if (value0.userTier !== null && value0.userTier !== undefined) {
436
+ var value1 = value0.userTier;
437
+ protocol.writeFieldBegin('userTier', thrift_1.Thrift.Type.STRING, 2);
438
+ protocol.writeString(value1);
439
+ protocol.writeFieldEnd();
440
+ }
441
+ if (value0.total !== null && value0.total !== undefined) {
442
+ var value1 = value0.total;
443
+ protocol.writeFieldBegin('total', thrift_1.Thrift.Type.I32, 3);
444
+ protocol.writeI32(value1);
445
+ protocol.writeFieldEnd();
446
+ }
447
+ if (value0.startIndex !== null && value0.startIndex !== undefined) {
448
+ var value1 = value0.startIndex;
449
+ protocol.writeFieldBegin('startIndex', thrift_1.Thrift.Type.I32, 4);
450
+ protocol.writeI32(value1);
451
+ protocol.writeFieldEnd();
452
+ }
453
+ if (value0.pageSize !== null && value0.pageSize !== undefined) {
454
+ var value1 = value0.pageSize;
455
+ protocol.writeFieldBegin('pageSize', thrift_1.Thrift.Type.I32, 5);
456
+ protocol.writeI32(value1);
457
+ protocol.writeFieldEnd();
458
+ }
459
+ if (value0.currentPage !== null && value0.currentPage !== undefined) {
460
+ var value1 = value0.currentPage;
461
+ protocol.writeFieldBegin('currentPage', thrift_1.Thrift.Type.I32, 6);
462
+ protocol.writeI32(value1);
463
+ protocol.writeFieldEnd();
464
+ }
465
+ if (value0.pages !== null && value0.pages !== undefined) {
466
+ var value1 = value0.pages;
467
+ protocol.writeFieldBegin('pages', thrift_1.Thrift.Type.I32, 7);
468
+ protocol.writeI32(value1);
469
+ protocol.writeFieldEnd();
470
+ }
471
+ if (value0.orderBy !== null && value0.orderBy !== undefined) {
472
+ var value1 = value0.orderBy;
473
+ protocol.writeFieldBegin('orderBy', thrift_1.Thrift.Type.STRING, 8);
474
+ protocol.writeString(value1);
475
+ protocol.writeFieldEnd();
476
+ }
477
+ if (value0.content !== null && value0.content !== undefined) {
478
+ var value1 = value0.content;
479
+ protocol.writeFieldBegin('content', thrift_1.Thrift.Type.STRUCT, 9);
480
+ content_1.ContentSerde.write(protocol, value1);
481
+ protocol.writeFieldEnd();
482
+ }
483
+ if (value0.tag !== null && value0.tag !== undefined) {
484
+ var value1 = value0.tag;
485
+ protocol.writeFieldBegin('tag', thrift_1.Thrift.Type.STRUCT, 10);
486
+ tag_1.TagSerde.write(protocol, value1);
487
+ protocol.writeFieldEnd();
488
+ }
489
+ if (value0.edition !== null && value0.edition !== undefined) {
490
+ var value1 = value0.edition;
491
+ protocol.writeFieldBegin('edition', thrift_1.Thrift.Type.STRUCT, 11);
492
+ edition_1.EditionSerde.write(protocol, value1);
493
+ protocol.writeFieldEnd();
494
+ }
495
+ if (value0.section !== null && value0.section !== undefined) {
496
+ var value1 = value0.section;
497
+ protocol.writeFieldBegin('section', thrift_1.Thrift.Type.STRUCT, 12);
498
+ section_1.SectionSerde.write(protocol, value1);
499
+ protocol.writeFieldEnd();
500
+ }
501
+ if (value0.results !== null && value0.results !== undefined) {
502
+ var value1 = value0.results;
503
+ protocol.writeFieldBegin('results', thrift_1.Thrift.Type.LIST, 13);
504
+ protocol.writeListBegin(thrift_1.Thrift.Type.STRUCT, value1.length);
505
+ value1.forEach(function (value2) {
506
+ content_1.ContentSerde.write(protocol, value2);
507
+ });
508
+ protocol.writeListEnd();
509
+ protocol.writeFieldEnd();
510
+ }
511
+ if (value0.quiz !== null && value0.quiz !== undefined) {
512
+ var value1 = value0.quiz;
513
+ protocol.writeFieldBegin('quiz', thrift_1.Thrift.Type.STRUCT, 14);
514
+ atom_1.AtomSerde.write(protocol, value1);
515
+ protocol.writeFieldEnd();
516
+ }
517
+ if (value0.relatedContent !== null && value0.relatedContent !== undefined) {
518
+ var value1 = value0.relatedContent;
519
+ protocol.writeFieldBegin('relatedContent', thrift_1.Thrift.Type.LIST, 15);
520
+ protocol.writeListBegin(thrift_1.Thrift.Type.STRUCT, value1.length);
521
+ value1.forEach(function (value2) {
522
+ content_1.ContentSerde.write(protocol, value2);
523
+ });
524
+ protocol.writeListEnd();
525
+ protocol.writeFieldEnd();
526
+ }
527
+ if (value0.storyPackage !== null && value0.storyPackage !== undefined) {
528
+ var value1 = value0.storyPackage;
529
+ protocol.writeFieldBegin('storyPackage', thrift_1.Thrift.Type.LIST, 16);
530
+ protocol.writeListBegin(thrift_1.Thrift.Type.STRUCT, value1.length);
531
+ value1.forEach(function (value2) {
532
+ content_1.ContentSerde.write(protocol, value2);
533
+ });
534
+ protocol.writeListEnd();
535
+ protocol.writeFieldEnd();
536
+ }
537
+ if (value0.editorsPicks !== null && value0.editorsPicks !== undefined) {
538
+ var value1 = value0.editorsPicks;
539
+ protocol.writeFieldBegin('editorsPicks', thrift_1.Thrift.Type.LIST, 17);
540
+ protocol.writeListBegin(thrift_1.Thrift.Type.STRUCT, value1.length);
541
+ value1.forEach(function (value2) {
542
+ content_1.ContentSerde.write(protocol, value2);
543
+ });
544
+ protocol.writeListEnd();
545
+ protocol.writeFieldEnd();
546
+ }
547
+ if (value0.mostViewed !== null && value0.mostViewed !== undefined) {
548
+ var value1 = value0.mostViewed;
549
+ protocol.writeFieldBegin('mostViewed', thrift_1.Thrift.Type.LIST, 18);
550
+ protocol.writeListBegin(thrift_1.Thrift.Type.STRUCT, value1.length);
551
+ value1.forEach(function (value2) {
552
+ content_1.ContentSerde.write(protocol, value2);
553
+ });
554
+ protocol.writeListEnd();
555
+ protocol.writeFieldEnd();
556
+ }
557
+ if (value0.leadContent !== null && value0.leadContent !== undefined) {
558
+ var value1 = value0.leadContent;
559
+ protocol.writeFieldBegin('leadContent', thrift_1.Thrift.Type.LIST, 19);
560
+ protocol.writeListBegin(thrift_1.Thrift.Type.STRUCT, value1.length);
561
+ value1.forEach(function (value2) {
562
+ content_1.ContentSerde.write(protocol, value2);
563
+ });
564
+ protocol.writeListEnd();
565
+ protocol.writeFieldEnd();
566
+ }
567
+ if (value0.packages !== null && value0.packages !== undefined) {
568
+ var value1 = value0.packages;
569
+ protocol.writeFieldBegin('packages', thrift_1.Thrift.Type.LIST, 20);
570
+ protocol.writeListBegin(thrift_1.Thrift.Type.STRUCT, value1.length);
571
+ value1.forEach(function (value2) {
572
+ package_1.PackageSerde.write(protocol, value2);
573
+ });
574
+ protocol.writeListEnd();
575
+ protocol.writeFieldEnd();
576
+ }
577
+ if (value0.viewpoints !== null && value0.viewpoints !== undefined) {
578
+ var value1 = value0.viewpoints;
579
+ protocol.writeFieldBegin('viewpoints', thrift_1.Thrift.Type.LIST, 21);
580
+ protocol.writeListBegin(thrift_1.Thrift.Type.STRUCT, value1.length);
581
+ value1.forEach(function (value2) {
582
+ atom_1.AtomSerde.write(protocol, value2);
583
+ });
584
+ protocol.writeListEnd();
585
+ protocol.writeFieldEnd();
586
+ }
587
+ if (value0.media !== null && value0.media !== undefined) {
588
+ var value1 = value0.media;
589
+ protocol.writeFieldBegin('media', thrift_1.Thrift.Type.STRUCT, 22);
590
+ atom_1.AtomSerde.write(protocol, value1);
591
+ protocol.writeFieldEnd();
592
+ }
593
+ if (value0.explainer !== null && value0.explainer !== undefined) {
594
+ var value1 = value0.explainer;
595
+ protocol.writeFieldBegin('explainer', thrift_1.Thrift.Type.STRUCT, 23);
596
+ atom_1.AtomSerde.write(protocol, value1);
597
+ protocol.writeFieldEnd();
598
+ }
599
+ if (value0.cta !== null && value0.cta !== undefined) {
600
+ var value1 = value0.cta;
601
+ protocol.writeFieldBegin('cta', thrift_1.Thrift.Type.STRUCT, 24);
602
+ atom_1.AtomSerde.write(protocol, value1);
603
+ protocol.writeFieldEnd();
604
+ }
605
+ if (value0.interactive !== null && value0.interactive !== undefined) {
606
+ var value1 = value0.interactive;
607
+ protocol.writeFieldBegin('interactive', thrift_1.Thrift.Type.STRUCT, 25);
608
+ atom_1.AtomSerde.write(protocol, value1);
609
+ protocol.writeFieldEnd();
610
+ }
611
+ if (value0.review !== null && value0.review !== undefined) {
612
+ var value1 = value0.review;
613
+ protocol.writeFieldBegin('review', thrift_1.Thrift.Type.STRUCT, 26);
614
+ atom_1.AtomSerde.write(protocol, value1);
615
+ protocol.writeFieldEnd();
616
+ }
617
+ if (value0.recipe !== null && value0.recipe !== undefined) {
618
+ var value1 = value0.recipe;
619
+ protocol.writeFieldBegin('recipe', thrift_1.Thrift.Type.STRUCT, 27);
620
+ atom_1.AtomSerde.write(protocol, value1);
621
+ protocol.writeFieldEnd();
622
+ }
623
+ if (value0.qanda !== null && value0.qanda !== undefined) {
624
+ var value1 = value0.qanda;
625
+ protocol.writeFieldBegin('qanda', thrift_1.Thrift.Type.STRUCT, 30);
626
+ atom_1.AtomSerde.write(protocol, value1);
627
+ protocol.writeFieldEnd();
628
+ }
629
+ if (value0.guide !== null && value0.guide !== undefined) {
630
+ var value1 = value0.guide;
631
+ protocol.writeFieldBegin('guide', thrift_1.Thrift.Type.STRUCT, 31);
632
+ atom_1.AtomSerde.write(protocol, value1);
633
+ protocol.writeFieldEnd();
634
+ }
635
+ if (value0.profile !== null && value0.profile !== undefined) {
636
+ var value1 = value0.profile;
637
+ protocol.writeFieldBegin('profile', thrift_1.Thrift.Type.STRUCT, 32);
638
+ atom_1.AtomSerde.write(protocol, value1);
639
+ protocol.writeFieldEnd();
640
+ }
641
+ if (value0.timeline !== null && value0.timeline !== undefined) {
642
+ var value1 = value0.timeline;
643
+ protocol.writeFieldBegin('timeline', thrift_1.Thrift.Type.STRUCT, 33);
644
+ atom_1.AtomSerde.write(protocol, value1);
645
+ protocol.writeFieldEnd();
646
+ }
647
+ if (value0.commonsdivision !== null && value0.commonsdivision !== undefined) {
648
+ var value1 = value0.commonsdivision;
649
+ protocol.writeFieldBegin('commonsdivision', thrift_1.Thrift.Type.STRUCT, 34);
650
+ atom_1.AtomSerde.write(protocol, value1);
651
+ protocol.writeFieldEnd();
652
+ }
653
+ if (value0.chart !== null && value0.chart !== undefined) {
654
+ var value1 = value0.chart;
655
+ protocol.writeFieldBegin('chart', thrift_1.Thrift.Type.STRUCT, 35);
656
+ atom_1.AtomSerde.write(protocol, value1);
657
+ protocol.writeFieldEnd();
658
+ }
659
+ if (value0.audio !== null && value0.audio !== undefined) {
660
+ var value1 = value0.audio;
661
+ protocol.writeFieldBegin('audio', thrift_1.Thrift.Type.STRUCT, 36);
662
+ atom_1.AtomSerde.write(protocol, value1);
663
+ protocol.writeFieldEnd();
664
+ }
665
+ if (value0.emailsignup !== null && value0.emailsignup !== undefined) {
666
+ var value1 = value0.emailsignup;
667
+ protocol.writeFieldBegin('emailsignup', thrift_1.Thrift.Type.STRUCT, 37);
668
+ atom_1.AtomSerde.write(protocol, value1);
669
+ protocol.writeFieldEnd();
670
+ }
671
+ protocol.writeFieldStop();
672
+ protocol.writeStructEnd();
673
+ };
674
+ return ItemResponseSerde;
675
+ }());
676
+ exports.ItemResponseSerde = ItemResponseSerde;