@justins-home/api-services 1.2.27 → 1.2.29

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
@@ -47,6 +47,10 @@ type RequestContent<T extends OperationId> = operations[T] extends {
47
47
  requestBody: {
48
48
  content: infer C;
49
49
  };
50
+ } ? C : operations[T] extends {
51
+ requestBody?: {
52
+ content: infer C;
53
+ };
50
54
  } ? C : never;
51
55
  type ApiRequest<T extends OperationId> = operations[T] extends {
52
56
  requestBody: {
@@ -54,6 +58,12 @@ type ApiRequest<T extends OperationId> = operations[T] extends {
54
58
  'application/json': infer R;
55
59
  };
56
60
  };
61
+ } ? R : operations[T] extends {
62
+ requestBody?: {
63
+ content: {
64
+ 'application/json': infer R;
65
+ };
66
+ };
57
67
  } ? R : RequestContent<T> extends {
58
68
  'multipart/form-data': infer R;
59
69
  } ? R | MultipartPayload : operations[T] extends {
@@ -279,6 +289,18 @@ declare const admin: {
279
289
  };
280
290
  };
281
291
  }>;
292
+ fetchLandlordOptions: () => Promise<{
293
+ message?: string;
294
+ event?: string | null;
295
+ data?: {
296
+ items?: {
297
+ uid?: string;
298
+ avatar?: string;
299
+ name?: string;
300
+ email?: string;
301
+ }[];
302
+ };
303
+ }>;
282
304
  createLandlordListingDraft: (params: ApiPathParams<"createLandlordListingDraftAdmin">, payload: ApiRequest<"createLandlordListingDraftAdmin">) => Promise<{
283
305
  data?: {
284
306
  draft_name?: string;
@@ -364,6 +386,18 @@ declare const admin: {
364
386
  };
365
387
  };
366
388
  }>;
389
+ fetchTenantOptions: () => Promise<{
390
+ message?: string;
391
+ event?: string | null;
392
+ data?: {
393
+ items?: {
394
+ uid?: string;
395
+ avatar?: string;
396
+ name?: string;
397
+ email?: string;
398
+ }[];
399
+ };
400
+ }>;
367
401
  fetchUser: (params: ApiPathParams<"fetchUserAdmin">) => Promise<{
368
402
  message?: string;
369
403
  event?: string | null;
@@ -1105,7 +1139,17 @@ declare const admin: {
1105
1139
  media?: unknown[];
1106
1140
  };
1107
1141
  }>;
1108
- getFeatures: () => Promise<unknown>;
1142
+ getFeatures: (payload: ApiRequest<"getFeaturesAdmin">) => Promise<{
1143
+ data?: {
1144
+ group?: {
1145
+ id?: number;
1146
+ name?: string;
1147
+ description?: string;
1148
+ display_order?: number;
1149
+ };
1150
+ features?: unknown[];
1151
+ }[];
1152
+ }>;
1109
1153
  createFeature: (payload: ApiRequest<"createFeature">) => Promise<{
1110
1154
  data?: {
1111
1155
  id?: number;
@@ -1999,14 +2043,14 @@ declare const github: {
1999
2043
  declare const feature: {
2000
2044
  get: (query?: Expand<ApiRequest<"getFeature">>) => Promise<{
2001
2045
  data?: {
2002
- id?: number;
2003
- category_id?: number;
2004
- name?: string;
2005
- description?: string;
2006
- icon?: string;
2007
- is_active?: boolean;
2008
- is_filterable?: boolean;
2009
- };
2046
+ group?: {
2047
+ id?: number;
2048
+ name?: string;
2049
+ description?: string;
2050
+ display_order?: number;
2051
+ };
2052
+ features?: unknown[];
2053
+ }[];
2010
2054
  }>;
2011
2055
  };
2012
2056
 
@@ -2678,7 +2722,9 @@ declare const listings: {
2678
2722
  price?: string | null;
2679
2723
  state?: string;
2680
2724
  is_visible?: boolean;
2681
- summary?: unknown[];
2725
+ summary?: {
2726
+ availability?: string | null;
2727
+ };
2682
2728
  workflow?: unknown[];
2683
2729
  media?: unknown[];
2684
2730
  }[];
package/dist/index.d.ts CHANGED
@@ -47,6 +47,10 @@ type RequestContent<T extends OperationId> = operations[T] extends {
47
47
  requestBody: {
48
48
  content: infer C;
49
49
  };
50
+ } ? C : operations[T] extends {
51
+ requestBody?: {
52
+ content: infer C;
53
+ };
50
54
  } ? C : never;
51
55
  type ApiRequest<T extends OperationId> = operations[T] extends {
52
56
  requestBody: {
@@ -54,6 +58,12 @@ type ApiRequest<T extends OperationId> = operations[T] extends {
54
58
  'application/json': infer R;
55
59
  };
56
60
  };
61
+ } ? R : operations[T] extends {
62
+ requestBody?: {
63
+ content: {
64
+ 'application/json': infer R;
65
+ };
66
+ };
57
67
  } ? R : RequestContent<T> extends {
58
68
  'multipart/form-data': infer R;
59
69
  } ? R | MultipartPayload : operations[T] extends {
@@ -279,6 +289,18 @@ declare const admin: {
279
289
  };
280
290
  };
281
291
  }>;
292
+ fetchLandlordOptions: () => Promise<{
293
+ message?: string;
294
+ event?: string | null;
295
+ data?: {
296
+ items?: {
297
+ uid?: string;
298
+ avatar?: string;
299
+ name?: string;
300
+ email?: string;
301
+ }[];
302
+ };
303
+ }>;
282
304
  createLandlordListingDraft: (params: ApiPathParams<"createLandlordListingDraftAdmin">, payload: ApiRequest<"createLandlordListingDraftAdmin">) => Promise<{
283
305
  data?: {
284
306
  draft_name?: string;
@@ -364,6 +386,18 @@ declare const admin: {
364
386
  };
365
387
  };
366
388
  }>;
389
+ fetchTenantOptions: () => Promise<{
390
+ message?: string;
391
+ event?: string | null;
392
+ data?: {
393
+ items?: {
394
+ uid?: string;
395
+ avatar?: string;
396
+ name?: string;
397
+ email?: string;
398
+ }[];
399
+ };
400
+ }>;
367
401
  fetchUser: (params: ApiPathParams<"fetchUserAdmin">) => Promise<{
368
402
  message?: string;
369
403
  event?: string | null;
@@ -1105,7 +1139,17 @@ declare const admin: {
1105
1139
  media?: unknown[];
1106
1140
  };
1107
1141
  }>;
1108
- getFeatures: () => Promise<unknown>;
1142
+ getFeatures: (payload: ApiRequest<"getFeaturesAdmin">) => Promise<{
1143
+ data?: {
1144
+ group?: {
1145
+ id?: number;
1146
+ name?: string;
1147
+ description?: string;
1148
+ display_order?: number;
1149
+ };
1150
+ features?: unknown[];
1151
+ }[];
1152
+ }>;
1109
1153
  createFeature: (payload: ApiRequest<"createFeature">) => Promise<{
1110
1154
  data?: {
1111
1155
  id?: number;
@@ -1999,14 +2043,14 @@ declare const github: {
1999
2043
  declare const feature: {
2000
2044
  get: (query?: Expand<ApiRequest<"getFeature">>) => Promise<{
2001
2045
  data?: {
2002
- id?: number;
2003
- category_id?: number;
2004
- name?: string;
2005
- description?: string;
2006
- icon?: string;
2007
- is_active?: boolean;
2008
- is_filterable?: boolean;
2009
- };
2046
+ group?: {
2047
+ id?: number;
2048
+ name?: string;
2049
+ description?: string;
2050
+ display_order?: number;
2051
+ };
2052
+ features?: unknown[];
2053
+ }[];
2010
2054
  }>;
2011
2055
  };
2012
2056
 
@@ -2678,7 +2722,9 @@ declare const listings: {
2678
2722
  price?: string | null;
2679
2723
  state?: string;
2680
2724
  is_visible?: boolean;
2681
- summary?: unknown[];
2725
+ summary?: {
2726
+ availability?: string | null;
2727
+ };
2682
2728
  workflow?: unknown[];
2683
2729
  media?: unknown[];
2684
2730
  }[];
package/dist/index.js CHANGED
@@ -175,6 +175,9 @@ var admin = {
175
175
  fetchLandlordList: (query) => {
176
176
  return api.get("fetchLandlordListAdmin", "/api/v1/portal/admin/users/landlords/fetch-all", query);
177
177
  },
178
+ fetchLandlordOptions: () => {
179
+ return api.get("fetchLandlordOptionsAdmin", "/api/v1/portal/admin/users/landlords/options");
180
+ },
178
181
  createLandlordListingDraft: (params, payload) => {
179
182
  return api.post("createLandlordListingDraftAdmin", `/api/v1/portal/admin/users/landlords/${params.landlord_uid}/create-listing`, payload);
180
183
  },
@@ -184,6 +187,9 @@ var admin = {
184
187
  fetchTenantList: (query) => {
185
188
  return api.get("fetchTenantListAdmin", "/api/v1/portal/admin/users/tenants/fetch-all", query);
186
189
  },
190
+ fetchTenantOptions: () => {
191
+ return api.get("fetchTenantOptionsAdmin", "/api/v1/portal/admin/users/tenants/options");
192
+ },
187
193
  fetchUser: (params) => {
188
194
  return api.get("fetchUserAdmin", `/api/v1/portal/admin/users/fetch-one/${params.user_uid}`);
189
195
  },
@@ -298,8 +304,8 @@ var admin = {
298
304
  republishListing: (params) => {
299
305
  return api.post("republishListing", `/api/v1/portal/admin/listing/${params.listing_uid}/republish`);
300
306
  },
301
- getFeatures: () => {
302
- return api.post("getFeaturesAdmin", "/api/v1/portal/admin/feature/fetch-all");
307
+ getFeatures: (payload) => {
308
+ return api.post("getFeaturesAdmin", "/api/v1/portal/admin/feature/fetch-all", payload);
303
309
  },
304
310
  createFeature: (payload) => {
305
311
  return api.post("createFeature", "/api/v1/portal/admin/feature/create", payload);
package/dist/index.mjs CHANGED
@@ -128,6 +128,9 @@ var admin = {
128
128
  fetchLandlordList: (query) => {
129
129
  return api.get("fetchLandlordListAdmin", "/api/v1/portal/admin/users/landlords/fetch-all", query);
130
130
  },
131
+ fetchLandlordOptions: () => {
132
+ return api.get("fetchLandlordOptionsAdmin", "/api/v1/portal/admin/users/landlords/options");
133
+ },
131
134
  createLandlordListingDraft: (params, payload) => {
132
135
  return api.post("createLandlordListingDraftAdmin", `/api/v1/portal/admin/users/landlords/${params.landlord_uid}/create-listing`, payload);
133
136
  },
@@ -137,6 +140,9 @@ var admin = {
137
140
  fetchTenantList: (query) => {
138
141
  return api.get("fetchTenantListAdmin", "/api/v1/portal/admin/users/tenants/fetch-all", query);
139
142
  },
143
+ fetchTenantOptions: () => {
144
+ return api.get("fetchTenantOptionsAdmin", "/api/v1/portal/admin/users/tenants/options");
145
+ },
140
146
  fetchUser: (params) => {
141
147
  return api.get("fetchUserAdmin", `/api/v1/portal/admin/users/fetch-one/${params.user_uid}`);
142
148
  },
@@ -251,8 +257,8 @@ var admin = {
251
257
  republishListing: (params) => {
252
258
  return api.post("republishListing", `/api/v1/portal/admin/listing/${params.listing_uid}/republish`);
253
259
  },
254
- getFeatures: () => {
255
- return api.post("getFeaturesAdmin", "/api/v1/portal/admin/feature/fetch-all");
260
+ getFeatures: (payload) => {
261
+ return api.post("getFeaturesAdmin", "/api/v1/portal/admin/feature/fetch-all", payload);
256
262
  },
257
263
  createFeature: (payload) => {
258
264
  return api.post("createFeature", "/api/v1/portal/admin/feature/create", payload);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@justins-home/api-services",
3
- "version": "1.2.27",
3
+ "version": "1.2.29",
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.21",
20
- "@justins-home/types": "1.1.21"
19
+ "@justins-home/http-client": "1.1.23",
20
+ "@justins-home/types": "1.1.23"
21
21
  },
22
22
  "publishConfig": {
23
23
  "access": "public"