types-nora-api 0.0.200 → 0.0.208

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
@@ -1,3 +1,9 @@
1
+ declare const CAPACIDADES: {
2
+ readonly ADMINISTRADOR__PERMISSOES__ALTERACAO_CAPACIDADES_GERAIS_USUARIOS: "ADMINISTRADOR.PERMISSOES.ALTERACAO_CAPACIDADES_GERAIS_USUARIOS";
3
+ readonly ADMINISTRADOR__SUDO__BURLAR_CAPACIDADES: "ADMINISTRADOR.SUDO.BURLAR_CAPACIDADES";
4
+ readonly ADMINISTRADOR__SUDO__BURLAR_MODO_MANUTENÇÃO: "ADMINISTRADOR.SUDO.BURLAR_MODO_MANUTENÇÃO";
5
+ readonly ARTISTA__CRIACAO__MATERIAL_ESPECIAL: "ARTISTA.CRIACAO.MATERIAL_ESPECIAL";
6
+ };
1
7
  interface IPermissoesEstado {
2
8
  id: number;
3
9
  chave: string;
@@ -770,74 +776,252 @@ type SalaDeJogoDto = {
770
776
  mestre: SalaDeJogo_Mestre;
771
777
  participantes: readonly SalaDeJogo_Participante[];
772
778
  };
779
+ type PaginaDef = {
780
+ href: string;
781
+ acesso?: AcessoPagina;
782
+ };
783
+ type ExtractParamsFromHref<S extends string, Acc extends Record<string, any> = {}> = S extends `${infer _A}[[...${infer P}]]${infer Rest}` ? ExtractParamsFromHref<Rest, Acc & {
784
+ [K in P]?: string[];
785
+ }> : S extends `${infer _A}[...${infer P}]${infer Rest}` ? ExtractParamsFromHref<Rest, Acc & {
786
+ [K in P]: string[];
787
+ }> : S extends `${infer _A}[${infer P}]${infer Rest}` ? ExtractParamsFromHref<Rest, Acc & {
788
+ [K in P]: string;
789
+ }> : Acc;
790
+ type PaginaParams<P extends PaginaDef> = ExtractParamsFromHref<P['href']>;
791
+ type PaginaRef<P extends PaginaDef> = keyof PaginaParams<P> extends never ? {
792
+ pagina: P;
793
+ } : {
794
+ pagina: P;
795
+ params: PaginaParams<P>;
796
+ };
773
797
  declare const PAGINAS: {
774
- readonly VAZIA: {
775
- readonly id: "";
776
- readonly nome: "";
777
- };
778
- readonly ADMIN: {
779
- readonly id: "ADMIN";
780
- readonly nome: "Administrando";
781
- };
782
- readonly INICIO: {
783
- readonly id: "INICIO";
784
- readonly nome: "Página Inicial";
785
- };
786
- readonly MINHA_PAGINA: {
787
- readonly id: "MINHA_PAGINA";
788
- readonly nome: "Minha Página";
798
+ readonly home: {
799
+ readonly href: "/";
800
+ readonly acesso: {};
789
801
  };
790
- readonly AVENTURAS: {
791
- readonly id: "AVENTURAS";
792
- readonly nome: "Aventuras";
802
+ readonly acessar: {
803
+ readonly href: "/acessar";
804
+ readonly acesso: {};
793
805
  };
794
- readonly AVENTURA: {
795
- readonly id: "AVENTURA";
796
- readonly nome: "Página de Aventura";
806
+ readonly cadastrar: {
807
+ readonly href: "/cadastrar";
808
+ readonly acesso: {};
797
809
  };
798
- readonly DEFINICOES: {
799
- readonly id: "DEFINICOES";
800
- readonly nome: "Definições";
801
- };
802
- readonly DICAS: {
803
- readonly id: "DICAS";
804
- readonly nome: "Dicas";
805
- };
806
- readonly EVOLUINDO: {
807
- readonly id: "EVOLUINDO";
808
- readonly nome: "Página de Evolução";
809
- };
810
- readonly LINHA_DO_TEMPO: {
811
- readonly id: "LINHA_DO_TEMPO";
812
- readonly nome: "Linha do Tempo";
810
+ readonly aventuras: {
811
+ readonly href: "/aventuras";
812
+ readonly acesso: {
813
+ readonly autenticado: true;
814
+ };
813
815
  };
814
- readonly MEUS_PERSONAGENS: {
815
- readonly id: "MEUS_PERSONAGENS";
816
- readonly nome: "Página de Personagens";
816
+ readonly aventura: {
817
+ readonly id: {
818
+ readonly href: "/aventura/[id]";
819
+ readonly acesso: {
820
+ readonly autenticado: true;
821
+ };
822
+ };
817
823
  };
818
- readonly DISPONIBILIDADES: {
819
- readonly id: "DISPONIBILIDADES";
820
- readonly nome: "Página de Disponibilidades";
824
+ readonly sessoes: {
825
+ readonly href: "/sessoes";
826
+ readonly acesso: {
827
+ readonly autenticado: true;
828
+ };
821
829
  };
822
- readonly SESSAO_AOVIVO: {
823
- readonly id: "SESSAO_AOVIVO";
824
- readonly nome: "Ao vivo em Sessão";
830
+ readonly sessao: {
831
+ readonly id: {
832
+ readonly href: "/sessao/[id]";
833
+ readonly acesso: {
834
+ readonly autenticado: true;
835
+ };
836
+ };
825
837
  };
826
- readonly SESSAO: {
827
- readonly id: "SESSAO";
828
- readonly nome: "Assistindo Sessão";
838
+ readonly definicoes: {
839
+ readonly slug: {
840
+ readonly href: "/definicoes/[[...slug]]";
841
+ readonly acesso: {
842
+ readonly autenticado: true;
843
+ };
844
+ };
829
845
  };
830
- readonly MESTRE: {
831
- readonly id: "MESTRE";
832
- readonly nome: "Página de Mestre";
846
+ readonly jogo: {
847
+ readonly href: "/jogo";
848
+ readonly acesso: {
849
+ readonly autenticado: true;
850
+ };
851
+ readonly emJogo: {
852
+ readonly href: "/jogo/em-jogo";
853
+ readonly acesso: {
854
+ readonly autenticado: true;
855
+ };
856
+ };
857
+ readonly jogador: {
858
+ readonly href: "/jogo/jogador";
859
+ readonly acesso: {
860
+ readonly autenticado: true;
861
+ };
862
+ };
863
+ readonly mestre: {
864
+ readonly sessoesMestre: {
865
+ readonly href: "/jogo/mestre/sessoes-mestre";
866
+ readonly acesso: {
867
+ readonly autenticado: true;
868
+ };
869
+ };
870
+ };
871
+ readonly admin: {
872
+ readonly gerenciarSalas: {
873
+ readonly href: "/jogo/admin/gerenciar-salas";
874
+ readonly acesso: {
875
+ readonly listaDeCapacidadesNecessarias: readonly ["ADMINISTRADOR.SUDO.BURLAR_CAPACIDADES"];
876
+ };
877
+ };
878
+ };
833
879
  };
834
- readonly PLAY: {
835
- readonly id: "PLAY";
836
- readonly nome: "Página de Jogo";
880
+ readonly minhasPaginas: {
881
+ readonly admin: {
882
+ readonly href: "/minhas-paginas/admin";
883
+ readonly acesso: {
884
+ readonly listaDeCapacidadesNecessarias: readonly ["ADMINISTRADOR.SUDO.BURLAR_CAPACIDADES"];
885
+ };
886
+ readonly uploads: {
887
+ readonly href: "/minhas-paginas/admin/uploads";
888
+ readonly acesso: {
889
+ readonly listaDeCapacidadesNecessarias: readonly ["ADMINISTRADOR.SUDO.BURLAR_CAPACIDADES"];
890
+ };
891
+ };
892
+ readonly variaveisAmbiente: {
893
+ readonly href: "/minhas-paginas/admin/variaveis-ambiente";
894
+ readonly acesso: {
895
+ readonly listaDeCapacidadesNecessarias: readonly ["ADMINISTRADOR.SUDO.BURLAR_CAPACIDADES"];
896
+ };
897
+ };
898
+ readonly dashboardWs: {
899
+ readonly href: "/minhas-paginas/admin/dashboard-ws";
900
+ readonly acesso: {
901
+ readonly listaDeCapacidadesNecessarias: readonly ["ADMINISTRADOR.SUDO.BURLAR_CAPACIDADES"];
902
+ };
903
+ };
904
+ readonly sessao: {
905
+ readonly id: {
906
+ readonly href: "/minhas-paginas/admin/sessao/[id]";
907
+ readonly acesso: {
908
+ readonly listaDeCapacidadesNecessarias: readonly ["ADMINISTRADOR.SUDO.BURLAR_CAPACIDADES"];
909
+ };
910
+ };
911
+ };
912
+ readonly aventura: {
913
+ readonly id: {
914
+ readonly href: "/minhas-paginas/admin/aventura/[id]";
915
+ readonly acesso: {
916
+ readonly listaDeCapacidadesNecessarias: readonly ["ADMINISTRADOR.SUDO.BURLAR_CAPACIDADES"];
917
+ };
918
+ };
919
+ };
920
+ readonly aventuras: {
921
+ readonly href: "/minhas-paginas/admin/aventuras";
922
+ readonly acesso: {
923
+ readonly listaDeCapacidadesNecessarias: readonly ["ADMINISTRADOR.SUDO.BURLAR_CAPACIDADES"];
924
+ };
925
+ };
926
+ };
927
+ readonly jogador: {
928
+ readonly href: "/minhas-paginas/jogador";
929
+ readonly acesso: {
930
+ readonly autenticado: true;
931
+ };
932
+ readonly meusPersonagens: {
933
+ readonly href: "/minhas-paginas/jogador/meus-personagens";
934
+ readonly acesso: {
935
+ readonly autenticado: true;
936
+ };
937
+ };
938
+ };
939
+ readonly mestre: {
940
+ readonly href: "/minhas-paginas/mestre";
941
+ readonly acesso: {
942
+ readonly autenticado: true;
943
+ };
944
+ readonly aventuras: {
945
+ readonly href: "/minhas-paginas/mestre/aventuras";
946
+ readonly acesso: {
947
+ readonly autenticado: true;
948
+ };
949
+ };
950
+ readonly personagens: {
951
+ readonly href: "/minhas-paginas/mestre/personagens";
952
+ readonly acesso: {
953
+ readonly autenticado: true;
954
+ };
955
+ };
956
+ readonly aventura: {
957
+ readonly id: {
958
+ readonly href: "/minhas-paginas/mestre/aventura/[id]";
959
+ readonly acesso: {
960
+ readonly autenticado: true;
961
+ };
962
+ };
963
+ };
964
+ readonly sessao: {
965
+ readonly id: {
966
+ readonly href: "/minhas-paginas/mestre/sessao/[id]";
967
+ readonly acesso: {
968
+ readonly autenticado: true;
969
+ };
970
+ };
971
+ };
972
+ readonly rascunhos: {
973
+ readonly aventuras: {
974
+ readonly href: "/minhas-paginas/mestre/rascunhos/aventuras";
975
+ readonly acesso: {
976
+ readonly autenticado: true;
977
+ };
978
+ };
979
+ readonly sessoesUnicas: {
980
+ readonly href: "/minhas-paginas/mestre/rascunhos/sessoes-unicas";
981
+ readonly acesso: {
982
+ readonly autenticado: true;
983
+ };
984
+ };
985
+ };
986
+ };
987
+ readonly minhasDisponibilidades: {
988
+ readonly href: "/minhas-paginas/minhas-disponibilidades";
989
+ readonly acesso: {
990
+ readonly autenticado: true;
991
+ };
992
+ };
837
993
  };
838
994
  };
839
- type PaginaChave = keyof typeof PAGINAS;
840
- type PaginaObjeto = typeof PAGINAS[PaginaChave];
995
+ type PaginasTree<T> = T extends Record<string, any> ? 'href' extends keyof T ? T extends {
996
+ href: infer H;
997
+ } ? H extends string ? {
998
+ href: H;
999
+ acesso?: AcessoPagina;
1000
+ } & {
1001
+ [K in Exclude<keyof T, 'href' | 'acesso'>]: PaginasTree<T[K]>;
1002
+ } : never : never : {
1003
+ acesso?: AcessoPagina;
1004
+ } & {
1005
+ [K in Exclude<keyof T, 'acesso'>]: PaginasTree<T[K]>;
1006
+ } : never;
1007
+ type _Check = {
1008
+ [K in keyof typeof PAGINAS]: PaginasTree<(typeof PAGINAS)[K]>;
1009
+ };
1010
+ declare const _check: _Check;
1011
+ type PaginaHref = PaginaDef['href'];
1012
+ type PaginaObjeto<P extends PaginaDef = PaginaAtual> = keyof PaginaParams<P> extends never ? {
1013
+ pagina: P;
1014
+ } : {
1015
+ pagina: P;
1016
+ params: PaginaParams<P>;
1017
+ };
1018
+ type PaginaLeafUnion<T> = T extends {
1019
+ href: string;
1020
+ } ? T | PaginaLeafUnionChildren<T> : PaginaLeafUnionChildren<T>;
1021
+ type PaginaLeafUnionChildren<T> = T extends Record<string, any> ? {
1022
+ [K in Exclude<keyof T, 'href' | 'acesso'>]: PaginaLeafUnion<T[K]>;
1023
+ }[Exclude<keyof T, 'href' | 'acesso'>] : never;
1024
+ type PaginaAtual = PaginaLeafUnion<typeof PAGINAS>;
841
1025
  interface MensagemChatRecebida {
842
1026
  salaId: string;
843
1027
  idUsuario: number;
@@ -862,7 +1046,7 @@ interface MensagemChatPayload {
862
1046
  }
863
1047
  type SOCKET_AcessoUsuario = {
864
1048
  usuario: UsuarioDto;
865
- paginaAtual?: PaginaObjeto | null;
1049
+ paginaAtual?: PaginaHref | null;
866
1050
  dataAtualizacao: Date;
867
1051
  };
868
1052
  type SOCKET_UsuarioExistente = {
@@ -1049,10 +1233,6 @@ type EventosEmiteMap = typeof Eventos_Emite;
1049
1233
  type EventoEmiteAny = {
1050
1234
  [G in keyof EventosEmiteMap]: EventosEmiteMap[G]['eventos'][keyof EventosEmiteMap[G]['eventos']];
1051
1235
  }[keyof EventosEmiteMap];
1052
- declare const CAPACIDADES: {
1053
- readonly ADMINISTRADOR__PERMISSOES__ALTERACAO_CAPACIDADES_GERAIS_USUARIOS: "ADMINISTRADOR.PERMISSOES.ALTERACAO_CAPACIDADES_GERAIS_USUARIOS";
1054
- readonly ARTISTA__CRIACAO__MATERIAL_ESPECIAL: "ARTISTA.CRIACAO.MATERIAL_ESPECIAL";
1055
- };
1056
1236
  interface PaletaCores {
1057
1237
  corPrimaria: string;
1058
1238
  corSecundaria?: string;
@@ -1215,6 +1395,13 @@ type PermissaoItemMinimo = {
1215
1395
  id: number;
1216
1396
  } | null;
1217
1397
  };
1398
+ type AcessoPagina = {} | {
1399
+ autenticado: true;
1400
+ listaDeCapacidadesNecessarias?: never;
1401
+ } | {
1402
+ autenticado?: never;
1403
+ listaDeCapacidadesNecessarias: readonly [Capacidade, ...Capacidade[]];
1404
+ };
1218
1405
  type Gateways = typeof EventosWebSocket.gateways;
1219
1406
  type EventoTipoLiteral = EventoTipo;
1220
1407
  type FiltraEventosPorTipo<G extends GatewayDef, Tipo extends EventoTipoLiteral> = {
@@ -1386,4 +1573,4 @@ declare const Eventos_EnviaERecebe: {
1386
1573
  };
1387
1574
  };
1388
1575
  };
1389
- export { IPermissoesEstado, PermissoesEstadoDto, IPermissoesItem, PermissoesItemDto, IPermissoesUsuario, PermissoesUsuarioDto, IPermissoesUsuariosHistorico, PermissoesUsuariosHistoricoDto, IArcoAventura, ArcoAventuraDto, IAventura, AventuraDto, IConviteGrupoAventuraPersonagem, ConviteGrupoAventuraPersonagemDto, IGrupoAventura, GrupoAventuraDto, IGrupoAventuraPersonagem, GrupoAventuraPersonagemDto, IRespostaConvite, RespostaConviteDto, IVariavelAmbiente, VariavelAmbienteDto, IConquista, ConquistaDto, ITipoConquista, TipoConquistaDto, IDetalheSessaoAventura, DetalheSessaoAventuraDto, IDetalheSessaoCanonica, DetalheSessaoCanonicaDto, CapituloSessaoCanonica, 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, PersonagemSalaJogoDto, IResumoPersonagemAventura, ResumoPersonagemAventuraDto, ITipoPersonagem, TipoPersonagemDto, IDetalheRascunhoAventura, DetalheRascunhoAventuraDto, IDetalheRascunhoSessaoUnicaCanonica, DetalheRascunhoSessaoUnicaCanonicaDto, IDetalheRascunhoSessaoUnicaNaoCanonica, DetalheRascunhoSessaoUnicaNaoCanonicaDto, IRascunho, RascunhoDto, IEstudo, EstudoDto, IRegistroSessao, RegistroSessaoDto, ISessao, SessaoDto, SessaoDadosGerais, ParticipanteSessao, AuthSession, ICustomizacaoUsuario, CustomizacaoUsuarioDto, IDisponibilidadeUsuario, DisponibilidadeUsuarioDto, ListaDisponibilidadesUsuario, DisponibilidadesDDS, JanelaDisponibilidade, IUsuario, UsuarioDto, SalaDeJogo_Codigo, SalaDeJogoParams, SalaDeJogo_Tipo, SalaDeJogo_Estado, SalaDeJogo_TipoMestre, SalaDeJogo_Mestre, SalaDeJogo_Mestre_Mestrada, SalaDeJogo_Mestre_Inteligente, SalaDeJogo_TipoParticipante, SalaDeJogo_Participante, SalaDeJogo_Participante_Narrador, SalaDeJogo_Participante_Jogador, SalaDeJogo_FUNC_AtualizaParticipanteParams, SalaDeJogoDto, PAGINAS, PaginaChave, PaginaObjeto, MensagemChatRecebida, SalaChat, SalaChatFront, MensagemChatPayload, SOCKET_AcessoUsuario, SOCKET_UsuarioExistente, TelemetryConnectionInfo, WsEventAudienceUnico, WsEventAudienceMultiplo, WsEventAudience, TelemetryEventLog, TelemetrySnapshot, WsErrorResponse, WsUnauthorizedErrorResponse, WsResult, isWsErrorResponse, isWsUnauthorizedErrorResponse, wsErro, wsUnauthorized, wsMap, wsChain, EventoTipo, EmitDelivery, EventoAuthDefault, EventoEnvia, EventoEmite, EventoEnviaERecebe, EventoSchema, GatewayDef, createGateway, EventosWebSocket, isRecord, getEmitDelivery, WsEmitTarget, WsEmitParams, EventosEmiteMap, EventoEmiteAny, CAPACIDADES, 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, PathTokenPadrao, TituloSessaoInteligente, Capacidade, LISTA_CAPACIDADES, PermissaoItemMinimo, Gateways, EventoTipoLiteral, FiltraEventosPorTipo, criarEventosFiltrados, Eventos_Envia, Eventos_Emite, Eventos_EnviaERecebe };
1576
+ export { CAPACIDADES, IPermissoesEstado, PermissoesEstadoDto, IPermissoesItem, PermissoesItemDto, IPermissoesUsuario, PermissoesUsuarioDto, IPermissoesUsuariosHistorico, PermissoesUsuariosHistoricoDto, IArcoAventura, ArcoAventuraDto, IAventura, AventuraDto, IConviteGrupoAventuraPersonagem, ConviteGrupoAventuraPersonagemDto, IGrupoAventura, GrupoAventuraDto, IGrupoAventuraPersonagem, GrupoAventuraPersonagemDto, IRespostaConvite, RespostaConviteDto, IVariavelAmbiente, VariavelAmbienteDto, IConquista, ConquistaDto, ITipoConquista, TipoConquistaDto, IDetalheSessaoAventura, DetalheSessaoAventuraDto, IDetalheSessaoCanonica, DetalheSessaoCanonicaDto, CapituloSessaoCanonica, 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, PersonagemSalaJogoDto, IResumoPersonagemAventura, ResumoPersonagemAventuraDto, ITipoPersonagem, TipoPersonagemDto, IDetalheRascunhoAventura, DetalheRascunhoAventuraDto, IDetalheRascunhoSessaoUnicaCanonica, DetalheRascunhoSessaoUnicaCanonicaDto, IDetalheRascunhoSessaoUnicaNaoCanonica, DetalheRascunhoSessaoUnicaNaoCanonicaDto, IRascunho, RascunhoDto, IEstudo, EstudoDto, IRegistroSessao, RegistroSessaoDto, ISessao, SessaoDto, SessaoDadosGerais, ParticipanteSessao, AuthSession, ICustomizacaoUsuario, CustomizacaoUsuarioDto, IDisponibilidadeUsuario, DisponibilidadeUsuarioDto, ListaDisponibilidadesUsuario, DisponibilidadesDDS, JanelaDisponibilidade, IUsuario, UsuarioDto, SalaDeJogo_Codigo, SalaDeJogoParams, SalaDeJogo_Tipo, SalaDeJogo_Estado, SalaDeJogo_TipoMestre, SalaDeJogo_Mestre, SalaDeJogo_Mestre_Mestrada, SalaDeJogo_Mestre_Inteligente, SalaDeJogo_TipoParticipante, SalaDeJogo_Participante, SalaDeJogo_Participante_Narrador, SalaDeJogo_Participante_Jogador, SalaDeJogo_FUNC_AtualizaParticipanteParams, SalaDeJogoDto, PaginaDef, ExtractParamsFromHref, PaginaParams, PaginaRef, PAGINAS, PaginasTree, _Check, _check, PaginaHref, PaginaObjeto, PaginaLeafUnion, PaginaLeafUnionChildren, PaginaAtual, MensagemChatRecebida, SalaChat, SalaChatFront, MensagemChatPayload, SOCKET_AcessoUsuario, SOCKET_UsuarioExistente, TelemetryConnectionInfo, WsEventAudienceUnico, WsEventAudienceMultiplo, WsEventAudience, TelemetryEventLog, TelemetrySnapshot, WsErrorResponse, WsUnauthorizedErrorResponse, WsResult, isWsErrorResponse, isWsUnauthorizedErrorResponse, wsErro, wsUnauthorized, wsMap, wsChain, EventoTipo, EmitDelivery, EventoAuthDefault, EventoEnvia, EventoEmite, EventoEnviaERecebe, EventoSchema, GatewayDef, createGateway, EventosWebSocket, isRecord, getEmitDelivery, WsEmitTarget, WsEmitParams, EventosEmiteMap, EventoEmiteAny, 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, PathTokenPadrao, TituloSessaoInteligente, Capacidade, LISTA_CAPACIDADES, PermissaoItemMinimo, AcessoPagina, Gateways, EventoTipoLiteral, FiltraEventosPorTipo, criarEventosFiltrados, Eventos_Envia, Eventos_Emite, Eventos_EnviaERecebe };
package/dist/classes.js CHANGED
@@ -1,5 +1,13 @@
1
1
  // AUTO-GENERATED FILE - DO NOT EDIT
2
2
  // Gerado automaticamente por extrairClasses.ts
3
+ /* eslint-disable */
4
+ // Arquivo gerado automaticamente. Não edite manualmente.
5
+ const CAPACIDADES = {
6
+ ADMINISTRADOR__PERMISSOES__ALTERACAO_CAPACIDADES_GERAIS_USUARIOS: 'ADMINISTRADOR.PERMISSOES.ALTERACAO_CAPACIDADES_GERAIS_USUARIOS',
7
+ ADMINISTRADOR__SUDO__BURLAR_CAPACIDADES: 'ADMINISTRADOR.SUDO.BURLAR_CAPACIDADES',
8
+ ADMINISTRADOR__SUDO__BURLAR_MODO_MANUTENÇÃO: 'ADMINISTRADOR.SUDO.BURLAR_MODO_MANUTENÇÃO',
9
+ ARTISTA__CRIACAO__MATERIAL_ESPECIAL: 'ARTISTA.CRIACAO.MATERIAL_ESPECIAL',
10
+ };
3
11
  class AuthSession {
4
12
  expiredAt;
5
13
  id;
@@ -42,71 +50,54 @@ var SalaDeJogo_TipoParticipante;
42
50
  SalaDeJogo_TipoParticipante["SALA__JOGADOR"] = "Jogador";
43
51
  })(SalaDeJogo_TipoParticipante || (SalaDeJogo_TipoParticipante = {}));
44
52
  const PAGINAS = {
45
- VAZIA: {
46
- id: '',
47
- nome: '',
48
- },
49
- ADMIN: {
50
- id: 'ADMIN',
51
- nome: 'Administrando'
52
- },
53
- INICIO: {
54
- id: 'INICIO',
55
- nome: 'Página Inicial',
56
- },
57
- MINHA_PAGINA: {
58
- id: 'MINHA_PAGINA',
59
- nome: 'Minha Página',
60
- },
61
- AVENTURAS: {
62
- id: 'AVENTURAS',
63
- nome: 'Aventuras',
64
- },
65
- AVENTURA: {
66
- id: 'AVENTURA',
67
- nome: 'Página de Aventura',
68
- },
69
- DEFINICOES: {
70
- id: 'DEFINICOES',
71
- nome: 'Definições',
72
- },
73
- DICAS: {
74
- id: 'DICAS',
75
- nome: 'Dicas',
76
- },
77
- EVOLUINDO: {
78
- id: 'EVOLUINDO',
79
- nome: 'Página de Evolução',
80
- },
81
- LINHA_DO_TEMPO: {
82
- id: 'LINHA_DO_TEMPO',
83
- nome: 'Linha do Tempo',
53
+ home: { href: '/', acesso: {} },
54
+ acessar: { href: '/acessar', acesso: {} },
55
+ cadastrar: { href: '/cadastrar', acesso: {} },
56
+ aventuras: { href: '/aventuras', acesso: { autenticado: true } },
57
+ aventura: { id: { href: '/aventura/[id]', acesso: { autenticado: true } } },
58
+ sessoes: { href: '/sessoes', acesso: { autenticado: true } },
59
+ sessao: { id: { href: '/sessao/[id]', acesso: { autenticado: true } } },
60
+ definicoes: { slug: { href: '/definicoes/[[...slug]]', acesso: { autenticado: true } } },
61
+ jogo: {
62
+ href: '/jogo',
63
+ acesso: { autenticado: true },
64
+ emJogo: { href: '/jogo/em-jogo', acesso: { autenticado: true } },
65
+ jogador: { href: '/jogo/jogador', acesso: { autenticado: true } },
66
+ mestre: { sessoesMestre: { href: '/jogo/mestre/sessoes-mestre', acesso: { autenticado: true } } },
67
+ admin: { gerenciarSalas: { href: '/jogo/admin/gerenciar-salas', acesso: { listaDeCapacidadesNecessarias: [CAPACIDADES.ADMINISTRADOR__SUDO__BURLAR_CAPACIDADES] } } },
84
68
  },
85
- MEUS_PERSONAGENS: {
86
- id: 'MEUS_PERSONAGENS',
87
- nome: 'Página de Personagens',
88
- },
89
- DISPONIBILIDADES: {
90
- id: 'DISPONIBILIDADES',
91
- nome: 'Página de Disponibilidades',
92
- },
93
- SESSAO_AOVIVO: {
94
- id: 'SESSAO_AOVIVO',
95
- nome: 'Ao vivo em Sessão',
96
- },
97
- SESSAO: {
98
- id: 'SESSAO',
99
- nome: 'Assistindo Sessão',
100
- },
101
- MESTRE: {
102
- id: 'MESTRE',
103
- nome: 'Página de Mestre',
104
- },
105
- PLAY: {
106
- id: 'PLAY',
107
- nome: 'Página de Jogo',
69
+ minhasPaginas: {
70
+ admin: {
71
+ href: '/minhas-paginas/admin',
72
+ acesso: { listaDeCapacidadesNecessarias: [CAPACIDADES.ADMINISTRADOR__SUDO__BURLAR_CAPACIDADES] },
73
+ uploads: { href: '/minhas-paginas/admin/uploads', acesso: { listaDeCapacidadesNecessarias: [CAPACIDADES.ADMINISTRADOR__SUDO__BURLAR_CAPACIDADES] } },
74
+ variaveisAmbiente: { href: '/minhas-paginas/admin/variaveis-ambiente', acesso: { listaDeCapacidadesNecessarias: [CAPACIDADES.ADMINISTRADOR__SUDO__BURLAR_CAPACIDADES] } },
75
+ dashboardWs: { href: '/minhas-paginas/admin/dashboard-ws', acesso: { listaDeCapacidadesNecessarias: [CAPACIDADES.ADMINISTRADOR__SUDO__BURLAR_CAPACIDADES] } },
76
+ sessao: { id: { href: '/minhas-paginas/admin/sessao/[id]', acesso: { listaDeCapacidadesNecessarias: [CAPACIDADES.ADMINISTRADOR__SUDO__BURLAR_CAPACIDADES] } } },
77
+ aventura: { id: { href: '/minhas-paginas/admin/aventura/[id]', acesso: { listaDeCapacidadesNecessarias: [CAPACIDADES.ADMINISTRADOR__SUDO__BURLAR_CAPACIDADES] } } },
78
+ aventuras: { href: '/minhas-paginas/admin/aventuras', acesso: { listaDeCapacidadesNecessarias: [CAPACIDADES.ADMINISTRADOR__SUDO__BURLAR_CAPACIDADES] } },
79
+ },
80
+ jogador: {
81
+ href: '/minhas-paginas/jogador',
82
+ acesso: { autenticado: true },
83
+ meusPersonagens: { href: '/minhas-paginas/jogador/meus-personagens', acesso: { autenticado: true } },
84
+ },
85
+ mestre: {
86
+ href: '/minhas-paginas/mestre',
87
+ acesso: { autenticado: true },
88
+ aventuras: { href: '/minhas-paginas/mestre/aventuras', acesso: { autenticado: true } },
89
+ personagens: { href: '/minhas-paginas/mestre/personagens', acesso: { autenticado: true } },
90
+ aventura: { id: { href: '/minhas-paginas/mestre/aventura/[id]', acesso: { autenticado: true } } },
91
+ sessao: { id: { href: '/minhas-paginas/mestre/sessao/[id]', acesso: { autenticado: true } } },
92
+ rascunhos: {
93
+ aventuras: { href: '/minhas-paginas/mestre/rascunhos/aventuras', acesso: { autenticado: true } },
94
+ sessoesUnicas: { href: '/minhas-paginas/mestre/rascunhos/sessoes-unicas', acesso: { autenticado: true } },
95
+ },
96
+ },
97
+ minhasDisponibilidades: { href: '/minhas-paginas/minhas-disponibilidades', acesso: { autenticado: true } },
108
98
  },
109
99
  };
100
+ const _check = PAGINAS;
110
101
  function isWsErrorResponse(payload) { return !!payload && typeof payload === "object" && payload._wsErro === true; }
111
102
  function isWsUnauthorizedErrorResponse(payload) { return isWsErrorResponse(payload) && payload.code === "UNAUTHORIZED"; }
112
103
  function wsErro(mensagem, extra) { return { _wsErro: true, mensagem, ...(extra ?? {}) }; }
@@ -204,12 +195,6 @@ function getEmitDelivery(gatewayName, eventName) {
204
195
  return delivery;
205
196
  return undefined;
206
197
  }
207
- /* eslint-disable */
208
- // Arquivo gerado automaticamente. Não edite manualmente.
209
- const CAPACIDADES = {
210
- ADMINISTRADOR__PERMISSOES__ALTERACAO_CAPACIDADES_GERAIS_USUARIOS: 'ADMINISTRADOR.PERMISSOES.ALTERACAO_CAPACIDADES_GERAIS_USUARIOS',
211
- ARTISTA__CRIACAO__MATERIAL_ESPECIAL: 'ARTISTA.CRIACAO.MATERIAL_ESPECIAL',
212
- };
213
198
  // @tipoCompartilhadoFront
214
199
  var AventuraEstado;
215
200
  (function (AventuraEstado) {
@@ -321,4 +306,4 @@ function criarEventosFiltrados(tipo) {
321
306
  const Eventos_Envia = criarEventosFiltrados('envia');
322
307
  const Eventos_Emite = criarEventosFiltrados('emite');
323
308
  const Eventos_EnviaERecebe = criarEventosFiltrados('envia-e-recebe');
324
- export { AuthSession, SalaDeJogo_Tipo, SalaDeJogo_Estado, SalaDeJogo_TipoMestre, SalaDeJogo_TipoParticipante, PAGINAS, isWsErrorResponse, isWsUnauthorizedErrorResponse, wsErro, wsUnauthorized, wsMap, wsChain, createGateway, EventosWebSocket, isRecord, getEmitDelivery, CAPACIDADES, AventuraEstado, EstadoPendenciaPersonagem, EstadoPendenciaAdministrativaPersonagem, EstadoOcupacaoPersonagem, EstadoSessao, DiaDaSemana, obtemDiaDaSemanaPorExtensoPorDDS, CargoExibicaoUsuario, FormatoMomento, EstiloSessao, PathTokenPadrao, LISTA_CAPACIDADES, criarEventosFiltrados, Eventos_Envia, Eventos_Emite, Eventos_EnviaERecebe };
309
+ export { CAPACIDADES, AuthSession, SalaDeJogo_Tipo, SalaDeJogo_Estado, SalaDeJogo_TipoMestre, SalaDeJogo_TipoParticipante, PAGINAS, _check, isWsErrorResponse, isWsUnauthorizedErrorResponse, wsErro, wsUnauthorized, wsMap, wsChain, createGateway, EventosWebSocket, isRecord, getEmitDelivery, AventuraEstado, EstadoPendenciaPersonagem, EstadoPendenciaAdministrativaPersonagem, EstadoOcupacaoPersonagem, EstadoSessao, DiaDaSemana, obtemDiaDaSemanaPorExtensoPorDDS, CargoExibicaoUsuario, FormatoMomento, EstiloSessao, PathTokenPadrao, LISTA_CAPACIDADES, criarEventosFiltrados, Eventos_Envia, Eventos_Emite, Eventos_EnviaERecebe };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "types-nora-api",
3
- "version": "0.0.200",
3
+ "version": "0.0.208",
4
4
  "description": "Tipagem da Nora-Api compartilhada com o universodomedo.com",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",