@oxyhq/services 5.9.12 → 5.9.14
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/lib/commonjs/core/OxyServices.js +2 -2
- package/lib/commonjs/core/OxyServices.js.map +1 -1
- package/lib/commonjs/core/OxyServicesMain.js +1 -1
- package/lib/commonjs/core/OxyServicesMain.js.map +1 -1
- package/lib/commonjs/core/analytics/AnalyticsService.js +4 -4
- package/lib/commonjs/core/analytics/AnalyticsService.js.map +1 -1
- package/lib/commonjs/core/auth/AuthService.js +14 -14
- package/lib/commonjs/core/auth/AuthService.js.map +1 -1
- package/lib/commonjs/core/devices/DeviceService.js +3 -3
- package/lib/commonjs/core/devices/DeviceService.js.map +1 -1
- package/lib/commonjs/core/files/FileService.js +7 -7
- package/lib/commonjs/core/files/FileService.js.map +1 -1
- package/lib/commonjs/core/karma/KarmaService.js +2 -2
- package/lib/commonjs/core/karma/KarmaService.js.map +1 -1
- package/lib/commonjs/core/locations/LocationService.js +4 -4
- package/lib/commonjs/core/locations/LocationService.js.map +1 -1
- package/lib/commonjs/core/payments/PaymentService.js +4 -4
- package/lib/commonjs/core/payments/PaymentService.js.map +1 -1
- package/lib/commonjs/core/users/UserService.js +18 -18
- package/lib/commonjs/core/users/UserService.js.map +1 -1
- package/lib/module/core/OxyServices.js +2 -2
- package/lib/module/core/OxyServices.js.map +1 -1
- package/lib/module/core/OxyServicesMain.js +1 -1
- package/lib/module/core/OxyServicesMain.js.map +1 -1
- package/lib/module/core/analytics/AnalyticsService.js +4 -4
- package/lib/module/core/analytics/AnalyticsService.js.map +1 -1
- package/lib/module/core/auth/AuthService.js +14 -14
- package/lib/module/core/auth/AuthService.js.map +1 -1
- package/lib/module/core/devices/DeviceService.js +3 -3
- package/lib/module/core/devices/DeviceService.js.map +1 -1
- package/lib/module/core/files/FileService.js +7 -7
- package/lib/module/core/files/FileService.js.map +1 -1
- package/lib/module/core/karma/KarmaService.js +2 -2
- package/lib/module/core/karma/KarmaService.js.map +1 -1
- package/lib/module/core/locations/LocationService.js +4 -4
- package/lib/module/core/locations/LocationService.js.map +1 -1
- package/lib/module/core/payments/PaymentService.js +4 -4
- package/lib/module/core/payments/PaymentService.js.map +1 -1
- package/lib/module/core/users/UserService.js +18 -18
- package/lib/module/core/users/UserService.js.map +1 -1
- package/package.json +1 -1
- package/src/core/OxyServices.ts +2 -2
- package/src/core/OxyServicesMain.ts +1 -1
- package/src/core/analytics/AnalyticsService.ts +4 -4
- package/src/core/auth/AuthService.ts +14 -14
- package/src/core/devices/DeviceService.ts +3 -3
- package/src/core/files/FileService.ts +7 -7
- package/src/core/karma/KarmaService.ts +2 -2
- package/src/core/locations/LocationService.ts +4 -4
- package/src/core/payments/PaymentService.ts +4 -4
- package/src/core/users/UserService.ts +18 -18
|
@@ -18,7 +18,7 @@ export class LocationService extends OxyServices {
|
|
|
18
18
|
params.append('countrycodes', countrycodes);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
const res = await this.getClient().get(`/location-search/search?${params.toString()}`);
|
|
21
|
+
const res = await this.getClient().get(`/api/location-search/search?${params.toString()}`);
|
|
22
22
|
return res.data;
|
|
23
23
|
} catch (error) {
|
|
24
24
|
throw this.handleError(error);
|
|
@@ -30,7 +30,7 @@ export class LocationService extends OxyServices {
|
|
|
30
30
|
*/
|
|
31
31
|
async getLocationDetails(lat: number, lon: number): Promise<any> {
|
|
32
32
|
try {
|
|
33
|
-
const res = await this.getClient().get(`/location-search/reverse?lat=${lat}&lon=${lon}`);
|
|
33
|
+
const res = await this.getClient().get(`/api/location-search/reverse?lat=${lat}&lon=${lon}`);
|
|
34
34
|
return res.data;
|
|
35
35
|
} catch (error) {
|
|
36
36
|
throw this.handleError(error);
|
|
@@ -56,7 +56,7 @@ export class LocationService extends OxyServices {
|
|
|
56
56
|
skip: skip.toString()
|
|
57
57
|
});
|
|
58
58
|
|
|
59
|
-
const res = await this.getClient().get(`/location-search/near?${params.toString()}`);
|
|
59
|
+
const res = await this.getClient().get(`/api/location-search/near?${params.toString()}`);
|
|
60
60
|
return res.data;
|
|
61
61
|
} catch (error) {
|
|
62
62
|
throw this.handleError(error);
|
|
@@ -84,7 +84,7 @@ export class LocationService extends OxyServices {
|
|
|
84
84
|
if (country) params.append('country', country);
|
|
85
85
|
if (city) params.append('city', city);
|
|
86
86
|
|
|
87
|
-
const res = await this.getClient().get(`/location-search/db-search?${params.toString()}`);
|
|
87
|
+
const res = await this.getClient().get(`/api/location-search/db-search?${params.toString()}`);
|
|
88
88
|
return res.data;
|
|
89
89
|
} catch (error) {
|
|
90
90
|
throw this.handleError(error);
|
|
@@ -44,7 +44,7 @@ export class PaymentService extends OxyServices {
|
|
|
44
44
|
*/
|
|
45
45
|
async getPaymentMethods(userId: string): Promise<PaymentMethod[]> {
|
|
46
46
|
try {
|
|
47
|
-
const res = await this.getClient().get(`/payments/methods/${userId}`);
|
|
47
|
+
const res = await this.getClient().get(`/api/payments/methods/${userId}`);
|
|
48
48
|
return res.data;
|
|
49
49
|
} catch (error) {
|
|
50
50
|
throw this.handleError(error);
|
|
@@ -56,7 +56,7 @@ export class PaymentService extends OxyServices {
|
|
|
56
56
|
*/
|
|
57
57
|
async getWallet(userId: string): Promise<Wallet> {
|
|
58
58
|
try {
|
|
59
|
-
const res = await this.getClient().get(`/wallet/${userId}`);
|
|
59
|
+
const res = await this.getClient().get(`/api/wallet/${userId}`);
|
|
60
60
|
return res.data;
|
|
61
61
|
} catch (error) {
|
|
62
62
|
throw this.handleError(error);
|
|
@@ -76,7 +76,7 @@ export class PaymentService extends OxyServices {
|
|
|
76
76
|
if (limit) params.append('limit', limit.toString());
|
|
77
77
|
if (offset) params.append('offset', offset.toString());
|
|
78
78
|
|
|
79
|
-
const res = await this.getClient().get(`/wallet/${userId}/transactions?${params.toString()}`);
|
|
79
|
+
const res = await this.getClient().get(`/api/wallet/${userId}/transactions?${params.toString()}`);
|
|
80
80
|
return res.data;
|
|
81
81
|
} catch (error) {
|
|
82
82
|
throw this.handleError(error);
|
|
@@ -88,7 +88,7 @@ export class PaymentService extends OxyServices {
|
|
|
88
88
|
*/
|
|
89
89
|
async getTransaction(transactionId: string): Promise<Transaction> {
|
|
90
90
|
try {
|
|
91
|
-
const res = await this.getClient().get(`/transactions/${transactionId}`);
|
|
91
|
+
const res = await this.getClient().get(`/api/transactions/${transactionId}`);
|
|
92
92
|
return res.data;
|
|
93
93
|
} catch (error) {
|
|
94
94
|
throw this.handleError(error);
|
|
@@ -11,7 +11,7 @@ export class UserService extends OxyServices {
|
|
|
11
11
|
*/
|
|
12
12
|
async getProfileByUsername(username: string): Promise<User> {
|
|
13
13
|
try {
|
|
14
|
-
const res = await this.getClient().get(`/profiles/username/${username}`);
|
|
14
|
+
const res = await this.getClient().get(`/api/profiles/username/${username}`);
|
|
15
15
|
return res.data;
|
|
16
16
|
} catch (error) {
|
|
17
17
|
throw this.handleError(error);
|
|
@@ -26,7 +26,7 @@ export class UserService extends OxyServices {
|
|
|
26
26
|
const params = { query, ...pagination };
|
|
27
27
|
const searchParams = buildSearchParams(params);
|
|
28
28
|
|
|
29
|
-
const res = await this.getClient().get(`/profiles/search?${searchParams.toString()}`);
|
|
29
|
+
const res = await this.getClient().get(`/api/profiles/search?${searchParams.toString()}`);
|
|
30
30
|
return res.data;
|
|
31
31
|
} catch (error) {
|
|
32
32
|
throw this.handleError(error);
|
|
@@ -45,7 +45,7 @@ export class UserService extends OxyServices {
|
|
|
45
45
|
[key: string]: any;
|
|
46
46
|
}>> {
|
|
47
47
|
try {
|
|
48
|
-
const res = await this.getClient().get('/profiles/recommendations');
|
|
48
|
+
const res = await this.getClient().get('/api/profiles/recommendations');
|
|
49
49
|
return res.data;
|
|
50
50
|
} catch (error) {
|
|
51
51
|
throw this.handleError(error);
|
|
@@ -57,7 +57,7 @@ export class UserService extends OxyServices {
|
|
|
57
57
|
*/
|
|
58
58
|
async getUserById(userId: string): Promise<User> {
|
|
59
59
|
try {
|
|
60
|
-
const res = await this.getClient().get(`/users/${userId}`);
|
|
60
|
+
const res = await this.getClient().get(`/api/users/${userId}`);
|
|
61
61
|
return res.data;
|
|
62
62
|
} catch (error) {
|
|
63
63
|
throw this.handleError(error);
|
|
@@ -69,7 +69,7 @@ export class UserService extends OxyServices {
|
|
|
69
69
|
*/
|
|
70
70
|
async getCurrentUser(): Promise<User> {
|
|
71
71
|
try {
|
|
72
|
-
const res = await this.getClient().get('/users/me');
|
|
72
|
+
const res = await this.getClient().get('/api/users/me');
|
|
73
73
|
return res.data;
|
|
74
74
|
} catch (error) {
|
|
75
75
|
throw this.handleError(error);
|
|
@@ -81,7 +81,7 @@ export class UserService extends OxyServices {
|
|
|
81
81
|
*/
|
|
82
82
|
async updateProfile(updates: Record<string, any>): Promise<User> {
|
|
83
83
|
try {
|
|
84
|
-
const res = await this.getClient().put('/users/me', updates);
|
|
84
|
+
const res = await this.getClient().put('/api/users/me', updates);
|
|
85
85
|
return res.data;
|
|
86
86
|
} catch (error) {
|
|
87
87
|
throw this.handleError(error);
|
|
@@ -93,7 +93,7 @@ export class UserService extends OxyServices {
|
|
|
93
93
|
*/
|
|
94
94
|
async updateUser(userId: string, updates: Record<string, any>): Promise<User> {
|
|
95
95
|
try {
|
|
96
|
-
const res = await this.getClient().put(`/users/${userId}`, updates);
|
|
96
|
+
const res = await this.getClient().put(`/api/users/${userId}`, updates);
|
|
97
97
|
return res.data;
|
|
98
98
|
} catch (error) {
|
|
99
99
|
throw this.handleError(error);
|
|
@@ -105,7 +105,7 @@ export class UserService extends OxyServices {
|
|
|
105
105
|
*/
|
|
106
106
|
async followUser(userId: string): Promise<{ success: boolean; message: string }> {
|
|
107
107
|
try {
|
|
108
|
-
const res = await this.getClient().post(`/users/${userId}/follow`);
|
|
108
|
+
const res = await this.getClient().post(`/api/users/${userId}/follow`);
|
|
109
109
|
return res.data;
|
|
110
110
|
} catch (error) {
|
|
111
111
|
throw this.handleError(error);
|
|
@@ -117,7 +117,7 @@ export class UserService extends OxyServices {
|
|
|
117
117
|
*/
|
|
118
118
|
async unfollowUser(userId: string): Promise<{ success: boolean; message: string }> {
|
|
119
119
|
try {
|
|
120
|
-
const res = await this.getClient().delete(`/users/${userId}/follow`);
|
|
120
|
+
const res = await this.getClient().delete(`/api/users/${userId}/follow`);
|
|
121
121
|
return res.data;
|
|
122
122
|
} catch (error) {
|
|
123
123
|
throw this.handleError(error);
|
|
@@ -129,7 +129,7 @@ export class UserService extends OxyServices {
|
|
|
129
129
|
*/
|
|
130
130
|
async getFollowStatus(userId: string): Promise<{ isFollowing: boolean }> {
|
|
131
131
|
try {
|
|
132
|
-
const res = await this.getClient().get(`/users/${userId}/following-status`);
|
|
132
|
+
const res = await this.getClient().get(`/api/users/${userId}/following-status`);
|
|
133
133
|
return res.data;
|
|
134
134
|
} catch (error) {
|
|
135
135
|
throw this.handleError(error);
|
|
@@ -146,7 +146,7 @@ export class UserService extends OxyServices {
|
|
|
146
146
|
try {
|
|
147
147
|
const searchParams = buildPaginationParams(pagination || {});
|
|
148
148
|
|
|
149
|
-
const res = await this.getClient().get(`/users/${userId}/followers?${searchParams.toString()}`);
|
|
149
|
+
const res = await this.getClient().get(`/api/users/${userId}/followers?${searchParams.toString()}`);
|
|
150
150
|
return res.data;
|
|
151
151
|
} catch (error) {
|
|
152
152
|
throw this.handleError(error);
|
|
@@ -163,7 +163,7 @@ export class UserService extends OxyServices {
|
|
|
163
163
|
try {
|
|
164
164
|
const searchParams = buildPaginationParams(pagination || {});
|
|
165
165
|
|
|
166
|
-
const res = await this.getClient().get(`/users/${userId}/following?${searchParams.toString()}`);
|
|
166
|
+
const res = await this.getClient().get(`/api/users/${userId}/following?${searchParams.toString()}`);
|
|
167
167
|
return res.data;
|
|
168
168
|
} catch (error) {
|
|
169
169
|
throw this.handleError(error);
|
|
@@ -175,7 +175,7 @@ export class UserService extends OxyServices {
|
|
|
175
175
|
*/
|
|
176
176
|
async getNotifications(): Promise<Notification[]> {
|
|
177
177
|
try {
|
|
178
|
-
const res = await this.getClient().get('/notifications');
|
|
178
|
+
const res = await this.getClient().get('/api/notifications');
|
|
179
179
|
return res.data;
|
|
180
180
|
} catch (error) {
|
|
181
181
|
throw this.handleError(error);
|
|
@@ -187,7 +187,7 @@ export class UserService extends OxyServices {
|
|
|
187
187
|
*/
|
|
188
188
|
async getUnreadCount(): Promise<number> {
|
|
189
189
|
try {
|
|
190
|
-
const res = await this.getClient().get('/notifications/unread-count');
|
|
190
|
+
const res = await this.getClient().get('/api/notifications/unread-count');
|
|
191
191
|
return res.data.count;
|
|
192
192
|
} catch (error) {
|
|
193
193
|
throw this.handleError(error);
|
|
@@ -199,7 +199,7 @@ export class UserService extends OxyServices {
|
|
|
199
199
|
*/
|
|
200
200
|
async createNotification(data: Partial<Notification>): Promise<Notification> {
|
|
201
201
|
try {
|
|
202
|
-
const res = await this.getClient().post('/notifications', data);
|
|
202
|
+
const res = await this.getClient().post('/api/notifications', data);
|
|
203
203
|
return res.data;
|
|
204
204
|
} catch (error) {
|
|
205
205
|
throw this.handleError(error);
|
|
@@ -211,7 +211,7 @@ export class UserService extends OxyServices {
|
|
|
211
211
|
*/
|
|
212
212
|
async markNotificationAsRead(notificationId: string): Promise<void> {
|
|
213
213
|
try {
|
|
214
|
-
await this.getClient().put(`/notifications/${notificationId}/read`);
|
|
214
|
+
await this.getClient().put(`/api/notifications/${notificationId}/read`);
|
|
215
215
|
} catch (error) {
|
|
216
216
|
throw this.handleError(error);
|
|
217
217
|
}
|
|
@@ -222,7 +222,7 @@ export class UserService extends OxyServices {
|
|
|
222
222
|
*/
|
|
223
223
|
async markAllNotificationsAsRead(): Promise<void> {
|
|
224
224
|
try {
|
|
225
|
-
await this.getClient().put('/notifications/read-all');
|
|
225
|
+
await this.getClient().put('/api/notifications/read-all');
|
|
226
226
|
} catch (error) {
|
|
227
227
|
throw this.handleError(error);
|
|
228
228
|
}
|
|
@@ -233,7 +233,7 @@ export class UserService extends OxyServices {
|
|
|
233
233
|
*/
|
|
234
234
|
async deleteNotification(notificationId: string): Promise<void> {
|
|
235
235
|
try {
|
|
236
|
-
await this.getClient().delete(`/notifications/${notificationId}`);
|
|
236
|
+
await this.getClient().delete(`/api/notifications/${notificationId}`);
|
|
237
237
|
} catch (error) {
|
|
238
238
|
throw this.handleError(error);
|
|
239
239
|
}
|