@taruvi/sdk 1.2.6 → 1.2.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taruvi/sdk",
3
- "version": "1.2.6",
3
+ "version": "1.2.7",
4
4
  "description": "Taruvi SDK",
5
5
  "main": "src/index.ts",
6
6
  "type": "module",
@@ -21,6 +21,10 @@ export class User {
21
21
  return await this.client.httpClient.put(UserRoutes.updateUser(username), body)
22
22
  }
23
23
 
24
+ async getUser(username: string, body: UserUpdateRequest): Promise<UserCreateResponse> {
25
+ return await this.client.httpClient.put(UserRoutes.getUser(username), body)
26
+ }
27
+
24
28
  async list(filters: UserList) {
25
29
  const queryString = buildQueryString(filters as unknown as Record<string, unknown>)
26
30
  return await this.client.httpClient.get(UserRoutes.listUser(queryString))
@@ -1,6 +1,7 @@
1
1
  export const UserRoutes = {
2
2
  baseUrl: "api/users/",
3
3
  getCurrentUser: () => `${UserRoutes.baseUrl}me/`,
4
+ getUser: (username: string) => `${UserRoutes.baseUrl}${username}/`,
4
5
  updateUser: (username: string) => `${UserRoutes.baseUrl}${username}/`,
5
6
  deleteUser: (username: string) => `${UserRoutes.baseUrl}${username}/`,
6
7
  listUser: (filter: string) => `${UserRoutes.baseUrl}${filter}`,