-
Notifications
You must be signed in to change notification settings - Fork 14
SOLAPI Node.js SDK 5.5.4 #98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…; update .gitignore to retain .vercel/ entry
- effect: 3.19.6 → 3.19.14 - @biomejs/biome: 2.3.7 → 2.3.11 - typedoc: 0.28.14 → 0.28.15 - vite-tsconfig-paths: 5.1.4 → 6.0.3 - vitest: 4.0.14 → 4.0.16 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
카카오 BMS 메시지 발송을 위한 타입 및 스키마를 구현합니다. - 8가지 chatBubbleType 지원 (TEXT, IMAGE, WIDE, WIDE_ITEM_LIST, COMMERCE, CAROUSEL_FEED, CAROUSEL_COMMERCE, PREMIUM_VIDEO) - chatBubbleType별 필수 필드 검증 로직 추가 - BMS 복합 타입 스키마 추가 (버튼, 캐러셀, 커머스, 쿠폰, 비디오, 와이드아이템) - 단위 테스트 추가 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Added ClientError class for handling 4xx client errors with enhanced toString method for better error reporting in production and development environments. - Introduced ServerError class for managing 5xx server errors, including detailed response body handling for non-production environments. - Deprecated ApiError in favor of ClientError for improved clarity and consistency. - Updated defaultFetcher and effectErrorHandler to utilize new error classes, ensuring better error management across the application. This update enhances error handling capabilities and improves the overall robustness of the application.
- Deleted multiple example files for sending Kakao friend talks, including plain text, with buttons, with images, and with images and buttons. - These files contained sample code for sending messages using the SolapiMessageService, which is no longer needed. This cleanup helps streamline the codebase by removing deprecated examples.
- Introduced multiple new example files for sending Kakao BMS messages, including: - `send_bms_free_carousel_commerce.js`: Example for CAROUSEL_COMMERCE type messages. - `send_bms_free_carousel_feed.js`: Example for CAROUSEL_FEED type messages. - `send_bms_free_commerce.js`: Example for COMMERCE type messages. - `send_bms_free_image_with_buttons.js`: Example for IMAGE type messages with buttons. - `send_bms_free_image.js`: Example for basic IMAGE type messages. - `send_bms_free_premium_video.js`: Example for PREMIUM_VIDEO type messages. - `send_bms_free_text_with_buttons.js`: Example for TEXT type messages with buttons. - `send_bms_free_text.js`: Example for basic TEXT type messages. - `send_bms_free_wide_item_list.js`: Example for WIDE_ITEM_LIST type messages. - `send_bms_free_wide.js`: Example for WIDE type messages. These additions enhance the documentation and provide clear usage examples for developers integrating with the Kakao BMS service.
Summary of ChangesHello @Palbahngmiyine, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly upgrades the SOLAPI Node.js SDK by integrating advanced features for Kakao Brand Message Service (BMS) Free messages. It introduces a new "BMS_FREE" message type, accompanied by a suite of detailed examples and robust schema validations to support diverse message formats like carousels, commerce, and rich media. Concurrently, the SDK's error handling has been refined to provide more granular and informative feedback, distinguishing between client and server-side issues. These changes aim to enhance the SDK's capabilities for rich messaging while improving developer experience through clearer error reporting and updated development tooling. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request is a significant and well-executed feature update, introducing support for Kakao's BMS_FREE message type and bumping the package version to 5.5.4. The changes are comprehensive, including the addition of robust validation schemas for new BMS content types using effect/schema, and a thoughtful refactoring of error handling to be more specific with ClientError and ServerError. The inclusion of detailed examples and thorough unit tests for the new functionality is commendable and greatly improves the quality and usability of the SDK. The code is clean, well-structured, and demonstrates a strong focus on type safety and developer experience. Overall, this is an excellent contribution.
- Introduced a new function `extractDefectInfo` to improve error reporting for unexpected defects in the effect error handler. - Updated `formatCauseForProduction` to include defect information in error messages. - Enhanced `runSafeSync` and `runSafePromise` to throw more descriptive errors, including specific names for unexpected defects and unhandled exits. - Expanded the `FileType` in `groupMessageRequest.ts` to support additional BMS types. - Added utility functions and test cases for BMS message types, including new test assets for image uploads. These changes improve the robustness of error handling and expand the capabilities of the BMS messaging service.
- Re-enabled the previously skipped test suite for WIDE_ITEM_LIST type messages. - Updated image path retrieval to use the new `getTestImagePath1to1` function for consistency in test image uploads. These changes ensure that the test suite is comprehensive and utilizes the latest utility functions for image handling.
- Introduced detailed documentation for the AGENTS SDK, covering the overall structure, conventions, and anti-patterns across various layers: core library utilities, models, and services. - Included guidelines for error handling, async operations, and testing practices to ensure consistency and best practices in development. - Enhanced the documentation with clear examples and a structured overview to facilitate understanding and usage of the SDK. These additions improve the clarity and usability of the AGENTS SDK for developers.
- Enhanced test cases for BMS Free messages by adding discount rates and fixed discounts to commerce items. - Updated video URLs in tests to valid links and added notes for clarity on video URL handling. - Improved overall test coverage for BMS Free message types, ensuring accurate representation of discount functionalities. These changes ensure that the E2E tests reflect the latest features and maintain robustness in testing BMS messages.
|
/gemini review |
- Upgraded @types/node from ^24.10.1 to ^25.0.9. - Updated typedoc from ^0.28.15 to ^0.28.16. - Bumped vite-tsconfig-paths from ^6.0.3 to ^6.0.4. - Increased vitest version from ^4.0.16 to ^4.0.17. These updates ensure compatibility with the latest features and improvements in the respective packages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
The pull request introduces comprehensive support for Kakao BMS (Brand Message Service) Free messages, encompassing various chat bubble types (TEXT, IMAGE, WIDE, WIDE_ITEM_LIST, COMMERCE, CAROUSEL_FEED, CAROUSEL_COMMERCE, PREMIUM_VIDEO). This involved extensive schema definitions using Effect Schema for robust validation, new error types (ClientError, ServerError), and enhanced error handling logic throughout the SDK. The changes also include comprehensive example files and E2E tests for the new BMS features, which is excellent for ensuring correctness and providing clear usage guidance. Dependency updates are also included. The introduction of AGENTS.md files for different layers of the SDK is a great addition for documentation and maintainability.
examples/javascript/common/src/kakao/send/send_bms_free_commerce.js
Outdated
Show resolved
Hide resolved
…ce pricing rules - Added validation to ensure WIDE_ITEM_LIST type has a minimum of 3 sub items. - Introduced a new function to validate pricing combinations for BMS commerce, enforcing rules on the use of regularPrice, discountPrice, discountRate, and discountFixed. - Updated test cases to cover new validation scenarios for both WIDE_ITEM_LIST and commerce pricing combinations, ensuring robust error handling and compliance with business rules. These changes improve the integrity of BMS message types and enhance the overall user experience by providing clearer validation feedback.
- Introduced new image examples for BMS messaging, including `example-1to1.jpg` and `example-2to1.jpg`. - Updated various BMS message examples to include detailed instructions on image upload requirements and file types. - Enhanced existing examples to support new features such as coupon integration and improved message structures. These changes provide clearer guidance for developers and improve the overall functionality of BMS messaging services.
기능 변경사항
문서 및 예제
프로젝트 내부 변경사항