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