/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 681d3a98b73a */ import { clientPinsCreate } from "../funcs/clientPinsCreate.js"; import { clientPinsList } from "../funcs/clientPinsList.js"; import { clientPinsRemove } from "../funcs/clientPinsRemove.js"; import { clientPinsRetrieve } from "../funcs/clientPinsRetrieve.js"; import { clientPinsUpdate } from "../funcs/clientPinsUpdate.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class Pins extends ClientSDK { /** * Update pin * * @remarks * Update an existing user-generated pin. */ async update( editPinRequest: components.EditPinRequest, locale?: string | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(clientPinsUpdate( this, editPinRequest, locale, options, )); } /** * Read pin * * @remarks * Read pin details given its ID. */ async retrieve( getPinRequest: components.GetPinRequest, locale?: string | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(clientPinsRetrieve( this, getPinRequest, locale, options, )); } /** * List pins * * @remarks * Lists all pins. */ async list( requestBody: operations.ListpinsRequestBody, locale?: string | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(clientPinsList( this, requestBody, locale, options, )); } /** * Create pin * * @remarks * Pin a document as a result for a given search query.Pin results that are known to be a good match. */ async create( pinRequest: components.PinRequest, locale?: string | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(clientPinsCreate( this, pinRequest, locale, options, )); } /** * Delete pin * * @remarks * Unpin a previously pinned result. */ async remove( unpin: components.Unpin, locale?: string | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(clientPinsRemove( this, unpin, locale, options, )); } }