@se-studio/contentful-rest-api 2.0.2 → 2.0.3
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @se-studio/contentful-rest-api
|
|
2
2
|
|
|
3
|
+
## 2.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 93c764d: Opt-in personType directory URLs in `marketingSiteSitemap` via `enablePersonTypeIndex` and `personTypeIndexSlugs` (converter `href`, same indexed/hidden gate as `generatePersonTypeIndexMetadata`). Independent of `enablePeopleIndex` / `team()`.
|
|
8
|
+
|
|
9
|
+
`contentfulPersonTypeRest` merges caller `next.tags` with personType cache tags so sitemap listing can keep the `sitemap` tag on the fetch.
|
|
10
|
+
|
|
3
11
|
## 2.0.2
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -7,6 +7,9 @@ export type PersonTypeFetchOptions = FetchOptions;
|
|
|
7
7
|
*
|
|
8
8
|
* Page fetches use include 7 so index sections resolve. Listing fetches stay
|
|
9
9
|
* shallow and omit the body. An explicit `options.include` wins.
|
|
10
|
+
*
|
|
11
|
+
* Caller `options.next.tags` are merged with personType cache tags (e.g. sitemap
|
|
12
|
+
* listing may pass `sitemap` so webhook SitemapTag revalidation hits this fetch).
|
|
10
13
|
*/
|
|
11
14
|
export declare function contentfulPersonTypeRest(context: BaseConverterContext, config: ContentfulConfig, slug: string, options: PersonTypeFetchOptions): Promise<CmsResponse<IBasePersonType | null>>;
|
|
12
15
|
//# sourceMappingURL=person-type.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"person-type.d.ts","sourceRoot":"","sources":["../../src/api/person-type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAKlE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAIlE,OAAO,KAAK,EAAY,WAAW,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"person-type.d.ts","sourceRoot":"","sources":["../../src/api/person-type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAKlE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAIlE,OAAO,KAAK,EAAY,WAAW,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAYtF,MAAM,MAAM,sBAAsB,GAAG,YAAY,CAAC;AAKlD;;;;;;;;GAQG;AACH,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,oBAAoB,EAC7B,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,WAAW,CAAC,eAAe,GAAG,IAAI,CAAC,CAAC,CAoF9C"}
|
package/dist/api/person-type.js
CHANGED
|
@@ -4,7 +4,7 @@ import { finalizeModelIconsAndNavigation } from '../navigation/enrichModelNaviga
|
|
|
4
4
|
import { getCacheTags } from '../revalidation/utils.js';
|
|
5
5
|
import { withCmsQueryContext } from '../telemetry/queryContext.js';
|
|
6
6
|
import { withRetry } from '../utils/index.js';
|
|
7
|
-
import { convertAllAssets, convertAllIncludes, convertAllRawAssets, createFullConverterContext, operationLabel, } from './helpers.js';
|
|
7
|
+
import { convertAllAssets, convertAllIncludes, convertAllRawAssets, createFullConverterContext, mergeFetchCacheTags, operationLabel, } from './helpers.js';
|
|
8
8
|
const PERSON_TYPE_PAGE_INCLUDE = 7;
|
|
9
9
|
const PERSON_TYPE_LISTING_INCLUDE = 1;
|
|
10
10
|
/**
|
|
@@ -12,16 +12,16 @@ const PERSON_TYPE_LISTING_INCLUDE = 1;
|
|
|
12
12
|
*
|
|
13
13
|
* Page fetches use include 7 so index sections resolve. Listing fetches stay
|
|
14
14
|
* shallow and omit the body. An explicit `options.include` wins.
|
|
15
|
+
*
|
|
16
|
+
* Caller `options.next.tags` are merged with personType cache tags (e.g. sitemap
|
|
17
|
+
* listing may pass `sitemap` so webhook SitemapTag revalidation hits this fetch).
|
|
15
18
|
*/
|
|
16
19
|
export async function contentfulPersonTypeRest(context, config, slug, options) {
|
|
17
20
|
const client = getContentfulClient(config, options.preview);
|
|
18
21
|
const cacheTags = getCacheTags('personType', slug, options?.preview);
|
|
19
22
|
const requestOptions = {
|
|
20
23
|
...options,
|
|
21
|
-
next:
|
|
22
|
-
...options?.next,
|
|
23
|
-
tags: cacheTags,
|
|
24
|
-
},
|
|
24
|
+
next: mergeFetchCacheTags(options, cacheTags),
|
|
25
25
|
};
|
|
26
26
|
const fetchFn = async () => {
|
|
27
27
|
const fetchProfile = options.fetchProfile ?? 'page';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"person-type.js","sourceRoot":"","sources":["../../src/api/person-type.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D,OAAO,EAAE,+BAA+B,EAAE,MAAM,qCAAqC,CAAC;AACtF,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,0BAA0B,EAC1B,cAAc,GACf,MAAM,WAAW,CAAC;AAKnB,MAAM,wBAAwB,GAAG,CAAC,CAAC;AACnC,MAAM,2BAA2B,GAAG,CAAC,CAAC;AAEtC
|
|
1
|
+
{"version":3,"file":"person-type.js","sourceRoot":"","sources":["../../src/api/person-type.ts"],"names":[],"mappings":"AAGA,OAAO,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