@contractspec/example.integration-hub 3.7.5 → 3.7.7
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/README.md +70 -183
- package/dist/connection/index.d.ts +1 -1
- package/dist/events.js +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +596 -594
- package/dist/integration/index.d.ts +1 -1
- package/dist/node/events.js +1 -1
- package/dist/node/index.js +596 -594
- package/dist/node/ui/IntegrationDashboard.js +27 -27
- package/dist/node/ui/hooks/index.js +1 -1
- package/dist/node/ui/hooks/useIntegrationData.js +1 -1
- package/dist/node/ui/index.js +545 -544
- package/dist/sync/index.d.ts +3 -3
- package/dist/ui/IntegrationDashboard.js +27 -27
- package/dist/ui/hooks/index.d.ts +1 -1
- package/dist/ui/hooks/index.js +1 -1
- package/dist/ui/hooks/useIntegrationData.js +1 -1
- package/dist/ui/index.d.ts +2 -2
- package/dist/ui/index.js +545 -544
- package/dist/ui/renderers/index.d.ts +1 -1
- package/package.json +12 -12
package/dist/sync/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Sync domain - Sync configuration and execution.
|
|
3
3
|
*/
|
|
4
|
-
export { SyncDirectionEnum, SyncStatusEnum,
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
4
|
+
export { MappingTypeEnum, SyncDirectionEnum, SyncStatusEnum, } from './sync.enum';
|
|
5
|
+
export { AddFieldMappingContract, CreateSyncConfigContract, ListSyncRunsContract, TriggerSyncContract, } from './sync.operations';
|
|
6
|
+
export { AddFieldMappingInputModel, CreateSyncConfigInputModel, FieldMappingModel, ListSyncRunsInputModel, ListSyncRunsOutputModel, SyncConfigModel, SyncRunModel, TriggerSyncInputModel, } from './sync.schema';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
// src/ui/hooks/useIntegrationData.ts
|
|
3
|
-
import { useCallback, useEffect, useState } from "react";
|
|
4
3
|
import { useTemplateRuntime } from "@contractspec/lib.example-shared-ui";
|
|
4
|
+
import { useCallback, useEffect, useState } from "react";
|
|
5
5
|
"use client";
|
|
6
6
|
function useIntegrationData(projectId = "local-project") {
|
|
7
7
|
const { handlers } = useTemplateRuntime();
|
|
@@ -84,7 +84,6 @@ function IntegrationHubChat({
|
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
// src/ui/IntegrationDashboard.tsx
|
|
87
|
-
import { useState as useState2 } from "react";
|
|
88
87
|
import {
|
|
89
88
|
Button,
|
|
90
89
|
ErrorState,
|
|
@@ -92,6 +91,7 @@ import {
|
|
|
92
91
|
StatCard,
|
|
93
92
|
StatCardGroup
|
|
94
93
|
} from "@contractspec/lib.design-system";
|
|
94
|
+
import { useState as useState2 } from "react";
|
|
95
95
|
import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
|
|
96
96
|
"use client";
|
|
97
97
|
var STATUS_COLORS = {
|
|
@@ -148,7 +148,7 @@ function IntegrationDashboard() {
|
|
|
148
148
|
className: "flex items-center justify-between",
|
|
149
149
|
children: [
|
|
150
150
|
/* @__PURE__ */ jsxDEV2("h2", {
|
|
151
|
-
className: "text-2xl
|
|
151
|
+
className: "font-bold text-2xl",
|
|
152
152
|
children: "Integration Hub"
|
|
153
153
|
}, undefined, false, undefined, this),
|
|
154
154
|
/* @__PURE__ */ jsxDEV2(Button, {
|
|
@@ -183,14 +183,14 @@ function IntegrationDashboard() {
|
|
|
183
183
|
]
|
|
184
184
|
}, undefined, true, undefined, this),
|
|
185
185
|
/* @__PURE__ */ jsxDEV2("nav", {
|
|
186
|
-
className: "
|
|
186
|
+
className: "flex gap-1 rounded-lg bg-muted p-1",
|
|
187
187
|
role: "tablist",
|
|
188
188
|
children: tabs.map((tab) => /* @__PURE__ */ jsxDEV2(Button, {
|
|
189
189
|
type: "button",
|
|
190
190
|
role: "tab",
|
|
191
191
|
"aria-selected": activeTab === tab.id,
|
|
192
192
|
onClick: () => setActiveTab(tab.id),
|
|
193
|
-
className: `flex flex-1 items-center justify-center gap-2 rounded-md px-4 py-2 text-sm
|
|
193
|
+
className: `flex flex-1 items-center justify-center gap-2 rounded-md px-4 py-2 font-medium text-sm transition-colors ${activeTab === tab.id ? "bg-background text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"}`,
|
|
194
194
|
children: [
|
|
195
195
|
/* @__PURE__ */ jsxDEV2("span", {
|
|
196
196
|
children: tab.icon
|
|
@@ -207,7 +207,7 @@ function IntegrationDashboard() {
|
|
|
207
207
|
className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-3",
|
|
208
208
|
children: [
|
|
209
209
|
integrations.map((integration) => /* @__PURE__ */ jsxDEV2("div", {
|
|
210
|
-
className: "
|
|
210
|
+
className: "cursor-pointer rounded-lg border border-border bg-card p-4 transition-colors hover:bg-muted/50",
|
|
211
211
|
children: [
|
|
212
212
|
/* @__PURE__ */ jsxDEV2("div", {
|
|
213
213
|
className: "mb-3 flex items-center gap-3",
|
|
@@ -234,7 +234,7 @@ function IntegrationDashboard() {
|
|
|
234
234
|
className: "flex items-center justify-between",
|
|
235
235
|
children: [
|
|
236
236
|
/* @__PURE__ */ jsxDEV2("span", {
|
|
237
|
-
className: `inline-flex rounded-full px-2 py-0.5 text-xs
|
|
237
|
+
className: `inline-flex rounded-full px-2 py-0.5 font-medium text-xs ${STATUS_COLORS[integration.status] ?? ""}`,
|
|
238
238
|
children: integration.status
|
|
239
239
|
}, undefined, false, undefined, this),
|
|
240
240
|
/* @__PURE__ */ jsxDEV2("span", {
|
|
@@ -246,37 +246,37 @@ function IntegrationDashboard() {
|
|
|
246
246
|
]
|
|
247
247
|
}, integration.id, true, undefined, this)),
|
|
248
248
|
integrations.length === 0 && /* @__PURE__ */ jsxDEV2("div", {
|
|
249
|
-
className: "
|
|
249
|
+
className: "col-span-full flex h-64 items-center justify-center text-muted-foreground",
|
|
250
250
|
children: "No integrations configured"
|
|
251
251
|
}, undefined, false, undefined, this)
|
|
252
252
|
]
|
|
253
253
|
}, undefined, true, undefined, this),
|
|
254
254
|
activeTab === "connections" && /* @__PURE__ */ jsxDEV2("div", {
|
|
255
|
-
className: "
|
|
255
|
+
className: "rounded-lg border border-border",
|
|
256
256
|
children: /* @__PURE__ */ jsxDEV2("table", {
|
|
257
257
|
className: "w-full",
|
|
258
258
|
children: [
|
|
259
259
|
/* @__PURE__ */ jsxDEV2("thead", {
|
|
260
|
-
className: "border-border bg-muted/30
|
|
260
|
+
className: "border-border border-b bg-muted/30",
|
|
261
261
|
children: /* @__PURE__ */ jsxDEV2("tr", {
|
|
262
262
|
children: [
|
|
263
263
|
/* @__PURE__ */ jsxDEV2("th", {
|
|
264
|
-
className: "px-4 py-3 text-left text-sm
|
|
264
|
+
className: "px-4 py-3 text-left font-medium text-sm",
|
|
265
265
|
children: "Connection"
|
|
266
266
|
}, undefined, false, undefined, this),
|
|
267
267
|
/* @__PURE__ */ jsxDEV2("th", {
|
|
268
|
-
className: "px-4 py-3 text-left text-sm
|
|
268
|
+
className: "px-4 py-3 text-left font-medium text-sm",
|
|
269
269
|
children: "Status"
|
|
270
270
|
}, undefined, false, undefined, this),
|
|
271
271
|
/* @__PURE__ */ jsxDEV2("th", {
|
|
272
|
-
className: "px-4 py-3 text-left text-sm
|
|
272
|
+
className: "px-4 py-3 text-left font-medium text-sm",
|
|
273
273
|
children: "Last Sync"
|
|
274
274
|
}, undefined, false, undefined, this)
|
|
275
275
|
]
|
|
276
276
|
}, undefined, true, undefined, this)
|
|
277
277
|
}, undefined, false, undefined, this),
|
|
278
278
|
/* @__PURE__ */ jsxDEV2("tbody", {
|
|
279
|
-
className: "divide-
|
|
279
|
+
className: "divide-y divide-border",
|
|
280
280
|
children: [
|
|
281
281
|
connections.map((conn) => /* @__PURE__ */ jsxDEV2("tr", {
|
|
282
282
|
className: "hover:bg-muted/50",
|
|
@@ -291,12 +291,12 @@ function IntegrationDashboard() {
|
|
|
291
291
|
/* @__PURE__ */ jsxDEV2("td", {
|
|
292
292
|
className: "px-4 py-3",
|
|
293
293
|
children: /* @__PURE__ */ jsxDEV2("span", {
|
|
294
|
-
className: `inline-flex rounded-full px-2 py-0.5 text-xs
|
|
294
|
+
className: `inline-flex rounded-full px-2 py-0.5 font-medium text-xs ${STATUS_COLORS[conn.status] ?? ""}`,
|
|
295
295
|
children: conn.status
|
|
296
296
|
}, undefined, false, undefined, this)
|
|
297
297
|
}, undefined, false, undefined, this),
|
|
298
298
|
/* @__PURE__ */ jsxDEV2("td", {
|
|
299
|
-
className: "
|
|
299
|
+
className: "px-4 py-3 text-muted-foreground text-sm",
|
|
300
300
|
children: conn.lastSyncAt?.toLocaleString() ?? "Never"
|
|
301
301
|
}, undefined, false, undefined, this)
|
|
302
302
|
]
|
|
@@ -304,7 +304,7 @@ function IntegrationDashboard() {
|
|
|
304
304
|
connections.length === 0 && /* @__PURE__ */ jsxDEV2("tr", {
|
|
305
305
|
children: /* @__PURE__ */ jsxDEV2("td", {
|
|
306
306
|
colSpan: 3,
|
|
307
|
-
className: "
|
|
307
|
+
className: "px-4 py-8 text-center text-muted-foreground",
|
|
308
308
|
children: "No connections found"
|
|
309
309
|
}, undefined, false, undefined, this)
|
|
310
310
|
}, undefined, false, undefined, this)
|
|
@@ -324,35 +324,35 @@ function IntegrationDashboard() {
|
|
|
324
324
|
className: "min-h-[400px]"
|
|
325
325
|
}, undefined, false, undefined, this),
|
|
326
326
|
activeTab === "syncs" && /* @__PURE__ */ jsxDEV2("div", {
|
|
327
|
-
className: "
|
|
327
|
+
className: "rounded-lg border border-border",
|
|
328
328
|
children: /* @__PURE__ */ jsxDEV2("table", {
|
|
329
329
|
className: "w-full",
|
|
330
330
|
children: [
|
|
331
331
|
/* @__PURE__ */ jsxDEV2("thead", {
|
|
332
|
-
className: "border-border bg-muted/30
|
|
332
|
+
className: "border-border border-b bg-muted/30",
|
|
333
333
|
children: /* @__PURE__ */ jsxDEV2("tr", {
|
|
334
334
|
children: [
|
|
335
335
|
/* @__PURE__ */ jsxDEV2("th", {
|
|
336
|
-
className: "px-4 py-3 text-left text-sm
|
|
336
|
+
className: "px-4 py-3 text-left font-medium text-sm",
|
|
337
337
|
children: "Sync Config"
|
|
338
338
|
}, undefined, false, undefined, this),
|
|
339
339
|
/* @__PURE__ */ jsxDEV2("th", {
|
|
340
|
-
className: "px-4 py-3 text-left text-sm
|
|
340
|
+
className: "px-4 py-3 text-left font-medium text-sm",
|
|
341
341
|
children: "Frequency"
|
|
342
342
|
}, undefined, false, undefined, this),
|
|
343
343
|
/* @__PURE__ */ jsxDEV2("th", {
|
|
344
|
-
className: "px-4 py-3 text-left text-sm
|
|
344
|
+
className: "px-4 py-3 text-left font-medium text-sm",
|
|
345
345
|
children: "Status"
|
|
346
346
|
}, undefined, false, undefined, this),
|
|
347
347
|
/* @__PURE__ */ jsxDEV2("th", {
|
|
348
|
-
className: "px-4 py-3 text-left text-sm
|
|
348
|
+
className: "px-4 py-3 text-left font-medium text-sm",
|
|
349
349
|
children: "Records"
|
|
350
350
|
}, undefined, false, undefined, this)
|
|
351
351
|
]
|
|
352
352
|
}, undefined, true, undefined, this)
|
|
353
353
|
}, undefined, false, undefined, this),
|
|
354
354
|
/* @__PURE__ */ jsxDEV2("tbody", {
|
|
355
|
-
className: "divide-
|
|
355
|
+
className: "divide-y divide-border",
|
|
356
356
|
children: [
|
|
357
357
|
syncConfigs.map((sync) => /* @__PURE__ */ jsxDEV2("tr", {
|
|
358
358
|
className: "hover:bg-muted/50",
|
|
@@ -381,12 +381,12 @@ function IntegrationDashboard() {
|
|
|
381
381
|
/* @__PURE__ */ jsxDEV2("td", {
|
|
382
382
|
className: "px-4 py-3",
|
|
383
383
|
children: /* @__PURE__ */ jsxDEV2("span", {
|
|
384
|
-
className: `inline-flex rounded-full px-2 py-0.5 text-xs
|
|
384
|
+
className: `inline-flex rounded-full px-2 py-0.5 font-medium text-xs ${STATUS_COLORS[sync.status] ?? ""}`,
|
|
385
385
|
children: sync.status
|
|
386
386
|
}, undefined, false, undefined, this)
|
|
387
387
|
}, undefined, false, undefined, this),
|
|
388
388
|
/* @__PURE__ */ jsxDEV2("td", {
|
|
389
|
-
className: "
|
|
389
|
+
className: "px-4 py-3 text-muted-foreground text-sm",
|
|
390
390
|
children: sync.recordsSynced.toLocaleString()
|
|
391
391
|
}, undefined, false, undefined, this)
|
|
392
392
|
]
|
|
@@ -394,7 +394,7 @@ function IntegrationDashboard() {
|
|
|
394
394
|
syncConfigs.length === 0 && /* @__PURE__ */ jsxDEV2("tr", {
|
|
395
395
|
children: /* @__PURE__ */ jsxDEV2("td", {
|
|
396
396
|
colSpan: 4,
|
|
397
|
-
className: "
|
|
397
|
+
className: "px-4 py-8 text-center text-muted-foreground",
|
|
398
398
|
children: "No sync configurations found"
|
|
399
399
|
}, undefined, false, undefined, this)
|
|
400
400
|
}, undefined, false, undefined, this)
|
package/dist/ui/hooks/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { type IntegrationStats, useIntegrationData, } from './useIntegrationData';
|
package/dist/ui/hooks/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
// src/ui/hooks/useIntegrationData.ts
|
|
3
|
-
import { useCallback, useEffect, useState } from "react";
|
|
4
3
|
import { useTemplateRuntime } from "@contractspec/lib.example-shared-ui";
|
|
4
|
+
import { useCallback, useEffect, useState } from "react";
|
|
5
5
|
"use client";
|
|
6
6
|
function useIntegrationData(projectId = "local-project") {
|
|
7
7
|
const { handlers } = useTemplateRuntime();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
// src/ui/hooks/useIntegrationData.ts
|
|
3
|
-
import { useCallback, useEffect, useState } from "react";
|
|
4
3
|
import { useTemplateRuntime } from "@contractspec/lib.example-shared-ui";
|
|
4
|
+
import { useCallback, useEffect, useState } from "react";
|
|
5
5
|
"use client";
|
|
6
6
|
function useIntegrationData(projectId = "local-project") {
|
|
7
7
|
const { handlers } = useTemplateRuntime();
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Integration Hub Template Components
|
|
3
3
|
*/
|
|
4
|
-
export * from './
|
|
4
|
+
export * from './hooks';
|
|
5
5
|
export { IntegrationDashboard } from './IntegrationDashboard';
|
|
6
6
|
export { IntegrationHubChat } from './IntegrationHubChat';
|
|
7
|
-
export * from './
|
|
7
|
+
export * from './renderers';
|