Fix TypeScript compilation errors
- Fix conflicting Request interface declarations (auth.ts vs authorization.ts) - Fix email field type issue in auth.ts (handle undefined) - Fix req.params type issues (string | string[] to string) in auth.ts, roles.ts, users.ts - Fix apiKey undefined issue in claude.ts (use tavilyApiKey) - Fix duplicate isConfigured identifier in emailService.ts (rename to _isConfigured) - Fix confluencePage property type issue in jiraAssetsClient.ts (add type assertion)
This commit is contained in:
@@ -453,14 +453,19 @@ class JiraAssetsClient {
|
||||
|
||||
// Generic Confluence field detection: check if any value has a confluencePage
|
||||
// This works for all Confluence fields regardless of their declared type (float, text, etc.)
|
||||
const hasConfluencePage = values.some(v => v.confluencePage);
|
||||
// Type assertion needed because confluencePage is not in the type definition but exists at runtime
|
||||
type AttributeValueWithConfluence = typeof values[0] & {
|
||||
confluencePage?: { url?: string };
|
||||
};
|
||||
const valuesWithConfluence = values as AttributeValueWithConfluence[];
|
||||
const hasConfluencePage = valuesWithConfluence.some(v => v.confluencePage);
|
||||
if (hasConfluencePage) {
|
||||
const confluencePage = values[0]?.confluencePage;
|
||||
const confluencePage = valuesWithConfluence[0]?.confluencePage;
|
||||
if (confluencePage?.url) {
|
||||
logger.info(`[Confluence Field Parse] Found Confluence URL for field "${attrDef.fieldName || 'unknown'}": ${confluencePage.url}`);
|
||||
// For multiple values, return array of URLs; for single, return the URL string
|
||||
if (attrDef.isMultiple) {
|
||||
return values
|
||||
return valuesWithConfluence
|
||||
.filter(v => v.confluencePage?.url)
|
||||
.map(v => v.confluencePage!.url);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user