Files
dspace-angular/src/config/auto-sync-config.interface.ts
2019-02-19 17:46:34 +01:00

31 lines
705 B
TypeScript

import { RestRequestMethod } from '../app/core/data/rest-request-method';
/**
* The number of seconds between automatic syncs to the
* server for requests using a certain HTTP Method
*/
type TimePerMethod = {
[method in RestRequestMethod]: number;
};
/**
* The config that determines how the automatic syncing
* of changed data to the server works
*/
export interface AutoSyncConfig {
/**
* The number of seconds between automatic syncs to the server
*/
defaultTime: number;
/**
* HTTP Method specific overrides of defaultTime
*/
timePerMethod: TimePerMethod;
/**
* The max number of requests in the buffer before a sync to the server
*/
maxBufferSize: number;
}