types-nora-api 0.0.143 → 0.0.145
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 +27 -102
- package/dist/classes.js +1 -33
- package/package.json +1 -1
package/dist/classes.d.ts
CHANGED
|
@@ -732,85 +732,34 @@ declare const PAGINAS: {
|
|
|
732
732
|
};
|
|
733
733
|
type PaginaChave = keyof typeof PAGINAS;
|
|
734
734
|
type PaginaObjeto = typeof PAGINAS[PaginaChave];
|
|
735
|
-
type
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
};
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
};
|
|
758
|
-
declare const SOCKET_CONFIG: {
|
|
759
|
-
namespaces: {
|
|
760
|
-
gameEngine: {
|
|
761
|
-
eventos: {
|
|
762
|
-
teste: {
|
|
763
|
-
tipo: "request-response";
|
|
764
|
-
payload: {};
|
|
765
|
-
response: {
|
|
766
|
-
teste: string;
|
|
767
|
-
};
|
|
768
|
-
descricao: string;
|
|
769
|
-
};
|
|
770
|
-
};
|
|
771
|
-
};
|
|
772
|
-
};
|
|
773
|
-
};
|
|
774
|
-
declare const SOCKET: { [K in keyof (typeof SOCKET_CONFIG)["namespaces"]]: {
|
|
775
|
-
readonly eventos: { [E in keyof (typeof SOCKET_CONFIG)["namespaces"][K]["eventos"]]: (typeof SOCKET_CONFIG)["namespaces"][K]["eventos"][E] & {
|
|
776
|
-
readonly nome: E;
|
|
777
|
-
}; };
|
|
778
|
-
readonly nomeNamespace: `/${K}`;
|
|
779
|
-
}; };
|
|
780
|
-
declare const criarEventosFiltrados: <Tipo extends EventoSocket["tipo"]>(tipo: Tipo) => {
|
|
781
|
-
[k: string]: {
|
|
782
|
-
nomeNamespace: `/${string}`;
|
|
783
|
-
eventos: {
|
|
784
|
-
[k: string]: {
|
|
785
|
-
nome: string;
|
|
786
|
-
nomeNamespace: `/${string}`;
|
|
787
|
-
tipo: "request-response";
|
|
788
|
-
payload: {};
|
|
789
|
-
response: {
|
|
790
|
-
teste: string;
|
|
791
|
-
};
|
|
792
|
-
descricao: string;
|
|
793
|
-
};
|
|
794
|
-
};
|
|
795
|
-
};
|
|
735
|
+
type TelemetryConnectionInfo = {
|
|
736
|
+
socketId: string;
|
|
737
|
+
userId?: number;
|
|
738
|
+
username?: string;
|
|
739
|
+
ip: string;
|
|
740
|
+
userAgent?: string;
|
|
741
|
+
connectedAt: number;
|
|
742
|
+
};
|
|
743
|
+
type TelemetryEventLog<T = any> = {
|
|
744
|
+
direction: 'in' | 'out';
|
|
745
|
+
event: string;
|
|
746
|
+
socketId: string;
|
|
747
|
+
userId?: number;
|
|
748
|
+
payload: T;
|
|
749
|
+
timestamp: number;
|
|
750
|
+
};
|
|
751
|
+
type TelemetrySnapshot = {
|
|
752
|
+
totalConnections: number;
|
|
753
|
+
totalEvents: number;
|
|
754
|
+
connections: TelemetryConnectionInfo[];
|
|
755
|
+
lastEvents: TelemetryEventLog[];
|
|
756
|
+
serverTime: number;
|
|
796
757
|
};
|
|
797
|
-
type
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
[E in keyof typeof SOCKET_CONFIG.namespaces[K]['eventos']]: typeof SOCKET_CONFIG.namespaces[K]['eventos'][E] extends {
|
|
802
|
-
tipo: Tipo;
|
|
803
|
-
} ? typeof SOCKET_CONFIG.namespaces[K]['eventos'][E] & {
|
|
804
|
-
readonly nome: E;
|
|
805
|
-
readonly nomeNamespace: `/${K}`;
|
|
806
|
-
} : never;
|
|
807
|
-
};
|
|
808
|
-
};
|
|
758
|
+
type SOCKET_AcessoUsuario = {
|
|
759
|
+
usuario: UsuarioDto;
|
|
760
|
+
paginaAtual?: PaginaObjeto | null;
|
|
761
|
+
dataAtualizacao: Date;
|
|
809
762
|
};
|
|
810
|
-
declare const criarEventosTipados: <Tipo extends EventoSocket["tipo"]>(tipo: Tipo) => CriarEventosFiltrados<Tipo>;
|
|
811
|
-
declare const Eventos_Tipo_Emitir: CriarEventosFiltrados<"emitir">;
|
|
812
|
-
declare const Eventos_Tipo_Ouvir: CriarEventosFiltrados<"ouvir">;
|
|
813
|
-
declare const Eventos_Tipo_RequestResponse: CriarEventosFiltrados<"request-response">;
|
|
814
763
|
interface PaletaCores {
|
|
815
764
|
corPrimaria: string;
|
|
816
765
|
corSecundaria?: string;
|
|
@@ -957,28 +906,4 @@ declare enum EstiloSessao {
|
|
|
957
906
|
SESSAO_UNICA_NAO_CANONICA = 2,
|
|
958
907
|
ERRO = 3
|
|
959
908
|
}
|
|
960
|
-
|
|
961
|
-
interface WsTelemetria_Evento {
|
|
962
|
-
tipo: WsTelemetria_TipoEvento;
|
|
963
|
-
idCliente: string;
|
|
964
|
-
username: string;
|
|
965
|
-
data: any;
|
|
966
|
-
timestamp: string;
|
|
967
|
-
}
|
|
968
|
-
interface WsTelemetria_DadosSistema {
|
|
969
|
-
active: number;
|
|
970
|
-
authenticated: number;
|
|
971
|
-
unauthenticated: number;
|
|
972
|
-
totalEvents: number;
|
|
973
|
-
eventsByType: Record<string, number>;
|
|
974
|
-
}
|
|
975
|
-
interface WsTelemetria_SSE_Event {
|
|
976
|
-
tipo: WsTelemetria_TipoEvento;
|
|
977
|
-
idCliente?: string;
|
|
978
|
-
username: string;
|
|
979
|
-
data?: any;
|
|
980
|
-
timestamp: string;
|
|
981
|
-
message?: string;
|
|
982
|
-
}
|
|
983
|
-
declare const CONST_TELEMETRIA = "TELEMETRIA";
|
|
984
|
-
export { IArcoAventura, ArcoAventuraDto, IAventura, AventuraDto, IConviteGrupoAventuraPersonagem, ConviteGrupoAventuraPersonagemDto, IGrupoAventura, GrupoAventuraDto, IGrupoAventuraPersonagem, GrupoAventuraPersonagemDto, IRespostaConvite, RespostaConviteDto, IVariavelAmbiente, VariavelAmbienteDto, IConquista, ConquistaDto, ITipoConquista, TipoConquistaDto, IDetalheSessaoAventura, DetalheSessaoAventuraDto, IDetalheSessaoCanonica, DetalheSessaoCanonicaDto, CapituloSessaoCanonica, IDetalheSessaoNaoCanonica, DetalheSessaoNaoCanonicaDto, IDetalheSessaoUnica, DetalheSessaoUnicaDto, IParticipanteSessaoUnica, ParticipanteSessaoUnicaDto, ICoeficienteGanhoEstatisticaClasse, CoeficienteGanhoEstatisticaClasseDto, IGanhoNivelClasse, GanhoNivelClasseDto, DadosDoTipoGanho, DadosGanho_Atributos, DadosGanho_Pericias, DadosGanho_Estatisticas, DadosGanho_Classes, DadosGanho_ValorMaximoAtributo, DadosGanho_PontosHabilidadesEspeciais, DadosGanho_PontosHabilidadesParanormais, DadosGanho_PontosHabilidadeElemental, IGanhoRelativoCoeficienteAtributo, GanhoRelativoCoeficienteAtributoDto, ITipoGanhoNivel, TipoGanhoNivelDto, IGeracao, GeracaoDto, IImagem, ImagemDto, ITipoImagem, TipoImagemDto, IAlcance, AlcanceDto, IAtributo, AtributoDto, ICategoriaRitual, CategoriaRitualDto, ICirculoRitual, CirculoRitualDto, IClasse, ClasseDto, IDuracao, DuracaoDto, IElemento, ElementoDto, IEstatisticaDanificavel, EstatisticaDanificavelDto, IExecucao, ExecucaoDto, IFormatoAlcance, FormatoAlcanceDto, ILinhaEfeito, LinhaEfeitoDto, INivel, NivelDto, INivelComponente, NivelComponenteDto, INivelProficiencia, NivelProficienciaDto, INivelRitual, NivelRitualDto, IPatentePericia, PatentePericiaDto, IPericia, PericiaDto, IProficiencia, ProficienciaDto, ITipoAlvo, TipoAlvoDto, ITipoCategoria, TipoCategoriaDto, ITipoDano, TipoDanoDto, ITipoEfeito, TipoEfeitoDto, ITipoItem, TipoItemDto, ITipoProficiencia, TipoProficienciaDto, ILink, LinkDto, ITipoLink, TipoLinkDto, IDificuldadeSessao, DificuldadeSessaoDto, IEstiloSessaoMestrada, EstiloSessaoMestradaDto, ITipoSessao, TipoSessaoDto, IPerfilAdmin, PerfilAdminDto, IPerfilJogador, PerfilJogadorDto, IPerfilMestre, PerfilMestreDto, IFichaPersonagem, FichaPersonagemDto, ObjetoFicha, DetalheEvolucao, DetalhesExtras, FichaDeJogo, AtributoFicha, PericiaFicha, EstatisticaDanificavelFicha, DetalheFicha, RegistroPericiaLivre, IInformacaoPersonagem, InformacaoPersonagemDto, IPersonagem, PersonagemDto, IResumoPersonagemAventura, ResumoPersonagemAventuraDto, ITipoPersonagem, TipoPersonagemDto, IDetalheRascunhoAventura, DetalheRascunhoAventuraDto, IDetalheRascunhoSessaoUnica, DetalheRascunhoSessaoUnicaDto, IDetalheRascunhoSessaoUnicaCanonica, DetalheRascunhoSessaoUnicaCanonicaDto, IRascunho, RascunhoDto, IEstudo, EstudoDto, IRegistroSessao, RegistroSessaoDto, ISessao, SessaoDto, AuthSession, ICustomizacaoUsuario, CustomizacaoUsuarioDto, IDisponibilidadeUsuario, DisponibilidadeUsuarioDto, ListaDisponibilidadesUsuario, DisponibilidadesDDS, JanelaDisponibilidade, IUsuario, UsuarioDto, PAGINAS, PaginaChave, PaginaObjeto, EventoSocket, createSocketConfig, SOCKET_CONFIG, SOCKET, criarEventosFiltrados, CriarEventosFiltrados, criarEventosTipados, Eventos_Tipo_Emitir, Eventos_Tipo_Ouvir, Eventos_Tipo_RequestResponse, PaletaCores, EstruturaPaginaDefinicao, ConteudoItem, DefinicaoElemento, ListaItem, AventuraEstado, EstadoPendenciaPersonagem, EstadoPendenciaAdministrativaPersonagem, EstadoOcupacaoPersonagem, EstadoSessao, DiaDaSemana, obtemDiaDaSemanaPorExtensoPorDDS, NumeroHora24, NumeroMomento, MomentoFormatado24, MomentoFormatado, CargoExibicaoUsuario, CargosUsuario, ObjetoAutenticacao, ObjetoCache, ObjetoPendeciaPersonagem, TipoVariavelAmbiente, ObjetoEvolucaoCompleto, ObjetoEvolucao, ObjetoGanhosEvolucao, GanhoEstatistica, FormatoMomento, DetalheUtilizacaoRascunho, EstiloSessao, WsTelemetria_TipoEvento, WsTelemetria_Evento, WsTelemetria_DadosSistema, WsTelemetria_SSE_Event, CONST_TELEMETRIA };
|
|
909
|
+
export { IArcoAventura, ArcoAventuraDto, IAventura, AventuraDto, IConviteGrupoAventuraPersonagem, ConviteGrupoAventuraPersonagemDto, IGrupoAventura, GrupoAventuraDto, IGrupoAventuraPersonagem, GrupoAventuraPersonagemDto, IRespostaConvite, RespostaConviteDto, IVariavelAmbiente, VariavelAmbienteDto, IConquista, ConquistaDto, ITipoConquista, TipoConquistaDto, IDetalheSessaoAventura, DetalheSessaoAventuraDto, IDetalheSessaoCanonica, DetalheSessaoCanonicaDto, CapituloSessaoCanonica, IDetalheSessaoNaoCanonica, DetalheSessaoNaoCanonicaDto, IDetalheSessaoUnica, DetalheSessaoUnicaDto, IParticipanteSessaoUnica, ParticipanteSessaoUnicaDto, ICoeficienteGanhoEstatisticaClasse, CoeficienteGanhoEstatisticaClasseDto, IGanhoNivelClasse, GanhoNivelClasseDto, DadosDoTipoGanho, DadosGanho_Atributos, DadosGanho_Pericias, DadosGanho_Estatisticas, DadosGanho_Classes, DadosGanho_ValorMaximoAtributo, DadosGanho_PontosHabilidadesEspeciais, DadosGanho_PontosHabilidadesParanormais, DadosGanho_PontosHabilidadeElemental, IGanhoRelativoCoeficienteAtributo, GanhoRelativoCoeficienteAtributoDto, ITipoGanhoNivel, TipoGanhoNivelDto, IGeracao, GeracaoDto, IImagem, ImagemDto, ITipoImagem, TipoImagemDto, IAlcance, AlcanceDto, IAtributo, AtributoDto, ICategoriaRitual, CategoriaRitualDto, ICirculoRitual, CirculoRitualDto, IClasse, ClasseDto, IDuracao, DuracaoDto, IElemento, ElementoDto, IEstatisticaDanificavel, EstatisticaDanificavelDto, IExecucao, ExecucaoDto, IFormatoAlcance, FormatoAlcanceDto, ILinhaEfeito, LinhaEfeitoDto, INivel, NivelDto, INivelComponente, NivelComponenteDto, INivelProficiencia, NivelProficienciaDto, INivelRitual, NivelRitualDto, IPatentePericia, PatentePericiaDto, IPericia, PericiaDto, IProficiencia, ProficienciaDto, ITipoAlvo, TipoAlvoDto, ITipoCategoria, TipoCategoriaDto, ITipoDano, TipoDanoDto, ITipoEfeito, TipoEfeitoDto, ITipoItem, TipoItemDto, ITipoProficiencia, TipoProficienciaDto, ILink, LinkDto, ITipoLink, TipoLinkDto, IDificuldadeSessao, DificuldadeSessaoDto, IEstiloSessaoMestrada, EstiloSessaoMestradaDto, ITipoSessao, TipoSessaoDto, IPerfilAdmin, PerfilAdminDto, IPerfilJogador, PerfilJogadorDto, IPerfilMestre, PerfilMestreDto, IFichaPersonagem, FichaPersonagemDto, ObjetoFicha, DetalheEvolucao, DetalhesExtras, FichaDeJogo, AtributoFicha, PericiaFicha, EstatisticaDanificavelFicha, DetalheFicha, RegistroPericiaLivre, IInformacaoPersonagem, InformacaoPersonagemDto, IPersonagem, PersonagemDto, IResumoPersonagemAventura, ResumoPersonagemAventuraDto, ITipoPersonagem, TipoPersonagemDto, IDetalheRascunhoAventura, DetalheRascunhoAventuraDto, IDetalheRascunhoSessaoUnica, DetalheRascunhoSessaoUnicaDto, IDetalheRascunhoSessaoUnicaCanonica, DetalheRascunhoSessaoUnicaCanonicaDto, IRascunho, RascunhoDto, IEstudo, EstudoDto, IRegistroSessao, RegistroSessaoDto, ISessao, SessaoDto, AuthSession, ICustomizacaoUsuario, CustomizacaoUsuarioDto, IDisponibilidadeUsuario, DisponibilidadeUsuarioDto, ListaDisponibilidadesUsuario, DisponibilidadesDDS, JanelaDisponibilidade, IUsuario, UsuarioDto, PAGINAS, PaginaChave, PaginaObjeto, TelemetryConnectionInfo, TelemetryEventLog, TelemetrySnapshot, SOCKET_AcessoUsuario, PaletaCores, EstruturaPaginaDefinicao, ConteudoItem, DefinicaoElemento, ListaItem, AventuraEstado, EstadoPendenciaPersonagem, EstadoPendenciaAdministrativaPersonagem, EstadoOcupacaoPersonagem, EstadoSessao, DiaDaSemana, obtemDiaDaSemanaPorExtensoPorDDS, NumeroHora24, NumeroMomento, MomentoFormatado24, MomentoFormatado, CargoExibicaoUsuario, CargosUsuario, ObjetoAutenticacao, ObjetoCache, ObjetoPendeciaPersonagem, TipoVariavelAmbiente, ObjetoEvolucaoCompleto, ObjetoEvolucao, ObjetoGanhosEvolucao, GanhoEstatistica, FormatoMomento, DetalheUtilizacaoRascunho, EstiloSessao };
|
package/dist/classes.js
CHANGED
|
@@ -73,36 +73,6 @@ const PAGINAS = {
|
|
|
73
73
|
nome: 'Página de Mestre',
|
|
74
74
|
},
|
|
75
75
|
};
|
|
76
|
-
const createSocketConfig = (config) => config;
|
|
77
|
-
const SOCKET_CONFIG = createSocketConfig({
|
|
78
|
-
namespaces: {
|
|
79
|
-
gameEngine: {
|
|
80
|
-
eventos: {
|
|
81
|
-
teste: {
|
|
82
|
-
tipo: 'request-response',
|
|
83
|
-
payload: {},
|
|
84
|
-
response: { teste: '' },
|
|
85
|
-
descricao: 'Teste de gameEngine',
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
},
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
const SOCKET = Object.fromEntries(Object.entries(SOCKET_CONFIG.namespaces).map(([nomeNamespace, config]) => [nomeNamespace, { eventos: Object.fromEntries(Object.entries(config.eventos).map(([nomeEvento, eventConfig]) => [nomeEvento, { ...eventConfig, nome: nomeEvento }])), nomeNamespace: `/${nomeNamespace}` }]));
|
|
92
|
-
const criarEventosFiltrados = (tipo) => {
|
|
93
|
-
return Object.fromEntries(Object.entries(SOCKET_CONFIG.namespaces).map(([namespaceName, namespace]) => [namespaceName, {
|
|
94
|
-
nomeNamespace: `/${namespaceName}`,
|
|
95
|
-
eventos: Object.fromEntries(Object.entries(namespace.eventos).filter(([_, event]) => event.tipo === tipo).map(([eventName, event]) => [eventName, {
|
|
96
|
-
...event,
|
|
97
|
-
nome: eventName,
|
|
98
|
-
nomeNamespace: `/${namespaceName}`
|
|
99
|
-
}]))
|
|
100
|
-
}]));
|
|
101
|
-
};
|
|
102
|
-
const criarEventosTipados = (tipo) => criarEventosFiltrados(tipo);
|
|
103
|
-
const Eventos_Tipo_Emitir = criarEventosTipados('emitir');
|
|
104
|
-
const Eventos_Tipo_Ouvir = criarEventosTipados('ouvir');
|
|
105
|
-
const Eventos_Tipo_RequestResponse = criarEventosTipados('request-response');
|
|
106
76
|
// @tipoCompartilhadoFront
|
|
107
77
|
var AventuraEstado;
|
|
108
78
|
(function (AventuraEstado) {
|
|
@@ -194,6 +164,4 @@ var EstiloSessao;
|
|
|
194
164
|
EstiloSessao[EstiloSessao["SESSAO_UNICA_NAO_CANONICA"] = 2] = "SESSAO_UNICA_NAO_CANONICA";
|
|
195
165
|
EstiloSessao[EstiloSessao["ERRO"] = 3] = "ERRO";
|
|
196
166
|
})(EstiloSessao || (EstiloSessao = {}));
|
|
197
|
-
|
|
198
|
-
const CONST_TELEMETRIA = 'TELEMETRIA';
|
|
199
|
-
export { AuthSession, PAGINAS, createSocketConfig, SOCKET_CONFIG, SOCKET, criarEventosFiltrados, criarEventosTipados, Eventos_Tipo_Emitir, Eventos_Tipo_Ouvir, Eventos_Tipo_RequestResponse, AventuraEstado, EstadoPendenciaPersonagem, EstadoPendenciaAdministrativaPersonagem, EstadoOcupacaoPersonagem, EstadoSessao, DiaDaSemana, obtemDiaDaSemanaPorExtensoPorDDS, CargoExibicaoUsuario, FormatoMomento, EstiloSessao, CONST_TELEMETRIA };
|
|
167
|
+
export { AuthSession, PAGINAS, AventuraEstado, EstadoPendenciaPersonagem, EstadoPendenciaAdministrativaPersonagem, EstadoOcupacaoPersonagem, EstadoSessao, DiaDaSemana, obtemDiaDaSemanaPorExtensoPorDDS, CargoExibicaoUsuario, FormatoMomento, EstiloSessao };
|