@evenicanpm/cms 2.2.2 → 2.3.1
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/package.json +6 -4
- package/src/content/blogs/index.ts +29 -18
- package/src/content/blogs/types.ts +15 -2
- package/src/content/footer/index.ts +32 -0
- package/src/content/footer/types.ts +50 -0
- package/src/content/header/index.ts +26 -0
- package/src/content/header/types.ts +19 -0
- package/src/content/navigation/index.ts +2 -1
- package/src/content/pages/index.ts +37 -7
- package/src/content/pages/types.ts +24 -5
- package/src/index.ts +4 -0
- package/tsconfig.json +2 -4
- package/dist/client.d.ts +0 -3
- package/dist/content/blogs/index.d.ts +0 -13
- package/dist/content/blogs/types.d.ts +0 -22
- package/dist/content/navigation/index.d.ts +0 -8
- package/dist/content/navigation/types.d.ts +0 -45
- package/dist/content/pages/index.d.ts +0 -5
- package/dist/content/pages/types.d.ts +0 -32
- package/dist/index.d.ts +0 -25
- package/dist/media/get-image-url.d.ts +0 -7
- package/dist/media/index.d.ts +0 -1
- package/dist/session/index.d.ts +0 -2
package/package.json
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evenicanpm/cms",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.1",
|
|
4
4
|
"description": "Strapi 5 client and queries for e4 Headless.",
|
|
5
5
|
"author": "Evenica",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"license": "ISC",
|
|
8
8
|
"exports": "./src/index.ts",
|
|
9
|
-
"types": "./
|
|
9
|
+
"types": "./src/index.ts",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
12
12
|
},
|
|
13
|
-
"dependencies": {
|
|
13
|
+
"dependencies": {},
|
|
14
|
+
"peerDependencies": {
|
|
15
|
+
"@strapi/blocks-react-renderer": "^1.0.1",
|
|
14
16
|
"strapi-sdk-js": "^3.0.0"
|
|
15
17
|
},
|
|
16
18
|
"devDependencies": {
|
|
17
19
|
"@types/node": "^24.0.13"
|
|
18
20
|
},
|
|
19
|
-
"gitHead": "
|
|
21
|
+
"gitHead": "7a5a6a8c3c3dd9efe96fbbb884b21e7681d32550"
|
|
20
22
|
}
|
|
@@ -1,31 +1,42 @@
|
|
|
1
|
+
import type { StrapiResponse } from "strapi-sdk-js";
|
|
1
2
|
import { strapi } from "../../client";
|
|
2
3
|
import type { Blog } from "./types";
|
|
3
4
|
|
|
4
|
-
|
|
5
|
-
locale
|
|
6
|
-
};
|
|
5
|
+
const getLocaleOption = (options: { locale?: string }) =>
|
|
6
|
+
options.locale ? { locale: options.locale } : {};
|
|
7
7
|
|
|
8
8
|
// Queries
|
|
9
9
|
const getBlogs = async (options: {
|
|
10
10
|
pagination: { pageSize: number; page: number };
|
|
11
11
|
locale?: string;
|
|
12
|
-
}) => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
}): Promise<StrapiResponse<Blog[]>> => {
|
|
13
|
+
try {
|
|
14
|
+
return await strapi.find<Blog>("blogs", {
|
|
15
|
+
pagination: { ...options.pagination, withCount: true },
|
|
16
|
+
populate: "*",
|
|
17
|
+
...getLocaleOption(options),
|
|
18
|
+
} as Parameters<typeof strapi.find>[1]);
|
|
19
|
+
} catch (error) {
|
|
20
|
+
console.error("error fetching strapi blogs data", error);
|
|
21
|
+
return { data: [] as Blog[], meta: {} } as unknown as StrapiResponse<
|
|
22
|
+
Blog[]
|
|
23
|
+
>;
|
|
24
|
+
}
|
|
18
25
|
};
|
|
19
26
|
|
|
20
|
-
const getBlog = async (options: {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
27
|
+
const getBlog = async (options: {
|
|
28
|
+
id: string;
|
|
29
|
+
locale?: string;
|
|
30
|
+
}): Promise<StrapiResponse<Blog>> => {
|
|
31
|
+
try {
|
|
32
|
+
return await strapi.findOne<Blog>("blogs", options.id, {
|
|
33
|
+
populate: "*",
|
|
34
|
+
...getLocaleOption(options),
|
|
35
|
+
} as Parameters<typeof strapi.findOne>[2]);
|
|
36
|
+
} catch (error) {
|
|
37
|
+
console.error("error fetching strapi blog data", error);
|
|
38
|
+
return { data: null, meta: {} } as unknown as StrapiResponse<Blog>;
|
|
39
|
+
}
|
|
25
40
|
};
|
|
26
41
|
|
|
27
42
|
export { getBlog, getBlogs };
|
|
28
|
-
|
|
29
|
-
const getLocaleOption = (options: BlogOptions) => {
|
|
30
|
-
return options.locale ? { locale: options.locale } : {};
|
|
31
|
-
};
|
|
@@ -5,10 +5,23 @@
|
|
|
5
5
|
* TODO: Auto-generated interfaces from Strapi
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
export interface BlogImage {
|
|
9
|
+
id: number;
|
|
10
|
+
url: string;
|
|
11
|
+
alternativeText: string | null;
|
|
12
|
+
caption: string | null;
|
|
13
|
+
formats: {
|
|
14
|
+
large?: { url: string };
|
|
15
|
+
medium?: { url: string };
|
|
16
|
+
small?: { url: string };
|
|
17
|
+
thumbnail?: { url: string };
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
|
|
8
21
|
export interface Blog {
|
|
9
22
|
title: string;
|
|
10
|
-
content: unknown;
|
|
11
|
-
image:
|
|
23
|
+
content: unknown[];
|
|
24
|
+
image: BlogImage | null;
|
|
12
25
|
author?: string;
|
|
13
26
|
documentId: string;
|
|
14
27
|
id: number;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { strapi } from "../../client";
|
|
2
|
+
import type { Footer } from "./types";
|
|
3
|
+
|
|
4
|
+
const getFooter = async (options?: { locale?: string }) => {
|
|
5
|
+
const { locale } = options ?? {};
|
|
6
|
+
|
|
7
|
+
try {
|
|
8
|
+
return await strapi.find<Footer>("footer", {
|
|
9
|
+
populate: {
|
|
10
|
+
sections: {
|
|
11
|
+
on: {
|
|
12
|
+
"footer.logo": {
|
|
13
|
+
populate: { logoImage: true },
|
|
14
|
+
},
|
|
15
|
+
"footer.links": {
|
|
16
|
+
populate: { links: true },
|
|
17
|
+
},
|
|
18
|
+
"footer.contact": {
|
|
19
|
+
populate: { social: true },
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
...(locale ? { locale } : {}),
|
|
25
|
+
} as Parameters<typeof strapi.find>[1]);
|
|
26
|
+
} catch (error) {
|
|
27
|
+
console.warn("footer unavailable from Strapi, falling back to null", error);
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export { getFooter };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interface is not auto-generated and needs to be updated
|
|
3
|
+
* whenever Strapi Content-Type is modified.
|
|
4
|
+
*
|
|
5
|
+
* TODO: Auto-generated interfaces from Strapi
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export interface FooterLink {
|
|
9
|
+
slug: string;
|
|
10
|
+
title: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface FooterSocialLink {
|
|
14
|
+
name: string;
|
|
15
|
+
link: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
interface FooterLogoBlock {
|
|
19
|
+
id: number;
|
|
20
|
+
__component: "footer.logo";
|
|
21
|
+
logoImage?: { url: string; alternativeText?: string };
|
|
22
|
+
description: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface FooterLinksBlock {
|
|
26
|
+
id: number;
|
|
27
|
+
__component: "footer.links";
|
|
28
|
+
title: string;
|
|
29
|
+
links: FooterLink[];
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
interface FooterContactBlock {
|
|
33
|
+
id: number;
|
|
34
|
+
__component: "footer.contact";
|
|
35
|
+
address?: string;
|
|
36
|
+
email?: string;
|
|
37
|
+
phoneNumber?: string;
|
|
38
|
+
social: FooterSocialLink[];
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export type FooterBlock =
|
|
42
|
+
| FooterLogoBlock
|
|
43
|
+
| FooterLinksBlock
|
|
44
|
+
| FooterContactBlock;
|
|
45
|
+
|
|
46
|
+
export interface Footer {
|
|
47
|
+
id: number;
|
|
48
|
+
documentId: string;
|
|
49
|
+
sections: FooterBlock[];
|
|
50
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { strapi } from "../../client";
|
|
2
|
+
import type { HeaderConfig } from "./types";
|
|
3
|
+
|
|
4
|
+
type HeaderApiResponse = {
|
|
5
|
+
data?: (HeaderConfig & { attributes?: HeaderConfig }) | null;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export async function getHeader(): Promise<HeaderConfig | null> {
|
|
9
|
+
try {
|
|
10
|
+
const params = {
|
|
11
|
+
populate: "announcementBanner",
|
|
12
|
+
};
|
|
13
|
+
const res = await strapi.request<HeaderApiResponse>("get", "/header", {
|
|
14
|
+
params,
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
const payload = res?.data;
|
|
18
|
+
if (!payload) return null;
|
|
19
|
+
|
|
20
|
+
const config = payload.attributes ?? payload;
|
|
21
|
+
return config as HeaderConfig;
|
|
22
|
+
} catch (error) {
|
|
23
|
+
console.warn("header unavailable from Strapi, falling back to null", error);
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface AnnouncementBanner {
|
|
2
|
+
enabled: boolean;
|
|
3
|
+
text?: string;
|
|
4
|
+
backgroundColor?: string;
|
|
5
|
+
textColor?: string;
|
|
6
|
+
link?: string;
|
|
7
|
+
linkText?: string;
|
|
8
|
+
dismissible?: boolean;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface HeaderConfig {
|
|
12
|
+
showSearch: boolean;
|
|
13
|
+
showCart: boolean;
|
|
14
|
+
showUserMenu: boolean;
|
|
15
|
+
showWishlist: boolean;
|
|
16
|
+
showLocaleSwitcher: boolean;
|
|
17
|
+
showLogo: boolean;
|
|
18
|
+
announcementBanner?: AnnouncementBanner;
|
|
19
|
+
}
|
|
@@ -1,14 +1,44 @@
|
|
|
1
1
|
import { strapi } from "../../client";
|
|
2
2
|
import type { Page } from "./types";
|
|
3
3
|
|
|
4
|
-
const getPage = async (options: {
|
|
5
|
-
|
|
4
|
+
const getPage = async (options: {
|
|
5
|
+
slug: string;
|
|
6
|
+
status?: "draft" | "published";
|
|
7
|
+
locale?: string;
|
|
8
|
+
}) => {
|
|
9
|
+
const { slug, status, locale } = options;
|
|
6
10
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
try {
|
|
12
|
+
return await strapi.find<Page>("pages", {
|
|
13
|
+
filters: { slug },
|
|
14
|
+
populate: {
|
|
15
|
+
seo: true,
|
|
16
|
+
block: {
|
|
17
|
+
on: {
|
|
18
|
+
"blocks.hero-image": {
|
|
19
|
+
populate: { image: true },
|
|
20
|
+
},
|
|
21
|
+
"blocks.rich-text": true,
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
headerOverride: {
|
|
25
|
+
populate: "*",
|
|
26
|
+
},
|
|
27
|
+
footerOverride: {
|
|
28
|
+
populate: {
|
|
29
|
+
sections: {
|
|
30
|
+
populate: "*",
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
...((status ? { status } : {}) as object),
|
|
36
|
+
...(locale ? { locale } : {}),
|
|
37
|
+
} as Parameters<typeof strapi.find>[1]);
|
|
38
|
+
} catch (error) {
|
|
39
|
+
console.warn("error fetching strapi page data", error);
|
|
40
|
+
return { data: [] as Page[], meta: {} };
|
|
41
|
+
}
|
|
12
42
|
};
|
|
13
43
|
|
|
14
44
|
export { getPage };
|
|
@@ -5,14 +5,34 @@
|
|
|
5
5
|
* TODO: Auto-generated interfaces from Strapi
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
import type { FooterBlock } from "../footer/types";
|
|
9
|
+
|
|
8
10
|
type MetaElement = {
|
|
9
11
|
name: string;
|
|
10
12
|
content: string;
|
|
11
13
|
};
|
|
12
14
|
|
|
15
|
+
import type { HeaderConfig } from "../header/types";
|
|
16
|
+
|
|
17
|
+
export interface HeaderVariant extends HeaderConfig {
|
|
18
|
+
id: number;
|
|
19
|
+
documentId: string;
|
|
20
|
+
name: string;
|
|
21
|
+
}
|
|
22
|
+
export interface FooterVariant {
|
|
23
|
+
id: number;
|
|
24
|
+
documentId: string;
|
|
25
|
+
name: string;
|
|
26
|
+
sections: FooterBlock[];
|
|
27
|
+
}
|
|
28
|
+
|
|
13
29
|
export interface Page {
|
|
30
|
+
id: number;
|
|
31
|
+
documentId: string;
|
|
14
32
|
title: string;
|
|
15
33
|
slug: string;
|
|
34
|
+
overrideHeader?: boolean;
|
|
35
|
+
headerOverride?: HeaderVariant | null;
|
|
16
36
|
seo: {
|
|
17
37
|
// blocks.seo component
|
|
18
38
|
metaTitle?: string;
|
|
@@ -23,9 +43,8 @@ export interface Page {
|
|
|
23
43
|
meta: Array<MetaElement>;
|
|
24
44
|
} | null;
|
|
25
45
|
|
|
26
|
-
block: Array<{
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}>;
|
|
46
|
+
block: Array<{ __component: string; id: number; [key: string]: unknown }>;
|
|
47
|
+
|
|
48
|
+
overrideFooter?: boolean;
|
|
49
|
+
footerOverride?: FooterVariant | null;
|
|
31
50
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import * as blogs from "./content/blogs";
|
|
2
|
+
import * as footer from "./content/footer";
|
|
3
|
+
import * as header from "./content/header";
|
|
2
4
|
import * as navigation from "./content/navigation";
|
|
3
5
|
import * as pages from "./content/pages";
|
|
4
6
|
import * as locales from "./locales";
|
|
@@ -7,9 +9,11 @@ import * as session from "./session";
|
|
|
7
9
|
|
|
8
10
|
export const cms = {
|
|
9
11
|
blogs,
|
|
12
|
+
footer,
|
|
10
13
|
pages,
|
|
11
14
|
navigation,
|
|
12
15
|
locales,
|
|
13
16
|
media,
|
|
14
17
|
session,
|
|
18
|
+
header,
|
|
15
19
|
};
|
package/tsconfig.json
CHANGED
|
@@ -6,13 +6,11 @@
|
|
|
6
6
|
"sourceMap": true,
|
|
7
7
|
"esModuleInterop": true,
|
|
8
8
|
"skipLibCheck": true,
|
|
9
|
-
"declaration": true,
|
|
10
9
|
"moduleResolution": "node",
|
|
11
10
|
"resolveJsonModule": true,
|
|
12
|
-
"outDir": "./dist",
|
|
13
11
|
"baseUrl": "./",
|
|
14
|
-
"
|
|
12
|
+
"noEmit": true,
|
|
15
13
|
"jsx": "preserve"
|
|
16
14
|
},
|
|
17
|
-
"include": ["./"]
|
|
15
|
+
"include": ["./src"]
|
|
18
16
|
}
|
package/dist/client.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { Blog } from "./types";
|
|
2
|
-
declare const getBlogs: (options: {
|
|
3
|
-
pagination: {
|
|
4
|
-
pageSize: number;
|
|
5
|
-
page: number;
|
|
6
|
-
};
|
|
7
|
-
locale?: string;
|
|
8
|
-
}) => Promise<import("strapi-sdk-js").StrapiResponse<Blog[]>>;
|
|
9
|
-
declare const getBlog: (options: {
|
|
10
|
-
id: string;
|
|
11
|
-
locale?: string;
|
|
12
|
-
}) => Promise<import("strapi-sdk-js").StrapiResponse<Blog>>;
|
|
13
|
-
export { getBlogs, getBlog };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Interface is not auto-generated and needs to be updated
|
|
3
|
-
* whenever Strapi Content-Type is modified.
|
|
4
|
-
*
|
|
5
|
-
* TODO: Auto-generated interfaces from Strapi
|
|
6
|
-
*/
|
|
7
|
-
export interface Blog {
|
|
8
|
-
title: string;
|
|
9
|
-
content: any;
|
|
10
|
-
image: any;
|
|
11
|
-
author?: string;
|
|
12
|
-
documentId: string;
|
|
13
|
-
id: number;
|
|
14
|
-
locale?: string;
|
|
15
|
-
shortDescription: string;
|
|
16
|
-
createdAt: Date;
|
|
17
|
-
publishedAt: Date;
|
|
18
|
-
createdBy: {
|
|
19
|
-
firstname: string;
|
|
20
|
-
lastname: string;
|
|
21
|
-
};
|
|
22
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
export interface CmsNavigation {
|
|
2
|
-
nodes: {
|
|
3
|
-
name: string;
|
|
4
|
-
id: number;
|
|
5
|
-
items: (CmsPage | CmsSubMenu)[];
|
|
6
|
-
}[];
|
|
7
|
-
}
|
|
8
|
-
export interface CmsPage {
|
|
9
|
-
type: string;
|
|
10
|
-
id: number;
|
|
11
|
-
name: string;
|
|
12
|
-
slug: string;
|
|
13
|
-
}
|
|
14
|
-
export interface CmsSubMenu {
|
|
15
|
-
type: string;
|
|
16
|
-
name: string;
|
|
17
|
-
pages: CmsPage[];
|
|
18
|
-
}
|
|
19
|
-
export interface CmsNavRelated {
|
|
20
|
-
id: number;
|
|
21
|
-
title: string;
|
|
22
|
-
slug: string;
|
|
23
|
-
createdAt: string;
|
|
24
|
-
updatedAt: string;
|
|
25
|
-
publishedAt?: string | null;
|
|
26
|
-
/** Optional content‑type hint Strapi adds when `populate=*` */
|
|
27
|
-
__contentType?: string;
|
|
28
|
-
/**
|
|
29
|
-
* Any other attributes your model exposes (e.g., SEO fields,
|
|
30
|
-
* coverImage, etc.). Keep this open so the type stays valid
|
|
31
|
-
* if the Strapi model grows.
|
|
32
|
-
*/
|
|
33
|
-
[key: string]: unknown;
|
|
34
|
-
}
|
|
35
|
-
export interface CmsNavItem {
|
|
36
|
-
title: string;
|
|
37
|
-
menuAttached: boolean;
|
|
38
|
-
path: string;
|
|
39
|
-
type: "INTERNAL" | "EXTERNAL" | "WRAPPER";
|
|
40
|
-
uiRouterKey: string;
|
|
41
|
-
slug: string;
|
|
42
|
-
related: CmsNavRelated | null;
|
|
43
|
-
external: boolean;
|
|
44
|
-
items: CmsNavItem[];
|
|
45
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Interface is not auto-generated and needs to be updated
|
|
3
|
-
* whenever Strapi Content-Type is modified.
|
|
4
|
-
*
|
|
5
|
-
* TODO: Auto-generated interfaces from Strapi
|
|
6
|
-
*/
|
|
7
|
-
type MetaElement = {
|
|
8
|
-
name: string;
|
|
9
|
-
content: string;
|
|
10
|
-
};
|
|
11
|
-
export interface Page {
|
|
12
|
-
title: string;
|
|
13
|
-
slug: string;
|
|
14
|
-
seo: {
|
|
15
|
-
metaTitle?: string;
|
|
16
|
-
metaDescription?: string;
|
|
17
|
-
shareImage?: any;
|
|
18
|
-
metaImage?: {
|
|
19
|
-
media: {
|
|
20
|
-
url: string;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
metaKeywords: Array<string>;
|
|
24
|
-
meta: Array<MetaElement>;
|
|
25
|
-
} | null;
|
|
26
|
-
block: Array<{
|
|
27
|
-
__component: "blocks.rich-text";
|
|
28
|
-
id: number;
|
|
29
|
-
content: string;
|
|
30
|
-
}>;
|
|
31
|
-
}
|
|
32
|
-
export {};
|
package/dist/index.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import * as blogs from "./content/blogs";
|
|
2
|
-
import * as navigation from "./content/navigation";
|
|
3
|
-
import * as pages from "./content/pages";
|
|
4
|
-
import * as media from "./media";
|
|
5
|
-
import * as session from "./session";
|
|
6
|
-
declare const locales: {
|
|
7
|
-
getLocales: () => Promise<{
|
|
8
|
-
id: number;
|
|
9
|
-
documentId?: string;
|
|
10
|
-
name: string;
|
|
11
|
-
code: string;
|
|
12
|
-
isDefault?: boolean;
|
|
13
|
-
createdAt?: string;
|
|
14
|
-
updatedAt?: string;
|
|
15
|
-
publishedAt?: string;
|
|
16
|
-
}[]>;
|
|
17
|
-
};
|
|
18
|
-
export declare const cms: {
|
|
19
|
-
blogs: typeof blogs;
|
|
20
|
-
pages: typeof pages;
|
|
21
|
-
navigation: typeof navigation;
|
|
22
|
-
locales: typeof locales;
|
|
23
|
-
media: typeof media;
|
|
24
|
-
session: typeof session;
|
|
25
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export type imageSizes = "small" | "medium" | "large" | "thumbnail";
|
|
2
|
-
/**
|
|
3
|
-
* @param formats formats array from CMS data
|
|
4
|
-
* @param size size of the image
|
|
5
|
-
* @returns largest available image url
|
|
6
|
-
*/
|
|
7
|
-
export declare const getImageUrl: (formats: any, size?: imageSizes) => any;
|
package/dist/media/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./get-image-url";
|
package/dist/session/index.d.ts
DELETED