Update Strapi definition

This commit is contained in:
Convly 2022-06-13 10:00:03 +02:00
parent 65f2326bec
commit b06e8516e0

View File

@ -282,6 +282,62 @@ export interface Strapi {
* Binds database queries for a specific model based on its unique identifier.
*/
query(uid: string): any;
/**
* Main Strapi container holding all the registries and providers (config, content-types, services, policies, etc...)
*/
container: any;
/**
* References to all the directories handled by Strapi
*/
dirs: StrapiDirectories;
/**
* Internal flag used to check if the application has been loaded
*/
isLoaded: boolean;
/**
* Fully reload the application
*/
reload(): void;
/**
* Holds a reference to the Koa application and the http server used by Strapi
*/
server: any;
/**
* Strapi util used to manage application files
*/
fs: any;
/**
* Event hub used to send and receive events from anywhere in the application
*/
eventHub: any;
/**
* Internal util used to log stats and messages on application Startup
*/
startupLogger: any;
/**
* Strapi logger used to send errors, warning or information messages
*/
log: any;
/**
* Used to manage cron within Strapi
*/
cron: any;
/**
* Telemetry util used to collect anonymous data on the application usage
*/
telemetry: any;
}
export interface Lifecycles {
@ -289,3 +345,29 @@ export interface Lifecycles {
BOOTSTRAP: 'bootstrap';
DESTROY: 'destroy';
}
export interface StrapiDirectories {
static: {
public: string;
};
app: {
root: string;
src: string;
api: string;
components: string;
extensions: string;
policies: string;
middlewares: string;
config: string;
};
dist: {
root: string;
src: string;
api: string;
components: string;
extensions: string;
policies: string;
middlewares: string;
config: string;
};
}