@oondemand/oon-core-front 0.5.6 → 0.6.1
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/chunk-32GGDIWB.js +71 -0
- package/dist/chunk-32GGDIWB.js.map +1 -0
- package/dist/chunk-ALZCHGGI.js +19 -0
- package/dist/chunk-ALZCHGGI.js.map +1 -0
- package/dist/chunk-KD7UQF5E.js +103 -0
- package/dist/chunk-KD7UQF5E.js.map +1 -0
- package/dist/chunk-QXKS2WEG.js +2111 -0
- package/dist/chunk-QXKS2WEG.js.map +1 -0
- package/dist/chunk-R7ZBLDC2.js +5429 -0
- package/dist/chunk-R7ZBLDC2.js.map +1 -0
- package/dist/chunk-V6TY7KAL.js +8 -0
- package/dist/chunk-V6TY7KAL.js.map +1 -0
- package/dist/chunk-VC6NTMZS.js +187 -0
- package/dist/chunk-VC6NTMZS.js.map +1 -0
- package/dist/chunk-VJ7YNFF7.js +694 -0
- package/dist/chunk-VJ7YNFF7.js.map +1 -0
- package/dist/hooks-lXMaiLqz.d.ts +89 -0
- package/dist/hooks.d.ts +8 -0
- package/dist/hooks.js +24 -0
- package/dist/hooks.js.map +1 -0
- package/dist/index.d.ts +26 -1187
- package/dist/index.js +63 -10202
- package/dist/index.js.map +1 -1
- package/dist/routing.d.ts +12 -0
- package/dist/routing.js +17 -0
- package/dist/routing.js.map +1 -0
- package/dist/testing.d.ts +8 -0
- package/dist/testing.js +22 -0
- package/dist/testing.js.map +1 -0
- package/dist/theme-Clhoswb3.d.ts +28 -0
- package/dist/theme.d.ts +12 -0
- package/dist/theme.js +14 -0
- package/dist/theme.js.map +1 -0
- package/dist/types-BEVt-nU8.d.ts +666 -0
- package/dist/ui-1Um8gXIZ.d.ts +337 -0
- package/dist/ui.d.ts +5 -0
- package/dist/ui.js +86 -0
- package/dist/ui.js.map +1 -0
- package/package.json +21 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,918 +1,36 @@
|
|
|
1
|
+
import { c as OonAppDefinition, d as OonCoreFrontConfig, C as CollectionViewDef, D as DashboardViewDef, e as DocumentViewDef, f as OonModule } from './types-BEVt-nU8.js';
|
|
2
|
+
export { g as CollectionMode, h as CoreMetadata, i as DashboardWidgetDef, F as FieldKind, j as FieldMeta, L as ListParams, M as ModelSummary, k as OonActionDef, l as OonApiConfig, m as OonAppConfig, n as OonAppKind, o as OonAuthConfig, p as OonAuthMode, q as OonBlockDef, r as OonColumnDef, s as OonComponentRegistry, t as OonError, u as OonFormFieldDef, v as OonLayoutConfig, O as OonMenuItem, b as OonNavigationConfig, w as OonNavigationMode, x as OonPageDef, a as OonRoute, y as OonRuntimeMode, z as OonSchemaVersion, A as OonSecurityConfig, B as OonSystemPages, E as OonTenancyModel, G as OonUiManifest, H as OonUser, I as OonViewDefinition, P as PaginatedResult, J as Pagination, K as PipelineViewDef } from './types-BEVt-nU8.js';
|
|
3
|
+
export { OON_RESERVED_ROUTES, defineOonNavigation, defineOonRoutes } from './routing.js';
|
|
4
|
+
export { a as OonThemeContrast, O as OonThemeDefinition, b as OonThemeDensity, c as createOonTheme, o as oonDefaultTheme } from './theme-Clhoswb3.js';
|
|
5
|
+
export { useOonTheme } from './theme.js';
|
|
6
|
+
import { O as OonPipelineViewDef } from './ui-1Um8gXIZ.js';
|
|
7
|
+
export { C as CoreActions, a as CoreAssistant, b as CoreCards, c as CoreCollection, d as CoreCurrency, e as CoreDashboard, f as CoreDataGrid, g as CoreDocument, h as CoreEmptyState, i as CoreField, j as CoreForm, k as CoreLoadingState, l as CorePage, m as CorePageHeader, n as CorePipeline, o as CoreRelationField, p as CoreToolbar, q as CoreTransactionalEmail, r as CoreUsersAccess, s as OonPipelineActionDef, t as OonPipelineActionGroup, u as OonPipelineActionTone, v as OonPipelineDefaultActionsConfig, w as OonPipelineDefaultActionsDef, x as OonPipelineTicketModalConfig } from './ui-1Um8gXIZ.js';
|
|
8
|
+
export { O as OonTenantContextValue, c as can, u as useCoreMetadata, a as useModelSchema, b as useOonApi, d as useOonAuth, e as useOonResource, f as useOonTenant } from './hooks-lXMaiLqz.js';
|
|
1
9
|
import * as react from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
10
|
+
import { ReactNode } from 'react';
|
|
11
|
+
import '@chakra-ui/react';
|
|
12
|
+
import '@tanstack/react-query';
|
|
13
|
+
import 'axios';
|
|
5
14
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
name: string;
|
|
11
|
-
kind: FieldKind;
|
|
12
|
-
label?: string;
|
|
13
|
-
searchable?: boolean;
|
|
14
|
-
required?: boolean;
|
|
15
|
-
/** model referenciada quando kind === "ref". */
|
|
16
|
-
ref?: string;
|
|
17
|
-
/** valores possíveis quando kind === "enum". */
|
|
18
|
-
options?: string[];
|
|
19
|
-
/** moeda base quando kind === "currencyConverted". */
|
|
20
|
-
base?: string;
|
|
21
|
-
}
|
|
22
|
-
/** Resumo de uma model (resposta de /core/models e /core/models/:name). */
|
|
23
|
-
interface ModelSummary {
|
|
24
|
-
name: string;
|
|
25
|
-
singular: string;
|
|
26
|
-
/** basePath em que o CRUD está montado no back (ex.: "/cotacoes"). */
|
|
27
|
-
basePath: string;
|
|
28
|
-
crud: boolean;
|
|
29
|
-
roles: {
|
|
30
|
-
read?: string[];
|
|
31
|
-
write?: string[];
|
|
32
|
-
};
|
|
33
|
-
fields: FieldMeta[];
|
|
34
|
-
searchable: string[];
|
|
35
|
-
}
|
|
36
|
-
interface MenuMeta {
|
|
37
|
-
label: string;
|
|
38
|
-
href?: string;
|
|
39
|
-
icon?: string;
|
|
40
|
-
section?: string;
|
|
41
|
-
order?: number;
|
|
42
|
-
permissions?: string[];
|
|
43
|
-
capabilities?: string[];
|
|
44
|
-
children?: OonMenuItem[];
|
|
45
|
-
badge?: string | number;
|
|
46
|
-
external?: boolean;
|
|
47
|
-
hidden?: boolean;
|
|
48
|
-
action?: string;
|
|
49
|
-
renderer?: string;
|
|
50
|
-
}
|
|
51
|
-
/** Resposta completa de GET /core/metadata. */
|
|
52
|
-
interface CoreMetadata {
|
|
53
|
-
service: {
|
|
54
|
-
name: string;
|
|
55
|
-
version: string;
|
|
56
|
-
};
|
|
57
|
-
models: ModelSummary[];
|
|
58
|
-
collections: unknown[];
|
|
59
|
-
documents: unknown[];
|
|
60
|
-
pipelines: unknown[];
|
|
61
|
-
integrations: unknown[];
|
|
62
|
-
features: unknown[];
|
|
63
|
-
menus: MenuMeta[];
|
|
64
|
-
}
|
|
65
|
-
interface Pagination {
|
|
66
|
-
currentPage: number;
|
|
67
|
-
totalPages: number;
|
|
68
|
-
totalItems: number;
|
|
69
|
-
itemsPerPage: number;
|
|
70
|
-
}
|
|
71
|
-
interface PaginatedResult<T = Record<string, unknown>> {
|
|
72
|
-
results: T[];
|
|
73
|
-
pagination: Pagination;
|
|
74
|
-
}
|
|
75
|
-
interface ListParams {
|
|
76
|
-
pageIndex?: number;
|
|
77
|
-
pageSize?: number;
|
|
78
|
-
searchTerm?: string;
|
|
79
|
-
/** ex.: "nome.asc" | "criadoEm.desc" */
|
|
80
|
-
sort?: string;
|
|
81
|
-
/** filtros adicionais viram query string. */
|
|
82
|
-
[filter: string]: unknown;
|
|
83
|
-
}
|
|
84
|
-
/** Erro normalizado (errorNormalizer). */
|
|
85
|
-
interface OonError {
|
|
86
|
-
code: string;
|
|
87
|
-
message: string;
|
|
88
|
-
status?: number;
|
|
89
|
-
details?: unknown;
|
|
90
|
-
requestId?: string;
|
|
91
|
-
}
|
|
92
|
-
/** Origem de auditoria enviada nos headers x-oon-* das mutações. */
|
|
93
|
-
type AuditOrigin = "datagrid" | "form" | "workflow" | "assistant" | "import" | "integration";
|
|
94
|
-
interface AuditContext {
|
|
95
|
-
origem?: AuditOrigin;
|
|
96
|
-
module?: string;
|
|
97
|
-
entity?: string;
|
|
98
|
-
}
|
|
99
|
-
interface OonUser {
|
|
100
|
-
tipo: string;
|
|
101
|
-
nome: string;
|
|
102
|
-
email: string;
|
|
103
|
-
capabilities?: string[];
|
|
104
|
-
permissoes?: {
|
|
105
|
-
capabilities?: string[];
|
|
106
|
-
[extra: string]: unknown;
|
|
107
|
-
};
|
|
108
|
-
aplicativo?: {
|
|
109
|
-
capabilities?: string[];
|
|
110
|
-
permissoes?: {
|
|
111
|
-
capabilities?: string[];
|
|
112
|
-
[extra: string]: unknown;
|
|
113
|
-
};
|
|
114
|
-
[extra: string]: unknown;
|
|
115
|
-
};
|
|
116
|
-
[extra: string]: unknown;
|
|
117
|
-
}
|
|
118
|
-
type OonAppKind = "root-central" | "member-central" | "portal-cockpit";
|
|
119
|
-
type OonTenancyModel = "none" | "single_tenant" | "multi_tenant";
|
|
120
|
-
interface OonAppConfig {
|
|
121
|
-
id: string;
|
|
122
|
-
name: string;
|
|
123
|
-
title?: string;
|
|
124
|
-
logo?: string;
|
|
125
|
-
favicon?: string;
|
|
126
|
-
version?: string;
|
|
127
|
-
/**
|
|
128
|
-
* Perfil arquitetural da aplicação no Ecossistema Oon.
|
|
129
|
-
* - root-central: Central de Ativações.
|
|
130
|
-
* - member-central: Central publicada para tenant/licença/ambiente.
|
|
131
|
-
* - portal-cockpit: Portal/Cockpit como Meus Apps.
|
|
132
|
-
*/
|
|
133
|
-
kind?: OonAppKind;
|
|
134
|
-
/** Define se o runtime pode selecionar e persistir tenant para este App. */
|
|
135
|
-
tenancyModel?: OonTenancyModel;
|
|
136
|
-
capabilities?: string[];
|
|
137
|
-
capabilitySettings?: Record<string, unknown>;
|
|
138
|
-
}
|
|
139
|
-
interface OonApiConfig {
|
|
140
|
-
baseUrl: string;
|
|
141
|
-
assistantBaseUrl?: string;
|
|
142
|
-
meusAppsUrl?: string;
|
|
143
|
-
/** Control Plane público usado somente por cadastro e confirmação. */
|
|
144
|
-
onboardingBaseUrl?: string;
|
|
145
|
-
/** Prefixo de versão concatenado às chamadas. Default: "". */
|
|
146
|
-
versionPrefix?: string;
|
|
147
|
-
timeout?: number;
|
|
148
|
-
}
|
|
149
|
-
type OonAuthMode = "bearer" | "cookie" | "external-sso" | "central-instance" | "central-client";
|
|
150
|
-
type OonRuntimeMode = "platform" | "local";
|
|
151
|
-
interface OonAuthConfig {
|
|
152
|
-
mode?: OonAuthMode;
|
|
153
|
-
/** URL de login externo (Meus Apps) para redirect quando sem token. */
|
|
154
|
-
loginUrl?: string;
|
|
155
|
-
/** Nome do query param que carrega o token na volta do SSO. Default: "code". */
|
|
156
|
-
tokenParam?: string;
|
|
157
|
-
/**
|
|
158
|
-
* Token usado somente no desenvolvimento local. Quando informado, tem
|
|
159
|
-
* prioridade sobre um token antigo do storage, é persistido e validado no
|
|
160
|
-
* backend normalmente antes de qualquer redirecionamento.
|
|
161
|
-
*/
|
|
162
|
-
devToken?: string;
|
|
163
|
-
}
|
|
164
|
-
interface OonSecurityConfig {
|
|
165
|
-
enableRouteGuard?: boolean;
|
|
166
|
-
enablePermissionGate?: boolean;
|
|
167
|
-
redactAssistantContext?: boolean;
|
|
168
|
-
disableConsoleInProduction?: boolean;
|
|
169
|
-
}
|
|
170
|
-
interface OonCoreFrontConfig {
|
|
171
|
-
app: OonAppConfig;
|
|
172
|
-
api: OonApiConfig;
|
|
173
|
-
/** Runtime local desconectado ou execução integrada à plataforma. */
|
|
174
|
-
runtimeMode?: OonRuntimeMode;
|
|
175
|
-
auth?: OonAuthConfig;
|
|
176
|
-
theme?: Record<string, unknown>;
|
|
177
|
-
modules?: OonModule[];
|
|
178
|
-
/**
|
|
179
|
-
* Declaração de UI no estilo `central.ui.json` (Seção 9). Atalho para
|
|
180
|
-
* registrar coleções/documentos/esteiras sem escrever um módulo inteiro.
|
|
181
|
-
*/
|
|
182
|
-
ui?: OonUiManifest;
|
|
183
|
-
layout?: OonLayoutConfig;
|
|
184
|
-
registry?: OonComponentRegistry;
|
|
185
|
-
security?: OonSecurityConfig;
|
|
186
|
-
/** Elemento DOM onde montar. Default: #root. */
|
|
187
|
-
rootElementId?: string;
|
|
188
|
-
}
|
|
189
|
-
interface OonRoute {
|
|
190
|
-
path: string;
|
|
191
|
-
element: ReactNode;
|
|
192
|
-
/** rota pública não passa pelo RouteGuard. */
|
|
193
|
-
public?: boolean;
|
|
194
|
-
permissions?: string[];
|
|
195
|
-
capabilities?: string[];
|
|
196
|
-
}
|
|
197
|
-
interface OonMenuItem {
|
|
198
|
-
label: string;
|
|
199
|
-
href: string;
|
|
200
|
-
icon?: ReactNode;
|
|
201
|
-
section?: string;
|
|
202
|
-
order?: number;
|
|
203
|
-
permissions?: string[];
|
|
204
|
-
capabilities?: string[];
|
|
205
|
-
children?: OonMenuItem[];
|
|
206
|
-
badge?: string | number;
|
|
207
|
-
external?: boolean;
|
|
208
|
-
hidden?: boolean;
|
|
209
|
-
action?: string;
|
|
210
|
-
renderer?: string;
|
|
211
|
-
}
|
|
212
|
-
type OonSchemaVersion = 1 | 2;
|
|
213
|
-
type OonSlotConfig = "core" | "none" | `custom:${string}`;
|
|
214
|
-
interface OonLayoutConfig {
|
|
215
|
-
shell?: "default" | "portal" | "content-only" | `custom:${string}`;
|
|
216
|
-
sidebar?: OonSlotConfig;
|
|
217
|
-
topbar?: OonSlotConfig;
|
|
218
|
-
header?: "none" | `custom:${string}`;
|
|
219
|
-
footer?: "core" | "none" | `custom:${string}`;
|
|
220
|
-
assistant?: "core" | "none" | `custom:${string}`;
|
|
221
|
-
main?: "core";
|
|
222
|
-
}
|
|
223
|
-
type OonRendererComponent<TProps = Record<string, unknown>> = ComponentType<TProps>;
|
|
224
|
-
interface OonComponentRegistry {
|
|
225
|
-
layoutSlots?: Record<string, OonRendererComponent<any>>;
|
|
226
|
-
fieldRenderers?: Record<string, OonRendererComponent<any>>;
|
|
227
|
-
cellRenderers?: Record<string, OonRendererComponent<any>>;
|
|
228
|
-
cardRenderers?: Record<string, OonRendererComponent<any>>;
|
|
229
|
-
actionRenderers?: Record<string, OonRendererComponent<any>>;
|
|
230
|
-
pageComponents?: Record<string, OonRendererComponent<any>>;
|
|
231
|
-
menuRenderers?: Record<string, OonRendererComponent<any>>;
|
|
232
|
-
}
|
|
233
|
-
type OonNavigationMode = "auto" | "manual" | "mixed";
|
|
234
|
-
interface OonNavigationConfig {
|
|
235
|
-
mode?: OonNavigationMode;
|
|
236
|
-
items?: OonMenuItem[];
|
|
237
|
-
}
|
|
238
|
-
interface OonModule {
|
|
239
|
-
id: string;
|
|
240
|
-
label: string;
|
|
241
|
-
version?: string;
|
|
242
|
-
routes?: OonRoute[];
|
|
243
|
-
menu?: OonMenuItem[];
|
|
244
|
-
/** views declarativas que o Core transforma em rota + menu. */
|
|
245
|
-
views?: OonViewDefinition[];
|
|
246
|
-
}
|
|
247
|
-
type CollectionMode = "full" | "minimal" | "dynamic";
|
|
248
|
-
type OonValueFormat = "text" | "number" | "currency" | "percent" | "date" | "datetime" | "badge";
|
|
249
|
-
interface OonColumnDef {
|
|
250
|
-
field: string;
|
|
251
|
-
label?: string;
|
|
252
|
-
/** kind sobrescreve o inferido da metadata. */
|
|
253
|
-
kind?: FieldKind;
|
|
254
|
-
/** Formato de apresentação; datetime preserva data e hora no locale do usuário. */
|
|
255
|
-
format?: OonValueFormat;
|
|
256
|
-
sortable?: boolean;
|
|
257
|
-
width?: number;
|
|
258
|
-
renderer?: string;
|
|
259
|
-
permissions?: string[];
|
|
260
|
-
capabilities?: string[];
|
|
261
|
-
}
|
|
262
|
-
type OonFormFieldWidget = "default" | "checkbox";
|
|
263
|
-
interface OonSelectOption {
|
|
264
|
-
value: string;
|
|
265
|
-
label: string;
|
|
266
|
-
description?: string;
|
|
267
|
-
}
|
|
268
|
-
interface OonFormFieldDef {
|
|
269
|
-
field: string;
|
|
270
|
-
label?: string;
|
|
271
|
-
kind?: FieldKind;
|
|
272
|
-
required?: boolean;
|
|
273
|
-
options?: Array<string | OonSelectOption>;
|
|
274
|
-
/** Endpoint de opções dependente dos valores atuais do formulário. */
|
|
275
|
-
optionsEndpoint?: string;
|
|
276
|
-
/** Caminho da lista na resposta do endpoint. Default: "options". */
|
|
277
|
-
optionsResponsePath?: string;
|
|
278
|
-
/** Campos usados como value/label/descrição em cada item remoto. */
|
|
279
|
-
optionsValueField?: string;
|
|
280
|
-
optionsLabelField?: string;
|
|
281
|
-
optionsDescriptionField?: string;
|
|
282
|
-
/** Caminho booleano que informa se a seleção pode ser alterada. */
|
|
283
|
-
optionsEditablePath?: string;
|
|
284
|
-
/** Campos do formulário que invalidam/recarregam as opções. */
|
|
285
|
-
optionsDependsOn?: string[];
|
|
286
|
-
/** Opções seguras usadas quando o endpoint falha ou retorna lista vazia. */
|
|
287
|
-
fallbackOptions?: Array<string | OonSelectOption>;
|
|
288
|
-
/** Bloqueia a seleção enquanto usa fallback. Default: true. */
|
|
289
|
-
readonlyOnFallback?: boolean;
|
|
290
|
-
/** Texto auxiliar exibido quando o fallback está ativo. */
|
|
291
|
-
optionsUnavailableMessage?: string;
|
|
292
|
-
readonly?: boolean;
|
|
293
|
-
/** model relacionada quando kind === "ref". */
|
|
294
|
-
ref?: string;
|
|
295
|
-
renderer?: string;
|
|
296
|
-
/** Controle visual pontual sem substituir a página/formulário inteiro. */
|
|
297
|
-
widget?: OonFormFieldWidget;
|
|
298
|
-
/** Valor persistido quando um checkbox está marcado. Default: true. */
|
|
299
|
-
checkedValue?: string | number | boolean;
|
|
300
|
-
/** Valor persistido quando um checkbox está desmarcado. Default: false. */
|
|
301
|
-
uncheckedValue?: string | number | boolean;
|
|
302
|
-
/** Agrupa campos relacionados em um bloco visual comum. */
|
|
303
|
-
group?: string;
|
|
304
|
-
/** Rótulo exibido uma vez acima do grupo. Default: group. */
|
|
305
|
-
groupLabel?: string;
|
|
306
|
-
groupDescription?: string;
|
|
307
|
-
/** Exibe controles do mesmo grupo na mesma linha quando houver espaço. */
|
|
308
|
-
inline?: boolean;
|
|
309
|
-
permissions?: string[];
|
|
310
|
-
capabilities?: string[];
|
|
311
|
-
}
|
|
312
|
-
/** Definição de uma coleção nas três formas da Seção 4.4. */
|
|
313
|
-
interface OonActionDef {
|
|
314
|
-
id: string;
|
|
315
|
-
label?: string;
|
|
316
|
-
renderer?: string;
|
|
317
|
-
permissions?: string[];
|
|
318
|
-
capabilities?: string[];
|
|
319
|
-
action?: string;
|
|
320
|
-
}
|
|
321
|
-
type OonListFilterDef = {
|
|
322
|
-
field: string;
|
|
323
|
-
label?: string;
|
|
324
|
-
type?: "text" | "select" | "date" | "dateRange" | "numberRange" | "boolean" | "ref";
|
|
325
|
-
options?: Array<{
|
|
326
|
-
label: string;
|
|
327
|
-
value: string | number | boolean | null;
|
|
328
|
-
}>;
|
|
329
|
-
defaultValue?: unknown;
|
|
330
|
-
placeholder?: string;
|
|
331
|
-
};
|
|
332
|
-
type OonConditionDef = {
|
|
333
|
-
field: string;
|
|
334
|
-
exists: boolean;
|
|
335
|
-
} | {
|
|
336
|
-
field: string;
|
|
337
|
-
equals: unknown;
|
|
338
|
-
} | {
|
|
339
|
-
field: string;
|
|
340
|
-
notEquals: unknown;
|
|
341
|
-
} | {
|
|
342
|
-
field: string;
|
|
343
|
-
in: unknown[];
|
|
344
|
-
} | {
|
|
345
|
-
field: string;
|
|
346
|
-
gt: number;
|
|
347
|
-
} | {
|
|
348
|
-
field: string;
|
|
349
|
-
gte: number;
|
|
350
|
-
} | {
|
|
351
|
-
field: string;
|
|
352
|
-
lt: number;
|
|
353
|
-
} | {
|
|
354
|
-
field: string;
|
|
355
|
-
lte: number;
|
|
356
|
-
};
|
|
357
|
-
type OonRowActionDef = {
|
|
358
|
-
id?: string;
|
|
359
|
-
label: string;
|
|
360
|
-
icon?: string;
|
|
361
|
-
/** Exibe somente o ícone, preservando label em title e aria-label. */
|
|
362
|
-
iconOnly?: boolean;
|
|
363
|
-
type: "openDetailModal" | "navigate" | "apiAction" | "customAction";
|
|
364
|
-
method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
365
|
-
endpoint?: string;
|
|
366
|
-
href?: string;
|
|
367
|
-
initialTab?: string;
|
|
368
|
-
confirm?: {
|
|
369
|
-
title?: string;
|
|
370
|
-
description?: string;
|
|
371
|
-
};
|
|
372
|
-
disabledWhen?: OonConditionDef;
|
|
373
|
-
hiddenWhen?: OonConditionDef;
|
|
374
|
-
refresh?: Array<"self" | "parent" | "all" | string>;
|
|
375
|
-
roles?: string[];
|
|
376
|
-
permissions?: string[];
|
|
377
|
-
capabilities?: string[];
|
|
378
|
-
renderer?: string;
|
|
379
|
-
};
|
|
380
|
-
type OonCollectionListConfig = {
|
|
381
|
-
filters?: OonListFilterDef[];
|
|
382
|
-
columns?: Array<string | OonColumnDef>;
|
|
383
|
-
rowActions?: OonRowActionDef[];
|
|
384
|
-
/** Permite ocultar ações CRUD nativas quando a Central fornece ações de negócio próprias. */
|
|
385
|
-
builtInActions?: {
|
|
386
|
-
create?: boolean;
|
|
387
|
-
edit?: boolean;
|
|
388
|
-
delete?: boolean;
|
|
389
|
-
};
|
|
390
|
-
};
|
|
391
|
-
type OonRelationDef = {
|
|
392
|
-
model: string;
|
|
393
|
-
foreignKey: string;
|
|
394
|
-
parentKey?: string;
|
|
395
|
-
label?: string;
|
|
396
|
-
};
|
|
397
|
-
type OonRelatedGridColumnDef = OonColumnDef & {
|
|
398
|
-
editable?: boolean;
|
|
399
|
-
readonly?: boolean;
|
|
400
|
-
format?: OonValueFormat;
|
|
401
|
-
editor?: "string" | "number" | "currency" | "date" | "enum" | "select" | "ref" | "boolean" | "textarea";
|
|
402
|
-
hidden?: boolean;
|
|
403
|
-
roles?: string[];
|
|
404
|
-
required?: boolean;
|
|
405
|
-
display?: "badgeExists" | "badge" | string;
|
|
406
|
-
};
|
|
407
|
-
type OonSummaryCardDef = {
|
|
408
|
-
label: string;
|
|
409
|
-
source?: "field" | "relatedCount" | "relatedSum" | "relatedAvg" | "customMetric";
|
|
410
|
-
field?: string;
|
|
411
|
-
relation?: string | OonRelationDef;
|
|
412
|
-
metric?: string;
|
|
413
|
-
format?: OonValueFormat;
|
|
414
|
-
};
|
|
415
|
-
type OonDetailTabDef = {
|
|
416
|
-
id: string;
|
|
417
|
-
label: string;
|
|
418
|
-
type: "summary";
|
|
419
|
-
cards?: OonSummaryCardDef[];
|
|
420
|
-
} | {
|
|
421
|
-
id: string;
|
|
422
|
-
label: string;
|
|
423
|
-
type: "form";
|
|
424
|
-
groups?: Array<{
|
|
425
|
-
label: string;
|
|
426
|
-
description?: string;
|
|
427
|
-
fields: string[];
|
|
428
|
-
columns?: 1 | 2 | 3 | 4;
|
|
429
|
-
}>;
|
|
430
|
-
fields?: string[];
|
|
431
|
-
} | {
|
|
432
|
-
id: string;
|
|
433
|
-
label: string;
|
|
434
|
-
type: "relatedGrid";
|
|
435
|
-
relation: string | OonRelationDef;
|
|
436
|
-
editable?: boolean;
|
|
437
|
-
editMode?: "inline" | "modal" | "drawer";
|
|
438
|
-
columns?: Array<string | OonRelatedGridColumnDef>;
|
|
439
|
-
rowActions?: OonRowActionDef[];
|
|
440
|
-
} | {
|
|
441
|
-
id: string;
|
|
442
|
-
label: string;
|
|
443
|
-
type: "readonlyGrid";
|
|
444
|
-
relation: string | OonRelationDef;
|
|
445
|
-
columns?: Array<string | OonRelatedGridColumnDef>;
|
|
446
|
-
rowActions?: OonRowActionDef[];
|
|
447
|
-
} | {
|
|
448
|
-
id: string;
|
|
449
|
-
label: string;
|
|
450
|
-
type: "customComponent";
|
|
451
|
-
component: string;
|
|
452
|
-
props?: Record<string, unknown>;
|
|
453
|
-
};
|
|
454
|
-
type OonDetailModalConfig = {
|
|
455
|
-
enabled?: boolean;
|
|
456
|
-
titleField?: string;
|
|
457
|
-
size?: "md" | "lg" | "xl" | "full";
|
|
458
|
-
defaultTab?: string;
|
|
459
|
-
tabs: OonDetailTabDef[];
|
|
460
|
-
};
|
|
461
|
-
interface CollectionViewDef {
|
|
462
|
-
type: "collection";
|
|
463
|
-
/** id de rota/menu; default = model em minúsculas. */
|
|
464
|
-
id?: string;
|
|
465
|
-
model: string;
|
|
466
|
-
label?: string;
|
|
467
|
-
path?: string;
|
|
468
|
-
icon?: ReactNode;
|
|
469
|
-
section?: string;
|
|
470
|
-
/** Mantém a rota disponível, mas remove a coleção do menu lateral. */
|
|
471
|
-
hidden?: boolean;
|
|
472
|
-
/** "dynamic" monta tudo a partir de /core/models/:model. */
|
|
473
|
-
mode?: CollectionMode;
|
|
474
|
-
/** modo "full": colunas explícitas. */
|
|
475
|
-
columns?: OonColumnDef[];
|
|
476
|
-
/** Campos explícitos ou overrides pontuais sobre a metadata do model. */
|
|
477
|
-
form?: OonFormFieldDef[];
|
|
478
|
-
importExport?: boolean;
|
|
479
|
-
renderer?: string;
|
|
480
|
-
cardRenderer?: string;
|
|
481
|
-
actions?: OonActionDef[];
|
|
482
|
-
list?: OonCollectionListConfig;
|
|
483
|
-
relations?: Record<string, OonRelationDef>;
|
|
484
|
-
detailModal?: OonDetailModalConfig;
|
|
485
|
-
permissions?: string[];
|
|
486
|
-
capabilities?: string[];
|
|
487
|
-
}
|
|
488
|
-
interface DocumentViewDef {
|
|
489
|
-
type: "document";
|
|
490
|
-
id?: string;
|
|
491
|
-
model: string;
|
|
492
|
-
endpoint?: string;
|
|
493
|
-
label?: string;
|
|
494
|
-
path?: string;
|
|
495
|
-
icon?: ReactNode;
|
|
496
|
-
section?: string;
|
|
497
|
-
approval?: boolean;
|
|
498
|
-
attachments?: boolean;
|
|
499
|
-
/** Experiência de uso: CRUD operacional (legado) ou biblioteca para leitura. */
|
|
500
|
-
display?: "crud" | "library";
|
|
501
|
-
categoryField?: string;
|
|
502
|
-
titleField?: string;
|
|
503
|
-
descriptionField?: string;
|
|
504
|
-
contentField?: string;
|
|
505
|
-
statusField?: string;
|
|
506
|
-
updatedAtField?: string;
|
|
507
|
-
permissions?: string[];
|
|
508
|
-
capabilities?: string[];
|
|
509
|
-
}
|
|
510
|
-
interface PipelineViewDef {
|
|
511
|
-
type: "pipeline";
|
|
512
|
-
id?: string;
|
|
513
|
-
/** model dos cards (tickets). */
|
|
514
|
-
model: string;
|
|
515
|
-
label?: string;
|
|
516
|
-
path?: string;
|
|
517
|
-
icon?: ReactNode;
|
|
518
|
-
section?: string;
|
|
519
|
-
/** campo do registro que define a etapa/coluna. */
|
|
520
|
-
stageField?: string;
|
|
521
|
-
/** etapas fixas; se omitido, derivadas do enum de stageField. */
|
|
522
|
-
stages?: Array<{
|
|
523
|
-
id: string;
|
|
524
|
-
label: string;
|
|
525
|
-
}>;
|
|
526
|
-
permissions?: string[];
|
|
527
|
-
capabilities?: string[];
|
|
528
|
-
}
|
|
529
|
-
interface DashboardViewDef {
|
|
530
|
-
type: "dashboard";
|
|
531
|
-
id?: string;
|
|
532
|
-
label?: string;
|
|
533
|
-
path?: string;
|
|
534
|
-
icon?: ReactNode;
|
|
535
|
-
section?: string;
|
|
536
|
-
widgets?: DashboardWidgetDef[];
|
|
537
|
-
permissions?: string[];
|
|
538
|
-
capabilities?: string[];
|
|
539
|
-
}
|
|
540
|
-
type OonPageLayout = "default" | "content-only" | "portal";
|
|
541
|
-
interface OonPageDef {
|
|
542
|
-
id?: string;
|
|
543
|
-
path: string;
|
|
544
|
-
/** Rota pública declarada, usada por entradas customizadas como o login do portal. */
|
|
545
|
-
public?: boolean;
|
|
546
|
-
label?: string;
|
|
547
|
-
title?: string;
|
|
548
|
-
section?: string;
|
|
549
|
-
icon?: ReactNode;
|
|
550
|
-
layout?: OonPageLayout;
|
|
551
|
-
blocks?: OonBlockDef[];
|
|
552
|
-
component?: string;
|
|
553
|
-
permissions?: string[];
|
|
554
|
-
capabilities?: string[];
|
|
555
|
-
hidden?: boolean;
|
|
556
|
-
order?: number;
|
|
557
|
-
}
|
|
558
|
-
type OonBlockDef = OonCustomBlockDef | OonCollectionDataGridBlockDef | OonCollectionCardsBlockDef | OonSectionBlockDef | OonMarkdownBlockDef | OonNavigationCardsBlockDef | OonGenericBlockDef;
|
|
559
|
-
interface OonBaseBlockDef {
|
|
560
|
-
id?: string;
|
|
561
|
-
title?: string;
|
|
562
|
-
permissions?: string[];
|
|
563
|
-
capabilities?: string[];
|
|
564
|
-
hidden?: boolean;
|
|
565
|
-
}
|
|
566
|
-
interface OonCustomBlockDef extends OonBaseBlockDef {
|
|
567
|
-
type: "custom";
|
|
568
|
-
component: string;
|
|
569
|
-
props?: Record<string, unknown>;
|
|
570
|
-
}
|
|
571
|
-
interface OonCollectionDataGridBlockDef extends OonBaseBlockDef {
|
|
572
|
-
type: "collection.datagrid";
|
|
573
|
-
model: string;
|
|
574
|
-
mode?: CollectionMode;
|
|
575
|
-
renderer?: string;
|
|
576
|
-
columns?: OonColumnDef[];
|
|
577
|
-
form?: OonFormFieldDef[];
|
|
578
|
-
}
|
|
579
|
-
interface OonCollectionCardsBlockDef extends OonBaseBlockDef {
|
|
580
|
-
type: "collection.cards";
|
|
581
|
-
model: string;
|
|
582
|
-
renderer?: string;
|
|
583
|
-
}
|
|
584
|
-
interface OonSectionBlockDef extends OonBaseBlockDef {
|
|
585
|
-
type: "section";
|
|
586
|
-
description?: string;
|
|
587
|
-
blocks?: OonBlockDef[];
|
|
588
|
-
}
|
|
589
|
-
interface OonMarkdownBlockDef extends OonBaseBlockDef {
|
|
590
|
-
type: "markdown";
|
|
591
|
-
content: string;
|
|
592
|
-
}
|
|
593
|
-
interface OonNavigationCardDef {
|
|
594
|
-
title: string;
|
|
595
|
-
description?: string;
|
|
596
|
-
href: string;
|
|
597
|
-
actionLabel?: string;
|
|
598
|
-
external?: boolean;
|
|
599
|
-
}
|
|
600
|
-
interface OonNavigationCardsBlockDef extends OonBaseBlockDef {
|
|
601
|
-
type: "navigation.cards";
|
|
602
|
-
cards: OonNavigationCardDef[];
|
|
603
|
-
columns?: 1 | 2 | 3 | 4;
|
|
604
|
-
}
|
|
605
|
-
interface OonGenericBlockDef extends OonBaseBlockDef {
|
|
606
|
-
type: "collection.form" | "pipeline.board" | "document.viewer" | "dashboard.kpi" | "tabs";
|
|
607
|
-
[key: string]: unknown;
|
|
608
|
-
}
|
|
609
|
-
interface DashboardWidgetDef {
|
|
610
|
-
id: string;
|
|
611
|
-
label: string;
|
|
612
|
-
/** model de onde puxar a contagem/agregação. */
|
|
613
|
-
model?: string;
|
|
614
|
-
kind?: "count" | "sum" | "custom";
|
|
615
|
-
/** campo somado quando kind === "sum". */
|
|
616
|
-
field?: string;
|
|
617
|
-
render?: () => ReactNode;
|
|
618
|
-
}
|
|
619
|
-
type OonViewDefinition = CollectionViewDef | DocumentViewDef | PipelineViewDef | DashboardViewDef;
|
|
620
|
-
interface OonUiManifest {
|
|
621
|
-
schemaVersion?: OonSchemaVersion;
|
|
622
|
-
layout?: OonLayoutConfig;
|
|
623
|
-
registry?: OonComponentRegistry;
|
|
624
|
-
navigation?: OonNavigationConfig;
|
|
625
|
-
views: OonViewDefinition[];
|
|
626
|
-
pages?: OonPageDef[];
|
|
627
|
-
blocks?: OonBlockDef[];
|
|
15
|
+
interface TenantStorage {
|
|
16
|
+
get(): string | null;
|
|
17
|
+
set(tenantId: string): void;
|
|
18
|
+
clear(): void;
|
|
628
19
|
}
|
|
629
|
-
|
|
630
|
-
/**
|
|
631
|
-
* Ponto de entrada único de uma Central (Seção 3.2). O `main.tsx` da Central
|
|
632
|
-
* só chama isto — não conhece providers, router, auth, layout nem serviços.
|
|
633
|
-
*
|
|
634
|
-
* import { start } from "@oondemand/oon-core-front";
|
|
635
|
-
* import { appConfig } from "./central.ui";
|
|
636
|
-
* start(appConfig);
|
|
637
|
-
*/
|
|
638
|
-
declare function start(config: OonCoreFrontConfig): void;
|
|
639
|
-
/** Alias namespaced, compatível com a doc (`oonCoreFront.start`). */
|
|
640
|
-
declare const oonCoreFront: {
|
|
641
|
-
start: typeof start;
|
|
642
|
-
};
|
|
643
|
-
|
|
644
|
-
type OonRelatedGridCreateDef = {
|
|
645
|
-
enabled?: boolean;
|
|
646
|
-
label?: string;
|
|
647
|
-
fields?: OonFormFieldDef[];
|
|
648
|
-
initialValues?: Record<string, unknown>;
|
|
649
|
-
};
|
|
650
|
-
type OonRelatedGridDeleteDef = {
|
|
651
|
-
enabled?: boolean;
|
|
652
|
-
confirm?: string;
|
|
653
|
-
};
|
|
654
|
-
type BaseRelatedGridTab = Extract<OonDetailTabDef, {
|
|
655
|
-
type: "relatedGrid";
|
|
656
|
-
}>;
|
|
657
|
-
/** Aba relacionada com inclusão e exclusão opcionais. */
|
|
658
|
-
type OonOperationalDetailTabDef = Exclude<OonDetailTabDef, BaseRelatedGridTab> | (BaseRelatedGridTab & {
|
|
659
|
-
create?: OonRelatedGridCreateDef;
|
|
660
|
-
delete?: OonRelatedGridDeleteDef;
|
|
661
|
-
});
|
|
662
|
-
/** Modal declarativo que amplia relatedGrid sem quebrar o contrato anterior. */
|
|
663
|
-
type OonOperationalDetailModalConfig = Omit<OonDetailModalConfig, "tabs"> & {
|
|
664
|
-
tabs: OonOperationalDetailTabDef[];
|
|
665
|
-
};
|
|
666
|
-
/** Configuração declarativa do editor de um ticket aberto pela esteira. */
|
|
667
|
-
type OonPipelineTicketModalConfig = OonOperationalDetailModalConfig;
|
|
668
|
-
type OonPipelineViewMode = "board" | "list";
|
|
669
|
-
type OonPipelineCreateDef = {
|
|
20
|
+
interface TenantStorageOptions {
|
|
670
21
|
enabled?: boolean;
|
|
671
|
-
label?: string;
|
|
672
|
-
initialTab?: string;
|
|
673
|
-
defaultStage?: string;
|
|
674
|
-
defaultValues?: Record<string, unknown>;
|
|
675
|
-
};
|
|
676
|
-
type OonPipelineActionGroup = "approval" | "workStatus" | "custom";
|
|
677
|
-
type OonPipelineActionTone = "success" | "danger" | "warning" | "neutral" | "brand";
|
|
678
|
-
type OonPipelineOperationalKind = "approval" | "work-status" | "business";
|
|
679
|
-
/**
|
|
680
|
-
* Ações padrão da esteira. Quando omitido, aprovação/reprovação e status de
|
|
681
|
-
* trabalho ficam habilitados automaticamente quando os campos necessários
|
|
682
|
-
* existem na metadata do model.
|
|
683
|
-
*/
|
|
684
|
-
type OonPipelineDefaultActionsConfig = {
|
|
685
|
-
approval?: boolean;
|
|
686
|
-
workStatus?: boolean;
|
|
687
|
-
workStatusField?: string;
|
|
688
|
-
excludedStages?: string[];
|
|
689
|
-
};
|
|
690
|
-
type OonPipelineDefaultActionsDef = false | OonPipelineDefaultActionsConfig;
|
|
691
|
-
/**
|
|
692
|
-
* Ações operacionais exibidas no cabeçalho do ticket.
|
|
693
|
-
*
|
|
694
|
-
* - setField/transition atualizam um campo do próprio ticket;
|
|
695
|
-
* - formAction carrega dados opcionais e envia um formulário a um endpoint;
|
|
696
|
-
* - group/tone organizam a ação visualmente sem acoplar regra de negócio à UI;
|
|
697
|
-
* - operationalKind cria um contrato estável para telemetria, SLA e produtividade.
|
|
698
|
-
*/
|
|
699
|
-
type OonPipelineActionDef = Omit<OonRowActionDef, "type"> & {
|
|
700
|
-
type: OonRowActionDef["type"] | "setField" | "transition" | "formAction";
|
|
701
|
-
field?: string;
|
|
702
|
-
value?: unknown;
|
|
703
|
-
title?: string;
|
|
704
|
-
submitLabel?: string;
|
|
705
|
-
loadEndpoint?: string;
|
|
706
|
-
fields?: OonFormFieldDef[];
|
|
707
|
-
initialValues?: Record<string, unknown>;
|
|
708
|
-
group?: OonPipelineActionGroup;
|
|
709
|
-
tone?: OonPipelineActionTone;
|
|
710
|
-
operationalKind?: OonPipelineOperationalKind;
|
|
711
|
-
};
|
|
712
|
-
/**
|
|
713
|
-
* Extensão pública da view de esteira com filtros, inclusão, lista, ações e
|
|
714
|
-
* modal declarativo. Continua estruturalmente compatível com PipelineViewDef.
|
|
715
|
-
*/
|
|
716
|
-
type OonPipelineViewDef = PipelineViewDef & {
|
|
717
|
-
/** Campo exibido como título do card e do modal. */
|
|
718
|
-
titleField?: string;
|
|
719
|
-
/** Overrides de formulário mesclados à metadata do model. */
|
|
720
|
-
form?: OonFormFieldDef[];
|
|
721
|
-
/** Relações disponíveis para abas summary/relatedGrid/readonlyGrid. */
|
|
722
|
-
relations?: Record<string, OonRelationDef>;
|
|
723
|
-
/** Modal declarativo usado ao abrir um ticket da esteira. */
|
|
724
|
-
ticketModal?: OonPipelineTicketModalConfig;
|
|
725
|
-
/** Filtros aplicados tanto ao quadro quanto à visualização em lista. */
|
|
726
|
-
filters?: OonListFilterDef[];
|
|
727
|
-
/** Configuração do botão de inclusão pela própria esteira. */
|
|
728
|
-
create?: OonPipelineCreateDef;
|
|
729
|
-
/** Modos de visualização liberados para o usuário. */
|
|
730
|
-
viewModes?: OonPipelineViewMode[];
|
|
731
|
-
/** Visualização inicial. */
|
|
732
|
-
defaultView?: OonPipelineViewMode;
|
|
733
|
-
/** Colunas e ações da visualização em lista. */
|
|
734
|
-
list?: OonCollectionListConfig;
|
|
735
|
-
/** Ações padrão do Core; use false para desabilitá-las nesta esteira. */
|
|
736
|
-
defaultActions?: OonPipelineDefaultActionsDef;
|
|
737
|
-
/** Ações adicionais ou overrides exibidos no cabeçalho do ticket aberto. */
|
|
738
|
-
ticketActions?: OonPipelineActionDef[];
|
|
739
|
-
};
|
|
740
|
-
|
|
741
|
-
interface CentralFormFieldDef extends OonFormFieldDef {
|
|
742
|
-
/** Filtros fixos enviados como query params ao CRUD da model referenciada. */
|
|
743
|
-
referenceFilters?: Record<string, string | number | boolean | null>;
|
|
744
|
-
/** Mapeia query param da referência para outro campo do mesmo formulário. */
|
|
745
|
-
referenceFilterFrom?: Record<string, string>;
|
|
746
|
-
/** Mensagem exibida enquanto algum campo de referenceFilterFrom estiver vazio. */
|
|
747
|
-
referenceDisabledMessage?: string;
|
|
748
|
-
/** Mantém somente opções em que estes campos estejam vazios/nulos. */
|
|
749
|
-
referenceEmptyFields?: string[];
|
|
750
22
|
}
|
|
751
|
-
type DashboardFilterPrimitive$1 = string | number | boolean | null;
|
|
752
|
-
type DashboardFilterValue$1 = DashboardFilterPrimitive$1 | {
|
|
753
|
-
eq?: DashboardFilterPrimitive$1;
|
|
754
|
-
ne?: DashboardFilterPrimitive$1;
|
|
755
|
-
in?: DashboardFilterPrimitive$1[];
|
|
756
|
-
nin?: DashboardFilterPrimitive$1[];
|
|
757
|
-
gt?: DashboardFilterPrimitive$1;
|
|
758
|
-
gte?: DashboardFilterPrimitive$1;
|
|
759
|
-
lt?: DashboardFilterPrimitive$1;
|
|
760
|
-
lte?: DashboardFilterPrimitive$1;
|
|
761
|
-
exists?: boolean;
|
|
762
|
-
};
|
|
763
|
-
type CentralDashboardWidget = Omit<DashboardWidgetDef, "kind"> & {
|
|
764
|
-
description?: string;
|
|
765
|
-
kind?: "count" | "sum" | "groupCount" | "groupSum" | "custom";
|
|
766
|
-
groupBy?: string;
|
|
767
|
-
filters?: Record<string, DashboardFilterValue$1>;
|
|
768
|
-
format?: "number" | "currency";
|
|
769
|
-
};
|
|
770
|
-
/**
|
|
771
|
-
* Schema do `central.ui.json` (Seção 9). É o que o frontend consumidor
|
|
772
|
-
* carrega; a Central declara UI e o Core converte para rotas e componentes.
|
|
773
|
-
*/
|
|
774
|
-
interface CentralUiManifest {
|
|
775
|
-
name: string;
|
|
776
|
-
slug: string;
|
|
777
|
-
backend?: {
|
|
778
|
-
metadataUrl?: string;
|
|
779
|
-
};
|
|
780
|
-
schemaVersion?: 1 | 2;
|
|
781
|
-
/** Perfil arquitetural: root-central, member-central ou portal-cockpit. */
|
|
782
|
-
appKind?: OonAppKind;
|
|
783
|
-
/** Configuração declarativa de autenticação. Segredos nunca entram aqui. */
|
|
784
|
-
auth?: Pick<OonAuthConfig, "mode" | "loginUrl" | "tokenParam">;
|
|
785
|
-
layout?: OonLayoutConfig;
|
|
786
|
-
registry?: OonComponentRegistry;
|
|
787
|
-
navigation?: OonNavigationConfig;
|
|
788
|
-
pages?: OonPageDef[];
|
|
789
|
-
dashboards?: Array<{
|
|
790
|
-
id?: string;
|
|
791
|
-
label?: string;
|
|
792
|
-
path?: string;
|
|
793
|
-
section?: string;
|
|
794
|
-
hidden?: boolean;
|
|
795
|
-
order?: number;
|
|
796
|
-
widgets?: CentralDashboardWidget[];
|
|
797
|
-
}>;
|
|
798
|
-
collections?: Array<{
|
|
799
|
-
model: string;
|
|
800
|
-
mode?: CollectionMode;
|
|
801
|
-
path?: string;
|
|
802
|
-
label?: string;
|
|
803
|
-
section?: string;
|
|
804
|
-
hidden?: boolean;
|
|
805
|
-
/** Overrides pontuais de campos; os demais continuam vindo da metadata. */
|
|
806
|
-
form?: CentralFormFieldDef[];
|
|
807
|
-
list?: OonCollectionListConfig;
|
|
808
|
-
relations?: Record<string, OonRelationDef>;
|
|
809
|
-
detailModal?: OonOperationalDetailModalConfig;
|
|
810
|
-
}>;
|
|
811
|
-
pipelines?: Array<{
|
|
812
|
-
name?: string;
|
|
813
|
-
model?: string;
|
|
814
|
-
mode?: string;
|
|
815
|
-
stageField?: string;
|
|
816
|
-
stages?: Array<{
|
|
817
|
-
id: string;
|
|
818
|
-
label: string;
|
|
819
|
-
}>;
|
|
820
|
-
titleField?: string;
|
|
821
|
-
path?: string;
|
|
822
|
-
label?: string;
|
|
823
|
-
section?: string;
|
|
824
|
-
/** Overrides do formulário usado ao editar um ticket. */
|
|
825
|
-
form?: CentralFormFieldDef[];
|
|
826
|
-
/** Relações consumidas por abas de resumo e grids relacionados. */
|
|
827
|
-
relations?: Record<string, OonRelationDef>;
|
|
828
|
-
/** Abas, grupos e tamanho do modal aberto pelo card da esteira. */
|
|
829
|
-
ticketModal?: OonOperationalDetailModalConfig;
|
|
830
|
-
filters?: OonListFilterDef[];
|
|
831
|
-
create?: OonPipelineCreateDef;
|
|
832
|
-
viewModes?: OonPipelineViewMode[];
|
|
833
|
-
defaultView?: OonPipelineViewMode;
|
|
834
|
-
list?: OonCollectionListConfig;
|
|
835
|
-
/** Habilitadas por padrão; use false para remover aprovação e status de trabalho. */
|
|
836
|
-
defaultActions?: OonPipelineDefaultActionsDef;
|
|
837
|
-
ticketActions?: OonPipelineActionDef[];
|
|
838
|
-
}>;
|
|
839
|
-
documents?: Array<{
|
|
840
|
-
model: string;
|
|
841
|
-
endpoint?: string;
|
|
842
|
-
mode?: string;
|
|
843
|
-
path?: string;
|
|
844
|
-
label?: string;
|
|
845
|
-
section?: string;
|
|
846
|
-
approval?: boolean;
|
|
847
|
-
attachments?: boolean;
|
|
848
|
-
display?: "crud" | "library";
|
|
849
|
-
categoryField?: string;
|
|
850
|
-
titleField?: string;
|
|
851
|
-
descriptionField?: string;
|
|
852
|
-
contentField?: string;
|
|
853
|
-
statusField?: string;
|
|
854
|
-
updatedAtField?: string;
|
|
855
|
-
permissions?: string[];
|
|
856
|
-
capabilities?: string[];
|
|
857
|
-
}>;
|
|
858
|
-
}
|
|
859
|
-
/** Dados de runtime que o `central.ui.json` não carrega (vêm do .env/código). */
|
|
860
|
-
interface ManifestRuntime {
|
|
861
|
-
apiBaseUrl: string;
|
|
862
|
-
/** Em desenvolvimento local, autentica por sessão HttpOnly sem bearer persistido. */
|
|
863
|
-
runtimeMode?: OonRuntimeMode;
|
|
864
|
-
meusAppsUrl?: string;
|
|
865
|
-
onboardingBaseUrl?: string;
|
|
866
|
-
assistantBaseUrl?: string;
|
|
867
|
-
versionPrefix?: string;
|
|
868
|
-
/** Token local enviado ao backend somente quando o consumidor o configurar. */
|
|
869
|
-
devToken?: string;
|
|
870
|
-
/** Registry de componentes React, registrado em código TypeScript. */
|
|
871
|
-
registry?: OonComponentRegistry;
|
|
872
|
-
/** Atalho para registrar páginas/componentes custom sem reescrever o frontend. */
|
|
873
|
-
customComponents?: OonComponentRegistry["pageComponents"];
|
|
874
|
-
/** Overrides de autenticação vindos do runtime/env. */
|
|
875
|
-
auth?: Partial<OonAuthConfig>;
|
|
876
|
-
/** Override do perfil arquitetural da aplicação. */
|
|
877
|
-
appKind?: OonAppKind;
|
|
878
|
-
}
|
|
879
|
-
/** Converte o manifesto declarativo + runtime em config do Core. */
|
|
880
|
-
declare function manifestToConfig(manifest: CentralUiManifest, runtime: ManifestRuntime): OonCoreFrontConfig;
|
|
881
23
|
/**
|
|
882
|
-
*
|
|
883
|
-
*
|
|
24
|
+
* Mantém o tenant no escopo da aba. Isso permite abrir Tenant A e Tenant B em
|
|
25
|
+
* janelas diferentes sem uma aba trocar o contexto da outra. O query param
|
|
26
|
+
* `tenant` transporta somente o identificador selecionado; o backend continua
|
|
27
|
+
* validando o membership em todas as requisições.
|
|
884
28
|
*/
|
|
885
|
-
declare function
|
|
29
|
+
declare function createTenantStorage(appId: string, options?: TenantStorageOptions): TenantStorage;
|
|
886
30
|
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
id: string;
|
|
891
|
-
name: string;
|
|
892
|
-
slug: string;
|
|
893
|
-
appKind: OonAppKind;
|
|
894
|
-
tenancyModel?: OonTenancyModel;
|
|
895
|
-
modules: Record<string, boolean>;
|
|
896
|
-
capabilities: string[];
|
|
897
|
-
capabilitySettings?: Record<string, unknown>;
|
|
898
|
-
compatibility: {
|
|
899
|
-
core: {
|
|
900
|
-
minVersion: string;
|
|
901
|
-
maxVersionExclusive?: string;
|
|
902
|
-
};
|
|
903
|
-
};
|
|
904
|
-
activation?: {
|
|
905
|
-
enabled?: boolean;
|
|
906
|
-
configurationVersion?: number;
|
|
907
|
-
fields?: unknown[];
|
|
908
|
-
};
|
|
909
|
-
}
|
|
910
|
-
type CentralUiOnlyManifest = Omit<CentralUiManifest, "name" | "slug" | "appKind" | "auth"> & Partial<Pick<CentralUiManifest, "name" | "slug" | "appKind" | "auth">>;
|
|
911
|
-
interface CentralManifestBundle {
|
|
912
|
-
app: CentralAppManifest;
|
|
913
|
-
ui: CentralUiOnlyManifest;
|
|
914
|
-
}
|
|
915
|
-
declare function startCentralFromManifest(manifest: CentralManifestBundle, runtime: ManifestRuntime): OonCoreFrontConfig;
|
|
31
|
+
declare function defineOonApp<const T extends OonAppDefinition>(definition: T): T;
|
|
32
|
+
declare function appDefinitionToConfig(definition: OonAppDefinition): OonCoreFrontConfig;
|
|
33
|
+
declare function startOonApp(definition: OonAppDefinition): OonCoreFrontConfig;
|
|
916
34
|
|
|
917
35
|
type OonDomainExpressionOperator = "add" | "subtract" | "multiply" | "divide" | "min" | "max" | "abs" | "negate" | "coalesce" | "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "and" | "or" | "not" | "present" | "in";
|
|
918
36
|
type OonDomainExpression = {
|
|
@@ -975,226 +93,6 @@ declare function defineDashboard(def: Omit<DashboardViewDef, "type">): Dashboard
|
|
|
975
93
|
/** Açúcar para declarar um módulo com tipagem. */
|
|
976
94
|
declare function defineOonModule(mod: OonModule): OonModule;
|
|
977
95
|
|
|
978
|
-
interface CoreCollectionProps {
|
|
979
|
-
model: string;
|
|
980
|
-
label?: string;
|
|
981
|
-
section?: string;
|
|
982
|
-
mode?: CollectionMode;
|
|
983
|
-
endpoint?: string;
|
|
984
|
-
columns?: OonColumnDef[];
|
|
985
|
-
form?: OonFormFieldDef[];
|
|
986
|
-
importExport?: boolean;
|
|
987
|
-
list?: OonCollectionListConfig;
|
|
988
|
-
relations?: Record<string, OonRelationDef>;
|
|
989
|
-
detailModal?: OonDetailModalConfig;
|
|
990
|
-
cellRenderers?: OonComponentRegistry["cellRenderers"];
|
|
991
|
-
registry?: OonComponentRegistry;
|
|
992
|
-
}
|
|
993
|
-
declare function CoreCollection({ model, label, section, mode, endpoint, columns, form, importExport, list, relations, detailModal, cellRenderers, registry }: CoreCollectionProps): react.JSX.Element;
|
|
994
|
-
|
|
995
|
-
interface CoreDocumentProps {
|
|
996
|
-
model: string;
|
|
997
|
-
label?: string;
|
|
998
|
-
endpoint?: string;
|
|
999
|
-
columns?: OonColumnDef[];
|
|
1000
|
-
form?: OonFormFieldDef[];
|
|
1001
|
-
/** liga ações de aprovar/reprovar (RESTful: /:id/actions/approve|reject). */
|
|
1002
|
-
approval?: boolean;
|
|
1003
|
-
/** liga gestão de anexos (futuro: /:id/files). */
|
|
1004
|
-
attachments?: boolean;
|
|
1005
|
-
/** CRUD preserva o comportamento legado; library prioriza descoberta e leitura. */
|
|
1006
|
-
display?: "crud" | "library";
|
|
1007
|
-
categoryField?: string;
|
|
1008
|
-
titleField?: string;
|
|
1009
|
-
descriptionField?: string;
|
|
1010
|
-
contentField?: string;
|
|
1011
|
-
statusField?: string;
|
|
1012
|
-
updatedAtField?: string;
|
|
1013
|
-
}
|
|
1014
|
-
declare function CoreDocument({ model, label, endpoint, columns, form, display, categoryField, titleField, descriptionField, contentField, statusField, updatedAtField, }: CoreDocumentProps): react.JSX.Element;
|
|
1015
|
-
|
|
1016
|
-
interface CorePipelineProps {
|
|
1017
|
-
model: string;
|
|
1018
|
-
label?: string;
|
|
1019
|
-
endpoint?: string;
|
|
1020
|
-
stageField?: string;
|
|
1021
|
-
stages?: Array<{
|
|
1022
|
-
id: string;
|
|
1023
|
-
label: string;
|
|
1024
|
-
}>;
|
|
1025
|
-
titleField?: string;
|
|
1026
|
-
form?: OonFormFieldDef[];
|
|
1027
|
-
relations?: Record<string, OonRelationDef>;
|
|
1028
|
-
ticketModal?: OonDetailModalConfig;
|
|
1029
|
-
filters?: OonListFilterDef[];
|
|
1030
|
-
create?: OonPipelineCreateDef;
|
|
1031
|
-
viewModes?: OonPipelineViewMode[];
|
|
1032
|
-
defaultView?: OonPipelineViewMode;
|
|
1033
|
-
list?: OonCollectionListConfig;
|
|
1034
|
-
defaultActions?: OonPipelineDefaultActionsDef;
|
|
1035
|
-
ticketActions?: OonPipelineActionDef[];
|
|
1036
|
-
registry?: OonComponentRegistry;
|
|
1037
|
-
}
|
|
1038
|
-
/** Esteira com quadro/lista, filtros, inclusão e ações operacionais no ticket. */
|
|
1039
|
-
declare function CorePipeline({ model, label, endpoint, stageField, stages, titleField, form, relations, ticketModal, filters, create, viewModes, defaultView, list, defaultActions, ticketActions, registry, }: CorePipelineProps): react.JSX.Element;
|
|
1040
|
-
|
|
1041
|
-
interface CoreIntegrationProps {
|
|
1042
|
-
label?: string;
|
|
1043
|
-
}
|
|
1044
|
-
/** Painel operacional padrão da engine de integrações. */
|
|
1045
|
-
declare function CoreIntegration({ label }: CoreIntegrationProps): react.JSX.Element;
|
|
1046
|
-
|
|
1047
|
-
/** Módulo operacional nativo habilitado por central.app.json.modules.integrations. */
|
|
1048
|
-
declare function createIntegrationModule(): OonModule;
|
|
1049
|
-
|
|
1050
|
-
interface CoreCurrencyProps {
|
|
1051
|
-
/** model das moedas. Default: "Moeda". */
|
|
1052
|
-
model?: string;
|
|
1053
|
-
label?: string;
|
|
1054
|
-
endpoint?: string;
|
|
1055
|
-
columns?: OonColumnDef[];
|
|
1056
|
-
}
|
|
1057
|
-
/**
|
|
1058
|
-
* Multi-moedas (módulo de domínio, Seção 4.6/2.11). Lista as moedas e expõe a
|
|
1059
|
-
* ação RESTful de atualizar cotações (POST /<endpoint>/actions/update-rates).
|
|
1060
|
-
*/
|
|
1061
|
-
declare function CoreCurrency({ model, label, endpoint, columns }: CoreCurrencyProps): react.JSX.Element;
|
|
1062
|
-
|
|
1063
|
-
interface CoreAssistantProps {
|
|
1064
|
-
/** code do assistente registrado no back (ex.: "servicos-tomados.revisao"). */
|
|
1065
|
-
assistantCode: string;
|
|
1066
|
-
label?: string;
|
|
1067
|
-
/** entidade de contexto (apenas tipo + id; nada sensível). */
|
|
1068
|
-
entity?: {
|
|
1069
|
-
type: string;
|
|
1070
|
-
id: string;
|
|
1071
|
-
};
|
|
1072
|
-
/** base de assistentes; default usa o mesmo client REST do Core. */
|
|
1073
|
-
endpoint?: string;
|
|
1074
|
-
}
|
|
1075
|
-
/**
|
|
1076
|
-
* Assistente IA do Core (Seção 2.12 / 6.2). Envia ao back apenas
|
|
1077
|
-
* assistantCode + entity + message — NUNCA chave de IA, modelo ou prompt.
|
|
1078
|
-
* O back resolve modelo, prompt, chave e políticas.
|
|
1079
|
-
*/
|
|
1080
|
-
declare function CoreAssistant({ assistantCode, label, entity, endpoint }: CoreAssistantProps): react.JSX.Element;
|
|
1081
|
-
|
|
1082
|
-
type DashboardFilterPrimitive = string | number | boolean | null;
|
|
1083
|
-
type DashboardFilterValue = DashboardFilterPrimitive | {
|
|
1084
|
-
eq?: DashboardFilterPrimitive;
|
|
1085
|
-
ne?: DashboardFilterPrimitive;
|
|
1086
|
-
in?: DashboardFilterPrimitive[];
|
|
1087
|
-
nin?: DashboardFilterPrimitive[];
|
|
1088
|
-
gt?: DashboardFilterPrimitive;
|
|
1089
|
-
gte?: DashboardFilterPrimitive;
|
|
1090
|
-
lt?: DashboardFilterPrimitive;
|
|
1091
|
-
lte?: DashboardFilterPrimitive;
|
|
1092
|
-
exists?: boolean;
|
|
1093
|
-
};
|
|
1094
|
-
type CoreDashboardWidget = Omit<DashboardWidgetDef, "kind"> & {
|
|
1095
|
-
description?: string;
|
|
1096
|
-
kind?: "count" | "sum" | "groupCount" | "groupSum" | "custom";
|
|
1097
|
-
groupBy?: string;
|
|
1098
|
-
filters?: Record<string, DashboardFilterValue>;
|
|
1099
|
-
format?: "number" | "currency";
|
|
1100
|
-
};
|
|
1101
|
-
interface CoreDashboardProps {
|
|
1102
|
-
label?: string;
|
|
1103
|
-
widgets?: CoreDashboardWidget[];
|
|
1104
|
-
}
|
|
1105
|
-
/** Dashboard declarativo com agregações executadas integralmente no backend. */
|
|
1106
|
-
declare function CoreDashboard({ label, widgets }: CoreDashboardProps): react.JSX.Element;
|
|
1107
|
-
|
|
1108
|
-
declare function CoreUsersAccess(): react.JSX.Element;
|
|
1109
|
-
|
|
1110
|
-
declare function CoreTransactionalEmail(): react.JSX.Element;
|
|
1111
|
-
|
|
1112
|
-
declare function CorePage({ page, registry }: {
|
|
1113
|
-
page: OonPageDef;
|
|
1114
|
-
registry?: OonComponentRegistry;
|
|
1115
|
-
}): react.JSX.Element;
|
|
1116
|
-
|
|
1117
|
-
declare function CorePageHeader({ title, description, actions }: {
|
|
1118
|
-
title?: string;
|
|
1119
|
-
description?: string;
|
|
1120
|
-
actions?: ReactNode;
|
|
1121
|
-
}): react.JSX.Element;
|
|
1122
|
-
declare function CoreToolbar({ children }: {
|
|
1123
|
-
children?: ReactNode;
|
|
1124
|
-
}): react.JSX.Element;
|
|
1125
|
-
declare function CoreDataGrid(props: {
|
|
1126
|
-
model: string;
|
|
1127
|
-
mode?: CollectionMode;
|
|
1128
|
-
columns?: OonColumnDef[];
|
|
1129
|
-
form?: OonFormFieldDef[];
|
|
1130
|
-
label?: string;
|
|
1131
|
-
}): react.JSX.Element;
|
|
1132
|
-
declare function CoreCards(props: {
|
|
1133
|
-
model: string;
|
|
1134
|
-
renderer?: string;
|
|
1135
|
-
}): react.JSX.Element;
|
|
1136
|
-
declare function CoreForm(props: {
|
|
1137
|
-
children?: ReactNode;
|
|
1138
|
-
}): react.JSX.Element;
|
|
1139
|
-
declare function CoreField({ label, children }: {
|
|
1140
|
-
label?: string;
|
|
1141
|
-
children?: ReactNode;
|
|
1142
|
-
}): react.JSX.Element;
|
|
1143
|
-
declare function CoreRelationField(props: {
|
|
1144
|
-
children?: ReactNode;
|
|
1145
|
-
}): react.JSX.Element;
|
|
1146
|
-
declare function CoreActions({ children }: {
|
|
1147
|
-
children?: ReactNode;
|
|
1148
|
-
}): react.JSX.Element;
|
|
1149
|
-
declare function CoreEmptyState({ title, actionLabel, onAction }: {
|
|
1150
|
-
title?: string;
|
|
1151
|
-
actionLabel?: string;
|
|
1152
|
-
onAction?: () => void;
|
|
1153
|
-
}): react.JSX.Element;
|
|
1154
|
-
declare function CoreLoadingState({ label }: {
|
|
1155
|
-
label?: string;
|
|
1156
|
-
}): react.JSX.Element;
|
|
1157
|
-
|
|
1158
|
-
type AuthStatus = "loading" | "authenticated" | "first-access" | "unauthenticated" | "forbidden" | "error";
|
|
1159
|
-
interface AuthContextValue {
|
|
1160
|
-
user: OonUser | null;
|
|
1161
|
-
roles: string[];
|
|
1162
|
-
capabilities: string[];
|
|
1163
|
-
permissions: string[];
|
|
1164
|
-
status: AuthStatus;
|
|
1165
|
-
isAuthenticated: boolean;
|
|
1166
|
-
hasPermission: (permission?: string | string[]) => boolean;
|
|
1167
|
-
login: (email: string, password: string, tenantId?: string) => Promise<void>;
|
|
1168
|
-
completeFirstAccess: (password: string) => Promise<void>;
|
|
1169
|
-
retry: () => Promise<void>;
|
|
1170
|
-
logout: () => void;
|
|
1171
|
-
}
|
|
1172
|
-
declare function can(user: OonUser | null, permission?: string | string[]): boolean;
|
|
1173
|
-
declare function useOonAuth(): AuthContextValue;
|
|
1174
|
-
|
|
1175
|
-
interface TenantStorage {
|
|
1176
|
-
get(): string | null;
|
|
1177
|
-
set(tenantId: string): void;
|
|
1178
|
-
clear(): void;
|
|
1179
|
-
}
|
|
1180
|
-
interface TenantStorageOptions {
|
|
1181
|
-
enabled?: boolean;
|
|
1182
|
-
}
|
|
1183
|
-
/**
|
|
1184
|
-
* Mantém o tenant no escopo da aba. Isso permite abrir Tenant A e Tenant B em
|
|
1185
|
-
* janelas diferentes sem uma aba trocar o contexto da outra. O query param
|
|
1186
|
-
* `tenant` transporta somente o identificador selecionado; o backend continua
|
|
1187
|
-
* validando o membership em todas as requisições.
|
|
1188
|
-
*/
|
|
1189
|
-
declare function createTenantStorage(appId: string, options?: TenantStorageOptions): TenantStorage;
|
|
1190
|
-
|
|
1191
|
-
interface OonTenantContextValue {
|
|
1192
|
-
activeTenantId: string | null;
|
|
1193
|
-
switchTenant(tenantId: string): void;
|
|
1194
|
-
clearTenant(): void;
|
|
1195
|
-
}
|
|
1196
|
-
declare function useOonTenant(): OonTenantContextValue;
|
|
1197
|
-
|
|
1198
96
|
/**
|
|
1199
97
|
* Esconde a UI quando o usuário não tem a permissão. O backend continua sendo
|
|
1200
98
|
* a autoridade; este componente evita expor ações indisponíveis na interface.
|
|
@@ -1207,63 +105,4 @@ declare function PermissionGate({ permission, fallback, children, }: {
|
|
|
1207
105
|
/** Alias canônico e curto para uso declarativo nas Centrais. */
|
|
1208
106
|
declare const Can: typeof PermissionGate;
|
|
1209
107
|
|
|
1210
|
-
|
|
1211
|
-
* SDK do contrato /core/* (introspecção dirigida por metadata). É o que
|
|
1212
|
-
* permite o modo "dynamic" das coleções: o front monta grid/form/rotas a
|
|
1213
|
-
* partir do que o back descreve, sem código de UI por entidade.
|
|
1214
|
-
*/
|
|
1215
|
-
interface CoreClient {
|
|
1216
|
-
metadata(): Promise<CoreMetadata>;
|
|
1217
|
-
models(): Promise<ModelSummary[]>;
|
|
1218
|
-
model(name: string): Promise<ModelSummary>;
|
|
1219
|
-
permissions(): Promise<Array<{
|
|
1220
|
-
resource: string;
|
|
1221
|
-
action: string;
|
|
1222
|
-
roles: string[];
|
|
1223
|
-
}>>;
|
|
1224
|
-
menus(): Promise<CoreMetadata["menus"]>;
|
|
1225
|
-
}
|
|
1226
|
-
|
|
1227
|
-
/**
|
|
1228
|
-
* SDK por recurso (Seção 2.5). Espelha o CRUD gerado pelo back em `basePath`:
|
|
1229
|
-
* GET / -> list (paginado)
|
|
1230
|
-
* GET /:id -> get
|
|
1231
|
-
* POST / -> create
|
|
1232
|
-
* PUT /:id -> update
|
|
1233
|
-
* PATCH /:id -> patch
|
|
1234
|
-
* DELETE /:id -> delete
|
|
1235
|
-
* POST /import -> importMany
|
|
1236
|
-
* GET /export -> exportAll
|
|
1237
|
-
*
|
|
1238
|
-
* O back devolve registro único na chave do singular (`{ [singular]: {...} }`);
|
|
1239
|
-
* `unwrap` extrai o primeiro valor não-meta para o consumidor não precisar
|
|
1240
|
-
* conhecer o singular.
|
|
1241
|
-
*/
|
|
1242
|
-
interface ResourceClient<T = Record<string, unknown>> {
|
|
1243
|
-
list(params?: ListParams): Promise<PaginatedResult<T>>;
|
|
1244
|
-
get(id: string): Promise<T>;
|
|
1245
|
-
create(body: Partial<T>, audit?: AuditContext): Promise<T>;
|
|
1246
|
-
update(id: string, body: Partial<T>, audit?: AuditContext): Promise<T>;
|
|
1247
|
-
patch(id: string, body: Partial<T>, audit?: AuditContext): Promise<T>;
|
|
1248
|
-
delete(id: string, audit?: AuditContext): Promise<T>;
|
|
1249
|
-
importMany(rows: unknown[], audit?: AuditContext): Promise<{
|
|
1250
|
-
inserted?: number;
|
|
1251
|
-
[k: string]: unknown;
|
|
1252
|
-
}>;
|
|
1253
|
-
exportAll(params?: ListParams): Promise<T[]>;
|
|
1254
|
-
}
|
|
1255
|
-
|
|
1256
|
-
interface ApiContextValue {
|
|
1257
|
-
http: AxiosInstance;
|
|
1258
|
-
core: CoreClient;
|
|
1259
|
-
resource: <T = Record<string, unknown>>(basePath: string) => ResourceClient<T>;
|
|
1260
|
-
}
|
|
1261
|
-
declare function useOonApi(): ApiContextValue;
|
|
1262
|
-
/** Cliente de um recurso, memoizado pelo basePath. */
|
|
1263
|
-
declare function useOonResource<T = Record<string, unknown>>(basePath: string): ResourceClient<T>;
|
|
1264
|
-
/** Metadata completa do back (cache de 5 min). */
|
|
1265
|
-
declare function useCoreMetadata(): _tanstack_react_query.UseQueryResult<NoInfer<CoreMetadata>, Error>;
|
|
1266
|
-
/** Descrição de uma model específica — base do modo "dynamic". */
|
|
1267
|
-
declare function useModelSchema(name: string, enabled?: boolean): _tanstack_react_query.UseQueryResult<NoInfer<ModelSummary>, Error>;
|
|
1268
|
-
|
|
1269
|
-
export { Can, type CentralAppManifest, type CentralFormFieldDef, type CentralManifestBundle, type CentralUiManifest, type CentralUiOnlyManifest, type CollectionMode, type CollectionViewDef, CoreActions, CoreAssistant, CoreCards, CoreCollection, CoreCurrency, CoreDashboard, CoreDataGrid, CoreDocument, CoreEmptyState, CoreField, CoreForm, CoreIntegration, CoreLoadingState, type CoreMetadata, CorePage, CorePageHeader, CorePipeline, CoreRelationField, CoreToolbar, CoreTransactionalEmail, CoreUsersAccess, type DashboardViewDef, type DashboardWidgetDef, type DocumentViewDef, DomainExpressionError, type FieldKind, type FieldMeta, type ListParams, type ManifestRuntime, type ModelSummary, type OonActionDef, type OonApiConfig, type OonAppConfig, type OonAppKind, type OonAuthConfig, type OonAuthMode, type OonBlockDef, type OonColumnDef, type OonComponentRegistry, type OonComputedFieldDefinition, type OonCoreFrontConfig, type OonDomainExpression, type OonDomainExpressionOperator, type OonError, type OonFormFieldDef, type OonLayoutConfig, type OonMenuItem, type OonModule, type OonNavigationConfig, type OonNavigationMode, type OonPageDef, type OonPipelineActionDef, type OonPipelineActionGroup, type OonPipelineActionTone, type OonPipelineDefaultActionsConfig, type OonPipelineDefaultActionsDef, type OonPipelineTicketModalConfig, type OonPipelineViewDef, type OonReactiveFormField, type OonRoute, type OonRuntimeMode, type OonSchemaVersion, type OonSecurityConfig, type OonTenantContextValue, type OonUiManifest, type OonUser, type OonViewDefinition, type PaginatedResult, type Pagination, PermissionGate, type PipelineViewDef, type ReactiveFormulaResult, type TenantStorage, applyReactiveFormulas, buildDomainMutationPayload, can, coerceDomainFormValue, createIntegrationModule, createTenantStorage, defineCollectionView, defineDashboard, defineDocumentView, defineOonModule, definePipelineView, evaluateDomainExpression, manifestToConfig, oonCoreFront, start, startCentralFromManifest, startFromManifest, useCoreMetadata, useModelSchema, useOonApi, useOonAuth, useOonResource, useOonTenant };
|
|
108
|
+
export { Can, CollectionViewDef, DashboardViewDef, DocumentViewDef, DomainExpressionError, OonAppDefinition, type OonComputedFieldDefinition, OonCoreFrontConfig, type OonDomainExpression, type OonDomainExpressionOperator, OonModule, OonPipelineViewDef, type OonReactiveFormField, PermissionGate, type ReactiveFormulaResult, type TenantStorage, appDefinitionToConfig, applyReactiveFormulas, buildDomainMutationPayload, coerceDomainFormValue, createTenantStorage, defineCollectionView, defineDashboard, defineDocumentView, defineOonApp, defineOonModule, definePipelineView, evaluateDomainExpression, startOonApp };
|