Skip to content

Commit

Permalink
chore(ts): use exact path to types file
Browse files Browse the repository at this point in the history
Signed-off-by: Maksim Sukharev <[email protected]>
  • Loading branch information
Antreesy committed Sep 6, 2024
1 parent a70abe1 commit 7998f67
Show file tree
Hide file tree
Showing 14 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/__mocks__/capabilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import type { Capabilities } from '../types'
import type { Capabilities } from '../types/index.ts'

export const mockedCapabilities: Capabilities = {
spreed: {
Expand Down
2 changes: 1 addition & 1 deletion src/services/CapabilitiesManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { t } from '@nextcloud/l10n'
import { getRemoteCapabilities } from './federationService.ts'
import BrowserStorage from '../services/BrowserStorage.js'
import { useTalkHashStore } from '../stores/talkHash.js'
import type { Capabilities, Conversation, JoinRoomFullResponse } from '../types'
import type { Capabilities, Conversation, JoinRoomFullResponse } from '../types/index.ts'

type Config = Capabilities['spreed']['config']
type RemoteCapability = Capabilities & Partial<{ hash: string }>
Expand Down
4 changes: 2 additions & 2 deletions src/services/avatarService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import type {
deleteAvatarResponse,
setEmojiAvatarParams,
setEmojiAvatarResponse,
setFileAvatarResponse
} from '../types'
setFileAvatarResponse,
} from '../types/index.ts'

const getConversationAvatarOcsUrl = function(token: string, isDarkTheme: boolean, avatarVersion?: string): string {
return generateOcsUrl('apps/spreed/api/v1/room/{token}/avatar' + (isDarkTheme ? '/dark' : '') + (avatarVersion ? '?v={avatarVersion}' : ''), { token, avatarVersion })
Expand Down
2 changes: 1 addition & 1 deletion src/services/banService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import type {
banActorParams,
banActorResponse,
unbanActorResponse,
} from '../types'
} from '../types/index.ts'

/**
* Get information about configured bans for this conversation
Expand Down
2 changes: 1 addition & 1 deletion src/services/botsService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import axios from '@nextcloud/axios'
import { generateOcsUrl } from '@nextcloud/router'

import type { Bot, getBotsResponse, getBotsAdminResponse, enableBotResponse, disableBotResponse } from '../types'
import type { Bot, getBotsResponse, getBotsAdminResponse, enableBotResponse, disableBotResponse } from '../types/index.ts'

/**
* Get information about available bots for this instance
Expand Down
2 changes: 1 addition & 1 deletion src/services/breakoutRoomsService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import type {
stopBreakoutRoomsResponse,
switchToBreakoutRoomParams,
switchToBreakoutRoomResponse,
} from '../types'
} from '../types/index.ts'

/**
* Create breakout rooms for a given conversation
Expand Down
2 changes: 1 addition & 1 deletion src/services/federationService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import axios from '@nextcloud/axios'
import { generateOcsUrl } from '@nextcloud/router'

import type { acceptShareResponse, getSharesResponse, rejectShareResponse, getCapabilitiesResponse } from '../types'
import type { acceptShareResponse, getSharesResponse, rejectShareResponse, getCapabilitiesResponse } from '../types/index.ts'

/**
* Fetches list of shares for a current user
Expand Down
4 changes: 2 additions & 2 deletions src/services/messagesService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import type {
receiveMessagesParams,
receiveMessagesResponse,
setReadMarkerParams,
setReadMarkerResponse
} from '../types'
setReadMarkerResponse,
} from '../types/index.ts'

type ReceiveMessagesPayload = Partial<receiveMessagesParams> & { token: string }
type GetMessageContextPayload = getMessageContextParams & { token: string, messageId: number }
Expand Down
4 changes: 2 additions & 2 deletions src/services/reactionsService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import type {
addReactionResponse,
deleteReactionParams,
deleteReactionResponse,
getReactionsResponse
} from '../types'
getReactionsResponse,
} from '../types/index.ts'

const addReactionToMessage = async function(token: string, messageId: number, selectedEmoji: addReactionParams['reaction'], options: object): addReactionResponse {
return axios.post(generateOcsUrl('apps/spreed/api/v1/reaction/{token}/{messageId}', {
Expand Down
2 changes: 1 addition & 1 deletion src/stores/bots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import Vue from 'vue'

import { BOT } from '../constants.js'
import { disableBotForConversation, enableBotForConversation, getConversationBots } from '../services/botsService.ts'
import type { Bot } from '../types'
import type { Bot } from '../types/index.ts'

type State = {
bots: Record<string, Record<number, Bot>>
Expand Down
4 changes: 2 additions & 2 deletions src/stores/breakoutRooms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ import type {
broadcastChatMessageParams,
configureBreakoutRoomsParams,
reorganizeAttendeesParams,
switchToBreakoutRoomParams
} from '../types'
switchToBreakoutRoomParams,
} from '../types/index.ts'

type Payload<T> = T & { token: string }
type State = {
Expand Down
2 changes: 1 addition & 1 deletion src/stores/federation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { getBaseUrl } from '@nextcloud/router'

import { FEDERATION } from '../constants.js'
import { getShares, acceptShare, rejectShare } from '../services/federationService.ts'
import type { Conversation, FederationInvite, NotificationInvite } from '../types'
import type { Conversation, FederationInvite, NotificationInvite } from '../types/index.ts'

type State = {
pendingShares: Record<string, FederationInvite & { loading?: 'accept' | 'reject' }>,
Expand Down
2 changes: 1 addition & 1 deletion src/utils/getItemTypeFromMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import { SHARED_ITEM } from '../constants.js'
import type { ChatMessage } from '../types'
import type { ChatMessage } from '../types/index.ts'

export const getItemTypeFromMessage = function(message: ChatMessage): string {
if (message.messageParameters?.object) {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/textParse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import { getBaseUrl } from '@nextcloud/router'

import type { ChatMessage, Mention } from '../types'
import type { ChatMessage, Mention } from '../types/index.ts'

/**
* Parse message text to return proper formatting for mentions
Expand Down

0 comments on commit 7998f67

Please sign in to comment.