@guardian/content-api-models 34.0.0-PREVIEW.pm-callout-type.2025-11-14T1725.7389da8b → 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
@@ -1,7 +1,7 @@
1
1
 
2
2
  {
3
3
  "name": "@guardian/content-api-models",
4
- "version": "34.0.0-PREVIEW.pm-callout-type.2025-11-14T1725.7389da8b",
4
+ "version": "35.0.0-PREVIEW.jshstandard-button.2025-12-01T1249.e282112e",
5
5
  "description": "Typescript library built from the content api thrift definitions",
6
6
  "repository": {
7
7
  "type": "git",
@@ -17,7 +17,7 @@
17
17
  "@guardian/content-entity-model": "^3.0.3",
18
18
  "@types/thrift": "^0.10.11",
19
19
  "thrift": "^0.15.0",
20
- "@guardian/content-atom-model": "^7.0.7",
20
+ "@guardian/content-atom-model": "^9.0.0",
21
21
  "@types/node-int64": "^0.4.29",
22
22
  "node-int64": "^0.4.0"
23
23
  }
@@ -4,14 +4,12 @@
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 { CalloutType } from './calloutType';
8
7
  export interface CalloutElementFields {
9
8
  campaignId?: string;
10
9
  isNonCollapsible?: boolean;
11
10
  overridePrompt?: string;
12
11
  overrideTitle?: string;
13
12
  overrideDescription?: string;
14
- calloutType?: CalloutType;
15
13
  }
16
14
  export declare class CalloutElementFieldsSerde {
17
15
  static read(protocol: TProtocol): CalloutElementFields;
@@ -66,15 +66,6 @@ var CalloutElementFieldsSerde = /** @class */ (function () {
66
66
  protocol.skip(ftype);
67
67
  }
68
68
  break;
69
- case 6:
70
- if (ftype === thrift_1.Thrift.Type.I32) {
71
- var value1 = protocol.readI32();
72
- result.calloutType = value1;
73
- }
74
- else {
75
- protocol.skip(ftype);
76
- }
77
- break;
78
69
  default:
79
70
  protocol.skip(ftype);
80
71
  }
@@ -116,12 +107,6 @@ var CalloutElementFieldsSerde = /** @class */ (function () {
116
107
  protocol.writeString(value1);
117
108
  protocol.writeFieldEnd();
118
109
  }
119
- if (value0.calloutType !== null && value0.calloutType !== undefined) {
120
- var value1 = value0.calloutType;
121
- protocol.writeFieldBegin('calloutType', thrift_1.Thrift.Type.I32, 6);
122
- protocol.writeI32(value1);
123
- protocol.writeFieldEnd();
124
- }
125
110
  protocol.writeFieldStop();
126
111
  protocol.writeStructEnd();
127
112
  };
@@ -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;
@@ -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
@@ -4,5 +4,6 @@
4
4
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
5
  */
6
6
  export declare enum LinkType {
7
- PRODUCT_BUTTON = 0
7
+ PRODUCT_BUTTON = 0,
8
+ STANDARD_BUTTON = 1
8
9
  }
package/v1/linkType.js CHANGED
@@ -9,4 +9,5 @@ exports.LinkType = void 0;
9
9
  var LinkType;
10
10
  (function (LinkType) {
11
11
  LinkType[LinkType["PRODUCT_BUTTON"] = 0] = "PRODUCT_BUTTON";
12
+ LinkType[LinkType["STANDARD_BUTTON"] = 1] = "STANDARD_BUTTON";
12
13
  })(LinkType || (exports.LinkType = LinkType = {}));
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
5
  */
6
- export declare enum CalloutType {
7
- COMMUNITY = 0,
8
- REPORTER = 1
6
+ export declare enum VisualHierarchyImportance {
7
+ PRIMARY = 1,
8
+ SECONDARY = 2
9
9
  }
@@ -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 = {}));
package/v1/calloutType.js DELETED
@@ -1,13 +0,0 @@
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.CalloutType = void 0;
9
- var CalloutType;
10
- (function (CalloutType) {
11
- CalloutType[CalloutType["COMMUNITY"] = 0] = "COMMUNITY";
12
- CalloutType[CalloutType["REPORTER"] = 1] = "REPORTER";
13
- })(CalloutType || (exports.CalloutType = CalloutType = {}));