Skip to content

Commit 703604c

Browse files
committed
added types to app
1 parent 0ad42e3 commit 703604c

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"type": "git",
55
"url": "https://github.com/code-gio/cloudways-js-client.git"
66
},
7-
"version": "0.0.23",
7+
"version": "0.0.24",
88
"description": "A client library to power your applications with Cloudways API",
99
"main": "dist/index.js",
1010
"module": "dist/index.mjs",

src/application/index.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { apiCall, HttpMethod } from "../auth";
88
* @property {string} app_label - Name of the app.
99
* @property {string} project_name - Optional name of the project.
1010
*/
11-
interface StartAddAppPayload {
11+
export interface StartAddAppPayload {
1212
server_id: number;
1313
application: string;
1414
app_label: string;
@@ -20,7 +20,7 @@ interface StartAddAppPayload {
2020
* @description Interface for the response when starting the add app process.
2121
* @property {number} operation_id - Operation ID.
2222
*/
23-
interface StartAddAppResponse {
23+
export interface StartAddAppResponse {
2424
operation_id: number;
2525
}
2626

@@ -37,7 +37,7 @@ interface StartAddAppResponse {
3737
* @property {number} app_id - Numeric ID of the application.
3838
* @property {string} app_label - Name of the app.
3939
*/
40-
interface CloneAppPayload {
40+
export interface CloneAppPayload {
4141
server_id: number;
4242
app_id: number;
4343
app_label: string;
@@ -49,7 +49,7 @@ interface CloneAppPayload {
4949
* @property {number} app_id - New App ID.
5050
* @property {number} operation_id - Operation ID.
5151
*/
52-
interface CloneAppResponse {
52+
export interface CloneAppResponse {
5353
app_id: number;
5454
operation_id: number;
5555
}
@@ -67,7 +67,7 @@ interface CloneAppResponse {
6767
* @property {number} app_id - Numeric ID of the application to be cloned.
6868
* @property {number} destination_server_id - Numeric ID of the server where the application will be cloned.
6969
*/
70-
interface CloneAppToOtherServerPayload {
70+
export interface CloneAppToOtherServerPayload {
7171
server_id: number;
7272
app_id: number;
7373
destination_server_id: number;
@@ -80,7 +80,7 @@ interface CloneAppToOtherServerPayload {
8080
* @property {number} destination_operation_id - Destination Operation ID.
8181
* @property {number} app_id - New App ID.
8282
*/
83-
interface CloneAppToOtherServerResponse {
83+
export interface CloneAppToOtherServerResponse {
8484
source_operation_id: number;
8585
destination_operation_id: number;
8686
app_id: number;
@@ -114,7 +114,7 @@ interface CloneAppToOtherServerResponse {
114114
* @property {number} server_id - Numeric ID of the server.
115115
* @property {number} appId - Numeric ID of the application to be removed.
116116
*/
117-
interface DeleteAppPayload {
117+
export interface DeleteAppPayload {
118118
server_id: number;
119119
appId: number;
120120
}
@@ -124,7 +124,7 @@ interface DeleteAppPayload {
124124
* @description Interface for the response when starting the remove app operation.
125125
* @property {number} operation_id - Operation ID.
126126
*/
127-
interface DeleteAppResponse {
127+
export interface DeleteAppResponse {
128128
operation_id: number;
129129
}
130130

@@ -141,7 +141,7 @@ interface DeleteAppResponse {
141141
* @property {number} server_id - Numeric ID of the server.
142142
* @property {string} label - New label of the application.
143143
*/
144-
interface UpdateAppLabelPayload {
144+
export interface UpdateAppLabelPayload {
145145
appId: number;
146146
server_id: number;
147147
label: string;
@@ -152,7 +152,7 @@ interface UpdateAppLabelPayload {
152152
* @description Interface for the response when updating the app label.
153153
* @property {boolean} status - Operation status.
154154
*/
155-
interface UpdateAppLabelResponse {
155+
export interface UpdateAppLabelResponse {
156156
status: boolean;
157157
}
158158

@@ -220,7 +220,7 @@ export async function cloneApp(
220220
}
221221

222222
// Function to start adding an app
223-
export async function startAddApp(
223+
export async function addApp(
224224
payload: StartAddAppPayload
225225
): Promise<StartAddAppResponse> {
226226
const endpoint = "https://api.cloudways.com/api/v1/app";

0 commit comments

Comments
 (0)