@guardian/content-api-models 17.7.0 → 17.8.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/auxiliaryatomevent/v1/eventType.js +1 -1
- package/crier/event/v1/eventType.js +1 -1
- package/crier/event/v1/itemType.js +1 -1
- package/fastly/event/v1/eventType.js +1 -1
- package/package.json +11 -12
- package/v1/assetType.js +1 -1
- package/v1/blockElement.d.ts +2 -0
- package/v1/blockElement.js +16 -0
- package/v1/contentType.js +1 -1
- package/v1/crosswordType.js +1 -1
- package/v1/elementType.d.ts +2 -1
- package/v1/elementType.js +2 -1
- package/v1/embedTracksType.js +1 -1
- package/v1/membershipTier.js +1 -1
- package/v1/office.js +1 -1
- package/v1/platformType.js +1 -1
- package/v1/recipeElementFields.d.ts +13 -0
- package/v1/recipeElementFields.js +55 -0
- package/v1/sponsorshipType.js +1 -1
- package/v1/tagType.js +1 -1
|
@@ -11,4 +11,4 @@ var EventType;
|
|
|
11
11
|
EventType[EventType["UPDATE"] = 1] = "UPDATE";
|
|
12
12
|
EventType[EventType["DELETE"] = 2] = "DELETE";
|
|
13
13
|
EventType[EventType["RETRIEVABLEUPDATE"] = 3] = "RETRIEVABLEUPDATE";
|
|
14
|
-
})(EventType
|
|
14
|
+
})(EventType || (exports.EventType = EventType = {}));
|
|
@@ -13,4 +13,4 @@ var ItemType;
|
|
|
13
13
|
ItemType[ItemType["SECTION"] = 3] = "SECTION";
|
|
14
14
|
ItemType[ItemType["STORYPACKAGE"] = 4] = "STORYPACKAGE";
|
|
15
15
|
ItemType[ItemType["ATOM"] = 5] = "ATOM";
|
|
16
|
-
})(ItemType
|
|
16
|
+
})(ItemType || (exports.ItemType = ItemType = {}));
|
package/package.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
2
1
|
{
|
|
3
2
|
"name": "@guardian/content-api-models",
|
|
4
|
-
"version": "
|
|
3
|
+
"version": "v17.8.0",
|
|
5
4
|
"description": "Typescript library built from the content api thrift definitions",
|
|
6
5
|
"repository": {
|
|
7
6
|
"type": "git",
|
|
@@ -10,15 +9,15 @@
|
|
|
10
9
|
"author": "",
|
|
11
10
|
"license": "Apache-2.0",
|
|
12
11
|
"devDependencies": {
|
|
13
|
-
"typescript": "^4.5.4"
|
|
14
|
-
},
|
|
12
|
+
"typescript": "^4.5.4"
|
|
13
|
+
},
|
|
15
14
|
"dependencies": {
|
|
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.2",
|
|
21
|
-
"@types/node-int64": "^0.4.29",
|
|
22
|
-
"node-int64": "^0.4.0"
|
|
15
|
+
"@guardian/story-packages-model": "^2.2.0",
|
|
16
|
+
"@guardian/content-entity-model": "^2.2.1",
|
|
17
|
+
"@types/thrift": "^0.10.11",
|
|
18
|
+
"thrift": "^0.15.0",
|
|
19
|
+
"@guardian/content-atom-model": "^3.4.2",
|
|
20
|
+
"@types/node-int64": "^0.4.29",
|
|
21
|
+
"node-int64": "^0.4.0"
|
|
22
|
+
}
|
|
23
23
|
}
|
|
24
|
-
}
|
package/v1/assetType.js
CHANGED
|
@@ -14,4 +14,4 @@ var AssetType;
|
|
|
14
14
|
AssetType[AssetType["EMBED"] = 3] = "EMBED";
|
|
15
15
|
AssetType[AssetType["TWEET"] = 4] = "TWEET";
|
|
16
16
|
AssetType[AssetType["CARTOON"] = 5] = "CARTOON";
|
|
17
|
-
})(AssetType
|
|
17
|
+
})(AssetType || (exports.AssetType = AssetType = {}));
|
package/v1/blockElement.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ import { InstagramElementFields } from './instagramElementFields';
|
|
|
19
19
|
import { InteractiveElementFields } from './interactiveElementFields';
|
|
20
20
|
import { MembershipElementFields } from './membershipElementFields';
|
|
21
21
|
import { PullquoteElementFields } from './pullquoteElementFields';
|
|
22
|
+
import { RecipeElementFields } from './recipeElementFields';
|
|
22
23
|
import { RichLinkElementFields } from './richLinkElementFields';
|
|
23
24
|
import { StandardElementFields } from './standardElementFields';
|
|
24
25
|
import { TextElementFields } from './textElementFields';
|
|
@@ -51,6 +52,7 @@ export interface BlockElement {
|
|
|
51
52
|
codeTypeData?: CodeElementFields;
|
|
52
53
|
calloutTypeData?: CalloutElementFields;
|
|
53
54
|
cartoonTypeData?: CartoonElementFields;
|
|
55
|
+
recipeTypeData?: RecipeElementFields;
|
|
54
56
|
}
|
|
55
57
|
export declare class BlockElementSerde {
|
|
56
58
|
static read(protocol: TProtocol): BlockElement;
|
package/v1/blockElement.js
CHANGED
|
@@ -21,6 +21,7 @@ var instagramElementFields_1 = require("./instagramElementFields");
|
|
|
21
21
|
var interactiveElementFields_1 = require("./interactiveElementFields");
|
|
22
22
|
var membershipElementFields_1 = require("./membershipElementFields");
|
|
23
23
|
var pullquoteElementFields_1 = require("./pullquoteElementFields");
|
|
24
|
+
var recipeElementFields_1 = require("./recipeElementFields");
|
|
24
25
|
var richLinkElementFields_1 = require("./richLinkElementFields");
|
|
25
26
|
var standardElementFields_1 = require("./standardElementFields");
|
|
26
27
|
var textElementFields_1 = require("./textElementFields");
|
|
@@ -268,6 +269,15 @@ var BlockElementSerde = /** @class */ (function () {
|
|
|
268
269
|
protocol.skip(ftype);
|
|
269
270
|
}
|
|
270
271
|
break;
|
|
272
|
+
case 25:
|
|
273
|
+
if (ftype === thrift_1.Thrift.Type.STRUCT) {
|
|
274
|
+
var value1 = recipeElementFields_1.RecipeElementFieldsSerde.read(protocol);
|
|
275
|
+
result.recipeTypeData = value1;
|
|
276
|
+
}
|
|
277
|
+
else {
|
|
278
|
+
protocol.skip(ftype);
|
|
279
|
+
}
|
|
280
|
+
break;
|
|
271
281
|
default:
|
|
272
282
|
protocol.skip(ftype);
|
|
273
283
|
}
|
|
@@ -427,6 +437,12 @@ var BlockElementSerde = /** @class */ (function () {
|
|
|
427
437
|
cartoonElementFields_1.CartoonElementFieldsSerde.write(protocol, value1);
|
|
428
438
|
protocol.writeFieldEnd();
|
|
429
439
|
}
|
|
440
|
+
if (value0.recipeTypeData !== null && value0.recipeTypeData !== undefined) {
|
|
441
|
+
var value1 = value0.recipeTypeData;
|
|
442
|
+
protocol.writeFieldBegin('recipeTypeData', thrift_1.Thrift.Type.STRUCT, 25);
|
|
443
|
+
recipeElementFields_1.RecipeElementFieldsSerde.write(protocol, value1);
|
|
444
|
+
protocol.writeFieldEnd();
|
|
445
|
+
}
|
|
430
446
|
protocol.writeFieldStop();
|
|
431
447
|
protocol.writeStructEnd();
|
|
432
448
|
};
|
package/v1/contentType.js
CHANGED
|
@@ -16,4 +16,4 @@ var ContentType;
|
|
|
16
16
|
ContentType[ContentType["VIDEO"] = 5] = "VIDEO";
|
|
17
17
|
ContentType[ContentType["CROSSWORD"] = 6] = "CROSSWORD";
|
|
18
18
|
ContentType[ContentType["AUDIO"] = 7] = "AUDIO";
|
|
19
|
-
})(ContentType
|
|
19
|
+
})(ContentType || (exports.ContentType = ContentType = {}));
|
package/v1/crosswordType.js
CHANGED
|
@@ -16,4 +16,4 @@ var CrosswordType;
|
|
|
16
16
|
CrosswordType[CrosswordType["EVERYMAN"] = 5] = "EVERYMAN";
|
|
17
17
|
CrosswordType[CrosswordType["DIAN_QUIPTIC_CROSSWORD"] = 6] = "DIAN_QUIPTIC_CROSSWORD";
|
|
18
18
|
CrosswordType[CrosswordType["WEEKEND"] = 7] = "WEEKEND";
|
|
19
|
-
})(CrosswordType
|
|
19
|
+
})(CrosswordType || (exports.CrosswordType = CrosswordType = {}));
|
package/v1/elementType.d.ts
CHANGED
package/v1/elementType.js
CHANGED
|
@@ -30,4 +30,5 @@ var ElementType;
|
|
|
30
30
|
ElementType[ElementType["VINE"] = 19] = "VINE";
|
|
31
31
|
ElementType[ElementType["CALLOUT"] = 20] = "CALLOUT";
|
|
32
32
|
ElementType[ElementType["CARTOON"] = 21] = "CARTOON";
|
|
33
|
-
|
|
33
|
+
ElementType[ElementType["RECIPE"] = 22] = "RECIPE";
|
|
34
|
+
})(ElementType || (exports.ElementType = ElementType = {}));
|
package/v1/embedTracksType.js
CHANGED
|
@@ -11,4 +11,4 @@ var EmbedTracksType;
|
|
|
11
11
|
EmbedTracksType[EmbedTracksType["UNKNOWN"] = 0] = "UNKNOWN";
|
|
12
12
|
EmbedTracksType[EmbedTracksType["TRACKS"] = 1] = "TRACKS";
|
|
13
13
|
EmbedTracksType[EmbedTracksType["DOES_NOT_TRACK"] = 2] = "DOES_NOT_TRACK";
|
|
14
|
-
})(EmbedTracksType
|
|
14
|
+
})(EmbedTracksType || (exports.EmbedTracksType = EmbedTracksType = {}));
|
package/v1/membershipTier.js
CHANGED
|
@@ -10,4 +10,4 @@ var MembershipTier;
|
|
|
10
10
|
(function (MembershipTier) {
|
|
11
11
|
MembershipTier[MembershipTier["MEMBERS_ONLY"] = 0] = "MEMBERS_ONLY";
|
|
12
12
|
MembershipTier[MembershipTier["PAID_MEMBERS_ONLY"] = 1] = "PAID_MEMBERS_ONLY";
|
|
13
|
-
})(MembershipTier
|
|
13
|
+
})(MembershipTier || (exports.MembershipTier = MembershipTier = {}));
|
package/v1/office.js
CHANGED
package/v1/platformType.js
CHANGED
|
@@ -11,4 +11,4 @@ var PlatformType;
|
|
|
11
11
|
PlatformType[PlatformType["WEB"] = 0] = "WEB";
|
|
12
12
|
PlatformType[PlatformType["AMP"] = 1] = "AMP";
|
|
13
13
|
PlatformType[PlatformType["APPS"] = 2] = "APPS";
|
|
14
|
-
})(PlatformType
|
|
14
|
+
})(PlatformType || (exports.PlatformType = PlatformType = {}));
|
|
@@ -0,0 +1,13 @@
|
|
|
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 RecipeElementFields {
|
|
8
|
+
recipeJson?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare class RecipeElementFieldsSerde {
|
|
11
|
+
static read(protocol: TProtocol): RecipeElementFields;
|
|
12
|
+
static write(protocol: TProtocol, value0: RecipeElementFields): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
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.RecipeElementFieldsSerde = void 0;
|
|
9
|
+
var thrift_1 = require("thrift");
|
|
10
|
+
var RecipeElementFieldsSerde = /** @class */ (function () {
|
|
11
|
+
function RecipeElementFieldsSerde() {
|
|
12
|
+
}
|
|
13
|
+
RecipeElementFieldsSerde.read = function (protocol) {
|
|
14
|
+
protocol.readStructBegin();
|
|
15
|
+
var result = {};
|
|
16
|
+
while (true) {
|
|
17
|
+
var ret = protocol.readFieldBegin();
|
|
18
|
+
var ftype = ret.ftype;
|
|
19
|
+
var fid = ret.fid;
|
|
20
|
+
if (ftype === thrift_1.Thrift.Type.STOP) {
|
|
21
|
+
break;
|
|
22
|
+
}
|
|
23
|
+
switch (fid) {
|
|
24
|
+
case 1:
|
|
25
|
+
if (ftype === thrift_1.Thrift.Type.STRING) {
|
|
26
|
+
var value1 = protocol.readString();
|
|
27
|
+
result.recipeJson = value1;
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
protocol.skip(ftype);
|
|
31
|
+
}
|
|
32
|
+
break;
|
|
33
|
+
default:
|
|
34
|
+
protocol.skip(ftype);
|
|
35
|
+
}
|
|
36
|
+
protocol.readFieldEnd();
|
|
37
|
+
}
|
|
38
|
+
protocol.readStructEnd();
|
|
39
|
+
// @ts-ignore
|
|
40
|
+
return result;
|
|
41
|
+
};
|
|
42
|
+
RecipeElementFieldsSerde.write = function (protocol, value0) {
|
|
43
|
+
protocol.writeStructBegin('RecipeElementFields');
|
|
44
|
+
if (value0.recipeJson !== null && value0.recipeJson !== undefined) {
|
|
45
|
+
var value1 = value0.recipeJson;
|
|
46
|
+
protocol.writeFieldBegin('recipeJson', thrift_1.Thrift.Type.STRING, 1);
|
|
47
|
+
protocol.writeString(value1);
|
|
48
|
+
protocol.writeFieldEnd();
|
|
49
|
+
}
|
|
50
|
+
protocol.writeFieldStop();
|
|
51
|
+
protocol.writeStructEnd();
|
|
52
|
+
};
|
|
53
|
+
return RecipeElementFieldsSerde;
|
|
54
|
+
}());
|
|
55
|
+
exports.RecipeElementFieldsSerde = RecipeElementFieldsSerde;
|
package/v1/sponsorshipType.js
CHANGED
|
@@ -11,4 +11,4 @@ var SponsorshipType;
|
|
|
11
11
|
SponsorshipType[SponsorshipType["SPONSORED"] = 0] = "SPONSORED";
|
|
12
12
|
SponsorshipType[SponsorshipType["FOUNDATION"] = 1] = "FOUNDATION";
|
|
13
13
|
SponsorshipType[SponsorshipType["PAID_CONTENT"] = 2] = "PAID_CONTENT";
|
|
14
|
-
})(SponsorshipType
|
|
14
|
+
})(SponsorshipType || (exports.SponsorshipType = SponsorshipType = {}));
|
package/v1/tagType.js
CHANGED
|
@@ -20,4 +20,4 @@ var TagType;
|
|
|
20
20
|
TagType[TagType["TRACKING"] = 9] = "TRACKING";
|
|
21
21
|
TagType[TagType["PAID_CONTENT"] = 10] = "PAID_CONTENT";
|
|
22
22
|
TagType[TagType["CAMPAIGN"] = 11] = "CAMPAIGN";
|
|
23
|
-
})(TagType
|
|
23
|
+
})(TagType || (exports.TagType = TagType = {}));
|