feat(connector): support Aliyun DM regions#8892
Merged
Merged
Conversation
COMPARE TO
|
| Name | Diff |
|---|---|
| .changeset/support-aliyun-dm-region.md | 📈 +108 Bytes |
| packages/connectors/connector-aliyun-dm/README.md | 📈 +319 Bytes |
| packages/connectors/connector-aliyun-dm/src/constant.ts | 📈 +1.28 KB |
| packages/connectors/connector-aliyun-dm/src/index.test.ts | 📈 +605 Bytes |
| packages/connectors/connector-aliyun-dm/src/index.ts | 📈 +110 Bytes |
| packages/connectors/connector-aliyun-dm/src/mock.ts | 📈 +9 Bytes |
| packages/connectors/connector-aliyun-dm/src/single-send-mail.test.ts | 📈 +858 Bytes |
| packages/connectors/connector-aliyun-dm/src/single-send-mail.ts | 📈 +120 Bytes |
| packages/connectors/connector-aliyun-dm/src/types.test.ts | 📈 +468 Bytes |
| packages/connectors/connector-aliyun-dm/src/types.ts | 📈 +48 Bytes |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds regional Aliyun Direct Mail support so the connector can send through the endpoint matching the configured sender-address region while preserving the Hangzhou default.
Changes:
- Adds
regionIdvalidation, config form option, region-to-endpoint mapping, and defaultcn-hangzhou. - Routes
SingleSendMailrequests to the selected regional endpoint and includesRegionIdin the signed request payload. - Adds unit tests, README documentation, and a changeset for the connector update.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
packages/connectors/connector-aliyun-dm/src/constant.ts |
Defines supported regions, endpoints, default region, and config form item. |
packages/connectors/connector-aliyun-dm/src/types.ts |
Adds regionId config validation and narrows request RegionId. |
packages/connectors/connector-aliyun-dm/src/single-send-mail.ts |
Selects endpoint by region and sends RegionId in request parameters. |
packages/connectors/connector-aliyun-dm/src/index.ts |
Reads configured region and passes it to mail sending. |
packages/connectors/connector-aliyun-dm/src/mock.ts |
Updates mock typing for the narrowed region union. |
packages/connectors/connector-aliyun-dm/src/*.test.ts |
Adds validation and request-routing coverage for region support. |
packages/connectors/connector-aliyun-dm/README.md |
Documents the new optional regionId setting. |
.changeset/support-aliyun-dm-region.md |
Adds a minor release changeset. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
wangsijie
approved these changes
May 28, 2026
gao-sun
approved these changes
May 28, 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
regionIdconfiguration for the Aliyun Direct Mail connector.SingleSendMailrequests to the endpoint for the configured Direct Mail region.cn-hangzhou.Root cause
Aliyun Direct Mail sender addresses are region-scoped. The connector previously always called the Hangzhou endpoint, so sender addresses created in regions such as Singapore could not be found.
Testing
Unit tests