Skip to content

Commit b6f9ccd

Browse files
author
williamd5
authored
Merge pull request #48 from cloudnode-pro/rebuild
Regenerate and rebuild
2 parents 7226fc8 + 013d96c commit b6f9ccd

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ Create a session using user ID/username/e-mail and password.
176176
- `user` <code>[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)</code> User ID (starts with `user_`), username or e-mail address.
177177
- `password` <code>[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)</code> The password of the account.
178178
- Returns: <code>[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[Cloudnode.ApiResponse](#class-cloudnodeapiresponset)&lt;{session: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)}>></code> Session token. Also returned in `Set-Cookie` header.
179-
- Throws: <code>[Cloudnode.Error](#interface-cloudnodeerror) & {code: "UNAUTHORIZED"}</code>
179+
- Throws: <code>[Cloudnode.Error](#interface-cloudnodeerror) & {code: "INVALID_DATA"}</code>
180180
- Throws: <code>[Cloudnode.Error](#interface-cloudnodeerror) & {code: "IP_REJECTED"}</code>
181181
- Throws: <code>[Cloudnode.Error](#interface-cloudnodeerror) & {code: "RATE_LIMITED"}</code>
182182
- Throws: <code>[Cloudnode.Error](#interface-cloudnodeerror) & {code: "INTERNAL_SERVER_ERROR"}</code>

browser/Cloudnode.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,15 +360,15 @@ class Cloudnode {
360360
* @POST /auth/login
361361
* @param user User ID (starts with `user_`), username or e-mail address.
362362
* @param password The password of the account.
363-
* @throws {Cloudnode.Error & {code: "UNAUTHORIZED"}}
363+
* @throws {Cloudnode.Error & {code: "INVALID_DATA"}}
364364
* @throws {Cloudnode.Error & {code: "IP_REJECTED"}}
365365
* @throws {Cloudnode.Error & {code: "RATE_LIMITED"}}
366366
* @throws {Cloudnode.Error & {code: "INTERNAL_SERVER_ERROR"}}
367367
* @throws {Cloudnode.Error & {code: "MAINTENANCE"}}
368368
* @returns Session token. Also returned in `Set-Cookie` header.
369369
*/
370370
login: async (user, password) => {
371-
return await this.#sendRequest({ "type": "operation", "description": "Create a session using user ID/username/e-mail and password.\n\n> **Note**: Logging in can only be performed from residential IP. Proxying this endpoint will likely not work. It is normally not recommended to use this endpoint to gain API access. Instead, create a token from your account to use with the API.", "method": "POST", "path": "/auth/login", "parameters": { "body": { "user": { "description": "User ID (starts with `user_`), username or e-mail address.", "type": "string", "required": true }, "password": { "description": "The password of the account.", "type": "string", "required": true } } }, "returns": [{ "status": 201, "type": "{session: string}", "description": "Session token. Also returned in `Set-Cookie` header." }, { "status": 401, "type": "Error & {code: \"UNAUTHORIZED\"}" }, { "status": 403, "type": "Error & {code: \"IP_REJECTED\"}" }, { "status": 429, "type": "Error & {code: \"RATE_LIMITED\"}" }, { "status": 500, "type": "Error & {code: \"INTERNAL_SERVER_ERROR\"}" }, { "status": 503, "type": "Error & {code: \"MAINTENANCE\"}" }] }, {}, {}, { user, password });
371+
return await this.#sendRequest({ "type": "operation", "description": "Create a session using user ID/username/e-mail and password.\n\n> **Note**: Logging in can only be performed from residential IP. Proxying this endpoint will likely not work. It is normally not recommended to use this endpoint to gain API access. Instead, create a token from your account to use with the API.", "method": "POST", "path": "/auth/login", "parameters": { "body": { "user": { "description": "User ID (starts with `user_`), username or e-mail address.", "type": "string", "required": true }, "password": { "description": "The password of the account.", "type": "string", "required": true } } }, "returns": [{ "status": 201, "type": "{session: string}", "description": "Session token. Also returned in `Set-Cookie` header." }, { "status": 422, "type": "Error & {code: \"INVALID_DATA\"}" }, { "status": 403, "type": "Error & {code: \"IP_REJECTED\"}" }, { "status": 429, "type": "Error & {code: \"RATE_LIMITED\"}" }, { "status": 500, "type": "Error & {code: \"INTERNAL_SERVER_ERROR\"}" }, { "status": 503, "type": "Error & {code: \"MAINTENANCE\"}" }] }, {}, {}, { user, password });
372372
},
373373
};
374374
}

browser/Cloudnode.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Cloudnode.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ declare class Cloudnode {
197197
* @POST /auth/login
198198
* @param user User ID (starts with `user_`), username or e-mail address.
199199
* @param password The password of the account.
200-
* @throws {Cloudnode.Error & {code: "UNAUTHORIZED"}}
200+
* @throws {Cloudnode.Error & {code: "INVALID_DATA"}}
201201
* @throws {Cloudnode.Error & {code: "IP_REJECTED"}}
202202
* @throws {Cloudnode.Error & {code: "RATE_LIMITED"}}
203203
* @throws {Cloudnode.Error & {code: "INTERNAL_SERVER_ERROR"}}

src/Cloudnode.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,15 +360,15 @@ class Cloudnode {
360360
* @POST /auth/login
361361
* @param user User ID (starts with `user_`), username or e-mail address.
362362
* @param password The password of the account.
363-
* @throws {Cloudnode.Error & {code: "UNAUTHORIZED"}}
363+
* @throws {Cloudnode.Error & {code: "INVALID_DATA"}}
364364
* @throws {Cloudnode.Error & {code: "IP_REJECTED"}}
365365
* @throws {Cloudnode.Error & {code: "RATE_LIMITED"}}
366366
* @throws {Cloudnode.Error & {code: "INTERNAL_SERVER_ERROR"}}
367367
* @throws {Cloudnode.Error & {code: "MAINTENANCE"}}
368368
* @returns Session token. Also returned in `Set-Cookie` header.
369369
*/
370370
login: async (user, password) => {
371-
return await this.#sendRequest({ "type": "operation", "description": "Create a session using user ID/username/e-mail and password.\n\n> **Note**: Logging in can only be performed from residential IP. Proxying this endpoint will likely not work. It is normally not recommended to use this endpoint to gain API access. Instead, create a token from your account to use with the API.", "method": "POST", "path": "/auth/login", "parameters": { "body": { "user": { "description": "User ID (starts with `user_`), username or e-mail address.", "type": "string", "required": true }, "password": { "description": "The password of the account.", "type": "string", "required": true } } }, "returns": [{ "status": 201, "type": "{session: string}", "description": "Session token. Also returned in `Set-Cookie` header." }, { "status": 401, "type": "Error & {code: \"UNAUTHORIZED\"}" }, { "status": 403, "type": "Error & {code: \"IP_REJECTED\"}" }, { "status": 429, "type": "Error & {code: \"RATE_LIMITED\"}" }, { "status": 500, "type": "Error & {code: \"INTERNAL_SERVER_ERROR\"}" }, { "status": 503, "type": "Error & {code: \"MAINTENANCE\"}" }] }, {}, {}, { user, password });
371+
return await this.#sendRequest({ "type": "operation", "description": "Create a session using user ID/username/e-mail and password.\n\n> **Note**: Logging in can only be performed from residential IP. Proxying this endpoint will likely not work. It is normally not recommended to use this endpoint to gain API access. Instead, create a token from your account to use with the API.", "method": "POST", "path": "/auth/login", "parameters": { "body": { "user": { "description": "User ID (starts with `user_`), username or e-mail address.", "type": "string", "required": true }, "password": { "description": "The password of the account.", "type": "string", "required": true } } }, "returns": [{ "status": 201, "type": "{session: string}", "description": "Session token. Also returned in `Set-Cookie` header." }, { "status": 422, "type": "Error & {code: \"INVALID_DATA\"}" }, { "status": 403, "type": "Error & {code: \"IP_REJECTED\"}" }, { "status": 429, "type": "Error & {code: \"RATE_LIMITED\"}" }, { "status": 500, "type": "Error & {code: \"INTERNAL_SERVER_ERROR\"}" }, { "status": 503, "type": "Error & {code: \"MAINTENANCE\"}" }] }, {}, {}, { user, password });
372372
},
373373
};
374374
}

src/Cloudnode.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,15 +368,15 @@ class Cloudnode {
368368
* @POST /auth/login
369369
* @param user User ID (starts with `user_`), username or e-mail address.
370370
* @param password The password of the account.
371-
* @throws {Cloudnode.Error & {code: "UNAUTHORIZED"}}
371+
* @throws {Cloudnode.Error & {code: "INVALID_DATA"}}
372372
* @throws {Cloudnode.Error & {code: "IP_REJECTED"}}
373373
* @throws {Cloudnode.Error & {code: "RATE_LIMITED"}}
374374
* @throws {Cloudnode.Error & {code: "INTERNAL_SERVER_ERROR"}}
375375
* @throws {Cloudnode.Error & {code: "MAINTENANCE"}}
376376
* @returns Session token. Also returned in `Set-Cookie` header.
377377
*/
378378
login: async (user: string, password: string): Promise<Cloudnode.ApiResponse<{session: string}>> => {
379-
return await this.#sendRequest<{session: string}>({"type":"operation","description":"Create a session using user ID/username/e-mail and password.\n\n> **Note**: Logging in can only be performed from residential IP. Proxying this endpoint will likely not work. It is normally not recommended to use this endpoint to gain API access. Instead, create a token from your account to use with the API.","method":"POST","path":"/auth/login","parameters":{"body":{"user":{"description":"User ID (starts with `user_`), username or e-mail address.","type":"string","required":true},"password":{"description":"The password of the account.","type":"string","required":true}}},"returns":[{"status":201,"type":"{session: string}","description":"Session token. Also returned in `Set-Cookie` header."},{"status":401,"type":"Error & {code: \"UNAUTHORIZED\"}"},{"status":403,"type":"Error & {code: \"IP_REJECTED\"}"},{"status":429,"type":"Error & {code: \"RATE_LIMITED\"}"},{"status":500,"type":"Error & {code: \"INTERNAL_SERVER_ERROR\"}"},{"status":503,"type":"Error & {code: \"MAINTENANCE\"}"}]}, {}, {}, {user, password});
379+
return await this.#sendRequest<{session: string}>({"type":"operation","description":"Create a session using user ID/username/e-mail and password.\n\n> **Note**: Logging in can only be performed from residential IP. Proxying this endpoint will likely not work. It is normally not recommended to use this endpoint to gain API access. Instead, create a token from your account to use with the API.","method":"POST","path":"/auth/login","parameters":{"body":{"user":{"description":"User ID (starts with `user_`), username or e-mail address.","type":"string","required":true},"password":{"description":"The password of the account.","type":"string","required":true}}},"returns":[{"status":201,"type":"{session: string}","description":"Session token. Also returned in `Set-Cookie` header."},{"status":422,"type":"Error & {code: \"INVALID_DATA\"}"},{"status":403,"type":"Error & {code: \"IP_REJECTED\"}"},{"status":429,"type":"Error & {code: \"RATE_LIMITED\"}"},{"status":500,"type":"Error & {code: \"INTERNAL_SERVER_ERROR\"}"},{"status":503,"type":"Error & {code: \"MAINTENANCE\"}"}]}, {}, {}, {user, password});
380380
},
381381
} as const;
382382

0 commit comments

Comments
 (0)