Aggiunto supporto per i nuovi identifier

This commit is contained in:
KillerBossOriginal 2024-07-03 16:38:18 +02:00
parent a1dd37d444
commit efbf2e4084
2 changed files with 23 additions and 0 deletions

View file

@ -0,0 +1,4 @@
export enum IdentifierType {
DISCORD = "DISCORD",
EMAIL = "EMAIL"
}

View file

@ -0,0 +1,19 @@
import { IdentifierType } from "../types/IdentifierType";
export class Identifier {
type: IdentifierType;
value: string;
constructor(type: IdentifierType, value: string) {
this.type = type;
this.value = value;
}
/**
* Concatenates the type and value of the Identifier.
* This make the Identifier readable from the API parser
*
* @return {string} The concatenated type and value.
*/
asString () {
return `${this.type}:${this.value}`;
}
}