turboself-api 1.2.6 → 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 -9
- package/dist/index.js +2 -13
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +2 -12
- package/dist/index.mjs.map +1 -0
- package/package.json +18 -10
- 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/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 -58
- package/dist/client/Turboself.js +0 -126
- package/dist/interfaces/Account.d.ts +0 -21
- 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/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 -11
- package/dist/utils/endpoints.js +0 -26
- 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
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export interface AuthFlowBody {
|
|
2
|
-
/** Username of the user */
|
|
3
|
-
username: string;
|
|
4
|
-
/** Password of the user */
|
|
5
|
-
password: string;
|
|
6
|
-
}
|
|
7
|
-
export interface AuthFlowResult {
|
|
8
|
-
/** JWE Access Token, valid for 1 hour */
|
|
9
|
-
access_token: string;
|
|
10
|
-
/** Global identifier of the user */
|
|
11
|
-
userId: number;
|
|
12
|
-
/** Identifier of the user specific to the etablishment */
|
|
13
|
-
hoteId: number;
|
|
14
|
-
}
|
|
15
|
-
export interface AuthFlowData {
|
|
16
|
-
/** Global identifier of the user */
|
|
17
|
-
userId: number;
|
|
18
|
-
/** Identifier of the user specific to the etablishment */
|
|
19
|
-
hoteId: number;
|
|
20
|
-
/** Username of the user */
|
|
21
|
-
username: string;
|
|
22
|
-
/** Password of the user */
|
|
23
|
-
password: string;
|
|
24
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQXV0aEZsb3cuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9saWIvaW50ZXJmYWNlcy9BdXRoRmxvdy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export interface BalanceGetResult {
|
|
2
|
-
id?: string;
|
|
3
|
-
compte?: unknown | null;
|
|
4
|
-
appli: {
|
|
5
|
-
id: number;
|
|
6
|
-
idOrig: number;
|
|
7
|
-
lib: string;
|
|
8
|
-
};
|
|
9
|
-
hote: {
|
|
10
|
-
/** Host ID */
|
|
11
|
-
id: number;
|
|
12
|
-
};
|
|
13
|
-
montant: number;
|
|
14
|
-
montantEstime: number;
|
|
15
|
-
montantEstimeMsg: string;
|
|
16
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQmFsYW5jZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL2xpYi9pbnRlcmZhY2VzL0JhbGFuY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
import { EtablishmentConfiguration, EtablishmentConfigurationReservation, EtablishmentConfigurationSelf } from "./Establishment";
|
|
2
|
-
export interface BookingWeekGetResult {
|
|
3
|
-
rsvWebDto: Array<WeekBooking>;
|
|
4
|
-
numSemaines: Array<number>;
|
|
5
|
-
isResaSoirActive: boolean;
|
|
6
|
-
dateSemaine: string;
|
|
7
|
-
}
|
|
8
|
-
export interface WeekBooking {
|
|
9
|
-
id: string;
|
|
10
|
-
hote: {
|
|
11
|
-
id: number;
|
|
12
|
-
};
|
|
13
|
-
annee: number;
|
|
14
|
-
semaine: number;
|
|
15
|
-
borne: {
|
|
16
|
-
id: number;
|
|
17
|
-
code2p5: number;
|
|
18
|
-
idOrig: number;
|
|
19
|
-
lib: string;
|
|
20
|
-
prix: Array<BookingPrice>;
|
|
21
|
-
};
|
|
22
|
-
joursAutorises: number;
|
|
23
|
-
jours: DayBooking[];
|
|
24
|
-
usage: number;
|
|
25
|
-
}
|
|
26
|
-
export interface DayBooking {
|
|
27
|
-
dayReserv: number;
|
|
28
|
-
reservDernSynchro: number;
|
|
29
|
-
dayOfWeek: number;
|
|
30
|
-
web: {
|
|
31
|
-
id: number;
|
|
32
|
-
};
|
|
33
|
-
autorise: boolean;
|
|
34
|
-
msg: string;
|
|
35
|
-
dayLabel?: string;
|
|
36
|
-
}
|
|
37
|
-
export interface BookingPrice {
|
|
38
|
-
id: number;
|
|
39
|
-
borneId: number;
|
|
40
|
-
usage: number;
|
|
41
|
-
prix: number;
|
|
42
|
-
idOrig: number;
|
|
43
|
-
}
|
|
44
|
-
export interface BookMealPut {
|
|
45
|
-
dayReserv: number;
|
|
46
|
-
reservHorsKiosk: number;
|
|
47
|
-
reservDernSynchro: number;
|
|
48
|
-
web: {
|
|
49
|
-
id: string;
|
|
50
|
-
annee: number;
|
|
51
|
-
semaine: number;
|
|
52
|
-
borneId: number;
|
|
53
|
-
jourAutorises: number;
|
|
54
|
-
usage: number;
|
|
55
|
-
hote: {
|
|
56
|
-
id: number;
|
|
57
|
-
idOrig: number;
|
|
58
|
-
/** Host Surname */
|
|
59
|
-
nom: string;
|
|
60
|
-
/** Host First Name */
|
|
61
|
-
prenom: string;
|
|
62
|
-
/** Host Payment Mode */
|
|
63
|
-
mode: string;
|
|
64
|
-
/** Quality of the host in the establishment */
|
|
65
|
-
qualite: string;
|
|
66
|
-
/** Division of the host in the establishment */
|
|
67
|
-
division: string;
|
|
68
|
-
/** Price of a meal in cent */
|
|
69
|
-
prixDej: number;
|
|
70
|
-
type: number;
|
|
71
|
-
/** Last Synchronisation to Turboself */
|
|
72
|
-
dateDernSynchro: string;
|
|
73
|
-
/** If the host account is disabled */
|
|
74
|
-
desactive: boolean;
|
|
75
|
-
/** If the password is private (wtf?) */
|
|
76
|
-
mdpPrive: boolean;
|
|
77
|
-
/** If the host has the right to book a meal even if its balance is insufficient */
|
|
78
|
-
autoriseReservSoldeIns: boolean;
|
|
79
|
-
profilForfaitModule: number;
|
|
80
|
-
oldLogin: unknown;
|
|
81
|
-
/** QRCode */
|
|
82
|
-
carteCodee: number | null;
|
|
83
|
-
etab: {
|
|
84
|
-
/** 2P5 Code */
|
|
85
|
-
code2p5: string;
|
|
86
|
-
/** Establishment Name */
|
|
87
|
-
nom: string;
|
|
88
|
-
/** TurboSelf etablishment Version */
|
|
89
|
-
versionTS: string;
|
|
90
|
-
/** Etablishment Identifier */
|
|
91
|
-
id?: number;
|
|
92
|
-
/** Etablishment Address 1 */
|
|
93
|
-
adr1?: string;
|
|
94
|
-
/** Etablishment Address 2 */
|
|
95
|
-
adr2?: string;
|
|
96
|
-
/** Postal Code of the etablishment */
|
|
97
|
-
cp?: string;
|
|
98
|
-
/** City of the etablishment */
|
|
99
|
-
ville?: string;
|
|
100
|
-
/** Phone Number of the etablishment */
|
|
101
|
-
tel?: string;
|
|
102
|
-
fax?: string;
|
|
103
|
-
/** First etablishment synchronisation to Turboself */
|
|
104
|
-
datePremSynchro?: string;
|
|
105
|
-
/** Last etablishment synchronisation to Turboself */
|
|
106
|
-
dateDernSynchro?: string;
|
|
107
|
-
/** Turboself Identifier */
|
|
108
|
-
idTurboself?: number;
|
|
109
|
-
/** Currency symbol used by the etablishment */
|
|
110
|
-
currencySymbol?: string;
|
|
111
|
-
configuration?: EtablishmentConfiguration;
|
|
112
|
-
configurationsReservation?: Array<EtablishmentConfigurationReservation>;
|
|
113
|
-
configurationSelf?: EtablishmentConfigurationSelf;
|
|
114
|
-
/** UAI (Unité Administrative Immatriculée) of the etablishment*/
|
|
115
|
-
numEtab?: string;
|
|
116
|
-
/** Etablishment is desactivated ? */
|
|
117
|
-
desactive?: boolean;
|
|
118
|
-
/** MAC Address of the etablishment's server */
|
|
119
|
-
pcServeur?: string;
|
|
120
|
-
/** Max authorized transactions */
|
|
121
|
-
nbTransactionAutorise?: number;
|
|
122
|
-
/** Total Reservations */
|
|
123
|
-
nbReservationsTotal?: number;
|
|
124
|
-
/** URL of the logo */
|
|
125
|
-
logoUrl?: string;
|
|
126
|
-
/** Teambox server IP */
|
|
127
|
-
ipTeamBox?: string;
|
|
128
|
-
/** Maybe VAD identifier (Vente à Distance) */
|
|
129
|
-
numCtraVAD?: string;
|
|
130
|
-
customIDPayment?: string;
|
|
131
|
-
etatAlerteTransaction: string;
|
|
132
|
-
/** Number of meal booked */
|
|
133
|
-
nbReservationRealise?: number;
|
|
134
|
-
timeZone?: string;
|
|
135
|
-
joursOuvres?: number;
|
|
136
|
-
emailCreationCompte?: string;
|
|
137
|
-
};
|
|
138
|
-
};
|
|
139
|
-
};
|
|
140
|
-
rsvwebid: string;
|
|
141
|
-
dayOfWeek: number;
|
|
142
|
-
msg: string;
|
|
143
|
-
id: string;
|
|
144
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQm9va2luZ3MuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9saWIvaW50ZXJmYWNlcy9Cb29raW5ncy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
export interface EtablishmentGetResult {
|
|
2
|
-
/** 2P5 Code */
|
|
3
|
-
code2p5: string;
|
|
4
|
-
/** Establishment Name */
|
|
5
|
-
nom: string;
|
|
6
|
-
/** TurboSelf etablishment Version */
|
|
7
|
-
versionTS: string;
|
|
8
|
-
/** Etablishment Identifier */
|
|
9
|
-
id?: number;
|
|
10
|
-
/** Etablishment Address 1 */
|
|
11
|
-
adr1?: string;
|
|
12
|
-
/** Etablishment Address 2 */
|
|
13
|
-
adr2?: string;
|
|
14
|
-
/** Postal Code of the etablishment */
|
|
15
|
-
cp?: string;
|
|
16
|
-
/** City of the etablishment */
|
|
17
|
-
ville?: string;
|
|
18
|
-
/** Phone Number of the etablishment */
|
|
19
|
-
tel?: string;
|
|
20
|
-
/** First etablishment synchronisation to Turboself */
|
|
21
|
-
datePremSynchro?: string;
|
|
22
|
-
/** Last etablishment synchronisation to Turboself */
|
|
23
|
-
dateDernSynchro?: string;
|
|
24
|
-
/** Turboself Identifier */
|
|
25
|
-
idTurboself?: number;
|
|
26
|
-
/** Currency symbol used by the etablishment */
|
|
27
|
-
currencySymbol?: string;
|
|
28
|
-
configuration?: EtablishmentConfiguration;
|
|
29
|
-
configurationsReservation?: Array<EtablishmentConfigurationReservation>;
|
|
30
|
-
configurationSelf?: EtablishmentConfigurationSelf;
|
|
31
|
-
/** UAI (Unité Administrative Immatriculée) of the etablishment*/
|
|
32
|
-
numEtab?: string;
|
|
33
|
-
/** Etablishment is desactivated ? */
|
|
34
|
-
desactive?: boolean;
|
|
35
|
-
/** MAC Address of the etablishment's server */
|
|
36
|
-
pcServeur?: string;
|
|
37
|
-
/** Max authorized transactions */
|
|
38
|
-
nbTransactionAutorise?: number;
|
|
39
|
-
/** Total Reservations */
|
|
40
|
-
nbReservationsTotal?: number;
|
|
41
|
-
}
|
|
42
|
-
export interface EtablishmentConfiguration {
|
|
43
|
-
id: number;
|
|
44
|
-
/** URL of the website */
|
|
45
|
-
url: string;
|
|
46
|
-
/** E-Mail of the etablishment */
|
|
47
|
-
email: string;
|
|
48
|
-
/** Minium Meal to pay to add credits to an account */
|
|
49
|
-
nbRepasMini: number;
|
|
50
|
-
creanceMini: number;
|
|
51
|
-
/** Minimum amount of credits required to add credits on an account */
|
|
52
|
-
montantCreditMini: number;
|
|
53
|
-
nbSemaineReserv: number;
|
|
54
|
-
/** HTML Welcome Message */
|
|
55
|
-
msgAccueil: string;
|
|
56
|
-
/** If a Student can use QRCode */
|
|
57
|
-
autoriseQrCodeEleve: boolean;
|
|
58
|
-
/** If a dinner companion can use QRCode */
|
|
59
|
-
autoriseQrCodeCommensal: boolean;
|
|
60
|
-
/** If an intern can use QRCode */
|
|
61
|
-
autoriseQrCodeStagiaire: boolean;
|
|
62
|
-
/** If the history is hidden */
|
|
63
|
-
cacherHistorique: boolean;
|
|
64
|
-
/** List of closed dates */
|
|
65
|
-
fermetures: Array<ClosedElement>;
|
|
66
|
-
}
|
|
67
|
-
export interface EtablishmentConfigurationReservation {
|
|
68
|
-
id: number;
|
|
69
|
-
usage: number;
|
|
70
|
-
elecom: number;
|
|
71
|
-
finReserv: string;
|
|
72
|
-
}
|
|
73
|
-
export interface EtablishmentConfigurationSelf {
|
|
74
|
-
id: number;
|
|
75
|
-
nbmultiElvArg: number;
|
|
76
|
-
nbmultiElvFor: number;
|
|
77
|
-
nbmultiComArg: number;
|
|
78
|
-
nbmultiComFor: number;
|
|
79
|
-
nbmultiStgArg: number;
|
|
80
|
-
nbmultiStgFor: number;
|
|
81
|
-
dateDernSynchro: string;
|
|
82
|
-
}
|
|
83
|
-
export interface ClosedElement {
|
|
84
|
-
id: number;
|
|
85
|
-
/** Can Book ? */
|
|
86
|
-
rsv: boolean;
|
|
87
|
-
/** Can Pay ? */
|
|
88
|
-
paiement: boolean;
|
|
89
|
-
/** From */
|
|
90
|
-
du: string;
|
|
91
|
-
/** To */
|
|
92
|
-
au: string;
|
|
93
|
-
/** Synchronisation Date */
|
|
94
|
-
synchro: string;
|
|
95
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRXN0YWJsaXNobWVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL2xpYi9pbnRlcmZhY2VzL0VzdGFibGlzaG1lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export interface FetcherOptions {
|
|
2
|
-
method: "GET" | "POST" | "PUT" | "DELETE";
|
|
3
|
-
/** Headers that should be used in the request */
|
|
4
|
-
headers?: Record<string, string>;
|
|
5
|
-
/** Body that should be sent in the request */
|
|
6
|
-
body?: string;
|
|
7
|
-
/** How that should handle the redirections*/
|
|
8
|
-
redirect?: "follow" | "error" | "manual";
|
|
9
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRmV0Y2hlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL2xpYi9pbnRlcmZhY2VzL0ZldGNoZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { BalanceGetResult } from "./Balance";
|
|
2
|
-
export interface HomeGetResult {
|
|
3
|
-
latestPaiement?: LatestPayment;
|
|
4
|
-
historiques?: Array<History>;
|
|
5
|
-
comptesHote: Array<BalanceGetResult>;
|
|
6
|
-
}
|
|
7
|
-
export interface History {
|
|
8
|
-
id: number;
|
|
9
|
-
date: string;
|
|
10
|
-
detail: string;
|
|
11
|
-
debit: number | null;
|
|
12
|
-
credit: number | null;
|
|
13
|
-
}
|
|
14
|
-
export interface LatestPayment {
|
|
15
|
-
id: number;
|
|
16
|
-
hote: {
|
|
17
|
-
id: number;
|
|
18
|
-
};
|
|
19
|
-
date: string;
|
|
20
|
-
type: string | null;
|
|
21
|
-
montant: number;
|
|
22
|
-
dateMaj: string | null;
|
|
23
|
-
statut: string;
|
|
24
|
-
idTransaction: string;
|
|
25
|
-
token: string;
|
|
26
|
-
msg: string;
|
|
27
|
-
}
|
package/dist/interfaces/Home.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSG9tZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL2xpYi9pbnRlcmZhY2VzL0hvbWUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { EtablishmentGetResult } from "./Establishment";
|
|
2
|
-
export interface HostGetResult {
|
|
3
|
-
/** Host ID */
|
|
4
|
-
id: number;
|
|
5
|
-
idOrig: number;
|
|
6
|
-
etab: EtablishmentGetResult;
|
|
7
|
-
/** Host Surname */
|
|
8
|
-
nom: string;
|
|
9
|
-
/** Host First Name */
|
|
10
|
-
prenom: string;
|
|
11
|
-
/** Host Payment Mode */
|
|
12
|
-
mode: string;
|
|
13
|
-
/** Quality of the host in the establishment */
|
|
14
|
-
qualite: string;
|
|
15
|
-
/** Division of the host in the establishment */
|
|
16
|
-
division: string;
|
|
17
|
-
/** Price of a meal in cent */
|
|
18
|
-
prixDej: number;
|
|
19
|
-
type: number;
|
|
20
|
-
nbMulti: number;
|
|
21
|
-
/** If the host has the right to pay */
|
|
22
|
-
droitPaiement: boolean;
|
|
23
|
-
/** If the host has the right to book a meal */
|
|
24
|
-
droitReservation: boolean;
|
|
25
|
-
/** If the host has the right to access to the cafeteria */
|
|
26
|
-
droitCafeteria: boolean;
|
|
27
|
-
/** Last Synchronisation to Turboself */
|
|
28
|
-
dateDernSynchro: string;
|
|
29
|
-
/** If the host account is disabled */
|
|
30
|
-
desactive: boolean;
|
|
31
|
-
/** If the password is private (wtf?) */
|
|
32
|
-
mdpPrive: boolean;
|
|
33
|
-
/** If the host has the right to book a meal even if its balance is insufficient */
|
|
34
|
-
autoriseReservSoldeIns: boolean;
|
|
35
|
-
profilForfaitModule: number;
|
|
36
|
-
/** QRCode */
|
|
37
|
-
carteCodee: number | null;
|
|
38
|
-
}
|
package/dist/interfaces/Host.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSG9zdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL2xpYi9pbnRlcmZhY2VzL0hvc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
package/dist/parser/Balance.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export declare class Balance {
|
|
2
|
-
token: string;
|
|
3
|
-
hoteId: number;
|
|
4
|
-
/** Account balance in cents */
|
|
5
|
-
amount: number;
|
|
6
|
-
/** Estimated account balance in cents after books */
|
|
7
|
-
estimatedAmount: number;
|
|
8
|
-
/** Estimated account balance calculation date */
|
|
9
|
-
estimatedAt: Date;
|
|
10
|
-
constructor(token: string, hoteId: number,
|
|
11
|
-
/** Account balance in cents */
|
|
12
|
-
amount: number,
|
|
13
|
-
/** Estimated account balance in cents after books */
|
|
14
|
-
estimatedAmount: number,
|
|
15
|
-
/** Estimated account balance calculation date */
|
|
16
|
-
estimatedAt: Date);
|
|
17
|
-
}
|
package/dist/parser/Balance.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Balance = void 0;
|
|
4
|
-
class Balance {
|
|
5
|
-
constructor(token, hoteId,
|
|
6
|
-
/** Account balance in cents */
|
|
7
|
-
amount,
|
|
8
|
-
/** Estimated account balance in cents after books */
|
|
9
|
-
estimatedAmount,
|
|
10
|
-
/** Estimated account balance calculation date */
|
|
11
|
-
estimatedAt) {
|
|
12
|
-
this.token = token;
|
|
13
|
-
this.hoteId = hoteId;
|
|
14
|
-
this.amount = amount;
|
|
15
|
-
this.estimatedAmount = estimatedAmount;
|
|
16
|
-
this.estimatedAt = estimatedAt;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
exports.Balance = Balance;
|
|
20
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQmFsYW5jZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL2xpYi9wYXJzZXIvQmFsYW5jZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxNQUFhLE9BQU87SUFDbEIsWUFDUyxLQUFhLEVBQ2IsTUFBYztJQUNyQiwrQkFBK0I7SUFDeEIsTUFBYztJQUNyQixxREFBcUQ7SUFDOUMsZUFBdUI7SUFDOUIsaURBQWlEO0lBQzFDLFdBQWlCO1FBUGpCLFVBQUssR0FBTCxLQUFLLENBQVE7UUFDYixXQUFNLEdBQU4sTUFBTSxDQUFRO1FBRWQsV0FBTSxHQUFOLE1BQU0sQ0FBUTtRQUVkLG9CQUFlLEdBQWYsZUFBZSxDQUFRO1FBRXZCLGdCQUFXLEdBQVgsV0FBVyxDQUFNO0lBRTFCLENBQUM7Q0FDRjtBQVpELDBCQVlDIn0=
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { Host } from "./Host";
|
|
2
|
-
export declare class BookedMeal {
|
|
3
|
-
id: string;
|
|
4
|
-
/** If the meal is booked ? */
|
|
5
|
-
booked: boolean;
|
|
6
|
-
/** If the meal is booked from the kiosk */
|
|
7
|
-
kioskBooked: boolean;
|
|
8
|
-
/** If the meal is booked at the last synchronization */
|
|
9
|
-
bookedAtLastSynchronisation: boolean;
|
|
10
|
-
/** Id of the meal */
|
|
11
|
-
bookId: string;
|
|
12
|
-
/** Message of the meal */
|
|
13
|
-
message: string;
|
|
14
|
-
/** Host */
|
|
15
|
-
host: Host;
|
|
16
|
-
constructor(id: string,
|
|
17
|
-
/** If the meal is booked ? */
|
|
18
|
-
booked: boolean,
|
|
19
|
-
/** If the meal is booked from the kiosk */
|
|
20
|
-
kioskBooked: boolean,
|
|
21
|
-
/** If the meal is booked at the last synchronization */
|
|
22
|
-
bookedAtLastSynchronisation: boolean,
|
|
23
|
-
/** Id of the meal */
|
|
24
|
-
bookId: string,
|
|
25
|
-
/** Message of the meal */
|
|
26
|
-
message: string,
|
|
27
|
-
/** Host */
|
|
28
|
-
host: Host);
|
|
29
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BookedMeal = void 0;
|
|
4
|
-
class BookedMeal {
|
|
5
|
-
constructor(id,
|
|
6
|
-
/** If the meal is booked ? */
|
|
7
|
-
booked,
|
|
8
|
-
/** If the meal is booked from the kiosk */
|
|
9
|
-
kioskBooked,
|
|
10
|
-
/** If the meal is booked at the last synchronization */
|
|
11
|
-
bookedAtLastSynchronisation,
|
|
12
|
-
/** Id of the meal */
|
|
13
|
-
bookId,
|
|
14
|
-
/** Message of the meal */
|
|
15
|
-
message,
|
|
16
|
-
/** Host */
|
|
17
|
-
host) {
|
|
18
|
-
this.id = id;
|
|
19
|
-
this.booked = booked;
|
|
20
|
-
this.kioskBooked = kioskBooked;
|
|
21
|
-
this.bookedAtLastSynchronisation = bookedAtLastSynchronisation;
|
|
22
|
-
this.bookId = bookId;
|
|
23
|
-
this.message = message;
|
|
24
|
-
this.host = host;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
exports.BookedMeal = BookedMeal;
|
|
28
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQm9va2VkTWVhbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL2xpYi9wYXJzZXIvQm9va2VkTWVhbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFFQSxNQUFhLFVBQVU7SUFDckIsWUFDUyxFQUFVO0lBQ2pCLDhCQUE4QjtJQUN2QixNQUFlO0lBQ3RCLDJDQUEyQztJQUNwQyxXQUFvQjtJQUMzQix3REFBd0Q7SUFDakQsMkJBQW9DO0lBQzNDLHFCQUFxQjtJQUNkLE1BQWM7SUFDckIsMEJBQTBCO0lBQ25CLE9BQWU7SUFDdEIsV0FBVztJQUNKLElBQVU7UUFaVixPQUFFLEdBQUYsRUFBRSxDQUFRO1FBRVYsV0FBTSxHQUFOLE1BQU0sQ0FBUztRQUVmLGdCQUFXLEdBQVgsV0FBVyxDQUFTO1FBRXBCLGdDQUEyQixHQUEzQiwyQkFBMkIsQ0FBUztRQUVwQyxXQUFNLEdBQU4sTUFBTSxDQUFRO1FBRWQsWUFBTyxHQUFQLE9BQU8sQ0FBUTtRQUVmLFNBQUksR0FBSixJQUFJLENBQU07SUFHbkIsQ0FBQztDQUNGO0FBbEJELGdDQWtCQyJ9
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { BookedMeal } from "./BookedMeal";
|
|
2
|
-
export declare class BookingDay {
|
|
3
|
-
token: string;
|
|
4
|
-
hoteId: number;
|
|
5
|
-
/** ID for book a Meal */
|
|
6
|
-
bookId: string;
|
|
7
|
-
/** If this day is booked */
|
|
8
|
-
booked: boolean;
|
|
9
|
-
/** If this day is booked at the last synchronization */
|
|
10
|
-
bookedAtLastSynchronization: boolean;
|
|
11
|
-
/** If the host has the right to book this meal */
|
|
12
|
-
canBook: boolean;
|
|
13
|
-
message: string;
|
|
14
|
-
/** Date of the day */
|
|
15
|
-
date: Date;
|
|
16
|
-
constructor(token: string, hoteId: number,
|
|
17
|
-
/** ID for book a Meal */
|
|
18
|
-
bookId: string,
|
|
19
|
-
/** If this day is booked */
|
|
20
|
-
booked: boolean,
|
|
21
|
-
/** If this day is booked at the last synchronization */
|
|
22
|
-
bookedAtLastSynchronization: boolean,
|
|
23
|
-
/** If the host has the right to book this meal */
|
|
24
|
-
canBook: boolean, message: string,
|
|
25
|
-
/** Date of the day */
|
|
26
|
-
date: Date);
|
|
27
|
-
/** This method is used to book this day.
|
|
28
|
-
* @param book If the meal should be booked.
|
|
29
|
-
* @param bookEvening If the meal should be booked evening.
|
|
30
|
-
*/
|
|
31
|
-
book(book?: boolean, bookEvening?: boolean): Promise<BookedMeal>;
|
|
32
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BookingDay = void 0;
|
|
4
|
-
const bookDay_1 = require("../api/bookDay");
|
|
5
|
-
class BookingDay {
|
|
6
|
-
constructor(token, hoteId,
|
|
7
|
-
/** ID for book a Meal */
|
|
8
|
-
bookId,
|
|
9
|
-
/** If this day is booked */
|
|
10
|
-
booked,
|
|
11
|
-
/** If this day is booked at the last synchronization */
|
|
12
|
-
bookedAtLastSynchronization,
|
|
13
|
-
/** If the host has the right to book this meal */
|
|
14
|
-
canBook, message,
|
|
15
|
-
/** Date of the day */
|
|
16
|
-
date) {
|
|
17
|
-
this.token = token;
|
|
18
|
-
this.hoteId = hoteId;
|
|
19
|
-
this.bookId = bookId;
|
|
20
|
-
this.booked = booked;
|
|
21
|
-
this.bookedAtLastSynchronization = bookedAtLastSynchronization;
|
|
22
|
-
this.canBook = canBook;
|
|
23
|
-
this.message = message;
|
|
24
|
-
this.date = date;
|
|
25
|
-
}
|
|
26
|
-
/** This method is used to book this day.
|
|
27
|
-
* @param book If the meal should be booked.
|
|
28
|
-
* @param bookEvening If the meal should be booked evening.
|
|
29
|
-
*/
|
|
30
|
-
async book(book, bookEvening) {
|
|
31
|
-
if (!book)
|
|
32
|
-
book = !this.booked;
|
|
33
|
-
if (!bookEvening)
|
|
34
|
-
bookEvening = false;
|
|
35
|
-
return await (0, bookDay_1.bookMeal)(this.token, this.hoteId, this.bookId, book === false ? 0 : 1, book === false ? 0 : 1, ((this.date.getDay()) - 1));
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
exports.BookingDay = BookingDay;
|
|
39
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQm9va2luZ0RheS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL2xpYi9wYXJzZXIvQm9va2luZ0RheS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSw0Q0FBMEM7QUFHMUMsTUFBYSxVQUFVO0lBQ3JCLFlBQ1MsS0FBYSxFQUNiLE1BQWM7SUFDckIseUJBQXlCO0lBQ2xCLE1BQWM7SUFDckIsNEJBQTRCO0lBQ3JCLE1BQWU7SUFDdEIsd0RBQXdEO0lBQ2pELDJCQUFvQztJQUMzQyxrREFBa0Q7SUFDM0MsT0FBZ0IsRUFDaEIsT0FBZTtJQUN0QixzQkFBc0I7SUFDZixJQUFVO1FBWlYsVUFBSyxHQUFMLEtBQUssQ0FBUTtRQUNiLFdBQU0sR0FBTixNQUFNLENBQVE7UUFFZCxXQUFNLEdBQU4sTUFBTSxDQUFRO1FBRWQsV0FBTSxHQUFOLE1BQU0sQ0FBUztRQUVmLGdDQUEyQixHQUEzQiwyQkFBMkIsQ0FBUztRQUVwQyxZQUFPLEdBQVAsT0FBTyxDQUFTO1FBQ2hCLFlBQU8sR0FBUCxPQUFPLENBQVE7UUFFZixTQUFJLEdBQUosSUFBSSxDQUFNO0lBR25CLENBQUM7SUFFRDs7O1FBR0k7SUFDRyxLQUFLLENBQUMsSUFBSSxDQUFDLElBQWMsRUFBRSxXQUFxQjtRQUNyRCxJQUFJLENBQUMsSUFBSTtZQUFFLElBQUksR0FBRyxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUM7UUFDL0IsSUFBSSxDQUFDLFdBQVc7WUFBRSxXQUFXLEdBQUcsS0FBSyxDQUFDO1FBQ3RDLE9BQU8sTUFBTSxJQUFBLGtCQUFRLEVBQUMsSUFBSSxDQUFDLEtBQUssRUFDOUIsSUFBSSxDQUFDLE1BQU0sRUFDWCxJQUFJLENBQUMsTUFBTSxFQUNYLElBQUksS0FBSyxLQUFLLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQSxDQUFDLENBQUMsQ0FBQyxFQUNyQixJQUFJLEtBQUssS0FBSyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUEsQ0FBQyxDQUFDLENBQUMsRUFDckIsQ0FBQyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsTUFBTSxFQUFFLENBQUMsR0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDO0lBQzlCLENBQUM7Q0FDRjtBQWpDRCxnQ0FpQ0MifQ==
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BookingPrice = void 0;
|
|
4
|
-
class BookingPrice {
|
|
5
|
-
constructor(id,
|
|
6
|
-
/** ID of the terminal */
|
|
7
|
-
terminalId,
|
|
8
|
-
/** Meal Price */
|
|
9
|
-
price) {
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
exports.BookingPrice = BookingPrice;
|
|
13
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQm9va2luZ1ByaWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vbGliL3BhcnNlci9Cb29raW5nUHJpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsTUFBYSxZQUFZO0lBQ3ZCLFlBQ0UsRUFBVTtJQUNWLHlCQUF5QjtJQUN6QixVQUFrQjtJQUNsQixpQkFBaUI7SUFDakIsS0FBYTtJQUdmLENBQUM7Q0FDRjtBQVZELG9DQVVDIn0=
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { BookingDay } from "./BookingDay";
|
|
2
|
-
import { BookingPrice } from "./BookingPrice";
|
|
3
|
-
export declare class BookingTerminal {
|
|
4
|
-
terminalId: number;
|
|
5
|
-
/** ID associated to book with this terminal */
|
|
6
|
-
bookId: string;
|
|
7
|
-
/** Booking Year */
|
|
8
|
-
bookYear: number;
|
|
9
|
-
/** Booking Weak Number */
|
|
10
|
-
bookWeak: number;
|
|
11
|
-
/** Name of the terminal */
|
|
12
|
-
name: string;
|
|
13
|
-
dayAuthorized: number;
|
|
14
|
-
usage: number;
|
|
15
|
-
/** Prices of the terminal */
|
|
16
|
-
prices: Array<BookingPrice>;
|
|
17
|
-
/** Days of the terminal */
|
|
18
|
-
days: Array<BookingDay>;
|
|
19
|
-
constructor(terminalId: number,
|
|
20
|
-
/** ID associated to book with this terminal */
|
|
21
|
-
bookId: string,
|
|
22
|
-
/** Booking Year */
|
|
23
|
-
bookYear: number,
|
|
24
|
-
/** Booking Weak Number */
|
|
25
|
-
bookWeak: number,
|
|
26
|
-
/** Name of the terminal */
|
|
27
|
-
name: string, dayAuthorized: number, usage: number,
|
|
28
|
-
/** Prices of the terminal */
|
|
29
|
-
prices: Array<BookingPrice>,
|
|
30
|
-
/** Days of the terminal */
|
|
31
|
-
days: Array<BookingDay>);
|
|
32
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BookingTerminal = void 0;
|
|
4
|
-
class BookingTerminal {
|
|
5
|
-
constructor(terminalId,
|
|
6
|
-
/** ID associated to book with this terminal */
|
|
7
|
-
bookId,
|
|
8
|
-
/** Booking Year */
|
|
9
|
-
bookYear,
|
|
10
|
-
/** Booking Weak Number */
|
|
11
|
-
bookWeak,
|
|
12
|
-
/** Name of the terminal */
|
|
13
|
-
name, dayAuthorized, usage,
|
|
14
|
-
/** Prices of the terminal */
|
|
15
|
-
prices,
|
|
16
|
-
/** Days of the terminal */
|
|
17
|
-
days) {
|
|
18
|
-
this.terminalId = terminalId;
|
|
19
|
-
this.bookId = bookId;
|
|
20
|
-
this.bookYear = bookYear;
|
|
21
|
-
this.bookWeak = bookWeak;
|
|
22
|
-
this.name = name;
|
|
23
|
-
this.dayAuthorized = dayAuthorized;
|
|
24
|
-
this.usage = usage;
|
|
25
|
-
this.prices = prices;
|
|
26
|
-
this.days = days;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
exports.BookingTerminal = BookingTerminal;
|
|
30
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQm9va2luZ1Rlcm1pbmFsLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vbGliL3BhcnNlci9Cb29raW5nVGVybWluYWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBR0EsTUFBYSxlQUFlO0lBQzFCLFlBQ1MsVUFBa0I7SUFDekIsK0NBQStDO0lBQ3hDLE1BQWM7SUFDckIsbUJBQW1CO0lBQ1osUUFBZ0I7SUFDdkIsMEJBQTBCO0lBQ25CLFFBQWdCO0lBQ3ZCLDJCQUEyQjtJQUNwQixJQUFZLEVBQ1osYUFBcUIsRUFDckIsS0FBYTtJQUNwQiw2QkFBNkI7SUFDdEIsTUFBMkI7SUFDbEMsMkJBQTJCO0lBQ3BCLElBQXVCO1FBZHZCLGVBQVUsR0FBVixVQUFVLENBQVE7UUFFbEIsV0FBTSxHQUFOLE1BQU0sQ0FBUTtRQUVkLGFBQVEsR0FBUixRQUFRLENBQVE7UUFFaEIsYUFBUSxHQUFSLFFBQVEsQ0FBUTtRQUVoQixTQUFJLEdBQUosSUFBSSxDQUFRO1FBQ1osa0JBQWEsR0FBYixhQUFhLENBQVE7UUFDckIsVUFBSyxHQUFMLEtBQUssQ0FBUTtRQUViLFdBQU0sR0FBTixNQUFNLENBQXFCO1FBRTNCLFNBQUksR0FBSixJQUFJLENBQW1CO0lBR2hDLENBQUM7Q0FDRjtBQXBCRCwwQ0FvQkMifQ==
|