feat(connector): add SMSBao SMS#8871
Merged
Merged
Conversation
COMPARE TO
|
| Name | Diff |
|---|---|
| .changeset/add-smsbao-sms-connector.md | 📈 +107 Bytes |
| packages/connectors/connector-smsbao-sms/CHANGELOG.md | 📈 +87 Bytes |
| packages/connectors/connector-smsbao-sms/README.md | 📈 +2.05 KB |
| packages/connectors/connector-smsbao-sms/README.zh-CN.md | 📈 +1.93 KB |
| packages/connectors/connector-smsbao-sms/logo.png | |
| packages/connectors/connector-smsbao-sms/package.json | 📈 +1.66 KB |
| packages/connectors/connector-smsbao-sms/src/constant.ts | 📈 +2.48 KB |
| packages/connectors/connector-smsbao-sms/src/index.test.ts | 📈 +5.42 KB |
| packages/connectors/connector-smsbao-sms/src/index.ts | 📈 +3.29 KB |
| packages/connectors/connector-smsbao-sms/src/mock.ts | 📈 +869 Bytes |
| packages/connectors/connector-smsbao-sms/src/types.ts | 📈 +460 Bytes |
| pnpm-lock.yaml | 📈 +1.75 KB |
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a new SMSBao SMS connector package for Logto, including runtime implementation, configuration schema/metadata, docs, and tests.
Changes:
- Implement SMSBao SMS connector send logic (template selection + API request + error mapping).
- Add connector metadata/config schema, mock config, docs, and assets.
- Add Vitest + Nock test coverage for core send scenarios.
Reviewed changes
Copilot reviewed 9 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/connectors/connector-smsbao-sms/src/types.ts | Introduces Zod config schema for the connector. |
| packages/connectors/connector-smsbao-sms/src/mock.ts | Adds a typed mock config for tests/dev. |
| packages/connectors/connector-smsbao-sms/src/index.ts | Implements connector creation + sendMessage logic and error handling. |
| packages/connectors/connector-smsbao-sms/src/index.test.ts | Adds tests validating successful sends, optional params, and error mapping. |
| packages/connectors/connector-smsbao-sms/src/constant.ts | Defines endpoint + connector metadata and config form defaults. |
| packages/connectors/connector-smsbao-sms/package.json | Registers the new package with dependencies, scripts, and toolchain. |
| packages/connectors/connector-smsbao-sms/logo.svg | Adds connector logo asset. |
| packages/connectors/connector-smsbao-sms/README.md | Adds English connector documentation. |
| packages/connectors/connector-smsbao-sms/README.zh-CN.md | Adds Chinese connector documentation. |
| packages/connectors/connector-smsbao-sms/CHANGELOG.md | Adds initial changelog entry for v1.0.0. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
wangsijie
approved these changes
May 26, 2026
Contributor
Author
|
failure of checks is not caused by code involved in this PR. |
5729e9e to
da5367f
Compare
- Ship logo.png in published package files - Mask API key field with isConfidential - Parse config via Zod safeParse for validated output - Add request timeout and keep retry disabled Co-authored-by: wangsijie <sijiewg@gmail.com>
Co-authored-by: wangsijie <sijiewg@gmail.com>
- Reject empty credentials, templates, and optional product ID in config guard - Use vi.restoreAllMocks() and reset getConfig mock between tests - Link Chinese README with a relative path
gao-sun
approved these changes
May 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add the SMSBao SMS connector for domestic SMS verification flows.
@logto/connector-smsbao-smswith SMSBao/smsAPI integrationTesting
Tested locally
Unit tests