This commit is contained in:
parent
6350eac2c5
commit
a6911b3ed6
28
index.d.ts
vendored
28
index.d.ts
vendored
@ -580,6 +580,31 @@ declare global {
|
||||
): any
|
||||
}
|
||||
|
||||
interface CryptoPackage {
|
||||
/**
|
||||
* get hex of sha256 hash
|
||||
*
|
||||
* @param sata string
|
||||
*
|
||||
* @returns hex hash
|
||||
*/
|
||||
sha256(data: string): string
|
||||
}
|
||||
|
||||
interface JsonPackage {
|
||||
/**
|
||||
* parse json string to json
|
||||
* @param str json string
|
||||
*/
|
||||
parse(str: string): any
|
||||
|
||||
/**
|
||||
* stringify json string
|
||||
* @param json json object
|
||||
*/
|
||||
stringify(json: any): string
|
||||
}
|
||||
|
||||
export interface HookContext
|
||||
extends GetHookData,
|
||||
GetHookGetOnlyData,
|
||||
@ -588,6 +613,7 @@ declare global {
|
||||
request(): {
|
||||
method: string
|
||||
remoteAddr: string
|
||||
clientIp(): string
|
||||
host: string
|
||||
url: string
|
||||
path: string
|
||||
@ -616,6 +642,8 @@ declare global {
|
||||
xml: XmlPackage
|
||||
cookie: CookiePackage
|
||||
pdf: PdfPackage
|
||||
crypto: CryptoPackage
|
||||
json: JsonPackage
|
||||
}
|
||||
|
||||
export interface HookException {
|
||||
|
@ -20,8 +20,13 @@
|
||||
"additionalProperties": true,
|
||||
"properties": {
|
||||
"imageUrl": {
|
||||
"type": "string",
|
||||
"description": "project's teaser image url shown in admin ui"
|
||||
"description": "project's teaser image url shown in admin ui",
|
||||
"oneOf": [
|
||||
{ "type": "string" },
|
||||
{
|
||||
"$ref": "definitions.json#/definitions/evalObject"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user