@vef-framework-react/integration 2.10.0
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/LICENSE +201 -0
- package/dist/cjs/_internal/_rolldown/runtime.cjs +1 -0
- package/dist/cjs/api/crud-api.cjs +1 -0
- package/dist/cjs/api/index.cjs +1 -0
- package/dist/cjs/api/log-api.cjs +1 -0
- package/dist/cjs/api/ops-api.cjs +1 -0
- package/dist/cjs/api/query.cjs +1 -0
- package/dist/cjs/api/stats-api.cjs +1 -0
- package/dist/cjs/components/auth-params/index.cjs +1 -0
- package/dist/cjs/components/directory/index.cjs +1 -0
- package/dist/cjs/components/form-section/index.cjs +1 -0
- package/dist/cjs/components/format.cjs +1 -0
- package/dist/cjs/components/index.cjs +1 -0
- package/dist/cjs/components/json-view/index.cjs +1 -0
- package/dist/cjs/components/params-editor/index.cjs +1 -0
- package/dist/cjs/components/script-doc/completions.cjs +1 -0
- package/dist/cjs/components/script-doc/index.cjs +1 -0
- package/dist/cjs/components/status/colors.cjs +1 -0
- package/dist/cjs/components/status/index.cjs +1 -0
- package/dist/cjs/components/status/labels.cjs +1 -0
- package/dist/cjs/components/test-connection/index.cjs +1 -0
- package/dist/cjs/components/wire-trace/index.cjs +1 -0
- package/dist/cjs/index.cjs +1 -0
- package/dist/cjs/pages/adapter-page/columns.cjs +2 -0
- package/dist/cjs/pages/adapter-page/form.cjs +1 -0
- package/dist/cjs/pages/adapter-page/helpers.cjs +4 -0
- package/dist/cjs/pages/adapter-page/index.cjs +1 -0
- package/dist/cjs/pages/adapter-page/search.cjs +1 -0
- package/dist/cjs/pages/console-page/diagnostics.cjs +1 -0
- package/dist/cjs/pages/console-page/dry-run.cjs +1 -0
- package/dist/cjs/pages/console-page/index.cjs +1 -0
- package/dist/cjs/pages/console-page/log.cjs +1 -0
- package/dist/cjs/pages/console-page/stats.cjs +1 -0
- package/dist/cjs/pages/contract-page/columns.cjs +1 -0
- package/dist/cjs/pages/contract-page/form.cjs +1 -0
- package/dist/cjs/pages/contract-page/helpers.cjs +1 -0
- package/dist/cjs/pages/contract-page/index.cjs +1 -0
- package/dist/cjs/pages/contract-page/json-schema-completions.cjs +1 -0
- package/dist/cjs/pages/contract-page/model.cjs +1 -0
- package/dist/cjs/pages/contract-page/search.cjs +1 -0
- package/dist/cjs/pages/index.cjs +1 -0
- package/dist/cjs/pages/route-page/columns.cjs +1 -0
- package/dist/cjs/pages/route-page/form.cjs +1 -0
- package/dist/cjs/pages/route-page/helpers.cjs +1 -0
- package/dist/cjs/pages/route-page/index.cjs +1 -0
- package/dist/cjs/pages/route-page/search.cjs +1 -0
- package/dist/cjs/pages/system-page/columns.cjs +1 -0
- package/dist/cjs/pages/system-page/form.cjs +1 -0
- package/dist/cjs/pages/system-page/helpers.cjs +1 -0
- package/dist/cjs/pages/system-page/index.cjs +1 -0
- package/dist/cjs/pages/system-page/model.cjs +1 -0
- package/dist/cjs/pages/system-page/search.cjs +1 -0
- package/dist/cjs/permissions.cjs +1 -0
- package/dist/cjs/types/enums.cjs +1 -0
- package/dist/cjs/types/index.cjs +1 -0
- package/dist/es/api/crud-api.js +35 -0
- package/dist/es/api/index.js +7 -0
- package/dist/es/api/log-api.js +14 -0
- package/dist/es/api/ops-api.js +16 -0
- package/dist/es/api/query.js +13 -0
- package/dist/es/api/stats-api.js +11 -0
- package/dist/es/components/auth-params/index.js +198 -0
- package/dist/es/components/directory/index.js +35 -0
- package/dist/es/components/form-section/index.js +44 -0
- package/dist/es/components/format.js +8 -0
- package/dist/es/components/index.js +15 -0
- package/dist/es/components/json-view/index.js +15 -0
- package/dist/es/components/params-editor/index.js +61 -0
- package/dist/es/components/script-doc/completions.js +507 -0
- package/dist/es/components/script-doc/index.js +108 -0
- package/dist/es/components/status/colors.js +25 -0
- package/dist/es/components/status/index.js +35 -0
- package/dist/es/components/status/labels.js +46 -0
- package/dist/es/components/test-connection/index.js +156 -0
- package/dist/es/components/wire-trace/index.js +119 -0
- package/dist/es/index.js +27 -0
- package/dist/es/pages/adapter-page/columns.js +61 -0
- package/dist/es/pages/adapter-page/form.js +110 -0
- package/dist/es/pages/adapter-page/helpers.js +23 -0
- package/dist/es/pages/adapter-page/index.js +120 -0
- package/dist/es/pages/adapter-page/search.js +43 -0
- package/dist/es/pages/console-page/diagnostics.js +122 -0
- package/dist/es/pages/console-page/dry-run.js +327 -0
- package/dist/es/pages/console-page/index.js +64 -0
- package/dist/es/pages/console-page/log.js +219 -0
- package/dist/es/pages/console-page/stats.js +157 -0
- package/dist/es/pages/contract-page/columns.js +100 -0
- package/dist/es/pages/contract-page/form.js +123 -0
- package/dist/es/pages/contract-page/helpers.js +17 -0
- package/dist/es/pages/contract-page/index.js +116 -0
- package/dist/es/pages/contract-page/json-schema-completions.js +70 -0
- package/dist/es/pages/contract-page/model.js +47 -0
- package/dist/es/pages/contract-page/search.js +24 -0
- package/dist/es/pages/index.js +7 -0
- package/dist/es/pages/route-page/columns.js +47 -0
- package/dist/es/pages/route-page/form.js +68 -0
- package/dist/es/pages/route-page/helpers.js +20 -0
- package/dist/es/pages/route-page/index.js +119 -0
- package/dist/es/pages/route-page/search.js +27 -0
- package/dist/es/pages/system-page/columns.js +101 -0
- package/dist/es/pages/system-page/form.js +471 -0
- package/dist/es/pages/system-page/helpers.js +17 -0
- package/dist/es/pages/system-page/index.js +132 -0
- package/dist/es/pages/system-page/model.js +217 -0
- package/dist/es/pages/system-page/search.js +24 -0
- package/dist/es/permissions.js +37 -0
- package/dist/es/types/enums.js +39 -0
- package/dist/es/types/index.js +3 -0
- package/dist/types/api/crud-api.d.ts +42 -0
- package/dist/types/api/index.d.ts +5 -0
- package/dist/types/api/log-api.d.ts +10 -0
- package/dist/types/api/ops-api.d.ts +17 -0
- package/dist/types/api/query.d.ts +16 -0
- package/dist/types/api/stats-api.d.ts +12 -0
- package/dist/types/components/auth-params/index.d.ts +87 -0
- package/dist/types/components/directory/index.d.ts +30 -0
- package/dist/types/components/form-section/index.d.ts +22 -0
- package/dist/types/components/format.d.ts +4 -0
- package/dist/types/components/index.d.ts +13 -0
- package/dist/types/components/json-view/index.d.ts +9 -0
- package/dist/types/components/params-editor/index.d.ts +21 -0
- package/dist/types/components/script-doc/completions.d.ts +45 -0
- package/dist/types/components/script-doc/index.d.ts +19 -0
- package/dist/types/components/status/colors.d.ts +13 -0
- package/dist/types/components/status/index.d.ts +25 -0
- package/dist/types/components/status/labels.d.ts +17 -0
- package/dist/types/components/test-connection/index.d.ts +12 -0
- package/dist/types/components/wire-trace/index.d.ts +9 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/pages/adapter-page/columns.d.ts +7 -0
- package/dist/types/pages/adapter-page/form.d.ts +8 -0
- package/dist/types/pages/adapter-page/index.d.ts +5 -0
- package/dist/types/pages/adapter-page/props.d.ts +16 -0
- package/dist/types/pages/adapter-page/search.d.ts +4 -0
- package/dist/types/pages/console-page/diagnostics.d.ts +7 -0
- package/dist/types/pages/console-page/dry-run.d.ts +10 -0
- package/dist/types/pages/console-page/index.d.ts +21 -0
- package/dist/types/pages/console-page/log.d.ts +4 -0
- package/dist/types/pages/console-page/stats.d.ts +4 -0
- package/dist/types/pages/contract-page/columns.d.ts +3 -0
- package/dist/types/pages/contract-page/form.d.ts +8 -0
- package/dist/types/pages/contract-page/index.d.ts +5 -0
- package/dist/types/pages/contract-page/json-schema-completions.d.ts +6 -0
- package/dist/types/pages/contract-page/model.d.ts +28 -0
- package/dist/types/pages/contract-page/props.d.ts +16 -0
- package/dist/types/pages/contract-page/search.d.ts +4 -0
- package/dist/types/pages/index.d.ts +9 -0
- package/dist/types/pages/route-page/columns.d.ts +4 -0
- package/dist/types/pages/route-page/form.d.ts +4 -0
- package/dist/types/pages/route-page/index.d.ts +5 -0
- package/dist/types/pages/route-page/props.d.ts +16 -0
- package/dist/types/pages/route-page/search.d.ts +4 -0
- package/dist/types/pages/system-page/columns.d.ts +3 -0
- package/dist/types/pages/system-page/form.d.ts +9 -0
- package/dist/types/pages/system-page/index.d.ts +2 -0
- package/dist/types/pages/system-page/model.d.ts +87 -0
- package/dist/types/pages/system-page/props.d.ts +20 -0
- package/dist/types/pages/system-page/search.d.ts +4 -0
- package/dist/types/permissions.d.ts +49 -0
- package/dist/types/types/adapter.d.ts +36 -0
- package/dist/types/types/base.d.ts +14 -0
- package/dist/types/types/contract.d.ts +47 -0
- package/dist/types/types/diagnostics.d.ts +22 -0
- package/dist/types/types/enums.d.ts +43 -0
- package/dist/types/types/index.d.ts +11 -0
- package/dist/types/types/json.d.ts +10 -0
- package/dist/types/types/log.d.ts +46 -0
- package/dist/types/types/ops.d.ts +90 -0
- package/dist/types/types/route.d.ts +32 -0
- package/dist/types/types/stats.d.ts +23 -0
- package/dist/types/types/system.d.ts +117 -0
- package/package.json +66 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ScriptDoc } from './completions';
|
|
3
|
+
export interface ScriptDocLabelProps {
|
|
4
|
+
/**
|
|
5
|
+
* The visible label text the help icon follows.
|
|
6
|
+
*/
|
|
7
|
+
label: ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* The script surface's documentation — the same catalog that powers the
|
|
10
|
+
* editor's completions.
|
|
11
|
+
*/
|
|
12
|
+
doc: ScriptDoc;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* A script-editor label with a help icon: hovering it opens the surface's
|
|
16
|
+
* full documentation (contract summary, bindings, libraries and functions),
|
|
17
|
+
* rendered from the completion catalog so the two can never drift apart.
|
|
18
|
+
*/
|
|
19
|
+
export declare function ScriptDocLabel({ label, doc }: ScriptDocLabelProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Direction, FailureKind, RouteFindingKind } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Status colors, expressed as antd Tag color tokens so they resolve through
|
|
4
|
+
* the framework theme (and flip with the dark algorithm) with no hardcoding.
|
|
5
|
+
* The two directions get distinct preset hues; failures and findings map onto
|
|
6
|
+
* the semantic warning/error scenes by severity.
|
|
7
|
+
*/
|
|
8
|
+
export declare const DIRECTION_COLORS: Record<Direction, string>;
|
|
9
|
+
export declare const FAILURE_KIND_COLORS: Record<FailureKind, string>;
|
|
10
|
+
/**
|
|
11
|
+
* Whether a routing finding is an error (a broken route) or informational (a gap).
|
|
12
|
+
*/
|
|
13
|
+
export declare const ROUTE_FINDING_SEVERITY: Record<RouteFindingKind, "error" | "warning">;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Direction, FailureKind, RouteFindingKind } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* The flow direction as a colored tag — outbound and inbound get distinct hues.
|
|
4
|
+
*/
|
|
5
|
+
export declare function DirectionTag({ direction }: {
|
|
6
|
+
direction: Direction;
|
|
7
|
+
}): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
8
|
+
/**
|
|
9
|
+
* An enabled/disabled state as a success/neutral tag.
|
|
10
|
+
*/
|
|
11
|
+
export declare function EnabledTag({ enabled }: {
|
|
12
|
+
enabled: boolean;
|
|
13
|
+
}): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
14
|
+
/**
|
|
15
|
+
* An invocation outcome: a success tag when there is no failure, else the classified failure.
|
|
16
|
+
*/
|
|
17
|
+
export declare function FailureKindTag({ failureKind }: {
|
|
18
|
+
failureKind?: FailureKind | "" | null;
|
|
19
|
+
}): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
20
|
+
/**
|
|
21
|
+
* A routing-diagnosis finding kind, colored by severity.
|
|
22
|
+
*/
|
|
23
|
+
export declare function FindingKindTag({ kind }: {
|
|
24
|
+
kind: RouteFindingKind;
|
|
25
|
+
}): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Direction, FailureKind, RouteFindingKind } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Display labels for the shared vocabularies, one place so every view agrees.
|
|
4
|
+
*/
|
|
5
|
+
export declare const DIRECTION_LABELS: Record<Direction, string>;
|
|
6
|
+
/**
|
|
7
|
+
* Select/segmented options for the two flow directions, derived from the
|
|
8
|
+
* labels so every direction picker stays in lockstep.
|
|
9
|
+
*/
|
|
10
|
+
export declare const DIRECTION_OPTIONS: Array<{
|
|
11
|
+
label: string;
|
|
12
|
+
value: Direction;
|
|
13
|
+
}>;
|
|
14
|
+
export declare const FAILURE_KIND_LABELS: Record<FailureKind, string>;
|
|
15
|
+
export declare const ROUTE_FINDING_KIND_LABELS: Record<RouteFindingKind, string>;
|
|
16
|
+
export declare const OUTBOUND_AUTH_SCHEME_LABELS: Record<string, string>;
|
|
17
|
+
export declare const INBOUND_AUTH_SCHEME_LABELS: Record<string, string>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { System } from '../../types';
|
|
2
|
+
export interface TestConnectionDrawerProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
system: System | null;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* A drawer that probes a saved system's configured transports (HTTP and
|
|
9
|
+
* database) and shows what each probe found. The HTTP method/path inputs only
|
|
10
|
+
* render when the system actually has a Base URL to probe.
|
|
11
|
+
*/
|
|
12
|
+
export declare function TestConnectionDrawer({ open, system, onClose }: TestConnectionDrawerProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HttpExchange } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* The captured HTTP exchanges of an invocation, rendered as a timeline. The
|
|
4
|
+
* trace may be null (an invocation that issued no HTTP call serializes to a
|
|
5
|
+
* null slice), which reads as an empty timeline.
|
|
6
|
+
*/
|
|
7
|
+
export declare function WireTraceTimeline({ trace }: {
|
|
8
|
+
trace: HttpExchange[] | null | undefined;
|
|
9
|
+
}): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from './api';
|
|
2
|
+
export * from './components';
|
|
3
|
+
export * from './pages';
|
|
4
|
+
export { INTEGRATION_PERMISSIONS } from './permissions';
|
|
5
|
+
export type { AdapterPermissionCodes, ContractPermissionCodes, IntegrationPermissions, LogPermissionCodes, OpsPermissionCodes, RoutePermissionCodes, SystemPermissionCodes } from './permissions';
|
|
6
|
+
export * from './types';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TableColumn } from '@vef-framework-react/components';
|
|
2
|
+
import { Directory } from '../../components';
|
|
3
|
+
import { Adapter, Contract, System } from '../../types';
|
|
4
|
+
/**
|
|
5
|
+
* Build the adapter columns closed over the system/contract directories.
|
|
6
|
+
*/
|
|
7
|
+
export declare function buildAdapterColumns(systemDir: Directory<System>, contractDir: Directory<Contract>): Array<TableColumn<Adapter>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CrudBasicFormScene } from '@vef-framework-react/components';
|
|
2
|
+
export interface AdapterFormProps {
|
|
3
|
+
scene: CrudBasicFormScene;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* The create/update form body for an adapter: identity plus the translation script.
|
|
7
|
+
*/
|
|
8
|
+
export declare function AdapterForm({ scene }: AdapterFormProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IntegrationAdapterPageProps } from './props';
|
|
2
|
+
/**
|
|
3
|
+
* Full-page adapter management: the per-system-per-contract translation scripts, one per direction.
|
|
4
|
+
*/
|
|
5
|
+
export declare function IntegrationAdapterPage({ permissions, columnStorageKey, title }: IntegrationAdapterPageProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { AdapterPermissionCodes } from '../../permissions';
|
|
3
|
+
export interface IntegrationAdapterPageProps {
|
|
4
|
+
/**
|
|
5
|
+
* Override the permission codes the page gates its actions on. Defaults to `INTEGRATION_PERMISSIONS.adapter`.
|
|
6
|
+
*/
|
|
7
|
+
permissions?: Partial<AdapterPermissionCodes>;
|
|
8
|
+
/**
|
|
9
|
+
* Storage key for the column-settings panel.
|
|
10
|
+
*/
|
|
11
|
+
columnStorageKey?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Optional page title rendered above the table.
|
|
14
|
+
*/
|
|
15
|
+
title?: ReactNode;
|
|
16
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface DiagnosticsPanelProps {
|
|
2
|
+
permission: string;
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* The on-demand routing diagnosis: run it, then read findings grouped by kind.
|
|
6
|
+
*/
|
|
7
|
+
export declare function DiagnosticsPanel({ permission }: DiagnosticsPanelProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface DryRunPanelProps {
|
|
2
|
+
outboundPermission: string;
|
|
3
|
+
inboundPermission: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* The script test console, laid out as a request → result workbench. An
|
|
7
|
+
* outbound dry run calls the real external system; an inbound dry run stubs
|
|
8
|
+
* the business handler and records nothing.
|
|
9
|
+
*/
|
|
10
|
+
export declare function DryRunPanel({ outboundPermission, inboundPermission }: DryRunPanelProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface IntegrationConsolePageProps {
|
|
3
|
+
/**
|
|
4
|
+
* Override the permission codes gating each console tab.
|
|
5
|
+
*/
|
|
6
|
+
permissions?: {
|
|
7
|
+
dryRun?: string;
|
|
8
|
+
dryRunInbound?: string;
|
|
9
|
+
diagnoseRoutes?: string;
|
|
10
|
+
logQuery?: string;
|
|
11
|
+
statsView?: string;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Optional page title.
|
|
15
|
+
*/
|
|
16
|
+
title?: ReactNode;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The integration engine operations console: dry-run, diagnostics, logs, and stats.
|
|
20
|
+
*/
|
|
21
|
+
export declare function IntegrationConsolePage({ permissions, title }: IntegrationConsolePageProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CrudBasicFormScene } from '@vef-framework-react/components';
|
|
2
|
+
export interface ContractFormProps {
|
|
3
|
+
scene: CrudBasicFormScene;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* The create/update form body for a contract.
|
|
7
|
+
*/
|
|
8
|
+
export declare function ContractForm({ scene }: ContractFormProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IntegrationContractPageProps } from './props';
|
|
2
|
+
/**
|
|
3
|
+
* Full-page contract management: list, search, create/update with JSON Schema editors, and delete.
|
|
4
|
+
*/
|
|
5
|
+
export declare function IntegrationContractPage({ permissions, columnStorageKey, title }: IntegrationContractPageProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CompletionEntry } from '@vef-framework-react/components';
|
|
2
|
+
/**
|
|
3
|
+
* JSON Schema draft 2020-12 keyword catalog for the contract schema editors.
|
|
4
|
+
* Entries complete as object keys inside the JSON documents.
|
|
5
|
+
*/
|
|
6
|
+
export declare const JSON_SCHEMA_COMPLETIONS: CompletionEntry[];
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Contract, ContractParams } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* The contract form's values. The two JSON Schemas are edited as text in a
|
|
4
|
+
* code editor, so they are strings here and converted to/from the model's
|
|
5
|
+
* object form at the edit and submit boundaries.
|
|
6
|
+
*/
|
|
7
|
+
export interface ContractFormValues {
|
|
8
|
+
id?: string;
|
|
9
|
+
code: string;
|
|
10
|
+
name: string;
|
|
11
|
+
description?: string | null;
|
|
12
|
+
labels: Record<string, string>;
|
|
13
|
+
inputSchema: string;
|
|
14
|
+
outputSchema: string;
|
|
15
|
+
isEnabled: boolean;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Project a saved contract into the editable form values (schemas as text).
|
|
19
|
+
*/
|
|
20
|
+
export declare function contractToFormValues(row: Contract): ContractFormValues;
|
|
21
|
+
/**
|
|
22
|
+
* Convert the form values back into the API params (schemas parsed to objects).
|
|
23
|
+
*/
|
|
24
|
+
export declare function formValuesToParams(values: ContractFormValues): ContractParams;
|
|
25
|
+
/**
|
|
26
|
+
* Defaults for a newly created contract.
|
|
27
|
+
*/
|
|
28
|
+
export declare const CONTRACT_FORM_DEFAULTS: ContractFormValues;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ContractPermissionCodes } from '../../permissions';
|
|
3
|
+
export interface IntegrationContractPageProps {
|
|
4
|
+
/**
|
|
5
|
+
* Override the permission codes the page gates its actions on. Defaults to `INTEGRATION_PERMISSIONS.contract`.
|
|
6
|
+
*/
|
|
7
|
+
permissions?: Partial<ContractPermissionCodes>;
|
|
8
|
+
/**
|
|
9
|
+
* Storage key for the column-settings panel.
|
|
10
|
+
*/
|
|
11
|
+
columnStorageKey?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Optional page title rendered above the table.
|
|
14
|
+
*/
|
|
15
|
+
title?: ReactNode;
|
|
16
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { IntegrationAdapterPage } from './adapter-page';
|
|
2
|
+
export type { IntegrationAdapterPageProps } from './adapter-page/props';
|
|
3
|
+
export { IntegrationConsolePage, type IntegrationConsolePageProps } from './console-page';
|
|
4
|
+
export { IntegrationContractPage } from './contract-page';
|
|
5
|
+
export type { IntegrationContractPageProps } from './contract-page/props';
|
|
6
|
+
export { IntegrationRoutePage } from './route-page';
|
|
7
|
+
export type { IntegrationRoutePageProps } from './route-page/props';
|
|
8
|
+
export { IntegrationSystemPage } from './system-page';
|
|
9
|
+
export type { IntegrationSystemPageProps } from './system-page/props';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { TableColumn } from '@vef-framework-react/components';
|
|
2
|
+
import { Directory } from '../../components';
|
|
3
|
+
import { Contract, Route, System } from '../../types';
|
|
4
|
+
export declare function buildRouteColumns(systemDir: Directory<System>, contractDir: Directory<Contract>): Array<TableColumn<Route>>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IntegrationRoutePageProps } from './props';
|
|
2
|
+
/**
|
|
3
|
+
* Full-page route management: map route keys to the system serving a contract.
|
|
4
|
+
*/
|
|
5
|
+
export declare function IntegrationRoutePage({ permissions, columnStorageKey, title }: IntegrationRoutePageProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { RoutePermissionCodes } from '../../permissions';
|
|
3
|
+
export interface IntegrationRoutePageProps {
|
|
4
|
+
/**
|
|
5
|
+
* Override the permission codes the page gates its actions on. Defaults to `INTEGRATION_PERMISSIONS.route`.
|
|
6
|
+
*/
|
|
7
|
+
permissions?: Partial<RoutePermissionCodes>;
|
|
8
|
+
/**
|
|
9
|
+
* Storage key for the column-settings panel.
|
|
10
|
+
*/
|
|
11
|
+
columnStorageKey?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Optional page title rendered above the table.
|
|
14
|
+
*/
|
|
15
|
+
title?: ReactNode;
|
|
16
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CrudBasicFormScene } from '@vef-framework-react/components';
|
|
2
|
+
export interface SystemFormProps {
|
|
3
|
+
scene: CrudBasicFormScene;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* The create/update form body for a system: always-on basics and outbound
|
|
7
|
+
* auth, then the optional capabilities, each toggled from its section header.
|
|
8
|
+
*/
|
|
9
|
+
export declare function SystemForm({ scene }: SystemFormProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { System, SystemParams } from '../../types';
|
|
2
|
+
interface DataSourceFormValues {
|
|
3
|
+
kind: string;
|
|
4
|
+
mode: string;
|
|
5
|
+
host: string;
|
|
6
|
+
port: number;
|
|
7
|
+
user: string;
|
|
8
|
+
password: string;
|
|
9
|
+
database: string;
|
|
10
|
+
schema: string;
|
|
11
|
+
path: string;
|
|
12
|
+
sslMode: string;
|
|
13
|
+
sslRootCert: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The system form's values. The optional config sections carry an `enabled`
|
|
17
|
+
* flag so they can be toggled on/off; they are collapsed back to `null` (or
|
|
18
|
+
* omitted params) when converted to the API model.
|
|
19
|
+
*/
|
|
20
|
+
export interface SystemFormValues {
|
|
21
|
+
id?: string;
|
|
22
|
+
code: string;
|
|
23
|
+
name: string;
|
|
24
|
+
baseUrl: string;
|
|
25
|
+
params: Record<string, string>;
|
|
26
|
+
timeoutMs: number;
|
|
27
|
+
isEnabled: boolean;
|
|
28
|
+
outboundAuth: {
|
|
29
|
+
scheme: string;
|
|
30
|
+
params: Record<string, string>;
|
|
31
|
+
script: string;
|
|
32
|
+
};
|
|
33
|
+
envelopeEnabled: boolean;
|
|
34
|
+
envelope: {
|
|
35
|
+
request: string;
|
|
36
|
+
response: string;
|
|
37
|
+
};
|
|
38
|
+
inboundEnabled: boolean;
|
|
39
|
+
inboundAuth: {
|
|
40
|
+
scheme: string;
|
|
41
|
+
params: Record<string, string>;
|
|
42
|
+
script: string;
|
|
43
|
+
};
|
|
44
|
+
dataSourceEnabled: boolean;
|
|
45
|
+
dataSource: DataSourceFormValues;
|
|
46
|
+
retryEnabled: boolean;
|
|
47
|
+
retry: {
|
|
48
|
+
maxAttempts: number;
|
|
49
|
+
initialBackoffMs: number;
|
|
50
|
+
maxBackoffMs: number;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Project a saved system into editable form values (masked secrets carried through).
|
|
55
|
+
*/
|
|
56
|
+
export declare function systemToFormValues(row: System): SystemFormValues;
|
|
57
|
+
/**
|
|
58
|
+
* Convert the form values into the API params, collapsing disabled sections.
|
|
59
|
+
*/
|
|
60
|
+
export declare function systemFormToParams(values: SystemFormValues): SystemParams;
|
|
61
|
+
/**
|
|
62
|
+
* Defaults for a newly created system.
|
|
63
|
+
*/
|
|
64
|
+
export declare const SYSTEM_FORM_DEFAULTS: SystemFormValues;
|
|
65
|
+
export declare const DB_KIND_OPTIONS: {
|
|
66
|
+
label: string;
|
|
67
|
+
value: string;
|
|
68
|
+
}[];
|
|
69
|
+
export declare const SSL_MODE_OPTIONS: {
|
|
70
|
+
label: string;
|
|
71
|
+
value: string;
|
|
72
|
+
}[];
|
|
73
|
+
export declare const DATA_SOURCE_MODE_OPTIONS: {
|
|
74
|
+
label: string;
|
|
75
|
+
value: string;
|
|
76
|
+
}[];
|
|
77
|
+
export declare const OUTBOUND_AUTH_SCHEME_OPTIONS: {
|
|
78
|
+
label: string;
|
|
79
|
+
value: "none" | "query" | "header" | "script" | "signature" | "http_basic" | "bearer";
|
|
80
|
+
}[];
|
|
81
|
+
export declare const INBOUND_AUTH_SCHEME_OPTIONS: {
|
|
82
|
+
label: string;
|
|
83
|
+
value: "none" | "query" | "header" | "script" | "signature" | "http_basic" | "bearer" | "ip";
|
|
84
|
+
}[];
|
|
85
|
+
export declare const OUTBOUND_AUTH_HINTS: Record<string, string>;
|
|
86
|
+
export declare const INBOUND_AUTH_HINTS: Record<string, string>;
|
|
87
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { SystemPermissionCodes } from '../../permissions';
|
|
3
|
+
export interface IntegrationSystemPageProps {
|
|
4
|
+
/**
|
|
5
|
+
* Override the permission codes the page gates its CRUD actions on. Defaults to `INTEGRATION_PERMISSIONS.system`.
|
|
6
|
+
*/
|
|
7
|
+
permissions?: Partial<SystemPermissionCodes>;
|
|
8
|
+
/**
|
|
9
|
+
* Permission code for the test-connection action. Defaults to `INTEGRATION_PERMISSIONS.ops.testConnection`.
|
|
10
|
+
*/
|
|
11
|
+
testConnectionPermission?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Storage key for the column-settings panel.
|
|
14
|
+
*/
|
|
15
|
+
columnStorageKey?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Optional page title rendered above the table.
|
|
18
|
+
*/
|
|
19
|
+
title?: ReactNode;
|
|
20
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Permission codes for the integration engine management API, mirroring the
|
|
3
|
+
* backend `RequiredPermission` strings verbatim. These are the lockstep
|
|
4
|
+
* anchors between the Go resources and the React pages: every page defaults
|
|
5
|
+
* its permission gates to the matching entry here, and a business system
|
|
6
|
+
* overrides them through the page's `permissions` prop.
|
|
7
|
+
*/
|
|
8
|
+
export declare const INTEGRATION_PERMISSIONS: {
|
|
9
|
+
readonly contract: {
|
|
10
|
+
readonly query: "integration.contract.query";
|
|
11
|
+
readonly create: "integration.contract.create";
|
|
12
|
+
readonly update: "integration.contract.update";
|
|
13
|
+
readonly delete: "integration.contract.delete";
|
|
14
|
+
};
|
|
15
|
+
readonly system: {
|
|
16
|
+
readonly query: "integration.system.query";
|
|
17
|
+
readonly create: "integration.system.create";
|
|
18
|
+
readonly update: "integration.system.update";
|
|
19
|
+
readonly delete: "integration.system.delete";
|
|
20
|
+
};
|
|
21
|
+
readonly adapter: {
|
|
22
|
+
readonly query: "integration.adapter.query";
|
|
23
|
+
readonly create: "integration.adapter.create";
|
|
24
|
+
readonly update: "integration.adapter.update";
|
|
25
|
+
readonly delete: "integration.adapter.delete";
|
|
26
|
+
};
|
|
27
|
+
readonly route: {
|
|
28
|
+
readonly query: "integration.route.query";
|
|
29
|
+
readonly create: "integration.route.create";
|
|
30
|
+
readonly update: "integration.route.update";
|
|
31
|
+
readonly delete: "integration.route.delete";
|
|
32
|
+
};
|
|
33
|
+
readonly log: {
|
|
34
|
+
readonly query: "integration.log.query";
|
|
35
|
+
};
|
|
36
|
+
readonly ops: {
|
|
37
|
+
readonly dryRun: "integration.ops.dry_run";
|
|
38
|
+
readonly dryRunInbound: "integration.ops.dry_run_inbound";
|
|
39
|
+
readonly testConnection: "integration.ops.test_connection";
|
|
40
|
+
readonly diagnoseRoutes: "integration.ops.diagnose_routes";
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
export type IntegrationPermissions = typeof INTEGRATION_PERMISSIONS;
|
|
44
|
+
export type ContractPermissionCodes = IntegrationPermissions["contract"];
|
|
45
|
+
export type SystemPermissionCodes = IntegrationPermissions["system"];
|
|
46
|
+
export type AdapterPermissionCodes = IntegrationPermissions["adapter"];
|
|
47
|
+
export type RoutePermissionCodes = IntegrationPermissions["route"];
|
|
48
|
+
export type LogPermissionCodes = IntegrationPermissions["log"];
|
|
49
|
+
export type OpsPermissionCodes = IntegrationPermissions["ops"];
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { FullAudited } from './base';
|
|
2
|
+
import { Direction } from './enums';
|
|
3
|
+
/**
|
|
4
|
+
* One system-to-contract binding in one flow direction: a script translating
|
|
5
|
+
* between the system's wire format and the contract's standard models.
|
|
6
|
+
* Mirrors the Go `integration.Adapter`.
|
|
7
|
+
*/
|
|
8
|
+
export interface Adapter extends FullAudited {
|
|
9
|
+
systemId: string;
|
|
10
|
+
contractId: string;
|
|
11
|
+
direction: Direction;
|
|
12
|
+
script: string;
|
|
13
|
+
timeoutMs?: number;
|
|
14
|
+
isEnabled: boolean;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Create/update parameters for an adapter; an omitted direction is outbound.
|
|
18
|
+
*/
|
|
19
|
+
export interface AdapterParams {
|
|
20
|
+
id?: string;
|
|
21
|
+
systemId: string;
|
|
22
|
+
contractId: string;
|
|
23
|
+
direction?: Direction;
|
|
24
|
+
script: string;
|
|
25
|
+
timeoutMs?: number;
|
|
26
|
+
isEnabled: boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Search parameters for adapters.
|
|
30
|
+
*/
|
|
31
|
+
export interface AdapterSearch {
|
|
32
|
+
systemId?: string;
|
|
33
|
+
contractId?: string;
|
|
34
|
+
direction?: Direction;
|
|
35
|
+
isEnabled?: boolean;
|
|
36
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Audit envelopes shared by the integration models. They mirror the Go
|
|
3
|
+
* `orm.CreationAuditedModel` and `orm.FullAuditedModel` embeds: a management
|
|
4
|
+
* list row carries the id and the audit fields the server projects.
|
|
5
|
+
*/
|
|
6
|
+
export interface CreationAudited {
|
|
7
|
+
id: string;
|
|
8
|
+
createdAt?: string;
|
|
9
|
+
createdBy?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface FullAudited extends CreationAudited {
|
|
12
|
+
updatedAt?: string;
|
|
13
|
+
updatedBy?: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { FullAudited } from './base';
|
|
2
|
+
import { JsonObject } from './json';
|
|
3
|
+
/**
|
|
4
|
+
* A self-contained JSON Schema (draft 2020-12) document.
|
|
5
|
+
*/
|
|
6
|
+
export type JsonSchema = JsonObject;
|
|
7
|
+
/**
|
|
8
|
+
* A standard integration operation: the input and output models every
|
|
9
|
+
* provider adapter must honor. Mirrors the Go `integration.Contract`.
|
|
10
|
+
*/
|
|
11
|
+
export interface Contract extends FullAudited {
|
|
12
|
+
code: string;
|
|
13
|
+
name: string;
|
|
14
|
+
description?: string | null;
|
|
15
|
+
/**
|
|
16
|
+
* Host-owned selection metadata; the engine stores and filters, never interprets.
|
|
17
|
+
*/
|
|
18
|
+
labels?: Record<string, string> | null;
|
|
19
|
+
inputSchema?: JsonSchema | null;
|
|
20
|
+
outputSchema?: JsonSchema | null;
|
|
21
|
+
isEnabled: boolean;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Create/update parameters for a contract; `id` is empty on create.
|
|
25
|
+
*/
|
|
26
|
+
export interface ContractParams {
|
|
27
|
+
id?: string;
|
|
28
|
+
code: string;
|
|
29
|
+
name: string;
|
|
30
|
+
description?: string | null;
|
|
31
|
+
labels?: Record<string, string>;
|
|
32
|
+
inputSchema?: JsonSchema | null;
|
|
33
|
+
outputSchema?: JsonSchema | null;
|
|
34
|
+
isEnabled: boolean;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Search parameters for contracts.
|
|
38
|
+
*/
|
|
39
|
+
export interface ContractSearch {
|
|
40
|
+
code?: string;
|
|
41
|
+
name?: string;
|
|
42
|
+
isEnabled?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Equality filter: every pair must match (unlabeled contracts never match).
|
|
45
|
+
*/
|
|
46
|
+
labels?: Record<string, string>;
|
|
47
|
+
}
|