import Base, { MaybeRaw } from "../../../Base"; import { Short, ShortType } from "../../../interfaces/shorts"; export declare class ShortsInternal extends Base { /** * Generates a shortened alias for the provided long URL and sets a maximum number of allowed visits. * * This is an internal endpoint and can only be used from backends within the hcloud deployment. * * @param organizationId ID of the organization * @param spaceId ID of the space * @param url Original long URL that needs to be shortened * @param type Type of the short URL, can be GENERIC or COSMO * @param visitsLimit Optional maximum number of times the shortened link can be accessed, after which it will become inactive (max 100 for GENERIC type) * @param expireDate Optional expiration date for the shortened URL, represented as a timestamp in milliseconds * * @returns the created short url */ createShort(organizationId: string, spaceId: string, url: string, type?: ShortType, visitsLimit?: number, expireDate?: number, raw?: { raw: R; }): Promise>; /** * Retrieves the full data associated with a shortened URL slug, including the original long URL, the current number of visits, and the maximum allowed visit limit. * * This is an internal endpoint and can only be used from backends within the hcloud deployment. * * @param slug Unique identifier or alias representing the shortened version of a URL * @returns detailed information about this short url slug */ getShort(slug: string, raw?: { raw: R; }): Promise>; /** * Updates the maximum allowed visit limit for a shortened URL identified by its slug. * * This is an internal endpoint and can only be used from backends within the hcloud deployment. * * @param slug Unique identifier representing the shortened version of a URL * @param visitsLimit New maximum number of allowed visits for this shortened URL * @returns The updated Short object with the new visit limit */ updateVisitsLimit(slug: string, visitsLimit: number, raw?: { raw: R; }): Promise>; /** * Deletes the shortened URL associated with the given slug. * * This is an internal endpoint and can only be used from backends within the hcloud deployment. * * @param slug Unique identifier representing the shortened version of a URL */ deleteShort(slug: string, raw?: { raw: R; }): Promise>; /** * Deletes all shortened URLs associated with the given space ID. * * This is an internal endpoint and can only be used from backends within the hcloud deployment. * * @param spaceId ID of the space whose shortened URLs should be deleted */ deleteSpaceShorts(spaceId: string, raw?: { raw: R; }): Promise>; /** * Deletes all shortened URLs associated with the given organization ID. * * This is an internal endpoint and can only be used from backends within the hcloud deployment. * * @param orgId ID of the organization whose shortened URLs should be deleted */ deleteOrganizationShorts(orgId: string, raw?: { raw: R; }): Promise>; protected getEndpoint(endpoint: string): string; }