@justins-home/api-services 1.2.8 → 1.2.10

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 CHANGED
@@ -153,6 +153,135 @@ declare const admin: {
153
153
  time_ago?: string;
154
154
  }[];
155
155
  }>;
156
+ fetchAdminProfile: () => Promise<{
157
+ message?: string;
158
+ event?: string | null;
159
+ data?: {
160
+ uid?: string | null;
161
+ username?: string | null;
162
+ first_name?: string | null;
163
+ last_name?: string | null;
164
+ email?: string | null;
165
+ phone?: string | null;
166
+ status?: string | null;
167
+ user_mode?: string | null;
168
+ last_login_at?: string | null;
169
+ last_login_ip?: string | null;
170
+ two_factor_enabled?: string | null;
171
+ avatar_path?: string | null;
172
+ language?: string | null;
173
+ timezone?: string | null;
174
+ user_type?: string;
175
+ created?: string | null;
176
+ email_verified_at?: string | null;
177
+ verification_status?: {
178
+ overall?: string;
179
+ breakdown?: unknown[];
180
+ };
181
+ role?: string | null;
182
+ };
183
+ }>;
184
+ updateAdminProfile: (payload: ApiRequest<"updateAdminProfile">) => Promise<{
185
+ data?: {
186
+ uid?: string;
187
+ username?: string;
188
+ first_name?: string | null;
189
+ last_name?: string | null;
190
+ email?: string;
191
+ phone?: string | null;
192
+ status?: string | null;
193
+ user_mode?: string;
194
+ last_login_at?: string | null;
195
+ last_login_ip?: string | null;
196
+ two_factor_enabled?: boolean;
197
+ avatar_path?: string | null;
198
+ language?: string;
199
+ timezone?: string;
200
+ user_type?: string;
201
+ created?: string;
202
+ email_verified_at?: string;
203
+ verification_status?: {
204
+ overall?: string;
205
+ breakdown?: {
206
+ verification_key?: string;
207
+ state?: string;
208
+ }[];
209
+ };
210
+ role?: string | null;
211
+ };
212
+ }>;
213
+ fetchLandlordList: (query?: Expand<ApiRequest<"fetchLandlordListAdmin">>) => Promise<{
214
+ message?: string;
215
+ event?: string | null;
216
+ data?: {
217
+ items?: {
218
+ user_uid?: string;
219
+ name?: string;
220
+ avatar?: string;
221
+ joined_at?: string;
222
+ joined_label?: string;
223
+ contact?: {
224
+ email?: string;
225
+ phone?: string;
226
+ };
227
+ verification?: {
228
+ status?: string;
229
+ label?: string;
230
+ };
231
+ plan?: {
232
+ key?: string;
233
+ name?: string;
234
+ };
235
+ properties_count?: number;
236
+ account_status?: {
237
+ value?: string;
238
+ label?: string;
239
+ };
240
+ }[];
241
+ pagination?: {
242
+ current_page?: number;
243
+ per_page?: number;
244
+ total?: number;
245
+ last_page?: number;
246
+ from?: number;
247
+ to?: number;
248
+ };
249
+ };
250
+ }>;
251
+ fetchTenantList: (query?: Expand<ApiRequest<"fetchTenantListAdmin">>) => Promise<{
252
+ message?: string;
253
+ event?: string | null;
254
+ data?: {
255
+ items?: {
256
+ user_uid?: string;
257
+ name?: string;
258
+ avatar?: string;
259
+ email?: string;
260
+ verification?: {
261
+ status?: string;
262
+ label?: string;
263
+ };
264
+ active_tenancy?: {
265
+ has_active_tenancy?: boolean;
266
+ tenancy_uid?: string;
267
+ property_address?: string;
268
+ };
269
+ right_to_rent?: {
270
+ status?: string;
271
+ label?: string;
272
+ };
273
+ status?: string;
274
+ }[];
275
+ pagination?: {
276
+ current_page?: number;
277
+ per_page?: number;
278
+ total?: number;
279
+ last_page?: number;
280
+ from?: number;
281
+ to?: number;
282
+ };
283
+ };
284
+ }>;
156
285
  getSubmittedListing: () => Promise<{
157
286
  data?: {
158
287
  draft_name?: string;
@@ -1002,6 +1131,61 @@ declare const tenant: {
1002
1131
  postApiV1PortalTenantCreateWithGithub: () => Promise<unknown>;
1003
1132
  postApiV1PortalTenantSendOtp: () => Promise<unknown>;
1004
1133
  postApiV1PortalTenantVerifyOtp: (payload: ApiRequest<"postApiV1PortalTenantVerifyOtp">) => Promise<unknown>;
1134
+ fetchTenantProfile: () => Promise<{
1135
+ message?: string;
1136
+ event?: string | null;
1137
+ data?: {
1138
+ uid?: string | null;
1139
+ username?: string | null;
1140
+ first_name?: string | null;
1141
+ last_name?: string | null;
1142
+ email?: string | null;
1143
+ phone?: string | null;
1144
+ status?: string | null;
1145
+ user_mode?: string | null;
1146
+ last_login_at?: string | null;
1147
+ last_login_ip?: string | null;
1148
+ two_factor_enabled?: string | null;
1149
+ avatar_path?: string | null;
1150
+ language?: string | null;
1151
+ timezone?: string | null;
1152
+ user_type?: string;
1153
+ created?: string | null;
1154
+ email_verified_at?: string | null;
1155
+ verification_status?: {
1156
+ overall?: string;
1157
+ breakdown?: unknown[];
1158
+ };
1159
+ };
1160
+ }>;
1161
+ updateTenantProfile: (payload: ApiRequest<"updateTenantProfile">) => Promise<{
1162
+ data?: {
1163
+ uid?: string;
1164
+ username?: string;
1165
+ first_name?: string | null;
1166
+ last_name?: string | null;
1167
+ email?: string;
1168
+ phone?: string | null;
1169
+ status?: string | null;
1170
+ user_mode?: string;
1171
+ last_login_at?: string | null;
1172
+ last_login_ip?: string | null;
1173
+ two_factor_enabled?: boolean;
1174
+ avatar_path?: string | null;
1175
+ language?: string;
1176
+ timezone?: string;
1177
+ user_type?: string;
1178
+ created?: string;
1179
+ email_verified_at?: string;
1180
+ verification_status?: {
1181
+ overall?: string;
1182
+ breakdown?: {
1183
+ verification_key?: string;
1184
+ state?: string;
1185
+ }[];
1186
+ };
1187
+ };
1188
+ }>;
1005
1189
  };
1006
1190
 
1007
1191
  declare const customer: {
@@ -1079,23 +1263,30 @@ declare const inspection: {
1079
1263
  declare const landlord: {
1080
1264
  new: (payload: ApiRequest<"newLandlord">) => Promise<{
1081
1265
  data?: {
1082
- uid?: string | null;
1083
- username?: string | null;
1266
+ uid?: string;
1267
+ username?: string;
1084
1268
  first_name?: string | null;
1085
1269
  last_name?: string | null;
1086
- email?: string | null;
1270
+ email?: string;
1087
1271
  phone?: string | null;
1088
1272
  status?: string | null;
1089
- user_mode?: string | null;
1273
+ user_mode?: string;
1090
1274
  last_login_at?: string | null;
1091
1275
  last_login_ip?: string | null;
1092
- two_factor_enabled?: string | null;
1276
+ two_factor_enabled?: boolean;
1093
1277
  avatar_path?: string | null;
1094
- language?: string | null;
1095
- timezone?: string | null;
1278
+ language?: string;
1279
+ timezone?: string;
1096
1280
  user_type?: string;
1097
1281
  created?: string;
1098
- email_verified_at?: string | null;
1282
+ email_verified_at?: string;
1283
+ verification_status?: {
1284
+ overall?: string;
1285
+ breakdown?: {
1286
+ verification_key?: string;
1287
+ state?: string;
1288
+ }[];
1289
+ };
1099
1290
  address?: string | null;
1100
1291
  address_line_2?: string | null;
1101
1292
  legal_full_name?: string | null;
@@ -1196,6 +1387,10 @@ declare const landlord: {
1196
1387
  user_type?: string;
1197
1388
  created?: string | null;
1198
1389
  email_verified_at?: string | null;
1390
+ verification_status?: {
1391
+ overall?: string;
1392
+ breakdown?: unknown[];
1393
+ };
1199
1394
  address?: string | null;
1200
1395
  address_line_2?: string | null;
1201
1396
  legal_full_name?: string | null;
@@ -1218,23 +1413,30 @@ declare const landlord: {
1218
1413
  }>;
1219
1414
  updateProfile: (payload: ApiRequest<"updateProfile">) => Promise<{
1220
1415
  data?: {
1221
- uid?: string | null;
1222
- username?: string | null;
1416
+ uid?: string;
1417
+ username?: string;
1223
1418
  first_name?: string | null;
1224
1419
  last_name?: string | null;
1225
- email?: string | null;
1420
+ email?: string;
1226
1421
  phone?: string | null;
1227
1422
  status?: string | null;
1228
- user_mode?: string | null;
1423
+ user_mode?: string;
1229
1424
  last_login_at?: string | null;
1230
1425
  last_login_ip?: string | null;
1231
- two_factor_enabled?: string | null;
1426
+ two_factor_enabled?: boolean;
1232
1427
  avatar_path?: string | null;
1233
- language?: string | null;
1234
- timezone?: string | null;
1428
+ language?: string;
1429
+ timezone?: string;
1235
1430
  user_type?: string;
1236
1431
  created?: string;
1237
- email_verified_at?: string | null;
1432
+ email_verified_at?: string;
1433
+ verification_status?: {
1434
+ overall?: string;
1435
+ breakdown?: {
1436
+ verification_key?: string;
1437
+ state?: string;
1438
+ }[];
1439
+ };
1238
1440
  address?: string | null;
1239
1441
  address_line_2?: string | null;
1240
1442
  legal_full_name?: string | null;
@@ -2279,6 +2481,13 @@ declare const user: {
2279
2481
  user_type?: string;
2280
2482
  created?: string;
2281
2483
  email_verified_at?: string;
2484
+ verification_status?: {
2485
+ overall?: string;
2486
+ breakdown?: {
2487
+ verification_key?: string;
2488
+ state?: string;
2489
+ }[];
2490
+ };
2282
2491
  };
2283
2492
  }>;
2284
2493
  };
package/dist/index.d.ts CHANGED
@@ -153,6 +153,135 @@ declare const admin: {
153
153
  time_ago?: string;
154
154
  }[];
155
155
  }>;
156
+ fetchAdminProfile: () => Promise<{
157
+ message?: string;
158
+ event?: string | null;
159
+ data?: {
160
+ uid?: string | null;
161
+ username?: string | null;
162
+ first_name?: string | null;
163
+ last_name?: string | null;
164
+ email?: string | null;
165
+ phone?: string | null;
166
+ status?: string | null;
167
+ user_mode?: string | null;
168
+ last_login_at?: string | null;
169
+ last_login_ip?: string | null;
170
+ two_factor_enabled?: string | null;
171
+ avatar_path?: string | null;
172
+ language?: string | null;
173
+ timezone?: string | null;
174
+ user_type?: string;
175
+ created?: string | null;
176
+ email_verified_at?: string | null;
177
+ verification_status?: {
178
+ overall?: string;
179
+ breakdown?: unknown[];
180
+ };
181
+ role?: string | null;
182
+ };
183
+ }>;
184
+ updateAdminProfile: (payload: ApiRequest<"updateAdminProfile">) => Promise<{
185
+ data?: {
186
+ uid?: string;
187
+ username?: string;
188
+ first_name?: string | null;
189
+ last_name?: string | null;
190
+ email?: string;
191
+ phone?: string | null;
192
+ status?: string | null;
193
+ user_mode?: string;
194
+ last_login_at?: string | null;
195
+ last_login_ip?: string | null;
196
+ two_factor_enabled?: boolean;
197
+ avatar_path?: string | null;
198
+ language?: string;
199
+ timezone?: string;
200
+ user_type?: string;
201
+ created?: string;
202
+ email_verified_at?: string;
203
+ verification_status?: {
204
+ overall?: string;
205
+ breakdown?: {
206
+ verification_key?: string;
207
+ state?: string;
208
+ }[];
209
+ };
210
+ role?: string | null;
211
+ };
212
+ }>;
213
+ fetchLandlordList: (query?: Expand<ApiRequest<"fetchLandlordListAdmin">>) => Promise<{
214
+ message?: string;
215
+ event?: string | null;
216
+ data?: {
217
+ items?: {
218
+ user_uid?: string;
219
+ name?: string;
220
+ avatar?: string;
221
+ joined_at?: string;
222
+ joined_label?: string;
223
+ contact?: {
224
+ email?: string;
225
+ phone?: string;
226
+ };
227
+ verification?: {
228
+ status?: string;
229
+ label?: string;
230
+ };
231
+ plan?: {
232
+ key?: string;
233
+ name?: string;
234
+ };
235
+ properties_count?: number;
236
+ account_status?: {
237
+ value?: string;
238
+ label?: string;
239
+ };
240
+ }[];
241
+ pagination?: {
242
+ current_page?: number;
243
+ per_page?: number;
244
+ total?: number;
245
+ last_page?: number;
246
+ from?: number;
247
+ to?: number;
248
+ };
249
+ };
250
+ }>;
251
+ fetchTenantList: (query?: Expand<ApiRequest<"fetchTenantListAdmin">>) => Promise<{
252
+ message?: string;
253
+ event?: string | null;
254
+ data?: {
255
+ items?: {
256
+ user_uid?: string;
257
+ name?: string;
258
+ avatar?: string;
259
+ email?: string;
260
+ verification?: {
261
+ status?: string;
262
+ label?: string;
263
+ };
264
+ active_tenancy?: {
265
+ has_active_tenancy?: boolean;
266
+ tenancy_uid?: string;
267
+ property_address?: string;
268
+ };
269
+ right_to_rent?: {
270
+ status?: string;
271
+ label?: string;
272
+ };
273
+ status?: string;
274
+ }[];
275
+ pagination?: {
276
+ current_page?: number;
277
+ per_page?: number;
278
+ total?: number;
279
+ last_page?: number;
280
+ from?: number;
281
+ to?: number;
282
+ };
283
+ };
284
+ }>;
156
285
  getSubmittedListing: () => Promise<{
157
286
  data?: {
158
287
  draft_name?: string;
@@ -1002,6 +1131,61 @@ declare const tenant: {
1002
1131
  postApiV1PortalTenantCreateWithGithub: () => Promise<unknown>;
1003
1132
  postApiV1PortalTenantSendOtp: () => Promise<unknown>;
1004
1133
  postApiV1PortalTenantVerifyOtp: (payload: ApiRequest<"postApiV1PortalTenantVerifyOtp">) => Promise<unknown>;
1134
+ fetchTenantProfile: () => Promise<{
1135
+ message?: string;
1136
+ event?: string | null;
1137
+ data?: {
1138
+ uid?: string | null;
1139
+ username?: string | null;
1140
+ first_name?: string | null;
1141
+ last_name?: string | null;
1142
+ email?: string | null;
1143
+ phone?: string | null;
1144
+ status?: string | null;
1145
+ user_mode?: string | null;
1146
+ last_login_at?: string | null;
1147
+ last_login_ip?: string | null;
1148
+ two_factor_enabled?: string | null;
1149
+ avatar_path?: string | null;
1150
+ language?: string | null;
1151
+ timezone?: string | null;
1152
+ user_type?: string;
1153
+ created?: string | null;
1154
+ email_verified_at?: string | null;
1155
+ verification_status?: {
1156
+ overall?: string;
1157
+ breakdown?: unknown[];
1158
+ };
1159
+ };
1160
+ }>;
1161
+ updateTenantProfile: (payload: ApiRequest<"updateTenantProfile">) => Promise<{
1162
+ data?: {
1163
+ uid?: string;
1164
+ username?: string;
1165
+ first_name?: string | null;
1166
+ last_name?: string | null;
1167
+ email?: string;
1168
+ phone?: string | null;
1169
+ status?: string | null;
1170
+ user_mode?: string;
1171
+ last_login_at?: string | null;
1172
+ last_login_ip?: string | null;
1173
+ two_factor_enabled?: boolean;
1174
+ avatar_path?: string | null;
1175
+ language?: string;
1176
+ timezone?: string;
1177
+ user_type?: string;
1178
+ created?: string;
1179
+ email_verified_at?: string;
1180
+ verification_status?: {
1181
+ overall?: string;
1182
+ breakdown?: {
1183
+ verification_key?: string;
1184
+ state?: string;
1185
+ }[];
1186
+ };
1187
+ };
1188
+ }>;
1005
1189
  };
1006
1190
 
1007
1191
  declare const customer: {
@@ -1079,23 +1263,30 @@ declare const inspection: {
1079
1263
  declare const landlord: {
1080
1264
  new: (payload: ApiRequest<"newLandlord">) => Promise<{
1081
1265
  data?: {
1082
- uid?: string | null;
1083
- username?: string | null;
1266
+ uid?: string;
1267
+ username?: string;
1084
1268
  first_name?: string | null;
1085
1269
  last_name?: string | null;
1086
- email?: string | null;
1270
+ email?: string;
1087
1271
  phone?: string | null;
1088
1272
  status?: string | null;
1089
- user_mode?: string | null;
1273
+ user_mode?: string;
1090
1274
  last_login_at?: string | null;
1091
1275
  last_login_ip?: string | null;
1092
- two_factor_enabled?: string | null;
1276
+ two_factor_enabled?: boolean;
1093
1277
  avatar_path?: string | null;
1094
- language?: string | null;
1095
- timezone?: string | null;
1278
+ language?: string;
1279
+ timezone?: string;
1096
1280
  user_type?: string;
1097
1281
  created?: string;
1098
- email_verified_at?: string | null;
1282
+ email_verified_at?: string;
1283
+ verification_status?: {
1284
+ overall?: string;
1285
+ breakdown?: {
1286
+ verification_key?: string;
1287
+ state?: string;
1288
+ }[];
1289
+ };
1099
1290
  address?: string | null;
1100
1291
  address_line_2?: string | null;
1101
1292
  legal_full_name?: string | null;
@@ -1196,6 +1387,10 @@ declare const landlord: {
1196
1387
  user_type?: string;
1197
1388
  created?: string | null;
1198
1389
  email_verified_at?: string | null;
1390
+ verification_status?: {
1391
+ overall?: string;
1392
+ breakdown?: unknown[];
1393
+ };
1199
1394
  address?: string | null;
1200
1395
  address_line_2?: string | null;
1201
1396
  legal_full_name?: string | null;
@@ -1218,23 +1413,30 @@ declare const landlord: {
1218
1413
  }>;
1219
1414
  updateProfile: (payload: ApiRequest<"updateProfile">) => Promise<{
1220
1415
  data?: {
1221
- uid?: string | null;
1222
- username?: string | null;
1416
+ uid?: string;
1417
+ username?: string;
1223
1418
  first_name?: string | null;
1224
1419
  last_name?: string | null;
1225
- email?: string | null;
1420
+ email?: string;
1226
1421
  phone?: string | null;
1227
1422
  status?: string | null;
1228
- user_mode?: string | null;
1423
+ user_mode?: string;
1229
1424
  last_login_at?: string | null;
1230
1425
  last_login_ip?: string | null;
1231
- two_factor_enabled?: string | null;
1426
+ two_factor_enabled?: boolean;
1232
1427
  avatar_path?: string | null;
1233
- language?: string | null;
1234
- timezone?: string | null;
1428
+ language?: string;
1429
+ timezone?: string;
1235
1430
  user_type?: string;
1236
1431
  created?: string;
1237
- email_verified_at?: string | null;
1432
+ email_verified_at?: string;
1433
+ verification_status?: {
1434
+ overall?: string;
1435
+ breakdown?: {
1436
+ verification_key?: string;
1437
+ state?: string;
1438
+ }[];
1439
+ };
1238
1440
  address?: string | null;
1239
1441
  address_line_2?: string | null;
1240
1442
  legal_full_name?: string | null;
@@ -2279,6 +2481,13 @@ declare const user: {
2279
2481
  user_type?: string;
2280
2482
  created?: string;
2281
2483
  email_verified_at?: string;
2484
+ verification_status?: {
2485
+ overall?: string;
2486
+ breakdown?: {
2487
+ verification_key?: string;
2488
+ state?: string;
2489
+ }[];
2490
+ };
2282
2491
  };
2283
2492
  }>;
2284
2493
  };
package/dist/index.js CHANGED
@@ -120,6 +120,18 @@ var admin = {
120
120
  activityFeed: () => {
121
121
  return api.get("activityFeed", "/api/v1/portal/admin/dashboard/activity-feed");
122
122
  },
123
+ fetchAdminProfile: () => {
124
+ return api.get("fetchAdminProfile", "/api/v1/portal/admin/dashboard/profile");
125
+ },
126
+ updateAdminProfile: (payload) => {
127
+ return api.post("updateAdminProfile", "/api/v1/portal/admin/dashboard/update-profile", payload);
128
+ },
129
+ fetchLandlordList: (query) => {
130
+ return api.get("fetchLandlordListAdmin", "/api/v1/portal/admin/users/landlords/fetch-all", query);
131
+ },
132
+ fetchTenantList: (query) => {
133
+ return api.get("fetchTenantListAdmin", "/api/v1/portal/admin/users/tenants/fetch-all", query);
134
+ },
123
135
  getSubmittedListing: () => {
124
136
  return api.get("getSubmittedListing", "/api/v1/portal/admin/listing/review");
125
137
  },
@@ -384,6 +396,12 @@ var tenant = {
384
396
  },
385
397
  postApiV1PortalTenantVerifyOtp: (payload) => {
386
398
  return api.post("postApiV1PortalTenantVerifyOtp", "/api/v1/portal/tenant/verify-otp", payload);
399
+ },
400
+ fetchTenantProfile: () => {
401
+ return api.get("fetchTenantProfile", "/api/v1/portal/tenant/dashboard/profile");
402
+ },
403
+ updateTenantProfile: (payload) => {
404
+ return api.post("updateTenantProfile", "/api/v1/portal/tenant/dashboard/update-profile", payload);
387
405
  }
388
406
  };
389
407
 
package/dist/index.mjs CHANGED
@@ -73,6 +73,18 @@ var admin = {
73
73
  activityFeed: () => {
74
74
  return api.get("activityFeed", "/api/v1/portal/admin/dashboard/activity-feed");
75
75
  },
76
+ fetchAdminProfile: () => {
77
+ return api.get("fetchAdminProfile", "/api/v1/portal/admin/dashboard/profile");
78
+ },
79
+ updateAdminProfile: (payload) => {
80
+ return api.post("updateAdminProfile", "/api/v1/portal/admin/dashboard/update-profile", payload);
81
+ },
82
+ fetchLandlordList: (query) => {
83
+ return api.get("fetchLandlordListAdmin", "/api/v1/portal/admin/users/landlords/fetch-all", query);
84
+ },
85
+ fetchTenantList: (query) => {
86
+ return api.get("fetchTenantListAdmin", "/api/v1/portal/admin/users/tenants/fetch-all", query);
87
+ },
76
88
  getSubmittedListing: () => {
77
89
  return api.get("getSubmittedListing", "/api/v1/portal/admin/listing/review");
78
90
  },
@@ -337,6 +349,12 @@ var tenant = {
337
349
  },
338
350
  postApiV1PortalTenantVerifyOtp: (payload) => {
339
351
  return api.post("postApiV1PortalTenantVerifyOtp", "/api/v1/portal/tenant/verify-otp", payload);
352
+ },
353
+ fetchTenantProfile: () => {
354
+ return api.get("fetchTenantProfile", "/api/v1/portal/tenant/dashboard/profile");
355
+ },
356
+ updateTenantProfile: (payload) => {
357
+ return api.post("updateTenantProfile", "/api/v1/portal/tenant/dashboard/update-profile", payload);
340
358
  }
341
359
  };
342
360
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@justins-home/api-services",
3
- "version": "1.2.8",
3
+ "version": "1.2.10",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -16,8 +16,8 @@
16
16
  "dist"
17
17
  ],
18
18
  "dependencies": {
19
- "@justins-home/http-client": "1.1.3",
20
- "@justins-home/types": "1.1.3"
19
+ "@justins-home/http-client": "1.1.5",
20
+ "@justins-home/types": "1.1.5"
21
21
  },
22
22
  "publishConfig": {
23
23
  "access": "public"