( row: IntegrationRow, authMethods: readonly AuthMethodDescriptor[] = [], display?: IntegrationDisplayDescriptor, )
| 955 | }; |
| 956 | |
| 957 | const 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 | |
| 976 | const rowToIntegrationRecord = ( |
| 977 | row: IntegrationRow, |
no outgoing calls
no test coverage detected