@homespot-sdk/validators 0.0.639 → 0.0.641
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 +1274 -803
- package/dist/index.js +307 -159
- package/package.json +1 -1
- package/src/index.ts +311 -161
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
|
+
paged: zod_1.z.boolean(),
|
|
142
|
+
pageNumber: zod_1.z.number().int(),
|
|
143
|
+
pageSize: zod_1.z.number().int(),
|
|
144
|
+
sort: SortObject,
|
|
145
|
+
unpaged: zod_1.z.boolean(),
|
|
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
|
+
pageable: PageableObject,
|
|
160
|
+
sort: SortObject,
|
|
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(),
|
|
@@ -217,6 +228,8 @@ const PermissionResponse = zod_1.z
|
|
|
217
228
|
'INVITATION_WRITE',
|
|
218
229
|
'ROLE_READ',
|
|
219
230
|
'ROLE_WRITE',
|
|
231
|
+
'MEMBER_READ',
|
|
232
|
+
'MEMBER_WRITE',
|
|
220
233
|
]),
|
|
221
234
|
implied: zod_1.z.array(zod_1.z.enum([
|
|
222
235
|
'AGENCY_WRITE',
|
|
@@ -224,22 +237,56 @@ const PermissionResponse = zod_1.z
|
|
|
224
237
|
'INVITATION_WRITE',
|
|
225
238
|
'ROLE_READ',
|
|
226
239
|
'ROLE_WRITE',
|
|
240
|
+
'MEMBER_READ',
|
|
241
|
+
'MEMBER_WRITE',
|
|
227
242
|
])),
|
|
228
243
|
})
|
|
229
244
|
.passthrough();
|
|
230
245
|
const GroupedPermissionsResponse = zod_1.z
|
|
231
246
|
.object({
|
|
232
|
-
group: zod_1.z.enum(['AGENCY', 'INVITATION', 'ROLE']),
|
|
247
|
+
group: zod_1.z.enum(['AGENCY', 'INVITATION', 'ROLE', 'MEMBER']),
|
|
233
248
|
permissions: zod_1.z.array(PermissionResponse),
|
|
234
249
|
})
|
|
235
250
|
.passthrough();
|
|
251
|
+
const MemberViewResponse = zod_1.z
|
|
252
|
+
.object({
|
|
253
|
+
userId: zod_1.z.string(),
|
|
254
|
+
firstName: zod_1.z.string(),
|
|
255
|
+
lastName: zod_1.z.string(),
|
|
256
|
+
phone: zod_1.z.string().optional(),
|
|
257
|
+
email: zod_1.z.string(),
|
|
258
|
+
roleId: zod_1.z.number().int(),
|
|
259
|
+
roleName: zod_1.z.string(),
|
|
260
|
+
joinedAt: zod_1.z.string().datetime({ offset: true }),
|
|
261
|
+
})
|
|
262
|
+
.passthrough();
|
|
263
|
+
const PagedModelMemberViewResponse = zod_1.z
|
|
264
|
+
.object({ content: zod_1.z.array(MemberViewResponse), page: PageMetadata })
|
|
265
|
+
.partial()
|
|
266
|
+
.passthrough();
|
|
267
|
+
const InvitationViewResponse = zod_1.z
|
|
268
|
+
.object({
|
|
269
|
+
invitationId: zod_1.z.string().uuid(),
|
|
270
|
+
email: zod_1.z.string(),
|
|
271
|
+
status: zod_1.z.enum(['PENDING', 'ACCEPTED', 'CANCELLED', 'EXPIRED']),
|
|
272
|
+
createdAt: zod_1.z.string().datetime({ offset: true }),
|
|
273
|
+
expiresAt: zod_1.z.string().datetime({ offset: true }),
|
|
274
|
+
acceptedAt: zod_1.z.string().datetime({ offset: true }).optional(),
|
|
275
|
+
acceptedBy: zod_1.z.string().optional(),
|
|
276
|
+
})
|
|
277
|
+
.passthrough();
|
|
278
|
+
const PagedModelInvitationViewResponse = zod_1.z
|
|
279
|
+
.object({ content: zod_1.z.array(InvitationViewResponse), page: PageMetadata })
|
|
280
|
+
.partial()
|
|
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
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
InvitationViewResponse,
|
|
258
|
-
PagedModelInvitationViewResponse,
|
|
300
|
+
RoleResponse,
|
|
301
|
+
SortObject,
|
|
302
|
+
PageableObject,
|
|
303
|
+
PageRoleResponse,
|
|
259
304
|
InvitationDetailsResponse,
|
|
260
|
-
|
|
261
|
-
|
|
305
|
+
AgencySummaryResponse,
|
|
306
|
+
PageMetadata,
|
|
307
|
+
PagedModelAgencySummaryResponse,
|
|
262
308
|
AddressViewResponse,
|
|
263
|
-
|
|
309
|
+
AgencyProfileResponse,
|
|
264
310
|
PermissionResponse,
|
|
265
311
|
GroupedPermissionsResponse,
|
|
312
|
+
MemberViewResponse,
|
|
313
|
+
PagedModelMemberViewResponse,
|
|
314
|
+
InvitationViewResponse,
|
|
315
|
+
PagedModelInvitationViewResponse,
|
|
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/
|
|
395
|
-
alias: '
|
|
408
|
+
method: 'put',
|
|
409
|
+
path: '/agency/social-media',
|
|
410
|
+
alias: 'updateSocialUrls',
|
|
396
411
|
requestFormat: 'json',
|
|
397
412
|
parameters: [
|
|
398
413
|
{
|
|
399
414
|
name: 'body',
|
|
400
415
|
type: 'Body',
|
|
401
|
-
schema:
|
|
416
|
+
schema: SocialMediasRequest,
|
|
402
417
|
},
|
|
403
418
|
],
|
|
404
419
|
response: zod_1.z.void(),
|
|
405
420
|
},
|
|
406
421
|
{
|
|
407
|
-
method: '
|
|
408
|
-
path: '/
|
|
409
|
-
alias: '
|
|
422
|
+
method: 'get',
|
|
423
|
+
path: '/invitation',
|
|
424
|
+
alias: 'getSentInvitations',
|
|
425
|
+
requestFormat: 'json',
|
|
426
|
+
parameters: [
|
|
427
|
+
{
|
|
428
|
+
name: 'page',
|
|
429
|
+
type: 'Query',
|
|
430
|
+
schema: zod_1.z.number().int().gte(0).optional().default(0),
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
name: 'size',
|
|
434
|
+
type: 'Query',
|
|
435
|
+
schema: zod_1.z.number().int().gte(1).optional().default(10),
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
name: 'sort',
|
|
439
|
+
type: 'Query',
|
|
440
|
+
schema: zod_1.z
|
|
441
|
+
.array(zod_1.z.string())
|
|
442
|
+
.optional()
|
|
443
|
+
.default(['createdAt,ASC']),
|
|
444
|
+
},
|
|
445
|
+
],
|
|
446
|
+
response: zod_1.z.void(),
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
method: 'post',
|
|
450
|
+
path: '/invitation',
|
|
451
|
+
alias: 'sendInvitation',
|
|
410
452
|
requestFormat: 'json',
|
|
411
453
|
parameters: [
|
|
412
454
|
{
|
|
413
455
|
name: 'body',
|
|
414
456
|
type: 'Body',
|
|
415
|
-
schema:
|
|
457
|
+
schema: InviteMemberRequest,
|
|
416
458
|
},
|
|
459
|
+
],
|
|
460
|
+
response: zod_1.z.void(),
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
method: 'post',
|
|
464
|
+
path: '/invitation/:invitationId',
|
|
465
|
+
alias: 'acceptInvitation',
|
|
466
|
+
requestFormat: 'json',
|
|
467
|
+
parameters: [
|
|
417
468
|
{
|
|
418
|
-
name: '
|
|
469
|
+
name: 'agencyId',
|
|
470
|
+
type: 'Query',
|
|
471
|
+
schema: zod_1.z.string().uuid(),
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
name: 'invitationId',
|
|
419
475
|
type: 'Path',
|
|
420
|
-
schema: zod_1.z.
|
|
476
|
+
schema: zod_1.z.string().uuid(),
|
|
421
477
|
},
|
|
422
478
|
],
|
|
423
479
|
response: zod_1.z.void(),
|
|
424
480
|
},
|
|
425
481
|
{
|
|
426
|
-
method: '
|
|
427
|
-
path: '/
|
|
428
|
-
alias: '
|
|
482
|
+
method: 'get',
|
|
483
|
+
path: '/member',
|
|
484
|
+
alias: 'getAllMembers',
|
|
429
485
|
requestFormat: 'json',
|
|
430
486
|
parameters: [
|
|
431
487
|
{
|
|
432
488
|
name: 'roleId',
|
|
433
|
-
type: '
|
|
434
|
-
schema: zod_1.z.number().int(),
|
|
489
|
+
type: 'Query',
|
|
490
|
+
schema: zod_1.z.number().int().optional(),
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
name: 'page',
|
|
494
|
+
type: 'Query',
|
|
495
|
+
schema: zod_1.z.number().int().gte(0).optional().default(0),
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
name: 'size',
|
|
499
|
+
type: 'Query',
|
|
500
|
+
schema: zod_1.z.number().int().gte(1).optional().default(10),
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
name: 'sort',
|
|
504
|
+
type: 'Query',
|
|
505
|
+
schema: zod_1.z
|
|
506
|
+
.array(zod_1.z.string())
|
|
507
|
+
.optional()
|
|
508
|
+
.default(['joinedAt,DESC']),
|
|
435
509
|
},
|
|
436
510
|
],
|
|
437
511
|
response: zod_1.z.void(),
|
|
438
512
|
},
|
|
439
513
|
{
|
|
440
|
-
method: '
|
|
441
|
-
path: '/
|
|
442
|
-
alias: '
|
|
514
|
+
method: 'put',
|
|
515
|
+
path: '/member/:memberId/role',
|
|
516
|
+
alias: 'assignRole',
|
|
443
517
|
requestFormat: 'json',
|
|
518
|
+
parameters: [
|
|
519
|
+
{
|
|
520
|
+
name: 'body',
|
|
521
|
+
type: 'Body',
|
|
522
|
+
schema: zod_1.z.object({ roleId: zod_1.z.number().int() }).passthrough(),
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
name: 'memberId',
|
|
526
|
+
type: 'Path',
|
|
527
|
+
schema: zod_1.z.string().uuid(),
|
|
528
|
+
},
|
|
529
|
+
],
|
|
444
530
|
response: zod_1.z.void(),
|
|
445
531
|
},
|
|
446
532
|
{
|
|
447
533
|
method: 'put',
|
|
448
|
-
path: '/
|
|
449
|
-
alias: '
|
|
534
|
+
path: '/member/role',
|
|
535
|
+
alias: 'assignRoleBatch',
|
|
450
536
|
requestFormat: 'json',
|
|
451
537
|
parameters: [
|
|
452
538
|
{
|
|
453
539
|
name: 'body',
|
|
454
540
|
type: 'Body',
|
|
455
|
-
schema:
|
|
541
|
+
schema: BatchAssignRoleRequest,
|
|
456
542
|
},
|
|
457
543
|
],
|
|
458
544
|
response: zod_1.z.void(),
|
|
459
545
|
},
|
|
460
546
|
{
|
|
461
547
|
method: 'get',
|
|
462
|
-
path: '/agency
|
|
463
|
-
alias: '
|
|
548
|
+
path: '/public/agency',
|
|
549
|
+
alias: 'getAllAgencies',
|
|
464
550
|
requestFormat: 'json',
|
|
465
551
|
parameters: [
|
|
466
552
|
{
|
|
467
|
-
name: '
|
|
468
|
-
type: '
|
|
469
|
-
schema: zod_1.z
|
|
553
|
+
name: 'status',
|
|
554
|
+
type: 'Query',
|
|
555
|
+
schema: zod_1.z
|
|
556
|
+
.enum(['NEW', 'ACTIVE', 'PAYMENT_FAILED', 'INACTIVE'])
|
|
557
|
+
.optional(),
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
name: 'page',
|
|
561
|
+
type: 'Query',
|
|
562
|
+
schema: zod_1.z.number().int().gte(0).optional().default(0),
|
|
563
|
+
},
|
|
564
|
+
{
|
|
565
|
+
name: 'size',
|
|
566
|
+
type: 'Query',
|
|
567
|
+
schema: zod_1.z.number().int().gte(1).optional().default(10),
|
|
568
|
+
},
|
|
569
|
+
{
|
|
570
|
+
name: 'sort',
|
|
571
|
+
type: 'Query',
|
|
572
|
+
schema: zod_1.z.array(zod_1.z.string()).optional().default(['name,ASC']),
|
|
470
573
|
},
|
|
471
574
|
],
|
|
472
575
|
response: zod_1.z.void(),
|
|
473
576
|
},
|
|
474
577
|
{
|
|
475
578
|
method: 'get',
|
|
476
|
-
path: '/
|
|
477
|
-
alias: '
|
|
579
|
+
path: '/public/agency/:agencyId',
|
|
580
|
+
alias: 'getAgency',
|
|
478
581
|
requestFormat: 'json',
|
|
479
582
|
parameters: [
|
|
480
583
|
{
|
|
481
|
-
name: '
|
|
482
|
-
type: '
|
|
483
|
-
schema:
|
|
584
|
+
name: 'agencyId',
|
|
585
|
+
type: 'Path',
|
|
586
|
+
schema: zod_1.z.string().uuid(),
|
|
484
587
|
},
|
|
485
588
|
],
|
|
486
589
|
response: zod_1.z.void(),
|
|
487
590
|
},
|
|
488
591
|
{
|
|
489
|
-
method: '
|
|
490
|
-
path: '/
|
|
491
|
-
alias: '
|
|
592
|
+
method: 'get',
|
|
593
|
+
path: '/public/agency/roles/permissions',
|
|
594
|
+
alias: 'listPermissionCatalog',
|
|
595
|
+
requestFormat: 'json',
|
|
596
|
+
response: zod_1.z.void(),
|
|
597
|
+
},
|
|
598
|
+
{
|
|
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(),
|