Interface JMLConfig

Main configuration interface for the JIRA Magic Library

interface JMLConfig {
    ambiguityPolicy?: AmbiguityPolicyConfig;
    apiVersion?: "v2" | "v3";
    auth: {
        token: string;
    };
    baseUrl: string;
    cache?: {
        ttlSeconds?: number;
    };
    debug?: boolean;
    fuzzyMatch?: FuzzyMatchConfig;
    parentFieldSynonyms?: string[];
    preprocessQuotes?: boolean;
    redis?: RedisConfig;
    timeout?: TimeoutConfig;
}

Properties

ambiguityPolicy?: AmbiguityPolicyConfig

Optional ambiguity policy overrides for lookup converters. Defaults applied per converter if not provided.

apiVersion?: "v2" | "v3"

JIRA API version to use

auth: {
    token: string;
}

Authentication configuration

Type declaration

  • token: string

    Personal Access Token (PAT) for authentication

baseUrl: string

Base URL of the JIRA instance (e.g., "https://jira.company.com")

cache?: {
    ttlSeconds?: number;
}

Cache configuration

Type declaration

  • Optional ttlSeconds?: number

    Cache time-to-live in seconds

debug?: boolean

Enable debug logging (HTTP requests, cache operations, etc.)

fuzzyMatch?: FuzzyMatchConfig

Fuzzy matching configuration for typo-tolerant field resolution.

Example

{ user: { enabled: true, threshold: 0.3 } }
parentFieldSynonyms?: string[]

Custom synonyms for parent field names (E3-S07b AC9)

These patterns are used for:

  1. Schema discovery - finding parent fields in JIRA when plugin detection fails
  2. Input recognition - additional keywords users can use besides the discovered field name

The library automatically discovers the actual parent field name from JIRA (e.g., "Parent Link", "Container", "Epic Link") and uses that for input matching. The "parent" keyword always works. This config adds additional patterns.

Example

['Superior', 'Initiative', 'Portfolio Item']

Default

['parent'] - The universal "parent" keyword
preprocessQuotes?: boolean

Enable automatic quote preprocessing for YAML/JSON/CSV input.

When enabled (default), the library automatically detects and escapes unescaped quote characters in field values before parsing. This handles common issues when users copy/paste text from Slack, emails, or other sources that contain unescaped quotes.

  • YAML: Escapes internal " as \" and ' as ''
  • JSON: Escapes internal " as \"
  • CSV: Escapes internal " as "" (RFC 4180)

Set to false to disable preprocessing and require properly escaped input.

Default

true

Example

// Disable preprocessing (require valid input)
{ preprocessQuotes: false }
redis?: RedisConfig

Redis connection configuration

timeout?: TimeoutConfig

HTTP timeout configuration for API requests.

Allows fine-grained control over request timeouts:

  • default: Fallback timeout for all requests (10s)
  • bulk: Timeout for bulk operations (30s)

Example

{
timeout: {
default: 15000, // 15s default
bulk: 120000, // 2 minutes for bulk operations
}
}