( row: IntegrationRow, authMethods: readonly AuthMethodDescriptor[] = [], display?: IntegrationDisplayDescriptor, )
| 946 | }; |
| 947 | |
| 948 | const rowToIntegration = ( |
| 949 | row: IntegrationRow, |
| 950 | authMethods: readonly AuthMethodDescriptor[] = [], |
| 951 | display?: IntegrationDisplayDescriptor, |
| 952 | ): Integration => ({ |
| 953 | slug: IntegrationSlug.make(row.slug), |
| 954 | // Pre-split rows have no `name`; their description WAS the display name. |
| 955 | name: row.name ?? row.description ?? row.slug, |
| 956 | // `description` is now nullable (cleared where it only held a duplicated |
| 957 | // title); present it as "" so the public Integration type stays a string. |
| 958 | description: row.description ?? "", |
| 959 | kind: row.plugin_id, |
| 960 | canRemove: Boolean(row.can_remove), |
| 961 | canRefresh: Boolean(row.can_refresh), |
| 962 | authMethods, |
| 963 | ...(display?.url ? { displayUrl: display.url } : {}), |
| 964 | ...(display?.family ? { family: display.family } : {}), |
| 965 | }); |
| 966 | |
| 967 | const rowToIntegrationRecord = ( |
| 968 | row: IntegrationRow, |
no outgoing calls
no test coverage detected