diff --git a/classes/crowdsec_client.Alerts.html b/classes/crowdsec_client.Alerts.html index 61f18946..d12491b1 100644 --- a/classes/crowdsec_client.Alerts.html +++ b/classes/crowdsec_client.Alerts.html @@ -1,9 +1,9 @@ -
Protected
httpOptional
options: APITypes.Alerts.SearchAlerts.RequestQueryGenerated using TypeDoc
Protected
httpCreate Alerts and return the IDs
+Optional
options: APITypes.Alerts.SearchAlerts.RequestQueryGenerated using TypeDoc
new AxiosError(errorThrownByAxios)
-new AxiosError('error message', errorThrownByAxios)
+
new AxiosError('error message', errorThrownByAxios)
-new AxiosError('error message', { config, request, response })
+
new AxiosError('error message', { config, request, response })
-Optional
causeOptional
requestOptional
responseOptional
stackOptional
statusStatic
Optional
prepareOptional override for formatting stack traces
+Optional
causeOptional
requestOptional
responseOptional
stackOptional
statusStatic
Optional
prepareOptional override for formatting stack traces
Static
stackStatic
captureStatic
stackStatic
captureGenerated using TypeDoc
Protected
httpGenerated using TypeDoc
Protected
httpGenerated using TypeDoc
Private
Optional
#authProtected
debugProtected
Static
httpProtected
_testProtected
setProtected
setProtected
Static
getHTTPClientGenerated using TypeDoc
Private
Optional
#authProtected
debugProtected
Static
httpProtected
_testProtected
setProtected
setProtected
Static
getHTTPClientGenerated using TypeDoc
Abstract
Abstract
Protected
constructorPrivate
Readonly
_httpProtected
debugPrivate
optionsProtected
Static
httpProtected
_testAbstract
loginProtected
setProtected
setAbstract
stopAbstract
testPrivate
Static
addProtected
Static
getHTTPClientGenerated using TypeDoc
Protected
constructorPrivate
Readonly
_httpProtected
debugPrivate
optionsProtected
Static
httpProtected
_testAbstract
loginProtected
setProtected
setAbstract
stopAbstract
testPrivate
Static
addProtected
Static
getHTTPClientGenerated using TypeDoc
Optional
exception: AxiosErrorProtected
_messageOptional
axioscan also contain error like certificates error (https://nodejs.org/api/tls.html#tls_x509_certificate_error_codes) or other errors . Can be a string, or a number
-can also contain error like certificates error (https://nodejs.org/api/tls.html#tls_x509_certificate_error_codes) or other errors . Can be a string, or a number
-Generated using TypeDoc
Optional
exception: AxiosErrorProtected
_messageOptional
axioscan also contain error like certificates error (https://nodejs.org/api/tls.html#tls_x509_certificate_error_codes) or other errors . Can be a string, or a number
+can also contain error like certificates error (https://nodejs.org/api/tls.html#tls_x509_certificate_error_codes) or other errors . Can be a string, or a number
+Generated using TypeDoc
Optional
exception: ErrorProtected
_messagecan also contain error like certificates error (https://nodejs.org/api/tls.html#tls_x509_certificate_error_codes) or other errors . Can be a string, or a number
-can also contain error like certificates error (https://nodejs.org/api/tls.html#tls_x509_certificate_error_codes) or other errors . Can be a string, or a number
-Generated using TypeDoc
Optional
exception: ErrorProtected
_messagecan also contain error like certificates error (https://nodejs.org/api/tls.html#tls_x509_certificate_error_codes) or other errors . Can be a string, or a number
+can also contain error like certificates error (https://nodejs.org/api/tls.html#tls_x509_certificate_error_codes) or other errors . Can be a string, or a number
+Generated using TypeDoc
Represent a Decision .
-Optional
idOptional
simulatedGenerated using TypeDoc
Optional
idOptional
simulatedGenerated using TypeDoc
Private
Optional
getProtected
httpPrivate
runningOptional
options: { Optional
origins?: string | string[]Optional
scenarios_Optional
scenarios_Optional
scopes?: string | string[]Optional
startup?: booleanOptional
optionsParam: { Optional
interval?: numberOptional
origins?: Origins | Origins[]Optional
scenarios_Optional
scenarios_Optional
scopes?: Scopes | Scopes[]Optional
cb: CallBack<Scopes, Origins>Private
getPrivate
getOptional
options: Omit<APITypes.Decisions.GetDecisions.RequestQuery, commaSeparatedParams> & { Private
streamGenerated using TypeDoc
Private
Optional
getProtected
httpPrivate
runningOptional
options: { Optional
origins?: string | string[]Optional
scenarios_Optional
scenarios_Optional
scopes?: string | string[]Optional
startup?: booleanOptional
optionsParam: { Optional
interval?: numberOptional
origins?: Origins | Origins[]Optional
scenarios_Optional
scenarios_Optional
scopes?: Scopes | Scopes[]Optional
cb: CallBack<Scopes, Origins>Private
getPrivate
getOptional
options: Omit<APITypes.Decisions.GetDecisions.RequestQuery, commaSeparatedParams> & { Private
streamGenerated using TypeDoc
Private
_pausedPrivate
Readonly
debugPrivate
decisionsPrivate
loopingReadonly
nameStatic
Readonly
captureValue: Symbol.for('nodejs.rejection')
Private
_pausedPrivate
Readonly
debugPrivate
decisionsPrivate
loopingReadonly
nameStatic
Readonly
captureValue: Symbol.for('nodejs.rejection')
See how to write a custom rejection handler
.
v13.4.0, v12.16.0
Static
captureValue: boolean
@@ -75,9 +75,9 @@Installing a listener using this symbol does not change the behavior once an'error'
event is emitted. Therefore, the process will still crash if no
regular 'error'
listener is installed.
v13.6.0, v12.17.0
-Optional
[captureAlias for emitter.on(eventName, listener)
.
Optional
[captureAlias for emitter.on(eventName, listener)
.
Rest
...args: any[]v0.1.26
-Rest
...args: Parameters<DecisionsStreamEvents<Scopes, Origins>[E]>Private
emitRest
...args: Parameters<DecisionsStreamEvents<Scopes, Origins>[E]>Private
emitReturns an array listing the events for which the emitter has registered
listeners. The values in the array are strings or Symbol
s.
import { EventEmitter } from 'node:events';
const myEE = new EventEmitter();
myEE.on('foo', () => {});
myEE.on('bar', () => {});
const sym = Symbol('symbol');
myEE.on(sym, () => {});
console.log(myEE.eventNames());
// Prints: [ 'foo', 'bar', Symbol(symbol) ]
@@ -85,7 +85,7 @@
Returns the current max listener value for the EventEmitter
which is either
set by emitter.setMaxListeners(n)
or defaults to defaultMaxListeners.
v1.0.0
-Private
handlePrivate
handleReturns the number of listeners listening for the event named eventName
.
If listener
is provided, it will return how many times the listener is found
in the list of the listeners of the event.
The name of the event being listened for
@@ -95,9 +95,9 @@server.on('connection', (stream) => {
console.log('someone connected!');
});
console.log(util.inspect(server.listeners('connection')));
// Prints: [ [Function] ]
v0.1.26
-Private
loopPrivate
loopAlias for emitter.removeListener()
.
Private
loopPrivate
loopAlias for emitter.removeListener()
.
Rest
...args: any[]v10.0.0
-Adds a one-timelistener
function for the event named eventName
. The
+
Adds a one-timelistener
function for the event named eventName
. The
next time eventName
is triggered, this listener is removed and then invoked.
server.once('connection', (stream) => {
console.log('Ah, we have our first user!');
});
@@ -109,7 +109,7 @@
The name of the event.
The callback function
Rest
...args: any[]v0.3.0
-Adds the listener
function to the beginning of the listeners array for the
+
Adds the listener
function to the beginning of the listeners array for the
event named eventName
. No checks are made to see if the listener
has
already been added. Multiple calls passing the same combination of eventName
and listener
will result in the listener
being added, and called, multiple
times.
The name of the event.
The callback function
Rest
...args: any[]v6.0.0
-Returns a copy of the array of listeners for the event named eventName
,
including any wrappers (such as those created by .once()
).
import { EventEmitter } from 'node:events';
const emitter = new EventEmitter();
emitter.once('log', () => console.log('log once'));
// Returns a new Array with a function `onceWrapper` which has a property
// `listener` which contains the original listener bound above
const listeners = emitter.rawListeners('log');
const logFnWrapper = listeners[0];
// Logs "log once" to the console and does not unbind the `once` event
logFnWrapper.listener();
// Logs "log once" to the console and removes the listener
logFnWrapper();
emitter.on('log', () => console.log('log persistently'));
// Will return a new Array with a single function bound by `.on()` above
const newListeners = emitter.rawListeners('log');
// Logs "log persistently" twice
newListeners[0]();
emitter.emit('log');
@@ -162,14 +162,14 @@
Returns a reference to the EventEmitter
, so that calls can be chained.
Rest
...args: any[]v0.1.26
-By default EventEmitter
s will print a warning if more than 10
listeners are
+
By default EventEmitter
s will print a warning if more than 10
listeners are
added for a particular event. This is a useful default that helps finding
memory leaks. The emitter.setMaxListeners()
method allows the limit to be
modified for this specific EventEmitter
instance. The value can be set toInfinity
(or 0
) to indicate an unlimited number of listeners.
Returns a reference to the EventEmitter
, so that calls can be chained.
v0.3.5
Static
addStatic
addExperimental
Listens once to the abort
event on the provided signal
.
Listening to the abort
event on abort signals is unsafe and may
lead to resource leaks since another third party with the signal can
call e.stopImmediatePropagation()
. Unfortunately Node.js cannot change
diff --git a/classes/crowdsec_client.DecisionsWatcher.html b/classes/crowdsec_client.DecisionsWatcher.html
index ba09e9a8..e5608749 100644
--- a/classes/crowdsec_client.DecisionsWatcher.html
+++ b/classes/crowdsec_client.DecisionsWatcher.html
@@ -1,5 +1,5 @@
-
Protected
httpGenerated using TypeDoc
Protected
httpGenerated using TypeDoc
Private
Optional
Readonly
#passwordPrivate
Optional
Readonly
authPrivate
Optional
autoProtected
debugPrivate
Readonly
heartbeatPrivate
Optional
heartbeatReadonly
scenariosProtected
Static
httpPrivate
_loginProtected
_testPrivate
heartbeatPrivate
Optional
Readonly
#passwordPrivate
Optional
Readonly
authPrivate
Optional
autoProtected
debugPrivate
Readonly
heartbeatPrivate
Optional
heartbeatReadonly
scenariosProtected
Static
httpPrivate
_loginProtected
_testPrivate
heartbeatAllow to register a watcher on CLAPI you need to validate on the local machine
-Protected
setProtected
setProtected
Static
getHTTPClientStatic
registerGenerated using TypeDoc
Protected
setProtected
setProtected
Static
getHTTPClientStatic
registerGenerated using TypeDoc
Optional
exception: null | string | ErrorProtected
_messagecan also contain error like certificates error (https://nodejs.org/api/tls.html#tls_x509_certificate_error_codes) or other errors . Can be a string, or a number
-can also contain error like certificates error (https://nodejs.org/api/tls.html#tls_x509_certificate_error_codes) or other errors . Can be a string, or a number
-Generated using TypeDoc
Optional
exception: null | string | ErrorProtected
_messagecan also contain error like certificates error (https://nodejs.org/api/tls.html#tls_x509_certificate_error_codes) or other errors . Can be a string, or a number
+can also contain error like certificates error (https://nodejs.org/api/tls.html#tls_x509_certificate_error_codes) or other errors . Can be a string, or a number
+Generated using TypeDoc
Optional
options: IScenarioOptionsPrivate
allowedOptional
extractStatic
ipStatic
scenarioProtected
ipProtected
_checkProtected
getGenerated using TypeDoc
Optional
options: IScenarioOptionsPrivate
allowedOptional
extractStatic
ipStatic
scenarioProtected
ipProtected
_checkProtected
getGenerated using TypeDoc
Abstract
when creating a scenario, you need to add a static scenarioName
-Optional
options: IScenarioOptionsOptional
extractStatic
ipProtected
ipname of the scenario
-Static
scenarioProtected
_checkProtected
getGenerated using TypeDoc
Optional
options: IScenarioOptionsOptional
extractStatic
ipProtected
ipname of the scenario
+Static
scenarioProtected
_checkProtected
getGenerated using TypeDoc
Optional
options: IScenarioOptionsOptional
extractStatic
ipStatic
scenarioProtected
ipProtected
_checkProtected
getGenerated using TypeDoc
Optional
options: IScenarioOptionsOptional
extractStatic
ipStatic
scenarioProtected
ipProtected
_checkProtected
getGenerated using TypeDoc
when creating a scenario, you need to add a static scenarioName
-Optional
options: IScenarioOptionsPrivate
Readonly
currentOptional
extractPrivate
internalStatic
ipStatic
scenarioProtected
ipname of the scenario
-Protected
_checkProtected
getGenerated using TypeDoc
Optional
options: IScenarioOptionsPrivate
Readonly
currentOptional
extractPrivate
internalStatic
ipStatic
scenarioProtected
ipname of the scenario
+Protected
_checkProtected
getGenerated using TypeDoc
Optional
options: IScenarioOptionsReadonly
announceannounce current scenario to LAPI
-Private
Readonly
currentPrivate
extractPrivate
reverseStatic
ipStatic
Readonly
scenarioStatic
Readonly
scenarioProtected
ipProtected
_checkPrivate
extractPrivate
extractPrivate
generateProtected
getPrivate
getXForwardedGenerated using TypeDoc
Optional
options: IScenarioOptionsReadonly
announceannounce current scenario to LAPI
+Private
Readonly
currentPrivate
extractPrivate
reverseStatic
ipStatic
Readonly
scenarioStatic
Readonly
scenarioProtected
ipProtected
_checkPrivate
extractPrivate
extractPrivate
generateProtected
getPrivate
getXForwardedGenerated using TypeDoc
Optional
Readonly
bouncerPrivate
Readonly
clientPrivate
ipProtected
loggerPrivate
optionsOptional
Readonly
watcherPrivate
getOptional
Readonly
bouncerPrivate
Readonly
clientPrivate
ipProtected
loggerPrivate
optionsOptional
Readonly
watcherPrivate
getPrivate
getOptional
options: loggerOptionOptional
extendedName: stringProtected
middlewareGenerated using TypeDoc
Private
getOptional
options: loggerOptionOptional
extendedName: stringProtected
middlewareGenerated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Alert
-int32
-Optional
created_only relevant for GET, ignored in POST requests
-Optional
decisionsthe Meta of the events leading to overflow
-int32
-Optional
idonly relevant for GET, ignored in POST requests
-Optional
labelsOptional
machine_only relevant for LAPI->CAPI, ignored for cscli->LAPI and crowdsec->LAPI
-a human readable message
-Optional
metathe Meta data of the Alert itself
-Optional
remediationOptional
uuidonly relevant for LAPI->CAPI, ignored for cscli->LAPI and crowdsec->LAPI
-Generated using TypeDoc
Optional
created_only relevant for GET, ignored in POST requests
+Optional
decisionsthe Meta of the events leading to overflow
+int32
+Optional
idonly relevant for GET, ignored in POST requests
+Optional
labelsOptional
machine_only relevant for LAPI->CAPI, ignored for cscli->LAPI and crowdsec->LAPI
+a human readable message
+Optional
metathe Meta data of the Alert itself
+Optional
remediationOptional
uuidonly relevant for LAPI->CAPI, ignored for cscli->LAPI and crowdsec->LAPI
+Generated using TypeDoc
Create Alerts and return the IDs
-