{"version":3,"sources":["../src/client.ts","../src/errors.ts","../src/validator.ts"],"sourcesContent":["// packages/sdk/src/client.ts\nimport axios, { AxiosInstance, AxiosError } from \"axios\";\nimport {\n  DDEXClientConfig,\n  ValidationResult,\n  ValidationOptions,\n  ApiKey,\n  SupportedFormats,\n  HealthStatus,\n} from \"./types\";\nimport { DDEXError, RateLimitError } from \"./errors\";\nimport { DDEXValidator } from \"./validator\";\n\n/**\n * DDEX Workbench API Client\n *\n * @example\n * ```typescript\n * import { DDEXClient } from '@ddex-workbench/sdk';\n *\n * const client = new DDEXClient({\n *   apiKey: 'ddex_your-api-key',\n *   environment: 'production'\n * });\n *\n * const result = await client.validate(xmlContent, {\n *   version: '4.3',\n *   profile: 'AudioAlbum'\n * });\n * ```\n */\nexport class DDEXClient {\n  private readonly client: AxiosInstance;\n  private readonly config: DDEXClientConfig;\n  public readonly validator: DDEXValidator;\n\n  constructor(config: Partial<DDEXClientConfig> = {}) {\n    this.config = {\n      baseURL: config.baseURL || \"https://api.ddex-workbench.org/v1\",\n      apiKey: config.apiKey,\n      timeout: config.timeout || 30000,\n      environment: config.environment || \"production\",\n      maxRetries: config.maxRetries || 3,\n      retryDelay: config.retryDelay || 1000,\n      ...config,\n    };\n\n    // Create axios instance\n    this.client = axios.create({\n      baseURL: this.config.baseURL,\n      timeout: this.config.timeout,\n      headers: {\n        \"Content-Type\": \"application/json\",\n        \"User-Agent\": `ddex-workbench-sdk/1.0.1 (${this.getEnvironment()})`,\n      },\n    });\n\n    // Add API key if provided\n    if (this.config.apiKey) {\n      this.client.defaults.headers.common[\"X-API-Key\"] = this.config.apiKey;\n    }\n\n    // Add request interceptor for retry logic\n    this.setupInterceptors();\n\n    // Create validator instance\n    this.validator = new DDEXValidator(this);\n  }\n\n  /**\n   * Validate DDEX XML content\n   *\n   * @param content - XML content as string\n   * @param options - Validation options\n   * @returns Validation result with errors and metadata\n   *\n   * @example\n   * ```typescript\n   * const result = await client.validate(xmlContent, {\n   *   version: '4.3',\n   *   profile: 'AudioAlbum'\n   * });\n   *\n   * if (!result.valid) {\n   *   console.log('Validation errors:', result.errors);\n   * }\n   * ```\n   */\n  async validate(\n    content: string,\n    options: ValidationOptions,\n  ): Promise<ValidationResult> {\n    try {\n      const response = await this.client.post<ValidationResult>(\"/validate\", {\n        content,\n        type: options.type || \"ERN\",\n        version: options.version,\n        profile: options.profile,\n      });\n\n      return response.data;\n    } catch (error) {\n      throw this.handleError(error);\n    }\n  }\n\n  /**\n   * Validate XML from URL\n   *\n   * @param url - URL to XML file\n   * @param options - Validation options\n   * @returns Validation result\n   *\n   * @example\n   * ```typescript\n   * const result = await client.validateURL(\n   *   'https://example.com/release.xml',\n   *   { version: '4.3', profile: 'AudioAlbum' }\n   * );\n   * ```\n   */\n  async validateURL(\n    url: string,\n    options: ValidationOptions,\n  ): Promise<ValidationResult> {\n    try {\n      // Fetch XML content from URL\n      const xmlResponse = await axios.get(url, {\n        responseType: \"text\",\n        timeout: this.config.timeout,\n      });\n\n      return this.validate(xmlResponse.data, options);\n    } catch (error) {\n      if (axios.isAxiosError(error) && error.response?.status === 404) {\n        throw new DDEXError(\n          `XML file not found at URL: ${url}`,\n          \"FILE_NOT_FOUND\",\n        );\n      }\n      throw this.handleError(error);\n    }\n  }\n\n  /**\n   * Get supported DDEX formats and versions\n   *\n   * @returns Supported formats, versions, and profiles\n   *\n   * @example\n   * ```typescript\n   * const formats = await client.getSupportedFormats();\n   * console.log('Supported versions:', formats.versions);\n   * ```\n   */\n  async getSupportedFormats(): Promise<SupportedFormats> {\n    try {\n      const response = await this.client.get<SupportedFormats>(\"/formats\");\n      return response.data;\n    } catch (error) {\n      throw this.handleError(error);\n    }\n  }\n\n  /**\n   * Check API health status\n   *\n   * @returns Health status of the API\n   *\n   * @example\n   * ```typescript\n   * const health = await client.checkHealth();\n   * if (health.status === 'healthy') {\n   *   console.log('API is operational');\n   * }\n   * ```\n   */\n  async checkHealth(): Promise<HealthStatus> {\n    try {\n      const response = await this.client.get<HealthStatus>(\"/health\");\n      return response.data;\n    } catch (error) {\n      throw this.handleError(error);\n    }\n  }\n\n  /**\n   * API Key Management (requires authentication)\n   */\n\n  /**\n   * List API keys for authenticated user\n   *\n   * @param authToken - Firebase auth token\n   * @returns List of API keys\n   */\n  async listApiKeys(authToken: string): Promise<ApiKey[]> {\n    try {\n      const response = await this.client.get<ApiKey[]>(\"/keys\", {\n        headers: {\n          Authorization: `Bearer ${authToken}`,\n        },\n      });\n      return response.data;\n    } catch (error) {\n      throw this.handleError(error);\n    }\n  }\n\n  /**\n   * Create new API key\n   *\n   * @param name - Friendly name for the key\n   * @param authToken - Firebase auth token\n   * @returns New API key (only shown once)\n   */\n  async createApiKey(name: string, authToken: string): Promise<ApiKey> {\n    try {\n      const response = await this.client.post<ApiKey>(\n        \"/keys\",\n        { name },\n        {\n          headers: {\n            Authorization: `Bearer ${authToken}`,\n          },\n        },\n      );\n      return response.data;\n    } catch (error) {\n      throw this.handleError(error);\n    }\n  }\n\n  /**\n   * Revoke API key\n   *\n   * @param keyId - API key ID to revoke\n   * @param authToken - Firebase auth token\n   */\n  async revokeApiKey(keyId: string, authToken: string): Promise<void> {\n    try {\n      await this.client.delete(`/keys/${keyId}`, {\n        headers: {\n          Authorization: `Bearer ${authToken}`,\n        },\n      });\n    } catch (error) {\n      throw this.handleError(error);\n    }\n  }\n\n  /**\n   * Update API key for this client instance\n   *\n   * @param apiKey - New API key\n   */\n  setApiKey(apiKey: string): void {\n    this.config.apiKey = apiKey;\n    this.client.defaults.headers.common[\"X-API-Key\"] = apiKey;\n  }\n\n  /**\n   * Remove API key from this client instance\n   */\n  clearApiKey(): void {\n    this.config.apiKey = undefined;\n    delete this.client.defaults.headers.common[\"X-API-Key\"];\n  }\n\n  /**\n   * Private helper methods\n   */\n\n  private setupInterceptors(): void {\n    // Response interceptor for retry logic\n    this.client.interceptors.response.use(\n      (response) => response,\n      async (error) => {\n        const config = error.config;\n\n        // Check if we should retry\n        if (\n          !config ||\n          config.__retryCount >= this.config.maxRetries ||\n          !this.shouldRetry(error)\n        ) {\n          return Promise.reject(error);\n        }\n\n        // Increment retry count\n        config.__retryCount = config.__retryCount || 0;\n        config.__retryCount++;\n\n        // Calculate delay with exponential backoff\n        const delay =\n          this.config.retryDelay * Math.pow(2, config.__retryCount - 1);\n\n        // Wait before retrying\n        await new Promise((resolve) => setTimeout(resolve, delay));\n\n        return this.client(config);\n      },\n    );\n  }\n\n  private shouldRetry(error: AxiosError): boolean {\n    // Retry on network errors or 5xx status codes\n    return (\n      !error.response ||\n      (error.response.status >= 500 && error.response.status < 600)\n    );\n  }\n\n  private handleError(error: any): Error {\n    if (axios.isAxiosError(error)) {\n      const status = error.response?.status;\n      const message = error.response?.data?.error?.message || error.message;\n\n      if (status === 429) {\n        const retryAfter = error.response?.headers[\"retry-after\"];\n        return new RateLimitError(\n          message,\n          retryAfter ? parseInt(retryAfter) : undefined,\n        );\n      }\n\n      return new DDEXError(message, \"API_ERROR\", status, error.response?.data);\n    }\n\n    return error;\n  }\n\n  private getEnvironment(): string {\n    if (typeof window !== \"undefined\") {\n      return \"browser\";\n    }\n    if (typeof process !== \"undefined\" && process.versions?.node) {\n      return `node/${process.version}`;\n    }\n    return \"unknown\";\n  }\n}\n","// packages/sdk/src/errors.ts\n/**\n * Custom error types for DDEX Workbench SDK\n */\n\n/**\n * Base error class for all DDEX SDK errors\n */\nexport class DDEXError extends Error {\n  public readonly code: string;\n  public readonly statusCode?: number;\n  public readonly details?: any;\n\n  constructor(\n    message: string,\n    code: string = \"DDEX_ERROR\",\n    statusCode?: number,\n    details?: any,\n  ) {\n    super(message);\n    this.name = \"DDEXError\";\n    this.code = code;\n    this.statusCode = statusCode;\n    this.details = details;\n\n    // Maintains proper stack trace for where error was thrown\n    if (Error.captureStackTrace) {\n      Error.captureStackTrace(this, this.constructor);\n    }\n  }\n}\n\n/**\n * Rate limit exceeded error\n */\nexport class RateLimitError extends DDEXError {\n  public readonly retryAfter?: number;\n\n  constructor(message: string = \"Rate limit exceeded\", retryAfter?: number) {\n    super(message, \"RATE_LIMIT_EXCEEDED\", 429);\n    this.name = \"RateLimitError\";\n    this.retryAfter = retryAfter;\n  }\n\n  /**\n   * Get human-readable retry message\n   */\n  getRetryMessage(): string {\n    if (this.retryAfter) {\n      return `Please retry after ${this.retryAfter} seconds`;\n    }\n    return \"Please retry later\";\n  }\n}\n","// packages/sdk/src/validator.ts\nimport { DDEXClient } from \"./client\";\nimport {\n  ValidationResult,\n  ValidationOptions,\n  ValidationErrorDetail,\n  ERNVersion,\n  ERNProfile,\n} from \"./types\";\n\n/**\n * High-level validation helper\n */\nexport class DDEXValidator {\n  constructor(private client: DDEXClient) {}\n\n  /**\n   * Validate ERN 4.3 content\n   */\n  async validateERN43(\n    content: string,\n    profile?: ERNProfile,\n  ): Promise<ValidationResult> {\n    return this.client.validate(content, {\n      type: \"ERN\",\n      version: \"4.3\",\n      profile,\n    });\n  }\n\n  /**\n   * Validate ERN 4.2 content\n   */\n  async validateERN42(\n    content: string,\n    profile?: ERNProfile,\n  ): Promise<ValidationResult> {\n    return this.client.validate(content, {\n      type: \"ERN\",\n      version: \"4.2\",\n      profile,\n    });\n  }\n\n  /**\n   * Validate ERN 3.8.2 content\n   */\n  async validateERN382(\n    content: string,\n    profile?: ERNProfile,\n  ): Promise<ValidationResult> {\n    return this.client.validate(content, {\n      type: \"ERN\",\n      version: \"3.8.2\",\n      profile,\n    });\n  }\n\n  /**\n   * Auto-detect ERN version and validate\n   */\n  async validateAuto(content: string): Promise<ValidationResult> {\n    const version = this.detectVersion(content);\n\n    if (!version) {\n      return {\n        valid: false,\n        errors: [\n          {\n            line: 0,\n            column: 0,\n            message: \"Unable to detect ERN version from XML content\",\n            severity: \"error\",\n            rule: \"Version-Detection\",\n          },\n        ],\n        warnings: [],\n        metadata: {\n          processingTime: 0,\n          schemaVersion: \"unknown\",\n          validatedAt: new Date().toISOString(),\n          errorCount: 1,\n          warningCount: 0,\n          validationSteps: [],\n        },\n      };\n    }\n\n    return this.client.validate(content, {\n      type: \"ERN\",\n      version,\n    });\n  }\n\n  /**\n   * Batch validate multiple files\n   */\n  async validateBatch(\n    items: Array<{ content: string; options: ValidationOptions }>,\n  ): Promise<ValidationResult[]> {\n    const results = await Promise.allSettled(\n      items.map((item) => this.client.validate(item.content, item.options)),\n    );\n\n    return results.map((result, index) => {\n      if (result.status === \"fulfilled\") {\n        return result.value;\n      }\n\n      // Return error result for failed validations\n      return {\n        valid: false,\n        errors: [\n          {\n            line: 0,\n            column: 0,\n            message: `Validation failed: ${result.reason.message}`,\n            severity: \"error\" as const,\n            rule: \"Batch-Validation\",\n          },\n        ],\n        warnings: [],\n        metadata: {\n          processingTime: 0,\n          schemaVersion: items[index].options.version,\n          validatedAt: new Date().toISOString(),\n          errorCount: 1,\n          warningCount: 0,\n          validationSteps: [],\n        },\n      };\n    });\n  }\n\n  /**\n   * Check if content is valid (simplified check)\n   */\n  async isValid(content: string, options: ValidationOptions): Promise<boolean> {\n    const result = await this.client.validate(content, options);\n    return result.valid;\n  }\n\n  /**\n   * Get only errors (no warnings)\n   */\n  async getErrors(\n    content: string,\n    options: ValidationOptions,\n  ): Promise<ValidationErrorDetail[]> {\n    const result = await this.client.validate(content, options);\n    return result.errors;\n  }\n\n  /**\n   * Detect ERN version from XML content\n   */\n  detectVersion(content: string): ERNVersion | null {\n    // Check for ERN 4.3\n    if (\n      content.includes('xmlns:ern=\"http://ddex.net/xml/ern/43\"') ||\n      content.includes('MessageSchemaVersionId=\"ern/43\"')\n    ) {\n      return \"4.3\";\n    }\n\n    // Check for ERN 4.2\n    if (\n      content.includes('xmlns:ern=\"http://ddex.net/xml/ern/42\"') ||\n      content.includes('MessageSchemaVersionId=\"ern/42\"')\n    ) {\n      return \"4.2\";\n    }\n\n    // Check for ERN 3.8.2\n    if (\n      content.includes('xmlns:ern=\"http://ddex.net/xml/ern/382\"') ||\n      content.includes('MessageSchemaVersionId=\"ern/382\"')\n    ) {\n      return \"3.8.2\";\n    }\n\n    return null;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K,OAAOf,CAAM,CAC3B,CACF,CACF,CAEQ,YAAYK,EAA4B,CAE9C,MACE,CAACA,EAAM,UACNA,EAAM,SAAS,QAAU,KAAOA,EAAM,SAAS,OAAS,GAE7D,CAEQ,YAAYA,EAAmB,CAzTzC,IAAAE,EAAAU,EAAAC,EAAAC,EAAAC,EAAAC,EA0TI,GAAIpB,EAAM,aAAaI,CAAK,EAAG,CAC7B,IAAMiB,GAASf,EAAAF,EAAM,WAAN,YAAAE,EAAgB,OACzBgB,IAAUJ,GAAAD,GAAAD,EAAAZ,EAAM,WAAN,YAAAY,EAAgB,OAAhB,YAAAC,EAAsB,QAAtB,YAAAC,EAA6B,UAAWd,EAAM,QAE9D,GAAIiB,IAAW,IAAK,CAClB,IAAME,GAAaJ,EAAAf,EAAM,WAAN,YAAAe,EAAgB,QAAQ,eAC3C,OAAO,IAAIK,EACTF,EACAC,EAAa,SAASA,CAAU,EAAI,MACtC,CACF,CAEA,OAAO,IAAIf,EAAUc,EAAS,YAAaD,GAAQD,EAAAhB,EAAM,WAAN,YAAAgB,EAAgB,IAAI,CACzE,CAEA,OAAOhB,CACT,CAEQ,gBAAyB,CA5UnC,IAAAE,EA6UI,OAAI,OAAO,QAAW,YACb,UAEL,OAAO,SAAY,eAAeA,EAAA,QAAQ,WAAR,MAAAA,EAAkB,MAC/C,QAAQ,QAAQ,OAAO,GAEzB,SACT,CACF","names":["axios","DDEXError","message","code","statusCode","details","RateLimitError","retryAfter","DDEXValidator","client","content","profile","version","items","item","result","index","options","DDEXClient","config","axios","DDEXValidator","content","options","error","url","_a","xmlResponse","DDEXError","authToken","name","keyId","apiKey","response","delay","resolve","_b","_c","_d","_e","_f","status","message","retryAfter","RateLimitError"]}