/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { catalogEntriesCreate } from "../funcs/catalogEntriesCreate.js"; import { catalogEntriesDelete } from "../funcs/catalogEntriesDelete.js"; import { catalogEntriesList } from "../funcs/catalogEntriesList.js"; import { catalogEntriesShow } from "../funcs/catalogEntriesShow.js"; import { catalogEntriesUpdate } from "../funcs/catalogEntriesUpdate.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 CatalogEntries extends ClientSDK { /** * ListEntries Catalog V2 * * @remarks * List entries for a catalog type. */ async list( request: operations.CatalogV2NumberListEntriesRequest, options?: RequestOptions, ): Promise { return unwrapAsync(catalogEntriesList( this, request, options, )); } /** * CreateEntry Catalog V2 * * @remarks * Create an entry within the catalog. We support a maximum of 50,000 entries per type. * * If you call this API with a payload where the external_id and catalog_type_id match an existing entry, the existing entry will be updated. */ async create( request: components.CreateEntryRequestBody, options?: RequestOptions, ): Promise { return unwrapAsync(catalogEntriesCreate( this, request, options, )); } /** * DestroyEntry Catalog V2 * * @remarks * Archives a catalog entry. */ async delete( request: operations.CatalogV2NumberDestroyEntryRequest, options?: RequestOptions, ): Promise { return unwrapAsync(catalogEntriesDelete( this, request, options, )); } /** * ShowEntry Catalog V2 * * @remarks * Show a single catalog entry. */ async show( request: operations.CatalogV2NumberShowEntryRequest, options?: RequestOptions, ): Promise { return unwrapAsync(catalogEntriesShow( this, request, options, )); } /** * UpdateEntry Catalog V2 * * @remarks * Updates an existing catalog entry. */ async update( request: operations.CatalogV2NumberUpdateEntryRequest, options?: RequestOptions, ): Promise { return unwrapAsync(catalogEntriesUpdate( this, request, options, )); } }