types-nora-api 0.0.22 → 0.0.23
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 +7 -1
- package/dist/classes.js +36 -1
- package/package.json +1 -1
package/dist/classes.d.ts
CHANGED
|
@@ -48,12 +48,16 @@ declare class GrupoAventura {
|
|
|
48
48
|
aventura: Aventura;
|
|
49
49
|
usuarioMestre: Usuario;
|
|
50
50
|
personagensDaAventura: GrupoAventuraPersonagem[];
|
|
51
|
+
dataPrevisaoInicio: Date;
|
|
51
52
|
dataInicio: Date | null;
|
|
52
53
|
dataFim: Date | null;
|
|
53
54
|
ddsPadrao: number;
|
|
54
55
|
recorrencia: string;
|
|
55
|
-
|
|
56
|
+
horaInicio: string;
|
|
57
|
+
horaFim: string;
|
|
58
|
+
constructor(id: number, nomeGrupo: string, aventura: Aventura, usuarioMestre: Usuario, personagensDaAventura: GrupoAventuraPersonagem[], dataPrevisaoInicio: Date, dataInicio: Date | null, dataFim: Date | null, ddsPadrao: number, recorrencia: string, horaInicio: string, horaFim: string);
|
|
56
59
|
get obtemEstadoAtual(): AventuraEstado;
|
|
60
|
+
get obtemTextoInformacionalOcorrencia(): string | null;
|
|
57
61
|
}
|
|
58
62
|
declare class GrupoAventuraPersonagem {
|
|
59
63
|
fkGruposAventurasId: number;
|
|
@@ -379,4 +383,6 @@ export declare enum AventuraEstado {
|
|
|
379
383
|
EM_ANDAMENTO = "Em Andamento",
|
|
380
384
|
FINALIZADA = "Finalizada"
|
|
381
385
|
}
|
|
386
|
+
export type dds = 1 | 2 | 3 | 4 | 5 | 6 | 7;
|
|
387
|
+
export declare function obtemDiaDaSemanaPorExtensoPorDDS(dds: dds, plural?: boolean): string;
|
|
382
388
|
export { ConviteGrupoAventuraPersonagem, RespostaConvite, TipoRespostaConvite, Conquista, TipoConquista, Aventura, Geracao, GrupoAventura, GrupoAventuraPersonagem, Imagem, 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, AtributoPersonagem, EstatisticaDanificavelPersonagem, InformacaoPersonagem, PericiaPersonagem, Personagem, ResumoPersonagemAventura, TipoPersonagem, Estudo, AuthSession, CustomizacaoUsuario, DisponibilidadeUsuario, Usuario };
|
package/dist/classes.js
CHANGED
|
@@ -109,20 +109,26 @@ class GrupoAventura {
|
|
|
109
109
|
aventura;
|
|
110
110
|
usuarioMestre;
|
|
111
111
|
personagensDaAventura;
|
|
112
|
+
dataPrevisaoInicio;
|
|
112
113
|
dataInicio;
|
|
113
114
|
dataFim;
|
|
114
115
|
ddsPadrao;
|
|
115
116
|
recorrencia;
|
|
116
|
-
|
|
117
|
+
horaInicio;
|
|
118
|
+
horaFim;
|
|
119
|
+
constructor(id, nomeGrupo, aventura, usuarioMestre, personagensDaAventura, dataPrevisaoInicio, dataInicio, dataFim, ddsPadrao, recorrencia, horaInicio, horaFim) {
|
|
117
120
|
this.id = id;
|
|
118
121
|
this.nomeGrupo = nomeGrupo;
|
|
119
122
|
this.aventura = aventura;
|
|
120
123
|
this.usuarioMestre = usuarioMestre;
|
|
121
124
|
this.personagensDaAventura = personagensDaAventura;
|
|
125
|
+
this.dataPrevisaoInicio = dataPrevisaoInicio;
|
|
122
126
|
this.dataInicio = dataInicio;
|
|
123
127
|
this.dataFim = dataFim;
|
|
124
128
|
this.ddsPadrao = ddsPadrao;
|
|
125
129
|
this.recorrencia = recorrencia;
|
|
130
|
+
this.horaInicio = horaInicio;
|
|
131
|
+
this.horaFim = horaFim;
|
|
126
132
|
}
|
|
127
133
|
get obtemEstadoAtual() {
|
|
128
134
|
if (this.dataInicio === null)
|
|
@@ -131,6 +137,14 @@ class GrupoAventura {
|
|
|
131
137
|
return AventuraEstado.FINALIZADA;
|
|
132
138
|
return AventuraEstado.EM_ANDAMENTO;
|
|
133
139
|
}
|
|
140
|
+
get obtemTextoInformacionalOcorrencia() {
|
|
141
|
+
if (this.obtemEstadoAtual === AventuraEstado.FINALIZADA)
|
|
142
|
+
return null;
|
|
143
|
+
const recorrenciaEHora = `Todas as ${obtemDiaDaSemanaPorExtensoPorDDS(this.ddsPadrao, true)}, das ${this.horaInicio} as ${this.horaFim}`;
|
|
144
|
+
if (this.obtemEstadoAtual === AventuraEstado.EM_ANDAMENTO)
|
|
145
|
+
return recorrenciaEHora;
|
|
146
|
+
return `Iniciando em ${this.dataPrevisaoInicio}, ${recorrenciaEHora}`;
|
|
147
|
+
}
|
|
134
148
|
}
|
|
135
149
|
class GrupoAventuraPersonagem {
|
|
136
150
|
fkGruposAventurasId;
|
|
@@ -617,4 +631,25 @@ export var AventuraEstado;
|
|
|
617
631
|
AventuraEstado["FINALIZADA"] = "Finalizada";
|
|
618
632
|
})(AventuraEstado || (AventuraEstado = {}));
|
|
619
633
|
;
|
|
634
|
+
export function obtemDiaDaSemanaPorExtensoPorDDS(dds, plural = false) {
|
|
635
|
+
const diasDaSemanaSingular = [
|
|
636
|
+
'Domingo',
|
|
637
|
+
'Segunda-feira',
|
|
638
|
+
'Terça-feira',
|
|
639
|
+
'Quarta-feira',
|
|
640
|
+
'Quinta-feira',
|
|
641
|
+
'Sexta-feira',
|
|
642
|
+
'Sábado',
|
|
643
|
+
];
|
|
644
|
+
const diasDaSemanaPlural = [
|
|
645
|
+
'Domingos',
|
|
646
|
+
'Segundas-feiras',
|
|
647
|
+
'Terças-feiras',
|
|
648
|
+
'Quartas-feiras',
|
|
649
|
+
'Quintas-feiras',
|
|
650
|
+
'Sextas-feiras',
|
|
651
|
+
'Sábados',
|
|
652
|
+
];
|
|
653
|
+
return plural ? diasDaSemanaPlural[dds] : diasDaSemanaSingular[dds];
|
|
654
|
+
}
|
|
620
655
|
export { ConviteGrupoAventuraPersonagem, RespostaConvite, TipoRespostaConvite, Conquista, TipoConquista, Aventura, Geracao, GrupoAventura, GrupoAventuraPersonagem, Imagem, 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, AtributoPersonagem, EstatisticaDanificavelPersonagem, InformacaoPersonagem, PericiaPersonagem, Personagem, ResumoPersonagemAventura, TipoPersonagem, Estudo, AuthSession, CustomizacaoUsuario, DisponibilidadeUsuario, Usuario };
|