import qs from 'qs' import type { ApiClient } from '../../core/ApiClient' import type { ListQuery, Paginated, HasGetMany } from '../../core/types' import type { StickerUser } from './types' export class StickerUsersApi implements HasGetMany { private readonly client: ApiClient constructor(client: ApiClient) { this.client = client } /** * Returns a paginated list of sticker-user associations with their related file. * @permissions stickers.send */ getMany( query: ListQuery & { paginate: false }, headers?: Record, ): Promise getMany( query?: ListQuery & { paginate?: true }, headers?: Record, ): Promise> getMany( query?: ListQuery, headers?: Record, ): Promise | StickerUser[]> { const queryString = query ? `?${qs.stringify(query)}` : '' return this.client.get | StickerUser[]>( `/sticker-users${queryString}`, headers, ) } }