@guardian/content-api-models 17.6.0-beta.0 → 17.6.0-beta.1

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
2
  {
3
3
  "name": "@guardian/content-api-models",
4
- "version": "17.6.0-beta.0",
4
+ "version": "17.6.0-beta.1",
5
5
  "description": "Typescript library built from the content api thrift definitions",
6
6
  "repository": {
7
7
  "type": "git",
@@ -17,7 +17,7 @@
17
17
  "@guardian/content-entity-model": "^2.2.1",
18
18
  "@types/thrift": "^0.10.11",
19
19
  "thrift": "^0.15.0",
20
- "@guardian/content-atom-model": "^3.4.0",
20
+ "@guardian/content-atom-model": "^3.4.2",
21
21
  "@types/node-int64": "^0.4.29",
22
22
  "node-int64": "^0.4.0"
23
23
  }
@@ -17,6 +17,7 @@ export interface AudioElementFields {
17
17
  explicit?: boolean;
18
18
  role?: string;
19
19
  sourceDomain?: string;
20
+ isMandatory?: boolean;
20
21
  }
21
22
  export declare class AudioElementFieldsSerde {
22
23
  static read(protocol: TProtocol): AudioElementFields;
@@ -129,6 +129,15 @@ var AudioElementFieldsSerde = /** @class */ (function () {
129
129
  protocol.skip(ftype);
130
130
  }
131
131
  break;
132
+ case 15:
133
+ if (ftype === thrift_1.Thrift.Type.BOOL) {
134
+ var value1 = protocol.readBool();
135
+ result.isMandatory = value1;
136
+ }
137
+ else {
138
+ protocol.skip(ftype);
139
+ }
140
+ break;
132
141
  default:
133
142
  protocol.skip(ftype);
134
143
  }
@@ -212,6 +221,12 @@ var AudioElementFieldsSerde = /** @class */ (function () {
212
221
  protocol.writeString(value1);
213
222
  protocol.writeFieldEnd();
214
223
  }
224
+ if (value0.isMandatory !== null && value0.isMandatory !== undefined) {
225
+ var value1 = value0.isMandatory;
226
+ protocol.writeFieldBegin('isMandatory', thrift_1.Thrift.Type.BOOL, 15);
227
+ protocol.writeBool(value1);
228
+ protocol.writeFieldEnd();
229
+ }
215
230
  protocol.writeFieldStop();
216
231
  protocol.writeStructEnd();
217
232
  };
@@ -16,6 +16,7 @@ export interface CommentElementFields {
16
16
  authorName?: string;
17
17
  commentId?: number;
18
18
  role?: string;
19
+ isMandatory?: boolean;
19
20
  }
20
21
  export declare class CommentElementFieldsSerde {
21
22
  static read(protocol: TProtocol): CommentElementFields;
@@ -120,6 +120,15 @@ var CommentElementFieldsSerde = /** @class */ (function () {
120
120
  protocol.skip(ftype);
121
121
  }
122
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;
123
132
  default:
124
133
  protocol.skip(ftype);
125
134
  }
@@ -197,6 +206,12 @@ var CommentElementFieldsSerde = /** @class */ (function () {
197
206
  protocol.writeString(value1);
198
207
  protocol.writeFieldEnd();
199
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
+ }
200
215
  protocol.writeFieldStop();
201
216
  protocol.writeStructEnd();
202
217
  };
@@ -8,6 +8,7 @@ export interface ContentAtomElementFields {
8
8
  atomId: string;
9
9
  atomType: string;
10
10
  role?: string;
11
+ isMandatory?: boolean;
11
12
  }
12
13
  export declare class ContentAtomElementFieldsSerde {
13
14
  static read(protocol: TProtocol): ContentAtomElementFields;
@@ -48,6 +48,15 @@ var ContentAtomElementFieldsSerde = /** @class */ (function () {
48
48
  protocol.skip(ftype);
49
49
  }
50
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;
51
60
  default:
52
61
  protocol.skip(ftype);
53
62
  }
@@ -77,6 +86,12 @@ var ContentAtomElementFieldsSerde = /** @class */ (function () {
77
86
  protocol.writeString(value1);
78
87
  protocol.writeFieldEnd();
79
88
  }
89
+ if (value0.isMandatory !== null && value0.isMandatory !== undefined) {
90
+ var value1 = value0.isMandatory;
91
+ protocol.writeFieldBegin('isMandatory', thrift_1.Thrift.Type.BOOL, 4);
92
+ protocol.writeBool(value1);
93
+ protocol.writeFieldEnd();
94
+ }
80
95
  protocol.writeFieldStop();
81
96
  protocol.writeStructEnd();
82
97
  };
@@ -59,6 +59,7 @@ export interface ContentFields {
59
59
  internalCommissionedWordcount?: number;
60
60
  showAffiliateLinks?: boolean;
61
61
  bylineHtml?: string;
62
+ showTableOfContents?: boolean;
62
63
  }
63
64
  export declare class ContentFieldsSerde {
64
65
  static read(protocol: TProtocol): ContentFields;
@@ -481,6 +481,15 @@ var ContentFieldsSerde = /** @class */ (function () {
481
481
  protocol.skip(ftype);
482
482
  }
483
483
  break;
484
+ case 52:
485
+ if (ftype === thrift_1.Thrift.Type.BOOL) {
486
+ var value1 = protocol.readBool();
487
+ result.showTableOfContents = value1;
488
+ }
489
+ else {
490
+ protocol.skip(ftype);
491
+ }
492
+ break;
484
493
  default:
485
494
  protocol.skip(ftype);
486
495
  }
@@ -798,6 +807,12 @@ var ContentFieldsSerde = /** @class */ (function () {
798
807
  protocol.writeString(value1);
799
808
  protocol.writeFieldEnd();
800
809
  }
810
+ if (value0.showTableOfContents !== null && value0.showTableOfContents !== undefined) {
811
+ var value1 = value0.showTableOfContents;
812
+ protocol.writeFieldBegin('showTableOfContents', thrift_1.Thrift.Type.BOOL, 52);
813
+ protocol.writeBool(value1);
814
+ protocol.writeFieldEnd();
815
+ }
801
816
  protocol.writeFieldStop();
802
817
  protocol.writeStructEnd();
803
818
  };
package/v1/podcast.d.ts CHANGED
@@ -17,6 +17,7 @@ export interface Podcast {
17
17
  googlePodcastsUrl?: string;
18
18
  spotifyUrl?: string;
19
19
  acastId?: string;
20
+ pocketCastsUrl?: string;
20
21
  }
21
22
  export declare class PodcastSerde {
22
23
  static read(protocol: TProtocol): Podcast;
package/v1/podcast.js CHANGED
@@ -131,6 +131,15 @@ var PodcastSerde = /** @class */ (function () {
131
131
  protocol.skip(ftype);
132
132
  }
133
133
  break;
134
+ case 12:
135
+ if (ftype === thrift_1.Thrift.Type.STRING) {
136
+ var value1 = protocol.readString();
137
+ result.pocketCastsUrl = value1;
138
+ }
139
+ else {
140
+ protocol.skip(ftype);
141
+ }
142
+ break;
134
143
  default:
135
144
  protocol.skip(ftype);
136
145
  }
@@ -212,6 +221,12 @@ var PodcastSerde = /** @class */ (function () {
212
221
  protocol.writeString(value1);
213
222
  protocol.writeFieldEnd();
214
223
  }
224
+ if (value0.pocketCastsUrl !== null && value0.pocketCastsUrl !== undefined) {
225
+ var value1 = value0.pocketCastsUrl;
226
+ protocol.writeFieldBegin('pocketCastsUrl', thrift_1.Thrift.Type.STRING, 12);
227
+ protocol.writeString(value1);
228
+ protocol.writeFieldEnd();
229
+ }
215
230
  protocol.writeFieldStop();
216
231
  protocol.writeStructEnd();
217
232
  };
@@ -12,6 +12,7 @@ export interface TweetElementFields {
12
12
  originalUrl?: string;
13
13
  role?: string;
14
14
  sourceDomain?: string;
15
+ isMandatory?: boolean;
15
16
  }
16
17
  export declare class TweetElementFieldsSerde {
17
18
  static read(protocol: TProtocol): TweetElementFields;
@@ -84,6 +84,15 @@ var TweetElementFieldsSerde = /** @class */ (function () {
84
84
  protocol.skip(ftype);
85
85
  }
86
86
  break;
87
+ case 10:
88
+ if (ftype === thrift_1.Thrift.Type.BOOL) {
89
+ var value1 = protocol.readBool();
90
+ result.isMandatory = value1;
91
+ }
92
+ else {
93
+ protocol.skip(ftype);
94
+ }
95
+ break;
87
96
  default:
88
97
  protocol.skip(ftype);
89
98
  }
@@ -137,6 +146,12 @@ var TweetElementFieldsSerde = /** @class */ (function () {
137
146
  protocol.writeString(value1);
138
147
  protocol.writeFieldEnd();
139
148
  }
149
+ if (value0.isMandatory !== null && value0.isMandatory !== undefined) {
150
+ var value1 = value0.isMandatory;
151
+ protocol.writeFieldBegin('isMandatory', thrift_1.Thrift.Type.BOOL, 10);
152
+ protocol.writeBool(value1);
153
+ protocol.writeFieldEnd();
154
+ }
140
155
  protocol.writeFieldStop();
141
156
  protocol.writeStructEnd();
142
157
  };
@@ -25,6 +25,7 @@ export interface VideoElementFields {
25
25
  role?: string;
26
26
  originalUrl?: string;
27
27
  sourceDomain?: string;
28
+ isMandatory?: boolean;
28
29
  }
29
30
  export declare class VideoElementFieldsSerde {
30
31
  static read(protocol: TProtocol): VideoElementFields;
@@ -201,6 +201,15 @@ var VideoElementFieldsSerde = /** @class */ (function () {
201
201
  protocol.skip(ftype);
202
202
  }
203
203
  break;
204
+ case 21:
205
+ if (ftype === thrift_1.Thrift.Type.BOOL) {
206
+ var value1 = protocol.readBool();
207
+ result.isMandatory = value1;
208
+ }
209
+ else {
210
+ protocol.skip(ftype);
211
+ }
212
+ break;
204
213
  default:
205
214
  protocol.skip(ftype);
206
215
  }
@@ -332,6 +341,12 @@ var VideoElementFieldsSerde = /** @class */ (function () {
332
341
  protocol.writeString(value1);
333
342
  protocol.writeFieldEnd();
334
343
  }
344
+ if (value0.isMandatory !== null && value0.isMandatory !== undefined) {
345
+ var value1 = value0.isMandatory;
346
+ protocol.writeFieldBegin('isMandatory', thrift_1.Thrift.Type.BOOL, 21);
347
+ protocol.writeBool(value1);
348
+ protocol.writeFieldEnd();
349
+ }
335
350
  protocol.writeFieldStop();
336
351
  protocol.writeStructEnd();
337
352
  };