@devopness/sdk-js 2.40.0 → 2.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -72,7 +72,7 @@ getUserProfile();
72
72
 
73
73
  ### TypeScript support
74
74
  This package includes TypeScript declarations for every method.
75
- TypeScript versions `>= 3.8` are supported.
75
+ TypeScript versions `>= 4.4` are supported.
76
76
 
77
77
  >Some methods in `Devopness SDK JavaScript` accept and return objects from the Devopness API. The type declarations for these objects will always track the latest version of the API. Therefore, if you'e using the latest version of this package, you can rely on the Devopness API documentation for checking the input and return types of each API endpoint.
78
78
 
@@ -15,6 +15,7 @@ import { User } from '../../generated/models';
15
15
  import { UserCreate } from '../../generated/models';
16
16
  import { UserLogin } from '../../generated/models';
17
17
  import { UserLoginResponse } from '../../generated/models';
18
+ import { UserMe } from '../../generated/models';
18
19
  import { UserRefreshToken } from '../../generated/models';
19
20
  import { UserRefreshTokenResponse } from '../../generated/models';
20
21
  import { UserResendVerification } from '../../generated/models';
@@ -36,22 +37,22 @@ export declare class UsersApiService extends ApiBaseService {
36
37
  * @param {number} userId The ID of the user.
37
38
  */
38
39
  getUser(userId: number): Promise<ApiResponse<User>>;
40
+ /**
41
+ *
42
+ * @summary Logout/revoke an existing token
43
+ */
44
+ getUserLogout(): Promise<ApiResponse<void>>;
39
45
  /**
40
46
  *
41
47
  * @summary Get details of the current user
42
48
  */
43
- getUserMe(): Promise<ApiResponse<User>>;
49
+ getUserMe(): Promise<ApiResponse<UserMe>>;
44
50
  /**
45
51
  *
46
52
  * @summary Login/create a new token for the given credentials
47
53
  * @param {UserLogin} userLogin A JSON object containing the resource data
48
54
  */
49
55
  loginUser(userLogin: UserLogin): Promise<ApiResponse<UserLoginResponse>>;
50
- /**
51
- *
52
- * @summary Logout/revoke an existing token
53
- */
54
- logout(): Promise<ApiResponse<void>>;
55
56
  /**
56
57
  *
57
58
  * @summary Refresh an existing user access token
@@ -61,6 +61,18 @@ class UsersApiService extends ApiBaseService_1.ApiBaseService {
61
61
  return new ApiResponse_1.ApiResponse(response);
62
62
  });
63
63
  }
64
+ /**
65
+ *
66
+ * @summary Logout/revoke an existing token
67
+ */
68
+ getUserLogout() {
69
+ return __awaiter(this, void 0, void 0, function* () {
70
+ let queryString = '';
71
+ const requestUrl = '/users/logout' + (queryString ? `?${queryString}` : '');
72
+ const response = yield this.get(requestUrl);
73
+ return new ApiResponse_1.ApiResponse(response);
74
+ });
75
+ }
64
76
  /**
65
77
  *
66
78
  * @summary Get details of the current user
@@ -89,18 +101,6 @@ class UsersApiService extends ApiBaseService_1.ApiBaseService {
89
101
  return new ApiResponse_1.ApiResponse(response);
90
102
  });
91
103
  }
92
- /**
93
- *
94
- * @summary Logout/revoke an existing token
95
- */
96
- logout() {
97
- return __awaiter(this, void 0, void 0, function* () {
98
- let queryString = '';
99
- const requestUrl = '/users/logout' + (queryString ? `?${queryString}` : '');
100
- const response = yield this.get(requestUrl);
101
- return new ApiResponse_1.ApiResponse(response);
102
- });
103
- }
104
104
  /**
105
105
  *
106
106
  * @summary Refresh an existing user access token
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devopness/sdk-js",
3
- "version": "2.40.0",
3
+ "version": "2.41.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },