/* 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 to patch file access.
     */
    static filesAccess(oid, fid) {
        return `${RouteBuilder.file(oid, fid)}/access`;
    }
    /**
     * @returns The path to the /files/{oid}/batch/read-meta route.
     */
    static filesBatch(oid) {
        return `${RouteBuilder.files(oid)}/batch/read-meta`;
    }
    /**
     * @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';
    }
    static organization(oid) {
        return `/v1/orgs/${oid}`;
    }
    static organizationUsers(oid) {
        return `${this.organization(oid)}/users`;
    }
    static organizationUserBatch(oid) {
        return `${this.organization(oid)}/users/batch/read`;
    }
    static organizationUser(oid, key) {
        return `${this.organization(oid)}/users/${key}`;
    }
    static organizationUserDeactivate(oid, key) {
        return `${this.organization(oid)}/users/${key}/deactivate`;
    }
    static organizationUserActivate(oid, key) {
        return `${this.organization(oid)}/users/${key}/activate`;
    }
    /**
     * @deprecated Use `organizationUsers` instead.
     */
    static users(oid) {
        return `${this.organization(oid)}/users`;
    }
    /**
     * @deprecated Use `organizationUser` instead.
     */
    static user(oid, key) {
        return `${this.organization(oid)}/users/${key}`;
    }
    static invitations(oid) {
        return `${this.organization(oid)}/invitations`;
    }
    static invitation(oid, id) {
        return `${this.invitations(oid)}/${id}`;
    }
    static findInvitation() {
        return `${this.organizations()}/find-invitation`;
    }
    static declineInvitation(oid, id) {
        return `${this.invitation(oid, id)}/decline`;
    }
    static resendInvitation(oid, id) {
        return `${this.invitation(oid, id)}/resend`;
    }
    /**
     * @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 dataCatalog() {
        return '/v1/datacatalog';
    }
    static dataCatalogStatus(domainId) {
        return `${RouteBuilder.dataCatalog()}/status/${domainId}`;
    }
    static dataCatalogEntry(domainId) {
        return `${RouteBuilder.dataCatalog()}/${domainId}`;
    }
    static dataCatalogEntryVersions(entryId) {
        return `${RouteBuilder.dataCatalogEntry(entryId)}/versions`;
    }
    static dataCatalogDependencies() {
        return `${RouteBuilder.dataCatalog()}/dependencies`;
    }
    static dataCatalogVersion(entryId, version) {
        return `${RouteBuilder.dataCatalogEntry(entryId)}/${version}`;
    }
    static dataCatalogDeprecate(entryId) {
        return `${RouteBuilder.dataCatalogEntry(entryId)}/deprecate`;
    }
    static dataCatalogUnpublish(entryId) {
        return `${RouteBuilder.dataCatalogEntry(entryId)}/unpublish`;
    }
    static dataCatalogVersionDeprecate(entryId, version) {
        return `${RouteBuilder.dataCatalogVersion(entryId, version)}/deprecate`;
    }
    static dataCatalogVersionUnpublish(entryId, version) {
        return `${RouteBuilder.dataCatalogVersion(entryId, version)}/unpublish`;
    }
    static groups(oid) {
        return `/v1/orgs/${oid}/groups`;
    }
    static group(oid, gid) {
        return `/v1/orgs/${oid}/groups/${gid}`;
    }
    static groupUsers(oid, gid) {
        return `/v1/orgs/${oid}/groups/${gid}/users`;
    }
}
//# sourceMappingURL=RouteBuilder.js.map