@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.
Files changed (172) hide show
  1. package/LICENSE +201 -0
  2. package/dist/cjs/_internal/_rolldown/runtime.cjs +1 -0
  3. package/dist/cjs/api/crud-api.cjs +1 -0
  4. package/dist/cjs/api/index.cjs +1 -0
  5. package/dist/cjs/api/log-api.cjs +1 -0
  6. package/dist/cjs/api/ops-api.cjs +1 -0
  7. package/dist/cjs/api/query.cjs +1 -0
  8. package/dist/cjs/api/stats-api.cjs +1 -0
  9. package/dist/cjs/components/auth-params/index.cjs +1 -0
  10. package/dist/cjs/components/directory/index.cjs +1 -0
  11. package/dist/cjs/components/form-section/index.cjs +1 -0
  12. package/dist/cjs/components/format.cjs +1 -0
  13. package/dist/cjs/components/index.cjs +1 -0
  14. package/dist/cjs/components/json-view/index.cjs +1 -0
  15. package/dist/cjs/components/params-editor/index.cjs +1 -0
  16. package/dist/cjs/components/script-doc/completions.cjs +1 -0
  17. package/dist/cjs/components/script-doc/index.cjs +1 -0
  18. package/dist/cjs/components/status/colors.cjs +1 -0
  19. package/dist/cjs/components/status/index.cjs +1 -0
  20. package/dist/cjs/components/status/labels.cjs +1 -0
  21. package/dist/cjs/components/test-connection/index.cjs +1 -0
  22. package/dist/cjs/components/wire-trace/index.cjs +1 -0
  23. package/dist/cjs/index.cjs +1 -0
  24. package/dist/cjs/pages/adapter-page/columns.cjs +2 -0
  25. package/dist/cjs/pages/adapter-page/form.cjs +1 -0
  26. package/dist/cjs/pages/adapter-page/helpers.cjs +4 -0
  27. package/dist/cjs/pages/adapter-page/index.cjs +1 -0
  28. package/dist/cjs/pages/adapter-page/search.cjs +1 -0
  29. package/dist/cjs/pages/console-page/diagnostics.cjs +1 -0
  30. package/dist/cjs/pages/console-page/dry-run.cjs +1 -0
  31. package/dist/cjs/pages/console-page/index.cjs +1 -0
  32. package/dist/cjs/pages/console-page/log.cjs +1 -0
  33. package/dist/cjs/pages/console-page/stats.cjs +1 -0
  34. package/dist/cjs/pages/contract-page/columns.cjs +1 -0
  35. package/dist/cjs/pages/contract-page/form.cjs +1 -0
  36. package/dist/cjs/pages/contract-page/helpers.cjs +1 -0
  37. package/dist/cjs/pages/contract-page/index.cjs +1 -0
  38. package/dist/cjs/pages/contract-page/json-schema-completions.cjs +1 -0
  39. package/dist/cjs/pages/contract-page/model.cjs +1 -0
  40. package/dist/cjs/pages/contract-page/search.cjs +1 -0
  41. package/dist/cjs/pages/index.cjs +1 -0
  42. package/dist/cjs/pages/route-page/columns.cjs +1 -0
  43. package/dist/cjs/pages/route-page/form.cjs +1 -0
  44. package/dist/cjs/pages/route-page/helpers.cjs +1 -0
  45. package/dist/cjs/pages/route-page/index.cjs +1 -0
  46. package/dist/cjs/pages/route-page/search.cjs +1 -0
  47. package/dist/cjs/pages/system-page/columns.cjs +1 -0
  48. package/dist/cjs/pages/system-page/form.cjs +1 -0
  49. package/dist/cjs/pages/system-page/helpers.cjs +1 -0
  50. package/dist/cjs/pages/system-page/index.cjs +1 -0
  51. package/dist/cjs/pages/system-page/model.cjs +1 -0
  52. package/dist/cjs/pages/system-page/search.cjs +1 -0
  53. package/dist/cjs/permissions.cjs +1 -0
  54. package/dist/cjs/types/enums.cjs +1 -0
  55. package/dist/cjs/types/index.cjs +1 -0
  56. package/dist/es/api/crud-api.js +35 -0
  57. package/dist/es/api/index.js +7 -0
  58. package/dist/es/api/log-api.js +14 -0
  59. package/dist/es/api/ops-api.js +16 -0
  60. package/dist/es/api/query.js +13 -0
  61. package/dist/es/api/stats-api.js +11 -0
  62. package/dist/es/components/auth-params/index.js +198 -0
  63. package/dist/es/components/directory/index.js +35 -0
  64. package/dist/es/components/form-section/index.js +44 -0
  65. package/dist/es/components/format.js +8 -0
  66. package/dist/es/components/index.js +15 -0
  67. package/dist/es/components/json-view/index.js +15 -0
  68. package/dist/es/components/params-editor/index.js +61 -0
  69. package/dist/es/components/script-doc/completions.js +507 -0
  70. package/dist/es/components/script-doc/index.js +108 -0
  71. package/dist/es/components/status/colors.js +25 -0
  72. package/dist/es/components/status/index.js +35 -0
  73. package/dist/es/components/status/labels.js +46 -0
  74. package/dist/es/components/test-connection/index.js +156 -0
  75. package/dist/es/components/wire-trace/index.js +119 -0
  76. package/dist/es/index.js +27 -0
  77. package/dist/es/pages/adapter-page/columns.js +61 -0
  78. package/dist/es/pages/adapter-page/form.js +110 -0
  79. package/dist/es/pages/adapter-page/helpers.js +23 -0
  80. package/dist/es/pages/adapter-page/index.js +120 -0
  81. package/dist/es/pages/adapter-page/search.js +43 -0
  82. package/dist/es/pages/console-page/diagnostics.js +122 -0
  83. package/dist/es/pages/console-page/dry-run.js +327 -0
  84. package/dist/es/pages/console-page/index.js +64 -0
  85. package/dist/es/pages/console-page/log.js +219 -0
  86. package/dist/es/pages/console-page/stats.js +157 -0
  87. package/dist/es/pages/contract-page/columns.js +100 -0
  88. package/dist/es/pages/contract-page/form.js +123 -0
  89. package/dist/es/pages/contract-page/helpers.js +17 -0
  90. package/dist/es/pages/contract-page/index.js +116 -0
  91. package/dist/es/pages/contract-page/json-schema-completions.js +70 -0
  92. package/dist/es/pages/contract-page/model.js +47 -0
  93. package/dist/es/pages/contract-page/search.js +24 -0
  94. package/dist/es/pages/index.js +7 -0
  95. package/dist/es/pages/route-page/columns.js +47 -0
  96. package/dist/es/pages/route-page/form.js +68 -0
  97. package/dist/es/pages/route-page/helpers.js +20 -0
  98. package/dist/es/pages/route-page/index.js +119 -0
  99. package/dist/es/pages/route-page/search.js +27 -0
  100. package/dist/es/pages/system-page/columns.js +101 -0
  101. package/dist/es/pages/system-page/form.js +471 -0
  102. package/dist/es/pages/system-page/helpers.js +17 -0
  103. package/dist/es/pages/system-page/index.js +132 -0
  104. package/dist/es/pages/system-page/model.js +217 -0
  105. package/dist/es/pages/system-page/search.js +24 -0
  106. package/dist/es/permissions.js +37 -0
  107. package/dist/es/types/enums.js +39 -0
  108. package/dist/es/types/index.js +3 -0
  109. package/dist/types/api/crud-api.d.ts +42 -0
  110. package/dist/types/api/index.d.ts +5 -0
  111. package/dist/types/api/log-api.d.ts +10 -0
  112. package/dist/types/api/ops-api.d.ts +17 -0
  113. package/dist/types/api/query.d.ts +16 -0
  114. package/dist/types/api/stats-api.d.ts +12 -0
  115. package/dist/types/components/auth-params/index.d.ts +87 -0
  116. package/dist/types/components/directory/index.d.ts +30 -0
  117. package/dist/types/components/form-section/index.d.ts +22 -0
  118. package/dist/types/components/format.d.ts +4 -0
  119. package/dist/types/components/index.d.ts +13 -0
  120. package/dist/types/components/json-view/index.d.ts +9 -0
  121. package/dist/types/components/params-editor/index.d.ts +21 -0
  122. package/dist/types/components/script-doc/completions.d.ts +45 -0
  123. package/dist/types/components/script-doc/index.d.ts +19 -0
  124. package/dist/types/components/status/colors.d.ts +13 -0
  125. package/dist/types/components/status/index.d.ts +25 -0
  126. package/dist/types/components/status/labels.d.ts +17 -0
  127. package/dist/types/components/test-connection/index.d.ts +12 -0
  128. package/dist/types/components/wire-trace/index.d.ts +9 -0
  129. package/dist/types/index.d.ts +6 -0
  130. package/dist/types/pages/adapter-page/columns.d.ts +7 -0
  131. package/dist/types/pages/adapter-page/form.d.ts +8 -0
  132. package/dist/types/pages/adapter-page/index.d.ts +5 -0
  133. package/dist/types/pages/adapter-page/props.d.ts +16 -0
  134. package/dist/types/pages/adapter-page/search.d.ts +4 -0
  135. package/dist/types/pages/console-page/diagnostics.d.ts +7 -0
  136. package/dist/types/pages/console-page/dry-run.d.ts +10 -0
  137. package/dist/types/pages/console-page/index.d.ts +21 -0
  138. package/dist/types/pages/console-page/log.d.ts +4 -0
  139. package/dist/types/pages/console-page/stats.d.ts +4 -0
  140. package/dist/types/pages/contract-page/columns.d.ts +3 -0
  141. package/dist/types/pages/contract-page/form.d.ts +8 -0
  142. package/dist/types/pages/contract-page/index.d.ts +5 -0
  143. package/dist/types/pages/contract-page/json-schema-completions.d.ts +6 -0
  144. package/dist/types/pages/contract-page/model.d.ts +28 -0
  145. package/dist/types/pages/contract-page/props.d.ts +16 -0
  146. package/dist/types/pages/contract-page/search.d.ts +4 -0
  147. package/dist/types/pages/index.d.ts +9 -0
  148. package/dist/types/pages/route-page/columns.d.ts +4 -0
  149. package/dist/types/pages/route-page/form.d.ts +4 -0
  150. package/dist/types/pages/route-page/index.d.ts +5 -0
  151. package/dist/types/pages/route-page/props.d.ts +16 -0
  152. package/dist/types/pages/route-page/search.d.ts +4 -0
  153. package/dist/types/pages/system-page/columns.d.ts +3 -0
  154. package/dist/types/pages/system-page/form.d.ts +9 -0
  155. package/dist/types/pages/system-page/index.d.ts +2 -0
  156. package/dist/types/pages/system-page/model.d.ts +87 -0
  157. package/dist/types/pages/system-page/props.d.ts +20 -0
  158. package/dist/types/pages/system-page/search.d.ts +4 -0
  159. package/dist/types/permissions.d.ts +49 -0
  160. package/dist/types/types/adapter.d.ts +36 -0
  161. package/dist/types/types/base.d.ts +14 -0
  162. package/dist/types/types/contract.d.ts +47 -0
  163. package/dist/types/types/diagnostics.d.ts +22 -0
  164. package/dist/types/types/enums.d.ts +43 -0
  165. package/dist/types/types/index.d.ts +11 -0
  166. package/dist/types/types/json.d.ts +10 -0
  167. package/dist/types/types/log.d.ts +46 -0
  168. package/dist/types/types/ops.d.ts +90 -0
  169. package/dist/types/types/route.d.ts +32 -0
  170. package/dist/types/types/stats.d.ts +23 -0
  171. package/dist/types/types/system.d.ts +117 -0
  172. package/package.json +66 -0
@@ -0,0 +1,22 @@
1
+ import { RouteFindingKind } from './enums';
2
+ /**
3
+ * One routing-diagnosis finding. `routeKey` is always meaningful (an empty
4
+ * string is the default route); the code/name pairs identify the involved
5
+ * route, contract, and system so the UI needs no extra lookups. Mirrors the
6
+ * Go `integration.RouteFinding`.
7
+ */
8
+ export interface RouteFinding {
9
+ kind: RouteFindingKind;
10
+ routeId?: string;
11
+ routeKey: string;
12
+ contractCode?: string;
13
+ contractName?: string;
14
+ systemCode?: string;
15
+ systemName?: string;
16
+ }
17
+ /**
18
+ * The point-in-time report of the routing table's configuration gaps.
19
+ */
20
+ export interface RouteDiagnostics {
21
+ findings: RouteFinding[];
22
+ }
@@ -0,0 +1,43 @@
1
+ /**
2
+ * The typed vocabularies the backend shares with management UIs. Each mirrors
3
+ * a Go enum verbatim and must stay in lockstep with it; display labels and
4
+ * colors live with the presentation components, not here.
5
+ */
6
+ /**
7
+ * The two integration flows an adapter can implement.
8
+ */
9
+ export declare const DIRECTIONS: readonly ["outbound", "inbound"];
10
+ export type Direction = (typeof DIRECTIONS)[number];
11
+ /**
12
+ * How a failed invocation is classified, across the log, stats and API errors.
13
+ */
14
+ export declare const FAILURE_KINDS: readonly ["input_invalid", "output_invalid", "upstream", "transport", "timeout", "canceled", "script", "config", "auth", "handler"];
15
+ export type FailureKind = (typeof FAILURE_KINDS)[number];
16
+ /**
17
+ * How one routing-diagnosis finding is classified.
18
+ */
19
+ export declare const ROUTE_FINDING_KINDS: readonly ["dangling_adapter", "wildcard_gap", "disabled_system", "disabled_contract", "uncovered_contract"];
20
+ export type RouteFindingKind = (typeof ROUTE_FINDING_KINDS)[number];
21
+ /**
22
+ * Built-in outbound authentication schemes a system's `outboundAuth` may
23
+ * select.
24
+ */
25
+ export declare const OUTBOUND_AUTH_SCHEMES: readonly ["none", "http_basic", "bearer", "header", "query", "signature", "script"];
26
+ export type OutboundAuthScheme = (typeof OUTBOUND_AUTH_SCHEMES)[number];
27
+ /**
28
+ * Built-in inbound authentication schemes a system's `inboundAuth` may select.
29
+ * `ip` is inbound-only — a source address is verifiable only on receive.
30
+ */
31
+ export declare const INBOUND_AUTH_SCHEMES: readonly ["none", "ip", "http_basic", "bearer", "header", "query", "signature", "script"];
32
+ export type InboundAuthScheme = (typeof INBOUND_AUTH_SCHEMES)[number];
33
+ /**
34
+ * How far a system's data source lets adapter scripts go: read-only querying
35
+ * (the default) or full read-write exchange. An empty value means read-only.
36
+ */
37
+ export declare const DATA_SOURCE_MODES: readonly ["read_only", "read_write"];
38
+ export type DataSourceMode = (typeof DATA_SOURCE_MODES)[number];
39
+ /**
40
+ * The placeholder the management API returns in place of a stored secret.
41
+ * Submitting it back on update keeps the existing value unchanged.
42
+ */
43
+ export declare const MASKED_SECRET = "******";
@@ -0,0 +1,11 @@
1
+ export type { Adapter, AdapterParams, AdapterSearch } from './adapter';
2
+ export type { CreationAudited, FullAudited } from './base';
3
+ export type { Contract, ContractParams, ContractSearch, JsonSchema } from './contract';
4
+ export type { RouteDiagnostics, RouteFinding } from './diagnostics';
5
+ export * from './enums';
6
+ export type { JsonObject, JsonValue } from './json';
7
+ export type { HttpExchange, InvocationLog, LogSearch } from './log';
8
+ export type { ConnectionCheck, DatabaseProbe, DryRunInboundParams, DryRunParams, DryRunResult, HttpProbe, InboundDryRunResult, InboundRequestInput, TestConnectionParams } from './ops';
9
+ export type { Route, RouteParams, RouteSearch } from './route';
10
+ export type { IntegrationStatsResult, InvocationStats } from './stats';
11
+ export type { DataSourceConfig, DbKind, InboundAuthConfig, OutboundAuthConfig, OutboundEnvelopeConfig, RetryPolicy, SslMode, System, SystemParams, SystemSearch } from './system';
@@ -0,0 +1,10 @@
1
+ /**
2
+ * A JSON value — the type-safe shape of the arbitrary payloads contracts carry.
3
+ */
4
+ export type JsonValue = string | number | boolean | null | JsonValue[] | {
5
+ [key: string]: JsonValue;
6
+ };
7
+ /**
8
+ * A JSON object value.
9
+ */
10
+ export type JsonObject = Record<string, JsonValue>;
@@ -0,0 +1,46 @@
1
+ import { CreationAudited } from './base';
2
+ import { Direction, FailureKind } from './enums';
3
+ import { JsonValue } from './json';
4
+ /**
5
+ * One wire exchange captured while an adapter script ran, shared by invocation
6
+ * logs and the dry-run trace. Bodies and header values arrive masked and
7
+ * truncated. Mirrors the Go `integration.HTTPExchange`.
8
+ */
9
+ export interface HttpExchange {
10
+ method: string;
11
+ url: string;
12
+ requestHeaders?: Record<string, string>;
13
+ requestBody?: string;
14
+ status?: number;
15
+ responseHeaders?: Record<string, string>;
16
+ responseBody?: string;
17
+ durationMs: number;
18
+ error?: string;
19
+ }
20
+ /**
21
+ * One recorded invocation: its classification, timing, and the masked,
22
+ * size-capped captures. Read-only. Mirrors the Go `integration.InvocationLog`.
23
+ * `failureKind` is empty for a successful invocation.
24
+ */
25
+ export interface InvocationLog extends CreationAudited {
26
+ systemCode: string;
27
+ contractCode: string;
28
+ direction: Direction;
29
+ failureKind?: FailureKind | "";
30
+ durationMs: number;
31
+ input?: JsonValue;
32
+ output?: JsonValue;
33
+ httpTrace?: HttpExchange[] | null;
34
+ error?: string | null;
35
+ requestId: string;
36
+ }
37
+ /**
38
+ * Search parameters for invocation logs.
39
+ */
40
+ export interface LogSearch {
41
+ systemCode?: string;
42
+ contractCode?: string;
43
+ direction?: Direction;
44
+ failureKind?: FailureKind;
45
+ requestId?: string;
46
+ }
@@ -0,0 +1,90 @@
1
+ import { FailureKind } from './enums';
2
+ import { JsonValue } from './json';
3
+ import { HttpExchange } from './log';
4
+ /**
5
+ * Parameters of an outbound dry run; empty `script` falls back to the saved adapter.
6
+ */
7
+ export interface DryRunParams {
8
+ systemCode: string;
9
+ contractCode: string;
10
+ script?: string;
11
+ input?: JsonValue;
12
+ }
13
+ /**
14
+ * Outcome of an outbound dry run. The trace is populated even when the run
15
+ * failed, so operators see how far the script got. Mirrors the Go
16
+ * `exec.DryRunResult`.
17
+ */
18
+ export interface DryRunResult {
19
+ output: JsonValue;
20
+ trace: HttpExchange[] | null;
21
+ failureKind?: FailureKind | "";
22
+ error?: string;
23
+ }
24
+ /**
25
+ * The synthetic vendor request of an inbound dry run.
26
+ */
27
+ export interface InboundRequestInput {
28
+ method?: string;
29
+ path?: string;
30
+ headers?: Record<string, string>;
31
+ query?: Record<string, string>;
32
+ body?: string;
33
+ }
34
+ /**
35
+ * Parameters of an inbound dry run; `handlerOutput` is the stubbed handler's sample.
36
+ */
37
+ export interface DryRunInboundParams {
38
+ systemCode: string;
39
+ contractCode: string;
40
+ script?: string;
41
+ request: InboundRequestInput;
42
+ handlerOutput?: JsonValue;
43
+ }
44
+ /**
45
+ * Outcome of an inbound dry run: the reply the vendor would receive plus what
46
+ * the script dispatched, so both translation directions are verified at once.
47
+ * Mirrors the Go `exec.InboundDryRunResult`.
48
+ */
49
+ export interface InboundDryRunResult {
50
+ reply: JsonValue;
51
+ dispatchedInput: JsonValue;
52
+ failureKind?: FailureKind | "";
53
+ error?: string;
54
+ }
55
+ /**
56
+ * Parameters of a connection probe against a saved system.
57
+ */
58
+ export interface TestConnectionParams {
59
+ systemCode: string;
60
+ method?: string;
61
+ path?: string;
62
+ }
63
+ /**
64
+ * One probe request against the system base URL.
65
+ */
66
+ export interface HttpProbe {
67
+ reachable: boolean;
68
+ status?: number;
69
+ statusText?: string;
70
+ durationMs: number;
71
+ error?: string;
72
+ }
73
+ /**
74
+ * One throwaway connection against the system data source.
75
+ */
76
+ export interface DatabaseProbe {
77
+ reachable: boolean;
78
+ version?: string;
79
+ durationMs: number;
80
+ error?: string;
81
+ }
82
+ /**
83
+ * The outcome of probing a system's configured transports; each probe is
84
+ * present iff the system configures that transport. Mirrors the Go
85
+ * `exec.ConnectionCheck`.
86
+ */
87
+ export interface ConnectionCheck {
88
+ http?: HttpProbe;
89
+ database?: DatabaseProbe;
90
+ }
@@ -0,0 +1,32 @@
1
+ import { FullAudited } from './base';
2
+ /**
3
+ * A rule mapping a route key (tenant, branch, hospital area) to the system
4
+ * serving a contract. An empty `contractId` scopes the rule to every
5
+ * contract; an empty `routeKey` is the default route. Mirrors the Go
6
+ * `integration.Route`.
7
+ */
8
+ export interface Route extends FullAudited {
9
+ routeKey: string;
10
+ contractId: string;
11
+ systemId: string;
12
+ isEnabled: boolean;
13
+ }
14
+ /**
15
+ * Create/update parameters for a route.
16
+ */
17
+ export interface RouteParams {
18
+ id?: string;
19
+ routeKey?: string;
20
+ contractId?: string;
21
+ systemId: string;
22
+ isEnabled: boolean;
23
+ }
24
+ /**
25
+ * Search parameters for routes.
26
+ */
27
+ export interface RouteSearch {
28
+ routeKey?: string;
29
+ contractId?: string;
30
+ systemId?: string;
31
+ isEnabled?: boolean;
32
+ }
@@ -0,0 +1,23 @@
1
+ import { Direction, FailureKind } from './enums';
2
+ /**
3
+ * Per-node aggregate of the invocations of one (system, contract, direction)
4
+ * tuple since process start. Mirrors the Go `integration.InvocationStats`.
5
+ */
6
+ export interface InvocationStats {
7
+ system: string;
8
+ contract: string;
9
+ direction: Direction;
10
+ calls: number;
11
+ successes: number;
12
+ failures?: Partial<Record<FailureKind, number>>;
13
+ avgDurationMs: number;
14
+ maxDurationMs: number;
15
+ lastError?: string;
16
+ lastErrorAt?: string;
17
+ }
18
+ /**
19
+ * The `sys/monitor.get_integration_stats` response envelope.
20
+ */
21
+ export interface IntegrationStatsResult {
22
+ stats: InvocationStats[];
23
+ }
@@ -0,0 +1,117 @@
1
+ import { FullAudited } from './base';
2
+ import { DataSourceMode } from './enums';
3
+ /**
4
+ * The database kind of a system's direct data source. The exact set mirrors
5
+ * the Go `config.DBKind`; kept broad here so the form's option list is the
6
+ * single source of the offered values.
7
+ */
8
+ export type DbKind = string;
9
+ /**
10
+ * The SSL mode of a system's direct data source, mirroring `config.SSLMode`.
11
+ */
12
+ export type SslMode = string;
13
+ /**
14
+ * A system's direct database connection (vendor views / exchange tables).
15
+ * The password is stored encrypted and masked in management responses.
16
+ */
17
+ export interface DataSourceConfig {
18
+ kind: DbKind;
19
+ /**
20
+ * Gates script write access to this database; empty means read-only.
21
+ */
22
+ mode?: DataSourceMode;
23
+ host?: string;
24
+ port?: number;
25
+ user?: string;
26
+ password?: string;
27
+ database?: string;
28
+ schema?: string;
29
+ path?: string;
30
+ sslMode?: SslMode;
31
+ sslRootCert?: string;
32
+ }
33
+ /**
34
+ * A system's outbound authentication scheme and its parameters. Values named
35
+ * by the scheme's sensitive parameters arrive masked. `script` carries the
36
+ * custom signing body for the `script` scheme.
37
+ */
38
+ export interface OutboundAuthConfig {
39
+ scheme: string;
40
+ params?: Record<string, string>;
41
+ script?: string;
42
+ }
43
+ /**
44
+ * A system's outbound envelope scripts: the common wire structure most vendor
45
+ * APIs repeat on every endpoint, wrapped once at the system level. Either side
46
+ * may be empty, leaving that direction untouched.
47
+ */
48
+ export interface OutboundEnvelopeConfig {
49
+ /**
50
+ * Wrap script: shapes the request the adapter issued into the wire request.
51
+ */
52
+ request?: string;
53
+ /**
54
+ * Unwrap script: turns the raw HTTP response into the adapter's call result.
55
+ */
56
+ response?: string;
57
+ }
58
+ /**
59
+ * A system's inbound authentication scheme, verifying vendor-initiated calls.
60
+ * `script` carries the custom verification body for the `script` scheme.
61
+ */
62
+ export interface InboundAuthConfig {
63
+ scheme: string;
64
+ params?: Record<string, string>;
65
+ script?: string;
66
+ }
67
+ /**
68
+ * Declarative retry configuration for a system's outbound calls.
69
+ */
70
+ export interface RetryPolicy {
71
+ maxAttempts: number;
72
+ initialBackoffMs?: number;
73
+ maxBackoffMs?: number;
74
+ }
75
+ /**
76
+ * One external system instance: where it lives and how to authenticate with
77
+ * it in both directions. Mirrors the Go `integration.System`.
78
+ */
79
+ export interface System extends FullAudited {
80
+ code: string;
81
+ name: string;
82
+ baseUrl?: string;
83
+ outboundAuth?: OutboundAuthConfig | null;
84
+ outboundEnvelope?: OutboundEnvelopeConfig | null;
85
+ inboundAuth?: InboundAuthConfig | null;
86
+ dataSource?: DataSourceConfig | null;
87
+ params?: Record<string, string> | null;
88
+ timeoutMs?: number;
89
+ retry?: RetryPolicy | null;
90
+ isEnabled: boolean;
91
+ }
92
+ /**
93
+ * Create/update parameters for a system. Sensitive values may carry the
94
+ * masked placeholder to keep the stored secret unchanged.
95
+ */
96
+ export interface SystemParams {
97
+ id?: string;
98
+ code: string;
99
+ name: string;
100
+ baseUrl?: string;
101
+ outboundAuth?: OutboundAuthConfig | null;
102
+ outboundEnvelope?: OutboundEnvelopeConfig | null;
103
+ inboundAuth?: InboundAuthConfig | null;
104
+ dataSource?: DataSourceConfig | null;
105
+ params?: Record<string, string> | null;
106
+ timeoutMs?: number;
107
+ retry?: RetryPolicy | null;
108
+ isEnabled: boolean;
109
+ }
110
+ /**
111
+ * Search parameters for systems.
112
+ */
113
+ export interface SystemSearch {
114
+ code?: string;
115
+ name?: string;
116
+ isEnabled?: boolean;
117
+ }
package/package.json ADDED
@@ -0,0 +1,66 @@
1
+ {
2
+ "name": "@vef-framework-react/integration",
3
+ "version": "2.10.0",
4
+ "private": false,
5
+ "description": "Integration engine management pages for VEF framework",
6
+ "keywords": [
7
+ "vef",
8
+ "framework",
9
+ "react",
10
+ "integration"
11
+ ],
12
+ "homepage": "https://vef.ilxqx.com",
13
+ "license": "Apache-2.0",
14
+ "author": {
15
+ "name": "Venus",
16
+ "email": "iweixiaopeng@163.com",
17
+ "url": "https://github.com/ilxqx"
18
+ },
19
+ "sideEffects": false,
20
+ "type": "module",
21
+ "exports": {
22
+ ".": {
23
+ "vef": "./src/index.ts",
24
+ "import": {
25
+ "types": "./dist/types/index.d.ts",
26
+ "default": "./dist/es/index.js"
27
+ },
28
+ "require": {
29
+ "types": "./dist/types/index.d.ts",
30
+ "default": "./dist/cjs/index.cjs"
31
+ }
32
+ },
33
+ "./package.json": "./package.json"
34
+ },
35
+ "main": "dist/cjs/index.cjs",
36
+ "module": "dist/es/index.js",
37
+ "types": "dist/types/index.d.ts",
38
+ "files": [
39
+ "dist"
40
+ ],
41
+ "dependencies": {
42
+ "@emotion/react": "^11.14.0",
43
+ "dayjs": "^1.11.0",
44
+ "lucide-react": "^1.23.0",
45
+ "@vef-framework-react/components": "2.12.0",
46
+ "@vef-framework-react/core": "2.12.0",
47
+ "@vef-framework-react/shared": "2.12.0"
48
+ },
49
+ "devDependencies": {
50
+ "react": "^19.2.7"
51
+ },
52
+ "peerDependencies": {
53
+ "react": ">=19"
54
+ },
55
+ "engines": {
56
+ "node": ">=22.x"
57
+ },
58
+ "publishConfig": {
59
+ "access": "public"
60
+ },
61
+ "scripts": {
62
+ "build": "vite build",
63
+ "clean": "rimraf dist",
64
+ "typecheck": "tsc --noEmit"
65
+ }
66
+ }