OperationContextData

This commit is contained in:
AntoXa PRO 2024-04-17 11:42:34 +03:00
parent df317b438d
commit 540c165e94
3 changed files with 30 additions and 6 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "directus-helpers", "name": "directus-helpers",
"version": "1.0.3", "version": "1.1.0",
"description": "Helpers Directus Extensions", "description": "Helpers Directus Extensions",
"license": "ISC", "license": "ISC",
"author": "AntoXa PRO <info@antoxa.pro>", "author": "AntoXa PRO <info@antoxa.pro>",

View File

@ -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' export * from './trigger'

View File

@ -1,7 +1,21 @@
export type TTreggerData<TName extends string = string> = { export type TTrigger = {
$trigger: { path: string
query: any,
body: { body: {
collection: TName 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
} }
} }