brease-client 0.7.0 → 0.8.0

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.
@@ -25,6 +25,7 @@ type Twitter = {
25
25
  };
26
26
  type PageSeo = {
27
27
  title?: string;
28
+ useTitleTemplate?: boolean;
28
29
  description?: string;
29
30
  canonical?: string;
30
31
  robots?: Robots;
@@ -33,12 +34,18 @@ type PageSeo = {
33
34
  structuredData?: Record<string, unknown>[];
34
35
  customCode?: string;
35
36
  };
36
- type SiteSeo = PageSeo & {
37
+ type SiteSeo = {
37
38
  titleTemplate?: string;
38
39
  siteName?: string;
40
+ description?: string;
39
41
  defaultImage?: string;
40
42
  favicon?: string;
43
+ robots?: Robots;
44
+ openGraph?: Pick<OpenGraph, 'type' | 'image'>;
45
+ twitter?: Pick<Twitter, 'card' | 'site' | 'creator'>;
46
+ structuredData?: Record<string, unknown>[];
41
47
  customHead?: string;
48
+ customCode?: string;
42
49
  };
43
50
  type ResolvedSeo = {
44
51
  title: string;
@@ -69,6 +76,20 @@ type Site = {
69
76
  analytics?: {
70
77
  ga4: string;
71
78
  } | null;
79
+ url?: string | null;
80
+ };
81
+ type BreaseImage = {
82
+ assetId: string;
83
+ url: string;
84
+ alt?: string;
85
+ width?: number;
86
+ height?: number;
87
+ };
88
+ type BreaseLink = {
89
+ label?: string;
90
+ href: string;
91
+ pageId?: string;
92
+ target?: '_self' | '_blank';
72
93
  };
73
94
  type Page<T = Record<string, unknown>> = {
74
95
  pageId: string;
@@ -82,7 +103,12 @@ type Page<T = Record<string, unknown>> = {
82
103
  resolvedSeo: ResolvedSeo;
83
104
  alternates: Record<string, string>;
84
105
  };
85
- type PageRef = Pick<Page, 'pageId' | 'locale' | 'slug' | 'url' | 'hidden'>;
106
+ type PageRef = Pick<Page, 'pageId' | 'locale' | 'slug' | 'url' | 'hidden'> & {
107
+ name?: string;
108
+ index?: boolean;
109
+ parentId?: string | null;
110
+ order?: number;
111
+ };
86
112
  type NavigationItem = {
87
113
  id: string;
88
114
  label: string;
@@ -113,4 +139,4 @@ type SitemapEntry = {
113
139
  alternates: Record<string, string>;
114
140
  };
115
141
 
116
- export type { LocaleStrategy as L, Navigation as N, OpenGraph as O, Page as P, ResolvedSeo as R, Site as S, Twitter as T, UrlSettings as U, PageRef as a, Redirect as b, Release as c, SitemapEntry as d, NavigationItem as e, PageSeo as f, Robots as g, SiteSeo as h };
142
+ export type { BreaseImage as B, LocaleStrategy as L, Navigation as N, OpenGraph as O, Page as P, ResolvedSeo as R, Site as S, Twitter as T, UrlSettings as U, Redirect as a, PageRef as b, Release as c, SitemapEntry as d, BreaseLink as e, NavigationItem as f, PageSeo as g, Robots as h, SiteSeo as i };
@@ -25,6 +25,7 @@ type Twitter = {
25
25
  };
26
26
  type PageSeo = {
27
27
  title?: string;
28
+ useTitleTemplate?: boolean;
28
29
  description?: string;
29
30
  canonical?: string;
30
31
  robots?: Robots;
@@ -33,12 +34,18 @@ type PageSeo = {
33
34
  structuredData?: Record<string, unknown>[];
34
35
  customCode?: string;
35
36
  };
36
- type SiteSeo = PageSeo & {
37
+ type SiteSeo = {
37
38
  titleTemplate?: string;
38
39
  siteName?: string;
40
+ description?: string;
39
41
  defaultImage?: string;
40
42
  favicon?: string;
43
+ robots?: Robots;
44
+ openGraph?: Pick<OpenGraph, 'type' | 'image'>;
45
+ twitter?: Pick<Twitter, 'card' | 'site' | 'creator'>;
46
+ structuredData?: Record<string, unknown>[];
41
47
  customHead?: string;
48
+ customCode?: string;
42
49
  };
43
50
  type ResolvedSeo = {
44
51
  title: string;
@@ -69,6 +76,20 @@ type Site = {
69
76
  analytics?: {
70
77
  ga4: string;
71
78
  } | null;
79
+ url?: string | null;
80
+ };
81
+ type BreaseImage = {
82
+ assetId: string;
83
+ url: string;
84
+ alt?: string;
85
+ width?: number;
86
+ height?: number;
87
+ };
88
+ type BreaseLink = {
89
+ label?: string;
90
+ href: string;
91
+ pageId?: string;
92
+ target?: '_self' | '_blank';
72
93
  };
73
94
  type Page<T = Record<string, unknown>> = {
74
95
  pageId: string;
@@ -82,7 +103,12 @@ type Page<T = Record<string, unknown>> = {
82
103
  resolvedSeo: ResolvedSeo;
83
104
  alternates: Record<string, string>;
84
105
  };
85
- type PageRef = Pick<Page, 'pageId' | 'locale' | 'slug' | 'url' | 'hidden'>;
106
+ type PageRef = Pick<Page, 'pageId' | 'locale' | 'slug' | 'url' | 'hidden'> & {
107
+ name?: string;
108
+ index?: boolean;
109
+ parentId?: string | null;
110
+ order?: number;
111
+ };
86
112
  type NavigationItem = {
87
113
  id: string;
88
114
  label: string;
@@ -113,4 +139,4 @@ type SitemapEntry = {
113
139
  alternates: Record<string, string>;
114
140
  };
115
141
 
116
- export type { LocaleStrategy as L, Navigation as N, OpenGraph as O, Page as P, ResolvedSeo as R, Site as S, Twitter as T, UrlSettings as U, PageRef as a, Redirect as b, Release as c, SitemapEntry as d, NavigationItem as e, PageSeo as f, Robots as g, SiteSeo as h };
142
+ export type { BreaseImage as B, LocaleStrategy as L, Navigation as N, OpenGraph as O, Page as P, ResolvedSeo as R, Site as S, Twitter as T, UrlSettings as U, Redirect as a, PageRef as b, Release as c, SitemapEntry as d, BreaseLink as e, NavigationItem as f, PageSeo as g, Robots as h, SiteSeo as i };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brease-client",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "Brease delivery API client for Next.js, Astro and any fetch-capable runtime",
5
5
  "license": "MIT",
6
6
  "repository": {