2022-04-26 19:32:41 +08:00
|
|
|
|
import path from 'path';
|
|
|
|
|
|
|
|
|
|
import { ConnectorType, ConnectorMetadata } from '@logto/connector-types';
|
|
|
|
|
import { getFileContents } from '@logto/shared';
|
|
|
|
|
|
|
|
|
|
export const endpoint = 'https://dm.aliyuncs.com/';
|
|
|
|
|
|
|
|
|
|
export const staticConfigs = {
|
|
|
|
|
Format: 'json',
|
|
|
|
|
SignatureMethod: 'HMAC-SHA1',
|
|
|
|
|
SignatureVersion: '1.0',
|
|
|
|
|
Version: '2015-11-23',
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// eslint-disable-next-line unicorn/prefer-module
|
|
|
|
|
const currentPath = __dirname;
|
|
|
|
|
const pathToReadmeFile = path.join(currentPath, '..', 'README.md');
|
|
|
|
|
const pathToConfigTemplate = path.join(currentPath, '..', 'docs', 'config-template.md');
|
|
|
|
|
const readmeContentFallback = 'Please check README.md file directory.';
|
|
|
|
|
const configTemplateFallback = 'Please check config-template.md file directory.';
|
|
|
|
|
|
|
|
|
|
export const defaultMetadata: ConnectorMetadata = {
|
2022-05-24 11:39:44 +08:00
|
|
|
|
id: 'aliyun-direct-mail',
|
2022-05-12 12:17:17 +08:00
|
|
|
|
target: 'aliyun-dm',
|
2022-04-26 19:32:41 +08:00
|
|
|
|
type: ConnectorType.Email,
|
2022-05-12 12:17:17 +08:00
|
|
|
|
platform: null,
|
2022-04-26 19:32:41 +08:00
|
|
|
|
name: {
|
|
|
|
|
en: 'Aliyun Direct Mail',
|
|
|
|
|
'zh-CN': '阿里云邮件推送',
|
|
|
|
|
},
|
2022-05-23 12:44:42 +08:00
|
|
|
|
logo: 'https://gist.githubusercontent.com/darcyYe/31bc893a0a305dc43cf831bf0b14f0fc/raw/faf985d3fbeed88180b8f3cb709892320d66ae45/alibabacloud.svg',
|
2022-04-26 19:32:41 +08:00
|
|
|
|
description: {
|
|
|
|
|
en: 'A simple and efficient email service to help you send transactional notifications and batch email.',
|
|
|
|
|
'zh-CN':
|
|
|
|
|
'邮件推送(DirectMail)是款简单高效的电子邮件群发服务,构建在阿里云基础之上,帮您快速、精准地实现事务邮件、通知邮件和批量邮件的发送。',
|
|
|
|
|
},
|
|
|
|
|
readme: getFileContents(pathToReadmeFile, readmeContentFallback),
|
|
|
|
|
configTemplate: getFileContents(pathToConfigTemplate, configTemplateFallback),
|
|
|
|
|
};
|