@guardian/content-api-models 32.0.0-PREVIEW.filterproduct-element-temp.2025-10-15T1557.c1c37df6 → 32.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": "32.0.0-PREVIEW.filterproduct-element-temp.2025-10-15T1557.c1c37df6",
4
+ "version": "32.0.0",
5
5
  "description": "Typescript library built from the content api thrift definitions",
6
6
  "repository": {
7
7
  "type": "git",
@@ -60,7 +60,7 @@ export interface BlockElement {
60
60
  listTypeData?: ListElementFields;
61
61
  timelineTypeData?: TimelineElementFields;
62
62
  linkTypeData?: LinkElementFields;
63
- tempProductTypeData?: ProductElementFields;
63
+ productTypeData?: ProductElementFields;
64
64
  }
65
65
  export declare class BlockElementSerde {
66
66
  static read(protocol: TProtocol): BlockElement;
@@ -312,7 +312,7 @@ var BlockElementSerde = /** @class */ (function () {
312
312
  case 29:
313
313
  if (ftype === thrift_1.Thrift.Type.STRUCT) {
314
314
  var value1 = productElementFields_1.ProductElementFieldsSerde.read(protocol);
315
- result.tempProductTypeData = value1;
315
+ result.productTypeData = value1;
316
316
  }
317
317
  else {
318
318
  protocol.skip(ftype);
@@ -501,9 +501,9 @@ var BlockElementSerde = /** @class */ (function () {
501
501
  linkElementFields_1.LinkElementFieldsSerde.write(protocol, value1);
502
502
  protocol.writeFieldEnd();
503
503
  }
504
- if (value0.tempProductTypeData !== null && value0.tempProductTypeData !== undefined) {
505
- var value1 = value0.tempProductTypeData;
506
- protocol.writeFieldBegin('tempProductTypeData', thrift_1.Thrift.Type.STRUCT, 29);
504
+ if (value0.productTypeData !== null && value0.productTypeData !== undefined) {
505
+ var value1 = value0.productTypeData;
506
+ protocol.writeFieldBegin('productTypeData', thrift_1.Thrift.Type.STRUCT, 29);
507
507
  productElementFields_1.ProductElementFieldsSerde.write(protocol, value1);
508
508
  protocol.writeFieldEnd();
509
509
  }
@@ -13,6 +13,10 @@ export interface ProductImage {
13
13
  mediaId?: string;
14
14
  file?: string;
15
15
  suppliersReference?: string;
16
+ imageType?: string;
17
+ height?: number;
18
+ width?: number;
19
+ credit?: string;
16
20
  }
17
21
  export declare class ProductImageSerde {
18
22
  static read(protocol: TProtocol): ProductImage;
@@ -93,6 +93,42 @@ var ProductImageSerde = /** @class */ (function () {
93
93
  protocol.skip(ftype);
94
94
  }
95
95
  break;
96
+ case 9:
97
+ if (ftype === thrift_1.Thrift.Type.STRING) {
98
+ var value1 = protocol.readString();
99
+ result.imageType = value1;
100
+ }
101
+ else {
102
+ protocol.skip(ftype);
103
+ }
104
+ break;
105
+ case 10:
106
+ if (ftype === thrift_1.Thrift.Type.I32) {
107
+ var value1 = protocol.readI32();
108
+ result.height = value1;
109
+ }
110
+ else {
111
+ protocol.skip(ftype);
112
+ }
113
+ break;
114
+ case 11:
115
+ if (ftype === thrift_1.Thrift.Type.I32) {
116
+ var value1 = protocol.readI32();
117
+ result.width = value1;
118
+ }
119
+ else {
120
+ protocol.skip(ftype);
121
+ }
122
+ break;
123
+ case 12:
124
+ if (ftype === thrift_1.Thrift.Type.STRING) {
125
+ var value1 = protocol.readString();
126
+ result.credit = value1;
127
+ }
128
+ else {
129
+ protocol.skip(ftype);
130
+ }
131
+ break;
96
132
  default:
97
133
  protocol.skip(ftype);
98
134
  }
@@ -152,6 +188,30 @@ var ProductImageSerde = /** @class */ (function () {
152
188
  protocol.writeString(value1);
153
189
  protocol.writeFieldEnd();
154
190
  }
191
+ if (value0.imageType !== null && value0.imageType !== undefined) {
192
+ var value1 = value0.imageType;
193
+ protocol.writeFieldBegin('imageType', thrift_1.Thrift.Type.STRING, 9);
194
+ protocol.writeString(value1);
195
+ protocol.writeFieldEnd();
196
+ }
197
+ if (value0.height !== null && value0.height !== undefined) {
198
+ var value1 = value0.height;
199
+ protocol.writeFieldBegin('height', thrift_1.Thrift.Type.I32, 10);
200
+ protocol.writeI32(value1);
201
+ protocol.writeFieldEnd();
202
+ }
203
+ if (value0.width !== null && value0.width !== undefined) {
204
+ var value1 = value0.width;
205
+ protocol.writeFieldBegin('width', thrift_1.Thrift.Type.I32, 11);
206
+ protocol.writeI32(value1);
207
+ protocol.writeFieldEnd();
208
+ }
209
+ if (value0.credit !== null && value0.credit !== undefined) {
210
+ var value1 = value0.credit;
211
+ protocol.writeFieldBegin('credit', thrift_1.Thrift.Type.STRING, 12);
212
+ protocol.writeString(value1);
213
+ protocol.writeFieldEnd();
214
+ }
155
215
  protocol.writeFieldStop();
156
216
  protocol.writeStructEnd();
157
217
  };