types-nora-api 0.0.16 → 0.0.18
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 +11 -251
- package/dist/classes.js +48 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +4 -4
package/dist/classes.d.ts
CHANGED
|
@@ -1,260 +1,19 @@
|
|
|
1
|
-
declare class
|
|
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 {
|
|
1
|
+
export declare class DisponibilidadeUsuario {
|
|
214
2
|
diaDaSemana: number;
|
|
215
3
|
horaInicio: string;
|
|
216
4
|
horaFim: string;
|
|
217
5
|
constructor(diaDaSemana: number, horaInicio: string, horaFim: string);
|
|
218
6
|
}
|
|
219
|
-
declare class
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
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);
|
|
7
|
+
export declare class DadosMinhasDisponibilidades {
|
|
8
|
+
disponibilidades: DisponibilidadeUsuario[];
|
|
9
|
+
constructor(disponibilidades: DisponibilidadeUsuario[]);
|
|
10
|
+
get disponibilidadePorExtenso(): Record<number, string[]>[];
|
|
229
11
|
}
|
|
230
|
-
export type RespostaBackEnd<T> = {
|
|
231
|
-
sucesso: boolean;
|
|
232
|
-
dados?: T;
|
|
233
|
-
erro?: string;
|
|
234
|
-
};
|
|
235
12
|
export interface PaletaCores {
|
|
236
13
|
corPrimaria: string;
|
|
237
14
|
corSecundaria?: string;
|
|
238
15
|
corTerciaria?: string;
|
|
239
16
|
}
|
|
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
17
|
export type DefinicaoElemento = {
|
|
259
18
|
tipo: 'Paragrafo';
|
|
260
19
|
conteudo: string;
|
|
@@ -271,9 +30,10 @@ export type ListaItem = {
|
|
|
271
30
|
export type DadosMinhaPagina = Pick<Usuario, 'username'> & {
|
|
272
31
|
caminhoAvatar: string;
|
|
273
32
|
};
|
|
274
|
-
export declare class
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
33
|
+
export declare class Usuario {
|
|
34
|
+
id: number;
|
|
35
|
+
username: string | null;
|
|
36
|
+
email: string;
|
|
37
|
+
discordId: string;
|
|
38
|
+
constructor(id: number, username: string, email: string, discordId: string);
|
|
278
39
|
}
|
|
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/dist/classes.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export class DisponibilidadeUsuario {
|
|
2
|
+
diaDaSemana;
|
|
3
|
+
horaInicio;
|
|
4
|
+
horaFim;
|
|
5
|
+
constructor(diaDaSemana, horaInicio, horaFim) {
|
|
6
|
+
this.diaDaSemana = diaDaSemana;
|
|
7
|
+
this.horaInicio = horaInicio;
|
|
8
|
+
this.horaFim = horaFim;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
;
|
|
12
|
+
export class DadosMinhasDisponibilidades {
|
|
13
|
+
disponibilidades;
|
|
14
|
+
constructor(disponibilidades) {
|
|
15
|
+
this.disponibilidades = disponibilidades;
|
|
16
|
+
}
|
|
17
|
+
get disponibilidadePorExtenso() {
|
|
18
|
+
const agrupadoPorDia = {};
|
|
19
|
+
// Agrupa as disponibilidades por dia da semana
|
|
20
|
+
this.disponibilidades.forEach(disponibilidade => {
|
|
21
|
+
const { diaDaSemana, horaInicio, horaFim } = disponibilidade;
|
|
22
|
+
const textoDisponibilidade = `Dísponível entre ${horaInicio} e ${horaFim}`;
|
|
23
|
+
if (!agrupadoPorDia[diaDaSemana]) {
|
|
24
|
+
agrupadoPorDia[diaDaSemana] = [];
|
|
25
|
+
}
|
|
26
|
+
agrupadoPorDia[diaDaSemana].push(textoDisponibilidade);
|
|
27
|
+
});
|
|
28
|
+
// Converte o objeto agrupado em uma lista de objetos
|
|
29
|
+
return Object.keys(agrupadoPorDia).map(dia => {
|
|
30
|
+
const diaNumero = Number(dia);
|
|
31
|
+
return { [diaNumero]: agrupadoPorDia[diaNumero] };
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
;
|
|
36
|
+
export class Usuario {
|
|
37
|
+
id;
|
|
38
|
+
username;
|
|
39
|
+
email;
|
|
40
|
+
discordId;
|
|
41
|
+
constructor(id, username, email, discordId) {
|
|
42
|
+
this.id = id;
|
|
43
|
+
this.username = username;
|
|
44
|
+
this.email = email;
|
|
45
|
+
this.discordId = discordId;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './classes';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './classes';
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "types-nora-api",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.18",
|
|
4
4
|
"description": "Tipagem da Nora-Api compartilhada com o universodomedo.com",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"types": "dist/
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build:types": "node scripts/extrairClasses.js",
|
|
9
9
|
"build": "tsc",
|
|
10
|
-
"
|
|
10
|
+
"prepare": "npm run build"
|
|
11
11
|
},
|
|
12
12
|
"files": [
|
|
13
13
|
"dist"
|