@borealise/api 2.1.0-alpha.3 → 2.1.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -431,7 +431,7 @@ interface BoothResponse {
431
431
  interface VoteResponse {
432
432
  success: boolean;
433
433
  data: {
434
- vote: 'woot' | 'meh';
434
+ vote: 'woot' | 'meh' | null;
435
435
  votes: {
436
436
  woots: number;
437
437
  mehs: number;
@@ -446,6 +446,28 @@ interface GrabResponse {
446
446
  message: string;
447
447
  };
448
448
  }
449
+ interface RoomCustomEmoji {
450
+ id: string;
451
+ name: string;
452
+ image_url: string;
453
+ animated: boolean;
454
+ created_by: number;
455
+ created_at: number;
456
+ }
457
+ interface RoomCustomSticker {
458
+ id: string;
459
+ name: string;
460
+ image_url: string;
461
+ created_by: number;
462
+ created_at: number;
463
+ }
464
+ interface RoomAssetsResponse {
465
+ success: boolean;
466
+ data: {
467
+ emojis: RoomCustomEmoji[];
468
+ stickers: RoomCustomSticker[];
469
+ };
470
+ }
449
471
  interface PlayHistoryItem {
450
472
  id: number;
451
473
  userId: number;
@@ -613,6 +635,38 @@ interface RoomResource {
613
635
  }>>;
614
636
  vote(slug: string, type: 'woot' | 'meh'): Promise<ApiResponse<VoteResponse>>;
615
637
  grabTrack(slug: string, playlistId?: number): Promise<ApiResponse<GrabResponse>>;
638
+ getAssets(slug: string): Promise<ApiResponse<RoomAssetsResponse>>;
639
+ createEmoji(slug: string, data: {
640
+ name?: string;
641
+ file: File | Blob;
642
+ animated?: boolean;
643
+ }): Promise<ApiResponse<{
644
+ success: boolean;
645
+ data: {
646
+ emojis: RoomCustomEmoji[];
647
+ };
648
+ }>>;
649
+ deleteEmoji(slug: string, emojiId: string): Promise<ApiResponse<{
650
+ success: boolean;
651
+ data: {
652
+ emojis: RoomCustomEmoji[];
653
+ };
654
+ }>>;
655
+ createSticker(slug: string, data: {
656
+ name?: string;
657
+ file: File | Blob;
658
+ }): Promise<ApiResponse<{
659
+ success: boolean;
660
+ data: {
661
+ stickers: RoomCustomSticker[];
662
+ };
663
+ }>>;
664
+ deleteSticker(slug: string, stickerId: string): Promise<ApiResponse<{
665
+ success: boolean;
666
+ data: {
667
+ stickers: RoomCustomSticker[];
668
+ };
669
+ }>>;
616
670
  getHistory(slug: string, page?: number, limit?: number): Promise<ApiResponse<RoomHistoryResponse>>;
617
671
  getAuditLog(slug: string, limit?: number, before?: string): Promise<ApiResponse<RoomAuditLogResponse>>;
618
672
  activity(limit?: number): Promise<ApiResponse<DashboardActivityResponse>>;
@@ -654,6 +708,20 @@ interface ChatMessageResponse {
654
708
  message: ChatMessage;
655
709
  };
656
710
  }
711
+ interface GifSearchItem {
712
+ id: string;
713
+ title: string;
714
+ url: string;
715
+ preview_url: string | null;
716
+ width: number | null;
717
+ height: number | null;
718
+ }
719
+ interface GifSearchResponse {
720
+ success: boolean;
721
+ data: {
722
+ gifs: GifSearchItem[];
723
+ };
724
+ }
657
725
  interface ChatResource {
658
726
  sendMessage(slug: string, data: SendMessageData): Promise<ApiResponse<ChatMessageResponse>>;
659
727
  getMessages(slug: string, before?: string, limit?: number): Promise<ApiResponse<ChatMessagesResponse>>;
@@ -662,6 +730,7 @@ interface ChatResource {
662
730
  success: boolean;
663
731
  data: null;
664
732
  }>>;
733
+ searchGifs(query: string, limit?: number): Promise<ApiResponse<GifSearchResponse>>;
665
734
  }
666
735
  declare const createChatResource: (api: Api) => ChatResource;
667
736
 
@@ -1074,4 +1143,4 @@ interface ApiClient {
1074
1143
  }
1075
1144
  declare const createApiClient: (config: ApiConfig) => ApiClient;
1076
1145
 
1077
- export { type AccountViolation, type AddMediaData, type AddViolationResponse, type AdminListUsersParams, type AdminResource, type AdminStatsResponse, type AdminStatsRoom, type AdminUserEntry, type AdminUsersResponse, type Api, type ApiClient, type ApiConfig, ApiError, type ApiQueryParams, type ApiRequestConfig, type ApiResponse, type AuditAction, type AuthResource, type AuthUser, type AvatarCatalogItem, type AvatarCatalogResponse, type AvatarUnlockType, type BackendErrorResponse, type BanResponse, type BoothDJ, type BoothMedia, type BoothResponse, type BoothState, type ChatMessage, type ChatMessageResponse, type ChatMessagesResponse, type ChatResource, type CreateIntentResponse, type CreateRoomData, type DashboardActivityItem, type DashboardActivityResponse, type DashboardActivityType, type EquipAvatarData, type FeaturedRoomsResponse, type FriendActionResponse, type FriendEntry, type FriendList, type FriendListResponse, type FriendResource, type FriendStatusResponse, type FriendshipStatus, type GlobalRole, type GrabResponse, type ImportPlaylistData, type ImportPlaylistResponse, type ImportResult, type JoinMuteInfo, type JoinRoomResponse, Logger, type MediaItem, type MediaItemResponse, type MediaSearchResult, type MediaSource, type ModerateUserData, type MuteResponse, type MyViolation, type MyViolationsResponse, type PaginationMeta, type PlayHistoryItem, type Playlist, type PlaylistResource, type PlaylistResponse, type PlaylistsResponse, type PortalResponse, type PublicProfileFriend, type PublicUser, type Room, type RoomAuditLog, type RoomBan, type RoomBansResponse, type RoomHistoryResponse, type RoomMember, type RoomMute, type RoomMutesResponse, type RoomResource, type RoomResponse, type RoomRole, type RoomStaffResponse, type RoomUserState, type RoomsResponse, type SendMessageData, type ShopResource, type ShuffleResponse, type SoundCloudSearchResponse, type SoundCloudTrackResponse, type SourceResource, type SubscriptionPlan, type SubscriptionResource, type SubscriptionStatus, type UpdateProfileData, type UpdateRoomData, type User, type UserResource, type UserResponse, type UserViolationsResponse, type VoteResponse, type WaitlistResponse, type WaitlistUser, type YouTubeSearchResponse, type YouTubeVideoResponse, createAdminResource, createApi, createApiClient, createAuthResource, createChatResource, createFriendResource, createPlaylistResource, createRoomResource, createShopResource, createSourceResource, createSubscriptionResource, createUserResource };
1146
+ export { type AccountViolation, type AddMediaData, type AddViolationResponse, type AdminListUsersParams, type AdminResource, type AdminStatsResponse, type AdminStatsRoom, type AdminUserEntry, type AdminUsersResponse, type Api, type ApiClient, type ApiConfig, ApiError, type ApiQueryParams, type ApiRequestConfig, type ApiResponse, type AuditAction, type AuthResource, type AuthUser, type AvatarCatalogItem, type AvatarCatalogResponse, type AvatarUnlockType, type BackendErrorResponse, type BanResponse, type BoothDJ, type BoothMedia, type BoothResponse, type BoothState, type ChatMessage, type ChatMessageResponse, type ChatMessagesResponse, type ChatResource, type CreateIntentResponse, type CreateRoomData, type DashboardActivityItem, type DashboardActivityResponse, type DashboardActivityType, type EquipAvatarData, type FeaturedRoomsResponse, type FriendActionResponse, type FriendEntry, type FriendList, type FriendListResponse, type FriendResource, type FriendStatusResponse, type FriendshipStatus, type GifSearchItem, type GifSearchResponse, type GlobalRole, type GrabResponse, type ImportPlaylistData, type ImportPlaylistResponse, type ImportResult, type JoinMuteInfo, type JoinRoomResponse, Logger, type MediaItem, type MediaItemResponse, type MediaSearchResult, type MediaSource, type ModerateUserData, type MuteResponse, type MyViolation, type MyViolationsResponse, type PaginationMeta, type PlayHistoryItem, type Playlist, type PlaylistResource, type PlaylistResponse, type PlaylistsResponse, type PortalResponse, type PublicProfileFriend, type PublicUser, type Room, type RoomAssetsResponse, type RoomAuditLog, type RoomBan, type RoomBansResponse, type RoomCustomEmoji, type RoomCustomSticker, type RoomHistoryResponse, type RoomMember, type RoomMute, type RoomMutesResponse, type RoomResource, type RoomResponse, type RoomRole, type RoomStaffResponse, type RoomUserState, type RoomsResponse, type SendMessageData, type ShopResource, type ShuffleResponse, type SoundCloudSearchResponse, type SoundCloudTrackResponse, type SourceResource, type SubscriptionPlan, type SubscriptionResource, type SubscriptionStatus, type UpdateProfileData, type UpdateRoomData, type User, type UserResource, type UserResponse, type UserViolationsResponse, type VoteResponse, type WaitlistResponse, type WaitlistUser, type YouTubeSearchResponse, type YouTubeVideoResponse, createAdminResource, createApi, createApiClient, createAuthResource, createChatResource, createFriendResource, createPlaylistResource, createRoomResource, createShopResource, createSourceResource, createSubscriptionResource, createUserResource };
package/dist/index.d.ts CHANGED
@@ -431,7 +431,7 @@ interface BoothResponse {
431
431
  interface VoteResponse {
432
432
  success: boolean;
433
433
  data: {
434
- vote: 'woot' | 'meh';
434
+ vote: 'woot' | 'meh' | null;
435
435
  votes: {
436
436
  woots: number;
437
437
  mehs: number;
@@ -446,6 +446,28 @@ interface GrabResponse {
446
446
  message: string;
447
447
  };
448
448
  }
449
+ interface RoomCustomEmoji {
450
+ id: string;
451
+ name: string;
452
+ image_url: string;
453
+ animated: boolean;
454
+ created_by: number;
455
+ created_at: number;
456
+ }
457
+ interface RoomCustomSticker {
458
+ id: string;
459
+ name: string;
460
+ image_url: string;
461
+ created_by: number;
462
+ created_at: number;
463
+ }
464
+ interface RoomAssetsResponse {
465
+ success: boolean;
466
+ data: {
467
+ emojis: RoomCustomEmoji[];
468
+ stickers: RoomCustomSticker[];
469
+ };
470
+ }
449
471
  interface PlayHistoryItem {
450
472
  id: number;
451
473
  userId: number;
@@ -613,6 +635,38 @@ interface RoomResource {
613
635
  }>>;
614
636
  vote(slug: string, type: 'woot' | 'meh'): Promise<ApiResponse<VoteResponse>>;
615
637
  grabTrack(slug: string, playlistId?: number): Promise<ApiResponse<GrabResponse>>;
638
+ getAssets(slug: string): Promise<ApiResponse<RoomAssetsResponse>>;
639
+ createEmoji(slug: string, data: {
640
+ name?: string;
641
+ file: File | Blob;
642
+ animated?: boolean;
643
+ }): Promise<ApiResponse<{
644
+ success: boolean;
645
+ data: {
646
+ emojis: RoomCustomEmoji[];
647
+ };
648
+ }>>;
649
+ deleteEmoji(slug: string, emojiId: string): Promise<ApiResponse<{
650
+ success: boolean;
651
+ data: {
652
+ emojis: RoomCustomEmoji[];
653
+ };
654
+ }>>;
655
+ createSticker(slug: string, data: {
656
+ name?: string;
657
+ file: File | Blob;
658
+ }): Promise<ApiResponse<{
659
+ success: boolean;
660
+ data: {
661
+ stickers: RoomCustomSticker[];
662
+ };
663
+ }>>;
664
+ deleteSticker(slug: string, stickerId: string): Promise<ApiResponse<{
665
+ success: boolean;
666
+ data: {
667
+ stickers: RoomCustomSticker[];
668
+ };
669
+ }>>;
616
670
  getHistory(slug: string, page?: number, limit?: number): Promise<ApiResponse<RoomHistoryResponse>>;
617
671
  getAuditLog(slug: string, limit?: number, before?: string): Promise<ApiResponse<RoomAuditLogResponse>>;
618
672
  activity(limit?: number): Promise<ApiResponse<DashboardActivityResponse>>;
@@ -654,6 +708,20 @@ interface ChatMessageResponse {
654
708
  message: ChatMessage;
655
709
  };
656
710
  }
711
+ interface GifSearchItem {
712
+ id: string;
713
+ title: string;
714
+ url: string;
715
+ preview_url: string | null;
716
+ width: number | null;
717
+ height: number | null;
718
+ }
719
+ interface GifSearchResponse {
720
+ success: boolean;
721
+ data: {
722
+ gifs: GifSearchItem[];
723
+ };
724
+ }
657
725
  interface ChatResource {
658
726
  sendMessage(slug: string, data: SendMessageData): Promise<ApiResponse<ChatMessageResponse>>;
659
727
  getMessages(slug: string, before?: string, limit?: number): Promise<ApiResponse<ChatMessagesResponse>>;
@@ -662,6 +730,7 @@ interface ChatResource {
662
730
  success: boolean;
663
731
  data: null;
664
732
  }>>;
733
+ searchGifs(query: string, limit?: number): Promise<ApiResponse<GifSearchResponse>>;
665
734
  }
666
735
  declare const createChatResource: (api: Api) => ChatResource;
667
736
 
@@ -1074,4 +1143,4 @@ interface ApiClient {
1074
1143
  }
1075
1144
  declare const createApiClient: (config: ApiConfig) => ApiClient;
1076
1145
 
1077
- export { type AccountViolation, type AddMediaData, type AddViolationResponse, type AdminListUsersParams, type AdminResource, type AdminStatsResponse, type AdminStatsRoom, type AdminUserEntry, type AdminUsersResponse, type Api, type ApiClient, type ApiConfig, ApiError, type ApiQueryParams, type ApiRequestConfig, type ApiResponse, type AuditAction, type AuthResource, type AuthUser, type AvatarCatalogItem, type AvatarCatalogResponse, type AvatarUnlockType, type BackendErrorResponse, type BanResponse, type BoothDJ, type BoothMedia, type BoothResponse, type BoothState, type ChatMessage, type ChatMessageResponse, type ChatMessagesResponse, type ChatResource, type CreateIntentResponse, type CreateRoomData, type DashboardActivityItem, type DashboardActivityResponse, type DashboardActivityType, type EquipAvatarData, type FeaturedRoomsResponse, type FriendActionResponse, type FriendEntry, type FriendList, type FriendListResponse, type FriendResource, type FriendStatusResponse, type FriendshipStatus, type GlobalRole, type GrabResponse, type ImportPlaylistData, type ImportPlaylistResponse, type ImportResult, type JoinMuteInfo, type JoinRoomResponse, Logger, type MediaItem, type MediaItemResponse, type MediaSearchResult, type MediaSource, type ModerateUserData, type MuteResponse, type MyViolation, type MyViolationsResponse, type PaginationMeta, type PlayHistoryItem, type Playlist, type PlaylistResource, type PlaylistResponse, type PlaylistsResponse, type PortalResponse, type PublicProfileFriend, type PublicUser, type Room, type RoomAuditLog, type RoomBan, type RoomBansResponse, type RoomHistoryResponse, type RoomMember, type RoomMute, type RoomMutesResponse, type RoomResource, type RoomResponse, type RoomRole, type RoomStaffResponse, type RoomUserState, type RoomsResponse, type SendMessageData, type ShopResource, type ShuffleResponse, type SoundCloudSearchResponse, type SoundCloudTrackResponse, type SourceResource, type SubscriptionPlan, type SubscriptionResource, type SubscriptionStatus, type UpdateProfileData, type UpdateRoomData, type User, type UserResource, type UserResponse, type UserViolationsResponse, type VoteResponse, type WaitlistResponse, type WaitlistUser, type YouTubeSearchResponse, type YouTubeVideoResponse, createAdminResource, createApi, createApiClient, createAuthResource, createChatResource, createFriendResource, createPlaylistResource, createRoomResource, createShopResource, createSourceResource, createSubscriptionResource, createUserResource };
1146
+ export { type AccountViolation, type AddMediaData, type AddViolationResponse, type AdminListUsersParams, type AdminResource, type AdminStatsResponse, type AdminStatsRoom, type AdminUserEntry, type AdminUsersResponse, type Api, type ApiClient, type ApiConfig, ApiError, type ApiQueryParams, type ApiRequestConfig, type ApiResponse, type AuditAction, type AuthResource, type AuthUser, type AvatarCatalogItem, type AvatarCatalogResponse, type AvatarUnlockType, type BackendErrorResponse, type BanResponse, type BoothDJ, type BoothMedia, type BoothResponse, type BoothState, type ChatMessage, type ChatMessageResponse, type ChatMessagesResponse, type ChatResource, type CreateIntentResponse, type CreateRoomData, type DashboardActivityItem, type DashboardActivityResponse, type DashboardActivityType, type EquipAvatarData, type FeaturedRoomsResponse, type FriendActionResponse, type FriendEntry, type FriendList, type FriendListResponse, type FriendResource, type FriendStatusResponse, type FriendshipStatus, type GifSearchItem, type GifSearchResponse, type GlobalRole, type GrabResponse, type ImportPlaylistData, type ImportPlaylistResponse, type ImportResult, type JoinMuteInfo, type JoinRoomResponse, Logger, type MediaItem, type MediaItemResponse, type MediaSearchResult, type MediaSource, type ModerateUserData, type MuteResponse, type MyViolation, type MyViolationsResponse, type PaginationMeta, type PlayHistoryItem, type Playlist, type PlaylistResource, type PlaylistResponse, type PlaylistsResponse, type PortalResponse, type PublicProfileFriend, type PublicUser, type Room, type RoomAssetsResponse, type RoomAuditLog, type RoomBan, type RoomBansResponse, type RoomCustomEmoji, type RoomCustomSticker, type RoomHistoryResponse, type RoomMember, type RoomMute, type RoomMutesResponse, type RoomResource, type RoomResponse, type RoomRole, type RoomStaffResponse, type RoomUserState, type RoomsResponse, type SendMessageData, type ShopResource, type ShuffleResponse, type SoundCloudSearchResponse, type SoundCloudTrackResponse, type SourceResource, type SubscriptionPlan, type SubscriptionResource, type SubscriptionStatus, type UpdateProfileData, type UpdateRoomData, type User, type UserResource, type UserResponse, type UserViolationsResponse, type VoteResponse, type WaitlistResponse, type WaitlistUser, type YouTubeSearchResponse, type YouTubeVideoResponse, createAdminResource, createApi, createApiClient, createAuthResource, createChatResource, createFriendResource, createPlaylistResource, createRoomResource, createShopResource, createSourceResource, createSubscriptionResource, createUserResource };
package/dist/index.js CHANGED
@@ -215,7 +215,13 @@ var createApi = (config) => {
215
215
  try {
216
216
  const options = buildOptions(defaultHeaders, requestConfig);
217
217
  if (data !== void 0) {
218
- options.json = data;
218
+ if (data instanceof FormData) {
219
+ const headers = options.headers;
220
+ delete headers["Content-Type"];
221
+ options.body = data;
222
+ } else {
223
+ options.json = data;
224
+ }
219
225
  }
220
226
  const response = await client(resolveUrl(config.baseURL, url), {
221
227
  ...options,
@@ -319,6 +325,26 @@ var createRoomResource = (api) => ({
319
325
  ),
320
326
  vote: (slug, type) => api.post(`${endpoint3}/${slug}/booth/vote`, { type }),
321
327
  grabTrack: (slug, playlistId) => api.post(`${endpoint3}/${slug}/booth/grab`, playlistId ? { playlistId } : {}),
328
+ getAssets: (slug) => api.get(`${endpoint3}/${slug}/assets`),
329
+ createEmoji: (slug, data) => {
330
+ const FormDataCtor = globalThis.FormData;
331
+ if (!FormDataCtor) throw new Error("FormData is not available in this runtime");
332
+ const form = new FormDataCtor();
333
+ if (data.name) form.set("name", data.name);
334
+ form.set("file", data.file);
335
+ if (typeof data.animated === "boolean") form.set("animated", `${data.animated}`);
336
+ return api.post(`${endpoint3}/${slug}/assets/emojis`, form);
337
+ },
338
+ deleteEmoji: (slug, emojiId) => api.delete(`${endpoint3}/${slug}/assets/emojis/${emojiId}`),
339
+ createSticker: (slug, data) => {
340
+ const FormDataCtor = globalThis.FormData;
341
+ if (!FormDataCtor) throw new Error("FormData is not available in this runtime");
342
+ const form = new FormDataCtor();
343
+ if (data.name) form.set("name", data.name);
344
+ form.set("file", data.file);
345
+ return api.post(`${endpoint3}/${slug}/assets/stickers`, form);
346
+ },
347
+ deleteSticker: (slug, stickerId) => api.delete(`${endpoint3}/${slug}/assets/stickers/${stickerId}`),
322
348
  getHistory: (slug, page = 1, limit = 20) => api.get(`${endpoint3}/${slug}/history`, { params: { page, limit } }),
323
349
  getAuditLog: (slug, limit = 50, before) => api.get(`${endpoint3}/${slug}/audit`, { params: before ? { limit, before } : { limit } }),
324
350
  activity: (limit = 12) => api.get(`${endpoint3}/activity`, { params: { limit } })
@@ -336,7 +362,8 @@ var createChatResource = (api) => ({
336
362
  return api.get(`${endpoint4}/${slug}/chat`, { params });
337
363
  },
338
364
  editMessage: (slug, messageId, data) => api.patch(`${endpoint4}/${slug}/chat/${messageId}`, data),
339
- deleteMessage: (slug, messageId) => api.delete(`${endpoint4}/${slug}/chat/${messageId}`)
365
+ deleteMessage: (slug, messageId) => api.delete(`${endpoint4}/${slug}/chat/${messageId}`),
366
+ searchGifs: (query, limit = 20) => api.post("/chat/gif/search", { query, limit })
340
367
  });
341
368
 
342
369
  // src/resources/playlist.ts
package/dist/index.mjs CHANGED
@@ -166,7 +166,13 @@ var createApi = (config) => {
166
166
  try {
167
167
  const options = buildOptions(defaultHeaders, requestConfig);
168
168
  if (data !== void 0) {
169
- options.json = data;
169
+ if (data instanceof FormData) {
170
+ const headers = options.headers;
171
+ delete headers["Content-Type"];
172
+ options.body = data;
173
+ } else {
174
+ options.json = data;
175
+ }
170
176
  }
171
177
  const response = await client(resolveUrl(config.baseURL, url), {
172
178
  ...options,
@@ -270,6 +276,26 @@ var createRoomResource = (api) => ({
270
276
  ),
271
277
  vote: (slug, type) => api.post(`${endpoint3}/${slug}/booth/vote`, { type }),
272
278
  grabTrack: (slug, playlistId) => api.post(`${endpoint3}/${slug}/booth/grab`, playlistId ? { playlistId } : {}),
279
+ getAssets: (slug) => api.get(`${endpoint3}/${slug}/assets`),
280
+ createEmoji: (slug, data) => {
281
+ const FormDataCtor = globalThis.FormData;
282
+ if (!FormDataCtor) throw new Error("FormData is not available in this runtime");
283
+ const form = new FormDataCtor();
284
+ if (data.name) form.set("name", data.name);
285
+ form.set("file", data.file);
286
+ if (typeof data.animated === "boolean") form.set("animated", `${data.animated}`);
287
+ return api.post(`${endpoint3}/${slug}/assets/emojis`, form);
288
+ },
289
+ deleteEmoji: (slug, emojiId) => api.delete(`${endpoint3}/${slug}/assets/emojis/${emojiId}`),
290
+ createSticker: (slug, data) => {
291
+ const FormDataCtor = globalThis.FormData;
292
+ if (!FormDataCtor) throw new Error("FormData is not available in this runtime");
293
+ const form = new FormDataCtor();
294
+ if (data.name) form.set("name", data.name);
295
+ form.set("file", data.file);
296
+ return api.post(`${endpoint3}/${slug}/assets/stickers`, form);
297
+ },
298
+ deleteSticker: (slug, stickerId) => api.delete(`${endpoint3}/${slug}/assets/stickers/${stickerId}`),
273
299
  getHistory: (slug, page = 1, limit = 20) => api.get(`${endpoint3}/${slug}/history`, { params: { page, limit } }),
274
300
  getAuditLog: (slug, limit = 50, before) => api.get(`${endpoint3}/${slug}/audit`, { params: before ? { limit, before } : { limit } }),
275
301
  activity: (limit = 12) => api.get(`${endpoint3}/activity`, { params: { limit } })
@@ -287,7 +313,8 @@ var createChatResource = (api) => ({
287
313
  return api.get(`${endpoint4}/${slug}/chat`, { params });
288
314
  },
289
315
  editMessage: (slug, messageId, data) => api.patch(`${endpoint4}/${slug}/chat/${messageId}`, data),
290
- deleteMessage: (slug, messageId) => api.delete(`${endpoint4}/${slug}/chat/${messageId}`)
316
+ deleteMessage: (slug, messageId) => api.delete(`${endpoint4}/${slug}/chat/${messageId}`),
317
+ searchGifs: (query, limit = 20) => api.post("/chat/gif/search", { query, limit })
291
318
  });
292
319
 
293
320
  // src/resources/playlist.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@borealise/api",
3
- "version": "2.1.0-alpha.3",
3
+ "version": "2.1.0-alpha.4",
4
4
  "description": "Official API client for Borealise",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",