Skip to content

Commit 0e01761

Browse files
committed
reset password support
1 parent 686a217 commit 0e01761

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@carbonhost/typescript",
3-
"version": "1.1.1",
3+
"version": "1.1.2",
44
"main": "dist/index.js",
55
"module": "dist/index.mjs",
66
"types": "dist/index.d.ts",

src/network/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { AxiosInstance } from "axios";
22
import type { CarbonStar } from "../carbon-star";
3-
import type { Port, SFTPDetails } from "./types";
3+
import type { Port, SFTPAccountDetails, SFTPDetails } from "./types";
44

55
export class NetworkManager {
66
private star: CarbonStar;
@@ -27,4 +27,8 @@ export class NetworkManager {
2727
return this.axios.get<SFTPDetails>("/network/sftp").then(res => res.data)
2828
}
2929

30+
async resetSFTPPassword() {
31+
return this.axios.post<SFTPAccountDetails>("/network/sftp/reset-password").then(res => res.data)
32+
}
33+
3034
}

src/network/types.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,9 @@ export type SFTPDetails = {
1212
port: number;
1313
username: string;
1414
password?: string;
15+
}
16+
17+
export type SFTPAccountDetails = {
18+
username: string;
19+
password: string;
1520
}

0 commit comments

Comments
 (0)