| 1 | /* |
| 2 | * @Author: lish |
| 3 | * @Date: 2024-07-08 20:13:01 |
| 4 | * @LastEditors: lish |
| 5 | * @LastEditTime: 2024-07-08 20:27:44 |
| 6 | * @Description: Do not edit |
| 7 | */ |
| 8 | export interface AlicloudSmsOptions { |
| 9 | config: { |
| 10 | /** |
| 11 | * Alicloud account accessKey ID. |
| 12 | * |
| 13 | * @see https://usercenter.console.aliyun.com/#/manage/ak |
| 14 | * @type {string} |
| 15 | */ |
| 16 | accessKeyId: string; |
| 17 | |
| 18 | /** |
| 19 | * Alicloud account accessKey secret. |
| 20 | * |
| 21 | * @see https://usercenter.console.aliyun.com/#/manage/ak |
| 22 | * @type {string} |
| 23 | */ |
| 24 | accessKeySecret: string; |
| 25 | |
| 26 | /** |
| 27 | * Alicloud API service url. |
| 28 | * |
| 29 | * @default 'https://dysmsapi.aliyuncs.com' |
| 30 | * @type {string} |
| 31 | */ |
| 32 | endpoint?: string; |
| 33 | |
| 34 | /** |
| 35 | * Alicloud SMS API version. |
| 36 | * |
| 37 | * @default 2017-05-25 |
| 38 | * @type {string} |
| 39 | */ |
| 40 | apiVersion?: string; |
| 41 | |
| 42 | opts?: { |
| 43 | /** |
| 44 | * @default 3000 |
| 45 | * @type {number} |
| 46 | */ |
| 47 | timeout?: number; |
| 48 | |
| 49 | /** |
| 50 | * Format the parameter name to first letter upper case |
| 51 | * |
| 52 | * @default true |
| 53 | * @type {boolean} |
| 54 | */ |
| 55 | formatParams?: boolean; |
| 56 | |
| 57 | /** |
| 58 | * Set the http method |
| 59 | * |
| 60 | * @default GET |
| 61 | * @type {('GET' | 'POST')} |
| 62 | */ |
| 63 | method?: 'GET' | 'POST'; |
| 64 | |
| 65 | /** |
| 66 | * Http request headers |
| 67 | * |
| 68 | * @type {object} |
| 69 | */ |
| 70 | headers?: object; |
| 71 | }; |
| 72 | }; |
| 73 | defaults?: { |
| 74 | /** |
| 75 | * SMS message template ID. |
| 76 | * |
| 77 | * @see 请在控制台模板管理页面模板CODE一列查看。 |
| 78 | * @type {string} |
| 79 | */ |
| 80 | signName?: string; |
| 81 | |
| 82 | /** |
| 83 | * Alicloud region ID. |
| 84 | * |
| 85 | * @type {string} |
| 86 | */ |
| 87 | regionId?: string; |
| 88 | |
| 89 | templateCode?: string; |
| 90 | }; |
| 91 | |
| 92 | /** |
| 93 | * Log sent message on dashboard. |
| 94 | * |
| 95 | * @default false |
| 96 | * @type {boolean} |
| 97 | * @memberof AlicloudSmsOptions |
| 98 | */ |
| 99 | logger?: boolean; |
| 100 | } |
| 101 |