@guardian/content-api-models 21.0.0 → 22.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
|
@@ -23,8 +23,8 @@ export interface SchemaRecipe {
|
|
|
23
23
|
cookTime?: string;
|
|
24
24
|
totalTime?: string;
|
|
25
25
|
author?: AuthorInfo;
|
|
26
|
-
suitableForDiet?: string;
|
|
27
|
-
cookingMethod?: string;
|
|
26
|
+
suitableForDiet?: string[];
|
|
27
|
+
cookingMethod?: string[];
|
|
28
28
|
}
|
|
29
29
|
export declare class SchemaRecipeSerde {
|
|
30
30
|
static read(protocol: TProtocol): SchemaRecipe;
|
|
@@ -13,7 +13,7 @@ var SchemaRecipeSerde = /** @class */ (function () {
|
|
|
13
13
|
function SchemaRecipeSerde() {
|
|
14
14
|
}
|
|
15
15
|
SchemaRecipeSerde.read = function (protocol) {
|
|
16
|
-
var _a, _b, _c, _d, _e;
|
|
16
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
17
17
|
protocol.readStructBegin();
|
|
18
18
|
var result = {};
|
|
19
19
|
while (true) {
|
|
@@ -214,8 +214,17 @@ var SchemaRecipeSerde = /** @class */ (function () {
|
|
|
214
214
|
}
|
|
215
215
|
break;
|
|
216
216
|
case 17:
|
|
217
|
-
if (ftype === thrift_1.Thrift.Type.
|
|
218
|
-
var
|
|
217
|
+
if (ftype === thrift_1.Thrift.Type.LIST) {
|
|
218
|
+
var listInfo1 = protocol.readListBegin();
|
|
219
|
+
var listSize1 = (_f = listInfo1.size) !== null && _f !== void 0 ? _f : 0;
|
|
220
|
+
var value1 = [];
|
|
221
|
+
if (listInfo1.etype === thrift_1.Thrift.Type.STRING) {
|
|
222
|
+
for (var i = 0; i < listSize1; i++) {
|
|
223
|
+
var value2 = protocol.readString();
|
|
224
|
+
value1.push(value2);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
protocol.readListEnd();
|
|
219
228
|
result.suitableForDiet = value1;
|
|
220
229
|
}
|
|
221
230
|
else {
|
|
@@ -223,8 +232,17 @@ var SchemaRecipeSerde = /** @class */ (function () {
|
|
|
223
232
|
}
|
|
224
233
|
break;
|
|
225
234
|
case 18:
|
|
226
|
-
if (ftype === thrift_1.Thrift.Type.
|
|
227
|
-
var
|
|
235
|
+
if (ftype === thrift_1.Thrift.Type.LIST) {
|
|
236
|
+
var listInfo1 = protocol.readListBegin();
|
|
237
|
+
var listSize1 = (_g = listInfo1.size) !== null && _g !== void 0 ? _g : 0;
|
|
238
|
+
var value1 = [];
|
|
239
|
+
if (listInfo1.etype === thrift_1.Thrift.Type.STRING) {
|
|
240
|
+
for (var i = 0; i < listSize1; i++) {
|
|
241
|
+
var value2 = protocol.readString();
|
|
242
|
+
value1.push(value2);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
protocol.readListEnd();
|
|
228
246
|
result.cookingMethod = value1;
|
|
229
247
|
}
|
|
230
248
|
else {
|
|
@@ -360,14 +378,22 @@ var SchemaRecipeSerde = /** @class */ (function () {
|
|
|
360
378
|
}
|
|
361
379
|
if (value0.suitableForDiet !== null && value0.suitableForDiet !== undefined) {
|
|
362
380
|
var value1 = value0.suitableForDiet;
|
|
363
|
-
protocol.writeFieldBegin('suitableForDiet', thrift_1.Thrift.Type.
|
|
364
|
-
protocol.
|
|
381
|
+
protocol.writeFieldBegin('suitableForDiet', thrift_1.Thrift.Type.LIST, 17);
|
|
382
|
+
protocol.writeListBegin(thrift_1.Thrift.Type.STRING, value1.length);
|
|
383
|
+
value1.forEach(function (value2) {
|
|
384
|
+
protocol.writeString(value2);
|
|
385
|
+
});
|
|
386
|
+
protocol.writeListEnd();
|
|
365
387
|
protocol.writeFieldEnd();
|
|
366
388
|
}
|
|
367
389
|
if (value0.cookingMethod !== null && value0.cookingMethod !== undefined) {
|
|
368
390
|
var value1 = value0.cookingMethod;
|
|
369
|
-
protocol.writeFieldBegin('cookingMethod', thrift_1.Thrift.Type.
|
|
370
|
-
protocol.
|
|
391
|
+
protocol.writeFieldBegin('cookingMethod', thrift_1.Thrift.Type.LIST, 18);
|
|
392
|
+
protocol.writeListBegin(thrift_1.Thrift.Type.STRING, value1.length);
|
|
393
|
+
value1.forEach(function (value2) {
|
|
394
|
+
protocol.writeString(value2);
|
|
395
|
+
});
|
|
396
|
+
protocol.writeListEnd();
|
|
371
397
|
protocol.writeFieldEnd();
|
|
372
398
|
}
|
|
373
399
|
protocol.writeFieldStop();
|