mirror of
https://github.com/alamion/obsidian-jira-sync.git
synced 2026-07-22 12:20:29 +00:00
- Now plugin supports both v2 and v3 Jira API - Some preparation for solving bottleneck problem
60 lines
1.3 KiB
TypeScript
60 lines
1.3 KiB
TypeScript
import {FieldMapping} from "../default/obsidianJiraFieldsMapping";
|
|
|
|
export interface JiraSettings {
|
|
collapsedSections: Record<string, boolean>;
|
|
|
|
authMethod: "bearer" | "basic" | "session";
|
|
apiToken: string;
|
|
username: string;
|
|
email: string;
|
|
password: string;
|
|
jiraUrl: string;
|
|
apiVersion: string;
|
|
|
|
issuesFolder: string;
|
|
sessionCookieName: string;
|
|
templatePath: string;
|
|
fieldMappings: Record<string, FieldMapping>;
|
|
fieldMappingsStrings: Record<string, { toJira: string; fromJira: string }>;
|
|
enableFieldValidation: boolean;
|
|
|
|
statisticsTimeType: string;
|
|
maxItemsToShow: number;
|
|
customDateRange: { start: string; end: string };
|
|
|
|
// Cache for issue key to file path mapping
|
|
issueKeyToFilePathCache: Record<string, string>;
|
|
}
|
|
|
|
export const DEFAULT_SETTINGS: JiraSettings = {
|
|
collapsedSections: {
|
|
connection: true,
|
|
general: true,
|
|
fieldMappings: false,
|
|
rawIssueViewer: false,
|
|
testFieldMappings: false,
|
|
statistics: false,
|
|
},
|
|
authMethod: "bearer",
|
|
apiToken: "",
|
|
username: "",
|
|
email: "",
|
|
password: "",
|
|
jiraUrl: "",
|
|
apiVersion: "2",
|
|
|
|
issuesFolder: "jira-issues",
|
|
sessionCookieName: "JSESSIONID",
|
|
templatePath: "",
|
|
fieldMappings: {},
|
|
fieldMappingsStrings: {},
|
|
enableFieldValidation: true,
|
|
|
|
statisticsTimeType: "weeks",
|
|
maxItemsToShow: 10,
|
|
customDateRange: { start: "", end: "" },
|
|
|
|
// Initialize empty cache
|
|
issueKeyToFilePathCache: {}
|
|
};
|
|
|