halo/console/packages/api-client
John Niang 7603b21dd2
Support restoring with downloadable URL or backup name (#4474)
#### What type of PR is this?

/kind feature
/area core
/milestone 2.9.x

#### What this PR does / why we need it:

Currently, we only support restoring by uploading backup file. Downloading and uploading larger backup files can be cumbersome for users.

This PR supports restoring with downloadable URL or backup name as well.

#### Special notes for your reviewer:

```bash
# Replace ${BACKUP_NAME} by yourself.
curl -u admin:admin 'http://localhost:8090/apis/api.console.migration.halo.run/v1alpha1/restorations' \
  -H 'Content-Type: multipart/form-data; boundary=----WebKitFormBoundary3Al7pC6AbBNfB1js' \
  --data-raw $'------WebKitFormBoundary3Al7pC6AbBNfB1js\r\nContent-Disposition: form-data; name="backupName"\r\n\r\n${BACKUP_NAME}\r\n------WebKitFormBoundary3Al7pC6AbBNfB1js--\r\n'
```

```bash
# Replace ${DOWNLOAD_LINK} by yourself.
curl -u admin:admin 'http://localhost:8090/apis/api.console.migration.halo.run/v1alpha1/restorations' \
  -H 'Content-Type: multipart/form-data; boundary=----WebKitFormBoundarytv6cqgmANkCpSuZm' \
  --data-raw $'------WebKitFormBoundarytv6cqgmANkCpSuZm\r\nContent-Disposition: form-data; name="downloadUrl"\r\n\r\n${DOWNLOAD_LINK}\r\n------WebKitFormBoundarytv6cqgmANkCpSuZm--\r\n'
```

#### Does this PR introduce a user-facing change?

```release-note
新增提供下载链接或者备份名进行系统恢复的功能。
```
2023-08-25 15:22:11 +00:00
..
src Support restoring with downloadable URL or backup name (#4474) 2023-08-25 15:22:11 +00:00
.eslintignore Move root to console 2023-03-02 15:49:22 +08:00
.eslintrc.js chore: solving the issue of generating API client causing unnecessary diffs (#3465) 2023-03-07 14:14:14 +00:00
.gitignore Move root to console 2023-03-02 15:49:22 +08:00
.prettierrc.js chore: solving the issue of generating API client causing unnecessary diffs (#3465) 2023-03-07 14:14:14 +00:00
README.md Move root to console 2023-03-02 15:49:22 +08:00
build.config.ts chore: solving the issue of generating API client causing unnecessary diffs (#3465) 2023-03-07 14:14:14 +00:00
openapitools.json Move root to console 2023-03-02 15:49:22 +08:00
package.json Prepare for developing Halo 2.9.0 (#4344) 2023-08-01 07:33:45 +00:00
tsconfig.json Move root to console 2023-03-02 15:49:22 +08:00

README.md

@halo-dev/api-client

Halo 2.0 的 JavaScript API 客户端请求库。使用 OpenAPI Generator 生成。

开发环境

pnpm install
# 根据 OpenAPI 3.0 生成类型和网络请求的代码,此步骤需要启动 Halo 2.0 后端。
pnpm gen
pnpm build

发布版本

pnpm release