@okam/directus-next 1.2.10 → 1.2.11

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,3 +1,27 @@
1
+ ## 1.2.11 (2026-01-14)
2
+
3
+ ### 🚀 Features
4
+
5
+ - ⚠️ React 19 + Next.js 15 upgrade for all @okam/* packages ([#369](https://github.com/OKAMca/stack/pull/369))
6
+
7
+ ### 🩹 Fixes
8
+
9
+ - ⚠️ functions starting with "use" should be reserved to react hooks ([68f1f8f](https://github.com/OKAMca/stack/commit/68f1f8f))
10
+
11
+ ### ⚠️ Breaking Changes
12
+
13
+ - Consumers must now have react and react-dom in their own
14
+
15
+ ### 🧱 Updated Dependencies
16
+
17
+ - Updated stack-ui to 1.44.0
18
+ - Updated next-component to 1.2.4
19
+
20
+ ### ❤️ Thank You
21
+
22
+ - Marie-Maxime Tanguay @marie-maxime
23
+ - Pierre-Olivier Clerson @poclerson
24
+
1
25
  ## 1.2.8 (2025-11-01)
2
26
 
3
27
  ### 🧱 Updated Dependencies
package/index.d.ts CHANGED
@@ -4,5 +4,4 @@ export { logger as DirectusNextLogger } from './logger';
4
4
  export { directusRouteRouter } from './router/router';
5
5
  export { getJsonErrorResponse } from './response';
6
6
  export * from './types';
7
- export type { TPageSettings, TPageSettingsTranslation, TPageSettingsItemQuery, TPageSettingsItemDocument, TUsePageSettingsProps, } from './pageSettings/interface';
8
7
  export type { TFiles } from './files/interface';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@okam/directus-next",
3
3
  "main": "./index.js",
4
- "version": "1.2.10",
4
+ "version": "1.2.11",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {
7
7
  ".": {
@@ -34,8 +34,9 @@
34
34
  "dependencies": {
35
35
  "@okam/core-lib": "1.17.0",
36
36
  "@okam/directus-node": "0.6.2",
37
+ "@okam/stack-ui": "1.44.0",
37
38
  "@okam/logger": "1.1.0",
38
- "@okam/next-component": "1.2.3",
39
+ "@okam/next-component": "1.2.4",
39
40
  "next": "^15.0.0",
40
41
  "radashi": "^12.3.0",
41
42
  "@okam/directus-query": "1.4.2",
@@ -1,5 +1,6 @@
1
1
  import { Variables } from 'graphql-request';
2
- import { TPageSettingsQueryItem, TUsePageSettingsReturn } from './interface';
2
+ import { TPageSettingsQueryItem } from '../types/pageSettings';
3
+ import { TGetPageSettingsReturn } from './interface';
3
4
 
4
- export declare function pageSettingsContext<Item extends TPageSettingsQueryItem>(defaultValue?: TUsePageSettingsReturn<Item>): readonly [() => TUsePageSettingsReturn<Item> | undefined, (value: TUsePageSettingsReturn<Item> | undefined) => void];
5
+ export declare function pageSettingsContext<Item extends TPageSettingsQueryItem>(defaultValue?: TGetPageSettingsReturn<Item>): readonly [() => TGetPageSettingsReturn<Item> | undefined, (value: TGetPageSettingsReturn<Item> | undefined) => void];
5
6
  export declare function pageSettingsVariablesContext(variables?: Variables): readonly [() => object | undefined, (value: object | undefined) => void];
@@ -1,5 +1,6 @@
1
1
  import { Variables } from 'graphql-request';
2
- import { TUsePageSettingsProps, TPageSettingsQueryItem, TUsePageSettingsReturn } from './interface';
2
+ import { TPageSettingsQueryItem } from '../types/pageSettings';
3
+ import { TGetPageSettingsProps, TGetPageSettingsReturn } from './interface';
3
4
 
4
5
  /**
5
6
  * @param props Optional props. Passing new props will trigger a new query if the variables have changed compared to the value of the variables in the cache. Omitting props will return the cached value.
@@ -28,4 +29,8 @@ import { TUsePageSettingsProps, TPageSettingsQueryItem, TUsePageSettingsReturn }
28
29
  * ```
29
30
  * @returns The new queried page settings item or the cached value if the variables have not changed. If the query contains a fragment, the contents of the fragment will be returned.
30
31
  */
31
- export declare function usePageSettings<Item extends TPageSettingsQueryItem, ItemKey extends string = string, QueryVariables extends Variables = Variables>(props?: TUsePageSettingsProps<Item, ItemKey, QueryVariables>, itemKey?: Exclude<ItemKey, '__typename'>): Promise<TUsePageSettingsReturn<Item>>;
32
+ export declare function getPageSettings<Item extends TPageSettingsQueryItem, ItemKey extends string = string, QueryVariables extends Variables = Variables>(props?: TGetPageSettingsProps<Item, ItemKey, QueryVariables>, itemKey?: Exclude<ItemKey, '__typename'>): Promise<TGetPageSettingsReturn<Item>>;
33
+ /**
34
+ * @deprecated Use `getPageSettings` instead
35
+ */
36
+ export declare const usePageSettings: typeof getPageSettings;
@@ -1,3 +1,3 @@
1
1
  export * from './context';
2
- export type { TPageSettings, TPageSettingsTranslation, TPageSettingsItemDocument, TPageSettingsItemQuery, } from './interface';
3
- export * from './usePageSettings';
2
+ export type { TGetPageSettingsConfig, TGetPageSettingsProps, TGetPageSettingsReturn } from './interface';
3
+ export { getPageSettings, usePageSettings } from './getPageSettings';
@@ -1,60 +1,17 @@
1
1
  import { TypedDocumentNode } from '@graphql-typed-document-node/core';
2
+ import { Nullable } from '../../../../stack/stack-ui/src/index.ts';
2
3
  import { Variables } from 'graphql-request';
3
- import { TFiles } from '../files/interface';
4
- import { DirectusRouteConfig } from '../types/directusRouteConfig';
4
+ import { TDirectusRouteConfig } from '../types/directusRouteConfig';
5
+ import { Fragmentize } from '../types/Fragments';
6
+ import { TPageSettings, TPageSettingsItemQuery, TPageSettingsQueryItem } from '../types/pageSettings';
5
7
 
6
- export type Fragmentize<FragmentData, FragmentName extends string = string> = {
7
- ' $fragmentRefs'?: {
8
- [FragmentKey in FragmentName]?: FragmentData | null | undefined;
9
- } | null | undefined;
10
- } | null | undefined;
11
- export type MaybeArray<T> = T | (T | null | undefined)[] | null | undefined;
12
- /**
13
- * Directus page settings translations collection.
14
- */
15
- export type TPageSettingsTranslation = {
16
- slug?: string | null;
17
- title?: string | null;
18
- path?: string | null;
19
- languages_code?: {
20
- code: string;
21
- } | null;
22
- page_settings_id?: TPageSettings | null;
23
- canonical_url?: string | null;
24
- meta_description?: string | null;
25
- no_follow?: boolean | null;
26
- no_index?: boolean | null;
27
- og_image?: TFiles | null;
28
- };
29
- /**
30
- * Directus page settings collection.
31
- */
32
- export type TPageSettings = {
33
- id: string;
34
- belongs_to_collection?: string | null;
35
- belongs_to_key?: string | null;
36
- translations?: Array<TPageSettingsTranslation | null> | null;
37
- route?: {
38
- translations?: Array<{
39
- route?: string | null;
40
- } | null> | null;
41
- } | null;
42
- };
43
- export type TPageSettingsQueryItem = {
44
- page_settings?: TPageSettings | Fragmentize<TPageSettings, 'PageSettingsFragment'> | null | undefined;
45
- } | null | undefined;
46
- export type TPageSettingsItemQuery<Item extends TPageSettingsQueryItem, ItemKey extends string> = {
47
- __typename?: 'Query';
48
- } & {
49
- [Key in ItemKey]?: MaybeArray<Item> | MaybeArray<Fragmentize<Item>>;
50
- };
51
8
  export type TPageSettingsItemDocument<Item extends TPageSettingsQueryItem, ItemKey extends string, QueryVariables extends Variables> = TypedDocumentNode<TPageSettingsItemQuery<Item, ItemKey>, QueryVariables>;
52
- export type TUsePageSettingsConfig = DirectusRouteConfig | Record<string, string>;
9
+ export type TGetPageSettingsConfig = TDirectusRouteConfig | Record<string, string>;
53
10
  /**
54
11
  * If not using a fragment in the item key, all type parameters must be passed. Otherwise, only the `page_settings` field will be in the type definition.
55
12
  * If using a fragment in the item key, the return type will contain the fragment.
56
13
  */
57
- export interface TUsePageSettingsProps<Item extends TPageSettingsQueryItem, ItemKey extends string, QueryVariables extends Variables> {
14
+ export interface TGetPageSettingsProps<Item extends TPageSettingsQueryItem, ItemKey extends string, QueryVariables extends Variables> {
58
15
  document: TPageSettingsItemDocument<Item, ItemKey, QueryVariables>;
59
16
  /**
60
17
  * `variables.locale` is a special value that will get mapped according to the config.
@@ -63,8 +20,8 @@ export interface TUsePageSettingsProps<Item extends TPageSettingsQueryItem, Item
63
20
  /**
64
21
  * Either a directus route config or directly a locale map. Not passing a config while passing a document will result in direct usage of the `locale` variable.
65
22
  */
66
- config?: TUsePageSettingsConfig;
23
+ config?: TGetPageSettingsConfig;
67
24
  }
68
- export type TUsePageSettingsReturn<Item extends TPageSettingsQueryItem> = Omit<Item, 'page_settings'> & {
69
- page_settings?: Exclude<NonNullable<Item>['page_settings'], Fragmentize<TPageSettings, 'PageSettingsFragment'>> | null | undefined;
25
+ export type TGetPageSettingsReturn<Item extends TPageSettingsQueryItem> = Omit<Item, 'page_settings'> & {
26
+ page_settings?: Nullable<Exclude<NonNullable<Item>['page_settings'], Fragmentize<TPageSettings, 'PageSettingsFragment'>>>;
70
27
  };
@@ -1,9 +1,9 @@
1
1
  import { TFetchRedirectsResponse } from '../../../../directus-node/src/edge.ts';
2
- import { DirectusRouteRedirectsModule } from '../../types/directusRouteConfig';
2
+ import { TDirectusRouteRedirectsModule } from '../../types/directusRouteConfig';
3
3
 
4
4
  /**
5
5
  * Gets a response from `options.apiRoute`
6
- * @param {DirectusRouteRedirectsModule} options
6
+ * @param {TDirectusRouteRedirectsModule} options
7
7
  * @returns {Promise<TFetchRedirectsResponse>}
8
8
  */
9
- export declare function getRedirectsRoute({ apiRoute, getApiRouteUrl, getRedirectSecret, }?: DirectusRouteRedirectsModule): Promise<TFetchRedirectsResponse>;
9
+ export declare function getRedirectsRoute({ apiRoute, getApiRouteUrl, getRedirectSecret, }?: TDirectusRouteRedirectsModule): Promise<TFetchRedirectsResponse>;
@@ -1,7 +1,7 @@
1
1
  import { NextRequest, NextResponse } from 'next/server';
2
- import { DirectusRouteRedirectsModule } from '../../types/directusRouteConfig';
2
+ import { TDirectusRouteRedirectsModule } from '../../types/directusRouteConfig';
3
3
 
4
4
  /**
5
5
  * Handles next redirection using directus redirects
6
6
  */
7
- export declare function handleRedirect(request: NextRequest, options?: DirectusRouteRedirectsModule): Promise<NextResponse<unknown> | null>;
7
+ export declare function handleRedirect(request: NextRequest, options?: TDirectusRouteRedirectsModule): Promise<NextResponse<unknown> | null>;
@@ -1,17 +1,17 @@
1
1
  import { NextRequest, NextResponse as NextResponseType } from 'next/server';
2
- import { DirectusRouteConfig } from '../types/directusRouteConfig';
2
+ import { TDirectusRouteConfig } from '../types/directusRouteConfig';
3
3
 
4
4
  /**
5
5
  * Handles incoming middleware requests and rewrites the path to the new format according to fetched page settings.
6
6
  * @param request - The NextRequest object
7
- * @param config - The DirectusRouteConfig object
7
+ * @param config - The TDirectusRouteConfig object
8
8
  * @deprecated Use `directusRouteRouter(request, config)` instead. NextResponse is now directly imported in this file.
9
9
  * @param NextResponse - The NextResponse object
10
10
  * @returns NextResponse
11
11
  *
12
12
  * @example
13
13
  * ```typescript
14
- * export const directusConfig: DirectusRouteConfig = {
14
+ * export const directusConfig: TDirectusRouteConfig = {
15
15
  * localeMap: {
16
16
  * 'fr-CA': 'fr',
17
17
  * 'en-CA': 'en',
@@ -28,7 +28,7 @@ import { DirectusRouteConfig } from '../types/directusRouteConfig';
28
28
  * }
29
29
  * ```
30
30
  */
31
- export declare function directusRouteRouter(request: NextRequest, config: DirectusRouteConfig,
31
+ export declare function directusRouteRouter(request: NextRequest, config: TDirectusRouteConfig,
32
32
  /**
33
33
  * @deprecated Use `directusRouteRouter(request, config)` instead. NextResponse is now directly imported in this file.
34
34
  */
@@ -1,3 +1,3 @@
1
- import { PageSettingsTranslation } from '../../types';
1
+ import { TPageSettingsTranslation } from '../../types';
2
2
 
3
- export declare function fetchPageSettingsTranslation(path: string): Promise<PageSettingsTranslation[] | null>;
3
+ export declare function fetchPageSettingsTranslation(path: string): Promise<TPageSettingsTranslation[] | null>;
@@ -1,4 +1,4 @@
1
- import { DirectusRouteConfig } from '../../types';
1
+ import { TDirectusRouteConfig } from '../../types';
2
2
 
3
3
  /**
4
4
  * Validates if a given string is a valid locale from the directus route configuration.
@@ -6,14 +6,14 @@ import { DirectusRouteConfig } from '../../types';
6
6
  * @param config The Directus route configuration containing the locale map
7
7
  * @returns The validated locale string, or undefined if invalid
8
8
  */
9
- export declare function getValidLocale(maybeLocale: string | null | undefined, config: DirectusRouteConfig): string | undefined;
9
+ export declare function getValidLocale(maybeLocale: string | null | undefined, config: TDirectusRouteConfig): string | undefined;
10
10
  /**
11
11
  * Splits the locale from the pathname and returns the locale and the pathname without the locale.
12
12
  * @param pathname The pathname to split the locale from
13
13
  * @param config The Directus route configuration containing the locale map
14
14
  * @returns The locale and the pathname without the locale
15
15
  */
16
- export declare function splitLocaleFromPathname(pathname: string, config: DirectusRouteConfig): {
16
+ export declare function splitLocaleFromPathname(pathname: string, config: TDirectusRouteConfig): {
17
17
  locale: string;
18
18
  pathname: string;
19
19
  } | {
package/server.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  export { directusRouteRouter } from './router/router';
2
- export type { DirectusRouteConfig } from './types/directusRouteConfig';
2
+ export type { TDirectusRouteConfig } from './types/directusRouteConfig';
3
3
  export * from './pageSettings';
package/server.js CHANGED
@@ -15,20 +15,20 @@ function createServerContext(defaultValue) {
15
15
  return [getValue, setValue];
16
16
  }
17
17
  function pageSettingsContext(defaultValue) {
18
- const [pageSettings, setPageSettings2] = createServerContext(defaultValue);
19
- return [pageSettings, setPageSettings2];
18
+ const [pageSettings, setPageSettings] = createServerContext(defaultValue);
19
+ return [pageSettings, setPageSettings];
20
20
  }
21
21
  function pageSettingsVariablesContext(variables) {
22
22
  const [pageSettingsVariables, setPageSettingsVariables] = createServerContext(variables);
23
23
  return [pageSettingsVariables, setPageSettingsVariables];
24
24
  }
25
- const [getPageSettings, setPageSettings] = pageSettingsContext();
25
+ const [getPageSettingsContext, setPageSettingsContext] = pageSettingsContext();
26
26
  const [getVariables, setVariables] = pageSettingsVariablesContext();
27
- function isDirectusRouteConfig(config) {
27
+ function isTDirectusRouteConfig(config) {
28
28
  return !!config && "localeMap" in config;
29
29
  }
30
30
  function getDirectusVariables(variables, config) {
31
- const localeMap = isDirectusRouteConfig(config) ? config.localeMap : config;
31
+ const localeMap = isTDirectusRouteConfig(config) ? config.localeMap : config;
32
32
  if (!localeMap) {
33
33
  return variables;
34
34
  }
@@ -36,11 +36,11 @@ function getDirectusVariables(variables, config) {
36
36
  const directusLocale = radashi.invert(localeMap)[locale] ?? locale;
37
37
  return { ...variables, locale: directusLocale };
38
38
  }
39
- async function usePageSettings(props, itemKey) {
39
+ async function getPageSettings(props, itemKey) {
40
40
  var _a, _b, _c, _d, _e;
41
41
  const { variables, config } = props ?? {};
42
42
  const directusVariables = getDirectusVariables(variables, config);
43
- const defaultReturn = getPageSettings() ?? {};
43
+ const defaultReturn = getPageSettingsContext();
44
44
  if (!props || radashi.isEqual(getVariables(), directusVariables)) {
45
45
  router.log("Using cached page settings", { path: (_c = (_b = (_a = defaultReturn.page_settings) == null ? void 0 : _a.translations) == null ? void 0 : _b[0]) == null ? void 0 : _c.path });
46
46
  return defaultReturn;
@@ -62,11 +62,13 @@ async function usePageSettings(props, itemKey) {
62
62
  return defaultReturn;
63
63
  }
64
64
  router.log("Caching new page settings", { path: currentPath });
65
- setPageSettings(currentItem);
65
+ setPageSettingsContext(currentItem);
66
66
  setVariables(variables);
67
67
  return currentItem;
68
68
  }
69
+ const usePageSettings = getPageSettings;
69
70
  exports.directusRouteRouter = router.directusRouteRouter;
71
+ exports.getPageSettings = getPageSettings;
70
72
  exports.pageSettingsContext = pageSettingsContext;
71
73
  exports.pageSettingsVariablesContext = pageSettingsVariablesContext;
72
74
  exports.usePageSettings = usePageSettings;
package/server.mjs CHANGED
@@ -14,20 +14,20 @@ function createServerContext(defaultValue) {
14
14
  return [getValue, setValue];
15
15
  }
16
16
  function pageSettingsContext(defaultValue) {
17
- const [pageSettings, setPageSettings2] = createServerContext(defaultValue);
18
- return [pageSettings, setPageSettings2];
17
+ const [pageSettings, setPageSettings] = createServerContext(defaultValue);
18
+ return [pageSettings, setPageSettings];
19
19
  }
20
20
  function pageSettingsVariablesContext(variables) {
21
21
  const [pageSettingsVariables, setPageSettingsVariables] = createServerContext(variables);
22
22
  return [pageSettingsVariables, setPageSettingsVariables];
23
23
  }
24
- const [getPageSettings, setPageSettings] = pageSettingsContext();
24
+ const [getPageSettingsContext, setPageSettingsContext] = pageSettingsContext();
25
25
  const [getVariables, setVariables] = pageSettingsVariablesContext();
26
- function isDirectusRouteConfig(config) {
26
+ function isTDirectusRouteConfig(config) {
27
27
  return !!config && "localeMap" in config;
28
28
  }
29
29
  function getDirectusVariables(variables, config) {
30
- const localeMap = isDirectusRouteConfig(config) ? config.localeMap : config;
30
+ const localeMap = isTDirectusRouteConfig(config) ? config.localeMap : config;
31
31
  if (!localeMap) {
32
32
  return variables;
33
33
  }
@@ -35,11 +35,11 @@ function getDirectusVariables(variables, config) {
35
35
  const directusLocale = invert(localeMap)[locale] ?? locale;
36
36
  return { ...variables, locale: directusLocale };
37
37
  }
38
- async function usePageSettings(props, itemKey) {
38
+ async function getPageSettings(props, itemKey) {
39
39
  var _a, _b, _c, _d, _e;
40
40
  const { variables, config } = props ?? {};
41
41
  const directusVariables = getDirectusVariables(variables, config);
42
- const defaultReturn = getPageSettings() ?? {};
42
+ const defaultReturn = getPageSettingsContext();
43
43
  if (!props || isEqual(getVariables(), directusVariables)) {
44
44
  log("Using cached page settings", { path: (_c = (_b = (_a = defaultReturn.page_settings) == null ? void 0 : _a.translations) == null ? void 0 : _b[0]) == null ? void 0 : _c.path });
45
45
  return defaultReturn;
@@ -61,12 +61,14 @@ async function usePageSettings(props, itemKey) {
61
61
  return defaultReturn;
62
62
  }
63
63
  log("Caching new page settings", { path: currentPath });
64
- setPageSettings(currentItem);
64
+ setPageSettingsContext(currentItem);
65
65
  setVariables(variables);
66
66
  return currentItem;
67
67
  }
68
+ const usePageSettings = getPageSettings;
68
69
  export {
69
70
  d as directusRouteRouter,
71
+ getPageSettings,
70
72
  pageSettingsContext,
71
73
  pageSettingsVariablesContext,
72
74
  usePageSettings
@@ -0,0 +1,5 @@
1
+ export type Fragmentize<FragmentData, FragmentName extends string = string> = {
2
+ ' $fragmentRefs'?: {
3
+ [FragmentKey in FragmentName]?: FragmentData | null | undefined;
4
+ } | null | undefined;
5
+ } | null | undefined;
@@ -1,4 +1,4 @@
1
- export interface DirectusRouteRedirectsModule {
1
+ export interface TDirectusRouteRedirectsModule {
2
2
  /**
3
3
  * @default process.env.NEXT_API_REDIRECT_SECRET
4
4
  */
@@ -12,7 +12,7 @@ export interface DirectusRouteRedirectsModule {
12
12
  */
13
13
  apiRoute?: string;
14
14
  }
15
- export interface DirectusRouteConfig {
15
+ export interface TDirectusRouteConfig {
16
16
  localeMap?: Record<string, string>;
17
17
  collectionSettings: {
18
18
  [collection: string]: {
@@ -24,6 +24,6 @@ export interface DirectusRouteConfig {
24
24
  };
25
25
  };
26
26
  modules?: {
27
- redirects?: DirectusRouteRedirectsModule;
27
+ redirects?: TDirectusRouteRedirectsModule;
28
28
  };
29
29
  }
package/types/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export type { DirectusRouteConfig, DirectusRouteRedirectsModule } from './directusRouteConfig';
2
- export type { PageSettingsTranslation } from './pageSettings';
1
+ export type { TDirectusRouteConfig, TDirectusRouteRedirectsModule } from './directusRouteConfig';
2
+ export type { TPageSettingsTranslation, TPageSettings, TPageSettingsItemQuery, TPageSettingsQueryItem, } from './pageSettings';
@@ -1,13 +1,41 @@
1
- export interface PageSettingsTranslation {
2
- languages_code?: {
3
- code?: string | null | undefined;
4
- } | null | undefined;
1
+ import { Nullable } from '../../../../stack/stack-ui/src/index.ts';
2
+ import { TFiles } from '../files';
3
+ import { Fragmentize } from './Fragments';
4
+
5
+ export interface TPageSettingsTranslation {
6
+ languages_code?: Nullable<{
7
+ code?: Nullable<string>;
8
+ }>;
9
+ page_settings_id?: Nullable<{
10
+ belongs_to_collection?: Nullable<string>;
11
+ belongs_to_key?: Nullable<string>;
12
+ }>;
13
+ title?: Nullable<string>;
14
+ slug?: Nullable<string>;
15
+ path?: Nullable<string>;
16
+ meta_description?: Nullable<string>;
17
+ no_follow?: Nullable<boolean>;
18
+ no_index?: Nullable<boolean>;
19
+ og_image?: Nullable<TFiles>;
20
+ }
21
+ export interface TPageSettings {
5
22
  id: string;
6
- page_settings_id?: {
7
- belongs_to_collection?: string | null | undefined;
8
- belongs_to_key?: string | null | undefined;
9
- } | null | undefined;
10
- title?: string | null | undefined;
11
- slug?: string | null | undefined;
12
- path?: string | null | undefined;
23
+ belongs_to_collection?: Nullable<string>;
24
+ belongs_to_key?: Nullable<string>;
25
+ translations?: DeepNullableArray<TPageSettingsTranslation>;
26
+ route?: Nullable<{
27
+ translations?: DeepNullableArray<{
28
+ route?: Nullable<string>;
29
+ }>;
30
+ }>;
13
31
  }
32
+ export type TPageSettingsQueryItem = Nullable<{
33
+ page_settings?: TPageSettings | Fragmentize<TPageSettings, 'PageSettingsFragment'>;
34
+ }>;
35
+ export type TPageSettingsItemQuery<Item extends TPageSettingsQueryItem, ItemKey extends string> = {
36
+ [Key in ItemKey]?: MaybeArray<Item> | MaybeArray<Fragmentize<Item>>;
37
+ } & {
38
+ __typename?: 'Query';
39
+ };
40
+ export type DeepNullableArray<T> = Nullable<Nullable<T>[]>;
41
+ export type MaybeArray<T> = T | (T | null | undefined)[] | null | undefined;