@homespot-sdk/validators 0.0.639 → 0.0.640
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 +1228 -757
- package/dist/index.js +305 -157
- package/package.json +1 -1
- package/src/index.ts +309 -159
package/dist/index.js
CHANGED
|
@@ -4,6 +4,28 @@ exports.api = exports.schemas = void 0;
|
|
|
4
4
|
exports.createApiClient = createApiClient;
|
|
5
5
|
const core_1 = require("@zodios/core");
|
|
6
6
|
const zod_1 = require("zod");
|
|
7
|
+
const RolesRequest = zod_1.z
|
|
8
|
+
.object({
|
|
9
|
+
name: zod_1.z.string().min(1),
|
|
10
|
+
description: zod_1.z.string().min(1),
|
|
11
|
+
permissions: zod_1.z.array(zod_1.z.enum([
|
|
12
|
+
'AGENCY_WRITE',
|
|
13
|
+
'INVITATION_READ',
|
|
14
|
+
'INVITATION_WRITE',
|
|
15
|
+
'ROLE_READ',
|
|
16
|
+
'ROLE_WRITE',
|
|
17
|
+
'MEMBER_READ',
|
|
18
|
+
'MEMBER_WRITE',
|
|
19
|
+
])),
|
|
20
|
+
})
|
|
21
|
+
.passthrough();
|
|
22
|
+
const AssignRoleRequest = zod_1.z.object({ roleId: zod_1.z.number().int() }).passthrough();
|
|
23
|
+
const BatchAssignRoleRequest = zod_1.z
|
|
24
|
+
.object({
|
|
25
|
+
roleId: zod_1.z.number().int(),
|
|
26
|
+
memberIds: zod_1.z.array(zod_1.z.string().uuid()).min(1),
|
|
27
|
+
})
|
|
28
|
+
.passthrough();
|
|
7
29
|
const AddressRequest = zod_1.z
|
|
8
30
|
.object({
|
|
9
31
|
country: zod_1.z.string().min(0).max(100),
|
|
@@ -39,27 +61,6 @@ const SocialMediaRequest = zod_1.z
|
|
|
39
61
|
const SocialMediasRequest = zod_1.z
|
|
40
62
|
.object({ data: zod_1.z.array(SocialMediaRequest).min(1).max(5) })
|
|
41
63
|
.passthrough();
|
|
42
|
-
const RolesRequest = zod_1.z
|
|
43
|
-
.object({
|
|
44
|
-
name: zod_1.z.string().min(1),
|
|
45
|
-
description: zod_1.z.string().min(1),
|
|
46
|
-
permissions: zod_1.z.array(zod_1.z.enum([
|
|
47
|
-
'AGENCY_WRITE',
|
|
48
|
-
'INVITATION_READ',
|
|
49
|
-
'INVITATION_WRITE',
|
|
50
|
-
'ROLE_READ',
|
|
51
|
-
'ROLE_WRITE',
|
|
52
|
-
])),
|
|
53
|
-
})
|
|
54
|
-
.passthrough();
|
|
55
|
-
const pageable = zod_1.z
|
|
56
|
-
.object({
|
|
57
|
-
page: zod_1.z.number().int().gte(0),
|
|
58
|
-
size: zod_1.z.number().int().gte(1),
|
|
59
|
-
sort: zod_1.z.array(zod_1.z.string()),
|
|
60
|
-
})
|
|
61
|
-
.partial()
|
|
62
|
-
.passthrough();
|
|
63
64
|
const InvitationDetailsRequest = zod_1.z
|
|
64
65
|
.object({ email: zod_1.z.string().min(1), roleId: zod_1.z.number().int() })
|
|
65
66
|
.passthrough();
|
|
@@ -99,6 +100,8 @@ const OrganizationSummaryViewResponse = zod_1.z
|
|
|
99
100
|
'INVITATION_WRITE',
|
|
100
101
|
'ROLE_READ',
|
|
101
102
|
'ROLE_WRITE',
|
|
103
|
+
'MEMBER_READ',
|
|
104
|
+
'MEMBER_WRITE',
|
|
102
105
|
])),
|
|
103
106
|
status: zod_1.z.enum(['NEW', 'ACTIVE', 'PAYMENT_FAILED', 'INACTIVE']),
|
|
104
107
|
})
|
|
@@ -112,54 +115,53 @@ const UserContextViewResponse = zod_1.z
|
|
|
112
115
|
organizations: zod_1.z.array(OrganizationSummaryViewResponse),
|
|
113
116
|
})
|
|
114
117
|
.passthrough();
|
|
115
|
-
const
|
|
118
|
+
const RoleResponse = zod_1.z
|
|
116
119
|
.object({
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
+
id: zod_1.z.number().int(),
|
|
121
|
+
name: zod_1.z.string(),
|
|
122
|
+
description: zod_1.z.string(),
|
|
123
|
+
permissions: zod_1.z.array(zod_1.z.enum([
|
|
124
|
+
'AGENCY_WRITE',
|
|
125
|
+
'INVITATION_READ',
|
|
126
|
+
'INVITATION_WRITE',
|
|
127
|
+
'ROLE_READ',
|
|
128
|
+
'ROLE_WRITE',
|
|
129
|
+
'MEMBER_READ',
|
|
130
|
+
'MEMBER_WRITE',
|
|
131
|
+
])),
|
|
120
132
|
})
|
|
133
|
+
.passthrough();
|
|
134
|
+
const SortObject = zod_1.z
|
|
135
|
+
.object({ empty: zod_1.z.boolean(), sorted: zod_1.z.boolean(), unsorted: zod_1.z.boolean() })
|
|
121
136
|
.partial()
|
|
122
137
|
.passthrough();
|
|
123
|
-
const
|
|
138
|
+
const PageableObject = zod_1.z
|
|
124
139
|
.object({
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
roleName: zod_1.z.string(),
|
|
132
|
-
joinedAt: zod_1.z.string().datetime({ offset: true }),
|
|
140
|
+
offset: zod_1.z.number().int(),
|
|
141
|
+
sort: SortObject,
|
|
142
|
+
unpaged: zod_1.z.boolean(),
|
|
143
|
+
paged: zod_1.z.boolean(),
|
|
144
|
+
pageNumber: zod_1.z.number().int(),
|
|
145
|
+
pageSize: zod_1.z.number().int(),
|
|
133
146
|
})
|
|
147
|
+
.partial()
|
|
134
148
|
.passthrough();
|
|
135
|
-
const
|
|
149
|
+
const PageRoleResponse = zod_1.z
|
|
136
150
|
.object({
|
|
137
|
-
size: zod_1.z.number().int(),
|
|
138
|
-
number: zod_1.z.number().int(),
|
|
139
151
|
totalElements: zod_1.z.number().int(),
|
|
140
152
|
totalPages: zod_1.z.number().int(),
|
|
153
|
+
size: zod_1.z.number().int(),
|
|
154
|
+
content: zod_1.z.array(RoleResponse),
|
|
155
|
+
number: zod_1.z.number().int(),
|
|
156
|
+
first: zod_1.z.boolean(),
|
|
157
|
+
last: zod_1.z.boolean(),
|
|
158
|
+
numberOfElements: zod_1.z.number().int(),
|
|
159
|
+
sort: SortObject,
|
|
160
|
+
pageable: PageableObject,
|
|
161
|
+
empty: zod_1.z.boolean(),
|
|
141
162
|
})
|
|
142
163
|
.partial()
|
|
143
164
|
.passthrough();
|
|
144
|
-
const PagedModelMemberViewResponse = zod_1.z
|
|
145
|
-
.object({ content: zod_1.z.array(MemberViewResponse), page: PageMetadata })
|
|
146
|
-
.partial()
|
|
147
|
-
.passthrough();
|
|
148
|
-
const InvitationViewResponse = zod_1.z
|
|
149
|
-
.object({
|
|
150
|
-
invitationId: zod_1.z.string().uuid(),
|
|
151
|
-
email: zod_1.z.string(),
|
|
152
|
-
status: zod_1.z.enum(['PENDING', 'ACCEPTED', 'CANCELLED', 'EXPIRED']),
|
|
153
|
-
createdAt: zod_1.z.string().datetime({ offset: true }),
|
|
154
|
-
expiresAt: zod_1.z.string().datetime({ offset: true }),
|
|
155
|
-
acceptedAt: zod_1.z.string().datetime({ offset: true }).optional(),
|
|
156
|
-
acceptedBy: zod_1.z.string().optional(),
|
|
157
|
-
})
|
|
158
|
-
.passthrough();
|
|
159
|
-
const PagedModelInvitationViewResponse = zod_1.z
|
|
160
|
-
.object({ content: zod_1.z.array(InvitationViewResponse), page: PageMetadata })
|
|
161
|
-
.partial()
|
|
162
|
-
.passthrough();
|
|
163
165
|
const InvitationDetailsResponse = zod_1.z
|
|
164
166
|
.object({
|
|
165
167
|
invitationId: zod_1.z.string().uuid(),
|
|
@@ -170,7 +172,7 @@ const InvitationDetailsResponse = zod_1.z
|
|
|
170
172
|
agencyLogo: zod_1.z.string().optional(),
|
|
171
173
|
})
|
|
172
174
|
.passthrough();
|
|
173
|
-
const
|
|
175
|
+
const AgencySummaryResponse = zod_1.z
|
|
174
176
|
.object({
|
|
175
177
|
id: zod_1.z.string().uuid(),
|
|
176
178
|
owner: zod_1.z.string(),
|
|
@@ -185,8 +187,17 @@ const AgencyPeekViewResponse = zod_1.z
|
|
|
185
187
|
logo: zod_1.z.string().optional(),
|
|
186
188
|
})
|
|
187
189
|
.passthrough();
|
|
188
|
-
const
|
|
189
|
-
.object({
|
|
190
|
+
const PageMetadata = zod_1.z
|
|
191
|
+
.object({
|
|
192
|
+
size: zod_1.z.number().int(),
|
|
193
|
+
number: zod_1.z.number().int(),
|
|
194
|
+
totalElements: zod_1.z.number().int(),
|
|
195
|
+
totalPages: zod_1.z.number().int(),
|
|
196
|
+
})
|
|
197
|
+
.partial()
|
|
198
|
+
.passthrough();
|
|
199
|
+
const PagedModelAgencySummaryResponse = zod_1.z
|
|
200
|
+
.object({ content: zod_1.z.array(AgencySummaryResponse), page: PageMetadata })
|
|
190
201
|
.partial()
|
|
191
202
|
.passthrough();
|
|
192
203
|
const AddressViewResponse = zod_1.z
|
|
@@ -198,7 +209,7 @@ const AddressViewResponse = zod_1.z
|
|
|
198
209
|
street: zod_1.z.string(),
|
|
199
210
|
})
|
|
200
211
|
.passthrough();
|
|
201
|
-
const
|
|
212
|
+
const AgencyProfileResponse = zod_1.z
|
|
202
213
|
.object({
|
|
203
214
|
name: zod_1.z.string(),
|
|
204
215
|
email: zod_1.z.string(),
|
|
@@ -209,6 +220,37 @@ const AgencyViewResponse = zod_1.z
|
|
|
209
220
|
yearSince: zod_1.z.number().int(),
|
|
210
221
|
})
|
|
211
222
|
.passthrough();
|
|
223
|
+
const MemberViewResponse = zod_1.z
|
|
224
|
+
.object({
|
|
225
|
+
userId: zod_1.z.string(),
|
|
226
|
+
firstName: zod_1.z.string(),
|
|
227
|
+
lastName: zod_1.z.string(),
|
|
228
|
+
phone: zod_1.z.string().optional(),
|
|
229
|
+
email: zod_1.z.string(),
|
|
230
|
+
roleId: zod_1.z.number().int(),
|
|
231
|
+
roleName: zod_1.z.string(),
|
|
232
|
+
joinedAt: zod_1.z.string().datetime({ offset: true }),
|
|
233
|
+
})
|
|
234
|
+
.passthrough();
|
|
235
|
+
const PagedModelMemberViewResponse = zod_1.z
|
|
236
|
+
.object({ content: zod_1.z.array(MemberViewResponse), page: PageMetadata })
|
|
237
|
+
.partial()
|
|
238
|
+
.passthrough();
|
|
239
|
+
const InvitationViewResponse = zod_1.z
|
|
240
|
+
.object({
|
|
241
|
+
invitationId: zod_1.z.string().uuid(),
|
|
242
|
+
email: zod_1.z.string(),
|
|
243
|
+
status: zod_1.z.enum(['PENDING', 'ACCEPTED', 'CANCELLED', 'EXPIRED']),
|
|
244
|
+
createdAt: zod_1.z.string().datetime({ offset: true }),
|
|
245
|
+
expiresAt: zod_1.z.string().datetime({ offset: true }),
|
|
246
|
+
acceptedAt: zod_1.z.string().datetime({ offset: true }).optional(),
|
|
247
|
+
acceptedBy: zod_1.z.string().optional(),
|
|
248
|
+
})
|
|
249
|
+
.passthrough();
|
|
250
|
+
const PagedModelInvitationViewResponse = zod_1.z
|
|
251
|
+
.object({ content: zod_1.z.array(InvitationViewResponse), page: PageMetadata })
|
|
252
|
+
.partial()
|
|
253
|
+
.passthrough();
|
|
212
254
|
const PermissionResponse = zod_1.z
|
|
213
255
|
.object({
|
|
214
256
|
permission: zod_1.z.enum([
|
|
@@ -217,6 +259,8 @@ const PermissionResponse = zod_1.z
|
|
|
217
259
|
'INVITATION_WRITE',
|
|
218
260
|
'ROLE_READ',
|
|
219
261
|
'ROLE_WRITE',
|
|
262
|
+
'MEMBER_READ',
|
|
263
|
+
'MEMBER_WRITE',
|
|
220
264
|
]),
|
|
221
265
|
implied: zod_1.z.array(zod_1.z.enum([
|
|
222
266
|
'AGENCY_WRITE',
|
|
@@ -224,22 +268,25 @@ const PermissionResponse = zod_1.z
|
|
|
224
268
|
'INVITATION_WRITE',
|
|
225
269
|
'ROLE_READ',
|
|
226
270
|
'ROLE_WRITE',
|
|
271
|
+
'MEMBER_READ',
|
|
272
|
+
'MEMBER_WRITE',
|
|
227
273
|
])),
|
|
228
274
|
})
|
|
229
275
|
.passthrough();
|
|
230
276
|
const GroupedPermissionsResponse = zod_1.z
|
|
231
277
|
.object({
|
|
232
|
-
group: zod_1.z.enum(['AGENCY', 'INVITATION', 'ROLE']),
|
|
278
|
+
group: zod_1.z.enum(['AGENCY', 'INVITATION', 'ROLE', 'MEMBER']),
|
|
233
279
|
permissions: zod_1.z.array(PermissionResponse),
|
|
234
280
|
})
|
|
235
281
|
.passthrough();
|
|
236
282
|
exports.schemas = {
|
|
283
|
+
RolesRequest,
|
|
284
|
+
AssignRoleRequest,
|
|
285
|
+
BatchAssignRoleRequest,
|
|
237
286
|
AddressRequest,
|
|
238
287
|
CreateAgencyRequest,
|
|
239
288
|
SocialMediaRequest,
|
|
240
289
|
SocialMediasRequest,
|
|
241
|
-
RolesRequest,
|
|
242
|
-
pageable,
|
|
243
290
|
InvitationDetailsRequest,
|
|
244
291
|
InviteMemberRequest,
|
|
245
292
|
PhotoRequest,
|
|
@@ -250,42 +297,24 @@ exports.schemas = {
|
|
|
250
297
|
OrganizationSummaryViewResponse,
|
|
251
298
|
UserSummaryViewResponse,
|
|
252
299
|
UserContextViewResponse,
|
|
253
|
-
|
|
254
|
-
|
|
300
|
+
RoleResponse,
|
|
301
|
+
SortObject,
|
|
302
|
+
PageableObject,
|
|
303
|
+
PageRoleResponse,
|
|
304
|
+
InvitationDetailsResponse,
|
|
305
|
+
AgencySummaryResponse,
|
|
255
306
|
PageMetadata,
|
|
307
|
+
PagedModelAgencySummaryResponse,
|
|
308
|
+
AddressViewResponse,
|
|
309
|
+
AgencyProfileResponse,
|
|
310
|
+
MemberViewResponse,
|
|
256
311
|
PagedModelMemberViewResponse,
|
|
257
312
|
InvitationViewResponse,
|
|
258
313
|
PagedModelInvitationViewResponse,
|
|
259
|
-
InvitationDetailsResponse,
|
|
260
|
-
AgencyPeekViewResponse,
|
|
261
|
-
PagedModelAgencyPeekViewResponse,
|
|
262
|
-
AddressViewResponse,
|
|
263
|
-
AgencyViewResponse,
|
|
264
314
|
PermissionResponse,
|
|
265
315
|
GroupedPermissionsResponse,
|
|
266
316
|
};
|
|
267
317
|
const endpoints = (0, core_1.makeApi)([
|
|
268
|
-
{
|
|
269
|
-
method: 'get',
|
|
270
|
-
path: '/agency',
|
|
271
|
-
alias: 'getAllAgencies',
|
|
272
|
-
requestFormat: 'json',
|
|
273
|
-
parameters: [
|
|
274
|
-
{
|
|
275
|
-
name: 'status',
|
|
276
|
-
type: 'Query',
|
|
277
|
-
schema: zod_1.z
|
|
278
|
-
.enum(['NEW', 'ACTIVE', 'PAYMENT_FAILED', 'INACTIVE'])
|
|
279
|
-
.optional(),
|
|
280
|
-
},
|
|
281
|
-
{
|
|
282
|
-
name: 'pageable',
|
|
283
|
-
type: 'Query',
|
|
284
|
-
schema: pageable,
|
|
285
|
-
},
|
|
286
|
-
],
|
|
287
|
-
response: zod_1.z.void(),
|
|
288
|
-
},
|
|
289
318
|
{
|
|
290
319
|
method: 'post',
|
|
291
320
|
path: '/agency',
|
|
@@ -301,21 +330,7 @@ const endpoints = (0, core_1.makeApi)([
|
|
|
301
330
|
response: zod_1.z.void(),
|
|
302
331
|
},
|
|
303
332
|
{
|
|
304
|
-
method: '
|
|
305
|
-
path: '/agency/:agencyId',
|
|
306
|
-
alias: 'getAgency',
|
|
307
|
-
requestFormat: 'json',
|
|
308
|
-
parameters: [
|
|
309
|
-
{
|
|
310
|
-
name: 'agencyId',
|
|
311
|
-
type: 'Path',
|
|
312
|
-
schema: zod_1.z.string().uuid(),
|
|
313
|
-
},
|
|
314
|
-
],
|
|
315
|
-
response: zod_1.z.void(),
|
|
316
|
-
},
|
|
317
|
-
{
|
|
318
|
-
method: 'post',
|
|
333
|
+
method: 'put',
|
|
319
334
|
path: '/agency/:agencyId/activate',
|
|
320
335
|
alias: 'activateAgency',
|
|
321
336
|
requestFormat: 'json',
|
|
@@ -390,118 +405,213 @@ const endpoints = (0, core_1.makeApi)([
|
|
|
390
405
|
response: zod_1.z.void(),
|
|
391
406
|
},
|
|
392
407
|
{
|
|
393
|
-
method: '
|
|
394
|
-
path: '/agency/roles',
|
|
395
|
-
alias: '
|
|
408
|
+
method: 'get',
|
|
409
|
+
path: '/agency/roles/permissions',
|
|
410
|
+
alias: 'listPermissionCatalog',
|
|
411
|
+
requestFormat: 'json',
|
|
412
|
+
response: zod_1.z.void(),
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
method: 'put',
|
|
416
|
+
path: '/agency/social-media',
|
|
417
|
+
alias: 'updateSocialUrls',
|
|
396
418
|
requestFormat: 'json',
|
|
397
419
|
parameters: [
|
|
398
420
|
{
|
|
399
421
|
name: 'body',
|
|
400
422
|
type: 'Body',
|
|
401
|
-
schema:
|
|
423
|
+
schema: SocialMediasRequest,
|
|
402
424
|
},
|
|
403
425
|
],
|
|
404
426
|
response: zod_1.z.void(),
|
|
405
427
|
},
|
|
406
428
|
{
|
|
407
|
-
method: '
|
|
408
|
-
path: '/
|
|
409
|
-
alias: '
|
|
429
|
+
method: 'get',
|
|
430
|
+
path: '/invitation',
|
|
431
|
+
alias: 'getSentInvitations',
|
|
432
|
+
requestFormat: 'json',
|
|
433
|
+
parameters: [
|
|
434
|
+
{
|
|
435
|
+
name: 'page',
|
|
436
|
+
type: 'Query',
|
|
437
|
+
schema: zod_1.z.number().int().gte(0).optional().default(0),
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
name: 'size',
|
|
441
|
+
type: 'Query',
|
|
442
|
+
schema: zod_1.z.number().int().gte(1).optional().default(10),
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
name: 'sort',
|
|
446
|
+
type: 'Query',
|
|
447
|
+
schema: zod_1.z
|
|
448
|
+
.array(zod_1.z.string())
|
|
449
|
+
.optional()
|
|
450
|
+
.default(['createdAt,ASC']),
|
|
451
|
+
},
|
|
452
|
+
],
|
|
453
|
+
response: zod_1.z.void(),
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
method: 'post',
|
|
457
|
+
path: '/invitation',
|
|
458
|
+
alias: 'sendInvitation',
|
|
410
459
|
requestFormat: 'json',
|
|
411
460
|
parameters: [
|
|
412
461
|
{
|
|
413
462
|
name: 'body',
|
|
414
463
|
type: 'Body',
|
|
415
|
-
schema:
|
|
464
|
+
schema: InviteMemberRequest,
|
|
416
465
|
},
|
|
466
|
+
],
|
|
467
|
+
response: zod_1.z.void(),
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
method: 'post',
|
|
471
|
+
path: '/invitation/:invitationId',
|
|
472
|
+
alias: 'acceptInvitation',
|
|
473
|
+
requestFormat: 'json',
|
|
474
|
+
parameters: [
|
|
417
475
|
{
|
|
418
|
-
name: '
|
|
476
|
+
name: 'agencyId',
|
|
477
|
+
type: 'Query',
|
|
478
|
+
schema: zod_1.z.string().uuid(),
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
name: 'invitationId',
|
|
419
482
|
type: 'Path',
|
|
420
|
-
schema: zod_1.z.
|
|
483
|
+
schema: zod_1.z.string().uuid(),
|
|
421
484
|
},
|
|
422
485
|
],
|
|
423
486
|
response: zod_1.z.void(),
|
|
424
487
|
},
|
|
425
488
|
{
|
|
426
|
-
method: '
|
|
427
|
-
path: '/
|
|
428
|
-
alias: '
|
|
489
|
+
method: 'get',
|
|
490
|
+
path: '/member',
|
|
491
|
+
alias: 'getAllMembers',
|
|
429
492
|
requestFormat: 'json',
|
|
430
493
|
parameters: [
|
|
431
494
|
{
|
|
432
495
|
name: 'roleId',
|
|
433
|
-
type: '
|
|
434
|
-
schema: zod_1.z.number().int(),
|
|
496
|
+
type: 'Query',
|
|
497
|
+
schema: zod_1.z.number().int().optional(),
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
name: 'page',
|
|
501
|
+
type: 'Query',
|
|
502
|
+
schema: zod_1.z.number().int().gte(0).optional().default(0),
|
|
503
|
+
},
|
|
504
|
+
{
|
|
505
|
+
name: 'size',
|
|
506
|
+
type: 'Query',
|
|
507
|
+
schema: zod_1.z.number().int().gte(1).optional().default(10),
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
name: 'sort',
|
|
511
|
+
type: 'Query',
|
|
512
|
+
schema: zod_1.z
|
|
513
|
+
.array(zod_1.z.string())
|
|
514
|
+
.optional()
|
|
515
|
+
.default(['joinedAt,DESC']),
|
|
435
516
|
},
|
|
436
517
|
],
|
|
437
518
|
response: zod_1.z.void(),
|
|
438
519
|
},
|
|
439
520
|
{
|
|
440
|
-
method: '
|
|
441
|
-
path: '/
|
|
442
|
-
alias: '
|
|
521
|
+
method: 'put',
|
|
522
|
+
path: '/member/:memberId/role',
|
|
523
|
+
alias: 'assignRole',
|
|
443
524
|
requestFormat: 'json',
|
|
525
|
+
parameters: [
|
|
526
|
+
{
|
|
527
|
+
name: 'body',
|
|
528
|
+
type: 'Body',
|
|
529
|
+
schema: zod_1.z.object({ roleId: zod_1.z.number().int() }).passthrough(),
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
name: 'memberId',
|
|
533
|
+
type: 'Path',
|
|
534
|
+
schema: zod_1.z.string().uuid(),
|
|
535
|
+
},
|
|
536
|
+
],
|
|
444
537
|
response: zod_1.z.void(),
|
|
445
538
|
},
|
|
446
539
|
{
|
|
447
540
|
method: 'put',
|
|
448
|
-
path: '/
|
|
449
|
-
alias: '
|
|
541
|
+
path: '/member/role',
|
|
542
|
+
alias: 'assignRoleBatch',
|
|
450
543
|
requestFormat: 'json',
|
|
451
544
|
parameters: [
|
|
452
545
|
{
|
|
453
546
|
name: 'body',
|
|
454
547
|
type: 'Body',
|
|
455
|
-
schema:
|
|
548
|
+
schema: BatchAssignRoleRequest,
|
|
456
549
|
},
|
|
457
550
|
],
|
|
458
551
|
response: zod_1.z.void(),
|
|
459
552
|
},
|
|
460
553
|
{
|
|
461
554
|
method: 'get',
|
|
462
|
-
path: '/agency
|
|
463
|
-
alias: '
|
|
555
|
+
path: '/public/agency',
|
|
556
|
+
alias: 'getAllAgencies',
|
|
464
557
|
requestFormat: 'json',
|
|
465
558
|
parameters: [
|
|
466
559
|
{
|
|
467
|
-
name: '
|
|
468
|
-
type: '
|
|
469
|
-
schema: zod_1.z
|
|
560
|
+
name: 'status',
|
|
561
|
+
type: 'Query',
|
|
562
|
+
schema: zod_1.z
|
|
563
|
+
.enum(['NEW', 'ACTIVE', 'PAYMENT_FAILED', 'INACTIVE'])
|
|
564
|
+
.optional(),
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
name: 'page',
|
|
568
|
+
type: 'Query',
|
|
569
|
+
schema: zod_1.z.number().int().gte(0).optional().default(0),
|
|
570
|
+
},
|
|
571
|
+
{
|
|
572
|
+
name: 'size',
|
|
573
|
+
type: 'Query',
|
|
574
|
+
schema: zod_1.z.number().int().gte(1).optional().default(10),
|
|
575
|
+
},
|
|
576
|
+
{
|
|
577
|
+
name: 'sort',
|
|
578
|
+
type: 'Query',
|
|
579
|
+
schema: zod_1.z.array(zod_1.z.string()).optional().default(['name,ASC']),
|
|
470
580
|
},
|
|
471
581
|
],
|
|
472
582
|
response: zod_1.z.void(),
|
|
473
583
|
},
|
|
474
584
|
{
|
|
475
585
|
method: 'get',
|
|
476
|
-
path: '/
|
|
477
|
-
alias: '
|
|
586
|
+
path: '/public/agency/:agencyId',
|
|
587
|
+
alias: 'getAgency',
|
|
478
588
|
requestFormat: 'json',
|
|
479
589
|
parameters: [
|
|
480
590
|
{
|
|
481
|
-
name: '
|
|
482
|
-
type: '
|
|
483
|
-
schema:
|
|
591
|
+
name: 'agencyId',
|
|
592
|
+
type: 'Path',
|
|
593
|
+
schema: zod_1.z.string().uuid(),
|
|
484
594
|
},
|
|
485
595
|
],
|
|
486
596
|
response: zod_1.z.void(),
|
|
487
597
|
},
|
|
488
598
|
{
|
|
489
|
-
method: '
|
|
490
|
-
path: '/
|
|
491
|
-
alias: '
|
|
599
|
+
method: 'get',
|
|
600
|
+
path: '/public/agency/subdomain/:subDomain',
|
|
601
|
+
alias: 'getAgencyBySubdomain',
|
|
492
602
|
requestFormat: 'json',
|
|
493
603
|
parameters: [
|
|
494
604
|
{
|
|
495
|
-
name: '
|
|
496
|
-
type: '
|
|
497
|
-
schema:
|
|
605
|
+
name: 'subDomain',
|
|
606
|
+
type: 'Path',
|
|
607
|
+
schema: zod_1.z.string(),
|
|
498
608
|
},
|
|
499
609
|
],
|
|
500
610
|
response: zod_1.z.void(),
|
|
501
611
|
},
|
|
502
612
|
{
|
|
503
613
|
method: 'get',
|
|
504
|
-
path: '/invitation/:invitationId',
|
|
614
|
+
path: '/public/invitation/:invitationId',
|
|
505
615
|
alias: 'getInvitationDetails',
|
|
506
616
|
requestFormat: 'json',
|
|
507
617
|
parameters: [
|
|
@@ -519,34 +629,72 @@ const endpoints = (0, core_1.makeApi)([
|
|
|
519
629
|
response: zod_1.z.void(),
|
|
520
630
|
},
|
|
521
631
|
{
|
|
522
|
-
method: '
|
|
523
|
-
path: '/
|
|
524
|
-
alias: '
|
|
632
|
+
method: 'get',
|
|
633
|
+
path: '/roles',
|
|
634
|
+
alias: 'listRoles',
|
|
525
635
|
requestFormat: 'json',
|
|
526
636
|
parameters: [
|
|
527
637
|
{
|
|
528
|
-
name: '
|
|
638
|
+
name: 'page',
|
|
529
639
|
type: 'Query',
|
|
530
|
-
schema: zod_1.z.
|
|
640
|
+
schema: zod_1.z.number().int().gte(0).optional().default(0),
|
|
531
641
|
},
|
|
532
642
|
{
|
|
533
|
-
name: '
|
|
643
|
+
name: 'size',
|
|
644
|
+
type: 'Query',
|
|
645
|
+
schema: zod_1.z.number().int().gte(1).optional().default(20),
|
|
646
|
+
},
|
|
647
|
+
{
|
|
648
|
+
name: 'sort',
|
|
649
|
+
type: 'Query',
|
|
650
|
+
schema: zod_1.z.array(zod_1.z.string()).optional(),
|
|
651
|
+
},
|
|
652
|
+
],
|
|
653
|
+
response: zod_1.z.void(),
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
method: 'post',
|
|
657
|
+
path: '/roles',
|
|
658
|
+
alias: 'createRole',
|
|
659
|
+
requestFormat: 'json',
|
|
660
|
+
parameters: [
|
|
661
|
+
{
|
|
662
|
+
name: 'body',
|
|
663
|
+
type: 'Body',
|
|
664
|
+
schema: RolesRequest,
|
|
665
|
+
},
|
|
666
|
+
],
|
|
667
|
+
response: zod_1.z.void(),
|
|
668
|
+
},
|
|
669
|
+
{
|
|
670
|
+
method: 'put',
|
|
671
|
+
path: '/roles/:roleId',
|
|
672
|
+
alias: 'updateRole',
|
|
673
|
+
requestFormat: 'json',
|
|
674
|
+
parameters: [
|
|
675
|
+
{
|
|
676
|
+
name: 'body',
|
|
677
|
+
type: 'Body',
|
|
678
|
+
schema: RolesRequest,
|
|
679
|
+
},
|
|
680
|
+
{
|
|
681
|
+
name: 'roleId',
|
|
534
682
|
type: 'Path',
|
|
535
|
-
schema: zod_1.z.
|
|
683
|
+
schema: zod_1.z.number().int(),
|
|
536
684
|
},
|
|
537
685
|
],
|
|
538
686
|
response: zod_1.z.void(),
|
|
539
687
|
},
|
|
540
688
|
{
|
|
541
|
-
method: '
|
|
542
|
-
path: '/
|
|
543
|
-
alias: '
|
|
689
|
+
method: 'delete',
|
|
690
|
+
path: '/roles/:roleId',
|
|
691
|
+
alias: 'removeRole',
|
|
544
692
|
requestFormat: 'json',
|
|
545
693
|
parameters: [
|
|
546
694
|
{
|
|
547
|
-
name: '
|
|
548
|
-
type: '
|
|
549
|
-
schema:
|
|
695
|
+
name: 'roleId',
|
|
696
|
+
type: 'Path',
|
|
697
|
+
schema: zod_1.z.number().int(),
|
|
550
698
|
},
|
|
551
699
|
],
|
|
552
700
|
response: zod_1.z.void(),
|