types-nora-api 0.0.14 → 0.0.16
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.d.ts +279 -0
- package/package.json +6 -4
- package/dist/classes.ts +0 -478
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
declare class Conquista {
|
|
2
|
+
id: number;
|
|
3
|
+
tipoConquista: TipoConquista;
|
|
4
|
+
nome: string;
|
|
5
|
+
descricao: string;
|
|
6
|
+
constructor(id: number, tipoConquista: TipoConquista, nome: string, descricao: string);
|
|
7
|
+
}
|
|
8
|
+
declare class TipoConquista {
|
|
9
|
+
id: number;
|
|
10
|
+
nome: string;
|
|
11
|
+
constructor(id: number, nome: string);
|
|
12
|
+
}
|
|
13
|
+
declare class Alcance {
|
|
14
|
+
id: number;
|
|
15
|
+
nome: string;
|
|
16
|
+
numero_metros: number;
|
|
17
|
+
descricao: string | null;
|
|
18
|
+
constructor(id: number, nome: string, numero_metros: number, descricao: string | null);
|
|
19
|
+
}
|
|
20
|
+
declare class Atributo {
|
|
21
|
+
id: number;
|
|
22
|
+
linhaEfeito: LinhaEfeito;
|
|
23
|
+
pericias: Pericia[];
|
|
24
|
+
nome: string;
|
|
25
|
+
descricao: string;
|
|
26
|
+
constructor(id: number, linhaEfeito: LinhaEfeito, pericias: Pericia[], nome: string, descricao: string);
|
|
27
|
+
get nomeAbreviado(): string;
|
|
28
|
+
}
|
|
29
|
+
declare class CategoriaRitual {
|
|
30
|
+
id: number;
|
|
31
|
+
circuloRitual: CirculoRitual;
|
|
32
|
+
nivelRitual: NivelRitual;
|
|
33
|
+
valorPsSacrificado: number;
|
|
34
|
+
constructor(id: number, circuloRitual: CirculoRitual, nivelRitual: NivelRitual, valorPsSacrificado: number);
|
|
35
|
+
get nome(): string;
|
|
36
|
+
}
|
|
37
|
+
declare class CirculoRitual {
|
|
38
|
+
id: number;
|
|
39
|
+
nome: string;
|
|
40
|
+
constructor(id: number, nome: string);
|
|
41
|
+
get nomeCompleto(): string;
|
|
42
|
+
}
|
|
43
|
+
declare class Classe {
|
|
44
|
+
id: number;
|
|
45
|
+
nome: string;
|
|
46
|
+
descricao: string;
|
|
47
|
+
constructor(id: number, nome: string, descricao: string);
|
|
48
|
+
}
|
|
49
|
+
declare class Duracao {
|
|
50
|
+
id: number;
|
|
51
|
+
nome: string;
|
|
52
|
+
constructor(id: number, nome: string);
|
|
53
|
+
}
|
|
54
|
+
declare class Elemento {
|
|
55
|
+
id: number;
|
|
56
|
+
nome: string;
|
|
57
|
+
cores: PaletaCores;
|
|
58
|
+
constructor(id: number, nome: string, cores: PaletaCores);
|
|
59
|
+
}
|
|
60
|
+
declare class EstatisticaDanificavel {
|
|
61
|
+
id: number;
|
|
62
|
+
nome: string;
|
|
63
|
+
cor: string;
|
|
64
|
+
descricao: string;
|
|
65
|
+
constructor(id: number, nome: string, cor: string, descricao: string);
|
|
66
|
+
get nomeAbreviado(): string;
|
|
67
|
+
}
|
|
68
|
+
declare class Execucao {
|
|
69
|
+
id: number;
|
|
70
|
+
linhaEfeito: LinhaEfeito;
|
|
71
|
+
nome: string;
|
|
72
|
+
constructor(id: number, linhaEfeito: LinhaEfeito, nome: string);
|
|
73
|
+
}
|
|
74
|
+
declare class FormatoAlcance {
|
|
75
|
+
id: number;
|
|
76
|
+
nome: string;
|
|
77
|
+
constructor(id: number, nome: string);
|
|
78
|
+
}
|
|
79
|
+
declare class LinhaEfeito {
|
|
80
|
+
id: number;
|
|
81
|
+
nome: string;
|
|
82
|
+
constructor(id: number, nome: string);
|
|
83
|
+
}
|
|
84
|
+
declare class Nivel {
|
|
85
|
+
id: number;
|
|
86
|
+
valoNivel: number;
|
|
87
|
+
constructor(id: number, valoNivel: number);
|
|
88
|
+
get nomeDisplay(): string;
|
|
89
|
+
}
|
|
90
|
+
declare class NivelComponente {
|
|
91
|
+
id: number;
|
|
92
|
+
nome: string;
|
|
93
|
+
constructor(id: number, nome: string);
|
|
94
|
+
}
|
|
95
|
+
declare class NivelProficiencia {
|
|
96
|
+
id: number;
|
|
97
|
+
nivel: number;
|
|
98
|
+
constructor(id: number, nivel: number);
|
|
99
|
+
}
|
|
100
|
+
declare class NivelRitual {
|
|
101
|
+
id: number;
|
|
102
|
+
nome: string;
|
|
103
|
+
constructor(id: number, nome: string);
|
|
104
|
+
}
|
|
105
|
+
declare class PatentePericia {
|
|
106
|
+
id: number;
|
|
107
|
+
nome: string;
|
|
108
|
+
bonusPatente: number;
|
|
109
|
+
cor: string;
|
|
110
|
+
constructor(id: number, nome: string, bonusPatente: number, cor: string);
|
|
111
|
+
}
|
|
112
|
+
declare class Pericia {
|
|
113
|
+
id: number;
|
|
114
|
+
atributo: Atributo;
|
|
115
|
+
linhaEfeito: LinhaEfeito;
|
|
116
|
+
nome: string;
|
|
117
|
+
descricao: string;
|
|
118
|
+
constructor(id: number, atributo: Atributo, linhaEfeito: LinhaEfeito, nome: string, descricao: string);
|
|
119
|
+
get nomeAbreviado(): string;
|
|
120
|
+
}
|
|
121
|
+
declare class Proficiencia {
|
|
122
|
+
id: number;
|
|
123
|
+
tipoProficiencia: TipoProficiencia;
|
|
124
|
+
nivelProficiencia: NivelProficiencia;
|
|
125
|
+
nome: string;
|
|
126
|
+
constructor(id: number, tipoProficiencia: TipoProficiencia, nivelProficiencia: NivelProficiencia, nome: string);
|
|
127
|
+
}
|
|
128
|
+
declare class TipoAlvo {
|
|
129
|
+
id: number;
|
|
130
|
+
nome: string;
|
|
131
|
+
constructor(id: number, nome: string);
|
|
132
|
+
}
|
|
133
|
+
declare class TipoCategoria {
|
|
134
|
+
id: number;
|
|
135
|
+
valorCategoria: number;
|
|
136
|
+
constructor(id: number, valorCategoria: number);
|
|
137
|
+
get nomeCategoria(): string;
|
|
138
|
+
}
|
|
139
|
+
declare class TipoDano {
|
|
140
|
+
id: number;
|
|
141
|
+
linhaEfeito: LinhaEfeito;
|
|
142
|
+
tipoDanoPertencente: TipoDano;
|
|
143
|
+
nome: string;
|
|
144
|
+
constructor(id: number, linhaEfeito: LinhaEfeito, tipoDanoPertencente: TipoDano, nome: string);
|
|
145
|
+
}
|
|
146
|
+
declare class TipoEfeito {
|
|
147
|
+
id: number;
|
|
148
|
+
nome: string;
|
|
149
|
+
nomeVisualizacao: string;
|
|
150
|
+
constructor(id: number, nome: string, nomeVisualizacao: string);
|
|
151
|
+
}
|
|
152
|
+
declare class TipoItem {
|
|
153
|
+
id: number;
|
|
154
|
+
nome: string;
|
|
155
|
+
constructor(id: number, nome: string);
|
|
156
|
+
}
|
|
157
|
+
declare class TipoProficiencia {
|
|
158
|
+
id: number;
|
|
159
|
+
nome: string;
|
|
160
|
+
constructor(id: number, nome: string);
|
|
161
|
+
}
|
|
162
|
+
declare class PerfilAdmin {
|
|
163
|
+
id: number;
|
|
164
|
+
nome: string;
|
|
165
|
+
descricao: string;
|
|
166
|
+
constructor(id: number, nome: string, descricao: string);
|
|
167
|
+
}
|
|
168
|
+
declare class PerfilJogador {
|
|
169
|
+
id: number;
|
|
170
|
+
nome: string;
|
|
171
|
+
descricao: string;
|
|
172
|
+
constructor(id: number, nome: string, descricao: string);
|
|
173
|
+
}
|
|
174
|
+
declare class PerfilMestre {
|
|
175
|
+
id: number;
|
|
176
|
+
nome: string;
|
|
177
|
+
descricao: string;
|
|
178
|
+
constructor(id: number, nome: string, descricao: string);
|
|
179
|
+
}
|
|
180
|
+
declare class Personagem {
|
|
181
|
+
id: number;
|
|
182
|
+
tipoPersonagem: TipoPersonagem;
|
|
183
|
+
usuarioCriador: Usuario;
|
|
184
|
+
constructor(id: number, tipoPersonagem: TipoPersonagem, usuarioCriador: Usuario);
|
|
185
|
+
}
|
|
186
|
+
declare class TipoPersonagem {
|
|
187
|
+
id: number;
|
|
188
|
+
nome: string;
|
|
189
|
+
descricao: string;
|
|
190
|
+
constructor(id: number, nome: string, descricao: string);
|
|
191
|
+
}
|
|
192
|
+
declare class Estudo {
|
|
193
|
+
id: number;
|
|
194
|
+
nome: string;
|
|
195
|
+
constructor(id: number, nome: string);
|
|
196
|
+
}
|
|
197
|
+
declare class AuthSession {
|
|
198
|
+
expiredAt: number;
|
|
199
|
+
id: string;
|
|
200
|
+
destroyedAt?: Date | undefined;
|
|
201
|
+
json: string;
|
|
202
|
+
constructor(expiredAt: number, id: string, json: string, destroyedAt?: Date | undefined);
|
|
203
|
+
}
|
|
204
|
+
declare class CustomizacaoUsuario {
|
|
205
|
+
id: number;
|
|
206
|
+
usuario: Usuario;
|
|
207
|
+
personagemAvatarPrincipal: Personagem;
|
|
208
|
+
conquistaExibirPerfil1: Conquista;
|
|
209
|
+
conquistaExibirPerfil2: Conquista;
|
|
210
|
+
conquistaExibirPerfil3: Conquista;
|
|
211
|
+
constructor(id: number, usuario: Usuario, personagemAvatarPrincipal: Personagem, conquistaExibirPerfil1: Conquista, conquistaExibirPerfil2: Conquista, conquistaExibirPerfil3: Conquista);
|
|
212
|
+
}
|
|
213
|
+
declare class DisponibilidadeUsuario {
|
|
214
|
+
diaDaSemana: number;
|
|
215
|
+
horaInicio: string;
|
|
216
|
+
horaFim: string;
|
|
217
|
+
constructor(diaDaSemana: number, horaInicio: string, horaFim: string);
|
|
218
|
+
}
|
|
219
|
+
declare class Usuario {
|
|
220
|
+
id: number;
|
|
221
|
+
perfilJogador: PerfilJogador;
|
|
222
|
+
perfilMestre: PerfilMestre;
|
|
223
|
+
perfilAdmin: PerfilAdmin;
|
|
224
|
+
customizacao: CustomizacaoUsuario;
|
|
225
|
+
username: string | null;
|
|
226
|
+
email: string;
|
|
227
|
+
discordId: string;
|
|
228
|
+
constructor(id: number, perfilJogador: PerfilJogador, perfilMestre: PerfilMestre, perfilAdmin: PerfilAdmin, customizacao: CustomizacaoUsuario, username: string, email: string, discordId: string);
|
|
229
|
+
}
|
|
230
|
+
export type RespostaBackEnd<T> = {
|
|
231
|
+
sucesso: boolean;
|
|
232
|
+
dados?: T;
|
|
233
|
+
erro?: string;
|
|
234
|
+
};
|
|
235
|
+
export interface PaletaCores {
|
|
236
|
+
corPrimaria: string;
|
|
237
|
+
corSecundaria?: string;
|
|
238
|
+
corTerciaria?: string;
|
|
239
|
+
}
|
|
240
|
+
export type EstruturaPaginaDefinicao = {
|
|
241
|
+
titulo: string;
|
|
242
|
+
subtitulo?: string;
|
|
243
|
+
listaConteudo: {
|
|
244
|
+
itens: ConteudoItem[];
|
|
245
|
+
};
|
|
246
|
+
listaItensDefinicoesConectadas?: {
|
|
247
|
+
etiqueta: string;
|
|
248
|
+
subPaginaDefinicao: string;
|
|
249
|
+
}[];
|
|
250
|
+
};
|
|
251
|
+
export type ConteudoItem = {
|
|
252
|
+
tipo: 'Definicao';
|
|
253
|
+
elementos: DefinicaoElemento[];
|
|
254
|
+
} | {
|
|
255
|
+
tipo: 'Lista';
|
|
256
|
+
itensLista: ListaItem[];
|
|
257
|
+
};
|
|
258
|
+
export type DefinicaoElemento = {
|
|
259
|
+
tipo: 'Paragrafo';
|
|
260
|
+
conteudo: string;
|
|
261
|
+
} | {
|
|
262
|
+
tipo: 'ParagrafoSecreto';
|
|
263
|
+
};
|
|
264
|
+
export type ListaItem = {
|
|
265
|
+
tipo: 'ItemLista';
|
|
266
|
+
etiqueta: string;
|
|
267
|
+
subPaginaDefinicao: string;
|
|
268
|
+
} | {
|
|
269
|
+
tipo: 'ItemListaSecreto';
|
|
270
|
+
};
|
|
271
|
+
export type DadosMinhaPagina = Pick<Usuario, 'username'> & {
|
|
272
|
+
caminhoAvatar: string;
|
|
273
|
+
};
|
|
274
|
+
export declare class DadosMinhasDisponibilidades {
|
|
275
|
+
disponibilidades: DisponibilidadeUsuario[];
|
|
276
|
+
constructor(disponibilidades: DisponibilidadeUsuario[]);
|
|
277
|
+
get disponibilidadePorExtenso(): Record<number, string[]>[];
|
|
278
|
+
}
|
|
279
|
+
export { Conquista, TipoConquista, Alcance, Atributo, CategoriaRitual, CirculoRitual, Classe, Duracao, Elemento, EstatisticaDanificavel, Execucao, FormatoAlcance, LinhaEfeito, Nivel, NivelComponente, NivelProficiencia, NivelRitual, PatentePericia, Pericia, Proficiencia, TipoAlvo, TipoCategoria, TipoDano, TipoEfeito, TipoItem, TipoProficiencia, PerfilAdmin, PerfilJogador, PerfilMestre, Personagem, TipoPersonagem, Estudo, AuthSession, CustomizacaoUsuario, DisponibilidadeUsuario, Usuario };
|
package/package.json
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "types-nora-api",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.16",
|
|
4
4
|
"description": "Tipagem da Nora-Api compartilhada com o universodomedo.com",
|
|
5
|
-
"main": "dist/
|
|
6
|
-
"types": "dist/classes.ts",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/classes.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"build:types": "node scripts/extrairClasses.js"
|
|
8
|
+
"build:types": "node scripts/extrairClasses.js",
|
|
9
|
+
"build": "tsc",
|
|
10
|
+
"prepublishOnly": "npm run build"
|
|
9
11
|
},
|
|
10
12
|
"files": [
|
|
11
13
|
"dist"
|
package/dist/classes.ts
DELETED
|
@@ -1,478 +0,0 @@
|
|
|
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 Alcance {
|
|
24
|
-
id: number;
|
|
25
|
-
nome: string;
|
|
26
|
-
numero_metros: number;
|
|
27
|
-
descricao: string | null;
|
|
28
|
-
|
|
29
|
-
constructor (id: number, nome: string, numero_metros: number, descricao: string | null) {
|
|
30
|
-
this.id = id;
|
|
31
|
-
this.nome = nome;
|
|
32
|
-
this.numero_metros = numero_metros;
|
|
33
|
-
this.descricao = descricao;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
class Atributo {
|
|
37
|
-
id: number;
|
|
38
|
-
linhaEfeito: LinhaEfeito;
|
|
39
|
-
pericias: Pericia[];
|
|
40
|
-
nome: string;
|
|
41
|
-
descricao: string;
|
|
42
|
-
|
|
43
|
-
constructor(id: number, linhaEfeito: LinhaEfeito, pericias: Pericia[], nome: string, descricao: string) {
|
|
44
|
-
this.id = id;
|
|
45
|
-
this.linhaEfeito = linhaEfeito;
|
|
46
|
-
this.pericias = pericias;
|
|
47
|
-
this.nome = nome;
|
|
48
|
-
this.descricao = descricao;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
get nomeAbreviado(): string {
|
|
52
|
-
return this.nome.toUpperCase().slice(0, 3);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
class CategoriaRitual {
|
|
56
|
-
id: number;
|
|
57
|
-
circuloRitual: CirculoRitual;
|
|
58
|
-
nivelRitual: NivelRitual;
|
|
59
|
-
valorPsSacrificado: number;
|
|
60
|
-
|
|
61
|
-
constructor (id: number, circuloRitual: CirculoRitual, nivelRitual: NivelRitual, valorPsSacrificado: number) {
|
|
62
|
-
this.id = id;
|
|
63
|
-
this.circuloRitual = circuloRitual;
|
|
64
|
-
this.nivelRitual = nivelRitual;
|
|
65
|
-
this.valorPsSacrificado = valorPsSacrificado;
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
get nome(): string { return `${this.circuloRitual.nomeCompleto} ${this.nivelRitual.nome}`; }
|
|
69
|
-
}
|
|
70
|
-
class CirculoRitual {
|
|
71
|
-
id: number;
|
|
72
|
-
nome: string;
|
|
73
|
-
|
|
74
|
-
constructor (id: number, nome: string) {
|
|
75
|
-
this.id = id;
|
|
76
|
-
this.nome = nome;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
get nomeCompleto(): string { return `${this.nome}º Círculo`; }
|
|
80
|
-
}
|
|
81
|
-
class Classe {
|
|
82
|
-
id: number;
|
|
83
|
-
nome: string;
|
|
84
|
-
descricao: string;
|
|
85
|
-
|
|
86
|
-
constructor (id: number, nome: string, descricao: string) {
|
|
87
|
-
this.id = id;
|
|
88
|
-
this.nome = nome;
|
|
89
|
-
this.descricao = descricao;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
class Duracao {
|
|
93
|
-
id: number;
|
|
94
|
-
nome: string;
|
|
95
|
-
|
|
96
|
-
constructor (id: number, nome: string) {
|
|
97
|
-
this.id = id;
|
|
98
|
-
this.nome = nome;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
class Elemento {
|
|
102
|
-
id: number;
|
|
103
|
-
nome: string;
|
|
104
|
-
cores: PaletaCores;
|
|
105
|
-
|
|
106
|
-
constructor (id: number, nome: string, cores: PaletaCores) {
|
|
107
|
-
this.id = id;
|
|
108
|
-
this.nome = nome;
|
|
109
|
-
this.cores = cores;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
class EstatisticaDanificavel {
|
|
113
|
-
id: number;
|
|
114
|
-
nome: string;
|
|
115
|
-
cor: string;
|
|
116
|
-
descricao: string;
|
|
117
|
-
|
|
118
|
-
constructor (id: number, nome: string, cor: string, descricao: string) {
|
|
119
|
-
this.id = id
|
|
120
|
-
this.nome = nome
|
|
121
|
-
this.cor = cor
|
|
122
|
-
this.descricao = descricao
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
get nomeAbreviado(): string { return this.nome.split(" ").filter(word => word.toLowerCase() !== "de").map(word => word[0].toUpperCase()).join(".") + "."; }
|
|
126
|
-
}
|
|
127
|
-
class Execucao {
|
|
128
|
-
id: number;
|
|
129
|
-
linhaEfeito: LinhaEfeito;
|
|
130
|
-
nome: string;
|
|
131
|
-
|
|
132
|
-
constructor (id: number, linhaEfeito: LinhaEfeito, nome: string) {
|
|
133
|
-
this.id = id;
|
|
134
|
-
this.linhaEfeito = linhaEfeito;
|
|
135
|
-
this.nome = nome;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
class FormatoAlcance {
|
|
139
|
-
id: number;
|
|
140
|
-
nome: string;
|
|
141
|
-
|
|
142
|
-
constructor (id: number, nome: string) {
|
|
143
|
-
this.id = id;
|
|
144
|
-
this.nome = nome;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
class LinhaEfeito {
|
|
148
|
-
id: number;
|
|
149
|
-
nome: string;
|
|
150
|
-
|
|
151
|
-
constructor(id: number, nome: string) {
|
|
152
|
-
this.id = id;
|
|
153
|
-
this.nome = nome;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
class Nivel {
|
|
157
|
-
id: number;
|
|
158
|
-
valoNivel: number;
|
|
159
|
-
|
|
160
|
-
constructor (id: number, valoNivel: number) {
|
|
161
|
-
this.id = id;
|
|
162
|
-
this.valoNivel = valoNivel;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
get nomeDisplay(): string { return `${this.valoNivel}% EX.P.`; }
|
|
166
|
-
}
|
|
167
|
-
class NivelComponente {
|
|
168
|
-
id: number;
|
|
169
|
-
nome: string;
|
|
170
|
-
|
|
171
|
-
constructor (id: number, nome: string) {
|
|
172
|
-
this.id = id;
|
|
173
|
-
this.nome = nome;
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
class NivelProficiencia {
|
|
177
|
-
id: number;
|
|
178
|
-
nivel: number;
|
|
179
|
-
|
|
180
|
-
constructor (id: number, nivel: number) {
|
|
181
|
-
this.id = id;
|
|
182
|
-
this.nivel = nivel;
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
class NivelRitual {
|
|
186
|
-
id: number;
|
|
187
|
-
nome: string;
|
|
188
|
-
|
|
189
|
-
constructor (id: number, nome: string) {
|
|
190
|
-
this.id = id;
|
|
191
|
-
this.nome = nome;
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
class PatentePericia {
|
|
195
|
-
id: number;
|
|
196
|
-
nome: string;
|
|
197
|
-
bonusPatente: number;
|
|
198
|
-
cor: string;
|
|
199
|
-
|
|
200
|
-
constructor (id: number, nome: string, bonusPatente: number, cor: string) {
|
|
201
|
-
this.id = id;
|
|
202
|
-
this.nome = nome;
|
|
203
|
-
this.bonusPatente = bonusPatente;
|
|
204
|
-
this.cor = cor;
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
class Pericia {
|
|
208
|
-
id: number;
|
|
209
|
-
atributo: Atributo;
|
|
210
|
-
linhaEfeito: LinhaEfeito;
|
|
211
|
-
nome: string;
|
|
212
|
-
descricao: string;
|
|
213
|
-
|
|
214
|
-
constructor (id: number, atributo: Atributo, linhaEfeito: LinhaEfeito, nome: string, descricao: string) {
|
|
215
|
-
this.id = id;
|
|
216
|
-
this.atributo = atributo;
|
|
217
|
-
this.linhaEfeito = linhaEfeito;
|
|
218
|
-
this.nome = nome;
|
|
219
|
-
this.descricao = descricao;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
get nomeAbreviado(): string { return this.nome.toUpperCase().slice(0, 4); }
|
|
223
|
-
}
|
|
224
|
-
class Proficiencia {
|
|
225
|
-
id: number;
|
|
226
|
-
tipoProficiencia: TipoProficiencia;
|
|
227
|
-
nivelProficiencia: NivelProficiencia;
|
|
228
|
-
nome: string;
|
|
229
|
-
|
|
230
|
-
constructor (id: number, tipoProficiencia: TipoProficiencia, nivelProficiencia: NivelProficiencia, nome: string) {
|
|
231
|
-
this.id = id;
|
|
232
|
-
this.tipoProficiencia = tipoProficiencia;
|
|
233
|
-
this.nivelProficiencia = nivelProficiencia;
|
|
234
|
-
this.nome = nome;
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
class TipoAlvo {
|
|
238
|
-
id: number;
|
|
239
|
-
nome: string;
|
|
240
|
-
|
|
241
|
-
constructor (id: number, nome: string) {
|
|
242
|
-
this.id = id;
|
|
243
|
-
this.nome = nome;
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
class TipoCategoria {
|
|
247
|
-
id: number;
|
|
248
|
-
valorCategoria: number;
|
|
249
|
-
|
|
250
|
-
constructor (id: number, valorCategoria: number) {
|
|
251
|
-
this.id = id;
|
|
252
|
-
this.valorCategoria = valorCategoria;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
get nomeCategoria(): string { return `Categoria ${this.valorCategoria}`; }
|
|
256
|
-
}
|
|
257
|
-
class TipoDano {
|
|
258
|
-
id: number;
|
|
259
|
-
linhaEfeito: LinhaEfeito;
|
|
260
|
-
tipoDanoPertencente: TipoDano;
|
|
261
|
-
nome: string;
|
|
262
|
-
|
|
263
|
-
constructor (id: number, linhaEfeito: LinhaEfeito, tipoDanoPertencente: TipoDano, nome: string) {
|
|
264
|
-
this.id = id;
|
|
265
|
-
this.linhaEfeito = linhaEfeito;
|
|
266
|
-
this.tipoDanoPertencente = tipoDanoPertencente;
|
|
267
|
-
this.nome = nome;
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
class TipoEfeito {
|
|
271
|
-
id: number;
|
|
272
|
-
nome: string;
|
|
273
|
-
nomeVisualizacao: string;
|
|
274
|
-
|
|
275
|
-
constructor (id: number, nome: string, nomeVisualizacao: string) {
|
|
276
|
-
this.id = id;
|
|
277
|
-
this.nome = nome;
|
|
278
|
-
this.nomeVisualizacao = nomeVisualizacao;
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
class TipoItem {
|
|
282
|
-
id: number;
|
|
283
|
-
nome: string;
|
|
284
|
-
|
|
285
|
-
constructor (id: number, nome: string) {
|
|
286
|
-
this.id = id;
|
|
287
|
-
this.nome = nome;
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
class TipoProficiencia {
|
|
291
|
-
id: number;
|
|
292
|
-
nome: string;
|
|
293
|
-
|
|
294
|
-
constructor (id: number, nome: string) {
|
|
295
|
-
this.id = id;
|
|
296
|
-
this.nome = nome;
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
class PerfilAdmin {
|
|
300
|
-
id: number;
|
|
301
|
-
nome: string;
|
|
302
|
-
descricao: string;
|
|
303
|
-
|
|
304
|
-
constructor (id: number, nome: string, descricao: string) {
|
|
305
|
-
this.id = id;
|
|
306
|
-
this.nome = nome;
|
|
307
|
-
this.descricao = descricao;
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
class PerfilJogador {
|
|
311
|
-
id: number;
|
|
312
|
-
nome: string;
|
|
313
|
-
descricao: string;
|
|
314
|
-
|
|
315
|
-
constructor (id: number, nome: string, descricao: string) {
|
|
316
|
-
this.id = id;
|
|
317
|
-
this.nome = nome;
|
|
318
|
-
this.descricao = descricao;
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
class PerfilMestre {
|
|
322
|
-
id: number;
|
|
323
|
-
nome: string;
|
|
324
|
-
descricao: string;
|
|
325
|
-
|
|
326
|
-
constructor (id: number, nome: string, descricao: string) {
|
|
327
|
-
this.id = id;
|
|
328
|
-
this.nome = nome;
|
|
329
|
-
this.descricao = descricao;
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
class Personagem {
|
|
333
|
-
id: number;
|
|
334
|
-
tipoPersonagem: TipoPersonagem;
|
|
335
|
-
usuarioCriador: Usuario;
|
|
336
|
-
|
|
337
|
-
constructor (id: number, tipoPersonagem: TipoPersonagem, usuarioCriador: Usuario) {
|
|
338
|
-
this.id = id;
|
|
339
|
-
this.tipoPersonagem = tipoPersonagem;
|
|
340
|
-
this.usuarioCriador = usuarioCriador;
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
class TipoPersonagem {
|
|
344
|
-
id: number;
|
|
345
|
-
nome: string;
|
|
346
|
-
descricao: string;
|
|
347
|
-
|
|
348
|
-
constructor (id: number, nome: string, descricao: string) {
|
|
349
|
-
this.id = id;
|
|
350
|
-
this.nome = nome;
|
|
351
|
-
this.descricao = descricao;
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
class Estudo {
|
|
355
|
-
id: number;
|
|
356
|
-
nome: string
|
|
357
|
-
|
|
358
|
-
constructor(id: number, nome: string) {
|
|
359
|
-
this.id = id;
|
|
360
|
-
this.nome = nome;
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
class AuthSession {
|
|
364
|
-
expiredAt: number;
|
|
365
|
-
id: string;
|
|
366
|
-
destroyedAt?: Date | undefined;
|
|
367
|
-
json: string;
|
|
368
|
-
|
|
369
|
-
constructor (expiredAt: number, id: string, json: string, destroyedAt?: Date | undefined) {
|
|
370
|
-
this.expiredAt = expiredAt;
|
|
371
|
-
this.id = id;
|
|
372
|
-
this.destroyedAt = destroyedAt;
|
|
373
|
-
this.json = json;
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
class CustomizacaoUsuario {
|
|
377
|
-
id: number;
|
|
378
|
-
usuario: Usuario;
|
|
379
|
-
personagemAvatarPrincipal: Personagem;
|
|
380
|
-
conquistaExibirPerfil1: Conquista;
|
|
381
|
-
conquistaExibirPerfil2: Conquista;
|
|
382
|
-
conquistaExibirPerfil3: Conquista;
|
|
383
|
-
|
|
384
|
-
constructor (id: number, usuario: Usuario, personagemAvatarPrincipal: Personagem, conquistaExibirPerfil1: Conquista, conquistaExibirPerfil2: Conquista, conquistaExibirPerfil3: Conquista) {
|
|
385
|
-
this.id = id;
|
|
386
|
-
this.usuario = usuario;
|
|
387
|
-
this.personagemAvatarPrincipal = personagemAvatarPrincipal;
|
|
388
|
-
this.conquistaExibirPerfil1 = conquistaExibirPerfil1;
|
|
389
|
-
this.conquistaExibirPerfil2 = conquistaExibirPerfil2;
|
|
390
|
-
this.conquistaExibirPerfil3 = conquistaExibirPerfil3;
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
class DisponibilidadeUsuario {
|
|
394
|
-
diaDaSemana: number;
|
|
395
|
-
horaInicio: string;
|
|
396
|
-
horaFim: string;
|
|
397
|
-
|
|
398
|
-
constructor(diaDaSemana: number, horaInicio: string, horaFim: string) {
|
|
399
|
-
this.diaDaSemana = diaDaSemana;
|
|
400
|
-
this.horaInicio = horaInicio;
|
|
401
|
-
this.horaFim = horaFim;
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
class Usuario {
|
|
405
|
-
id: number;
|
|
406
|
-
perfilJogador: PerfilJogador;
|
|
407
|
-
perfilMestre: PerfilMestre;
|
|
408
|
-
perfilAdmin: PerfilAdmin;
|
|
409
|
-
customizacao: CustomizacaoUsuario;
|
|
410
|
-
username: string | null;
|
|
411
|
-
email: string;
|
|
412
|
-
discordId: string;
|
|
413
|
-
|
|
414
|
-
constructor (id: number, perfilJogador: PerfilJogador, perfilMestre: PerfilMestre, perfilAdmin: PerfilAdmin, customizacao: CustomizacaoUsuario, username: string, email: string, discordId: string) {
|
|
415
|
-
this.id = id;
|
|
416
|
-
this.perfilJogador = perfilJogador;
|
|
417
|
-
this.perfilMestre = perfilMestre;
|
|
418
|
-
this.perfilAdmin = perfilAdmin;
|
|
419
|
-
this.customizacao = customizacao;
|
|
420
|
-
this.username = username;
|
|
421
|
-
this.email = email;
|
|
422
|
-
this.discordId = discordId;
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
export type RespostaBackEnd<T> = {
|
|
426
|
-
sucesso: boolean;
|
|
427
|
-
dados?: T;
|
|
428
|
-
erro?: string;
|
|
429
|
-
};
|
|
430
|
-
export interface PaletaCores {
|
|
431
|
-
corPrimaria: string,
|
|
432
|
-
corSecundaria?: string,
|
|
433
|
-
corTerciaria?: string,
|
|
434
|
-
};
|
|
435
|
-
export type EstruturaPaginaDefinicao = {
|
|
436
|
-
titulo: string;
|
|
437
|
-
subtitulo?: string;
|
|
438
|
-
listaConteudo: {
|
|
439
|
-
itens: ConteudoItem[];
|
|
440
|
-
};
|
|
441
|
-
listaItensDefinicoesConectadas?: { etiqueta: string; subPaginaDefinicao: string }[];
|
|
442
|
-
};
|
|
443
|
-
export type ConteudoItem =
|
|
444
|
-
| { tipo: 'Definicao'; elementos: DefinicaoElemento[] }
|
|
445
|
-
| { tipo: 'Lista'; itensLista: ListaItem[] };
|
|
446
|
-
export type DefinicaoElemento =
|
|
447
|
-
| { tipo: 'Paragrafo'; conteudo: string }
|
|
448
|
-
| { tipo: 'ParagrafoSecreto' };
|
|
449
|
-
export type ListaItem =
|
|
450
|
-
| { tipo: 'ItemLista', etiqueta: string; subPaginaDefinicao: string }
|
|
451
|
-
| { tipo: 'ItemListaSecreto' };
|
|
452
|
-
export type DadosMinhaPagina = Pick<Usuario, 'username'> & {
|
|
453
|
-
caminhoAvatar: string;
|
|
454
|
-
};
|
|
455
|
-
export class DadosMinhasDisponibilidades {
|
|
456
|
-
disponibilidades: DisponibilidadeUsuario[];
|
|
457
|
-
constructor(disponibilidades: DisponibilidadeUsuario[]) {
|
|
458
|
-
this.disponibilidades = disponibilidades;
|
|
459
|
-
}
|
|
460
|
-
get disponibilidadePorExtenso(): Record<number, string[]>[] {
|
|
461
|
-
const agrupadoPorDia: Record<number, string[]> = {};
|
|
462
|
-
// Agrupa as disponibilidades por dia da semana
|
|
463
|
-
this.disponibilidades.forEach(disponibilidade => {
|
|
464
|
-
const { diaDaSemana, horaInicio, horaFim } = disponibilidade;
|
|
465
|
-
const textoDisponibilidade = `Dísponível entre ${horaInicio} e ${horaFim}`;
|
|
466
|
-
if (!agrupadoPorDia[diaDaSemana]) {
|
|
467
|
-
agrupadoPorDia[diaDaSemana] = [];
|
|
468
|
-
}
|
|
469
|
-
agrupadoPorDia[diaDaSemana].push(textoDisponibilidade);
|
|
470
|
-
});
|
|
471
|
-
// Converte o objeto agrupado em uma lista de objetos
|
|
472
|
-
return Object.keys(agrupadoPorDia).map(dia => {
|
|
473
|
-
const diaNumero = Number(dia);
|
|
474
|
-
return { [diaNumero]: agrupadoPorDia[diaNumero] };
|
|
475
|
-
});
|
|
476
|
-
}
|
|
477
|
-
}
|
|
478
|
-
export { Conquista, TipoConquista, Alcance, Atributo, CategoriaRitual, CirculoRitual, Classe, Duracao, Elemento, EstatisticaDanificavel, Execucao, FormatoAlcance, LinhaEfeito, Nivel, NivelComponente, NivelProficiencia, NivelRitual, PatentePericia, Pericia, Proficiencia, TipoAlvo, TipoCategoria, TipoDano, TipoEfeito, TipoItem, TipoProficiencia, PerfilAdmin, PerfilJogador, PerfilMestre, Personagem, TipoPersonagem, Estudo, AuthSession, CustomizacaoUsuario, DisponibilidadeUsuario, Usuario };
|