shared-ritm 1.2.29 → 1.2.31

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.
@@ -1,13 +1,24 @@
1
1
  import ApiService from '@/api/settings/ApiService';
2
- type LoginResponse = {
2
+ export type LoginPayload = {
3
+ email: string;
4
+ password: string;
5
+ };
6
+ export type LoginResponse = {
3
7
  token: string;
4
8
  user: any;
5
9
  };
10
+ export type ChangePasswordPayload = {
11
+ password: string;
12
+ password_confirmation: string;
13
+ };
14
+ export type ChangePasswordResponse = any;
15
+ export type ConfigResponse = any;
6
16
  declare class AuthService extends ApiService {
7
17
  login(email: string, password: string): Promise<LoginResponse>;
8
18
  logout(): Promise<LoginResponse>;
9
19
  userInfo(): Promise<any>;
10
20
  configs(): Promise<any>;
21
+ changePassword(id: string, password: string, password_confirmation: string): Promise<any>;
11
22
  }
12
23
  export default function useAuthService(): AuthService;
13
24
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shared-ritm",
3
- "version": "1.2.29",
3
+ "version": "1.2.31",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist",
@@ -1,16 +1,22 @@
1
1
  import ApiService from '@/api/settings/ApiService'
2
2
 
3
- type LoginPayload = {
3
+ export type LoginPayload = {
4
4
  email: string
5
5
  password: string
6
6
  }
7
7
 
8
- type LoginResponse = {
8
+ export type LoginResponse = {
9
9
  token: string
10
10
  user: any
11
11
  }
12
12
 
13
- type ConfigResponse = any
13
+ export type ChangePasswordPayload = {
14
+ password: string
15
+ password_confirmation: string
16
+ }
17
+
18
+ export type ChangePasswordResponse = any
19
+ export type ConfigResponse = any
14
20
 
15
21
  class AuthService extends ApiService {
16
22
  public login(email: string, password: string) {
@@ -31,6 +37,13 @@ class AuthService extends ApiService {
31
37
  public configs() {
32
38
  return this.get<ConfigResponse>(`/configs`)
33
39
  }
40
+
41
+ public changePassword(id: string, password: string, password_confirmation: string) {
42
+ return this.put<ChangePasswordPayload, ChangePasswordResponse>(`/users/${id}/password`, {
43
+ password,
44
+ password_confirmation,
45
+ })
46
+ }
34
47
  }
35
48
 
36
49
  let api: AuthService
@@ -153,7 +153,7 @@ const itemClasses = computed(() => ({
153
153
  border-radius: v-bind(borderRadius);
154
154
  height: v-bind(height);
155
155
  align-items: center;
156
- padding: 0 16px;
156
+ padding: 0 12px;
157
157
  color: #87caff;
158
158
  }
159
159
  :global(.q-field__control-container) {