@guardian/content-api-models 17.4.0 → 17.5.0-beta.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/crier/event/v1/eventPayload.d.ts +1 -1
- package/package.json +12 -11
- package/v1/audioElementFields.d.ts +1 -0
- package/v1/audioElementFields.js +15 -0
- package/v1/commentElementFields.d.ts +1 -0
- package/v1/commentElementFields.js +15 -0
- package/v1/contentAtomElementFields.d.ts +1 -0
- package/v1/contentAtomElementFields.js +15 -0
- package/v1/tweetElementFields.d.ts +1 -0
- package/v1/tweetElementFields.js +15 -0
- package/v1/videoElementFields.d.ts +1 -0
- package/v1/videoElementFields.js +15 -0
|
@@ -8,7 +8,7 @@ import { Content } from '../../../v1/content';
|
|
|
8
8
|
import { DeletedContent } from './deletedContent';
|
|
9
9
|
import { RetrievableContent } from './retrievableContent';
|
|
10
10
|
import { Atom } from '@guardian/content-atom-model/atom';
|
|
11
|
-
export
|
|
11
|
+
export type EventPayload = {
|
|
12
12
|
kind: "content";
|
|
13
13
|
content: Content;
|
|
14
14
|
} | {
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
|
|
1
2
|
{
|
|
2
3
|
"name": "@guardian/content-api-models",
|
|
3
|
-
"version": "17.
|
|
4
|
+
"version": "17.5.0-beta.0",
|
|
4
5
|
"description": "Typescript library built from the content api thrift definitions",
|
|
5
6
|
"repository": {
|
|
6
7
|
"type": "git",
|
|
@@ -9,15 +10,15 @@
|
|
|
9
10
|
"author": "",
|
|
10
11
|
"license": "Apache-2.0",
|
|
11
12
|
"devDependencies": {
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
"typescript": "^4.5.4"
|
|
14
|
+
},
|
|
14
15
|
"dependencies": {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
16
|
+
"@guardian/story-packages-model": "^2.2.0",
|
|
17
|
+
"@guardian/content-entity-model": "^2.2.1",
|
|
18
|
+
"@types/thrift": "^0.10.11",
|
|
19
|
+
"thrift": "^0.15.0",
|
|
20
|
+
"@guardian/content-atom-model": "^3.4.0",
|
|
21
|
+
"@types/node-int64": "^0.4.29",
|
|
22
|
+
"node-int64": "^0.4.0"
|
|
23
23
|
}
|
|
24
|
+
}
|
package/v1/audioElementFields.js
CHANGED
|
@@ -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
|
};
|
|
@@ -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
|
};
|
|
@@ -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
|
};
|
package/v1/tweetElementFields.js
CHANGED
|
@@ -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
|
};
|
package/v1/videoElementFields.js
CHANGED
|
@@ -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
|
};
|