/* eslint-disable @typescript-eslint/no-extraneous-class */
/**
 * A helper class to make sure routes user and reported by this service are consistent.
 */
export class RouteBuilder {
    /**
     * @param oid The org id.
     * @returns The path to the /folders/{oid} route.
     */
    static folders(oid) {
        return `/v1/orgs/${oid}/folders`;
    }
    /**
     * @returns The path to the /files/{oid} route.
     */
    static files(oid) {
        return `/v1/orgs/${oid}/files`;
    }
    /**
     * Used for SSE or WS to inform clients about a file being shared with the user.
     * @returns The path to the /files/access route.
     */
    static filesAccess(oid) {
        return `${RouteBuilder.files(oid)}/access`;
    }
    /**
     * @returns The path to the /files/{oid}/batch route.
     */
    static filesBatch(oid) {
        return `${RouteBuilder.files(oid)}/batch`;
    }
    /**
     * @returns The path to the /files/{oid}/[id] route.
     */
    static file(oid, key) {
        return `${RouteBuilder.files(oid)}/${key}`;
    }
    /**
     * @returns The path to the /files/{oid}/[id] route.
     */
    static fileMedia(oid, key) {
        return `${RouteBuilder.file(oid, key)}/media`;
    }
    /**
     * @returns The path to the /files/{oid}/[id]/users route.
     */
    static fileUsers(oid, file) {
        return `${RouteBuilder.file(oid, file)}/users`;
    }
    /**
     * @returns The path to the /file/{oid}/[id]/revisions route.
     */
    static fileRevisions(oid, file) {
        return `${RouteBuilder.file(oid, file)}/revisions`;
    }
    /**
     * @returns The path to the /file/{oid}/[id]/revisions route.
     */
    static fileBreadcrumbs(oid, file) {
        return `${RouteBuilder.file(oid, file)}/breadcrumbs`;
    }
    /**
     * @deprecated Not used anymore
     */
    static backend() {
        return '/store';
    }
    /**
     * @deprecated Not used anymore
     */
    static sessions() {
        return '/sessions';
    }
    /**
     * @deprecated Not used anymore
     */
    static sessionRenew() {
        return '/sessions/renew';
    }
    static history() {
        return `/history`;
    }
    static historyBatchCreate() {
        return `/history/batch/create`;
    }
    static historyBatchDelete() {
        return `/history/batch/delete`;
    }
    static historyItem(key) {
        return `/history/${key}`;
    }
    static historyClear(type, ...key) {
        return `/history/clear/${type}/${key.join('/')}`;
    }
    static shared(oid) {
        return `/v1/orgs/${oid}/shared`;
    }
    static trash(oid) {
        return `/v1/orgs/${oid}/trash`;
    }
    static trashItem(oid, trashKey) {
        // GET + DELETE (link to ./delete)
        return `${RouteBuilder.trash(oid)}/${trashKey}`;
    }
    static trashRestore(oid, trashKey) {
        return `${RouteBuilder.trashItem(oid, trashKey)}/restore`;
    }
    static trashEmpty(oid) {
        return `${RouteBuilder.trash(oid)}/empty`;
    }
    static trashBatchRestore(oid) {
        return `${RouteBuilder.trash(oid)}/restore`;
    }
    static trashBatchDelete(oid) {
        return `${RouteBuilder.trash(oid)}/delete`;
    }
    static projectExecutions() {
        return `/project/execution`;
    }
    static projectExecution(key) {
        return `/project/execution/${key}`;
    }
    static projectExecutionBulkDelete() {
        return `/project/execution/delete`;
    }
    static projectExecutionClear(scope) {
        return `/project/execution/clear/${scope}`;
    }
    static organizations() {
        return '/v1/orgs';
    }
    /**
     * @deprecated Not used anymore
     */
    static authLogin() {
        return '/auth/login';
    }
    static authGoogle() {
        return '/auth/google';
    }
    static authRenew() {
        return '/auth/renew';
    }
    /**
     * @deprecated Not used anymore
     */
    static authProvider(provider) {
        return `/auth/${provider}`;
    }
    /**
     * @deprecated Not used anymore
     */
    static authToken(code) {
        return `/auth/token/${code}`;
    }
    static usersMe() {
        return '/v1/users/me';
    }
    static users(oid) {
        return `/v1/orgs/${oid}/users`;
    }
    static user(oid, key) {
        return `/v1/orgs/${oid}/users/${key}`;
    }
}
//# sourceMappingURL=RouteBuilder.js.map