Class: default
#
Constructors#
constructor+ new default(options
: Options): default
#
ParametersName | Type |
---|---|
options | Options |
Returns: default
Defined in: WebHooks.ts:23
#
Properties#
db• db: DB
Defined in: WebHooks.ts:21
#
emitter• emitter: EventEmitter
Defined in: WebHooks.ts:22
#
requestFunctions• requestFunctions: Record<string, RequestFunction>= {}
Defined in: WebHooks.ts:23
#
Methods#
addâ–¸ add(key
: string, url
: string): Promise<void>
Add WebHook to key.
#
ParametersName | Type |
---|---|
key | string |
url | string |
Returns: Promise<void>
Defined in: WebHooks.ts:90
#
getDBâ–¸ getDB(): Promise<Hook[]>
Return all keys, and URL arrays.
Returns: Promise<Hook[]>
Promise
Defined in: WebHooks.ts:139
#
getRequestFunctionâ–¸ getRequestFunction(url
: string): RequestFunction
#
ParametersName | Type |
---|---|
url | string |
Returns: RequestFunction
Defined in: WebHooks.ts:51
#
getWebHookâ–¸ getWebHook(key
: string): Promise<string[]>
Return array of URLs for specified key.
#
ParametersName | Type |
---|---|
key | string |
Returns: Promise<string[]>
Promise
Defined in: WebHooks.ts:149
#
removeâ–¸ remove(key
: string, url?
: string): Promise<void>
Remove URL from specified key. If no URL is specified, then remove key from Database.
#
ParametersName | Type |
---|---|
key | string |
url? | string |
Returns: Promise<void>
Defined in: WebHooks.ts:107
#
setListenersâ–¸ setListeners(): Promise<void>
Returns: Promise<void>
Defined in: WebHooks.ts:36
#
triggerâ–¸ trigger(__namedParameters
: TriggerOptions): void
#
ParametersName | Type |
---|---|
__namedParameters | TriggerOptions |
Returns: void
Defined in: WebHooks.ts:77