app-expo-cli 1.0.8 → 1.0.9

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": "app-expo-cli",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "A powerful CLI to bootstrap Expo projects with professional architecture",
5
5
  "keywords": [
6
6
  "expo",
@@ -1,25 +1,20 @@
1
1
  import { api } from "../api-config/baseApi";
2
- import { IUserFetch } from "../interface/interface";
3
2
  import { tagTypes } from "../interface/tag-types";
4
3
 
4
+ const base = "auth";
5
+
5
6
  const authSlice = api.injectEndpoints({
6
7
  endpoints: (builder) => ({
7
- getProfile: builder.query<IUserFetch, unknown>({
8
+ getProfile: builder.query({
8
9
  query: () => ({
9
- url: `/auth/get-profile`,
10
- }),
11
- providesTags: [tagTypes.users],
12
- }),
13
- getOthersProfile: builder.query<IUserFetch, any>({
14
- query: (id) => ({
15
- url: `/auth/get-other-profile?id=${id}`,
10
+ url: `/${base}/get-profile`,
16
11
  }),
17
12
  providesTags: [tagTypes.users],
18
13
  }),
19
14
 
20
- updateUser: builder.mutation<any, any>({
15
+ updateUser: builder.mutation({
21
16
  query: (data) => ({
22
- url: `/auth`,
17
+ url: `/${base}`,
23
18
  headers: {
24
19
  "Content-Type": "multipart/form-data",
25
20
  },
@@ -29,40 +24,32 @@ const authSlice = api.injectEndpoints({
29
24
  invalidatesTags: [tagTypes.users],
30
25
  }),
31
26
 
32
- updateLocation: builder.mutation<any, any>({
33
- query: (data) => ({
34
- url: `/auth/location`,
35
- method: "PATCH",
36
- body: data,
37
- }),
38
- invalidatesTags: [tagTypes.users, tagTypes.post, tagTypes.activities],
39
- }),
40
- tokenCheck: builder.mutation<any, any>({
27
+ tokenCheck: builder.mutation({
41
28
  query: () => ({
42
- url: `/auth/check-token`,
29
+ url: `/${base}/check-token`,
43
30
  method: "POST",
44
31
  }),
45
32
  invalidatesTags: [tagTypes.users],
46
33
  }),
47
- login: builder.mutation<any, any>({
34
+ login: builder.mutation({
48
35
  query: (data) => ({
49
- url: `/auth/login`,
36
+ url: `/${base}/login`,
50
37
  method: "POST",
51
38
  body: data,
52
39
  }),
53
40
  invalidatesTags: [tagTypes.users],
54
41
  }),
55
- signUp: builder.mutation<any, any>({
42
+ signUp: builder.mutation({
56
43
  query: (data) => ({
57
- url: `/auth/signup`,
44
+ url: `/${base}/signup`,
58
45
  method: "POST",
59
46
  body: data,
60
47
  }),
61
48
  invalidatesTags: [tagTypes.users],
62
49
  }),
63
- emailVerify: builder.mutation<any, any>({
50
+ emailVerify: builder.mutation({
64
51
  query: (data) => ({
65
- url: `/auth/verify-email`,
52
+ url: `/${base}/verify-email`,
66
53
  method: "POST",
67
54
  body: data,
68
55
  }),
@@ -70,94 +57,42 @@ const authSlice = api.injectEndpoints({
70
57
  }),
71
58
  deleteUser: builder.mutation({
72
59
  query: (id) => ({
73
- url: `/auth/delete`,
60
+ url: `/${base}/delete`,
74
61
  method: "DELETE",
75
62
  }),
76
63
  invalidatesTags: [tagTypes.users],
77
64
  }),
78
65
 
79
- forgot: builder.mutation<any, any>({
66
+ forgot: builder.mutation({
80
67
  query: (data) => ({
81
- url: `/auth/forgot`,
68
+ url: `/${base}/forgot`,
82
69
  method: "POST",
83
70
  body: data,
84
71
  }),
85
72
  invalidatesTags: [tagTypes.users],
86
73
  }),
87
- resetPassword: builder.mutation<any, any>({
74
+ resetPassword: builder.mutation({
88
75
  query: (data) => ({
89
- url: `/auth/reset-password`,
76
+ url: `/${base}/reset-password`,
90
77
  method: "POST",
91
78
  body: data,
92
79
  }),
93
80
  invalidatesTags: [tagTypes.users],
94
81
  }),
95
- changePassword: builder.mutation<any, any>({
82
+ changePassword: builder.mutation({
96
83
  query: (data) => ({
97
- url: `/auth/change-password`,
84
+ url: `/${base}/change-password`,
98
85
  method: "POST",
99
86
  body: data,
100
87
  }),
101
88
  invalidatesTags: [tagTypes.users],
102
89
  }),
103
- // changeProfileImage: builder.mutation<any, any>({
104
- // query: (photo) => ({
105
- // url: `/auth/change-profile-photo`,
106
- // method: "POST",
107
- // body: photo,
108
- // headers: {
109
- // "Content-Type": "multipart/form-data",
110
- // },
111
- // }),
112
- // invalidatesTags: [tagTypes.users],
113
- // }),
114
-
115
- switchGhost: builder.mutation<any, any>({
116
- query: () => ({
117
- url: `/auth/switch-ghost`,
118
- method: "POST",
119
- }),
120
- invalidatesTags: [tagTypes.users],
121
- }),
122
- googleLogin: builder.mutation<any, any>({
123
- query: (data) => ({
124
- url: `/auth/login/google`,
125
- method: "POST",
126
- params: data,
127
- }),
128
- invalidatesTags: [tagTypes.users],
129
- }),
130
- googleLoginCode: builder.mutation<any, any>({
131
- query: (data) => ({
132
- url: `/auth/login/google/code?code=${data}`,
133
- method: "POST",
134
- }),
135
- invalidatesTags: [tagTypes.users],
136
- }),
137
- appleLogin: builder.mutation<any, any>({
138
- query: (data) => ({
139
- url: `/auth/login/apple`,
140
- method: "POST",
141
- params: data,
142
- }),
143
- invalidatesTags: [tagTypes.users],
144
- }),
145
-
146
- deleteUserAccount: builder.mutation<any, any>({
147
- query: (password) => ({
148
- url: `/auth/profile-delete`,
149
- method: "POST",
150
- body: password,
151
- }),
152
- invalidatesTags: [tagTypes.users],
153
- }),
154
90
  }),
155
91
  });
156
92
 
157
93
  export const {
158
94
  useGetProfileQuery,
159
95
  useDeleteUserMutation,
160
- useAppleLoginMutation,
161
96
  useEmailVerifyMutation,
162
97
  useForgotMutation,
163
98
  useSignUpMutation,
@@ -165,11 +100,5 @@ export const {
165
100
  useUpdateUserMutation,
166
101
  useTokenCheckMutation,
167
102
  useResetPasswordMutation,
168
- useGoogleLoginMutation,
169
- useDeleteUserAccountMutation,
170
- useGoogleLoginCodeMutation,
171
- useSwitchGhostMutation,
172
103
  useChangePasswordMutation,
173
- useGetOthersProfileQuery,
174
- useUpdateLocationMutation,
175
104
  } = authSlice;