( row: IntegrationRow, authMethods: readonly AuthMethodDescriptor[] = [], display?: IntegrationDisplayDescriptor, )
| 745 | }; |
| 746 | |
| 747 | const rowToIntegration = ( |
| 748 | row: IntegrationRow, |
| 749 | authMethods: readonly AuthMethodDescriptor[] = [], |
| 750 | display?: IntegrationDisplayDescriptor, |
| 751 | ): Integration => ({ |
| 752 | slug: IntegrationSlug.make(row.slug), |
| 753 | // Pre-split rows have no `name`; their description WAS the display name. |
| 754 | name: row.name ?? row.description ?? row.slug, |
| 755 | // `description` is now nullable (cleared where it only held a duplicated |
| 756 | // title); present it as "" so the public Integration type stays a string. |
| 757 | description: row.description ?? "", |
| 758 | kind: row.plugin_id, |
| 759 | canRemove: Boolean(row.can_remove), |
| 760 | canRefresh: Boolean(row.can_refresh), |
| 761 | authMethods, |
| 762 | ...(display?.url ? { displayUrl: display.url } : {}), |
| 763 | ...(display?.family ? { family: display.family } : {}), |
| 764 | }); |
| 765 | |
| 766 | const rowToIntegrationRecord = ( |
| 767 | row: IntegrationRow, |
no outgoing calls
no test coverage detected