@flagpole/api-types 1.0.11 → 1.0.15

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.11
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
@@ -329,7 +343,6 @@ export interface StripeProductsResponseDto {
329
343
  products: ProductWithFeaturesDto[];
330
344
  }
331
345
  export type SubmitFeedbackDto = object;
332
- export type UpdateProfileDto = object;
333
346
  export interface UpdateProjectDto {
334
347
  /**
335
348
  * Optional project description
@@ -342,8 +355,23 @@ export interface UpdateProjectDto {
342
355
  */
343
356
  name: string;
344
357
  }
345
- export type UpdateUserProjectsDto = object;
346
- export type UpdateUserRoleDto = object;
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
+ }
371
+ export interface UpdateUserProfileDto {
372
+ firstName?: string;
373
+ lastName?: string;
374
+ }
347
375
  export type UsersControllerDeleteUserData = any;
348
376
  export type UsersControllerFindAllData = any;
349
377
  export type UsersControllerGetProfileData = any;
@@ -352,6 +380,7 @@ export type UsersControllerResendInvitationData = any;
352
380
  export type UsersControllerUpdateProfileData = any;
353
381
  export type UsersControllerUpdateProjectsData = any;
354
382
  export type UsersControllerUpdateRoleData = any;
383
+ export type UsersControllerUpdateUserData = any;
355
384
  export declare namespace Api {
356
385
  /**
357
386
  * No description
@@ -477,9 +506,12 @@ export declare namespace Api {
477
506
  }
478
507
  /**
479
508
  * No description
509
+ * @tags users
480
510
  * @name UsersControllerFindAll
511
+ * @summary Get all users in organization
481
512
  * @request GET:/api/users
482
- * @response `200` `UsersControllerFindAllData`
513
+ * @secure
514
+ * @response `200` `UsersControllerFindAllData` Users retrieved successfully
483
515
  */
484
516
  namespace UsersControllerFindAll {
485
517
  type RequestParams = {};
@@ -490,9 +522,13 @@ export declare namespace Api {
490
522
  }
491
523
  /**
492
524
  * No description
525
+ * @tags users
493
526
  * @name UsersControllerInvite
527
+ * @summary Invite a new user to the organization
494
528
  * @request POST:/api/users/invite
495
- * @response `201` `UsersControllerInviteData`
529
+ * @secure
530
+ * @response `201` `UsersControllerInviteData` User invited successfully
531
+ * @response `403` `void` Insufficient permissions
496
532
  */
497
533
  namespace UsersControllerInvite {
498
534
  type RequestParams = {};
@@ -503,54 +539,90 @@ export declare namespace Api {
503
539
  }
504
540
  /**
505
541
  * No description
506
- * @name UsersControllerUpdateRole
507
- * @request PATCH:/api/users/{id}/role
508
- * @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
509
550
  */
510
- namespace UsersControllerUpdateRole {
551
+ namespace UsersControllerUpdateUser {
511
552
  type RequestParams = {
512
553
  id: string;
513
554
  };
514
555
  type RequestQuery = {};
515
- type RequestBody = UpdateUserRoleDto;
556
+ type RequestBody = UpdateUserDto;
516
557
  type RequestHeaders = {};
517
- type ResponseBody = UsersControllerUpdateRoleData;
558
+ type ResponseBody = UsersControllerUpdateUserData;
518
559
  }
519
560
  /**
520
561
  * No description
521
- * @name UsersControllerUpdateProjects
522
- * @request PATCH:/api/users/{id}/projects
523
- * @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
524
569
  */
525
- namespace UsersControllerUpdateProjects {
570
+ namespace UsersControllerDeleteUser {
526
571
  type RequestParams = {
527
572
  id: string;
528
573
  };
529
574
  type RequestQuery = {};
530
- type RequestBody = UpdateUserProjectsDto;
575
+ type RequestBody = never;
531
576
  type RequestHeaders = {};
532
- type ResponseBody = UsersControllerUpdateProjectsData;
577
+ type ResponseBody = UsersControllerDeleteUserData;
533
578
  }
534
579
  /**
535
580
  * No description
536
- * @name UsersControllerDeleteUser
537
- * @request DELETE:/api/users/{id}
538
- * @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`
539
588
  */
540
- namespace UsersControllerDeleteUser {
589
+ namespace UsersControllerUpdateRole {
541
590
  type RequestParams = {
542
591
  id: string;
543
592
  };
544
593
  type RequestQuery = {};
545
594
  type RequestBody = never;
546
595
  type RequestHeaders = {};
547
- type ResponseBody = UsersControllerDeleteUserData;
596
+ type ResponseBody = UsersControllerUpdateRoleData;
597
+ }
598
+ /**
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;
548
616
  }
549
617
  /**
550
618
  * No description
619
+ * @tags users
551
620
  * @name UsersControllerResendInvitation
621
+ * @summary Resend invitation to pending user
552
622
  * @request POST:/api/users/{id}/resend-invitation
553
- * @response `201` `UsersControllerResendInvitationData`
623
+ * @secure
624
+ * @response `200` `UsersControllerResendInvitationData` Invitation resent successfully
625
+ * @response `403` `void` Insufficient permissions
554
626
  */
555
627
  namespace UsersControllerResendInvitation {
556
628
  type RequestParams = {
@@ -563,8 +635,11 @@ export declare namespace Api {
563
635
  }
564
636
  /**
565
637
  * No description
638
+ * @tags users
566
639
  * @name UsersControllerGetProfile
640
+ * @summary Get current user profile
567
641
  * @request GET:/api/users/profile
642
+ * @secure
568
643
  * @response `200` `UsersControllerGetProfileData`
569
644
  */
570
645
  namespace UsersControllerGetProfile {
@@ -576,14 +651,17 @@ export declare namespace Api {
576
651
  }
577
652
  /**
578
653
  * No description
654
+ * @tags users
579
655
  * @name UsersControllerUpdateProfile
656
+ * @summary Update current user profile
580
657
  * @request PATCH:/api/users/profile
658
+ * @secure
581
659
  * @response `200` `UsersControllerUpdateProfileData`
582
660
  */
583
661
  namespace UsersControllerUpdateProfile {
584
662
  type RequestParams = {};
585
663
  type RequestQuery = {};
586
- type RequestBody = UpdateProfileDto;
664
+ type RequestBody = UpdateUserProfileDto;
587
665
  type RequestHeaders = {};
588
666
  type ResponseBody = UsersControllerUpdateProfileData;
589
667
  }
@@ -1275,67 +1353,109 @@ export declare class Api<SecurityDataType extends unknown> {
1275
1353
  /**
1276
1354
  * No description
1277
1355
  *
1356
+ * @tags users
1278
1357
  * @name UsersControllerFindAll
1358
+ * @summary Get all users in organization
1279
1359
  * @request GET:/api/users
1280
- * @response `200` `UsersControllerFindAllData`
1360
+ * @secure
1361
+ * @response `200` `UsersControllerFindAllData` Users retrieved successfully
1281
1362
  */
1282
1363
  usersControllerFindAll: (params?: RequestParams) => Promise<AxiosResponse<any, any>>;
1283
1364
  /**
1284
1365
  * No description
1285
1366
  *
1367
+ * @tags users
1286
1368
  * @name UsersControllerInvite
1369
+ * @summary Invite a new user to the organization
1287
1370
  * @request POST:/api/users/invite
1288
- * @response `201` `UsersControllerInviteData`
1371
+ * @secure
1372
+ * @response `201` `UsersControllerInviteData` User invited successfully
1373
+ * @response `403` `void` Insufficient permissions
1289
1374
  */
1290
1375
  usersControllerInvite: (data: InviteUserDto, params?: RequestParams) => Promise<AxiosResponse<any, any>>;
1291
1376
  /**
1292
1377
  * No description
1293
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
1294
1405
  * @name UsersControllerUpdateRole
1406
+ * @summary Update user role (deprecated - use PATCH /users/:id)
1295
1407
  * @request PATCH:/api/users/{id}/role
1408
+ * @deprecated
1409
+ * @secure
1296
1410
  * @response `200` `UsersControllerUpdateRoleData`
1297
1411
  */
1298
- usersControllerUpdateRole: (id: string, data: UpdateUserRoleDto, params?: RequestParams) => Promise<AxiosResponse<any, any>>;
1412
+ usersControllerUpdateRole: (id: string, params?: RequestParams) => Promise<AxiosResponse<any, any>>;
1299
1413
  /**
1300
1414
  * No description
1301
1415
  *
1416
+ * @tags users
1302
1417
  * @name UsersControllerUpdateProjects
1418
+ * @summary Update user projects (deprecated - use PATCH /users/:id)
1303
1419
  * @request PATCH:/api/users/{id}/projects
1420
+ * @deprecated
1421
+ * @secure
1304
1422
  * @response `200` `UsersControllerUpdateProjectsData`
1305
1423
  */
1306
- usersControllerUpdateProjects: (id: string, data: UpdateUserProjectsDto, params?: RequestParams) => Promise<AxiosResponse<any, any>>;
1307
- /**
1308
- * No description
1309
- *
1310
- * @name UsersControllerDeleteUser
1311
- * @request DELETE:/api/users/{id}
1312
- * @response `200` `UsersControllerDeleteUserData`
1313
- */
1314
- usersControllerDeleteUser: (id: string, params?: RequestParams) => Promise<AxiosResponse<any, any>>;
1424
+ usersControllerUpdateProjects: (id: string, params?: RequestParams) => Promise<AxiosResponse<any, any>>;
1315
1425
  /**
1316
1426
  * No description
1317
1427
  *
1428
+ * @tags users
1318
1429
  * @name UsersControllerResendInvitation
1430
+ * @summary Resend invitation to pending user
1319
1431
  * @request POST:/api/users/{id}/resend-invitation
1320
- * @response `201` `UsersControllerResendInvitationData`
1432
+ * @secure
1433
+ * @response `200` `UsersControllerResendInvitationData` Invitation resent successfully
1434
+ * @response `403` `void` Insufficient permissions
1321
1435
  */
1322
1436
  usersControllerResendInvitation: (id: string, params?: RequestParams) => Promise<AxiosResponse<any, any>>;
1323
1437
  /**
1324
1438
  * No description
1325
1439
  *
1440
+ * @tags users
1326
1441
  * @name UsersControllerGetProfile
1442
+ * @summary Get current user profile
1327
1443
  * @request GET:/api/users/profile
1444
+ * @secure
1328
1445
  * @response `200` `UsersControllerGetProfileData`
1329
1446
  */
1330
1447
  usersControllerGetProfile: (params?: RequestParams) => Promise<AxiosResponse<any, any>>;
1331
1448
  /**
1332
1449
  * No description
1333
1450
  *
1451
+ * @tags users
1334
1452
  * @name UsersControllerUpdateProfile
1453
+ * @summary Update current user profile
1335
1454
  * @request PATCH:/api/users/profile
1455
+ * @secure
1336
1456
  * @response `200` `UsersControllerUpdateProfileData`
1337
1457
  */
1338
- usersControllerUpdateProfile: (data: UpdateProfileDto, params?: RequestParams) => Promise<AxiosResponse<any, any>>;
1458
+ usersControllerUpdateProfile: (data: UpdateUserProfileDto, params?: RequestParams) => Promise<AxiosResponse<any, any>>;
1339
1459
  /**
1340
1460
  * No description
1341
1461
  *
@@ -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.11",
3
+ "version": "1.0.15",
4
4
  "description": "TypeScript types for FlagPole API",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -41,4 +41,4 @@
41
41
  "typescript": "^5.7.2",
42
42
  "@types/node": "^22.9.4"
43
43
  }
44
- }
44
+ }