import { RpcMethod } from './commonTypes'; export type DeeplinksService_List = RpcMethod; export type DeeplinksService_Get = RpcMethod; export type DeeplinksService_Create = RpcMethod; export type DeeplinksService_Update = RpcMethod; export type DeeplinksService_Delete = RpcMethod; export type DeeplinksService_GetLinkContent = RpcMethod; export interface DeeplinksService { /** Lists deeplinks configured for an application (code XXXXX-XXXXX), ordered by name or creation date, with paging and an optional name/code/template substring filter. Use to browse deeplinks or find a deeplink code before fetching or editing one. */ List: DeeplinksService_List; /** Returns a single deeplink by its deeplink code, including name, URL template and system flag. Use after list_deeplinks to inspect one deeplink. */ Get: DeeplinksService_Get; /** Creates a deeplink in an application (code XXXXX-XXXXX) from a name and a URL template with {placeholder} tokens, returning the generated deeplink code. Use update_deeplink to edit an existing one instead. */ Create: DeeplinksService_Create; /** Updates a deeplink's name and/or URL template by deeplink code, overwriting the stored values (empty fields are left unchanged). Use create_deeplink to add a new deeplink. */ Update: DeeplinksService_Update; /** Permanently deletes a deeplink by deeplink code. Only deeplinks owned by the caller's account can be deleted, and the removal cannot be undone. */ Delete: DeeplinksService_Delete; /** * Fetches the given http(s) URL and returns an HTML head fragment containing only its og:* meta tags. Use to preview link metadata (title/image) when building a deeplink; reaches out to the external URL. * POST is used instead of GET because the uri parameter may contain * arbitrarily long URLs that exceed HTTP query-string length limits. */ GetLinkContent: DeeplinksService_GetLinkContent; } export type ListDeeplinksRequest_OrderBy = 'NAME' | 'CREATED'; export type ListDeeplinksRequest_OrderDirection = 'ASC' | 'DESC'; export type ListDeeplinksRequest = { /** Application code (format XXXXX-XXXXX) whose deeplinks to list. */ application?: string; orderBy?: ListDeeplinksRequest_OrderBy; orderDirection?: ListDeeplinksRequest_OrderDirection; page?: number; perPage?: number; /** Case-insensitive substring filter matched against deeplink name, code or template. */ searchByName?: string; }; export type Deeplink = { name: string; code: string; template: string; system: boolean; created: Date; }; export type ListDeeplinksResponse = { deeplinks: Deeplink[]; page: number; perPage: number; total: number; }; export type GetDeeplinkRequest = { /** Deeplink code identifying the deeplink to return. */ code?: string; }; export type GetDeeplinkResponse = { deeplink: Deeplink; }; export type CreateDeeplinkRequest = { /** Application code (format XXXXX-XXXXX) the deeplink belongs to. */ application?: string; /** Human-readable deeplink name, 1-32 characters. */ name?: string; /** URL template, 1-1024 chars, with {placeholder} tokens; must have a scheme and host. */ template?: string; /** whether deeplink is system */ system?: boolean; }; export type CreateDeeplinkResponse = { deeplink: Deeplink; }; export type UpdateDeeplinkRequest = { /** Deeplink code identifying the deeplink to update. */ code?: string; /** New deeplink name, 1-32 characters; empty leaves the name unchanged. */ name?: string; /** New URL template with {placeholder} tokens; empty leaves the template unchanged. */ template?: string; }; export type UpdateDeeplinkResponse = {}; export type DeleteDeeplinkRequest = { /** Deeplink code identifying the deeplink to delete. */ code?: string; }; export type DeleteDeeplinkResponse = {}; export type GetLinkContentRequest = { /** Absolute http(s) URL to fetch and extract og:* meta tags from. */ uri?: string; }; export type GetLinkContentResponse = { /** Full HTML document containing only the og:* meta tags from the fetched page. */ content: string; };