Releases: diegotl/SlackKit
Releases · diegotl/SlackKit
v0.0.2
What's New
Result Builder APIs
Added @resultBuilder support for cleaner, more Swift-like construction of Slack blocks:
- ActionsBlock:
Actions { ButtonElement(...) }instead ofActions([...]) - ContextBlock:
Context { TextContextElement(...) }instead ofContext([...]) - SectionBlock fields:
Section(fields: Fields { Field.markdown("...") }) - SelectElement options:
StaticSelectElement(options: Options { Option(...) }) - OverflowElement options:
OverflowElement(options: Options { ... }) - OptionGroup:
OptionGroup(options: Options { ... })
Supports conditional statements (if, switch) and loops (for, while) within builders.
Convenience Helpers
Field.markdown()/Field.plainText()for section fieldsTextContextElement.markdown()for markdown context elementsDatePickerElement.formatDate()for YYYY-MM-DD date formatting
Integration Tests
- Added comprehensive integration test suite (80+ tests)
- Uses
SLACK_TEST_WEBHOOK_URLenvironment variable for configuration
Bug Fixes
- Rate limit handling: Fixed unreachable 429 status check (moved before
isSuccess) - InputBlock: Fixed
dispatch_actioncoding key (was incorrectlydispatch_action_config) - InputBlock: Fixed element decoding using
superDecoder()for nested types - DatePickerElement: Changed
initialDatefromInttoString(YYYY-MM-DD format) - TextContextElement: Added configurable
typefield for proper markdown/plain_text support - URLSessionNetworkClient: Removed unused
decoderproperty - Builder API: Fixed empty blocks array encoding to avoid Slack API rejection
Full Changelog
v0.0.1
- Add FoundationNetworking import for Linux support in URLSessionNetworkClient
- Remove unnecessary conditional cast in InputBlock (BlockElement already conforms to Codable)
- Update README with correct repository URL