2023-06-02 15:55:08 +02:00
|
|
|
import { faker } from '@faker-js/faker';
|
2026-08-14 16:04:12 -04:00
|
|
|
import { UserAvatarColor, UserStatus, type UserAdminResponseDto } from '@immich/sdk';
|
2023-06-02 15:55:08 +02:00
|
|
|
import { Sync } from 'factory.ts';
|
|
|
|
|
|
2024-06-09 01:33:39 +05:30
|
|
|
export const userAdminFactory = Sync.makeFactory<UserAdminResponseDto>({
|
|
|
|
|
id: Sync.each(() => faker.string.uuid()),
|
|
|
|
|
email: Sync.each(() => faker.internet.email()),
|
|
|
|
|
name: Sync.each(() => faker.person.fullName()),
|
|
|
|
|
profileImagePath: '',
|
|
|
|
|
avatarColor: UserAvatarColor.Primary,
|
|
|
|
|
isAdmin: true,
|
|
|
|
|
createdAt: Sync.each(() => faker.date.recent().toISOString()),
|
|
|
|
|
updatedAt: Sync.each(() => faker.date.recent().toISOString()),
|
|
|
|
|
deletedAt: null,
|
|
|
|
|
oauthId: '',
|
|
|
|
|
quotaUsageInBytes: 0,
|
|
|
|
|
quotaSizeInBytes: 1000,
|
|
|
|
|
shouldChangePassword: false,
|
|
|
|
|
status: UserStatus.Active,
|
|
|
|
|
storageLabel: null,
|
2024-07-01 18:43:16 +01:00
|
|
|
license: {
|
|
|
|
|
licenseKey: 'IMCL-license-key',
|
|
|
|
|
activationKey: 'activation-key',
|
|
|
|
|
activatedAt: new Date().toISOString(),
|
|
|
|
|
},
|
2024-09-17 03:48:15 +02:00
|
|
|
profileChangedAt: Sync.each(() => faker.date.recent().toISOString()),
|
2024-06-09 01:33:39 +05:30
|
|
|
});
|