types-nora-api 0.0.151 → 0.0.153
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 +71 -65
- package/dist/classes.js +15 -17
- package/package.json +1 -1
package/dist/classes.d.ts
CHANGED
|
@@ -739,11 +739,20 @@ type TelemetryConnectionInfo = {
|
|
|
739
739
|
userAgent?: string;
|
|
740
740
|
connectedAt: number;
|
|
741
741
|
};
|
|
742
|
+
type WsEventAudienceUnico<TSocket> = {
|
|
743
|
+
escopo: 'unico';
|
|
744
|
+
socket: TSocket;
|
|
745
|
+
username?: string;
|
|
746
|
+
};
|
|
747
|
+
type WsEventAudienceMultiplo = {
|
|
748
|
+
escopo: 'multiplo';
|
|
749
|
+
socketsCount: number;
|
|
750
|
+
};
|
|
751
|
+
type WsEventAudience<TSocket> = WsEventAudienceUnico<TSocket> | WsEventAudienceMultiplo;
|
|
742
752
|
type TelemetryEventLog<TPayload extends Record<string, unknown> = Record<string, unknown>> = {
|
|
743
753
|
direction: 'in' | 'out';
|
|
744
754
|
event: string;
|
|
745
|
-
|
|
746
|
-
username?: string;
|
|
755
|
+
audiencia: WsEventAudience<string>;
|
|
747
756
|
payload: TPayload;
|
|
748
757
|
timestamp: number;
|
|
749
758
|
};
|
|
@@ -754,22 +763,32 @@ type TelemetrySnapshot = {
|
|
|
754
763
|
lastEvents: TelemetryEventLog[];
|
|
755
764
|
serverTime: number;
|
|
756
765
|
};
|
|
757
|
-
type EventoTipo = '
|
|
758
|
-
type
|
|
759
|
-
tipo:
|
|
766
|
+
type EventoTipo = 'envia' | 'emite' | 'envia-e-recebe';
|
|
767
|
+
type EventoEnvia<P = any> = {
|
|
768
|
+
tipo: 'envia';
|
|
769
|
+
payload: P;
|
|
770
|
+
response?: never;
|
|
771
|
+
};
|
|
772
|
+
type EventoEmite<P = any, R = any> = {
|
|
773
|
+
tipo: 'emite';
|
|
760
774
|
payload: P;
|
|
761
|
-
} & (T extends 'recebe-envia' ? {
|
|
762
775
|
response: R;
|
|
763
|
-
}
|
|
764
|
-
type
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
776
|
+
};
|
|
777
|
+
type EventoEnviaERecebe<P = any, R = any> = {
|
|
778
|
+
tipo: 'envia-e-recebe';
|
|
779
|
+
payload: P;
|
|
780
|
+
response: R;
|
|
781
|
+
};
|
|
782
|
+
type EventoSchema = EventoEnvia<any> | EventoEmite<any, any> | EventoEnviaERecebe<any, any>;
|
|
783
|
+
type GatewayDef = Record<string, EventoSchema>;
|
|
784
|
+
declare function createGateway<T extends {
|
|
785
|
+
[K in keyof T]: EventoSchema;
|
|
786
|
+
}>(def: T): T;
|
|
768
787
|
declare namespace EventosWebSocket {
|
|
769
788
|
const gateways: {
|
|
770
789
|
readonly Chat: {
|
|
771
790
|
testeChat1: {
|
|
772
|
-
tipo: "recebe
|
|
791
|
+
tipo: "envia-e-recebe";
|
|
773
792
|
payload: {
|
|
774
793
|
mensagem: string;
|
|
775
794
|
};
|
|
@@ -778,7 +797,7 @@ declare namespace EventosWebSocket {
|
|
|
778
797
|
};
|
|
779
798
|
};
|
|
780
799
|
testeDuplicado: {
|
|
781
|
-
tipo: "recebe
|
|
800
|
+
tipo: "envia-e-recebe";
|
|
782
801
|
payload: {};
|
|
783
802
|
response: {
|
|
784
803
|
msg: string;
|
|
@@ -787,7 +806,7 @@ declare namespace EventosWebSocket {
|
|
|
787
806
|
};
|
|
788
807
|
readonly GameEngine: {
|
|
789
808
|
testeGameEngine1: {
|
|
790
|
-
tipo: "recebe
|
|
809
|
+
tipo: "envia-e-recebe";
|
|
791
810
|
payload: {
|
|
792
811
|
teste1: string;
|
|
793
812
|
};
|
|
@@ -796,14 +815,8 @@ declare namespace EventosWebSocket {
|
|
|
796
815
|
msg: string;
|
|
797
816
|
};
|
|
798
817
|
};
|
|
799
|
-
testeGameEngine2: {
|
|
800
|
-
tipo: "recebe";
|
|
801
|
-
payload: {
|
|
802
|
-
teste2: number;
|
|
803
|
-
};
|
|
804
|
-
};
|
|
805
818
|
testeDuplicado: {
|
|
806
|
-
tipo: "recebe
|
|
819
|
+
tipo: "envia-e-recebe";
|
|
807
820
|
payload: {};
|
|
808
821
|
response: {
|
|
809
822
|
msg: string;
|
|
@@ -812,7 +825,7 @@ declare namespace EventosWebSocket {
|
|
|
812
825
|
};
|
|
813
826
|
readonly UsuariosConectados: {
|
|
814
827
|
obtemUsuariosConectados: {
|
|
815
|
-
tipo: "
|
|
828
|
+
tipo: "emite";
|
|
816
829
|
payload: {};
|
|
817
830
|
response: {
|
|
818
831
|
msg: string;
|
|
@@ -827,14 +840,14 @@ declare namespace EventosWebSocket {
|
|
|
827
840
|
};
|
|
828
841
|
};
|
|
829
842
|
enviaPraQuemPediu: {
|
|
830
|
-
tipo: "
|
|
843
|
+
tipo: "emite";
|
|
831
844
|
payload: {};
|
|
832
845
|
response: {
|
|
833
846
|
msg: string;
|
|
834
847
|
};
|
|
835
848
|
};
|
|
836
849
|
enviaPraTodoMundo: {
|
|
837
|
-
tipo: "
|
|
850
|
+
tipo: "emite";
|
|
838
851
|
payload: {};
|
|
839
852
|
response: {
|
|
840
853
|
msg: string;
|
|
@@ -843,6 +856,10 @@ declare namespace EventosWebSocket {
|
|
|
843
856
|
};
|
|
844
857
|
};
|
|
845
858
|
}
|
|
859
|
+
type EventosEmiteMap = typeof Eventos_Emite;
|
|
860
|
+
type EventoEmiteAny = {
|
|
861
|
+
[G in keyof EventosEmiteMap]: EventosEmiteMap[G]['eventos'][keyof EventosEmiteMap[G]['eventos']];
|
|
862
|
+
}[keyof EventosEmiteMap];
|
|
846
863
|
type SOCKET_AcessoUsuario = {
|
|
847
864
|
usuario: UsuarioDto;
|
|
848
865
|
paginaAtual?: PaginaObjeto | null;
|
|
@@ -1008,28 +1025,42 @@ declare function criarEventosFiltrados<Tipo extends EventoTipoLiteral>(tipo: Tip
|
|
|
1008
1025
|
readonly fullName: `${Extract<G, string>}:${Extract<E, string>}`;
|
|
1009
1026
|
}; };
|
|
1010
1027
|
}; };
|
|
1011
|
-
declare const
|
|
1028
|
+
declare const Eventos_Envia: {
|
|
1012
1029
|
readonly Chat: {
|
|
1013
1030
|
eventos: {};
|
|
1014
1031
|
};
|
|
1015
1032
|
readonly GameEngine: {
|
|
1033
|
+
eventos: {};
|
|
1034
|
+
};
|
|
1035
|
+
readonly UsuariosConectados: {
|
|
1036
|
+
eventos: {};
|
|
1037
|
+
};
|
|
1038
|
+
readonly Teste: {
|
|
1016
1039
|
eventos: {
|
|
1017
|
-
|
|
1018
|
-
tipo: "
|
|
1040
|
+
mudaTexto: {
|
|
1041
|
+
tipo: "envia";
|
|
1019
1042
|
payload: {
|
|
1020
|
-
|
|
1043
|
+
novoTexto: string;
|
|
1021
1044
|
};
|
|
1022
1045
|
} & {
|
|
1023
|
-
readonly nome: "
|
|
1024
|
-
readonly gateway: "
|
|
1025
|
-
readonly fullName: "
|
|
1046
|
+
readonly nome: "mudaTexto";
|
|
1047
|
+
readonly gateway: "Teste";
|
|
1048
|
+
readonly fullName: "Teste:mudaTexto";
|
|
1026
1049
|
};
|
|
1027
1050
|
};
|
|
1028
1051
|
};
|
|
1052
|
+
};
|
|
1053
|
+
declare const Eventos_Emite: {
|
|
1054
|
+
readonly Chat: {
|
|
1055
|
+
eventos: {};
|
|
1056
|
+
};
|
|
1057
|
+
readonly GameEngine: {
|
|
1058
|
+
eventos: {};
|
|
1059
|
+
};
|
|
1029
1060
|
readonly UsuariosConectados: {
|
|
1030
1061
|
eventos: {
|
|
1031
1062
|
obtemUsuariosConectados: {
|
|
1032
|
-
tipo: "
|
|
1063
|
+
tipo: "emite";
|
|
1033
1064
|
payload: {};
|
|
1034
1065
|
response: {
|
|
1035
1066
|
msg: string;
|
|
@@ -1044,7 +1075,7 @@ declare const Eventos_Recebe: {
|
|
|
1044
1075
|
readonly Teste: {
|
|
1045
1076
|
eventos: {
|
|
1046
1077
|
enviaPraQuemPediu: {
|
|
1047
|
-
tipo: "
|
|
1078
|
+
tipo: "emite";
|
|
1048
1079
|
payload: {};
|
|
1049
1080
|
response: {
|
|
1050
1081
|
msg: string;
|
|
@@ -1055,7 +1086,7 @@ declare const Eventos_Recebe: {
|
|
|
1055
1086
|
readonly fullName: "Teste:enviaPraQuemPediu";
|
|
1056
1087
|
};
|
|
1057
1088
|
enviaPraTodoMundo: {
|
|
1058
|
-
tipo: "
|
|
1089
|
+
tipo: "emite";
|
|
1059
1090
|
payload: {};
|
|
1060
1091
|
response: {
|
|
1061
1092
|
msg: string;
|
|
@@ -1068,36 +1099,11 @@ declare const Eventos_Recebe: {
|
|
|
1068
1099
|
};
|
|
1069
1100
|
};
|
|
1070
1101
|
};
|
|
1071
|
-
declare const
|
|
1072
|
-
readonly Chat: {
|
|
1073
|
-
eventos: {};
|
|
1074
|
-
};
|
|
1075
|
-
readonly GameEngine: {
|
|
1076
|
-
eventos: {};
|
|
1077
|
-
};
|
|
1078
|
-
readonly UsuariosConectados: {
|
|
1079
|
-
eventos: {};
|
|
1080
|
-
};
|
|
1081
|
-
readonly Teste: {
|
|
1082
|
-
eventos: {
|
|
1083
|
-
mudaTexto: {
|
|
1084
|
-
tipo: "envia";
|
|
1085
|
-
payload: {
|
|
1086
|
-
novoTexto: string;
|
|
1087
|
-
};
|
|
1088
|
-
} & {
|
|
1089
|
-
readonly nome: "mudaTexto";
|
|
1090
|
-
readonly gateway: "Teste";
|
|
1091
|
-
readonly fullName: "Teste:mudaTexto";
|
|
1092
|
-
};
|
|
1093
|
-
};
|
|
1094
|
-
};
|
|
1095
|
-
};
|
|
1096
|
-
declare const Eventos_RecebeEnvia: {
|
|
1102
|
+
declare const Eventos_EnviaERecebe: {
|
|
1097
1103
|
readonly Chat: {
|
|
1098
1104
|
eventos: {
|
|
1099
1105
|
testeChat1: {
|
|
1100
|
-
tipo: "recebe
|
|
1106
|
+
tipo: "envia-e-recebe";
|
|
1101
1107
|
payload: {
|
|
1102
1108
|
mensagem: string;
|
|
1103
1109
|
};
|
|
@@ -1110,7 +1116,7 @@ declare const Eventos_RecebeEnvia: {
|
|
|
1110
1116
|
readonly fullName: "Chat:testeChat1";
|
|
1111
1117
|
};
|
|
1112
1118
|
testeDuplicado: {
|
|
1113
|
-
tipo: "recebe
|
|
1119
|
+
tipo: "envia-e-recebe";
|
|
1114
1120
|
payload: {};
|
|
1115
1121
|
response: {
|
|
1116
1122
|
msg: string;
|
|
@@ -1125,7 +1131,7 @@ declare const Eventos_RecebeEnvia: {
|
|
|
1125
1131
|
readonly GameEngine: {
|
|
1126
1132
|
eventos: {
|
|
1127
1133
|
testeGameEngine1: {
|
|
1128
|
-
tipo: "recebe
|
|
1134
|
+
tipo: "envia-e-recebe";
|
|
1129
1135
|
payload: {
|
|
1130
1136
|
teste1: string;
|
|
1131
1137
|
};
|
|
@@ -1139,7 +1145,7 @@ declare const Eventos_RecebeEnvia: {
|
|
|
1139
1145
|
readonly fullName: "GameEngine:testeGameEngine1";
|
|
1140
1146
|
};
|
|
1141
1147
|
testeDuplicado: {
|
|
1142
|
-
tipo: "recebe
|
|
1148
|
+
tipo: "envia-e-recebe";
|
|
1143
1149
|
payload: {};
|
|
1144
1150
|
response: {
|
|
1145
1151
|
msg: string;
|
|
@@ -1163,4 +1169,4 @@ type SOCKET_UsuarioExistente = {
|
|
|
1163
1169
|
username: string;
|
|
1164
1170
|
avatar: string;
|
|
1165
1171
|
};
|
|
1166
|
-
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,
|
|
1172
|
+
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, 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
|
@@ -74,41 +74,41 @@ const PAGINAS = {
|
|
|
74
74
|
nome: 'Página de Mestre',
|
|
75
75
|
},
|
|
76
76
|
};
|
|
77
|
-
function createGateway(
|
|
77
|
+
function createGateway(def) { return def; }
|
|
78
78
|
//
|
|
79
79
|
var EventosWebSocket;
|
|
80
80
|
(function (EventosWebSocket) {
|
|
81
81
|
const Chat = createGateway({
|
|
82
82
|
testeChat1: {
|
|
83
|
-
tipo: 'recebe
|
|
83
|
+
tipo: 'envia-e-recebe',
|
|
84
84
|
payload: { mensagem: '' },
|
|
85
85
|
response: { entregue: true },
|
|
86
86
|
},
|
|
87
87
|
testeDuplicado: {
|
|
88
|
-
tipo: 'recebe
|
|
88
|
+
tipo: 'envia-e-recebe',
|
|
89
89
|
payload: {},
|
|
90
90
|
response: { msg: '' },
|
|
91
91
|
},
|
|
92
92
|
});
|
|
93
93
|
const GameEngine = createGateway({
|
|
94
94
|
testeGameEngine1: {
|
|
95
|
-
tipo: 'recebe
|
|
95
|
+
tipo: 'envia-e-recebe',
|
|
96
96
|
payload: { teste1: '' },
|
|
97
97
|
response: { ok: true, msg: '' },
|
|
98
98
|
},
|
|
99
|
-
testeGameEngine2: {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
},
|
|
99
|
+
// testeGameEngine2: {
|
|
100
|
+
// tipo: 'emite',
|
|
101
|
+
// payload: { teste2: 0 },
|
|
102
|
+
// },
|
|
103
103
|
testeDuplicado: {
|
|
104
|
-
tipo: 'recebe
|
|
104
|
+
tipo: 'envia-e-recebe',
|
|
105
105
|
payload: {},
|
|
106
106
|
response: { msg: '' },
|
|
107
107
|
},
|
|
108
108
|
});
|
|
109
109
|
const UsuariosConectados = createGateway({
|
|
110
110
|
obtemUsuariosConectados: {
|
|
111
|
-
tipo: '
|
|
111
|
+
tipo: 'emite',
|
|
112
112
|
payload: {},
|
|
113
113
|
response: { msg: '' },
|
|
114
114
|
},
|
|
@@ -117,16 +117,14 @@ var EventosWebSocket;
|
|
|
117
117
|
mudaTexto: {
|
|
118
118
|
tipo: 'envia',
|
|
119
119
|
payload: { novoTexto: '' },
|
|
120
|
-
// response: {}, não deveria ser possivel <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
|
121
120
|
},
|
|
122
121
|
enviaPraQuemPediu: {
|
|
123
|
-
tipo: '
|
|
122
|
+
tipo: 'emite',
|
|
124
123
|
payload: {},
|
|
125
|
-
// deveria ser impossivel não passar response <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
|
126
124
|
response: { msg: '' },
|
|
127
125
|
},
|
|
128
126
|
enviaPraTodoMundo: {
|
|
129
|
-
tipo: '
|
|
127
|
+
tipo: 'emite',
|
|
130
128
|
payload: {},
|
|
131
129
|
response: { msg: '' },
|
|
132
130
|
},
|
|
@@ -237,7 +235,7 @@ function criarEventosFiltrados(tipo) {
|
|
|
237
235
|
}
|
|
238
236
|
return result;
|
|
239
237
|
}
|
|
240
|
-
const Eventos_Recebe = criarEventosFiltrados('recebe');
|
|
241
238
|
const Eventos_Envia = criarEventosFiltrados('envia');
|
|
242
|
-
const
|
|
243
|
-
|
|
239
|
+
const Eventos_Emite = criarEventosFiltrados('emite');
|
|
240
|
+
const Eventos_EnviaERecebe = criarEventosFiltrados('envia-e-recebe');
|
|
241
|
+
export { AuthSession, PAGINAS, createGateway, EventosWebSocket, AventuraEstado, EstadoPendenciaPersonagem, EstadoPendenciaAdministrativaPersonagem, EstadoOcupacaoPersonagem, EstadoSessao, DiaDaSemana, obtemDiaDaSemanaPorExtensoPorDDS, CargoExibicaoUsuario, FormatoMomento, EstiloSessao, criarEventosFiltrados, Eventos_Envia, Eventos_Emite, Eventos_EnviaERecebe };
|