@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
package/v1/package.js
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
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.PackageSerde = void 0;
|
|
9
|
+
var thrift_1 = require("thrift");
|
|
10
|
+
var capiDateTime_1 = require("./capiDateTime");
|
|
11
|
+
var packageArticle_1 = require("./packageArticle");
|
|
12
|
+
var PackageSerde = /** @class */ (function () {
|
|
13
|
+
function PackageSerde() {
|
|
14
|
+
}
|
|
15
|
+
PackageSerde.read = function (protocol) {
|
|
16
|
+
var _a;
|
|
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.STRING) {
|
|
29
|
+
var value1 = protocol.readString();
|
|
30
|
+
result.packageId = value1;
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
protocol.skip(ftype);
|
|
34
|
+
}
|
|
35
|
+
break;
|
|
36
|
+
case 2:
|
|
37
|
+
if (ftype === thrift_1.Thrift.Type.LIST) {
|
|
38
|
+
var listInfo1 = protocol.readListBegin();
|
|
39
|
+
var listSize1 = (_a = listInfo1.size) !== null && _a !== void 0 ? _a : 0;
|
|
40
|
+
var value1 = [];
|
|
41
|
+
if (listInfo1.etype === thrift_1.Thrift.Type.STRUCT) {
|
|
42
|
+
for (var i = 0; i < listSize1; i++) {
|
|
43
|
+
var value2 = packageArticle_1.PackageArticleSerde.read(protocol);
|
|
44
|
+
value1.push(value2);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
protocol.readListEnd();
|
|
48
|
+
result.articles = value1;
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
protocol.skip(ftype);
|
|
52
|
+
}
|
|
53
|
+
break;
|
|
54
|
+
case 3:
|
|
55
|
+
if (ftype === thrift_1.Thrift.Type.STRING) {
|
|
56
|
+
var value1 = protocol.readString();
|
|
57
|
+
result.packageName = value1;
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
protocol.skip(ftype);
|
|
61
|
+
}
|
|
62
|
+
break;
|
|
63
|
+
case 4:
|
|
64
|
+
if (ftype === thrift_1.Thrift.Type.STRUCT) {
|
|
65
|
+
var value1 = capiDateTime_1.CapiDateTimeSerde.read(protocol);
|
|
66
|
+
result.lastModified = value1;
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
protocol.skip(ftype);
|
|
70
|
+
}
|
|
71
|
+
break;
|
|
72
|
+
default:
|
|
73
|
+
protocol.skip(ftype);
|
|
74
|
+
}
|
|
75
|
+
protocol.readFieldEnd();
|
|
76
|
+
}
|
|
77
|
+
protocol.readStructEnd();
|
|
78
|
+
// @ts-ignore
|
|
79
|
+
return result;
|
|
80
|
+
};
|
|
81
|
+
PackageSerde.write = function (protocol, value0) {
|
|
82
|
+
protocol.writeStructBegin('Package');
|
|
83
|
+
if (value0.packageId !== null && value0.packageId !== undefined) {
|
|
84
|
+
var value1 = value0.packageId;
|
|
85
|
+
protocol.writeFieldBegin('packageId', thrift_1.Thrift.Type.STRING, 1);
|
|
86
|
+
protocol.writeString(value1);
|
|
87
|
+
protocol.writeFieldEnd();
|
|
88
|
+
}
|
|
89
|
+
if (value0.articles !== null && value0.articles !== undefined) {
|
|
90
|
+
var value1 = value0.articles;
|
|
91
|
+
protocol.writeFieldBegin('articles', thrift_1.Thrift.Type.LIST, 2);
|
|
92
|
+
protocol.writeListBegin(thrift_1.Thrift.Type.STRUCT, value1.length);
|
|
93
|
+
value1.forEach(function (value2) {
|
|
94
|
+
packageArticle_1.PackageArticleSerde.write(protocol, value2);
|
|
95
|
+
});
|
|
96
|
+
protocol.writeListEnd();
|
|
97
|
+
protocol.writeFieldEnd();
|
|
98
|
+
}
|
|
99
|
+
if (value0.packageName !== null && value0.packageName !== undefined) {
|
|
100
|
+
var value1 = value0.packageName;
|
|
101
|
+
protocol.writeFieldBegin('packageName', thrift_1.Thrift.Type.STRING, 3);
|
|
102
|
+
protocol.writeString(value1);
|
|
103
|
+
protocol.writeFieldEnd();
|
|
104
|
+
}
|
|
105
|
+
if (value0.lastModified !== null && value0.lastModified !== undefined) {
|
|
106
|
+
var value1 = value0.lastModified;
|
|
107
|
+
protocol.writeFieldBegin('lastModified', thrift_1.Thrift.Type.STRUCT, 4);
|
|
108
|
+
capiDateTime_1.CapiDateTimeSerde.write(protocol, value1);
|
|
109
|
+
protocol.writeFieldEnd();
|
|
110
|
+
}
|
|
111
|
+
protocol.writeFieldStop();
|
|
112
|
+
protocol.writeStructEnd();
|
|
113
|
+
};
|
|
114
|
+
return PackageSerde;
|
|
115
|
+
}());
|
|
116
|
+
exports.PackageSerde = PackageSerde;
|
|
@@ -0,0 +1,16 @@
|
|
|
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 { Article } from '@guardian/story-packages-model/v1/article';
|
|
9
|
+
export interface PackageArticle {
|
|
10
|
+
metadata: Article;
|
|
11
|
+
content: Content;
|
|
12
|
+
}
|
|
13
|
+
export declare class PackageArticleSerde {
|
|
14
|
+
static read(protocol: TProtocol): PackageArticle;
|
|
15
|
+
static write(protocol: TProtocol, value0: PackageArticle): void;
|
|
16
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
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.PackageArticleSerde = void 0;
|
|
9
|
+
var thrift_1 = require("thrift");
|
|
10
|
+
var content_1 = require("./content");
|
|
11
|
+
var article_1 = require("@guardian/story-packages-model/v1/article");
|
|
12
|
+
var PackageArticleSerde = /** @class */ (function () {
|
|
13
|
+
function PackageArticleSerde() {
|
|
14
|
+
}
|
|
15
|
+
PackageArticleSerde.read = function (protocol) {
|
|
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 = article_1.ArticleSerde.read(protocol);
|
|
29
|
+
result.metadata = value1;
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
protocol.skip(ftype);
|
|
33
|
+
}
|
|
34
|
+
break;
|
|
35
|
+
case 2:
|
|
36
|
+
if (ftype === thrift_1.Thrift.Type.STRUCT) {
|
|
37
|
+
var value1 = content_1.ContentSerde.read(protocol);
|
|
38
|
+
result.content = value1;
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
protocol.skip(ftype);
|
|
42
|
+
}
|
|
43
|
+
break;
|
|
44
|
+
default:
|
|
45
|
+
protocol.skip(ftype);
|
|
46
|
+
}
|
|
47
|
+
protocol.readFieldEnd();
|
|
48
|
+
}
|
|
49
|
+
protocol.readStructEnd();
|
|
50
|
+
// @ts-ignore
|
|
51
|
+
return result;
|
|
52
|
+
};
|
|
53
|
+
PackageArticleSerde.write = function (protocol, value0) {
|
|
54
|
+
protocol.writeStructBegin('PackageArticle');
|
|
55
|
+
if (value0.metadata !== null && value0.metadata !== undefined) {
|
|
56
|
+
var value1 = value0.metadata;
|
|
57
|
+
protocol.writeFieldBegin('metadata', thrift_1.Thrift.Type.STRUCT, 1);
|
|
58
|
+
article_1.ArticleSerde.write(protocol, value1);
|
|
59
|
+
protocol.writeFieldEnd();
|
|
60
|
+
}
|
|
61
|
+
if (value0.content !== null && value0.content !== undefined) {
|
|
62
|
+
var value1 = value0.content;
|
|
63
|
+
protocol.writeFieldBegin('content', thrift_1.Thrift.Type.STRUCT, 2);
|
|
64
|
+
content_1.ContentSerde.write(protocol, value1);
|
|
65
|
+
protocol.writeFieldEnd();
|
|
66
|
+
}
|
|
67
|
+
protocol.writeFieldStop();
|
|
68
|
+
protocol.writeStructEnd();
|
|
69
|
+
};
|
|
70
|
+
return PackageArticleSerde;
|
|
71
|
+
}());
|
|
72
|
+
exports.PackageArticleSerde = PackageArticleSerde;
|
|
@@ -0,0 +1,22 @@
|
|
|
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 { Package } from './package';
|
|
8
|
+
export interface PackagesResponse {
|
|
9
|
+
status: string;
|
|
10
|
+
userTier: string;
|
|
11
|
+
total: number;
|
|
12
|
+
startIndex: number;
|
|
13
|
+
pageSize: number;
|
|
14
|
+
currentPage: number;
|
|
15
|
+
pages: number;
|
|
16
|
+
orderBy: string;
|
|
17
|
+
results: Package[];
|
|
18
|
+
}
|
|
19
|
+
export declare class PackagesResponseSerde {
|
|
20
|
+
static read(protocol: TProtocol): PackagesResponse;
|
|
21
|
+
static write(protocol: TProtocol, value0: PackagesResponse): void;
|
|
22
|
+
}
|
|
@@ -0,0 +1,190 @@
|
|
|
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.PackagesResponseSerde = void 0;
|
|
9
|
+
var thrift_1 = require("thrift");
|
|
10
|
+
var package_1 = require("./package");
|
|
11
|
+
var PackagesResponseSerde = /** @class */ (function () {
|
|
12
|
+
function PackagesResponseSerde() {
|
|
13
|
+
}
|
|
14
|
+
PackagesResponseSerde.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.I32) {
|
|
55
|
+
var value1 = protocol.readI32();
|
|
56
|
+
result.startIndex = value1;
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
protocol.skip(ftype);
|
|
60
|
+
}
|
|
61
|
+
break;
|
|
62
|
+
case 5:
|
|
63
|
+
if (ftype === thrift_1.Thrift.Type.I32) {
|
|
64
|
+
var value1 = protocol.readI32();
|
|
65
|
+
result.pageSize = value1;
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
protocol.skip(ftype);
|
|
69
|
+
}
|
|
70
|
+
break;
|
|
71
|
+
case 6:
|
|
72
|
+
if (ftype === thrift_1.Thrift.Type.I32) {
|
|
73
|
+
var value1 = protocol.readI32();
|
|
74
|
+
result.currentPage = value1;
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
protocol.skip(ftype);
|
|
78
|
+
}
|
|
79
|
+
break;
|
|
80
|
+
case 7:
|
|
81
|
+
if (ftype === thrift_1.Thrift.Type.I32) {
|
|
82
|
+
var value1 = protocol.readI32();
|
|
83
|
+
result.pages = value1;
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
protocol.skip(ftype);
|
|
87
|
+
}
|
|
88
|
+
break;
|
|
89
|
+
case 8:
|
|
90
|
+
if (ftype === thrift_1.Thrift.Type.STRING) {
|
|
91
|
+
var value1 = protocol.readString();
|
|
92
|
+
result.orderBy = value1;
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
protocol.skip(ftype);
|
|
96
|
+
}
|
|
97
|
+
break;
|
|
98
|
+
case 9:
|
|
99
|
+
if (ftype === thrift_1.Thrift.Type.LIST) {
|
|
100
|
+
var listInfo1 = protocol.readListBegin();
|
|
101
|
+
var listSize1 = (_a = listInfo1.size) !== null && _a !== void 0 ? _a : 0;
|
|
102
|
+
var value1 = [];
|
|
103
|
+
if (listInfo1.etype === thrift_1.Thrift.Type.STRUCT) {
|
|
104
|
+
for (var i = 0; i < listSize1; i++) {
|
|
105
|
+
var value2 = package_1.PackageSerde.read(protocol);
|
|
106
|
+
value1.push(value2);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
protocol.readListEnd();
|
|
110
|
+
result.results = value1;
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
protocol.skip(ftype);
|
|
114
|
+
}
|
|
115
|
+
break;
|
|
116
|
+
default:
|
|
117
|
+
protocol.skip(ftype);
|
|
118
|
+
}
|
|
119
|
+
protocol.readFieldEnd();
|
|
120
|
+
}
|
|
121
|
+
protocol.readStructEnd();
|
|
122
|
+
// @ts-ignore
|
|
123
|
+
return result;
|
|
124
|
+
};
|
|
125
|
+
PackagesResponseSerde.write = function (protocol, value0) {
|
|
126
|
+
protocol.writeStructBegin('PackagesResponse');
|
|
127
|
+
if (value0.status !== null && value0.status !== undefined) {
|
|
128
|
+
var value1 = value0.status;
|
|
129
|
+
protocol.writeFieldBegin('status', thrift_1.Thrift.Type.STRING, 1);
|
|
130
|
+
protocol.writeString(value1);
|
|
131
|
+
protocol.writeFieldEnd();
|
|
132
|
+
}
|
|
133
|
+
if (value0.userTier !== null && value0.userTier !== undefined) {
|
|
134
|
+
var value1 = value0.userTier;
|
|
135
|
+
protocol.writeFieldBegin('userTier', thrift_1.Thrift.Type.STRING, 2);
|
|
136
|
+
protocol.writeString(value1);
|
|
137
|
+
protocol.writeFieldEnd();
|
|
138
|
+
}
|
|
139
|
+
if (value0.total !== null && value0.total !== undefined) {
|
|
140
|
+
var value1 = value0.total;
|
|
141
|
+
protocol.writeFieldBegin('total', thrift_1.Thrift.Type.I32, 3);
|
|
142
|
+
protocol.writeI32(value1);
|
|
143
|
+
protocol.writeFieldEnd();
|
|
144
|
+
}
|
|
145
|
+
if (value0.startIndex !== null && value0.startIndex !== undefined) {
|
|
146
|
+
var value1 = value0.startIndex;
|
|
147
|
+
protocol.writeFieldBegin('startIndex', thrift_1.Thrift.Type.I32, 4);
|
|
148
|
+
protocol.writeI32(value1);
|
|
149
|
+
protocol.writeFieldEnd();
|
|
150
|
+
}
|
|
151
|
+
if (value0.pageSize !== null && value0.pageSize !== undefined) {
|
|
152
|
+
var value1 = value0.pageSize;
|
|
153
|
+
protocol.writeFieldBegin('pageSize', thrift_1.Thrift.Type.I32, 5);
|
|
154
|
+
protocol.writeI32(value1);
|
|
155
|
+
protocol.writeFieldEnd();
|
|
156
|
+
}
|
|
157
|
+
if (value0.currentPage !== null && value0.currentPage !== undefined) {
|
|
158
|
+
var value1 = value0.currentPage;
|
|
159
|
+
protocol.writeFieldBegin('currentPage', thrift_1.Thrift.Type.I32, 6);
|
|
160
|
+
protocol.writeI32(value1);
|
|
161
|
+
protocol.writeFieldEnd();
|
|
162
|
+
}
|
|
163
|
+
if (value0.pages !== null && value0.pages !== undefined) {
|
|
164
|
+
var value1 = value0.pages;
|
|
165
|
+
protocol.writeFieldBegin('pages', thrift_1.Thrift.Type.I32, 7);
|
|
166
|
+
protocol.writeI32(value1);
|
|
167
|
+
protocol.writeFieldEnd();
|
|
168
|
+
}
|
|
169
|
+
if (value0.orderBy !== null && value0.orderBy !== undefined) {
|
|
170
|
+
var value1 = value0.orderBy;
|
|
171
|
+
protocol.writeFieldBegin('orderBy', thrift_1.Thrift.Type.STRING, 8);
|
|
172
|
+
protocol.writeString(value1);
|
|
173
|
+
protocol.writeFieldEnd();
|
|
174
|
+
}
|
|
175
|
+
if (value0.results !== null && value0.results !== undefined) {
|
|
176
|
+
var value1 = value0.results;
|
|
177
|
+
protocol.writeFieldBegin('results', thrift_1.Thrift.Type.LIST, 9);
|
|
178
|
+
protocol.writeListBegin(thrift_1.Thrift.Type.STRUCT, value1.length);
|
|
179
|
+
value1.forEach(function (value2) {
|
|
180
|
+
package_1.PackageSerde.write(protocol, value2);
|
|
181
|
+
});
|
|
182
|
+
protocol.writeListEnd();
|
|
183
|
+
protocol.writeFieldEnd();
|
|
184
|
+
}
|
|
185
|
+
protocol.writeFieldStop();
|
|
186
|
+
protocol.writeStructEnd();
|
|
187
|
+
};
|
|
188
|
+
return PackagesResponseSerde;
|
|
189
|
+
}());
|
|
190
|
+
exports.PackagesResponseSerde = PackagesResponseSerde;
|
package/v1/pillar.d.ts
ADDED
|
@@ -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
|
+
export interface Pillar {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
sectionIds: string[];
|
|
11
|
+
}
|
|
12
|
+
export declare class PillarSerde {
|
|
13
|
+
static read(protocol: TProtocol): Pillar;
|
|
14
|
+
static write(protocol: TProtocol, value0: Pillar): void;
|
|
15
|
+
}
|
package/v1/pillar.js
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
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.PillarSerde = void 0;
|
|
9
|
+
var thrift_1 = require("thrift");
|
|
10
|
+
var PillarSerde = /** @class */ (function () {
|
|
11
|
+
function PillarSerde() {
|
|
12
|
+
}
|
|
13
|
+
PillarSerde.read = function (protocol) {
|
|
14
|
+
var _a;
|
|
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.STRING) {
|
|
27
|
+
var value1 = protocol.readString();
|
|
28
|
+
result.id = value1;
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
protocol.skip(ftype);
|
|
32
|
+
}
|
|
33
|
+
break;
|
|
34
|
+
case 2:
|
|
35
|
+
if (ftype === thrift_1.Thrift.Type.STRING) {
|
|
36
|
+
var value1 = protocol.readString();
|
|
37
|
+
result.name = value1;
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
protocol.skip(ftype);
|
|
41
|
+
}
|
|
42
|
+
break;
|
|
43
|
+
case 3:
|
|
44
|
+
if (ftype === thrift_1.Thrift.Type.LIST) {
|
|
45
|
+
var listInfo1 = protocol.readListBegin();
|
|
46
|
+
var listSize1 = (_a = listInfo1.size) !== null && _a !== void 0 ? _a : 0;
|
|
47
|
+
var value1 = [];
|
|
48
|
+
if (listInfo1.etype === thrift_1.Thrift.Type.STRING) {
|
|
49
|
+
for (var i = 0; i < listSize1; i++) {
|
|
50
|
+
var value2 = protocol.readString();
|
|
51
|
+
value1.push(value2);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
protocol.readListEnd();
|
|
55
|
+
result.sectionIds = value1;
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
protocol.skip(ftype);
|
|
59
|
+
}
|
|
60
|
+
break;
|
|
61
|
+
default:
|
|
62
|
+
protocol.skip(ftype);
|
|
63
|
+
}
|
|
64
|
+
protocol.readFieldEnd();
|
|
65
|
+
}
|
|
66
|
+
protocol.readStructEnd();
|
|
67
|
+
// @ts-ignore
|
|
68
|
+
return result;
|
|
69
|
+
};
|
|
70
|
+
PillarSerde.write = function (protocol, value0) {
|
|
71
|
+
protocol.writeStructBegin('Pillar');
|
|
72
|
+
if (value0.id !== null && value0.id !== undefined) {
|
|
73
|
+
var value1 = value0.id;
|
|
74
|
+
protocol.writeFieldBegin('id', thrift_1.Thrift.Type.STRING, 1);
|
|
75
|
+
protocol.writeString(value1);
|
|
76
|
+
protocol.writeFieldEnd();
|
|
77
|
+
}
|
|
78
|
+
if (value0.name !== null && value0.name !== undefined) {
|
|
79
|
+
var value1 = value0.name;
|
|
80
|
+
protocol.writeFieldBegin('name', thrift_1.Thrift.Type.STRING, 2);
|
|
81
|
+
protocol.writeString(value1);
|
|
82
|
+
protocol.writeFieldEnd();
|
|
83
|
+
}
|
|
84
|
+
if (value0.sectionIds !== null && value0.sectionIds !== undefined) {
|
|
85
|
+
var value1 = value0.sectionIds;
|
|
86
|
+
protocol.writeFieldBegin('sectionIds', thrift_1.Thrift.Type.LIST, 3);
|
|
87
|
+
protocol.writeListBegin(thrift_1.Thrift.Type.STRING, value1.length);
|
|
88
|
+
value1.forEach(function (value2) {
|
|
89
|
+
protocol.writeString(value2);
|
|
90
|
+
});
|
|
91
|
+
protocol.writeListEnd();
|
|
92
|
+
protocol.writeFieldEnd();
|
|
93
|
+
}
|
|
94
|
+
protocol.writeFieldStop();
|
|
95
|
+
protocol.writeStructEnd();
|
|
96
|
+
};
|
|
97
|
+
return PillarSerde;
|
|
98
|
+
}());
|
|
99
|
+
exports.PillarSerde = PillarSerde;
|
|
@@ -0,0 +1,16 @@
|
|
|
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 { Pillar } from './pillar';
|
|
8
|
+
export interface PillarsResponse {
|
|
9
|
+
status: string;
|
|
10
|
+
total: number;
|
|
11
|
+
results: Pillar[];
|
|
12
|
+
}
|
|
13
|
+
export declare class PillarsResponseSerde {
|
|
14
|
+
static read(protocol: TProtocol): PillarsResponse;
|
|
15
|
+
static write(protocol: TProtocol, value0: PillarsResponse): void;
|
|
16
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
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.PillarsResponseSerde = void 0;
|
|
9
|
+
var thrift_1 = require("thrift");
|
|
10
|
+
var pillar_1 = require("./pillar");
|
|
11
|
+
var PillarsResponseSerde = /** @class */ (function () {
|
|
12
|
+
function PillarsResponseSerde() {
|
|
13
|
+
}
|
|
14
|
+
PillarsResponseSerde.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.I32) {
|
|
37
|
+
var value1 = protocol.readI32();
|
|
38
|
+
result.total = value1;
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
protocol.skip(ftype);
|
|
42
|
+
}
|
|
43
|
+
break;
|
|
44
|
+
case 3:
|
|
45
|
+
if (ftype === thrift_1.Thrift.Type.LIST) {
|
|
46
|
+
var listInfo1 = protocol.readListBegin();
|
|
47
|
+
var listSize1 = (_a = listInfo1.size) !== null && _a !== void 0 ? _a : 0;
|
|
48
|
+
var value1 = [];
|
|
49
|
+
if (listInfo1.etype === thrift_1.Thrift.Type.STRUCT) {
|
|
50
|
+
for (var i = 0; i < listSize1; i++) {
|
|
51
|
+
var value2 = pillar_1.PillarSerde.read(protocol);
|
|
52
|
+
value1.push(value2);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
protocol.readListEnd();
|
|
56
|
+
result.results = value1;
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
protocol.skip(ftype);
|
|
60
|
+
}
|
|
61
|
+
break;
|
|
62
|
+
default:
|
|
63
|
+
protocol.skip(ftype);
|
|
64
|
+
}
|
|
65
|
+
protocol.readFieldEnd();
|
|
66
|
+
}
|
|
67
|
+
protocol.readStructEnd();
|
|
68
|
+
// @ts-ignore
|
|
69
|
+
return result;
|
|
70
|
+
};
|
|
71
|
+
PillarsResponseSerde.write = function (protocol, value0) {
|
|
72
|
+
protocol.writeStructBegin('PillarsResponse');
|
|
73
|
+
if (value0.status !== null && value0.status !== undefined) {
|
|
74
|
+
var value1 = value0.status;
|
|
75
|
+
protocol.writeFieldBegin('status', thrift_1.Thrift.Type.STRING, 1);
|
|
76
|
+
protocol.writeString(value1);
|
|
77
|
+
protocol.writeFieldEnd();
|
|
78
|
+
}
|
|
79
|
+
if (value0.total !== null && value0.total !== undefined) {
|
|
80
|
+
var value1 = value0.total;
|
|
81
|
+
protocol.writeFieldBegin('total', thrift_1.Thrift.Type.I32, 2);
|
|
82
|
+
protocol.writeI32(value1);
|
|
83
|
+
protocol.writeFieldEnd();
|
|
84
|
+
}
|
|
85
|
+
if (value0.results !== null && value0.results !== undefined) {
|
|
86
|
+
var value1 = value0.results;
|
|
87
|
+
protocol.writeFieldBegin('results', thrift_1.Thrift.Type.LIST, 3);
|
|
88
|
+
protocol.writeListBegin(thrift_1.Thrift.Type.STRUCT, value1.length);
|
|
89
|
+
value1.forEach(function (value2) {
|
|
90
|
+
pillar_1.PillarSerde.write(protocol, value2);
|
|
91
|
+
});
|
|
92
|
+
protocol.writeListEnd();
|
|
93
|
+
protocol.writeFieldEnd();
|
|
94
|
+
}
|
|
95
|
+
protocol.writeFieldStop();
|
|
96
|
+
protocol.writeStructEnd();
|
|
97
|
+
};
|
|
98
|
+
return PillarsResponseSerde;
|
|
99
|
+
}());
|
|
100
|
+
exports.PillarsResponseSerde = PillarsResponseSerde;
|
|
@@ -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.PlatformType = void 0;
|
|
9
|
+
var PlatformType;
|
|
10
|
+
(function (PlatformType) {
|
|
11
|
+
PlatformType[PlatformType["WEB"] = 0] = "WEB";
|
|
12
|
+
PlatformType[PlatformType["AMP"] = 1] = "AMP";
|
|
13
|
+
PlatformType[PlatformType["APPS"] = 2] = "APPS";
|
|
14
|
+
})(PlatformType || (exports.PlatformType = PlatformType = {}));
|