@guardian/content-api-models 30.0.0-PREVIEW.add-new-podcast-fields.2025-08-07T1437.73d8c924 → 30.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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
2
  {
3
3
  "name": "@guardian/content-api-models",
4
- "version": "30.0.0-PREVIEW.add-new-podcast-fields.2025-08-07T1437.73d8c924",
4
+ "version": "30.0.0",
5
5
  "description": "Typescript library built from the content api thrift definitions",
6
6
  "repository": {
7
7
  "type": "git",
@@ -4,6 +4,7 @@
4
4
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
5
  */
6
6
  import { TProtocol } from 'thrift';
7
+ import { PodcastEpisodeType } from './podcastEpisodeType';
7
8
  export interface AudioElementFields {
8
9
  html?: string;
9
10
  source?: string;
@@ -18,6 +19,9 @@ export interface AudioElementFields {
18
19
  role?: string;
19
20
  sourceDomain?: string;
20
21
  isMandatory?: boolean;
22
+ podcastEpisodeNumber?: number;
23
+ podcastSeasonNumber?: number;
24
+ podcastEpisodeType?: PodcastEpisodeType;
21
25
  }
22
26
  export declare class AudioElementFieldsSerde {
23
27
  static read(protocol: TProtocol): AudioElementFields;
@@ -138,6 +138,33 @@ var AudioElementFieldsSerde = /** @class */ (function () {
138
138
  protocol.skip(ftype);
139
139
  }
140
140
  break;
141
+ case 16:
142
+ if (ftype === thrift_1.Thrift.Type.I32) {
143
+ var value1 = protocol.readI32();
144
+ result.podcastEpisodeNumber = value1;
145
+ }
146
+ else {
147
+ protocol.skip(ftype);
148
+ }
149
+ break;
150
+ case 17:
151
+ if (ftype === thrift_1.Thrift.Type.I32) {
152
+ var value1 = protocol.readI32();
153
+ result.podcastSeasonNumber = value1;
154
+ }
155
+ else {
156
+ protocol.skip(ftype);
157
+ }
158
+ break;
159
+ case 18:
160
+ if (ftype === thrift_1.Thrift.Type.I32) {
161
+ var value1 = protocol.readI32();
162
+ result.podcastEpisodeType = value1;
163
+ }
164
+ else {
165
+ protocol.skip(ftype);
166
+ }
167
+ break;
141
168
  default:
142
169
  protocol.skip(ftype);
143
170
  }
@@ -227,6 +254,24 @@ var AudioElementFieldsSerde = /** @class */ (function () {
227
254
  protocol.writeBool(value1);
228
255
  protocol.writeFieldEnd();
229
256
  }
257
+ if (value0.podcastEpisodeNumber !== null && value0.podcastEpisodeNumber !== undefined) {
258
+ var value1 = value0.podcastEpisodeNumber;
259
+ protocol.writeFieldBegin('podcastEpisodeNumber', thrift_1.Thrift.Type.I32, 16);
260
+ protocol.writeI32(value1);
261
+ protocol.writeFieldEnd();
262
+ }
263
+ if (value0.podcastSeasonNumber !== null && value0.podcastSeasonNumber !== undefined) {
264
+ var value1 = value0.podcastSeasonNumber;
265
+ protocol.writeFieldBegin('podcastSeasonNumber', thrift_1.Thrift.Type.I32, 17);
266
+ protocol.writeI32(value1);
267
+ protocol.writeFieldEnd();
268
+ }
269
+ if (value0.podcastEpisodeType !== null && value0.podcastEpisodeType !== undefined) {
270
+ var value1 = value0.podcastEpisodeType;
271
+ protocol.writeFieldBegin('podcastEpisodeType', thrift_1.Thrift.Type.I32, 18);
272
+ protocol.writeI32(value1);
273
+ protocol.writeFieldEnd();
274
+ }
230
275
  protocol.writeFieldStop();
231
276
  protocol.writeStructEnd();
232
277
  };
@@ -60,8 +60,6 @@ export interface ContentFields {
60
60
  showAffiliateLinks?: boolean;
61
61
  bylineHtml?: string;
62
62
  showTableOfContents?: boolean;
63
- podcastEpisodeNumber?: number;
64
- podcastSeasonNumber?: number;
65
63
  }
66
64
  export declare class ContentFieldsSerde {
67
65
  static read(protocol: TProtocol): ContentFields;
@@ -490,24 +490,6 @@ var ContentFieldsSerde = /** @class */ (function () {
490
490
  protocol.skip(ftype);
491
491
  }
492
492
  break;
493
- case 53:
494
- if (ftype === thrift_1.Thrift.Type.I32) {
495
- var value1 = protocol.readI32();
496
- result.podcastEpisodeNumber = value1;
497
- }
498
- else {
499
- protocol.skip(ftype);
500
- }
501
- break;
502
- case 54:
503
- if (ftype === thrift_1.Thrift.Type.I32) {
504
- var value1 = protocol.readI32();
505
- result.podcastSeasonNumber = value1;
506
- }
507
- else {
508
- protocol.skip(ftype);
509
- }
510
- break;
511
493
  default:
512
494
  protocol.skip(ftype);
513
495
  }
@@ -831,18 +813,6 @@ var ContentFieldsSerde = /** @class */ (function () {
831
813
  protocol.writeBool(value1);
832
814
  protocol.writeFieldEnd();
833
815
  }
834
- if (value0.podcastEpisodeNumber !== null && value0.podcastEpisodeNumber !== undefined) {
835
- var value1 = value0.podcastEpisodeNumber;
836
- protocol.writeFieldBegin('podcastEpisodeNumber', thrift_1.Thrift.Type.I32, 53);
837
- protocol.writeI32(value1);
838
- protocol.writeFieldEnd();
839
- }
840
- if (value0.podcastSeasonNumber !== null && value0.podcastSeasonNumber !== undefined) {
841
- var value1 = value0.podcastSeasonNumber;
842
- protocol.writeFieldBegin('podcastSeasonNumber', thrift_1.Thrift.Type.I32, 54);
843
- protocol.writeI32(value1);
844
- protocol.writeFieldEnd();
845
- }
846
816
  protocol.writeFieldStop();
847
817
  protocol.writeStructEnd();
848
818
  };
@@ -0,0 +1,10 @@
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 PodcastEpisodeType {
7
+ FULL = 0,
8
+ TRAILER = 1,
9
+ BONUS = 2
10
+ }
@@ -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.PodcastEpisodeType = void 0;
9
+ var PodcastEpisodeType;
10
+ (function (PodcastEpisodeType) {
11
+ PodcastEpisodeType[PodcastEpisodeType["FULL"] = 0] = "FULL";
12
+ PodcastEpisodeType[PodcastEpisodeType["TRAILER"] = 1] = "TRAILER";
13
+ PodcastEpisodeType[PodcastEpisodeType["BONUS"] = 2] = "BONUS";
14
+ })(PodcastEpisodeType || (exports.PodcastEpisodeType = PodcastEpisodeType = {}));