types-nora-api 0.0.152 → 0.0.154
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 +68 -41
- package/dist/classes.js +7 -8
- package/package.json +1 -1
package/dist/classes.d.ts
CHANGED
|
@@ -732,6 +732,19 @@ declare const PAGINAS: {
|
|
|
732
732
|
};
|
|
733
733
|
type PaginaChave = keyof typeof PAGINAS;
|
|
734
734
|
type PaginaObjeto = typeof PAGINAS[PaginaChave];
|
|
735
|
+
interface MensagemChatRecebida {
|
|
736
|
+
salaId: string;
|
|
737
|
+
idUsuario: number;
|
|
738
|
+
conteudo: string;
|
|
739
|
+
timestamp: number;
|
|
740
|
+
}
|
|
741
|
+
interface SalaChat {
|
|
742
|
+
id: string;
|
|
743
|
+
leituraPublica: boolean;
|
|
744
|
+
idUsuariosLeitoresEspecificos?: number[];
|
|
745
|
+
escritaPublica: boolean;
|
|
746
|
+
idUsuariosEscritoresEspecificos?: number[];
|
|
747
|
+
}
|
|
735
748
|
type TelemetryConnectionInfo = {
|
|
736
749
|
socketId: string;
|
|
737
750
|
username?: string;
|
|
@@ -739,11 +752,20 @@ type TelemetryConnectionInfo = {
|
|
|
739
752
|
userAgent?: string;
|
|
740
753
|
connectedAt: number;
|
|
741
754
|
};
|
|
755
|
+
type WsEventAudienceUnico<TSocket> = {
|
|
756
|
+
escopo: 'unico';
|
|
757
|
+
socket: TSocket;
|
|
758
|
+
username?: string;
|
|
759
|
+
};
|
|
760
|
+
type WsEventAudienceMultiplo = {
|
|
761
|
+
escopo: 'multiplo';
|
|
762
|
+
socketsCount: number;
|
|
763
|
+
};
|
|
764
|
+
type WsEventAudience<TSocket> = WsEventAudienceUnico<TSocket> | WsEventAudienceMultiplo;
|
|
742
765
|
type TelemetryEventLog<TPayload extends Record<string, unknown> = Record<string, unknown>> = {
|
|
743
766
|
direction: 'in' | 'out';
|
|
744
767
|
event: string;
|
|
745
|
-
|
|
746
|
-
username?: string;
|
|
768
|
+
audiencia: WsEventAudience<string>;
|
|
747
769
|
payload: TPayload;
|
|
748
770
|
timestamp: number;
|
|
749
771
|
};
|
|
@@ -778,20 +800,22 @@ declare function createGateway<T extends {
|
|
|
778
800
|
declare namespace EventosWebSocket {
|
|
779
801
|
const gateways: {
|
|
780
802
|
readonly Chat: {
|
|
781
|
-
|
|
782
|
-
tipo: "envia
|
|
803
|
+
enviaMensagem: {
|
|
804
|
+
tipo: "envia";
|
|
783
805
|
payload: {
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
response: {
|
|
787
|
-
entregue: boolean;
|
|
806
|
+
salaId: string;
|
|
807
|
+
conteudoMensagem: string;
|
|
788
808
|
};
|
|
789
809
|
};
|
|
790
|
-
|
|
791
|
-
tipo: "
|
|
792
|
-
payload: {
|
|
810
|
+
emitirMensagem: {
|
|
811
|
+
tipo: "emite";
|
|
812
|
+
payload: {
|
|
813
|
+
usuarioId: number;
|
|
814
|
+
salaId: string;
|
|
815
|
+
conteudoMensagem: string;
|
|
816
|
+
};
|
|
793
817
|
response: {
|
|
794
|
-
|
|
818
|
+
conteudoMensagem: string;
|
|
795
819
|
};
|
|
796
820
|
};
|
|
797
821
|
};
|
|
@@ -1018,7 +1042,19 @@ declare function criarEventosFiltrados<Tipo extends EventoTipoLiteral>(tipo: Tip
|
|
|
1018
1042
|
}; };
|
|
1019
1043
|
declare const Eventos_Envia: {
|
|
1020
1044
|
readonly Chat: {
|
|
1021
|
-
eventos: {
|
|
1045
|
+
eventos: {
|
|
1046
|
+
enviaMensagem: {
|
|
1047
|
+
tipo: "envia";
|
|
1048
|
+
payload: {
|
|
1049
|
+
salaId: string;
|
|
1050
|
+
conteudoMensagem: string;
|
|
1051
|
+
};
|
|
1052
|
+
} & {
|
|
1053
|
+
readonly nome: "enviaMensagem";
|
|
1054
|
+
readonly gateway: "Chat";
|
|
1055
|
+
readonly fullName: "Chat:enviaMensagem";
|
|
1056
|
+
};
|
|
1057
|
+
};
|
|
1022
1058
|
};
|
|
1023
1059
|
readonly GameEngine: {
|
|
1024
1060
|
eventos: {};
|
|
@@ -1043,7 +1079,23 @@ declare const Eventos_Envia: {
|
|
|
1043
1079
|
};
|
|
1044
1080
|
declare const Eventos_Emite: {
|
|
1045
1081
|
readonly Chat: {
|
|
1046
|
-
eventos: {
|
|
1082
|
+
eventos: {
|
|
1083
|
+
emitirMensagem: {
|
|
1084
|
+
tipo: "emite";
|
|
1085
|
+
payload: {
|
|
1086
|
+
usuarioId: number;
|
|
1087
|
+
salaId: string;
|
|
1088
|
+
conteudoMensagem: string;
|
|
1089
|
+
};
|
|
1090
|
+
response: {
|
|
1091
|
+
conteudoMensagem: string;
|
|
1092
|
+
};
|
|
1093
|
+
} & {
|
|
1094
|
+
readonly nome: "emitirMensagem";
|
|
1095
|
+
readonly gateway: "Chat";
|
|
1096
|
+
readonly fullName: "Chat:emitirMensagem";
|
|
1097
|
+
};
|
|
1098
|
+
};
|
|
1047
1099
|
};
|
|
1048
1100
|
readonly GameEngine: {
|
|
1049
1101
|
eventos: {};
|
|
@@ -1092,32 +1144,7 @@ declare const Eventos_Emite: {
|
|
|
1092
1144
|
};
|
|
1093
1145
|
declare const Eventos_EnviaERecebe: {
|
|
1094
1146
|
readonly Chat: {
|
|
1095
|
-
eventos: {
|
|
1096
|
-
testeChat1: {
|
|
1097
|
-
tipo: "envia-e-recebe";
|
|
1098
|
-
payload: {
|
|
1099
|
-
mensagem: string;
|
|
1100
|
-
};
|
|
1101
|
-
response: {
|
|
1102
|
-
entregue: boolean;
|
|
1103
|
-
};
|
|
1104
|
-
} & {
|
|
1105
|
-
readonly nome: "testeChat1";
|
|
1106
|
-
readonly gateway: "Chat";
|
|
1107
|
-
readonly fullName: "Chat:testeChat1";
|
|
1108
|
-
};
|
|
1109
|
-
testeDuplicado: {
|
|
1110
|
-
tipo: "envia-e-recebe";
|
|
1111
|
-
payload: {};
|
|
1112
|
-
response: {
|
|
1113
|
-
msg: string;
|
|
1114
|
-
};
|
|
1115
|
-
} & {
|
|
1116
|
-
readonly nome: "testeDuplicado";
|
|
1117
|
-
readonly gateway: "Chat";
|
|
1118
|
-
readonly fullName: "Chat:testeDuplicado";
|
|
1119
|
-
};
|
|
1120
|
-
};
|
|
1147
|
+
eventos: {};
|
|
1121
1148
|
};
|
|
1122
1149
|
readonly GameEngine: {
|
|
1123
1150
|
eventos: {
|
|
@@ -1160,4 +1187,4 @@ type SOCKET_UsuarioExistente = {
|
|
|
1160
1187
|
username: string;
|
|
1161
1188
|
avatar: string;
|
|
1162
1189
|
};
|
|
1163
|
-
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, EventoTipo, EventoEnvia, EventoEmite, EventoEnviaERecebe, EventoSchema, GatewayDef, createGateway, EventosWebSocket, EventosEmiteMap, EventoEmiteAny, 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, Gateways, EventoTipoLiteral, FiltraEventosPorTipo, criarEventosFiltrados, Eventos_Envia, Eventos_Emite, Eventos_EnviaERecebe, SOCKET_UsuarioExistente };
|
|
1190
|
+
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, MensagemChatRecebida, SalaChat, TelemetryConnectionInfo, WsEventAudienceUnico, WsEventAudienceMultiplo, WsEventAudience, TelemetryEventLog, TelemetrySnapshot, EventoTipo, EventoEnvia, EventoEmite, EventoEnviaERecebe, EventoSchema, GatewayDef, createGateway, EventosWebSocket, EventosEmiteMap, EventoEmiteAny, 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, Gateways, EventoTipoLiteral, FiltraEventosPorTipo, criarEventosFiltrados, Eventos_Envia, Eventos_Emite, Eventos_EnviaERecebe, SOCKET_UsuarioExistente };
|
package/dist/classes.js
CHANGED
|
@@ -79,15 +79,14 @@ function createGateway(def) { return def; }
|
|
|
79
79
|
var EventosWebSocket;
|
|
80
80
|
(function (EventosWebSocket) {
|
|
81
81
|
const Chat = createGateway({
|
|
82
|
-
|
|
83
|
-
tipo: 'envia
|
|
84
|
-
payload: {
|
|
85
|
-
response: { entregue: true },
|
|
82
|
+
enviaMensagem: {
|
|
83
|
+
tipo: 'envia',
|
|
84
|
+
payload: { salaId: '', conteudoMensagem: '' },
|
|
86
85
|
},
|
|
87
|
-
|
|
88
|
-
tipo: '
|
|
89
|
-
payload: {},
|
|
90
|
-
response: {
|
|
86
|
+
emitirMensagem: {
|
|
87
|
+
tipo: 'emite',
|
|
88
|
+
payload: { usuarioId: 0, salaId: '', conteudoMensagem: '' },
|
|
89
|
+
response: { conteudoMensagem: '' },
|
|
91
90
|
},
|
|
92
91
|
});
|
|
93
92
|
const GameEngine = createGateway({
|