@homespot-sdk/validators 0.0.644 → 0.0.646
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.ts +518 -2156
- package/dist/index.js +156 -167
- package/package.json +4 -4
- package/src/index.ts +156 -167
package/src/index.ts
CHANGED
|
@@ -14,16 +14,25 @@ const RolesRequest = z
|
|
|
14
14
|
'ROLE_WRITE',
|
|
15
15
|
'MEMBER_READ',
|
|
16
16
|
'MEMBER_WRITE',
|
|
17
|
+
'LEAD_READ',
|
|
18
|
+
'LEAD_WRITE',
|
|
19
|
+
'LEAD_READ_ALL',
|
|
20
|
+
'LEAD_WRITE_ALL',
|
|
17
21
|
])
|
|
18
22
|
),
|
|
19
23
|
})
|
|
24
|
+
.strict()
|
|
25
|
+
.passthrough();
|
|
26
|
+
const AssignRoleRequest = z
|
|
27
|
+
.object({ roleId: z.number().int() })
|
|
28
|
+
.strict()
|
|
20
29
|
.passthrough();
|
|
21
|
-
const AssignRoleRequest = z.object({ roleId: z.number().int() }).passthrough();
|
|
22
30
|
const BatchAssignRoleRequest = z
|
|
23
31
|
.object({
|
|
24
32
|
roleId: z.number().int(),
|
|
25
33
|
memberIds: z.array(z.string().uuid()).min(1),
|
|
26
34
|
})
|
|
35
|
+
.strict()
|
|
27
36
|
.passthrough();
|
|
28
37
|
const ChangeStatusRequest = z
|
|
29
38
|
.object({
|
|
@@ -36,24 +45,35 @@ const ChangeStatusRequest = z
|
|
|
36
45
|
'LOST',
|
|
37
46
|
]),
|
|
38
47
|
})
|
|
48
|
+
.strict()
|
|
49
|
+
.passthrough();
|
|
50
|
+
const SourceRequest = z
|
|
51
|
+
.object({ sourceUrl: z.string().min(1) })
|
|
52
|
+
.strict()
|
|
53
|
+
.passthrough();
|
|
54
|
+
const UpdateNoteRequest = z
|
|
55
|
+
.object({ note: z.string().min(1) })
|
|
56
|
+
.strict()
|
|
39
57
|
.passthrough();
|
|
40
|
-
const SourceRequest = z.object({ sourceUrl: z.string().min(1) }).passthrough();
|
|
41
58
|
const PriceRangeRequest = z
|
|
42
59
|
.object({ min: z.number(), max: z.number() })
|
|
43
60
|
.partial()
|
|
61
|
+
.strict()
|
|
44
62
|
.passthrough();
|
|
45
63
|
const LocationRefRequest = z
|
|
46
64
|
.object({
|
|
47
65
|
regionId: z.number().int(),
|
|
48
|
-
cityId: z.number().int(),
|
|
49
66
|
districtId: z.number().int(),
|
|
50
67
|
subDistrictId: z.number().int(),
|
|
51
68
|
streetId: z.number().int(),
|
|
52
69
|
})
|
|
53
70
|
.partial()
|
|
71
|
+
.strict()
|
|
54
72
|
.passthrough();
|
|
55
|
-
const
|
|
73
|
+
const LeadIntentRequest = z
|
|
56
74
|
.object({
|
|
75
|
+
clientType: z.enum(['LISTING', 'SEEKING']),
|
|
76
|
+
listingType: z.enum(['SALE', 'RENT', 'DAILY_RENT', 'PLEDGE']),
|
|
57
77
|
propertyType: z.enum([
|
|
58
78
|
'HOUSE',
|
|
59
79
|
'TOWN_HOUSE',
|
|
@@ -76,60 +96,12 @@ const SearchIntentRequest = z
|
|
|
76
96
|
'WAREHOUSE',
|
|
77
97
|
'GARAGE',
|
|
78
98
|
]),
|
|
79
|
-
|
|
80
|
-
budget: PriceRangeRequest.optional(),
|
|
99
|
+
price: PriceRangeRequest.optional(),
|
|
81
100
|
targetLocation: LocationRefRequest.optional(),
|
|
82
101
|
area: z.number().optional(),
|
|
83
102
|
numberOfRooms: z.number().int().optional(),
|
|
84
103
|
})
|
|
85
|
-
.
|
|
86
|
-
const UpdateNoteRequest = z.object({ note: z.string().min(1) }).passthrough();
|
|
87
|
-
const CoordinatesRequest = z
|
|
88
|
-
.object({
|
|
89
|
-
lat: z.number().gte(-90).lte(90),
|
|
90
|
-
lng: z.number().gte(-90).lte(90),
|
|
91
|
-
})
|
|
92
|
-
.passthrough();
|
|
93
|
-
const AddressRefRequest = z
|
|
94
|
-
.object({
|
|
95
|
-
regionId: z.number().int().optional(),
|
|
96
|
-
cityId: z.number().int().optional(),
|
|
97
|
-
districtId: z.number().int().optional(),
|
|
98
|
-
subDistrictId: z.number().int().optional(),
|
|
99
|
-
streetId: z.number().int().optional(),
|
|
100
|
-
coordinates: CoordinatesRequest,
|
|
101
|
-
})
|
|
102
|
-
.passthrough();
|
|
103
|
-
const ListingIntentRequest = z
|
|
104
|
-
.object({
|
|
105
|
-
propertyType: z.enum([
|
|
106
|
-
'HOUSE',
|
|
107
|
-
'TOWN_HOUSE',
|
|
108
|
-
'COUNTRY_HOUSE',
|
|
109
|
-
'VILLA',
|
|
110
|
-
'COTTAGE',
|
|
111
|
-
'APARTMENT',
|
|
112
|
-
'DUPLEX',
|
|
113
|
-
'TRIPLEX',
|
|
114
|
-
'SEMI_BASEMENT',
|
|
115
|
-
'ATTIC',
|
|
116
|
-
'AGRICULTURAL_LAND',
|
|
117
|
-
'RESIDENTIAL_LAND',
|
|
118
|
-
'HOTEL_ROOM',
|
|
119
|
-
'MOTEL_ROOM',
|
|
120
|
-
'CO_LIVING_SPACE',
|
|
121
|
-
'OFFICE',
|
|
122
|
-
'COMMERCIAL_SPACE',
|
|
123
|
-
'CO_WORKING_SPACE',
|
|
124
|
-
'WAREHOUSE',
|
|
125
|
-
'GARAGE',
|
|
126
|
-
]),
|
|
127
|
-
dealType: z.enum(['BUY', 'RENT']),
|
|
128
|
-
desiredPrice: PriceRangeRequest.optional(),
|
|
129
|
-
address: AddressRefRequest.optional(),
|
|
130
|
-
area: z.number().optional(),
|
|
131
|
-
numberOfRooms: z.number().int().optional(),
|
|
132
|
-
})
|
|
104
|
+
.strict()
|
|
133
105
|
.passthrough();
|
|
134
106
|
const ContactInfoRequest = z
|
|
135
107
|
.object({
|
|
@@ -138,9 +110,11 @@ const ContactInfoRequest = z
|
|
|
138
110
|
email: z.string().email().optional(),
|
|
139
111
|
phone: z.string().min(1),
|
|
140
112
|
})
|
|
113
|
+
.strict()
|
|
141
114
|
.passthrough();
|
|
142
115
|
const AssignToMemberRequest = z
|
|
143
116
|
.object({ memberId: z.string().uuid() })
|
|
117
|
+
.strict()
|
|
144
118
|
.passthrough();
|
|
145
119
|
const AddressRequest = z
|
|
146
120
|
.object({
|
|
@@ -150,6 +124,7 @@ const AddressRequest = z
|
|
|
150
124
|
subdistrict: z.string().min(0).max(100),
|
|
151
125
|
street: z.string().min(0).max(255),
|
|
152
126
|
})
|
|
127
|
+
.strict()
|
|
153
128
|
.passthrough();
|
|
154
129
|
const CreateAgencyRequest = z
|
|
155
130
|
.object({
|
|
@@ -161,6 +136,7 @@ const CreateAgencyRequest = z
|
|
|
161
136
|
address: AddressRequest,
|
|
162
137
|
yearSince: z.number().int(),
|
|
163
138
|
})
|
|
139
|
+
.strict()
|
|
164
140
|
.passthrough();
|
|
165
141
|
const SocialMediaRequest = z
|
|
166
142
|
.object({
|
|
@@ -173,9 +149,11 @@ const SocialMediaRequest = z
|
|
|
173
149
|
]),
|
|
174
150
|
url: z.string().optional(),
|
|
175
151
|
})
|
|
152
|
+
.strict()
|
|
176
153
|
.passthrough();
|
|
177
154
|
const SocialMediasRequest = z
|
|
178
155
|
.object({ data: z.array(SocialMediaRequest).min(1).max(5) })
|
|
156
|
+
.strict()
|
|
179
157
|
.passthrough();
|
|
180
158
|
const CreateLeadRequest = z
|
|
181
159
|
.object({
|
|
@@ -183,12 +161,15 @@ const CreateLeadRequest = z
|
|
|
183
161
|
note: z.string().min(0).max(500).optional(),
|
|
184
162
|
sourceUrl: z.string().optional(),
|
|
185
163
|
})
|
|
164
|
+
.strict()
|
|
186
165
|
.passthrough();
|
|
187
166
|
const InvitationDetailsRequest = z
|
|
188
167
|
.object({ email: z.string().email(), roleId: z.number().int() })
|
|
168
|
+
.strict()
|
|
189
169
|
.passthrough();
|
|
190
170
|
const InviteMemberRequest = z
|
|
191
171
|
.object({ emails: z.array(InvitationDetailsRequest).min(1) })
|
|
172
|
+
.strict()
|
|
192
173
|
.passthrough();
|
|
193
174
|
const PhotoRequest = z
|
|
194
175
|
.object({
|
|
@@ -197,16 +178,20 @@ const PhotoRequest = z
|
|
|
197
178
|
width: z.number().int().gte(10).lte(11000),
|
|
198
179
|
height: z.number().int().gte(10).lte(11000).optional(),
|
|
199
180
|
})
|
|
181
|
+
.strict()
|
|
200
182
|
.passthrough();
|
|
201
|
-
const IdResponse = z.object({ id: z.string() }).passthrough();
|
|
183
|
+
const IdResponse = z.object({ id: z.string() }).strict().passthrough();
|
|
202
184
|
const PresignedUrlResponse = z
|
|
203
185
|
.object({ originalName: z.string(), key: z.string(), url: z.string() })
|
|
186
|
+
.strict()
|
|
204
187
|
.passthrough();
|
|
205
188
|
const PresignedUrlsResponse = z
|
|
206
189
|
.object({ data: z.array(PresignedUrlResponse) })
|
|
190
|
+
.strict()
|
|
207
191
|
.passthrough();
|
|
208
192
|
const UploadAcknowledgmentResponse = z
|
|
209
193
|
.object({ success: z.array(z.string()), fail: z.array(z.string()) })
|
|
194
|
+
.strict()
|
|
210
195
|
.passthrough();
|
|
211
196
|
const OrganizationSummaryViewResponse = z
|
|
212
197
|
.object({
|
|
@@ -226,19 +211,26 @@ const OrganizationSummaryViewResponse = z
|
|
|
226
211
|
'ROLE_WRITE',
|
|
227
212
|
'MEMBER_READ',
|
|
228
213
|
'MEMBER_WRITE',
|
|
214
|
+
'LEAD_READ',
|
|
215
|
+
'LEAD_WRITE',
|
|
216
|
+
'LEAD_READ_ALL',
|
|
217
|
+
'LEAD_WRITE_ALL',
|
|
229
218
|
])
|
|
230
219
|
),
|
|
231
220
|
status: z.enum(['NEW', 'ACTIVE', 'PAYMENT_FAILED', 'INACTIVE']),
|
|
232
221
|
})
|
|
222
|
+
.strict()
|
|
233
223
|
.passthrough();
|
|
234
224
|
const UserSummaryViewResponse = z
|
|
235
225
|
.object({ email: z.string(), firstName: z.string(), lastName: z.string() })
|
|
226
|
+
.strict()
|
|
236
227
|
.passthrough();
|
|
237
228
|
const UserContextViewResponse = z
|
|
238
229
|
.object({
|
|
239
230
|
user: UserSummaryViewResponse,
|
|
240
231
|
organizations: z.array(OrganizationSummaryViewResponse),
|
|
241
232
|
})
|
|
233
|
+
.strict()
|
|
242
234
|
.passthrough();
|
|
243
235
|
const RoleResponse = z
|
|
244
236
|
.object({
|
|
@@ -254,13 +246,19 @@ const RoleResponse = z
|
|
|
254
246
|
'ROLE_WRITE',
|
|
255
247
|
'MEMBER_READ',
|
|
256
248
|
'MEMBER_WRITE',
|
|
249
|
+
'LEAD_READ',
|
|
250
|
+
'LEAD_WRITE',
|
|
251
|
+
'LEAD_READ_ALL',
|
|
252
|
+
'LEAD_WRITE_ALL',
|
|
257
253
|
])
|
|
258
254
|
),
|
|
259
255
|
})
|
|
256
|
+
.strict()
|
|
260
257
|
.passthrough();
|
|
261
258
|
const SortObject = z
|
|
262
|
-
.object({ empty: z.boolean(),
|
|
259
|
+
.object({ empty: z.boolean(), unsorted: z.boolean(), sorted: z.boolean() })
|
|
263
260
|
.partial()
|
|
261
|
+
.strict()
|
|
264
262
|
.passthrough();
|
|
265
263
|
const PageableObject = z
|
|
266
264
|
.object({
|
|
@@ -268,10 +266,11 @@ const PageableObject = z
|
|
|
268
266
|
paged: z.boolean(),
|
|
269
267
|
pageNumber: z.number().int(),
|
|
270
268
|
pageSize: z.number().int(),
|
|
271
|
-
unpaged: z.boolean(),
|
|
272
269
|
sort: SortObject,
|
|
270
|
+
unpaged: z.boolean(),
|
|
273
271
|
})
|
|
274
272
|
.partial()
|
|
273
|
+
.strict()
|
|
275
274
|
.passthrough();
|
|
276
275
|
const PageRoleResponse = z
|
|
277
276
|
.object({
|
|
@@ -288,6 +287,7 @@ const PageRoleResponse = z
|
|
|
288
287
|
empty: z.boolean(),
|
|
289
288
|
})
|
|
290
289
|
.partial()
|
|
290
|
+
.strict()
|
|
291
291
|
.passthrough();
|
|
292
292
|
const InvitationDetailsResponse = z
|
|
293
293
|
.object({
|
|
@@ -298,6 +298,7 @@ const InvitationDetailsResponse = z
|
|
|
298
298
|
agencyName: z.string(),
|
|
299
299
|
agencyLogo: z.string().optional(),
|
|
300
300
|
})
|
|
301
|
+
.strict()
|
|
301
302
|
.passthrough();
|
|
302
303
|
const AgencySummaryResponse = z
|
|
303
304
|
.object({
|
|
@@ -313,6 +314,7 @@ const AgencySummaryResponse = z
|
|
|
313
314
|
status: z.enum(['NEW', 'ACTIVE', 'PAYMENT_FAILED', 'INACTIVE']),
|
|
314
315
|
logo: z.string().optional(),
|
|
315
316
|
})
|
|
317
|
+
.strict()
|
|
316
318
|
.passthrough();
|
|
317
319
|
const PageMetadata = z
|
|
318
320
|
.object({
|
|
@@ -322,10 +324,12 @@ const PageMetadata = z
|
|
|
322
324
|
totalPages: z.number().int(),
|
|
323
325
|
})
|
|
324
326
|
.partial()
|
|
327
|
+
.strict()
|
|
325
328
|
.passthrough();
|
|
326
329
|
const PagedModelAgencySummaryResponse = z
|
|
327
330
|
.object({ content: z.array(AgencySummaryResponse), page: PageMetadata })
|
|
328
331
|
.partial()
|
|
332
|
+
.strict()
|
|
329
333
|
.passthrough();
|
|
330
334
|
const PermissionResponse = z
|
|
331
335
|
.object({
|
|
@@ -337,6 +341,10 @@ const PermissionResponse = z
|
|
|
337
341
|
'ROLE_WRITE',
|
|
338
342
|
'MEMBER_READ',
|
|
339
343
|
'MEMBER_WRITE',
|
|
344
|
+
'LEAD_READ',
|
|
345
|
+
'LEAD_WRITE',
|
|
346
|
+
'LEAD_READ_ALL',
|
|
347
|
+
'LEAD_WRITE_ALL',
|
|
340
348
|
]),
|
|
341
349
|
implied: z.array(
|
|
342
350
|
z.enum([
|
|
@@ -347,15 +355,21 @@ const PermissionResponse = z
|
|
|
347
355
|
'ROLE_WRITE',
|
|
348
356
|
'MEMBER_READ',
|
|
349
357
|
'MEMBER_WRITE',
|
|
358
|
+
'LEAD_READ',
|
|
359
|
+
'LEAD_WRITE',
|
|
360
|
+
'LEAD_READ_ALL',
|
|
361
|
+
'LEAD_WRITE_ALL',
|
|
350
362
|
])
|
|
351
363
|
),
|
|
352
364
|
})
|
|
365
|
+
.strict()
|
|
353
366
|
.passthrough();
|
|
354
367
|
const GroupedPermissionsResponse = z
|
|
355
368
|
.object({
|
|
356
|
-
group: z.enum(['AGENCY', 'INVITATION', 'ROLE', 'MEMBER']),
|
|
369
|
+
group: z.enum(['AGENCY', 'INVITATION', 'ROLE', 'MEMBER', 'LEAD']),
|
|
357
370
|
permissions: z.array(PermissionResponse),
|
|
358
371
|
})
|
|
372
|
+
.strict()
|
|
359
373
|
.passthrough();
|
|
360
374
|
const MemberViewResponse = z
|
|
361
375
|
.object({
|
|
@@ -368,49 +382,17 @@ const MemberViewResponse = z
|
|
|
368
382
|
roleName: z.string(),
|
|
369
383
|
joinedAt: z.string().datetime({ offset: true }),
|
|
370
384
|
})
|
|
385
|
+
.strict()
|
|
371
386
|
.passthrough();
|
|
372
387
|
const PagedModelMemberViewResponse = z
|
|
373
388
|
.object({ content: z.array(MemberViewResponse), page: PageMetadata })
|
|
374
389
|
.partial()
|
|
390
|
+
.strict()
|
|
375
391
|
.passthrough();
|
|
376
|
-
const
|
|
377
|
-
.object({
|
|
378
|
-
propertyType: z.enum([
|
|
379
|
-
'HOUSE',
|
|
380
|
-
'TOWN_HOUSE',
|
|
381
|
-
'COUNTRY_HOUSE',
|
|
382
|
-
'VILLA',
|
|
383
|
-
'COTTAGE',
|
|
384
|
-
'APARTMENT',
|
|
385
|
-
'DUPLEX',
|
|
386
|
-
'TRIPLEX',
|
|
387
|
-
'SEMI_BASEMENT',
|
|
388
|
-
'ATTIC',
|
|
389
|
-
'AGRICULTURAL_LAND',
|
|
390
|
-
'RESIDENTIAL_LAND',
|
|
391
|
-
'HOTEL_ROOM',
|
|
392
|
-
'MOTEL_ROOM',
|
|
393
|
-
'CO_LIVING_SPACE',
|
|
394
|
-
'OFFICE',
|
|
395
|
-
'COMMERCIAL_SPACE',
|
|
396
|
-
'CO_WORKING_SPACE',
|
|
397
|
-
'WAREHOUSE',
|
|
398
|
-
'GARAGE',
|
|
399
|
-
]),
|
|
400
|
-
dealType: z.enum(['BUY', 'RENT']),
|
|
401
|
-
budgetMin: z.number().optional(),
|
|
402
|
-
budgetMax: z.number().optional(),
|
|
403
|
-
regionId: z.number().int().optional(),
|
|
404
|
-
cityId: z.number().int().optional(),
|
|
405
|
-
districtId: z.number().int().optional(),
|
|
406
|
-
subDistrictId: z.number().int().optional(),
|
|
407
|
-
streetId: z.number().int().optional(),
|
|
408
|
-
area: z.number().optional(),
|
|
409
|
-
numberOfRooms: z.number().int().optional(),
|
|
410
|
-
})
|
|
411
|
-
.passthrough();
|
|
412
|
-
const ListingIntentResponse = z
|
|
392
|
+
const IntentResponse = z
|
|
413
393
|
.object({
|
|
394
|
+
clientType: z.enum(['LISTING', 'SEEKING']),
|
|
395
|
+
listingType: z.enum(['SALE', 'RENT', 'DAILY_RENT', 'PLEDGE']),
|
|
414
396
|
propertyType: z.enum([
|
|
415
397
|
'HOUSE',
|
|
416
398
|
'TOWN_HOUSE',
|
|
@@ -433,19 +415,16 @@ const ListingIntentResponse = z
|
|
|
433
415
|
'WAREHOUSE',
|
|
434
416
|
'GARAGE',
|
|
435
417
|
]),
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
desiredPriceMax: z.number().optional(),
|
|
418
|
+
priceMin: z.number().optional(),
|
|
419
|
+
priceMax: z.number().optional(),
|
|
439
420
|
regionId: z.number().int().optional(),
|
|
440
|
-
cityId: z.number().int().optional(),
|
|
441
421
|
districtId: z.number().int().optional(),
|
|
442
422
|
subDistrictId: z.number().int().optional(),
|
|
443
423
|
streetId: z.number().int().optional(),
|
|
444
|
-
lat: z.number().optional(),
|
|
445
|
-
lng: z.number().optional(),
|
|
446
424
|
area: z.number().optional(),
|
|
447
425
|
numberOfRooms: z.number().int().optional(),
|
|
448
426
|
})
|
|
427
|
+
.strict()
|
|
449
428
|
.passthrough();
|
|
450
429
|
const LeadProjectionResponse = z
|
|
451
430
|
.object({
|
|
@@ -463,15 +442,14 @@ const LeadProjectionResponse = z
|
|
|
463
442
|
contactFullName: z.string().optional(),
|
|
464
443
|
contactPhoneNumber: z.string(),
|
|
465
444
|
contactEmail: z.string().optional(),
|
|
466
|
-
|
|
467
|
-
noteContent: z.string().optional(),
|
|
445
|
+
note: z.string().optional(),
|
|
468
446
|
sourceType: z.string().optional(),
|
|
469
447
|
sourceLink: z.string().optional(),
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
listingIntents: z.array(ListingIntentResponse).optional(),
|
|
448
|
+
isSearching: z.boolean(),
|
|
449
|
+
isListing: z.boolean(),
|
|
450
|
+
intents: z.array(IntentResponse).optional(),
|
|
474
451
|
})
|
|
452
|
+
.strict()
|
|
475
453
|
.passthrough();
|
|
476
454
|
const PageLeadProjectionResponse = z
|
|
477
455
|
.object({
|
|
@@ -488,6 +466,7 @@ const PageLeadProjectionResponse = z
|
|
|
488
466
|
empty: z.boolean(),
|
|
489
467
|
})
|
|
490
468
|
.partial()
|
|
469
|
+
.strict()
|
|
491
470
|
.passthrough();
|
|
492
471
|
const InvitationViewResponse = z
|
|
493
472
|
.object({
|
|
@@ -499,10 +478,12 @@ const InvitationViewResponse = z
|
|
|
499
478
|
acceptedAt: z.string().datetime({ offset: true }).optional(),
|
|
500
479
|
acceptedBy: z.string().optional(),
|
|
501
480
|
})
|
|
481
|
+
.strict()
|
|
502
482
|
.passthrough();
|
|
503
483
|
const PagedModelInvitationViewResponse = z
|
|
504
484
|
.object({ content: z.array(InvitationViewResponse), page: PageMetadata })
|
|
505
485
|
.partial()
|
|
486
|
+
.strict()
|
|
506
487
|
.passthrough();
|
|
507
488
|
const AddressViewResponse = z
|
|
508
489
|
.object({
|
|
@@ -512,6 +493,7 @@ const AddressViewResponse = z
|
|
|
512
493
|
subdistrict: z.string(),
|
|
513
494
|
street: z.string(),
|
|
514
495
|
})
|
|
496
|
+
.strict()
|
|
515
497
|
.passthrough();
|
|
516
498
|
const AgencyProfileResponse = z
|
|
517
499
|
.object({
|
|
@@ -523,6 +505,7 @@ const AgencyProfileResponse = z
|
|
|
523
505
|
address: AddressViewResponse,
|
|
524
506
|
yearSince: z.number().int(),
|
|
525
507
|
})
|
|
508
|
+
.strict()
|
|
526
509
|
.passthrough();
|
|
527
510
|
|
|
528
511
|
export const schemas = {
|
|
@@ -531,13 +514,10 @@ export const schemas = {
|
|
|
531
514
|
BatchAssignRoleRequest,
|
|
532
515
|
ChangeStatusRequest,
|
|
533
516
|
SourceRequest,
|
|
517
|
+
UpdateNoteRequest,
|
|
534
518
|
PriceRangeRequest,
|
|
535
519
|
LocationRefRequest,
|
|
536
|
-
|
|
537
|
-
UpdateNoteRequest,
|
|
538
|
-
CoordinatesRequest,
|
|
539
|
-
AddressRefRequest,
|
|
540
|
-
ListingIntentRequest,
|
|
520
|
+
LeadIntentRequest,
|
|
541
521
|
ContactInfoRequest,
|
|
542
522
|
AssignToMemberRequest,
|
|
543
523
|
AddressRequest,
|
|
@@ -567,8 +547,7 @@ export const schemas = {
|
|
|
567
547
|
GroupedPermissionsResponse,
|
|
568
548
|
MemberViewResponse,
|
|
569
549
|
PagedModelMemberViewResponse,
|
|
570
|
-
|
|
571
|
-
ListingIntentResponse,
|
|
550
|
+
IntentResponse,
|
|
572
551
|
LeadProjectionResponse,
|
|
573
552
|
PageLeadProjectionResponse,
|
|
574
553
|
InvitationViewResponse,
|
|
@@ -776,12 +755,12 @@ const endpoints = makeApi([
|
|
|
776
755
|
.optional(),
|
|
777
756
|
},
|
|
778
757
|
{
|
|
779
|
-
name: '
|
|
758
|
+
name: 'isSearching',
|
|
780
759
|
type: 'Query',
|
|
781
760
|
schema: z.boolean().optional(),
|
|
782
761
|
},
|
|
783
762
|
{
|
|
784
|
-
name: '
|
|
763
|
+
name: 'isListing',
|
|
785
764
|
type: 'Query',
|
|
786
765
|
schema: z.boolean().optional(),
|
|
787
766
|
},
|
|
@@ -847,11 +826,6 @@ const endpoints = makeApi([
|
|
|
847
826
|
type: 'Query',
|
|
848
827
|
schema: z.number().int(),
|
|
849
828
|
},
|
|
850
|
-
{
|
|
851
|
-
name: 'type',
|
|
852
|
-
type: 'Query',
|
|
853
|
-
schema: z.enum(['SEARCH', 'LISTING']),
|
|
854
|
-
},
|
|
855
829
|
],
|
|
856
830
|
response: z.void(),
|
|
857
831
|
},
|
|
@@ -864,7 +838,10 @@ const endpoints = makeApi([
|
|
|
864
838
|
{
|
|
865
839
|
name: 'body',
|
|
866
840
|
type: 'Body',
|
|
867
|
-
schema: z
|
|
841
|
+
schema: z
|
|
842
|
+
.object({ memberId: z.string().uuid() })
|
|
843
|
+
.strict()
|
|
844
|
+
.passthrough(),
|
|
868
845
|
},
|
|
869
846
|
{
|
|
870
847
|
name: 'leadId',
|
|
@@ -895,14 +872,14 @@ const endpoints = makeApi([
|
|
|
895
872
|
},
|
|
896
873
|
{
|
|
897
874
|
method: 'put',
|
|
898
|
-
path: '/lead/:leadId/
|
|
899
|
-
alias: '
|
|
875
|
+
path: '/lead/:leadId/intent',
|
|
876
|
+
alias: 'updateIntent',
|
|
900
877
|
requestFormat: 'json',
|
|
901
878
|
parameters: [
|
|
902
879
|
{
|
|
903
880
|
name: 'body',
|
|
904
881
|
type: 'Body',
|
|
905
|
-
schema:
|
|
882
|
+
schema: LeadIntentRequest,
|
|
906
883
|
},
|
|
907
884
|
{
|
|
908
885
|
name: 'leadId',
|
|
@@ -919,14 +896,14 @@ const endpoints = makeApi([
|
|
|
919
896
|
},
|
|
920
897
|
{
|
|
921
898
|
method: 'post',
|
|
922
|
-
path: '/lead/:leadId/
|
|
923
|
-
alias: '
|
|
899
|
+
path: '/lead/:leadId/intent',
|
|
900
|
+
alias: 'addIntent',
|
|
924
901
|
requestFormat: 'json',
|
|
925
902
|
parameters: [
|
|
926
903
|
{
|
|
927
904
|
name: 'body',
|
|
928
905
|
type: 'Body',
|
|
929
|
-
schema:
|
|
906
|
+
schema: LeadIntentRequest,
|
|
930
907
|
},
|
|
931
908
|
{
|
|
932
909
|
name: 'leadId',
|
|
@@ -945,7 +922,10 @@ const endpoints = makeApi([
|
|
|
945
922
|
{
|
|
946
923
|
name: 'body',
|
|
947
924
|
type: 'Body',
|
|
948
|
-
schema: z
|
|
925
|
+
schema: z
|
|
926
|
+
.object({ note: z.string().min(1) })
|
|
927
|
+
.strict()
|
|
928
|
+
.passthrough(),
|
|
949
929
|
},
|
|
950
930
|
{
|
|
951
931
|
name: 'leadId',
|
|
@@ -957,38 +937,36 @@ const endpoints = makeApi([
|
|
|
957
937
|
},
|
|
958
938
|
{
|
|
959
939
|
method: 'put',
|
|
960
|
-
path: '/lead/:leadId/
|
|
961
|
-
alias: '
|
|
940
|
+
path: '/lead/:leadId/source',
|
|
941
|
+
alias: 'updateSource',
|
|
962
942
|
requestFormat: 'json',
|
|
963
943
|
parameters: [
|
|
964
944
|
{
|
|
965
945
|
name: 'body',
|
|
966
946
|
type: 'Body',
|
|
967
|
-
schema:
|
|
947
|
+
schema: z
|
|
948
|
+
.object({ sourceUrl: z.string().min(1) })
|
|
949
|
+
.strict()
|
|
950
|
+
.passthrough(),
|
|
968
951
|
},
|
|
969
952
|
{
|
|
970
953
|
name: 'leadId',
|
|
971
954
|
type: 'Path',
|
|
972
955
|
schema: z.string().uuid(),
|
|
973
956
|
},
|
|
974
|
-
{
|
|
975
|
-
name: 'index',
|
|
976
|
-
type: 'Query',
|
|
977
|
-
schema: z.number().int(),
|
|
978
|
-
},
|
|
979
957
|
],
|
|
980
958
|
response: z.void(),
|
|
981
959
|
},
|
|
982
960
|
{
|
|
983
|
-
method: '
|
|
984
|
-
path: '/lead/:leadId/
|
|
985
|
-
alias: '
|
|
961
|
+
method: 'put',
|
|
962
|
+
path: '/lead/:leadId/status',
|
|
963
|
+
alias: 'changeStatus',
|
|
986
964
|
requestFormat: 'json',
|
|
987
965
|
parameters: [
|
|
988
966
|
{
|
|
989
967
|
name: 'body',
|
|
990
968
|
type: 'Body',
|
|
991
|
-
schema:
|
|
969
|
+
schema: ChangeStatusRequest,
|
|
992
970
|
},
|
|
993
971
|
{
|
|
994
972
|
name: 'leadId',
|
|
@@ -999,41 +977,49 @@ const endpoints = makeApi([
|
|
|
999
977
|
response: z.void(),
|
|
1000
978
|
},
|
|
1001
979
|
{
|
|
1002
|
-
method: '
|
|
1003
|
-
path: '/lead
|
|
1004
|
-
alias: '
|
|
980
|
+
method: 'get',
|
|
981
|
+
path: '/lead/my',
|
|
982
|
+
alias: 'searchMyLeads',
|
|
1005
983
|
requestFormat: 'json',
|
|
1006
984
|
parameters: [
|
|
1007
985
|
{
|
|
1008
|
-
name: '
|
|
1009
|
-
type: '
|
|
986
|
+
name: 'status',
|
|
987
|
+
type: 'Query',
|
|
1010
988
|
schema: z
|
|
1011
|
-
.
|
|
1012
|
-
|
|
989
|
+
.enum([
|
|
990
|
+
'NEW',
|
|
991
|
+
'ATTEMPTED_CONTACT',
|
|
992
|
+
'CONTACTED',
|
|
993
|
+
'DISQUALIFIED',
|
|
994
|
+
'CONVERTED',
|
|
995
|
+
'LOST',
|
|
996
|
+
])
|
|
997
|
+
.optional(),
|
|
1013
998
|
},
|
|
1014
999
|
{
|
|
1015
|
-
name: '
|
|
1016
|
-
type: '
|
|
1017
|
-
schema: z.
|
|
1000
|
+
name: 'isSearching',
|
|
1001
|
+
type: 'Query',
|
|
1002
|
+
schema: z.boolean().optional(),
|
|
1018
1003
|
},
|
|
1019
|
-
],
|
|
1020
|
-
response: z.void(),
|
|
1021
|
-
},
|
|
1022
|
-
{
|
|
1023
|
-
method: 'put',
|
|
1024
|
-
path: '/lead/:leadId/status',
|
|
1025
|
-
alias: 'changeStatus',
|
|
1026
|
-
requestFormat: 'json',
|
|
1027
|
-
parameters: [
|
|
1028
1004
|
{
|
|
1029
|
-
name: '
|
|
1030
|
-
type: '
|
|
1031
|
-
schema:
|
|
1005
|
+
name: 'isListing',
|
|
1006
|
+
type: 'Query',
|
|
1007
|
+
schema: z.boolean().optional(),
|
|
1032
1008
|
},
|
|
1033
1009
|
{
|
|
1034
|
-
name: '
|
|
1035
|
-
type: '
|
|
1036
|
-
schema: z.
|
|
1010
|
+
name: 'page',
|
|
1011
|
+
type: 'Query',
|
|
1012
|
+
schema: z.number().int().gte(0).optional().default(0),
|
|
1013
|
+
},
|
|
1014
|
+
{
|
|
1015
|
+
name: 'size',
|
|
1016
|
+
type: 'Query',
|
|
1017
|
+
schema: z.number().int().gte(1).optional().default(20),
|
|
1018
|
+
},
|
|
1019
|
+
{
|
|
1020
|
+
name: 'sort',
|
|
1021
|
+
type: 'Query',
|
|
1022
|
+
schema: z.array(z.string()).optional(),
|
|
1037
1023
|
},
|
|
1038
1024
|
],
|
|
1039
1025
|
response: z.void(),
|
|
@@ -1079,7 +1065,10 @@ const endpoints = makeApi([
|
|
|
1079
1065
|
{
|
|
1080
1066
|
name: 'body',
|
|
1081
1067
|
type: 'Body',
|
|
1082
|
-
schema: z
|
|
1068
|
+
schema: z
|
|
1069
|
+
.object({ roleId: z.number().int() })
|
|
1070
|
+
.strict()
|
|
1071
|
+
.passthrough(),
|
|
1083
1072
|
},
|
|
1084
1073
|
{
|
|
1085
1074
|
name: 'memberId',
|