@guardian/content-api-models 28.0.0 → 30.0.0-PREVIEW.add-new-podcast-fields.2025-08-07T1437.73d8c924
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 +1 -1
- package/v1/contentFields.d.ts +2 -0
- package/v1/contentFields.js +30 -0
- package/v1/podcast.d.ts +3 -0
- package/v1/podcast.js +31 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
{
|
|
3
3
|
"name": "@guardian/content-api-models",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "30.0.0-PREVIEW.add-new-podcast-fields.2025-08-07T1437.73d8c924",
|
|
5
5
|
"description": "Typescript library built from the content api thrift definitions",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
package/v1/contentFields.d.ts
CHANGED
|
@@ -60,6 +60,8 @@ export interface ContentFields {
|
|
|
60
60
|
showAffiliateLinks?: boolean;
|
|
61
61
|
bylineHtml?: string;
|
|
62
62
|
showTableOfContents?: boolean;
|
|
63
|
+
podcastEpisodeNumber?: number;
|
|
64
|
+
podcastSeasonNumber?: number;
|
|
63
65
|
}
|
|
64
66
|
export declare class ContentFieldsSerde {
|
|
65
67
|
static read(protocol: TProtocol): ContentFields;
|
package/v1/contentFields.js
CHANGED
|
@@ -490,6 +490,24 @@ 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;
|
|
493
511
|
default:
|
|
494
512
|
protocol.skip(ftype);
|
|
495
513
|
}
|
|
@@ -813,6 +831,18 @@ var ContentFieldsSerde = /** @class */ (function () {
|
|
|
813
831
|
protocol.writeBool(value1);
|
|
814
832
|
protocol.writeFieldEnd();
|
|
815
833
|
}
|
|
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
|
+
}
|
|
816
846
|
protocol.writeFieldStop();
|
|
817
847
|
protocol.writeStructEnd();
|
|
818
848
|
};
|
package/v1/podcast.d.ts
CHANGED
|
@@ -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 { CapiDateTime } from './capiDateTime';
|
|
7
8
|
import { PodcastCategory } from './podcastCategory';
|
|
8
9
|
export interface Podcast {
|
|
9
10
|
linkUrl: string;
|
|
@@ -18,6 +19,8 @@ export interface Podcast {
|
|
|
18
19
|
spotifyUrl?: string;
|
|
19
20
|
acastId?: string;
|
|
20
21
|
pocketCastsUrl?: string;
|
|
22
|
+
episodicArtworkEnabled?: boolean;
|
|
23
|
+
episodicArtworkEnabledFrom?: CapiDateTime;
|
|
21
24
|
}
|
|
22
25
|
export declare class PodcastSerde {
|
|
23
26
|
static read(protocol: TProtocol): Podcast;
|
package/v1/podcast.js
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
exports.PodcastSerde = void 0;
|
|
9
9
|
var thrift_1 = require("thrift");
|
|
10
|
+
var capiDateTime_1 = require("./capiDateTime");
|
|
10
11
|
var podcastCategory_1 = require("./podcastCategory");
|
|
11
12
|
var PodcastSerde = /** @class */ (function () {
|
|
12
13
|
function PodcastSerde() {
|
|
@@ -140,6 +141,24 @@ var PodcastSerde = /** @class */ (function () {
|
|
|
140
141
|
protocol.skip(ftype);
|
|
141
142
|
}
|
|
142
143
|
break;
|
|
144
|
+
case 13:
|
|
145
|
+
if (ftype === thrift_1.Thrift.Type.BOOL) {
|
|
146
|
+
var value1 = protocol.readBool();
|
|
147
|
+
result.episodicArtworkEnabled = value1;
|
|
148
|
+
}
|
|
149
|
+
else {
|
|
150
|
+
protocol.skip(ftype);
|
|
151
|
+
}
|
|
152
|
+
break;
|
|
153
|
+
case 14:
|
|
154
|
+
if (ftype === thrift_1.Thrift.Type.STRUCT) {
|
|
155
|
+
var value1 = capiDateTime_1.CapiDateTimeSerde.read(protocol);
|
|
156
|
+
result.episodicArtworkEnabledFrom = value1;
|
|
157
|
+
}
|
|
158
|
+
else {
|
|
159
|
+
protocol.skip(ftype);
|
|
160
|
+
}
|
|
161
|
+
break;
|
|
143
162
|
default:
|
|
144
163
|
protocol.skip(ftype);
|
|
145
164
|
}
|
|
@@ -227,6 +246,18 @@ var PodcastSerde = /** @class */ (function () {
|
|
|
227
246
|
protocol.writeString(value1);
|
|
228
247
|
protocol.writeFieldEnd();
|
|
229
248
|
}
|
|
249
|
+
if (value0.episodicArtworkEnabled !== null && value0.episodicArtworkEnabled !== undefined) {
|
|
250
|
+
var value1 = value0.episodicArtworkEnabled;
|
|
251
|
+
protocol.writeFieldBegin('episodicArtworkEnabled', thrift_1.Thrift.Type.BOOL, 13);
|
|
252
|
+
protocol.writeBool(value1);
|
|
253
|
+
protocol.writeFieldEnd();
|
|
254
|
+
}
|
|
255
|
+
if (value0.episodicArtworkEnabledFrom !== null && value0.episodicArtworkEnabledFrom !== undefined) {
|
|
256
|
+
var value1 = value0.episodicArtworkEnabledFrom;
|
|
257
|
+
protocol.writeFieldBegin('episodicArtworkEnabledFrom', thrift_1.Thrift.Type.STRUCT, 14);
|
|
258
|
+
capiDateTime_1.CapiDateTimeSerde.write(protocol, value1);
|
|
259
|
+
protocol.writeFieldEnd();
|
|
260
|
+
}
|
|
230
261
|
protocol.writeFieldStop();
|
|
231
262
|
protocol.writeStructEnd();
|
|
232
263
|
};
|