@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,27 @@
|
|
|
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 ContentStats {
|
|
8
|
+
videos: number;
|
|
9
|
+
images: number;
|
|
10
|
+
text: number;
|
|
11
|
+
tweets: number;
|
|
12
|
+
pullquotes: number;
|
|
13
|
+
audio: number;
|
|
14
|
+
interactives: number;
|
|
15
|
+
witness: number;
|
|
16
|
+
richlinks: number;
|
|
17
|
+
membership: number;
|
|
18
|
+
embeds: number;
|
|
19
|
+
comments: number;
|
|
20
|
+
instagram: number;
|
|
21
|
+
vines: number;
|
|
22
|
+
callouts: number;
|
|
23
|
+
}
|
|
24
|
+
export declare class ContentStatsSerde {
|
|
25
|
+
static read(protocol: TProtocol): ContentStats;
|
|
26
|
+
static write(protocol: TProtocol, value0: ContentStats): void;
|
|
27
|
+
}
|
|
@@ -0,0 +1,265 @@
|
|
|
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.ContentStatsSerde = void 0;
|
|
9
|
+
var thrift_1 = require("thrift");
|
|
10
|
+
var ContentStatsSerde = /** @class */ (function () {
|
|
11
|
+
function ContentStatsSerde() {
|
|
12
|
+
}
|
|
13
|
+
ContentStatsSerde.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.I32) {
|
|
26
|
+
var value1 = protocol.readI32();
|
|
27
|
+
result.videos = value1;
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
protocol.skip(ftype);
|
|
31
|
+
}
|
|
32
|
+
break;
|
|
33
|
+
case 2:
|
|
34
|
+
if (ftype === thrift_1.Thrift.Type.I32) {
|
|
35
|
+
var value1 = protocol.readI32();
|
|
36
|
+
result.images = value1;
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
protocol.skip(ftype);
|
|
40
|
+
}
|
|
41
|
+
break;
|
|
42
|
+
case 3:
|
|
43
|
+
if (ftype === thrift_1.Thrift.Type.I32) {
|
|
44
|
+
var value1 = protocol.readI32();
|
|
45
|
+
result.text = value1;
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
protocol.skip(ftype);
|
|
49
|
+
}
|
|
50
|
+
break;
|
|
51
|
+
case 4:
|
|
52
|
+
if (ftype === thrift_1.Thrift.Type.I32) {
|
|
53
|
+
var value1 = protocol.readI32();
|
|
54
|
+
result.tweets = value1;
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
protocol.skip(ftype);
|
|
58
|
+
}
|
|
59
|
+
break;
|
|
60
|
+
case 5:
|
|
61
|
+
if (ftype === thrift_1.Thrift.Type.I32) {
|
|
62
|
+
var value1 = protocol.readI32();
|
|
63
|
+
result.pullquotes = value1;
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
protocol.skip(ftype);
|
|
67
|
+
}
|
|
68
|
+
break;
|
|
69
|
+
case 6:
|
|
70
|
+
if (ftype === thrift_1.Thrift.Type.I32) {
|
|
71
|
+
var value1 = protocol.readI32();
|
|
72
|
+
result.audio = value1;
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
protocol.skip(ftype);
|
|
76
|
+
}
|
|
77
|
+
break;
|
|
78
|
+
case 7:
|
|
79
|
+
if (ftype === thrift_1.Thrift.Type.I32) {
|
|
80
|
+
var value1 = protocol.readI32();
|
|
81
|
+
result.interactives = 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.witness = 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.richlinks = 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.membership = value1;
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
protocol.skip(ftype);
|
|
112
|
+
}
|
|
113
|
+
break;
|
|
114
|
+
case 11:
|
|
115
|
+
if (ftype === thrift_1.Thrift.Type.I32) {
|
|
116
|
+
var value1 = protocol.readI32();
|
|
117
|
+
result.embeds = value1;
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
protocol.skip(ftype);
|
|
121
|
+
}
|
|
122
|
+
break;
|
|
123
|
+
case 12:
|
|
124
|
+
if (ftype === thrift_1.Thrift.Type.I32) {
|
|
125
|
+
var value1 = protocol.readI32();
|
|
126
|
+
result.comments = value1;
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
protocol.skip(ftype);
|
|
130
|
+
}
|
|
131
|
+
break;
|
|
132
|
+
case 13:
|
|
133
|
+
if (ftype === thrift_1.Thrift.Type.I32) {
|
|
134
|
+
var value1 = protocol.readI32();
|
|
135
|
+
result.instagram = value1;
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
protocol.skip(ftype);
|
|
139
|
+
}
|
|
140
|
+
break;
|
|
141
|
+
case 14:
|
|
142
|
+
if (ftype === thrift_1.Thrift.Type.I32) {
|
|
143
|
+
var value1 = protocol.readI32();
|
|
144
|
+
result.vines = value1;
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
protocol.skip(ftype);
|
|
148
|
+
}
|
|
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;
|
|
159
|
+
default:
|
|
160
|
+
protocol.skip(ftype);
|
|
161
|
+
}
|
|
162
|
+
protocol.readFieldEnd();
|
|
163
|
+
}
|
|
164
|
+
protocol.readStructEnd();
|
|
165
|
+
// @ts-ignore
|
|
166
|
+
return result;
|
|
167
|
+
};
|
|
168
|
+
ContentStatsSerde.write = function (protocol, value0) {
|
|
169
|
+
protocol.writeStructBegin('ContentStats');
|
|
170
|
+
if (value0.videos !== null && value0.videos !== undefined) {
|
|
171
|
+
var value1 = value0.videos;
|
|
172
|
+
protocol.writeFieldBegin('videos', thrift_1.Thrift.Type.I32, 1);
|
|
173
|
+
protocol.writeI32(value1);
|
|
174
|
+
protocol.writeFieldEnd();
|
|
175
|
+
}
|
|
176
|
+
if (value0.images !== null && value0.images !== undefined) {
|
|
177
|
+
var value1 = value0.images;
|
|
178
|
+
protocol.writeFieldBegin('images', thrift_1.Thrift.Type.I32, 2);
|
|
179
|
+
protocol.writeI32(value1);
|
|
180
|
+
protocol.writeFieldEnd();
|
|
181
|
+
}
|
|
182
|
+
if (value0.text !== null && value0.text !== undefined) {
|
|
183
|
+
var value1 = value0.text;
|
|
184
|
+
protocol.writeFieldBegin('text', thrift_1.Thrift.Type.I32, 3);
|
|
185
|
+
protocol.writeI32(value1);
|
|
186
|
+
protocol.writeFieldEnd();
|
|
187
|
+
}
|
|
188
|
+
if (value0.tweets !== null && value0.tweets !== undefined) {
|
|
189
|
+
var value1 = value0.tweets;
|
|
190
|
+
protocol.writeFieldBegin('tweets', thrift_1.Thrift.Type.I32, 4);
|
|
191
|
+
protocol.writeI32(value1);
|
|
192
|
+
protocol.writeFieldEnd();
|
|
193
|
+
}
|
|
194
|
+
if (value0.pullquotes !== null && value0.pullquotes !== undefined) {
|
|
195
|
+
var value1 = value0.pullquotes;
|
|
196
|
+
protocol.writeFieldBegin('pullquotes', thrift_1.Thrift.Type.I32, 5);
|
|
197
|
+
protocol.writeI32(value1);
|
|
198
|
+
protocol.writeFieldEnd();
|
|
199
|
+
}
|
|
200
|
+
if (value0.audio !== null && value0.audio !== undefined) {
|
|
201
|
+
var value1 = value0.audio;
|
|
202
|
+
protocol.writeFieldBegin('audio', thrift_1.Thrift.Type.I32, 6);
|
|
203
|
+
protocol.writeI32(value1);
|
|
204
|
+
protocol.writeFieldEnd();
|
|
205
|
+
}
|
|
206
|
+
if (value0.interactives !== null && value0.interactives !== undefined) {
|
|
207
|
+
var value1 = value0.interactives;
|
|
208
|
+
protocol.writeFieldBegin('interactives', thrift_1.Thrift.Type.I32, 7);
|
|
209
|
+
protocol.writeI32(value1);
|
|
210
|
+
protocol.writeFieldEnd();
|
|
211
|
+
}
|
|
212
|
+
if (value0.witness !== null && value0.witness !== undefined) {
|
|
213
|
+
var value1 = value0.witness;
|
|
214
|
+
protocol.writeFieldBegin('witness', thrift_1.Thrift.Type.I32, 8);
|
|
215
|
+
protocol.writeI32(value1);
|
|
216
|
+
protocol.writeFieldEnd();
|
|
217
|
+
}
|
|
218
|
+
if (value0.richlinks !== null && value0.richlinks !== undefined) {
|
|
219
|
+
var value1 = value0.richlinks;
|
|
220
|
+
protocol.writeFieldBegin('richlinks', thrift_1.Thrift.Type.I32, 9);
|
|
221
|
+
protocol.writeI32(value1);
|
|
222
|
+
protocol.writeFieldEnd();
|
|
223
|
+
}
|
|
224
|
+
if (value0.membership !== null && value0.membership !== undefined) {
|
|
225
|
+
var value1 = value0.membership;
|
|
226
|
+
protocol.writeFieldBegin('membership', thrift_1.Thrift.Type.I32, 10);
|
|
227
|
+
protocol.writeI32(value1);
|
|
228
|
+
protocol.writeFieldEnd();
|
|
229
|
+
}
|
|
230
|
+
if (value0.embeds !== null && value0.embeds !== undefined) {
|
|
231
|
+
var value1 = value0.embeds;
|
|
232
|
+
protocol.writeFieldBegin('embeds', thrift_1.Thrift.Type.I32, 11);
|
|
233
|
+
protocol.writeI32(value1);
|
|
234
|
+
protocol.writeFieldEnd();
|
|
235
|
+
}
|
|
236
|
+
if (value0.comments !== null && value0.comments !== undefined) {
|
|
237
|
+
var value1 = value0.comments;
|
|
238
|
+
protocol.writeFieldBegin('comments', thrift_1.Thrift.Type.I32, 12);
|
|
239
|
+
protocol.writeI32(value1);
|
|
240
|
+
protocol.writeFieldEnd();
|
|
241
|
+
}
|
|
242
|
+
if (value0.instagram !== null && value0.instagram !== undefined) {
|
|
243
|
+
var value1 = value0.instagram;
|
|
244
|
+
protocol.writeFieldBegin('instagram', thrift_1.Thrift.Type.I32, 13);
|
|
245
|
+
protocol.writeI32(value1);
|
|
246
|
+
protocol.writeFieldEnd();
|
|
247
|
+
}
|
|
248
|
+
if (value0.vines !== null && value0.vines !== undefined) {
|
|
249
|
+
var value1 = value0.vines;
|
|
250
|
+
protocol.writeFieldBegin('vines', thrift_1.Thrift.Type.I32, 14);
|
|
251
|
+
protocol.writeI32(value1);
|
|
252
|
+
protocol.writeFieldEnd();
|
|
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
|
+
}
|
|
260
|
+
protocol.writeFieldStop();
|
|
261
|
+
protocol.writeStructEnd();
|
|
262
|
+
};
|
|
263
|
+
return ContentStatsSerde;
|
|
264
|
+
}());
|
|
265
|
+
exports.ContentStatsSerde = ContentStatsSerde;
|
|
@@ -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
|
+
export declare enum ContentType {
|
|
7
|
+
ARTICLE = 0,
|
|
8
|
+
LIVEBLOG = 1,
|
|
9
|
+
GALLERY = 2,
|
|
10
|
+
INTERACTIVE = 3,
|
|
11
|
+
PICTURE = 4,
|
|
12
|
+
VIDEO = 5,
|
|
13
|
+
CROSSWORD = 6,
|
|
14
|
+
AUDIO = 7
|
|
15
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
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.ContentType = void 0;
|
|
9
|
+
var ContentType;
|
|
10
|
+
(function (ContentType) {
|
|
11
|
+
ContentType[ContentType["ARTICLE"] = 0] = "ARTICLE";
|
|
12
|
+
ContentType[ContentType["LIVEBLOG"] = 1] = "LIVEBLOG";
|
|
13
|
+
ContentType[ContentType["GALLERY"] = 2] = "GALLERY";
|
|
14
|
+
ContentType[ContentType["INTERACTIVE"] = 3] = "INTERACTIVE";
|
|
15
|
+
ContentType[ContentType["PICTURE"] = 4] = "PICTURE";
|
|
16
|
+
ContentType[ContentType["VIDEO"] = 5] = "VIDEO";
|
|
17
|
+
ContentType[ContentType["CROSSWORD"] = 6] = "CROSSWORD";
|
|
18
|
+
ContentType[ContentType["AUDIO"] = 7] = "AUDIO";
|
|
19
|
+
})(ContentType || (exports.ContentType = ContentType = {}));
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
import { CrosswordCreator } from './crosswordCreator';
|
|
9
|
+
import { CrosswordDimensions } from './crosswordDimensions';
|
|
10
|
+
import { CrosswordEntry } from './crosswordEntry';
|
|
11
|
+
import { CrosswordType } from './crosswordType';
|
|
12
|
+
export interface Crossword {
|
|
13
|
+
name: string;
|
|
14
|
+
type: CrosswordType;
|
|
15
|
+
number: number;
|
|
16
|
+
date: CapiDateTime;
|
|
17
|
+
dimensions: CrosswordDimensions;
|
|
18
|
+
entries: CrosswordEntry[];
|
|
19
|
+
solutionAvailable: boolean;
|
|
20
|
+
hasNumbers: boolean;
|
|
21
|
+
randomCluesOrdering: boolean;
|
|
22
|
+
instructions?: string;
|
|
23
|
+
creator?: CrosswordCreator;
|
|
24
|
+
pdf?: string;
|
|
25
|
+
annotatedSolution?: string;
|
|
26
|
+
dateSolutionAvailable?: CapiDateTime;
|
|
27
|
+
}
|
|
28
|
+
export declare class CrosswordSerde {
|
|
29
|
+
static read(protocol: TProtocol): Crossword;
|
|
30
|
+
static write(protocol: TProtocol, value0: Crossword): void;
|
|
31
|
+
}
|
package/v1/crossword.js
ADDED
|
@@ -0,0 +1,268 @@
|
|
|
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.CrosswordSerde = void 0;
|
|
9
|
+
var thrift_1 = require("thrift");
|
|
10
|
+
var capiDateTime_1 = require("./capiDateTime");
|
|
11
|
+
var crosswordCreator_1 = require("./crosswordCreator");
|
|
12
|
+
var crosswordDimensions_1 = require("./crosswordDimensions");
|
|
13
|
+
var crosswordEntry_1 = require("./crosswordEntry");
|
|
14
|
+
var CrosswordSerde = /** @class */ (function () {
|
|
15
|
+
function CrosswordSerde() {
|
|
16
|
+
}
|
|
17
|
+
CrosswordSerde.read = function (protocol) {
|
|
18
|
+
var _a;
|
|
19
|
+
protocol.readStructBegin();
|
|
20
|
+
var result = {};
|
|
21
|
+
while (true) {
|
|
22
|
+
var ret = protocol.readFieldBegin();
|
|
23
|
+
var ftype = ret.ftype;
|
|
24
|
+
var fid = ret.fid;
|
|
25
|
+
if (ftype === thrift_1.Thrift.Type.STOP) {
|
|
26
|
+
break;
|
|
27
|
+
}
|
|
28
|
+
switch (fid) {
|
|
29
|
+
case 1:
|
|
30
|
+
if (ftype === thrift_1.Thrift.Type.STRING) {
|
|
31
|
+
var value1 = protocol.readString();
|
|
32
|
+
result.name = value1;
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
protocol.skip(ftype);
|
|
36
|
+
}
|
|
37
|
+
break;
|
|
38
|
+
case 2:
|
|
39
|
+
if (ftype === thrift_1.Thrift.Type.I32) {
|
|
40
|
+
var value1 = protocol.readI32();
|
|
41
|
+
result.type = value1;
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
protocol.skip(ftype);
|
|
45
|
+
}
|
|
46
|
+
break;
|
|
47
|
+
case 3:
|
|
48
|
+
if (ftype === thrift_1.Thrift.Type.I32) {
|
|
49
|
+
var value1 = protocol.readI32();
|
|
50
|
+
result.number = value1;
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
protocol.skip(ftype);
|
|
54
|
+
}
|
|
55
|
+
break;
|
|
56
|
+
case 4:
|
|
57
|
+
if (ftype === thrift_1.Thrift.Type.STRUCT) {
|
|
58
|
+
var value1 = capiDateTime_1.CapiDateTimeSerde.read(protocol);
|
|
59
|
+
result.date = value1;
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
protocol.skip(ftype);
|
|
63
|
+
}
|
|
64
|
+
break;
|
|
65
|
+
case 5:
|
|
66
|
+
if (ftype === thrift_1.Thrift.Type.STRUCT) {
|
|
67
|
+
var value1 = crosswordDimensions_1.CrosswordDimensionsSerde.read(protocol);
|
|
68
|
+
result.dimensions = value1;
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
protocol.skip(ftype);
|
|
72
|
+
}
|
|
73
|
+
break;
|
|
74
|
+
case 6:
|
|
75
|
+
if (ftype === thrift_1.Thrift.Type.LIST) {
|
|
76
|
+
var listInfo1 = protocol.readListBegin();
|
|
77
|
+
var listSize1 = (_a = listInfo1.size) !== null && _a !== void 0 ? _a : 0;
|
|
78
|
+
var value1 = [];
|
|
79
|
+
if (listInfo1.etype === thrift_1.Thrift.Type.STRUCT) {
|
|
80
|
+
for (var i = 0; i < listSize1; i++) {
|
|
81
|
+
var value2 = crosswordEntry_1.CrosswordEntrySerde.read(protocol);
|
|
82
|
+
value1.push(value2);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
protocol.readListEnd();
|
|
86
|
+
result.entries = value1;
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
protocol.skip(ftype);
|
|
90
|
+
}
|
|
91
|
+
break;
|
|
92
|
+
case 7:
|
|
93
|
+
if (ftype === thrift_1.Thrift.Type.BOOL) {
|
|
94
|
+
var value1 = protocol.readBool();
|
|
95
|
+
result.solutionAvailable = value1;
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
protocol.skip(ftype);
|
|
99
|
+
}
|
|
100
|
+
break;
|
|
101
|
+
case 8:
|
|
102
|
+
if (ftype === thrift_1.Thrift.Type.BOOL) {
|
|
103
|
+
var value1 = protocol.readBool();
|
|
104
|
+
result.hasNumbers = value1;
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
protocol.skip(ftype);
|
|
108
|
+
}
|
|
109
|
+
break;
|
|
110
|
+
case 9:
|
|
111
|
+
if (ftype === thrift_1.Thrift.Type.BOOL) {
|
|
112
|
+
var value1 = protocol.readBool();
|
|
113
|
+
result.randomCluesOrdering = value1;
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
protocol.skip(ftype);
|
|
117
|
+
}
|
|
118
|
+
break;
|
|
119
|
+
case 10:
|
|
120
|
+
if (ftype === thrift_1.Thrift.Type.STRING) {
|
|
121
|
+
var value1 = protocol.readString();
|
|
122
|
+
result.instructions = value1;
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
protocol.skip(ftype);
|
|
126
|
+
}
|
|
127
|
+
break;
|
|
128
|
+
case 11:
|
|
129
|
+
if (ftype === thrift_1.Thrift.Type.STRUCT) {
|
|
130
|
+
var value1 = crosswordCreator_1.CrosswordCreatorSerde.read(protocol);
|
|
131
|
+
result.creator = value1;
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
protocol.skip(ftype);
|
|
135
|
+
}
|
|
136
|
+
break;
|
|
137
|
+
case 12:
|
|
138
|
+
if (ftype === thrift_1.Thrift.Type.STRING) {
|
|
139
|
+
var value1 = protocol.readString();
|
|
140
|
+
result.pdf = value1;
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
protocol.skip(ftype);
|
|
144
|
+
}
|
|
145
|
+
break;
|
|
146
|
+
case 13:
|
|
147
|
+
if (ftype === thrift_1.Thrift.Type.STRING) {
|
|
148
|
+
var value1 = protocol.readString();
|
|
149
|
+
result.annotatedSolution = value1;
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
protocol.skip(ftype);
|
|
153
|
+
}
|
|
154
|
+
break;
|
|
155
|
+
case 14:
|
|
156
|
+
if (ftype === thrift_1.Thrift.Type.STRUCT) {
|
|
157
|
+
var value1 = capiDateTime_1.CapiDateTimeSerde.read(protocol);
|
|
158
|
+
result.dateSolutionAvailable = value1;
|
|
159
|
+
}
|
|
160
|
+
else {
|
|
161
|
+
protocol.skip(ftype);
|
|
162
|
+
}
|
|
163
|
+
break;
|
|
164
|
+
default:
|
|
165
|
+
protocol.skip(ftype);
|
|
166
|
+
}
|
|
167
|
+
protocol.readFieldEnd();
|
|
168
|
+
}
|
|
169
|
+
protocol.readStructEnd();
|
|
170
|
+
// @ts-ignore
|
|
171
|
+
return result;
|
|
172
|
+
};
|
|
173
|
+
CrosswordSerde.write = function (protocol, value0) {
|
|
174
|
+
protocol.writeStructBegin('Crossword');
|
|
175
|
+
if (value0.name !== null && value0.name !== undefined) {
|
|
176
|
+
var value1 = value0.name;
|
|
177
|
+
protocol.writeFieldBegin('name', thrift_1.Thrift.Type.STRING, 1);
|
|
178
|
+
protocol.writeString(value1);
|
|
179
|
+
protocol.writeFieldEnd();
|
|
180
|
+
}
|
|
181
|
+
if (value0.type !== null && value0.type !== undefined) {
|
|
182
|
+
var value1 = value0.type;
|
|
183
|
+
protocol.writeFieldBegin('type', thrift_1.Thrift.Type.I32, 2);
|
|
184
|
+
protocol.writeI32(value1);
|
|
185
|
+
protocol.writeFieldEnd();
|
|
186
|
+
}
|
|
187
|
+
if (value0.number !== null && value0.number !== undefined) {
|
|
188
|
+
var value1 = value0.number;
|
|
189
|
+
protocol.writeFieldBegin('number', thrift_1.Thrift.Type.I32, 3);
|
|
190
|
+
protocol.writeI32(value1);
|
|
191
|
+
protocol.writeFieldEnd();
|
|
192
|
+
}
|
|
193
|
+
if (value0.date !== null && value0.date !== undefined) {
|
|
194
|
+
var value1 = value0.date;
|
|
195
|
+
protocol.writeFieldBegin('date', thrift_1.Thrift.Type.STRUCT, 4);
|
|
196
|
+
capiDateTime_1.CapiDateTimeSerde.write(protocol, value1);
|
|
197
|
+
protocol.writeFieldEnd();
|
|
198
|
+
}
|
|
199
|
+
if (value0.dimensions !== null && value0.dimensions !== undefined) {
|
|
200
|
+
var value1 = value0.dimensions;
|
|
201
|
+
protocol.writeFieldBegin('dimensions', thrift_1.Thrift.Type.STRUCT, 5);
|
|
202
|
+
crosswordDimensions_1.CrosswordDimensionsSerde.write(protocol, value1);
|
|
203
|
+
protocol.writeFieldEnd();
|
|
204
|
+
}
|
|
205
|
+
if (value0.entries !== null && value0.entries !== undefined) {
|
|
206
|
+
var value1 = value0.entries;
|
|
207
|
+
protocol.writeFieldBegin('entries', thrift_1.Thrift.Type.LIST, 6);
|
|
208
|
+
protocol.writeListBegin(thrift_1.Thrift.Type.STRUCT, value1.length);
|
|
209
|
+
value1.forEach(function (value2) {
|
|
210
|
+
crosswordEntry_1.CrosswordEntrySerde.write(protocol, value2);
|
|
211
|
+
});
|
|
212
|
+
protocol.writeListEnd();
|
|
213
|
+
protocol.writeFieldEnd();
|
|
214
|
+
}
|
|
215
|
+
if (value0.solutionAvailable !== null && value0.solutionAvailable !== undefined) {
|
|
216
|
+
var value1 = value0.solutionAvailable;
|
|
217
|
+
protocol.writeFieldBegin('solutionAvailable', thrift_1.Thrift.Type.BOOL, 7);
|
|
218
|
+
protocol.writeBool(value1);
|
|
219
|
+
protocol.writeFieldEnd();
|
|
220
|
+
}
|
|
221
|
+
if (value0.hasNumbers !== null && value0.hasNumbers !== undefined) {
|
|
222
|
+
var value1 = value0.hasNumbers;
|
|
223
|
+
protocol.writeFieldBegin('hasNumbers', thrift_1.Thrift.Type.BOOL, 8);
|
|
224
|
+
protocol.writeBool(value1);
|
|
225
|
+
protocol.writeFieldEnd();
|
|
226
|
+
}
|
|
227
|
+
if (value0.randomCluesOrdering !== null && value0.randomCluesOrdering !== undefined) {
|
|
228
|
+
var value1 = value0.randomCluesOrdering;
|
|
229
|
+
protocol.writeFieldBegin('randomCluesOrdering', thrift_1.Thrift.Type.BOOL, 9);
|
|
230
|
+
protocol.writeBool(value1);
|
|
231
|
+
protocol.writeFieldEnd();
|
|
232
|
+
}
|
|
233
|
+
if (value0.instructions !== null && value0.instructions !== undefined) {
|
|
234
|
+
var value1 = value0.instructions;
|
|
235
|
+
protocol.writeFieldBegin('instructions', thrift_1.Thrift.Type.STRING, 10);
|
|
236
|
+
protocol.writeString(value1);
|
|
237
|
+
protocol.writeFieldEnd();
|
|
238
|
+
}
|
|
239
|
+
if (value0.creator !== null && value0.creator !== undefined) {
|
|
240
|
+
var value1 = value0.creator;
|
|
241
|
+
protocol.writeFieldBegin('creator', thrift_1.Thrift.Type.STRUCT, 11);
|
|
242
|
+
crosswordCreator_1.CrosswordCreatorSerde.write(protocol, value1);
|
|
243
|
+
protocol.writeFieldEnd();
|
|
244
|
+
}
|
|
245
|
+
if (value0.pdf !== null && value0.pdf !== undefined) {
|
|
246
|
+
var value1 = value0.pdf;
|
|
247
|
+
protocol.writeFieldBegin('pdf', thrift_1.Thrift.Type.STRING, 12);
|
|
248
|
+
protocol.writeString(value1);
|
|
249
|
+
protocol.writeFieldEnd();
|
|
250
|
+
}
|
|
251
|
+
if (value0.annotatedSolution !== null && value0.annotatedSolution !== undefined) {
|
|
252
|
+
var value1 = value0.annotatedSolution;
|
|
253
|
+
protocol.writeFieldBegin('annotatedSolution', thrift_1.Thrift.Type.STRING, 13);
|
|
254
|
+
protocol.writeString(value1);
|
|
255
|
+
protocol.writeFieldEnd();
|
|
256
|
+
}
|
|
257
|
+
if (value0.dateSolutionAvailable !== null && value0.dateSolutionAvailable !== undefined) {
|
|
258
|
+
var value1 = value0.dateSolutionAvailable;
|
|
259
|
+
protocol.writeFieldBegin('dateSolutionAvailable', thrift_1.Thrift.Type.STRUCT, 14);
|
|
260
|
+
capiDateTime_1.CapiDateTimeSerde.write(protocol, value1);
|
|
261
|
+
protocol.writeFieldEnd();
|
|
262
|
+
}
|
|
263
|
+
protocol.writeFieldStop();
|
|
264
|
+
protocol.writeStructEnd();
|
|
265
|
+
};
|
|
266
|
+
return CrosswordSerde;
|
|
267
|
+
}());
|
|
268
|
+
exports.CrosswordSerde = CrosswordSerde;
|
|
@@ -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 CrosswordCreator {
|
|
8
|
+
name: string;
|
|
9
|
+
webUrl: string;
|
|
10
|
+
}
|
|
11
|
+
export declare class CrosswordCreatorSerde {
|
|
12
|
+
static read(protocol: TProtocol): CrosswordCreator;
|
|
13
|
+
static write(protocol: TProtocol, value0: CrosswordCreator): void;
|
|
14
|
+
}
|