( row: IntegrationRow, authMethods: readonly AuthMethodDescriptor[] = [], display?: IntegrationDisplayDescriptor, )
| 894 | }; |
| 895 | |
| 896 | const 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 | |
| 915 | const rowToIntegrationRecord = ( |
| 916 | row: IntegrationRow, |
no outgoing calls
no test coverage detected