@@ -31,11 +31,26 @@ export class StatsClient {
 | 
			
		||||
    enabled: boolean = true;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * The client's api key.
 | 
			
		||||
     * This is used to authorize a statsClient against the api.
 | 
			
		||||
     * It only grants access to the /stats/** routes.
 | 
			
		||||
     * The client's api key prefix.
 | 
			
		||||
     * This is used identitfy a client by it's api key.
 | 
			
		||||
     */
 | 
			
		||||
    @Column({ unique: true })
 | 
			
		||||
    @IsString()
 | 
			
		||||
    prefix: string;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * The client's api key hash.
 | 
			
		||||
     * The api key can be used to authenticate against the /stats/** routes.
 | 
			
		||||
     */
 | 
			
		||||
    @Column()
 | 
			
		||||
    @IsString()
 | 
			
		||||
    key: string;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * The client's api key in plain text.
 | 
			
		||||
     * This will only be used to display the full key on creation and updates.
 | 
			
		||||
     */
 | 
			
		||||
    @IsString()
 | 
			
		||||
    @IsOptional()
 | 
			
		||||
    cleartextkey?: string;
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user