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

Function rowToIntegration

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

Source from the content-addressed store, hash-verified

955};
956
957const rowToIntegration = (
958 row: IntegrationRow,
959 authMethods: readonly AuthMethodDescriptor[] = [],
960 display?: IntegrationDisplayDescriptor,
961): Integration => ({
962 slug: IntegrationSlug.make(row.slug),
963 // Pre-split rows have no `name`; their description WAS the display name.
964 name: row.name ?? row.description ?? row.slug,
965 // `description` is now nullable (cleared where it only held a duplicated
966 // title); present it as "" so the public Integration type stays a string.
967 description: row.description ?? "",
968 kind: row.plugin_id,
969 canRemove: Boolean(row.can_remove),
970 canRefresh: Boolean(row.can_refresh),
971 authMethods,
972 ...(display?.url ? { displayUrl: display.url } : {}),
973 ...(display?.family ? { family: display.family } : {}),
974});
975
976const rowToIntegrationRecord = (
977 row: IntegrationRow,

Callers 4

rowToIntegrationRecordFunction · 0.85
integrationsListFunction · 0.85
integrationsGetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected