@justins-home/api-services 1.1.2 → 1.1.4

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.
@@ -1,6 +1,5 @@
1
-  WARN  Issue while reading "/home/runner/work/justins-home-platform-ui/justins-home-platform-ui/.npmrc". Failed to replace env in config: ${NODE_AUTH_TOKEN}
2
1
 
3
- > @justins-home/api-services@1.1.2 build /home/runner/work/justins-home-platform-ui/justins-home-platform-ui/packages/api-services
2
+ > @justins-home/api-services@1.1.4 build /home/runner/work/justins-home-platform-ui/justins-home-platform-ui/packages/api-services
4
3
  > tsup src/index.ts --format esm,cjs
5
4
 
6
5
  CLI Building entry: src/index.ts
@@ -8,7 +7,7 @@
8
7
  CLI Target: node16
9
8
  ESM Build start
10
9
  CJS Build start
11
- CJS dist/index.js 25.90 KB
12
- CJS ⚡️ Build success in 45ms
13
- ESM dist/index.mjs 24.30 KB
14
- ESM ⚡️ Build success in 45ms
10
+ CJS dist/index.js 26.73 KB
11
+ CJS ⚡️ Build success in 68ms
12
+ ESM dist/index.mjs 25.11 KB
13
+ ESM ⚡️ Build success in 69ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @justins-home/api-services
2
2
 
3
+ ## 1.1.4
4
+
5
+ ### Patch Changes
6
+
7
+ - add new endpoint for landlord basic login
8
+
9
+ ## 1.1.3
10
+
11
+ ### Patch Changes
12
+
13
+ - added more typing to TS scribe doc
14
+ - Updated dependencies
15
+ - @justins-home/http-client@1.0.2
16
+
3
17
  ## 1.1.2
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,
@@ -321,6 +322,22 @@ var auth = {
321
322
  }
322
323
  };
323
324
 
325
+ // src/generated/booking.ts
326
+ var booking = {
327
+ create: (payload) => {
328
+ return api.post("createBooking", "/api/v1/public/booking/create", payload);
329
+ },
330
+ confirm: (params) => {
331
+ return api.post("confirmBooking", `/api/v1/public/booking/${params.booking_id}/confirm`);
332
+ },
333
+ cancel: (params) => {
334
+ return api.post("cancelBooking", `/api/v1/public/booking/${params.booking_id}/cancel`);
335
+ },
336
+ get: (params) => {
337
+ return api.get("getBooking", `/api/v1/public/booking/fetch-one/${params.booking_id}`);
338
+ }
339
+ };
340
+
324
341
  // src/generated/agent.ts
325
342
  var agent = {
326
343
  getApiV1PortalAgentTest: () => {
@@ -405,6 +422,9 @@ var landlord = {
405
422
  new: (payload) => {
406
423
  return api.post("newLandlord", "/api/v1/portal/landlord/create-landlord", payload);
407
424
  },
425
+ basicLogin: (payload) => {
426
+ return api.post("basicLoginLandlord", "/api/v1/portal/landlord/login", payload);
427
+ },
408
428
  createListingDraft: (payload) => {
409
429
  return api.post("createListingDraft", "/api/v1/portal/landlord/listing", payload);
410
430
  },
@@ -426,6 +446,9 @@ var landlord = {
426
446
  saveTenancyDetails: (params, payload) => {
427
447
  return api.post("saveTenancyDetails", `/api/v1/portal/landlord/listing/${params.listing_uid}/tenancy-details`, payload);
428
448
  },
449
+ saveShortLetDetails: (params, payload) => {
450
+ return api.post("saveShortLetDetails", `/api/v1/portal/landlord/listing/${params.listing_uid}/shortlet-details`, payload);
451
+ },
429
452
  saveListingFeatures: (params, payload) => {
430
453
  return api.post("saveListingFeatures", `/api/v1/portal/landlord/listing/${params.listing_uid}/features`, payload);
431
454
  },
@@ -639,6 +662,7 @@ var wishlist = {
639
662
  api,
640
663
  appointment,
641
664
  auth,
665
+ booking,
642
666
  conversations,
643
667
  customer,
644
668
  feature,
package/dist/index.mjs CHANGED
@@ -275,6 +275,22 @@ var auth = {
275
275
  }
276
276
  };
277
277
 
278
+ // src/generated/booking.ts
279
+ var booking = {
280
+ create: (payload) => {
281
+ return api.post("createBooking", "/api/v1/public/booking/create", payload);
282
+ },
283
+ confirm: (params) => {
284
+ return api.post("confirmBooking", `/api/v1/public/booking/${params.booking_id}/confirm`);
285
+ },
286
+ cancel: (params) => {
287
+ return api.post("cancelBooking", `/api/v1/public/booking/${params.booking_id}/cancel`);
288
+ },
289
+ get: (params) => {
290
+ return api.get("getBooking", `/api/v1/public/booking/fetch-one/${params.booking_id}`);
291
+ }
292
+ };
293
+
278
294
  // src/generated/agent.ts
279
295
  var agent = {
280
296
  getApiV1PortalAgentTest: () => {
@@ -359,6 +375,9 @@ var landlord = {
359
375
  new: (payload) => {
360
376
  return api.post("newLandlord", "/api/v1/portal/landlord/create-landlord", payload);
361
377
  },
378
+ basicLogin: (payload) => {
379
+ return api.post("basicLoginLandlord", "/api/v1/portal/landlord/login", payload);
380
+ },
362
381
  createListingDraft: (payload) => {
363
382
  return api.post("createListingDraft", "/api/v1/portal/landlord/listing", payload);
364
383
  },
@@ -380,6 +399,9 @@ var landlord = {
380
399
  saveTenancyDetails: (params, payload) => {
381
400
  return api.post("saveTenancyDetails", `/api/v1/portal/landlord/listing/${params.listing_uid}/tenancy-details`, payload);
382
401
  },
402
+ saveShortLetDetails: (params, payload) => {
403
+ return api.post("saveShortLetDetails", `/api/v1/portal/landlord/listing/${params.listing_uid}/shortlet-details`, payload);
404
+ },
383
405
  saveListingFeatures: (params, payload) => {
384
406
  return api.post("saveListingFeatures", `/api/v1/portal/landlord/listing/${params.listing_uid}/features`, payload);
385
407
  },
@@ -592,6 +614,7 @@ export {
592
614
  api,
593
615
  appointment,
594
616
  auth,
617
+ booking,
595
618
  conversations,
596
619
  customer,
597
620
  feature,
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@justins-home/api-services",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "private": false,
5
5
  "main": "src/index.ts",
6
6
  "dependencies": {
7
- "@justins-home/http-client": "1.0.1",
7
+ "@justins-home/http-client": "1.0.2",
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
  }
package/src/index.ts CHANGED
@@ -1,3 +1,4 @@
1
+
1
2
  /**
2
3
  * Core API utilities
3
4
  */
@@ -15,6 +16,7 @@ export * from './types/openapi';
15
16
  export * from './generated/admin';
16
17
  export * from './generated/appointment';
17
18
  export * from './generated/auth';
19
+ export * from './generated/booking';
18
20
  export * from './generated/agent';
19
21
  export * from './generated/tenant';
20
22
  export * from './generated/customer';