@guardian/content-api-models 21.0.0-PREVIEW.db-rt-ebremove-metadata-provided.2024-03-07T1207.cd929deb → 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.db-rt-ebremove-metadata-provided.2024-03-07T1207.cd929deb",
4
+ "version": "21.0.0",
5
5
  "description": "Typescript library built from the content api thrift definitions",
6
6
  "repository": {
7
7
  "type": "git",
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Autogenerated by scrooge-generator-extras
3
+ *
4
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ */
6
+ import { TProtocol } from 'thrift';
7
+ export interface AuthorInfo {
8
+ _at_type: string;
9
+ name: string;
10
+ sameAs?: string[];
11
+ }
12
+ export declare class AuthorInfoSerde {
13
+ static read(protocol: TProtocol): AuthorInfo;
14
+ static write(protocol: TProtocol, value0: AuthorInfo): void;
15
+ }
@@ -0,0 +1,99 @@
1
+ "use strict";
2
+ /**
3
+ * Autogenerated by scrooge-generator-extras
4
+ *
5
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.AuthorInfoSerde = void 0;
9
+ var thrift_1 = require("thrift");
10
+ var AuthorInfoSerde = /** @class */ (function () {
11
+ function AuthorInfoSerde() {
12
+ }
13
+ AuthorInfoSerde.read = function (protocol) {
14
+ var _a;
15
+ protocol.readStructBegin();
16
+ var result = {};
17
+ while (true) {
18
+ var ret = protocol.readFieldBegin();
19
+ var ftype = ret.ftype;
20
+ var fid = ret.fid;
21
+ if (ftype === thrift_1.Thrift.Type.STOP) {
22
+ break;
23
+ }
24
+ switch (fid) {
25
+ case 1:
26
+ if (ftype === thrift_1.Thrift.Type.STRING) {
27
+ var value1 = protocol.readString();
28
+ result._at_type = value1;
29
+ }
30
+ else {
31
+ protocol.skip(ftype);
32
+ }
33
+ break;
34
+ case 2:
35
+ if (ftype === thrift_1.Thrift.Type.STRING) {
36
+ var value1 = protocol.readString();
37
+ result.name = value1;
38
+ }
39
+ else {
40
+ protocol.skip(ftype);
41
+ }
42
+ break;
43
+ case 3:
44
+ if (ftype === thrift_1.Thrift.Type.LIST) {
45
+ var listInfo1 = protocol.readListBegin();
46
+ var listSize1 = (_a = listInfo1.size) !== null && _a !== void 0 ? _a : 0;
47
+ var value1 = [];
48
+ if (listInfo1.etype === thrift_1.Thrift.Type.STRING) {
49
+ for (var i = 0; i < listSize1; i++) {
50
+ var value2 = protocol.readString();
51
+ value1.push(value2);
52
+ }
53
+ }
54
+ protocol.readListEnd();
55
+ result.sameAs = value1;
56
+ }
57
+ else {
58
+ protocol.skip(ftype);
59
+ }
60
+ break;
61
+ default:
62
+ protocol.skip(ftype);
63
+ }
64
+ protocol.readFieldEnd();
65
+ }
66
+ protocol.readStructEnd();
67
+ // @ts-ignore
68
+ return result;
69
+ };
70
+ AuthorInfoSerde.write = function (protocol, value0) {
71
+ protocol.writeStructBegin('AuthorInfo');
72
+ if (value0._at_type !== null && value0._at_type !== undefined) {
73
+ var value1 = value0._at_type;
74
+ protocol.writeFieldBegin('_at_type', thrift_1.Thrift.Type.STRING, 1);
75
+ protocol.writeString(value1);
76
+ protocol.writeFieldEnd();
77
+ }
78
+ if (value0.name !== null && value0.name !== undefined) {
79
+ var value1 = value0.name;
80
+ protocol.writeFieldBegin('name', thrift_1.Thrift.Type.STRING, 2);
81
+ protocol.writeString(value1);
82
+ protocol.writeFieldEnd();
83
+ }
84
+ if (value0.sameAs !== null && value0.sameAs !== undefined) {
85
+ var value1 = value0.sameAs;
86
+ protocol.writeFieldBegin('sameAs', thrift_1.Thrift.Type.LIST, 3);
87
+ protocol.writeListBegin(thrift_1.Thrift.Type.STRING, value1.length);
88
+ value1.forEach(function (value2) {
89
+ protocol.writeString(value2);
90
+ });
91
+ protocol.writeListEnd();
92
+ protocol.writeFieldEnd();
93
+ }
94
+ protocol.writeFieldStop();
95
+ protocol.writeStructEnd();
96
+ };
97
+ return AuthorInfoSerde;
98
+ }());
99
+ exports.AuthorInfoSerde = AuthorInfoSerde;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Autogenerated by scrooge-generator-extras
3
+ *
4
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ */
6
+ import { TProtocol } from 'thrift';
7
+ export interface RecipeStep {
8
+ _at_type: string;
9
+ text: string;
10
+ name?: string;
11
+ url?: string;
12
+ image?: string[];
13
+ }
14
+ export declare class RecipeStepSerde {
15
+ static read(protocol: TProtocol): RecipeStep;
16
+ static write(protocol: TProtocol, value0: RecipeStep): void;
17
+ }
@@ -0,0 +1,129 @@
1
+ "use strict";
2
+ /**
3
+ * Autogenerated by scrooge-generator-extras
4
+ *
5
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.RecipeStepSerde = void 0;
9
+ var thrift_1 = require("thrift");
10
+ var RecipeStepSerde = /** @class */ (function () {
11
+ function RecipeStepSerde() {
12
+ }
13
+ RecipeStepSerde.read = function (protocol) {
14
+ var _a;
15
+ protocol.readStructBegin();
16
+ var result = {};
17
+ while (true) {
18
+ var ret = protocol.readFieldBegin();
19
+ var ftype = ret.ftype;
20
+ var fid = ret.fid;
21
+ if (ftype === thrift_1.Thrift.Type.STOP) {
22
+ break;
23
+ }
24
+ switch (fid) {
25
+ case 1:
26
+ if (ftype === thrift_1.Thrift.Type.STRING) {
27
+ var value1 = protocol.readString();
28
+ result._at_type = value1;
29
+ }
30
+ else {
31
+ protocol.skip(ftype);
32
+ }
33
+ break;
34
+ case 2:
35
+ if (ftype === thrift_1.Thrift.Type.STRING) {
36
+ var value1 = protocol.readString();
37
+ result.text = value1;
38
+ }
39
+ else {
40
+ protocol.skip(ftype);
41
+ }
42
+ break;
43
+ case 3:
44
+ if (ftype === thrift_1.Thrift.Type.STRING) {
45
+ var value1 = protocol.readString();
46
+ result.name = value1;
47
+ }
48
+ else {
49
+ protocol.skip(ftype);
50
+ }
51
+ break;
52
+ case 4:
53
+ if (ftype === thrift_1.Thrift.Type.STRING) {
54
+ var value1 = protocol.readString();
55
+ result.url = value1;
56
+ }
57
+ else {
58
+ protocol.skip(ftype);
59
+ }
60
+ break;
61
+ case 5:
62
+ if (ftype === thrift_1.Thrift.Type.LIST) {
63
+ var listInfo1 = protocol.readListBegin();
64
+ var listSize1 = (_a = listInfo1.size) !== null && _a !== void 0 ? _a : 0;
65
+ var value1 = [];
66
+ if (listInfo1.etype === thrift_1.Thrift.Type.STRING) {
67
+ for (var i = 0; i < listSize1; i++) {
68
+ var value2 = protocol.readString();
69
+ value1.push(value2);
70
+ }
71
+ }
72
+ protocol.readListEnd();
73
+ result.image = value1;
74
+ }
75
+ else {
76
+ protocol.skip(ftype);
77
+ }
78
+ break;
79
+ default:
80
+ protocol.skip(ftype);
81
+ }
82
+ protocol.readFieldEnd();
83
+ }
84
+ protocol.readStructEnd();
85
+ // @ts-ignore
86
+ return result;
87
+ };
88
+ RecipeStepSerde.write = function (protocol, value0) {
89
+ protocol.writeStructBegin('RecipeStep');
90
+ if (value0._at_type !== null && value0._at_type !== undefined) {
91
+ var value1 = value0._at_type;
92
+ protocol.writeFieldBegin('_at_type', thrift_1.Thrift.Type.STRING, 1);
93
+ protocol.writeString(value1);
94
+ protocol.writeFieldEnd();
95
+ }
96
+ if (value0.text !== null && value0.text !== undefined) {
97
+ var value1 = value0.text;
98
+ protocol.writeFieldBegin('text', thrift_1.Thrift.Type.STRING, 2);
99
+ protocol.writeString(value1);
100
+ protocol.writeFieldEnd();
101
+ }
102
+ if (value0.name !== null && value0.name !== undefined) {
103
+ var value1 = value0.name;
104
+ protocol.writeFieldBegin('name', thrift_1.Thrift.Type.STRING, 3);
105
+ protocol.writeString(value1);
106
+ protocol.writeFieldEnd();
107
+ }
108
+ if (value0.url !== null && value0.url !== undefined) {
109
+ var value1 = value0.url;
110
+ protocol.writeFieldBegin('url', thrift_1.Thrift.Type.STRING, 4);
111
+ protocol.writeString(value1);
112
+ protocol.writeFieldEnd();
113
+ }
114
+ if (value0.image !== null && value0.image !== undefined) {
115
+ var value1 = value0.image;
116
+ protocol.writeFieldBegin('image', thrift_1.Thrift.Type.LIST, 5);
117
+ protocol.writeListBegin(thrift_1.Thrift.Type.STRING, value1.length);
118
+ value1.forEach(function (value2) {
119
+ protocol.writeString(value2);
120
+ });
121
+ protocol.writeListEnd();
122
+ protocol.writeFieldEnd();
123
+ }
124
+ protocol.writeFieldStop();
125
+ protocol.writeStructEnd();
126
+ };
127
+ return RecipeStepSerde;
128
+ }());
129
+ exports.RecipeStepSerde = RecipeStepSerde;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Autogenerated by scrooge-generator-extras
3
+ *
4
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ */
6
+ import { TProtocol } from 'thrift';
7
+ import { SchemaRecipe } from './schemaRecipe';
8
+ export interface SchemaOrg {
9
+ recipe?: SchemaRecipe[];
10
+ }
11
+ export declare class SchemaOrgSerde {
12
+ static read(protocol: TProtocol): SchemaOrg;
13
+ static write(protocol: TProtocol, value0: SchemaOrg): void;
14
+ }
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ /**
3
+ * Autogenerated by scrooge-generator-extras
4
+ *
5
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.SchemaOrgSerde = void 0;
9
+ var thrift_1 = require("thrift");
10
+ var schemaRecipe_1 = require("./schemaRecipe");
11
+ var SchemaOrgSerde = /** @class */ (function () {
12
+ function SchemaOrgSerde() {
13
+ }
14
+ SchemaOrgSerde.read = function (protocol) {
15
+ var _a;
16
+ protocol.readStructBegin();
17
+ var result = {};
18
+ while (true) {
19
+ var ret = protocol.readFieldBegin();
20
+ var ftype = ret.ftype;
21
+ var fid = ret.fid;
22
+ if (ftype === thrift_1.Thrift.Type.STOP) {
23
+ break;
24
+ }
25
+ switch (fid) {
26
+ case 1:
27
+ if (ftype === thrift_1.Thrift.Type.LIST) {
28
+ var listInfo1 = protocol.readListBegin();
29
+ var listSize1 = (_a = listInfo1.size) !== null && _a !== void 0 ? _a : 0;
30
+ var value1 = [];
31
+ if (listInfo1.etype === thrift_1.Thrift.Type.STRUCT) {
32
+ for (var i = 0; i < listSize1; i++) {
33
+ var value2 = schemaRecipe_1.SchemaRecipeSerde.read(protocol);
34
+ value1.push(value2);
35
+ }
36
+ }
37
+ protocol.readListEnd();
38
+ result.recipe = value1;
39
+ }
40
+ else {
41
+ protocol.skip(ftype);
42
+ }
43
+ break;
44
+ default:
45
+ protocol.skip(ftype);
46
+ }
47
+ protocol.readFieldEnd();
48
+ }
49
+ protocol.readStructEnd();
50
+ // @ts-ignore
51
+ return result;
52
+ };
53
+ SchemaOrgSerde.write = function (protocol, value0) {
54
+ protocol.writeStructBegin('SchemaOrg');
55
+ if (value0.recipe !== null && value0.recipe !== undefined) {
56
+ var value1 = value0.recipe;
57
+ protocol.writeFieldBegin('recipe', thrift_1.Thrift.Type.LIST, 1);
58
+ protocol.writeListBegin(thrift_1.Thrift.Type.STRUCT, value1.length);
59
+ value1.forEach(function (value2) {
60
+ schemaRecipe_1.SchemaRecipeSerde.write(protocol, value2);
61
+ });
62
+ protocol.writeListEnd();
63
+ protocol.writeFieldEnd();
64
+ }
65
+ protocol.writeFieldStop();
66
+ protocol.writeStructEnd();
67
+ };
68
+ return SchemaOrgSerde;
69
+ }());
70
+ exports.SchemaOrgSerde = SchemaOrgSerde;
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Autogenerated by scrooge-generator-extras
3
+ *
4
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ */
6
+ import { TProtocol } from 'thrift';
7
+ import { AuthorInfo } from './authorInfo';
8
+ import { RecipeStep } from './recipeStep';
9
+ export interface SchemaRecipe {
10
+ _at_context: string;
11
+ _at_type: string;
12
+ name?: string;
13
+ description?: string;
14
+ image?: string;
15
+ datePublished?: string;
16
+ url?: string;
17
+ recipeCategory?: string[];
18
+ recipeCuisine?: string[];
19
+ recipeIngredient?: string[];
20
+ recipeInstructions?: RecipeStep[];
21
+ recipeYield?: string[];
22
+ prepTime?: string;
23
+ cookTime?: string;
24
+ totalTime?: string;
25
+ author?: AuthorInfo;
26
+ suitableForDiet?: string;
27
+ cookingMethod?: string;
28
+ }
29
+ export declare class SchemaRecipeSerde {
30
+ static read(protocol: TProtocol): SchemaRecipe;
31
+ static write(protocol: TProtocol, value0: SchemaRecipe): void;
32
+ }
@@ -0,0 +1,378 @@
1
+ "use strict";
2
+ /**
3
+ * Autogenerated by scrooge-generator-extras
4
+ *
5
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.SchemaRecipeSerde = void 0;
9
+ var thrift_1 = require("thrift");
10
+ var authorInfo_1 = require("./authorInfo");
11
+ var recipeStep_1 = require("./recipeStep");
12
+ var SchemaRecipeSerde = /** @class */ (function () {
13
+ function SchemaRecipeSerde() {
14
+ }
15
+ SchemaRecipeSerde.read = function (protocol) {
16
+ var _a, _b, _c, _d, _e;
17
+ protocol.readStructBegin();
18
+ var result = {};
19
+ while (true) {
20
+ var ret = protocol.readFieldBegin();
21
+ var ftype = ret.ftype;
22
+ var fid = ret.fid;
23
+ if (ftype === thrift_1.Thrift.Type.STOP) {
24
+ break;
25
+ }
26
+ switch (fid) {
27
+ case 1:
28
+ if (ftype === thrift_1.Thrift.Type.STRING) {
29
+ var value1 = protocol.readString();
30
+ result._at_context = value1;
31
+ }
32
+ else {
33
+ protocol.skip(ftype);
34
+ }
35
+ break;
36
+ case 2:
37
+ if (ftype === thrift_1.Thrift.Type.STRING) {
38
+ var value1 = protocol.readString();
39
+ result._at_type = value1;
40
+ }
41
+ else {
42
+ protocol.skip(ftype);
43
+ }
44
+ break;
45
+ case 3:
46
+ if (ftype === thrift_1.Thrift.Type.STRING) {
47
+ var value1 = protocol.readString();
48
+ result.name = value1;
49
+ }
50
+ else {
51
+ protocol.skip(ftype);
52
+ }
53
+ break;
54
+ case 4:
55
+ if (ftype === thrift_1.Thrift.Type.STRING) {
56
+ var value1 = protocol.readString();
57
+ result.description = value1;
58
+ }
59
+ else {
60
+ protocol.skip(ftype);
61
+ }
62
+ break;
63
+ case 5:
64
+ if (ftype === thrift_1.Thrift.Type.STRING) {
65
+ var value1 = protocol.readString();
66
+ result.image = value1;
67
+ }
68
+ else {
69
+ protocol.skip(ftype);
70
+ }
71
+ break;
72
+ case 6:
73
+ if (ftype === thrift_1.Thrift.Type.STRING) {
74
+ var value1 = protocol.readString();
75
+ result.datePublished = value1;
76
+ }
77
+ else {
78
+ protocol.skip(ftype);
79
+ }
80
+ break;
81
+ case 7:
82
+ if (ftype === thrift_1.Thrift.Type.STRING) {
83
+ var value1 = protocol.readString();
84
+ result.url = value1;
85
+ }
86
+ else {
87
+ protocol.skip(ftype);
88
+ }
89
+ break;
90
+ case 8:
91
+ if (ftype === thrift_1.Thrift.Type.LIST) {
92
+ var listInfo1 = protocol.readListBegin();
93
+ var listSize1 = (_a = listInfo1.size) !== null && _a !== void 0 ? _a : 0;
94
+ var value1 = [];
95
+ if (listInfo1.etype === thrift_1.Thrift.Type.STRING) {
96
+ for (var i = 0; i < listSize1; i++) {
97
+ var value2 = protocol.readString();
98
+ value1.push(value2);
99
+ }
100
+ }
101
+ protocol.readListEnd();
102
+ result.recipeCategory = value1;
103
+ }
104
+ else {
105
+ protocol.skip(ftype);
106
+ }
107
+ break;
108
+ case 9:
109
+ if (ftype === thrift_1.Thrift.Type.LIST) {
110
+ var listInfo1 = protocol.readListBegin();
111
+ var listSize1 = (_b = listInfo1.size) !== null && _b !== void 0 ? _b : 0;
112
+ var value1 = [];
113
+ if (listInfo1.etype === thrift_1.Thrift.Type.STRING) {
114
+ for (var i = 0; i < listSize1; i++) {
115
+ var value2 = protocol.readString();
116
+ value1.push(value2);
117
+ }
118
+ }
119
+ protocol.readListEnd();
120
+ result.recipeCuisine = value1;
121
+ }
122
+ else {
123
+ protocol.skip(ftype);
124
+ }
125
+ break;
126
+ case 10:
127
+ if (ftype === thrift_1.Thrift.Type.LIST) {
128
+ var listInfo1 = protocol.readListBegin();
129
+ var listSize1 = (_c = listInfo1.size) !== null && _c !== void 0 ? _c : 0;
130
+ var value1 = [];
131
+ if (listInfo1.etype === thrift_1.Thrift.Type.STRING) {
132
+ for (var i = 0; i < listSize1; i++) {
133
+ var value2 = protocol.readString();
134
+ value1.push(value2);
135
+ }
136
+ }
137
+ protocol.readListEnd();
138
+ result.recipeIngredient = value1;
139
+ }
140
+ else {
141
+ protocol.skip(ftype);
142
+ }
143
+ break;
144
+ case 11:
145
+ if (ftype === thrift_1.Thrift.Type.LIST) {
146
+ var listInfo1 = protocol.readListBegin();
147
+ var listSize1 = (_d = listInfo1.size) !== null && _d !== void 0 ? _d : 0;
148
+ var value1 = [];
149
+ if (listInfo1.etype === thrift_1.Thrift.Type.STRUCT) {
150
+ for (var i = 0; i < listSize1; i++) {
151
+ var value2 = recipeStep_1.RecipeStepSerde.read(protocol);
152
+ value1.push(value2);
153
+ }
154
+ }
155
+ protocol.readListEnd();
156
+ result.recipeInstructions = value1;
157
+ }
158
+ else {
159
+ protocol.skip(ftype);
160
+ }
161
+ break;
162
+ case 12:
163
+ if (ftype === thrift_1.Thrift.Type.LIST) {
164
+ var listInfo1 = protocol.readListBegin();
165
+ var listSize1 = (_e = listInfo1.size) !== null && _e !== void 0 ? _e : 0;
166
+ var value1 = [];
167
+ if (listInfo1.etype === thrift_1.Thrift.Type.STRING) {
168
+ for (var i = 0; i < listSize1; i++) {
169
+ var value2 = protocol.readString();
170
+ value1.push(value2);
171
+ }
172
+ }
173
+ protocol.readListEnd();
174
+ result.recipeYield = value1;
175
+ }
176
+ else {
177
+ protocol.skip(ftype);
178
+ }
179
+ break;
180
+ case 13:
181
+ if (ftype === thrift_1.Thrift.Type.STRING) {
182
+ var value1 = protocol.readString();
183
+ result.prepTime = value1;
184
+ }
185
+ else {
186
+ protocol.skip(ftype);
187
+ }
188
+ break;
189
+ case 14:
190
+ if (ftype === thrift_1.Thrift.Type.STRING) {
191
+ var value1 = protocol.readString();
192
+ result.cookTime = value1;
193
+ }
194
+ else {
195
+ protocol.skip(ftype);
196
+ }
197
+ break;
198
+ case 15:
199
+ if (ftype === thrift_1.Thrift.Type.STRING) {
200
+ var value1 = protocol.readString();
201
+ result.totalTime = value1;
202
+ }
203
+ else {
204
+ protocol.skip(ftype);
205
+ }
206
+ break;
207
+ case 16:
208
+ if (ftype === thrift_1.Thrift.Type.STRUCT) {
209
+ var value1 = authorInfo_1.AuthorInfoSerde.read(protocol);
210
+ result.author = value1;
211
+ }
212
+ else {
213
+ protocol.skip(ftype);
214
+ }
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;
234
+ default:
235
+ protocol.skip(ftype);
236
+ }
237
+ protocol.readFieldEnd();
238
+ }
239
+ protocol.readStructEnd();
240
+ // @ts-ignore
241
+ return result;
242
+ };
243
+ SchemaRecipeSerde.write = function (protocol, value0) {
244
+ protocol.writeStructBegin('SchemaRecipe');
245
+ if (value0._at_context !== null && value0._at_context !== undefined) {
246
+ var value1 = value0._at_context;
247
+ protocol.writeFieldBegin('_at_context', thrift_1.Thrift.Type.STRING, 1);
248
+ protocol.writeString(value1);
249
+ protocol.writeFieldEnd();
250
+ }
251
+ if (value0._at_type !== null && value0._at_type !== undefined) {
252
+ var value1 = value0._at_type;
253
+ protocol.writeFieldBegin('_at_type', thrift_1.Thrift.Type.STRING, 2);
254
+ protocol.writeString(value1);
255
+ protocol.writeFieldEnd();
256
+ }
257
+ if (value0.name !== null && value0.name !== undefined) {
258
+ var value1 = value0.name;
259
+ protocol.writeFieldBegin('name', thrift_1.Thrift.Type.STRING, 3);
260
+ protocol.writeString(value1);
261
+ protocol.writeFieldEnd();
262
+ }
263
+ if (value0.description !== null && value0.description !== undefined) {
264
+ var value1 = value0.description;
265
+ protocol.writeFieldBegin('description', thrift_1.Thrift.Type.STRING, 4);
266
+ protocol.writeString(value1);
267
+ protocol.writeFieldEnd();
268
+ }
269
+ if (value0.image !== null && value0.image !== undefined) {
270
+ var value1 = value0.image;
271
+ protocol.writeFieldBegin('image', thrift_1.Thrift.Type.STRING, 5);
272
+ protocol.writeString(value1);
273
+ protocol.writeFieldEnd();
274
+ }
275
+ if (value0.datePublished !== null && value0.datePublished !== undefined) {
276
+ var value1 = value0.datePublished;
277
+ protocol.writeFieldBegin('datePublished', thrift_1.Thrift.Type.STRING, 6);
278
+ protocol.writeString(value1);
279
+ protocol.writeFieldEnd();
280
+ }
281
+ if (value0.url !== null && value0.url !== undefined) {
282
+ var value1 = value0.url;
283
+ protocol.writeFieldBegin('url', thrift_1.Thrift.Type.STRING, 7);
284
+ protocol.writeString(value1);
285
+ protocol.writeFieldEnd();
286
+ }
287
+ if (value0.recipeCategory !== null && value0.recipeCategory !== undefined) {
288
+ var value1 = value0.recipeCategory;
289
+ protocol.writeFieldBegin('recipeCategory', thrift_1.Thrift.Type.LIST, 8);
290
+ protocol.writeListBegin(thrift_1.Thrift.Type.STRING, value1.length);
291
+ value1.forEach(function (value2) {
292
+ protocol.writeString(value2);
293
+ });
294
+ protocol.writeListEnd();
295
+ protocol.writeFieldEnd();
296
+ }
297
+ if (value0.recipeCuisine !== null && value0.recipeCuisine !== undefined) {
298
+ var value1 = value0.recipeCuisine;
299
+ protocol.writeFieldBegin('recipeCuisine', thrift_1.Thrift.Type.LIST, 9);
300
+ protocol.writeListBegin(thrift_1.Thrift.Type.STRING, value1.length);
301
+ value1.forEach(function (value2) {
302
+ protocol.writeString(value2);
303
+ });
304
+ protocol.writeListEnd();
305
+ protocol.writeFieldEnd();
306
+ }
307
+ if (value0.recipeIngredient !== null && value0.recipeIngredient !== undefined) {
308
+ var value1 = value0.recipeIngredient;
309
+ protocol.writeFieldBegin('recipeIngredient', thrift_1.Thrift.Type.LIST, 10);
310
+ protocol.writeListBegin(thrift_1.Thrift.Type.STRING, value1.length);
311
+ value1.forEach(function (value2) {
312
+ protocol.writeString(value2);
313
+ });
314
+ protocol.writeListEnd();
315
+ protocol.writeFieldEnd();
316
+ }
317
+ if (value0.recipeInstructions !== null && value0.recipeInstructions !== undefined) {
318
+ var value1 = value0.recipeInstructions;
319
+ protocol.writeFieldBegin('recipeInstructions', thrift_1.Thrift.Type.LIST, 11);
320
+ protocol.writeListBegin(thrift_1.Thrift.Type.STRUCT, value1.length);
321
+ value1.forEach(function (value2) {
322
+ recipeStep_1.RecipeStepSerde.write(protocol, value2);
323
+ });
324
+ protocol.writeListEnd();
325
+ protocol.writeFieldEnd();
326
+ }
327
+ if (value0.recipeYield !== null && value0.recipeYield !== undefined) {
328
+ var value1 = value0.recipeYield;
329
+ protocol.writeFieldBegin('recipeYield', thrift_1.Thrift.Type.LIST, 12);
330
+ protocol.writeListBegin(thrift_1.Thrift.Type.STRING, value1.length);
331
+ value1.forEach(function (value2) {
332
+ protocol.writeString(value2);
333
+ });
334
+ protocol.writeListEnd();
335
+ protocol.writeFieldEnd();
336
+ }
337
+ if (value0.prepTime !== null && value0.prepTime !== undefined) {
338
+ var value1 = value0.prepTime;
339
+ protocol.writeFieldBegin('prepTime', thrift_1.Thrift.Type.STRING, 13);
340
+ protocol.writeString(value1);
341
+ protocol.writeFieldEnd();
342
+ }
343
+ if (value0.cookTime !== null && value0.cookTime !== undefined) {
344
+ var value1 = value0.cookTime;
345
+ protocol.writeFieldBegin('cookTime', thrift_1.Thrift.Type.STRING, 14);
346
+ protocol.writeString(value1);
347
+ protocol.writeFieldEnd();
348
+ }
349
+ if (value0.totalTime !== null && value0.totalTime !== undefined) {
350
+ var value1 = value0.totalTime;
351
+ protocol.writeFieldBegin('totalTime', thrift_1.Thrift.Type.STRING, 15);
352
+ protocol.writeString(value1);
353
+ protocol.writeFieldEnd();
354
+ }
355
+ if (value0.author !== null && value0.author !== undefined) {
356
+ var value1 = value0.author;
357
+ protocol.writeFieldBegin('author', thrift_1.Thrift.Type.STRUCT, 16);
358
+ authorInfo_1.AuthorInfoSerde.write(protocol, value1);
359
+ protocol.writeFieldEnd();
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
+ }
373
+ protocol.writeFieldStop();
374
+ protocol.writeStructEnd();
375
+ };
376
+ return SchemaRecipeSerde;
377
+ }());
378
+ exports.SchemaRecipeSerde = SchemaRecipeSerde;
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';
@@ -46,6 +47,7 @@ export interface Content {
46
47
  pillarName?: string;
47
48
  aliasPaths?: AliasPath[];
48
49
  channels?: ContentChannel[];
50
+ schemaOrg?: SchemaOrg;
49
51
  }
50
52
  export declare class ContentSerde {
51
53
  static read(protocol: TProtocol): 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");
@@ -321,6 +322,15 @@ var ContentSerde = /** @class */ (function () {
321
322
  protocol.skip(ftype);
322
323
  }
323
324
  break;
325
+ case 29:
326
+ if (ftype === thrift_1.Thrift.Type.STRUCT) {
327
+ var value1 = schemaOrg_1.SchemaOrgSerde.read(protocol);
328
+ result.schemaOrg = value1;
329
+ }
330
+ else {
331
+ protocol.skip(ftype);
332
+ }
333
+ break;
324
334
  default:
325
335
  protocol.skip(ftype);
326
336
  }
@@ -508,6 +518,12 @@ var ContentSerde = /** @class */ (function () {
508
518
  protocol.writeListEnd();
509
519
  protocol.writeFieldEnd();
510
520
  }
521
+ if (value0.schemaOrg !== null && value0.schemaOrg !== undefined) {
522
+ var value1 = value0.schemaOrg;
523
+ protocol.writeFieldBegin('schemaOrg', thrift_1.Thrift.Type.STRUCT, 29);
524
+ schemaOrg_1.SchemaOrgSerde.write(protocol, value1);
525
+ protocol.writeFieldEnd();
526
+ }
511
527
  protocol.writeFieldStop();
512
528
  protocol.writeStructEnd();
513
529
  };