mirror of
https://github.com/strapi/strapi.git
synced 2025-09-25 16:29:34 +00:00
Update Strapi definition
This commit is contained in:
parent
65f2326bec
commit
b06e8516e0
82
packages/core/strapi/lib/types/strapi.d.ts
vendored
82
packages/core/strapi/lib/types/strapi.d.ts
vendored
@ -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;
|
||||
};
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user