@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.
Files changed (192) hide show
  1. package/auxiliaryatomevent/v1/auxiliaryAtom.d.ts +14 -0
  2. package/auxiliaryatomevent/v1/auxiliaryAtom.js +70 -0
  3. package/auxiliaryatomevent/v1/auxiliaryAtomEvent.d.ts +17 -0
  4. package/auxiliaryatomevent/v1/auxiliaryAtomEvent.js +100 -0
  5. package/auxiliaryatomevent/v1/eventType.d.ts +9 -0
  6. package/auxiliaryatomevent/v1/eventType.js +13 -0
  7. package/crier/event/v1/deletedContent.d.ts +14 -0
  8. package/crier/event/v1/deletedContent.js +70 -0
  9. package/crier/event/v1/event.d.ts +21 -0
  10. package/crier/event/v1/event.js +116 -0
  11. package/crier/event/v1/eventPayload.d.ts +27 -0
  12. package/crier/event/v1/eventPayload.js +118 -0
  13. package/crier/event/v1/eventType.d.ts +10 -0
  14. package/crier/event/v1/eventType.js +14 -0
  15. package/crier/event/v1/itemType.d.ts +12 -0
  16. package/crier/event/v1/itemType.js +16 -0
  17. package/crier/event/v1/retrievableContent.d.ts +21 -0
  18. package/crier/event/v1/retrievableContent.js +145 -0
  19. package/fastly/event/v1/contentDecachedEvent.d.ts +19 -0
  20. package/fastly/event/v1/contentDecachedEvent.js +100 -0
  21. package/fastly/event/v1/eventType.d.ts +9 -0
  22. package/fastly/event/v1/eventType.js +13 -0
  23. package/package.json +24 -0
  24. package/tsconfig.json +14 -0
  25. package/v1/aliasPath.d.ts +15 -0
  26. package/v1/aliasPath.js +71 -0
  27. package/v1/asset.d.ts +18 -0
  28. package/v1/asset.js +101 -0
  29. package/v1/assetFields.d.ts +85 -0
  30. package/v1/assetFields.js +1106 -0
  31. package/v1/assetType.d.ts +13 -0
  32. package/v1/assetType.js +17 -0
  33. package/v1/atomUsageResponse.d.ts +20 -0
  34. package/v1/atomUsageResponse.js +174 -0
  35. package/v1/atoms.d.ts +29 -0
  36. package/v1/atoms.js +490 -0
  37. package/v1/atomsResponse.d.ts +21 -0
  38. package/v1/atomsResponse.js +175 -0
  39. package/v1/audioElementFields.d.ts +25 -0
  40. package/v1/audioElementFields.js +235 -0
  41. package/v1/block.d.ts +30 -0
  42. package/v1/block.js +283 -0
  43. package/v1/blockAttributes.d.ts +18 -0
  44. package/v1/blockAttributes.js +116 -0
  45. package/v1/blockElement.d.ts +60 -0
  46. package/v1/blockElement.js +451 -0
  47. package/v1/blocks.d.ts +19 -0
  48. package/v1/blocks.js +144 -0
  49. package/v1/calloutElementFields.d.ts +17 -0
  50. package/v1/calloutElementFields.js +115 -0
  51. package/v1/capiDateTime.d.ts +15 -0
  52. package/v1/capiDateTime.js +70 -0
  53. package/v1/cartoonElementFields.d.ts +22 -0
  54. package/v1/cartoonElementFields.js +190 -0
  55. package/v1/cartoonImage.d.ts +17 -0
  56. package/v1/cartoonImage.js +115 -0
  57. package/v1/cartoonVariant.d.ts +15 -0
  58. package/v1/cartoonVariant.js +85 -0
  59. package/v1/channelFields.d.ts +15 -0
  60. package/v1/channelFields.js +71 -0
  61. package/v1/codeElementFields.d.ts +14 -0
  62. package/v1/codeElementFields.js +70 -0
  63. package/v1/commentElementFields.d.ts +24 -0
  64. package/v1/commentElementFields.js +220 -0
  65. package/v1/content.d.ts +53 -0
  66. package/v1/content.js +516 -0
  67. package/v1/contentAtomElementFields.d.ts +16 -0
  68. package/v1/contentAtomElementFields.js +100 -0
  69. package/v1/contentChannel.d.ts +15 -0
  70. package/v1/contentChannel.js +71 -0
  71. package/v1/contentFields.d.ts +67 -0
  72. package/v1/contentFields.js +821 -0
  73. package/v1/contentStats.d.ts +27 -0
  74. package/v1/contentStats.js +265 -0
  75. package/v1/contentType.d.ts +15 -0
  76. package/v1/contentType.js +19 -0
  77. package/v1/crossword.d.ts +31 -0
  78. package/v1/crossword.js +268 -0
  79. package/v1/crosswordCreator.d.ts +14 -0
  80. package/v1/crosswordCreator.js +70 -0
  81. package/v1/crosswordDimensions.d.ts +14 -0
  82. package/v1/crosswordDimensions.js +70 -0
  83. package/v1/crosswordEntry.d.ts +26 -0
  84. package/v1/crosswordEntry.js +249 -0
  85. package/v1/crosswordPosition.d.ts +14 -0
  86. package/v1/crosswordPosition.js +70 -0
  87. package/v1/crosswordType.d.ts +15 -0
  88. package/v1/crosswordType.js +19 -0
  89. package/v1/debug.d.ts +18 -0
  90. package/v1/debug.js +101 -0
  91. package/v1/edition.d.ts +17 -0
  92. package/v1/edition.js +115 -0
  93. package/v1/editionsResponse.d.ts +17 -0
  94. package/v1/editionsResponse.js +115 -0
  95. package/v1/element.d.ts +19 -0
  96. package/v1/element.js +130 -0
  97. package/v1/elementType.d.ts +30 -0
  98. package/v1/elementType.js +34 -0
  99. package/v1/embedElementFields.d.ts +20 -0
  100. package/v1/embedElementFields.js +160 -0
  101. package/v1/embedReach.d.ts +14 -0
  102. package/v1/embedReach.js +69 -0
  103. package/v1/embedTracking.d.ts +14 -0
  104. package/v1/embedTracking.js +58 -0
  105. package/v1/embedTracksType.d.ts +10 -0
  106. package/v1/embedTracksType.js +14 -0
  107. package/v1/entitiesResponse.d.ts +16 -0
  108. package/v1/entitiesResponse.js +100 -0
  109. package/v1/errorResponse.d.ts +14 -0
  110. package/v1/errorResponse.js +70 -0
  111. package/v1/imageElementFields.d.ts +26 -0
  112. package/v1/imageElementFields.js +250 -0
  113. package/v1/instagramElementFields.d.ts +23 -0
  114. package/v1/instagramElementFields.js +205 -0
  115. package/v1/interactiveElementFields.d.ts +24 -0
  116. package/v1/interactiveElementFields.js +220 -0
  117. package/v1/itemResponse.d.ts +53 -0
  118. package/v1/itemResponse.js +676 -0
  119. package/v1/membershipElementFields.d.ts +25 -0
  120. package/v1/membershipElementFields.js +221 -0
  121. package/v1/membershipPlaceholder.d.ts +13 -0
  122. package/v1/membershipPlaceholder.js +55 -0
  123. package/v1/membershipTier.d.ts +9 -0
  124. package/v1/membershipTier.js +13 -0
  125. package/v1/mostViewedVideo.d.ts +14 -0
  126. package/v1/mostViewedVideo.js +70 -0
  127. package/v1/networkFront.d.ts +18 -0
  128. package/v1/networkFront.js +130 -0
  129. package/v1/office.d.ts +10 -0
  130. package/v1/office.js +14 -0
  131. package/v1/package.d.ts +18 -0
  132. package/v1/package.js +116 -0
  133. package/v1/packageArticle.d.ts +16 -0
  134. package/v1/packageArticle.js +72 -0
  135. package/v1/packagesResponse.d.ts +22 -0
  136. package/v1/packagesResponse.js +190 -0
  137. package/v1/pillar.d.ts +15 -0
  138. package/v1/pillar.js +99 -0
  139. package/v1/pillarsResponse.d.ts +16 -0
  140. package/v1/pillarsResponse.js +100 -0
  141. package/v1/platformType.d.ts +10 -0
  142. package/v1/platformType.js +14 -0
  143. package/v1/podcast.d.ts +25 -0
  144. package/v1/podcast.js +235 -0
  145. package/v1/podcastCategory.d.ts +14 -0
  146. package/v1/podcastCategory.js +70 -0
  147. package/v1/pullquoteElementFields.d.ts +17 -0
  148. package/v1/pullquoteElementFields.js +115 -0
  149. package/v1/recipeElementFields.d.ts +13 -0
  150. package/v1/recipeElementFields.js +55 -0
  151. package/v1/reference.d.ts +14 -0
  152. package/v1/reference.js +70 -0
  153. package/v1/richLinkElementFields.d.ts +19 -0
  154. package/v1/richLinkElementFields.js +131 -0
  155. package/v1/rights.d.ts +15 -0
  156. package/v1/rights.js +89 -0
  157. package/v1/searchResponse.d.ts +22 -0
  158. package/v1/searchResponse.js +190 -0
  159. package/v1/section.d.ts +20 -0
  160. package/v1/section.js +159 -0
  161. package/v1/sectionsResponse.d.ts +17 -0
  162. package/v1/sectionsResponse.js +115 -0
  163. package/v1/sponsorship.d.ts +27 -0
  164. package/v1/sponsorship.js +208 -0
  165. package/v1/sponsorshipLogoDimensions.d.ts +14 -0
  166. package/v1/sponsorshipLogoDimensions.js +70 -0
  167. package/v1/sponsorshipTargeting.d.ts +15 -0
  168. package/v1/sponsorshipTargeting.js +85 -0
  169. package/v1/sponsorshipType.d.ts +10 -0
  170. package/v1/sponsorshipType.js +14 -0
  171. package/v1/standardElementFields.d.ts +25 -0
  172. package/v1/standardElementFields.js +235 -0
  173. package/v1/tag.d.ts +42 -0
  174. package/v1/tag.js +486 -0
  175. package/v1/tagType.d.ts +19 -0
  176. package/v1/tagType.js +23 -0
  177. package/v1/tagsResponse.d.ts +21 -0
  178. package/v1/tagsResponse.js +175 -0
  179. package/v1/textElementFields.d.ts +14 -0
  180. package/v1/textElementFields.js +70 -0
  181. package/v1/tweetElementFields.d.ts +20 -0
  182. package/v1/tweetElementFields.js +160 -0
  183. package/v1/user.d.ts +15 -0
  184. package/v1/user.js +85 -0
  185. package/v1/videoElementFields.d.ts +33 -0
  186. package/v1/videoElementFields.js +355 -0
  187. package/v1/videoStatsResponse.d.ts +15 -0
  188. package/v1/videoStatsResponse.js +85 -0
  189. package/v1/vineElementFields.d.ts +24 -0
  190. package/v1/vineElementFields.js +220 -0
  191. package/v1/witnessElementFields.d.ts +40 -0
  192. package/v1/witnessElementFields.js +446 -0
@@ -0,0 +1,17 @@
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 Edition {
8
+ id: string;
9
+ webTitle: string;
10
+ webUrl: string;
11
+ apiUrl: string;
12
+ code: string;
13
+ }
14
+ export declare class EditionSerde {
15
+ static read(protocol: TProtocol): Edition;
16
+ static write(protocol: TProtocol, value0: Edition): void;
17
+ }
package/v1/edition.js ADDED
@@ -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.EditionSerde = void 0;
9
+ var thrift_1 = require("thrift");
10
+ var EditionSerde = /** @class */ (function () {
11
+ function EditionSerde() {
12
+ }
13
+ EditionSerde.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.id = 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.webTitle = 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.webUrl = 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.apiUrl = 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.code = 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
+ EditionSerde.write = function (protocol, value0) {
79
+ protocol.writeStructBegin('Edition');
80
+ if (value0.id !== null && value0.id !== undefined) {
81
+ var value1 = value0.id;
82
+ protocol.writeFieldBegin('id', thrift_1.Thrift.Type.STRING, 1);
83
+ protocol.writeString(value1);
84
+ protocol.writeFieldEnd();
85
+ }
86
+ if (value0.webTitle !== null && value0.webTitle !== undefined) {
87
+ var value1 = value0.webTitle;
88
+ protocol.writeFieldBegin('webTitle', thrift_1.Thrift.Type.STRING, 2);
89
+ protocol.writeString(value1);
90
+ protocol.writeFieldEnd();
91
+ }
92
+ if (value0.webUrl !== null && value0.webUrl !== undefined) {
93
+ var value1 = value0.webUrl;
94
+ protocol.writeFieldBegin('webUrl', thrift_1.Thrift.Type.STRING, 3);
95
+ protocol.writeString(value1);
96
+ protocol.writeFieldEnd();
97
+ }
98
+ if (value0.apiUrl !== null && value0.apiUrl !== undefined) {
99
+ var value1 = value0.apiUrl;
100
+ protocol.writeFieldBegin('apiUrl', thrift_1.Thrift.Type.STRING, 4);
101
+ protocol.writeString(value1);
102
+ protocol.writeFieldEnd();
103
+ }
104
+ if (value0.code !== null && value0.code !== undefined) {
105
+ var value1 = value0.code;
106
+ protocol.writeFieldBegin('code', thrift_1.Thrift.Type.STRING, 5);
107
+ protocol.writeString(value1);
108
+ protocol.writeFieldEnd();
109
+ }
110
+ protocol.writeFieldStop();
111
+ protocol.writeStructEnd();
112
+ };
113
+ return EditionSerde;
114
+ }());
115
+ exports.EditionSerde = EditionSerde;
@@ -0,0 +1,17 @@
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 { NetworkFront } from './networkFront';
8
+ export interface EditionsResponse {
9
+ status: string;
10
+ userTier: string;
11
+ total: number;
12
+ results: NetworkFront[];
13
+ }
14
+ export declare class EditionsResponseSerde {
15
+ static read(protocol: TProtocol): EditionsResponse;
16
+ static write(protocol: TProtocol, value0: EditionsResponse): void;
17
+ }
@@ -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.EditionsResponseSerde = void 0;
9
+ var thrift_1 = require("thrift");
10
+ var networkFront_1 = require("./networkFront");
11
+ var EditionsResponseSerde = /** @class */ (function () {
12
+ function EditionsResponseSerde() {
13
+ }
14
+ EditionsResponseSerde.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 = networkFront_1.NetworkFrontSerde.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
+ EditionsResponseSerde.write = function (protocol, value0) {
81
+ protocol.writeStructBegin('EditionsResponse');
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
+ networkFront_1.NetworkFrontSerde.write(protocol, value2);
106
+ });
107
+ protocol.writeListEnd();
108
+ protocol.writeFieldEnd();
109
+ }
110
+ protocol.writeFieldStop();
111
+ protocol.writeStructEnd();
112
+ };
113
+ return EditionsResponseSerde;
114
+ }());
115
+ exports.EditionsResponseSerde = EditionsResponseSerde;
@@ -0,0 +1,19 @@
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 { Asset } from './asset';
8
+ import { ElementType } from './elementType';
9
+ export interface Element {
10
+ id: string;
11
+ relation: string;
12
+ type: ElementType;
13
+ galleryIndex?: number;
14
+ assets: Asset[];
15
+ }
16
+ export declare class ElementSerde {
17
+ static read(protocol: TProtocol): Element;
18
+ static write(protocol: TProtocol, value0: Element): void;
19
+ }
package/v1/element.js ADDED
@@ -0,0 +1,130 @@
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.ElementSerde = void 0;
9
+ var thrift_1 = require("thrift");
10
+ var asset_1 = require("./asset");
11
+ var ElementSerde = /** @class */ (function () {
12
+ function ElementSerde() {
13
+ }
14
+ ElementSerde.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.id = 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.relation = 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.type = 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.galleryIndex = value1;
57
+ }
58
+ else {
59
+ protocol.skip(ftype);
60
+ }
61
+ break;
62
+ case 5:
63
+ if (ftype === thrift_1.Thrift.Type.LIST) {
64
+ var listInfo1 = protocol.readListBegin();
65
+ var listSize1 = (_a = listInfo1.size) !== null && _a !== void 0 ? _a : 0;
66
+ var value1 = [];
67
+ if (listInfo1.etype === thrift_1.Thrift.Type.STRUCT) {
68
+ for (var i = 0; i < listSize1; i++) {
69
+ var value2 = asset_1.AssetSerde.read(protocol);
70
+ value1.push(value2);
71
+ }
72
+ }
73
+ protocol.readListEnd();
74
+ result.assets = value1;
75
+ }
76
+ else {
77
+ protocol.skip(ftype);
78
+ }
79
+ break;
80
+ default:
81
+ protocol.skip(ftype);
82
+ }
83
+ protocol.readFieldEnd();
84
+ }
85
+ protocol.readStructEnd();
86
+ // @ts-ignore
87
+ return result;
88
+ };
89
+ ElementSerde.write = function (protocol, value0) {
90
+ protocol.writeStructBegin('Element');
91
+ if (value0.id !== null && value0.id !== undefined) {
92
+ var value1 = value0.id;
93
+ protocol.writeFieldBegin('id', thrift_1.Thrift.Type.STRING, 1);
94
+ protocol.writeString(value1);
95
+ protocol.writeFieldEnd();
96
+ }
97
+ if (value0.relation !== null && value0.relation !== undefined) {
98
+ var value1 = value0.relation;
99
+ protocol.writeFieldBegin('relation', thrift_1.Thrift.Type.STRING, 2);
100
+ protocol.writeString(value1);
101
+ protocol.writeFieldEnd();
102
+ }
103
+ if (value0.type !== null && value0.type !== undefined) {
104
+ var value1 = value0.type;
105
+ protocol.writeFieldBegin('type', thrift_1.Thrift.Type.I32, 3);
106
+ protocol.writeI32(value1);
107
+ protocol.writeFieldEnd();
108
+ }
109
+ if (value0.galleryIndex !== null && value0.galleryIndex !== undefined) {
110
+ var value1 = value0.galleryIndex;
111
+ protocol.writeFieldBegin('galleryIndex', thrift_1.Thrift.Type.I32, 4);
112
+ protocol.writeI32(value1);
113
+ protocol.writeFieldEnd();
114
+ }
115
+ if (value0.assets !== null && value0.assets !== undefined) {
116
+ var value1 = value0.assets;
117
+ protocol.writeFieldBegin('assets', thrift_1.Thrift.Type.LIST, 5);
118
+ protocol.writeListBegin(thrift_1.Thrift.Type.STRUCT, value1.length);
119
+ value1.forEach(function (value2) {
120
+ asset_1.AssetSerde.write(protocol, value2);
121
+ });
122
+ protocol.writeListEnd();
123
+ protocol.writeFieldEnd();
124
+ }
125
+ protocol.writeFieldStop();
126
+ protocol.writeStructEnd();
127
+ };
128
+ return ElementSerde;
129
+ }());
130
+ exports.ElementSerde = ElementSerde;
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Autogenerated by scrooge-generator-extras
3
+ *
4
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ */
6
+ export declare enum ElementType {
7
+ TEXT = 0,
8
+ IMAGE = 1,
9
+ EMBED = 2,
10
+ FORM = 3,
11
+ PULLQUOTE = 4,
12
+ INTERACTIVE = 5,
13
+ COMMENT = 6,
14
+ RICH_LINK = 7,
15
+ TABLE = 8,
16
+ VIDEO = 9,
17
+ TWEET = 10,
18
+ WITNESS = 11,
19
+ CODE = 12,
20
+ AUDIO = 13,
21
+ MAP = 14,
22
+ DOCUMENT = 15,
23
+ MEMBERSHIP = 16,
24
+ INSTAGRAM = 17,
25
+ CONTENTATOM = 18,
26
+ VINE = 19,
27
+ CALLOUT = 20,
28
+ CARTOON = 21,
29
+ RECIPE = 22
30
+ }
@@ -0,0 +1,34 @@
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.ElementType = void 0;
9
+ var ElementType;
10
+ (function (ElementType) {
11
+ ElementType[ElementType["TEXT"] = 0] = "TEXT";
12
+ ElementType[ElementType["IMAGE"] = 1] = "IMAGE";
13
+ ElementType[ElementType["EMBED"] = 2] = "EMBED";
14
+ ElementType[ElementType["FORM"] = 3] = "FORM";
15
+ ElementType[ElementType["PULLQUOTE"] = 4] = "PULLQUOTE";
16
+ ElementType[ElementType["INTERACTIVE"] = 5] = "INTERACTIVE";
17
+ ElementType[ElementType["COMMENT"] = 6] = "COMMENT";
18
+ ElementType[ElementType["RICH_LINK"] = 7] = "RICH_LINK";
19
+ ElementType[ElementType["TABLE"] = 8] = "TABLE";
20
+ ElementType[ElementType["VIDEO"] = 9] = "VIDEO";
21
+ ElementType[ElementType["TWEET"] = 10] = "TWEET";
22
+ ElementType[ElementType["WITNESS"] = 11] = "WITNESS";
23
+ ElementType[ElementType["CODE"] = 12] = "CODE";
24
+ ElementType[ElementType["AUDIO"] = 13] = "AUDIO";
25
+ ElementType[ElementType["MAP"] = 14] = "MAP";
26
+ ElementType[ElementType["DOCUMENT"] = 15] = "DOCUMENT";
27
+ ElementType[ElementType["MEMBERSHIP"] = 16] = "MEMBERSHIP";
28
+ ElementType[ElementType["INSTAGRAM"] = 17] = "INSTAGRAM";
29
+ ElementType[ElementType["CONTENTATOM"] = 18] = "CONTENTATOM";
30
+ ElementType[ElementType["VINE"] = 19] = "VINE";
31
+ ElementType[ElementType["CALLOUT"] = 20] = "CALLOUT";
32
+ ElementType[ElementType["CARTOON"] = 21] = "CARTOON";
33
+ ElementType[ElementType["RECIPE"] = 22] = "RECIPE";
34
+ })(ElementType || (exports.ElementType = ElementType = {}));
@@ -0,0 +1,20 @@
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 EmbedElementFields {
8
+ html?: string;
9
+ safeEmbedCode?: boolean;
10
+ alt?: string;
11
+ isMandatory?: boolean;
12
+ role?: string;
13
+ source?: string;
14
+ sourceDomain?: string;
15
+ caption?: string;
16
+ }
17
+ export declare class EmbedElementFieldsSerde {
18
+ static read(protocol: TProtocol): EmbedElementFields;
19
+ static write(protocol: TProtocol, value0: EmbedElementFields): void;
20
+ }
@@ -0,0 +1,160 @@
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.EmbedElementFieldsSerde = void 0;
9
+ var thrift_1 = require("thrift");
10
+ var EmbedElementFieldsSerde = /** @class */ (function () {
11
+ function EmbedElementFieldsSerde() {
12
+ }
13
+ EmbedElementFieldsSerde.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.BOOL) {
35
+ var value1 = protocol.readBool();
36
+ result.safeEmbedCode = 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.alt = value1;
46
+ }
47
+ else {
48
+ protocol.skip(ftype);
49
+ }
50
+ break;
51
+ case 4:
52
+ if (ftype === thrift_1.Thrift.Type.BOOL) {
53
+ var value1 = protocol.readBool();
54
+ result.isMandatory = 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.role = 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.source = value1;
73
+ }
74
+ else {
75
+ protocol.skip(ftype);
76
+ }
77
+ break;
78
+ case 9:
79
+ if (ftype === thrift_1.Thrift.Type.STRING) {
80
+ var value1 = protocol.readString();
81
+ result.sourceDomain = value1;
82
+ }
83
+ else {
84
+ protocol.skip(ftype);
85
+ }
86
+ break;
87
+ case 10:
88
+ if (ftype === thrift_1.Thrift.Type.STRING) {
89
+ var value1 = protocol.readString();
90
+ result.caption = value1;
91
+ }
92
+ else {
93
+ protocol.skip(ftype);
94
+ }
95
+ break;
96
+ default:
97
+ protocol.skip(ftype);
98
+ }
99
+ protocol.readFieldEnd();
100
+ }
101
+ protocol.readStructEnd();
102
+ // @ts-ignore
103
+ return result;
104
+ };
105
+ EmbedElementFieldsSerde.write = function (protocol, value0) {
106
+ protocol.writeStructBegin('EmbedElementFields');
107
+ if (value0.html !== null && value0.html !== undefined) {
108
+ var value1 = value0.html;
109
+ protocol.writeFieldBegin('html', thrift_1.Thrift.Type.STRING, 1);
110
+ protocol.writeString(value1);
111
+ protocol.writeFieldEnd();
112
+ }
113
+ if (value0.safeEmbedCode !== null && value0.safeEmbedCode !== undefined) {
114
+ var value1 = value0.safeEmbedCode;
115
+ protocol.writeFieldBegin('safeEmbedCode', thrift_1.Thrift.Type.BOOL, 2);
116
+ protocol.writeBool(value1);
117
+ protocol.writeFieldEnd();
118
+ }
119
+ if (value0.alt !== null && value0.alt !== undefined) {
120
+ var value1 = value0.alt;
121
+ protocol.writeFieldBegin('alt', thrift_1.Thrift.Type.STRING, 3);
122
+ protocol.writeString(value1);
123
+ protocol.writeFieldEnd();
124
+ }
125
+ if (value0.isMandatory !== null && value0.isMandatory !== undefined) {
126
+ var value1 = value0.isMandatory;
127
+ protocol.writeFieldBegin('isMandatory', thrift_1.Thrift.Type.BOOL, 4);
128
+ protocol.writeBool(value1);
129
+ protocol.writeFieldEnd();
130
+ }
131
+ if (value0.role !== null && value0.role !== undefined) {
132
+ var value1 = value0.role;
133
+ protocol.writeFieldBegin('role', thrift_1.Thrift.Type.STRING, 5);
134
+ protocol.writeString(value1);
135
+ protocol.writeFieldEnd();
136
+ }
137
+ if (value0.source !== null && value0.source !== undefined) {
138
+ var value1 = value0.source;
139
+ protocol.writeFieldBegin('source', thrift_1.Thrift.Type.STRING, 6);
140
+ protocol.writeString(value1);
141
+ protocol.writeFieldEnd();
142
+ }
143
+ if (value0.sourceDomain !== null && value0.sourceDomain !== undefined) {
144
+ var value1 = value0.sourceDomain;
145
+ protocol.writeFieldBegin('sourceDomain', thrift_1.Thrift.Type.STRING, 9);
146
+ protocol.writeString(value1);
147
+ protocol.writeFieldEnd();
148
+ }
149
+ if (value0.caption !== null && value0.caption !== undefined) {
150
+ var value1 = value0.caption;
151
+ protocol.writeFieldBegin('caption', thrift_1.Thrift.Type.STRING, 10);
152
+ protocol.writeString(value1);
153
+ protocol.writeFieldEnd();
154
+ }
155
+ protocol.writeFieldStop();
156
+ protocol.writeStructEnd();
157
+ };
158
+ return EmbedElementFieldsSerde;
159
+ }());
160
+ exports.EmbedElementFieldsSerde = EmbedElementFieldsSerde;
@@ -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
+ import { PlatformType } from './platformType';
8
+ export interface EmbedReach {
9
+ unsupportedPlatforms: PlatformType[];
10
+ }
11
+ export declare class EmbedReachSerde {
12
+ static read(protocol: TProtocol): EmbedReach;
13
+ static write(protocol: TProtocol, value0: EmbedReach): void;
14
+ }