types-nora-api 0.0.7 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/classes.ts +50 -0
- package/package.json +4 -4
- package/dist/classes.d.ts +0 -7
- package/dist/classes.js +0 -14
package/dist/classes.ts
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
class Conquista {
|
|
2
|
+
id: number;
|
|
3
|
+
tipoConquista: TipoConquista;
|
|
4
|
+
nome: string;
|
|
5
|
+
descricao: string;
|
|
6
|
+
|
|
7
|
+
constructor(id: number, tipoConquista: TipoConquista, nome: string, descricao: string) {
|
|
8
|
+
this.id = id;
|
|
9
|
+
this.tipoConquista = tipoConquista;
|
|
10
|
+
this.nome = nome;
|
|
11
|
+
this.descricao = descricao;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
class TipoConquista {
|
|
15
|
+
id: number;
|
|
16
|
+
nome: string;
|
|
17
|
+
|
|
18
|
+
constructor(id: number, nome: string) {
|
|
19
|
+
this.id = id;
|
|
20
|
+
this.nome = nome;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
class Atributo {
|
|
24
|
+
id: number;
|
|
25
|
+
linhaEfeito: LinhaEfeito;
|
|
26
|
+
nome: string;
|
|
27
|
+
descricao: string;
|
|
28
|
+
|
|
29
|
+
constructor(id: number, linhaEfeito: LinhaEfeito, nome: string, descricao: string) {
|
|
30
|
+
this.id = id;
|
|
31
|
+
this.linhaEfeito = linhaEfeito;
|
|
32
|
+
this.nome = nome;
|
|
33
|
+
this.descricao = descricao;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
get nomeAbreviado(): string {
|
|
37
|
+
return this.nome.toUpperCase().slice(0, 3);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
class LinhaEfeito {
|
|
41
|
+
id: number;
|
|
42
|
+
nome: string;
|
|
43
|
+
|
|
44
|
+
constructor(id: number, nome: string) {
|
|
45
|
+
this.id = id;
|
|
46
|
+
this.nome = nome;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
}
|
|
50
|
+
export { Conquista, TipoConquista, Atributo, LinhaEfeito };
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "types-nora-api",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"description": "Tipagem da Nora-Api compartilhada com o universodomedo.com",
|
|
5
5
|
"main": "dist/classes.js",
|
|
6
6
|
"types": "dist/classes.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"prepublish": "npm run build && npm run geraClasses",
|
|
9
|
-
"build": "tsc -p .",
|
|
10
8
|
"geraClasses": "ts-node scripts/geraClasses.ts",
|
|
11
|
-
"
|
|
9
|
+
"build": "tsc -p .",
|
|
10
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
11
|
+
"build:types": "node scripts/extrairClasses.js"
|
|
12
12
|
},
|
|
13
13
|
"files": [
|
|
14
14
|
"dist"
|
package/dist/classes.d.ts
DELETED
package/dist/classes.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Atributo = void 0;
|
|
4
|
-
class Atributo {
|
|
5
|
-
constructor(id, nome, descricao) {
|
|
6
|
-
this.id = id;
|
|
7
|
-
this.nome = nome;
|
|
8
|
-
this.descricao = descricao;
|
|
9
|
-
}
|
|
10
|
-
get nomeTeste() {
|
|
11
|
-
return `${this.nome} teste`;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
exports.Atributo = Atributo;
|