mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
chore: enum support for new API (#7110)
Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
This commit is contained in:
parent
6f5648569a
commit
87ae0be081
108 changed files with 545 additions and 379 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import type { AssetResponseDto } from '@api';
|
||||
import type { AssetResponseDto } from '@immich/sdk';
|
||||
import { derived, writable } from 'svelte/store';
|
||||
|
||||
export interface AssetInteractionStore {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import { getKey } from '$lib/utils';
|
||||
import { type AssetResponseDto } from '@api';
|
||||
import { getAssetInfo } from '@immich/sdk';
|
||||
import { getAssetInfo, type AssetResponseDto } from '@immich/sdk';
|
||||
import { writable } from 'svelte/store';
|
||||
|
||||
function createAssetViewingStore() {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import { getKey } from '$lib/utils';
|
||||
import { getTimeBucket, getTimeBuckets, type AssetResponseDto } from '@immich/sdk';
|
||||
import { TimeBucketSize, type AssetApiGetTimeBucketsRequest } from '@immich/sdk/axios';
|
||||
import { TimeBucketSize, getTimeBucket, getTimeBuckets, type AssetResponseDto } from '@immich/sdk';
|
||||
import { throttle } from 'lodash-es';
|
||||
import { DateTime } from 'luxon';
|
||||
import { writable, type Unsubscriber } from 'svelte/store';
|
||||
|
|
@ -13,7 +12,7 @@ export enum BucketPosition {
|
|||
Visible = 'visible',
|
||||
Unknown = 'unknown',
|
||||
}
|
||||
|
||||
type AssetApiGetTimeBucketsRequest = Parameters<typeof getTimeBuckets>[0];
|
||||
export type AssetStoreOptions = Omit<AssetApiGetTimeBucketsRequest, 'size'>;
|
||||
|
||||
export interface Viewport {
|
||||
|
|
@ -157,10 +156,7 @@ export class AssetStore {
|
|||
this.assetToBucket = {};
|
||||
this.albumAssets = new Set();
|
||||
|
||||
const buckets = await getTimeBuckets({
|
||||
...this.options,
|
||||
key: getKey(),
|
||||
});
|
||||
const buckets = await getTimeBuckets({ ...this.options, key: getKey() });
|
||||
|
||||
this.initialized = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { MemoryLaneResponseDto } from '@immich/sdk';
|
||||
import { writable } from 'svelte/store';
|
||||
import type { MemoryLaneResponseDto } from '@api';
|
||||
|
||||
export const memoryStore = writable<MemoryLaneResponseDto[]>();
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import { type ServerConfigDto, type ServerFeaturesDto } from '@api';
|
||||
import { getServerConfig, getServerFeatures } from '@immich/sdk';
|
||||
import { getServerConfig, getServerFeatures, type ServerConfigDto, type ServerFeaturesDto } from '@immich/sdk';
|
||||
import { writable } from 'svelte/store';
|
||||
|
||||
export type FeatureFlags = ServerFeaturesDto & { loaded: boolean };
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { ServerInfoResponseDto } from '@immich/sdk';
|
||||
import { writable } from 'svelte/store';
|
||||
import type { ServerInfoResponseDto } from '@api';
|
||||
|
||||
export const serverInfo = writable<ServerInfoResponseDto>();
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { AssetResponseDto } from '@immich/sdk';
|
||||
import { writable } from 'svelte/store';
|
||||
import type { AssetResponseDto } from '@api';
|
||||
|
||||
export const stackAssetsStore = writable<AssetResponseDto[]>([]);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import type { UserResponseDto } from '@immich/sdk';
|
||||
import { writable } from 'svelte/store';
|
||||
import type { UserResponseDto } from '@api';
|
||||
|
||||
export let user = writable<UserResponseDto>();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import type { AssetResponseDto, ServerVersionResponseDto } from '@api';
|
||||
import { type Socket, io } from 'socket.io-client';
|
||||
import type { AssetResponseDto, ServerVersionResponseDto } from '@immich/sdk';
|
||||
import { io, type Socket } from 'socket.io-client';
|
||||
import { get, writable } from 'svelte/store';
|
||||
import { loadConfig } from './server-config.store';
|
||||
import { user } from './user.store';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue