# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 1.0.3

### Added
- UI-level errors originating from programmable components and actions are now logged to Datadog via the browser logging system.

## 1.0.2

### Added
- Integrated logging to Datadog browser logs for all downstream endpoint calls made through apiService.

## 1.0.1

We're excited to announce the **v1.0.1** of **`@twilio/flex-plugins-library-utils-ui`**!

This release is focused on creating modules for the commonly used twilio UI that **Plugins Library** plugins UI function uses.

### Added

- **`Locales.ts`**
  - `getAvailableLocales(localeUrl)` to fetch supported locale tags.
  - `getLocaleStrings(localeUrl, localeTag)` to fetch i18n strings for a given locale tag.
  - `getLocaleUrl(plugin, version)` to construct the CDN path for locale assets.

- **`ErrorManager.ts`**
  - `FlexPluginError`: Custom error class including metadata like severity, context, and type.
  - `ErrorManager`: Centralized error processing, logging, Flex error reporting, and optional in-app notification support.

- **`ApiService.ts`**
  - `ApiService` abstract class for plugin APIs:
    - Fetch retry logic on `429` rate-limit errors.
    - Automatically pulls `Flex.Manager.getInstance()`.
    - Handles error reporting using optional `ErrorManager`.
    - Utility method `buildBody()` to encode POST body strings.

- **`types/index.ts`**
  - Exported all types from:
    - `ErrorManager.ts`
    - `FlexConfiguration.ts`
    - `FlexEvent.ts`
    - `IncomingTransfer.ts`
    - `OutgoingTransfer.ts`
    - `Reservation.ts`
    - `Locale.ts`
    - `Task.ts`
    - `TwilioApi.ts`

- **`enums/index.ts`**
  - Exported all enums from:
    - `FlexPluginLibrary.ts`