mpp-sdk
Version:
SDK to talk to the Memento Payments Platform
20 lines (19 loc) • 735 B
TypeScript
import { MPPConfig } from "../index.js";
import { SessionToken } from "../types/index.js";
import { AxiosInstance } from "axios";
import TokensEndpoint from "./tokens";
export default class SessionsEndpoint {
protected http: AxiosInstance;
protected config: MPPConfig;
protected tokens: TokensEndpoint;
private renewingSessionPromise;
private session;
constructor(http: AxiosInstance, config: MPPConfig, tokens: TokensEndpoint);
get hasSession(): boolean;
get token(): string | undefined;
hasAuthToken(): Promise<boolean>;
renew(): Promise<void>;
create(): Promise<import("axios").AxiosResponse<SessionToken>>;
verify(): Promise<import("axios").AxiosResponse<any>>;
clear(): void;
}