@logto/connector-aws-ses 1.0.0-beta.19 → 1.0.0-beta.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,31 +2,20 @@
2
2
 
3
3
  The official Logto connector for AWS connector for direct mail service.
4
4
 
5
- Amazon SES邮件推送服务 Logto 官方连接器[中文文档](#aws-ses邮件连接器)
6
-
7
5
  - [AWS direct mail connector](#aws-direct-mail-connector)
8
6
  - [Get started](#get-started)
9
7
  - [Configure a mail service in the AWS service console](#configure-a-mail-service-in-the-aws-service-console)
10
8
  - [Register AWS account](#register-aws-account)
11
9
  - [Create a identity](#create-a-identity)
12
- - [Edit the JSON of the connector](#edit-the-json-of-the-connector)
10
+ - [Configuration of the connector](#configuration-of-the-connector)
13
11
  - [Test the Amazon SES connector](#test-the-amazon-ses-connector)
14
12
  - [Configure types](#configure-types)
15
- - [AWS SES 邮件连接器](#aws-ses-邮件连接器)
16
- - [开始上手](#开始上手)
17
- - [在 AWS 服务控制台中配置一个邮件服务](#在-aws-服务控制台中配置一个邮件服务)
18
- - [注册 AWS 帐号](#注册-aws-帐号)
19
- - [创建发信身份](#创建发信身份)
20
- - [编写连接器的 JSON](#编写连接器的-json)
21
- - [测试 Amazon SES 邮件连接器](#测试-amazon-ses-邮件连接器)
22
- - [配置类型](#配置类型)
23
13
 
24
14
  ## Get started
25
15
  Amazon SES is a cloud email service provider that can integrate into any application for bulk email sending.
26
16
 
27
17
  Logto team to call the Amazon Simple Email Service APIs, with the help of which Logto end-users can register and sign in to their Logto account via mail verification code.
28
18
 
29
-
30
19
  ## Configure a mail service in the AWS service console
31
20
 
32
21
  > 💡 **Tip**
@@ -45,7 +34,7 @@ Go to [AWS](https://aws.amazon.com/) and register an account.
45
34
  - Create an email address
46
35
 
47
36
 
48
- ### Edit the JSON of the connector
37
+ ### Configuration of the connector
49
38
 
50
39
  1. Click your username in the upper right corner of the Amazon console to enter `Security Credentials`. If you don't have one, create an `AccessKey` and save it carefully.
51
40
  2. Complete the settings of the `Amazon Simple Email Service` connector:
@@ -59,45 +48,6 @@ the following parameters are optional; parameters description can be found in th
59
48
  - `feedbackForwardingEmailAddressIdentityArn`
60
49
  - `configurationSetName`
61
50
 
62
- Here is an example of the JSON of the `Amazon SES` connector:
63
-
64
- ```json
65
- {
66
- "accessKeyId": "<access-key-id>",
67
- "accessKeySecret": "<access-key-secret>",
68
- "region": "<region>",
69
- "emailAddress": "<noreply@logto.io>",
70
- "templates": [
71
- {
72
- "usageType": "SignIn",
73
- "subject": "<sign-in-template-subject>",
74
- "content": "<sign-in-template-content>"
75
- },
76
- {
77
- "usageType": "Register",
78
- "subject": "<register-template-subject>",
79
- "content": "<register-template-content>"
80
- },
81
- {
82
- "usageType": "ForgotPassword",
83
- "subject": "<forgot-password-template-subject>",
84
- "content": "<forgot-password-template-content>"
85
- },
86
- {
87
- "usageType": "Generic",
88
- "subject": "<generic-template-subject>",
89
- "content": "<generic-template-content>"
90
- },
91
- {
92
- "usageType": "Test",
93
- "subject": "<test-template-subject>",
94
- "content": "<test-template-content>"
95
- }
96
- ]
97
- }
98
-
99
- ```
100
-
101
51
  ### Test the Amazon SES connector
102
52
 
103
53
  You can type in an email address and click on "Send" to see whether the settings work before "Save and Done".
@@ -123,107 +73,3 @@ That's it. Don't forget to [Enable connector in sign-in experience](https://docs
123
73
  | subject | string | N/A |
124
74
  | content | string | N/A |
125
75
  | usageType | enum string | 'Register' \| 'SignIn' \| 'ForgotPassword' \| 'Generic' \| 'Test' |
126
-
127
-
128
- # AWS SES 邮件连接器
129
-
130
- ## 开始上手
131
-
132
- Amazon SES 是云电子邮件发送服务,它可以集成到任何应用程序中,用于批量发送电子邮件。
133
-
134
- 本连接器是 Logto 官方提供的 Amazon SES 邮件连接器,帮助终端用户通过邮件验证码进行登录注册。
135
-
136
- ## 在 AWS 服务控制台中配置一个邮件服务
137
-
138
- > 💡 **Tip**
139
- >
140
- > 你可以跳过已经完成的部分。
141
-
142
- ### 注册 AWS 帐号
143
-
144
- 前往 [AWS](https://aws.amazon.com/) 并完成帐号的注册。
145
-
146
- ### 创建发信身份
147
-
148
- - 进入 `Amazon Simple Email Service` Console
149
- - 创建发信身份,根据需要,以下任选一种
150
- - 创建域
151
- - 电子邮件地址
152
-
153
- ## 编写连接器的 JSON
154
-
155
- 1. 在 Amazon 控制台右上角点击你的用户名,进入`安全凭证`,如果你没有,请创建 `AccessKey`,并妥善保存
156
- 2. 完成 `Amazon Simple Email Service` 连接器的设置:
157
- - 使用在步骤 1 中拿到的一对「AccessKey ID」和「AccessKey Secret」来分别填入 `accessKeyId` 和 `accessKeySecret`
158
- - `region`:使用发信身份所在的 region 填入`region` 字段
159
- - `emailAddress`:发信人邮箱地址,格式:`Logto<noreply@logto.io>`,也可以仅使用 `<noreply@logto.io>`
160
-
161
- 以下参数通常不需要配置,除非你明确知道你需要做什么;参数的含义可以参考 [AWS SES DOC](https://docs.aws.amazon.com/ses/latest/APIReference-V2/API_SendEmail.html)。
162
- - `feedbackForwardingEmailAddress`
163
- - `feedbackForwardingEmailAddressIdentityArn`
164
- - `configurationSetName`
165
-
166
- 这是一个 Amazon SES 邮件服务连接器 JSON 配置的样例。
167
-
168
- ```json
169
- {
170
- "accessKeyId": "<access-key-id>",
171
- "accessKeySecret": "<access-key-secret>",
172
- "region": "<region>",
173
- "emailAddress": "<noreply@logto.io>",
174
- "templates": [
175
- {
176
- "usageType": "SignIn",
177
- "subject": "<sign-in-template-subject>",
178
- "content": "<sign-in-template-content>"
179
- },
180
- {
181
- "usageType": "Register",
182
- "subject": "<register-template-subject>",
183
- "content": "<register-template-content>"
184
- },
185
- {
186
- "usageType": "ForgotPassword",
187
- "subject": "<forgot-password-template-subject>",
188
- "content": "<forgot-password-template-content>"
189
- },
190
- {
191
- "usageType": "Generic",
192
- "subject": "<generic-template-subject>",
193
- "content": "<generic-template-content>"
194
- },
195
- {
196
- "usageType": "Test",
197
- "subject": "<test-template-subject>",
198
- "content": "<test-template-content>"
199
- }
200
- ]
201
- }
202
-
203
- ```
204
-
205
- ### 测试 Amazon SES 邮件连接器
206
-
207
- 你可以在「保存并完成」之前输入一个邮件地址并点按「发送」来测试配置是否可以正常工作。
208
-
209
- 大功告成!快去 [启用短信或邮件验证码登录](https://docs.logto.io/zh-cn/docs/tutorials/get-started/enable-passcode-sign-in/#%E5%9C%A8%E7%99%BB%E5%BD%95%E4%BD%93%E9%AA%8C%E4%B8%AD%E5%90%AF%E7%94%A8%E8%BF%9E%E6%8E%A5%E5%99%A8) 吧。
210
-
211
- ### 配置类型
212
-
213
- | 名称 | 类型 |
214
- | ----------------------------------------- | ----------------- |
215
- | accessKeyId | string |
216
- | accessKeySecret | string |
217
- | region | string |
218
- | emailAddress | string (OPTIONAL) |
219
- | emailAddressIdentityArn | string (OPTIONAL) |
220
- | feedbackForwardingEmailAddress | string (OPTIONAL) |
221
- | feedbackForwardingEmailAddressIdentityArn | string (OPTIONAL) |
222
- | configurationSetName | string (OPTIONAL) |
223
- | templates | Template[] |
224
-
225
- | 模板属性 | 类型 | 枚举值 |
226
- | --------- | ----------- | -----------------------------------------------------|
227
- | subject | string | N/A |
228
- | content | string | N/A |
229
- | usageType | enum string | 'Register' \| 'SignIn' \| 'ForgotPassword' \| 'Generic' \| 'Test' |
package/lib/index.js CHANGED
@@ -11,7 +11,7 @@ import { Agent as Agent$1, request as request$1 } from 'https';
11
11
  import { Readable, Writable } from 'stream';
12
12
  import 'http2';
13
13
  import { versions, env } from 'process';
14
- import { ConnectorType, validateConfig, ConnectorError, ConnectorErrorCodes } from '@logto/connector-kit';
14
+ import { ConnectorConfigFormItemType, ConnectorType, validateConfig, ConnectorError, ConnectorErrorCodes } from '@logto/connector-kit';
15
15
  import { z } from 'zod';
16
16
 
17
17
  const resolveParamsForS3 = async (endpointParams) => {
@@ -11654,7 +11654,97 @@ const defaultMetadata = {
11654
11654
  ko: 'Amazon SES는 모든 애플리케이션에 통합하여 대량으로 이메일을 전송할 수 있는 클라우드 이메일 서비스 공급자입니다.',
11655
11655
  },
11656
11656
  readme: './README.md',
11657
- configTemplate: './docs/config-template.json',
11657
+ formItems: [
11658
+ {
11659
+ key: 'accessKeyId',
11660
+ label: 'Access Key ID',
11661
+ type: ConnectorConfigFormItemType.Text,
11662
+ required: true,
11663
+ placeholder: '<access-key-id>',
11664
+ },
11665
+ {
11666
+ key: 'accessKeySecret',
11667
+ label: 'Access Key Secret',
11668
+ type: ConnectorConfigFormItemType.Text,
11669
+ required: true,
11670
+ placeholder: '<access-key-secret>',
11671
+ },
11672
+ {
11673
+ key: 'region',
11674
+ label: 'Region',
11675
+ type: ConnectorConfigFormItemType.Text,
11676
+ required: true,
11677
+ placeholder: '<region>',
11678
+ },
11679
+ {
11680
+ key: 'emailAddress',
11681
+ label: 'Email Address',
11682
+ type: ConnectorConfigFormItemType.Text,
11683
+ required: false,
11684
+ placeholder: '<email-address>',
11685
+ },
11686
+ {
11687
+ key: 'emailAddressIdentityArn',
11688
+ label: 'Email Address Identity ARN',
11689
+ type: ConnectorConfigFormItemType.Text,
11690
+ required: false,
11691
+ placeholder: '<email-address-identity-arn>',
11692
+ },
11693
+ {
11694
+ key: 'feedbackForwardingEmailAddress',
11695
+ label: 'Feedback Forwarding Email Address',
11696
+ type: ConnectorConfigFormItemType.Text,
11697
+ required: false,
11698
+ placeholder: '<feedback-forwarding-email-address>',
11699
+ },
11700
+ {
11701
+ key: 'feedbackForwardingEmailAddressIdentityArn',
11702
+ label: 'Feedback Forwarding Email Address Identity ARN',
11703
+ type: ConnectorConfigFormItemType.Text,
11704
+ required: false,
11705
+ placeholder: '<feedback-forwarding-email-address-identity-arn>',
11706
+ },
11707
+ {
11708
+ key: 'configurationSetName',
11709
+ label: 'Configuration Set Name',
11710
+ type: ConnectorConfigFormItemType.Text,
11711
+ required: false,
11712
+ placeholder: '<configuration-set-name>',
11713
+ },
11714
+ {
11715
+ key: 'templates',
11716
+ label: 'Templates',
11717
+ type: ConnectorConfigFormItemType.Json,
11718
+ required: true,
11719
+ defaultValue: [
11720
+ {
11721
+ usageType: 'SignIn',
11722
+ subject: '<sign-in-template-subject>',
11723
+ content: '<sign-in-template-content>',
11724
+ },
11725
+ {
11726
+ usageType: 'Register',
11727
+ subject: '<register-template-subject>',
11728
+ content: '<register-template-content>',
11729
+ },
11730
+ {
11731
+ usageType: 'ForgotPassword',
11732
+ subject: '<forgot-password-template-subject>',
11733
+ content: '<forgot-password-template-content>',
11734
+ },
11735
+ {
11736
+ usageType: 'Generic',
11737
+ subject: '<generic-template-subject>',
11738
+ content: '<generic-template-content>',
11739
+ },
11740
+ {
11741
+ usageType: 'Test',
11742
+ subject: '<test-template-subject>',
11743
+ content: '<test-template-content>',
11744
+ },
11745
+ ],
11746
+ },
11747
+ ],
11658
11748
  };
11659
11749
 
11660
11750
  /**
package/package.json CHANGED
@@ -53,7 +53,7 @@
53
53
  "access": "public"
54
54
  },
55
55
  "name": "@logto/connector-aws-ses",
56
- "version": "1.0.0-beta.19",
56
+ "version": "1.0.0-beta.20",
57
57
  "description": "Logto Connector for Amazon SES",
58
58
  "author": "Jeff <admin@breadth.app>",
59
59
  "scripts": {
@@ -1,37 +0,0 @@
1
- {
2
- "accessKeyId": "<access-key-id>",
3
- "accessKeySecret": "<access-key-secret>",
4
- "region": "<region>",
5
- "emailAddress": "<OPTIONAL-verified-email>",
6
- "emailAddressIdentityArn": "<OPTIONAL-email-arn>",
7
- "feedbackForwardingEmailAddress": "<OPTIONAL-feedback-email>",
8
- "feedbackForwardingEmailAddressIdentityArn": "<OPTIONAL-feedback-email-arn>",
9
- "configurationSetName": "<OPTIONAL-configuration-set>",
10
- "templates": [
11
- {
12
- "usageType": "SignIn",
13
- "subject": "<sign-in-template-subject>",
14
- "content": "<sign-in-template-content>"
15
- },
16
- {
17
- "usageType": "Register",
18
- "subject": "<register-template-subject>",
19
- "content": "<register-template-content>"
20
- },
21
- {
22
- "usageType": "ForgotPassword",
23
- "subject": "<forgot-password-template-subject>",
24
- "content": "<forgot-password-template-content>"
25
- },
26
- {
27
- "usageType": "Generic",
28
- "subject": "<generic-template-subject>",
29
- "content": "<generic-template-content>"
30
- },
31
- {
32
- "usageType": "Test",
33
- "subject": "<test-template-subject>",
34
- "content": "<test-template-content>"
35
- }
36
- ]
37
- }