mirror of https://github.com/immich-app/immich.git
chore(web): improve type checking (#2644)
* fix(web): use id instead of assetId * chore(web): improve type checking * fix test jobs * improve type checking and resolve errorspull/2648/head
parent
47673dd773
commit
9807f76aff
@ -0,0 +1,12 @@
|
||||
import type { AlbumResponseDto } from '@api';
|
||||
|
||||
export type OnShowContextMenu = {
|
||||
showalbumcontextmenu: OnShowContextMenuDetail;
|
||||
};
|
||||
|
||||
export type OnClick = {
|
||||
click: OnClickDetail;
|
||||
};
|
||||
|
||||
export type OnShowContextMenuDetail = { x: number; y: number };
|
||||
export type OnClickDetail = AlbumResponseDto;
|
||||
@ -1,4 +1,4 @@
|
||||
import { AssetResponseDto } from '@api';
|
||||
import type { AssetResponseDto } from '@api';
|
||||
import { writable } from 'svelte/store';
|
||||
|
||||
export const archivedAsset = writable<AssetResponseDto[]>([]);
|
||||
|
||||
@ -0,0 +1,18 @@
|
||||
import type { UserResponseDto } from '@api';
|
||||
import { faker } from '@faker-js/faker';
|
||||
import { Sync } from 'factory.ts';
|
||||
|
||||
export const userFactory = Sync.makeFactory<UserResponseDto>({
|
||||
id: Sync.each(() => faker.datatype.uuid()),
|
||||
email: Sync.each(() => faker.internet.email()),
|
||||
firstName: Sync.each(() => faker.name.firstName()),
|
||||
lastName: Sync.each(() => faker.name.lastName()),
|
||||
storageLabel: Sync.each(() => faker.random.alphaNumeric()),
|
||||
profileImagePath: '',
|
||||
shouldChangePassword: Sync.each(() => faker.datatype.boolean()),
|
||||
isAdmin: true,
|
||||
createdAt: Sync.each(() => faker.date.past().toISOString()),
|
||||
deletedAt: null,
|
||||
updatedAt: Sync.each(() => faker.date.past().toISOString()),
|
||||
oauthId: ''
|
||||
});
|
||||
Loading…
Reference in New Issue