@api.global/typedserver
Version:
A TypeScript-based project for easy serving of static files with support for live reloading, compression, and typed requests.
80 lines (79 loc) • 2.98 kB
TypeScript
import * as plugins from './plugins.js';
export interface CacheStorage {
keys: () => Promise<string[]>;
match: any;
open: any;
delete: any;
}
export declare var caches: CacheStorage;
export interface IMessage_Serviceworker_Client_UpdateInfo extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IMessage_Serviceworker_Client_UpdateInfo> {
method: 'serviceworker_newVersion';
request: {
appVersion: string;
appHash: string;
};
response: {};
}
export interface IMessage_Serviceworker_Client_RequestReload extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IMessage_Serviceworker_Client_RequestReload> {
method: 'serviceworker_requestReload';
request: {};
response: {};
}
export interface IRequest_Serviceworker_Backend_VersionInfo extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IRequest_Serviceworker_Backend_VersionInfo> {
method: 'serviceworker_versionInfo';
request: {};
response: {
appHash: string;
appSemVer: string;
};
}
/**
* purges the service workers cache
*/
export interface IRequest_PurgeServiceWorkerCache extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IRequest_PurgeServiceWorkerCache> {
method: 'purgeServiceWorkerCache';
request: {};
response: {};
}
/**
* updates the info in all connected tabs
*/
export interface IMessage_Serviceworker_Client_UpdateInfo extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IMessage_Serviceworker_Client_UpdateInfo> {
method: 'serviceworker_newVersion';
request: {
appVersion: string;
appHash: string;
};
response: {};
}
/**
* requests all clients to reload
*/
export interface IMessage_Serviceworker_Client_RequestReload extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IMessage_Serviceworker_Client_RequestReload> {
method: 'serviceworker_requestReload';
request: {};
response: {};
}
/**
* updates version infos
*/
export interface IRequest_Serviceworker_Backend_VersionInfo extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IRequest_Serviceworker_Backend_VersionInfo> {
method: 'serviceworker_versionInfo';
request: {};
response: {
appHash: string;
appSemVer: string;
};
}
/**
* ensures a stable connection between clients and the serviceworker
*/
export interface IRequest_Client_Serviceworker_ConnectionPolling extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IRequest_Client_Serviceworker_ConnectionPolling> {
method: 'broadcastConnectionPolling';
request: {
tabId: string;
};
response: {
serviceworkerId: string;
};
}