@justins-home/api-services 1.1.7 → 1.1.8
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/dist/index.d.mts +1931 -0
- package/dist/index.d.ts +1931 -0
- package/dist/index.js +4 -3
- package/dist/index.mjs +3 -3
- package/package.json +10 -5
- package/.turbo/turbo-build.log +0 -13
- package/CHANGELOG.md +0 -97
- package/src/api-client.ts +0 -108
- package/src/generated/admin.ts +0 -311
- package/src/generated/agent.ts +0 -11
- package/src/generated/appointment.ts +0 -36
- package/src/generated/auth.ts +0 -26
- package/src/generated/booking.ts +0 -26
- package/src/generated/conversations.ts +0 -31
- package/src/generated/customer.ts +0 -31
- package/src/generated/feature.ts +0 -11
- package/src/generated/github.ts +0 -16
- package/src/generated/google.ts +0 -16
- package/src/generated/inspection.ts +0 -11
- package/src/generated/landlord.ts +0 -126
- package/src/generated/listings.ts +0 -21
- package/src/generated/maintenance.ts +0 -21
- package/src/generated/notification.ts +0 -31
- package/src/generated/plan.ts +0 -16
- package/src/generated/review.ts +0 -36
- package/src/generated/tenancy.ts +0 -61
- package/src/generated/tenant.ts +0 -31
- package/src/generated/userverification.ts +0 -26
- package/src/generated/wishlist.ts +0 -21
- package/src/helpers/authTokenInit.ts +0 -1
- package/src/index.ts +0 -39
- package/src/types/openapi.ts +0 -29
package/src/generated/booking.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { api } from "../api-client";
|
|
3
|
-
import type { ApiRequest, ApiPathParams, Expand } from "../types/openapi";
|
|
4
|
-
|
|
5
|
-
export const conversations = {
|
|
6
|
-
|
|
7
|
-
createConversation: (payload: ApiRequest<'createConversation'>) => {
|
|
8
|
-
return api.post('createConversation', "/api/v1/public/conversations/create", payload);
|
|
9
|
-
}
|
|
10
|
-
,
|
|
11
|
-
|
|
12
|
-
list: () => {
|
|
13
|
-
return api.get('listConversations', "/api/v1/public/conversations/fetch-all");
|
|
14
|
-
}
|
|
15
|
-
,
|
|
16
|
-
|
|
17
|
-
listConversationMessages: (params: ApiPathParams<'listConversationMessages'>) => {
|
|
18
|
-
return api.get('listConversationMessages', `/api/v1/public/conversations/${params.conversation_id}/messages`);
|
|
19
|
-
}
|
|
20
|
-
,
|
|
21
|
-
|
|
22
|
-
sendConversationMessage: (payload: ApiRequest<'sendConversationMessage'>) => {
|
|
23
|
-
return api.post('sendConversationMessage', "/api/v1/public/conversations/send-message", payload);
|
|
24
|
-
}
|
|
25
|
-
,
|
|
26
|
-
|
|
27
|
-
markConversationAsRead: (params: ApiPathParams<'markConversationAsRead'>) => {
|
|
28
|
-
return api.post('markConversationAsRead', `/api/v1/public/conversations/${params.conversation_id}/read-message`);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { api } from "../api-client";
|
|
3
|
-
import type { ApiRequest, ApiPathParams, Expand } from "../types/openapi";
|
|
4
|
-
|
|
5
|
-
export const customer = {
|
|
6
|
-
|
|
7
|
-
getApiV1PortalCustomerTest: () => {
|
|
8
|
-
return api.get('getApiV1PortalCustomerTest', "/api/v1/portal/customer/test");
|
|
9
|
-
}
|
|
10
|
-
,
|
|
11
|
-
|
|
12
|
-
postApiV1PortalCustomerCreate: (payload: ApiRequest<'postApiV1PortalCustomerCreate'>) => {
|
|
13
|
-
return api.post('postApiV1PortalCustomerCreate', "/api/v1/portal/customer/create", payload);
|
|
14
|
-
}
|
|
15
|
-
,
|
|
16
|
-
|
|
17
|
-
postApiV1PortalCustomerCreateWithGithub: () => {
|
|
18
|
-
return api.post('postApiV1PortalCustomerCreateWithGithub', "/api/v1/portal/customer/create-with-github");
|
|
19
|
-
}
|
|
20
|
-
,
|
|
21
|
-
|
|
22
|
-
postApiV1PortalCustomerSendOtp: () => {
|
|
23
|
-
return api.post('postApiV1PortalCustomerSendOtp', "/api/v1/portal/customer/send-otp");
|
|
24
|
-
}
|
|
25
|
-
,
|
|
26
|
-
|
|
27
|
-
postApiV1PortalCustomerVerifyOtp: (payload: ApiRequest<'postApiV1PortalCustomerVerifyOtp'>) => {
|
|
28
|
-
return api.post('postApiV1PortalCustomerVerifyOtp', "/api/v1/portal/customer/verify-otp", payload);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
};
|
package/src/generated/feature.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { api } from "../api-client";
|
|
3
|
-
import type { ApiRequest, ApiPathParams, Expand } from "../types/openapi";
|
|
4
|
-
|
|
5
|
-
export const feature = {
|
|
6
|
-
|
|
7
|
-
getFeatures: (query?: Expand<ApiRequest<'getFeatures'>>) => {
|
|
8
|
-
return api.get('getFeatures', "/api/v1/public/feature/fetch-all", query);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
};
|
package/src/generated/github.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { api } from "../api-client";
|
|
3
|
-
import type { ApiRequest, ApiPathParams, Expand } from "../types/openapi";
|
|
4
|
-
|
|
5
|
-
export const github = {
|
|
6
|
-
|
|
7
|
-
getApiV1SocialAuthGithubRedirect: () => {
|
|
8
|
-
return api.get('getApiV1SocialAuthGithubRedirect', "/api/v1/social-auth/github/redirect");
|
|
9
|
-
}
|
|
10
|
-
,
|
|
11
|
-
|
|
12
|
-
getApiV1SocialAuthGithubCallback: () => {
|
|
13
|
-
return api.get('getApiV1SocialAuthGithubCallback', "/api/v1/social-auth/github/callback");
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
};
|
package/src/generated/google.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { api } from "../api-client";
|
|
3
|
-
import type { ApiRequest, ApiPathParams, Expand } from "../types/openapi";
|
|
4
|
-
|
|
5
|
-
export const google = {
|
|
6
|
-
|
|
7
|
-
getApiV1SocialAuthGoogleRedirect: () => {
|
|
8
|
-
return api.get('getApiV1SocialAuthGoogleRedirect', "/api/v1/social-auth/google/redirect");
|
|
9
|
-
}
|
|
10
|
-
,
|
|
11
|
-
|
|
12
|
-
getApiV1SocialAuthGoogleCallback: () => {
|
|
13
|
-
return api.get('getApiV1SocialAuthGoogleCallback', "/api/v1/social-auth/google/callback");
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { api } from "../api-client";
|
|
3
|
-
import type { ApiRequest, ApiPathParams, Expand } from "../types/openapi";
|
|
4
|
-
|
|
5
|
-
export const inspection = {
|
|
6
|
-
|
|
7
|
-
listingHistory: (params: ApiPathParams<'listingHistoryInspection'>) => {
|
|
8
|
-
return api.get('listingHistoryInspection', `/api/v1/public/inspection/listing/${params.listing_uid}`);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
};
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { api } from "../api-client";
|
|
3
|
-
import type { ApiRequest, ApiPathParams, Expand } from "../types/openapi";
|
|
4
|
-
|
|
5
|
-
export const landlord = {
|
|
6
|
-
|
|
7
|
-
new: (payload: ApiRequest<'newLandlord'>) => {
|
|
8
|
-
return api.post('newLandlord', "/api/v1/portal/landlord/create-landlord", payload);
|
|
9
|
-
}
|
|
10
|
-
,
|
|
11
|
-
|
|
12
|
-
basicLogin: (payload: ApiRequest<'basicLoginLandlord'>) => {
|
|
13
|
-
return api.post('basicLoginLandlord', "/api/v1/portal/landlord/login", payload);
|
|
14
|
-
}
|
|
15
|
-
,
|
|
16
|
-
|
|
17
|
-
createListingDraft: (payload: ApiRequest<'createListingDraft'>) => {
|
|
18
|
-
return api.post('createListingDraft', "/api/v1/portal/landlord/listing", payload);
|
|
19
|
-
}
|
|
20
|
-
,
|
|
21
|
-
|
|
22
|
-
getDraftListings: () => {
|
|
23
|
-
return api.get('getDraftListings', "/api/v1/portal/landlord/listing/drafts");
|
|
24
|
-
}
|
|
25
|
-
,
|
|
26
|
-
|
|
27
|
-
getSubmittedListings: () => {
|
|
28
|
-
return api.get('getSubmittedListings', "/api/v1/portal/landlord/listing/fetch-submitted");
|
|
29
|
-
}
|
|
30
|
-
,
|
|
31
|
-
|
|
32
|
-
getOwnerListings: () => {
|
|
33
|
-
return api.get('getOwnerListings', "/api/v1/portal/landlord/listing/fetch-all");
|
|
34
|
-
}
|
|
35
|
-
,
|
|
36
|
-
|
|
37
|
-
getOwnerListing: (params: ApiPathParams<'getOwnerListing'>) => {
|
|
38
|
-
return api.get('getOwnerListing', `/api/v1/portal/landlord/listing/fetch-one/${params.listing_uid}`);
|
|
39
|
-
}
|
|
40
|
-
,
|
|
41
|
-
|
|
42
|
-
savePropertyBasics: (params: ApiPathParams<'savePropertyBasics'>, payload: ApiRequest<'savePropertyBasics'>) => {
|
|
43
|
-
return api.post('savePropertyBasics', `/api/v1/portal/landlord/listing/${params.listing_uid}/property-basics`, payload);
|
|
44
|
-
}
|
|
45
|
-
,
|
|
46
|
-
|
|
47
|
-
saveTenancyDetails: (params: ApiPathParams<'saveTenancyDetails'>, payload: ApiRequest<'saveTenancyDetails'>) => {
|
|
48
|
-
return api.post('saveTenancyDetails', `/api/v1/portal/landlord/listing/${params.listing_uid}/tenancy-details`, payload);
|
|
49
|
-
}
|
|
50
|
-
,
|
|
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
|
-
|
|
57
|
-
saveListingFeatures: (params: ApiPathParams<'saveListingFeatures'>, payload: ApiRequest<'saveListingFeatures'>) => {
|
|
58
|
-
return api.post('saveListingFeatures', `/api/v1/portal/landlord/listing/${params.listing_uid}/features`, payload);
|
|
59
|
-
}
|
|
60
|
-
,
|
|
61
|
-
|
|
62
|
-
saveTenantPreferences: (params: ApiPathParams<'saveTenantPreferences'>, payload: ApiRequest<'saveTenantPreferences'>) => {
|
|
63
|
-
return api.post('saveTenantPreferences', `/api/v1/portal/landlord/listing/${params.listing_uid}/tenant-preferences`, payload);
|
|
64
|
-
}
|
|
65
|
-
,
|
|
66
|
-
|
|
67
|
-
saveViewingAvailability: (params: ApiPathParams<'saveViewingAvailability'>, payload: ApiRequest<'saveViewingAvailability'>) => {
|
|
68
|
-
return api.post('saveViewingAvailability', `/api/v1/portal/landlord/listing/${params.listing_uid}/viewing-availability`, payload);
|
|
69
|
-
}
|
|
70
|
-
,
|
|
71
|
-
|
|
72
|
-
saveUsedItemDetails: (params: ApiPathParams<'saveUsedItemDetails'>, payload: ApiRequest<'saveUsedItemDetails'>) => {
|
|
73
|
-
return api.post('saveUsedItemDetails', `/api/v1/portal/landlord/listing/${params.listing_uid}/item-details`, payload);
|
|
74
|
-
}
|
|
75
|
-
,
|
|
76
|
-
|
|
77
|
-
uploadListingMedia: (params: ApiPathParams<'uploadListingMedia'>) => {
|
|
78
|
-
return api.post('uploadListingMedia', `/api/v1/portal/landlord/listing/${params.listing_uid}/media`);
|
|
79
|
-
}
|
|
80
|
-
,
|
|
81
|
-
|
|
82
|
-
reorderListingMedia: (params: ApiPathParams<'reorderListingMedia'>, payload: ApiRequest<'reorderListingMedia'>) => {
|
|
83
|
-
return api.post('reorderListingMedia', `/api/v1/portal/landlord/listing/${params.listing_uid}/media/order`, payload);
|
|
84
|
-
}
|
|
85
|
-
,
|
|
86
|
-
|
|
87
|
-
setListingCoverMedia: (params: ApiPathParams<'setListingCoverMedia'>) => {
|
|
88
|
-
return api.post('setListingCoverMedia', `/api/v1/portal/landlord/listing/${params.listing_uid}/media/${params.media_uid}/cover`);
|
|
89
|
-
}
|
|
90
|
-
,
|
|
91
|
-
|
|
92
|
-
submitListing: (params: ApiPathParams<'submitListing'>) => {
|
|
93
|
-
return api.post('submitListing', `/api/v1/portal/landlord/listing/${params.listing_uid}/submit`);
|
|
94
|
-
}
|
|
95
|
-
,
|
|
96
|
-
|
|
97
|
-
getListingCompliance: (params: ApiPathParams<'getListingCompliance'>) => {
|
|
98
|
-
return api.get('getListingCompliance', `/api/v1/portal/landlord/listing/compliance/fetch/${params.listing_uid}`);
|
|
99
|
-
}
|
|
100
|
-
,
|
|
101
|
-
|
|
102
|
-
submitListingCompliance: (params: ApiPathParams<'submitListingCompliance'>, payload: ApiRequest<'submitListingCompliance'>) => {
|
|
103
|
-
return api.post('submitListingCompliance', `/api/v1/portal/landlord/listing/compliance/submit/${params.listing_uid}`, payload);
|
|
104
|
-
}
|
|
105
|
-
,
|
|
106
|
-
|
|
107
|
-
resolveListingCompliance: (params: ApiPathParams<'resolveListingCompliance'>) => {
|
|
108
|
-
return api.post('resolveListingCompliance', `/api/v1/portal/landlord/listing/compliance/resolve/${params.listing_uid}`);
|
|
109
|
-
}
|
|
110
|
-
,
|
|
111
|
-
|
|
112
|
-
getLandlordTenancies: () => {
|
|
113
|
-
return api.get('getLandlordTenancies', "/api/v1/portal/landlord/tenancy/fetch-all");
|
|
114
|
-
}
|
|
115
|
-
,
|
|
116
|
-
|
|
117
|
-
submitTenancyCompliance: (params: ApiPathParams<'submitTenancyCompliance'>, payload: ApiRequest<'submitTenancyCompliance'>) => {
|
|
118
|
-
return api.post('submitTenancyCompliance', `/api/v1/portal/landlord/tenancy/compliance/submit/${params.tenancy_uid}`, payload);
|
|
119
|
-
}
|
|
120
|
-
,
|
|
121
|
-
|
|
122
|
-
resolveTenancyCompliance: (params: ApiPathParams<'resolveTenancyCompliance'>) => {
|
|
123
|
-
return api.post('resolveTenancyCompliance', `/api/v1/portal/landlord/tenancy/compliance/resolve/${params.tenancy_uid}`);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { api } from "../api-client";
|
|
3
|
-
import type { ApiRequest, ApiPathParams, Expand } from "../types/openapi";
|
|
4
|
-
|
|
5
|
-
export const listings = {
|
|
6
|
-
|
|
7
|
-
search: (query?: Expand<ApiRequest<'searchListings'>>) => {
|
|
8
|
-
return api.get('searchListings', "/api/v1/public/listings/search", query);
|
|
9
|
-
}
|
|
10
|
-
,
|
|
11
|
-
|
|
12
|
-
discover: (query?: Expand<ApiRequest<'discoverListings'>>) => {
|
|
13
|
-
return api.get('discoverListings', "/api/v1/public/listings/discover", query);
|
|
14
|
-
}
|
|
15
|
-
,
|
|
16
|
-
|
|
17
|
-
fetchOne: (params: ApiPathParams<'fetchOne'>) => {
|
|
18
|
-
return api.get('fetchOne', `/api/v1/public/listings/fetch-one/${params.listing_uid}`);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { api } from "../api-client";
|
|
3
|
-
import type { ApiRequest, ApiPathParams, Expand } from "../types/openapi";
|
|
4
|
-
|
|
5
|
-
export const maintenance = {
|
|
6
|
-
|
|
7
|
-
listingHistory: (params: ApiPathParams<'listingHistoryMaintenance'>) => {
|
|
8
|
-
return api.get('listingHistoryMaintenance', `/api/v1/public/maintenance/listing/${params.listing_uid}`);
|
|
9
|
-
}
|
|
10
|
-
,
|
|
11
|
-
|
|
12
|
-
report: (payload: ApiRequest<'reportMaintenance'>) => {
|
|
13
|
-
return api.post('reportMaintenance', "/api/v1/public/maintenance/report", payload);
|
|
14
|
-
}
|
|
15
|
-
,
|
|
16
|
-
|
|
17
|
-
uploadAttachment: (params: ApiPathParams<'uploadAttachmentMaintenance'>) => {
|
|
18
|
-
return api.post('uploadAttachmentMaintenance', `/api/v1/public/maintenance/${params.maintenance_uid}/attachments`);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { api } from "../api-client";
|
|
3
|
-
import type { ApiRequest, ApiPathParams, Expand } from "../types/openapi";
|
|
4
|
-
|
|
5
|
-
export const notification = {
|
|
6
|
-
|
|
7
|
-
fetch: () => {
|
|
8
|
-
return api.get('fetchNotification', "/api/v1/public/notification/fetch-all");
|
|
9
|
-
}
|
|
10
|
-
,
|
|
11
|
-
|
|
12
|
-
read: (params: ApiPathParams<'readNotification'>) => {
|
|
13
|
-
return api.post('readNotification', `/api/v1/public/notification/${params.notification_id}/read`);
|
|
14
|
-
}
|
|
15
|
-
,
|
|
16
|
-
|
|
17
|
-
readAll: () => {
|
|
18
|
-
return api.post('readAllNotification', "/api/v1/public/notification/read-all");
|
|
19
|
-
}
|
|
20
|
-
,
|
|
21
|
-
|
|
22
|
-
countUnRead: () => {
|
|
23
|
-
return api.get('countUnReadNotification', "/api/v1/public/notification/unread-count");
|
|
24
|
-
}
|
|
25
|
-
,
|
|
26
|
-
|
|
27
|
-
registerDeviceToken: () => {
|
|
28
|
-
return api.post('registerDeviceTokenNotification', "/api/v1/public/notification/device-token");
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
};
|
package/src/generated/plan.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { api } from "../api-client";
|
|
3
|
-
import type { ApiRequest, ApiPathParams, Expand } from "../types/openapi";
|
|
4
|
-
|
|
5
|
-
export const plan = {
|
|
6
|
-
|
|
7
|
-
myCapabilities: () => {
|
|
8
|
-
return api.get('myCapabilitiesPlan', "/api/v1/public/plan/me/capabilities");
|
|
9
|
-
}
|
|
10
|
-
,
|
|
11
|
-
|
|
12
|
-
checkCapability: (params: ApiPathParams<'checkCapabilityPlan'>) => {
|
|
13
|
-
return api.get('checkCapabilityPlan', `/api/v1/public/plan/me/capabilities/${params.capability}`);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
};
|
package/src/generated/review.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { api } from "../api-client";
|
|
3
|
-
import type { ApiRequest, ApiPathParams, Expand } from "../types/openapi";
|
|
4
|
-
|
|
5
|
-
export const review = {
|
|
6
|
-
|
|
7
|
-
fetchAll: () => {
|
|
8
|
-
return api.get('fetchAllReview', "/api/v1/public/review/fetch-all");
|
|
9
|
-
}
|
|
10
|
-
,
|
|
11
|
-
|
|
12
|
-
ratingSummary: () => {
|
|
13
|
-
return api.get('ratingSummaryReview', "/api/v1/public/review/summary");
|
|
14
|
-
}
|
|
15
|
-
,
|
|
16
|
-
|
|
17
|
-
createListing: (payload: ApiRequest<'createListingReview'>) => {
|
|
18
|
-
return api.post('createListingReview', "/api/v1/public/review/create-listing", payload);
|
|
19
|
-
}
|
|
20
|
-
,
|
|
21
|
-
|
|
22
|
-
createUser: (payload: ApiRequest<'createUserReview'>) => {
|
|
23
|
-
return api.post('createUserReview', "/api/v1/public/review/create-user", payload);
|
|
24
|
-
}
|
|
25
|
-
,
|
|
26
|
-
|
|
27
|
-
update: (params: ApiPathParams<'updateReview'>, payload: ApiRequest<'updateReview'>) => {
|
|
28
|
-
return api.post('updateReview', `/api/v1/public/review/update/${params.review_id}`, payload);
|
|
29
|
-
}
|
|
30
|
-
,
|
|
31
|
-
|
|
32
|
-
delete: (params: ApiPathParams<'deleteReview'>) => {
|
|
33
|
-
return api.post('deleteReview', `/api/v1/public/review/delete/${params.review_id}`);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
};
|
package/src/generated/tenancy.ts
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { api } from "../api-client";
|
|
3
|
-
import type { ApiRequest, ApiPathParams, Expand } from "../types/openapi";
|
|
4
|
-
|
|
5
|
-
export const tenancy = {
|
|
6
|
-
|
|
7
|
-
fetchOne: (params: ApiPathParams<'fetchOneTenancy'>) => {
|
|
8
|
-
return api.get('fetchOneTenancy', `/api/v1/public/tenancy/fetch-one/${params.tenancy_uid}`);
|
|
9
|
-
}
|
|
10
|
-
,
|
|
11
|
-
|
|
12
|
-
create: (payload: ApiRequest<'createTenancy'>) => {
|
|
13
|
-
return api.post('createTenancy', "/api/v1/public/tenancy/create-tenancy", payload);
|
|
14
|
-
}
|
|
15
|
-
,
|
|
16
|
-
|
|
17
|
-
transition: (params: ApiPathParams<'transitionTenancy'>, payload: ApiRequest<'transitionTenancy'>) => {
|
|
18
|
-
return api.post('transitionTenancy', `/api/v1/public/tenancy/${params.tenancy_uid}/transition`, payload);
|
|
19
|
-
}
|
|
20
|
-
,
|
|
21
|
-
|
|
22
|
-
complianceStatus: (params: ApiPathParams<'complianceStatusTenancy'>) => {
|
|
23
|
-
return api.get('complianceStatusTenancy', `/api/v1/public/tenancy/${params.tenancy_uid}/compliance-status`);
|
|
24
|
-
}
|
|
25
|
-
,
|
|
26
|
-
|
|
27
|
-
renew: (params: ApiPathParams<'renewTenancy'>) => {
|
|
28
|
-
return api.post('renewTenancy', `/api/v1/public/tenancy/${params.tenancy_uid}/renewal`);
|
|
29
|
-
}
|
|
30
|
-
,
|
|
31
|
-
|
|
32
|
-
convert: (params: ApiPathParams<'convertTenancy'>) => {
|
|
33
|
-
return api.post('convertTenancy', `/api/v1/public/tenancy/${params.tenancy_uid}/convert-to-periodic`);
|
|
34
|
-
}
|
|
35
|
-
,
|
|
36
|
-
|
|
37
|
-
serveNotice: (params: ApiPathParams<'serveNoticeTenancy'>, payload: ApiRequest<'serveNoticeTenancy'>) => {
|
|
38
|
-
return api.post('serveNoticeTenancy', `/api/v1/public/tenancy/${params.tenancy_uid}/serve-notice`, payload);
|
|
39
|
-
}
|
|
40
|
-
,
|
|
41
|
-
|
|
42
|
-
terminate: (params: ApiPathParams<'terminateTenancy'>, payload: ApiRequest<'terminateTenancy'>) => {
|
|
43
|
-
return api.post('terminateTenancy', `/api/v1/public/tenancy/${params.tenancy_uid}/terminate`, payload);
|
|
44
|
-
}
|
|
45
|
-
,
|
|
46
|
-
|
|
47
|
-
fetchTransitions: (params: ApiPathParams<'fetchTransitionsTenancy'>) => {
|
|
48
|
-
return api.get('fetchTransitionsTenancy', `/api/v1/public/tenancy/${params.tenancy_uid}/transitions`);
|
|
49
|
-
}
|
|
50
|
-
,
|
|
51
|
-
|
|
52
|
-
uploadDocument: (params: ApiPathParams<'uploadDocumentTenancy'>) => {
|
|
53
|
-
return api.post('uploadDocumentTenancy', `/api/v1/public/tenancy/${params.tenancy_uid}/documents`);
|
|
54
|
-
}
|
|
55
|
-
,
|
|
56
|
-
|
|
57
|
-
downloadDocument: (params: ApiPathParams<'downloadDocumentTenancy'>) => {
|
|
58
|
-
return api.get('downloadDocumentTenancy', `/api/v1/public/tenancy/${params.tenancy_uid}/documents/${params.document_id}`);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
};
|
package/src/generated/tenant.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { api } from "../api-client";
|
|
3
|
-
import type { ApiRequest, ApiPathParams, Expand } from "../types/openapi";
|
|
4
|
-
|
|
5
|
-
export const tenant = {
|
|
6
|
-
|
|
7
|
-
getApiV1PortalTenantTest: () => {
|
|
8
|
-
return api.get('getApiV1PortalTenantTest', "/api/v1/portal/tenant/test");
|
|
9
|
-
}
|
|
10
|
-
,
|
|
11
|
-
|
|
12
|
-
postApiV1PortalTenantCreate: (payload: ApiRequest<'postApiV1PortalTenantCreate'>) => {
|
|
13
|
-
return api.post('postApiV1PortalTenantCreate', "/api/v1/portal/tenant/create", payload);
|
|
14
|
-
}
|
|
15
|
-
,
|
|
16
|
-
|
|
17
|
-
postApiV1PortalTenantCreateWithGithub: () => {
|
|
18
|
-
return api.post('postApiV1PortalTenantCreateWithGithub', "/api/v1/portal/tenant/create-with-github");
|
|
19
|
-
}
|
|
20
|
-
,
|
|
21
|
-
|
|
22
|
-
postApiV1PortalTenantSendOtp: () => {
|
|
23
|
-
return api.post('postApiV1PortalTenantSendOtp', "/api/v1/portal/tenant/send-otp");
|
|
24
|
-
}
|
|
25
|
-
,
|
|
26
|
-
|
|
27
|
-
postApiV1PortalTenantVerifyOtp: (payload: ApiRequest<'postApiV1PortalTenantVerifyOtp'>) => {
|
|
28
|
-
return api.post('postApiV1PortalTenantVerifyOtp', "/api/v1/portal/tenant/verify-otp", payload);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { api } from "../api-client";
|
|
3
|
-
import type { ApiRequest, ApiPathParams, Expand } from "../types/openapi";
|
|
4
|
-
|
|
5
|
-
export const userverification = {
|
|
6
|
-
|
|
7
|
-
overview: () => {
|
|
8
|
-
return api.get('overviewUserVerification', "/api/v1/public/userverification/overview");
|
|
9
|
-
}
|
|
10
|
-
,
|
|
11
|
-
|
|
12
|
-
submit: (params: ApiPathParams<'submitUserVerification'>, payload: ApiRequest<'submitUserVerification'>) => {
|
|
13
|
-
return api.post('submitUserVerification', `/api/v1/public/userverification/submit/${params.layerKey}`, payload);
|
|
14
|
-
}
|
|
15
|
-
,
|
|
16
|
-
|
|
17
|
-
fetchFlow: () => {
|
|
18
|
-
return api.get('fetchFlowUserVerification', "/api/v1/public/userverification/fetch-flow");
|
|
19
|
-
}
|
|
20
|
-
,
|
|
21
|
-
|
|
22
|
-
resubmit: (params: ApiPathParams<'resubmitUserVerification'>, payload: ApiRequest<'resubmitUserVerification'>) => {
|
|
23
|
-
return api.post('resubmitUserVerification', `/api/v1/public/userverification/${params.layerKey}/retry`, payload);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { api } from "../api-client";
|
|
3
|
-
import type { ApiRequest, ApiPathParams, Expand } from "../types/openapi";
|
|
4
|
-
|
|
5
|
-
export const wishlist = {
|
|
6
|
-
|
|
7
|
-
create: (payload: ApiRequest<'createWishlist'>) => {
|
|
8
|
-
return api.post('createWishlist', "/api/v1/public/wishlist", payload);
|
|
9
|
-
}
|
|
10
|
-
,
|
|
11
|
-
|
|
12
|
-
remove: (params: ApiPathParams<'removeWishlist'>) => {
|
|
13
|
-
return api.post('removeWishlist', `/api/v1/public/wishlist/remove/${params.listing_uid}`);
|
|
14
|
-
}
|
|
15
|
-
,
|
|
16
|
-
|
|
17
|
-
get: (query?: Expand<ApiRequest<'getWishlist'>>) => {
|
|
18
|
-
return api.get('getWishlist', "/api/v1/public/wishlist/fetch-all", query);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { initApiToken as setupAuth } from '@justins-home/http-client';
|
package/src/index.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* Core API utilities
|
|
4
|
-
*/
|
|
5
|
-
export * from './api-client';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* OpenAPI helper types
|
|
9
|
-
*/
|
|
10
|
-
export * from './types/openapi';
|
|
11
|
-
|
|
12
|
-
export * from './helpers/authTokenInit';
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Auto-generated domain services
|
|
17
|
-
* (Do not edit manually)
|
|
18
|
-
*/
|
|
19
|
-
export * from './generated/admin';
|
|
20
|
-
export * from './generated/appointment';
|
|
21
|
-
export * from './generated/auth';
|
|
22
|
-
export * from './generated/booking';
|
|
23
|
-
export * from './generated/agent';
|
|
24
|
-
export * from './generated/tenant';
|
|
25
|
-
export * from './generated/customer';
|
|
26
|
-
export * from './generated/google';
|
|
27
|
-
export * from './generated/github';
|
|
28
|
-
export * from './generated/feature';
|
|
29
|
-
export * from './generated/inspection';
|
|
30
|
-
export * from './generated/landlord';
|
|
31
|
-
export * from './generated/listings';
|
|
32
|
-
export * from './generated/maintenance';
|
|
33
|
-
export * from './generated/conversations';
|
|
34
|
-
export * from './generated/notification';
|
|
35
|
-
export * from './generated/plan';
|
|
36
|
-
export * from './generated/review';
|
|
37
|
-
export * from './generated/tenancy';
|
|
38
|
-
export * from './generated/userverification';
|
|
39
|
-
export * from './generated/wishlist';
|
package/src/types/openapi.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { operations } from '@justins-home/types/generated/api-types';
|
|
2
|
-
|
|
3
|
-
export type OperationId = keyof operations;
|
|
4
|
-
|
|
5
|
-
export type ApiRequest<T extends OperationId> = operations[T] extends {
|
|
6
|
-
requestBody: { content: { 'application/json': infer R } };
|
|
7
|
-
}
|
|
8
|
-
? R
|
|
9
|
-
: operations[T] extends {
|
|
10
|
-
parameters: { query?: infer Q };
|
|
11
|
-
}
|
|
12
|
-
? Q
|
|
13
|
-
: never;
|
|
14
|
-
|
|
15
|
-
export type ApiResponse<T extends OperationId> = operations[T] extends {
|
|
16
|
-
responses: { 200: { content: { 'application/json': infer R } } };
|
|
17
|
-
}
|
|
18
|
-
? R
|
|
19
|
-
: unknown;
|
|
20
|
-
|
|
21
|
-
export type ApiPathParams<T extends OperationId> = operations[T] extends {
|
|
22
|
-
parameters: { path: infer P };
|
|
23
|
-
}
|
|
24
|
-
? P
|
|
25
|
-
: never;
|
|
26
|
-
|
|
27
|
-
export type Expand<T> = {
|
|
28
|
-
[K in keyof T]: T[K];
|
|
29
|
-
};
|