@vitalfit/sdk 0.4.3 → 0.4.5

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/dist/index.cjs CHANGED
@@ -31,6 +31,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
31
31
  var index_exports = {};
32
32
  __export(index_exports, {
33
33
  APIError: () => APIError,
34
+ ChatRole: () => ChatRole,
34
35
  UserGender: () => UserGender,
35
36
  VitalFit: () => VitalFit,
36
37
  isAPIError: () => isAPIError,
@@ -1593,7 +1594,7 @@ var ScheduleService = class {
1593
1594
  jwt
1594
1595
  });
1595
1596
  }
1596
- async GetClassesByInstructor(jwt, userId, month, year, date) {
1597
+ async GetClassesByInstructor(jwt, userId, month, year, date, branchId) {
1597
1598
  const response = await this.client.get({
1598
1599
  url: "/schedule/instructor",
1599
1600
  jwt,
@@ -1601,7 +1602,8 @@ var ScheduleService = class {
1601
1602
  user_id: userId,
1602
1603
  month,
1603
1604
  year,
1604
- date
1605
+ date,
1606
+ branch_id: branchId
1605
1607
  }
1606
1608
  });
1607
1609
  return response;
@@ -1835,17 +1837,27 @@ var BookingService = class {
1835
1837
  jwt
1836
1838
  });
1837
1839
  }
1838
- async getClientBooking(userID, jwt) {
1840
+ async getClientBooking(userID, jwt, month, year, date) {
1839
1841
  const response = await this.client.get({
1840
1842
  url: `/bookings/client/${userID}`,
1841
- jwt
1843
+ jwt,
1844
+ params: {
1845
+ month,
1846
+ year,
1847
+ date
1848
+ }
1842
1849
  });
1843
1850
  return response;
1844
1851
  }
1845
- async getClientBranchBooking(branchID, userID, jwt) {
1852
+ async getClientBranchBooking(branchID, userID, jwt, month, year, date) {
1846
1853
  const response = await this.client.get({
1847
1854
  url: `/schedule/branch/${branchID}/client/${userID}`,
1848
- jwt
1855
+ jwt,
1856
+ params: {
1857
+ month,
1858
+ year,
1859
+ date
1860
+ }
1849
1861
  });
1850
1862
  return response;
1851
1863
  }
@@ -2848,6 +2860,44 @@ var RoutineService = class {
2848
2860
  }
2849
2861
  };
2850
2862
 
2863
+ // src/services/LLM.ts
2864
+ var LLMService = class {
2865
+ client;
2866
+ constructor(client) {
2867
+ this.client = client;
2868
+ this.chat = this.chat.bind(this);
2869
+ this.getHistory = this.getHistory.bind(this);
2870
+ this.resetChat = this.resetChat.bind(this);
2871
+ }
2872
+ async chat(data, jwt) {
2873
+ const response = await this.client.post({
2874
+ url: "/llm/chat",
2875
+ jwt,
2876
+ data
2877
+ });
2878
+ return response;
2879
+ }
2880
+ async getHistory(jwt, { page = 1, limit = 50, sort = "desc" } = {}) {
2881
+ const response = await this.client.get({
2882
+ url: "/llm/history",
2883
+ jwt,
2884
+ params: {
2885
+ page,
2886
+ limit,
2887
+ sort
2888
+ }
2889
+ });
2890
+ return response;
2891
+ }
2892
+ async resetChat(jwt) {
2893
+ const response = await this.client.post({
2894
+ url: "/llm/reset",
2895
+ jwt
2896
+ });
2897
+ return response;
2898
+ }
2899
+ };
2900
+
2851
2901
  // src/types/auth.ts
2852
2902
  var UserGender = /* @__PURE__ */ ((UserGender2) => {
2853
2903
  UserGender2["male"] = "male";
@@ -2948,6 +2998,18 @@ var mainCurrencies = [
2948
2998
  }
2949
2999
  ];
2950
3000
 
3001
+ // src/types/LLM.ts
3002
+ var ChatRole = /* @__PURE__ */ ((ChatRole2) => {
3003
+ ChatRole2["User"] = "user";
3004
+ ChatRole2["Recepcionist"] = "recepcionist";
3005
+ ChatRole2["Instructor"] = "instructor";
3006
+ ChatRole2["Client"] = "client";
3007
+ ChatRole2["System"] = "system";
3008
+ ChatRole2["Tool"] = "tool";
3009
+ ChatRole2["Assistant"] = "assistant";
3010
+ return ChatRole2;
3011
+ })(ChatRole || {});
3012
+
2951
3013
  // src/index.ts
2952
3014
  var VitalFit = class _VitalFit {
2953
3015
  static instance;
@@ -2976,6 +3038,7 @@ var VitalFit = class _VitalFit {
2976
3038
  notification;
2977
3039
  exports;
2978
3040
  routine;
3041
+ llm;
2979
3042
  constructor(isDevMode, origin) {
2980
3043
  this.client = new Client(isDevMode, origin);
2981
3044
  this.auth = new AuthService(this.client);
@@ -3002,6 +3065,7 @@ var VitalFit = class _VitalFit {
3002
3065
  this.notification = new NotificationService(this.client);
3003
3066
  this.exports = new ExportsService(this.client);
3004
3067
  this.routine = new RoutineService(this.client);
3068
+ this.llm = new LLMService(this.client);
3005
3069
  }
3006
3070
  static getInstance(isDevMode = false) {
3007
3071
  if (!_VitalFit.instance) {
@@ -3010,12 +3074,13 @@ var VitalFit = class _VitalFit {
3010
3074
  return _VitalFit.instance;
3011
3075
  }
3012
3076
  version() {
3013
- return "0.4.3";
3077
+ return "0.4.5";
3014
3078
  }
3015
3079
  };
3016
3080
  // Annotate the CommonJS export names for ESM import in node:
3017
3081
  0 && (module.exports = {
3018
3082
  APIError,
3083
+ ChatRole,
3019
3084
  UserGender,
3020
3085
  VitalFit,
3021
3086
  isAPIError,