73 lines
1.6 KiB
TypeScript
73 lines
1.6 KiB
TypeScript
import { ApiProperty } from '@nestjs/swagger';
|
|
|
|
export class OAuthSessionEntity {
|
|
@ApiProperty({
|
|
example: 'cklwi0vb70000z2z20q6f19qk',
|
|
description: 'Unique ID of an OAuth token (auto-generated)',
|
|
})
|
|
id: string;
|
|
|
|
@ApiProperty({
|
|
example: '0e6e2e1f-b157-4c7c-ae3f-999b3e4f914d',
|
|
description: 'UUID User`s unique identification number',
|
|
})
|
|
user_id: string;
|
|
|
|
@ApiProperty({
|
|
example: 'app.targo.ca',
|
|
description: 'URL in which the access token is used for',
|
|
})
|
|
application: string;
|
|
|
|
@ApiProperty({
|
|
example: 'L5O6R4D3/O6F3#T8H4E3&R6I4N6G4S7',
|
|
description: 'Access token',
|
|
})
|
|
access_token: string;
|
|
|
|
@ApiProperty({
|
|
example: 'Th3731102h1p07Th3R1n92',
|
|
description: 'Refresh token',
|
|
})
|
|
refresh_token: string;
|
|
|
|
@ApiProperty({
|
|
example: '3018-12-25T00:00:00.000Z',
|
|
description: 'Access token`s expiry date',
|
|
})
|
|
access_token_expiry: Date;
|
|
|
|
@ApiProperty({
|
|
example: '3019-02-26T00:00:00.000Z',
|
|
description: 'Refresh token`s expiry date (optional)',
|
|
required: false,
|
|
})
|
|
refresh_token_expiry?: Date;
|
|
|
|
@ApiProperty({
|
|
example: ['email', 'profile', 'access_tolkiens'],
|
|
description: 'scopes of infos linked to the access token',
|
|
required: false,
|
|
})
|
|
scopes: string[];
|
|
|
|
@ApiProperty({
|
|
example: false,
|
|
description: 'revoke status',
|
|
})
|
|
is_revoked: boolean;
|
|
|
|
@ApiProperty({
|
|
example: '2025-07-22',
|
|
description: 'creation date',
|
|
})
|
|
created_at: Date;
|
|
|
|
@ApiProperty({
|
|
example: '2025-07-23',
|
|
description: 'Latest update (optional)',
|
|
required: false,
|
|
})
|
|
updated_at?: Date;
|
|
}
|