add strapi types
This commit is contained in:
parent
35dcd6ab22
commit
ea3a2e3366
@ -1,7 +1,9 @@
|
||||
export default () => ({
|
||||
'schemas-to-ts': {
|
||||
"schemas-to-ts": {
|
||||
enabled: true,
|
||||
destinationFolder: "generated-types",
|
||||
config: {
|
||||
destinationFolder: "generated-strapi-interfaces",
|
||||
logLevel: 2
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
34
yoga-cms/generated-strapi-interfaces/api/about.ts
Normal file
34
yoga-cms/generated-strapi-interfaces/api/about.ts
Normal file
@ -0,0 +1,34 @@
|
||||
// Interface automatically generated by schemas-to-ts
|
||||
|
||||
import { Media } from '../components/shared/Media';
|
||||
import { Media_Plain } from '../components/shared/Media';
|
||||
import { AdminPanelRelationPropertyModification } from '../common/AdminPanelRelationPropertyModification';
|
||||
|
||||
export interface About {
|
||||
id: number;
|
||||
attributes: {
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; title?: string;
|
||||
description?: any;
|
||||
image?: { data: Media };
|
||||
};
|
||||
}
|
||||
export interface About_Plain {
|
||||
id: number;
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; title?: string;
|
||||
description?: any;
|
||||
image?: Media_Plain;
|
||||
}
|
||||
|
||||
export interface About_NoRelations {
|
||||
id: number;
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; title?: string;
|
||||
description?: any;
|
||||
image?: number;
|
||||
}
|
||||
|
||||
export interface About_AdminPanelLifeCycle {
|
||||
id: number;
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; title?: string;
|
||||
description?: any;
|
||||
image?: AdminPanelRelationPropertyModification<Media_Plain>;
|
||||
}
|
||||
54
yoga-cms/generated-strapi-interfaces/api/article.ts
Normal file
54
yoga-cms/generated-strapi-interfaces/api/article.ts
Normal file
@ -0,0 +1,54 @@
|
||||
// Interface automatically generated by schemas-to-ts
|
||||
|
||||
import { Media } from '../components/shared/Media';
|
||||
import { Author } from './author';
|
||||
import { Category } from './category';
|
||||
import { Media_Plain } from '../components/shared/Media';
|
||||
import { Author_Plain } from './author';
|
||||
import { Category_Plain } from './category';
|
||||
import { AdminPanelRelationPropertyModification } from '../common/AdminPanelRelationPropertyModification';
|
||||
|
||||
export interface Article {
|
||||
id: number;
|
||||
attributes: {
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; title?: string;
|
||||
description?: string;
|
||||
slug?: string;
|
||||
cover?: { data: Media };
|
||||
author?: { data: Author };
|
||||
category?: { data: Category };
|
||||
blocks?: any;
|
||||
};
|
||||
}
|
||||
export interface Article_Plain {
|
||||
id: number;
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; title?: string;
|
||||
description?: string;
|
||||
slug?: string;
|
||||
cover?: Media_Plain;
|
||||
author?: Author_Plain;
|
||||
category?: Category_Plain;
|
||||
blocks?: any;
|
||||
}
|
||||
|
||||
export interface Article_NoRelations {
|
||||
id: number;
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; title?: string;
|
||||
description?: string;
|
||||
slug?: string;
|
||||
cover?: number;
|
||||
author?: number;
|
||||
category?: number;
|
||||
blocks?: any;
|
||||
}
|
||||
|
||||
export interface Article_AdminPanelLifeCycle {
|
||||
id: number;
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; title?: string;
|
||||
description?: string;
|
||||
slug?: string;
|
||||
cover?: AdminPanelRelationPropertyModification<Media_Plain>;
|
||||
author?: AdminPanelRelationPropertyModification<Author_Plain>;
|
||||
category?: AdminPanelRelationPropertyModification<Category_Plain>;
|
||||
blocks?: any;
|
||||
}
|
||||
40
yoga-cms/generated-strapi-interfaces/api/author.ts
Normal file
40
yoga-cms/generated-strapi-interfaces/api/author.ts
Normal file
@ -0,0 +1,40 @@
|
||||
// Interface automatically generated by schemas-to-ts
|
||||
|
||||
import { Media } from '../components/shared/Media';
|
||||
import { Article } from './article';
|
||||
import { Media_Plain } from '../components/shared/Media';
|
||||
import { Article_Plain } from './article';
|
||||
import { AdminPanelRelationPropertyModification } from '../common/AdminPanelRelationPropertyModification';
|
||||
|
||||
export interface Author {
|
||||
id: number;
|
||||
attributes: {
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; name?: string;
|
||||
avatar?: { data: Media };
|
||||
email?: string;
|
||||
articles: { data: Article[] };
|
||||
};
|
||||
}
|
||||
export interface Author_Plain {
|
||||
id: number;
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; name?: string;
|
||||
avatar?: Media_Plain;
|
||||
email?: string;
|
||||
articles: Article_Plain[];
|
||||
}
|
||||
|
||||
export interface Author_NoRelations {
|
||||
id: number;
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; name?: string;
|
||||
avatar?: number;
|
||||
email?: string;
|
||||
articles: number[];
|
||||
}
|
||||
|
||||
export interface Author_AdminPanelLifeCycle {
|
||||
id: number;
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; name?: string;
|
||||
avatar?: AdminPanelRelationPropertyModification<Media_Plain>;
|
||||
email?: string;
|
||||
articles: AdminPanelRelationPropertyModification<Article_Plain>;
|
||||
}
|
||||
41
yoga-cms/generated-strapi-interfaces/api/car.ts
Normal file
41
yoga-cms/generated-strapi-interfaces/api/car.ts
Normal file
@ -0,0 +1,41 @@
|
||||
// Interface automatically generated by schemas-to-ts
|
||||
|
||||
import { Media } from '../components/shared/Media';
|
||||
import { Quote } from '../components/shared/Quote';
|
||||
import { Media_Plain } from '../components/shared/Media';
|
||||
import { Quote_Plain } from '../components/shared/Quote';
|
||||
import { Quote_NoRelations } from '../components/shared/Quote';
|
||||
import { AdminPanelRelationPropertyModification } from '../common/AdminPanelRelationPropertyModification';
|
||||
|
||||
export interface Car {
|
||||
id: number;
|
||||
attributes: {
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; name?: string;
|
||||
description?: string;
|
||||
image?: { data: Media };
|
||||
myquote: Quote[];
|
||||
};
|
||||
}
|
||||
export interface Car_Plain {
|
||||
id: number;
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; name?: string;
|
||||
description?: string;
|
||||
image?: Media_Plain;
|
||||
myquote: Quote_Plain[];
|
||||
}
|
||||
|
||||
export interface Car_NoRelations {
|
||||
id: number;
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; name?: string;
|
||||
description?: string;
|
||||
image?: number;
|
||||
myquote: Quote_NoRelations[];
|
||||
}
|
||||
|
||||
export interface Car_AdminPanelLifeCycle {
|
||||
id: number;
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; name?: string;
|
||||
description?: string;
|
||||
image?: AdminPanelRelationPropertyModification<Media_Plain>;
|
||||
myquote: Quote_Plain[];
|
||||
}
|
||||
38
yoga-cms/generated-strapi-interfaces/api/category.ts
Normal file
38
yoga-cms/generated-strapi-interfaces/api/category.ts
Normal file
@ -0,0 +1,38 @@
|
||||
// Interface automatically generated by schemas-to-ts
|
||||
|
||||
import { Article } from './article';
|
||||
import { Article_Plain } from './article';
|
||||
import { AdminPanelRelationPropertyModification } from '../common/AdminPanelRelationPropertyModification';
|
||||
|
||||
export interface Category {
|
||||
id: number;
|
||||
attributes: {
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; name?: string;
|
||||
slug?: string;
|
||||
articles: { data: Article[] };
|
||||
description?: string;
|
||||
};
|
||||
}
|
||||
export interface Category_Plain {
|
||||
id: number;
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; name?: string;
|
||||
slug?: string;
|
||||
articles: Article_Plain[];
|
||||
description?: string;
|
||||
}
|
||||
|
||||
export interface Category_NoRelations {
|
||||
id: number;
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; name?: string;
|
||||
slug?: string;
|
||||
articles: number[];
|
||||
description?: string;
|
||||
}
|
||||
|
||||
export interface Category_AdminPanelLifeCycle {
|
||||
id: number;
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; name?: string;
|
||||
slug?: string;
|
||||
articles: AdminPanelRelationPropertyModification<Article_Plain>;
|
||||
description?: string;
|
||||
}
|
||||
41
yoga-cms/generated-strapi-interfaces/api/global.ts
Normal file
41
yoga-cms/generated-strapi-interfaces/api/global.ts
Normal file
@ -0,0 +1,41 @@
|
||||
// Interface automatically generated by schemas-to-ts
|
||||
|
||||
import { Media } from '../components/shared/Media';
|
||||
import { Seo } from '../components/shared/Seo';
|
||||
import { Media_Plain } from '../components/shared/Media';
|
||||
import { Seo_Plain } from '../components/shared/Seo';
|
||||
import { Seo_NoRelations } from '../components/shared/Seo';
|
||||
import { AdminPanelRelationPropertyModification } from '../common/AdminPanelRelationPropertyModification';
|
||||
|
||||
export interface Global {
|
||||
id: number;
|
||||
attributes: {
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; siteName: string;
|
||||
favicon?: { data: Media };
|
||||
siteDescription: string;
|
||||
defaultSeo?: Seo;
|
||||
};
|
||||
}
|
||||
export interface Global_Plain {
|
||||
id: number;
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; siteName: string;
|
||||
favicon?: Media_Plain;
|
||||
siteDescription: string;
|
||||
defaultSeo?: Seo_Plain;
|
||||
}
|
||||
|
||||
export interface Global_NoRelations {
|
||||
id: number;
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; siteName: string;
|
||||
favicon?: number;
|
||||
siteDescription: string;
|
||||
defaultSeo?: Seo_NoRelations;
|
||||
}
|
||||
|
||||
export interface Global_AdminPanelLifeCycle {
|
||||
id: number;
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; siteName: string;
|
||||
favicon?: AdminPanelRelationPropertyModification<Media_Plain>;
|
||||
siteDescription: string;
|
||||
defaultSeo?: Seo_Plain;
|
||||
}
|
||||
39
yoga-cms/generated-strapi-interfaces/api/page.ts
Normal file
39
yoga-cms/generated-strapi-interfaces/api/page.ts
Normal file
@ -0,0 +1,39 @@
|
||||
// Interface automatically generated by schemas-to-ts
|
||||
|
||||
import { AdminPanelRelationPropertyModification } from '../common/AdminPanelRelationPropertyModification';
|
||||
|
||||
export enum Template {
|
||||
Homepage = 'homepage',}
|
||||
|
||||
export interface Page {
|
||||
id: number;
|
||||
attributes: {
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; name?: string;
|
||||
title?: string;
|
||||
template?: Template;
|
||||
parent?: { data: Page };
|
||||
};
|
||||
}
|
||||
export interface Page_Plain {
|
||||
id: number;
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; name?: string;
|
||||
title?: string;
|
||||
template?: Template;
|
||||
parent?: Page_Plain;
|
||||
}
|
||||
|
||||
export interface Page_NoRelations {
|
||||
id: number;
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; name?: string;
|
||||
title?: string;
|
||||
template?: Template;
|
||||
parent?: number;
|
||||
}
|
||||
|
||||
export interface Page_AdminPanelLifeCycle {
|
||||
id: number;
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; name?: string;
|
||||
title?: string;
|
||||
template?: Template;
|
||||
parent?: AdminPanelRelationPropertyModification<Page_Plain>;
|
||||
}
|
||||
30
yoga-cms/generated-strapi-interfaces/api/person.ts
Normal file
30
yoga-cms/generated-strapi-interfaces/api/person.ts
Normal file
@ -0,0 +1,30 @@
|
||||
// Interface automatically generated by schemas-to-ts
|
||||
|
||||
export interface Person {
|
||||
id: number;
|
||||
attributes: {
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; name?: string;
|
||||
firstname?: string;
|
||||
lastname?: string;
|
||||
};
|
||||
}
|
||||
export interface Person_Plain {
|
||||
id: number;
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; name?: string;
|
||||
firstname?: string;
|
||||
lastname?: string;
|
||||
}
|
||||
|
||||
export interface Person_NoRelations {
|
||||
id: number;
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; name?: string;
|
||||
firstname?: string;
|
||||
lastname?: string;
|
||||
}
|
||||
|
||||
export interface Person_AdminPanelLifeCycle {
|
||||
id: number;
|
||||
createdAt: Date; updatedAt: Date; publishedAt?: Date; name?: string;
|
||||
firstname?: string;
|
||||
lastname?: string;
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
// Interface automatically generated by schemas-to-ts
|
||||
|
||||
export interface AdminPanelRelationPropertyModification<T> {
|
||||
connect: T[];
|
||||
disconnect: T[];
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,9 @@
|
||||
// Interface automatically generated by schemas-to-ts
|
||||
|
||||
import { BeforeRunEvent } from './BeforeRunEvent';
|
||||
|
||||
export interface AfterRunEvent<TState, TResult> extends BeforeRunEvent<TState extends Record<string, unknown> ? TState : never> {
|
||||
result: TResult;
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,8 @@
|
||||
// Interface automatically generated by schemas-to-ts
|
||||
|
||||
import { Event } from '@strapi/database/dist/lifecycles';
|
||||
|
||||
export interface BeforeRunEvent<TState extends Record<string, unknown>> extends Event {
|
||||
state: TState;
|
||||
}
|
||||
|
||||
44
yoga-cms/generated-strapi-interfaces/common/Media.ts
Normal file
44
yoga-cms/generated-strapi-interfaces/common/Media.ts
Normal file
@ -0,0 +1,44 @@
|
||||
// Interface automatically generated by schemas-to-ts
|
||||
|
||||
import { MediaFormat } from './MediaFormat';
|
||||
export interface Media {
|
||||
id: number;
|
||||
attributes: {
|
||||
name: string;
|
||||
alternativeText: string;
|
||||
caption: string;
|
||||
width: number;
|
||||
height: number;
|
||||
formats: { thumbnail: MediaFormat; small: MediaFormat; medium: MediaFormat; large: MediaFormat; };
|
||||
hash: string;
|
||||
ext: string;
|
||||
mime: string;
|
||||
size: number;
|
||||
url: string;
|
||||
previewUrl: string;
|
||||
provider: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
}
|
||||
}
|
||||
export interface Media_Plain {
|
||||
id: number;
|
||||
name: string;
|
||||
alternativeText: string;
|
||||
caption: string;
|
||||
width: number;
|
||||
height: number;
|
||||
formats: { thumbnail: MediaFormat; small: MediaFormat; medium: MediaFormat; large: MediaFormat; };
|
||||
hash: string;
|
||||
ext: string;
|
||||
mime: string;
|
||||
size: number;
|
||||
url: string;
|
||||
previewUrl: string;
|
||||
provider: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
}
|
||||
|
||||
|
||||
|
||||
15
yoga-cms/generated-strapi-interfaces/common/MediaFormat.ts
Normal file
15
yoga-cms/generated-strapi-interfaces/common/MediaFormat.ts
Normal file
@ -0,0 +1,15 @@
|
||||
// Interface automatically generated by schemas-to-ts
|
||||
|
||||
export interface MediaFormat {
|
||||
name: string;
|
||||
hash: string;
|
||||
ext: string;
|
||||
mime: string;
|
||||
width: number;
|
||||
height: number;
|
||||
size: number;
|
||||
path: string;
|
||||
url: string;
|
||||
}
|
||||
|
||||
|
||||
15
yoga-cms/generated-strapi-interfaces/common/Payload.ts
Normal file
15
yoga-cms/generated-strapi-interfaces/common/Payload.ts
Normal file
@ -0,0 +1,15 @@
|
||||
// Interface automatically generated by schemas-to-ts
|
||||
|
||||
export interface Payload<T> {
|
||||
data: T;
|
||||
meta: {
|
||||
pagination?: {
|
||||
page: number;
|
||||
pageSize: number;
|
||||
pageCount: number;
|
||||
total: number;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
26
yoga-cms/generated-strapi-interfaces/common/User.ts
Normal file
26
yoga-cms/generated-strapi-interfaces/common/User.ts
Normal file
@ -0,0 +1,26 @@
|
||||
// Interface automatically generated by schemas-to-ts
|
||||
|
||||
export interface User {
|
||||
id: number;
|
||||
attributes: {
|
||||
username: string;
|
||||
email: string;
|
||||
provider: string;
|
||||
confirmed: boolean;
|
||||
blocked: boolean;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
}
|
||||
}
|
||||
|
||||
export interface User_Plain {
|
||||
id: number;
|
||||
username: string;
|
||||
email: string;
|
||||
provider: string;
|
||||
confirmed: boolean;
|
||||
blocked: boolean;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
}
|
||||
|
||||
@ -0,0 +1,13 @@
|
||||
// Interface automatically generated by schemas-to-ts
|
||||
|
||||
export interface Media {
|
||||
file?: { data: Media };
|
||||
}
|
||||
export interface Media_Plain {
|
||||
file?: Media_Plain;
|
||||
}
|
||||
|
||||
export interface Media_NoRelations {
|
||||
file?: number;
|
||||
}
|
||||
|
||||
@ -0,0 +1,13 @@
|
||||
// Interface automatically generated by schemas-to-ts
|
||||
|
||||
export interface MyComponent {
|
||||
testtext?: string;
|
||||
}
|
||||
export interface MyComponent_Plain {
|
||||
testtext?: string;
|
||||
}
|
||||
|
||||
export interface MyComponent_NoRelations {
|
||||
testtext?: string;
|
||||
}
|
||||
|
||||
@ -0,0 +1,16 @@
|
||||
// Interface automatically generated by schemas-to-ts
|
||||
|
||||
export interface Quote {
|
||||
title?: string;
|
||||
body?: string;
|
||||
}
|
||||
export interface Quote_Plain {
|
||||
title?: string;
|
||||
body?: string;
|
||||
}
|
||||
|
||||
export interface Quote_NoRelations {
|
||||
title?: string;
|
||||
body?: string;
|
||||
}
|
||||
|
||||
@ -0,0 +1,13 @@
|
||||
// Interface automatically generated by schemas-to-ts
|
||||
|
||||
export interface RichText {
|
||||
body?: string;
|
||||
}
|
||||
export interface RichText_Plain {
|
||||
body?: string;
|
||||
}
|
||||
|
||||
export interface RichText_NoRelations {
|
||||
body?: string;
|
||||
}
|
||||
|
||||
@ -0,0 +1,22 @@
|
||||
// Interface automatically generated by schemas-to-ts
|
||||
|
||||
import { Media } from './Media';
|
||||
import { Media_Plain } from './Media';
|
||||
|
||||
export interface Seo {
|
||||
metaTitle: string;
|
||||
metaDescription: string;
|
||||
shareImage?: { data: Media };
|
||||
}
|
||||
export interface Seo_Plain {
|
||||
metaTitle: string;
|
||||
metaDescription: string;
|
||||
shareImage?: Media_Plain;
|
||||
}
|
||||
|
||||
export interface Seo_NoRelations {
|
||||
metaTitle: string;
|
||||
metaDescription: string;
|
||||
shareImage?: number;
|
||||
}
|
||||
|
||||
@ -0,0 +1,16 @@
|
||||
// Interface automatically generated by schemas-to-ts
|
||||
|
||||
import { Media } from './Media';
|
||||
import { Media_Plain } from './Media';
|
||||
|
||||
export interface Slider {
|
||||
files?: { data: Media[] };
|
||||
}
|
||||
export interface Slider_Plain {
|
||||
files?: Media_Plain[];
|
||||
}
|
||||
|
||||
export interface Slider_NoRelations {
|
||||
files?: number[];
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user