@flagpole/api-types 1.0.13 → 1.0.16

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/README.md CHANGED
@@ -1,2 +1,2 @@
1
- # @flagpole/api-types v1.0.12
1
+ # @flagpole/api-types v1.0.14
2
2
  TypeScript types for FlagPole API generated from OpenAPI specification.
@@ -220,7 +220,21 @@ export interface ForgotPasswordDto {
220
220
  */
221
221
  email: string;
222
222
  }
223
- export type InviteUserDto = object;
223
+ export interface InviteUserDto {
224
+ email: string;
225
+ firstName?: string;
226
+ lastName?: string;
227
+ /**
228
+ * Array of project IDs the user should have access to
229
+ * @example ["507f1f77bcf86cd799439011","507f1f77bcf86cd799439012"]
230
+ */
231
+ projects?: string[];
232
+ /**
233
+ * User role in the organization
234
+ * @default "member"
235
+ */
236
+ role?: "owner" | "admin" | "member";
237
+ }
224
238
  export interface LoginDto {
225
239
  /**
226
240
  * User's email address
@@ -341,12 +355,23 @@ export interface UpdateProjectDto {
341
355
  */
342
356
  name: string;
343
357
  }
358
+ export interface UpdateUserDto {
359
+ /** User first name */
360
+ firstName?: string;
361
+ /** User last name */
362
+ lastName?: string;
363
+ /**
364
+ * Array of project IDs the user should have access to
365
+ * @example ["507f1f77bcf86cd799439011","507f1f77bcf86cd799439012"]
366
+ */
367
+ projects?: string[];
368
+ /** User role in the organization */
369
+ role?: "owner" | "admin" | "member";
370
+ }
344
371
  export interface UpdateUserProfileDto {
345
372
  firstName?: string;
346
373
  lastName?: string;
347
374
  }
348
- export type UpdateUserProjectsDto = object;
349
- export type UpdateUserRoleDto = object;
350
375
  export type UsersControllerDeleteUserData = any;
351
376
  export type UsersControllerFindAllData = any;
352
377
  export type UsersControllerGetProfileData = any;
@@ -355,6 +380,7 @@ export type UsersControllerResendInvitationData = any;
355
380
  export type UsersControllerUpdateProfileData = any;
356
381
  export type UsersControllerUpdateProjectsData = any;
357
382
  export type UsersControllerUpdateRoleData = any;
383
+ export type UsersControllerUpdateUserData = any;
358
384
  export declare namespace Api {
359
385
  /**
360
386
  * No description
@@ -480,9 +506,12 @@ export declare namespace Api {
480
506
  }
481
507
  /**
482
508
  * No description
509
+ * @tags users
483
510
  * @name UsersControllerFindAll
511
+ * @summary Get all users in organization
484
512
  * @request GET:/api/users
485
- * @response `200` `UsersControllerFindAllData`
513
+ * @secure
514
+ * @response `200` `UsersControllerFindAllData` Users retrieved successfully
486
515
  */
487
516
  namespace UsersControllerFindAll {
488
517
  type RequestParams = {};
@@ -493,9 +522,13 @@ export declare namespace Api {
493
522
  }
494
523
  /**
495
524
  * No description
525
+ * @tags users
496
526
  * @name UsersControllerInvite
527
+ * @summary Invite a new user to the organization
497
528
  * @request POST:/api/users/invite
498
- * @response `201` `UsersControllerInviteData`
529
+ * @secure
530
+ * @response `201` `UsersControllerInviteData` User invited successfully
531
+ * @response `403` `void` Insufficient permissions
499
532
  */
500
533
  namespace UsersControllerInvite {
501
534
  type RequestParams = {};
@@ -506,54 +539,90 @@ export declare namespace Api {
506
539
  }
507
540
  /**
508
541
  * No description
509
- * @name UsersControllerUpdateRole
510
- * @request PATCH:/api/users/{id}/role
511
- * @response `200` `UsersControllerUpdateRoleData`
542
+ * @tags users
543
+ * @name UsersControllerUpdateUser
544
+ * @summary Update user role and projects
545
+ * @request PATCH:/api/users/{id}
546
+ * @secure
547
+ * @response `200` `UsersControllerUpdateUserData` User updated successfully
548
+ * @response `403` `void` Insufficient permissions
549
+ * @response `404` `void` User not found
512
550
  */
513
- namespace UsersControllerUpdateRole {
551
+ namespace UsersControllerUpdateUser {
514
552
  type RequestParams = {
515
553
  id: string;
516
554
  };
517
555
  type RequestQuery = {};
518
- type RequestBody = UpdateUserRoleDto;
556
+ type RequestBody = UpdateUserDto;
519
557
  type RequestHeaders = {};
520
- type ResponseBody = UsersControllerUpdateRoleData;
558
+ type ResponseBody = UsersControllerUpdateUserData;
521
559
  }
522
560
  /**
523
561
  * No description
524
- * @name UsersControllerUpdateProjects
525
- * @request PATCH:/api/users/{id}/projects
526
- * @response `200` `UsersControllerUpdateProjectsData`
562
+ * @tags users
563
+ * @name UsersControllerDeleteUser
564
+ * @summary Remove user from organization
565
+ * @request DELETE:/api/users/{id}
566
+ * @secure
567
+ * @response `200` `UsersControllerDeleteUserData` User removed successfully
568
+ * @response `403` `void` Insufficient permissions - only owners can remove users
527
569
  */
528
- namespace UsersControllerUpdateProjects {
570
+ namespace UsersControllerDeleteUser {
529
571
  type RequestParams = {
530
572
  id: string;
531
573
  };
532
574
  type RequestQuery = {};
533
- type RequestBody = UpdateUserProjectsDto;
575
+ type RequestBody = never;
534
576
  type RequestHeaders = {};
535
- type ResponseBody = UsersControllerUpdateProjectsData;
577
+ type ResponseBody = UsersControllerDeleteUserData;
536
578
  }
537
579
  /**
538
580
  * No description
539
- * @name UsersControllerDeleteUser
540
- * @request DELETE:/api/users/{id}
541
- * @response `200` `UsersControllerDeleteUserData`
581
+ * @tags users
582
+ * @name UsersControllerUpdateRole
583
+ * @summary Update user role (deprecated - use PATCH /users/:id)
584
+ * @request PATCH:/api/users/{id}/role
585
+ * @deprecated
586
+ * @secure
587
+ * @response `200` `UsersControllerUpdateRoleData`
542
588
  */
543
- namespace UsersControllerDeleteUser {
589
+ namespace UsersControllerUpdateRole {
544
590
  type RequestParams = {
545
591
  id: string;
546
592
  };
547
593
  type RequestQuery = {};
548
594
  type RequestBody = never;
549
595
  type RequestHeaders = {};
550
- type ResponseBody = UsersControllerDeleteUserData;
596
+ type ResponseBody = UsersControllerUpdateRoleData;
551
597
  }
552
598
  /**
553
599
  * No description
600
+ * @tags users
601
+ * @name UsersControllerUpdateProjects
602
+ * @summary Update user projects (deprecated - use PATCH /users/:id)
603
+ * @request PATCH:/api/users/{id}/projects
604
+ * @deprecated
605
+ * @secure
606
+ * @response `200` `UsersControllerUpdateProjectsData`
607
+ */
608
+ namespace UsersControllerUpdateProjects {
609
+ type RequestParams = {
610
+ id: string;
611
+ };
612
+ type RequestQuery = {};
613
+ type RequestBody = never;
614
+ type RequestHeaders = {};
615
+ type ResponseBody = UsersControllerUpdateProjectsData;
616
+ }
617
+ /**
618
+ * No description
619
+ * @tags users
554
620
  * @name UsersControllerResendInvitation
621
+ * @summary Resend invitation to pending user
555
622
  * @request POST:/api/users/{id}/resend-invitation
556
- * @response `201` `UsersControllerResendInvitationData`
623
+ * @secure
624
+ * @response `200` `UsersControllerResendInvitationData` Invitation resent successfully
625
+ * @response `403` `void` Insufficient permissions
557
626
  */
558
627
  namespace UsersControllerResendInvitation {
559
628
  type RequestParams = {
@@ -566,8 +635,11 @@ export declare namespace Api {
566
635
  }
567
636
  /**
568
637
  * No description
638
+ * @tags users
569
639
  * @name UsersControllerGetProfile
640
+ * @summary Get current user profile
570
641
  * @request GET:/api/users/profile
642
+ * @secure
571
643
  * @response `200` `UsersControllerGetProfileData`
572
644
  */
573
645
  namespace UsersControllerGetProfile {
@@ -579,8 +651,11 @@ export declare namespace Api {
579
651
  }
580
652
  /**
581
653
  * No description
654
+ * @tags users
582
655
  * @name UsersControllerUpdateProfile
656
+ * @summary Update current user profile
583
657
  * @request PATCH:/api/users/profile
658
+ * @secure
584
659
  * @response `200` `UsersControllerUpdateProfileData`
585
660
  */
586
661
  namespace UsersControllerUpdateProfile {
@@ -1278,64 +1353,106 @@ export declare class Api<SecurityDataType extends unknown> {
1278
1353
  /**
1279
1354
  * No description
1280
1355
  *
1356
+ * @tags users
1281
1357
  * @name UsersControllerFindAll
1358
+ * @summary Get all users in organization
1282
1359
  * @request GET:/api/users
1283
- * @response `200` `UsersControllerFindAllData`
1360
+ * @secure
1361
+ * @response `200` `UsersControllerFindAllData` Users retrieved successfully
1284
1362
  */
1285
1363
  usersControllerFindAll: (params?: RequestParams) => Promise<AxiosResponse<any, any>>;
1286
1364
  /**
1287
1365
  * No description
1288
1366
  *
1367
+ * @tags users
1289
1368
  * @name UsersControllerInvite
1369
+ * @summary Invite a new user to the organization
1290
1370
  * @request POST:/api/users/invite
1291
- * @response `201` `UsersControllerInviteData`
1371
+ * @secure
1372
+ * @response `201` `UsersControllerInviteData` User invited successfully
1373
+ * @response `403` `void` Insufficient permissions
1292
1374
  */
1293
1375
  usersControllerInvite: (data: InviteUserDto, params?: RequestParams) => Promise<AxiosResponse<any, any>>;
1294
1376
  /**
1295
1377
  * No description
1296
1378
  *
1379
+ * @tags users
1380
+ * @name UsersControllerUpdateUser
1381
+ * @summary Update user role and projects
1382
+ * @request PATCH:/api/users/{id}
1383
+ * @secure
1384
+ * @response `200` `UsersControllerUpdateUserData` User updated successfully
1385
+ * @response `403` `void` Insufficient permissions
1386
+ * @response `404` `void` User not found
1387
+ */
1388
+ usersControllerUpdateUser: (id: string, data: UpdateUserDto, params?: RequestParams) => Promise<AxiosResponse<any, any>>;
1389
+ /**
1390
+ * No description
1391
+ *
1392
+ * @tags users
1393
+ * @name UsersControllerDeleteUser
1394
+ * @summary Remove user from organization
1395
+ * @request DELETE:/api/users/{id}
1396
+ * @secure
1397
+ * @response `200` `UsersControllerDeleteUserData` User removed successfully
1398
+ * @response `403` `void` Insufficient permissions - only owners can remove users
1399
+ */
1400
+ usersControllerDeleteUser: (id: string, params?: RequestParams) => Promise<AxiosResponse<any, any>>;
1401
+ /**
1402
+ * No description
1403
+ *
1404
+ * @tags users
1297
1405
  * @name UsersControllerUpdateRole
1406
+ * @summary Update user role (deprecated - use PATCH /users/:id)
1298
1407
  * @request PATCH:/api/users/{id}/role
1408
+ * @deprecated
1409
+ * @secure
1299
1410
  * @response `200` `UsersControllerUpdateRoleData`
1300
1411
  */
1301
- usersControllerUpdateRole: (id: string, data: UpdateUserRoleDto, params?: RequestParams) => Promise<AxiosResponse<any, any>>;
1412
+ usersControllerUpdateRole: (id: string, params?: RequestParams) => Promise<AxiosResponse<any, any>>;
1302
1413
  /**
1303
1414
  * No description
1304
1415
  *
1416
+ * @tags users
1305
1417
  * @name UsersControllerUpdateProjects
1418
+ * @summary Update user projects (deprecated - use PATCH /users/:id)
1306
1419
  * @request PATCH:/api/users/{id}/projects
1420
+ * @deprecated
1421
+ * @secure
1307
1422
  * @response `200` `UsersControllerUpdateProjectsData`
1308
1423
  */
1309
- usersControllerUpdateProjects: (id: string, data: UpdateUserProjectsDto, params?: RequestParams) => Promise<AxiosResponse<any, any>>;
1310
- /**
1311
- * No description
1312
- *
1313
- * @name UsersControllerDeleteUser
1314
- * @request DELETE:/api/users/{id}
1315
- * @response `200` `UsersControllerDeleteUserData`
1316
- */
1317
- usersControllerDeleteUser: (id: string, params?: RequestParams) => Promise<AxiosResponse<any, any>>;
1424
+ usersControllerUpdateProjects: (id: string, params?: RequestParams) => Promise<AxiosResponse<any, any>>;
1318
1425
  /**
1319
1426
  * No description
1320
1427
  *
1428
+ * @tags users
1321
1429
  * @name UsersControllerResendInvitation
1430
+ * @summary Resend invitation to pending user
1322
1431
  * @request POST:/api/users/{id}/resend-invitation
1323
- * @response `201` `UsersControllerResendInvitationData`
1432
+ * @secure
1433
+ * @response `200` `UsersControllerResendInvitationData` Invitation resent successfully
1434
+ * @response `403` `void` Insufficient permissions
1324
1435
  */
1325
1436
  usersControllerResendInvitation: (id: string, params?: RequestParams) => Promise<AxiosResponse<any, any>>;
1326
1437
  /**
1327
1438
  * No description
1328
1439
  *
1440
+ * @tags users
1329
1441
  * @name UsersControllerGetProfile
1442
+ * @summary Get current user profile
1330
1443
  * @request GET:/api/users/profile
1444
+ * @secure
1331
1445
  * @response `200` `UsersControllerGetProfileData`
1332
1446
  */
1333
1447
  usersControllerGetProfile: (params?: RequestParams) => Promise<AxiosResponse<any, any>>;
1334
1448
  /**
1335
1449
  * No description
1336
1450
  *
1451
+ * @tags users
1337
1452
  * @name UsersControllerUpdateProfile
1453
+ * @summary Update current user profile
1338
1454
  * @request PATCH:/api/users/profile
1455
+ * @secure
1339
1456
  * @response `200` `UsersControllerUpdateProfileData`
1340
1457
  */
1341
1458
  usersControllerUpdateProfile: (data: UpdateUserProfileDto, params?: RequestParams) => Promise<AxiosResponse<any, any>>;
@@ -230,104 +230,157 @@ class Api {
230
230
  /**
231
231
  * No description
232
232
  *
233
+ * @tags users
233
234
  * @name UsersControllerFindAll
235
+ * @summary Get all users in organization
234
236
  * @request GET:/api/users
235
- * @response `200` `UsersControllerFindAllData`
237
+ * @secure
238
+ * @response `200` `UsersControllerFindAllData` Users retrieved successfully
236
239
  */
237
240
  usersControllerFindAll: (params = {}) => this.http.request({
238
241
  path: `/api/users`,
239
242
  method: "GET",
243
+ secure: true,
240
244
  ...params,
241
245
  }),
242
246
  /**
243
247
  * No description
244
248
  *
249
+ * @tags users
245
250
  * @name UsersControllerInvite
251
+ * @summary Invite a new user to the organization
246
252
  * @request POST:/api/users/invite
247
- * @response `201` `UsersControllerInviteData`
253
+ * @secure
254
+ * @response `201` `UsersControllerInviteData` User invited successfully
255
+ * @response `403` `void` Insufficient permissions
248
256
  */
249
257
  usersControllerInvite: (data, params = {}) => this.http.request({
250
258
  path: `/api/users/invite`,
251
259
  method: "POST",
252
260
  body: data,
261
+ secure: true,
253
262
  type: ContentType.Json,
254
263
  ...params,
255
264
  }),
256
265
  /**
257
266
  * No description
258
267
  *
259
- * @name UsersControllerUpdateRole
260
- * @request PATCH:/api/users/{id}/role
261
- * @response `200` `UsersControllerUpdateRoleData`
268
+ * @tags users
269
+ * @name UsersControllerUpdateUser
270
+ * @summary Update user role and projects
271
+ * @request PATCH:/api/users/{id}
272
+ * @secure
273
+ * @response `200` `UsersControllerUpdateUserData` User updated successfully
274
+ * @response `403` `void` Insufficient permissions
275
+ * @response `404` `void` User not found
262
276
  */
263
- usersControllerUpdateRole: (id, data, params = {}) => this.http.request({
264
- path: `/api/users/${id}/role`,
277
+ usersControllerUpdateUser: (id, data, params = {}) => this.http.request({
278
+ path: `/api/users/${id}`,
265
279
  method: "PATCH",
266
280
  body: data,
281
+ secure: true,
267
282
  type: ContentType.Json,
268
283
  ...params,
269
284
  }),
270
285
  /**
271
286
  * No description
272
287
  *
273
- * @name UsersControllerUpdateProjects
274
- * @request PATCH:/api/users/{id}/projects
275
- * @response `200` `UsersControllerUpdateProjectsData`
288
+ * @tags users
289
+ * @name UsersControllerDeleteUser
290
+ * @summary Remove user from organization
291
+ * @request DELETE:/api/users/{id}
292
+ * @secure
293
+ * @response `200` `UsersControllerDeleteUserData` User removed successfully
294
+ * @response `403` `void` Insufficient permissions - only owners can remove users
276
295
  */
277
- usersControllerUpdateProjects: (id, data, params = {}) => this.http.request({
278
- path: `/api/users/${id}/projects`,
296
+ usersControllerDeleteUser: (id, params = {}) => this.http.request({
297
+ path: `/api/users/${id}`,
298
+ method: "DELETE",
299
+ secure: true,
300
+ ...params,
301
+ }),
302
+ /**
303
+ * No description
304
+ *
305
+ * @tags users
306
+ * @name UsersControllerUpdateRole
307
+ * @summary Update user role (deprecated - use PATCH /users/:id)
308
+ * @request PATCH:/api/users/{id}/role
309
+ * @deprecated
310
+ * @secure
311
+ * @response `200` `UsersControllerUpdateRoleData`
312
+ */
313
+ usersControllerUpdateRole: (id, params = {}) => this.http.request({
314
+ path: `/api/users/${id}/role`,
279
315
  method: "PATCH",
280
- body: data,
281
- type: ContentType.Json,
316
+ secure: true,
282
317
  ...params,
283
318
  }),
284
319
  /**
285
320
  * No description
286
321
  *
287
- * @name UsersControllerDeleteUser
288
- * @request DELETE:/api/users/{id}
289
- * @response `200` `UsersControllerDeleteUserData`
322
+ * @tags users
323
+ * @name UsersControllerUpdateProjects
324
+ * @summary Update user projects (deprecated - use PATCH /users/:id)
325
+ * @request PATCH:/api/users/{id}/projects
326
+ * @deprecated
327
+ * @secure
328
+ * @response `200` `UsersControllerUpdateProjectsData`
290
329
  */
291
- usersControllerDeleteUser: (id, params = {}) => this.http.request({
292
- path: `/api/users/${id}`,
293
- method: "DELETE",
330
+ usersControllerUpdateProjects: (id, params = {}) => this.http.request({
331
+ path: `/api/users/${id}/projects`,
332
+ method: "PATCH",
333
+ secure: true,
294
334
  ...params,
295
335
  }),
296
336
  /**
297
337
  * No description
298
338
  *
339
+ * @tags users
299
340
  * @name UsersControllerResendInvitation
341
+ * @summary Resend invitation to pending user
300
342
  * @request POST:/api/users/{id}/resend-invitation
301
- * @response `201` `UsersControllerResendInvitationData`
343
+ * @secure
344
+ * @response `200` `UsersControllerResendInvitationData` Invitation resent successfully
345
+ * @response `403` `void` Insufficient permissions
302
346
  */
303
347
  usersControllerResendInvitation: (id, params = {}) => this.http.request({
304
348
  path: `/api/users/${id}/resend-invitation`,
305
349
  method: "POST",
350
+ secure: true,
306
351
  ...params,
307
352
  }),
308
353
  /**
309
354
  * No description
310
355
  *
356
+ * @tags users
311
357
  * @name UsersControllerGetProfile
358
+ * @summary Get current user profile
312
359
  * @request GET:/api/users/profile
360
+ * @secure
313
361
  * @response `200` `UsersControllerGetProfileData`
314
362
  */
315
363
  usersControllerGetProfile: (params = {}) => this.http.request({
316
364
  path: `/api/users/profile`,
317
365
  method: "GET",
366
+ secure: true,
318
367
  ...params,
319
368
  }),
320
369
  /**
321
370
  * No description
322
371
  *
372
+ * @tags users
323
373
  * @name UsersControllerUpdateProfile
374
+ * @summary Update current user profile
324
375
  * @request PATCH:/api/users/profile
376
+ * @secure
325
377
  * @response `200` `UsersControllerUpdateProfileData`
326
378
  */
327
379
  usersControllerUpdateProfile: (data, params = {}) => this.http.request({
328
380
  path: `/api/users/profile`,
329
381
  method: "PATCH",
330
382
  body: data,
383
+ secure: true,
331
384
  type: ContentType.Json,
332
385
  ...params,
333
386
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flagpole/api-types",
3
- "version": "1.0.13",
3
+ "version": "1.0.16",
4
4
  "description": "TypeScript types for FlagPole API",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",