types-nora-api 0.0.468 → 0.0.472
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/acessos/index.d.ts +8 -0
- package/dist/acessos/index.js +5 -0
- package/dist/api/graphql/index.d.ts +1 -0
- package/dist/api/graphql/index.js +3 -0
- package/dist/api/index.d.ts +2 -0
- package/dist/api/index.js +4 -0
- package/dist/api/rest/index.d.ts +1 -0
- package/dist/api/rest/index.js +3 -0
- package/dist/classes.d.ts +1 -3747
- package/dist/classes.js +2 -1227
- package/dist/dominio/index.d.ts +899 -0
- package/dist/dominio/index.js +237 -0
- package/dist/dtos/index.d.ts +2140 -0
- package/dist/dtos/index.js +363 -0
- package/dist/index.d.ts +9 -1
- package/dist/index.js +11 -1
- package/dist/menus/index.d.ts +127 -0
- package/dist/menus/index.js +279 -0
- package/dist/paginas/index.d.ts +172 -0
- package/dist/paginas/index.js +137 -0
- package/dist/shared/index.d.ts +175 -0
- package/dist/shared/index.js +138 -0
- package/dist/uploads/index.d.ts +47 -0
- package/dist/uploads/index.js +112 -0
- package/dist/ws/index.d.ts +236 -0
- package/dist/ws/index.js +20 -0
- package/package.json +56 -2
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import { EventosWebSocket } from '../dtos';
|
|
2
|
+
import type { EventoTipo, GatewayDef } from '../dtos';
|
|
3
|
+
type Gateways = typeof EventosWebSocket.gateways;
|
|
4
|
+
type EventoTipoLiteral = EventoTipo;
|
|
5
|
+
type FiltraEventosPorTipo<G extends GatewayDef, Tipo extends EventoTipoLiteral> = {
|
|
6
|
+
[K in keyof G as G[K] extends {
|
|
7
|
+
tipo: Tipo;
|
|
8
|
+
} ? K : never]: G[K];
|
|
9
|
+
};
|
|
10
|
+
declare function criarEventosFiltrados<Tipo extends EventoTipoLiteral>(tipo: Tipo): { [G in keyof Gateways]: {
|
|
11
|
+
eventos: { [E in keyof FiltraEventosPorTipo<Gateways[G], Tipo>]: FiltraEventosPorTipo<Gateways[G], Tipo>[E] & {
|
|
12
|
+
readonly nome: E;
|
|
13
|
+
readonly gateway: G;
|
|
14
|
+
readonly fullName: `${Extract<G, string>}:${Extract<E, string>}`;
|
|
15
|
+
}; };
|
|
16
|
+
}; };
|
|
17
|
+
declare const Eventos_Envia: {
|
|
18
|
+
readonly Chat: {
|
|
19
|
+
eventos: {
|
|
20
|
+
enviaMensagem: {
|
|
21
|
+
tipo: "envia";
|
|
22
|
+
payload: {
|
|
23
|
+
salaId: string;
|
|
24
|
+
conteudoMensagem: string;
|
|
25
|
+
};
|
|
26
|
+
} & {
|
|
27
|
+
readonly nome: "enviaMensagem";
|
|
28
|
+
readonly gateway: "Chat";
|
|
29
|
+
readonly fullName: "Chat:enviaMensagem";
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
readonly Jogo: {
|
|
34
|
+
eventos: {
|
|
35
|
+
NARRADOR_executaAcaoParticipante_PROTOTIPO: {
|
|
36
|
+
tipo: "envia";
|
|
37
|
+
payload: import("../dtos").PAYLOAD__NARRADOR_executaAcaoParticipante_PROTOTIPO;
|
|
38
|
+
} & {
|
|
39
|
+
readonly nome: "NARRADOR_executaAcaoParticipante_PROTOTIPO";
|
|
40
|
+
readonly gateway: "Jogo";
|
|
41
|
+
readonly fullName: "Jogo:NARRADOR_executaAcaoParticipante_PROTOTIPO";
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
readonly ExecucaoDeJogo: {
|
|
46
|
+
eventos: {
|
|
47
|
+
executaTestePericia: {
|
|
48
|
+
tipo: "envia";
|
|
49
|
+
payload: import("../dtos").PAYLOAD__executaTestePericia;
|
|
50
|
+
} & {
|
|
51
|
+
readonly nome: "executaTestePericia";
|
|
52
|
+
readonly gateway: "ExecucaoDeJogo";
|
|
53
|
+
readonly fullName: "ExecucaoDeJogo:executaTestePericia";
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
readonly UsuariosConectados: {
|
|
58
|
+
eventos: {};
|
|
59
|
+
};
|
|
60
|
+
readonly UsuariosExistentes: {
|
|
61
|
+
eventos: {};
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
declare const Eventos_Emite: {
|
|
65
|
+
readonly Chat: {
|
|
66
|
+
eventos: {
|
|
67
|
+
emitirMensagem: {
|
|
68
|
+
tipo: "emite";
|
|
69
|
+
payload: {
|
|
70
|
+
mensagemId: number;
|
|
71
|
+
};
|
|
72
|
+
response: {
|
|
73
|
+
conteudoMensagem: import("../dtos").MensagemChatRecebida;
|
|
74
|
+
};
|
|
75
|
+
delivery: "broadcast";
|
|
76
|
+
} & {
|
|
77
|
+
readonly nome: "emitirMensagem";
|
|
78
|
+
readonly gateway: "Chat";
|
|
79
|
+
readonly fullName: "Chat:emitirMensagem";
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
readonly Jogo: {
|
|
84
|
+
eventos: {
|
|
85
|
+
emitirEstouEmJogo: {
|
|
86
|
+
tipo: "emite";
|
|
87
|
+
payload: {};
|
|
88
|
+
response: {
|
|
89
|
+
objetoEstouEmJogo: import("../dtos").LogicaJogoUsuario_EstouEmJogoDto;
|
|
90
|
+
};
|
|
91
|
+
delivery: "perRecipient";
|
|
92
|
+
} & {
|
|
93
|
+
readonly nome: "emitirEstouEmJogo";
|
|
94
|
+
readonly gateway: "Jogo";
|
|
95
|
+
readonly fullName: "Jogo:emitirEstouEmJogo";
|
|
96
|
+
};
|
|
97
|
+
emitirObjetoEmJogo: {
|
|
98
|
+
tipo: "emite";
|
|
99
|
+
payload: {};
|
|
100
|
+
response: {
|
|
101
|
+
objetoEmJogo: import("../dtos").LogicaJogoUsuario_ObjetoEmJogoDto;
|
|
102
|
+
};
|
|
103
|
+
delivery: "perRecipient";
|
|
104
|
+
} & {
|
|
105
|
+
readonly nome: "emitirObjetoEmJogo";
|
|
106
|
+
readonly gateway: "Jogo";
|
|
107
|
+
readonly fullName: "Jogo:emitirObjetoEmJogo";
|
|
108
|
+
};
|
|
109
|
+
emitirSessaoEmAndamento: {
|
|
110
|
+
tipo: "emite";
|
|
111
|
+
payload: {};
|
|
112
|
+
response: {
|
|
113
|
+
sessaoEmAndamento: import("../dtos").SalaDeJogo_SessaoDto | null;
|
|
114
|
+
};
|
|
115
|
+
delivery: "perRecipient";
|
|
116
|
+
} & {
|
|
117
|
+
readonly nome: "emitirSessaoEmAndamento";
|
|
118
|
+
readonly gateway: "Jogo";
|
|
119
|
+
readonly fullName: "Jogo:emitirSessaoEmAndamento";
|
|
120
|
+
};
|
|
121
|
+
emitirTodasSalas: {
|
|
122
|
+
tipo: "emite";
|
|
123
|
+
payload: {};
|
|
124
|
+
response: {
|
|
125
|
+
salas: import("../dtos").SalaDeJogoDto[];
|
|
126
|
+
};
|
|
127
|
+
delivery: "broadcast";
|
|
128
|
+
} & {
|
|
129
|
+
readonly nome: "emitirTodasSalas";
|
|
130
|
+
readonly gateway: "Jogo";
|
|
131
|
+
readonly fullName: "Jogo:emitirTodasSalas";
|
|
132
|
+
};
|
|
133
|
+
emitirFichaEmJogo: {
|
|
134
|
+
tipo: "emite";
|
|
135
|
+
payload: import("../dtos").PAYLOAD__EmitirFichaEmJogo;
|
|
136
|
+
response: {
|
|
137
|
+
fichaAtualizada: import("../dtos").J_DadosFichaEmJogo;
|
|
138
|
+
};
|
|
139
|
+
} & {
|
|
140
|
+
readonly nome: "emitirFichaEmJogo";
|
|
141
|
+
readonly gateway: "Jogo";
|
|
142
|
+
readonly fullName: "Jogo:emitirFichaEmJogo";
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
readonly ExecucaoDeJogo: {
|
|
147
|
+
eventos: {
|
|
148
|
+
emitirMensagemSalaJogo: {
|
|
149
|
+
tipo: "emite";
|
|
150
|
+
payload: {
|
|
151
|
+
mensagemSalaJogo: import("../dtos").PAYLOAD__emitirMensagemSalaJogo;
|
|
152
|
+
};
|
|
153
|
+
response: {
|
|
154
|
+
mensagemSalaJogo: import("../dtos").MensagemSalaJogo | null;
|
|
155
|
+
};
|
|
156
|
+
} & {
|
|
157
|
+
readonly nome: "emitirMensagemSalaJogo";
|
|
158
|
+
readonly gateway: "ExecucaoDeJogo";
|
|
159
|
+
readonly fullName: "ExecucaoDeJogo:emitirMensagemSalaJogo";
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
readonly UsuariosConectados: {
|
|
164
|
+
eventos: {
|
|
165
|
+
emitirUsuariosConectadosAgora: {
|
|
166
|
+
tipo: "emite";
|
|
167
|
+
payload: {};
|
|
168
|
+
response: {
|
|
169
|
+
usuariosConectados: import("../dtos").SOCKET_AcessoUsuario[];
|
|
170
|
+
};
|
|
171
|
+
delivery: "broadcast";
|
|
172
|
+
} & {
|
|
173
|
+
readonly nome: "emitirUsuariosConectadosAgora";
|
|
174
|
+
readonly gateway: "UsuariosConectados";
|
|
175
|
+
readonly fullName: "UsuariosConectados:emitirUsuariosConectadosAgora";
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
readonly UsuariosExistentes: {
|
|
180
|
+
eventos: {};
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
declare const Eventos_EnviaERecebe: {
|
|
184
|
+
readonly Chat: {
|
|
185
|
+
eventos: {
|
|
186
|
+
emitirSalas: {
|
|
187
|
+
tipo: "envia-e-recebe";
|
|
188
|
+
payload: {};
|
|
189
|
+
response: {
|
|
190
|
+
salas: import("../dtos").SalaChatFront[];
|
|
191
|
+
};
|
|
192
|
+
} & {
|
|
193
|
+
readonly nome: "emitirSalas";
|
|
194
|
+
readonly gateway: "Chat";
|
|
195
|
+
readonly fullName: "Chat:emitirSalas";
|
|
196
|
+
};
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
readonly Jogo: {
|
|
200
|
+
eventos: {
|
|
201
|
+
requisicaoDeFechamentoDeSalaAberta: {
|
|
202
|
+
tipo: "envia-e-recebe";
|
|
203
|
+
payload: {
|
|
204
|
+
codigoSalaDeJogo: import("../dtos").SalaDeJogo_Codigo;
|
|
205
|
+
};
|
|
206
|
+
response: {};
|
|
207
|
+
} & {
|
|
208
|
+
readonly nome: "requisicaoDeFechamentoDeSalaAberta";
|
|
209
|
+
readonly gateway: "Jogo";
|
|
210
|
+
readonly fullName: "Jogo:requisicaoDeFechamentoDeSalaAberta";
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
};
|
|
214
|
+
readonly ExecucaoDeJogo: {
|
|
215
|
+
eventos: {};
|
|
216
|
+
};
|
|
217
|
+
readonly UsuariosConectados: {
|
|
218
|
+
eventos: {};
|
|
219
|
+
};
|
|
220
|
+
readonly UsuariosExistentes: {
|
|
221
|
+
eventos: {
|
|
222
|
+
obterTodos: {
|
|
223
|
+
tipo: "envia-e-recebe";
|
|
224
|
+
payload: {};
|
|
225
|
+
response: {
|
|
226
|
+
usuariosExistentes: import("../dtos").SOCKET_UsuarioExistente[];
|
|
227
|
+
};
|
|
228
|
+
} & {
|
|
229
|
+
readonly nome: "obterTodos";
|
|
230
|
+
readonly gateway: "UsuariosExistentes";
|
|
231
|
+
readonly fullName: "UsuariosExistentes:obterTodos";
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
export { EventoTipoLiteral, Eventos_Emite, Eventos_Envia, Eventos_EnviaERecebe, FiltraEventosPorTipo, Gateways, criarEventosFiltrados };
|
package/dist/ws/index.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// AUTO-GENERATED FILE - DO NOT EDIT
|
|
2
|
+
// Contratos WebSocket
|
|
3
|
+
import { EventosWebSocket } from '../dtos';
|
|
4
|
+
function criarEventosFiltrados(tipo) {
|
|
5
|
+
const result = {};
|
|
6
|
+
for (const [gatewayName, gatewayDef] of Object.entries(EventosWebSocket.gateways)) {
|
|
7
|
+
const eventosFiltrados = Object.entries(gatewayDef).filter(([, evento]) => evento.tipo === tipo).map(([eventName, evento]) => [eventName, {
|
|
8
|
+
...evento,
|
|
9
|
+
nome: eventName,
|
|
10
|
+
gateway: gatewayName,
|
|
11
|
+
fullName: `${gatewayName}:${eventName}`,
|
|
12
|
+
}]);
|
|
13
|
+
result[gatewayName] = { eventos: Object.fromEntries(eventosFiltrados) };
|
|
14
|
+
}
|
|
15
|
+
return result;
|
|
16
|
+
}
|
|
17
|
+
const Eventos_Envia = criarEventosFiltrados('envia');
|
|
18
|
+
const Eventos_Emite = criarEventosFiltrados('emite');
|
|
19
|
+
const Eventos_EnviaERecebe = criarEventosFiltrados('envia-e-recebe');
|
|
20
|
+
export { Eventos_Emite, Eventos_Envia, Eventos_EnviaERecebe, criarEventosFiltrados };
|
package/package.json
CHANGED
|
@@ -1,12 +1,66 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "types-nora-api",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.472",
|
|
4
4
|
"description": "Tipagem da Nora-Api compartilhada com o universodomedo.com",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"default": "./dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./classes": {
|
|
14
|
+
"types": "./dist/classes.d.ts",
|
|
15
|
+
"default": "./dist/classes.js"
|
|
16
|
+
},
|
|
17
|
+
"./shared": {
|
|
18
|
+
"types": "./dist/shared/index.d.ts",
|
|
19
|
+
"default": "./dist/shared/index.js"
|
|
20
|
+
},
|
|
21
|
+
"./dominio": {
|
|
22
|
+
"types": "./dist/dominio/index.d.ts",
|
|
23
|
+
"default": "./dist/dominio/index.js"
|
|
24
|
+
},
|
|
25
|
+
"./dtos": {
|
|
26
|
+
"types": "./dist/dtos/index.d.ts",
|
|
27
|
+
"default": "./dist/dtos/index.js"
|
|
28
|
+
},
|
|
29
|
+
"./api": {
|
|
30
|
+
"types": "./dist/api/index.d.ts",
|
|
31
|
+
"default": "./dist/api/index.js"
|
|
32
|
+
},
|
|
33
|
+
"./api/rest": {
|
|
34
|
+
"types": "./dist/api/rest/index.d.ts",
|
|
35
|
+
"default": "./dist/api/rest/index.js"
|
|
36
|
+
},
|
|
37
|
+
"./api/graphql": {
|
|
38
|
+
"types": "./dist/api/graphql/index.d.ts",
|
|
39
|
+
"default": "./dist/api/graphql/index.js"
|
|
40
|
+
},
|
|
41
|
+
"./ws": {
|
|
42
|
+
"types": "./dist/ws/index.d.ts",
|
|
43
|
+
"default": "./dist/ws/index.js"
|
|
44
|
+
},
|
|
45
|
+
"./paginas": {
|
|
46
|
+
"types": "./dist/paginas/index.d.ts",
|
|
47
|
+
"default": "./dist/paginas/index.js"
|
|
48
|
+
},
|
|
49
|
+
"./menus": {
|
|
50
|
+
"types": "./dist/menus/index.d.ts",
|
|
51
|
+
"default": "./dist/menus/index.js"
|
|
52
|
+
},
|
|
53
|
+
"./acessos": {
|
|
54
|
+
"types": "./dist/acessos/index.d.ts",
|
|
55
|
+
"default": "./dist/acessos/index.js"
|
|
56
|
+
},
|
|
57
|
+
"./uploads": {
|
|
58
|
+
"types": "./dist/uploads/index.d.ts",
|
|
59
|
+
"default": "./dist/uploads/index.js"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
8
62
|
"scripts": {
|
|
9
|
-
"build:types": "tsx --tsconfig tsconfig.json scripts/
|
|
63
|
+
"build:types": "tsx --tsconfig tsconfig.json scripts/gerarTypesNoraApi.ts",
|
|
10
64
|
"build": "npm run build:types && tsc",
|
|
11
65
|
"prepare": "npm run build"
|
|
12
66
|
},
|