/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { topicsBookmarkTopic } from "../funcs/topicsBookmarkTopic.js"; import { topicsCreateTopicPostPM } from "../funcs/topicsCreateTopicPostPM.js"; import { topicsCreateTopicTimer } from "../funcs/topicsCreateTopicTimer.js"; import { topicsGetTopic } from "../funcs/topicsGetTopic.js"; import { topicsGetTopicByExternalId } from "../funcs/topicsGetTopicByExternalId.js"; import { topicsInviteToTopic } from "../funcs/topicsInviteToTopic.js"; import { topicsListLatestTopics } from "../funcs/topicsListLatestTopics.js"; import { topicsListTopTopics } from "../funcs/topicsListTopTopics.js"; import { topicsRemoveTopic } from "../funcs/topicsRemoveTopic.js"; import { topicsSetNotificationLevel } from "../funcs/topicsSetNotificationLevel.js"; import { topicsUpdateTopic } from "../funcs/topicsUpdateTopic.js"; import { topicsUpdateTopicStatus } from "../funcs/topicsUpdateTopicStatus.js"; import { topicsUpdateTopicTimestamp } from "../funcs/topicsUpdateTopicTimestamp.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class Topics extends ClientSDK { /** * Bookmark topic */ async bookmarkTopic( apiKey: string, apiUsername: string, id: string, options?: RequestOptions, ): Promise { return unwrapAsync(topicsBookmarkTopic( this, apiKey, apiUsername, id, options, )); } /** * Creates a new topic, a new post, or a private message */ async createTopicPostPM( request?: operations.CreateTopicPostPMRequestBody | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(topicsCreateTopicPostPM( this, request, options, )); } /** * Create topic timer */ async createTopicTimer( apiKey: string, apiUsername: string, id: string, requestBody?: operations.CreateTopicTimerRequestBody | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(topicsCreateTopicTimer( this, apiKey, apiUsername, id, requestBody, options, )); } /** * Get a single topic */ async getTopic( apiKey: string, apiUsername: string, id: string, options?: RequestOptions, ): Promise { return unwrapAsync(topicsGetTopic( this, apiKey, apiUsername, id, options, )); } /** * Get topic by external_id */ async getTopicByExternalId( externalId: string, options?: RequestOptions, ): Promise { return unwrapAsync(topicsGetTopicByExternalId( this, externalId, options, )); } /** * Invite to topic */ async inviteToTopic( apiKey: string, apiUsername: string, id: string, requestBody?: operations.InviteToTopicRequestBody | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(topicsInviteToTopic( this, apiKey, apiUsername, id, requestBody, options, )); } /** * Get the latest topics */ async listLatestTopics( apiKey: string, apiUsername: string, ascending?: string | undefined, order?: string | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(topicsListLatestTopics( this, apiKey, apiUsername, ascending, order, options, )); } /** * Get the top topics filtered by period */ async listTopTopics( apiKey: string, apiUsername: string, period?: string | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(topicsListTopTopics( this, apiKey, apiUsername, period, options, )); } /** * Remove a topic */ async removeTopic( apiKey: string, apiUsername: string, id: string, options?: RequestOptions, ): Promise { return unwrapAsync(topicsRemoveTopic( this, apiKey, apiUsername, id, options, )); } /** * Set notification level */ async setNotificationLevel( apiKey: string, apiUsername: string, id: string, requestBody?: operations.SetNotificationLevelRequestBody | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(topicsSetNotificationLevel( this, apiKey, apiUsername, id, requestBody, options, )); } /** * Update a topic */ async updateTopic( apiKey: string, apiUsername: string, id: string, requestBody?: operations.UpdateTopicRequestBody | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(topicsUpdateTopic( this, apiKey, apiUsername, id, requestBody, options, )); } /** * Update the status of a topic */ async updateTopicStatus( apiKey: string, apiUsername: string, id: string, requestBody?: operations.UpdateTopicStatusRequestBody | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(topicsUpdateTopicStatus( this, apiKey, apiUsername, id, requestBody, options, )); } /** * Update topic timestamp */ async updateTopicTimestamp( apiKey: string, apiUsername: string, id: string, requestBody?: operations.UpdateTopicTimestampRequestBody | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(topicsUpdateTopicTimestamp( this, apiKey, apiUsername, id, requestBody, options, )); } }