@homespot-sdk/validators 0.0.5 → 0.0.601

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 CHANGED
@@ -6,13 +6,7 @@ const core_1 = require("@zodios/core");
6
6
  const zod_1 = require("zod");
7
7
  const SocialMediaRequest = zod_1.z
8
8
  .object({
9
- type: zod_1.z.enum([
10
- 'FACEBOOK',
11
- 'YOUTUBE',
12
- 'INSTAGRAM',
13
- 'TIKTOK',
14
- 'LINKEDIN',
15
- ]),
9
+ type: zod_1.z.enum(["FACEBOOK", "YOUTUBE", "INSTAGRAM", "TIKTOK", "LINKEDIN"]),
16
10
  url: zod_1.z.string().optional(),
17
11
  })
18
12
  .strict()
@@ -26,10 +20,10 @@ const RolesRequest = zod_1.z
26
20
  name: zod_1.z.string().min(1),
27
21
  description: zod_1.z.string().min(1),
28
22
  authorities: zod_1.z.array(zod_1.z.enum([
29
- 'properties_read',
30
- 'properties_write',
31
- 'agents_read',
32
- 'agents_write',
23
+ "properties_read",
24
+ "properties_write",
25
+ "agents_read",
26
+ "agents_write",
33
27
  ])),
34
28
  })
35
29
  .strict()
@@ -37,7 +31,7 @@ const RolesRequest = zod_1.z
37
31
  const PhotoRequest = zod_1.z
38
32
  .object({
39
33
  photo: zod_1.z.string().min(0).max(255),
40
- type: zod_1.z.enum(['JPEG', 'JPG', 'PNG', 'WEBP']),
34
+ type: zod_1.z.enum(["JPEG", "JPG", "PNG", "WEBP"]),
41
35
  width: zod_1.z.number().int().gte(10).lte(11000),
42
36
  height: zod_1.z.number().int().gte(10).lte(11000).optional(),
43
37
  })
@@ -45,13 +39,10 @@ const PhotoRequest = zod_1.z
45
39
  .passthrough();
46
40
  const AddressRequest = zod_1.z
47
41
  .object({
48
- placeId: zod_1.z.string().min(0).max(255),
49
- cadastralCode: zod_1.z.string().min(0).max(255),
50
- fullName: zod_1.z.string().min(0).max(500),
51
- lat: zod_1.z.number().gte(-90).lte(90),
52
- lng: zod_1.z.number().gte(-180).lte(180),
53
42
  country: zod_1.z.string().min(0).max(100),
54
43
  city: zod_1.z.string().min(0).max(100),
44
+ district: zod_1.z.string().min(0).max(100),
45
+ subdistrict: zod_1.z.string().min(0).max(100),
55
46
  street: zod_1.z.string().min(0).max(255),
56
47
  })
57
48
  .strict()
@@ -59,14 +50,10 @@ const AddressRequest = zod_1.z
59
50
  const CreateAgencyRequest = zod_1.z
60
51
  .object({
61
52
  name: zod_1.z.string().min(1),
62
- slogan: zod_1.z.string().min(1),
63
- logoUrl: zod_1.z.string().min(1),
64
- coverImage: zod_1.z.string().min(1),
65
53
  email: zod_1.z.string().min(1).email(),
66
54
  seats: zod_1.z.number().int(),
67
- domain: zod_1.z.string().min(1),
55
+ subDomain: zod_1.z.string().min(1),
68
56
  phone: zod_1.z.string().min(1),
69
- website: zod_1.z.string().min(1),
70
57
  address: AddressRequest,
71
58
  yearSince: zod_1.z.number().int(),
72
59
  })
@@ -93,13 +80,7 @@ const InvitationViewResponse = zod_1.z
93
80
  .object({
94
81
  invitationId: zod_1.z.string().uuid(),
95
82
  email: zod_1.z.string(),
96
- status: zod_1.z.enum([
97
- 'PENDING',
98
- 'ACCEPTED',
99
- 'REJECTED',
100
- 'CANCELLED',
101
- 'EXPIRED',
102
- ]),
83
+ status: zod_1.z.enum(["PENDING", "ACCEPTED", "REJECTED", "CANCELLED", "EXPIRED"]),
103
84
  createdAt: zod_1.z.string().datetime({ offset: true }),
104
85
  expiresAt: zod_1.z.string().datetime({ offset: true }),
105
86
  acceptedAt: zod_1.z.string().datetime({ offset: true }).optional(),
@@ -123,232 +104,232 @@ exports.schemas = {
123
104
  };
124
105
  const endpoints = (0, core_1.makeApi)([
125
106
  {
126
- method: 'post',
127
- path: '/agency',
128
- alias: 'createAgency',
129
- requestFormat: 'json',
107
+ method: "post",
108
+ path: "/agency",
109
+ alias: "createAgency",
110
+ requestFormat: "json",
130
111
  parameters: [
131
112
  {
132
- name: 'body',
133
- type: 'Body',
113
+ name: "body",
114
+ type: "Body",
134
115
  schema: CreateAgencyRequest,
135
116
  },
136
117
  ],
137
118
  response: zod_1.z.void(),
138
119
  },
139
120
  {
140
- method: 'get',
141
- path: '/agency/:agencyId',
142
- alias: 'getAgency',
143
- requestFormat: 'json',
121
+ method: "get",
122
+ path: "/agency/:agencyId",
123
+ alias: "getAgency",
124
+ requestFormat: "json",
144
125
  parameters: [
145
126
  {
146
- name: 'agencyId',
147
- type: 'Path',
127
+ name: "agencyId",
128
+ type: "Path",
148
129
  schema: zod_1.z.string().uuid(),
149
130
  },
150
131
  ],
151
132
  response: zod_1.z.void(),
152
133
  },
153
134
  {
154
- method: 'post',
155
- path: '/agency/:agencyId/activate',
156
- alias: 'activateAgency',
157
- requestFormat: 'json',
135
+ method: "post",
136
+ path: "/agency/:agencyId/activate",
137
+ alias: "activateAgency",
138
+ requestFormat: "json",
158
139
  parameters: [
159
140
  {
160
- name: 'agencyId',
161
- type: 'Path',
141
+ name: "agencyId",
142
+ type: "Path",
162
143
  schema: zod_1.z.string().uuid(),
163
144
  },
164
145
  ],
165
146
  response: zod_1.z.void(),
166
147
  },
167
148
  {
168
- method: 'get',
169
- path: '/agency/:agencyId/invitation',
170
- alias: 'getAllInvitations',
171
- requestFormat: 'json',
149
+ method: "get",
150
+ path: "/agency/:agencyId/invitation",
151
+ alias: "getAllInvitations",
152
+ requestFormat: "json",
172
153
  parameters: [
173
154
  {
174
- name: 'agencyId',
175
- type: 'Path',
155
+ name: "agencyId",
156
+ type: "Path",
176
157
  schema: zod_1.z.string().uuid(),
177
158
  },
178
159
  ],
179
160
  response: zod_1.z.void(),
180
161
  },
181
162
  {
182
- method: 'post',
183
- path: '/agency/:agencyId/invitation',
184
- alias: 'inviteMember',
185
- requestFormat: 'json',
163
+ method: "post",
164
+ path: "/agency/:agencyId/invitation",
165
+ alias: "inviteMember",
166
+ requestFormat: "json",
186
167
  parameters: [
187
168
  {
188
- name: 'body',
189
- type: 'Body',
169
+ name: "body",
170
+ type: "Body",
190
171
  schema: InviteMemberRequest,
191
172
  },
192
173
  {
193
- name: 'agencyId',
194
- type: 'Path',
174
+ name: "agencyId",
175
+ type: "Path",
195
176
  schema: zod_1.z.string().uuid(),
196
177
  },
197
178
  ],
198
179
  response: zod_1.z.void(),
199
180
  },
200
181
  {
201
- method: 'post',
202
- path: '/agency/:agencyId/invitation/:invitationId',
203
- alias: 'inviteAccepted',
204
- requestFormat: 'json',
182
+ method: "post",
183
+ path: "/agency/:agencyId/invitation/:invitationId",
184
+ alias: "inviteAccepted",
185
+ requestFormat: "json",
205
186
  parameters: [
206
187
  {
207
- name: 'agencyId',
208
- type: 'Path',
188
+ name: "agencyId",
189
+ type: "Path",
209
190
  schema: zod_1.z.string().uuid(),
210
191
  },
211
192
  {
212
- name: 'invitationId',
213
- type: 'Path',
193
+ name: "invitationId",
194
+ type: "Path",
214
195
  schema: zod_1.z.string().uuid(),
215
196
  },
216
197
  ],
217
198
  response: zod_1.z.void(),
218
199
  },
219
200
  {
220
- method: 'put',
221
- path: '/agency/:agencyId/presigned-urls',
222
- alias: 'generatePresignedUrl',
223
- requestFormat: 'json',
201
+ method: "put",
202
+ path: "/agency/:agencyId/presigned-urls",
203
+ alias: "generatePresignedUrl",
204
+ requestFormat: "json",
224
205
  parameters: [
225
206
  {
226
- name: 'body',
227
- type: 'Body',
207
+ name: "body",
208
+ type: "Body",
228
209
  schema: PhotoRequest,
229
210
  },
230
211
  {
231
- name: 'agencyId',
232
- type: 'Path',
212
+ name: "agencyId",
213
+ type: "Path",
233
214
  schema: zod_1.z.string().uuid(),
234
215
  },
235
216
  ],
236
217
  response: zod_1.z.void(),
237
218
  },
238
219
  {
239
- method: 'post',
240
- path: '/agency/:agencyId/presigned-urls/notify/cover',
241
- alias: 'notifyCoverUploadCompletion',
242
- requestFormat: 'json',
220
+ method: "post",
221
+ path: "/agency/:agencyId/presigned-urls/notify/cover",
222
+ alias: "notifyCoverUploadCompletion",
223
+ requestFormat: "json",
243
224
  parameters: [
244
225
  {
245
- name: 'body',
246
- type: 'Body',
226
+ name: "body",
227
+ type: "Body",
247
228
  schema: PhotoRequest,
248
229
  },
249
230
  {
250
- name: 'agencyId',
251
- type: 'Path',
231
+ name: "agencyId",
232
+ type: "Path",
252
233
  schema: zod_1.z.string().uuid(),
253
234
  },
254
235
  ],
255
236
  response: zod_1.z.void(),
256
237
  },
257
238
  {
258
- method: 'post',
259
- path: '/agency/:agencyId/presigned-urls/notify/logo',
260
- alias: 'notifyLogoUploadCompletion',
261
- requestFormat: 'json',
239
+ method: "post",
240
+ path: "/agency/:agencyId/presigned-urls/notify/logo",
241
+ alias: "notifyLogoUploadCompletion",
242
+ requestFormat: "json",
262
243
  parameters: [
263
244
  {
264
- name: 'body',
265
- type: 'Body',
245
+ name: "body",
246
+ type: "Body",
266
247
  schema: PhotoRequest,
267
248
  },
268
249
  {
269
- name: 'agencyId',
270
- type: 'Path',
250
+ name: "agencyId",
251
+ type: "Path",
271
252
  schema: zod_1.z.string().uuid(),
272
253
  },
273
254
  ],
274
255
  response: zod_1.z.void(),
275
256
  },
276
257
  {
277
- method: 'post',
278
- path: '/agency/:agencyId/roles',
279
- alias: 'addRole',
280
- requestFormat: 'json',
258
+ method: "post",
259
+ path: "/agency/:agencyId/roles",
260
+ alias: "addRole",
261
+ requestFormat: "json",
281
262
  parameters: [
282
263
  {
283
- name: 'body',
284
- type: 'Body',
264
+ name: "body",
265
+ type: "Body",
285
266
  schema: RolesRequest,
286
267
  },
287
268
  {
288
- name: 'agencyId',
289
- type: 'Path',
269
+ name: "agencyId",
270
+ type: "Path",
290
271
  schema: zod_1.z.string().uuid(),
291
272
  },
292
273
  ],
293
274
  response: zod_1.z.void(),
294
275
  },
295
276
  {
296
- method: 'put',
297
- path: '/agency/:agencyId/roles/:roleId',
298
- alias: 'updateRole',
299
- requestFormat: 'json',
277
+ method: "put",
278
+ path: "/agency/:agencyId/roles/:roleId",
279
+ alias: "updateRole",
280
+ requestFormat: "json",
300
281
  parameters: [
301
282
  {
302
- name: 'body',
303
- type: 'Body',
283
+ name: "body",
284
+ type: "Body",
304
285
  schema: RolesRequest,
305
286
  },
306
287
  {
307
- name: 'agencyId',
308
- type: 'Path',
288
+ name: "agencyId",
289
+ type: "Path",
309
290
  schema: zod_1.z.string().uuid(),
310
291
  },
311
292
  {
312
- name: 'roleId',
313
- type: 'Path',
293
+ name: "roleId",
294
+ type: "Path",
314
295
  schema: zod_1.z.number().int(),
315
296
  },
316
297
  ],
317
298
  response: zod_1.z.void(),
318
299
  },
319
300
  {
320
- method: 'delete',
321
- path: '/agency/:agencyId/roles/:roleId',
322
- alias: 'removeRole',
323
- requestFormat: 'json',
301
+ method: "delete",
302
+ path: "/agency/:agencyId/roles/:roleId",
303
+ alias: "removeRole",
304
+ requestFormat: "json",
324
305
  parameters: [
325
306
  {
326
- name: 'agencyId',
327
- type: 'Path',
307
+ name: "agencyId",
308
+ type: "Path",
328
309
  schema: zod_1.z.string().uuid(),
329
310
  },
330
311
  {
331
- name: 'roleId',
332
- type: 'Path',
312
+ name: "roleId",
313
+ type: "Path",
333
314
  schema: zod_1.z.number().int(),
334
315
  },
335
316
  ],
336
317
  response: zod_1.z.void(),
337
318
  },
338
319
  {
339
- method: 'put',
340
- path: '/agency/:agencyId/social-media',
341
- alias: 'updateSocialUrls',
342
- requestFormat: 'json',
320
+ method: "put",
321
+ path: "/agency/:agencyId/social-media",
322
+ alias: "updateSocialUrls",
323
+ requestFormat: "json",
343
324
  parameters: [
344
325
  {
345
- name: 'body',
346
- type: 'Body',
326
+ name: "body",
327
+ type: "Body",
347
328
  schema: SocialMediasRequest,
348
329
  },
349
330
  {
350
- name: 'agencyId',
351
- type: 'Path',
331
+ name: "agencyId",
332
+ type: "Path",
352
333
  schema: zod_1.z.string().uuid(),
353
334
  },
354
335
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homespot-sdk/validators",
3
- "version": "0.0.5",
3
+ "version": "0.0.601",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {