| 1040 | /** Read the integration's decoded config (or `null` when absent / malformed). |
| 1041 | * Surfaces `authenticationTemplate` for the configure / custom-method UX. */ |
| 1042 | const getConfig = ( |
| 1043 | slug: string, |
| 1044 | ): Effect.Effect<GraphqlIntegrationConfig | null, StorageFailure> => |
| 1045 | ctx.core.integrations |
| 1046 | .get(IntegrationSlug.make(slug)) |
| 1047 | .pipe( |
| 1048 | Effect.map((record) => |
| 1049 | record ? Option.getOrNull(decodeGraphqlIntegrationConfigOption(record.config)) : null, |
| 1050 | ), |
| 1051 | ); |
| 1052 | |
| 1053 | /** Merge-append custom auth methods onto the integration's existing |
| 1054 | * `authenticationTemplate`. Returns the merged array. A no-op (returns `[]`) |