@okam/directus-next 1.2.10 → 1.2.12

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,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;