venue-js 1.7.0 → 1.8.0-next.1
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/data/index.d.mts +2 -4
- package/dist/data/index.d.ts +2 -4
- package/dist/data/index.js +1 -12
- package/dist/data/index.js.map +1 -1
- package/dist/data/index.mjs +1 -12
- package/dist/data/index.mjs.map +1 -1
- package/dist/index.js +1 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -12
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/data/index.d.mts
CHANGED
|
@@ -479,16 +479,14 @@ type SponsoredContentAttributes = {
|
|
|
479
479
|
updatedAt: string;
|
|
480
480
|
publishedAt: string;
|
|
481
481
|
media?: Media;
|
|
482
|
-
locale
|
|
482
|
+
locale?: string;
|
|
483
483
|
};
|
|
484
484
|
type SponsoredContentStrapiV4ApiResponse = {
|
|
485
485
|
id: string;
|
|
486
486
|
attributes: SponsoredContentAttributes;
|
|
487
487
|
};
|
|
488
488
|
/** Parsed for internal use */
|
|
489
|
-
type SponsoredContentFeature = SponsoredContentAttributes
|
|
490
|
-
id: string;
|
|
491
|
-
};
|
|
489
|
+
type SponsoredContentFeature = ImdfFeature<null, SponsoredContentAttributes>;
|
|
492
490
|
type Page = {
|
|
493
491
|
id: Id;
|
|
494
492
|
attributes: Record<string, unknown>;
|
package/dist/data/index.d.ts
CHANGED
|
@@ -479,16 +479,14 @@ type SponsoredContentAttributes = {
|
|
|
479
479
|
updatedAt: string;
|
|
480
480
|
publishedAt: string;
|
|
481
481
|
media?: Media;
|
|
482
|
-
locale
|
|
482
|
+
locale?: string;
|
|
483
483
|
};
|
|
484
484
|
type SponsoredContentStrapiV4ApiResponse = {
|
|
485
485
|
id: string;
|
|
486
486
|
attributes: SponsoredContentAttributes;
|
|
487
487
|
};
|
|
488
488
|
/** Parsed for internal use */
|
|
489
|
-
type SponsoredContentFeature = SponsoredContentAttributes
|
|
490
|
-
id: string;
|
|
491
|
-
};
|
|
489
|
+
type SponsoredContentFeature = ImdfFeature<null, SponsoredContentAttributes>;
|
|
492
490
|
type Page = {
|
|
493
491
|
id: Id;
|
|
494
492
|
attributes: Record<string, unknown>;
|
package/dist/data/index.js
CHANGED
|
@@ -469,18 +469,6 @@ async function fetchDeliveryApi(projectId, apiKey, featureType, baseUrl = DEFAUL
|
|
|
469
469
|
const items = await res.json();
|
|
470
470
|
return items.features;
|
|
471
471
|
}
|
|
472
|
-
case "sponsored-content": {
|
|
473
|
-
const res = await fetch(
|
|
474
|
-
`${baseUrl}/delivery/projects/${projectId}/sponsored-content.json?api-key=${apiKey}`
|
|
475
|
-
);
|
|
476
|
-
if (res.status !== 200) return [];
|
|
477
|
-
const jsonRes = await res.json();
|
|
478
|
-
const items = jsonRes.data;
|
|
479
|
-
return items.map((item) => ({
|
|
480
|
-
id: item.id,
|
|
481
|
-
...item.attributes
|
|
482
|
-
}));
|
|
483
|
-
}
|
|
484
472
|
default: {
|
|
485
473
|
const res = await fetch(
|
|
486
474
|
`${baseUrl}/delivery/projects/${projectId}/imdf/${featureType}.geojson?api-key=${apiKey}`
|
|
@@ -508,6 +496,7 @@ async function fetchPreviewApi(projectId, previewToken, featureType, baseUrl = D
|
|
|
508
496
|
const items = await res.json();
|
|
509
497
|
return items;
|
|
510
498
|
}
|
|
499
|
+
// TODO: Move preview endpoint to /imdf/sponsored-content.geojson
|
|
511
500
|
case "sponsored-content": {
|
|
512
501
|
const res = await fetch(
|
|
513
502
|
`${baseUrl}/preview/projects/${projectId}/sponsored-content.json`,
|