Skip to content

Commit 943743e

Browse files
committed
port Backend interface to Client
1 parent d68aa40 commit 943743e

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

packages/types/src/client.ts

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,12 @@ export interface Client<O extends Options = Options> {
6060
/** Returns the current options. */
6161
getOptions(): O;
6262

63-
/** Returns clients transport. */
63+
/**
64+
* Returns the transport that is used by the client.
65+
* Please note that the transport gets lazy initialized so it will only be there once the first event has been sent.
66+
*
67+
* @returns The transport.
68+
*/
6469
getTransport?(): Transport;
6570

6671
/**
@@ -88,4 +93,17 @@ export interface Client<O extends Options = Options> {
8893

8994
/** This is an internal function to setup all integrations that should run on the client */
9095
setupIntegrations(): void;
96+
97+
/** Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`. */
98+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
99+
eventFromException(exception: any, hint?: EventHint): PromiseLike<Event>;
100+
101+
/** Creates an {@link Event} from primitive inputs to `captureMessage`. */
102+
eventFromMessage(message: string, level?: Severity, hint?: EventHint): PromiseLike<Event>;
103+
104+
/** Submits the event to Sentry */
105+
sendEvent(event: Event): void;
106+
107+
/** Submits the session to Sentry */
108+
sendSession(session: Session): void;
91109
}

0 commit comments

Comments
 (0)