2024-03-20 22:02:51 +01:00
|
|
|
import { APIKeyEntity } from 'src/entities/api-key.entity';
|
2025-01-10 20:02:12 +01:00
|
|
|
import { AuthApiKey } from 'src/types';
|
2024-03-20 19:32:04 +01:00
|
|
|
import { authStub } from 'test/fixtures/auth.stub';
|
|
|
|
import { userStub } from 'test/fixtures/user.stub';
|
2023-08-01 03:28:07 +02:00
|
|
|
|
|
|
|
export const keyStub = {
|
2025-01-10 20:02:12 +01:00
|
|
|
authKey: Object.freeze({
|
|
|
|
id: 'my-random-guid',
|
|
|
|
key: 'my-api-key (hashed)',
|
|
|
|
user: userStub.admin,
|
|
|
|
permissions: [],
|
|
|
|
} as AuthApiKey),
|
|
|
|
|
2023-08-01 03:28:07 +02:00
|
|
|
admin: Object.freeze({
|
|
|
|
id: 'my-random-guid',
|
|
|
|
name: 'My Key',
|
|
|
|
key: 'my-api-key (hashed)',
|
2023-12-10 05:34:12 +01:00
|
|
|
userId: authStub.admin.user.id,
|
2023-08-01 03:28:07 +02:00
|
|
|
user: userStub.admin,
|
|
|
|
} as APIKeyEntity),
|
|
|
|
};
|