authula 0.7.2 → 0.7.4

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.
@@ -148,7 +148,7 @@ var access_control_exports = /* @__PURE__ */ __exportAll({
148
148
  useUpdatePermission: () => useUpdatePermission,
149
149
  useUpdateRole: () => useUpdateRole
150
150
  });
151
- const withQueryKey$13 = (query, queryKey) => {
151
+ const withQueryKey$17 = (query, queryKey) => {
152
152
  const result = { queryKey };
153
153
  for (const key of Object.keys(query)) {
154
154
  if (key === "queryKey") continue;
@@ -195,7 +195,7 @@ const getListPermissionsQueryOptions = (options) => {
195
195
  function useListPermissions(options, queryClient) {
196
196
  const queryOptions = getListPermissionsQueryOptions(options);
197
197
  const query = useQuery(queryOptions, queryClient);
198
- return withQueryKey$13(query, queryOptions.queryKey);
198
+ return withQueryKey$17(query, queryOptions.queryKey);
199
199
  }
200
200
  const getCreatePermissionUrl = () => {
201
201
  return `/access-control/permissions`;
@@ -278,7 +278,7 @@ const getGetPermissionByKeyQueryOptions = (permissionKey, options) => {
278
278
  function useGetPermissionByKey(permissionKey, options, queryClient) {
279
279
  const queryOptions = getGetPermissionByKeyQueryOptions(permissionKey, options);
280
280
  const query = useQuery(queryOptions, queryClient);
281
- return withQueryKey$13(query, queryOptions.queryKey);
281
+ return withQueryKey$17(query, queryOptions.queryKey);
282
282
  }
283
283
  const getGetPermissionUrl = (permissionId) => {
284
284
  return `/access-control/permissions/${permissionId}`;
@@ -316,7 +316,7 @@ const getGetPermissionQueryOptions = (permissionId, options) => {
316
316
  function useGetPermission(permissionId, options, queryClient) {
317
317
  const queryOptions = getGetPermissionQueryOptions(permissionId, options);
318
318
  const query = useQuery(queryOptions, queryClient);
319
- return withQueryKey$13(query, queryOptions.queryKey);
319
+ return withQueryKey$17(query, queryOptions.queryKey);
320
320
  }
321
321
  const getDeletePermissionUrl = (permissionId) => {
322
322
  return `/access-control/permissions/${permissionId}`;
@@ -438,7 +438,7 @@ const getListRolesQueryOptions = (options) => {
438
438
  function useListRoles(options, queryClient) {
439
439
  const queryOptions = getListRolesQueryOptions(options);
440
440
  const query = useQuery(queryOptions, queryClient);
441
- return withQueryKey$13(query, queryOptions.queryKey);
441
+ return withQueryKey$17(query, queryOptions.queryKey);
442
442
  }
443
443
  const getCreateRoleUrl = () => {
444
444
  return `/access-control/roles`;
@@ -521,7 +521,7 @@ const getGetRoleByNameQueryOptions = (roleName, options) => {
521
521
  function useGetRoleByName(roleName, options, queryClient) {
522
522
  const queryOptions = getGetRoleByNameQueryOptions(roleName, options);
523
523
  const query = useQuery(queryOptions, queryClient);
524
- return withQueryKey$13(query, queryOptions.queryKey);
524
+ return withQueryKey$17(query, queryOptions.queryKey);
525
525
  }
526
526
  const getGetRoleUrl = (roleId) => {
527
527
  return `/access-control/roles/${roleId}`;
@@ -559,7 +559,7 @@ const getGetRoleQueryOptions = (roleId, options) => {
559
559
  function useGetRole(roleId, options, queryClient) {
560
560
  const queryOptions = getGetRoleQueryOptions(roleId, options);
561
561
  const query = useQuery(queryOptions, queryClient);
562
- return withQueryKey$13(query, queryOptions.queryKey);
562
+ return withQueryKey$17(query, queryOptions.queryKey);
563
563
  }
564
564
  const getDeleteRoleUrl = (roleId) => {
565
565
  return `/access-control/roles/${roleId}`;
@@ -682,7 +682,7 @@ const getListRolePermissionsQueryOptions = (roleId, options) => {
682
682
  function useListRolePermissions(roleId, options, queryClient) {
683
683
  const queryOptions = getListRolePermissionsQueryOptions(roleId, options);
684
684
  const query = useQuery(queryOptions, queryClient);
685
- return withQueryKey$13(query, queryOptions.queryKey);
685
+ return withQueryKey$17(query, queryOptions.queryKey);
686
686
  }
687
687
  const getReplaceRolePermissionsUrl = (roleId) => {
688
688
  return `/access-control/roles/${roleId}/permissions`;
@@ -850,7 +850,7 @@ const getGetUserPermissionsQueryOptions = (userId, options) => {
850
850
  function useGetUserPermissions(userId, options, queryClient) {
851
851
  const queryOptions = getGetUserPermissionsQueryOptions(userId, options);
852
852
  const query = useQuery(queryOptions, queryClient);
853
- return withQueryKey$13(query, queryOptions.queryKey);
853
+ return withQueryKey$17(query, queryOptions.queryKey);
854
854
  }
855
855
  const getCheckUserPermissionsUrl = (userId) => {
856
856
  return `/access-control/users/${userId}/permissions/check`;
@@ -933,7 +933,7 @@ const getListUserRolesQueryOptions = (userId, options) => {
933
933
  function useListUserRoles(userId, options, queryClient) {
934
934
  const queryOptions = getListUserRolesQueryOptions(userId, options);
935
935
  const query = useQuery(queryOptions, queryClient);
936
- return withQueryKey$13(query, queryOptions.queryKey);
936
+ return withQueryKey$17(query, queryOptions.queryKey);
937
937
  }
938
938
  const getReplaceUserRolesUrl = (userId) => {
939
939
  return `/access-control/users/${userId}/roles`;
@@ -1102,7 +1102,7 @@ var admin_accounts_exports = /* @__PURE__ */ __exportAll({
1102
1102
  useListUserAccounts: () => useListUserAccounts,
1103
1103
  useUpdateAccount: () => useUpdateAccount
1104
1104
  });
1105
- const withQueryKey$12 = (query, queryKey) => {
1105
+ const withQueryKey$16 = (query, queryKey) => {
1106
1106
  const result = { queryKey };
1107
1107
  for (const key of Object.keys(query)) {
1108
1108
  if (key === "queryKey") continue;
@@ -1150,7 +1150,7 @@ const getGetAccountQueryOptions = (id, options) => {
1150
1150
  function useGetAccount(id, options, queryClient) {
1151
1151
  const queryOptions = getGetAccountQueryOptions(id, options);
1152
1152
  const query = useQuery(queryOptions, queryClient);
1153
- return withQueryKey$12(query, queryOptions.queryKey);
1153
+ return withQueryKey$16(query, queryOptions.queryKey);
1154
1154
  }
1155
1155
  const getDeleteAccountUrl = (id) => {
1156
1156
  return `/admin/accounts/${id}`;
@@ -1273,7 +1273,7 @@ const getListUserAccountsQueryOptions = (userId, options) => {
1273
1273
  function useListUserAccounts(userId, options, queryClient) {
1274
1274
  const queryOptions = getListUserAccountsQueryOptions(userId, options);
1275
1275
  const query = useQuery(queryOptions, queryClient);
1276
- return withQueryKey$12(query, queryOptions.queryKey);
1276
+ return withQueryKey$16(query, queryOptions.queryKey);
1277
1277
  }
1278
1278
  const getCreateAccountUrl = (userId) => {
1279
1279
  return `/admin/users/${userId}/accounts`;
@@ -1343,7 +1343,7 @@ var admin_impersonation_exports = /* @__PURE__ */ __exportAll({
1343
1343
  useStartImpersonation: () => useStartImpersonation,
1344
1344
  useStopImpersonation: () => useStopImpersonation
1345
1345
  });
1346
- const withQueryKey$11 = (query, queryKey) => {
1346
+ const withQueryKey$15 = (query, queryKey) => {
1347
1347
  const result = { queryKey };
1348
1348
  for (const key of Object.keys(query)) {
1349
1349
  if (key === "queryKey") continue;
@@ -1390,7 +1390,7 @@ const getListImpersonationsQueryOptions = (options) => {
1390
1390
  function useListImpersonations(options, queryClient) {
1391
1391
  const queryOptions = getListImpersonationsQueryOptions(options);
1392
1392
  const query = useQuery(queryOptions, queryClient);
1393
- return withQueryKey$11(query, queryOptions.queryKey);
1393
+ return withQueryKey$15(query, queryOptions.queryKey);
1394
1394
  }
1395
1395
  const getStartImpersonationUrl = () => {
1396
1396
  return `/admin/impersonations`;
@@ -1473,7 +1473,7 @@ const getGetImpersonationQueryOptions = (impersonationId, options) => {
1473
1473
  function useGetImpersonation(impersonationId, options, queryClient) {
1474
1474
  const queryOptions = getGetImpersonationQueryOptions(impersonationId, options);
1475
1475
  const query = useQuery(queryOptions, queryClient);
1476
- return withQueryKey$11(query, queryOptions.queryKey);
1476
+ return withQueryKey$15(query, queryOptions.queryKey);
1477
1477
  }
1478
1478
  const getStopImpersonationUrl = (impersonationId) => {
1479
1479
  return `/admin/impersonations/${impersonationId}/stop`;
@@ -1546,7 +1546,7 @@ var admin_session_state_exports = /* @__PURE__ */ __exportAll({
1546
1546
  useRevokeSession: () => useRevokeSession,
1547
1547
  useUpdateSessionState: () => useUpdateSessionState
1548
1548
  });
1549
- const withQueryKey$10 = (query, queryKey) => {
1549
+ const withQueryKey$14 = (query, queryKey) => {
1550
1550
  const result = { queryKey };
1551
1551
  for (const key of Object.keys(query)) {
1552
1552
  if (key === "queryKey") continue;
@@ -1593,7 +1593,7 @@ const getListRevokedSessionStatesQueryOptions = (options) => {
1593
1593
  function useListRevokedSessionStates(options, queryClient) {
1594
1594
  const queryOptions = getListRevokedSessionStatesQueryOptions(options);
1595
1595
  const query = useQuery(queryOptions, queryClient);
1596
- return withQueryKey$10(query, queryOptions.queryKey);
1596
+ return withQueryKey$14(query, queryOptions.queryKey);
1597
1597
  }
1598
1598
  const getRevokeSessionUrl = (sessionId) => {
1599
1599
  return `/admin/sessions/${sessionId}/revoke`;
@@ -1676,7 +1676,7 @@ const getGetSessionStateQueryOptions = (sessionId, options) => {
1676
1676
  function useGetSessionState(sessionId, options, queryClient) {
1677
1677
  const queryOptions = getGetSessionStateQueryOptions(sessionId, options);
1678
1678
  const query = useQuery(queryOptions, queryClient);
1679
- return withQueryKey$10(query, queryOptions.queryKey);
1679
+ return withQueryKey$14(query, queryOptions.queryKey);
1680
1680
  }
1681
1681
  const getCreateSessionStateUrl = (sessionId) => {
1682
1682
  return `/admin/sessions/${sessionId}/state`;
@@ -1848,7 +1848,7 @@ var admin_user_state_exports = /* @__PURE__ */ __exportAll({
1848
1848
  useUnbanUser: () => useUnbanUser,
1849
1849
  useUpdateUserState: () => useUpdateUserState
1850
1850
  });
1851
- const withQueryKey$9 = (query, queryKey) => {
1851
+ const withQueryKey$13 = (query, queryKey) => {
1852
1852
  const result = { queryKey };
1853
1853
  for (const key of Object.keys(query)) {
1854
1854
  if (key === "queryKey") continue;
@@ -1895,7 +1895,7 @@ const getListBannedUserStatesQueryOptions = (options) => {
1895
1895
  function useListBannedUserStates(options, queryClient) {
1896
1896
  const queryOptions = getListBannedUserStatesQueryOptions(options);
1897
1897
  const query = useQuery(queryOptions, queryClient);
1898
- return withQueryKey$9(query, queryOptions.queryKey);
1898
+ return withQueryKey$13(query, queryOptions.queryKey);
1899
1899
  }
1900
1900
  const getBanUserUrl = (userId) => {
1901
1901
  return `/admin/users/${userId}/ban`;
@@ -1978,7 +1978,7 @@ const getListUserSessionsQueryOptions = (userId, options) => {
1978
1978
  function useListUserSessions(userId, options, queryClient) {
1979
1979
  const queryOptions = getListUserSessionsQueryOptions(userId, options);
1980
1980
  const query = useQuery(queryOptions, queryClient);
1981
- return withQueryKey$9(query, queryOptions.queryKey);
1981
+ return withQueryKey$13(query, queryOptions.queryKey);
1982
1982
  }
1983
1983
  const getGetUserStateUrl = (userId) => {
1984
1984
  return `/admin/users/${userId}/state`;
@@ -2016,7 +2016,7 @@ const getGetUserStateQueryOptions = (userId, options) => {
2016
2016
  function useGetUserState(userId, options, queryClient) {
2017
2017
  const queryOptions = getGetUserStateQueryOptions(userId, options);
2018
2018
  const query = useQuery(queryOptions, queryClient);
2019
- return withQueryKey$9(query, queryOptions.queryKey);
2019
+ return withQueryKey$13(query, queryOptions.queryKey);
2020
2020
  }
2021
2021
  const getCreateUserStateUrl = (userId) => {
2022
2022
  return `/admin/users/${userId}/state`;
@@ -2215,7 +2215,7 @@ var admin_users_exports = /* @__PURE__ */ __exportAll({
2215
2215
  useListUsers: () => useListUsers,
2216
2216
  useUpdateUser: () => useUpdateUser
2217
2217
  });
2218
- const withQueryKey$8 = (query, queryKey) => {
2218
+ const withQueryKey$12 = (query, queryKey) => {
2219
2219
  const result = { queryKey };
2220
2220
  for (const key of Object.keys(query)) {
2221
2221
  if (key === "queryKey") continue;
@@ -2267,7 +2267,7 @@ const getListUsersQueryOptions = (params, options) => {
2267
2267
  function useListUsers(params, options, queryClient) {
2268
2268
  const queryOptions = getListUsersQueryOptions(params, options);
2269
2269
  const query = useQuery(queryOptions, queryClient);
2270
- return withQueryKey$8(query, queryOptions.queryKey);
2270
+ return withQueryKey$12(query, queryOptions.queryKey);
2271
2271
  }
2272
2272
  const getCreateUserUrl = () => {
2273
2273
  return `/admin/users`;
@@ -2350,7 +2350,7 @@ const getGetUserQueryOptions = (userId, options) => {
2350
2350
  function useGetUser(userId, options, queryClient) {
2351
2351
  const queryOptions = getGetUserQueryOptions(userId, options);
2352
2352
  const query = useQuery(queryOptions, queryClient);
2353
- return withQueryKey$8(query, queryOptions.queryKey);
2353
+ return withQueryKey$12(query, queryOptions.queryKey);
2354
2354
  }
2355
2355
  const getDeleteUserUrl = (userId) => {
2356
2356
  return `/admin/users/${userId}`;
@@ -2484,7 +2484,7 @@ var api_keys_exports = /* @__PURE__ */ __exportAll({
2484
2484
  useVerifyApiKey: () => useVerifyApiKey,
2485
2485
  verifyApiKey: () => verifyApiKey
2486
2486
  });
2487
- const withQueryKey$7 = (query, queryKey) => {
2487
+ const withQueryKey$11 = (query, queryKey) => {
2488
2488
  const result = { queryKey };
2489
2489
  for (const key of Object.keys(query)) {
2490
2490
  if (key === "queryKey") continue;
@@ -2536,7 +2536,7 @@ const getListApiKeysQueryOptions = (params, options) => {
2536
2536
  function useListApiKeys(params, options, queryClient) {
2537
2537
  const queryOptions = getListApiKeysQueryOptions(params, options);
2538
2538
  const query = useQuery(queryOptions, queryClient);
2539
- return withQueryKey$7(query, queryOptions.queryKey);
2539
+ return withQueryKey$11(query, queryOptions.queryKey);
2540
2540
  }
2541
2541
  const getCreateApiKeyUrl = () => {
2542
2542
  return `/api-keys`;
@@ -2664,7 +2664,7 @@ const getGetApiKeyQueryOptions = (id, options) => {
2664
2664
  function useGetApiKey(id, options, queryClient) {
2665
2665
  const queryOptions = getGetApiKeyQueryOptions(id, options);
2666
2666
  const query = useQuery(queryOptions, queryClient);
2667
- return withQueryKey$7(query, queryOptions.queryKey);
2667
+ return withQueryKey$11(query, queryOptions.queryKey);
2668
2668
  }
2669
2669
  const getDeleteApiKeyUrl = (id) => {
2670
2670
  return `/api-keys/${id}`;
@@ -2826,7 +2826,7 @@ var core_exports = /* @__PURE__ */ __exportAll({
2826
2826
  useGetMe: () => useGetMe,
2827
2827
  useSignOut: () => useSignOut
2828
2828
  });
2829
- const withQueryKey$6 = (query, queryKey) => {
2829
+ const withQueryKey$10 = (query, queryKey) => {
2830
2830
  const result = { queryKey };
2831
2831
  for (const key of Object.keys(query)) {
2832
2832
  if (key === "queryKey") continue;
@@ -2873,7 +2873,7 @@ const getGetMeQueryOptions = (options) => {
2873
2873
  function useGetMe(options, queryClient) {
2874
2874
  const queryOptions = getGetMeQueryOptions(options);
2875
2875
  const query = useQuery(queryOptions, queryClient);
2876
- return withQueryKey$6(query, queryOptions.queryKey);
2876
+ return withQueryKey$10(query, queryOptions.queryKey);
2877
2877
  }
2878
2878
  const getSignOutUrl = () => {
2879
2879
  return `/sign-out`;
@@ -2988,7 +2988,7 @@ var email_password_plugin_exports = /* @__PURE__ */ __exportAll({
2988
2988
  useVerifyEmail: () => useVerifyEmail,
2989
2989
  verifyEmail: () => verifyEmail
2990
2990
  });
2991
- const withQueryKey$5 = (query, queryKey) => {
2991
+ const withQueryKey$9 = (query, queryKey) => {
2992
2992
  const result = { queryKey };
2993
2993
  for (const key of Object.keys(query)) {
2994
2994
  if (key === "queryKey") continue;
@@ -3305,7 +3305,7 @@ const getVerifyEmailQueryOptions = (options) => {
3305
3305
  function useVerifyEmail(options, queryClient) {
3306
3306
  const queryOptions = getVerifyEmailQueryOptions(options);
3307
3307
  const query = useQuery(queryOptions, queryClient);
3308
- return withQueryKey$5(query, queryOptions.queryKey);
3308
+ return withQueryKey$9(query, queryOptions.queryKey);
3309
3309
  }
3310
3310
 
3311
3311
  //#endregion
@@ -3330,7 +3330,7 @@ var jwt_plugin_exports = /* @__PURE__ */ __exportAll({
3330
3330
  useGetJWKS: () => useGetJWKS,
3331
3331
  useRefreshToken: () => useRefreshToken
3332
3332
  });
3333
- const withQueryKey$4 = (query, queryKey) => {
3333
+ const withQueryKey$8 = (query, queryKey) => {
3334
3334
  const result = { queryKey };
3335
3335
  for (const key of Object.keys(query)) {
3336
3336
  if (key === "queryKey") continue;
@@ -3377,7 +3377,7 @@ const getGetJWKSQueryOptions = (options) => {
3377
3377
  function useGetJWKS(options, queryClient) {
3378
3378
  const queryOptions = getGetJWKSQueryOptions(options);
3379
3379
  const query = useQuery(queryOptions, queryClient);
3380
- return withQueryKey$4(query, queryOptions.queryKey);
3380
+ return withQueryKey$8(query, queryOptions.queryKey);
3381
3381
  }
3382
3382
  const getRefreshTokenUrl = () => {
3383
3383
  return `/token/refresh`;
@@ -3452,7 +3452,7 @@ var magic_link_plugin_exports = /* @__PURE__ */ __exportAll({
3452
3452
  useVerifyMagicLink: () => useVerifyMagicLink,
3453
3453
  verifyMagicLink: () => verifyMagicLink
3454
3454
  });
3455
- const withQueryKey$3 = (query, queryKey) => {
3455
+ const withQueryKey$7 = (query, queryKey) => {
3456
3456
  const result = { queryKey };
3457
3457
  for (const key of Object.keys(query)) {
3458
3458
  if (key === "queryKey") continue;
@@ -3594,7 +3594,7 @@ const getVerifyMagicLinkQueryOptions = (params, options) => {
3594
3594
  function useVerifyMagicLink(params, options, queryClient) {
3595
3595
  const queryOptions = getVerifyMagicLinkQueryOptions(params, options);
3596
3596
  const query = useQuery(queryOptions, queryClient);
3597
- return withQueryKey$3(query, queryOptions.queryKey);
3597
+ return withQueryKey$7(query, queryOptions.queryKey);
3598
3598
  }
3599
3599
 
3600
3600
  //#endregion
@@ -3621,7 +3621,7 @@ var oauth2_plugin_exports = /* @__PURE__ */ __exportAll({
3621
3621
  useOauthAuthorize: () => useOauthAuthorize,
3622
3622
  useOauthCallback: () => useOauthCallback
3623
3623
  });
3624
- const withQueryKey$2 = (query, queryKey) => {
3624
+ const withQueryKey$6 = (query, queryKey) => {
3625
3625
  const result = { queryKey };
3626
3626
  for (const key of Object.keys(query)) {
3627
3627
  if (key === "queryKey") continue;
@@ -3674,7 +3674,7 @@ const getOauthAuthorizeQueryOptions = (provider, params, options) => {
3674
3674
  function useOauthAuthorize(provider, params, options, queryClient) {
3675
3675
  const queryOptions = getOauthAuthorizeQueryOptions(provider, params, options);
3676
3676
  const query = useQuery(queryOptions, queryClient);
3677
- return withQueryKey$2(query, queryOptions.queryKey);
3677
+ return withQueryKey$6(query, queryOptions.queryKey);
3678
3678
  }
3679
3679
  const getOauthCallbackUrl = (provider, params) => {
3680
3680
  const normalizedParams = new URLSearchParams();
@@ -3717,7 +3717,7 @@ const getOauthCallbackQueryOptions = (provider, params, options) => {
3717
3717
  function useOauthCallback(provider, params, options, queryClient) {
3718
3718
  const queryOptions = getOauthCallbackQueryOptions(provider, params, options);
3719
3719
  const query = useQuery(queryOptions, queryClient);
3720
- return withQueryKey$2(query, queryOptions.queryKey);
3720
+ return withQueryKey$6(query, queryOptions.queryKey);
3721
3721
  }
3722
3722
 
3723
3723
  //#endregion
@@ -3755,7 +3755,7 @@ var organizations_exports = /* @__PURE__ */ __exportAll({
3755
3755
  useListOrganizations: () => useListOrganizations,
3756
3756
  useUpdateOrganization: () => useUpdateOrganization
3757
3757
  });
3758
- const withQueryKey$1 = (query, queryKey) => {
3758
+ const withQueryKey$5 = (query, queryKey) => {
3759
3759
  const result = { queryKey };
3760
3760
  for (const key of Object.keys(query)) {
3761
3761
  if (key === "queryKey") continue;
@@ -3802,7 +3802,7 @@ const getListOrganizationsQueryOptions = (options) => {
3802
3802
  function useListOrganizations(options, queryClient) {
3803
3803
  const queryOptions = getListOrganizationsQueryOptions(options);
3804
3804
  const query = useQuery(queryOptions, queryClient);
3805
- return withQueryKey$1(query, queryOptions.queryKey);
3805
+ return withQueryKey$5(query, queryOptions.queryKey);
3806
3806
  }
3807
3807
  const getCreateOrganizationUrl = () => {
3808
3808
  return `/organizations`;
@@ -3885,7 +3885,7 @@ const getGetOrganizationQueryOptions = (organizationId, options) => {
3885
3885
  function useGetOrganization(organizationId, options, queryClient) {
3886
3886
  const queryOptions = getGetOrganizationQueryOptions(organizationId, options);
3887
3887
  const query = useQuery(queryOptions, queryClient);
3888
- return withQueryKey$1(query, queryOptions.queryKey);
3888
+ return withQueryKey$5(query, queryOptions.queryKey);
3889
3889
  }
3890
3890
  const getDeleteOrganizationUrl = (organizationId) => {
3891
3891
  return `/organizations/${organizationId}`;
@@ -3973,12 +3973,1051 @@ const useUpdateOrganization = (options, queryClient) => {
3973
3973
  return useMutation(getUpdateOrganizationMutationOptions(options), queryClient);
3974
3974
  };
3975
3975
 
3976
+ //#endregion
3977
+ //#region src/gen/endpoints/organization-invitations/organization-invitations.ts
3978
+ var organization_invitations_exports = /* @__PURE__ */ __exportAll({
3979
+ acceptOrganizationInvitation: () => acceptOrganizationInvitation,
3980
+ createOrganizationInvitation: () => createOrganizationInvitation,
3981
+ getAcceptOrganizationInvitationMutationOptions: () => getAcceptOrganizationInvitationMutationOptions,
3982
+ getAcceptOrganizationInvitationUrl: () => getAcceptOrganizationInvitationUrl,
3983
+ getCreateOrganizationInvitationMutationOptions: () => getCreateOrganizationInvitationMutationOptions,
3984
+ getCreateOrganizationInvitationUrl: () => getCreateOrganizationInvitationUrl,
3985
+ getGetOrganizationInvitationQueryKey: () => getGetOrganizationInvitationQueryKey,
3986
+ getGetOrganizationInvitationQueryOptions: () => getGetOrganizationInvitationQueryOptions,
3987
+ getGetOrganizationInvitationUrl: () => getGetOrganizationInvitationUrl,
3988
+ getListOrganizationInvitationsQueryKey: () => getListOrganizationInvitationsQueryKey,
3989
+ getListOrganizationInvitationsQueryOptions: () => getListOrganizationInvitationsQueryOptions,
3990
+ getListOrganizationInvitationsUrl: () => getListOrganizationInvitationsUrl,
3991
+ getOrganizationInvitation: () => getOrganizationInvitation,
3992
+ getRejectOrganizationInvitationMutationOptions: () => getRejectOrganizationInvitationMutationOptions,
3993
+ getRejectOrganizationInvitationUrl: () => getRejectOrganizationInvitationUrl,
3994
+ getRevokeOrganizationInvitationMutationOptions: () => getRevokeOrganizationInvitationMutationOptions,
3995
+ getRevokeOrganizationInvitationUrl: () => getRevokeOrganizationInvitationUrl,
3996
+ listOrganizationInvitations: () => listOrganizationInvitations,
3997
+ rejectOrganizationInvitation: () => rejectOrganizationInvitation,
3998
+ revokeOrganizationInvitation: () => revokeOrganizationInvitation,
3999
+ useAcceptOrganizationInvitation: () => useAcceptOrganizationInvitation,
4000
+ useCreateOrganizationInvitation: () => useCreateOrganizationInvitation,
4001
+ useGetOrganizationInvitation: () => useGetOrganizationInvitation,
4002
+ useListOrganizationInvitations: () => useListOrganizationInvitations,
4003
+ useRejectOrganizationInvitation: () => useRejectOrganizationInvitation,
4004
+ useRevokeOrganizationInvitation: () => useRevokeOrganizationInvitation
4005
+ });
4006
+ const withQueryKey$4 = (query, queryKey) => {
4007
+ const result = { queryKey };
4008
+ for (const key of Object.keys(query)) {
4009
+ if (key === "queryKey") continue;
4010
+ Object.defineProperty(result, key, {
4011
+ enumerable: true,
4012
+ configurable: true,
4013
+ get: () => query[key]
4014
+ });
4015
+ }
4016
+ return result;
4017
+ };
4018
+ const getListOrganizationInvitationsUrl = (organizationId) => {
4019
+ return `/organizations/${organizationId}/invitations`;
4020
+ };
4021
+ /**
4022
+ * Lists all invitations for an organization.
4023
+ * @summary List invitations
4024
+ */
4025
+ const listOrganizationInvitations = async (organizationId, options) => {
4026
+ return customFetch(getListOrganizationInvitationsUrl(organizationId), {
4027
+ ...options,
4028
+ method: "GET"
4029
+ });
4030
+ };
4031
+ const getListOrganizationInvitationsQueryKey = (organizationId) => {
4032
+ return [`/organizations/${organizationId}/invitations`];
4033
+ };
4034
+ const getListOrganizationInvitationsQueryOptions = (organizationId, options) => {
4035
+ const { query: queryOptions, request: requestOptions } = options ?? {};
4036
+ const queryKey = queryOptions?.queryKey ?? getListOrganizationInvitationsQueryKey(organizationId);
4037
+ const queryFn = ({ signal }) => listOrganizationInvitations(organizationId, {
4038
+ signal,
4039
+ ...requestOptions
4040
+ });
4041
+ return {
4042
+ queryKey,
4043
+ queryFn,
4044
+ enabled: organizationId !== null && organizationId !== void 0,
4045
+ ...queryOptions
4046
+ };
4047
+ };
4048
+ /**
4049
+ * @summary List invitations
4050
+ */
4051
+ function useListOrganizationInvitations(organizationId, options, queryClient) {
4052
+ const queryOptions = getListOrganizationInvitationsQueryOptions(organizationId, options);
4053
+ const query = useQuery(queryOptions, queryClient);
4054
+ return withQueryKey$4(query, queryOptions.queryKey);
4055
+ }
4056
+ const getCreateOrganizationInvitationUrl = (organizationId) => {
4057
+ return `/organizations/${organizationId}/invitations`;
4058
+ };
4059
+ /**
4060
+ * Creates an invitation for a user to join an organization.
4061
+ * @summary Create invitation
4062
+ */
4063
+ const createOrganizationInvitation = async (organizationId, createOrganizationInvitationRequest, options) => {
4064
+ return customFetch(getCreateOrganizationInvitationUrl(organizationId), {
4065
+ ...options,
4066
+ method: "POST",
4067
+ headers: {
4068
+ "Content-Type": "application/json",
4069
+ ...options?.headers
4070
+ },
4071
+ body: JSON.stringify(createOrganizationInvitationRequest)
4072
+ });
4073
+ };
4074
+ const getCreateOrganizationInvitationMutationOptions = (options) => {
4075
+ const mutationKey = ["createOrganizationInvitation"];
4076
+ const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
4077
+ ...options,
4078
+ mutation: {
4079
+ ...options.mutation,
4080
+ mutationKey
4081
+ }
4082
+ } : {
4083
+ mutation: { mutationKey },
4084
+ request: void 0
4085
+ };
4086
+ const mutationFn = (props) => {
4087
+ const { organizationId, data } = props ?? {};
4088
+ return createOrganizationInvitation(organizationId, data, requestOptions);
4089
+ };
4090
+ return {
4091
+ mutationFn,
4092
+ ...mutationOptions
4093
+ };
4094
+ };
4095
+ /**
4096
+ * @summary Create invitation
4097
+ */
4098
+ const useCreateOrganizationInvitation = (options, queryClient) => {
4099
+ return useMutation(getCreateOrganizationInvitationMutationOptions(options), queryClient);
4100
+ };
4101
+ const getGetOrganizationInvitationUrl = (organizationId, invitationId) => {
4102
+ return `/organizations/${organizationId}/invitations/${invitationId}`;
4103
+ };
4104
+ /**
4105
+ * Retrieves a single invitation by its ID.
4106
+ * @summary Get invitation
4107
+ */
4108
+ const getOrganizationInvitation = async (organizationId, invitationId, options) => {
4109
+ return customFetch(getGetOrganizationInvitationUrl(organizationId, invitationId), {
4110
+ ...options,
4111
+ method: "GET"
4112
+ });
4113
+ };
4114
+ const getGetOrganizationInvitationQueryKey = (organizationId, invitationId) => {
4115
+ return [`/organizations/${organizationId}/invitations/${invitationId}`];
4116
+ };
4117
+ const getGetOrganizationInvitationQueryOptions = (organizationId, invitationId, options) => {
4118
+ const { query: queryOptions, request: requestOptions } = options ?? {};
4119
+ const queryKey = queryOptions?.queryKey ?? getGetOrganizationInvitationQueryKey(organizationId, invitationId);
4120
+ const queryFn = ({ signal }) => getOrganizationInvitation(organizationId, invitationId, {
4121
+ signal,
4122
+ ...requestOptions
4123
+ });
4124
+ return {
4125
+ queryKey,
4126
+ queryFn,
4127
+ enabled: organizationId !== null && organizationId !== void 0 && invitationId !== null && invitationId !== void 0,
4128
+ ...queryOptions
4129
+ };
4130
+ };
4131
+ /**
4132
+ * @summary Get invitation
4133
+ */
4134
+ function useGetOrganizationInvitation(organizationId, invitationId, options, queryClient) {
4135
+ const queryOptions = getGetOrganizationInvitationQueryOptions(organizationId, invitationId, options);
4136
+ const query = useQuery(queryOptions, queryClient);
4137
+ return withQueryKey$4(query, queryOptions.queryKey);
4138
+ }
4139
+ const getRevokeOrganizationInvitationUrl = (organizationId, invitationId) => {
4140
+ return `/organizations/${organizationId}/invitations/${invitationId}`;
4141
+ };
4142
+ /**
4143
+ * Revokes a pending invitation.
4144
+ * @summary Revoke invitation
4145
+ */
4146
+ const revokeOrganizationInvitation = async (organizationId, invitationId, options) => {
4147
+ return customFetch(getRevokeOrganizationInvitationUrl(organizationId, invitationId), {
4148
+ ...options,
4149
+ method: "PATCH"
4150
+ });
4151
+ };
4152
+ const getRevokeOrganizationInvitationMutationOptions = (options) => {
4153
+ const mutationKey = ["revokeOrganizationInvitation"];
4154
+ const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
4155
+ ...options,
4156
+ mutation: {
4157
+ ...options.mutation,
4158
+ mutationKey
4159
+ }
4160
+ } : {
4161
+ mutation: { mutationKey },
4162
+ request: void 0
4163
+ };
4164
+ const mutationFn = (props) => {
4165
+ const { organizationId, invitationId } = props ?? {};
4166
+ return revokeOrganizationInvitation(organizationId, invitationId, requestOptions);
4167
+ };
4168
+ return {
4169
+ mutationFn,
4170
+ ...mutationOptions
4171
+ };
4172
+ };
4173
+ /**
4174
+ * @summary Revoke invitation
4175
+ */
4176
+ const useRevokeOrganizationInvitation = (options, queryClient) => {
4177
+ return useMutation(getRevokeOrganizationInvitationMutationOptions(options), queryClient);
4178
+ };
4179
+ const getAcceptOrganizationInvitationUrl = (organizationId, invitationId, params) => {
4180
+ const normalizedParams = new URLSearchParams();
4181
+ Object.entries(params || {}).forEach(([key, value]) => {
4182
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
4183
+ });
4184
+ const stringifiedParams = normalizedParams.toString();
4185
+ return stringifiedParams.length > 0 ? `/organizations/${organizationId}/invitations/${invitationId}/accept?${stringifiedParams}` : `/organizations/${organizationId}/invitations/${invitationId}/accept`;
4186
+ };
4187
+ /**
4188
+ * Accepts an invitation to join an organization. Optionally redirects if a redirect_url is provided.
4189
+ * @summary Accept invitation
4190
+ */
4191
+ const acceptOrganizationInvitation = async (organizationId, invitationId, acceptOrganizationInvitationQuery, params, options) => {
4192
+ return customFetch(getAcceptOrganizationInvitationUrl(organizationId, invitationId, params), {
4193
+ ...options,
4194
+ method: "POST",
4195
+ headers: {
4196
+ "Content-Type": "application/json",
4197
+ ...options?.headers
4198
+ },
4199
+ body: JSON.stringify(acceptOrganizationInvitationQuery)
4200
+ });
4201
+ };
4202
+ const getAcceptOrganizationInvitationMutationOptions = (options) => {
4203
+ const mutationKey = ["acceptOrganizationInvitation"];
4204
+ const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
4205
+ ...options,
4206
+ mutation: {
4207
+ ...options.mutation,
4208
+ mutationKey
4209
+ }
4210
+ } : {
4211
+ mutation: { mutationKey },
4212
+ request: void 0
4213
+ };
4214
+ const mutationFn = (props) => {
4215
+ const { organizationId, invitationId, data, params } = props ?? {};
4216
+ return acceptOrganizationInvitation(organizationId, invitationId, data, params, requestOptions);
4217
+ };
4218
+ return {
4219
+ mutationFn,
4220
+ ...mutationOptions
4221
+ };
4222
+ };
4223
+ /**
4224
+ * @summary Accept invitation
4225
+ */
4226
+ const useAcceptOrganizationInvitation = (options, queryClient) => {
4227
+ return useMutation(getAcceptOrganizationInvitationMutationOptions(options), queryClient);
4228
+ };
4229
+ const getRejectOrganizationInvitationUrl = (organizationId, invitationId) => {
4230
+ return `/organizations/${organizationId}/invitations/${invitationId}/reject`;
4231
+ };
4232
+ /**
4233
+ * Rejects an invitation to join an organization.
4234
+ * @summary Reject invitation
4235
+ */
4236
+ const rejectOrganizationInvitation = async (organizationId, invitationId, options) => {
4237
+ return customFetch(getRejectOrganizationInvitationUrl(organizationId, invitationId), {
4238
+ ...options,
4239
+ method: "POST"
4240
+ });
4241
+ };
4242
+ const getRejectOrganizationInvitationMutationOptions = (options) => {
4243
+ const mutationKey = ["rejectOrganizationInvitation"];
4244
+ const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
4245
+ ...options,
4246
+ mutation: {
4247
+ ...options.mutation,
4248
+ mutationKey
4249
+ }
4250
+ } : {
4251
+ mutation: { mutationKey },
4252
+ request: void 0
4253
+ };
4254
+ const mutationFn = (props) => {
4255
+ const { organizationId, invitationId } = props ?? {};
4256
+ return rejectOrganizationInvitation(organizationId, invitationId, requestOptions);
4257
+ };
4258
+ return {
4259
+ mutationFn,
4260
+ ...mutationOptions
4261
+ };
4262
+ };
4263
+ /**
4264
+ * @summary Reject invitation
4265
+ */
4266
+ const useRejectOrganizationInvitation = (options, queryClient) => {
4267
+ return useMutation(getRejectOrganizationInvitationMutationOptions(options), queryClient);
4268
+ };
4269
+
4270
+ //#endregion
4271
+ //#region src/gen/endpoints/organization-members/organization-members.ts
4272
+ var organization_members_exports = /* @__PURE__ */ __exportAll({
4273
+ addOrganizationMember: () => addOrganizationMember,
4274
+ deleteOrganizationMember: () => deleteOrganizationMember,
4275
+ getAddOrganizationMemberMutationOptions: () => getAddOrganizationMemberMutationOptions,
4276
+ getAddOrganizationMemberUrl: () => getAddOrganizationMemberUrl,
4277
+ getDeleteOrganizationMemberMutationOptions: () => getDeleteOrganizationMemberMutationOptions,
4278
+ getDeleteOrganizationMemberUrl: () => getDeleteOrganizationMemberUrl,
4279
+ getGetOrganizationMemberByUserIDQueryKey: () => getGetOrganizationMemberByUserIDQueryKey,
4280
+ getGetOrganizationMemberByUserIDQueryOptions: () => getGetOrganizationMemberByUserIDQueryOptions,
4281
+ getGetOrganizationMemberByUserIDUrl: () => getGetOrganizationMemberByUserIDUrl,
4282
+ getGetOrganizationMemberQueryKey: () => getGetOrganizationMemberQueryKey,
4283
+ getGetOrganizationMemberQueryOptions: () => getGetOrganizationMemberQueryOptions,
4284
+ getGetOrganizationMemberUrl: () => getGetOrganizationMemberUrl,
4285
+ getListOrganizationMembersQueryKey: () => getListOrganizationMembersQueryKey,
4286
+ getListOrganizationMembersQueryOptions: () => getListOrganizationMembersQueryOptions,
4287
+ getListOrganizationMembersUrl: () => getListOrganizationMembersUrl,
4288
+ getOrganizationMember: () => getOrganizationMember,
4289
+ getOrganizationMemberByUserID: () => getOrganizationMemberByUserID,
4290
+ getUpdateOrganizationMemberMutationOptions: () => getUpdateOrganizationMemberMutationOptions,
4291
+ getUpdateOrganizationMemberUrl: () => getUpdateOrganizationMemberUrl,
4292
+ listOrganizationMembers: () => listOrganizationMembers,
4293
+ updateOrganizationMember: () => updateOrganizationMember,
4294
+ useAddOrganizationMember: () => useAddOrganizationMember,
4295
+ useDeleteOrganizationMember: () => useDeleteOrganizationMember,
4296
+ useGetOrganizationMember: () => useGetOrganizationMember,
4297
+ useGetOrganizationMemberByUserID: () => useGetOrganizationMemberByUserID,
4298
+ useListOrganizationMembers: () => useListOrganizationMembers,
4299
+ useUpdateOrganizationMember: () => useUpdateOrganizationMember
4300
+ });
4301
+ const withQueryKey$3 = (query, queryKey) => {
4302
+ const result = { queryKey };
4303
+ for (const key of Object.keys(query)) {
4304
+ if (key === "queryKey") continue;
4305
+ Object.defineProperty(result, key, {
4306
+ enumerable: true,
4307
+ configurable: true,
4308
+ get: () => query[key]
4309
+ });
4310
+ }
4311
+ return result;
4312
+ };
4313
+ const getListOrganizationMembersUrl = (organizationId, params) => {
4314
+ const normalizedParams = new URLSearchParams();
4315
+ Object.entries(params || {}).forEach(([key, value]) => {
4316
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
4317
+ });
4318
+ const stringifiedParams = normalizedParams.toString();
4319
+ return stringifiedParams.length > 0 ? `/organizations/${organizationId}/members?${stringifiedParams}` : `/organizations/${organizationId}/members`;
4320
+ };
4321
+ /**
4322
+ * Lists all members of an organization with pagination.
4323
+ * @summary List members
4324
+ */
4325
+ const listOrganizationMembers = async (organizationId, params, options) => {
4326
+ return customFetch(getListOrganizationMembersUrl(organizationId, params), {
4327
+ ...options,
4328
+ method: "GET"
4329
+ });
4330
+ };
4331
+ const getListOrganizationMembersQueryKey = (organizationId, params) => {
4332
+ return [`/organizations/${organizationId}/members`, ...params ? [params] : []];
4333
+ };
4334
+ const getListOrganizationMembersQueryOptions = (organizationId, params, options) => {
4335
+ const { query: queryOptions, request: requestOptions } = options ?? {};
4336
+ const queryKey = queryOptions?.queryKey ?? getListOrganizationMembersQueryKey(organizationId, params);
4337
+ const queryFn = ({ signal }) => listOrganizationMembers(organizationId, params, {
4338
+ signal,
4339
+ ...requestOptions
4340
+ });
4341
+ return {
4342
+ queryKey,
4343
+ queryFn,
4344
+ enabled: organizationId !== null && organizationId !== void 0,
4345
+ ...queryOptions
4346
+ };
4347
+ };
4348
+ /**
4349
+ * @summary List members
4350
+ */
4351
+ function useListOrganizationMembers(organizationId, params, options, queryClient) {
4352
+ const queryOptions = getListOrganizationMembersQueryOptions(organizationId, params, options);
4353
+ const query = useQuery(queryOptions, queryClient);
4354
+ return withQueryKey$3(query, queryOptions.queryKey);
4355
+ }
4356
+ const getAddOrganizationMemberUrl = (organizationId) => {
4357
+ return `/organizations/${organizationId}/members`;
4358
+ };
4359
+ /**
4360
+ * Adds a user as a member of an organization with the specified role.
4361
+ * @summary Add member
4362
+ */
4363
+ const addOrganizationMember = async (organizationId, addOrganizationMemberRequest, options) => {
4364
+ return customFetch(getAddOrganizationMemberUrl(organizationId), {
4365
+ ...options,
4366
+ method: "POST",
4367
+ headers: {
4368
+ "Content-Type": "application/json",
4369
+ ...options?.headers
4370
+ },
4371
+ body: JSON.stringify(addOrganizationMemberRequest)
4372
+ });
4373
+ };
4374
+ const getAddOrganizationMemberMutationOptions = (options) => {
4375
+ const mutationKey = ["addOrganizationMember"];
4376
+ const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
4377
+ ...options,
4378
+ mutation: {
4379
+ ...options.mutation,
4380
+ mutationKey
4381
+ }
4382
+ } : {
4383
+ mutation: { mutationKey },
4384
+ request: void 0
4385
+ };
4386
+ const mutationFn = (props) => {
4387
+ const { organizationId, data } = props ?? {};
4388
+ return addOrganizationMember(organizationId, data, requestOptions);
4389
+ };
4390
+ return {
4391
+ mutationFn,
4392
+ ...mutationOptions
4393
+ };
4394
+ };
4395
+ /**
4396
+ * @summary Add member
4397
+ */
4398
+ const useAddOrganizationMember = (options, queryClient) => {
4399
+ return useMutation(getAddOrganizationMemberMutationOptions(options), queryClient);
4400
+ };
4401
+ const getGetOrganizationMemberByUserIDUrl = (organizationId, userId) => {
4402
+ return `/organizations/${organizationId}/members/by-user/${userId}`;
4403
+ };
4404
+ /**
4405
+ * Retrieves an organization member by the user's ID.
4406
+ * @summary Get member by user ID
4407
+ */
4408
+ const getOrganizationMemberByUserID = async (organizationId, userId, options) => {
4409
+ return customFetch(getGetOrganizationMemberByUserIDUrl(organizationId, userId), {
4410
+ ...options,
4411
+ method: "GET"
4412
+ });
4413
+ };
4414
+ const getGetOrganizationMemberByUserIDQueryKey = (organizationId, userId) => {
4415
+ return [`/organizations/${organizationId}/members/by-user/${userId}`];
4416
+ };
4417
+ const getGetOrganizationMemberByUserIDQueryOptions = (organizationId, userId, options) => {
4418
+ const { query: queryOptions, request: requestOptions } = options ?? {};
4419
+ const queryKey = queryOptions?.queryKey ?? getGetOrganizationMemberByUserIDQueryKey(organizationId, userId);
4420
+ const queryFn = ({ signal }) => getOrganizationMemberByUserID(organizationId, userId, {
4421
+ signal,
4422
+ ...requestOptions
4423
+ });
4424
+ return {
4425
+ queryKey,
4426
+ queryFn,
4427
+ enabled: organizationId !== null && organizationId !== void 0 && userId !== null && userId !== void 0,
4428
+ ...queryOptions
4429
+ };
4430
+ };
4431
+ /**
4432
+ * @summary Get member by user ID
4433
+ */
4434
+ function useGetOrganizationMemberByUserID(organizationId, userId, options, queryClient) {
4435
+ const queryOptions = getGetOrganizationMemberByUserIDQueryOptions(organizationId, userId, options);
4436
+ const query = useQuery(queryOptions, queryClient);
4437
+ return withQueryKey$3(query, queryOptions.queryKey);
4438
+ }
4439
+ const getGetOrganizationMemberUrl = (organizationId, memberId) => {
4440
+ return `/organizations/${organizationId}/members/${memberId}`;
4441
+ };
4442
+ /**
4443
+ * Retrieves a single organization member by ID.
4444
+ * @summary Get member
4445
+ */
4446
+ const getOrganizationMember = async (organizationId, memberId, options) => {
4447
+ return customFetch(getGetOrganizationMemberUrl(organizationId, memberId), {
4448
+ ...options,
4449
+ method: "GET"
4450
+ });
4451
+ };
4452
+ const getGetOrganizationMemberQueryKey = (organizationId, memberId) => {
4453
+ return [`/organizations/${organizationId}/members/${memberId}`];
4454
+ };
4455
+ const getGetOrganizationMemberQueryOptions = (organizationId, memberId, options) => {
4456
+ const { query: queryOptions, request: requestOptions } = options ?? {};
4457
+ const queryKey = queryOptions?.queryKey ?? getGetOrganizationMemberQueryKey(organizationId, memberId);
4458
+ const queryFn = ({ signal }) => getOrganizationMember(organizationId, memberId, {
4459
+ signal,
4460
+ ...requestOptions
4461
+ });
4462
+ return {
4463
+ queryKey,
4464
+ queryFn,
4465
+ enabled: organizationId !== null && organizationId !== void 0 && memberId !== null && memberId !== void 0,
4466
+ ...queryOptions
4467
+ };
4468
+ };
4469
+ /**
4470
+ * @summary Get member
4471
+ */
4472
+ function useGetOrganizationMember(organizationId, memberId, options, queryClient) {
4473
+ const queryOptions = getGetOrganizationMemberQueryOptions(organizationId, memberId, options);
4474
+ const query = useQuery(queryOptions, queryClient);
4475
+ return withQueryKey$3(query, queryOptions.queryKey);
4476
+ }
4477
+ const getDeleteOrganizationMemberUrl = (organizationId, memberId) => {
4478
+ return `/organizations/${organizationId}/members/${memberId}`;
4479
+ };
4480
+ /**
4481
+ * Removes a member from an organization.
4482
+ * @summary Delete member
4483
+ */
4484
+ const deleteOrganizationMember = async (organizationId, memberId, options) => {
4485
+ return customFetch(getDeleteOrganizationMemberUrl(organizationId, memberId), {
4486
+ ...options,
4487
+ method: "DELETE"
4488
+ });
4489
+ };
4490
+ const getDeleteOrganizationMemberMutationOptions = (options) => {
4491
+ const mutationKey = ["deleteOrganizationMember"];
4492
+ const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
4493
+ ...options,
4494
+ mutation: {
4495
+ ...options.mutation,
4496
+ mutationKey
4497
+ }
4498
+ } : {
4499
+ mutation: { mutationKey },
4500
+ request: void 0
4501
+ };
4502
+ const mutationFn = (props) => {
4503
+ const { organizationId, memberId } = props ?? {};
4504
+ return deleteOrganizationMember(organizationId, memberId, requestOptions);
4505
+ };
4506
+ return {
4507
+ mutationFn,
4508
+ ...mutationOptions
4509
+ };
4510
+ };
4511
+ /**
4512
+ * @summary Delete member
4513
+ */
4514
+ const useDeleteOrganizationMember = (options, queryClient) => {
4515
+ return useMutation(getDeleteOrganizationMemberMutationOptions(options), queryClient);
4516
+ };
4517
+ const getUpdateOrganizationMemberUrl = (organizationId, memberId) => {
4518
+ return `/organizations/${organizationId}/members/${memberId}`;
4519
+ };
4520
+ /**
4521
+ * Updates the role of an organization member.
4522
+ * @summary Update member
4523
+ */
4524
+ const updateOrganizationMember = async (organizationId, memberId, updateOrganizationMemberRequest, options) => {
4525
+ return customFetch(getUpdateOrganizationMemberUrl(organizationId, memberId), {
4526
+ ...options,
4527
+ method: "PATCH",
4528
+ headers: {
4529
+ "Content-Type": "application/json",
4530
+ ...options?.headers
4531
+ },
4532
+ body: JSON.stringify(updateOrganizationMemberRequest)
4533
+ });
4534
+ };
4535
+ const getUpdateOrganizationMemberMutationOptions = (options) => {
4536
+ const mutationKey = ["updateOrganizationMember"];
4537
+ const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
4538
+ ...options,
4539
+ mutation: {
4540
+ ...options.mutation,
4541
+ mutationKey
4542
+ }
4543
+ } : {
4544
+ mutation: { mutationKey },
4545
+ request: void 0
4546
+ };
4547
+ const mutationFn = (props) => {
4548
+ const { organizationId, memberId, data } = props ?? {};
4549
+ return updateOrganizationMember(organizationId, memberId, data, requestOptions);
4550
+ };
4551
+ return {
4552
+ mutationFn,
4553
+ ...mutationOptions
4554
+ };
4555
+ };
4556
+ /**
4557
+ * @summary Update member
4558
+ */
4559
+ const useUpdateOrganizationMember = (options, queryClient) => {
4560
+ return useMutation(getUpdateOrganizationMemberMutationOptions(options), queryClient);
4561
+ };
4562
+
4563
+ //#endregion
4564
+ //#region src/gen/endpoints/organization-teams/organization-teams.ts
4565
+ var organization_teams_exports = /* @__PURE__ */ __exportAll({
4566
+ createOrganizationTeam: () => createOrganizationTeam,
4567
+ deleteOrganizationTeam: () => deleteOrganizationTeam,
4568
+ getCreateOrganizationTeamMutationOptions: () => getCreateOrganizationTeamMutationOptions,
4569
+ getCreateOrganizationTeamUrl: () => getCreateOrganizationTeamUrl,
4570
+ getDeleteOrganizationTeamMutationOptions: () => getDeleteOrganizationTeamMutationOptions,
4571
+ getDeleteOrganizationTeamUrl: () => getDeleteOrganizationTeamUrl,
4572
+ getGetOrganizationTeamQueryKey: () => getGetOrganizationTeamQueryKey,
4573
+ getGetOrganizationTeamQueryOptions: () => getGetOrganizationTeamQueryOptions,
4574
+ getGetOrganizationTeamUrl: () => getGetOrganizationTeamUrl,
4575
+ getListOrganizationTeamsQueryKey: () => getListOrganizationTeamsQueryKey,
4576
+ getListOrganizationTeamsQueryOptions: () => getListOrganizationTeamsQueryOptions,
4577
+ getListOrganizationTeamsUrl: () => getListOrganizationTeamsUrl,
4578
+ getOrganizationTeam: () => getOrganizationTeam,
4579
+ getUpdateOrganizationTeamMutationOptions: () => getUpdateOrganizationTeamMutationOptions,
4580
+ getUpdateOrganizationTeamUrl: () => getUpdateOrganizationTeamUrl,
4581
+ listOrganizationTeams: () => listOrganizationTeams,
4582
+ updateOrganizationTeam: () => updateOrganizationTeam,
4583
+ useCreateOrganizationTeam: () => useCreateOrganizationTeam,
4584
+ useDeleteOrganizationTeam: () => useDeleteOrganizationTeam,
4585
+ useGetOrganizationTeam: () => useGetOrganizationTeam,
4586
+ useListOrganizationTeams: () => useListOrganizationTeams,
4587
+ useUpdateOrganizationTeam: () => useUpdateOrganizationTeam
4588
+ });
4589
+ const withQueryKey$2 = (query, queryKey) => {
4590
+ const result = { queryKey };
4591
+ for (const key of Object.keys(query)) {
4592
+ if (key === "queryKey") continue;
4593
+ Object.defineProperty(result, key, {
4594
+ enumerable: true,
4595
+ configurable: true,
4596
+ get: () => query[key]
4597
+ });
4598
+ }
4599
+ return result;
4600
+ };
4601
+ const getListOrganizationTeamsUrl = (organizationId) => {
4602
+ return `/organizations/${organizationId}/teams`;
4603
+ };
4604
+ /**
4605
+ * Lists all teams within an organization.
4606
+ * @summary List teams
4607
+ */
4608
+ const listOrganizationTeams = async (organizationId, options) => {
4609
+ return customFetch(getListOrganizationTeamsUrl(organizationId), {
4610
+ ...options,
4611
+ method: "GET"
4612
+ });
4613
+ };
4614
+ const getListOrganizationTeamsQueryKey = (organizationId) => {
4615
+ return [`/organizations/${organizationId}/teams`];
4616
+ };
4617
+ const getListOrganizationTeamsQueryOptions = (organizationId, options) => {
4618
+ const { query: queryOptions, request: requestOptions } = options ?? {};
4619
+ const queryKey = queryOptions?.queryKey ?? getListOrganizationTeamsQueryKey(organizationId);
4620
+ const queryFn = ({ signal }) => listOrganizationTeams(organizationId, {
4621
+ signal,
4622
+ ...requestOptions
4623
+ });
4624
+ return {
4625
+ queryKey,
4626
+ queryFn,
4627
+ enabled: organizationId !== null && organizationId !== void 0,
4628
+ ...queryOptions
4629
+ };
4630
+ };
4631
+ /**
4632
+ * @summary List teams
4633
+ */
4634
+ function useListOrganizationTeams(organizationId, options, queryClient) {
4635
+ const queryOptions = getListOrganizationTeamsQueryOptions(organizationId, options);
4636
+ const query = useQuery(queryOptions, queryClient);
4637
+ return withQueryKey$2(query, queryOptions.queryKey);
4638
+ }
4639
+ const getCreateOrganizationTeamUrl = (organizationId) => {
4640
+ return `/organizations/${organizationId}/teams`;
4641
+ };
4642
+ /**
4643
+ * Creates a new team within an organization.
4644
+ * @summary Create team
4645
+ */
4646
+ const createOrganizationTeam = async (organizationId, createOrganizationTeamRequest, options) => {
4647
+ return customFetch(getCreateOrganizationTeamUrl(organizationId), {
4648
+ ...options,
4649
+ method: "POST",
4650
+ headers: {
4651
+ "Content-Type": "application/json",
4652
+ ...options?.headers
4653
+ },
4654
+ body: JSON.stringify(createOrganizationTeamRequest)
4655
+ });
4656
+ };
4657
+ const getCreateOrganizationTeamMutationOptions = (options) => {
4658
+ const mutationKey = ["createOrganizationTeam"];
4659
+ const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
4660
+ ...options,
4661
+ mutation: {
4662
+ ...options.mutation,
4663
+ mutationKey
4664
+ }
4665
+ } : {
4666
+ mutation: { mutationKey },
4667
+ request: void 0
4668
+ };
4669
+ const mutationFn = (props) => {
4670
+ const { organizationId, data } = props ?? {};
4671
+ return createOrganizationTeam(organizationId, data, requestOptions);
4672
+ };
4673
+ return {
4674
+ mutationFn,
4675
+ ...mutationOptions
4676
+ };
4677
+ };
4678
+ /**
4679
+ * @summary Create team
4680
+ */
4681
+ const useCreateOrganizationTeam = (options, queryClient) => {
4682
+ return useMutation(getCreateOrganizationTeamMutationOptions(options), queryClient);
4683
+ };
4684
+ const getGetOrganizationTeamUrl = (organizationId, teamId) => {
4685
+ return `/organizations/${organizationId}/teams/${teamId}`;
4686
+ };
4687
+ /**
4688
+ * Retrieves a single team by its ID.
4689
+ * @summary Get team
4690
+ */
4691
+ const getOrganizationTeam = async (organizationId, teamId, options) => {
4692
+ return customFetch(getGetOrganizationTeamUrl(organizationId, teamId), {
4693
+ ...options,
4694
+ method: "GET"
4695
+ });
4696
+ };
4697
+ const getGetOrganizationTeamQueryKey = (organizationId, teamId) => {
4698
+ return [`/organizations/${organizationId}/teams/${teamId}`];
4699
+ };
4700
+ const getGetOrganizationTeamQueryOptions = (organizationId, teamId, options) => {
4701
+ const { query: queryOptions, request: requestOptions } = options ?? {};
4702
+ const queryKey = queryOptions?.queryKey ?? getGetOrganizationTeamQueryKey(organizationId, teamId);
4703
+ const queryFn = ({ signal }) => getOrganizationTeam(organizationId, teamId, {
4704
+ signal,
4705
+ ...requestOptions
4706
+ });
4707
+ return {
4708
+ queryKey,
4709
+ queryFn,
4710
+ enabled: organizationId !== null && organizationId !== void 0 && teamId !== null && teamId !== void 0,
4711
+ ...queryOptions
4712
+ };
4713
+ };
4714
+ /**
4715
+ * @summary Get team
4716
+ */
4717
+ function useGetOrganizationTeam(organizationId, teamId, options, queryClient) {
4718
+ const queryOptions = getGetOrganizationTeamQueryOptions(organizationId, teamId, options);
4719
+ const query = useQuery(queryOptions, queryClient);
4720
+ return withQueryKey$2(query, queryOptions.queryKey);
4721
+ }
4722
+ const getDeleteOrganizationTeamUrl = (organizationId, teamId) => {
4723
+ return `/organizations/${organizationId}/teams/${teamId}`;
4724
+ };
4725
+ /**
4726
+ * Deletes a team.
4727
+ * @summary Delete team
4728
+ */
4729
+ const deleteOrganizationTeam = async (organizationId, teamId, options) => {
4730
+ return customFetch(getDeleteOrganizationTeamUrl(organizationId, teamId), {
4731
+ ...options,
4732
+ method: "DELETE"
4733
+ });
4734
+ };
4735
+ const getDeleteOrganizationTeamMutationOptions = (options) => {
4736
+ const mutationKey = ["deleteOrganizationTeam"];
4737
+ const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
4738
+ ...options,
4739
+ mutation: {
4740
+ ...options.mutation,
4741
+ mutationKey
4742
+ }
4743
+ } : {
4744
+ mutation: { mutationKey },
4745
+ request: void 0
4746
+ };
4747
+ const mutationFn = (props) => {
4748
+ const { organizationId, teamId } = props ?? {};
4749
+ return deleteOrganizationTeam(organizationId, teamId, requestOptions);
4750
+ };
4751
+ return {
4752
+ mutationFn,
4753
+ ...mutationOptions
4754
+ };
4755
+ };
4756
+ /**
4757
+ * @summary Delete team
4758
+ */
4759
+ const useDeleteOrganizationTeam = (options, queryClient) => {
4760
+ return useMutation(getDeleteOrganizationTeamMutationOptions(options), queryClient);
4761
+ };
4762
+ const getUpdateOrganizationTeamUrl = (organizationId, teamId) => {
4763
+ return `/organizations/${organizationId}/teams/${teamId}`;
4764
+ };
4765
+ /**
4766
+ * Updates an existing team.
4767
+ * @summary Update team
4768
+ */
4769
+ const updateOrganizationTeam = async (organizationId, teamId, updateOrganizationTeamRequest, options) => {
4770
+ return customFetch(getUpdateOrganizationTeamUrl(organizationId, teamId), {
4771
+ ...options,
4772
+ method: "PATCH",
4773
+ headers: {
4774
+ "Content-Type": "application/json",
4775
+ ...options?.headers
4776
+ },
4777
+ body: JSON.stringify(updateOrganizationTeamRequest)
4778
+ });
4779
+ };
4780
+ const getUpdateOrganizationTeamMutationOptions = (options) => {
4781
+ const mutationKey = ["updateOrganizationTeam"];
4782
+ const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
4783
+ ...options,
4784
+ mutation: {
4785
+ ...options.mutation,
4786
+ mutationKey
4787
+ }
4788
+ } : {
4789
+ mutation: { mutationKey },
4790
+ request: void 0
4791
+ };
4792
+ const mutationFn = (props) => {
4793
+ const { organizationId, teamId, data } = props ?? {};
4794
+ return updateOrganizationTeam(organizationId, teamId, data, requestOptions);
4795
+ };
4796
+ return {
4797
+ mutationFn,
4798
+ ...mutationOptions
4799
+ };
4800
+ };
4801
+ /**
4802
+ * @summary Update team
4803
+ */
4804
+ const useUpdateOrganizationTeam = (options, queryClient) => {
4805
+ return useMutation(getUpdateOrganizationTeamMutationOptions(options), queryClient);
4806
+ };
4807
+
4808
+ //#endregion
4809
+ //#region src/gen/endpoints/organization-team-members/organization-team-members.ts
4810
+ var organization_team_members_exports = /* @__PURE__ */ __exportAll({
4811
+ addOrganizationTeamMember: () => addOrganizationTeamMember,
4812
+ deleteOrganizationTeamMember: () => deleteOrganizationTeamMember,
4813
+ getAddOrganizationTeamMemberMutationOptions: () => getAddOrganizationTeamMemberMutationOptions,
4814
+ getAddOrganizationTeamMemberUrl: () => getAddOrganizationTeamMemberUrl,
4815
+ getDeleteOrganizationTeamMemberMutationOptions: () => getDeleteOrganizationTeamMemberMutationOptions,
4816
+ getDeleteOrganizationTeamMemberUrl: () => getDeleteOrganizationTeamMemberUrl,
4817
+ getGetOrganizationTeamMemberQueryKey: () => getGetOrganizationTeamMemberQueryKey,
4818
+ getGetOrganizationTeamMemberQueryOptions: () => getGetOrganizationTeamMemberQueryOptions,
4819
+ getGetOrganizationTeamMemberUrl: () => getGetOrganizationTeamMemberUrl,
4820
+ getListOrganizationTeamMembersQueryKey: () => getListOrganizationTeamMembersQueryKey,
4821
+ getListOrganizationTeamMembersQueryOptions: () => getListOrganizationTeamMembersQueryOptions,
4822
+ getListOrganizationTeamMembersUrl: () => getListOrganizationTeamMembersUrl,
4823
+ getOrganizationTeamMember: () => getOrganizationTeamMember,
4824
+ listOrganizationTeamMembers: () => listOrganizationTeamMembers,
4825
+ useAddOrganizationTeamMember: () => useAddOrganizationTeamMember,
4826
+ useDeleteOrganizationTeamMember: () => useDeleteOrganizationTeamMember,
4827
+ useGetOrganizationTeamMember: () => useGetOrganizationTeamMember,
4828
+ useListOrganizationTeamMembers: () => useListOrganizationTeamMembers
4829
+ });
4830
+ const withQueryKey$1 = (query, queryKey) => {
4831
+ const result = { queryKey };
4832
+ for (const key of Object.keys(query)) {
4833
+ if (key === "queryKey") continue;
4834
+ Object.defineProperty(result, key, {
4835
+ enumerable: true,
4836
+ configurable: true,
4837
+ get: () => query[key]
4838
+ });
4839
+ }
4840
+ return result;
4841
+ };
4842
+ const getListOrganizationTeamMembersUrl = (organizationId, teamId, params) => {
4843
+ const normalizedParams = new URLSearchParams();
4844
+ Object.entries(params || {}).forEach(([key, value]) => {
4845
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
4846
+ });
4847
+ const stringifiedParams = normalizedParams.toString();
4848
+ return stringifiedParams.length > 0 ? `/organizations/${organizationId}/teams/${teamId}/members?${stringifiedParams}` : `/organizations/${organizationId}/teams/${teamId}/members`;
4849
+ };
4850
+ /**
4851
+ * Lists all members of a team with pagination.
4852
+ * @summary List team members
4853
+ */
4854
+ const listOrganizationTeamMembers = async (organizationId, teamId, params, options) => {
4855
+ return customFetch(getListOrganizationTeamMembersUrl(organizationId, teamId, params), {
4856
+ ...options,
4857
+ method: "GET"
4858
+ });
4859
+ };
4860
+ const getListOrganizationTeamMembersQueryKey = (organizationId, teamId, params) => {
4861
+ return [`/organizations/${organizationId}/teams/${teamId}/members`, ...params ? [params] : []];
4862
+ };
4863
+ const getListOrganizationTeamMembersQueryOptions = (organizationId, teamId, params, options) => {
4864
+ const { query: queryOptions, request: requestOptions } = options ?? {};
4865
+ const queryKey = queryOptions?.queryKey ?? getListOrganizationTeamMembersQueryKey(organizationId, teamId, params);
4866
+ const queryFn = ({ signal }) => listOrganizationTeamMembers(organizationId, teamId, params, {
4867
+ signal,
4868
+ ...requestOptions
4869
+ });
4870
+ return {
4871
+ queryKey,
4872
+ queryFn,
4873
+ enabled: organizationId !== null && organizationId !== void 0 && teamId !== null && teamId !== void 0,
4874
+ ...queryOptions
4875
+ };
4876
+ };
4877
+ /**
4878
+ * @summary List team members
4879
+ */
4880
+ function useListOrganizationTeamMembers(organizationId, teamId, params, options, queryClient) {
4881
+ const queryOptions = getListOrganizationTeamMembersQueryOptions(organizationId, teamId, params, options);
4882
+ const query = useQuery(queryOptions, queryClient);
4883
+ return withQueryKey$1(query, queryOptions.queryKey);
4884
+ }
4885
+ const getAddOrganizationTeamMemberUrl = (organizationId, teamId) => {
4886
+ return `/organizations/${organizationId}/teams/${teamId}/members`;
4887
+ };
4888
+ /**
4889
+ * Adds a member to a team.
4890
+ * @summary Add team member
4891
+ */
4892
+ const addOrganizationTeamMember = async (organizationId, teamId, addOrganizationTeamMemberRequest, options) => {
4893
+ return customFetch(getAddOrganizationTeamMemberUrl(organizationId, teamId), {
4894
+ ...options,
4895
+ method: "POST",
4896
+ headers: {
4897
+ "Content-Type": "application/json",
4898
+ ...options?.headers
4899
+ },
4900
+ body: JSON.stringify(addOrganizationTeamMemberRequest)
4901
+ });
4902
+ };
4903
+ const getAddOrganizationTeamMemberMutationOptions = (options) => {
4904
+ const mutationKey = ["addOrganizationTeamMember"];
4905
+ const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
4906
+ ...options,
4907
+ mutation: {
4908
+ ...options.mutation,
4909
+ mutationKey
4910
+ }
4911
+ } : {
4912
+ mutation: { mutationKey },
4913
+ request: void 0
4914
+ };
4915
+ const mutationFn = (props) => {
4916
+ const { organizationId, teamId, data } = props ?? {};
4917
+ return addOrganizationTeamMember(organizationId, teamId, data, requestOptions);
4918
+ };
4919
+ return {
4920
+ mutationFn,
4921
+ ...mutationOptions
4922
+ };
4923
+ };
4924
+ /**
4925
+ * @summary Add team member
4926
+ */
4927
+ const useAddOrganizationTeamMember = (options, queryClient) => {
4928
+ return useMutation(getAddOrganizationTeamMemberMutationOptions(options), queryClient);
4929
+ };
4930
+ const getGetOrganizationTeamMemberUrl = (organizationId, teamId, memberId) => {
4931
+ return `/organizations/${organizationId}/teams/${teamId}/members/${memberId}`;
4932
+ };
4933
+ /**
4934
+ * Retrieves a single team member by ID.
4935
+ * @summary Get team member
4936
+ */
4937
+ const getOrganizationTeamMember = async (organizationId, teamId, memberId, options) => {
4938
+ return customFetch(getGetOrganizationTeamMemberUrl(organizationId, teamId, memberId), {
4939
+ ...options,
4940
+ method: "GET"
4941
+ });
4942
+ };
4943
+ const getGetOrganizationTeamMemberQueryKey = (organizationId, teamId, memberId) => {
4944
+ return [`/organizations/${organizationId}/teams/${teamId}/members/${memberId}`];
4945
+ };
4946
+ const getGetOrganizationTeamMemberQueryOptions = (organizationId, teamId, memberId, options) => {
4947
+ const { query: queryOptions, request: requestOptions } = options ?? {};
4948
+ const queryKey = queryOptions?.queryKey ?? getGetOrganizationTeamMemberQueryKey(organizationId, teamId, memberId);
4949
+ const queryFn = ({ signal }) => getOrganizationTeamMember(organizationId, teamId, memberId, {
4950
+ signal,
4951
+ ...requestOptions
4952
+ });
4953
+ return {
4954
+ queryKey,
4955
+ queryFn,
4956
+ enabled: organizationId !== null && organizationId !== void 0 && teamId !== null && teamId !== void 0 && memberId !== null && memberId !== void 0,
4957
+ ...queryOptions
4958
+ };
4959
+ };
4960
+ /**
4961
+ * @summary Get team member
4962
+ */
4963
+ function useGetOrganizationTeamMember(organizationId, teamId, memberId, options, queryClient) {
4964
+ const queryOptions = getGetOrganizationTeamMemberQueryOptions(organizationId, teamId, memberId, options);
4965
+ const query = useQuery(queryOptions, queryClient);
4966
+ return withQueryKey$1(query, queryOptions.queryKey);
4967
+ }
4968
+ const getDeleteOrganizationTeamMemberUrl = (organizationId, teamId, memberId) => {
4969
+ return `/organizations/${organizationId}/teams/${teamId}/members/${memberId}`;
4970
+ };
4971
+ /**
4972
+ * Removes a member from a team.
4973
+ * @summary Delete team member
4974
+ */
4975
+ const deleteOrganizationTeamMember = async (organizationId, teamId, memberId, options) => {
4976
+ return customFetch(getDeleteOrganizationTeamMemberUrl(organizationId, teamId, memberId), {
4977
+ ...options,
4978
+ method: "DELETE"
4979
+ });
4980
+ };
4981
+ const getDeleteOrganizationTeamMemberMutationOptions = (options) => {
4982
+ const mutationKey = ["deleteOrganizationTeamMember"];
4983
+ const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
4984
+ ...options,
4985
+ mutation: {
4986
+ ...options.mutation,
4987
+ mutationKey
4988
+ }
4989
+ } : {
4990
+ mutation: { mutationKey },
4991
+ request: void 0
4992
+ };
4993
+ const mutationFn = (props) => {
4994
+ const { organizationId, teamId, memberId } = props ?? {};
4995
+ return deleteOrganizationTeamMember(organizationId, teamId, memberId, requestOptions);
4996
+ };
4997
+ return {
4998
+ mutationFn,
4999
+ ...mutationOptions
5000
+ };
5001
+ };
5002
+ /**
5003
+ * @summary Delete team member
5004
+ */
5005
+ const useDeleteOrganizationTeamMember = (options, queryClient) => {
5006
+ return useMutation(getDeleteOrganizationTeamMemberMutationOptions(options), queryClient);
5007
+ };
5008
+
3976
5009
  //#endregion
3977
5010
  //#region src/plugins/organizations/plugin.ts
3978
5011
  var OrganizationsPlugin = class {
3979
5012
  id = "organizations";
3980
5013
  init(client) {
3981
- return wrapGenerated(organizations_exports, client);
5014
+ return wrapGenerated({
5015
+ ...organizations_exports,
5016
+ ...organization_invitations_exports,
5017
+ ...organization_members_exports,
5018
+ ...organization_teams_exports,
5019
+ ...organization_team_members_exports
5020
+ }, client);
3982
5021
  }
3983
5022
  };
3984
5023