@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
package/v1/tag.js ADDED
@@ -0,0 +1,486 @@
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.TagSerde = void 0;
9
+ var thrift_1 = require("thrift");
10
+ var podcast_1 = require("./podcast");
11
+ var reference_1 = require("./reference");
12
+ var sponsorship_1 = require("./sponsorship");
13
+ var TagSerde = /** @class */ (function () {
14
+ function TagSerde() {
15
+ }
16
+ TagSerde.read = function (protocol) {
17
+ var _a, _b, _c, _d;
18
+ protocol.readStructBegin();
19
+ var result = {};
20
+ while (true) {
21
+ var ret = protocol.readFieldBegin();
22
+ var ftype = ret.ftype;
23
+ var fid = ret.fid;
24
+ if (ftype === thrift_1.Thrift.Type.STOP) {
25
+ break;
26
+ }
27
+ switch (fid) {
28
+ case 1:
29
+ if (ftype === thrift_1.Thrift.Type.STRING) {
30
+ var value1 = protocol.readString();
31
+ result.id = value1;
32
+ }
33
+ else {
34
+ protocol.skip(ftype);
35
+ }
36
+ break;
37
+ case 2:
38
+ if (ftype === thrift_1.Thrift.Type.I32) {
39
+ var value1 = protocol.readI32();
40
+ result.type = value1;
41
+ }
42
+ else {
43
+ protocol.skip(ftype);
44
+ }
45
+ break;
46
+ case 3:
47
+ if (ftype === thrift_1.Thrift.Type.STRING) {
48
+ var value1 = protocol.readString();
49
+ result.sectionId = value1;
50
+ }
51
+ else {
52
+ protocol.skip(ftype);
53
+ }
54
+ break;
55
+ case 4:
56
+ if (ftype === thrift_1.Thrift.Type.STRING) {
57
+ var value1 = protocol.readString();
58
+ result.sectionName = value1;
59
+ }
60
+ else {
61
+ protocol.skip(ftype);
62
+ }
63
+ break;
64
+ case 5:
65
+ if (ftype === thrift_1.Thrift.Type.STRING) {
66
+ var value1 = protocol.readString();
67
+ result.webTitle = value1;
68
+ }
69
+ else {
70
+ protocol.skip(ftype);
71
+ }
72
+ break;
73
+ case 6:
74
+ if (ftype === thrift_1.Thrift.Type.STRING) {
75
+ var value1 = protocol.readString();
76
+ result.webUrl = value1;
77
+ }
78
+ else {
79
+ protocol.skip(ftype);
80
+ }
81
+ break;
82
+ case 7:
83
+ if (ftype === thrift_1.Thrift.Type.STRING) {
84
+ var value1 = protocol.readString();
85
+ result.apiUrl = value1;
86
+ }
87
+ else {
88
+ protocol.skip(ftype);
89
+ }
90
+ break;
91
+ case 8:
92
+ if (ftype === thrift_1.Thrift.Type.LIST) {
93
+ var listInfo1 = protocol.readListBegin();
94
+ var listSize1 = (_a = listInfo1.size) !== null && _a !== void 0 ? _a : 0;
95
+ var value1 = [];
96
+ if (listInfo1.etype === thrift_1.Thrift.Type.STRUCT) {
97
+ for (var i = 0; i < listSize1; i++) {
98
+ var value2 = reference_1.ReferenceSerde.read(protocol);
99
+ value1.push(value2);
100
+ }
101
+ }
102
+ protocol.readListEnd();
103
+ result.references = value1;
104
+ }
105
+ else {
106
+ protocol.skip(ftype);
107
+ }
108
+ break;
109
+ case 9:
110
+ if (ftype === thrift_1.Thrift.Type.STRING) {
111
+ var value1 = protocol.readString();
112
+ result.description = value1;
113
+ }
114
+ else {
115
+ protocol.skip(ftype);
116
+ }
117
+ break;
118
+ case 10:
119
+ if (ftype === thrift_1.Thrift.Type.STRING) {
120
+ var value1 = protocol.readString();
121
+ result.bio = value1;
122
+ }
123
+ else {
124
+ protocol.skip(ftype);
125
+ }
126
+ break;
127
+ case 11:
128
+ if (ftype === thrift_1.Thrift.Type.STRING) {
129
+ var value1 = protocol.readString();
130
+ result.bylineImageUrl = value1;
131
+ }
132
+ else {
133
+ protocol.skip(ftype);
134
+ }
135
+ break;
136
+ case 12:
137
+ if (ftype === thrift_1.Thrift.Type.STRING) {
138
+ var value1 = protocol.readString();
139
+ result.bylineLargeImageUrl = value1;
140
+ }
141
+ else {
142
+ protocol.skip(ftype);
143
+ }
144
+ break;
145
+ case 13:
146
+ if (ftype === thrift_1.Thrift.Type.STRUCT) {
147
+ var value1 = podcast_1.PodcastSerde.read(protocol);
148
+ result.podcast = value1;
149
+ }
150
+ else {
151
+ protocol.skip(ftype);
152
+ }
153
+ break;
154
+ case 14:
155
+ if (ftype === thrift_1.Thrift.Type.STRING) {
156
+ var value1 = protocol.readString();
157
+ result.firstName = value1;
158
+ }
159
+ else {
160
+ protocol.skip(ftype);
161
+ }
162
+ break;
163
+ case 15:
164
+ if (ftype === thrift_1.Thrift.Type.STRING) {
165
+ var value1 = protocol.readString();
166
+ result.lastName = value1;
167
+ }
168
+ else {
169
+ protocol.skip(ftype);
170
+ }
171
+ break;
172
+ case 16:
173
+ if (ftype === thrift_1.Thrift.Type.STRING) {
174
+ var value1 = protocol.readString();
175
+ result.emailAddress = value1;
176
+ }
177
+ else {
178
+ protocol.skip(ftype);
179
+ }
180
+ break;
181
+ case 17:
182
+ if (ftype === thrift_1.Thrift.Type.STRING) {
183
+ var value1 = protocol.readString();
184
+ result.twitterHandle = value1;
185
+ }
186
+ else {
187
+ protocol.skip(ftype);
188
+ }
189
+ break;
190
+ case 18:
191
+ if (ftype === thrift_1.Thrift.Type.LIST) {
192
+ var listInfo1 = protocol.readListBegin();
193
+ var listSize1 = (_b = listInfo1.size) !== null && _b !== void 0 ? _b : 0;
194
+ var value1 = [];
195
+ if (listInfo1.etype === thrift_1.Thrift.Type.STRUCT) {
196
+ for (var i = 0; i < listSize1; i++) {
197
+ var value2 = sponsorship_1.SponsorshipSerde.read(protocol);
198
+ value1.push(value2);
199
+ }
200
+ }
201
+ protocol.readListEnd();
202
+ result.activeSponsorships = value1;
203
+ }
204
+ else {
205
+ protocol.skip(ftype);
206
+ }
207
+ break;
208
+ case 19:
209
+ if (ftype === thrift_1.Thrift.Type.STRING) {
210
+ var value1 = protocol.readString();
211
+ result.paidContentType = value1;
212
+ }
213
+ else {
214
+ protocol.skip(ftype);
215
+ }
216
+ break;
217
+ case 20:
218
+ if (ftype === thrift_1.Thrift.Type.STRING) {
219
+ var value1 = protocol.readString();
220
+ result.paidContentCampaignColour = value1;
221
+ }
222
+ else {
223
+ protocol.skip(ftype);
224
+ }
225
+ break;
226
+ case 21:
227
+ if (ftype === thrift_1.Thrift.Type.STRING) {
228
+ var value1 = protocol.readString();
229
+ result.rcsId = value1;
230
+ }
231
+ else {
232
+ protocol.skip(ftype);
233
+ }
234
+ break;
235
+ case 22:
236
+ if (ftype === thrift_1.Thrift.Type.STRING) {
237
+ var value1 = protocol.readString();
238
+ result.r2ContributorId = value1;
239
+ }
240
+ else {
241
+ protocol.skip(ftype);
242
+ }
243
+ break;
244
+ case 23:
245
+ if (ftype === thrift_1.Thrift.Type.SET) {
246
+ var listInfo1 = protocol.readSetBegin();
247
+ var listSize1 = (_c = listInfo1.size) !== null && _c !== void 0 ? _c : 0;
248
+ var value1 = [];
249
+ if (listInfo1.etype === thrift_1.Thrift.Type.STRING) {
250
+ for (var i = 0; i < listSize1; i++) {
251
+ var value2 = protocol.readString();
252
+ value1.push(value2);
253
+ }
254
+ }
255
+ protocol.readSetEnd();
256
+ result.tagCategories = value1;
257
+ }
258
+ else {
259
+ protocol.skip(ftype);
260
+ }
261
+ break;
262
+ case 24:
263
+ if (ftype === thrift_1.Thrift.Type.SET) {
264
+ var listInfo1 = protocol.readSetBegin();
265
+ var listSize1 = (_d = listInfo1.size) !== null && _d !== void 0 ? _d : 0;
266
+ var value1 = [];
267
+ if (listInfo1.etype === thrift_1.Thrift.Type.STRING) {
268
+ for (var i = 0; i < listSize1; i++) {
269
+ var value2 = protocol.readString();
270
+ value1.push(value2);
271
+ }
272
+ }
273
+ protocol.readSetEnd();
274
+ result.entityIds = value1;
275
+ }
276
+ else {
277
+ protocol.skip(ftype);
278
+ }
279
+ break;
280
+ case 25:
281
+ if (ftype === thrift_1.Thrift.Type.STRING) {
282
+ var value1 = protocol.readString();
283
+ result.campaignInformationType = value1;
284
+ }
285
+ else {
286
+ protocol.skip(ftype);
287
+ }
288
+ break;
289
+ case 26:
290
+ if (ftype === thrift_1.Thrift.Type.STRING) {
291
+ var value1 = protocol.readString();
292
+ result.internalName = value1;
293
+ }
294
+ else {
295
+ protocol.skip(ftype);
296
+ }
297
+ break;
298
+ default:
299
+ protocol.skip(ftype);
300
+ }
301
+ protocol.readFieldEnd();
302
+ }
303
+ protocol.readStructEnd();
304
+ // @ts-ignore
305
+ return result;
306
+ };
307
+ TagSerde.write = function (protocol, value0) {
308
+ protocol.writeStructBegin('Tag');
309
+ if (value0.id !== null && value0.id !== undefined) {
310
+ var value1 = value0.id;
311
+ protocol.writeFieldBegin('id', thrift_1.Thrift.Type.STRING, 1);
312
+ protocol.writeString(value1);
313
+ protocol.writeFieldEnd();
314
+ }
315
+ if (value0.type !== null && value0.type !== undefined) {
316
+ var value1 = value0.type;
317
+ protocol.writeFieldBegin('type', thrift_1.Thrift.Type.I32, 2);
318
+ protocol.writeI32(value1);
319
+ protocol.writeFieldEnd();
320
+ }
321
+ if (value0.sectionId !== null && value0.sectionId !== undefined) {
322
+ var value1 = value0.sectionId;
323
+ protocol.writeFieldBegin('sectionId', thrift_1.Thrift.Type.STRING, 3);
324
+ protocol.writeString(value1);
325
+ protocol.writeFieldEnd();
326
+ }
327
+ if (value0.sectionName !== null && value0.sectionName !== undefined) {
328
+ var value1 = value0.sectionName;
329
+ protocol.writeFieldBegin('sectionName', thrift_1.Thrift.Type.STRING, 4);
330
+ protocol.writeString(value1);
331
+ protocol.writeFieldEnd();
332
+ }
333
+ if (value0.webTitle !== null && value0.webTitle !== undefined) {
334
+ var value1 = value0.webTitle;
335
+ protocol.writeFieldBegin('webTitle', thrift_1.Thrift.Type.STRING, 5);
336
+ protocol.writeString(value1);
337
+ protocol.writeFieldEnd();
338
+ }
339
+ if (value0.webUrl !== null && value0.webUrl !== undefined) {
340
+ var value1 = value0.webUrl;
341
+ protocol.writeFieldBegin('webUrl', thrift_1.Thrift.Type.STRING, 6);
342
+ protocol.writeString(value1);
343
+ protocol.writeFieldEnd();
344
+ }
345
+ if (value0.apiUrl !== null && value0.apiUrl !== undefined) {
346
+ var value1 = value0.apiUrl;
347
+ protocol.writeFieldBegin('apiUrl', thrift_1.Thrift.Type.STRING, 7);
348
+ protocol.writeString(value1);
349
+ protocol.writeFieldEnd();
350
+ }
351
+ if (value0.references !== null && value0.references !== undefined) {
352
+ var value1 = value0.references;
353
+ protocol.writeFieldBegin('references', thrift_1.Thrift.Type.LIST, 8);
354
+ protocol.writeListBegin(thrift_1.Thrift.Type.STRUCT, value1.length);
355
+ value1.forEach(function (value2) {
356
+ reference_1.ReferenceSerde.write(protocol, value2);
357
+ });
358
+ protocol.writeListEnd();
359
+ protocol.writeFieldEnd();
360
+ }
361
+ if (value0.description !== null && value0.description !== undefined) {
362
+ var value1 = value0.description;
363
+ protocol.writeFieldBegin('description', thrift_1.Thrift.Type.STRING, 9);
364
+ protocol.writeString(value1);
365
+ protocol.writeFieldEnd();
366
+ }
367
+ if (value0.bio !== null && value0.bio !== undefined) {
368
+ var value1 = value0.bio;
369
+ protocol.writeFieldBegin('bio', thrift_1.Thrift.Type.STRING, 10);
370
+ protocol.writeString(value1);
371
+ protocol.writeFieldEnd();
372
+ }
373
+ if (value0.bylineImageUrl !== null && value0.bylineImageUrl !== undefined) {
374
+ var value1 = value0.bylineImageUrl;
375
+ protocol.writeFieldBegin('bylineImageUrl', thrift_1.Thrift.Type.STRING, 11);
376
+ protocol.writeString(value1);
377
+ protocol.writeFieldEnd();
378
+ }
379
+ if (value0.bylineLargeImageUrl !== null && value0.bylineLargeImageUrl !== undefined) {
380
+ var value1 = value0.bylineLargeImageUrl;
381
+ protocol.writeFieldBegin('bylineLargeImageUrl', thrift_1.Thrift.Type.STRING, 12);
382
+ protocol.writeString(value1);
383
+ protocol.writeFieldEnd();
384
+ }
385
+ if (value0.podcast !== null && value0.podcast !== undefined) {
386
+ var value1 = value0.podcast;
387
+ protocol.writeFieldBegin('podcast', thrift_1.Thrift.Type.STRUCT, 13);
388
+ podcast_1.PodcastSerde.write(protocol, value1);
389
+ protocol.writeFieldEnd();
390
+ }
391
+ if (value0.firstName !== null && value0.firstName !== undefined) {
392
+ var value1 = value0.firstName;
393
+ protocol.writeFieldBegin('firstName', thrift_1.Thrift.Type.STRING, 14);
394
+ protocol.writeString(value1);
395
+ protocol.writeFieldEnd();
396
+ }
397
+ if (value0.lastName !== null && value0.lastName !== undefined) {
398
+ var value1 = value0.lastName;
399
+ protocol.writeFieldBegin('lastName', thrift_1.Thrift.Type.STRING, 15);
400
+ protocol.writeString(value1);
401
+ protocol.writeFieldEnd();
402
+ }
403
+ if (value0.emailAddress !== null && value0.emailAddress !== undefined) {
404
+ var value1 = value0.emailAddress;
405
+ protocol.writeFieldBegin('emailAddress', thrift_1.Thrift.Type.STRING, 16);
406
+ protocol.writeString(value1);
407
+ protocol.writeFieldEnd();
408
+ }
409
+ if (value0.twitterHandle !== null && value0.twitterHandle !== undefined) {
410
+ var value1 = value0.twitterHandle;
411
+ protocol.writeFieldBegin('twitterHandle', thrift_1.Thrift.Type.STRING, 17);
412
+ protocol.writeString(value1);
413
+ protocol.writeFieldEnd();
414
+ }
415
+ if (value0.activeSponsorships !== null && value0.activeSponsorships !== undefined) {
416
+ var value1 = value0.activeSponsorships;
417
+ protocol.writeFieldBegin('activeSponsorships', thrift_1.Thrift.Type.LIST, 18);
418
+ protocol.writeListBegin(thrift_1.Thrift.Type.STRUCT, value1.length);
419
+ value1.forEach(function (value2) {
420
+ sponsorship_1.SponsorshipSerde.write(protocol, value2);
421
+ });
422
+ protocol.writeListEnd();
423
+ protocol.writeFieldEnd();
424
+ }
425
+ if (value0.paidContentType !== null && value0.paidContentType !== undefined) {
426
+ var value1 = value0.paidContentType;
427
+ protocol.writeFieldBegin('paidContentType', thrift_1.Thrift.Type.STRING, 19);
428
+ protocol.writeString(value1);
429
+ protocol.writeFieldEnd();
430
+ }
431
+ if (value0.paidContentCampaignColour !== null && value0.paidContentCampaignColour !== undefined) {
432
+ var value1 = value0.paidContentCampaignColour;
433
+ protocol.writeFieldBegin('paidContentCampaignColour', thrift_1.Thrift.Type.STRING, 20);
434
+ protocol.writeString(value1);
435
+ protocol.writeFieldEnd();
436
+ }
437
+ if (value0.rcsId !== null && value0.rcsId !== undefined) {
438
+ var value1 = value0.rcsId;
439
+ protocol.writeFieldBegin('rcsId', thrift_1.Thrift.Type.STRING, 21);
440
+ protocol.writeString(value1);
441
+ protocol.writeFieldEnd();
442
+ }
443
+ if (value0.r2ContributorId !== null && value0.r2ContributorId !== undefined) {
444
+ var value1 = value0.r2ContributorId;
445
+ protocol.writeFieldBegin('r2ContributorId', thrift_1.Thrift.Type.STRING, 22);
446
+ protocol.writeString(value1);
447
+ protocol.writeFieldEnd();
448
+ }
449
+ if (value0.tagCategories !== null && value0.tagCategories !== undefined) {
450
+ var value1 = value0.tagCategories;
451
+ protocol.writeFieldBegin('tagCategories', thrift_1.Thrift.Type.SET, 23);
452
+ protocol.writeSetBegin(thrift_1.Thrift.Type.STRING, value1.length);
453
+ value1.forEach(function (value2) {
454
+ protocol.writeString(value2);
455
+ });
456
+ protocol.writeSetEnd();
457
+ protocol.writeFieldEnd();
458
+ }
459
+ if (value0.entityIds !== null && value0.entityIds !== undefined) {
460
+ var value1 = value0.entityIds;
461
+ protocol.writeFieldBegin('entityIds', thrift_1.Thrift.Type.SET, 24);
462
+ protocol.writeSetBegin(thrift_1.Thrift.Type.STRING, value1.length);
463
+ value1.forEach(function (value2) {
464
+ protocol.writeString(value2);
465
+ });
466
+ protocol.writeSetEnd();
467
+ protocol.writeFieldEnd();
468
+ }
469
+ if (value0.campaignInformationType !== null && value0.campaignInformationType !== undefined) {
470
+ var value1 = value0.campaignInformationType;
471
+ protocol.writeFieldBegin('campaignInformationType', thrift_1.Thrift.Type.STRING, 25);
472
+ protocol.writeString(value1);
473
+ protocol.writeFieldEnd();
474
+ }
475
+ if (value0.internalName !== null && value0.internalName !== undefined) {
476
+ var value1 = value0.internalName;
477
+ protocol.writeFieldBegin('internalName', thrift_1.Thrift.Type.STRING, 26);
478
+ protocol.writeString(value1);
479
+ protocol.writeFieldEnd();
480
+ }
481
+ protocol.writeFieldStop();
482
+ protocol.writeStructEnd();
483
+ };
484
+ return TagSerde;
485
+ }());
486
+ exports.TagSerde = TagSerde;
@@ -0,0 +1,19 @@
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
+ export declare enum TagType {
7
+ CONTRIBUTOR = 0,
8
+ KEYWORD = 1,
9
+ SERIES = 2,
10
+ NEWSPAPER_BOOK_SECTION = 3,
11
+ NEWSPAPER_BOOK = 4,
12
+ BLOG = 5,
13
+ TONE = 6,
14
+ TYPE = 7,
15
+ PUBLICATION = 8,
16
+ TRACKING = 9,
17
+ PAID_CONTENT = 10,
18
+ CAMPAIGN = 11
19
+ }
package/v1/tagType.js ADDED
@@ -0,0 +1,23 @@
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.TagType = void 0;
9
+ var TagType;
10
+ (function (TagType) {
11
+ TagType[TagType["CONTRIBUTOR"] = 0] = "CONTRIBUTOR";
12
+ TagType[TagType["KEYWORD"] = 1] = "KEYWORD";
13
+ TagType[TagType["SERIES"] = 2] = "SERIES";
14
+ TagType[TagType["NEWSPAPER_BOOK_SECTION"] = 3] = "NEWSPAPER_BOOK_SECTION";
15
+ TagType[TagType["NEWSPAPER_BOOK"] = 4] = "NEWSPAPER_BOOK";
16
+ TagType[TagType["BLOG"] = 5] = "BLOG";
17
+ TagType[TagType["TONE"] = 6] = "TONE";
18
+ TagType[TagType["TYPE"] = 7] = "TYPE";
19
+ TagType[TagType["PUBLICATION"] = 8] = "PUBLICATION";
20
+ TagType[TagType["TRACKING"] = 9] = "TRACKING";
21
+ TagType[TagType["PAID_CONTENT"] = 10] = "PAID_CONTENT";
22
+ TagType[TagType["CAMPAIGN"] = 11] = "CAMPAIGN";
23
+ })(TagType || (exports.TagType = TagType = {}));
@@ -0,0 +1,21 @@
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 { Tag } from './tag';
8
+ export interface TagsResponse {
9
+ status: string;
10
+ userTier: string;
11
+ total: number;
12
+ startIndex: number;
13
+ pageSize: number;
14
+ currentPage: number;
15
+ pages: number;
16
+ results: Tag[];
17
+ }
18
+ export declare class TagsResponseSerde {
19
+ static read(protocol: TProtocol): TagsResponse;
20
+ static write(protocol: TProtocol, value0: TagsResponse): void;
21
+ }