/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: ac4fb91cc5d4 */ import { clientShortcutsCreate } from "../funcs/clientShortcutsCreate.js"; import { clientShortcutsDelete } from "../funcs/clientShortcutsDelete.js"; import { clientShortcutsList } from "../funcs/clientShortcutsList.js"; import { clientShortcutsRetrieve } from "../funcs/clientShortcutsRetrieve.js"; import { clientShortcutsUpdate } from "../funcs/clientShortcutsUpdate.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import { unwrapAsync } from "../types/fp.js"; export class ClientShortcuts extends ClientSDK { /** * Create shortcut * * @remarks * Create a user-generated shortcut that contains an alias and destination URL. */ async create( createShortcutRequest: components.CreateShortcutRequest, locale?: string | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(clientShortcutsCreate( this, createShortcutRequest, locale, options, )); } /** * Delete shortcut * * @remarks * Delete an existing user-generated shortcut. */ async delete( deleteShortcutRequest: components.DeleteShortcutRequest, locale?: string | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(clientShortcutsDelete( this, deleteShortcutRequest, locale, options, )); } /** * Read shortcut * * @remarks * Read a particular shortcut's details given its ID. */ async retrieve( getShortcutRequest: components.GetShortcutRequestUnion, locale?: string | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(clientShortcutsRetrieve( this, getShortcutRequest, locale, options, )); } /** * List shortcuts * * @remarks * List shortcuts editable/owned by the currently authenticated user. */ async list( listShortcutsPaginatedRequest: components.ListShortcutsPaginatedRequest, locale?: string | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(clientShortcutsList( this, listShortcutsPaginatedRequest, locale, options, )); } /** * Update shortcut * * @remarks * Updates the shortcut with the given ID. */ async update( updateShortcutRequest: components.UpdateShortcutRequest, locale?: string | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(clientShortcutsUpdate( this, updateShortcutRequest, locale, options, )); } }