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:
@@ -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)),
|
||||
|
||||
@@ -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 (_) {}
|
||||
}, []);
|
||||
|
||||
|
||||
@@ -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 (_) {}
|
||||
}, []);
|
||||
|
||||
|
||||
@@ -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 (_) {}
|
||||
}, []);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user