termo_core 0.1.13 → 0.1.15
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/agenda/index.d.ts +6 -0
- package/dist/agenda/index.js +7 -0
- package/dist/agenda/rotas.d.ts +281 -0
- package/dist/agenda/rotas.js +387 -0
- package/dist/agenda/tipos.d.ts +325 -0
- package/dist/agenda/tipos.js +2 -0
- package/dist/auth/rotas.d.ts +7 -1
- package/dist/auth/rotas.js +1 -1
- package/dist/base/servicos.d.ts +3 -0
- package/dist/base/servicos.js +27 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/meet/index.d.ts +6 -0
- package/dist/meet/index.js +7 -0
- package/dist/meet/rotas.d.ts +119 -0
- package/dist/meet/rotas.js +152 -0
- package/dist/meet/tipos.d.ts +122 -0
- package/dist/meet/tipos.js +2 -0
- package/dist/portal/rotas.d.ts +64 -0
- package/dist/portal/rotas.js +68 -0
- package/dist/portal/tipos.d.ts +57 -0
- package/dist/talk/index.d.ts +6 -0
- package/dist/talk/index.js +7 -0
- package/dist/talk/rotas.d.ts +235 -0
- package/dist/talk/rotas.js +386 -0
- package/dist/talk/tipos.d.ts +260 -0
- package/dist/talk/tipos.js +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Os dados do anexo que vão junto da mensagem.
|
|
3
|
+
*/
|
|
4
|
+
export interface Anexo {
|
|
5
|
+
id: string;
|
|
6
|
+
nome: string;
|
|
7
|
+
/**
|
|
8
|
+
* Em bytes.
|
|
9
|
+
*/
|
|
10
|
+
tamanho: number;
|
|
11
|
+
/**
|
|
12
|
+
* Tipo MIME (`image/png`, `application/pdf`...).
|
|
13
|
+
*/
|
|
14
|
+
tipo: string;
|
|
15
|
+
}
|
|
16
|
+
export interface AnexoComEndereco {
|
|
17
|
+
id: string;
|
|
18
|
+
nome: string;
|
|
19
|
+
tamanho: number;
|
|
20
|
+
tipo: string;
|
|
21
|
+
/**
|
|
22
|
+
* Link assinado do TermoBucket; vale 15 minutos.
|
|
23
|
+
*/
|
|
24
|
+
url_download: string;
|
|
25
|
+
}
|
|
26
|
+
export interface AnexoEnviar {
|
|
27
|
+
/**
|
|
28
|
+
* O arquivo em base64 (até 20 MB depois de decodificado).
|
|
29
|
+
*/
|
|
30
|
+
conteudo: string;
|
|
31
|
+
/**
|
|
32
|
+
* Nome do arquivo, com a extensão.
|
|
33
|
+
*/
|
|
34
|
+
nome: string;
|
|
35
|
+
/**
|
|
36
|
+
* Tipo MIME.
|
|
37
|
+
*/
|
|
38
|
+
tipo: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Colaborador para escolher numa conversa (e para o cartão da pessoa): nome, e-mail, telefone, setor e cargo.
|
|
42
|
+
*/
|
|
43
|
+
export interface ColaboradorPessoa {
|
|
44
|
+
cargo?: string | null;
|
|
45
|
+
email: string;
|
|
46
|
+
id: string;
|
|
47
|
+
nome: string;
|
|
48
|
+
setor?: string | null;
|
|
49
|
+
telefone?: string | null;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Resumo do colaborador (id e nome) para mostrar autoria.
|
|
53
|
+
*/
|
|
54
|
+
export interface ColaboradorResumo {
|
|
55
|
+
id: string;
|
|
56
|
+
nome: string;
|
|
57
|
+
}
|
|
58
|
+
export interface Conversa {
|
|
59
|
+
criado_em: string;
|
|
60
|
+
criado_por: string;
|
|
61
|
+
descricao?: string | null;
|
|
62
|
+
eu?: MeuEstado | null;
|
|
63
|
+
id: string;
|
|
64
|
+
/**
|
|
65
|
+
* Mensagens que citam quem pediu (ou `@todos`) depois da última lida, inclusive nas threads.
|
|
66
|
+
*/
|
|
67
|
+
mencoes: number;
|
|
68
|
+
/**
|
|
69
|
+
* Mensagens principais (fora das threads) de outras pessoas depois da última lida.
|
|
70
|
+
*/
|
|
71
|
+
nao_lidas: number;
|
|
72
|
+
nome?: string | null;
|
|
73
|
+
/**
|
|
74
|
+
* Na conversa direta e no grupo vêm todos; no espaço, só na leitura pelo id.
|
|
75
|
+
*/
|
|
76
|
+
participantes: Array<Participante>;
|
|
77
|
+
/**
|
|
78
|
+
* `DIRETA`, `GRUPO` ou `ESPACO`.
|
|
79
|
+
*/
|
|
80
|
+
tipo: string;
|
|
81
|
+
total_participantes: number;
|
|
82
|
+
ultima_atividade_em: string;
|
|
83
|
+
ultima_mensagem?: UltimaMensagem | null;
|
|
84
|
+
/**
|
|
85
|
+
* Só no espaço: `PUBLICO` (qualquer colaborador acha e entra) ou `PRIVADO` (só por convite).
|
|
86
|
+
*/
|
|
87
|
+
visibilidade?: string | null;
|
|
88
|
+
}
|
|
89
|
+
export interface ConversaAtualizar {
|
|
90
|
+
descricao?: string | null;
|
|
91
|
+
nome?: string | null;
|
|
92
|
+
visibilidade?: string | null;
|
|
93
|
+
}
|
|
94
|
+
export interface ConversaCriar {
|
|
95
|
+
descricao?: string | null;
|
|
96
|
+
/**
|
|
97
|
+
* Obrigatório no espaço; opcional no grupo; ignorado na conversa direta.
|
|
98
|
+
*/
|
|
99
|
+
nome?: string | null;
|
|
100
|
+
/**
|
|
101
|
+
* As outras pessoas (quem cria entra sozinho). Na direta, exatamente uma.
|
|
102
|
+
*/
|
|
103
|
+
participante_ids?: Array<string>;
|
|
104
|
+
/**
|
|
105
|
+
* `DIRETA`, `GRUPO` ou `ESPACO`.
|
|
106
|
+
*/
|
|
107
|
+
tipo: string;
|
|
108
|
+
/**
|
|
109
|
+
* Só no espaço: `PUBLICO` (padrão) ou `PRIVADO`.
|
|
110
|
+
*/
|
|
111
|
+
visibilidade?: string | null;
|
|
112
|
+
}
|
|
113
|
+
export interface EspacoPublico {
|
|
114
|
+
descricao?: string | null;
|
|
115
|
+
id: string;
|
|
116
|
+
nome: string;
|
|
117
|
+
total_participantes: number;
|
|
118
|
+
ultima_atividade_em: string;
|
|
119
|
+
}
|
|
120
|
+
export interface LeituraMarcar {
|
|
121
|
+
/**
|
|
122
|
+
* A última mensagem vista; a leitura nunca volta para trás.
|
|
123
|
+
*/
|
|
124
|
+
mensagem_id: string;
|
|
125
|
+
}
|
|
126
|
+
export interface Mensagem {
|
|
127
|
+
/**
|
|
128
|
+
* Arquivos e imagens; o link para baixar vem de `GET /anexo/{id}`.
|
|
129
|
+
*/
|
|
130
|
+
anexos: Array<Anexo>;
|
|
131
|
+
autor: ColaboradorResumo;
|
|
132
|
+
conversa_id: string;
|
|
133
|
+
criado_em: string;
|
|
134
|
+
editado_em?: string | null;
|
|
135
|
+
/**
|
|
136
|
+
* Mensagem principal excluída que ainda tem respostas: fica no lugar, sem texto.
|
|
137
|
+
*/
|
|
138
|
+
excluida: boolean;
|
|
139
|
+
id: string;
|
|
140
|
+
mencao_todos: boolean;
|
|
141
|
+
mencoes: Array<string>;
|
|
142
|
+
reacoes: Array<Reacao>;
|
|
143
|
+
respostas: number;
|
|
144
|
+
seguidores: Array<string>;
|
|
145
|
+
/**
|
|
146
|
+
* Texto com formatação simples (`*negrito*`, `_itálico_`, `~riscado~`, `` `código` ``); vazio se excluída.
|
|
147
|
+
*/
|
|
148
|
+
texto: string;
|
|
149
|
+
/**
|
|
150
|
+
* A mensagem principal da thread; vazio na mensagem principal.
|
|
151
|
+
*/
|
|
152
|
+
thread_id?: string | null;
|
|
153
|
+
ultima_resposta_em?: string | null;
|
|
154
|
+
}
|
|
155
|
+
export interface MensagemAtualizar {
|
|
156
|
+
mencao_todos?: boolean | null;
|
|
157
|
+
mencoes?: Array<string> | null;
|
|
158
|
+
texto: string;
|
|
159
|
+
}
|
|
160
|
+
export interface MensagemCriar {
|
|
161
|
+
/**
|
|
162
|
+
* Anexos já enviados em `POST /conversa/{id}/anexo` (até 10).
|
|
163
|
+
*/
|
|
164
|
+
anexo_ids?: Array<string>;
|
|
165
|
+
/**
|
|
166
|
+
* Citou `@todos`.
|
|
167
|
+
*/
|
|
168
|
+
mencao_todos?: boolean;
|
|
169
|
+
/**
|
|
170
|
+
* Quem foi citado com `@nome` (precisa estar na conversa).
|
|
171
|
+
*/
|
|
172
|
+
mencoes?: Array<string>;
|
|
173
|
+
/**
|
|
174
|
+
* Pode ficar vazio quando vão anexos.
|
|
175
|
+
*/
|
|
176
|
+
texto?: string;
|
|
177
|
+
/**
|
|
178
|
+
* Responde na thread desta mensagem principal.
|
|
179
|
+
*/
|
|
180
|
+
thread_id?: string | null;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* O estado de quem pediu numa conversa.
|
|
184
|
+
*/
|
|
185
|
+
export interface MeuEstado {
|
|
186
|
+
entrou_em: string;
|
|
187
|
+
fixado: boolean;
|
|
188
|
+
papel: string;
|
|
189
|
+
silenciado: boolean;
|
|
190
|
+
ultima_lida_id?: string | null;
|
|
191
|
+
}
|
|
192
|
+
export interface PaginaDeMensagens {
|
|
193
|
+
/**
|
|
194
|
+
* Da mais antiga para a mais recente.
|
|
195
|
+
*/
|
|
196
|
+
itens: Array<Mensagem>;
|
|
197
|
+
raiz?: Mensagem | null;
|
|
198
|
+
/**
|
|
199
|
+
* Há mensagens mais antigas que as desta página.
|
|
200
|
+
*/
|
|
201
|
+
tem_mais: boolean;
|
|
202
|
+
}
|
|
203
|
+
export interface Participante {
|
|
204
|
+
entrou_em: string;
|
|
205
|
+
id: string;
|
|
206
|
+
nome: string;
|
|
207
|
+
papel: string;
|
|
208
|
+
}
|
|
209
|
+
export interface ParticipanteAtualizar {
|
|
210
|
+
/**
|
|
211
|
+
* `GESTOR` ou `MEMBRO`.
|
|
212
|
+
*/
|
|
213
|
+
papel: string;
|
|
214
|
+
}
|
|
215
|
+
export interface ParticipantesAdicionar {
|
|
216
|
+
colaborador_ids: Array<string>;
|
|
217
|
+
}
|
|
218
|
+
export interface PreferenciasAtualizar {
|
|
219
|
+
fixado?: boolean | null;
|
|
220
|
+
silenciado?: boolean | null;
|
|
221
|
+
}
|
|
222
|
+
export interface Reacao {
|
|
223
|
+
colaborador_ids: Array<string>;
|
|
224
|
+
emoji: string;
|
|
225
|
+
}
|
|
226
|
+
export interface ReacaoAlternar {
|
|
227
|
+
/**
|
|
228
|
+
* O emoji; reagir de novo com o mesmo tira a reação.
|
|
229
|
+
*/
|
|
230
|
+
emoji: string;
|
|
231
|
+
}
|
|
232
|
+
export interface RespostaDeErro {
|
|
233
|
+
erro: string;
|
|
234
|
+
}
|
|
235
|
+
export interface ReuniaoIniciada {
|
|
236
|
+
/**
|
|
237
|
+
* Código da sala no TermoMeet (`abc-defg-hij`).
|
|
238
|
+
*/
|
|
239
|
+
codigo: string;
|
|
240
|
+
/**
|
|
241
|
+
* Link da sala no TermoMeet, o mesmo que foi na mensagem.
|
|
242
|
+
*/
|
|
243
|
+
link: string;
|
|
244
|
+
/**
|
|
245
|
+
* A mensagem com o link que foi para a conversa.
|
|
246
|
+
*/
|
|
247
|
+
mensagem: Mensagem;
|
|
248
|
+
}
|
|
249
|
+
export interface ReuniaoIniciar {
|
|
250
|
+
/**
|
|
251
|
+
* `REUNIAO` (padrão, reunião instantânea) ou `CHAMADA` (liga para quem está na conversa).
|
|
252
|
+
*/
|
|
253
|
+
tipo?: string | null;
|
|
254
|
+
}
|
|
255
|
+
export interface UltimaMensagem {
|
|
256
|
+
autor: ColaboradorResumo;
|
|
257
|
+
criado_em: string;
|
|
258
|
+
id: string;
|
|
259
|
+
texto: string;
|
|
260
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "termo_core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.15",
|
|
4
4
|
"description": "Todos os clientes da Termotubos num pacote só: um módulo por serviço e cada rota da API como uma função com fetch, com o endereço resolvido pelo ambiente atual.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "TI Termotubos <ti@termotubos.com.br>",
|