/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as operations from "../models/operations/index.js"; import { APIPromise } from "../types/async.js"; import { unwrapAsync } from "../types/fp.js"; import { PageIterator, unwrapResultIterator } from "../types/operations.js"; let issueTrackingCollectionTicketCommentsList$module: | Promise< typeof import("../funcs/issueTrackingCollectionTicketCommentsList.js") > | undefined; const issueTrackingCollectionTicketCommentsList = (( ...args: Parameters< typeof import("../funcs/issueTrackingCollectionTicketCommentsList.js").issueTrackingCollectionTicketCommentsList > ) => new APIPromise( (issueTrackingCollectionTicketCommentsList$module ??= import( "../funcs/issueTrackingCollectionTicketCommentsList.js" ).catch((error: unknown) => { issueTrackingCollectionTicketCommentsList$module = undefined; throw error; })).then((module) => module.issueTrackingCollectionTicketCommentsList(...args).$inspect() ), )) as typeof import("../funcs/issueTrackingCollectionTicketCommentsList.js").issueTrackingCollectionTicketCommentsList; let issueTrackingCollectionTicketCommentsCreate$module: | Promise< typeof import("../funcs/issueTrackingCollectionTicketCommentsCreate.js") > | undefined; const issueTrackingCollectionTicketCommentsCreate = (( ...args: Parameters< typeof import("../funcs/issueTrackingCollectionTicketCommentsCreate.js").issueTrackingCollectionTicketCommentsCreate > ) => new APIPromise( (issueTrackingCollectionTicketCommentsCreate$module ??= import( "../funcs/issueTrackingCollectionTicketCommentsCreate.js" ).catch((error: unknown) => { issueTrackingCollectionTicketCommentsCreate$module = undefined; throw error; })).then((module) => module.issueTrackingCollectionTicketCommentsCreate(...args).$inspect() ), )) as typeof import("../funcs/issueTrackingCollectionTicketCommentsCreate.js").issueTrackingCollectionTicketCommentsCreate; let issueTrackingCollectionTicketCommentsGet$module: | Promise< typeof import("../funcs/issueTrackingCollectionTicketCommentsGet.js") > | undefined; const issueTrackingCollectionTicketCommentsGet = (( ...args: Parameters< typeof import("../funcs/issueTrackingCollectionTicketCommentsGet.js").issueTrackingCollectionTicketCommentsGet > ) => new APIPromise( (issueTrackingCollectionTicketCommentsGet$module ??= import( "../funcs/issueTrackingCollectionTicketCommentsGet.js" ).catch((error: unknown) => { issueTrackingCollectionTicketCommentsGet$module = undefined; throw error; })).then((module) => module.issueTrackingCollectionTicketCommentsGet(...args).$inspect() ), )) as typeof import("../funcs/issueTrackingCollectionTicketCommentsGet.js").issueTrackingCollectionTicketCommentsGet; let issueTrackingCollectionTicketCommentsUpdate$module: | Promise< typeof import("../funcs/issueTrackingCollectionTicketCommentsUpdate.js") > | undefined; const issueTrackingCollectionTicketCommentsUpdate = (( ...args: Parameters< typeof import("../funcs/issueTrackingCollectionTicketCommentsUpdate.js").issueTrackingCollectionTicketCommentsUpdate > ) => new APIPromise( (issueTrackingCollectionTicketCommentsUpdate$module ??= import( "../funcs/issueTrackingCollectionTicketCommentsUpdate.js" ).catch((error: unknown) => { issueTrackingCollectionTicketCommentsUpdate$module = undefined; throw error; })).then((module) => module.issueTrackingCollectionTicketCommentsUpdate(...args).$inspect() ), )) as typeof import("../funcs/issueTrackingCollectionTicketCommentsUpdate.js").issueTrackingCollectionTicketCommentsUpdate; let issueTrackingCollectionTicketCommentsDelete$module: | Promise< typeof import("../funcs/issueTrackingCollectionTicketCommentsDelete.js") > | undefined; const issueTrackingCollectionTicketCommentsDelete = (( ...args: Parameters< typeof import("../funcs/issueTrackingCollectionTicketCommentsDelete.js").issueTrackingCollectionTicketCommentsDelete > ) => new APIPromise( (issueTrackingCollectionTicketCommentsDelete$module ??= import( "../funcs/issueTrackingCollectionTicketCommentsDelete.js" ).catch((error: unknown) => { issueTrackingCollectionTicketCommentsDelete$module = undefined; throw error; })).then((module) => module.issueTrackingCollectionTicketCommentsDelete(...args).$inspect() ), )) as typeof import("../funcs/issueTrackingCollectionTicketCommentsDelete.js").issueTrackingCollectionTicketCommentsDelete; export class CollectionTicketComments extends ClientSDK { /** * List Comments * * @remarks * List Comments */ async list( request: operations.IssueTrackingCollectionTicketCommentsAllRequest, options?: RequestOptions, ): Promise< PageIterator< operations.IssueTrackingCollectionTicketCommentsAllResponse, { cursor: string } > > { return unwrapResultIterator(issueTrackingCollectionTicketCommentsList( this, request, options, )); } /** * Create Comment * * @remarks * Create Comment */ async create( request: operations.IssueTrackingCollectionTicketCommentsAddRequest, options?: RequestOptions, ): Promise { return unwrapAsync(issueTrackingCollectionTicketCommentsCreate( this, request, options, )); } /** * Get Comment * * @remarks * Get Comment */ async get( request: operations.IssueTrackingCollectionTicketCommentsOneRequest, options?: RequestOptions, ): Promise< PageIterator< operations.IssueTrackingCollectionTicketCommentsOneResponse, { cursor: string } > > { return unwrapResultIterator(issueTrackingCollectionTicketCommentsGet( this, request, options, )); } /** * Update Comment * * @remarks * Update Comment */ async update( request: operations.IssueTrackingCollectionTicketCommentsUpdateRequest, options?: RequestOptions, ): Promise { return unwrapAsync(issueTrackingCollectionTicketCommentsUpdate( this, request, options, )); } /** * Delete Comment * * @remarks * Delete Comment */ async delete( request: operations.IssueTrackingCollectionTicketCommentsDeleteRequest, options?: RequestOptions, ): Promise { return unwrapAsync(issueTrackingCollectionTicketCommentsDelete( this, request, options, )); } }