add ityped, add strapi type generate plugin
This commit is contained in:
parent
a7c84bf65c
commit
35dcd6ab22
@ -1,6 +1,7 @@
|
|||||||
export default () => ({
|
export default () => ({
|
||||||
'schemas-to-ts': {
|
'schemas-to-ts': {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
destinationFolder: "generated-types"
|
destinationFolder: "generated-types",
|
||||||
|
logLevel: 2
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
12
yoga-cms/types/generated/components.d.ts
vendored
12
yoga-cms/types/generated/components.d.ts
vendored
@ -11,6 +11,17 @@ export interface SharedMedia extends Struct.ComponentSchema {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface SharedMyComponent extends Struct.ComponentSchema {
|
||||||
|
collectionName: 'components_shared_my_components';
|
||||||
|
info: {
|
||||||
|
displayName: 'my component';
|
||||||
|
icon: 'alien';
|
||||||
|
};
|
||||||
|
attributes: {
|
||||||
|
testtext: Schema.Attribute.String;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
export interface SharedQuote extends Struct.ComponentSchema {
|
export interface SharedQuote extends Struct.ComponentSchema {
|
||||||
collectionName: 'components_shared_quotes';
|
collectionName: 'components_shared_quotes';
|
||||||
info: {
|
info: {
|
||||||
@ -66,6 +77,7 @@ declare module '@strapi/strapi' {
|
|||||||
export module Public {
|
export module Public {
|
||||||
export interface ComponentSchemas {
|
export interface ComponentSchemas {
|
||||||
'shared.media': SharedMedia;
|
'shared.media': SharedMedia;
|
||||||
|
'shared.my-component': SharedMyComponent;
|
||||||
'shared.quote': SharedQuote;
|
'shared.quote': SharedQuote;
|
||||||
'shared.rich-text': SharedRichText;
|
'shared.rich-text': SharedRichText;
|
||||||
'shared.seo': SharedSeo;
|
'shared.seo': SharedSeo;
|
||||||
|
|||||||
260
yoga-cms/types/generated/contentTypes.d.ts
vendored
260
yoga-cms/types/generated/contentTypes.d.ts
vendored
@ -369,6 +369,258 @@ export interface AdminUser extends Struct.CollectionTypeSchema {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface ApiAboutAbout extends Struct.SingleTypeSchema {
|
||||||
|
collectionName: 'abouts';
|
||||||
|
info: {
|
||||||
|
description: 'Write about yourself and the content you create';
|
||||||
|
displayName: 'About';
|
||||||
|
pluralName: 'abouts';
|
||||||
|
singularName: 'about';
|
||||||
|
};
|
||||||
|
options: {
|
||||||
|
draftAndPublish: true;
|
||||||
|
};
|
||||||
|
attributes: {
|
||||||
|
createdAt: Schema.Attribute.DateTime;
|
||||||
|
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||||
|
Schema.Attribute.Private;
|
||||||
|
description: Schema.Attribute.Blocks;
|
||||||
|
image: Schema.Attribute.Media<'images' | 'files' | 'videos' | 'audios'>;
|
||||||
|
locale: Schema.Attribute.String & Schema.Attribute.Private;
|
||||||
|
localizations: Schema.Attribute.Relation<'oneToMany', 'api::about.about'> &
|
||||||
|
Schema.Attribute.Private;
|
||||||
|
publishedAt: Schema.Attribute.DateTime;
|
||||||
|
title: Schema.Attribute.String;
|
||||||
|
updatedAt: Schema.Attribute.DateTime;
|
||||||
|
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||||
|
Schema.Attribute.Private;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ApiArticleArticle extends Struct.CollectionTypeSchema {
|
||||||
|
collectionName: 'articles';
|
||||||
|
info: {
|
||||||
|
description: 'Create your blog content';
|
||||||
|
displayName: 'Article';
|
||||||
|
pluralName: 'articles';
|
||||||
|
singularName: 'article';
|
||||||
|
};
|
||||||
|
options: {
|
||||||
|
draftAndPublish: true;
|
||||||
|
};
|
||||||
|
attributes: {
|
||||||
|
author: Schema.Attribute.Relation<'manyToOne', 'api::author.author'>;
|
||||||
|
blocks: Schema.Attribute.DynamicZone<
|
||||||
|
['shared.media', 'shared.quote', 'shared.rich-text', 'shared.slider']
|
||||||
|
>;
|
||||||
|
category: Schema.Attribute.Relation<'manyToOne', 'api::category.category'>;
|
||||||
|
cover: Schema.Attribute.Media<'images' | 'files' | 'videos'>;
|
||||||
|
createdAt: Schema.Attribute.DateTime;
|
||||||
|
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||||
|
Schema.Attribute.Private;
|
||||||
|
description: Schema.Attribute.Text &
|
||||||
|
Schema.Attribute.SetMinMaxLength<{
|
||||||
|
maxLength: 80;
|
||||||
|
}>;
|
||||||
|
locale: Schema.Attribute.String & Schema.Attribute.Private;
|
||||||
|
localizations: Schema.Attribute.Relation<
|
||||||
|
'oneToMany',
|
||||||
|
'api::article.article'
|
||||||
|
> &
|
||||||
|
Schema.Attribute.Private;
|
||||||
|
publishedAt: Schema.Attribute.DateTime;
|
||||||
|
slug: Schema.Attribute.UID<'title'>;
|
||||||
|
title: Schema.Attribute.String;
|
||||||
|
updatedAt: Schema.Attribute.DateTime;
|
||||||
|
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||||
|
Schema.Attribute.Private;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ApiAuthorAuthor extends Struct.CollectionTypeSchema {
|
||||||
|
collectionName: 'authors';
|
||||||
|
info: {
|
||||||
|
description: 'Create authors for your content';
|
||||||
|
displayName: 'Author';
|
||||||
|
pluralName: 'authors';
|
||||||
|
singularName: 'author';
|
||||||
|
};
|
||||||
|
options: {
|
||||||
|
draftAndPublish: false;
|
||||||
|
};
|
||||||
|
attributes: {
|
||||||
|
articles: Schema.Attribute.Relation<'oneToMany', 'api::article.article'>;
|
||||||
|
avatar: Schema.Attribute.Media<'images' | 'files' | 'videos'>;
|
||||||
|
createdAt: Schema.Attribute.DateTime;
|
||||||
|
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||||
|
Schema.Attribute.Private;
|
||||||
|
email: Schema.Attribute.String;
|
||||||
|
locale: Schema.Attribute.String & Schema.Attribute.Private;
|
||||||
|
localizations: Schema.Attribute.Relation<
|
||||||
|
'oneToMany',
|
||||||
|
'api::author.author'
|
||||||
|
> &
|
||||||
|
Schema.Attribute.Private;
|
||||||
|
name: Schema.Attribute.String;
|
||||||
|
publishedAt: Schema.Attribute.DateTime;
|
||||||
|
updatedAt: Schema.Attribute.DateTime;
|
||||||
|
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||||
|
Schema.Attribute.Private;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ApiCarCar extends Struct.CollectionTypeSchema {
|
||||||
|
collectionName: 'cars';
|
||||||
|
info: {
|
||||||
|
description: '';
|
||||||
|
displayName: 'car';
|
||||||
|
pluralName: 'cars';
|
||||||
|
singularName: 'car';
|
||||||
|
};
|
||||||
|
options: {
|
||||||
|
draftAndPublish: true;
|
||||||
|
};
|
||||||
|
attributes: {
|
||||||
|
createdAt: Schema.Attribute.DateTime;
|
||||||
|
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||||
|
Schema.Attribute.Private;
|
||||||
|
description: Schema.Attribute.Text;
|
||||||
|
image: Schema.Attribute.Media<'images' | 'files' | 'videos' | 'audios'>;
|
||||||
|
locale: Schema.Attribute.String & Schema.Attribute.Private;
|
||||||
|
localizations: Schema.Attribute.Relation<'oneToMany', 'api::car.car'> &
|
||||||
|
Schema.Attribute.Private;
|
||||||
|
myquote: Schema.Attribute.Component<'shared.quote', true>;
|
||||||
|
name: Schema.Attribute.String;
|
||||||
|
publishedAt: Schema.Attribute.DateTime;
|
||||||
|
updatedAt: Schema.Attribute.DateTime;
|
||||||
|
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||||
|
Schema.Attribute.Private;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ApiCategoryCategory extends Struct.CollectionTypeSchema {
|
||||||
|
collectionName: 'categories';
|
||||||
|
info: {
|
||||||
|
description: 'Organize your content into categories';
|
||||||
|
displayName: 'Category';
|
||||||
|
pluralName: 'categories';
|
||||||
|
singularName: 'category';
|
||||||
|
};
|
||||||
|
options: {
|
||||||
|
draftAndPublish: false;
|
||||||
|
};
|
||||||
|
attributes: {
|
||||||
|
articles: Schema.Attribute.Relation<'oneToMany', 'api::article.article'>;
|
||||||
|
createdAt: Schema.Attribute.DateTime;
|
||||||
|
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||||
|
Schema.Attribute.Private;
|
||||||
|
description: Schema.Attribute.Text;
|
||||||
|
locale: Schema.Attribute.String & Schema.Attribute.Private;
|
||||||
|
localizations: Schema.Attribute.Relation<
|
||||||
|
'oneToMany',
|
||||||
|
'api::category.category'
|
||||||
|
> &
|
||||||
|
Schema.Attribute.Private;
|
||||||
|
name: Schema.Attribute.String;
|
||||||
|
publishedAt: Schema.Attribute.DateTime;
|
||||||
|
slug: Schema.Attribute.UID;
|
||||||
|
updatedAt: Schema.Attribute.DateTime;
|
||||||
|
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||||
|
Schema.Attribute.Private;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ApiGlobalGlobal extends Struct.SingleTypeSchema {
|
||||||
|
collectionName: 'globals';
|
||||||
|
info: {
|
||||||
|
description: 'Define global settings';
|
||||||
|
displayName: 'Global';
|
||||||
|
pluralName: 'globals';
|
||||||
|
singularName: 'global';
|
||||||
|
};
|
||||||
|
options: {
|
||||||
|
draftAndPublish: false;
|
||||||
|
};
|
||||||
|
attributes: {
|
||||||
|
createdAt: Schema.Attribute.DateTime;
|
||||||
|
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||||
|
Schema.Attribute.Private;
|
||||||
|
defaultSeo: Schema.Attribute.Component<'shared.seo', false>;
|
||||||
|
favicon: Schema.Attribute.Media<'images' | 'files' | 'videos'>;
|
||||||
|
locale: Schema.Attribute.String & Schema.Attribute.Private;
|
||||||
|
localizations: Schema.Attribute.Relation<
|
||||||
|
'oneToMany',
|
||||||
|
'api::global.global'
|
||||||
|
> &
|
||||||
|
Schema.Attribute.Private;
|
||||||
|
publishedAt: Schema.Attribute.DateTime;
|
||||||
|
siteDescription: Schema.Attribute.Text & Schema.Attribute.Required;
|
||||||
|
siteName: Schema.Attribute.String & Schema.Attribute.Required;
|
||||||
|
updatedAt: Schema.Attribute.DateTime;
|
||||||
|
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||||
|
Schema.Attribute.Private;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ApiPagePage extends Struct.CollectionTypeSchema {
|
||||||
|
collectionName: 'pages';
|
||||||
|
info: {
|
||||||
|
description: '';
|
||||||
|
displayName: 'Page';
|
||||||
|
pluralName: 'pages';
|
||||||
|
singularName: 'page';
|
||||||
|
};
|
||||||
|
options: {
|
||||||
|
draftAndPublish: true;
|
||||||
|
};
|
||||||
|
attributes: {
|
||||||
|
createdAt: Schema.Attribute.DateTime;
|
||||||
|
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||||
|
Schema.Attribute.Private;
|
||||||
|
locale: Schema.Attribute.String & Schema.Attribute.Private;
|
||||||
|
localizations: Schema.Attribute.Relation<'oneToMany', 'api::page.page'> &
|
||||||
|
Schema.Attribute.Private;
|
||||||
|
name: Schema.Attribute.String;
|
||||||
|
parent: Schema.Attribute.Relation<'oneToOne', 'api::page.page'>;
|
||||||
|
publishedAt: Schema.Attribute.DateTime;
|
||||||
|
template: Schema.Attribute.Enumeration<['homepage']>;
|
||||||
|
title: Schema.Attribute.String;
|
||||||
|
updatedAt: Schema.Attribute.DateTime;
|
||||||
|
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||||
|
Schema.Attribute.Private;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ApiPersonPerson extends Struct.SingleTypeSchema {
|
||||||
|
collectionName: 'people';
|
||||||
|
info: {
|
||||||
|
displayName: 'person';
|
||||||
|
pluralName: 'people';
|
||||||
|
singularName: 'person';
|
||||||
|
};
|
||||||
|
options: {
|
||||||
|
draftAndPublish: true;
|
||||||
|
};
|
||||||
|
attributes: {
|
||||||
|
createdAt: Schema.Attribute.DateTime;
|
||||||
|
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||||
|
Schema.Attribute.Private;
|
||||||
|
firstname: Schema.Attribute.String;
|
||||||
|
lastname: Schema.Attribute.String;
|
||||||
|
locale: Schema.Attribute.String & Schema.Attribute.Private;
|
||||||
|
localizations: Schema.Attribute.Relation<
|
||||||
|
'oneToMany',
|
||||||
|
'api::person.person'
|
||||||
|
> &
|
||||||
|
Schema.Attribute.Private;
|
||||||
|
name: Schema.Attribute.String;
|
||||||
|
publishedAt: Schema.Attribute.DateTime;
|
||||||
|
updatedAt: Schema.Attribute.DateTime;
|
||||||
|
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||||
|
Schema.Attribute.Private;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
export interface PluginContentReleasesRelease
|
export interface PluginContentReleasesRelease
|
||||||
extends Struct.CollectionTypeSchema {
|
extends Struct.CollectionTypeSchema {
|
||||||
collectionName: 'strapi_releases';
|
collectionName: 'strapi_releases';
|
||||||
@ -878,6 +1130,14 @@ declare module '@strapi/strapi' {
|
|||||||
'admin::transfer-token': AdminTransferToken;
|
'admin::transfer-token': AdminTransferToken;
|
||||||
'admin::transfer-token-permission': AdminTransferTokenPermission;
|
'admin::transfer-token-permission': AdminTransferTokenPermission;
|
||||||
'admin::user': AdminUser;
|
'admin::user': AdminUser;
|
||||||
|
'api::about.about': ApiAboutAbout;
|
||||||
|
'api::article.article': ApiArticleArticle;
|
||||||
|
'api::author.author': ApiAuthorAuthor;
|
||||||
|
'api::car.car': ApiCarCar;
|
||||||
|
'api::category.category': ApiCategoryCategory;
|
||||||
|
'api::global.global': ApiGlobalGlobal;
|
||||||
|
'api::page.page': ApiPagePage;
|
||||||
|
'api::person.person': ApiPersonPerson;
|
||||||
'plugin::content-releases.release': PluginContentReleasesRelease;
|
'plugin::content-releases.release': PluginContentReleasesRelease;
|
||||||
'plugin::content-releases.release-action': PluginContentReleasesReleaseAction;
|
'plugin::content-releases.release-action': PluginContentReleasesReleaseAction;
|
||||||
'plugin::i18n.locale': PluginI18NLocale;
|
'plugin::i18n.locale': PluginI18NLocale;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user