33 lines
1.0 KiB
TypeScript
33 lines
1.0 KiB
TypeScript
import { CapabilityPoller } from "./capabilityPoller.ts";
|
|
import { type IHttpOpts, type MatrixHttpApi } from "./http-api/index.ts";
|
|
import type { Logger } from "./logger.ts";
|
|
export interface RetentionConfigurationResponse {
|
|
policies?: Record<string, {
|
|
max_lifetime?: number;
|
|
min_lifetime?: number;
|
|
}>;
|
|
limits?: {
|
|
min_lifetime?: {
|
|
min?: number;
|
|
max?: number;
|
|
};
|
|
max_lifetime?: {
|
|
min?: number;
|
|
max?: number;
|
|
};
|
|
};
|
|
}
|
|
/**
|
|
* Manages storing and periodically refreshing the server capabilities.
|
|
*/
|
|
export declare class RetentionPolicyService extends CapabilityPoller<RetentionConfigurationResponse> {
|
|
constructor(logger: Logger, http: MatrixHttpApi<IHttpOpts & {
|
|
onlyData: true;
|
|
}>);
|
|
/**
|
|
* Fetches the latest server capabilities from the homeserver and returns them, or rejects
|
|
* on failure.
|
|
*/
|
|
fetch: () => Promise<RetentionConfigurationResponse>;
|
|
}
|
|
//# sourceMappingURL=retentionPolicy.d.ts.map
|