OperationContextData
This commit is contained in:
parent
df317b438d
commit
540c165e94
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "directus-helpers",
|
||||
"version": "1.0.3",
|
||||
"version": "1.1.0",
|
||||
"description": "Helpers Directus Extensions",
|
||||
"license": "ISC",
|
||||
"author": "AntoXa PRO <info@antoxa.pro>",
|
||||
|
@ -1 +1,11 @@
|
||||
import type { Accountability } from '@directus/types'
|
||||
import type { TTrigger } from './trigger'
|
||||
|
||||
export type TOperationContextData = {
|
||||
$trigger: TTrigger,
|
||||
$last: TTrigger
|
||||
$accountability: Accountability
|
||||
$env: Record<string, string>
|
||||
}
|
||||
|
||||
export * from './trigger'
|
||||
|
@ -1,7 +1,21 @@
|
||||
export type TTreggerData<TName extends string = string> = {
|
||||
$trigger: {
|
||||
body: {
|
||||
collection: TName
|
||||
}
|
||||
export type TTrigger = {
|
||||
path: string
|
||||
query: any,
|
||||
body: {
|
||||
collection: string
|
||||
},
|
||||
method: 'GET' | 'POST',
|
||||
headers: {
|
||||
host: string
|
||||
connection: string
|
||||
origin: string
|
||||
referer: string
|
||||
cookie: string
|
||||
accept: string
|
||||
'accept-encoding': string
|
||||
'accept-language': string
|
||||
'user-agent': string
|
||||
'content-type': string
|
||||
'content-length': string
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user