@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.CartoonImageSerde = void 0;
|
|
9
|
+
var thrift_1 = require("thrift");
|
|
10
|
+
var CartoonImageSerde = /** @class */ (function () {
|
|
11
|
+
function CartoonImageSerde() {
|
|
12
|
+
}
|
|
13
|
+
CartoonImageSerde.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.mimeType = 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.file = 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.width = 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.height = 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.mediaId = value1;
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
protocol.skip(ftype);
|
|
67
|
+
}
|
|
68
|
+
break;
|
|
69
|
+
default:
|
|
70
|
+
protocol.skip(ftype);
|
|
71
|
+
}
|
|
72
|
+
protocol.readFieldEnd();
|
|
73
|
+
}
|
|
74
|
+
protocol.readStructEnd();
|
|
75
|
+
// @ts-ignore
|
|
76
|
+
return result;
|
|
77
|
+
};
|
|
78
|
+
CartoonImageSerde.write = function (protocol, value0) {
|
|
79
|
+
protocol.writeStructBegin('CartoonImage');
|
|
80
|
+
if (value0.mimeType !== null && value0.mimeType !== undefined) {
|
|
81
|
+
var value1 = value0.mimeType;
|
|
82
|
+
protocol.writeFieldBegin('mimeType', thrift_1.Thrift.Type.STRING, 1);
|
|
83
|
+
protocol.writeString(value1);
|
|
84
|
+
protocol.writeFieldEnd();
|
|
85
|
+
}
|
|
86
|
+
if (value0.file !== null && value0.file !== undefined) {
|
|
87
|
+
var value1 = value0.file;
|
|
88
|
+
protocol.writeFieldBegin('file', thrift_1.Thrift.Type.STRING, 2);
|
|
89
|
+
protocol.writeString(value1);
|
|
90
|
+
protocol.writeFieldEnd();
|
|
91
|
+
}
|
|
92
|
+
if (value0.width !== null && value0.width !== undefined) {
|
|
93
|
+
var value1 = value0.width;
|
|
94
|
+
protocol.writeFieldBegin('width', thrift_1.Thrift.Type.I32, 3);
|
|
95
|
+
protocol.writeI32(value1);
|
|
96
|
+
protocol.writeFieldEnd();
|
|
97
|
+
}
|
|
98
|
+
if (value0.height !== null && value0.height !== undefined) {
|
|
99
|
+
var value1 = value0.height;
|
|
100
|
+
protocol.writeFieldBegin('height', thrift_1.Thrift.Type.I32, 4);
|
|
101
|
+
protocol.writeI32(value1);
|
|
102
|
+
protocol.writeFieldEnd();
|
|
103
|
+
}
|
|
104
|
+
if (value0.mediaId !== null && value0.mediaId !== undefined) {
|
|
105
|
+
var value1 = value0.mediaId;
|
|
106
|
+
protocol.writeFieldBegin('mediaId', thrift_1.Thrift.Type.STRING, 5);
|
|
107
|
+
protocol.writeString(value1);
|
|
108
|
+
protocol.writeFieldEnd();
|
|
109
|
+
}
|
|
110
|
+
protocol.writeFieldStop();
|
|
111
|
+
protocol.writeStructEnd();
|
|
112
|
+
};
|
|
113
|
+
return CartoonImageSerde;
|
|
114
|
+
}());
|
|
115
|
+
exports.CartoonImageSerde = CartoonImageSerde;
|
|
@@ -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 { CartoonImage } from './cartoonImage';
|
|
8
|
+
export interface CartoonVariant {
|
|
9
|
+
viewportSize: string;
|
|
10
|
+
images: CartoonImage[];
|
|
11
|
+
}
|
|
12
|
+
export declare class CartoonVariantSerde {
|
|
13
|
+
static read(protocol: TProtocol): CartoonVariant;
|
|
14
|
+
static write(protocol: TProtocol, value0: CartoonVariant): 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.CartoonVariantSerde = void 0;
|
|
9
|
+
var thrift_1 = require("thrift");
|
|
10
|
+
var cartoonImage_1 = require("./cartoonImage");
|
|
11
|
+
var CartoonVariantSerde = /** @class */ (function () {
|
|
12
|
+
function CartoonVariantSerde() {
|
|
13
|
+
}
|
|
14
|
+
CartoonVariantSerde.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.viewportSize = 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.STRUCT) {
|
|
41
|
+
for (var i = 0; i < listSize1; i++) {
|
|
42
|
+
var value2 = cartoonImage_1.CartoonImageSerde.read(protocol);
|
|
43
|
+
value1.push(value2);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
protocol.readListEnd();
|
|
47
|
+
result.images = 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
|
+
CartoonVariantSerde.write = function (protocol, value0) {
|
|
63
|
+
protocol.writeStructBegin('CartoonVariant');
|
|
64
|
+
if (value0.viewportSize !== null && value0.viewportSize !== undefined) {
|
|
65
|
+
var value1 = value0.viewportSize;
|
|
66
|
+
protocol.writeFieldBegin('viewportSize', thrift_1.Thrift.Type.STRING, 1);
|
|
67
|
+
protocol.writeString(value1);
|
|
68
|
+
protocol.writeFieldEnd();
|
|
69
|
+
}
|
|
70
|
+
if (value0.images !== null && value0.images !== undefined) {
|
|
71
|
+
var value1 = value0.images;
|
|
72
|
+
protocol.writeFieldBegin('images', thrift_1.Thrift.Type.LIST, 2);
|
|
73
|
+
protocol.writeListBegin(thrift_1.Thrift.Type.STRUCT, value1.length);
|
|
74
|
+
value1.forEach(function (value2) {
|
|
75
|
+
cartoonImage_1.CartoonImageSerde.write(protocol, value2);
|
|
76
|
+
});
|
|
77
|
+
protocol.writeListEnd();
|
|
78
|
+
protocol.writeFieldEnd();
|
|
79
|
+
}
|
|
80
|
+
protocol.writeFieldStop();
|
|
81
|
+
protocol.writeStructEnd();
|
|
82
|
+
};
|
|
83
|
+
return CartoonVariantSerde;
|
|
84
|
+
}());
|
|
85
|
+
exports.CartoonVariantSerde = CartoonVariantSerde;
|
|
@@ -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 ChannelFields {
|
|
9
|
+
isAvailable: boolean;
|
|
10
|
+
publicationDate?: CapiDateTime;
|
|
11
|
+
}
|
|
12
|
+
export declare class ChannelFieldsSerde {
|
|
13
|
+
static read(protocol: TProtocol): ChannelFields;
|
|
14
|
+
static write(protocol: TProtocol, value0: ChannelFields): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
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.ChannelFieldsSerde = void 0;
|
|
9
|
+
var thrift_1 = require("thrift");
|
|
10
|
+
var capiDateTime_1 = require("./capiDateTime");
|
|
11
|
+
var ChannelFieldsSerde = /** @class */ (function () {
|
|
12
|
+
function ChannelFieldsSerde() {
|
|
13
|
+
}
|
|
14
|
+
ChannelFieldsSerde.read = function (protocol) {
|
|
15
|
+
protocol.readStructBegin();
|
|
16
|
+
var result = {};
|
|
17
|
+
while (true) {
|
|
18
|
+
var ret = protocol.readFieldBegin();
|
|
19
|
+
var ftype = ret.ftype;
|
|
20
|
+
var fid = ret.fid;
|
|
21
|
+
if (ftype === thrift_1.Thrift.Type.STOP) {
|
|
22
|
+
break;
|
|
23
|
+
}
|
|
24
|
+
switch (fid) {
|
|
25
|
+
case 1:
|
|
26
|
+
if (ftype === thrift_1.Thrift.Type.BOOL) {
|
|
27
|
+
var value1 = protocol.readBool();
|
|
28
|
+
result.isAvailable = value1;
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
protocol.skip(ftype);
|
|
32
|
+
}
|
|
33
|
+
break;
|
|
34
|
+
case 2:
|
|
35
|
+
if (ftype === thrift_1.Thrift.Type.STRUCT) {
|
|
36
|
+
var value1 = capiDateTime_1.CapiDateTimeSerde.read(protocol);
|
|
37
|
+
result.publicationDate = value1;
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
protocol.skip(ftype);
|
|
41
|
+
}
|
|
42
|
+
break;
|
|
43
|
+
default:
|
|
44
|
+
protocol.skip(ftype);
|
|
45
|
+
}
|
|
46
|
+
protocol.readFieldEnd();
|
|
47
|
+
}
|
|
48
|
+
protocol.readStructEnd();
|
|
49
|
+
// @ts-ignore
|
|
50
|
+
return result;
|
|
51
|
+
};
|
|
52
|
+
ChannelFieldsSerde.write = function (protocol, value0) {
|
|
53
|
+
protocol.writeStructBegin('ChannelFields');
|
|
54
|
+
if (value0.isAvailable !== null && value0.isAvailable !== undefined) {
|
|
55
|
+
var value1 = value0.isAvailable;
|
|
56
|
+
protocol.writeFieldBegin('isAvailable', thrift_1.Thrift.Type.BOOL, 1);
|
|
57
|
+
protocol.writeBool(value1);
|
|
58
|
+
protocol.writeFieldEnd();
|
|
59
|
+
}
|
|
60
|
+
if (value0.publicationDate !== null && value0.publicationDate !== undefined) {
|
|
61
|
+
var value1 = value0.publicationDate;
|
|
62
|
+
protocol.writeFieldBegin('publicationDate', thrift_1.Thrift.Type.STRUCT, 2);
|
|
63
|
+
capiDateTime_1.CapiDateTimeSerde.write(protocol, value1);
|
|
64
|
+
protocol.writeFieldEnd();
|
|
65
|
+
}
|
|
66
|
+
protocol.writeFieldStop();
|
|
67
|
+
protocol.writeStructEnd();
|
|
68
|
+
};
|
|
69
|
+
return ChannelFieldsSerde;
|
|
70
|
+
}());
|
|
71
|
+
exports.ChannelFieldsSerde = ChannelFieldsSerde;
|
|
@@ -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 CodeElementFields {
|
|
8
|
+
html: string;
|
|
9
|
+
language: string;
|
|
10
|
+
}
|
|
11
|
+
export declare class CodeElementFieldsSerde {
|
|
12
|
+
static read(protocol: TProtocol): CodeElementFields;
|
|
13
|
+
static write(protocol: TProtocol, value0: CodeElementFields): 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.CodeElementFieldsSerde = void 0;
|
|
9
|
+
var thrift_1 = require("thrift");
|
|
10
|
+
var CodeElementFieldsSerde = /** @class */ (function () {
|
|
11
|
+
function CodeElementFieldsSerde() {
|
|
12
|
+
}
|
|
13
|
+
CodeElementFieldsSerde.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.html = 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.language = 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
|
+
CodeElementFieldsSerde.write = function (protocol, value0) {
|
|
52
|
+
protocol.writeStructBegin('CodeElementFields');
|
|
53
|
+
if (value0.html !== null && value0.html !== undefined) {
|
|
54
|
+
var value1 = value0.html;
|
|
55
|
+
protocol.writeFieldBegin('html', thrift_1.Thrift.Type.STRING, 1);
|
|
56
|
+
protocol.writeString(value1);
|
|
57
|
+
protocol.writeFieldEnd();
|
|
58
|
+
}
|
|
59
|
+
if (value0.language !== null && value0.language !== undefined) {
|
|
60
|
+
var value1 = value0.language;
|
|
61
|
+
protocol.writeFieldBegin('language', thrift_1.Thrift.Type.STRING, 2);
|
|
62
|
+
protocol.writeString(value1);
|
|
63
|
+
protocol.writeFieldEnd();
|
|
64
|
+
}
|
|
65
|
+
protocol.writeFieldStop();
|
|
66
|
+
protocol.writeStructEnd();
|
|
67
|
+
};
|
|
68
|
+
return CodeElementFieldsSerde;
|
|
69
|
+
}());
|
|
70
|
+
exports.CodeElementFieldsSerde = CodeElementFieldsSerde;
|
|
@@ -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 CommentElementFields {
|
|
8
|
+
source?: string;
|
|
9
|
+
discussionKey?: string;
|
|
10
|
+
commentUrl?: string;
|
|
11
|
+
originalUrl?: string;
|
|
12
|
+
sourceUrl?: string;
|
|
13
|
+
discussionUrl?: string;
|
|
14
|
+
authorUrl?: string;
|
|
15
|
+
html?: string;
|
|
16
|
+
authorName?: string;
|
|
17
|
+
commentId?: number;
|
|
18
|
+
role?: string;
|
|
19
|
+
isMandatory?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare class CommentElementFieldsSerde {
|
|
22
|
+
static read(protocol: TProtocol): CommentElementFields;
|
|
23
|
+
static write(protocol: TProtocol, value0: CommentElementFields): 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.CommentElementFieldsSerde = void 0;
|
|
9
|
+
var thrift_1 = require("thrift");
|
|
10
|
+
var CommentElementFieldsSerde = /** @class */ (function () {
|
|
11
|
+
function CommentElementFieldsSerde() {
|
|
12
|
+
}
|
|
13
|
+
CommentElementFieldsSerde.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.source = 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.discussionKey = 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.commentUrl = 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.originalUrl = 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.sourceUrl = 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.discussionUrl = 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.authorUrl = 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.html = 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.authorName = 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.commentId = value1;
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
protocol.skip(ftype);
|
|
112
|
+
}
|
|
113
|
+
break;
|
|
114
|
+
case 11:
|
|
115
|
+
if (ftype === thrift_1.Thrift.Type.STRING) {
|
|
116
|
+
var value1 = protocol.readString();
|
|
117
|
+
result.role = value1;
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
protocol.skip(ftype);
|
|
121
|
+
}
|
|
122
|
+
break;
|
|
123
|
+
case 12:
|
|
124
|
+
if (ftype === thrift_1.Thrift.Type.BOOL) {
|
|
125
|
+
var value1 = protocol.readBool();
|
|
126
|
+
result.isMandatory = 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
|
+
CommentElementFieldsSerde.write = function (protocol, value0) {
|
|
142
|
+
protocol.writeStructBegin('CommentElementFields');
|
|
143
|
+
if (value0.source !== null && value0.source !== undefined) {
|
|
144
|
+
var value1 = value0.source;
|
|
145
|
+
protocol.writeFieldBegin('source', thrift_1.Thrift.Type.STRING, 1);
|
|
146
|
+
protocol.writeString(value1);
|
|
147
|
+
protocol.writeFieldEnd();
|
|
148
|
+
}
|
|
149
|
+
if (value0.discussionKey !== null && value0.discussionKey !== undefined) {
|
|
150
|
+
var value1 = value0.discussionKey;
|
|
151
|
+
protocol.writeFieldBegin('discussionKey', thrift_1.Thrift.Type.STRING, 2);
|
|
152
|
+
protocol.writeString(value1);
|
|
153
|
+
protocol.writeFieldEnd();
|
|
154
|
+
}
|
|
155
|
+
if (value0.commentUrl !== null && value0.commentUrl !== undefined) {
|
|
156
|
+
var value1 = value0.commentUrl;
|
|
157
|
+
protocol.writeFieldBegin('commentUrl', thrift_1.Thrift.Type.STRING, 3);
|
|
158
|
+
protocol.writeString(value1);
|
|
159
|
+
protocol.writeFieldEnd();
|
|
160
|
+
}
|
|
161
|
+
if (value0.originalUrl !== null && value0.originalUrl !== undefined) {
|
|
162
|
+
var value1 = value0.originalUrl;
|
|
163
|
+
protocol.writeFieldBegin('originalUrl', thrift_1.Thrift.Type.STRING, 4);
|
|
164
|
+
protocol.writeString(value1);
|
|
165
|
+
protocol.writeFieldEnd();
|
|
166
|
+
}
|
|
167
|
+
if (value0.sourceUrl !== null && value0.sourceUrl !== undefined) {
|
|
168
|
+
var value1 = value0.sourceUrl;
|
|
169
|
+
protocol.writeFieldBegin('sourceUrl', thrift_1.Thrift.Type.STRING, 5);
|
|
170
|
+
protocol.writeString(value1);
|
|
171
|
+
protocol.writeFieldEnd();
|
|
172
|
+
}
|
|
173
|
+
if (value0.discussionUrl !== null && value0.discussionUrl !== undefined) {
|
|
174
|
+
var value1 = value0.discussionUrl;
|
|
175
|
+
protocol.writeFieldBegin('discussionUrl', thrift_1.Thrift.Type.STRING, 6);
|
|
176
|
+
protocol.writeString(value1);
|
|
177
|
+
protocol.writeFieldEnd();
|
|
178
|
+
}
|
|
179
|
+
if (value0.authorUrl !== null && value0.authorUrl !== undefined) {
|
|
180
|
+
var value1 = value0.authorUrl;
|
|
181
|
+
protocol.writeFieldBegin('authorUrl', thrift_1.Thrift.Type.STRING, 7);
|
|
182
|
+
protocol.writeString(value1);
|
|
183
|
+
protocol.writeFieldEnd();
|
|
184
|
+
}
|
|
185
|
+
if (value0.html !== null && value0.html !== undefined) {
|
|
186
|
+
var value1 = value0.html;
|
|
187
|
+
protocol.writeFieldBegin('html', thrift_1.Thrift.Type.STRING, 8);
|
|
188
|
+
protocol.writeString(value1);
|
|
189
|
+
protocol.writeFieldEnd();
|
|
190
|
+
}
|
|
191
|
+
if (value0.authorName !== null && value0.authorName !== undefined) {
|
|
192
|
+
var value1 = value0.authorName;
|
|
193
|
+
protocol.writeFieldBegin('authorName', thrift_1.Thrift.Type.STRING, 9);
|
|
194
|
+
protocol.writeString(value1);
|
|
195
|
+
protocol.writeFieldEnd();
|
|
196
|
+
}
|
|
197
|
+
if (value0.commentId !== null && value0.commentId !== undefined) {
|
|
198
|
+
var value1 = value0.commentId;
|
|
199
|
+
protocol.writeFieldBegin('commentId', thrift_1.Thrift.Type.I32, 10);
|
|
200
|
+
protocol.writeI32(value1);
|
|
201
|
+
protocol.writeFieldEnd();
|
|
202
|
+
}
|
|
203
|
+
if (value0.role !== null && value0.role !== undefined) {
|
|
204
|
+
var value1 = value0.role;
|
|
205
|
+
protocol.writeFieldBegin('role', thrift_1.Thrift.Type.STRING, 11);
|
|
206
|
+
protocol.writeString(value1);
|
|
207
|
+
protocol.writeFieldEnd();
|
|
208
|
+
}
|
|
209
|
+
if (value0.isMandatory !== null && value0.isMandatory !== undefined) {
|
|
210
|
+
var value1 = value0.isMandatory;
|
|
211
|
+
protocol.writeFieldBegin('isMandatory', thrift_1.Thrift.Type.BOOL, 12);
|
|
212
|
+
protocol.writeBool(value1);
|
|
213
|
+
protocol.writeFieldEnd();
|
|
214
|
+
}
|
|
215
|
+
protocol.writeFieldStop();
|
|
216
|
+
protocol.writeStructEnd();
|
|
217
|
+
};
|
|
218
|
+
return CommentElementFieldsSerde;
|
|
219
|
+
}());
|
|
220
|
+
exports.CommentElementFieldsSerde = CommentElementFieldsSerde;
|
package/v1/content.d.ts
ADDED
|
@@ -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 { AliasPath } from './aliasPath';
|
|
8
|
+
import { Atoms } from './atoms';
|
|
9
|
+
import { Blocks } from './blocks';
|
|
10
|
+
import { CapiDateTime } from './capiDateTime';
|
|
11
|
+
import { ContentChannel } from './contentChannel';
|
|
12
|
+
import { ContentFields } from './contentFields';
|
|
13
|
+
import { ContentStats } from './contentStats';
|
|
14
|
+
import { ContentType } from './contentType';
|
|
15
|
+
import { Crossword } from './crossword';
|
|
16
|
+
import { Debug } from './debug';
|
|
17
|
+
import { Element } from './element';
|
|
18
|
+
import { Reference } from './reference';
|
|
19
|
+
import { Rights } from './rights';
|
|
20
|
+
import { Section } from './section';
|
|
21
|
+
import { Tag } from './tag';
|
|
22
|
+
export interface Content {
|
|
23
|
+
id: string;
|
|
24
|
+
type: ContentType;
|
|
25
|
+
sectionId?: string;
|
|
26
|
+
sectionName?: string;
|
|
27
|
+
webPublicationDate?: CapiDateTime;
|
|
28
|
+
webTitle: string;
|
|
29
|
+
webUrl: string;
|
|
30
|
+
apiUrl: string;
|
|
31
|
+
fields?: ContentFields;
|
|
32
|
+
tags: Tag[];
|
|
33
|
+
elements?: Element[];
|
|
34
|
+
references: Reference[];
|
|
35
|
+
isExpired?: boolean;
|
|
36
|
+
blocks?: Blocks;
|
|
37
|
+
rights?: Rights;
|
|
38
|
+
crossword?: Crossword;
|
|
39
|
+
atoms?: Atoms;
|
|
40
|
+
stats?: ContentStats;
|
|
41
|
+
section?: Section;
|
|
42
|
+
debug?: Debug;
|
|
43
|
+
isGone?: boolean;
|
|
44
|
+
isHosted: boolean;
|
|
45
|
+
pillarId?: string;
|
|
46
|
+
pillarName?: string;
|
|
47
|
+
aliasPaths?: AliasPath[];
|
|
48
|
+
channels?: ContentChannel[];
|
|
49
|
+
}
|
|
50
|
+
export declare class ContentSerde {
|
|
51
|
+
static read(protocol: TProtocol): Content;
|
|
52
|
+
static write(protocol: TProtocol, value0: Content): void;
|
|
53
|
+
}
|