Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions packages/sdk-backend/src/typing.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ declare module "caido:plugin" {
import type {
Connection,
EnvironmentSDK,
Finding,
FindingsSDK,
GraphQLSDK,
HostedFileSDK,
Expand Down Expand Up @@ -266,6 +267,22 @@ declare module "caido:plugin" {
request: RequestSpecRaw,
) => MaybePromise<UpstreamResult>,
): void;

/**
* Callback called when a finding is created.
*
* This callback is called asynchronously and cannot modify the finding.
*
* @example
* ```ts
* sdk.events.onFindingCreated((sdk, finding) => {
* // Do something with the finding
* });
* ```
*/
onFindingCreated(
callback: (sdk: SDK<API, Events>, finding: Finding) => MaybePromise<void>,
): void;
};

/**
Expand Down
Loading