@guardian/content-api-models 26.0.0-PREVIEW.fpanatom-data-field.2024-08-30T1523.f4dd8170 → 26.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 +1 -1
- package/v1/contentAtomElementFields.d.ts +0 -1
- package/v1/contentAtomElementFields.js +0 -15
- package/v1/listItem.d.ts +1 -2
- package/v1/listItem.js +28 -29
package/package.json
CHANGED
|
@@ -57,15 +57,6 @@ var ContentAtomElementFieldsSerde = /** @class */ (function () {
|
|
|
57
57
|
protocol.skip(ftype);
|
|
58
58
|
}
|
|
59
59
|
break;
|
|
60
|
-
case 5:
|
|
61
|
-
if (ftype === thrift_1.Thrift.Type.STRING) {
|
|
62
|
-
var value1 = protocol.readString();
|
|
63
|
-
result.jsonData = value1;
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
protocol.skip(ftype);
|
|
67
|
-
}
|
|
68
|
-
break;
|
|
69
60
|
default:
|
|
70
61
|
protocol.skip(ftype);
|
|
71
62
|
}
|
|
@@ -101,12 +92,6 @@ var ContentAtomElementFieldsSerde = /** @class */ (function () {
|
|
|
101
92
|
protocol.writeBool(value1);
|
|
102
93
|
protocol.writeFieldEnd();
|
|
103
94
|
}
|
|
104
|
-
if (value0.jsonData !== null && value0.jsonData !== undefined) {
|
|
105
|
-
var value1 = value0.jsonData;
|
|
106
|
-
protocol.writeFieldBegin('jsonData', thrift_1.Thrift.Type.STRING, 5);
|
|
107
|
-
protocol.writeString(value1);
|
|
108
|
-
protocol.writeFieldEnd();
|
|
109
|
-
}
|
|
110
95
|
protocol.writeFieldStop();
|
|
111
96
|
protocol.writeStructEnd();
|
|
112
97
|
};
|
package/v1/listItem.d.ts
CHANGED
|
@@ -5,16 +5,15 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { TProtocol } from 'thrift';
|
|
7
7
|
import { BlockElement } from './blockElement';
|
|
8
|
-
import { Tag } from './tag';
|
|
9
8
|
export interface ListItem {
|
|
10
9
|
elements: BlockElement[];
|
|
11
10
|
title?: string;
|
|
12
|
-
contributors?: Tag[];
|
|
13
11
|
bio?: string;
|
|
14
12
|
contributorImageOverrideUrl?: string;
|
|
15
13
|
endNote?: string;
|
|
16
14
|
byline?: string;
|
|
17
15
|
bylineHtml?: string;
|
|
16
|
+
contributorIds?: string[];
|
|
18
17
|
}
|
|
19
18
|
export declare class ListItemSerde {
|
|
20
19
|
static read(protocol: TProtocol): ListItem;
|
package/v1/listItem.js
CHANGED
|
@@ -8,7 +8,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
8
8
|
exports.ListItemSerde = void 0;
|
|
9
9
|
var thrift_1 = require("thrift");
|
|
10
10
|
var blockElement_1 = require("./blockElement");
|
|
11
|
-
var tag_1 = require("./tag");
|
|
12
11
|
var ListItemSerde = /** @class */ (function () {
|
|
13
12
|
function ListItemSerde() {
|
|
14
13
|
}
|
|
@@ -53,24 +52,6 @@ var ListItemSerde = /** @class */ (function () {
|
|
|
53
52
|
protocol.skip(ftype);
|
|
54
53
|
}
|
|
55
54
|
break;
|
|
56
|
-
case 3:
|
|
57
|
-
if (ftype === thrift_1.Thrift.Type.LIST) {
|
|
58
|
-
var listInfo1 = protocol.readListBegin();
|
|
59
|
-
var listSize1 = (_b = listInfo1.size) !== null && _b !== void 0 ? _b : 0;
|
|
60
|
-
var value1 = [];
|
|
61
|
-
if (listInfo1.etype === thrift_1.Thrift.Type.STRUCT) {
|
|
62
|
-
for (var i = 0; i < listSize1; i++) {
|
|
63
|
-
var value2 = tag_1.TagSerde.read(protocol);
|
|
64
|
-
value1.push(value2);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
protocol.readListEnd();
|
|
68
|
-
result.contributors = value1;
|
|
69
|
-
}
|
|
70
|
-
else {
|
|
71
|
-
protocol.skip(ftype);
|
|
72
|
-
}
|
|
73
|
-
break;
|
|
74
55
|
case 4:
|
|
75
56
|
if (ftype === thrift_1.Thrift.Type.STRING) {
|
|
76
57
|
var value1 = protocol.readString();
|
|
@@ -116,6 +97,24 @@ var ListItemSerde = /** @class */ (function () {
|
|
|
116
97
|
protocol.skip(ftype);
|
|
117
98
|
}
|
|
118
99
|
break;
|
|
100
|
+
case 9:
|
|
101
|
+
if (ftype === thrift_1.Thrift.Type.LIST) {
|
|
102
|
+
var listInfo1 = protocol.readListBegin();
|
|
103
|
+
var listSize1 = (_b = listInfo1.size) !== null && _b !== void 0 ? _b : 0;
|
|
104
|
+
var value1 = [];
|
|
105
|
+
if (listInfo1.etype === thrift_1.Thrift.Type.STRING) {
|
|
106
|
+
for (var i = 0; i < listSize1; i++) {
|
|
107
|
+
var value2 = protocol.readString();
|
|
108
|
+
value1.push(value2);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
protocol.readListEnd();
|
|
112
|
+
result.contributorIds = value1;
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
protocol.skip(ftype);
|
|
116
|
+
}
|
|
117
|
+
break;
|
|
119
118
|
default:
|
|
120
119
|
protocol.skip(ftype);
|
|
121
120
|
}
|
|
@@ -143,16 +142,6 @@ var ListItemSerde = /** @class */ (function () {
|
|
|
143
142
|
protocol.writeString(value1);
|
|
144
143
|
protocol.writeFieldEnd();
|
|
145
144
|
}
|
|
146
|
-
if (value0.contributors !== null && value0.contributors !== undefined) {
|
|
147
|
-
var value1 = value0.contributors;
|
|
148
|
-
protocol.writeFieldBegin('contributors', thrift_1.Thrift.Type.LIST, 3);
|
|
149
|
-
protocol.writeListBegin(thrift_1.Thrift.Type.STRUCT, value1.length);
|
|
150
|
-
value1.forEach(function (value2) {
|
|
151
|
-
tag_1.TagSerde.write(protocol, value2);
|
|
152
|
-
});
|
|
153
|
-
protocol.writeListEnd();
|
|
154
|
-
protocol.writeFieldEnd();
|
|
155
|
-
}
|
|
156
145
|
if (value0.bio !== null && value0.bio !== undefined) {
|
|
157
146
|
var value1 = value0.bio;
|
|
158
147
|
protocol.writeFieldBegin('bio', thrift_1.Thrift.Type.STRING, 4);
|
|
@@ -183,6 +172,16 @@ var ListItemSerde = /** @class */ (function () {
|
|
|
183
172
|
protocol.writeString(value1);
|
|
184
173
|
protocol.writeFieldEnd();
|
|
185
174
|
}
|
|
175
|
+
if (value0.contributorIds !== null && value0.contributorIds !== undefined) {
|
|
176
|
+
var value1 = value0.contributorIds;
|
|
177
|
+
protocol.writeFieldBegin('contributorIds', thrift_1.Thrift.Type.LIST, 9);
|
|
178
|
+
protocol.writeListBegin(thrift_1.Thrift.Type.STRING, value1.length);
|
|
179
|
+
value1.forEach(function (value2) {
|
|
180
|
+
protocol.writeString(value2);
|
|
181
|
+
});
|
|
182
|
+
protocol.writeListEnd();
|
|
183
|
+
protocol.writeFieldEnd();
|
|
184
|
+
}
|
|
186
185
|
protocol.writeFieldStop();
|
|
187
186
|
protocol.writeStructEnd();
|
|
188
187
|
};
|