@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,205 @@
|
|
|
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.InstagramElementFieldsSerde = void 0;
|
|
9
|
+
var thrift_1 = require("thrift");
|
|
10
|
+
var InstagramElementFieldsSerde = /** @class */ (function () {
|
|
11
|
+
function InstagramElementFieldsSerde() {
|
|
12
|
+
}
|
|
13
|
+
InstagramElementFieldsSerde.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.originalUrl = 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.title = 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.source = 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.authorUrl = 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.authorUsername = 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.html = 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.width = value1;
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
protocol.skip(ftype);
|
|
85
|
+
}
|
|
86
|
+
break;
|
|
87
|
+
case 8:
|
|
88
|
+
if (ftype === thrift_1.Thrift.Type.STRING) {
|
|
89
|
+
var value1 = protocol.readString();
|
|
90
|
+
result.alt = value1;
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
protocol.skip(ftype);
|
|
94
|
+
}
|
|
95
|
+
break;
|
|
96
|
+
case 9:
|
|
97
|
+
if (ftype === thrift_1.Thrift.Type.STRING) {
|
|
98
|
+
var value1 = protocol.readString();
|
|
99
|
+
result.caption = value1;
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
protocol.skip(ftype);
|
|
103
|
+
}
|
|
104
|
+
break;
|
|
105
|
+
case 10:
|
|
106
|
+
if (ftype === thrift_1.Thrift.Type.STRING) {
|
|
107
|
+
var value1 = protocol.readString();
|
|
108
|
+
result.role = value1;
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
protocol.skip(ftype);
|
|
112
|
+
}
|
|
113
|
+
break;
|
|
114
|
+
case 12:
|
|
115
|
+
if (ftype === thrift_1.Thrift.Type.STRING) {
|
|
116
|
+
var value1 = protocol.readString();
|
|
117
|
+
result.sourceDomain = value1;
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
protocol.skip(ftype);
|
|
121
|
+
}
|
|
122
|
+
break;
|
|
123
|
+
default:
|
|
124
|
+
protocol.skip(ftype);
|
|
125
|
+
}
|
|
126
|
+
protocol.readFieldEnd();
|
|
127
|
+
}
|
|
128
|
+
protocol.readStructEnd();
|
|
129
|
+
// @ts-ignore
|
|
130
|
+
return result;
|
|
131
|
+
};
|
|
132
|
+
InstagramElementFieldsSerde.write = function (protocol, value0) {
|
|
133
|
+
protocol.writeStructBegin('InstagramElementFields');
|
|
134
|
+
if (value0.originalUrl !== null && value0.originalUrl !== undefined) {
|
|
135
|
+
var value1 = value0.originalUrl;
|
|
136
|
+
protocol.writeFieldBegin('originalUrl', thrift_1.Thrift.Type.STRING, 1);
|
|
137
|
+
protocol.writeString(value1);
|
|
138
|
+
protocol.writeFieldEnd();
|
|
139
|
+
}
|
|
140
|
+
if (value0.title !== null && value0.title !== undefined) {
|
|
141
|
+
var value1 = value0.title;
|
|
142
|
+
protocol.writeFieldBegin('title', thrift_1.Thrift.Type.STRING, 2);
|
|
143
|
+
protocol.writeString(value1);
|
|
144
|
+
protocol.writeFieldEnd();
|
|
145
|
+
}
|
|
146
|
+
if (value0.source !== null && value0.source !== undefined) {
|
|
147
|
+
var value1 = value0.source;
|
|
148
|
+
protocol.writeFieldBegin('source', thrift_1.Thrift.Type.STRING, 3);
|
|
149
|
+
protocol.writeString(value1);
|
|
150
|
+
protocol.writeFieldEnd();
|
|
151
|
+
}
|
|
152
|
+
if (value0.authorUrl !== null && value0.authorUrl !== undefined) {
|
|
153
|
+
var value1 = value0.authorUrl;
|
|
154
|
+
protocol.writeFieldBegin('authorUrl', thrift_1.Thrift.Type.STRING, 4);
|
|
155
|
+
protocol.writeString(value1);
|
|
156
|
+
protocol.writeFieldEnd();
|
|
157
|
+
}
|
|
158
|
+
if (value0.authorUsername !== null && value0.authorUsername !== undefined) {
|
|
159
|
+
var value1 = value0.authorUsername;
|
|
160
|
+
protocol.writeFieldBegin('authorUsername', thrift_1.Thrift.Type.STRING, 5);
|
|
161
|
+
protocol.writeString(value1);
|
|
162
|
+
protocol.writeFieldEnd();
|
|
163
|
+
}
|
|
164
|
+
if (value0.html !== null && value0.html !== undefined) {
|
|
165
|
+
var value1 = value0.html;
|
|
166
|
+
protocol.writeFieldBegin('html', thrift_1.Thrift.Type.STRING, 6);
|
|
167
|
+
protocol.writeString(value1);
|
|
168
|
+
protocol.writeFieldEnd();
|
|
169
|
+
}
|
|
170
|
+
if (value0.width !== null && value0.width !== undefined) {
|
|
171
|
+
var value1 = value0.width;
|
|
172
|
+
protocol.writeFieldBegin('width', thrift_1.Thrift.Type.I32, 7);
|
|
173
|
+
protocol.writeI32(value1);
|
|
174
|
+
protocol.writeFieldEnd();
|
|
175
|
+
}
|
|
176
|
+
if (value0.alt !== null && value0.alt !== undefined) {
|
|
177
|
+
var value1 = value0.alt;
|
|
178
|
+
protocol.writeFieldBegin('alt', thrift_1.Thrift.Type.STRING, 8);
|
|
179
|
+
protocol.writeString(value1);
|
|
180
|
+
protocol.writeFieldEnd();
|
|
181
|
+
}
|
|
182
|
+
if (value0.caption !== null && value0.caption !== undefined) {
|
|
183
|
+
var value1 = value0.caption;
|
|
184
|
+
protocol.writeFieldBegin('caption', thrift_1.Thrift.Type.STRING, 9);
|
|
185
|
+
protocol.writeString(value1);
|
|
186
|
+
protocol.writeFieldEnd();
|
|
187
|
+
}
|
|
188
|
+
if (value0.role !== null && value0.role !== undefined) {
|
|
189
|
+
var value1 = value0.role;
|
|
190
|
+
protocol.writeFieldBegin('role', thrift_1.Thrift.Type.STRING, 10);
|
|
191
|
+
protocol.writeString(value1);
|
|
192
|
+
protocol.writeFieldEnd();
|
|
193
|
+
}
|
|
194
|
+
if (value0.sourceDomain !== null && value0.sourceDomain !== undefined) {
|
|
195
|
+
var value1 = value0.sourceDomain;
|
|
196
|
+
protocol.writeFieldBegin('sourceDomain', thrift_1.Thrift.Type.STRING, 12);
|
|
197
|
+
protocol.writeString(value1);
|
|
198
|
+
protocol.writeFieldEnd();
|
|
199
|
+
}
|
|
200
|
+
protocol.writeFieldStop();
|
|
201
|
+
protocol.writeStructEnd();
|
|
202
|
+
};
|
|
203
|
+
return InstagramElementFieldsSerde;
|
|
204
|
+
}());
|
|
205
|
+
exports.InstagramElementFieldsSerde = InstagramElementFieldsSerde;
|
|
@@ -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 InteractiveElementFields {
|
|
8
|
+
url?: string;
|
|
9
|
+
originalUrl?: string;
|
|
10
|
+
source?: string;
|
|
11
|
+
caption?: string;
|
|
12
|
+
alt?: string;
|
|
13
|
+
scriptUrl?: string;
|
|
14
|
+
html?: string;
|
|
15
|
+
scriptName?: string;
|
|
16
|
+
iframeUrl?: string;
|
|
17
|
+
role?: string;
|
|
18
|
+
isMandatory?: boolean;
|
|
19
|
+
sourceDomain?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare class InteractiveElementFieldsSerde {
|
|
22
|
+
static read(protocol: TProtocol): InteractiveElementFields;
|
|
23
|
+
static write(protocol: TProtocol, value0: InteractiveElementFields): void;
|
|
24
|
+
}
|
|
@@ -0,0 +1,220 @@
|
|
|
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.InteractiveElementFieldsSerde = void 0;
|
|
9
|
+
var thrift_1 = require("thrift");
|
|
10
|
+
var InteractiveElementFieldsSerde = /** @class */ (function () {
|
|
11
|
+
function InteractiveElementFieldsSerde() {
|
|
12
|
+
}
|
|
13
|
+
InteractiveElementFieldsSerde.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.originalUrl = 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.source = 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.caption = 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.alt = 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.scriptUrl = 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.html = value1;
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
protocol.skip(ftype);
|
|
85
|
+
}
|
|
86
|
+
break;
|
|
87
|
+
case 8:
|
|
88
|
+
if (ftype === thrift_1.Thrift.Type.STRING) {
|
|
89
|
+
var value1 = protocol.readString();
|
|
90
|
+
result.scriptName = value1;
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
protocol.skip(ftype);
|
|
94
|
+
}
|
|
95
|
+
break;
|
|
96
|
+
case 9:
|
|
97
|
+
if (ftype === thrift_1.Thrift.Type.STRING) {
|
|
98
|
+
var value1 = protocol.readString();
|
|
99
|
+
result.iframeUrl = value1;
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
protocol.skip(ftype);
|
|
103
|
+
}
|
|
104
|
+
break;
|
|
105
|
+
case 10:
|
|
106
|
+
if (ftype === thrift_1.Thrift.Type.STRING) {
|
|
107
|
+
var value1 = protocol.readString();
|
|
108
|
+
result.role = value1;
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
protocol.skip(ftype);
|
|
112
|
+
}
|
|
113
|
+
break;
|
|
114
|
+
case 11:
|
|
115
|
+
if (ftype === thrift_1.Thrift.Type.BOOL) {
|
|
116
|
+
var value1 = protocol.readBool();
|
|
117
|
+
result.isMandatory = value1;
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
protocol.skip(ftype);
|
|
121
|
+
}
|
|
122
|
+
break;
|
|
123
|
+
case 14:
|
|
124
|
+
if (ftype === thrift_1.Thrift.Type.STRING) {
|
|
125
|
+
var value1 = protocol.readString();
|
|
126
|
+
result.sourceDomain = value1;
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
protocol.skip(ftype);
|
|
130
|
+
}
|
|
131
|
+
break;
|
|
132
|
+
default:
|
|
133
|
+
protocol.skip(ftype);
|
|
134
|
+
}
|
|
135
|
+
protocol.readFieldEnd();
|
|
136
|
+
}
|
|
137
|
+
protocol.readStructEnd();
|
|
138
|
+
// @ts-ignore
|
|
139
|
+
return result;
|
|
140
|
+
};
|
|
141
|
+
InteractiveElementFieldsSerde.write = function (protocol, value0) {
|
|
142
|
+
protocol.writeStructBegin('InteractiveElementFields');
|
|
143
|
+
if (value0.url !== null && value0.url !== undefined) {
|
|
144
|
+
var value1 = value0.url;
|
|
145
|
+
protocol.writeFieldBegin('url', thrift_1.Thrift.Type.STRING, 1);
|
|
146
|
+
protocol.writeString(value1);
|
|
147
|
+
protocol.writeFieldEnd();
|
|
148
|
+
}
|
|
149
|
+
if (value0.originalUrl !== null && value0.originalUrl !== undefined) {
|
|
150
|
+
var value1 = value0.originalUrl;
|
|
151
|
+
protocol.writeFieldBegin('originalUrl', thrift_1.Thrift.Type.STRING, 2);
|
|
152
|
+
protocol.writeString(value1);
|
|
153
|
+
protocol.writeFieldEnd();
|
|
154
|
+
}
|
|
155
|
+
if (value0.source !== null && value0.source !== undefined) {
|
|
156
|
+
var value1 = value0.source;
|
|
157
|
+
protocol.writeFieldBegin('source', thrift_1.Thrift.Type.STRING, 3);
|
|
158
|
+
protocol.writeString(value1);
|
|
159
|
+
protocol.writeFieldEnd();
|
|
160
|
+
}
|
|
161
|
+
if (value0.caption !== null && value0.caption !== undefined) {
|
|
162
|
+
var value1 = value0.caption;
|
|
163
|
+
protocol.writeFieldBegin('caption', thrift_1.Thrift.Type.STRING, 4);
|
|
164
|
+
protocol.writeString(value1);
|
|
165
|
+
protocol.writeFieldEnd();
|
|
166
|
+
}
|
|
167
|
+
if (value0.alt !== null && value0.alt !== undefined) {
|
|
168
|
+
var value1 = value0.alt;
|
|
169
|
+
protocol.writeFieldBegin('alt', thrift_1.Thrift.Type.STRING, 5);
|
|
170
|
+
protocol.writeString(value1);
|
|
171
|
+
protocol.writeFieldEnd();
|
|
172
|
+
}
|
|
173
|
+
if (value0.scriptUrl !== null && value0.scriptUrl !== undefined) {
|
|
174
|
+
var value1 = value0.scriptUrl;
|
|
175
|
+
protocol.writeFieldBegin('scriptUrl', thrift_1.Thrift.Type.STRING, 6);
|
|
176
|
+
protocol.writeString(value1);
|
|
177
|
+
protocol.writeFieldEnd();
|
|
178
|
+
}
|
|
179
|
+
if (value0.html !== null && value0.html !== undefined) {
|
|
180
|
+
var value1 = value0.html;
|
|
181
|
+
protocol.writeFieldBegin('html', thrift_1.Thrift.Type.STRING, 7);
|
|
182
|
+
protocol.writeString(value1);
|
|
183
|
+
protocol.writeFieldEnd();
|
|
184
|
+
}
|
|
185
|
+
if (value0.scriptName !== null && value0.scriptName !== undefined) {
|
|
186
|
+
var value1 = value0.scriptName;
|
|
187
|
+
protocol.writeFieldBegin('scriptName', thrift_1.Thrift.Type.STRING, 8);
|
|
188
|
+
protocol.writeString(value1);
|
|
189
|
+
protocol.writeFieldEnd();
|
|
190
|
+
}
|
|
191
|
+
if (value0.iframeUrl !== null && value0.iframeUrl !== undefined) {
|
|
192
|
+
var value1 = value0.iframeUrl;
|
|
193
|
+
protocol.writeFieldBegin('iframeUrl', thrift_1.Thrift.Type.STRING, 9);
|
|
194
|
+
protocol.writeString(value1);
|
|
195
|
+
protocol.writeFieldEnd();
|
|
196
|
+
}
|
|
197
|
+
if (value0.role !== null && value0.role !== undefined) {
|
|
198
|
+
var value1 = value0.role;
|
|
199
|
+
protocol.writeFieldBegin('role', thrift_1.Thrift.Type.STRING, 10);
|
|
200
|
+
protocol.writeString(value1);
|
|
201
|
+
protocol.writeFieldEnd();
|
|
202
|
+
}
|
|
203
|
+
if (value0.isMandatory !== null && value0.isMandatory !== undefined) {
|
|
204
|
+
var value1 = value0.isMandatory;
|
|
205
|
+
protocol.writeFieldBegin('isMandatory', thrift_1.Thrift.Type.BOOL, 11);
|
|
206
|
+
protocol.writeBool(value1);
|
|
207
|
+
protocol.writeFieldEnd();
|
|
208
|
+
}
|
|
209
|
+
if (value0.sourceDomain !== null && value0.sourceDomain !== undefined) {
|
|
210
|
+
var value1 = value0.sourceDomain;
|
|
211
|
+
protocol.writeFieldBegin('sourceDomain', thrift_1.Thrift.Type.STRING, 14);
|
|
212
|
+
protocol.writeString(value1);
|
|
213
|
+
protocol.writeFieldEnd();
|
|
214
|
+
}
|
|
215
|
+
protocol.writeFieldStop();
|
|
216
|
+
protocol.writeStructEnd();
|
|
217
|
+
};
|
|
218
|
+
return InteractiveElementFieldsSerde;
|
|
219
|
+
}());
|
|
220
|
+
exports.InteractiveElementFieldsSerde = InteractiveElementFieldsSerde;
|
|
@@ -0,0 +1,53 @@
|
|
|
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 { Content } from './content';
|
|
8
|
+
import { Edition } from './edition';
|
|
9
|
+
import { Package } from './package';
|
|
10
|
+
import { Section } from './section';
|
|
11
|
+
import { Tag } from './tag';
|
|
12
|
+
import { Atom } from '@guardian/content-atom-model/atom';
|
|
13
|
+
export interface ItemResponse {
|
|
14
|
+
status: string;
|
|
15
|
+
userTier: string;
|
|
16
|
+
total?: number;
|
|
17
|
+
startIndex?: number;
|
|
18
|
+
pageSize?: number;
|
|
19
|
+
currentPage?: number;
|
|
20
|
+
pages?: number;
|
|
21
|
+
orderBy?: string;
|
|
22
|
+
content?: Content;
|
|
23
|
+
tag?: Tag;
|
|
24
|
+
edition?: Edition;
|
|
25
|
+
section?: Section;
|
|
26
|
+
results?: Content[];
|
|
27
|
+
quiz?: Atom;
|
|
28
|
+
relatedContent?: Content[];
|
|
29
|
+
storyPackage?: Content[];
|
|
30
|
+
editorsPicks?: Content[];
|
|
31
|
+
mostViewed?: Content[];
|
|
32
|
+
leadContent?: Content[];
|
|
33
|
+
packages?: Package[];
|
|
34
|
+
viewpoints?: Atom[];
|
|
35
|
+
media?: Atom;
|
|
36
|
+
explainer?: Atom;
|
|
37
|
+
cta?: Atom;
|
|
38
|
+
interactive?: Atom;
|
|
39
|
+
review?: Atom;
|
|
40
|
+
recipe?: Atom;
|
|
41
|
+
qanda?: Atom;
|
|
42
|
+
guide?: Atom;
|
|
43
|
+
profile?: Atom;
|
|
44
|
+
timeline?: Atom;
|
|
45
|
+
commonsdivision?: Atom;
|
|
46
|
+
chart?: Atom;
|
|
47
|
+
audio?: Atom;
|
|
48
|
+
emailsignup?: Atom;
|
|
49
|
+
}
|
|
50
|
+
export declare class ItemResponseSerde {
|
|
51
|
+
static read(protocol: TProtocol): ItemResponse;
|
|
52
|
+
static write(protocol: TProtocol, value0: ItemResponse): void;
|
|
53
|
+
}
|