open-index/open-npm huggingface dataset:
npm package: @notadd/addon-local
Description: Package Open in Browser for already.
Author: notadd
Latest version: 2.1.0

# Local Storage Addon for Notadd

- [x] Upload based on Form form without going through the server.
- [x] Unified API, seamlessly switching backends.
- [x] Support image processing
- [x] Supports default webp format

## Application Installation

[Click to view the installation documentation](https://docs.nestjs.cn/#/v2/en/appstore?id=install)
npm package: @notadd/addon-mailer
Description: Package mailer for Notadd.
Author: notadd
Latest version: 2.0.6

# NotAdd Mailbox delivery plug - in
## Function
### 1.Send mailbox function
### 2.Custom mailbox template function
### 3.Mailbox log
## Installation
```bash
yarn add @notadd/addon-mailer
```
## Use
```bash

@Module({
  imports: [EmailModule],
})
```

```bash
import { EmailModule } from "@notadd/addon-mailer";
constructor(@Inject(EmailComponentProvider) private readonly emailComponentProvider: EmailComponentProvider,
){}

//    Call the mail plug-in to send mail
/**
   * Send mail
   * @param mContent replaceModuleParameter
   * @param {number} mid ModuleId
   * @param {[string]} email 
   * @param {string} sender Sender name
   * @param {number} emailConfigId emailConfig Id
   * @returns {Promise<{code; message}>}
   */
   const result = await this.emailComponentProvider.sendEmail(mContent: {name: user.name, pwd: newPassword}, mid: 1, email: [email], sender: "xxx", emailConfigId： 1);
   f (result.code !== 200) {
        return { errno: 400, errmsg: "邮件发送失败，请稍后重试", data: "" };
   }
```
npm package: @notadd/addon-redis
Description: The redis addon for Notadd modules.
Author: notadd
Latest version: 0.1.3

# nt-addon-redis

Redis addon for Notadd.

## Installation

```bash
# install
$ npm install @notadd/addon-redis

or

$ yarn add @notadd/addon-redis
```

## Usage

> app.module.ts

```typescript
import { Module } from '@nestjs/common';
import { RedisAddon } from '@notadd/addon-redis'

@Module({
    import: [
        RedisAddon.forRoot({
            // redis connection options, such as host, port, etc
        })
    ]
})
export AppModule { }
```

> xxx.service.ts

```typescript
import { Injectable } from '@nestjs/common';
import { RedisService } from '@notadd/addon-redis';

@Injectable()
export class TestService {
    constructor(
        @Inject(RedisService) private readonly redisService: RedisService
    ) { }

    // service method usage
    async test() {
        // redis hset
        await this.redisService.hset(key, field, value);
        // redis hget
        await this.redisService.hget(key, field);
    }
}
```
npm package: @notadd/addon-sms
Description: The sms addon for notadd application.
Author: notadd
Latest version: 3.0.0

# notadd 短信验证码插件

## 功能

1. 短信插件管理
2. 短信模板管理
3. 短信发送记录管理
4. 使用腾讯云短信服务发送短信验证码
5. 校验验证码合法性

## 安装

```bash
# install
yarn add @notadd/addon-sms
```

## 使用说明

> 第一步，导入短信插件

```typescript
import { SmsAddon } from "@notadd/addon-sms";

@Module({
    imports: [SmsAddon]
})
export class AppModule { }
```

> 第二步，创建短信插件

```typescript
import { SmsService } from "@notadd/addon-sms";

@Injectable()
export class ExampleService {
    constructor(
        @Inject(SmsService) private readonly smsService: SmsService
    ) { }

    // 创建/配置短信插件
    async test() {
        await this.smsService.createSms({
            appId: '123456789',
            appKey: 'zbcdefg123',
            signName: '签名',
            templates: [
                {
                    templateId: 122334,
                    name: '短信测试',
                    remark: '您的验证码是{1}，请于{2}分钟内填写。如非本人操作，请忽略本短信。'
                }
            ]
        });
    }
}
```

> 第三步，调用发送/验证短信方法

```typescript
import { SmsService } from "@notadd/addon-sms";

@Injectable()
export class ExampleService {
    constructor(
        @Inject(SmsService) private readonly smsService: SmsService
    ) { }

    // SmsRequest example：(2 , { appId: "1234567890", templateId: 123456, templateParam: ["xxxxx", "xxxxx"], "mobile": ["13512345678"] })
    async sendSms(type: number, smsRequest: SmsRequest) {
        // 短信类型 0为通知短信，1为验证码短信，2为自定义参数短信
        // 成功时返回 { code: 200, message: "发送短信成功" };
        //
        // 失败时会抛出以下几种异常：
        // HttpException (`指定短信插件'appId=xxxxx'不存在`, 404);
        // HttpException (`指定短信模板'templateId=xxxxx'不存在`, 404);
        // HttpException (`发送失败，原因：xxxxx`, xxxxx);
        await this.smsService.sendMessageByQCloud(type, smsRequest);
    }

    async smsValidator(mobile: string, validationCode: number) {
        // 校验验证码合法性，成功时没有返回值，失败时抛出 HttpException { code: number, message: string }
        //
        // 校验顺序：
        // step 1，判断手机号是否和接收短信手机号一致，失败时： HttpException ("输入的手机号码与接收短信的手机号码不一致", 404);
        // step 2，判断验证码是否正确，失败时： HttpException ("验证码错误", 406);
        // step 3，判断验证码是否超时，失败时： HttpException ("验证超时，请重新获取验证码", 408);
        await this.smsService.smsValidator(mobile, validationCode);
    }
}
```
npm package: @notadd/addon-upyun
Description: Package Open in Browser for already.
Author: notadd
Latest version: 3.0.0

# Upyun Storage Addon for Notadd

- [x] Upload based on Form form without going through the server.
- [x] Unified API, seamlessly switching backends.
- [x] Support image processing
- [x] Supports default webp format
- [ ] Audio Processing Support
- [ ] Support video processing

## Application Installation

[Click to view the installation document](https://docs.nestjs.cn/#/v2/en/appstore?id=install)
npm package: @notadd/cms
Description: Notadd CMS Package.
Author: EricAll
Latest version: 2.0.25

## CMS Module for Notadd

- [x] Back-End infinite class classification
- [x] Unified picture, file upload API
- [x] Support custom pages
- [x] Custom information item
- [ ] Draft box
- [ ] Offline data Save

## Application Installation

[Click to view the installation document](https://docs.nestjs.cn/#/v2/en/appstore?id=install)

Note: This module only applies to Notadd.