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

Function rowToIntegration

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

Source from the content-addressed store, hash-verified

894};
895
896const rowToIntegration = (
897 row: IntegrationRow,
898 authMethods: readonly AuthMethodDescriptor[] = [],
899 display?: IntegrationDisplayDescriptor,
900): Integration => ({
901 slug: IntegrationSlug.make(row.slug),
902 // Pre-split rows have no `name`; their description WAS the display name.
903 name: row.name ?? row.description ?? row.slug,
904 // `description` is now nullable (cleared where it only held a duplicated
905 // title); present it as "" so the public Integration type stays a string.
906 description: row.description ?? "",
907 kind: row.plugin_id,
908 canRemove: Boolean(row.can_remove),
909 canRefresh: Boolean(row.can_refresh),
910 authMethods,
911 ...(display?.url ? { displayUrl: display.url } : {}),
912 ...(display?.family ? { family: display.family } : {}),
913});
914
915const rowToIntegrationRecord = (
916 row: IntegrationRow,

Callers 4

rowToIntegrationRecordFunction · 0.85
integrationsListFunction · 0.85
integrationsGetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected