open-index/open-npm huggingface dataset:
npm package: @smartblog/models
Description: - [npm](#npm) - [smartBlog 前后端接口](#smartBlog前后端接口)   - [article](#article)   - [tag](#tag)   - [menu](#menu)
Author: jamesjianpeng jamesjianpeng@gmail.com
Latest version: 1.2.9

# smartBlog models
- [npm](#npm)
- [smartBlog 前后端接口](#smartBlog前后端接口)
  - [article](#article)
  - [tag](#tag)
  - [menu](#menu)


## npm
- npm login （只需要登录一次）
> 1. 登录的时候需要使用源地址: ``` npm login --registry http://registry.npmjs.org ```  否则会提示 409

- version
> 1. npm version patch （上升一个小版本：0.0.1 -> 0.0.2）

> 2. 可以直接修改 package.json 中的 version 不需要使用 npm version patch 

- publish
> 首次发布之前需要注意 package.json 的包名，不能使用的名字，vscode 会标黄，强行 publish 会提示 400 ;
> 发布之前需要提交或清除git工作区的内容，并且每次发布都要修改 version

> 1. npm publish  (发布正式版本)
>
> 2. npm publish --tag beta (发布测试版本)
>
> 3. npm publish --tag beta --access=public (发布测试版本)
> 
> 4. npm publish --access=public (发布正式版本)
> 
> 创建了组织，没有付费就要设置 --access=public 才能发布
>
> https://docs.npmjs.com/cli/publish

- tag

> https://docs.npmjs.com/cli/dist-tag

## smartBlog前后端接口
### article
```ts
/**
 * @interface 文章接口
 * @property title 文章标题
 * @property post 文章封面
 * @property content 文章内容
 * @property html 文章内容html
 * @property tag 文章标签
 * @property createTime 文章创建时间 YYYY-MM-DD HH:mm:ss
 * @property updateTime 文章更新时间 YYYY-MM-DD HH:mm:ss
 * @property version 版本
 * @property history 修改历史
 */
export interface IArticle extends IBase {
    title: string
    post: string
    content: string
    html: string
    tag: string[]
    createTime: string
    updateTime: string
    version: number
    history: IArticle[]
}

```

### tag
```ts
/**
 * @interface 标签
 * @property text 标签名字
 * @property value 标签key
 * @property createTime 文章创建时间 YYYY-MM-DD HH:mm:ss
 * @property updateTime 文章更新时间 YYYY-MM-DD HH:mm:ss
 * @property version 版本
 * @property history 修改历史
 */
export interface ITag extends IBase {
    text: string
    value: string
    createTime: string
    updateTime: string
    version: number
    history: ITag[]
}
```

### menu
```ts
/**
 * @interface 菜单
 * @property icon 菜单小图标
 * @property title 菜单名字
 * @property path 菜单路由
 * @property children 子菜单
 * @property version 版本 
 */
export interface IMenu {
    icon?: string
    title: string
    path: string
    children?: IMenu[]
    disabled?: boolean
    version?: number
}
```
npm package: @smartblog/nestjs-mdb-lib
Description: nestjs mongodb server
Author: jamesjianpeng
Latest version: 1.0.23

# nestjs-mdb-lib
nestjs mongodb 封装库
主要解决在一个 nestjs 项目中需要连接多个 mongodb 数据库

## 使用
- [example](https://github.com/jamesjianpeng/nestjs-mdb-lib/tree/master/example/test)

- curd.moudle.ts

```typescript
import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import settings from '../settings.json'
import { NestjsMdbLibModule } from '@smartblog/nestjs-mdb-lib'

@Module({
  imports: [
    NestjsMdbLibModule.register([
      { url: settings.mongo_sz, key: 'sz' },
      { url: settings.mongo_hk, key: 'hk' }
    ])
  ],
  controllers: [AppController],
  providers: [AppService],
})
export class AppModule {}
```

- curd.service.ts

```typescript
import { Injectable } from '@nestjs/common';
import { NestjsMdbLibService } from '@smartblog/nestjs-mdb-lib'
@Injectable()
export class AppService {
  constructor (
    private nestjsMdbLibService: NestjsMdbLibService
  ) {}

  async test () {
    const data = { cliKey: 'sz', db:'ghost-live&learn', col: 'subject_sz' }
    const col = await this.nestjsMdbLibService.getCol(data)
    await col.insertOne({ subject: '数据库概率', code: '02323' })

    const dd = { cliKey: 'hk', db:'ghost-live&learn', col: 'subject_hk' }
    const colHk = await this.nestjsMdbLibService.getCol(dd)
    return Promise.resolve({ hk: await (await colHk.find()).toArray(), sz: await (await col.find()).toArray()})
  }

  async testMdb() {
    return await this.test()
  }
}
```

## API
### getClis
> 获取所有的 client

### getCli
> 获取某个 client

## getDb

> 获取 某个数据库
npm package: @smartblog/nestjs-rdb-lib
Description: nestjs redis server
Author: jamesjianpeng
Latest version: 1.0.3

# nestjs-rdb-lib
nestjs redis 封装库
主要解决在一个 nestjs 项目中需要连接多个 redis 数据库

## 使用
- [example](https://github.com/jamesjianpeng/nestjs-rdb-lib/tree/master/example/test)

- curd.moudle.ts

```typescript
import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import settings from '../settings.json'
import { NestjsRdbLibModule } from '../dist'

@Module({
  imports: [
    NestjsRdbLibModule.register([
      { url: settings.redis_sz_1, key: 'sz_1' },
      { url: settings.redis_sz_2, key: 'sz_2' }
    ])
  ],
  controllers: [AppController],
  providers: [AppService],
})
export class AppModule {}

```

- curd.service.ts

```typescript
import { Injectable, OnModuleInit } from '@nestjs/common';
import { NestjsRdbLibService } from '../dist';

@Injectable()
export class AppService implements OnModuleInit {
  constructor (
    private nestjsRdbLibService: NestjsRdbLibService
  ) {}

  onModuleInit () {
  }

  async test (data: { key: string, value: string }) {
    await this.nestjsRdbLibService.toPromiseRes({ key: 'sz_1', api: 'set', opt: [data.key, data.value] })
    const value =  await this.nestjsRdbLibService.toPromiseRes({ key: 'sz_1', api: 'get', opt: [data.key] })


    await this.nestjsRdbLibService.toPromiseRes({ key: 'sz_2', api: 'set', opt: [data.key, data.value] })
    const value2 =  await this.nestjsRdbLibService.toPromiseRes({ key: 'sz_2', api: 'get', opt: [data.key] })

    return { key: data.key, value, value2 }
  }

  async testDb () {
    return 'testDb'
  }
}

```

## API
### getClis

> 获取所有的 client

### toPromiseRes

> 调用某个 redisClient 对应的方法进行传参调用
npm package: @smartbooks-ai/n8n-nodes-api
Description: n8n community node for Smartbooks API
Author: Smartbooks
Latest version: 0.1.5

# Smartbooks API – n8n Node

[n8n](https://n8n.io) community node for the [Smartbooks API](https://smartbooks.ai). Use it in n8n workflows to interact with Smartbooks (reporting, input, intercompany matching, modules, and more).

## Installation

In n8n:

1. Open **Settings** → **Community nodes** → **Install**.
2. Enter: `@smartbooks-ai/n8n-nodes-api`
3. Install and restart n8n if prompted.

Or install via CLI in your n8n project:

```bash
npm install @smartbooks-ai/n8n-nodes-api
```

## Credentials

The node uses **Smartbooks OAuth2 API** credentials.

1. Add a **Smartbooks API** credential in n8n.
2. Use your Smartbooks OAuth2 client ID and client secret.
3. Authorize; the node will use this credential for all requests.

## Resources & operations

The node supports these Smartbooks resources and their operations:

- **Input** – e.g. batch input (by year and period)
- **Module** – module operations
- **Profile** – profile operations
- **Reporting** – reporting operations
- **Structure** – structure operations

Choose **Resource** and **Operation** in the node; required parameters (e.g. company code, IDs) will appear as needed.

## License

MIT © [smartbooks](https://smartbooks.ai)