turboself-api 1.2.7 → 2.0.2

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 (83) hide show
  1. package/LICENSE +2 -2
  2. package/README.md +18 -49
  3. package/dist/index.d.mts +826 -0
  4. package/dist/index.d.ts +826 -14
  5. package/dist/index.js +2 -18
  6. package/dist/index.js.map +1 -0
  7. package/dist/index.mjs +2 -17
  8. package/dist/index.mjs.map +1 -0
  9. package/package.json +18 -10
  10. package/dist/api/accountCreationPost.d.ts +0 -2
  11. package/dist/api/accountCreationPost.js +0 -39
  12. package/dist/api/balanceGet.d.ts +0 -2
  13. package/dist/api/balanceGet.js +0 -27
  14. package/dist/api/bookDay.d.ts +0 -2
  15. package/dist/api/bookDay.js +0 -58
  16. package/dist/api/bookingGet.d.ts +0 -2
  17. package/dist/api/bookingGet.js +0 -48
  18. package/dist/api/canBookEveningGet.d.ts +0 -1
  19. package/dist/api/canBookEveningGet.js +0 -18
  20. package/dist/api/establishmentGet.d.ts +0 -2
  21. package/dist/api/establishmentGet.js +0 -43
  22. package/dist/api/establishmentSearch.d.ts +0 -2
  23. package/dist/api/establishmentSearch.js +0 -21
  24. package/dist/api/generatePaymentURL.d.ts +0 -1
  25. package/dist/api/generatePaymentURL.js +0 -26
  26. package/dist/api/historyGet.d.ts +0 -2
  27. package/dist/api/historyGet.js +0 -26
  28. package/dist/api/hostGet.d.ts +0 -2
  29. package/dist/api/hostGet.js +0 -53
  30. package/dist/api/lastPaymentGet.d.ts +0 -2
  31. package/dist/api/lastPaymentGet.js +0 -21
  32. package/dist/api/requestNewPassword.d.ts +0 -2
  33. package/dist/api/requestNewPassword.js +0 -16
  34. package/dist/api/siblingsGet.d.ts +0 -2
  35. package/dist/api/siblingsGet.js +0 -56
  36. package/dist/authenticate/index.d.ts +0 -3
  37. package/dist/authenticate/index.js +0 -25
  38. package/dist/client/Turboself.d.ts +0 -62
  39. package/dist/client/Turboself.js +0 -136
  40. package/dist/interfaces/Account.d.ts +0 -48
  41. package/dist/interfaces/Account.js +0 -3
  42. package/dist/interfaces/AuthFlow.d.ts +0 -24
  43. package/dist/interfaces/AuthFlow.js +0 -3
  44. package/dist/interfaces/Balance.d.ts +0 -16
  45. package/dist/interfaces/Balance.js +0 -3
  46. package/dist/interfaces/Bookings.d.ts +0 -144
  47. package/dist/interfaces/Bookings.js +0 -3
  48. package/dist/interfaces/Establishment.d.ts +0 -95
  49. package/dist/interfaces/Establishment.js +0 -3
  50. package/dist/interfaces/Fetcher.d.ts +0 -9
  51. package/dist/interfaces/Fetcher.js +0 -3
  52. package/dist/interfaces/Home.d.ts +0 -27
  53. package/dist/interfaces/Home.js +0 -3
  54. package/dist/interfaces/Host.d.ts +0 -38
  55. package/dist/interfaces/Host.js +0 -3
  56. package/dist/interfaces/Payment.d.ts +0 -10
  57. package/dist/interfaces/Payment.js +0 -3
  58. package/dist/parser/Balance.d.ts +0 -17
  59. package/dist/parser/Balance.js +0 -20
  60. package/dist/parser/BookedMeal.d.ts +0 -29
  61. package/dist/parser/BookedMeal.js +0 -28
  62. package/dist/parser/BookingDay.d.ts +0 -32
  63. package/dist/parser/BookingDay.js +0 -39
  64. package/dist/parser/BookingPrice.d.ts +0 -7
  65. package/dist/parser/BookingPrice.js +0 -13
  66. package/dist/parser/BookingTerminal.d.ts +0 -32
  67. package/dist/parser/BookingTerminal.js +0 -30
  68. package/dist/parser/BookingWeek.d.ts +0 -17
  69. package/dist/parser/BookingWeek.js +0 -19
  70. package/dist/parser/Establishment.d.ts +0 -117
  71. package/dist/parser/Establishment.js +0 -84
  72. package/dist/parser/History.d.ts +0 -17
  73. package/dist/parser/History.js +0 -20
  74. package/dist/parser/Host.d.ts +0 -70
  75. package/dist/parser/Host.js +0 -67
  76. package/dist/parser/LatestPayment.d.ts +0 -26
  77. package/dist/parser/LatestPayment.js +0 -27
  78. package/dist/utils/endpoints.d.ts +0 -13
  79. package/dist/utils/endpoints.js +0 -30
  80. package/dist/utils/fetcher.d.ts +0 -7
  81. package/dist/utils/fetcher.js +0 -25
  82. package/dist/utils/weekNumber.d.ts +0 -1
  83. package/dist/utils/weekNumber.js +0 -14
package/LICENSE CHANGED
@@ -632,7 +632,7 @@ state the exclusion of warranty; and each file should have at least
632
632
  the "copyright" line and a pointer to where the full notice is found.
633
633
 
634
634
  <one line to give the program's name and a brief idea of what it does.>
635
- Copyright (C) <year> <name of author>
635
+ Copyright (C) 2024 Raphaël SCHRÖDER
636
636
 
637
637
  This program is free software: you can redistribute it and/or modify
638
638
  it under the terms of the GNU General Public License as published by
@@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail.
652
652
  If the program does terminal interaction, make it output a short
653
653
  notice like this when it starts in an interactive mode:
654
654
 
655
- <program> Copyright (C) <year> <name of author>
655
+ turboself-api Copyright (C) 2024 Raphaël SCHRÖDER
656
656
  This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657
657
  This is free software, and you are welcome to redistribute it
658
658
  under certain conditions; type `show c' for details.
package/README.md CHANGED
@@ -5,71 +5,40 @@
5
5
  [![npm](https://img.shields.io/npm/dw/turboself-api)](https://www.npmjs.com/package/turboself-api)
6
6
  [![npm](https://img.shields.io/npm/dt/turboself-api)](https://www.npmjs.com/package/turboself-api)
7
7
 
8
- A simple wrapper to interact with the TurboSelf API.
8
+ A powerful and user-friendly wrapper for interacting with the TurboSelf API.
9
9
 
10
10
  > [!warning]
11
11
  > This project is not affiliated with TurboSelf or INCB in any way.
12
12
 
13
- ## 📝 Roadmap
14
-
15
- - [X] Authentification
16
-
17
- - [x] With credentials
18
- - [X] With token (with Pronote for example)
19
-
20
- - [x] Reset password request (with email)
21
-
22
- - [x] Get informations
23
-
24
- - [x] Balance
25
- - [x] Bookings
26
- - [x] History
27
- - [x] Host
28
- - [x] Last transaction
29
- - [x] Permissions to book evenings meals
30
- - [x] Siblings
31
- - [x] User
32
-
33
- - [x] Seaching an etablishment
34
-
35
- - [x] By city
36
- - [x] With Limit
37
-
38
- - [x] Get etablishment informations
39
-
40
- - [x] Book a meal (book and cancel)
13
+ ## 🚀 What's New in v2.0
14
+ - **Complete Code Refactoring**: Improved project structure for better maintainability and performance.
15
+ - **New Endpoints**: Added new endpoints to provide more comprehensive coverage of TurboSelf API functionalities.
16
+ - **Bug Fixes**: Corrected type errors that were due to missing documentation in version 1.0.
17
+ - **Performance Enhancements**: Optimized code for faster response times and better overall performance.
41
18
 
42
19
  ## 📦 Installation
43
-
44
- ```bash
20
+ ```
45
21
  npm install turboself-api
46
22
  ```
47
23
 
48
- ## 🔧 Usage
49
-
50
- ### Authentification with credentials
51
-
52
- ```javascript
53
- const TurboSelf = require("turboself-api");
24
+ ## 📚 Exemple
25
+ ```ts
26
+ import { authenticateWithCredentials } from "turboself-api";
54
27
 
55
28
  async function main() {
56
- let client = await TurboSelf.authenticateWithCredentials({
57
- username: "your_email",
58
- password: "your_password",
59
- });
60
- console.log(client);
29
+ let client = await authenticateWithCredentials(
30
+ "your_email",
31
+ "your_password"
32
+ )
33
+
34
+ console.log(client)
61
35
  }
62
36
 
63
37
  main();
64
38
  ```
65
39
 
66
- ### Other exemples
67
-
68
- To see more examples, check the [examples](https://github.com/raphckrman/turboself-api/tree/dev/examples) folder.
69
-
70
- ## ௷ Credits
71
-
40
+ ## 💡 Credits
72
41
  Thanks to the following people for their contributions to this project:
73
-
74
42
  - [Remy Godet](https://github.com/godetremy)
75
43
  - [Tom Theret](https://github.com/tom-theret)
44
+ - [TouchGuild](https://github.com/DinographicPixels/TouchGuild/) for the ESLint rules