@justins-home/api-services 1.1.3 → 1.1.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/.turbo/turbo-build.log +5 -5
- package/CHANGELOG.md +14 -0
- package/dist/index.js +29 -0
- package/dist/index.mjs +27 -0
- package/package.json +2 -2
- package/src/generated/booking.ts +26 -0
- package/src/generated/landlord.ts +10 -0
- package/src/helpers/authTokenInit.ts +1 -0
- package/src/index.ts +2 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @justins-home/api-services@1.1.
|
|
2
|
+
> @justins-home/api-services@1.1.5 build /home/runner/work/justins-home-platform-ui/justins-home-platform-ui/packages/api-services
|
|
3
3
|
> tsup src/index.ts --format esm,cjs
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
[34mCLI[39m Target: node16
|
|
8
8
|
[34mESM[39m Build start
|
|
9
9
|
[34mCJS[39m Build start
|
|
10
|
-
[32mCJS[39m [1mdist/index.js [22m[
|
|
11
|
-
[32mCJS[39m ⚡️ Build success in
|
|
12
|
-
[32mESM[39m [1mdist/index.mjs [22m[
|
|
13
|
-
[32mESM[39m ⚡️ Build success in
|
|
10
|
+
[32mCJS[39m [1mdist/index.js [22m[32m26.89 KB[39m
|
|
11
|
+
[32mCJS[39m ⚡️ Build success in 74ms
|
|
12
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m25.23 KB[39m
|
|
13
|
+
[32mESM[39m ⚡️ Build success in 75ms
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @justins-home/api-services
|
|
2
2
|
|
|
3
|
+
## 1.1.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- created a setup auth handler for handling token
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @justins-home/http-client@1.0.3
|
|
10
|
+
|
|
11
|
+
## 1.1.4
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- add new endpoint for landlord basic login
|
|
16
|
+
|
|
3
17
|
## 1.1.3
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -25,6 +25,7 @@ __export(index_exports, {
|
|
|
25
25
|
api: () => api,
|
|
26
26
|
appointment: () => appointment,
|
|
27
27
|
auth: () => auth,
|
|
28
|
+
booking: () => booking,
|
|
28
29
|
conversations: () => conversations,
|
|
29
30
|
customer: () => customer,
|
|
30
31
|
feature: () => feature,
|
|
@@ -37,6 +38,7 @@ __export(index_exports, {
|
|
|
37
38
|
notification: () => notification,
|
|
38
39
|
plan: () => plan,
|
|
39
40
|
review: () => review,
|
|
41
|
+
setupAuth: () => import_http_client2.initApiToken,
|
|
40
42
|
tenancy: () => tenancy,
|
|
41
43
|
tenant: () => tenant,
|
|
42
44
|
userverification: () => userverification,
|
|
@@ -96,6 +98,9 @@ var api = {
|
|
|
96
98
|
}
|
|
97
99
|
};
|
|
98
100
|
|
|
101
|
+
// src/helpers/authTokenInit.ts
|
|
102
|
+
var import_http_client2 = require("@justins-home/http-client");
|
|
103
|
+
|
|
99
104
|
// src/generated/admin.ts
|
|
100
105
|
var admin = {
|
|
101
106
|
new: (payload) => {
|
|
@@ -321,6 +326,22 @@ var auth = {
|
|
|
321
326
|
}
|
|
322
327
|
};
|
|
323
328
|
|
|
329
|
+
// src/generated/booking.ts
|
|
330
|
+
var booking = {
|
|
331
|
+
create: (payload) => {
|
|
332
|
+
return api.post("createBooking", "/api/v1/public/booking/create", payload);
|
|
333
|
+
},
|
|
334
|
+
confirm: (params) => {
|
|
335
|
+
return api.post("confirmBooking", `/api/v1/public/booking/${params.booking_id}/confirm`);
|
|
336
|
+
},
|
|
337
|
+
cancel: (params) => {
|
|
338
|
+
return api.post("cancelBooking", `/api/v1/public/booking/${params.booking_id}/cancel`);
|
|
339
|
+
},
|
|
340
|
+
get: (params) => {
|
|
341
|
+
return api.get("getBooking", `/api/v1/public/booking/fetch-one/${params.booking_id}`);
|
|
342
|
+
}
|
|
343
|
+
};
|
|
344
|
+
|
|
324
345
|
// src/generated/agent.ts
|
|
325
346
|
var agent = {
|
|
326
347
|
getApiV1PortalAgentTest: () => {
|
|
@@ -405,6 +426,9 @@ var landlord = {
|
|
|
405
426
|
new: (payload) => {
|
|
406
427
|
return api.post("newLandlord", "/api/v1/portal/landlord/create-landlord", payload);
|
|
407
428
|
},
|
|
429
|
+
basicLogin: (payload) => {
|
|
430
|
+
return api.post("basicLoginLandlord", "/api/v1/portal/landlord/login", payload);
|
|
431
|
+
},
|
|
408
432
|
createListingDraft: (payload) => {
|
|
409
433
|
return api.post("createListingDraft", "/api/v1/portal/landlord/listing", payload);
|
|
410
434
|
},
|
|
@@ -426,6 +450,9 @@ var landlord = {
|
|
|
426
450
|
saveTenancyDetails: (params, payload) => {
|
|
427
451
|
return api.post("saveTenancyDetails", `/api/v1/portal/landlord/listing/${params.listing_uid}/tenancy-details`, payload);
|
|
428
452
|
},
|
|
453
|
+
saveShortLetDetails: (params, payload) => {
|
|
454
|
+
return api.post("saveShortLetDetails", `/api/v1/portal/landlord/listing/${params.listing_uid}/shortlet-details`, payload);
|
|
455
|
+
},
|
|
429
456
|
saveListingFeatures: (params, payload) => {
|
|
430
457
|
return api.post("saveListingFeatures", `/api/v1/portal/landlord/listing/${params.listing_uid}/features`, payload);
|
|
431
458
|
},
|
|
@@ -639,6 +666,7 @@ var wishlist = {
|
|
|
639
666
|
api,
|
|
640
667
|
appointment,
|
|
641
668
|
auth,
|
|
669
|
+
booking,
|
|
642
670
|
conversations,
|
|
643
671
|
customer,
|
|
644
672
|
feature,
|
|
@@ -651,6 +679,7 @@ var wishlist = {
|
|
|
651
679
|
notification,
|
|
652
680
|
plan,
|
|
653
681
|
review,
|
|
682
|
+
setupAuth,
|
|
654
683
|
tenancy,
|
|
655
684
|
tenant,
|
|
656
685
|
userverification,
|
package/dist/index.mjs
CHANGED
|
@@ -50,6 +50,9 @@ var api = {
|
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
52
|
|
|
53
|
+
// src/helpers/authTokenInit.ts
|
|
54
|
+
import { initApiToken } from "@justins-home/http-client";
|
|
55
|
+
|
|
53
56
|
// src/generated/admin.ts
|
|
54
57
|
var admin = {
|
|
55
58
|
new: (payload) => {
|
|
@@ -275,6 +278,22 @@ var auth = {
|
|
|
275
278
|
}
|
|
276
279
|
};
|
|
277
280
|
|
|
281
|
+
// src/generated/booking.ts
|
|
282
|
+
var booking = {
|
|
283
|
+
create: (payload) => {
|
|
284
|
+
return api.post("createBooking", "/api/v1/public/booking/create", payload);
|
|
285
|
+
},
|
|
286
|
+
confirm: (params) => {
|
|
287
|
+
return api.post("confirmBooking", `/api/v1/public/booking/${params.booking_id}/confirm`);
|
|
288
|
+
},
|
|
289
|
+
cancel: (params) => {
|
|
290
|
+
return api.post("cancelBooking", `/api/v1/public/booking/${params.booking_id}/cancel`);
|
|
291
|
+
},
|
|
292
|
+
get: (params) => {
|
|
293
|
+
return api.get("getBooking", `/api/v1/public/booking/fetch-one/${params.booking_id}`);
|
|
294
|
+
}
|
|
295
|
+
};
|
|
296
|
+
|
|
278
297
|
// src/generated/agent.ts
|
|
279
298
|
var agent = {
|
|
280
299
|
getApiV1PortalAgentTest: () => {
|
|
@@ -359,6 +378,9 @@ var landlord = {
|
|
|
359
378
|
new: (payload) => {
|
|
360
379
|
return api.post("newLandlord", "/api/v1/portal/landlord/create-landlord", payload);
|
|
361
380
|
},
|
|
381
|
+
basicLogin: (payload) => {
|
|
382
|
+
return api.post("basicLoginLandlord", "/api/v1/portal/landlord/login", payload);
|
|
383
|
+
},
|
|
362
384
|
createListingDraft: (payload) => {
|
|
363
385
|
return api.post("createListingDraft", "/api/v1/portal/landlord/listing", payload);
|
|
364
386
|
},
|
|
@@ -380,6 +402,9 @@ var landlord = {
|
|
|
380
402
|
saveTenancyDetails: (params, payload) => {
|
|
381
403
|
return api.post("saveTenancyDetails", `/api/v1/portal/landlord/listing/${params.listing_uid}/tenancy-details`, payload);
|
|
382
404
|
},
|
|
405
|
+
saveShortLetDetails: (params, payload) => {
|
|
406
|
+
return api.post("saveShortLetDetails", `/api/v1/portal/landlord/listing/${params.listing_uid}/shortlet-details`, payload);
|
|
407
|
+
},
|
|
383
408
|
saveListingFeatures: (params, payload) => {
|
|
384
409
|
return api.post("saveListingFeatures", `/api/v1/portal/landlord/listing/${params.listing_uid}/features`, payload);
|
|
385
410
|
},
|
|
@@ -592,6 +617,7 @@ export {
|
|
|
592
617
|
api,
|
|
593
618
|
appointment,
|
|
594
619
|
auth,
|
|
620
|
+
booking,
|
|
595
621
|
conversations,
|
|
596
622
|
customer,
|
|
597
623
|
feature,
|
|
@@ -604,6 +630,7 @@ export {
|
|
|
604
630
|
notification,
|
|
605
631
|
plan,
|
|
606
632
|
review,
|
|
633
|
+
initApiToken as setupAuth,
|
|
607
634
|
tenancy,
|
|
608
635
|
tenant,
|
|
609
636
|
userverification,
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@justins-home/api-services",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@justins-home/http-client": "1.0.
|
|
7
|
+
"@justins-home/http-client": "1.0.3",
|
|
8
8
|
"@justins-home/types": "1.0.0"
|
|
9
9
|
},
|
|
10
10
|
"publishConfig": {
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
|
|
2
|
+
import { api } from "../api-client";
|
|
3
|
+
import type { ApiRequest, ApiPathParams, Expand } from "../types/openapi";
|
|
4
|
+
|
|
5
|
+
export const booking = {
|
|
6
|
+
|
|
7
|
+
create: (payload: ApiRequest<'createBooking'>) => {
|
|
8
|
+
return api.post('createBooking', "/api/v1/public/booking/create", payload);
|
|
9
|
+
}
|
|
10
|
+
,
|
|
11
|
+
|
|
12
|
+
confirm: (params: ApiPathParams<'confirmBooking'>) => {
|
|
13
|
+
return api.post('confirmBooking', `/api/v1/public/booking/${params.booking_id}/confirm`);
|
|
14
|
+
}
|
|
15
|
+
,
|
|
16
|
+
|
|
17
|
+
cancel: (params: ApiPathParams<'cancelBooking'>) => {
|
|
18
|
+
return api.post('cancelBooking', `/api/v1/public/booking/${params.booking_id}/cancel`);
|
|
19
|
+
}
|
|
20
|
+
,
|
|
21
|
+
|
|
22
|
+
get: (params: ApiPathParams<'getBooking'>) => {
|
|
23
|
+
return api.get('getBooking', `/api/v1/public/booking/fetch-one/${params.booking_id}`);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
};
|
|
@@ -9,6 +9,11 @@ export const landlord = {
|
|
|
9
9
|
}
|
|
10
10
|
,
|
|
11
11
|
|
|
12
|
+
basicLogin: (payload: ApiRequest<'basicLoginLandlord'>) => {
|
|
13
|
+
return api.post('basicLoginLandlord', "/api/v1/portal/landlord/login", payload);
|
|
14
|
+
}
|
|
15
|
+
,
|
|
16
|
+
|
|
12
17
|
createListingDraft: (payload: ApiRequest<'createListingDraft'>) => {
|
|
13
18
|
return api.post('createListingDraft', "/api/v1/portal/landlord/listing", payload);
|
|
14
19
|
}
|
|
@@ -44,6 +49,11 @@ export const landlord = {
|
|
|
44
49
|
}
|
|
45
50
|
,
|
|
46
51
|
|
|
52
|
+
saveShortLetDetails: (params: ApiPathParams<'saveShortLetDetails'>, payload: ApiRequest<'saveShortLetDetails'>) => {
|
|
53
|
+
return api.post('saveShortLetDetails', `/api/v1/portal/landlord/listing/${params.listing_uid}/shortlet-details`, payload);
|
|
54
|
+
}
|
|
55
|
+
,
|
|
56
|
+
|
|
47
57
|
saveListingFeatures: (params: ApiPathParams<'saveListingFeatures'>, payload: ApiRequest<'saveListingFeatures'>) => {
|
|
48
58
|
return api.post('saveListingFeatures', `/api/v1/portal/landlord/listing/${params.listing_uid}/features`, payload);
|
|
49
59
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { initApiToken as setupAuth } from '@justins-home/http-client';
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
/**
|
|
3
2
|
* Core API utilities
|
|
4
3
|
*/
|
|
@@ -9,6 +8,7 @@ export * from './api-client';
|
|
|
9
8
|
*/
|
|
10
9
|
export * from './types/openapi';
|
|
11
10
|
|
|
11
|
+
export * from './helpers/authTokenInit';
|
|
12
12
|
/**
|
|
13
13
|
* Auto-generated domain services
|
|
14
14
|
* (Do not edit manually)
|
|
@@ -16,6 +16,7 @@ export * from './types/openapi';
|
|
|
16
16
|
export * from './generated/admin';
|
|
17
17
|
export * from './generated/appointment';
|
|
18
18
|
export * from './generated/auth';
|
|
19
|
+
export * from './generated/booking';
|
|
19
20
|
export * from './generated/agent';
|
|
20
21
|
export * from './generated/tenant';
|
|
21
22
|
export * from './generated/customer';
|