MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / rowToIntegration

Function rowToIntegration

packages/core/sdk/src/executor.ts:522–539  ·  view source on GitHub ↗
(
  row: IntegrationRow,
  authMethods: readonly AuthMethodDescriptor[] = [],
  display?: IntegrationDisplayDescriptor,
)

Source from the content-addressed store, hash-verified

520};
521
522const rowToIntegration = (
523 row: IntegrationRow,
524 authMethods: readonly AuthMethodDescriptor[] = [],
525 display?: IntegrationDisplayDescriptor,
526): Integration => ({
527 slug: IntegrationSlug.make(row.slug),
528 // Pre-split rows have no `name`; their description WAS the display name.
529 name: row.name ?? row.description ?? row.slug,
530 // `description` is now nullable (cleared where it only held a duplicated
531 // title); present it as "" so the public Integration type stays a string.
532 description: row.description ?? "",
533 kind: row.plugin_id,
534 canRemove: Boolean(row.can_remove),
535 canRefresh: Boolean(row.can_refresh),
536 authMethods,
537 ...(display?.url ? { displayUrl: display.url } : {}),
538 ...(display?.family ? { family: display.family } : {}),
539});
540
541const rowToIntegrationRecord = (
542 row: IntegrationRow,

Callers 4

rowToIntegrationRecordFunction · 0.85
integrationsListFunction · 0.85
integrationsGetFunction · 0.85
produceConnectionToolsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected