types-nora-api 0.0.142 → 0.0.144

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 CHANGED
@@ -668,85 +668,75 @@ interface IUsuario {
668
668
  listaCargos: CargosUsuario;
669
669
  }
670
670
  type UsuarioDto = IUsuario;
671
- type EventoSocket = {
672
- tipo: 'emitir';
673
- payload: unknown;
674
- descricao: string;
675
- response?: never;
676
- } | {
677
- tipo: 'ouvir';
678
- payload: unknown;
679
- descricao: string;
680
- response?: never;
681
- } | {
682
- tipo: 'request-response';
683
- payload: unknown;
684
- response: unknown;
685
- descricao: string;
686
- };
687
- declare const createSocketConfig: <T extends Record<string, {
688
- eventos: Record<string, EventoSocket>;
689
- }>>(config: {
690
- namespaces: T;
691
- }) => {
692
- namespaces: T;
693
- };
694
- declare const SOCKET_CONFIG: {
695
- namespaces: {
696
- gameEngine: {
697
- eventos: {
698
- teste: {
699
- tipo: "request-response";
700
- payload: {};
701
- response: {
702
- teste: string;
703
- };
704
- descricao: string;
705
- };
706
- };
707
- };
671
+ declare const PAGINAS: {
672
+ readonly VAZIA: {
673
+ readonly id: "";
674
+ readonly nome: "";
708
675
  };
709
- };
710
- declare const SOCKET: { [K in keyof (typeof SOCKET_CONFIG)["namespaces"]]: {
711
- readonly eventos: { [E in keyof (typeof SOCKET_CONFIG)["namespaces"][K]["eventos"]]: (typeof SOCKET_CONFIG)["namespaces"][K]["eventos"][E] & {
712
- readonly nome: E;
713
- }; };
714
- readonly nomeNamespace: `/${K}`;
715
- }; };
716
- declare const criarEventosFiltrados: <Tipo extends EventoSocket["tipo"]>(tipo: Tipo) => {
717
- [k: string]: {
718
- nomeNamespace: `/${string}`;
719
- eventos: {
720
- [k: string]: {
721
- nome: string;
722
- nomeNamespace: `/${string}`;
723
- tipo: "request-response";
724
- payload: {};
725
- response: {
726
- teste: string;
727
- };
728
- descricao: string;
729
- };
730
- };
676
+ readonly ADMIN: {
677
+ readonly id: "ADMIN";
678
+ readonly nome: "Administrando";
731
679
  };
732
- };
733
- type CriarEventosFiltrados<Tipo extends EventoSocket['tipo']> = {
734
- [K in keyof typeof SOCKET_CONFIG.namespaces]: {
735
- nomeNamespace: `/${K}`;
736
- eventos: {
737
- [E in keyof typeof SOCKET_CONFIG.namespaces[K]['eventos']]: typeof SOCKET_CONFIG.namespaces[K]['eventos'][E] extends {
738
- tipo: Tipo;
739
- } ? typeof SOCKET_CONFIG.namespaces[K]['eventos'][E] & {
740
- readonly nome: E;
741
- readonly nomeNamespace: `/${K}`;
742
- } : never;
743
- };
680
+ readonly INICIO: {
681
+ readonly id: "INICIO";
682
+ readonly nome: "Página Inicial";
683
+ };
684
+ readonly MINHA_PAGINA: {
685
+ readonly id: "MINHA_PAGINA";
686
+ readonly nome: "Minha Página";
687
+ };
688
+ readonly AVENTURAS: {
689
+ readonly id: "AVENTURAS";
690
+ readonly nome: "Aventuras";
691
+ };
692
+ readonly AVENTURA: {
693
+ readonly id: "AVENTURA";
694
+ readonly nome: "Página de Aventura";
695
+ };
696
+ readonly DEFINICOES: {
697
+ readonly id: "DEFINICOES";
698
+ readonly nome: "Definições";
699
+ };
700
+ readonly DICAS: {
701
+ readonly id: "DICAS";
702
+ readonly nome: "Dicas";
703
+ };
704
+ readonly EVOLUINDO: {
705
+ readonly id: "EVOLUINDO";
706
+ readonly nome: "Página de Evolução";
707
+ };
708
+ readonly LINHA_DO_TEMPO: {
709
+ readonly id: "LINHA_DO_TEMPO";
710
+ readonly nome: "Linha do Tempo";
711
+ };
712
+ readonly MEUS_PERSONAGENS: {
713
+ readonly id: "MEUS_PERSONAGENS";
714
+ readonly nome: "Página de Personagens";
715
+ };
716
+ readonly DISPONIBILIDADES: {
717
+ readonly id: "DISPONIBILIDADES";
718
+ readonly nome: "Página de Disponibilidades";
719
+ };
720
+ readonly SESSAO_AOVIVO: {
721
+ readonly id: "SESSAO_AOVIVO";
722
+ readonly nome: "Ao vivo em Sessão";
723
+ };
724
+ readonly SESSAO: {
725
+ readonly id: "SESSAO";
726
+ readonly nome: "Assistindo Sessão";
727
+ };
728
+ readonly MESTRE: {
729
+ readonly id: "MESTRE";
730
+ readonly nome: "Página de Mestre";
744
731
  };
745
732
  };
746
- declare const criarEventosTipados: <Tipo extends EventoSocket["tipo"]>(tipo: Tipo) => CriarEventosFiltrados<Tipo>;
747
- declare const Eventos_Tipo_Emitir: CriarEventosFiltrados<"emitir">;
748
- declare const Eventos_Tipo_Ouvir: CriarEventosFiltrados<"ouvir">;
749
- declare const Eventos_Tipo_RequestResponse: CriarEventosFiltrados<"request-response">;
733
+ type PaginaChave = keyof typeof PAGINAS;
734
+ type PaginaObjeto = typeof PAGINAS[PaginaChave];
735
+ type SOCKET_AcessoUsuario = {
736
+ usuario: UsuarioDto;
737
+ paginaAtual?: PaginaObjeto | null;
738
+ dataAtualizacao: Date;
739
+ };
750
740
  interface PaletaCores {
751
741
  corPrimaria: string;
752
742
  corSecundaria?: string;
@@ -893,28 +883,4 @@ declare enum EstiloSessao {
893
883
  SESSAO_UNICA_NAO_CANONICA = 2,
894
884
  ERRO = 3
895
885
  }
896
- type WsTelemetria_TipoEvento = 'CONNECTION' | 'DISCONNECTION' | 'EVENT_IN' | 'EVENT_OUT' | 'HEARTBEAT' | 'DASHBOARD_CONNECTED' | 'TEST_EVENT' | 'AUTH_ERROR' | 'SOCKET_ERROR' | 'HISTORICAL_CONNECTION' | 'HISTORICAL_DISCONNECTION' | 'HISTORICAL_EVENT_IN' | 'HISTORICAL_EVENT_OUT';
897
- interface WsTelemetria_Evento {
898
- tipo: WsTelemetria_TipoEvento;
899
- idCliente: string;
900
- username: string;
901
- data: any;
902
- timestamp: string;
903
- }
904
- interface WsTelemetria_DadosSistema {
905
- active: number;
906
- authenticated: number;
907
- unauthenticated: number;
908
- totalEvents: number;
909
- eventsByType: Record<string, number>;
910
- }
911
- interface WsTelemetria_SSE_Event {
912
- tipo: WsTelemetria_TipoEvento;
913
- idCliente?: string;
914
- username: string;
915
- data?: any;
916
- timestamp: string;
917
- message?: string;
918
- }
919
- declare const CONST_TELEMETRIA = "TELEMETRIA";
920
- 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, 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 };
886
+ 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, 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
@@ -11,36 +11,68 @@ class AuthSession {
11
11
  this.json = json;
12
12
  }
13
13
  }
14
- const createSocketConfig = (config) => config;
15
- const SOCKET_CONFIG = createSocketConfig({
16
- namespaces: {
17
- gameEngine: {
18
- eventos: {
19
- teste: {
20
- tipo: 'request-response',
21
- payload: {},
22
- response: { teste: '' },
23
- descricao: 'Teste de gameEngine',
24
- },
25
- },
26
- },
27
- }
28
- });
29
- 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}` }]));
30
- const criarEventosFiltrados = (tipo) => {
31
- return Object.fromEntries(Object.entries(SOCKET_CONFIG.namespaces).map(([namespaceName, namespace]) => [namespaceName, {
32
- nomeNamespace: `/${namespaceName}`,
33
- eventos: Object.fromEntries(Object.entries(namespace.eventos).filter(([_, event]) => event.tipo === tipo).map(([eventName, event]) => [eventName, {
34
- ...event,
35
- nome: eventName,
36
- nomeNamespace: `/${namespaceName}`
37
- }]))
38
- }]));
14
+ const PAGINAS = {
15
+ VAZIA: {
16
+ id: '',
17
+ nome: '',
18
+ },
19
+ ADMIN: {
20
+ id: 'ADMIN',
21
+ nome: 'Administrando'
22
+ },
23
+ INICIO: {
24
+ id: 'INICIO',
25
+ nome: 'Página Inicial',
26
+ },
27
+ MINHA_PAGINA: {
28
+ id: 'MINHA_PAGINA',
29
+ nome: 'Minha Página',
30
+ },
31
+ AVENTURAS: {
32
+ id: 'AVENTURAS',
33
+ nome: 'Aventuras',
34
+ },
35
+ AVENTURA: {
36
+ id: 'AVENTURA',
37
+ nome: 'Página de Aventura',
38
+ },
39
+ DEFINICOES: {
40
+ id: 'DEFINICOES',
41
+ nome: 'Definições',
42
+ },
43
+ DICAS: {
44
+ id: 'DICAS',
45
+ nome: 'Dicas',
46
+ },
47
+ EVOLUINDO: {
48
+ id: 'EVOLUINDO',
49
+ nome: 'Página de Evolução',
50
+ },
51
+ LINHA_DO_TEMPO: {
52
+ id: 'LINHA_DO_TEMPO',
53
+ nome: 'Linha do Tempo',
54
+ },
55
+ MEUS_PERSONAGENS: {
56
+ id: 'MEUS_PERSONAGENS',
57
+ nome: 'Página de Personagens',
58
+ },
59
+ DISPONIBILIDADES: {
60
+ id: 'DISPONIBILIDADES',
61
+ nome: 'Página de Disponibilidades',
62
+ },
63
+ SESSAO_AOVIVO: {
64
+ id: 'SESSAO_AOVIVO',
65
+ nome: 'Ao vivo em Sessão',
66
+ },
67
+ SESSAO: {
68
+ id: 'SESSAO',
69
+ nome: 'Assistindo Sessão',
70
+ },
71
+ MESTRE: {
72
+ id: 'MESTRE',
73
+ nome: 'Página de Mestre',
74
+ },
39
75
  };
40
- const criarEventosTipados = (tipo) => criarEventosFiltrados(tipo);
41
- const Eventos_Tipo_Emitir = criarEventosTipados('emitir');
42
- const Eventos_Tipo_Ouvir = criarEventosTipados('ouvir');
43
- const Eventos_Tipo_RequestResponse = criarEventosTipados('request-response');
44
76
  // @tipoCompartilhadoFront
45
77
  var AventuraEstado;
46
78
  (function (AventuraEstado) {
@@ -132,6 +164,4 @@ var EstiloSessao;
132
164
  EstiloSessao[EstiloSessao["SESSAO_UNICA_NAO_CANONICA"] = 2] = "SESSAO_UNICA_NAO_CANONICA";
133
165
  EstiloSessao[EstiloSessao["ERRO"] = 3] = "ERRO";
134
166
  })(EstiloSessao || (EstiloSessao = {}));
135
- // @tipoCompartilhadoFront
136
- const CONST_TELEMETRIA = 'TELEMETRIA';
137
- export { AuthSession, 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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "types-nora-api",
3
- "version": "0.0.142",
3
+ "version": "0.0.144",
4
4
  "description": "Tipagem da Nora-Api compartilhada com o universodomedo.com",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",