@se-studio/contentful-rest-api 1.0.40 → 1.0.41

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/dist/index.d.ts CHANGED
@@ -233,8 +233,12 @@ interface BaseExternalComponentFields {
233
233
  externalComponentType: EntryFieldTypes.Symbol<string>;
234
234
  heading?: EntryFieldTypes.Symbol;
235
235
  data: EntryFieldTypes.Object;
236
+ html: EntryFieldTypes.Text;
236
237
  backgroundColour?: EntryFieldTypes.Symbol<string>;
237
238
  textColour?: EntryFieldTypes.Symbol<string>;
239
+ backgroundVisual?: EntryFieldTypes.AssetLink;
240
+ mobileBackgroundVisual?: EntryFieldTypes.AssetLink;
241
+ backgroundOverlayOpacity?: EntryFieldTypes.Number;
238
242
  }
239
243
  type BaseExternalComponentSkeleton = EntrySkeletonType<BaseExternalComponentFields, 'externalComponent'>;
240
244
 
package/dist/index.js CHANGED
@@ -2295,9 +2295,18 @@ function baseCustomTypeLinkConverter(context, entry) {
2295
2295
  }
2296
2296
 
2297
2297
  // src/converters/externalComponent.ts
2298
- function baseExternalComponentConverter(_context, entry) {
2298
+ function baseExternalComponentConverter(context, entry) {
2299
2299
  const { sys, fields } = entry;
2300
- const { cmsLabel, ...simpleFields } = fields;
2300
+ const {
2301
+ cmsLabel,
2302
+ backgroundVisual: bgVisual,
2303
+ mobileBackgroundVisual: mobileBgVisual,
2304
+ ...simpleFields
2305
+ } = fields;
2306
+ const backgroundVisual = createResponsiveVisual(
2307
+ lookupAsset(context, bgVisual),
2308
+ lookupAsset(context, mobileBgVisual)
2309
+ );
2301
2310
  const externalComponent = {
2302
2311
  type: "External component",
2303
2312
  id: sys.id,
@@ -2305,8 +2314,7 @@ function baseExternalComponentConverter(_context, entry) {
2305
2314
  cmsLabel,
2306
2315
  ...DEFAULT_POSITION_FIELDS,
2307
2316
  ...simpleFields,
2308
- backgroundOverlayOpacity: null,
2309
- backgroundVisual: void 0
2317
+ backgroundVisual
2310
2318
  };
2311
2319
  return externalComponent;
2312
2320
  }