@contentful/field-editor-shared 2.17.1-alpha.0 → 2.17.1-canary.52

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.
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ fetchContentType: function() {
13
+ return fetchContentType;
14
+ },
15
+ useContentType: function() {
16
+ return useContentType;
17
+ },
18
+ useContentTypes: function() {
19
+ return useContentTypes;
20
+ }
21
+ });
22
+ const _react = require("react");
23
+ const _queryClient = require("../queryClient");
24
+ const _queryKeys = require("../queryKeys");
25
+ function useContentType(sdk, contentTypeId, options) {
26
+ const spaceId = sdk.ids.space;
27
+ const environmentId = sdk.ids.environmentAlias ?? sdk.ids.environment;
28
+ return (0, _queryClient.useQuery)((0, _queryKeys.createGetContentTypeKey)(spaceId, environmentId, contentTypeId), ()=>sdk.cma.contentType.get({
29
+ contentTypeId
30
+ }), {
31
+ staleTime: Infinity,
32
+ ...options
33
+ });
34
+ }
35
+ async function fetchContentType(sdk, contentTypeId) {
36
+ return sdk.cma.contentType.get({
37
+ contentTypeId
38
+ });
39
+ }
40
+ function useContentTypes(source) {
41
+ const cma = 'cma' in source ? source.cma : source;
42
+ const navigator = 'navigator' in source ? source.navigator : undefined;
43
+ const queryClient = (0, _queryClient.useQueryClient)();
44
+ const spaceId = 'ids' in source ? source.ids.space : '';
45
+ const environmentId = 'ids' in source ? source.ids.environmentAlias ?? source.ids.environment : '';
46
+ const queryKey = (0, _react.useMemo)(()=>(0, _queryKeys.createGetManyContentTypesKey)(spaceId, environmentId, {
47
+ limit: 1000
48
+ }), [
49
+ spaceId,
50
+ environmentId
51
+ ]);
52
+ const { data: contentTypes = [] } = (0, _queryClient.useQuery)(queryKey, async ()=>{
53
+ const allContentTypes = [];
54
+ const limit = 1000;
55
+ let skip = 0;
56
+ let total = 0;
57
+ do {
58
+ const response = await cma.contentType.getMany({
59
+ query: {
60
+ limit,
61
+ skip
62
+ }
63
+ });
64
+ allContentTypes.push(...response.items);
65
+ total = response.total;
66
+ skip += response.items.length;
67
+ }while (skip < total)
68
+ return allContentTypes;
69
+ }, {
70
+ staleTime: Infinity,
71
+ refetchOnMount: false
72
+ });
73
+ (0, _react.useEffect)(()=>{
74
+ if (!navigator?.onSlideInNavigation) {
75
+ return;
76
+ }
77
+ const unsubscribe = navigator.onSlideInNavigation(({ oldSlideLevel, newSlideLevel })=>{
78
+ if (oldSlideLevel > newSlideLevel) {
79
+ void queryClient.invalidateQueries(queryKey);
80
+ }
81
+ });
82
+ return unsubscribe;
83
+ }, [
84
+ navigator,
85
+ queryClient,
86
+ queryKey
87
+ ]);
88
+ const invalidate = ()=>{
89
+ return queryClient.invalidateQueries(queryKey);
90
+ };
91
+ return {
92
+ contentTypes,
93
+ invalidate
94
+ };
95
+ }
package/dist/cjs/index.js CHANGED
@@ -117,12 +117,14 @@ _export_star(require("./types"), exports);
117
117
  _export_star(require("./hooks/useActiveLocales"), exports);
118
118
  _export_star(require("./hooks/useReleaseStatus"), exports);
119
119
  _export_star(require("./hooks/useLocalePublishStatus"), exports);
120
+ _export_star(require("./hooks/useContentTypes"), exports);
120
121
  _export_star(require("./LocalePublishingEntityStatusBadge"), exports);
121
122
  _export_star(require("./ReleaseEntityStatusBadge"), exports);
122
123
  _export_star(require("./utils/determineReleaseAction"), exports);
123
124
  _export_star(require("./utils/getEntityReleaseStatus"), exports);
124
125
  _export_star(require("./utils/getReleaseStatusBadgeConfig"), exports);
125
126
  const _queryClient = require("./queryClient");
127
+ _export_star(require("./queryKeys"), exports);
126
128
  function _export_star(from, to) {
127
129
  Object.keys(from).forEach(function(k) {
128
130
  if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
@@ -61,16 +61,17 @@ function _interop_require_wildcard(obj, nodeInterop) {
61
61
  }
62
62
  return newObj;
63
63
  }
64
- let QueryClient;
64
+ let RQQueryClient;
65
65
  let useRQ;
66
66
  let useHostQueryClient = ()=>undefined;
67
67
  try {
68
68
  const rq = require('@tanstack/react-query');
69
- QueryClient = rq.QueryClient;
69
+ RQQueryClient = rq.QueryClient;
70
70
  useRQ = rq.useQuery;
71
71
  useHostQueryClient = rq.useQueryClient;
72
72
  } catch {}
73
73
  const clientContext = /*#__PURE__*/ _react.createContext(undefined);
74
+ let sharedQueryClientInstance;
74
75
  function useMaybeHostQueryClient() {
75
76
  try {
76
77
  return useHostQueryClient();
@@ -86,31 +87,44 @@ function useQueryClient() {
86
87
  return client;
87
88
  }
88
89
  if (hostClient) return hostClient;
89
- return new QueryClient({
90
- defaultOptions: {
91
- queries: {
92
- useErrorBoundary: false,
93
- refetchOnWindowFocus: false,
94
- refetchOnReconnect: true,
95
- refetchOnMount: false,
96
- staleTime: Infinity,
97
- retry: false
90
+ if (!RQQueryClient) {
91
+ throw new Error('@tanstack/react-query is required to use QueryClient. Please install it as a dependency: npm install @tanstack/react-query');
92
+ }
93
+ if (!sharedQueryClientInstance) {
94
+ sharedQueryClientInstance = new RQQueryClient({
95
+ defaultOptions: {
96
+ queries: {
97
+ useErrorBoundary: false,
98
+ refetchOnWindowFocus: false,
99
+ refetchOnReconnect: true,
100
+ refetchOnMount: false,
101
+ staleTime: Infinity,
102
+ retry: false
103
+ }
98
104
  }
99
- }
100
- });
105
+ });
106
+ }
107
+ return sharedQueryClientInstance;
101
108
  }, [
102
109
  client,
103
110
  hostClient
104
111
  ]);
105
112
  }
106
113
  function useQuery(queryKey, queryFn, options) {
114
+ if (!useRQ) {
115
+ throw new Error('@tanstack/react-query is required to use useQuery. Please install it as a dependency: npm install @tanstack/react-query');
116
+ }
107
117
  return useRQ(queryKey, queryFn, {
108
118
  ...options,
109
119
  context: clientContext
110
120
  });
111
121
  }
112
- function SharedQueryClientProvider({ children }) {
113
- const client = useQueryClient();
122
+ function SharedQueryClientProvider({ children, client: providedClient }) {
123
+ const internalClient = useQueryClient();
124
+ const client = _react.useMemo(()=>providedClient ?? internalClient, [
125
+ providedClient,
126
+ internalClient
127
+ ]);
114
128
  return /*#__PURE__*/ _react.createElement(clientContext.Provider, {
115
129
  value: client
116
130
  }, children);
@@ -0,0 +1,94 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ createGetAssetKey: function() {
13
+ return createGetAssetKey;
14
+ },
15
+ createGetContentTypeKey: function() {
16
+ return createGetContentTypeKey;
17
+ },
18
+ createGetEntryKey: function() {
19
+ return createGetEntryKey;
20
+ },
21
+ createGetManyContentTypesKey: function() {
22
+ return createGetManyContentTypesKey;
23
+ },
24
+ createGetManyLocalesKey: function() {
25
+ return createGetManyLocalesKey;
26
+ },
27
+ createGetSpaceKey: function() {
28
+ return createGetSpaceKey;
29
+ }
30
+ });
31
+ const createGetEntryKey = (spaceId, environmentId, entryId)=>{
32
+ return [
33
+ 'spaces',
34
+ spaceId,
35
+ 'environments',
36
+ environmentId,
37
+ 'entries',
38
+ 'get',
39
+ entryId
40
+ ];
41
+ };
42
+ const createGetAssetKey = (spaceId, environmentId, assetId)=>{
43
+ return [
44
+ 'spaces',
45
+ spaceId,
46
+ 'environments',
47
+ environmentId,
48
+ 'assets',
49
+ 'get',
50
+ assetId
51
+ ];
52
+ };
53
+ const createGetSpaceKey = (spaceId)=>{
54
+ return [
55
+ 'spaces',
56
+ 'get',
57
+ spaceId
58
+ ];
59
+ };
60
+ const createGetManyLocalesKey = (spaceId, environmentId, params = {})=>{
61
+ return [
62
+ 'spaces',
63
+ spaceId,
64
+ 'environments',
65
+ environmentId,
66
+ 'locales',
67
+ params
68
+ ];
69
+ };
70
+ const createGetContentTypeKey = (spaceId, environmentId, contentTypeId)=>{
71
+ return [
72
+ 'spaces',
73
+ spaceId,
74
+ 'environments',
75
+ environmentId,
76
+ 'content_types',
77
+ 'get',
78
+ contentTypeId
79
+ ];
80
+ };
81
+ const createGetManyContentTypesKey = (spaceId, environmentId, params = {})=>{
82
+ const prefix = [
83
+ 'spaces',
84
+ spaceId,
85
+ 'environments',
86
+ environmentId,
87
+ 'content_types',
88
+ 'getMany'
89
+ ];
90
+ return Object.keys(params).length === 0 ? prefix : [
91
+ ...prefix,
92
+ params
93
+ ];
94
+ };
@@ -0,0 +1,74 @@
1
+ import { useEffect, useMemo } from 'react';
2
+ import { useQuery, useQueryClient } from '../queryClient';
3
+ import { createGetContentTypeKey, createGetManyContentTypesKey } from '../queryKeys';
4
+ export function useContentType(sdk, contentTypeId, options) {
5
+ const spaceId = sdk.ids.space;
6
+ const environmentId = sdk.ids.environmentAlias ?? sdk.ids.environment;
7
+ return useQuery(createGetContentTypeKey(spaceId, environmentId, contentTypeId), ()=>sdk.cma.contentType.get({
8
+ contentTypeId
9
+ }), {
10
+ staleTime: Infinity,
11
+ ...options
12
+ });
13
+ }
14
+ export async function fetchContentType(sdk, contentTypeId) {
15
+ return sdk.cma.contentType.get({
16
+ contentTypeId
17
+ });
18
+ }
19
+ export function useContentTypes(source) {
20
+ const cma = 'cma' in source ? source.cma : source;
21
+ const navigator = 'navigator' in source ? source.navigator : undefined;
22
+ const queryClient = useQueryClient();
23
+ const spaceId = 'ids' in source ? source.ids.space : '';
24
+ const environmentId = 'ids' in source ? source.ids.environmentAlias ?? source.ids.environment : '';
25
+ const queryKey = useMemo(()=>createGetManyContentTypesKey(spaceId, environmentId, {
26
+ limit: 1000
27
+ }), [
28
+ spaceId,
29
+ environmentId
30
+ ]);
31
+ const { data: contentTypes = [] } = useQuery(queryKey, async ()=>{
32
+ const allContentTypes = [];
33
+ const limit = 1000;
34
+ let skip = 0;
35
+ let total = 0;
36
+ do {
37
+ const response = await cma.contentType.getMany({
38
+ query: {
39
+ limit,
40
+ skip
41
+ }
42
+ });
43
+ allContentTypes.push(...response.items);
44
+ total = response.total;
45
+ skip += response.items.length;
46
+ }while (skip < total)
47
+ return allContentTypes;
48
+ }, {
49
+ staleTime: Infinity,
50
+ refetchOnMount: false
51
+ });
52
+ useEffect(()=>{
53
+ if (!navigator?.onSlideInNavigation) {
54
+ return;
55
+ }
56
+ const unsubscribe = navigator.onSlideInNavigation(({ oldSlideLevel, newSlideLevel })=>{
57
+ if (oldSlideLevel > newSlideLevel) {
58
+ void queryClient.invalidateQueries(queryKey);
59
+ }
60
+ });
61
+ return unsubscribe;
62
+ }, [
63
+ navigator,
64
+ queryClient,
65
+ queryKey
66
+ ]);
67
+ const invalidate = ()=>{
68
+ return queryClient.invalidateQueries(queryKey);
69
+ };
70
+ return {
71
+ contentTypes,
72
+ invalidate
73
+ };
74
+ }
package/dist/esm/index.js CHANGED
@@ -12,9 +12,11 @@ export * from './types';
12
12
  export * from './hooks/useActiveLocales';
13
13
  export * from './hooks/useReleaseStatus';
14
14
  export * from './hooks/useLocalePublishStatus';
15
+ export * from './hooks/useContentTypes';
15
16
  export * from './LocalePublishingEntityStatusBadge';
16
17
  export * from './ReleaseEntityStatusBadge';
17
18
  export * from './utils/determineReleaseAction';
18
19
  export * from './utils/getEntityReleaseStatus';
19
20
  export * from './utils/getReleaseStatusBadgeConfig';
20
21
  export { SharedQueryClientProvider, useQueryClient, useQuery } from './queryClient';
22
+ export * from './queryKeys';
@@ -1,14 +1,15 @@
1
1
  import * as React from 'react';
2
- let QueryClient;
2
+ let RQQueryClient;
3
3
  let useRQ;
4
4
  let useHostQueryClient = ()=>undefined;
5
5
  try {
6
6
  const rq = require('@tanstack/react-query');
7
- QueryClient = rq.QueryClient;
7
+ RQQueryClient = rq.QueryClient;
8
8
  useRQ = rq.useQuery;
9
9
  useHostQueryClient = rq.useQueryClient;
10
10
  } catch {}
11
11
  const clientContext = /*#__PURE__*/ React.createContext(undefined);
12
+ let sharedQueryClientInstance;
12
13
  function useMaybeHostQueryClient() {
13
14
  try {
14
15
  return useHostQueryClient();
@@ -24,31 +25,44 @@ export function useQueryClient() {
24
25
  return client;
25
26
  }
26
27
  if (hostClient) return hostClient;
27
- return new QueryClient({
28
- defaultOptions: {
29
- queries: {
30
- useErrorBoundary: false,
31
- refetchOnWindowFocus: false,
32
- refetchOnReconnect: true,
33
- refetchOnMount: false,
34
- staleTime: Infinity,
35
- retry: false
28
+ if (!RQQueryClient) {
29
+ throw new Error('@tanstack/react-query is required to use QueryClient. Please install it as a dependency: npm install @tanstack/react-query');
30
+ }
31
+ if (!sharedQueryClientInstance) {
32
+ sharedQueryClientInstance = new RQQueryClient({
33
+ defaultOptions: {
34
+ queries: {
35
+ useErrorBoundary: false,
36
+ refetchOnWindowFocus: false,
37
+ refetchOnReconnect: true,
38
+ refetchOnMount: false,
39
+ staleTime: Infinity,
40
+ retry: false
41
+ }
36
42
  }
37
- }
38
- });
43
+ });
44
+ }
45
+ return sharedQueryClientInstance;
39
46
  }, [
40
47
  client,
41
48
  hostClient
42
49
  ]);
43
50
  }
44
51
  export function useQuery(queryKey, queryFn, options) {
52
+ if (!useRQ) {
53
+ throw new Error('@tanstack/react-query is required to use useQuery. Please install it as a dependency: npm install @tanstack/react-query');
54
+ }
45
55
  return useRQ(queryKey, queryFn, {
46
56
  ...options,
47
57
  context: clientContext
48
58
  });
49
59
  }
50
- export function SharedQueryClientProvider({ children }) {
51
- const client = useQueryClient();
60
+ export function SharedQueryClientProvider({ children, client: providedClient }) {
61
+ const internalClient = useQueryClient();
62
+ const client = React.useMemo(()=>providedClient ?? internalClient, [
63
+ providedClient,
64
+ internalClient
65
+ ]);
52
66
  return /*#__PURE__*/ React.createElement(clientContext.Provider, {
53
67
  value: client
54
68
  }, children);
@@ -0,0 +1,64 @@
1
+ export const createGetEntryKey = (spaceId, environmentId, entryId)=>{
2
+ return [
3
+ 'spaces',
4
+ spaceId,
5
+ 'environments',
6
+ environmentId,
7
+ 'entries',
8
+ 'get',
9
+ entryId
10
+ ];
11
+ };
12
+ export const createGetAssetKey = (spaceId, environmentId, assetId)=>{
13
+ return [
14
+ 'spaces',
15
+ spaceId,
16
+ 'environments',
17
+ environmentId,
18
+ 'assets',
19
+ 'get',
20
+ assetId
21
+ ];
22
+ };
23
+ export const createGetSpaceKey = (spaceId)=>{
24
+ return [
25
+ 'spaces',
26
+ 'get',
27
+ spaceId
28
+ ];
29
+ };
30
+ export const createGetManyLocalesKey = (spaceId, environmentId, params = {})=>{
31
+ return [
32
+ 'spaces',
33
+ spaceId,
34
+ 'environments',
35
+ environmentId,
36
+ 'locales',
37
+ params
38
+ ];
39
+ };
40
+ export const createGetContentTypeKey = (spaceId, environmentId, contentTypeId)=>{
41
+ return [
42
+ 'spaces',
43
+ spaceId,
44
+ 'environments',
45
+ environmentId,
46
+ 'content_types',
47
+ 'get',
48
+ contentTypeId
49
+ ];
50
+ };
51
+ export const createGetManyContentTypesKey = (spaceId, environmentId, params = {})=>{
52
+ const prefix = [
53
+ 'spaces',
54
+ spaceId,
55
+ 'environments',
56
+ environmentId,
57
+ 'content_types',
58
+ 'getMany'
59
+ ];
60
+ return Object.keys(params).length === 0 ? prefix : [
61
+ ...prefix,
62
+ params
63
+ ];
64
+ };
@@ -0,0 +1,24 @@
1
+ import { ContentType, FieldAppSDK } from '@contentful/app-sdk';
2
+ type SDKWithCMA = Pick<FieldAppSDK, 'cma'>;
3
+ type SDKWithCMAAndNavigator = Pick<FieldAppSDK, 'cma' | 'navigator'>;
4
+ type SDKWithIdsAndCMA = Pick<FieldAppSDK, 'cma' | 'ids'>;
5
+ type CMAClient = SDKWithCMA['cma'];
6
+ /**
7
+ * Hook to fetch a single content type by ID.
8
+ * Uses proper query key for cache sharing with user_interface.
9
+ */
10
+ export declare function useContentType(sdk: Pick<FieldAppSDK, 'cma' | 'ids'>, contentTypeId: string, options?: {
11
+ enabled?: boolean;
12
+ }): import("@tanstack/react-query").UseQueryResult<ContentType, unknown>;
13
+ /**
14
+ * Simple helper to fetch a single content type by ID.
15
+ * For use in async functions or one-off fetches.
16
+ * For repeated fetches with caching, use the useContentType hook instead.
17
+ */
18
+ export declare function fetchContentType(sdk: Pick<FieldAppSDK, 'cma'>, contentTypeId: string): Promise<ContentType>;
19
+ export type UseContentTypesResult = {
20
+ contentTypes: ContentType[];
21
+ invalidate: () => void;
22
+ };
23
+ export declare function useContentTypes(source: SDKWithCMAAndNavigator | SDKWithCMA | SDKWithIdsAndCMA | CMAClient): UseContentTypesResult;
24
+ export {};
@@ -14,9 +14,11 @@ export * from './types';
14
14
  export * from './hooks/useActiveLocales';
15
15
  export * from './hooks/useReleaseStatus';
16
16
  export * from './hooks/useLocalePublishStatus';
17
+ export * from './hooks/useContentTypes';
17
18
  export * from './LocalePublishingEntityStatusBadge';
18
19
  export * from './ReleaseEntityStatusBadge';
19
20
  export * from './utils/determineReleaseAction';
20
21
  export * from './utils/getEntityReleaseStatus';
21
22
  export * from './utils/getReleaseStatusBadgeConfig';
22
23
  export { SharedQueryClientProvider, useQueryClient, useQuery } from './queryClient';
24
+ export * from './queryKeys';
@@ -1,9 +1,14 @@
1
1
  import * as React from 'react';
2
- import type { QueryClient as QC, UseQueryOptions, UseQueryResult, QueryKey, QueryFunction } from '@tanstack/react-query';
3
- export declare function useQueryClient(): QC;
2
+ import type { QueryClient, UseQueryOptions, UseQueryResult, QueryKey, QueryFunction } from '@tanstack/react-query';
3
+ export declare function useQueryClient(): QueryClient;
4
4
  export declare function useQuery<TQueryFnData = unknown, TError = unknown, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(queryKey: TQueryKey, queryFn: QueryFunction<TQueryFnData, TQueryKey>, options?: Omit<UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>, 'queryKey' | 'queryFn'>): UseQueryResult<TData, TError>;
5
5
  /**
6
6
  * Provides access to a query client either by sharing an existing client or
7
7
  * creating a new one.
8
+ *
9
+ * @param client - Optional QueryClient instance. When provided (e.g., in tests),
10
+ * it takes priority over any host client or singleton.
8
11
  */
9
- export declare function SharedQueryClientProvider({ children }: React.PropsWithChildren<{}>): React.JSX.Element;
12
+ export declare function SharedQueryClientProvider({ children, client: providedClient, }: React.PropsWithChildren<{
13
+ client?: QueryClient;
14
+ }>): React.JSX.Element;
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Query key factories for React Query cache management.
3
+ *
4
+ * These factories provide consistent query keys across the application.
5
+ */
6
+ /**
7
+ * Creates a query key for fetching a single entry.
8
+ *
9
+ * @param spaceId - The space ID
10
+ * @param environmentId - The environment ID
11
+ * @param entryId - The entry ID to fetch
12
+ * @returns Query key array for React Query
13
+ */
14
+ export declare const createGetEntryKey: (spaceId: string, environmentId: string, entryId: string) => string[];
15
+ /**
16
+ * Creates a query key for fetching a single asset.
17
+ *
18
+ * @param spaceId - The space ID
19
+ * @param environmentId - The environment ID
20
+ * @param assetId - The asset ID to fetch
21
+ * @returns Query key array for React Query
22
+ */
23
+ export declare const createGetAssetKey: (spaceId: string, environmentId: string, assetId: string) => string[];
24
+ /**
25
+ * Creates a query key for fetching a single space.
26
+ *
27
+ * @param spaceId - The space ID to fetch
28
+ * @returns Query key array for React Query
29
+ */
30
+ export declare const createGetSpaceKey: (spaceId: string) => string[];
31
+ /**
32
+ * Creates a query key for fetching multiple locales.
33
+ *
34
+ * @param spaceId - The space ID
35
+ * @param environmentId - The environment ID
36
+ * @param params - Optional query parameters
37
+ * @returns Query key array for React Query
38
+ */
39
+ export declare const createGetManyLocalesKey: (spaceId: string, environmentId: string, params?: Record<string, unknown>) => (string | Record<string, unknown>)[];
40
+ /**
41
+ * Creates a query key for fetching a single content type.
42
+ *
43
+ * @param spaceId - The space ID
44
+ * @param environmentId - The environment ID
45
+ * @param contentTypeId - The content type ID to fetch
46
+ * @returns Query key array for React Query
47
+ */
48
+ export declare const createGetContentTypeKey: (spaceId: string, environmentId: string, contentTypeId: string) => string[];
49
+ /**
50
+ * Creates a query key for fetching multiple content types.
51
+ *
52
+ * @param spaceId - The space ID
53
+ * @param environmentId - The environment ID
54
+ * @param params - Optional query parameters (e.g., { limit: 1000 })
55
+ * @returns Query key array for React Query
56
+ */
57
+ export declare const createGetManyContentTypesKey: (spaceId: string, environmentId: string, params?: Record<string, unknown>) => (string | Record<string, unknown>)[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/field-editor-shared",
3
- "version": "2.17.1-alpha.0",
3
+ "version": "2.17.1-canary.52+487fa527",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "devDependencies": {
39
39
  "@contentful/app-sdk": "^4.42.0",
40
- "@contentful/field-editor-test-utils": "^1.7.0",
40
+ "@contentful/field-editor-test-utils": "^1.7.1-canary.66+487fa527",
41
41
  "@lingui/core": "5.3.0",
42
42
  "@tanstack/react-query": "^4.3.9",
43
43
  "@testing-library/react": "16.3.0"
@@ -67,5 +67,5 @@
67
67
  "publishConfig": {
68
68
  "registry": "https://npm.pkg.github.com/"
69
69
  },
70
- "gitHead": "447875c5a2ef25eb4552c29b990d90ec40bc6985"
70
+ "gitHead": "487fa527bb8a5afe1cc24547708876ea8e435ef0"
71
71
  }