( row: IntegrationRow, authMethods: readonly AuthMethodDescriptor[] = [], display?: IntegrationDisplayDescriptor, )
| 520 | }; |
| 521 | |
| 522 | const rowToIntegration = ( |
| 523 | row: IntegrationRow, |
| 524 | authMethods: readonly AuthMethodDescriptor[] = [], |
| 525 | display?: IntegrationDisplayDescriptor, |
| 526 | ): Integration => ({ |
| 527 | slug: IntegrationSlug.make(row.slug), |
| 528 | // Pre-split rows have no `name`; their description WAS the display name. |
| 529 | name: row.name ?? row.description ?? row.slug, |
| 530 | // `description` is now nullable (cleared where it only held a duplicated |
| 531 | // title); present it as "" so the public Integration type stays a string. |
| 532 | description: row.description ?? "", |
| 533 | kind: row.plugin_id, |
| 534 | canRemove: Boolean(row.can_remove), |
| 535 | canRefresh: Boolean(row.can_refresh), |
| 536 | authMethods, |
| 537 | ...(display?.url ? { displayUrl: display.url } : {}), |
| 538 | ...(display?.family ? { family: display.family } : {}), |
| 539 | }); |
| 540 | |
| 541 | const rowToIntegrationRecord = ( |
| 542 | row: IntegrationRow, |
no outgoing calls
no test coverage detected