@homespot-sdk/validators 0.0.700 → 0.0.705
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.js +7 -67
- package/package.json +4 -4
- package/src/index.ts +7 -67
package/dist/index.js
CHANGED
|
@@ -22,18 +22,13 @@ const RolesRequest = zod_1.z
|
|
|
22
22
|
'LEAD_WRITE_ALL',
|
|
23
23
|
])),
|
|
24
24
|
})
|
|
25
|
-
.strict()
|
|
26
|
-
.passthrough();
|
|
27
|
-
const AssignRoleRequest = zod_1.z
|
|
28
|
-
.object({ roleId: zod_1.z.number().int() })
|
|
29
|
-
.strict()
|
|
30
25
|
.passthrough();
|
|
26
|
+
const AssignRoleRequest = zod_1.z.object({ roleId: zod_1.z.number().int() }).passthrough();
|
|
31
27
|
const BatchAssignRoleRequest = zod_1.z
|
|
32
28
|
.object({
|
|
33
29
|
roleId: zod_1.z.number().int(),
|
|
34
30
|
memberIds: zod_1.z.array(zod_1.z.string().uuid()).min(1),
|
|
35
31
|
})
|
|
36
|
-
.strict()
|
|
37
32
|
.passthrough();
|
|
38
33
|
const ChangeStatusRequest = zod_1.z
|
|
39
34
|
.object({
|
|
@@ -46,20 +41,12 @@ const ChangeStatusRequest = zod_1.z
|
|
|
46
41
|
'LOST',
|
|
47
42
|
]),
|
|
48
43
|
})
|
|
49
|
-
.strict()
|
|
50
|
-
.passthrough();
|
|
51
|
-
const SourceRequest = zod_1.z
|
|
52
|
-
.object({ sourceUrl: zod_1.z.string().min(1) })
|
|
53
|
-
.strict()
|
|
54
|
-
.passthrough();
|
|
55
|
-
const UpdateNoteRequest = zod_1.z
|
|
56
|
-
.object({ note: zod_1.z.string().min(1) })
|
|
57
|
-
.strict()
|
|
58
44
|
.passthrough();
|
|
45
|
+
const SourceRequest = zod_1.z.object({ sourceUrl: zod_1.z.string().min(1) }).passthrough();
|
|
46
|
+
const UpdateNoteRequest = zod_1.z.object({ note: zod_1.z.string().min(1) }).passthrough();
|
|
59
47
|
const PriceRangeRequest = zod_1.z
|
|
60
48
|
.object({ min: zod_1.z.number(), max: zod_1.z.number() })
|
|
61
49
|
.partial()
|
|
62
|
-
.strict()
|
|
63
50
|
.passthrough();
|
|
64
51
|
const LocationRefRequest = zod_1.z
|
|
65
52
|
.object({
|
|
@@ -69,7 +56,6 @@ const LocationRefRequest = zod_1.z
|
|
|
69
56
|
streetId: zod_1.z.number().int(),
|
|
70
57
|
})
|
|
71
58
|
.partial()
|
|
72
|
-
.strict()
|
|
73
59
|
.passthrough();
|
|
74
60
|
const LeadIntentRequest = zod_1.z
|
|
75
61
|
.object({
|
|
@@ -102,7 +88,6 @@ const LeadIntentRequest = zod_1.z
|
|
|
102
88
|
area: zod_1.z.number().optional(),
|
|
103
89
|
numberOfRooms: zod_1.z.number().int().optional(),
|
|
104
90
|
})
|
|
105
|
-
.strict()
|
|
106
91
|
.passthrough();
|
|
107
92
|
const ContactInfoRequest = zod_1.z
|
|
108
93
|
.object({
|
|
@@ -111,11 +96,9 @@ const ContactInfoRequest = zod_1.z
|
|
|
111
96
|
email: zod_1.z.string().email().optional(),
|
|
112
97
|
phone: zod_1.z.string().min(1),
|
|
113
98
|
})
|
|
114
|
-
.strict()
|
|
115
99
|
.passthrough();
|
|
116
100
|
const AssignToMemberRequest = zod_1.z
|
|
117
101
|
.object({ memberId: zod_1.z.string().uuid() })
|
|
118
|
-
.strict()
|
|
119
102
|
.passthrough();
|
|
120
103
|
const AddressRequest = zod_1.z
|
|
121
104
|
.object({
|
|
@@ -125,7 +108,6 @@ const AddressRequest = zod_1.z
|
|
|
125
108
|
subdistrict: zod_1.z.string().min(0).max(100),
|
|
126
109
|
street: zod_1.z.string().min(0).max(255),
|
|
127
110
|
})
|
|
128
|
-
.strict()
|
|
129
111
|
.passthrough();
|
|
130
112
|
const CreateAgencyRequest = zod_1.z
|
|
131
113
|
.object({
|
|
@@ -137,7 +119,6 @@ const CreateAgencyRequest = zod_1.z
|
|
|
137
119
|
address: AddressRequest,
|
|
138
120
|
yearSince: zod_1.z.number().int(),
|
|
139
121
|
})
|
|
140
|
-
.strict()
|
|
141
122
|
.passthrough();
|
|
142
123
|
const SocialMediaRequest = zod_1.z
|
|
143
124
|
.object({
|
|
@@ -150,11 +131,9 @@ const SocialMediaRequest = zod_1.z
|
|
|
150
131
|
]),
|
|
151
132
|
url: zod_1.z.string().optional(),
|
|
152
133
|
})
|
|
153
|
-
.strict()
|
|
154
134
|
.passthrough();
|
|
155
135
|
const SocialMediasRequest = zod_1.z
|
|
156
136
|
.object({ data: zod_1.z.array(SocialMediaRequest).min(1).max(5) })
|
|
157
|
-
.strict()
|
|
158
137
|
.passthrough();
|
|
159
138
|
const CreateLeadRequest = zod_1.z
|
|
160
139
|
.object({
|
|
@@ -162,15 +141,12 @@ const CreateLeadRequest = zod_1.z
|
|
|
162
141
|
note: zod_1.z.string().min(0).max(500).optional(),
|
|
163
142
|
sourceUrl: zod_1.z.string().optional(),
|
|
164
143
|
})
|
|
165
|
-
.strict()
|
|
166
144
|
.passthrough();
|
|
167
145
|
const InvitationDetailsRequest = zod_1.z
|
|
168
146
|
.object({ email: zod_1.z.string().email(), roleId: zod_1.z.number().int() })
|
|
169
|
-
.strict()
|
|
170
147
|
.passthrough();
|
|
171
148
|
const InviteMemberRequest = zod_1.z
|
|
172
149
|
.object({ emails: zod_1.z.array(InvitationDetailsRequest).min(1) })
|
|
173
|
-
.strict()
|
|
174
150
|
.passthrough();
|
|
175
151
|
const PhotoRequest = zod_1.z
|
|
176
152
|
.object({
|
|
@@ -179,20 +155,16 @@ const PhotoRequest = zod_1.z
|
|
|
179
155
|
width: zod_1.z.number().int().gte(10).lte(11000),
|
|
180
156
|
height: zod_1.z.number().int().gte(10).lte(11000).optional(),
|
|
181
157
|
})
|
|
182
|
-
.strict()
|
|
183
158
|
.passthrough();
|
|
184
|
-
const IdResponse = zod_1.z.object({ id: zod_1.z.string() }).
|
|
159
|
+
const IdResponse = zod_1.z.object({ id: zod_1.z.string() }).passthrough();
|
|
185
160
|
const PresignedUrlResponse = zod_1.z
|
|
186
161
|
.object({ originalName: zod_1.z.string(), key: zod_1.z.string(), url: zod_1.z.string() })
|
|
187
|
-
.strict()
|
|
188
162
|
.passthrough();
|
|
189
163
|
const PresignedUrlsResponse = zod_1.z
|
|
190
164
|
.object({ data: zod_1.z.array(PresignedUrlResponse) })
|
|
191
|
-
.strict()
|
|
192
165
|
.passthrough();
|
|
193
166
|
const UploadAcknowledgmentResponse = zod_1.z
|
|
194
167
|
.object({ success: zod_1.z.array(zod_1.z.string()), fail: zod_1.z.array(zod_1.z.string()) })
|
|
195
|
-
.strict()
|
|
196
168
|
.passthrough();
|
|
197
169
|
const OrganizationSummaryViewResponse = zod_1.z
|
|
198
170
|
.object({
|
|
@@ -218,18 +190,15 @@ const OrganizationSummaryViewResponse = zod_1.z
|
|
|
218
190
|
])),
|
|
219
191
|
status: zod_1.z.enum(['NEW', 'ACTIVE', 'PAYMENT_FAILED', 'INACTIVE']),
|
|
220
192
|
})
|
|
221
|
-
.strict()
|
|
222
193
|
.passthrough();
|
|
223
194
|
const UserSummaryViewResponse = zod_1.z
|
|
224
195
|
.object({ email: zod_1.z.string(), firstName: zod_1.z.string(), lastName: zod_1.z.string() })
|
|
225
|
-
.strict()
|
|
226
196
|
.passthrough();
|
|
227
197
|
const UserContextViewResponse = zod_1.z
|
|
228
198
|
.object({
|
|
229
199
|
user: UserSummaryViewResponse,
|
|
230
200
|
organizations: zod_1.z.array(OrganizationSummaryViewResponse),
|
|
231
201
|
})
|
|
232
|
-
.strict()
|
|
233
202
|
.passthrough();
|
|
234
203
|
const RoleResponse = zod_1.z
|
|
235
204
|
.object({
|
|
@@ -250,12 +219,10 @@ const RoleResponse = zod_1.z
|
|
|
250
219
|
'LEAD_WRITE_ALL',
|
|
251
220
|
])),
|
|
252
221
|
})
|
|
253
|
-
.strict()
|
|
254
222
|
.passthrough();
|
|
255
223
|
const SortObject = zod_1.z
|
|
256
224
|
.object({ empty: zod_1.z.boolean(), unsorted: zod_1.z.boolean(), sorted: zod_1.z.boolean() })
|
|
257
225
|
.partial()
|
|
258
|
-
.strict()
|
|
259
226
|
.passthrough();
|
|
260
227
|
const PageableObject = zod_1.z
|
|
261
228
|
.object({
|
|
@@ -267,7 +234,6 @@ const PageableObject = zod_1.z
|
|
|
267
234
|
unpaged: zod_1.z.boolean(),
|
|
268
235
|
})
|
|
269
236
|
.partial()
|
|
270
|
-
.strict()
|
|
271
237
|
.passthrough();
|
|
272
238
|
const PageRoleResponse = zod_1.z
|
|
273
239
|
.object({
|
|
@@ -284,7 +250,6 @@ const PageRoleResponse = zod_1.z
|
|
|
284
250
|
empty: zod_1.z.boolean(),
|
|
285
251
|
})
|
|
286
252
|
.partial()
|
|
287
|
-
.strict()
|
|
288
253
|
.passthrough();
|
|
289
254
|
const InvitationDetailsResponse = zod_1.z
|
|
290
255
|
.object({
|
|
@@ -295,7 +260,6 @@ const InvitationDetailsResponse = zod_1.z
|
|
|
295
260
|
agencyName: zod_1.z.string(),
|
|
296
261
|
agencyLogo: zod_1.z.string().optional(),
|
|
297
262
|
})
|
|
298
|
-
.strict()
|
|
299
263
|
.passthrough();
|
|
300
264
|
const AgencySummaryResponse = zod_1.z
|
|
301
265
|
.object({
|
|
@@ -311,7 +275,6 @@ const AgencySummaryResponse = zod_1.z
|
|
|
311
275
|
status: zod_1.z.enum(['NEW', 'ACTIVE', 'PAYMENT_FAILED', 'INACTIVE']),
|
|
312
276
|
logo: zod_1.z.string().optional(),
|
|
313
277
|
})
|
|
314
|
-
.strict()
|
|
315
278
|
.passthrough();
|
|
316
279
|
const PageMetadata = zod_1.z
|
|
317
280
|
.object({
|
|
@@ -321,12 +284,10 @@ const PageMetadata = zod_1.z
|
|
|
321
284
|
totalPages: zod_1.z.number().int(),
|
|
322
285
|
})
|
|
323
286
|
.partial()
|
|
324
|
-
.strict()
|
|
325
287
|
.passthrough();
|
|
326
288
|
const PagedModelAgencySummaryResponse = zod_1.z
|
|
327
289
|
.object({ content: zod_1.z.array(AgencySummaryResponse), page: PageMetadata })
|
|
328
290
|
.partial()
|
|
329
|
-
.strict()
|
|
330
291
|
.passthrough();
|
|
331
292
|
const PermissionResponse = zod_1.z
|
|
332
293
|
.object({
|
|
@@ -357,14 +318,12 @@ const PermissionResponse = zod_1.z
|
|
|
357
318
|
'LEAD_WRITE_ALL',
|
|
358
319
|
])),
|
|
359
320
|
})
|
|
360
|
-
.strict()
|
|
361
321
|
.passthrough();
|
|
362
322
|
const GroupedPermissionsResponse = zod_1.z
|
|
363
323
|
.object({
|
|
364
324
|
group: zod_1.z.enum(['AGENCY', 'INVITATION', 'ROLE', 'MEMBER', 'LEAD']),
|
|
365
325
|
permissions: zod_1.z.array(PermissionResponse),
|
|
366
326
|
})
|
|
367
|
-
.strict()
|
|
368
327
|
.passthrough();
|
|
369
328
|
const MemberViewResponse = zod_1.z
|
|
370
329
|
.object({
|
|
@@ -377,12 +336,10 @@ const MemberViewResponse = zod_1.z
|
|
|
377
336
|
roleName: zod_1.z.string(),
|
|
378
337
|
joinedAt: zod_1.z.string().datetime({ offset: true }),
|
|
379
338
|
})
|
|
380
|
-
.strict()
|
|
381
339
|
.passthrough();
|
|
382
340
|
const PagedModelMemberViewResponse = zod_1.z
|
|
383
341
|
.object({ content: zod_1.z.array(MemberViewResponse), page: PageMetadata })
|
|
384
342
|
.partial()
|
|
385
|
-
.strict()
|
|
386
343
|
.passthrough();
|
|
387
344
|
const IntentResponse = zod_1.z
|
|
388
345
|
.object({
|
|
@@ -419,7 +376,6 @@ const IntentResponse = zod_1.z
|
|
|
419
376
|
area: zod_1.z.number().optional(),
|
|
420
377
|
numberOfRooms: zod_1.z.number().int().optional(),
|
|
421
378
|
})
|
|
422
|
-
.strict()
|
|
423
379
|
.passthrough();
|
|
424
380
|
const LeadProjectionResponse = zod_1.z
|
|
425
381
|
.object({
|
|
@@ -444,7 +400,6 @@ const LeadProjectionResponse = zod_1.z
|
|
|
444
400
|
isListing: zod_1.z.boolean(),
|
|
445
401
|
intents: zod_1.z.array(IntentResponse).optional(),
|
|
446
402
|
})
|
|
447
|
-
.strict()
|
|
448
403
|
.passthrough();
|
|
449
404
|
const PageLeadProjectionResponse = zod_1.z
|
|
450
405
|
.object({
|
|
@@ -461,7 +416,6 @@ const PageLeadProjectionResponse = zod_1.z
|
|
|
461
416
|
empty: zod_1.z.boolean(),
|
|
462
417
|
})
|
|
463
418
|
.partial()
|
|
464
|
-
.strict()
|
|
465
419
|
.passthrough();
|
|
466
420
|
const InvitationViewResponse = zod_1.z
|
|
467
421
|
.object({
|
|
@@ -473,12 +427,10 @@ const InvitationViewResponse = zod_1.z
|
|
|
473
427
|
acceptedAt: zod_1.z.string().datetime({ offset: true }).optional(),
|
|
474
428
|
acceptedBy: zod_1.z.string().optional(),
|
|
475
429
|
})
|
|
476
|
-
.strict()
|
|
477
430
|
.passthrough();
|
|
478
431
|
const PagedModelInvitationViewResponse = zod_1.z
|
|
479
432
|
.object({ content: zod_1.z.array(InvitationViewResponse), page: PageMetadata })
|
|
480
433
|
.partial()
|
|
481
|
-
.strict()
|
|
482
434
|
.passthrough();
|
|
483
435
|
const AddressViewResponse = zod_1.z
|
|
484
436
|
.object({
|
|
@@ -488,7 +440,6 @@ const AddressViewResponse = zod_1.z
|
|
|
488
440
|
subdistrict: zod_1.z.string(),
|
|
489
441
|
street: zod_1.z.string(),
|
|
490
442
|
})
|
|
491
|
-
.strict()
|
|
492
443
|
.passthrough();
|
|
493
444
|
const AgencyProfileResponse = zod_1.z
|
|
494
445
|
.object({
|
|
@@ -500,7 +451,6 @@ const AgencyProfileResponse = zod_1.z
|
|
|
500
451
|
address: AddressViewResponse,
|
|
501
452
|
yearSince: zod_1.z.number().int(),
|
|
502
453
|
})
|
|
503
|
-
.strict()
|
|
504
454
|
.passthrough();
|
|
505
455
|
exports.schemas = {
|
|
506
456
|
RolesRequest,
|
|
@@ -831,10 +781,7 @@ const endpoints = (0, core_1.makeApi)([
|
|
|
831
781
|
{
|
|
832
782
|
name: 'body',
|
|
833
783
|
type: 'Body',
|
|
834
|
-
schema: zod_1.z
|
|
835
|
-
.object({ memberId: zod_1.z.string().uuid() })
|
|
836
|
-
.strict()
|
|
837
|
-
.passthrough(),
|
|
784
|
+
schema: zod_1.z.object({ memberId: zod_1.z.string().uuid() }).passthrough(),
|
|
838
785
|
},
|
|
839
786
|
{
|
|
840
787
|
name: 'leadId',
|
|
@@ -915,10 +862,7 @@ const endpoints = (0, core_1.makeApi)([
|
|
|
915
862
|
{
|
|
916
863
|
name: 'body',
|
|
917
864
|
type: 'Body',
|
|
918
|
-
schema: zod_1.z
|
|
919
|
-
.object({ note: zod_1.z.string().min(1) })
|
|
920
|
-
.strict()
|
|
921
|
-
.passthrough(),
|
|
865
|
+
schema: zod_1.z.object({ note: zod_1.z.string().min(1) }).passthrough(),
|
|
922
866
|
},
|
|
923
867
|
{
|
|
924
868
|
name: 'leadId',
|
|
@@ -939,7 +883,6 @@ const endpoints = (0, core_1.makeApi)([
|
|
|
939
883
|
type: 'Body',
|
|
940
884
|
schema: zod_1.z
|
|
941
885
|
.object({ sourceUrl: zod_1.z.string().min(1) })
|
|
942
|
-
.strict()
|
|
943
886
|
.passthrough(),
|
|
944
887
|
},
|
|
945
888
|
{
|
|
@@ -1058,10 +1001,7 @@ const endpoints = (0, core_1.makeApi)([
|
|
|
1058
1001
|
{
|
|
1059
1002
|
name: 'body',
|
|
1060
1003
|
type: 'Body',
|
|
1061
|
-
schema: zod_1.z
|
|
1062
|
-
.object({ roleId: zod_1.z.number().int() })
|
|
1063
|
-
.strict()
|
|
1064
|
-
.passthrough(),
|
|
1004
|
+
schema: zod_1.z.object({ roleId: zod_1.z.number().int() }).passthrough(),
|
|
1065
1005
|
},
|
|
1066
1006
|
{
|
|
1067
1007
|
name: 'memberId',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@homespot-sdk/validators",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.705",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "src/index.ts",
|
|
6
6
|
"files": [
|
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
"build": "tsc"
|
|
12
12
|
},
|
|
13
13
|
"peerDependencies": {
|
|
14
|
-
"zod": "^3.
|
|
14
|
+
"zod": "^3.0.0"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"zod": "^3.
|
|
17
|
+
"zod": "^3.0.0",
|
|
18
18
|
"@zodios/core": "^10.9.6"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"typescript": "^5.
|
|
21
|
+
"typescript": "^5.0.0"
|
|
22
22
|
}
|
|
23
23
|
}
|
package/src/index.ts
CHANGED
|
@@ -21,18 +21,13 @@ const RolesRequest = z
|
|
|
21
21
|
])
|
|
22
22
|
),
|
|
23
23
|
})
|
|
24
|
-
.strict()
|
|
25
|
-
.passthrough();
|
|
26
|
-
const AssignRoleRequest = z
|
|
27
|
-
.object({ roleId: z.number().int() })
|
|
28
|
-
.strict()
|
|
29
24
|
.passthrough();
|
|
25
|
+
const AssignRoleRequest = z.object({ roleId: z.number().int() }).passthrough();
|
|
30
26
|
const BatchAssignRoleRequest = z
|
|
31
27
|
.object({
|
|
32
28
|
roleId: z.number().int(),
|
|
33
29
|
memberIds: z.array(z.string().uuid()).min(1),
|
|
34
30
|
})
|
|
35
|
-
.strict()
|
|
36
31
|
.passthrough();
|
|
37
32
|
const ChangeStatusRequest = z
|
|
38
33
|
.object({
|
|
@@ -45,20 +40,12 @@ const ChangeStatusRequest = z
|
|
|
45
40
|
'LOST',
|
|
46
41
|
]),
|
|
47
42
|
})
|
|
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()
|
|
57
43
|
.passthrough();
|
|
44
|
+
const SourceRequest = z.object({ sourceUrl: z.string().min(1) }).passthrough();
|
|
45
|
+
const UpdateNoteRequest = z.object({ note: z.string().min(1) }).passthrough();
|
|
58
46
|
const PriceRangeRequest = z
|
|
59
47
|
.object({ min: z.number(), max: z.number() })
|
|
60
48
|
.partial()
|
|
61
|
-
.strict()
|
|
62
49
|
.passthrough();
|
|
63
50
|
const LocationRefRequest = z
|
|
64
51
|
.object({
|
|
@@ -68,7 +55,6 @@ const LocationRefRequest = z
|
|
|
68
55
|
streetId: z.number().int(),
|
|
69
56
|
})
|
|
70
57
|
.partial()
|
|
71
|
-
.strict()
|
|
72
58
|
.passthrough();
|
|
73
59
|
const LeadIntentRequest = z
|
|
74
60
|
.object({
|
|
@@ -101,7 +87,6 @@ const LeadIntentRequest = z
|
|
|
101
87
|
area: z.number().optional(),
|
|
102
88
|
numberOfRooms: z.number().int().optional(),
|
|
103
89
|
})
|
|
104
|
-
.strict()
|
|
105
90
|
.passthrough();
|
|
106
91
|
const ContactInfoRequest = z
|
|
107
92
|
.object({
|
|
@@ -110,11 +95,9 @@ const ContactInfoRequest = z
|
|
|
110
95
|
email: z.string().email().optional(),
|
|
111
96
|
phone: z.string().min(1),
|
|
112
97
|
})
|
|
113
|
-
.strict()
|
|
114
98
|
.passthrough();
|
|
115
99
|
const AssignToMemberRequest = z
|
|
116
100
|
.object({ memberId: z.string().uuid() })
|
|
117
|
-
.strict()
|
|
118
101
|
.passthrough();
|
|
119
102
|
const AddressRequest = z
|
|
120
103
|
.object({
|
|
@@ -124,7 +107,6 @@ const AddressRequest = z
|
|
|
124
107
|
subdistrict: z.string().min(0).max(100),
|
|
125
108
|
street: z.string().min(0).max(255),
|
|
126
109
|
})
|
|
127
|
-
.strict()
|
|
128
110
|
.passthrough();
|
|
129
111
|
const CreateAgencyRequest = z
|
|
130
112
|
.object({
|
|
@@ -136,7 +118,6 @@ const CreateAgencyRequest = z
|
|
|
136
118
|
address: AddressRequest,
|
|
137
119
|
yearSince: z.number().int(),
|
|
138
120
|
})
|
|
139
|
-
.strict()
|
|
140
121
|
.passthrough();
|
|
141
122
|
const SocialMediaRequest = z
|
|
142
123
|
.object({
|
|
@@ -149,11 +130,9 @@ const SocialMediaRequest = z
|
|
|
149
130
|
]),
|
|
150
131
|
url: z.string().optional(),
|
|
151
132
|
})
|
|
152
|
-
.strict()
|
|
153
133
|
.passthrough();
|
|
154
134
|
const SocialMediasRequest = z
|
|
155
135
|
.object({ data: z.array(SocialMediaRequest).min(1).max(5) })
|
|
156
|
-
.strict()
|
|
157
136
|
.passthrough();
|
|
158
137
|
const CreateLeadRequest = z
|
|
159
138
|
.object({
|
|
@@ -161,15 +140,12 @@ const CreateLeadRequest = z
|
|
|
161
140
|
note: z.string().min(0).max(500).optional(),
|
|
162
141
|
sourceUrl: z.string().optional(),
|
|
163
142
|
})
|
|
164
|
-
.strict()
|
|
165
143
|
.passthrough();
|
|
166
144
|
const InvitationDetailsRequest = z
|
|
167
145
|
.object({ email: z.string().email(), roleId: z.number().int() })
|
|
168
|
-
.strict()
|
|
169
146
|
.passthrough();
|
|
170
147
|
const InviteMemberRequest = z
|
|
171
148
|
.object({ emails: z.array(InvitationDetailsRequest).min(1) })
|
|
172
|
-
.strict()
|
|
173
149
|
.passthrough();
|
|
174
150
|
const PhotoRequest = z
|
|
175
151
|
.object({
|
|
@@ -178,20 +154,16 @@ const PhotoRequest = z
|
|
|
178
154
|
width: z.number().int().gte(10).lte(11000),
|
|
179
155
|
height: z.number().int().gte(10).lte(11000).optional(),
|
|
180
156
|
})
|
|
181
|
-
.strict()
|
|
182
157
|
.passthrough();
|
|
183
|
-
const IdResponse = z.object({ id: z.string() }).
|
|
158
|
+
const IdResponse = z.object({ id: z.string() }).passthrough();
|
|
184
159
|
const PresignedUrlResponse = z
|
|
185
160
|
.object({ originalName: z.string(), key: z.string(), url: z.string() })
|
|
186
|
-
.strict()
|
|
187
161
|
.passthrough();
|
|
188
162
|
const PresignedUrlsResponse = z
|
|
189
163
|
.object({ data: z.array(PresignedUrlResponse) })
|
|
190
|
-
.strict()
|
|
191
164
|
.passthrough();
|
|
192
165
|
const UploadAcknowledgmentResponse = z
|
|
193
166
|
.object({ success: z.array(z.string()), fail: z.array(z.string()) })
|
|
194
|
-
.strict()
|
|
195
167
|
.passthrough();
|
|
196
168
|
const OrganizationSummaryViewResponse = z
|
|
197
169
|
.object({
|
|
@@ -219,18 +191,15 @@ const OrganizationSummaryViewResponse = z
|
|
|
219
191
|
),
|
|
220
192
|
status: z.enum(['NEW', 'ACTIVE', 'PAYMENT_FAILED', 'INACTIVE']),
|
|
221
193
|
})
|
|
222
|
-
.strict()
|
|
223
194
|
.passthrough();
|
|
224
195
|
const UserSummaryViewResponse = z
|
|
225
196
|
.object({ email: z.string(), firstName: z.string(), lastName: z.string() })
|
|
226
|
-
.strict()
|
|
227
197
|
.passthrough();
|
|
228
198
|
const UserContextViewResponse = z
|
|
229
199
|
.object({
|
|
230
200
|
user: UserSummaryViewResponse,
|
|
231
201
|
organizations: z.array(OrganizationSummaryViewResponse),
|
|
232
202
|
})
|
|
233
|
-
.strict()
|
|
234
203
|
.passthrough();
|
|
235
204
|
const RoleResponse = z
|
|
236
205
|
.object({
|
|
@@ -253,12 +222,10 @@ const RoleResponse = z
|
|
|
253
222
|
])
|
|
254
223
|
),
|
|
255
224
|
})
|
|
256
|
-
.strict()
|
|
257
225
|
.passthrough();
|
|
258
226
|
const SortObject = z
|
|
259
227
|
.object({ empty: z.boolean(), unsorted: z.boolean(), sorted: z.boolean() })
|
|
260
228
|
.partial()
|
|
261
|
-
.strict()
|
|
262
229
|
.passthrough();
|
|
263
230
|
const PageableObject = z
|
|
264
231
|
.object({
|
|
@@ -270,7 +237,6 @@ const PageableObject = z
|
|
|
270
237
|
unpaged: z.boolean(),
|
|
271
238
|
})
|
|
272
239
|
.partial()
|
|
273
|
-
.strict()
|
|
274
240
|
.passthrough();
|
|
275
241
|
const PageRoleResponse = z
|
|
276
242
|
.object({
|
|
@@ -287,7 +253,6 @@ const PageRoleResponse = z
|
|
|
287
253
|
empty: z.boolean(),
|
|
288
254
|
})
|
|
289
255
|
.partial()
|
|
290
|
-
.strict()
|
|
291
256
|
.passthrough();
|
|
292
257
|
const InvitationDetailsResponse = z
|
|
293
258
|
.object({
|
|
@@ -298,7 +263,6 @@ const InvitationDetailsResponse = z
|
|
|
298
263
|
agencyName: z.string(),
|
|
299
264
|
agencyLogo: z.string().optional(),
|
|
300
265
|
})
|
|
301
|
-
.strict()
|
|
302
266
|
.passthrough();
|
|
303
267
|
const AgencySummaryResponse = z
|
|
304
268
|
.object({
|
|
@@ -314,7 +278,6 @@ const AgencySummaryResponse = z
|
|
|
314
278
|
status: z.enum(['NEW', 'ACTIVE', 'PAYMENT_FAILED', 'INACTIVE']),
|
|
315
279
|
logo: z.string().optional(),
|
|
316
280
|
})
|
|
317
|
-
.strict()
|
|
318
281
|
.passthrough();
|
|
319
282
|
const PageMetadata = z
|
|
320
283
|
.object({
|
|
@@ -324,12 +287,10 @@ const PageMetadata = z
|
|
|
324
287
|
totalPages: z.number().int(),
|
|
325
288
|
})
|
|
326
289
|
.partial()
|
|
327
|
-
.strict()
|
|
328
290
|
.passthrough();
|
|
329
291
|
const PagedModelAgencySummaryResponse = z
|
|
330
292
|
.object({ content: z.array(AgencySummaryResponse), page: PageMetadata })
|
|
331
293
|
.partial()
|
|
332
|
-
.strict()
|
|
333
294
|
.passthrough();
|
|
334
295
|
const PermissionResponse = z
|
|
335
296
|
.object({
|
|
@@ -362,14 +323,12 @@ const PermissionResponse = z
|
|
|
362
323
|
])
|
|
363
324
|
),
|
|
364
325
|
})
|
|
365
|
-
.strict()
|
|
366
326
|
.passthrough();
|
|
367
327
|
const GroupedPermissionsResponse = z
|
|
368
328
|
.object({
|
|
369
329
|
group: z.enum(['AGENCY', 'INVITATION', 'ROLE', 'MEMBER', 'LEAD']),
|
|
370
330
|
permissions: z.array(PermissionResponse),
|
|
371
331
|
})
|
|
372
|
-
.strict()
|
|
373
332
|
.passthrough();
|
|
374
333
|
const MemberViewResponse = z
|
|
375
334
|
.object({
|
|
@@ -382,12 +341,10 @@ const MemberViewResponse = z
|
|
|
382
341
|
roleName: z.string(),
|
|
383
342
|
joinedAt: z.string().datetime({ offset: true }),
|
|
384
343
|
})
|
|
385
|
-
.strict()
|
|
386
344
|
.passthrough();
|
|
387
345
|
const PagedModelMemberViewResponse = z
|
|
388
346
|
.object({ content: z.array(MemberViewResponse), page: PageMetadata })
|
|
389
347
|
.partial()
|
|
390
|
-
.strict()
|
|
391
348
|
.passthrough();
|
|
392
349
|
const IntentResponse = z
|
|
393
350
|
.object({
|
|
@@ -424,7 +381,6 @@ const IntentResponse = z
|
|
|
424
381
|
area: z.number().optional(),
|
|
425
382
|
numberOfRooms: z.number().int().optional(),
|
|
426
383
|
})
|
|
427
|
-
.strict()
|
|
428
384
|
.passthrough();
|
|
429
385
|
const LeadProjectionResponse = z
|
|
430
386
|
.object({
|
|
@@ -449,7 +405,6 @@ const LeadProjectionResponse = z
|
|
|
449
405
|
isListing: z.boolean(),
|
|
450
406
|
intents: z.array(IntentResponse).optional(),
|
|
451
407
|
})
|
|
452
|
-
.strict()
|
|
453
408
|
.passthrough();
|
|
454
409
|
const PageLeadProjectionResponse = z
|
|
455
410
|
.object({
|
|
@@ -466,7 +421,6 @@ const PageLeadProjectionResponse = z
|
|
|
466
421
|
empty: z.boolean(),
|
|
467
422
|
})
|
|
468
423
|
.partial()
|
|
469
|
-
.strict()
|
|
470
424
|
.passthrough();
|
|
471
425
|
const InvitationViewResponse = z
|
|
472
426
|
.object({
|
|
@@ -478,12 +432,10 @@ const InvitationViewResponse = z
|
|
|
478
432
|
acceptedAt: z.string().datetime({ offset: true }).optional(),
|
|
479
433
|
acceptedBy: z.string().optional(),
|
|
480
434
|
})
|
|
481
|
-
.strict()
|
|
482
435
|
.passthrough();
|
|
483
436
|
const PagedModelInvitationViewResponse = z
|
|
484
437
|
.object({ content: z.array(InvitationViewResponse), page: PageMetadata })
|
|
485
438
|
.partial()
|
|
486
|
-
.strict()
|
|
487
439
|
.passthrough();
|
|
488
440
|
const AddressViewResponse = z
|
|
489
441
|
.object({
|
|
@@ -493,7 +445,6 @@ const AddressViewResponse = z
|
|
|
493
445
|
subdistrict: z.string(),
|
|
494
446
|
street: z.string(),
|
|
495
447
|
})
|
|
496
|
-
.strict()
|
|
497
448
|
.passthrough();
|
|
498
449
|
const AgencyProfileResponse = z
|
|
499
450
|
.object({
|
|
@@ -505,7 +456,6 @@ const AgencyProfileResponse = z
|
|
|
505
456
|
address: AddressViewResponse,
|
|
506
457
|
yearSince: z.number().int(),
|
|
507
458
|
})
|
|
508
|
-
.strict()
|
|
509
459
|
.passthrough();
|
|
510
460
|
|
|
511
461
|
export const schemas = {
|
|
@@ -838,10 +788,7 @@ const endpoints = makeApi([
|
|
|
838
788
|
{
|
|
839
789
|
name: 'body',
|
|
840
790
|
type: 'Body',
|
|
841
|
-
schema: z
|
|
842
|
-
.object({ memberId: z.string().uuid() })
|
|
843
|
-
.strict()
|
|
844
|
-
.passthrough(),
|
|
791
|
+
schema: z.object({ memberId: z.string().uuid() }).passthrough(),
|
|
845
792
|
},
|
|
846
793
|
{
|
|
847
794
|
name: 'leadId',
|
|
@@ -922,10 +869,7 @@ const endpoints = makeApi([
|
|
|
922
869
|
{
|
|
923
870
|
name: 'body',
|
|
924
871
|
type: 'Body',
|
|
925
|
-
schema: z
|
|
926
|
-
.object({ note: z.string().min(1) })
|
|
927
|
-
.strict()
|
|
928
|
-
.passthrough(),
|
|
872
|
+
schema: z.object({ note: z.string().min(1) }).passthrough(),
|
|
929
873
|
},
|
|
930
874
|
{
|
|
931
875
|
name: 'leadId',
|
|
@@ -946,7 +890,6 @@ const endpoints = makeApi([
|
|
|
946
890
|
type: 'Body',
|
|
947
891
|
schema: z
|
|
948
892
|
.object({ sourceUrl: z.string().min(1) })
|
|
949
|
-
.strict()
|
|
950
893
|
.passthrough(),
|
|
951
894
|
},
|
|
952
895
|
{
|
|
@@ -1065,10 +1008,7 @@ const endpoints = makeApi([
|
|
|
1065
1008
|
{
|
|
1066
1009
|
name: 'body',
|
|
1067
1010
|
type: 'Body',
|
|
1068
|
-
schema: z
|
|
1069
|
-
.object({ roleId: z.number().int() })
|
|
1070
|
-
.strict()
|
|
1071
|
-
.passthrough(),
|
|
1011
|
+
schema: z.object({ roleId: z.number().int() }).passthrough(),
|
|
1072
1012
|
},
|
|
1073
1013
|
{
|
|
1074
1014
|
name: 'memberId',
|