mirror of
https://github.com/directus/directus.git
synced 2026-04-03 03:00:39 -04:00
Improve API extension context types (#7714)
This commit is contained in:
committed by
GitHub
parent
353e4f06c7
commit
4d8e9d7297
2
package-lock.json
generated
2
package-lock.json
generated
@@ -51261,6 +51261,7 @@
|
||||
"fs-extra": "10.0.0",
|
||||
"geojson": "0.5.0",
|
||||
"joi": "17.4.2",
|
||||
"knex": "0.95.10",
|
||||
"knex-schema-inspector": "1.5.14",
|
||||
"lodash": "4.17.21",
|
||||
"vue": "3.2.6",
|
||||
@@ -53400,6 +53401,7 @@
|
||||
"fs-extra": "10.0.0",
|
||||
"geojson": "0.5.0",
|
||||
"joi": "17.4.2",
|
||||
"knex": "0.95.10",
|
||||
"knex-schema-inspector": "1.5.14",
|
||||
"lodash": "4.17.21",
|
||||
"npm-run-all": "4.1.5",
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
"fs-extra": "10.0.0",
|
||||
"geojson": "0.5.0",
|
||||
"joi": "17.4.2",
|
||||
"knex": "0.95.10",
|
||||
"knex-schema-inspector": "1.5.14",
|
||||
"lodash": "4.17.21",
|
||||
"vue": "3.2.6",
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { Knex } from 'knex';
|
||||
import {
|
||||
API_EXTENSION_PACKAGE_TYPES,
|
||||
API_EXTENSION_TYPES,
|
||||
@@ -7,6 +8,7 @@ import {
|
||||
EXTENSION_PKG_KEY,
|
||||
EXTENSION_TYPES,
|
||||
} from '../constants';
|
||||
import { Accountability } from './accountability';
|
||||
|
||||
export type AppExtensionType = typeof APP_EXTENSION_TYPES[number];
|
||||
export type ApiExtensionType = typeof API_EXTENSION_TYPES[number];
|
||||
@@ -61,7 +63,7 @@ export type ExtensionManifest = {
|
||||
export type ApiExtensionContext = {
|
||||
services: any;
|
||||
exceptions: any;
|
||||
database: any;
|
||||
env: any;
|
||||
getSchema: any;
|
||||
database: Knex;
|
||||
env: Record<string, any>;
|
||||
getSchema: (options?: { accountability?: Accountability; database?: Knex }) => Promise<Record<string, any>>;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user