Skip to content

Commit 499db06

Browse files
committed
feat(deps): extract client to dedicated libs
1 parent 46f58e5 commit 499db06

File tree

195 files changed

+170
-22343
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

195 files changed

+170
-22343
lines changed

package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@
5151
"release:changelog": "extract-changelog-release > RELEASE.md"
5252
},
5353
"dependencies": {
54-
"@dvcol/base-http-client": "^1.1.0",
54+
"@dvcol/base-http-client": "^1.1.2",
55+
"@dvcol/tmdb-http-client": "^1.1.1",
56+
"@dvcol/trakt-http-client": "^1.2.0",
57+
"@dvcol/tvdb-http-client": "^1.1.1",
5558
"@dvcol/web-extension-utils": "^2.3.4",
5659
"@vue/devtools": "^7.0.15",
5760
"naive-ui": "^2.38.1",

pnpm-lock.yaml

+38-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/common/list/ListScroll.vue

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@ import { NFlex, NTimeline, NVirtualList } from 'naive-ui';
33
44
import { ref, toRefs } from 'vue';
55
6+
import type { TraktClientPagination } from '@dvcol/trakt-http-client/models';
67
import type { PropType, Ref, Transition } from 'vue';
78
8-
import type { TraktClientPagination } from '~/models/trakt/trakt-client.model';
9-
109
import ListEmpty from '~/components/common/list/ListEmpty.vue';
1110
import ListItem from '~/components/common/list/ListItem.vue';
1211
import ListLoadMore from '~/components/common/list/ListLoadMore.vue';

src/components/common/list/use-list-scroll.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1+
import { TraktEpisodeType, type TraktEpisodeTypes } from '@dvcol/trakt-http-client/models';
12
import { computed, ref } from 'vue';
23

3-
import type { Ref } from 'vue';
4+
import type { TraktClientPagination } from '@dvcol/trakt-http-client/models';
45

5-
import type { TraktClientPagination } from '~/models/trakt/trakt-client.model';
6+
import type { Ref } from 'vue';
67

78
import type { ImageQuery } from '~/stores/data/image.store';
89

910
import { type ListScrollItem, ListScrollItemType, type ListScrollSourceItem, type OnScroll, type OnUpdated } from '~/models/list-scroll.model';
10-
import { TraktEpisodeType, type TraktEpisodeTypes } from '~/models/trakt/trakt-episode.model';
1111
import { ResolveExternalLinks } from '~/settings/external.links';
1212
import { useI18n } from '~/utils';
1313

src/components/views/panel/MoviePanelDetails.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { NFlex } from 'naive-ui';
33
import { computed, type PropType, toRefs } from 'vue';
44
5-
import type { TraktMovieExtended } from '~/models/trakt/trakt-movie.model';
5+
import type { TraktMovieExtended } from '@dvcol/trakt-http-client/models';
66
77
import TextField from '~/components/common/typography/TextField.vue';
88
import PanelAlias from '~/components/views/panel/PanelAlias.vue';

src/components/views/panel/MoviePanelOverview.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script setup lang="ts">
22
import { computed, type PropType, toRefs } from 'vue';
33
4-
import type { TraktMovieExtended } from '~/models/trakt/trakt-movie.model';
4+
import type { TraktMovieExtended } from '@dvcol/trakt-http-client/models';
55
66
import PanelOverview from '~/components/views/panel/PanelOverview.vue';
77
import { deCapitalise } from '~/utils/string.utils';

src/components/views/panel/PanelLinks.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<script lang="ts" setup>
22
import { computed, type PropType, toRefs } from 'vue';
33
4+
import type { TraktApiIds } from '@dvcol/trakt-http-client/models';
45
import type { TagLink } from '~/models/tag.model';
5-
import type { TraktApiIds } from '~/models/trakt/trakt-id.model';
66
77
import TextField from '~/components/common/typography/TextField.vue';
88
import IconExternalLinkRounded from '~/components/icons/IconExternalLinkRounded.vue';

src/components/views/panel/PersonPanel.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { NFlex, NSkeleton } from 'naive-ui';
33
import { computed, onMounted, onUnmounted, ref, toRefs, watch } from 'vue';
44
5-
import type { TraktPersonExtended } from '~/models/trakt/trakt-people.model';
5+
import type { TraktPersonExtended } from '@dvcol/trakt-http-client/models';
66
77
import TitleLink from '~/components/common/buttons/TitleLink.vue';
88
import PanelPoster from '~/components/views/panel/PanelPoster.vue';

src/components/views/panel/PersonPanelDetails.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
import { NFlex } from 'naive-ui';
33
import { computed, type PropType, toRefs } from 'vue';
44
5+
import type { TraktPersonExtended } from '@dvcol/trakt-http-client/models';
56
import type { TagLink } from '~/models/tag.model';
6-
import type { TraktPersonExtended } from '~/models/trakt/trakt-people.model';
77
88
import TextField from '~/components/common/typography/TextField.vue';
99
import IconExternalLinkRounded from '~/components/icons/IconExternalLinkRounded.vue';

src/components/views/panel/PersonPanelOverview.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script setup lang="ts">
22
import { computed, type PropType, toRefs } from 'vue';
33
4-
import type { TraktPersonExtended } from '~/models/trakt/trakt-people.model';
4+
import type { TraktPersonExtended } from '@dvcol/trakt-http-client/models';
55
66
import PanelOverview from '~/components/views/panel/PanelOverview.vue';
77

src/components/views/panel/ShowPanelDetails.vue

+5-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
import { NFlex } from 'naive-ui';
33
import { computed, type PropType, toRefs } from 'vue';
44
5-
import type { TraktEpisodeExtended } from '~/models/trakt/trakt-episode.model';
6-
import type { TraktSeasonExtended } from '~/models/trakt/trakt-season.model';
7-
import type { TraktShowExtended } from '~/models/trakt/trakt-show.model';
5+
import type {
6+
TraktEpisodeExtended,
7+
TraktSeasonExtended,
8+
TraktShowExtended,
9+
} from '@dvcol/trakt-http-client/models';
810
911
import TextField from '~/components/common/typography/TextField.vue';
1012
import PanelAlias from '~/components/views/panel/PanelAlias.vue';

src/components/views/panel/ShowPanelOverview.vue

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<script setup lang="ts">
22
import { computed, type PropType, toRefs } from 'vue';
33
4-
import type { TraktEpisodeExtended } from '~/models/trakt/trakt-episode.model';
5-
6-
import type { TraktSeasonExtended } from '~/models/trakt/trakt-season.model';
7-
8-
import type { TraktShowExtended } from '~/models/trakt/trakt-show.model';
4+
import type {
5+
TraktEpisodeExtended,
6+
TraktSeasonExtended,
7+
TraktShowExtended,
8+
} from '@dvcol/trakt-http-client/models';
99
1010
import PanelOverview from '~/components/views/panel/PanelOverview.vue';
1111
import { ResolveExternalLinks } from '~/settings/external.links';

src/components/views/panel/ShowPanelPicker.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import { computed, type PropType, toRefs } from 'vue';
55
66
import { RouterLink, useRoute } from 'vue-router';
77
8+
import type { TraktEpisodeShort } from '@dvcol/trakt-http-client/models';
89
import type { ShowProgress } from '~/models/list-scroll.model';
9-
import type { TraktEpisodeShort } from '~/models/trakt/trakt-episode.model';
1010
import type { ShowSeasons } from '~/stores/data/show.store';
1111
1212
import ButtonLink from '~/components/common/buttons/ButtonLink.vue';

src/components/views/search/SearchNavbar.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { type Component, computed, defineProps, h, onActivated, ref } from 'vue'
1313
1414
import { useRoute } from 'vue-router';
1515
16-
import type { TraktSearchType } from '~/models/trakt/trakt-search.model';
16+
import type { TraktSearchType } from '@dvcol/trakt-http-client/models';
1717
1818
import ButtonLinkExternal from '~/components/common/buttons/ButtonLinkExternal.vue';
1919
import NavbarPageSizeSelect from '~/components/common/navbar/NavbarPageSizeSelect.vue';

src/models/list-scroll.model.ts

+12-8
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
import type { BaseCacheOption } from '@dvcol/base-http-client';
2-
import type { NVirtualList, VirtualListInst } from 'naive-ui';
32

3+
import type {
4+
TraktEpisode,
5+
TraktList,
6+
TraktMovie,
7+
TraktPerson,
8+
BaseTraktProgress,
9+
BaseTraktProgressEpisode,
10+
BaseTraktProgressSeason,
11+
TraktSeason,
12+
TraktShow,
13+
} from '@dvcol/trakt-http-client/models';
14+
import type { NVirtualList, VirtualListInst } from 'naive-ui';
415
import type { Ref } from 'vue';
516
import type { PosterItem } from '~/models/poster.model';
617
import type { TagLink } from '~/models/tag.model';
7-
import type { TraktEpisode } from '~/models/trakt/trakt-episode.model';
8-
import type { TraktList } from '~/models/trakt/trakt-list.model';
9-
import type { TraktMovie } from '~/models/trakt/trakt-movie.model';
10-
import type { TraktPerson } from '~/models/trakt/trakt-people.model';
11-
import type { BaseTraktProgress, BaseTraktProgressEpisode, BaseTraktProgressSeason } from '~/models/trakt/trakt-progress.model';
12-
import type { TraktSeason } from '~/models/trakt/trakt-season.model';
13-
import type { TraktShow } from '~/models/trakt/trakt-show.model';
1418

1519
export type VirtualListRef = VirtualListInst & InstanceType<typeof NVirtualList>;
1620
export type ScrollTo = Parameters<VirtualListInst['scrollTo']>[0];

src/models/tmdb/tmdb-account.model.ts

-46
This file was deleted.

src/models/tmdb/tmdb-auth.model.ts

-8
This file was deleted.

src/models/tmdb/tmdb-change.model.ts

-21
This file was deleted.

0 commit comments

Comments
 (0)