types-nora-api 0.0.9 → 0.0.10

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.
Files changed (2) hide show
  1. package/dist/classes.ts +369 -1
  2. package/package.json +1 -4
package/dist/classes.ts CHANGED
@@ -20,6 +20,19 @@ class TipoConquista {
20
20
  this.nome = nome;
21
21
  }
22
22
  }
23
+ class Alcance {
24
+ id: number;
25
+ nome: string;
26
+ numero_metros: number;
27
+ descricao: string;
28
+
29
+ constructor (id: number, nome: string, numero_metros: number, descricao: string) {
30
+ this.id = id;
31
+ this.nome = nome;
32
+ this.numero_metros = numero_metros;
33
+ this.descricao = descricao;
34
+ }
35
+ }
23
36
  class Atributo {
24
37
  id: number;
25
38
  linhaEfeito: LinhaEfeito;
@@ -37,6 +50,98 @@ class Atributo {
37
50
  return this.nome.toUpperCase().slice(0, 3);
38
51
  }
39
52
  }
53
+ class CategoriaRitual {
54
+ id: number;
55
+ circuloRitual: CirculoRitual;
56
+ nivelRitual: NivelRitual;
57
+ valorPsSacrificado: number;
58
+
59
+ constructor (id: number, circuloRitual: CirculoRitual, nivelRitual: NivelRitual, valorPsSacrificado: number) {
60
+ this.id = id;
61
+ this.circuloRitual = circuloRitual;
62
+ this.nivelRitual = nivelRitual;
63
+ this.valorPsSacrificado = valorPsSacrificado;
64
+ };
65
+
66
+ get nome(): string { return `${this.circuloRitual.nomeCompleto} ${this.nivelRitual.nome}`; }
67
+ }
68
+ class CirculoRitual {
69
+ id: number;
70
+ nome: string;
71
+
72
+ constructor (id: number, nome: string) {
73
+ this.id = id;
74
+ this.nome = nome;
75
+ }
76
+
77
+ get nomeCompleto(): string { return `${this.nome}º Círculo`; }
78
+ }
79
+ class Classe {
80
+ id: number;
81
+ nome: string;
82
+ descricao: string;
83
+
84
+ constructor (id: number, nome: string, descricao: string) {
85
+ this.id = id;
86
+ this.nome = nome;
87
+ this.descricao = descricao;
88
+ }
89
+ }
90
+ class Duracao {
91
+ id: number;
92
+ nome: string;
93
+
94
+ constructor (id: number, nome: string) {
95
+ this.id = id;
96
+ this.nome = nome;
97
+ }
98
+ }
99
+ class Elemento {
100
+ id: number;
101
+ nome: string;
102
+ cores: PaletaCores;
103
+
104
+ constructor (id: number, nome: string, cores: PaletaCores) {
105
+ this.id = id;
106
+ this.nome = nome;
107
+ this.cores = cores;
108
+ }
109
+ }
110
+ class EstatisticaDanificavel {
111
+ id: number;
112
+ nome: string;
113
+ cor: string;
114
+ descricao: string;
115
+
116
+ constructor (id: number, nome: string, cor: string, descricao: string) {
117
+ this.id = id
118
+ this.nome = nome
119
+ this.cor = cor
120
+ this.descricao = descricao
121
+ }
122
+
123
+ get nomeAbreviado(): string { return this.nome.split(" ").filter(word => word.toLowerCase() !== "de").map(word => word[0].toUpperCase()).join(".") + "."; }
124
+ }
125
+ class Execucao {
126
+ id: number;
127
+ linhaEfeito: LinhaEfeito;
128
+ nome: string;
129
+
130
+ constructor (id: number, linhaEfeito: LinhaEfeito, nome: string) {
131
+ this.id = id;
132
+ this.linhaEfeito = linhaEfeito;
133
+ this.nome = nome;
134
+ }
135
+ }
136
+ class FormatoAlcance {
137
+ id: number;
138
+ nome: string;
139
+
140
+ constructor (id: number, nome: string) {
141
+ this.id = id;
142
+ this.nome = nome;
143
+ }
144
+ }
40
145
  class LinhaEfeito {
41
146
  id: number;
42
147
  nome: string;
@@ -45,6 +150,269 @@ class LinhaEfeito {
45
150
  this.id = id;
46
151
  this.nome = nome;
47
152
  }
153
+ }
154
+ class Nivel {
155
+ id: number;
156
+ valoNivel: number;
157
+
158
+ constructor (id: number, valoNivel: number) {
159
+ this.id = id;
160
+ this.valoNivel = valoNivel;
161
+ }
162
+
163
+ get nomeDisplay(): string { return `${this.valoNivel}% EX.P.`; }
164
+ }
165
+ class NivelComponente {
166
+ id: number;
167
+ nome: string;
168
+
169
+ constructor (id: number, nome: string) {
170
+ this.id = id;
171
+ this.nome = nome;
172
+ }
173
+ }
174
+ class NivelProficiencia {
175
+ id: number;
176
+ nivel: number;
177
+
178
+ constructor (id: number, nivel: number) {
179
+ this.id = id;
180
+ this.nivel = nivel;
181
+ }
182
+ }
183
+ class NivelRitual {
184
+ id: number;
185
+ nome: string;
186
+
187
+ constructor (id: number, nome: string) {
188
+ this.id = id;
189
+ this.nome = nome;
190
+ }
191
+ }
192
+ class PatentePericia {
193
+ id: number;
194
+ nome: string;
195
+ bonusPatente: number;
196
+ cor: string;
48
197
 
198
+ constructor (id: number, nome: string, bonusPatente: number, cor: string) {
199
+ this.id = id;
200
+ this.nome = nome;
201
+ this.bonusPatente = bonusPatente;
202
+ this.cor = cor;
203
+ }
204
+ }
205
+ class Pericia {
206
+ id: number;
207
+ atributo: Atributo;
208
+ linhaEfeito: LinhaEfeito;
209
+ nome: string;
210
+ descricao: string;
211
+
212
+ constructor (id: number, atributo: Atributo, linhaEfeito: LinhaEfeito, nome: string, descricao: string) {
213
+ this.id = id;
214
+ this.atributo = atributo;
215
+ this.linhaEfeito = linhaEfeito;
216
+ this.nome = nome;
217
+ this.descricao = descricao;
218
+ }
219
+
220
+ get nomeAbreviado(): string { return this.nome.toUpperCase().slice(0, 4); }
221
+ }
222
+ class Proficiencia {
223
+ id: number;
224
+ tipoProficiencia: TipoProficiencia;
225
+ nivelProficiencia: NivelProficiencia;
226
+ nome: string;
227
+
228
+ constructor (id: number, tipoProficiencia: TipoProficiencia, nivelProficiencia: NivelProficiencia, nome: string) {
229
+ this.id = id;
230
+ this.tipoProficiencia = tipoProficiencia;
231
+ this.nivelProficiencia = nivelProficiencia;
232
+ this.nome = nome;
233
+ }
234
+ }
235
+ class TipoAlvo {
236
+ id: number;
237
+ nome: string;
238
+
239
+ constructor (id: number, nome: string) {
240
+ this.id = id;
241
+ this.nome = nome;
242
+ }
243
+ }
244
+ class TipoCategoria {
245
+ id: number;
246
+ valorCategoria: number;
247
+
248
+ constructor (id: number, valorCategoria: number) {
249
+ this.id = id;
250
+ this.valorCategoria = valorCategoria;
251
+ }
252
+
253
+ get nomeCategoria(): string { return `Categoria ${this.valorCategoria}`; }
254
+ }
255
+ class TipoDano {
256
+ id: number;
257
+ linhaEfeito: LinhaEfeito;
258
+ tipoDanoPertencente: TipoDano;
259
+ nome: string;
260
+
261
+ constructor (id: number, linhaEfeito: LinhaEfeito, tipoDanoPertencente: TipoDano, nome: string) {
262
+ this.id = id;
263
+ this.linhaEfeito = linhaEfeito;
264
+ this.tipoDanoPertencente = tipoDanoPertencente;
265
+ this.nome = nome;
266
+ }
267
+ }
268
+ class TipoEfeito {
269
+ id: number;
270
+ nome: string;
271
+ nomeVisualizacao: string;
272
+
273
+ constructor (id: number, nome: string, nomeVisualizacao: string) {
274
+ this.id = id;
275
+ this.nome = nome;
276
+ this.nomeVisualizacao = nomeVisualizacao;
277
+ }
278
+ }
279
+ class TipoItem {
280
+ id: number;
281
+ nome: string;
282
+
283
+ constructor (id: number, nome: string) {
284
+ this.id = id;
285
+ this.nome = nome;
286
+ }
287
+ }
288
+ class TipoProficiencia {
289
+ id: number;
290
+ nome: string;
291
+
292
+ constructor (id: number, nome: string) {
293
+ this.id = id;
294
+ this.nome = nome;
295
+ }
296
+ }
297
+ class PerfilAdmin {
298
+ id: number;
299
+ nome: string;
300
+ descricao: string;
301
+
302
+ constructor (id: number, nome: string, descricao: string) {
303
+ this.id = id;
304
+ this.nome = nome;
305
+ this.descricao = descricao;
306
+ }
307
+ }
308
+ class PerfilJogador {
309
+ id: number;
310
+ nome: string;
311
+ descricao: string;
312
+
313
+ constructor (id: number, nome: string, descricao: string) {
314
+ this.id = id;
315
+ this.nome = nome;
316
+ this.descricao = descricao;
317
+ }
318
+ }
319
+ class PerfilMestre {
320
+ id: number;
321
+ nome: string;
322
+ descricao: string;
323
+
324
+ constructor (id: number, nome: string, descricao: string) {
325
+ this.id = id;
326
+ this.nome = nome;
327
+ this.descricao = descricao;
328
+ }
329
+ }
330
+ class Personagem {
331
+ id: number;
332
+ linhaEfeito: TipoPersonagem;
333
+ usuarioCriador: Usuario;
334
+
335
+ constructor (id: number, linhaEfeito: TipoPersonagem, usuarioCriador: Usuario) {
336
+ this.id = id;
337
+ this.linhaEfeito = linhaEfeito;
338
+ this.usuarioCriador = usuarioCriador;
339
+ }
340
+ }
341
+ class TipoPersonagem {
342
+ id: number;
343
+ nome: string;
344
+ descricao: string;
345
+
346
+ constructor (id: number, nome: string, descricao: string) {
347
+ this.id = id;
348
+ this.nome = nome;
349
+ this.descricao = descricao;
350
+ }
351
+ }
352
+ class AuthSession {
353
+ expiredAt: number;
354
+ id: string;
355
+ destroyedAt?: Date | undefined;
356
+ json: string;
357
+
358
+ constructor (expiredAt: number, id: string, json: string, destroyedAt?: Date | undefined) {
359
+ this.expiredAt = expiredAt;
360
+ this.id = id;
361
+ this.destroyedAt = destroyedAt;
362
+ this.json = json;
363
+ }
364
+ }
365
+ class CustomizacaoUsuario {
366
+ id: number;
367
+ personagemAvatarPrincipal: Personagem;
368
+ conquistaExibirPerfil1: Conquista;
369
+ conquistaExibirPerfil2: Conquista;
370
+ conquistaExibirPerfil3: Conquista;
371
+
372
+ constructor (id: number, personagemAvatarPrincipal: Personagem, conquistaExibirPerfil1: Conquista, conquistaExibirPerfil2: Conquista, conquistaExibirPerfil3: Conquista) {
373
+ this.id = id;
374
+ this.personagemAvatarPrincipal = personagemAvatarPrincipal;
375
+ this.conquistaExibirPerfil1 = conquistaExibirPerfil1;
376
+ this.conquistaExibirPerfil2 = conquistaExibirPerfil2;
377
+ this.conquistaExibirPerfil3 = conquistaExibirPerfil3;
378
+ }
379
+ }
380
+ class Usuario {
381
+ id: number;
382
+ perfilJogador: PerfilJogador;
383
+ perfilMestre: PerfilMestre;
384
+ perfilAdmin: PerfilAdmin;
385
+ username: string;
386
+ email: string;
387
+ discordId: string;
388
+
389
+ constructor (id: number, perfilJogador: PerfilJogador, perfilMestre: PerfilMestre, perfilAdmin: PerfilAdmin, username: string, email: string, discordId: string) {
390
+ this.id = id;
391
+ this.perfilJogador = perfilJogador;
392
+ this.perfilMestre = perfilMestre;
393
+ this.perfilAdmin = perfilAdmin;
394
+ this.username = username;
395
+ this.email = email;
396
+ this.discordId = discordId;
397
+ }
49
398
  }
50
- export { Conquista, TipoConquista, Atributo, LinhaEfeito };
399
+ export type RespostaBackEnd<T> = {
400
+ sucesso: boolean;
401
+ dados?: T;
402
+ erro?: string;
403
+ };
404
+ export interface PaletaCores {
405
+ corPrimaria: string,
406
+ corSecundaria?: string,
407
+ corTerciaria?: string,
408
+ };
409
+ export type EstruturaPaginaDefinicao = {
410
+ titulo: string;
411
+ subtitulo?: string;
412
+ listaConteudo: {
413
+ itens: ConteudoItem[],
414
+ };
415
+ listaItensDefinicoesConectadas?: { etiqueta: string, subPaginaDefinicao: string }[];
416
+ };
417
+ export type ConteudoItem = { tipo: 'Definicao'; paragrafos: string[]; } | { tipo: 'Lista'; itensLista: { etiqueta: string; subPaginaDefinicao: string; }[]; };
418
+ 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, AuthSession, CustomizacaoUsuario, Usuario };
package/package.json CHANGED
@@ -1,13 +1,10 @@
1
1
  {
2
2
  "name": "types-nora-api",
3
- "version": "0.0.9",
3
+ "version": "0.0.10",
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
- "geraClasses": "ts-node scripts/geraClasses.ts",
9
- "build": "tsc -p .",
10
- "test": "echo \"Error: no test specified\" && exit 1",
11
8
  "build:types": "node scripts/extrairClasses.js"
12
9
  },
13
10
  "files": [