@guardian/content-api-models 21.0.0-PREVIEW.agschema-org-field.2024-03-05T1018.a555b63a → 21.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": "21.0.0-PREVIEW.agschema-org-field.2024-03-05T1018.a555b63a",
4
+ "version": "21.0.0",
5
5
  "description": "Typescript library built from the content api thrift definitions",
6
6
  "repository": {
7
7
  "type": "git",
@@ -4,7 +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 { SchemaRecipe } from '../schemaorg/schemaRecipe';
7
+ import { SchemaRecipe } from './schemaRecipe';
8
8
  export interface SchemaOrg {
9
9
  recipe?: SchemaRecipe[];
10
10
  }
@@ -7,7 +7,7 @@
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
8
  exports.SchemaOrgSerde = void 0;
9
9
  var thrift_1 = require("thrift");
10
- var schemaRecipe_1 = require("../schemaorg/schemaRecipe");
10
+ var schemaRecipe_1 = require("./schemaRecipe");
11
11
  var SchemaOrgSerde = /** @class */ (function () {
12
12
  function SchemaOrgSerde() {
13
13
  }
@@ -23,6 +23,8 @@ export interface SchemaRecipe {
23
23
  cookTime?: string;
24
24
  totalTime?: string;
25
25
  author?: AuthorInfo;
26
+ suitableForDiet?: string;
27
+ cookingMethod?: string;
26
28
  }
27
29
  export declare class SchemaRecipeSerde {
28
30
  static read(protocol: TProtocol): SchemaRecipe;
@@ -213,6 +213,24 @@ var SchemaRecipeSerde = /** @class */ (function () {
213
213
  protocol.skip(ftype);
214
214
  }
215
215
  break;
216
+ case 17:
217
+ if (ftype === thrift_1.Thrift.Type.STRING) {
218
+ var value1 = protocol.readString();
219
+ result.suitableForDiet = value1;
220
+ }
221
+ else {
222
+ protocol.skip(ftype);
223
+ }
224
+ break;
225
+ case 18:
226
+ if (ftype === thrift_1.Thrift.Type.STRING) {
227
+ var value1 = protocol.readString();
228
+ result.cookingMethod = value1;
229
+ }
230
+ else {
231
+ protocol.skip(ftype);
232
+ }
233
+ break;
216
234
  default:
217
235
  protocol.skip(ftype);
218
236
  }
@@ -340,6 +358,18 @@ var SchemaRecipeSerde = /** @class */ (function () {
340
358
  authorInfo_1.AuthorInfoSerde.write(protocol, value1);
341
359
  protocol.writeFieldEnd();
342
360
  }
361
+ if (value0.suitableForDiet !== null && value0.suitableForDiet !== undefined) {
362
+ var value1 = value0.suitableForDiet;
363
+ protocol.writeFieldBegin('suitableForDiet', thrift_1.Thrift.Type.STRING, 17);
364
+ protocol.writeString(value1);
365
+ protocol.writeFieldEnd();
366
+ }
367
+ if (value0.cookingMethod !== null && value0.cookingMethod !== undefined) {
368
+ var value1 = value0.cookingMethod;
369
+ protocol.writeFieldBegin('cookingMethod', thrift_1.Thrift.Type.STRING, 18);
370
+ protocol.writeString(value1);
371
+ protocol.writeFieldEnd();
372
+ }
343
373
  protocol.writeFieldStop();
344
374
  protocol.writeStructEnd();
345
375
  };
package/v1/content.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 { SchemaOrg } from '../schemaorg/schemaOrg';
7
8
  import { AliasPath } from './aliasPath';
8
9
  import { Atoms } from './atoms';
9
10
  import { Blocks } from './blocks';
@@ -17,7 +18,6 @@ import { Debug } from './debug';
17
18
  import { Element } from './element';
18
19
  import { Reference } from './reference';
19
20
  import { Rights } from './rights';
20
- import { SchemaOrg } from './schemaOrg';
21
21
  import { Section } from './section';
22
22
  import { Tag } from './tag';
23
23
  export interface Content {
package/v1/content.js CHANGED
@@ -7,6 +7,7 @@
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
8
  exports.ContentSerde = void 0;
9
9
  var thrift_1 = require("thrift");
10
+ var schemaOrg_1 = require("../schemaorg/schemaOrg");
10
11
  var aliasPath_1 = require("./aliasPath");
11
12
  var atoms_1 = require("./atoms");
12
13
  var blocks_1 = require("./blocks");
@@ -20,7 +21,6 @@ var debug_1 = require("./debug");
20
21
  var element_1 = require("./element");
21
22
  var reference_1 = require("./reference");
22
23
  var rights_1 = require("./rights");
23
- var schemaOrg_1 = require("./schemaOrg");
24
24
  var section_1 = require("./section");
25
25
  var tag_1 = require("./tag");
26
26
  var ContentSerde = /** @class */ (function () {