V0.38.4 full composition (#237)

Co-authored-by: gobha <jasafpro@gmail.com>
Co-committed-by: gobha <jasafpro@gmail.com>
This commit is contained in:
2026-03-25 17:29:08 +00:00
committed by xcaliber
parent fe5894b6e2
commit 495bcc94f4
17 changed files with 943 additions and 39 deletions

View File

@@ -194,6 +194,11 @@ export function createDomains(restClient) {
resolve: (type, name) => rc.get('/api/v1/connections/resolve' + _qs({ type, name })),
},
// ── 10c. Connection Types (v0.38.4) ──
connectionTypes: {
list: () => rc.get('/api/v1/connection-types'),
},
// ── 11. Notifications ──────────────────
notifications: {
list: (opts) => rc.get('/api/v1/notifications' + _qs(opts)),

View File

@@ -26,19 +26,11 @@ export default function ConnectionsSection() {
const loadTypes = useCallback(async () => {
try {
const pkgs = await sw.api.admin.packages.list();
const types = [];
const seen = {};
for (const pkg of (pkgs || [])) {
const conns = pkg.manifest?.connections || [];
for (const cd of conns) {
if (!seen[cd.type]) {
seen[cd.type] = true;
types.push({ type: cd.type, label: cd.label || cd.type, packageId: pkg.id, fields: cd.fields || {} });
}
}
}
setConnTypes(types);
const types = await sw.api.connectionTypes.list();
setConnTypes((types || []).map(ct => ({
type: ct.type, label: ct.label || ct.type,
packageId: ct.package_id, fields: ct.fields || {}
})));
} catch (_) {}
}, []);

View File

@@ -26,19 +26,11 @@ export function ConnectionsSection() {
const loadTypes = useCallback(async () => {
try {
const pkgs = await sw.api.admin.packages.list();
const types = [];
const seen = {};
for (const pkg of (pkgs || [])) {
const conns = pkg.manifest?.connections || [];
for (const cd of conns) {
if (!seen[cd.type]) {
seen[cd.type] = true;
types.push({ type: cd.type, label: cd.label || cd.type, packageId: pkg.id, fields: cd.fields || {} });
}
}
}
setConnTypes(types);
const types = await sw.api.connectionTypes.list();
setConnTypes((types || []).map(ct => ({
type: ct.type, label: ct.label || ct.type,
packageId: ct.package_id, fields: ct.fields || {}
})));
} catch (_) {}
}, []);

View File

@@ -26,19 +26,11 @@ export default function ConnectionsSection({ teamId }) {
const loadTypes = useCallback(async () => {
try {
const pkgs = await sw.api.admin.packages.list();
const types = [];
const seen = {};
for (const pkg of (pkgs || [])) {
const conns = pkg.manifest?.connections || [];
for (const cd of conns) {
if (!seen[cd.type]) {
seen[cd.type] = true;
types.push({ type: cd.type, label: cd.label || cd.type, packageId: pkg.id, fields: cd.fields || {} });
}
}
}
setConnTypes(types);
const types = await sw.api.connectionTypes.list();
setConnTypes((types || []).map(ct => ({
type: ct.type, label: ct.label || ct.type,
packageId: ct.package_id, fields: ct.fields || {}
})));
} catch (_) {}
}, []);