turboself-api 1.2.7 → 2.0.1
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/LICENSE +2 -2
- package/README.md +18 -49
- package/dist/index.d.mts +822 -0
- package/dist/index.d.ts +822 -14
- package/dist/index.js +2 -18
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +2 -17
- package/dist/index.mjs.map +1 -0
- package/package.json +18 -10
- package/dist/api/accountCreationPost.d.ts +0 -2
- package/dist/api/accountCreationPost.js +0 -39
- package/dist/api/balanceGet.d.ts +0 -2
- package/dist/api/balanceGet.js +0 -27
- package/dist/api/bookDay.d.ts +0 -2
- package/dist/api/bookDay.js +0 -58
- package/dist/api/bookingGet.d.ts +0 -2
- package/dist/api/bookingGet.js +0 -48
- package/dist/api/canBookEveningGet.d.ts +0 -1
- package/dist/api/canBookEveningGet.js +0 -18
- package/dist/api/establishmentGet.d.ts +0 -2
- package/dist/api/establishmentGet.js +0 -43
- package/dist/api/establishmentSearch.d.ts +0 -2
- package/dist/api/establishmentSearch.js +0 -21
- package/dist/api/generatePaymentURL.d.ts +0 -1
- package/dist/api/generatePaymentURL.js +0 -26
- package/dist/api/historyGet.d.ts +0 -2
- package/dist/api/historyGet.js +0 -26
- package/dist/api/hostGet.d.ts +0 -2
- package/dist/api/hostGet.js +0 -53
- package/dist/api/lastPaymentGet.d.ts +0 -2
- package/dist/api/lastPaymentGet.js +0 -21
- package/dist/api/requestNewPassword.d.ts +0 -2
- package/dist/api/requestNewPassword.js +0 -16
- package/dist/api/siblingsGet.d.ts +0 -2
- package/dist/api/siblingsGet.js +0 -56
- package/dist/authenticate/index.d.ts +0 -3
- package/dist/authenticate/index.js +0 -25
- package/dist/client/Turboself.d.ts +0 -62
- package/dist/client/Turboself.js +0 -136
- package/dist/interfaces/Account.d.ts +0 -48
- package/dist/interfaces/Account.js +0 -3
- package/dist/interfaces/AuthFlow.d.ts +0 -24
- package/dist/interfaces/AuthFlow.js +0 -3
- package/dist/interfaces/Balance.d.ts +0 -16
- package/dist/interfaces/Balance.js +0 -3
- package/dist/interfaces/Bookings.d.ts +0 -144
- package/dist/interfaces/Bookings.js +0 -3
- package/dist/interfaces/Establishment.d.ts +0 -95
- package/dist/interfaces/Establishment.js +0 -3
- package/dist/interfaces/Fetcher.d.ts +0 -9
- package/dist/interfaces/Fetcher.js +0 -3
- package/dist/interfaces/Home.d.ts +0 -27
- package/dist/interfaces/Home.js +0 -3
- package/dist/interfaces/Host.d.ts +0 -38
- package/dist/interfaces/Host.js +0 -3
- package/dist/interfaces/Payment.d.ts +0 -10
- package/dist/interfaces/Payment.js +0 -3
- package/dist/parser/Balance.d.ts +0 -17
- package/dist/parser/Balance.js +0 -20
- package/dist/parser/BookedMeal.d.ts +0 -29
- package/dist/parser/BookedMeal.js +0 -28
- package/dist/parser/BookingDay.d.ts +0 -32
- package/dist/parser/BookingDay.js +0 -39
- package/dist/parser/BookingPrice.d.ts +0 -7
- package/dist/parser/BookingPrice.js +0 -13
- package/dist/parser/BookingTerminal.d.ts +0 -32
- package/dist/parser/BookingTerminal.js +0 -30
- package/dist/parser/BookingWeek.d.ts +0 -17
- package/dist/parser/BookingWeek.js +0 -19
- package/dist/parser/Establishment.d.ts +0 -117
- package/dist/parser/Establishment.js +0 -84
- package/dist/parser/History.d.ts +0 -17
- package/dist/parser/History.js +0 -20
- package/dist/parser/Host.d.ts +0 -70
- package/dist/parser/Host.js +0 -67
- package/dist/parser/LatestPayment.d.ts +0 -26
- package/dist/parser/LatestPayment.js +0 -27
- package/dist/utils/endpoints.d.ts +0 -13
- package/dist/utils/endpoints.js +0 -30
- package/dist/utils/fetcher.d.ts +0 -7
- package/dist/utils/fetcher.js +0 -25
- package/dist/utils/weekNumber.d.ts +0 -1
- 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)
|
|
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
|
-
|
|
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
|
[](https://www.npmjs.com/package/turboself-api)
|
|
6
6
|
[](https://www.npmjs.com/package/turboself-api)
|
|
7
7
|
|
|
8
|
-
A
|
|
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
|
-
##
|
|
14
|
-
|
|
15
|
-
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
-
##
|
|
49
|
-
|
|
50
|
-
|
|
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
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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
|
-
|
|
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
|