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