matssocket
Version:
MatsSocket client library
51 lines • 1.94 kB
TypeScript
/**
* Fractional milliseconds for high-res timing.
*/
export type FractionalMillis = number;
/**
* Timestamp, millis-since-epoch.
*/
export type Timestamp = number;
/**
* Sent by the MatsSocket, via the {@link MatsSocket#setAuthorizationExpiredCallback}, when it requires new or
* revalidated authentication by the client.
*
* @param {AuthorizationRequiredEventType} type - {@link AuthorizationRequiredEvent#type}
* @param {Timestamp} currentExpirationTimestamp - {@link AuthorizationRequiredEvent#currentExpirationTimestamp}
* @class
*/
export function AuthorizationRequiredEvent(type: AuthorizationRequiredEventType, currentExpirationTimestamp: Timestamp): void;
export class AuthorizationRequiredEvent {
/**
* Sent by the MatsSocket, via the {@link MatsSocket#setAuthorizationExpiredCallback}, when it requires new or
* revalidated authentication by the client.
*
* @param {AuthorizationRequiredEventType} type - {@link AuthorizationRequiredEvent#type}
* @param {Timestamp} currentExpirationTimestamp - {@link AuthorizationRequiredEvent#currentExpirationTimestamp}
* @class
*/
constructor(type: AuthorizationRequiredEventType, currentExpirationTimestamp: Timestamp);
/**
* Type of the event, one of {@link AuthorizationRequiredEventType}.
*
* @type {AuthorizationRequiredEventType}
*/
type: AuthorizationRequiredEventType;
/**
* Millis-since-epoch when the current Authorization expires - note that this might well still be in the future,
* but the "slack" left before expiration is used up.
*
* @type {Timestamp}
*/
currentExpirationTimestamp: Timestamp;
}
/**
* *
*/
export type AuthorizationRequiredEventType = string;
export namespace AuthorizationRequiredEventType {
let NOT_PRESENT: string;
let EXPIRED: string;
let REAUTHENTICATE: string;
}
//# sourceMappingURL=AuthorizationRequiredEvent.d.ts.map