@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.
Files changed (51) hide show
  1. package/lib/commonjs/core/OxyServices.js +2 -2
  2. package/lib/commonjs/core/OxyServices.js.map +1 -1
  3. package/lib/commonjs/core/OxyServicesMain.js +1 -1
  4. package/lib/commonjs/core/OxyServicesMain.js.map +1 -1
  5. package/lib/commonjs/core/analytics/AnalyticsService.js +4 -4
  6. package/lib/commonjs/core/analytics/AnalyticsService.js.map +1 -1
  7. package/lib/commonjs/core/auth/AuthService.js +14 -14
  8. package/lib/commonjs/core/auth/AuthService.js.map +1 -1
  9. package/lib/commonjs/core/devices/DeviceService.js +3 -3
  10. package/lib/commonjs/core/devices/DeviceService.js.map +1 -1
  11. package/lib/commonjs/core/files/FileService.js +7 -7
  12. package/lib/commonjs/core/files/FileService.js.map +1 -1
  13. package/lib/commonjs/core/karma/KarmaService.js +2 -2
  14. package/lib/commonjs/core/karma/KarmaService.js.map +1 -1
  15. package/lib/commonjs/core/locations/LocationService.js +4 -4
  16. package/lib/commonjs/core/locations/LocationService.js.map +1 -1
  17. package/lib/commonjs/core/payments/PaymentService.js +4 -4
  18. package/lib/commonjs/core/payments/PaymentService.js.map +1 -1
  19. package/lib/commonjs/core/users/UserService.js +18 -18
  20. package/lib/commonjs/core/users/UserService.js.map +1 -1
  21. package/lib/module/core/OxyServices.js +2 -2
  22. package/lib/module/core/OxyServices.js.map +1 -1
  23. package/lib/module/core/OxyServicesMain.js +1 -1
  24. package/lib/module/core/OxyServicesMain.js.map +1 -1
  25. package/lib/module/core/analytics/AnalyticsService.js +4 -4
  26. package/lib/module/core/analytics/AnalyticsService.js.map +1 -1
  27. package/lib/module/core/auth/AuthService.js +14 -14
  28. package/lib/module/core/auth/AuthService.js.map +1 -1
  29. package/lib/module/core/devices/DeviceService.js +3 -3
  30. package/lib/module/core/devices/DeviceService.js.map +1 -1
  31. package/lib/module/core/files/FileService.js +7 -7
  32. package/lib/module/core/files/FileService.js.map +1 -1
  33. package/lib/module/core/karma/KarmaService.js +2 -2
  34. package/lib/module/core/karma/KarmaService.js.map +1 -1
  35. package/lib/module/core/locations/LocationService.js +4 -4
  36. package/lib/module/core/locations/LocationService.js.map +1 -1
  37. package/lib/module/core/payments/PaymentService.js +4 -4
  38. package/lib/module/core/payments/PaymentService.js.map +1 -1
  39. package/lib/module/core/users/UserService.js +18 -18
  40. package/lib/module/core/users/UserService.js.map +1 -1
  41. package/package.json +1 -1
  42. package/src/core/OxyServices.ts +2 -2
  43. package/src/core/OxyServicesMain.ts +1 -1
  44. package/src/core/analytics/AnalyticsService.ts +4 -4
  45. package/src/core/auth/AuthService.ts +14 -14
  46. package/src/core/devices/DeviceService.ts +3 -3
  47. package/src/core/files/FileService.ts +7 -7
  48. package/src/core/karma/KarmaService.ts +2 -2
  49. package/src/core/locations/LocationService.ts +4 -4
  50. package/src/core/payments/PaymentService.ts +4 -4
  51. package/src/core/users/UserService.ts +18 -18
@@ -34,7 +34,7 @@ export class KarmaService extends OxyServices {
34
34
  */
35
35
  async getUserKarmaTotal(userId) {
36
36
  try {
37
- const res = await this.getClient().get(`/karma/${userId}/total`);
37
+ const res = await this.getClient().get(`/api/karma/${userId}/total`);
38
38
  return res.data;
39
39
  } catch (error) {
40
40
  throw this.handleError(error);
@@ -49,7 +49,7 @@ export class KarmaService extends OxyServices {
49
49
  const params = new URLSearchParams();
50
50
  if (limit) params.append('limit', limit.toString());
51
51
  if (offset) params.append('offset', offset.toString());
52
- const res = await this.getClient().get(`/karma/${userId}/history?${params.toString()}`);
52
+ const res = await this.getClient().get(`/api/karma/${userId}/history?${params.toString()}`);
53
53
  return res.data;
54
54
  } catch (error) {
55
55
  throw this.handleError(error);
@@ -1 +1 @@
1
- {"version":3,"names":["OxyServices","KarmaService","getKarmaLeaderboard","res","getClient","get","data","error","handleError","getKarmaRules","getUserKarmaTotal","userId","getUserKarmaHistory","limit","offset","params","URLSearchParams","append","toString","awardKarma","post","deductKarma","createOrUpdateKarmaRule"],"sourceRoot":"../../../../src","sources":["core/karma/KarmaService.ts"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,gBAAgB;AAQ5C;AACA;AACA;AACA,OAAO,MAAMC,YAAY,SAASD,WAAW,CAAC;EAC5C;AACF;AACA;EACE,MAAME,mBAAmBA,CAAA,EAAqC;IAC5D,IAAI;MACF,MAAMC,GAAG,GAAG,MAAM,IAAI,CAACC,SAAS,CAAC,CAAC,CAACC,GAAG,CAAC,oBAAoB,CAAC;MAC5D,OAAOF,GAAG,CAACG,IAAI;IACjB,CAAC,CAAC,OAAOC,KAAK,EAAE;MACd,MAAM,IAAI,CAACC,WAAW,CAACD,KAAK,CAAC;IAC/B;EACF;;EAEA;AACF;AACA;EACE,MAAME,aAAaA,CAAA,EAAyB;IAC1C,IAAI;MACF,MAAMN,GAAG,GAAG,MAAM,IAAI,CAACC,SAAS,CAAC,CAAC,CAACC,GAAG,CAAC,cAAc,CAAC;MACtD,OAAOF,GAAG,CAACG,IAAI;IACjB,CAAC,CAAC,OAAOC,KAAK,EAAE;MACd,MAAM,IAAI,CAACC,WAAW,CAACD,KAAK,CAAC;IAC/B;EACF;;EAEA;AACF;AACA;EACE,MAAMG,iBAAiBA,CAACC,MAAc,EAA8B;IAClE,IAAI;MACF,MAAMR,GAAG,GAAG,MAAM,IAAI,CAACC,SAAS,CAAC,CAAC,CAACC,GAAG,CAAC,UAAUM,MAAM,QAAQ,CAAC;MAChE,OAAOR,GAAG,CAACG,IAAI;IACjB,CAAC,CAAC,OAAOC,KAAK,EAAE;MACd,MAAM,IAAI,CAACC,WAAW,CAACD,KAAK,CAAC;IAC/B;EACF;;EAEA;AACF;AACA;EACE,MAAMK,mBAAmBA,CACvBD,MAAc,EACdE,KAAc,EACdC,MAAe,EACwD;IACvE,IAAI;MACF,MAAMC,MAAM,GAAG,IAAIC,eAAe,CAAC,CAAC;MACpC,IAAIH,KAAK,EAAEE,MA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MAC7D,OAAOH,GAAG,CAACG,IAAI;IACjB,CAAC,CAAC,OAAOC,KAAK,EAAE;MACd,MAAM,IAAI,CAACC,WAAW,CAACD,KAAK,CAAC;IAC/B;EACF;AACF","ignoreList":[]}
1
+ {"version":3,"names":["OxyServices","KarmaService","getKarmaLeaderboard","res","getClient","get","data","error","handleError","getKarmaRules","getUserKarmaTotal","userId","getUserKarmaHistory","limit","offset","params","URLSearchParams","append","toString","awardKarma","post","deductKarma","createOrUpdateKarmaRule"],"sourceRoot":"../../../../src","sources":["core/karma/KarmaService.ts"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,gBAAgB;AAQ5C;AACA;AACA;AACA,OAAO,MAAMC,YAAY,SAASD,WAAW,CAAC;EAC5C;AACF;AACA;EACE,MAAME,mBAAmBA,CAAA,EAAqC;IAC5D,IAAI;MACF,MAAMC,GAAG,GAAG,MAAM,IAAI,CAACC,SAAS,CAAC,CAAC,CAACC,GAAG,CAAC,oBAAoB,CAAC;MAC5D,OAAOF,GAAG,CAACG,IAAI;IACjB,CAAC,CAAC,OAAOC,KAAK,EAAE;MACd,MAAM,IAAI,CAACC,WAAW,CAACD,KAAK,CAAC;IAC/B;EACF;;EAEA;AACF;AACA;EACE,MAAME,aAAaA,CAAA,EAAyB;IAC1C,IAAI;MACF,MAAMN,GAAG,GAAG,MAAM,IAAI,CAACC,SAAS,CAAC,CAAC,CAACC,GAAG,CAAC,cAAc,CAAC;MACtD,OAAOF,GAAG,CAACG,IAAI;IACjB,CAAC,CAAC,OAAOC,KAAK,EAAE;MACd,MAAM,IAAI,CAACC,WAAW,CAACD,KAAK,CAAC;IAC/B;EACF;;EAEA;AACF;AACA;EACE,MAAMG,iBAAiBA,CAACC,MAAc,EAA8B;IAClE,IAAI;MACF,MAAMR,GAAG,GAAG,MAAM,IAAI,CAACC,SAAS,CAAC,CAAC,CAACC,GAAG,CAAC,cAAcM,MAAM,QAAQ,CAAC;MACpE,OAAOR,GAAG,CAACG,IAAI;IACjB,CA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AAC,OAAOC,KAAK,EAAE;MACd,MAAM,IAAI,CAACC,WAAW,CAACD,KAAK,CAAC;IAC/B;EACF;;EAEA;AACF;AACA;EACE,MAAMe,uBAAuBA,CAAChB,IAAwB,EAAsB;IAC1E,IAAI;MACF,MAAMH,GAAG,GAAG,MAAM,IAAI,CAACC,SAAS,CAAC,CAAC,CAACgB,IAAI,CAAC,cAAc,EAAEd,IAAI,CAAC;MAC7D,OAAOH,GAAG,CAACG,IAAI;IACjB,CAAC,CAAC,OAAOC,KAAK,EAAE;MACd,MAAM,IAAI,CAACC,WAAW,CAACD,KAAK,CAAC;IAC/B;EACF;AACF","ignoreList":[]}
@@ -18,7 +18,7 @@ export class LocationService extends OxyServices {
18
18
  if (countrycodes) {
19
19
  params.append('countrycodes', countrycodes);
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, lon) {
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);
@@ -49,7 +49,7 @@ export class LocationService extends OxyServices {
49
49
  limit: limit.toString(),
50
50
  skip: skip.toString()
51
51
  });
52
- const res = await this.getClient().get(`/location-search/near?${params.toString()}`);
52
+ const res = await this.getClient().get(`/api/location-search/near?${params.toString()}`);
53
53
  return res.data;
54
54
  } catch (error) {
55
55
  throw this.handleError(error);
@@ -69,7 +69,7 @@ export class LocationService extends OxyServices {
69
69
  if (type) params.append('type', type);
70
70
  if (country) params.append('country', country);
71
71
  if (city) params.append('city', city);
72
- const res = await this.getClient().get(`/location-search/db-search?${params.toString()}`);
72
+ const res = await this.getClient().get(`/api/location-search/db-search?${params.toString()}`);
73
73
  return res.data;
74
74
  } catch (error) {
75
75
  throw this.handleError(error);
@@ -1 +1 @@
1
- {"version":3,"names":["OxyServices","LocationService","searchLocations","query","limit","countrycodes","params","URLSearchParams","toString","append","res","getClient","get","data","error","handleError","getLocationDetails","lat","lon","findLocationsNear","maxDistance","skip","searchLocationsInDB","type","country","city","getLocationStats","stats","getLocationCacheStats","clearLocationCache","delete","getLocationPerformanceStats"],"sourceRoot":"../../../../src","sources":["core/locations/LocationService.ts"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,gBAAgB;;AAE5C;AACA;AACA;AACA,OAAO,MAAMC,eAAe,SAASD,WAAW,CAAC;EAC/C;AACF;AACA;EACE,MAAME,eAAeA,CAACC,KAAa,EAAEC,KAAa,GAAG,CAAC,EAAEC,YAAqB,EAAkB;IAC7F,IAAI;MACF,MAAMC,MAAM,GAAG,IAAIC,eAAe,CAAC;QACjCJ,KAAK;QACLC,KAAK,EAAEA,KAAK,CAACI,QAAQ,CAAC;MACxB,CAAC,CAAC;MAEF,IAAIH,YAAY,EAAE;QAChBC,MAAM,CAACG,MAAM,CAAC,cAAc,EAAEJ,YAAY,CAAC;MAC7C;MAEA,MAAMK,GAAG,GAAG,MAAM,IAAI,CAACC,SAAS,CAAC,CAAC,CAACC,GAAG,CAAC,2BAA2BN,MAAM,CAACE,QAAQ,CAAC,CAAC,EAAE,CAAC;MACtF,OAAOE,GAAG,CAACG,IAAI;IACjB,CAAC,CAAC,OAAOC,KAAK,EAAE;MACd,MAAM,IAAI,CAACC,WAAW,CAACD,KAAK,CAAC;IAC/B;EACF;;EAEA;AACF;AACA;EACE,MAAME,kBAAkBA,CAACC,GAAW,EAAEC,GAAW,EAAgB;IAC/D,IAAI;MACF,MAAMR,GAAG,GAAG,MAAM,IAAI,CAACC,SAAS,CAAC,CAAC,CAACC,GAAG,CAAC,gCAAgCK,GAAG,QAAQC,GAAG,EAAE,CAAC;MACxF,OAAOR,G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CAAC,CAAC,OAAOC,KAAK,EAAE;MACd,MAAM,IAAI,CAACC,WAAW,CAACD,KAAK,CAAC;IAC/B;EACF;;EAEA;AACF;AACA;EACE,MAAMiB,2BAA2BA,CAAA,EAAiB;IAChD,IAAI;MACF,MAAMrB,GAAG,GAAG,MAAM,IAAI,CAACC,SAAS,CAAC,CAAC,CAACC,GAAG,CAAC,8BAA8B,CAAC;MACtE,OAAOF,GAAG,CAACG,IAAI;IACjB,CAAC,CAAC,OAAOC,KAAK,EAAE;MACd,MAAM,IAAI,CAACC,WAAW,CAACD,KAAK,CAAC;IAC/B;EACF;AACF","ignoreList":[]}
1
+ {"version":3,"names":["OxyServices","LocationService","searchLocations","query","limit","countrycodes","params","URLSearchParams","toString","append","res","getClient","get","data","error","handleError","getLocationDetails","lat","lon","findLocationsNear","maxDistance","skip","searchLocationsInDB","type","country","city","getLocationStats","stats","getLocationCacheStats","clearLocationCache","delete","getLocationPerformanceStats"],"sourceRoot":"../../../../src","sources":["core/locations/LocationService.ts"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,gBAAgB;;AAE5C;AACA;AACA;AACA,OAAO,MAAMC,eAAe,SAASD,WAAW,CAAC;EAC/C;AACF;AACA;EACE,MAAME,eAAeA,CAACC,KAAa,EAAEC,KAAa,GAAG,CAAC,EAAEC,YAAqB,EAAkB;IAC7F,IAAI;MACF,MAAMC,MAAM,GAAG,IAAIC,eAAe,CAAC;QACjCJ,KAAK;QACLC,KAAK,EAAEA,KAAK,CAACI,QAAQ,CAAC;MACxB,CAAC,CAAC;MAEF,IAAIH,YAAY,EAAE;QAChBC,MAAM,CAACG,MAAM,CAAC,cAAc,EAAEJ,YAAY,CAAC;MAC7C;MAEA,MAAMK,GAAG,GAAG,MAAM,IAAI,CAACC,SAAS,CAAC,CAAC,CAACC,GAAG,CAAC,+BAA+BN,MAAM,CAACE,QAAQ,CAAC,CAAC,EAAE,CAAC;MAC1F,OAAOE,GAAG,CAACG,IAAI;IACjB,CAAC,CAAC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AAK;IACvB,CAAC,CAAC,OAAOb,KAAK,EAAE;MACd,MAAM,IAAI,CAACC,WAAW,CAACD,KAAK,CAAC;IAC/B;EACF;;EAEA;AACF;AACA;EACE,MAAMe,kBAAkBA,CAAA,EAAiB;IACvC,IAAI;MACF,MAAMnB,GAAG,GAAG,MAAM,IAAI,CAACC,SAAS,CAAC,CAAC,CAACmB,MAAM,CAAC,wBAAwB,CAAC;MACnE,OAAOpB,GAAG,CAACG,IAAI;IACjB,CAAC,CAAC,OAAOC,KAAK,EAAE;MACd,MAAM,IAAI,CAACC,WAAW,CAACD,KAAK,CAAC;IAC/B;EACF;;EAEA;AACF;AACA;EACE,MAAMiB,2BAA2BA,CAAA,EAAiB;IAChD,IAAI;MACF,MAAMrB,GAAG,GAAG,MAAM,IAAI,CAACC,SAAS,CAAC,CAAC,CAACC,GAAG,CAAC,8BAA8B,CAAC;MACtE,OAAOF,GAAG,CAACG,IAAI;IACjB,CAAC,CAAC,OAAOC,KAAK,EAAE;MACd,MAAM,IAAI,CAACC,WAAW,CAACD,KAAK,CAAC;IAC/B;EACF;AACF","ignoreList":[]}
@@ -34,7 +34,7 @@ export class PaymentService extends OxyServices {
34
34
  */
35
35
  async getPaymentMethods(userId) {
36
36
  try {
37
- const res = await this.getClient().get(`/payments/methods/${userId}`);
37
+ const res = await this.getClient().get(`/api/payments/methods/${userId}`);
38
38
  return res.data;
39
39
  } catch (error) {
40
40
  throw this.handleError(error);
@@ -46,7 +46,7 @@ export class PaymentService extends OxyServices {
46
46
  */
47
47
  async getWallet(userId) {
48
48
  try {
49
- const res = await this.getClient().get(`/wallet/${userId}`);
49
+ const res = await this.getClient().get(`/api/wallet/${userId}`);
50
50
  return res.data;
51
51
  } catch (error) {
52
52
  throw this.handleError(error);
@@ -61,7 +61,7 @@ export class PaymentService extends OxyServices {
61
61
  const params = new URLSearchParams();
62
62
  if (limit) params.append('limit', limit.toString());
63
63
  if (offset) params.append('offset', offset.toString());
64
- const res = await this.getClient().get(`/wallet/${userId}/transactions?${params.toString()}`);
64
+ const res = await this.getClient().get(`/api/wallet/${userId}/transactions?${params.toString()}`);
65
65
  return res.data;
66
66
  } catch (error) {
67
67
  throw this.handleError(error);
@@ -73,7 +73,7 @@ export class PaymentService extends OxyServices {
73
73
  */
74
74
  async getTransaction(transactionId) {
75
75
  try {
76
- const res = await this.getClient().get(`/transactions/${transactionId}`);
76
+ const res = await this.getClient().get(`/api/transactions/${transactionId}`);
77
77
  return res.data;
78
78
  } catch (error) {
79
79
  throw this.handleError(error);
@@ -1 +1 @@
1
- {"version":3,"names":["OxyServices","PaymentService","processPayment","data","res","getClient","post","error","handleError","validatePaymentMethod","paymentMethod","getPaymentMethods","userId","get","getWallet","getTransactionHistory","limit","offset","params","URLSearchParams","append","toString","getTransaction","transactionId","transferFunds","processPurchase","requestWithdrawal"],"sourceRoot":"../../../../src","sources":["core/payments/PaymentService.ts"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,gBAAgB;AAa5C;AACA;AACA;AACA,OAAO,MAAMC,cAAc,SAASD,WAAW,CAAC;EAC9C;AACF;AACA;EACE,MAAME,cAAcA,CAACC,IAAoB,EAA4B;IACnE,IAAI;MACF,MAAMC,GAAG,GAAG,MAAM,IAAI,CAACC,SAAS,CAAC,CAAC,CAACC,IAAI,CAAC,mBAAmB,EAAEH,IAAI,CAAC;MAClE,OAAOC,GAAG,CAACD,IAAI;IACjB,CAAC,CAAC,OAAOI,KAAK,EAAE;MACd,MAAM,IAAI,CAACC,WAAW,CAACD,KAAK,CAAC;IAC/B;EACF;;EAEA;AACF;AACA;EACE,MAAME,qBAAqBA,CAACC,aAAkB,EAA+B;IAC3E,IAAI;MACF,MAAMN,GAAG,GAAG,MAAM,IAAI,CAACC,SAAS,CAAC,CAAC,CAACC,IAAI,CAAC,2BAA2B,EAAEI,aAAa,CAAC;MACnF,OAAON,GAAG,CAACD,IAAI;IACjB,CAAC,CAAC,OAAOI,KAAK,EAAE;MACd,MAAM,IAAI,CAACC,WAAW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ACD,KAAK,CAAC;IAC/B;EACF;AACF","ignoreList":[]}
1
+ {"version":3,"names":["OxyServices","PaymentService","processPayment","data","res","getClient","post","error","handleError","validatePaymentMethod","paymentMethod","getPaymentMethods","userId","get","getWallet","getTransactionHistory","limit","offset","params","URLSearchParams","append","toString","getTransaction","transactionId","transferFunds","processPurchase","requestWithdrawal"],"sourceRoot":"../../../../src","sources":["core/payments/PaymentService.ts"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,gBAAgB;AAa5C;AACA;AACA;AACA,OAAO,MAAMC,cAAc,SAASD,WAAW,CAAC;EAC9C;AACF;AACA;EACE,MAAME,cAAcA,CAACC,IAAoB,EAA4B;IACnE,IAAI;MACF,MAAMC,GAAG,GAAG,MAAM,IAAI,CAACC,SAAS,CAAC,CAAC,CAACC,IAAI,CAAC,mBAAmB,EAAEH,IAAI,CAAC;MAClE,OAAOC,GAAG,CAACD,IAAI;IACjB,CAAC,CAAC,OAAOI,KAAK,EAAE;MACd,MAAM,IAAI,CAACC,WAAW,CAACD,KAAK,CAAC;IAC/B;EACF;;EAEA;AACF;AACA;EACE,MAAME,qBAAqBA,CAACC,aAAkB,EAA+B;IAC3E,IAAI;MACF,MAAMN,GAAG,GAAG,MAAM,IAAI,CAACC,SAAS,CAAC,CAAC,CAACC,IAAI,CAAC,2BAA2B,EAAEI,aAAa,CAAC;MACnF,OAAON,GAAG,CAACD,IAAI;IACjB,CAAC,CAAC,OAAOI,KAAK,EAAE;MACd,MAAM,IAAI,CAACC,WAAW,CAACD,KAAK,CAAC;IAC/B;EACF;;EAEA;AACF;AACA;EACE,MAAMI,iBAAiBA,CAACC,MAAc,EAA4B;IAChE,IAAI;MACF,MAAMR,GAAG,GAAG,MAAM,IAAI,CAACC,SAAS,CAAC,CAAC,CAACQ,GAAG,CAAC,yBAAyBD,MAAM,EAAE,CAAC;MACzE,OAAOR,GAAG,CAACD,IAAI;IACjB,CAAC,CAAC,OAAOI,KAAK,EAAE;MACd,MAAM,IAAI,CAAC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I,CAACC,WAAW,CAACD,KAAK,CAAC;IAC/B;EACF;;EAEA;AACF;AACA;EACE,MAAMiB,aAAaA,CAACrB,IAA0B,EAAgC;IAC5E,IAAI;MACF,MAAMC,GAAG,GAAG,MAAM,IAAI,CAACC,SAAS,CAAC,CAAC,CAACC,IAAI,CAAC,kBAAkB,EAAEH,IAAI,CAAC;MACjE,OAAOC,GAAG,CAACD,IAAI;IACjB,CAAC,CAAC,OAAOI,KAAK,EAAE;MACd,MAAM,IAAI,CAACC,WAAW,CAACD,KAAK,CAAC;IAC/B;EACF;;EAEA;AACF;AACA;EACE,MAAMkB,eAAeA,CAACtB,IAAqB,EAAgC;IACzE,IAAI;MACF,MAAMC,GAAG,GAAG,MAAM,IAAI,CAACC,SAAS,CAAC,CAAC,CAACC,IAAI,CAAC,kBAAkB,EAAEH,IAAI,CAAC;MACjE,OAAOC,GAAG,CAACD,IAAI;IACjB,CAAC,CAAC,OAAOI,KAAK,EAAE;MACd,MAAM,IAAI,CAACC,WAAW,CAACD,KAAK,CAAC;IAC/B;EACF;;EAEA;AACF;AACA;EACE,MAAMmB,iBAAiBA,CAACvB,IAAuB,EAAgC;IAC7E,IAAI;MACF,MAAMC,GAAG,GAAG,MAAM,IAAI,CAACC,SAAS,CAAC,CAAC,CAACC,IAAI,CAAC,kBAAkB,EAAEH,IAAI,CAAC;MACjE,OAAOC,GAAG,CAACD,IAAI;IACjB,CAAC,CAAC,OAAOI,KAAK,EAAE;MACd,MAAM,IAAI,CAACC,WAAW,CAACD,KAAK,CAAC;IAC/B;EACF;AACF","ignoreList":[]}
@@ -12,7 +12,7 @@ export class UserService extends OxyServices {
12
12
  */
13
13
  async getProfileByUsername(username) {
14
14
  try {
15
- const res = await this.getClient().get(`/profiles/username/${username}`);
15
+ const res = await this.getClient().get(`/api/profiles/username/${username}`);
16
16
  return res.data;
17
17
  } catch (error) {
18
18
  throw this.handleError(error);
@@ -29,7 +29,7 @@ export class UserService extends OxyServices {
29
29
  ...pagination
30
30
  };
31
31
  const searchParams = buildSearchParams(params);
32
- const res = await this.getClient().get(`/profiles/search?${searchParams.toString()}`);
32
+ const res = await this.getClient().get(`/api/profiles/search?${searchParams.toString()}`);
33
33
  return res.data;
34
34
  } catch (error) {
35
35
  throw this.handleError(error);
@@ -41,7 +41,7 @@ export class UserService extends OxyServices {
41
41
  */
42
42
  async getProfileRecommendations() {
43
43
  try {
44
- const res = await this.getClient().get('/profiles/recommendations');
44
+ const res = await this.getClient().get('/api/profiles/recommendations');
45
45
  return res.data;
46
46
  } catch (error) {
47
47
  throw this.handleError(error);
@@ -53,7 +53,7 @@ export class UserService extends OxyServices {
53
53
  */
54
54
  async getUserById(userId) {
55
55
  try {
56
- const res = await this.getClient().get(`/users/${userId}`);
56
+ const res = await this.getClient().get(`/api/users/${userId}`);
57
57
  return res.data;
58
58
  } catch (error) {
59
59
  throw this.handleError(error);
@@ -65,7 +65,7 @@ export class UserService extends OxyServices {
65
65
  */
66
66
  async getCurrentUser() {
67
67
  try {
68
- const res = await this.getClient().get('/users/me');
68
+ const res = await this.getClient().get('/api/users/me');
69
69
  return res.data;
70
70
  } catch (error) {
71
71
  throw this.handleError(error);
@@ -77,7 +77,7 @@ export class UserService extends OxyServices {
77
77
  */
78
78
  async updateProfile(updates) {
79
79
  try {
80
- const res = await this.getClient().put('/users/me', updates);
80
+ const res = await this.getClient().put('/api/users/me', updates);
81
81
  return res.data;
82
82
  } catch (error) {
83
83
  throw this.handleError(error);
@@ -89,7 +89,7 @@ export class UserService extends OxyServices {
89
89
  */
90
90
  async updateUser(userId, updates) {
91
91
  try {
92
- const res = await this.getClient().put(`/users/${userId}`, updates);
92
+ const res = await this.getClient().put(`/api/users/${userId}`, updates);
93
93
  return res.data;
94
94
  } catch (error) {
95
95
  throw this.handleError(error);
@@ -101,7 +101,7 @@ export class UserService extends OxyServices {
101
101
  */
102
102
  async followUser(userId) {
103
103
  try {
104
- const res = await this.getClient().post(`/users/${userId}/follow`);
104
+ const res = await this.getClient().post(`/api/users/${userId}/follow`);
105
105
  return res.data;
106
106
  } catch (error) {
107
107
  throw this.handleError(error);
@@ -113,7 +113,7 @@ export class UserService extends OxyServices {
113
113
  */
114
114
  async unfollowUser(userId) {
115
115
  try {
116
- const res = await this.getClient().delete(`/users/${userId}/follow`);
116
+ const res = await this.getClient().delete(`/api/users/${userId}/follow`);
117
117
  return res.data;
118
118
  } catch (error) {
119
119
  throw this.handleError(error);
@@ -125,7 +125,7 @@ export class UserService extends OxyServices {
125
125
  */
126
126
  async getFollowStatus(userId) {
127
127
  try {
128
- const res = await this.getClient().get(`/users/${userId}/following-status`);
128
+ const res = await this.getClient().get(`/api/users/${userId}/following-status`);
129
129
  return res.data;
130
130
  } catch (error) {
131
131
  throw this.handleError(error);
@@ -138,7 +138,7 @@ export class UserService extends OxyServices {
138
138
  async getUserFollowers(userId, pagination) {
139
139
  try {
140
140
  const searchParams = buildPaginationParams(pagination || {});
141
- const res = await this.getClient().get(`/users/${userId}/followers?${searchParams.toString()}`);
141
+ const res = await this.getClient().get(`/api/users/${userId}/followers?${searchParams.toString()}`);
142
142
  return res.data;
143
143
  } catch (error) {
144
144
  throw this.handleError(error);
@@ -151,7 +151,7 @@ export class UserService extends OxyServices {
151
151
  async getUserFollowing(userId, pagination) {
152
152
  try {
153
153
  const searchParams = buildPaginationParams(pagination || {});
154
- const res = await this.getClient().get(`/users/${userId}/following?${searchParams.toString()}`);
154
+ const res = await this.getClient().get(`/api/users/${userId}/following?${searchParams.toString()}`);
155
155
  return res.data;
156
156
  } catch (error) {
157
157
  throw this.handleError(error);
@@ -163,7 +163,7 @@ export class UserService extends OxyServices {
163
163
  */
164
164
  async getNotifications() {
165
165
  try {
166
- const res = await this.getClient().get('/notifications');
166
+ const res = await this.getClient().get('/api/notifications');
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 getUnreadCount() {
177
177
  try {
178
- const res = await this.getClient().get('/notifications/unread-count');
178
+ const res = await this.getClient().get('/api/notifications/unread-count');
179
179
  return res.data.count;
180
180
  } catch (error) {
181
181
  throw this.handleError(error);
@@ -187,7 +187,7 @@ export class UserService extends OxyServices {
187
187
  */
188
188
  async createNotification(data) {
189
189
  try {
190
- const res = await this.getClient().post('/notifications', data);
190
+ const res = await this.getClient().post('/api/notifications', data);
191
191
  return res.data;
192
192
  } catch (error) {
193
193
  throw this.handleError(error);
@@ -199,7 +199,7 @@ export class UserService extends OxyServices {
199
199
  */
200
200
  async markNotificationAsRead(notificationId) {
201
201
  try {
202
- await this.getClient().put(`/notifications/${notificationId}/read`);
202
+ await this.getClient().put(`/api/notifications/${notificationId}/read`);
203
203
  } catch (error) {
204
204
  throw this.handleError(error);
205
205
  }
@@ -210,7 +210,7 @@ export class UserService extends OxyServices {
210
210
  */
211
211
  async markAllNotificationsAsRead() {
212
212
  try {
213
- await this.getClient().put('/notifications/read-all');
213
+ await this.getClient().put('/api/notifications/read-all');
214
214
  } catch (error) {
215
215
  throw this.handleError(error);
216
216
  }
@@ -221,7 +221,7 @@ export class UserService extends OxyServices {
221
221
  */
222
222
  async deleteNotification(notificationId) {
223
223
  try {
224
- await this.getClient().delete(`/notifications/${notificationId}`);
224
+ await this.getClient().delete(`/api/notifications/${notificationId}`);
225
225
  } catch (error) {
226
226
  throw this.handleError(error);
227
227
  }
@@ -1 +1 @@
1
- {"version":3,"names":["OxyServices","buildSearchParams","buildPaginationParams","UserService","getProfileByUsername","username","res","getClient","get","data","error","handleError","searchProfiles","query","pagination","params","searchParams","toString","getProfileRecommendations","getUserById","userId","getCurrentUser","updateProfile","updates","put","updateUser","followUser","post","unfollowUser","delete","getFollowStatus","getUserFollowers","getUserFollowing","getNotifications","getUnreadCount","count","createNotification","markNotificationAsRead","notificationId","markAllNotificationsAsRead","deleteNotification"],"sourceRoot":"../../../../src","sources":["core/users/UserService.ts"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,gBAAgB;AAE5C,SA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AI;IACjB,CAAC,CAAC,OAAOC,KAAK,EAAE;MACd,MAAM,IAAI,CAACC,WAAW,CAACD,KAAK,CAAC;IAC/B;EACF;;EAEA;AACF;AACA;EACE,MAAM2B,sBAAsBA,CAACC,cAAsB,EAAiB;IAClE,IAAI;MACF,MAAM,IAAI,CAAC/B,SAAS,CAAC,CAAC,CAACiB,GAAG,CAAC,kBAAkBc,cAAc,OAAO,CAAC;IACrE,CAAC,CAAC,OAAO5B,KAAK,EAAE;MACd,MAAM,IAAI,CAACC,WAAW,CAACD,KAAK,CAAC;IAC/B;EACF;;EAEA;AACF;AACA;EACE,MAAM6B,0BAA0BA,CAAA,EAAkB;IAChD,IAAI;MACF,MAAM,IAAI,CAAChC,SAAS,CAAC,CAAC,CAACiB,GAAG,CAAC,yBAAyB,CAAC;IACvD,CAAC,CAAC,OAAOd,KAAK,EAAE;MACd,MAAM,IAAI,CAACC,WAAW,CAACD,KAAK,CAAC;IAC/B;EACF;;EAEA;AACF;AACA;EACE,MAAM8B,kBAAkBA,CAACF,cAAsB,EAAiB;IAC9D,IAAI;MACF,MAAM,IAAI,CAAC/B,SAAS,CAAC,CAAC,CAACsB,MAAM,CAAC,kBAAkBS,cAAc,EAAE,CAAC;IACnE,CAAC,CAAC,OAAO5B,KAAK,EAAE;MACd,MAAM,IAAI,CAACC,WAAW,CAACD,KAAK,CAAC;IAC/B;EACF;AACF","ignoreList":[]}
1
+ {"version":3,"names":["OxyServices","buildSearchParams","buildPaginationParams","UserService","getProfileByUsername","username","res","getClient","get","data","error","handleError","searchProfiles","query","pagination","params","searchParams","toString","getProfileRecommendations","getUserById","userId","getCurrentUser","updateProfile","updates","put","updateUser","followUser","post","unfollowUser","delete","getFollowStatus","getUserFollowers","getUserFollowing","getNotifications","getUnreadCount","count","createNotification","markNotificationAsRead","notificationId","markAllNotificationsAsRead","deleteNotification"],"sourceRoot":"../../../../src","sources":["core/users/UserService.ts"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,gBAAgB;A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ACG,IAAI;IACjB,CAAC,CAAC,OAAOC,KAAK,EAAE;MACd,MAAM,IAAI,CAACC,WAAW,CAACD,KAAK,CAAC;IAC/B;EACF;;EAEA;AACF;AACA;EACE,MAAM2B,sBAAsBA,CAACC,cAAsB,EAAiB;IAClE,IAAI;MACF,MAAM,IAAI,CAAC/B,SAAS,CAAC,CAAC,CAACiB,GAAG,CAAC,sBAAsBc,cAAc,OAAO,CAAC;IACzE,CAAC,CAAC,OAAO5B,KAAK,EAAE;MACd,MAAM,IAAI,CAACC,WAAW,CAACD,KAAK,CAAC;IAC/B;EACF;;EAEA;AACF;AACA;EACE,MAAM6B,0BAA0BA,CAAA,EAAkB;IAChD,IAAI;MACF,MAAM,IAAI,CAAChC,SAAS,CAAC,CAAC,CAACiB,GAAG,CAAC,6BAA6B,CAAC;IAC3D,CAAC,CAAC,OAAOd,KAAK,EAAE;MACd,MAAM,IAAI,CAACC,WAAW,CAACD,KAAK,CAAC;IAC/B;EACF;;EAEA;AACF;AACA;EACE,MAAM8B,kBAAkBA,CAACF,cAAsB,EAAiB;IAC9D,IAAI;MACF,MAAM,IAAI,CAAC/B,SAAS,CAAC,CAAC,CAACsB,MAAM,CAAC,sBAAsBS,cAAc,EAAE,CAAC;IACvE,CAAC,CAAC,OAAO5B,KAAK,EAAE;MACd,MAAM,IAAI,CAACC,WAAW,CAACD,KAAK,CAAC;IAC/B;EACF;AACF","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxyhq/services",
3
- "version": "5.9.12",
3
+ "version": "5.9.14",
4
4
  "description": "Reusable OxyHQ module to handle authentication, user management, karma system, device-based session management and more 🚀",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -54,7 +54,7 @@ export class OxyServices {
54
54
  // For session-based tokens, get a new token from the session
55
55
  if (decoded.sessionId) {
56
56
  try {
57
- const res = await this.client.get(`/session/token/${decoded.sessionId}`);
57
+ const res = await this.client.get(`/api/session/token/${decoded.sessionId}`);
58
58
  this.accessToken = res.data.accessToken;
59
59
  } catch (refreshError) {
60
60
  // If refresh fails, clear tokens
@@ -129,7 +129,7 @@ export class OxyServices {
129
129
  }
130
130
 
131
131
  try {
132
- const res = await this.client.get('/auth/validate');
132
+ const res = await this.client.get('/api/auth/validate');
133
133
  return res.data.valid === true;
134
134
  } catch (error) {
135
135
  return false;
@@ -48,7 +48,7 @@ export class OxyServicesMain extends AuthService {
48
48
  image?: string;
49
49
  }> {
50
50
  try {
51
- const res = await this.getClient().get(`/link-metadata?url=${encodeURIComponent(url)}`);
51
+ const res = await this.getClient().get(`/api/link-metadata?url=${encodeURIComponent(url)}`);
52
52
  return res.data;
53
53
  } catch (error) {
54
54
  throw this.handleError(error);
@@ -13,7 +13,7 @@ export class AnalyticsService extends OxyServices {
13
13
  const params = new URLSearchParams();
14
14
  if (period) params.append('period', period);
15
15
 
16
- const res = await this.getClient().get(`/analytics/users/${userId}?${params.toString()}`);
16
+ const res = await this.getClient().get(`/api/analytics/users/${userId}?${params.toString()}`);
17
17
  return res.data;
18
18
  } catch (error) {
19
19
  throw this.handleError(error);
@@ -25,7 +25,7 @@ export class AnalyticsService extends OxyServices {
25
25
  */
26
26
  async updateAnalytics(userId: string, type: string, data: Record<string, any>): Promise<{ message: string }> {
27
27
  try {
28
- const res = await this.getClient().put(`/analytics/users/${userId}/${type}`, data);
28
+ const res = await this.getClient().put(`/api/analytics/users/${userId}/${type}`, data);
29
29
  return res.data;
30
30
  } catch (error) {
31
31
  throw this.handleError(error);
@@ -40,7 +40,7 @@ export class AnalyticsService extends OxyServices {
40
40
  const params = new URLSearchParams();
41
41
  if (period) params.append('period', period);
42
42
 
43
- const res = await this.getClient().get(`/analytics/users/${userId}/viewers?${params.toString()}`);
43
+ const res = await this.getClient().get(`/api/analytics/users/${userId}/viewers?${params.toString()}`);
44
44
  return res.data;
45
45
  } catch (error) {
46
46
  throw this.handleError(error);
@@ -55,7 +55,7 @@ export class AnalyticsService extends OxyServices {
55
55
  const params = new URLSearchParams();
56
56
  if (period) params.append('period', period);
57
57
 
58
- const res = await this.getClient().get(`/analytics/users/${userId}/followers?${params.toString()}`);
58
+ const res = await this.getClient().get(`/api/analytics/users/${userId}/followers?${params.toString()}`);
59
59
  return res.data;
60
60
  } catch (error) {
61
61
  throw this.handleError(error);
@@ -20,7 +20,7 @@ export class AuthService extends OxyServices {
20
20
  */
21
21
  async signUp(username: string, email: string, password: string): Promise<{ message: string; token: string; user: User }> {
22
22
  try {
23
- const res = await this.getClient().post('/auth/signup', {
23
+ const res = await this.getClient().post('/api/auth/signup', {
24
24
  username,
25
25
  email,
26
26
  password
@@ -36,7 +36,7 @@ export class AuthService extends OxyServices {
36
36
  */
37
37
  async signIn(username: string, password: string, deviceName?: string, deviceFingerprint?: any): Promise<SessionLoginResponse> {
38
38
  try {
39
- const res = await this.getClient().post('/auth/login', {
39
+ const res = await this.getClient().post('/api/auth/login', {
40
40
  username,
41
41
  password,
42
42
  deviceName,
@@ -53,7 +53,7 @@ export class AuthService extends OxyServices {
53
53
  */
54
54
  async getUserBySession(sessionId: string): Promise<User> {
55
55
  try {
56
- const res = await this.getClient().get(`/session/user/${sessionId}`);
56
+ const res = await this.getClient().get(`/api/session/user/${sessionId}`);
57
57
  return res.data;
58
58
  } catch (error) {
59
59
  throw this.handleError(error);
@@ -65,7 +65,7 @@ export class AuthService extends OxyServices {
65
65
  */
66
66
  async getTokenBySession(sessionId: string): Promise<{ accessToken: string; expiresAt: string }> {
67
67
  try {
68
- const res = await this.getClient().get(`/session/token/${sessionId}`);
68
+ const res = await this.getClient().get(`/api/session/token/${sessionId}`);
69
69
  return res.data;
70
70
  } catch (error) {
71
71
  throw this.handleError(error);
@@ -77,7 +77,7 @@ export class AuthService extends OxyServices {
77
77
  */
78
78
  async getSessionsBySessionId(sessionId: string): Promise<any[]> {
79
79
  try {
80
- const res = await this.getClient().get(`/session/sessions/${sessionId}`);
80
+ const res = await this.getClient().get(`/api/session/sessions/${sessionId}`);
81
81
  return res.data;
82
82
  } catch (error) {
83
83
  throw this.handleError(error);
@@ -89,7 +89,7 @@ export class AuthService extends OxyServices {
89
89
  */
90
90
  async logoutSession(sessionId: string, targetSessionId?: string): Promise<void> {
91
91
  try {
92
- await this.getClient().delete(`/session/logout/${sessionId}`, {
92
+ await this.getClient().delete(`/api/session/logout/${sessionId}`, {
93
93
  data: { targetSessionId }
94
94
  });
95
95
  } catch (error) {
@@ -102,7 +102,7 @@ export class AuthService extends OxyServices {
102
102
  */
103
103
  async logoutAllSessions(sessionId: string): Promise<void> {
104
104
  try {
105
- await this.getClient().delete(`/session/logout-all/${sessionId}`);
105
+ await this.getClient().delete(`/api/session/logout-all/${sessionId}`);
106
106
  } catch (error) {
107
107
  throw this.handleError(error);
108
108
  }
@@ -154,13 +154,13 @@ export class AuthService extends OxyServices {
154
154
  headers['X-Device-Fingerprint'] = deviceFingerprint;
155
155
  }
156
156
 
157
- const res = await this.getClient().get(`/session/validate-header/${sessionId}`, {
157
+ const res = await this.getClient().get(`/api/session/validate-header/${sessionId}`, {
158
158
  headers
159
159
  });
160
160
  return { ...res.data, source: 'header' };
161
161
  } else {
162
162
  // Use standard session validation
163
- const res = await this.getClient().get(`/session/validate/${sessionId}`);
163
+ const res = await this.getClient().get(`/api/session/validate/${sessionId}`);
164
164
  return { ...res.data, source: 'standard' };
165
165
  }
166
166
  } catch (error) {
@@ -470,7 +470,7 @@ export class AuthService extends OxyServices {
470
470
  */
471
471
  async getDeviceSessions(sessionId: string): Promise<any[]> {
472
472
  try {
473
- const res = await this.getClient().get(`/session/device/sessions/${sessionId}`);
473
+ const res = await this.getClient().get(`/api/session/device/sessions/${sessionId}`);
474
474
  return res.data;
475
475
  } catch (error) {
476
476
  throw this.handleError(error);
@@ -482,7 +482,7 @@ export class AuthService extends OxyServices {
482
482
  */
483
483
  async logoutAllDeviceSessions(sessionId: string): Promise<void> {
484
484
  try {
485
- await this.getClient().delete(`/session/device/logout-all/${sessionId}`);
485
+ await this.getClient().delete(`/api/session/device/logout-all/${sessionId}`);
486
486
  } catch (error) {
487
487
  throw this.handleError(error);
488
488
  }
@@ -493,7 +493,7 @@ export class AuthService extends OxyServices {
493
493
  */
494
494
  async updateDeviceName(sessionId: string, deviceName: string): Promise<void> {
495
495
  try {
496
- await this.getClient().put(`/session/device/name/${sessionId}`, { deviceName });
496
+ await this.getClient().put(`/api/session/device/name/${sessionId}`, { deviceName });
497
497
  } catch (error) {
498
498
  throw this.handleError(error);
499
499
  }
@@ -504,7 +504,7 @@ export class AuthService extends OxyServices {
504
504
  */
505
505
  async checkUsernameAvailability(username: string): Promise<{ available: boolean; message: string }> {
506
506
  try {
507
- const res = await this.getClient().get(`/auth/check-username/${username}`);
507
+ const res = await this.getClient().get(`/api/auth/check-username/${username}`);
508
508
  return res.data;
509
509
  } catch (error: any) {
510
510
  // If the endpoint doesn't exist, fall back to basic validation
@@ -527,7 +527,7 @@ export class AuthService extends OxyServices {
527
527
  */
528
528
  async checkEmailAvailability(email: string): Promise<{ available: boolean; message: string }> {
529
529
  try {
530
- const res = await this.getClient().get(`/auth/check-email/${email}`);
530
+ const res = await this.getClient().get(`/api/auth/check-email/${email}`);
531
531
  return res.data;
532
532
  } catch (error: any) {
533
533
  // If the endpoint doesn't exist, fall back to basic validation
@@ -19,7 +19,7 @@ export class DeviceService extends OxyServices {
19
19
  const params = { deviceId };
20
20
  const searchParams = buildSearchParams(params);
21
21
 
22
- const res = await this.getClient().get(`/session/device/sessions/${sessionId}?${searchParams.toString()}`);
22
+ const res = await this.getClient().get(`/api/session/device/sessions/${sessionId}?${searchParams.toString()}`);
23
23
  return res.data;
24
24
  } catch (error) {
25
25
  throw this.handleError(error);
@@ -34,7 +34,7 @@ export class DeviceService extends OxyServices {
34
34
  const params = { deviceId, excludeCurrent };
35
35
  const searchParams = buildSearchParams(params);
36
36
 
37
- const res = await this.getClient().post(`/session/device/logout-all/${sessionId}?${searchParams.toString()}`);
37
+ const res = await this.getClient().post(`/api/session/device/logout-all/${sessionId}?${searchParams.toString()}`);
38
38
  return res.data;
39
39
  } catch (error) {
40
40
  throw this.handleError(error);
@@ -46,7 +46,7 @@ export class DeviceService extends OxyServices {
46
46
  */
47
47
  async updateDeviceName(sessionId: string, deviceName: string): Promise<UpdateDeviceNameResponse> {
48
48
  try {
49
- const res = await this.getClient().put(`/session/device/name/${sessionId}`, { deviceName });
49
+ const res = await this.getClient().put(`/api/session/device/name/${sessionId}`, { deviceName });
50
50
  return res.data;
51
51
  } catch (error) {
52
52
  throw this.handleError(error);
@@ -80,7 +80,7 @@ export class FileService extends OxyServices {
80
80
  */
81
81
  async getFileMetadata(fileId: string): Promise<FileMetadata> {
82
82
  try {
83
- const res = await this.getClient().get(`/files/meta/${fileId}`);
83
+ const res = await this.getClient().get(`/api/files/meta/${fileId}`);
84
84
  return res.data;
85
85
  } catch (error) {
86
86
  throw this.handleError(error);
@@ -92,7 +92,7 @@ export class FileService extends OxyServices {
92
92
  */
93
93
  async updateFileMetadata(fileId: string, updates: FileUpdateRequest): Promise<FileMetadata> {
94
94
  try {
95
- const res = await this.getClient().put(`/files/meta/${fileId}`, updates);
95
+ const res = await this.getClient().put(`/api/files/meta/${fileId}`, updates);
96
96
  return res.data;
97
97
  } catch (error) {
98
98
  throw this.handleError(error);
@@ -104,7 +104,7 @@ export class FileService extends OxyServices {
104
104
  */
105
105
  async deleteFile(fileId: string): Promise<FileDeleteResponse> {
106
106
  try {
107
- const res = await this.getClient().delete(`/files/${fileId}`);
107
+ const res = await this.getClient().delete(`/api/files/${fileId}`);
108
108
  return res.data;
109
109
  } catch (error) {
110
110
  throw this.handleError(error);
@@ -145,7 +145,7 @@ export class FileService extends OxyServices {
145
145
  });
146
146
  }
147
147
 
148
- const res = await this.getClient().get(`/files/list/${userId}?${params.toString()}`);
148
+ const res = await this.getClient().get(`/api/files/list/${userId}?${params.toString()}`);
149
149
  return res.data;
150
150
  } catch (error) {
151
151
  throw this.handleError(error);
@@ -157,7 +157,7 @@ export class FileService extends OxyServices {
157
157
  */
158
158
  async downloadFileContent(fileId: string): Promise<Response> {
159
159
  try {
160
- const res = await this.getClient().get(`/files/${fileId}`, {
160
+ const res = await this.getClient().get(`/api/files/${fileId}`, {
161
161
  responseType: 'blob'
162
162
  });
163
163
  return res.data;
@@ -171,7 +171,7 @@ export class FileService extends OxyServices {
171
171
  */
172
172
  async getFileContentAsText(fileId: string): Promise<string> {
173
173
  try {
174
- const res = await this.getClient().get(`/files/${fileId}`, {
174
+ const res = await this.getClient().get(`/api/files/${fileId}`, {
175
175
  headers: {
176
176
  'Accept': 'text/plain'
177
177
  }
@@ -187,7 +187,7 @@ export class FileService extends OxyServices {
187
187
  */
188
188
  async getFileContentAsBlob(fileId: string): Promise<Blob> {
189
189
  try {
190
- const res = await this.getClient().get(`/files/${fileId}`, {
190
+ const res = await this.getClient().get(`/api/files/${fileId}`, {
191
191
  responseType: 'blob'
192
192
  });
193
193
  return res.data;
@@ -39,7 +39,7 @@ export class KarmaService extends OxyServices {
39
39
  */
40
40
  async getUserKarmaTotal(userId: string): Promise<{ total: number }> {
41
41
  try {
42
- const res = await this.getClient().get(`/karma/${userId}/total`);
42
+ const res = await this.getClient().get(`/api/karma/${userId}/total`);
43
43
  return res.data;
44
44
  } catch (error) {
45
45
  throw this.handleError(error);
@@ -59,7 +59,7 @@ export class KarmaService extends OxyServices {
59
59
  if (limit) params.append('limit', limit.toString());
60
60
  if (offset) params.append('offset', offset.toString());
61
61
 
62
- const res = await this.getClient().get(`/karma/${userId}/history?${params.toString()}`);
62
+ const res = await this.getClient().get(`/api/karma/${userId}/history?${params.toString()}`);
63
63
  return res.data;
64
64
  } catch (error) {
65
65
  throw this.handleError(error);