@kiminix/tp-client 1.28.0 → 1.30.0
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/README
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
## local dev & test
|
|
10
10
|
- run `npm build`
|
|
11
|
-
- then in the project you want to use this package run
|
|
11
|
+
- then in the project you want to use this package run
|
|
12
|
+
`npm i /Users/kamoun/workspace/tayara.promo/webapps/tp-client`
|
|
12
13
|
|
|
13
14
|
|
|
@@ -43,4 +43,11 @@ export declare class ReservationsAdminAPIs {
|
|
|
43
43
|
child?: number;
|
|
44
44
|
}[];
|
|
45
45
|
}): Promise<Either<Error, void>>;
|
|
46
|
+
static getPagePrivate(props: {
|
|
47
|
+
token?: string;
|
|
48
|
+
page: number;
|
|
49
|
+
size: number;
|
|
50
|
+
status?: ReservationStatus;
|
|
51
|
+
direction?: TimelineDirection;
|
|
52
|
+
}): Promise<Reservation[]>;
|
|
46
53
|
}
|
|
@@ -230,6 +230,35 @@ var ReservationsAdminAPIs = /** @class */ (function () {
|
|
|
230
230
|
});
|
|
231
231
|
});
|
|
232
232
|
};
|
|
233
|
+
// API for private admins
|
|
234
|
+
ReservationsAdminAPIs.getPagePrivate = function (props) {
|
|
235
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
236
|
+
return __generator(this, function (_a) {
|
|
237
|
+
return [2 /*return*/, RequestUtils.send(function () {
|
|
238
|
+
var queryParams = [
|
|
239
|
+
"page=".concat(props.page),
|
|
240
|
+
"size=".concat(props.size),
|
|
241
|
+
props.direction ? "direction=".concat(props.direction) : undefined,
|
|
242
|
+
props.status ? "status=".concat(props.status) : undefined
|
|
243
|
+
]
|
|
244
|
+
.filter(function (value) { return value; })
|
|
245
|
+
.join("&");
|
|
246
|
+
return axios.get(base + "/reservations/private?".concat(queryParams), {
|
|
247
|
+
headers: {
|
|
248
|
+
'Authorization': "".concat(props.token)
|
|
249
|
+
}
|
|
250
|
+
})
|
|
251
|
+
.then(function (response) {
|
|
252
|
+
var result = response.data;
|
|
253
|
+
for (var i = 0; i < result.length; i++) {
|
|
254
|
+
result[i].deal = result[i].deal ? parseReservationDeal(result[i].deal) : undefined;
|
|
255
|
+
}
|
|
256
|
+
return result;
|
|
257
|
+
});
|
|
258
|
+
})];
|
|
259
|
+
});
|
|
260
|
+
});
|
|
261
|
+
};
|
|
233
262
|
return ReservationsAdminAPIs;
|
|
234
263
|
}());
|
|
235
264
|
export { ReservationsAdminAPIs };
|
|
@@ -8,11 +8,12 @@ export interface BusinessOfReservation {
|
|
|
8
8
|
address: string;
|
|
9
9
|
}
|
|
10
10
|
export interface User {
|
|
11
|
-
id
|
|
12
|
-
firstname
|
|
13
|
-
lastname
|
|
14
|
-
phone
|
|
15
|
-
|
|
11
|
+
id: string | undefined;
|
|
12
|
+
firstname: string | undefined;
|
|
13
|
+
lastname: string | undefined;
|
|
14
|
+
phone: string | undefined;
|
|
15
|
+
email: string | undefined;
|
|
16
|
+
verifiedPhone: boolean;
|
|
16
17
|
}
|
|
17
18
|
export interface GuestDetails {
|
|
18
19
|
number: number;
|