@guardian/content-api-models 4.0.0

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 +15 -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,13 @@
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 AssetType {
7
+ IMAGE = 0,
8
+ VIDEO = 1,
9
+ AUDIO = 2,
10
+ EMBED = 3,
11
+ TWEET = 4,
12
+ CARTOON = 5
13
+ }
@@ -0,0 +1,17 @@
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.AssetType = void 0;
9
+ var AssetType;
10
+ (function (AssetType) {
11
+ AssetType[AssetType["IMAGE"] = 0] = "IMAGE";
12
+ AssetType[AssetType["VIDEO"] = 1] = "VIDEO";
13
+ AssetType[AssetType["AUDIO"] = 2] = "AUDIO";
14
+ AssetType[AssetType["EMBED"] = 3] = "EMBED";
15
+ AssetType[AssetType["TWEET"] = 4] = "TWEET";
16
+ AssetType[AssetType["CARTOON"] = 5] = "CARTOON";
17
+ })(AssetType || (exports.AssetType = AssetType = {}));
@@ -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 AtomUsageResponse {
8
+ status: string;
9
+ userTier: string;
10
+ total: number;
11
+ startIndex: number;
12
+ pageSize: number;
13
+ currentPage: number;
14
+ pages: number;
15
+ results: string[];
16
+ }
17
+ export declare class AtomUsageResponseSerde {
18
+ static read(protocol: TProtocol): AtomUsageResponse;
19
+ static write(protocol: TProtocol, value0: AtomUsageResponse): void;
20
+ }
@@ -0,0 +1,174 @@
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.AtomUsageResponseSerde = void 0;
9
+ var thrift_1 = require("thrift");
10
+ var AtomUsageResponseSerde = /** @class */ (function () {
11
+ function AtomUsageResponseSerde() {
12
+ }
13
+ AtomUsageResponseSerde.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.status = 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.userTier = value1;
38
+ }
39
+ else {
40
+ protocol.skip(ftype);
41
+ }
42
+ break;
43
+ case 3:
44
+ if (ftype === thrift_1.Thrift.Type.I32) {
45
+ var value1 = protocol.readI32();
46
+ result.total = value1;
47
+ }
48
+ else {
49
+ protocol.skip(ftype);
50
+ }
51
+ break;
52
+ case 4:
53
+ if (ftype === thrift_1.Thrift.Type.I32) {
54
+ var value1 = protocol.readI32();
55
+ result.startIndex = value1;
56
+ }
57
+ else {
58
+ protocol.skip(ftype);
59
+ }
60
+ break;
61
+ case 5:
62
+ if (ftype === thrift_1.Thrift.Type.I32) {
63
+ var value1 = protocol.readI32();
64
+ result.pageSize = value1;
65
+ }
66
+ else {
67
+ protocol.skip(ftype);
68
+ }
69
+ break;
70
+ case 6:
71
+ if (ftype === thrift_1.Thrift.Type.I32) {
72
+ var value1 = protocol.readI32();
73
+ result.currentPage = value1;
74
+ }
75
+ else {
76
+ protocol.skip(ftype);
77
+ }
78
+ break;
79
+ case 7:
80
+ if (ftype === thrift_1.Thrift.Type.I32) {
81
+ var value1 = protocol.readI32();
82
+ result.pages = value1;
83
+ }
84
+ else {
85
+ protocol.skip(ftype);
86
+ }
87
+ break;
88
+ case 8:
89
+ if (ftype === thrift_1.Thrift.Type.LIST) {
90
+ var listInfo1 = protocol.readListBegin();
91
+ var listSize1 = (_a = listInfo1.size) !== null && _a !== void 0 ? _a : 0;
92
+ var value1 = [];
93
+ if (listInfo1.etype === thrift_1.Thrift.Type.STRING) {
94
+ for (var i = 0; i < listSize1; i++) {
95
+ var value2 = protocol.readString();
96
+ value1.push(value2);
97
+ }
98
+ }
99
+ protocol.readListEnd();
100
+ result.results = value1;
101
+ }
102
+ else {
103
+ protocol.skip(ftype);
104
+ }
105
+ break;
106
+ default:
107
+ protocol.skip(ftype);
108
+ }
109
+ protocol.readFieldEnd();
110
+ }
111
+ protocol.readStructEnd();
112
+ // @ts-ignore
113
+ return result;
114
+ };
115
+ AtomUsageResponseSerde.write = function (protocol, value0) {
116
+ protocol.writeStructBegin('AtomUsageResponse');
117
+ if (value0.status !== null && value0.status !== undefined) {
118
+ var value1 = value0.status;
119
+ protocol.writeFieldBegin('status', thrift_1.Thrift.Type.STRING, 1);
120
+ protocol.writeString(value1);
121
+ protocol.writeFieldEnd();
122
+ }
123
+ if (value0.userTier !== null && value0.userTier !== undefined) {
124
+ var value1 = value0.userTier;
125
+ protocol.writeFieldBegin('userTier', thrift_1.Thrift.Type.STRING, 2);
126
+ protocol.writeString(value1);
127
+ protocol.writeFieldEnd();
128
+ }
129
+ if (value0.total !== null && value0.total !== undefined) {
130
+ var value1 = value0.total;
131
+ protocol.writeFieldBegin('total', thrift_1.Thrift.Type.I32, 3);
132
+ protocol.writeI32(value1);
133
+ protocol.writeFieldEnd();
134
+ }
135
+ if (value0.startIndex !== null && value0.startIndex !== undefined) {
136
+ var value1 = value0.startIndex;
137
+ protocol.writeFieldBegin('startIndex', thrift_1.Thrift.Type.I32, 4);
138
+ protocol.writeI32(value1);
139
+ protocol.writeFieldEnd();
140
+ }
141
+ if (value0.pageSize !== null && value0.pageSize !== undefined) {
142
+ var value1 = value0.pageSize;
143
+ protocol.writeFieldBegin('pageSize', thrift_1.Thrift.Type.I32, 5);
144
+ protocol.writeI32(value1);
145
+ protocol.writeFieldEnd();
146
+ }
147
+ if (value0.currentPage !== null && value0.currentPage !== undefined) {
148
+ var value1 = value0.currentPage;
149
+ protocol.writeFieldBegin('currentPage', thrift_1.Thrift.Type.I32, 6);
150
+ protocol.writeI32(value1);
151
+ protocol.writeFieldEnd();
152
+ }
153
+ if (value0.pages !== null && value0.pages !== undefined) {
154
+ var value1 = value0.pages;
155
+ protocol.writeFieldBegin('pages', thrift_1.Thrift.Type.I32, 7);
156
+ protocol.writeI32(value1);
157
+ protocol.writeFieldEnd();
158
+ }
159
+ if (value0.results !== null && value0.results !== undefined) {
160
+ var value1 = value0.results;
161
+ protocol.writeFieldBegin('results', thrift_1.Thrift.Type.LIST, 8);
162
+ protocol.writeListBegin(thrift_1.Thrift.Type.STRING, value1.length);
163
+ value1.forEach(function (value2) {
164
+ protocol.writeString(value2);
165
+ });
166
+ protocol.writeListEnd();
167
+ protocol.writeFieldEnd();
168
+ }
169
+ protocol.writeFieldStop();
170
+ protocol.writeStructEnd();
171
+ };
172
+ return AtomUsageResponseSerde;
173
+ }());
174
+ exports.AtomUsageResponseSerde = AtomUsageResponseSerde;
package/v1/atoms.d.ts ADDED
@@ -0,0 +1,29 @@
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 { Atom } from '@guardian/content-atom-model/atom';
8
+ export interface Atoms {
9
+ quizzes?: Atom[];
10
+ viewpoints?: Atom[];
11
+ media?: Atom[];
12
+ explainers?: Atom[];
13
+ cta?: Atom[];
14
+ interactives?: Atom[];
15
+ reviews?: Atom[];
16
+ recipes?: Atom[];
17
+ qandas?: Atom[];
18
+ guides?: Atom[];
19
+ profiles?: Atom[];
20
+ timelines?: Atom[];
21
+ commonsdivisions?: Atom[];
22
+ charts?: Atom[];
23
+ audios?: Atom[];
24
+ emailsignups?: Atom[];
25
+ }
26
+ export declare class AtomsSerde {
27
+ static read(protocol: TProtocol): Atoms;
28
+ static write(protocol: TProtocol, value0: Atoms): void;
29
+ }