35 lines
1.3 KiB
TypeScript
35 lines
1.3 KiB
TypeScript
import { OlmMachine } from "@matrix-org/matrix-sdk-crypto-wasm";
|
|
import { IHttpOpts, MatrixHttpApi } from "../http-api";
|
|
import { UIAuthCallback } from "../interactive-auth";
|
|
/**
|
|
* Common interface for all the request types returned by `OlmMachine.outgoingRequests`.
|
|
*
|
|
* @internal
|
|
*/
|
|
export interface OutgoingRequest {
|
|
readonly id: string | undefined;
|
|
readonly type: number;
|
|
}
|
|
/**
|
|
* OutgoingRequestManager: turns `OutgoingRequest`s from the rust sdk into HTTP requests
|
|
*
|
|
* We have one of these per `RustCrypto` (and hence per `MatrixClient`), not that it does anything terribly complicated.
|
|
* It's responsible for:
|
|
*
|
|
* * holding the reference to the `MatrixHttpApi`
|
|
* * turning `OutgoingRequest`s from the rust backend into HTTP requests, and sending them
|
|
* * sending the results of such requests back to the rust backend.
|
|
*
|
|
* @internal
|
|
*/
|
|
export declare class OutgoingRequestProcessor {
|
|
private readonly olmMachine;
|
|
private readonly http;
|
|
constructor(olmMachine: OlmMachine, http: MatrixHttpApi<IHttpOpts & {
|
|
onlyData: true;
|
|
}>);
|
|
makeOutgoingRequest<T>(msg: OutgoingRequest, uiaCallback?: UIAuthCallback<T>): Promise<void>;
|
|
private makeRequestWithUIA;
|
|
private rawJsonRequest;
|
|
}
|
|
//# sourceMappingURL=OutgoingRequestProcessor.d.ts.map
|