@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,115 @@
|
|
|
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.SectionsResponseSerde = void 0;
|
|
9
|
+
var thrift_1 = require("thrift");
|
|
10
|
+
var section_1 = require("./section");
|
|
11
|
+
var SectionsResponseSerde = /** @class */ (function () {
|
|
12
|
+
function SectionsResponseSerde() {
|
|
13
|
+
}
|
|
14
|
+
SectionsResponseSerde.read = function (protocol) {
|
|
15
|
+
var _a;
|
|
16
|
+
protocol.readStructBegin();
|
|
17
|
+
var result = {};
|
|
18
|
+
while (true) {
|
|
19
|
+
var ret = protocol.readFieldBegin();
|
|
20
|
+
var ftype = ret.ftype;
|
|
21
|
+
var fid = ret.fid;
|
|
22
|
+
if (ftype === thrift_1.Thrift.Type.STOP) {
|
|
23
|
+
break;
|
|
24
|
+
}
|
|
25
|
+
switch (fid) {
|
|
26
|
+
case 1:
|
|
27
|
+
if (ftype === thrift_1.Thrift.Type.STRING) {
|
|
28
|
+
var value1 = protocol.readString();
|
|
29
|
+
result.status = value1;
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
protocol.skip(ftype);
|
|
33
|
+
}
|
|
34
|
+
break;
|
|
35
|
+
case 2:
|
|
36
|
+
if (ftype === thrift_1.Thrift.Type.STRING) {
|
|
37
|
+
var value1 = protocol.readString();
|
|
38
|
+
result.userTier = value1;
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
protocol.skip(ftype);
|
|
42
|
+
}
|
|
43
|
+
break;
|
|
44
|
+
case 3:
|
|
45
|
+
if (ftype === thrift_1.Thrift.Type.I32) {
|
|
46
|
+
var value1 = protocol.readI32();
|
|
47
|
+
result.total = value1;
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
protocol.skip(ftype);
|
|
51
|
+
}
|
|
52
|
+
break;
|
|
53
|
+
case 4:
|
|
54
|
+
if (ftype === thrift_1.Thrift.Type.LIST) {
|
|
55
|
+
var listInfo1 = protocol.readListBegin();
|
|
56
|
+
var listSize1 = (_a = listInfo1.size) !== null && _a !== void 0 ? _a : 0;
|
|
57
|
+
var value1 = [];
|
|
58
|
+
if (listInfo1.etype === thrift_1.Thrift.Type.STRUCT) {
|
|
59
|
+
for (var i = 0; i < listSize1; i++) {
|
|
60
|
+
var value2 = section_1.SectionSerde.read(protocol);
|
|
61
|
+
value1.push(value2);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
protocol.readListEnd();
|
|
65
|
+
result.results = value1;
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
protocol.skip(ftype);
|
|
69
|
+
}
|
|
70
|
+
break;
|
|
71
|
+
default:
|
|
72
|
+
protocol.skip(ftype);
|
|
73
|
+
}
|
|
74
|
+
protocol.readFieldEnd();
|
|
75
|
+
}
|
|
76
|
+
protocol.readStructEnd();
|
|
77
|
+
// @ts-ignore
|
|
78
|
+
return result;
|
|
79
|
+
};
|
|
80
|
+
SectionsResponseSerde.write = function (protocol, value0) {
|
|
81
|
+
protocol.writeStructBegin('SectionsResponse');
|
|
82
|
+
if (value0.status !== null && value0.status !== undefined) {
|
|
83
|
+
var value1 = value0.status;
|
|
84
|
+
protocol.writeFieldBegin('status', thrift_1.Thrift.Type.STRING, 1);
|
|
85
|
+
protocol.writeString(value1);
|
|
86
|
+
protocol.writeFieldEnd();
|
|
87
|
+
}
|
|
88
|
+
if (value0.userTier !== null && value0.userTier !== undefined) {
|
|
89
|
+
var value1 = value0.userTier;
|
|
90
|
+
protocol.writeFieldBegin('userTier', thrift_1.Thrift.Type.STRING, 2);
|
|
91
|
+
protocol.writeString(value1);
|
|
92
|
+
protocol.writeFieldEnd();
|
|
93
|
+
}
|
|
94
|
+
if (value0.total !== null && value0.total !== undefined) {
|
|
95
|
+
var value1 = value0.total;
|
|
96
|
+
protocol.writeFieldBegin('total', thrift_1.Thrift.Type.I32, 3);
|
|
97
|
+
protocol.writeI32(value1);
|
|
98
|
+
protocol.writeFieldEnd();
|
|
99
|
+
}
|
|
100
|
+
if (value0.results !== null && value0.results !== undefined) {
|
|
101
|
+
var value1 = value0.results;
|
|
102
|
+
protocol.writeFieldBegin('results', thrift_1.Thrift.Type.LIST, 4);
|
|
103
|
+
protocol.writeListBegin(thrift_1.Thrift.Type.STRUCT, value1.length);
|
|
104
|
+
value1.forEach(function (value2) {
|
|
105
|
+
section_1.SectionSerde.write(protocol, value2);
|
|
106
|
+
});
|
|
107
|
+
protocol.writeListEnd();
|
|
108
|
+
protocol.writeFieldEnd();
|
|
109
|
+
}
|
|
110
|
+
protocol.writeFieldStop();
|
|
111
|
+
protocol.writeStructEnd();
|
|
112
|
+
};
|
|
113
|
+
return SectionsResponseSerde;
|
|
114
|
+
}());
|
|
115
|
+
exports.SectionsResponseSerde = SectionsResponseSerde;
|
|
@@ -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
|
+
import { CapiDateTime } from './capiDateTime';
|
|
8
|
+
import { SponsorshipLogoDimensions } from './sponsorshipLogoDimensions';
|
|
9
|
+
import { SponsorshipTargeting } from './sponsorshipTargeting';
|
|
10
|
+
import { SponsorshipType } from './sponsorshipType';
|
|
11
|
+
export interface Sponsorship {
|
|
12
|
+
sponsorshipType: SponsorshipType;
|
|
13
|
+
sponsorName: string;
|
|
14
|
+
sponsorLogo: string;
|
|
15
|
+
sponsorLink: string;
|
|
16
|
+
targeting?: SponsorshipTargeting;
|
|
17
|
+
aboutLink?: string;
|
|
18
|
+
sponsorLogoDimensions?: SponsorshipLogoDimensions;
|
|
19
|
+
highContrastSponsorLogo?: string;
|
|
20
|
+
highContrastSponsorLogoDimensions?: SponsorshipLogoDimensions;
|
|
21
|
+
validFrom?: CapiDateTime;
|
|
22
|
+
validTo?: CapiDateTime;
|
|
23
|
+
}
|
|
24
|
+
export declare class SponsorshipSerde {
|
|
25
|
+
static read(protocol: TProtocol): Sponsorship;
|
|
26
|
+
static write(protocol: TProtocol, value0: Sponsorship): void;
|
|
27
|
+
}
|
|
@@ -0,0 +1,208 @@
|
|
|
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.SponsorshipSerde = void 0;
|
|
9
|
+
var thrift_1 = require("thrift");
|
|
10
|
+
var capiDateTime_1 = require("./capiDateTime");
|
|
11
|
+
var sponsorshipLogoDimensions_1 = require("./sponsorshipLogoDimensions");
|
|
12
|
+
var sponsorshipTargeting_1 = require("./sponsorshipTargeting");
|
|
13
|
+
var SponsorshipSerde = /** @class */ (function () {
|
|
14
|
+
function SponsorshipSerde() {
|
|
15
|
+
}
|
|
16
|
+
SponsorshipSerde.read = function (protocol) {
|
|
17
|
+
protocol.readStructBegin();
|
|
18
|
+
var result = {};
|
|
19
|
+
while (true) {
|
|
20
|
+
var ret = protocol.readFieldBegin();
|
|
21
|
+
var ftype = ret.ftype;
|
|
22
|
+
var fid = ret.fid;
|
|
23
|
+
if (ftype === thrift_1.Thrift.Type.STOP) {
|
|
24
|
+
break;
|
|
25
|
+
}
|
|
26
|
+
switch (fid) {
|
|
27
|
+
case 1:
|
|
28
|
+
if (ftype === thrift_1.Thrift.Type.I32) {
|
|
29
|
+
var value1 = protocol.readI32();
|
|
30
|
+
result.sponsorshipType = value1;
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
protocol.skip(ftype);
|
|
34
|
+
}
|
|
35
|
+
break;
|
|
36
|
+
case 2:
|
|
37
|
+
if (ftype === thrift_1.Thrift.Type.STRING) {
|
|
38
|
+
var value1 = protocol.readString();
|
|
39
|
+
result.sponsorName = value1;
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
protocol.skip(ftype);
|
|
43
|
+
}
|
|
44
|
+
break;
|
|
45
|
+
case 3:
|
|
46
|
+
if (ftype === thrift_1.Thrift.Type.STRING) {
|
|
47
|
+
var value1 = protocol.readString();
|
|
48
|
+
result.sponsorLogo = value1;
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
protocol.skip(ftype);
|
|
52
|
+
}
|
|
53
|
+
break;
|
|
54
|
+
case 4:
|
|
55
|
+
if (ftype === thrift_1.Thrift.Type.STRING) {
|
|
56
|
+
var value1 = protocol.readString();
|
|
57
|
+
result.sponsorLink = value1;
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
protocol.skip(ftype);
|
|
61
|
+
}
|
|
62
|
+
break;
|
|
63
|
+
case 5:
|
|
64
|
+
if (ftype === thrift_1.Thrift.Type.STRUCT) {
|
|
65
|
+
var value1 = sponsorshipTargeting_1.SponsorshipTargetingSerde.read(protocol);
|
|
66
|
+
result.targeting = value1;
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
protocol.skip(ftype);
|
|
70
|
+
}
|
|
71
|
+
break;
|
|
72
|
+
case 6:
|
|
73
|
+
if (ftype === thrift_1.Thrift.Type.STRING) {
|
|
74
|
+
var value1 = protocol.readString();
|
|
75
|
+
result.aboutLink = value1;
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
protocol.skip(ftype);
|
|
79
|
+
}
|
|
80
|
+
break;
|
|
81
|
+
case 7:
|
|
82
|
+
if (ftype === thrift_1.Thrift.Type.STRUCT) {
|
|
83
|
+
var value1 = sponsorshipLogoDimensions_1.SponsorshipLogoDimensionsSerde.read(protocol);
|
|
84
|
+
result.sponsorLogoDimensions = value1;
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
protocol.skip(ftype);
|
|
88
|
+
}
|
|
89
|
+
break;
|
|
90
|
+
case 8:
|
|
91
|
+
if (ftype === thrift_1.Thrift.Type.STRING) {
|
|
92
|
+
var value1 = protocol.readString();
|
|
93
|
+
result.highContrastSponsorLogo = value1;
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
protocol.skip(ftype);
|
|
97
|
+
}
|
|
98
|
+
break;
|
|
99
|
+
case 9:
|
|
100
|
+
if (ftype === thrift_1.Thrift.Type.STRUCT) {
|
|
101
|
+
var value1 = sponsorshipLogoDimensions_1.SponsorshipLogoDimensionsSerde.read(protocol);
|
|
102
|
+
result.highContrastSponsorLogoDimensions = value1;
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
protocol.skip(ftype);
|
|
106
|
+
}
|
|
107
|
+
break;
|
|
108
|
+
case 10:
|
|
109
|
+
if (ftype === thrift_1.Thrift.Type.STRUCT) {
|
|
110
|
+
var value1 = capiDateTime_1.CapiDateTimeSerde.read(protocol);
|
|
111
|
+
result.validFrom = value1;
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
protocol.skip(ftype);
|
|
115
|
+
}
|
|
116
|
+
break;
|
|
117
|
+
case 11:
|
|
118
|
+
if (ftype === thrift_1.Thrift.Type.STRUCT) {
|
|
119
|
+
var value1 = capiDateTime_1.CapiDateTimeSerde.read(protocol);
|
|
120
|
+
result.validTo = value1;
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
protocol.skip(ftype);
|
|
124
|
+
}
|
|
125
|
+
break;
|
|
126
|
+
default:
|
|
127
|
+
protocol.skip(ftype);
|
|
128
|
+
}
|
|
129
|
+
protocol.readFieldEnd();
|
|
130
|
+
}
|
|
131
|
+
protocol.readStructEnd();
|
|
132
|
+
// @ts-ignore
|
|
133
|
+
return result;
|
|
134
|
+
};
|
|
135
|
+
SponsorshipSerde.write = function (protocol, value0) {
|
|
136
|
+
protocol.writeStructBegin('Sponsorship');
|
|
137
|
+
if (value0.sponsorshipType !== null && value0.sponsorshipType !== undefined) {
|
|
138
|
+
var value1 = value0.sponsorshipType;
|
|
139
|
+
protocol.writeFieldBegin('sponsorshipType', thrift_1.Thrift.Type.I32, 1);
|
|
140
|
+
protocol.writeI32(value1);
|
|
141
|
+
protocol.writeFieldEnd();
|
|
142
|
+
}
|
|
143
|
+
if (value0.sponsorName !== null && value0.sponsorName !== undefined) {
|
|
144
|
+
var value1 = value0.sponsorName;
|
|
145
|
+
protocol.writeFieldBegin('sponsorName', thrift_1.Thrift.Type.STRING, 2);
|
|
146
|
+
protocol.writeString(value1);
|
|
147
|
+
protocol.writeFieldEnd();
|
|
148
|
+
}
|
|
149
|
+
if (value0.sponsorLogo !== null && value0.sponsorLogo !== undefined) {
|
|
150
|
+
var value1 = value0.sponsorLogo;
|
|
151
|
+
protocol.writeFieldBegin('sponsorLogo', thrift_1.Thrift.Type.STRING, 3);
|
|
152
|
+
protocol.writeString(value1);
|
|
153
|
+
protocol.writeFieldEnd();
|
|
154
|
+
}
|
|
155
|
+
if (value0.sponsorLink !== null && value0.sponsorLink !== undefined) {
|
|
156
|
+
var value1 = value0.sponsorLink;
|
|
157
|
+
protocol.writeFieldBegin('sponsorLink', thrift_1.Thrift.Type.STRING, 4);
|
|
158
|
+
protocol.writeString(value1);
|
|
159
|
+
protocol.writeFieldEnd();
|
|
160
|
+
}
|
|
161
|
+
if (value0.targeting !== null && value0.targeting !== undefined) {
|
|
162
|
+
var value1 = value0.targeting;
|
|
163
|
+
protocol.writeFieldBegin('targeting', thrift_1.Thrift.Type.STRUCT, 5);
|
|
164
|
+
sponsorshipTargeting_1.SponsorshipTargetingSerde.write(protocol, value1);
|
|
165
|
+
protocol.writeFieldEnd();
|
|
166
|
+
}
|
|
167
|
+
if (value0.aboutLink !== null && value0.aboutLink !== undefined) {
|
|
168
|
+
var value1 = value0.aboutLink;
|
|
169
|
+
protocol.writeFieldBegin('aboutLink', thrift_1.Thrift.Type.STRING, 6);
|
|
170
|
+
protocol.writeString(value1);
|
|
171
|
+
protocol.writeFieldEnd();
|
|
172
|
+
}
|
|
173
|
+
if (value0.sponsorLogoDimensions !== null && value0.sponsorLogoDimensions !== undefined) {
|
|
174
|
+
var value1 = value0.sponsorLogoDimensions;
|
|
175
|
+
protocol.writeFieldBegin('sponsorLogoDimensions', thrift_1.Thrift.Type.STRUCT, 7);
|
|
176
|
+
sponsorshipLogoDimensions_1.SponsorshipLogoDimensionsSerde.write(protocol, value1);
|
|
177
|
+
protocol.writeFieldEnd();
|
|
178
|
+
}
|
|
179
|
+
if (value0.highContrastSponsorLogo !== null && value0.highContrastSponsorLogo !== undefined) {
|
|
180
|
+
var value1 = value0.highContrastSponsorLogo;
|
|
181
|
+
protocol.writeFieldBegin('highContrastSponsorLogo', thrift_1.Thrift.Type.STRING, 8);
|
|
182
|
+
protocol.writeString(value1);
|
|
183
|
+
protocol.writeFieldEnd();
|
|
184
|
+
}
|
|
185
|
+
if (value0.highContrastSponsorLogoDimensions !== null && value0.highContrastSponsorLogoDimensions !== undefined) {
|
|
186
|
+
var value1 = value0.highContrastSponsorLogoDimensions;
|
|
187
|
+
protocol.writeFieldBegin('highContrastSponsorLogoDimensions', thrift_1.Thrift.Type.STRUCT, 9);
|
|
188
|
+
sponsorshipLogoDimensions_1.SponsorshipLogoDimensionsSerde.write(protocol, value1);
|
|
189
|
+
protocol.writeFieldEnd();
|
|
190
|
+
}
|
|
191
|
+
if (value0.validFrom !== null && value0.validFrom !== undefined) {
|
|
192
|
+
var value1 = value0.validFrom;
|
|
193
|
+
protocol.writeFieldBegin('validFrom', thrift_1.Thrift.Type.STRUCT, 10);
|
|
194
|
+
capiDateTime_1.CapiDateTimeSerde.write(protocol, value1);
|
|
195
|
+
protocol.writeFieldEnd();
|
|
196
|
+
}
|
|
197
|
+
if (value0.validTo !== null && value0.validTo !== undefined) {
|
|
198
|
+
var value1 = value0.validTo;
|
|
199
|
+
protocol.writeFieldBegin('validTo', thrift_1.Thrift.Type.STRUCT, 11);
|
|
200
|
+
capiDateTime_1.CapiDateTimeSerde.write(protocol, value1);
|
|
201
|
+
protocol.writeFieldEnd();
|
|
202
|
+
}
|
|
203
|
+
protocol.writeFieldStop();
|
|
204
|
+
protocol.writeStructEnd();
|
|
205
|
+
};
|
|
206
|
+
return SponsorshipSerde;
|
|
207
|
+
}());
|
|
208
|
+
exports.SponsorshipSerde = SponsorshipSerde;
|
|
@@ -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 SponsorshipLogoDimensions {
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
}
|
|
11
|
+
export declare class SponsorshipLogoDimensionsSerde {
|
|
12
|
+
static read(protocol: TProtocol): SponsorshipLogoDimensions;
|
|
13
|
+
static write(protocol: TProtocol, value0: SponsorshipLogoDimensions): void;
|
|
14
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
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.SponsorshipLogoDimensionsSerde = void 0;
|
|
9
|
+
var thrift_1 = require("thrift");
|
|
10
|
+
var SponsorshipLogoDimensionsSerde = /** @class */ (function () {
|
|
11
|
+
function SponsorshipLogoDimensionsSerde() {
|
|
12
|
+
}
|
|
13
|
+
SponsorshipLogoDimensionsSerde.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.width = 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.height = value1;
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
protocol.skip(ftype);
|
|
40
|
+
}
|
|
41
|
+
break;
|
|
42
|
+
default:
|
|
43
|
+
protocol.skip(ftype);
|
|
44
|
+
}
|
|
45
|
+
protocol.readFieldEnd();
|
|
46
|
+
}
|
|
47
|
+
protocol.readStructEnd();
|
|
48
|
+
// @ts-ignore
|
|
49
|
+
return result;
|
|
50
|
+
};
|
|
51
|
+
SponsorshipLogoDimensionsSerde.write = function (protocol, value0) {
|
|
52
|
+
protocol.writeStructBegin('SponsorshipLogoDimensions');
|
|
53
|
+
if (value0.width !== null && value0.width !== undefined) {
|
|
54
|
+
var value1 = value0.width;
|
|
55
|
+
protocol.writeFieldBegin('width', thrift_1.Thrift.Type.I32, 1);
|
|
56
|
+
protocol.writeI32(value1);
|
|
57
|
+
protocol.writeFieldEnd();
|
|
58
|
+
}
|
|
59
|
+
if (value0.height !== null && value0.height !== undefined) {
|
|
60
|
+
var value1 = value0.height;
|
|
61
|
+
protocol.writeFieldBegin('height', thrift_1.Thrift.Type.I32, 2);
|
|
62
|
+
protocol.writeI32(value1);
|
|
63
|
+
protocol.writeFieldEnd();
|
|
64
|
+
}
|
|
65
|
+
protocol.writeFieldStop();
|
|
66
|
+
protocol.writeStructEnd();
|
|
67
|
+
};
|
|
68
|
+
return SponsorshipLogoDimensionsSerde;
|
|
69
|
+
}());
|
|
70
|
+
exports.SponsorshipLogoDimensionsSerde = SponsorshipLogoDimensionsSerde;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Autogenerated by scrooge-generator-extras
|
|
3
|
+
*
|
|
4
|
+
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
|
5
|
+
*/
|
|
6
|
+
import { TProtocol } from 'thrift';
|
|
7
|
+
import { CapiDateTime } from './capiDateTime';
|
|
8
|
+
export interface SponsorshipTargeting {
|
|
9
|
+
publishedSince?: CapiDateTime;
|
|
10
|
+
validEditions?: string[];
|
|
11
|
+
}
|
|
12
|
+
export declare class SponsorshipTargetingSerde {
|
|
13
|
+
static read(protocol: TProtocol): SponsorshipTargeting;
|
|
14
|
+
static write(protocol: TProtocol, value0: SponsorshipTargeting): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Autogenerated by scrooge-generator-extras
|
|
4
|
+
*
|
|
5
|
+
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.SponsorshipTargetingSerde = void 0;
|
|
9
|
+
var thrift_1 = require("thrift");
|
|
10
|
+
var capiDateTime_1 = require("./capiDateTime");
|
|
11
|
+
var SponsorshipTargetingSerde = /** @class */ (function () {
|
|
12
|
+
function SponsorshipTargetingSerde() {
|
|
13
|
+
}
|
|
14
|
+
SponsorshipTargetingSerde.read = function (protocol) {
|
|
15
|
+
var _a;
|
|
16
|
+
protocol.readStructBegin();
|
|
17
|
+
var result = {};
|
|
18
|
+
while (true) {
|
|
19
|
+
var ret = protocol.readFieldBegin();
|
|
20
|
+
var ftype = ret.ftype;
|
|
21
|
+
var fid = ret.fid;
|
|
22
|
+
if (ftype === thrift_1.Thrift.Type.STOP) {
|
|
23
|
+
break;
|
|
24
|
+
}
|
|
25
|
+
switch (fid) {
|
|
26
|
+
case 1:
|
|
27
|
+
if (ftype === thrift_1.Thrift.Type.STRUCT) {
|
|
28
|
+
var value1 = capiDateTime_1.CapiDateTimeSerde.read(protocol);
|
|
29
|
+
result.publishedSince = value1;
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
protocol.skip(ftype);
|
|
33
|
+
}
|
|
34
|
+
break;
|
|
35
|
+
case 2:
|
|
36
|
+
if (ftype === thrift_1.Thrift.Type.LIST) {
|
|
37
|
+
var listInfo1 = protocol.readListBegin();
|
|
38
|
+
var listSize1 = (_a = listInfo1.size) !== null && _a !== void 0 ? _a : 0;
|
|
39
|
+
var value1 = [];
|
|
40
|
+
if (listInfo1.etype === thrift_1.Thrift.Type.STRING) {
|
|
41
|
+
for (var i = 0; i < listSize1; i++) {
|
|
42
|
+
var value2 = protocol.readString();
|
|
43
|
+
value1.push(value2);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
protocol.readListEnd();
|
|
47
|
+
result.validEditions = value1;
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
protocol.skip(ftype);
|
|
51
|
+
}
|
|
52
|
+
break;
|
|
53
|
+
default:
|
|
54
|
+
protocol.skip(ftype);
|
|
55
|
+
}
|
|
56
|
+
protocol.readFieldEnd();
|
|
57
|
+
}
|
|
58
|
+
protocol.readStructEnd();
|
|
59
|
+
// @ts-ignore
|
|
60
|
+
return result;
|
|
61
|
+
};
|
|
62
|
+
SponsorshipTargetingSerde.write = function (protocol, value0) {
|
|
63
|
+
protocol.writeStructBegin('SponsorshipTargeting');
|
|
64
|
+
if (value0.publishedSince !== null && value0.publishedSince !== undefined) {
|
|
65
|
+
var value1 = value0.publishedSince;
|
|
66
|
+
protocol.writeFieldBegin('publishedSince', thrift_1.Thrift.Type.STRUCT, 1);
|
|
67
|
+
capiDateTime_1.CapiDateTimeSerde.write(protocol, value1);
|
|
68
|
+
protocol.writeFieldEnd();
|
|
69
|
+
}
|
|
70
|
+
if (value0.validEditions !== null && value0.validEditions !== undefined) {
|
|
71
|
+
var value1 = value0.validEditions;
|
|
72
|
+
protocol.writeFieldBegin('validEditions', thrift_1.Thrift.Type.LIST, 2);
|
|
73
|
+
protocol.writeListBegin(thrift_1.Thrift.Type.STRING, value1.length);
|
|
74
|
+
value1.forEach(function (value2) {
|
|
75
|
+
protocol.writeString(value2);
|
|
76
|
+
});
|
|
77
|
+
protocol.writeListEnd();
|
|
78
|
+
protocol.writeFieldEnd();
|
|
79
|
+
}
|
|
80
|
+
protocol.writeFieldStop();
|
|
81
|
+
protocol.writeStructEnd();
|
|
82
|
+
};
|
|
83
|
+
return SponsorshipTargetingSerde;
|
|
84
|
+
}());
|
|
85
|
+
exports.SponsorshipTargetingSerde = SponsorshipTargetingSerde;
|
|
@@ -0,0 +1,14 @@
|
|
|
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.SponsorshipType = void 0;
|
|
9
|
+
var SponsorshipType;
|
|
10
|
+
(function (SponsorshipType) {
|
|
11
|
+
SponsorshipType[SponsorshipType["SPONSORED"] = 0] = "SPONSORED";
|
|
12
|
+
SponsorshipType[SponsorshipType["FOUNDATION"] = 1] = "FOUNDATION";
|
|
13
|
+
SponsorshipType[SponsorshipType["PAID_CONTENT"] = 2] = "PAID_CONTENT";
|
|
14
|
+
})(SponsorshipType || (exports.SponsorshipType = SponsorshipType = {}));
|
|
@@ -0,0 +1,25 @@
|
|
|
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 StandardElementFields {
|
|
8
|
+
url?: string;
|
|
9
|
+
originalUrl?: string;
|
|
10
|
+
source?: string;
|
|
11
|
+
title?: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
credit?: string;
|
|
14
|
+
caption?: string;
|
|
15
|
+
width?: number;
|
|
16
|
+
height?: number;
|
|
17
|
+
html?: string;
|
|
18
|
+
role?: string;
|
|
19
|
+
isMandatory?: boolean;
|
|
20
|
+
sourceDomain?: string;
|
|
21
|
+
}
|
|
22
|
+
export declare class StandardElementFieldsSerde {
|
|
23
|
+
static read(protocol: TProtocol): StandardElementFields;
|
|
24
|
+
static write(protocol: TProtocol, value0: StandardElementFields): void;
|
|
25
|
+
}
|