@guardian/content-api-models 34.0.0 → 35.0.0-PREVIEW.jshstandard-button.2025-12-01T1249.e282112e
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
|
@@ -5,10 +5,13 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { TProtocol } from 'thrift';
|
|
7
7
|
import { LinkType } from './linkType';
|
|
8
|
+
import { VisualHierarchyImportance } from './visualHierarchyImportance';
|
|
8
9
|
export interface LinkElementFields {
|
|
9
10
|
label?: string;
|
|
10
11
|
url?: string;
|
|
11
12
|
linkType?: LinkType;
|
|
13
|
+
importance?: VisualHierarchyImportance;
|
|
14
|
+
openTargetInNewWindow?: boolean;
|
|
12
15
|
}
|
|
13
16
|
export declare class LinkElementFieldsSerde {
|
|
14
17
|
static read(protocol: TProtocol): LinkElementFields;
|
package/v1/linkElementFields.js
CHANGED
|
@@ -48,6 +48,24 @@ var LinkElementFieldsSerde = /** @class */ (function () {
|
|
|
48
48
|
protocol.skip(ftype);
|
|
49
49
|
}
|
|
50
50
|
break;
|
|
51
|
+
case 4:
|
|
52
|
+
if (ftype === thrift_1.Thrift.Type.I32) {
|
|
53
|
+
var value1 = protocol.readI32();
|
|
54
|
+
result.importance = value1;
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
protocol.skip(ftype);
|
|
58
|
+
}
|
|
59
|
+
break;
|
|
60
|
+
case 5:
|
|
61
|
+
if (ftype === thrift_1.Thrift.Type.BOOL) {
|
|
62
|
+
var value1 = protocol.readBool();
|
|
63
|
+
result.openTargetInNewWindow = value1;
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
protocol.skip(ftype);
|
|
67
|
+
}
|
|
68
|
+
break;
|
|
51
69
|
default:
|
|
52
70
|
protocol.skip(ftype);
|
|
53
71
|
}
|
|
@@ -77,6 +95,18 @@ var LinkElementFieldsSerde = /** @class */ (function () {
|
|
|
77
95
|
protocol.writeI32(value1);
|
|
78
96
|
protocol.writeFieldEnd();
|
|
79
97
|
}
|
|
98
|
+
if (value0.importance !== null && value0.importance !== undefined) {
|
|
99
|
+
var value1 = value0.importance;
|
|
100
|
+
protocol.writeFieldBegin('importance', thrift_1.Thrift.Type.I32, 4);
|
|
101
|
+
protocol.writeI32(value1);
|
|
102
|
+
protocol.writeFieldEnd();
|
|
103
|
+
}
|
|
104
|
+
if (value0.openTargetInNewWindow !== null && value0.openTargetInNewWindow !== undefined) {
|
|
105
|
+
var value1 = value0.openTargetInNewWindow;
|
|
106
|
+
protocol.writeFieldBegin('openTargetInNewWindow', thrift_1.Thrift.Type.BOOL, 5);
|
|
107
|
+
protocol.writeBool(value1);
|
|
108
|
+
protocol.writeFieldEnd();
|
|
109
|
+
}
|
|
80
110
|
protocol.writeFieldStop();
|
|
81
111
|
protocol.writeStructEnd();
|
|
82
112
|
};
|
package/v1/linkType.d.ts
CHANGED
package/v1/linkType.js
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
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.VisualHierarchyImportance = void 0;
|
|
9
|
+
var VisualHierarchyImportance;
|
|
10
|
+
(function (VisualHierarchyImportance) {
|
|
11
|
+
VisualHierarchyImportance[VisualHierarchyImportance["PRIMARY"] = 1] = "PRIMARY";
|
|
12
|
+
VisualHierarchyImportance[VisualHierarchyImportance["SECONDARY"] = 2] = "SECONDARY";
|
|
13
|
+
})(VisualHierarchyImportance || (exports.VisualHierarchyImportance = VisualHierarchyImportance = {}));
|