authula 0.5.4 → 0.6.3
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 +79 -739
- package/dist/custom-fetch-ZBY99AZW.js +114 -0
- package/dist/custom-fetch-ZBY99AZW.js.map +1 -0
- package/dist/index-DHUQcsNV.d.ts +2011 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +14 -17
- package/dist/index.js.map +1 -1
- package/dist/plugins/index.d.ts +2935 -738
- package/dist/plugins/index.js +4091 -522
- package/dist/plugins/index.js.map +1 -1
- package/dist/rolldown-runtime-w6R9maHv.js +18 -0
- package/package.json +19 -18
- package/dist/fetch-BnZpQ0Yq.js +0 -128
- package/dist/fetch-BnZpQ0Yq.js.map +0 -1
- package/dist/fetch-CEj1gBkL.cjs +0 -163
- package/dist/fetch-CEj1gBkL.cjs.map +0 -1
- package/dist/index.cjs +0 -60
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -2
- package/dist/plugins/index.cjs +0 -696
- package/dist/plugins/index.cjs.map +0 -1
- package/dist/plugins/index.d.cts +0 -825
- package/dist/sdk-7eSlhCrf.d.cts +0 -167
- package/dist/sdk-7eSlhCrf.d.ts +0 -167
package/dist/plugins/index.d.ts
CHANGED
|
@@ -1,500 +1,2211 @@
|
|
|
1
|
-
import { h as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
declare const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
declare
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}
|
|
113
|
-
type UpdateRoleResponse = {
|
|
114
|
-
role: Role;
|
|
115
|
-
};
|
|
116
|
-
type DeleteRoleResponse = {
|
|
117
|
-
message: string;
|
|
118
|
-
};
|
|
119
|
-
type CreatePermissionRequest = {
|
|
120
|
-
key: string;
|
|
121
|
-
description?: string | null;
|
|
122
|
-
isSystem?: boolean;
|
|
123
|
-
};
|
|
124
|
-
type CreatePermissionResponse = {
|
|
125
|
-
permission: Permission;
|
|
126
|
-
};
|
|
127
|
-
type UpdatePermissionRequest = {
|
|
128
|
-
description?: string | null;
|
|
129
|
-
};
|
|
130
|
-
type UpdatePermissionResponse = {
|
|
131
|
-
permission: Permission;
|
|
132
|
-
};
|
|
133
|
-
type DeletePermissionResponse = {
|
|
134
|
-
message: string;
|
|
135
|
-
};
|
|
136
|
-
type AddRolePermissionRequest = {
|
|
1
|
+
import { $t as DisableResponse, A as UpdateUserResponse, An as CreateAccountResponse, At as MagicLinkSignInRequest, Bn as BanUserResponse, Bt as UserPermissionInfo, C as UsersPage, D as UpsertUserStateRequest, Dn as CreateApiKeyResponse, Dt as OauthAuthorizeParams, E as UpsertUserStateResponse, Et as OauthCallbackParams, F as UpdatePermissionResponse, Fn as ChangePasswordRequest, G as UpdateAccountResponse, Gt as GetMeResponse, H as UpdateApiKeyResponse, Hn as AuthorizeResponse, Ht as GetUserByIDResponse, I as UpdatePermissionRequest, In as ChangeEmailResponse, It as ListApiKeysParams, J as StopImpersonationResponse, Jn as AdminUserSession, Jt as GetApiKeyResponse, K as UpdateAccountRequest, Kt as GetImpersonationByIDResponse, Ln as CallbackResponse, Mn as CheckUserPermissionsResponse, Mt as MagicLinkExchangeRequest, N as UpdateRoleResponse, Nn as CheckUserPermissionsRequest, Nt as ListUsersParams, O as UpsertSessionStateResponse, On as CreateApiKeyRequest, Ot as MagicLinkVerifyResponse, P as UpdateRoleRequest, Pn as ChangePasswordResponse, Q as SignUpRequest, Qn as AddRolePermissionRequest, Qt as EnableResponse, Rt as GetUserStateResponse, S as VerifyApiKeyRequest, T as UserAccountsResponse, U as UpdateApiKeyRequest, Un as AssignUserRoleResponse, Ut as GetTOTPURIResponse, Vn as BanUserRequest, Wn as AssignUserRoleRequest, Wt as GetSessionStateResponse, X as StartImpersonationRequest, Xn as AdminSessionState, Xt as GetAccountByIDResponse, Y as StartImpersonationResponse, Yt as GetAllApiKeysResponse, Z as SignUpResponse, Zn as AddRolePermissionResponse, Zt as GenerateBackupCodesResponse, _ as VerifyTOTPRequest, _n as Role, _t as RefreshTokenRequest, at as RoleDetails, b as VerifyBackupCodeRequest, bn as Permission, c as CookieStore, ct as RequestPasswordResetRequest, d as AuthulaClient, dn as CreateUserStateRequest, dt as ReplaceUserRolesRequest, en as DeleteUserStateResponse, et as SignOutResponse, fn as CreateUserResponse, ft as ReplaceRolePermissionsRequest, g as VerifyTOTPResponse, gn as CreateRoleResponse, gt as RefreshTokenResponse, h as WellKnownJWKSResponse, hn as CreateSessionStateRequest, ht as RemoveRolePermissionResponse, i as customFetch, in as DeletePermissionResponse, it as SendEmailVerificationRequest, j as UpdateUserRequest, jn as CreateAccountRequest, jt as MagicLinkExchangeResponse, k as UpsertSessionStateRequest, kt as MagicLinkSignInResponse, ln as DeleteApiKeyResponse, lt as RequestEmailChangeRequest, m as FetchContext, mt as RemoveUserRoleResponse, nn as DeleteSessionStateResponse, nt as SignInResponse, ot as RevokeSessionResponse, pn as CreateUserRequest, pt as ReplaceRolePermissionResponse, q as UnbanUserResponse, qn as AdminUserState, qt as Impersonation, rn as DeleteRoleResponse, rt as SignInRequest, sn as DeleteOrganizationResponse, st as RevokeSessionRequest, t as ClientWithPlugins, tn as DeleteUserResponse, tt as SignOutRequest, u as Plugin, un as DeleteAccountResponse, ut as ReplaceUserRolesResponse, v as VerifyMagicLinkParams, vn as CreateRoleRequest, w as UserRoleInfo, wn as CreateOrganizationRequest, wt as Organization, x as VerifyApiKeyResponse, xn as CreatePermissionRequest, y as VerifyBackupCodeResponse, yn as CreatePermissionResponse, z as UpdateOrganizationRequest, zt as GetUserPermissionsResponse } from "../index-DHUQcsNV.js";
|
|
2
|
+
import { DataTag, DefinedInitialDataOptions, DefinedUseQueryResult, QueryClient, QueryKey, UndefinedInitialDataOptions, UseMutationOptions, UseMutationResult, UseQueryOptions, UseQueryResult } from "@tanstack/react-query";
|
|
3
|
+
declare namespace access_control_d_exports {
|
|
4
|
+
export { AddRolePermissionMutationBody, AddRolePermissionMutationError, AddRolePermissionMutationResult, AssignUserRoleMutationBody, AssignUserRoleMutationError, AssignUserRoleMutationResult, CheckUserPermissionsMutationBody, CheckUserPermissionsMutationError, CheckUserPermissionsMutationResult, CreatePermissionMutationBody, CreatePermissionMutationError, CreatePermissionMutationResult, CreateRoleMutationBody, CreateRoleMutationError, CreateRoleMutationResult, DeletePermissionMutationError, DeletePermissionMutationResult, DeleteRoleMutationError, DeleteRoleMutationResult, GetPermissionQueryError, GetPermissionQueryResult, GetRoleByNameQueryError, GetRoleByNameQueryResult, GetRoleQueryError, GetRoleQueryResult, GetUserPermissionsQueryError, GetUserPermissionsQueryResult, ListPermissionsQueryError, ListPermissionsQueryResult, ListRolePermissionsQueryError, ListRolePermissionsQueryResult, ListRolesQueryError, ListRolesQueryResult, ListUserRolesQueryError, ListUserRolesQueryResult, RemoveRolePermissionMutationError, RemoveRolePermissionMutationResult, RemoveUserRoleMutationError, RemoveUserRoleMutationResult, ReplaceRolePermissionsMutationBody, ReplaceRolePermissionsMutationError, ReplaceRolePermissionsMutationResult, ReplaceUserRolesMutationBody, ReplaceUserRolesMutationError, ReplaceUserRolesMutationResult, UpdatePermissionMutationBody, UpdatePermissionMutationError, UpdatePermissionMutationResult, UpdateRoleMutationBody, UpdateRoleMutationError, UpdateRoleMutationResult, addRolePermission, assignUserRole, checkUserPermissions, createPermission, createRole, deletePermission, deleteRole, getAddRolePermissionMutationOptions, getAddRolePermissionUrl, getAssignUserRoleMutationOptions, getAssignUserRoleUrl, getCheckUserPermissionsMutationOptions, getCheckUserPermissionsUrl, getCreatePermissionMutationOptions, getCreatePermissionUrl, getCreateRoleMutationOptions, getCreateRoleUrl, getDeletePermissionMutationOptions, getDeletePermissionUrl, getDeleteRoleMutationOptions, getDeleteRoleUrl, getGetPermissionQueryKey, getGetPermissionQueryOptions, getGetPermissionUrl, getGetRoleByNameQueryKey, getGetRoleByNameQueryOptions, getGetRoleByNameUrl, getGetRoleQueryKey, getGetRoleQueryOptions, getGetRoleUrl, getGetUserPermissionsQueryKey, getGetUserPermissionsQueryOptions, getGetUserPermissionsUrl, getListPermissionsQueryKey, getListPermissionsQueryOptions, getListPermissionsUrl, getListRolePermissionsQueryKey, getListRolePermissionsQueryOptions, getListRolePermissionsUrl, getListRolesQueryKey, getListRolesQueryOptions, getListRolesUrl, getListUserRolesQueryKey, getListUserRolesQueryOptions, getListUserRolesUrl, getPermission, getRemoveRolePermissionMutationOptions, getRemoveRolePermissionUrl, getRemoveUserRoleMutationOptions, getRemoveUserRoleUrl, getReplaceRolePermissionsMutationOptions, getReplaceRolePermissionsUrl, getReplaceUserRolesMutationOptions, getReplaceUserRolesUrl, getRole, getRoleByName, getUpdatePermissionMutationOptions, getUpdatePermissionUrl, getUpdateRoleMutationOptions, getUpdateRoleUrl, getUserPermissions, listPermissions, listRolePermissions, listRoles, listUserRoles, removeRolePermission, removeUserRole, replaceRolePermissions, replaceUserRoles, updatePermission, updateRole, useAddRolePermission, useAssignUserRole, useCheckUserPermissions, useCreatePermission, useCreateRole, useDeletePermission, useDeleteRole, useGetPermission, useGetRole, useGetRoleByName, useGetUserPermissions, useListPermissions, useListRolePermissions, useListRoles, useListUserRoles, useRemoveRolePermission, useRemoveUserRole, useReplaceRolePermissions, useReplaceUserRoles, useUpdatePermission, useUpdateRole };
|
|
5
|
+
}
|
|
6
|
+
type SecondParameter$8<T extends (...args: never) => unknown> = Parameters<T>[1];
|
|
7
|
+
declare const getListPermissionsUrl: () => string;
|
|
8
|
+
/**
|
|
9
|
+
* Lists all permissions.
|
|
10
|
+
* @summary List permissions
|
|
11
|
+
*/
|
|
12
|
+
declare const listPermissions: (options?: RequestInit) => Promise<Permission[] | null>;
|
|
13
|
+
declare const getListPermissionsQueryKey: () => readonly ["/access-control/permissions"];
|
|
14
|
+
declare const getListPermissionsQueryOptions: <TData = Awaited<ReturnType<typeof listPermissions>>, TError = unknown>(options?: {
|
|
15
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listPermissions>>, TError, TData>>;
|
|
16
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
17
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof listPermissions>>, TError, TData> & {
|
|
18
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
19
|
+
};
|
|
20
|
+
type ListPermissionsQueryResult = NonNullable<Awaited<ReturnType<typeof listPermissions>>>;
|
|
21
|
+
type ListPermissionsQueryError = unknown;
|
|
22
|
+
declare function useListPermissions<TData = Awaited<ReturnType<typeof listPermissions>>, TError = unknown>(options: {
|
|
23
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof listPermissions>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof listPermissions>>, TError, Awaited<ReturnType<typeof listPermissions>>>, "initialData">;
|
|
24
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
25
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
26
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
27
|
+
};
|
|
28
|
+
declare function useListPermissions<TData = Awaited<ReturnType<typeof listPermissions>>, TError = unknown>(options?: {
|
|
29
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listPermissions>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof listPermissions>>, TError, Awaited<ReturnType<typeof listPermissions>>>, "initialData">;
|
|
30
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
31
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
32
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
33
|
+
};
|
|
34
|
+
declare function useListPermissions<TData = Awaited<ReturnType<typeof listPermissions>>, TError = unknown>(options?: {
|
|
35
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listPermissions>>, TError, TData>>;
|
|
36
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
37
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
38
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
39
|
+
};
|
|
40
|
+
declare const getCreatePermissionUrl: () => string;
|
|
41
|
+
/**
|
|
42
|
+
* Creates a new permission.
|
|
43
|
+
* @summary Create permission
|
|
44
|
+
*/
|
|
45
|
+
declare const createPermission: (createPermissionRequest?: CreatePermissionRequest, options?: RequestInit) => Promise<CreatePermissionResponse>;
|
|
46
|
+
declare const getCreatePermissionMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
47
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof createPermission>>, TError, {
|
|
48
|
+
data?: CreatePermissionRequest;
|
|
49
|
+
}, TContext>;
|
|
50
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
51
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof createPermission>>, TError, {
|
|
52
|
+
data?: CreatePermissionRequest;
|
|
53
|
+
}, TContext>;
|
|
54
|
+
type CreatePermissionMutationResult = NonNullable<Awaited<ReturnType<typeof createPermission>>>;
|
|
55
|
+
type CreatePermissionMutationBody = CreatePermissionRequest | undefined;
|
|
56
|
+
type CreatePermissionMutationError = unknown;
|
|
57
|
+
/**
|
|
58
|
+
* @summary Create permission
|
|
59
|
+
*/
|
|
60
|
+
declare const useCreatePermission: <TError = unknown, TContext = unknown>(options?: {
|
|
61
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof createPermission>>, TError, {
|
|
62
|
+
data?: CreatePermissionRequest;
|
|
63
|
+
}, TContext>;
|
|
64
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
65
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof createPermission>>, TError, {
|
|
66
|
+
data?: CreatePermissionRequest;
|
|
67
|
+
}, TContext>;
|
|
68
|
+
declare const getGetPermissionUrl: (permissionId: string) => string;
|
|
69
|
+
/**
|
|
70
|
+
* Retrieves a permission by its ID.
|
|
71
|
+
* @summary Get permission by ID
|
|
72
|
+
*/
|
|
73
|
+
declare const getPermission: (permissionId: string, options?: RequestInit) => Promise<Permission>;
|
|
74
|
+
declare const getGetPermissionQueryKey: (permissionId: string) => readonly [`/access-control/permissions/${string}`];
|
|
75
|
+
declare const getGetPermissionQueryOptions: <TData = Awaited<ReturnType<typeof getPermission>>, TError = unknown>(permissionId: string, options?: {
|
|
76
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getPermission>>, TError, TData>>;
|
|
77
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
78
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof getPermission>>, TError, TData> & {
|
|
79
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
80
|
+
};
|
|
81
|
+
type GetPermissionQueryResult = NonNullable<Awaited<ReturnType<typeof getPermission>>>;
|
|
82
|
+
type GetPermissionQueryError = unknown;
|
|
83
|
+
declare function useGetPermission<TData = Awaited<ReturnType<typeof getPermission>>, TError = unknown>(permissionId: string, options: {
|
|
84
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getPermission>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getPermission>>, TError, Awaited<ReturnType<typeof getPermission>>>, "initialData">;
|
|
85
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
86
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
87
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
88
|
+
};
|
|
89
|
+
declare function useGetPermission<TData = Awaited<ReturnType<typeof getPermission>>, TError = unknown>(permissionId: string, options?: {
|
|
90
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getPermission>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getPermission>>, TError, Awaited<ReturnType<typeof getPermission>>>, "initialData">;
|
|
91
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
92
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
93
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
94
|
+
};
|
|
95
|
+
declare function useGetPermission<TData = Awaited<ReturnType<typeof getPermission>>, TError = unknown>(permissionId: string, options?: {
|
|
96
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getPermission>>, TError, TData>>;
|
|
97
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
98
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
99
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
100
|
+
};
|
|
101
|
+
declare const getDeletePermissionUrl: (permissionId: string) => string;
|
|
102
|
+
/**
|
|
103
|
+
* Deletes a permission.
|
|
104
|
+
* @summary Delete permission
|
|
105
|
+
*/
|
|
106
|
+
declare const deletePermission: (permissionId: string, options?: RequestInit) => Promise<DeletePermissionResponse>;
|
|
107
|
+
declare const getDeletePermissionMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
108
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof deletePermission>>, TError, {
|
|
109
|
+
permissionId: string;
|
|
110
|
+
}, TContext>;
|
|
111
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
112
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof deletePermission>>, TError, {
|
|
137
113
|
permissionId: string;
|
|
138
|
-
}
|
|
139
|
-
type
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
114
|
+
}, TContext>;
|
|
115
|
+
type DeletePermissionMutationResult = NonNullable<Awaited<ReturnType<typeof deletePermission>>>;
|
|
116
|
+
type DeletePermissionMutationError = unknown;
|
|
117
|
+
/**
|
|
118
|
+
* @summary Delete permission
|
|
119
|
+
*/
|
|
120
|
+
declare const useDeletePermission: <TError = unknown, TContext = unknown>(options?: {
|
|
121
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof deletePermission>>, TError, {
|
|
122
|
+
permissionId: string;
|
|
123
|
+
}, TContext>;
|
|
124
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
125
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof deletePermission>>, TError, {
|
|
126
|
+
permissionId: string;
|
|
127
|
+
}, TContext>;
|
|
128
|
+
declare const getUpdatePermissionUrl: (permissionId: string) => string;
|
|
129
|
+
/**
|
|
130
|
+
* Updates a permission's description.
|
|
131
|
+
* @summary Update permission
|
|
132
|
+
*/
|
|
133
|
+
declare const updatePermission: (permissionId: string, updatePermissionRequest?: UpdatePermissionRequest, options?: RequestInit) => Promise<UpdatePermissionResponse>;
|
|
134
|
+
declare const getUpdatePermissionMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
135
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof updatePermission>>, TError, {
|
|
136
|
+
permissionId: string;
|
|
137
|
+
data?: UpdatePermissionRequest;
|
|
138
|
+
}, TContext>;
|
|
139
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
140
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof updatePermission>>, TError, {
|
|
141
|
+
permissionId: string;
|
|
142
|
+
data?: UpdatePermissionRequest;
|
|
143
|
+
}, TContext>;
|
|
144
|
+
type UpdatePermissionMutationResult = NonNullable<Awaited<ReturnType<typeof updatePermission>>>;
|
|
145
|
+
type UpdatePermissionMutationBody = UpdatePermissionRequest | undefined;
|
|
146
|
+
type UpdatePermissionMutationError = unknown;
|
|
147
|
+
/**
|
|
148
|
+
* @summary Update permission
|
|
149
|
+
*/
|
|
150
|
+
declare const useUpdatePermission: <TError = unknown, TContext = unknown>(options?: {
|
|
151
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof updatePermission>>, TError, {
|
|
152
|
+
permissionId: string;
|
|
153
|
+
data?: UpdatePermissionRequest;
|
|
154
|
+
}, TContext>;
|
|
155
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
156
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof updatePermission>>, TError, {
|
|
157
|
+
permissionId: string;
|
|
158
|
+
data?: UpdatePermissionRequest;
|
|
159
|
+
}, TContext>;
|
|
160
|
+
declare const getListRolesUrl: () => string;
|
|
161
|
+
/**
|
|
162
|
+
* Lists all roles.
|
|
163
|
+
* @summary List roles
|
|
164
|
+
*/
|
|
165
|
+
declare const listRoles: (options?: RequestInit) => Promise<Role[] | null>;
|
|
166
|
+
declare const getListRolesQueryKey: () => readonly ["/access-control/roles"];
|
|
167
|
+
declare const getListRolesQueryOptions: <TData = Awaited<ReturnType<typeof listRoles>>, TError = unknown>(options?: {
|
|
168
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listRoles>>, TError, TData>>;
|
|
169
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
170
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof listRoles>>, TError, TData> & {
|
|
171
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
172
|
+
};
|
|
173
|
+
type ListRolesQueryResult = NonNullable<Awaited<ReturnType<typeof listRoles>>>;
|
|
174
|
+
type ListRolesQueryError = unknown;
|
|
175
|
+
declare function useListRoles<TData = Awaited<ReturnType<typeof listRoles>>, TError = unknown>(options: {
|
|
176
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof listRoles>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof listRoles>>, TError, Awaited<ReturnType<typeof listRoles>>>, "initialData">;
|
|
177
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
178
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
179
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
180
|
+
};
|
|
181
|
+
declare function useListRoles<TData = Awaited<ReturnType<typeof listRoles>>, TError = unknown>(options?: {
|
|
182
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listRoles>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof listRoles>>, TError, Awaited<ReturnType<typeof listRoles>>>, "initialData">;
|
|
183
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
184
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
185
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
186
|
+
};
|
|
187
|
+
declare function useListRoles<TData = Awaited<ReturnType<typeof listRoles>>, TError = unknown>(options?: {
|
|
188
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listRoles>>, TError, TData>>;
|
|
189
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
190
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
191
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
192
|
+
};
|
|
193
|
+
declare const getCreateRoleUrl: () => string;
|
|
194
|
+
/**
|
|
195
|
+
* Creates a new role.
|
|
196
|
+
* @summary Create role
|
|
197
|
+
*/
|
|
198
|
+
declare const createRole: (createRoleRequest?: CreateRoleRequest, options?: RequestInit) => Promise<CreateRoleResponse>;
|
|
199
|
+
declare const getCreateRoleMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
200
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof createRole>>, TError, {
|
|
201
|
+
data?: CreateRoleRequest;
|
|
202
|
+
}, TContext>;
|
|
203
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
204
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof createRole>>, TError, {
|
|
205
|
+
data?: CreateRoleRequest;
|
|
206
|
+
}, TContext>;
|
|
207
|
+
type CreateRoleMutationResult = NonNullable<Awaited<ReturnType<typeof createRole>>>;
|
|
208
|
+
type CreateRoleMutationBody = CreateRoleRequest | undefined;
|
|
209
|
+
type CreateRoleMutationError = unknown;
|
|
210
|
+
/**
|
|
211
|
+
* @summary Create role
|
|
212
|
+
*/
|
|
213
|
+
declare const useCreateRole: <TError = unknown, TContext = unknown>(options?: {
|
|
214
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof createRole>>, TError, {
|
|
215
|
+
data?: CreateRoleRequest;
|
|
216
|
+
}, TContext>;
|
|
217
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
218
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof createRole>>, TError, {
|
|
219
|
+
data?: CreateRoleRequest;
|
|
220
|
+
}, TContext>;
|
|
221
|
+
declare const getGetRoleByNameUrl: (roleName: string) => string;
|
|
222
|
+
/**
|
|
223
|
+
* Retrieves a role by its name.
|
|
224
|
+
* @summary Get role by name
|
|
225
|
+
*/
|
|
226
|
+
declare const getRoleByName: (roleName: string, options?: RequestInit) => Promise<Role>;
|
|
227
|
+
declare const getGetRoleByNameQueryKey: (roleName: string) => readonly [`/access-control/roles/by-name/${string}`];
|
|
228
|
+
declare const getGetRoleByNameQueryOptions: <TData = Awaited<ReturnType<typeof getRoleByName>>, TError = unknown>(roleName: string, options?: {
|
|
229
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getRoleByName>>, TError, TData>>;
|
|
230
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
231
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof getRoleByName>>, TError, TData> & {
|
|
232
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
233
|
+
};
|
|
234
|
+
type GetRoleByNameQueryResult = NonNullable<Awaited<ReturnType<typeof getRoleByName>>>;
|
|
235
|
+
type GetRoleByNameQueryError = unknown;
|
|
236
|
+
declare function useGetRoleByName<TData = Awaited<ReturnType<typeof getRoleByName>>, TError = unknown>(roleName: string, options: {
|
|
237
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getRoleByName>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getRoleByName>>, TError, Awaited<ReturnType<typeof getRoleByName>>>, "initialData">;
|
|
238
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
239
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
240
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
241
|
+
};
|
|
242
|
+
declare function useGetRoleByName<TData = Awaited<ReturnType<typeof getRoleByName>>, TError = unknown>(roleName: string, options?: {
|
|
243
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getRoleByName>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getRoleByName>>, TError, Awaited<ReturnType<typeof getRoleByName>>>, "initialData">;
|
|
244
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
245
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
246
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
247
|
+
};
|
|
248
|
+
declare function useGetRoleByName<TData = Awaited<ReturnType<typeof getRoleByName>>, TError = unknown>(roleName: string, options?: {
|
|
249
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getRoleByName>>, TError, TData>>;
|
|
250
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
251
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
252
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
253
|
+
};
|
|
254
|
+
declare const getGetRoleUrl: (roleId: string) => string;
|
|
255
|
+
/**
|
|
256
|
+
* Retrieves a role by its ID, including its permissions.
|
|
257
|
+
* @summary Get role by ID
|
|
258
|
+
*/
|
|
259
|
+
declare const getRole: (roleId: string, options?: RequestInit) => Promise<RoleDetails>;
|
|
260
|
+
declare const getGetRoleQueryKey: (roleId: string) => readonly [`/access-control/roles/${string}`];
|
|
261
|
+
declare const getGetRoleQueryOptions: <TData = Awaited<ReturnType<typeof getRole>>, TError = unknown>(roleId: string, options?: {
|
|
262
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getRole>>, TError, TData>>;
|
|
263
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
264
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof getRole>>, TError, TData> & {
|
|
265
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
266
|
+
};
|
|
267
|
+
type GetRoleQueryResult = NonNullable<Awaited<ReturnType<typeof getRole>>>;
|
|
268
|
+
type GetRoleQueryError = unknown;
|
|
269
|
+
declare function useGetRole<TData = Awaited<ReturnType<typeof getRole>>, TError = unknown>(roleId: string, options: {
|
|
270
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getRole>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getRole>>, TError, Awaited<ReturnType<typeof getRole>>>, "initialData">;
|
|
271
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
272
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
273
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
274
|
+
};
|
|
275
|
+
declare function useGetRole<TData = Awaited<ReturnType<typeof getRole>>, TError = unknown>(roleId: string, options?: {
|
|
276
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getRole>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getRole>>, TError, Awaited<ReturnType<typeof getRole>>>, "initialData">;
|
|
277
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
278
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
279
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
280
|
+
};
|
|
281
|
+
declare function useGetRole<TData = Awaited<ReturnType<typeof getRole>>, TError = unknown>(roleId: string, options?: {
|
|
282
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getRole>>, TError, TData>>;
|
|
283
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
284
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
285
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
286
|
+
};
|
|
287
|
+
declare const getDeleteRoleUrl: (roleId: string) => string;
|
|
288
|
+
/**
|
|
289
|
+
* Deletes a role.
|
|
290
|
+
* @summary Delete role
|
|
291
|
+
*/
|
|
292
|
+
declare const deleteRole: (roleId: string, options?: RequestInit) => Promise<DeleteRoleResponse>;
|
|
293
|
+
declare const getDeleteRoleMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
294
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof deleteRole>>, TError, {
|
|
295
|
+
roleId: string;
|
|
296
|
+
}, TContext>;
|
|
297
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
298
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof deleteRole>>, TError, {
|
|
152
299
|
roleId: string;
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
type
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
}
|
|
300
|
+
}, TContext>;
|
|
301
|
+
type DeleteRoleMutationResult = NonNullable<Awaited<ReturnType<typeof deleteRole>>>;
|
|
302
|
+
type DeleteRoleMutationError = unknown;
|
|
303
|
+
/**
|
|
304
|
+
* @summary Delete role
|
|
305
|
+
*/
|
|
306
|
+
declare const useDeleteRole: <TError = unknown, TContext = unknown>(options?: {
|
|
307
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof deleteRole>>, TError, {
|
|
308
|
+
roleId: string;
|
|
309
|
+
}, TContext>;
|
|
310
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
311
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof deleteRole>>, TError, {
|
|
312
|
+
roleId: string;
|
|
313
|
+
}, TContext>;
|
|
314
|
+
declare const getUpdateRoleUrl: (roleId: string) => string;
|
|
315
|
+
/**
|
|
316
|
+
* Updates a role's attributes.
|
|
317
|
+
* @summary Update role
|
|
318
|
+
*/
|
|
319
|
+
declare const updateRole: (roleId: string, updateRoleRequest?: UpdateRoleRequest, options?: RequestInit) => Promise<UpdateRoleResponse>;
|
|
320
|
+
declare const getUpdateRoleMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
321
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof updateRole>>, TError, {
|
|
322
|
+
roleId: string;
|
|
323
|
+
data?: UpdateRoleRequest;
|
|
324
|
+
}, TContext>;
|
|
325
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
326
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof updateRole>>, TError, {
|
|
327
|
+
roleId: string;
|
|
328
|
+
data?: UpdateRoleRequest;
|
|
329
|
+
}, TContext>;
|
|
330
|
+
type UpdateRoleMutationResult = NonNullable<Awaited<ReturnType<typeof updateRole>>>;
|
|
331
|
+
type UpdateRoleMutationBody = UpdateRoleRequest | undefined;
|
|
332
|
+
type UpdateRoleMutationError = unknown;
|
|
333
|
+
/**
|
|
334
|
+
* @summary Update role
|
|
335
|
+
*/
|
|
336
|
+
declare const useUpdateRole: <TError = unknown, TContext = unknown>(options?: {
|
|
337
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof updateRole>>, TError, {
|
|
338
|
+
roleId: string;
|
|
339
|
+
data?: UpdateRoleRequest;
|
|
340
|
+
}, TContext>;
|
|
341
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
342
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof updateRole>>, TError, {
|
|
343
|
+
roleId: string;
|
|
344
|
+
data?: UpdateRoleRequest;
|
|
345
|
+
}, TContext>;
|
|
346
|
+
declare const getListRolePermissionsUrl: (roleId: string) => string;
|
|
347
|
+
/**
|
|
348
|
+
* Lists all permissions assigned to a role.
|
|
349
|
+
* @summary List role permissions
|
|
350
|
+
*/
|
|
351
|
+
declare const listRolePermissions: (roleId: string, options?: RequestInit) => Promise<UserPermissionInfo[] | null>;
|
|
352
|
+
declare const getListRolePermissionsQueryKey: (roleId: string) => readonly [`/access-control/roles/${string}/permissions`];
|
|
353
|
+
declare const getListRolePermissionsQueryOptions: <TData = Awaited<ReturnType<typeof listRolePermissions>>, TError = unknown>(roleId: string, options?: {
|
|
354
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listRolePermissions>>, TError, TData>>;
|
|
355
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
356
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof listRolePermissions>>, TError, TData> & {
|
|
357
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
358
|
+
};
|
|
359
|
+
type ListRolePermissionsQueryResult = NonNullable<Awaited<ReturnType<typeof listRolePermissions>>>;
|
|
360
|
+
type ListRolePermissionsQueryError = unknown;
|
|
361
|
+
declare function useListRolePermissions<TData = Awaited<ReturnType<typeof listRolePermissions>>, TError = unknown>(roleId: string, options: {
|
|
362
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof listRolePermissions>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof listRolePermissions>>, TError, Awaited<ReturnType<typeof listRolePermissions>>>, "initialData">;
|
|
363
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
364
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
365
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
366
|
+
};
|
|
367
|
+
declare function useListRolePermissions<TData = Awaited<ReturnType<typeof listRolePermissions>>, TError = unknown>(roleId: string, options?: {
|
|
368
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listRolePermissions>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof listRolePermissions>>, TError, Awaited<ReturnType<typeof listRolePermissions>>>, "initialData">;
|
|
369
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
370
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
371
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
372
|
+
};
|
|
373
|
+
declare function useListRolePermissions<TData = Awaited<ReturnType<typeof listRolePermissions>>, TError = unknown>(roleId: string, options?: {
|
|
374
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listRolePermissions>>, TError, TData>>;
|
|
375
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
376
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
377
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
378
|
+
};
|
|
379
|
+
declare const getReplaceRolePermissionsUrl: (roleId: string) => string;
|
|
380
|
+
/**
|
|
381
|
+
* Replaces all permissions assigned to a role with a new set.
|
|
382
|
+
* @summary Replace role permissions
|
|
383
|
+
*/
|
|
384
|
+
declare const replaceRolePermissions: (roleId: string, replaceRolePermissionsRequest?: ReplaceRolePermissionsRequest, options?: RequestInit) => Promise<ReplaceRolePermissionResponse>;
|
|
385
|
+
declare const getReplaceRolePermissionsMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
386
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof replaceRolePermissions>>, TError, {
|
|
387
|
+
roleId: string;
|
|
388
|
+
data?: ReplaceRolePermissionsRequest;
|
|
389
|
+
}, TContext>;
|
|
390
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
391
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof replaceRolePermissions>>, TError, {
|
|
392
|
+
roleId: string;
|
|
393
|
+
data?: ReplaceRolePermissionsRequest;
|
|
394
|
+
}, TContext>;
|
|
395
|
+
type ReplaceRolePermissionsMutationResult = NonNullable<Awaited<ReturnType<typeof replaceRolePermissions>>>;
|
|
396
|
+
type ReplaceRolePermissionsMutationBody = ReplaceRolePermissionsRequest | undefined;
|
|
397
|
+
type ReplaceRolePermissionsMutationError = unknown;
|
|
398
|
+
/**
|
|
399
|
+
* @summary Replace role permissions
|
|
400
|
+
*/
|
|
401
|
+
declare const useReplaceRolePermissions: <TError = unknown, TContext = unknown>(options?: {
|
|
402
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof replaceRolePermissions>>, TError, {
|
|
403
|
+
roleId: string;
|
|
404
|
+
data?: ReplaceRolePermissionsRequest;
|
|
405
|
+
}, TContext>;
|
|
406
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
407
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof replaceRolePermissions>>, TError, {
|
|
408
|
+
roleId: string;
|
|
409
|
+
data?: ReplaceRolePermissionsRequest;
|
|
410
|
+
}, TContext>;
|
|
411
|
+
declare const getAddRolePermissionUrl: (roleId: string) => string;
|
|
412
|
+
/**
|
|
413
|
+
* Assigns a permission to a role.
|
|
414
|
+
* @summary Assign permission to role
|
|
415
|
+
*/
|
|
416
|
+
declare const addRolePermission: (roleId: string, addRolePermissionRequest?: AddRolePermissionRequest, options?: RequestInit) => Promise<AddRolePermissionResponse>;
|
|
417
|
+
declare const getAddRolePermissionMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
418
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof addRolePermission>>, TError, {
|
|
419
|
+
roleId: string;
|
|
420
|
+
data?: AddRolePermissionRequest;
|
|
421
|
+
}, TContext>;
|
|
422
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
423
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof addRolePermission>>, TError, {
|
|
424
|
+
roleId: string;
|
|
425
|
+
data?: AddRolePermissionRequest;
|
|
426
|
+
}, TContext>;
|
|
427
|
+
type AddRolePermissionMutationResult = NonNullable<Awaited<ReturnType<typeof addRolePermission>>>;
|
|
428
|
+
type AddRolePermissionMutationBody = AddRolePermissionRequest | undefined;
|
|
429
|
+
type AddRolePermissionMutationError = unknown;
|
|
430
|
+
/**
|
|
431
|
+
* @summary Assign permission to role
|
|
432
|
+
*/
|
|
433
|
+
declare const useAddRolePermission: <TError = unknown, TContext = unknown>(options?: {
|
|
434
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof addRolePermission>>, TError, {
|
|
435
|
+
roleId: string;
|
|
436
|
+
data?: AddRolePermissionRequest;
|
|
437
|
+
}, TContext>;
|
|
438
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
439
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof addRolePermission>>, TError, {
|
|
440
|
+
roleId: string;
|
|
441
|
+
data?: AddRolePermissionRequest;
|
|
442
|
+
}, TContext>;
|
|
443
|
+
declare const getRemoveRolePermissionUrl: (roleId: string, permissionId: string) => string;
|
|
444
|
+
/**
|
|
445
|
+
* Removes a permission from a role.
|
|
446
|
+
* @summary Remove role permission
|
|
447
|
+
*/
|
|
448
|
+
declare const removeRolePermission: (roleId: string, permissionId: string, options?: RequestInit) => Promise<RemoveRolePermissionResponse>;
|
|
449
|
+
declare const getRemoveRolePermissionMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
450
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof removeRolePermission>>, TError, {
|
|
451
|
+
roleId: string;
|
|
452
|
+
permissionId: string;
|
|
453
|
+
}, TContext>;
|
|
454
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
455
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof removeRolePermission>>, TError, {
|
|
456
|
+
roleId: string;
|
|
457
|
+
permissionId: string;
|
|
458
|
+
}, TContext>;
|
|
459
|
+
type RemoveRolePermissionMutationResult = NonNullable<Awaited<ReturnType<typeof removeRolePermission>>>;
|
|
460
|
+
type RemoveRolePermissionMutationError = unknown;
|
|
461
|
+
/**
|
|
462
|
+
* @summary Remove role permission
|
|
463
|
+
*/
|
|
464
|
+
declare const useRemoveRolePermission: <TError = unknown, TContext = unknown>(options?: {
|
|
465
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof removeRolePermission>>, TError, {
|
|
466
|
+
roleId: string;
|
|
467
|
+
permissionId: string;
|
|
468
|
+
}, TContext>;
|
|
469
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
470
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof removeRolePermission>>, TError, {
|
|
471
|
+
roleId: string;
|
|
472
|
+
permissionId: string;
|
|
473
|
+
}, TContext>;
|
|
474
|
+
declare const getGetUserPermissionsUrl: (userId: string) => string;
|
|
475
|
+
/**
|
|
476
|
+
* Retrieves all permissions granted to a user through their roles.
|
|
477
|
+
* @summary Get user permissions
|
|
478
|
+
*/
|
|
479
|
+
declare const getUserPermissions: (userId: string, options?: RequestInit) => Promise<GetUserPermissionsResponse>;
|
|
480
|
+
declare const getGetUserPermissionsQueryKey: (userId: string) => readonly [`/access-control/users/${string}/permissions`];
|
|
481
|
+
declare const getGetUserPermissionsQueryOptions: <TData = Awaited<ReturnType<typeof getUserPermissions>>, TError = unknown>(userId: string, options?: {
|
|
482
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUserPermissions>>, TError, TData>>;
|
|
483
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
484
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof getUserPermissions>>, TError, TData> & {
|
|
485
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
486
|
+
};
|
|
487
|
+
type GetUserPermissionsQueryResult = NonNullable<Awaited<ReturnType<typeof getUserPermissions>>>;
|
|
488
|
+
type GetUserPermissionsQueryError = unknown;
|
|
489
|
+
declare function useGetUserPermissions<TData = Awaited<ReturnType<typeof getUserPermissions>>, TError = unknown>(userId: string, options: {
|
|
490
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUserPermissions>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getUserPermissions>>, TError, Awaited<ReturnType<typeof getUserPermissions>>>, "initialData">;
|
|
491
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
492
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
493
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
494
|
+
};
|
|
495
|
+
declare function useGetUserPermissions<TData = Awaited<ReturnType<typeof getUserPermissions>>, TError = unknown>(userId: string, options?: {
|
|
496
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUserPermissions>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getUserPermissions>>, TError, Awaited<ReturnType<typeof getUserPermissions>>>, "initialData">;
|
|
497
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
498
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
499
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
500
|
+
};
|
|
501
|
+
declare function useGetUserPermissions<TData = Awaited<ReturnType<typeof getUserPermissions>>, TError = unknown>(userId: string, options?: {
|
|
502
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUserPermissions>>, TError, TData>>;
|
|
503
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
504
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
505
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
506
|
+
};
|
|
507
|
+
declare const getCheckUserPermissionsUrl: (userId: string) => string;
|
|
508
|
+
/**
|
|
509
|
+
* Checks whether a user has all the specified permissions.
|
|
510
|
+
* @summary Check user permissions
|
|
511
|
+
*/
|
|
512
|
+
declare const checkUserPermissions: (userId: string, checkUserPermissionsRequest?: CheckUserPermissionsRequest, options?: RequestInit) => Promise<CheckUserPermissionsResponse>;
|
|
513
|
+
declare const getCheckUserPermissionsMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
514
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof checkUserPermissions>>, TError, {
|
|
515
|
+
userId: string;
|
|
516
|
+
data?: CheckUserPermissionsRequest;
|
|
517
|
+
}, TContext>;
|
|
518
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
519
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof checkUserPermissions>>, TError, {
|
|
520
|
+
userId: string;
|
|
521
|
+
data?: CheckUserPermissionsRequest;
|
|
522
|
+
}, TContext>;
|
|
523
|
+
type CheckUserPermissionsMutationResult = NonNullable<Awaited<ReturnType<typeof checkUserPermissions>>>;
|
|
524
|
+
type CheckUserPermissionsMutationBody = CheckUserPermissionsRequest | undefined;
|
|
525
|
+
type CheckUserPermissionsMutationError = unknown;
|
|
526
|
+
/**
|
|
527
|
+
* @summary Check user permissions
|
|
528
|
+
*/
|
|
529
|
+
declare const useCheckUserPermissions: <TError = unknown, TContext = unknown>(options?: {
|
|
530
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof checkUserPermissions>>, TError, {
|
|
531
|
+
userId: string;
|
|
532
|
+
data?: CheckUserPermissionsRequest;
|
|
533
|
+
}, TContext>;
|
|
534
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
535
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof checkUserPermissions>>, TError, {
|
|
536
|
+
userId: string;
|
|
537
|
+
data?: CheckUserPermissionsRequest;
|
|
538
|
+
}, TContext>;
|
|
539
|
+
declare const getListUserRolesUrl: (userId: string) => string;
|
|
540
|
+
/**
|
|
541
|
+
* Lists all roles assigned to a user.
|
|
542
|
+
* @summary List user roles
|
|
543
|
+
*/
|
|
544
|
+
declare const listUserRoles: (userId: string, options?: RequestInit) => Promise<UserRoleInfo[] | null>;
|
|
545
|
+
declare const getListUserRolesQueryKey: (userId: string) => readonly [`/access-control/users/${string}/roles`];
|
|
546
|
+
declare const getListUserRolesQueryOptions: <TData = Awaited<ReturnType<typeof listUserRoles>>, TError = unknown>(userId: string, options?: {
|
|
547
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listUserRoles>>, TError, TData>>;
|
|
548
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
549
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof listUserRoles>>, TError, TData> & {
|
|
550
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
551
|
+
};
|
|
552
|
+
type ListUserRolesQueryResult = NonNullable<Awaited<ReturnType<typeof listUserRoles>>>;
|
|
553
|
+
type ListUserRolesQueryError = unknown;
|
|
554
|
+
declare function useListUserRoles<TData = Awaited<ReturnType<typeof listUserRoles>>, TError = unknown>(userId: string, options: {
|
|
555
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof listUserRoles>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof listUserRoles>>, TError, Awaited<ReturnType<typeof listUserRoles>>>, "initialData">;
|
|
556
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
557
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
558
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
559
|
+
};
|
|
560
|
+
declare function useListUserRoles<TData = Awaited<ReturnType<typeof listUserRoles>>, TError = unknown>(userId: string, options?: {
|
|
561
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listUserRoles>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof listUserRoles>>, TError, Awaited<ReturnType<typeof listUserRoles>>>, "initialData">;
|
|
562
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
563
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
564
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
565
|
+
};
|
|
566
|
+
declare function useListUserRoles<TData = Awaited<ReturnType<typeof listUserRoles>>, TError = unknown>(userId: string, options?: {
|
|
567
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listUserRoles>>, TError, TData>>;
|
|
568
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
569
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
570
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
571
|
+
};
|
|
572
|
+
declare const getReplaceUserRolesUrl: (userId: string) => string;
|
|
573
|
+
/**
|
|
574
|
+
* Replaces all roles assigned to a user with a new set.
|
|
575
|
+
* @summary Replace user roles
|
|
576
|
+
*/
|
|
577
|
+
declare const replaceUserRoles: (userId: string, replaceUserRolesRequest?: ReplaceUserRolesRequest, options?: RequestInit) => Promise<ReplaceUserRolesResponse>;
|
|
578
|
+
declare const getReplaceUserRolesMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
579
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof replaceUserRoles>>, TError, {
|
|
580
|
+
userId: string;
|
|
581
|
+
data?: ReplaceUserRolesRequest;
|
|
582
|
+
}, TContext>;
|
|
583
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
584
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof replaceUserRoles>>, TError, {
|
|
585
|
+
userId: string;
|
|
586
|
+
data?: ReplaceUserRolesRequest;
|
|
587
|
+
}, TContext>;
|
|
588
|
+
type ReplaceUserRolesMutationResult = NonNullable<Awaited<ReturnType<typeof replaceUserRoles>>>;
|
|
589
|
+
type ReplaceUserRolesMutationBody = ReplaceUserRolesRequest | undefined;
|
|
590
|
+
type ReplaceUserRolesMutationError = unknown;
|
|
591
|
+
/**
|
|
592
|
+
* @summary Replace user roles
|
|
593
|
+
*/
|
|
594
|
+
declare const useReplaceUserRoles: <TError = unknown, TContext = unknown>(options?: {
|
|
595
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof replaceUserRoles>>, TError, {
|
|
596
|
+
userId: string;
|
|
597
|
+
data?: ReplaceUserRolesRequest;
|
|
598
|
+
}, TContext>;
|
|
599
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
600
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof replaceUserRoles>>, TError, {
|
|
601
|
+
userId: string;
|
|
602
|
+
data?: ReplaceUserRolesRequest;
|
|
603
|
+
}, TContext>;
|
|
604
|
+
declare const getAssignUserRoleUrl: (userId: string) => string;
|
|
605
|
+
/**
|
|
606
|
+
* Assigns a role to a user.
|
|
607
|
+
* @summary Assign role to user
|
|
608
|
+
*/
|
|
609
|
+
declare const assignUserRole: (userId: string, assignUserRoleRequest?: AssignUserRoleRequest, options?: RequestInit) => Promise<AssignUserRoleResponse>;
|
|
610
|
+
declare const getAssignUserRoleMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
611
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof assignUserRole>>, TError, {
|
|
612
|
+
userId: string;
|
|
613
|
+
data?: AssignUserRoleRequest;
|
|
614
|
+
}, TContext>;
|
|
615
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
616
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof assignUserRole>>, TError, {
|
|
617
|
+
userId: string;
|
|
618
|
+
data?: AssignUserRoleRequest;
|
|
619
|
+
}, TContext>;
|
|
620
|
+
type AssignUserRoleMutationResult = NonNullable<Awaited<ReturnType<typeof assignUserRole>>>;
|
|
621
|
+
type AssignUserRoleMutationBody = AssignUserRoleRequest | undefined;
|
|
622
|
+
type AssignUserRoleMutationError = unknown;
|
|
623
|
+
/**
|
|
624
|
+
* @summary Assign role to user
|
|
625
|
+
*/
|
|
626
|
+
declare const useAssignUserRole: <TError = unknown, TContext = unknown>(options?: {
|
|
627
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof assignUserRole>>, TError, {
|
|
628
|
+
userId: string;
|
|
629
|
+
data?: AssignUserRoleRequest;
|
|
630
|
+
}, TContext>;
|
|
631
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
632
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof assignUserRole>>, TError, {
|
|
633
|
+
userId: string;
|
|
634
|
+
data?: AssignUserRoleRequest;
|
|
635
|
+
}, TContext>;
|
|
636
|
+
declare const getRemoveUserRoleUrl: (userId: string, roleId: string) => string;
|
|
637
|
+
/**
|
|
638
|
+
* Removes a role from a user.
|
|
639
|
+
* @summary Remove user role
|
|
640
|
+
*/
|
|
641
|
+
declare const removeUserRole: (userId: string, roleId: string, options?: RequestInit) => Promise<RemoveUserRoleResponse>;
|
|
642
|
+
declare const getRemoveUserRoleMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
643
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof removeUserRole>>, TError, {
|
|
644
|
+
userId: string;
|
|
645
|
+
roleId: string;
|
|
646
|
+
}, TContext>;
|
|
647
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
648
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof removeUserRole>>, TError, {
|
|
649
|
+
userId: string;
|
|
650
|
+
roleId: string;
|
|
651
|
+
}, TContext>;
|
|
652
|
+
type RemoveUserRoleMutationResult = NonNullable<Awaited<ReturnType<typeof removeUserRole>>>;
|
|
653
|
+
type RemoveUserRoleMutationError = unknown;
|
|
654
|
+
/**
|
|
655
|
+
* @summary Remove user role
|
|
656
|
+
*/
|
|
657
|
+
declare const useRemoveUserRole: <TError = unknown, TContext = unknown>(options?: {
|
|
658
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof removeUserRole>>, TError, {
|
|
659
|
+
userId: string;
|
|
660
|
+
roleId: string;
|
|
661
|
+
}, TContext>;
|
|
662
|
+
request?: SecondParameter$8<typeof customFetch>;
|
|
663
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof removeUserRole>>, TError, {
|
|
664
|
+
userId: string;
|
|
665
|
+
roleId: string;
|
|
666
|
+
}, TContext>;
|
|
183
667
|
//#endregion
|
|
184
668
|
//#region src/plugins/access-control/plugin.d.ts
|
|
185
669
|
declare class AccessControlPlugin implements Plugin {
|
|
186
670
|
readonly id = "accessControl";
|
|
187
671
|
constructor();
|
|
188
|
-
init(client: AuthulaClient):
|
|
189
|
-
createRole: (data: CreateRoleRequest) => Promise<CreateRoleResponse>;
|
|
190
|
-
getAllRoles: () => Promise<Role[]>;
|
|
191
|
-
getRoleByName: (roleName: string) => Promise<Role>;
|
|
192
|
-
getRoleById: (roleId: string) => Promise<RoleDetails>;
|
|
193
|
-
updateRole: (roleId: string, data: UpdateRoleRequest) => Promise<UpdateRoleResponse>;
|
|
194
|
-
deleteRole: (roleId: string) => Promise<DeleteRoleResponse>;
|
|
195
|
-
createPermission: (data: CreatePermissionRequest) => Promise<CreatePermissionResponse>;
|
|
196
|
-
getAllPermissions: () => Promise<Permission[]>;
|
|
197
|
-
getPermissionById: (permissionId: string) => Promise<Permission>;
|
|
198
|
-
updatePermission: (permissionId: string, data: UpdatePermissionRequest) => Promise<UpdatePermissionResponse>;
|
|
199
|
-
deletePermission: (permissionId: string) => Promise<DeletePermissionResponse>;
|
|
200
|
-
addRolePermission: (roleId: string, data: AddRolePermissionRequest) => Promise<AddRolePermissionResponse>;
|
|
201
|
-
getRolePermissions: (roleId: string) => Promise<UserPermissionInfo[]>;
|
|
202
|
-
replaceRolePermissions: (roleId: string, data: ReplaceRolePermissionsRequest) => Promise<ReplaceRolePermissionResponse>;
|
|
203
|
-
removeRolePermission: (roleId: string, permissionId: string) => Promise<RemoveRolePermissionResponse>;
|
|
204
|
-
getUserRoles: (userId: string) => Promise<UserRoleInfo[]>;
|
|
205
|
-
assignUserRole: (userId: string, data: AssignUserRoleRequest) => Promise<AssignUserRoleResponse>;
|
|
206
|
-
replaceUserRoles: (userId: string, data: ReplaceUserRolesRequest) => Promise<ReplaceUserRolesResponse>;
|
|
207
|
-
removeUserRole: (userId: string, roleId: string) => Promise<RemoveUserRoleResponse>;
|
|
208
|
-
getUserPermissions: (userId: string) => Promise<GetUserPermissionsResponse>;
|
|
209
|
-
checkUserPermissions: (userId: string, data: CheckUserPermissionsRequest) => Promise<CheckUserPermissionsResponse>;
|
|
210
|
-
};
|
|
672
|
+
init(client: AuthulaClient): typeof access_control_d_exports;
|
|
211
673
|
}
|
|
212
674
|
//#endregion
|
|
213
|
-
//#region src/
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
type DeleteUserStateResponse = {
|
|
363
|
-
message: string;
|
|
364
|
-
};
|
|
365
|
-
type GetBannedUserStatesResponse = Array<AdminUserState>;
|
|
366
|
-
type BanUserRequest = {
|
|
367
|
-
bannedUntil?: string;
|
|
368
|
-
reason?: string;
|
|
369
|
-
};
|
|
370
|
-
type BanUserResponse = {
|
|
371
|
-
state: AdminUserState;
|
|
372
|
-
};
|
|
373
|
-
type UnbanUserResponse = {
|
|
374
|
-
state: AdminUserState;
|
|
375
|
-
};
|
|
376
|
-
type GetUserAdminSessionsResponse = Array<AdminUserSession>;
|
|
377
|
-
type GetSessionStateResponse = {
|
|
378
|
-
state: AdminSessionState;
|
|
379
|
-
};
|
|
380
|
-
type CreateSessionStateRequest = {
|
|
381
|
-
revoke: boolean;
|
|
382
|
-
revokedReason?: string;
|
|
383
|
-
impersonatorUserId?: string;
|
|
384
|
-
impersonationReason?: string;
|
|
385
|
-
impersonationExpiresAt?: string;
|
|
386
|
-
};
|
|
387
|
-
type UpdateSessionStateRequest = {
|
|
388
|
-
revoke: boolean;
|
|
389
|
-
revokedReason?: string;
|
|
390
|
-
impersonatorUserId?: string;
|
|
391
|
-
impersonationReason?: string;
|
|
392
|
-
impersonationExpiresAt?: string;
|
|
393
|
-
};
|
|
394
|
-
type CreateSessionStateResponse = {
|
|
395
|
-
state: AdminSessionState;
|
|
396
|
-
};
|
|
397
|
-
type UpdateSessionStateResponse = {
|
|
398
|
-
state: AdminSessionState;
|
|
399
|
-
};
|
|
400
|
-
type DeleteSessionStateResponse = {
|
|
401
|
-
message: string;
|
|
402
|
-
};
|
|
403
|
-
type GetRevokedSessionStatesResponse = Array<AdminSessionState>;
|
|
404
|
-
type RevokeSessionRequest = {
|
|
405
|
-
reason?: string;
|
|
406
|
-
};
|
|
407
|
-
type RevokeSessionResponse = {
|
|
408
|
-
sessionState: AdminSessionState;
|
|
409
|
-
};
|
|
410
|
-
type GetAllImpersonationsResponse = Array<Impersonation>;
|
|
411
|
-
type GetImpersonationByIdResponse = {
|
|
412
|
-
impersonation: Impersonation;
|
|
413
|
-
};
|
|
414
|
-
type StartImpersonationRequest = {
|
|
415
|
-
targetUserId: string;
|
|
416
|
-
reason: string;
|
|
417
|
-
expiresInSeconds?: number;
|
|
418
|
-
};
|
|
419
|
-
type StartImpersonationResponse = {
|
|
420
|
-
impersonation: Impersonation;
|
|
421
|
-
};
|
|
422
|
-
type StopImpersonationResponse = {
|
|
423
|
-
message: string;
|
|
424
|
-
};
|
|
675
|
+
//#region src/gen/endpoints/admin-accounts/admin-accounts.d.ts
|
|
676
|
+
/**
|
|
677
|
+
* Retrieves an account by its ID.
|
|
678
|
+
* @summary Get account by ID
|
|
679
|
+
*/
|
|
680
|
+
declare const getAccount: (id: string, options?: RequestInit) => Promise<GetAccountByIDResponse>;
|
|
681
|
+
/**
|
|
682
|
+
* Deletes an account.
|
|
683
|
+
* @summary Delete account
|
|
684
|
+
*/
|
|
685
|
+
declare const deleteAccount: (id: string, options?: RequestInit) => Promise<DeleteAccountResponse>;
|
|
686
|
+
/**
|
|
687
|
+
* Updates an account's attributes.
|
|
688
|
+
* @summary Update account
|
|
689
|
+
*/
|
|
690
|
+
declare const updateAccount: (id: string, updateAccountRequest?: UpdateAccountRequest, options?: RequestInit) => Promise<UpdateAccountResponse>;
|
|
691
|
+
/**
|
|
692
|
+
* Lists all accounts for a user.
|
|
693
|
+
* @summary List user accounts
|
|
694
|
+
*/
|
|
695
|
+
declare const listUserAccounts: (userId: string, options?: RequestInit) => Promise<UserAccountsResponse>;
|
|
696
|
+
/**
|
|
697
|
+
* Creates a new account for a user.
|
|
698
|
+
* @summary Create account
|
|
699
|
+
*/
|
|
700
|
+
declare const createAccount: (userId: string, createAccountRequest?: CreateAccountRequest, options?: RequestInit) => Promise<CreateAccountResponse>;
|
|
701
|
+
//#endregion
|
|
702
|
+
//#region src/gen/endpoints/admin-impersonation/admin-impersonation.d.ts
|
|
703
|
+
/**
|
|
704
|
+
* Lists all impersonations.
|
|
705
|
+
* @summary List impersonations
|
|
706
|
+
*/
|
|
707
|
+
declare const listImpersonations: (options?: RequestInit) => Promise<Impersonation[] | null>;
|
|
708
|
+
/**
|
|
709
|
+
* Starts an impersonation session as a target user.
|
|
710
|
+
* @summary Start impersonation
|
|
711
|
+
*/
|
|
712
|
+
declare const startImpersonation: (startImpersonationRequest?: StartImpersonationRequest, options?: RequestInit) => Promise<StartImpersonationResponse>;
|
|
713
|
+
/**
|
|
714
|
+
* Retrieves an impersonation by its ID.
|
|
715
|
+
* @summary Get impersonation by ID
|
|
716
|
+
*/
|
|
717
|
+
declare const getImpersonation: (impersonationId: string, options?: RequestInit) => Promise<GetImpersonationByIDResponse>;
|
|
718
|
+
/**
|
|
719
|
+
* Stops an impersonation session and restores the original session.
|
|
720
|
+
* @summary Stop impersonation
|
|
721
|
+
*/
|
|
722
|
+
declare const stopImpersonation: (impersonationId: string, options?: RequestInit) => Promise<StopImpersonationResponse>;
|
|
723
|
+
//#endregion
|
|
724
|
+
//#region src/gen/endpoints/admin-session-state/admin-session-state.d.ts
|
|
725
|
+
/**
|
|
726
|
+
* Lists all revoked session states.
|
|
727
|
+
* @summary List revoked session states
|
|
728
|
+
*/
|
|
729
|
+
declare const listRevokedSessionStates: (options?: RequestInit) => Promise<AdminSessionState[] | null>;
|
|
730
|
+
/**
|
|
731
|
+
* Revokes a session.
|
|
732
|
+
* @summary Revoke session
|
|
733
|
+
*/
|
|
734
|
+
declare const revokeSession: (sessionId: string, revokeSessionRequest?: RevokeSessionRequest, options?: RequestInit) => Promise<RevokeSessionResponse>;
|
|
735
|
+
/**
|
|
736
|
+
* Retrieves the state of a session.
|
|
737
|
+
* @summary Get session state
|
|
738
|
+
*/
|
|
739
|
+
declare const getSessionState: (sessionId: string, options?: RequestInit) => Promise<GetSessionStateResponse>;
|
|
740
|
+
/**
|
|
741
|
+
* Creates the state for a session.
|
|
742
|
+
* @summary Create session state
|
|
743
|
+
*/
|
|
744
|
+
declare const createSessionState: (sessionId: string, createSessionStateRequest?: CreateSessionStateRequest, options?: RequestInit) => Promise<UpsertSessionStateResponse>;
|
|
745
|
+
/**
|
|
746
|
+
* Deletes the state of a session.
|
|
747
|
+
* @summary Delete session state
|
|
748
|
+
*/
|
|
749
|
+
declare const deleteSessionState: (sessionId: string, options?: RequestInit) => Promise<DeleteSessionStateResponse>;
|
|
750
|
+
/**
|
|
751
|
+
* Updates the state of a session.
|
|
752
|
+
* @summary Update session state
|
|
753
|
+
*/
|
|
754
|
+
declare const updateSessionState: (sessionId: string, upsertSessionStateRequest?: UpsertSessionStateRequest, options?: RequestInit) => Promise<UpsertSessionStateResponse>;
|
|
755
|
+
//#endregion
|
|
756
|
+
//#region src/gen/endpoints/admin-user-state/admin-user-state.d.ts
|
|
757
|
+
/**
|
|
758
|
+
* Lists all banned user states.
|
|
759
|
+
* @summary List banned user states
|
|
760
|
+
*/
|
|
761
|
+
declare const listBannedUserStates: (options?: RequestInit) => Promise<AdminUserState[] | null>;
|
|
762
|
+
/**
|
|
763
|
+
* Bans a user.
|
|
764
|
+
* @summary Ban user
|
|
765
|
+
*/
|
|
766
|
+
declare const banUser: (userId: string, banUserRequest?: BanUserRequest, options?: RequestInit) => Promise<BanUserResponse>;
|
|
767
|
+
/**
|
|
768
|
+
* Lists all sessions for a user.
|
|
769
|
+
* @summary List user sessions
|
|
770
|
+
*/
|
|
771
|
+
declare const listUserSessions: (userId: string, options?: RequestInit) => Promise<AdminUserSession[] | null>;
|
|
772
|
+
/**
|
|
773
|
+
* Retrieves the state of a user.
|
|
774
|
+
* @summary Get user state
|
|
775
|
+
*/
|
|
776
|
+
declare const getUserState: (userId: string, options?: RequestInit) => Promise<GetUserStateResponse>;
|
|
777
|
+
/**
|
|
778
|
+
* Creates the state for a user.
|
|
779
|
+
* @summary Create user state
|
|
780
|
+
*/
|
|
781
|
+
declare const createUserState: (userId: string, createUserStateRequest?: CreateUserStateRequest, options?: RequestInit) => Promise<UpsertUserStateResponse>;
|
|
782
|
+
/**
|
|
783
|
+
* Deletes the state of a user.
|
|
784
|
+
* @summary Delete user state
|
|
785
|
+
*/
|
|
786
|
+
declare const deleteUserState: (userId: string, options?: RequestInit) => Promise<DeleteUserStateResponse>;
|
|
787
|
+
/**
|
|
788
|
+
* Updates the state of a user.
|
|
789
|
+
* @summary Update user state
|
|
790
|
+
*/
|
|
791
|
+
declare const updateUserState: (userId: string, upsertUserStateRequest?: UpsertUserStateRequest, options?: RequestInit) => Promise<UpsertUserStateResponse>;
|
|
792
|
+
/**
|
|
793
|
+
* Unbans a user.
|
|
794
|
+
* @summary Unban user
|
|
795
|
+
*/
|
|
796
|
+
declare const unbanUser: (userId: string, options?: RequestInit) => Promise<UnbanUserResponse>;
|
|
797
|
+
//#endregion
|
|
798
|
+
//#region src/gen/endpoints/admin-users/admin-users.d.ts
|
|
799
|
+
/**
|
|
800
|
+
* Lists users with cursor-based pagination.
|
|
801
|
+
* @summary List users
|
|
802
|
+
*/
|
|
803
|
+
declare const listUsers: (params?: ListUsersParams, options?: RequestInit) => Promise<UsersPage>;
|
|
804
|
+
/**
|
|
805
|
+
* Creates a new user with the specified attributes.
|
|
806
|
+
* @summary Create user
|
|
807
|
+
*/
|
|
808
|
+
declare const createUser: (createUserRequest?: CreateUserRequest, options?: RequestInit) => Promise<CreateUserResponse>;
|
|
809
|
+
/**
|
|
810
|
+
* Retrieves a user by their ID.
|
|
811
|
+
* @summary Get user by ID
|
|
812
|
+
*/
|
|
813
|
+
declare const getUser: (userId: string, options?: RequestInit) => Promise<GetUserByIDResponse>;
|
|
814
|
+
/**
|
|
815
|
+
* Deletes a user.
|
|
816
|
+
* @summary Delete user
|
|
817
|
+
*/
|
|
818
|
+
declare const deleteUser: (userId: string, options?: RequestInit) => Promise<DeleteUserResponse>;
|
|
819
|
+
/**
|
|
820
|
+
* Updates a user's attributes.
|
|
821
|
+
* @summary Update user
|
|
822
|
+
*/
|
|
823
|
+
declare const updateUser: (userId: string, updateUserRequest?: UpdateUserRequest, options?: RequestInit) => Promise<UpdateUserResponse>;
|
|
425
824
|
//#endregion
|
|
426
825
|
//#region src/plugins/admin/plugin.d.ts
|
|
427
826
|
declare class AdminPlugin implements Plugin {
|
|
428
827
|
readonly id = "admin";
|
|
429
828
|
constructor();
|
|
430
829
|
init(client: AuthulaClient): {
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
830
|
+
useListImpersonations<TData = Impersonation[] | null, TError = unknown>(options: {
|
|
831
|
+
query: Partial<import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof listImpersonations>>, TError, TData>> & Pick<import("@tanstack/react-query").DefinedInitialDataOptions<Awaited<ReturnType<typeof listImpersonations>>, TError, Awaited<ReturnType<typeof listImpersonations>>>, "initialData">;
|
|
832
|
+
request?: (RequestInit & {
|
|
833
|
+
method?: string;
|
|
834
|
+
baseUrl?: string;
|
|
835
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
836
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
837
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
838
|
+
}) | undefined;
|
|
839
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient): import("@tanstack/react-query").DefinedUseQueryResult<TData, TError> & {
|
|
840
|
+
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, TData, TError>;
|
|
841
|
+
};
|
|
842
|
+
useListImpersonations<TData = Impersonation[] | null, TError = unknown>(options?: {
|
|
843
|
+
query?: Partial<import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof listImpersonations>>, TError, TData>> & Pick<import("@tanstack/react-query").UndefinedInitialDataOptions<Awaited<ReturnType<typeof listImpersonations>>, TError, Awaited<ReturnType<typeof listImpersonations>>>, "initialData">;
|
|
844
|
+
request?: (RequestInit & {
|
|
845
|
+
method?: string;
|
|
846
|
+
baseUrl?: string;
|
|
847
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
848
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
849
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
850
|
+
}) | undefined;
|
|
851
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient): import("@tanstack/react-query").UseQueryResult<TData, TError> & {
|
|
852
|
+
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, TData, TError>;
|
|
853
|
+
};
|
|
854
|
+
useListImpersonations<TData = Impersonation[] | null, TError = unknown>(options?: {
|
|
855
|
+
query?: Partial<import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof listImpersonations>>, TError, TData>>;
|
|
856
|
+
request?: (RequestInit & {
|
|
857
|
+
method?: string;
|
|
858
|
+
baseUrl?: string;
|
|
859
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
860
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
861
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
862
|
+
}) | undefined;
|
|
863
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient): import("@tanstack/react-query").UseQueryResult<TData, TError> & {
|
|
864
|
+
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, TData, TError>;
|
|
865
|
+
};
|
|
866
|
+
useGetImpersonation<TData = GetImpersonationByIDResponse, TError = unknown>(impersonationId: string, options: {
|
|
867
|
+
query: Partial<import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof getImpersonation>>, TError, TData>> & Pick<import("@tanstack/react-query").DefinedInitialDataOptions<Awaited<ReturnType<typeof getImpersonation>>, TError, Awaited<ReturnType<typeof getImpersonation>>>, "initialData">;
|
|
868
|
+
request?: (RequestInit & {
|
|
869
|
+
method?: string;
|
|
870
|
+
baseUrl?: string;
|
|
871
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
872
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
873
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
874
|
+
}) | undefined;
|
|
875
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient): import("@tanstack/react-query").DefinedUseQueryResult<TData, TError> & {
|
|
876
|
+
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, TData, TError>;
|
|
877
|
+
};
|
|
878
|
+
useGetImpersonation<TData = GetImpersonationByIDResponse, TError = unknown>(impersonationId: string, options?: {
|
|
879
|
+
query?: Partial<import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof getImpersonation>>, TError, TData>> & Pick<import("@tanstack/react-query").UndefinedInitialDataOptions<Awaited<ReturnType<typeof getImpersonation>>, TError, Awaited<ReturnType<typeof getImpersonation>>>, "initialData">;
|
|
880
|
+
request?: (RequestInit & {
|
|
881
|
+
method?: string;
|
|
882
|
+
baseUrl?: string;
|
|
883
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
884
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
885
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
886
|
+
}) | undefined;
|
|
887
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient): import("@tanstack/react-query").UseQueryResult<TData, TError> & {
|
|
888
|
+
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, TData, TError>;
|
|
889
|
+
};
|
|
890
|
+
useGetImpersonation<TData = GetImpersonationByIDResponse, TError = unknown>(impersonationId: string, options?: {
|
|
891
|
+
query?: Partial<import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof getImpersonation>>, TError, TData>>;
|
|
892
|
+
request?: (RequestInit & {
|
|
893
|
+
method?: string;
|
|
894
|
+
baseUrl?: string;
|
|
895
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
896
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
897
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
898
|
+
}) | undefined;
|
|
899
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient): import("@tanstack/react-query").UseQueryResult<TData, TError> & {
|
|
900
|
+
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, TData, TError>;
|
|
901
|
+
};
|
|
902
|
+
getListImpersonationsUrl: () => string;
|
|
903
|
+
listImpersonations: (options?: RequestInit) => Promise<Impersonation[] | null>;
|
|
904
|
+
getListImpersonationsQueryKey: () => readonly ["/admin/impersonations"];
|
|
905
|
+
getListImpersonationsQueryOptions: <TData = Awaited<ReturnType<typeof listImpersonations>>, TError = unknown>(options?: {
|
|
906
|
+
query?: Partial<import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof listImpersonations>>, TError, TData>>;
|
|
907
|
+
request?: (RequestInit & {
|
|
908
|
+
method?: string;
|
|
909
|
+
baseUrl?: string;
|
|
910
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
911
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
912
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
913
|
+
}) | undefined;
|
|
914
|
+
}) => import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof listImpersonations>>, TError, TData> & {
|
|
915
|
+
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, TData, TError>;
|
|
916
|
+
};
|
|
917
|
+
getStartImpersonationUrl: () => string;
|
|
918
|
+
startImpersonation: (startImpersonationRequest?: StartImpersonationRequest, options?: RequestInit) => Promise<StartImpersonationResponse>;
|
|
919
|
+
getStartImpersonationMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
920
|
+
mutation?: import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof startImpersonation>>, TError, {
|
|
921
|
+
data?: StartImpersonationRequest;
|
|
922
|
+
}, TContext>;
|
|
923
|
+
request?: (RequestInit & {
|
|
924
|
+
method?: string;
|
|
925
|
+
baseUrl?: string;
|
|
926
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
927
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
928
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
929
|
+
}) | undefined;
|
|
930
|
+
}) => import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof startImpersonation>>, TError, {
|
|
931
|
+
data?: StartImpersonationRequest;
|
|
932
|
+
}, TContext>;
|
|
933
|
+
useStartImpersonation: <TError = unknown, TContext = unknown>(options?: {
|
|
934
|
+
mutation?: import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof startImpersonation>>, TError, {
|
|
935
|
+
data?: StartImpersonationRequest;
|
|
936
|
+
}, TContext>;
|
|
937
|
+
request?: (RequestInit & {
|
|
938
|
+
method?: string;
|
|
939
|
+
baseUrl?: string;
|
|
940
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
941
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
942
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
943
|
+
}) | undefined;
|
|
944
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient) => import("@tanstack/react-query").UseMutationResult<Awaited<ReturnType<typeof startImpersonation>>, TError, {
|
|
945
|
+
data?: StartImpersonationRequest;
|
|
946
|
+
}, TContext>;
|
|
947
|
+
getGetImpersonationUrl: (impersonationId: string) => string;
|
|
948
|
+
getImpersonation: (impersonationId: string, options?: RequestInit) => Promise<GetImpersonationByIDResponse>;
|
|
949
|
+
getGetImpersonationQueryKey: (impersonationId: string) => readonly [`/admin/impersonations/${string}`];
|
|
950
|
+
getGetImpersonationQueryOptions: <TData = Awaited<ReturnType<typeof getImpersonation>>, TError = unknown>(impersonationId: string, options?: {
|
|
951
|
+
query?: Partial<import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof getImpersonation>>, TError, TData>>;
|
|
952
|
+
request?: (RequestInit & {
|
|
953
|
+
method?: string;
|
|
954
|
+
baseUrl?: string;
|
|
955
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
956
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
957
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
958
|
+
}) | undefined;
|
|
959
|
+
}) => import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof getImpersonation>>, TError, TData> & {
|
|
960
|
+
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, TData, TError>;
|
|
961
|
+
};
|
|
962
|
+
getStopImpersonationUrl: (impersonationId: string) => string;
|
|
963
|
+
stopImpersonation: (impersonationId: string, options?: RequestInit) => Promise<StopImpersonationResponse>;
|
|
964
|
+
getStopImpersonationMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
965
|
+
mutation?: import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof stopImpersonation>>, TError, {
|
|
966
|
+
impersonationId: string;
|
|
967
|
+
}, TContext>;
|
|
968
|
+
request?: (RequestInit & {
|
|
969
|
+
method?: string;
|
|
970
|
+
baseUrl?: string;
|
|
971
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
972
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
973
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
974
|
+
}) | undefined;
|
|
975
|
+
}) => import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof stopImpersonation>>, TError, {
|
|
976
|
+
impersonationId: string;
|
|
977
|
+
}, TContext>;
|
|
978
|
+
useStopImpersonation: <TError = unknown, TContext = unknown>(options?: {
|
|
979
|
+
mutation?: import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof stopImpersonation>>, TError, {
|
|
980
|
+
impersonationId: string;
|
|
981
|
+
}, TContext>;
|
|
982
|
+
request?: (RequestInit & {
|
|
983
|
+
method?: string;
|
|
984
|
+
baseUrl?: string;
|
|
985
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
986
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
987
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
988
|
+
}) | undefined;
|
|
989
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient) => import("@tanstack/react-query").UseMutationResult<Awaited<ReturnType<typeof stopImpersonation>>, TError, {
|
|
990
|
+
impersonationId: string;
|
|
991
|
+
}, TContext>;
|
|
992
|
+
useListRevokedSessionStates<TData = AdminSessionState[] | null, TError = unknown>(options: {
|
|
993
|
+
query: Partial<import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof listRevokedSessionStates>>, TError, TData>> & Pick<import("@tanstack/react-query").DefinedInitialDataOptions<Awaited<ReturnType<typeof listRevokedSessionStates>>, TError, Awaited<ReturnType<typeof listRevokedSessionStates>>>, "initialData">;
|
|
994
|
+
request?: (RequestInit & {
|
|
995
|
+
method?: string;
|
|
996
|
+
baseUrl?: string;
|
|
997
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
998
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
999
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1000
|
+
}) | undefined;
|
|
1001
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient): import("@tanstack/react-query").DefinedUseQueryResult<TData, TError> & {
|
|
1002
|
+
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, TData, TError>;
|
|
1003
|
+
};
|
|
1004
|
+
useListRevokedSessionStates<TData = AdminSessionState[] | null, TError = unknown>(options?: {
|
|
1005
|
+
query?: Partial<import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof listRevokedSessionStates>>, TError, TData>> & Pick<import("@tanstack/react-query").UndefinedInitialDataOptions<Awaited<ReturnType<typeof listRevokedSessionStates>>, TError, Awaited<ReturnType<typeof listRevokedSessionStates>>>, "initialData">;
|
|
1006
|
+
request?: (RequestInit & {
|
|
1007
|
+
method?: string;
|
|
1008
|
+
baseUrl?: string;
|
|
1009
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1010
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1011
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1012
|
+
}) | undefined;
|
|
1013
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient): import("@tanstack/react-query").UseQueryResult<TData, TError> & {
|
|
1014
|
+
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, TData, TError>;
|
|
1015
|
+
};
|
|
1016
|
+
useListRevokedSessionStates<TData = AdminSessionState[] | null, TError = unknown>(options?: {
|
|
1017
|
+
query?: Partial<import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof listRevokedSessionStates>>, TError, TData>>;
|
|
1018
|
+
request?: (RequestInit & {
|
|
1019
|
+
method?: string;
|
|
1020
|
+
baseUrl?: string;
|
|
1021
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1022
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1023
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1024
|
+
}) | undefined;
|
|
1025
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient): import("@tanstack/react-query").UseQueryResult<TData, TError> & {
|
|
1026
|
+
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, TData, TError>;
|
|
1027
|
+
};
|
|
1028
|
+
useGetSessionState<TData = GetSessionStateResponse, TError = unknown>(sessionId: string, options: {
|
|
1029
|
+
query: Partial<import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof getSessionState>>, TError, TData>> & Pick<import("@tanstack/react-query").DefinedInitialDataOptions<Awaited<ReturnType<typeof getSessionState>>, TError, Awaited<ReturnType<typeof getSessionState>>>, "initialData">;
|
|
1030
|
+
request?: (RequestInit & {
|
|
1031
|
+
method?: string;
|
|
1032
|
+
baseUrl?: string;
|
|
1033
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1034
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1035
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1036
|
+
}) | undefined;
|
|
1037
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient): import("@tanstack/react-query").DefinedUseQueryResult<TData, TError> & {
|
|
1038
|
+
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, TData, TError>;
|
|
1039
|
+
};
|
|
1040
|
+
useGetSessionState<TData = GetSessionStateResponse, TError = unknown>(sessionId: string, options?: {
|
|
1041
|
+
query?: Partial<import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof getSessionState>>, TError, TData>> & Pick<import("@tanstack/react-query").UndefinedInitialDataOptions<Awaited<ReturnType<typeof getSessionState>>, TError, Awaited<ReturnType<typeof getSessionState>>>, "initialData">;
|
|
1042
|
+
request?: (RequestInit & {
|
|
1043
|
+
method?: string;
|
|
1044
|
+
baseUrl?: string;
|
|
1045
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1046
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1047
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1048
|
+
}) | undefined;
|
|
1049
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient): import("@tanstack/react-query").UseQueryResult<TData, TError> & {
|
|
1050
|
+
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, TData, TError>;
|
|
1051
|
+
};
|
|
1052
|
+
useGetSessionState<TData = GetSessionStateResponse, TError = unknown>(sessionId: string, options?: {
|
|
1053
|
+
query?: Partial<import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof getSessionState>>, TError, TData>>;
|
|
1054
|
+
request?: (RequestInit & {
|
|
1055
|
+
method?: string;
|
|
1056
|
+
baseUrl?: string;
|
|
1057
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1058
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1059
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1060
|
+
}) | undefined;
|
|
1061
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient): import("@tanstack/react-query").UseQueryResult<TData, TError> & {
|
|
1062
|
+
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, TData, TError>;
|
|
1063
|
+
};
|
|
1064
|
+
getListRevokedSessionStatesUrl: () => string;
|
|
1065
|
+
listRevokedSessionStates: (options?: RequestInit) => Promise<AdminSessionState[] | null>;
|
|
1066
|
+
getListRevokedSessionStatesQueryKey: () => readonly ["/admin/sessions/states/revoked"];
|
|
1067
|
+
getListRevokedSessionStatesQueryOptions: <TData = Awaited<ReturnType<typeof listRevokedSessionStates>>, TError = unknown>(options?: {
|
|
1068
|
+
query?: Partial<import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof listRevokedSessionStates>>, TError, TData>>;
|
|
1069
|
+
request?: (RequestInit & {
|
|
1070
|
+
method?: string;
|
|
1071
|
+
baseUrl?: string;
|
|
1072
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1073
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1074
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1075
|
+
}) | undefined;
|
|
1076
|
+
}) => import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof listRevokedSessionStates>>, TError, TData> & {
|
|
1077
|
+
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, TData, TError>;
|
|
1078
|
+
};
|
|
1079
|
+
getRevokeSessionUrl: (sessionId: string) => string;
|
|
1080
|
+
revokeSession: (sessionId: string, revokeSessionRequest?: RevokeSessionRequest, options?: RequestInit) => Promise<RevokeSessionResponse>;
|
|
1081
|
+
getRevokeSessionMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
1082
|
+
mutation?: import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof revokeSession>>, TError, {
|
|
1083
|
+
sessionId: string;
|
|
1084
|
+
data?: RevokeSessionRequest;
|
|
1085
|
+
}, TContext>;
|
|
1086
|
+
request?: (RequestInit & {
|
|
1087
|
+
method?: string;
|
|
1088
|
+
baseUrl?: string;
|
|
1089
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1090
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1091
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1092
|
+
}) | undefined;
|
|
1093
|
+
}) => import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof revokeSession>>, TError, {
|
|
1094
|
+
sessionId: string;
|
|
1095
|
+
data?: RevokeSessionRequest;
|
|
1096
|
+
}, TContext>;
|
|
1097
|
+
useRevokeSession: <TError = unknown, TContext = unknown>(options?: {
|
|
1098
|
+
mutation?: import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof revokeSession>>, TError, {
|
|
1099
|
+
sessionId: string;
|
|
1100
|
+
data?: RevokeSessionRequest;
|
|
1101
|
+
}, TContext>;
|
|
1102
|
+
request?: (RequestInit & {
|
|
1103
|
+
method?: string;
|
|
1104
|
+
baseUrl?: string;
|
|
1105
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1106
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1107
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1108
|
+
}) | undefined;
|
|
1109
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient) => import("@tanstack/react-query").UseMutationResult<Awaited<ReturnType<typeof revokeSession>>, TError, {
|
|
1110
|
+
sessionId: string;
|
|
1111
|
+
data?: RevokeSessionRequest;
|
|
1112
|
+
}, TContext>;
|
|
1113
|
+
getGetSessionStateUrl: (sessionId: string) => string;
|
|
1114
|
+
getSessionState: (sessionId: string, options?: RequestInit) => Promise<GetSessionStateResponse>;
|
|
1115
|
+
getGetSessionStateQueryKey: (sessionId: string) => readonly [`/admin/sessions/${string}/state`];
|
|
1116
|
+
getGetSessionStateQueryOptions: <TData = Awaited<ReturnType<typeof getSessionState>>, TError = unknown>(sessionId: string, options?: {
|
|
1117
|
+
query?: Partial<import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof getSessionState>>, TError, TData>>;
|
|
1118
|
+
request?: (RequestInit & {
|
|
1119
|
+
method?: string;
|
|
1120
|
+
baseUrl?: string;
|
|
1121
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1122
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1123
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1124
|
+
}) | undefined;
|
|
1125
|
+
}) => import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof getSessionState>>, TError, TData> & {
|
|
1126
|
+
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, TData, TError>;
|
|
1127
|
+
};
|
|
1128
|
+
getCreateSessionStateUrl: (sessionId: string) => string;
|
|
1129
|
+
createSessionState: (sessionId: string, createSessionStateRequest?: CreateSessionStateRequest, options?: RequestInit) => Promise<UpsertSessionStateResponse>;
|
|
1130
|
+
getCreateSessionStateMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
1131
|
+
mutation?: import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof createSessionState>>, TError, {
|
|
1132
|
+
sessionId: string;
|
|
1133
|
+
data?: CreateSessionStateRequest;
|
|
1134
|
+
}, TContext>;
|
|
1135
|
+
request?: (RequestInit & {
|
|
1136
|
+
method?: string;
|
|
1137
|
+
baseUrl?: string;
|
|
1138
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1139
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1140
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1141
|
+
}) | undefined;
|
|
1142
|
+
}) => import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof createSessionState>>, TError, {
|
|
1143
|
+
sessionId: string;
|
|
1144
|
+
data?: CreateSessionStateRequest;
|
|
1145
|
+
}, TContext>;
|
|
1146
|
+
useCreateSessionState: <TError = unknown, TContext = unknown>(options?: {
|
|
1147
|
+
mutation?: import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof createSessionState>>, TError, {
|
|
1148
|
+
sessionId: string;
|
|
1149
|
+
data?: CreateSessionStateRequest;
|
|
1150
|
+
}, TContext>;
|
|
1151
|
+
request?: (RequestInit & {
|
|
1152
|
+
method?: string;
|
|
1153
|
+
baseUrl?: string;
|
|
1154
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1155
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1156
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1157
|
+
}) | undefined;
|
|
1158
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient) => import("@tanstack/react-query").UseMutationResult<Awaited<ReturnType<typeof createSessionState>>, TError, {
|
|
1159
|
+
sessionId: string;
|
|
1160
|
+
data?: CreateSessionStateRequest;
|
|
1161
|
+
}, TContext>;
|
|
1162
|
+
getDeleteSessionStateUrl: (sessionId: string) => string;
|
|
1163
|
+
deleteSessionState: (sessionId: string, options?: RequestInit) => Promise<DeleteSessionStateResponse>;
|
|
1164
|
+
getDeleteSessionStateMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
1165
|
+
mutation?: import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof deleteSessionState>>, TError, {
|
|
1166
|
+
sessionId: string;
|
|
1167
|
+
}, TContext>;
|
|
1168
|
+
request?: (RequestInit & {
|
|
1169
|
+
method?: string;
|
|
1170
|
+
baseUrl?: string;
|
|
1171
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1172
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1173
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1174
|
+
}) | undefined;
|
|
1175
|
+
}) => import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof deleteSessionState>>, TError, {
|
|
1176
|
+
sessionId: string;
|
|
1177
|
+
}, TContext>;
|
|
1178
|
+
useDeleteSessionState: <TError = unknown, TContext = unknown>(options?: {
|
|
1179
|
+
mutation?: import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof deleteSessionState>>, TError, {
|
|
1180
|
+
sessionId: string;
|
|
1181
|
+
}, TContext>;
|
|
1182
|
+
request?: (RequestInit & {
|
|
1183
|
+
method?: string;
|
|
1184
|
+
baseUrl?: string;
|
|
1185
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1186
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1187
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1188
|
+
}) | undefined;
|
|
1189
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient) => import("@tanstack/react-query").UseMutationResult<Awaited<ReturnType<typeof deleteSessionState>>, TError, {
|
|
1190
|
+
sessionId: string;
|
|
1191
|
+
}, TContext>;
|
|
1192
|
+
getUpdateSessionStateUrl: (sessionId: string) => string;
|
|
1193
|
+
updateSessionState: (sessionId: string, upsertSessionStateRequest?: UpsertSessionStateRequest, options?: RequestInit) => Promise<UpsertSessionStateResponse>;
|
|
1194
|
+
getUpdateSessionStateMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
1195
|
+
mutation?: import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof updateSessionState>>, TError, {
|
|
1196
|
+
sessionId: string;
|
|
1197
|
+
data?: UpsertSessionStateRequest;
|
|
1198
|
+
}, TContext>;
|
|
1199
|
+
request?: (RequestInit & {
|
|
1200
|
+
method?: string;
|
|
1201
|
+
baseUrl?: string;
|
|
1202
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1203
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1204
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1205
|
+
}) | undefined;
|
|
1206
|
+
}) => import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof updateSessionState>>, TError, {
|
|
1207
|
+
sessionId: string;
|
|
1208
|
+
data?: UpsertSessionStateRequest;
|
|
1209
|
+
}, TContext>;
|
|
1210
|
+
useUpdateSessionState: <TError = unknown, TContext = unknown>(options?: {
|
|
1211
|
+
mutation?: import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof updateSessionState>>, TError, {
|
|
1212
|
+
sessionId: string;
|
|
1213
|
+
data?: UpsertSessionStateRequest;
|
|
1214
|
+
}, TContext>;
|
|
1215
|
+
request?: (RequestInit & {
|
|
1216
|
+
method?: string;
|
|
1217
|
+
baseUrl?: string;
|
|
1218
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1219
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1220
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1221
|
+
}) | undefined;
|
|
1222
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient) => import("@tanstack/react-query").UseMutationResult<Awaited<ReturnType<typeof updateSessionState>>, TError, {
|
|
1223
|
+
sessionId: string;
|
|
1224
|
+
data?: UpsertSessionStateRequest;
|
|
1225
|
+
}, TContext>;
|
|
1226
|
+
useListBannedUserStates<TData = AdminUserState[] | null, TError = unknown>(options: {
|
|
1227
|
+
query: Partial<import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof listBannedUserStates>>, TError, TData>> & Pick<import("@tanstack/react-query").DefinedInitialDataOptions<Awaited<ReturnType<typeof listBannedUserStates>>, TError, Awaited<ReturnType<typeof listBannedUserStates>>>, "initialData">;
|
|
1228
|
+
request?: (RequestInit & {
|
|
1229
|
+
method?: string;
|
|
1230
|
+
baseUrl?: string;
|
|
1231
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1232
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1233
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1234
|
+
}) | undefined;
|
|
1235
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient): import("@tanstack/react-query").DefinedUseQueryResult<TData, TError> & {
|
|
1236
|
+
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, TData, TError>;
|
|
1237
|
+
};
|
|
1238
|
+
useListBannedUserStates<TData = AdminUserState[] | null, TError = unknown>(options?: {
|
|
1239
|
+
query?: Partial<import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof listBannedUserStates>>, TError, TData>> & Pick<import("@tanstack/react-query").UndefinedInitialDataOptions<Awaited<ReturnType<typeof listBannedUserStates>>, TError, Awaited<ReturnType<typeof listBannedUserStates>>>, "initialData">;
|
|
1240
|
+
request?: (RequestInit & {
|
|
1241
|
+
method?: string;
|
|
1242
|
+
baseUrl?: string;
|
|
1243
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1244
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1245
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1246
|
+
}) | undefined;
|
|
1247
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient): import("@tanstack/react-query").UseQueryResult<TData, TError> & {
|
|
1248
|
+
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, TData, TError>;
|
|
1249
|
+
};
|
|
1250
|
+
useListBannedUserStates<TData = AdminUserState[] | null, TError = unknown>(options?: {
|
|
1251
|
+
query?: Partial<import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof listBannedUserStates>>, TError, TData>>;
|
|
1252
|
+
request?: (RequestInit & {
|
|
1253
|
+
method?: string;
|
|
1254
|
+
baseUrl?: string;
|
|
1255
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1256
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1257
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1258
|
+
}) | undefined;
|
|
1259
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient): import("@tanstack/react-query").UseQueryResult<TData, TError> & {
|
|
1260
|
+
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, TData, TError>;
|
|
1261
|
+
};
|
|
1262
|
+
useListUserSessions<TData = AdminUserSession[] | null, TError = unknown>(userId: string, options: {
|
|
1263
|
+
query: Partial<import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof listUserSessions>>, TError, TData>> & Pick<import("@tanstack/react-query").DefinedInitialDataOptions<Awaited<ReturnType<typeof listUserSessions>>, TError, Awaited<ReturnType<typeof listUserSessions>>>, "initialData">;
|
|
1264
|
+
request?: (RequestInit & {
|
|
1265
|
+
method?: string;
|
|
1266
|
+
baseUrl?: string;
|
|
1267
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1268
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1269
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1270
|
+
}) | undefined;
|
|
1271
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient): import("@tanstack/react-query").DefinedUseQueryResult<TData, TError> & {
|
|
1272
|
+
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, TData, TError>;
|
|
1273
|
+
};
|
|
1274
|
+
useListUserSessions<TData = AdminUserSession[] | null, TError = unknown>(userId: string, options?: {
|
|
1275
|
+
query?: Partial<import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof listUserSessions>>, TError, TData>> & Pick<import("@tanstack/react-query").UndefinedInitialDataOptions<Awaited<ReturnType<typeof listUserSessions>>, TError, Awaited<ReturnType<typeof listUserSessions>>>, "initialData">;
|
|
1276
|
+
request?: (RequestInit & {
|
|
1277
|
+
method?: string;
|
|
1278
|
+
baseUrl?: string;
|
|
1279
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1280
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1281
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1282
|
+
}) | undefined;
|
|
1283
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient): import("@tanstack/react-query").UseQueryResult<TData, TError> & {
|
|
1284
|
+
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, TData, TError>;
|
|
1285
|
+
};
|
|
1286
|
+
useListUserSessions<TData = AdminUserSession[] | null, TError = unknown>(userId: string, options?: {
|
|
1287
|
+
query?: Partial<import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof listUserSessions>>, TError, TData>>;
|
|
1288
|
+
request?: (RequestInit & {
|
|
1289
|
+
method?: string;
|
|
1290
|
+
baseUrl?: string;
|
|
1291
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1292
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1293
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1294
|
+
}) | undefined;
|
|
1295
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient): import("@tanstack/react-query").UseQueryResult<TData, TError> & {
|
|
1296
|
+
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, TData, TError>;
|
|
1297
|
+
};
|
|
1298
|
+
useGetUserState<TData = GetUserStateResponse, TError = unknown>(userId: string, options: {
|
|
1299
|
+
query: Partial<import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof getUserState>>, TError, TData>> & Pick<import("@tanstack/react-query").DefinedInitialDataOptions<Awaited<ReturnType<typeof getUserState>>, TError, Awaited<ReturnType<typeof getUserState>>>, "initialData">;
|
|
1300
|
+
request?: (RequestInit & {
|
|
1301
|
+
method?: string;
|
|
1302
|
+
baseUrl?: string;
|
|
1303
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1304
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1305
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1306
|
+
}) | undefined;
|
|
1307
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient): import("@tanstack/react-query").DefinedUseQueryResult<TData, TError> & {
|
|
1308
|
+
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, TData, TError>;
|
|
1309
|
+
};
|
|
1310
|
+
useGetUserState<TData = GetUserStateResponse, TError = unknown>(userId: string, options?: {
|
|
1311
|
+
query?: Partial<import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof getUserState>>, TError, TData>> & Pick<import("@tanstack/react-query").UndefinedInitialDataOptions<Awaited<ReturnType<typeof getUserState>>, TError, Awaited<ReturnType<typeof getUserState>>>, "initialData">;
|
|
1312
|
+
request?: (RequestInit & {
|
|
1313
|
+
method?: string;
|
|
1314
|
+
baseUrl?: string;
|
|
1315
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1316
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1317
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1318
|
+
}) | undefined;
|
|
1319
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient): import("@tanstack/react-query").UseQueryResult<TData, TError> & {
|
|
1320
|
+
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, TData, TError>;
|
|
1321
|
+
};
|
|
1322
|
+
useGetUserState<TData = GetUserStateResponse, TError = unknown>(userId: string, options?: {
|
|
1323
|
+
query?: Partial<import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof getUserState>>, TError, TData>>;
|
|
1324
|
+
request?: (RequestInit & {
|
|
1325
|
+
method?: string;
|
|
1326
|
+
baseUrl?: string;
|
|
1327
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1328
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1329
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1330
|
+
}) | undefined;
|
|
1331
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient): import("@tanstack/react-query").UseQueryResult<TData, TError> & {
|
|
1332
|
+
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, TData, TError>;
|
|
1333
|
+
};
|
|
1334
|
+
getListBannedUserStatesUrl: () => string;
|
|
1335
|
+
listBannedUserStates: (options?: RequestInit) => Promise<AdminUserState[] | null>;
|
|
1336
|
+
getListBannedUserStatesQueryKey: () => readonly ["/admin/users/states/banned"];
|
|
1337
|
+
getListBannedUserStatesQueryOptions: <TData = Awaited<ReturnType<typeof listBannedUserStates>>, TError = unknown>(options?: {
|
|
1338
|
+
query?: Partial<import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof listBannedUserStates>>, TError, TData>>;
|
|
1339
|
+
request?: (RequestInit & {
|
|
1340
|
+
method?: string;
|
|
1341
|
+
baseUrl?: string;
|
|
1342
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1343
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1344
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1345
|
+
}) | undefined;
|
|
1346
|
+
}) => import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof listBannedUserStates>>, TError, TData> & {
|
|
1347
|
+
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, TData, TError>;
|
|
1348
|
+
};
|
|
1349
|
+
getBanUserUrl: (userId: string) => string;
|
|
1350
|
+
banUser: (userId: string, banUserRequest?: BanUserRequest, options?: RequestInit) => Promise<BanUserResponse>;
|
|
1351
|
+
getBanUserMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
1352
|
+
mutation?: import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof banUser>>, TError, {
|
|
1353
|
+
userId: string;
|
|
1354
|
+
data?: BanUserRequest;
|
|
1355
|
+
}, TContext>;
|
|
1356
|
+
request?: (RequestInit & {
|
|
1357
|
+
method?: string;
|
|
1358
|
+
baseUrl?: string;
|
|
1359
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1360
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1361
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1362
|
+
}) | undefined;
|
|
1363
|
+
}) => import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof banUser>>, TError, {
|
|
1364
|
+
userId: string;
|
|
1365
|
+
data?: BanUserRequest;
|
|
1366
|
+
}, TContext>;
|
|
1367
|
+
useBanUser: <TError = unknown, TContext = unknown>(options?: {
|
|
1368
|
+
mutation?: import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof banUser>>, TError, {
|
|
1369
|
+
userId: string;
|
|
1370
|
+
data?: BanUserRequest;
|
|
1371
|
+
}, TContext>;
|
|
1372
|
+
request?: (RequestInit & {
|
|
1373
|
+
method?: string;
|
|
1374
|
+
baseUrl?: string;
|
|
1375
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1376
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1377
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1378
|
+
}) | undefined;
|
|
1379
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient) => import("@tanstack/react-query").UseMutationResult<Awaited<ReturnType<typeof banUser>>, TError, {
|
|
1380
|
+
userId: string;
|
|
1381
|
+
data?: BanUserRequest;
|
|
1382
|
+
}, TContext>;
|
|
1383
|
+
getListUserSessionsUrl: (userId: string) => string;
|
|
1384
|
+
listUserSessions: (userId: string, options?: RequestInit) => Promise<AdminUserSession[] | null>;
|
|
1385
|
+
getListUserSessionsQueryKey: (userId: string) => readonly [`/admin/users/${string}/sessions`];
|
|
1386
|
+
getListUserSessionsQueryOptions: <TData = Awaited<ReturnType<typeof listUserSessions>>, TError = unknown>(userId: string, options?: {
|
|
1387
|
+
query?: Partial<import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof listUserSessions>>, TError, TData>>;
|
|
1388
|
+
request?: (RequestInit & {
|
|
1389
|
+
method?: string;
|
|
1390
|
+
baseUrl?: string;
|
|
1391
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1392
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1393
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1394
|
+
}) | undefined;
|
|
1395
|
+
}) => import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof listUserSessions>>, TError, TData> & {
|
|
1396
|
+
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, TData, TError>;
|
|
1397
|
+
};
|
|
1398
|
+
getGetUserStateUrl: (userId: string) => string;
|
|
1399
|
+
getUserState: (userId: string, options?: RequestInit) => Promise<GetUserStateResponse>;
|
|
1400
|
+
getGetUserStateQueryKey: (userId: string) => readonly [`/admin/users/${string}/state`];
|
|
1401
|
+
getGetUserStateQueryOptions: <TData = Awaited<ReturnType<typeof getUserState>>, TError = unknown>(userId: string, options?: {
|
|
1402
|
+
query?: Partial<import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof getUserState>>, TError, TData>>;
|
|
1403
|
+
request?: (RequestInit & {
|
|
1404
|
+
method?: string;
|
|
1405
|
+
baseUrl?: string;
|
|
1406
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1407
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1408
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1409
|
+
}) | undefined;
|
|
1410
|
+
}) => import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof getUserState>>, TError, TData> & {
|
|
1411
|
+
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, TData, TError>;
|
|
1412
|
+
};
|
|
1413
|
+
getCreateUserStateUrl: (userId: string) => string;
|
|
1414
|
+
createUserState: (userId: string, createUserStateRequest?: CreateUserStateRequest, options?: RequestInit) => Promise<UpsertUserStateResponse>;
|
|
1415
|
+
getCreateUserStateMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
1416
|
+
mutation?: import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof createUserState>>, TError, {
|
|
1417
|
+
userId: string;
|
|
1418
|
+
data?: CreateUserStateRequest;
|
|
1419
|
+
}, TContext>;
|
|
1420
|
+
request?: (RequestInit & {
|
|
1421
|
+
method?: string;
|
|
1422
|
+
baseUrl?: string;
|
|
1423
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1424
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1425
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1426
|
+
}) | undefined;
|
|
1427
|
+
}) => import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof createUserState>>, TError, {
|
|
1428
|
+
userId: string;
|
|
1429
|
+
data?: CreateUserStateRequest;
|
|
1430
|
+
}, TContext>;
|
|
1431
|
+
useCreateUserState: <TError = unknown, TContext = unknown>(options?: {
|
|
1432
|
+
mutation?: import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof createUserState>>, TError, {
|
|
1433
|
+
userId: string;
|
|
1434
|
+
data?: CreateUserStateRequest;
|
|
1435
|
+
}, TContext>;
|
|
1436
|
+
request?: (RequestInit & {
|
|
1437
|
+
method?: string;
|
|
1438
|
+
baseUrl?: string;
|
|
1439
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1440
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1441
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1442
|
+
}) | undefined;
|
|
1443
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient) => import("@tanstack/react-query").UseMutationResult<Awaited<ReturnType<typeof createUserState>>, TError, {
|
|
1444
|
+
userId: string;
|
|
1445
|
+
data?: CreateUserStateRequest;
|
|
1446
|
+
}, TContext>;
|
|
1447
|
+
getDeleteUserStateUrl: (userId: string) => string;
|
|
1448
|
+
deleteUserState: (userId: string, options?: RequestInit) => Promise<DeleteUserStateResponse>;
|
|
1449
|
+
getDeleteUserStateMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
1450
|
+
mutation?: import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof deleteUserState>>, TError, {
|
|
1451
|
+
userId: string;
|
|
1452
|
+
}, TContext>;
|
|
1453
|
+
request?: (RequestInit & {
|
|
1454
|
+
method?: string;
|
|
1455
|
+
baseUrl?: string;
|
|
1456
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1457
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1458
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1459
|
+
}) | undefined;
|
|
1460
|
+
}) => import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof deleteUserState>>, TError, {
|
|
1461
|
+
userId: string;
|
|
1462
|
+
}, TContext>;
|
|
1463
|
+
useDeleteUserState: <TError = unknown, TContext = unknown>(options?: {
|
|
1464
|
+
mutation?: import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof deleteUserState>>, TError, {
|
|
1465
|
+
userId: string;
|
|
1466
|
+
}, TContext>;
|
|
1467
|
+
request?: (RequestInit & {
|
|
1468
|
+
method?: string;
|
|
1469
|
+
baseUrl?: string;
|
|
1470
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1471
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1472
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1473
|
+
}) | undefined;
|
|
1474
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient) => import("@tanstack/react-query").UseMutationResult<Awaited<ReturnType<typeof deleteUserState>>, TError, {
|
|
1475
|
+
userId: string;
|
|
1476
|
+
}, TContext>;
|
|
1477
|
+
getUpdateUserStateUrl: (userId: string) => string;
|
|
1478
|
+
updateUserState: (userId: string, upsertUserStateRequest?: UpsertUserStateRequest, options?: RequestInit) => Promise<UpsertUserStateResponse>;
|
|
1479
|
+
getUpdateUserStateMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
1480
|
+
mutation?: import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof updateUserState>>, TError, {
|
|
1481
|
+
userId: string;
|
|
1482
|
+
data?: UpsertUserStateRequest;
|
|
1483
|
+
}, TContext>;
|
|
1484
|
+
request?: (RequestInit & {
|
|
1485
|
+
method?: string;
|
|
1486
|
+
baseUrl?: string;
|
|
1487
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1488
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1489
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1490
|
+
}) | undefined;
|
|
1491
|
+
}) => import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof updateUserState>>, TError, {
|
|
1492
|
+
userId: string;
|
|
1493
|
+
data?: UpsertUserStateRequest;
|
|
1494
|
+
}, TContext>;
|
|
1495
|
+
useUpdateUserState: <TError = unknown, TContext = unknown>(options?: {
|
|
1496
|
+
mutation?: import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof updateUserState>>, TError, {
|
|
1497
|
+
userId: string;
|
|
1498
|
+
data?: UpsertUserStateRequest;
|
|
1499
|
+
}, TContext>;
|
|
1500
|
+
request?: (RequestInit & {
|
|
1501
|
+
method?: string;
|
|
1502
|
+
baseUrl?: string;
|
|
1503
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1504
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1505
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1506
|
+
}) | undefined;
|
|
1507
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient) => import("@tanstack/react-query").UseMutationResult<Awaited<ReturnType<typeof updateUserState>>, TError, {
|
|
1508
|
+
userId: string;
|
|
1509
|
+
data?: UpsertUserStateRequest;
|
|
1510
|
+
}, TContext>;
|
|
1511
|
+
getUnbanUserUrl: (userId: string) => string;
|
|
1512
|
+
unbanUser: (userId: string, options?: RequestInit) => Promise<UnbanUserResponse>;
|
|
1513
|
+
getUnbanUserMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
1514
|
+
mutation?: import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof unbanUser>>, TError, {
|
|
1515
|
+
userId: string;
|
|
1516
|
+
}, TContext>;
|
|
1517
|
+
request?: (RequestInit & {
|
|
1518
|
+
method?: string;
|
|
1519
|
+
baseUrl?: string;
|
|
1520
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1521
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1522
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1523
|
+
}) | undefined;
|
|
1524
|
+
}) => import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof unbanUser>>, TError, {
|
|
1525
|
+
userId: string;
|
|
1526
|
+
}, TContext>;
|
|
1527
|
+
useUnbanUser: <TError = unknown, TContext = unknown>(options?: {
|
|
1528
|
+
mutation?: import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof unbanUser>>, TError, {
|
|
1529
|
+
userId: string;
|
|
1530
|
+
}, TContext>;
|
|
1531
|
+
request?: (RequestInit & {
|
|
1532
|
+
method?: string;
|
|
1533
|
+
baseUrl?: string;
|
|
1534
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1535
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1536
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1537
|
+
}) | undefined;
|
|
1538
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient) => import("@tanstack/react-query").UseMutationResult<Awaited<ReturnType<typeof unbanUser>>, TError, {
|
|
1539
|
+
userId: string;
|
|
1540
|
+
}, TContext>;
|
|
1541
|
+
useGetAccount<TData = GetAccountByIDResponse, TError = unknown>(id: string, options: {
|
|
1542
|
+
query: Partial<import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof getAccount>>, TError, TData>> & Pick<import("@tanstack/react-query").DefinedInitialDataOptions<Awaited<ReturnType<typeof getAccount>>, TError, Awaited<ReturnType<typeof getAccount>>>, "initialData">;
|
|
1543
|
+
request?: (RequestInit & {
|
|
1544
|
+
method?: string;
|
|
1545
|
+
baseUrl?: string;
|
|
1546
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1547
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1548
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1549
|
+
}) | undefined;
|
|
1550
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient): import("@tanstack/react-query").DefinedUseQueryResult<TData, TError> & {
|
|
1551
|
+
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, TData, TError>;
|
|
1552
|
+
};
|
|
1553
|
+
useGetAccount<TData = GetAccountByIDResponse, TError = unknown>(id: string, options?: {
|
|
1554
|
+
query?: Partial<import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof getAccount>>, TError, TData>> & Pick<import("@tanstack/react-query").UndefinedInitialDataOptions<Awaited<ReturnType<typeof getAccount>>, TError, Awaited<ReturnType<typeof getAccount>>>, "initialData">;
|
|
1555
|
+
request?: (RequestInit & {
|
|
1556
|
+
method?: string;
|
|
1557
|
+
baseUrl?: string;
|
|
1558
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1559
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1560
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1561
|
+
}) | undefined;
|
|
1562
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient): import("@tanstack/react-query").UseQueryResult<TData, TError> & {
|
|
1563
|
+
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, TData, TError>;
|
|
1564
|
+
};
|
|
1565
|
+
useGetAccount<TData = GetAccountByIDResponse, TError = unknown>(id: string, options?: {
|
|
1566
|
+
query?: Partial<import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof getAccount>>, TError, TData>>;
|
|
1567
|
+
request?: (RequestInit & {
|
|
1568
|
+
method?: string;
|
|
1569
|
+
baseUrl?: string;
|
|
1570
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1571
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1572
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1573
|
+
}) | undefined;
|
|
1574
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient): import("@tanstack/react-query").UseQueryResult<TData, TError> & {
|
|
1575
|
+
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, TData, TError>;
|
|
1576
|
+
};
|
|
1577
|
+
useListUserAccounts<TData = UserAccountsResponse, TError = unknown>(userId: string, options: {
|
|
1578
|
+
query: Partial<import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof listUserAccounts>>, TError, TData>> & Pick<import("@tanstack/react-query").DefinedInitialDataOptions<Awaited<ReturnType<typeof listUserAccounts>>, TError, Awaited<ReturnType<typeof listUserAccounts>>>, "initialData">;
|
|
1579
|
+
request?: (RequestInit & {
|
|
1580
|
+
method?: string;
|
|
1581
|
+
baseUrl?: string;
|
|
1582
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1583
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1584
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1585
|
+
}) | undefined;
|
|
1586
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient): import("@tanstack/react-query").DefinedUseQueryResult<TData, TError> & {
|
|
1587
|
+
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, TData, TError>;
|
|
1588
|
+
};
|
|
1589
|
+
useListUserAccounts<TData = UserAccountsResponse, TError = unknown>(userId: string, options?: {
|
|
1590
|
+
query?: Partial<import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof listUserAccounts>>, TError, TData>> & Pick<import("@tanstack/react-query").UndefinedInitialDataOptions<Awaited<ReturnType<typeof listUserAccounts>>, TError, Awaited<ReturnType<typeof listUserAccounts>>>, "initialData">;
|
|
1591
|
+
request?: (RequestInit & {
|
|
1592
|
+
method?: string;
|
|
1593
|
+
baseUrl?: string;
|
|
1594
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1595
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1596
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1597
|
+
}) | undefined;
|
|
1598
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient): import("@tanstack/react-query").UseQueryResult<TData, TError> & {
|
|
1599
|
+
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, TData, TError>;
|
|
1600
|
+
};
|
|
1601
|
+
useListUserAccounts<TData = UserAccountsResponse, TError = unknown>(userId: string, options?: {
|
|
1602
|
+
query?: Partial<import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof listUserAccounts>>, TError, TData>>;
|
|
1603
|
+
request?: (RequestInit & {
|
|
1604
|
+
method?: string;
|
|
1605
|
+
baseUrl?: string;
|
|
1606
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1607
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1608
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1609
|
+
}) | undefined;
|
|
1610
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient): import("@tanstack/react-query").UseQueryResult<TData, TError> & {
|
|
1611
|
+
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, TData, TError>;
|
|
1612
|
+
};
|
|
1613
|
+
getGetAccountUrl: (id: string) => string;
|
|
1614
|
+
getAccount: (id: string, options?: RequestInit) => Promise<GetAccountByIDResponse>;
|
|
1615
|
+
getGetAccountQueryKey: (id: string) => readonly [`/admin/accounts/${string}`];
|
|
1616
|
+
getGetAccountQueryOptions: <TData = Awaited<ReturnType<typeof getAccount>>, TError = unknown>(id: string, options?: {
|
|
1617
|
+
query?: Partial<import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof getAccount>>, TError, TData>>;
|
|
1618
|
+
request?: (RequestInit & {
|
|
1619
|
+
method?: string;
|
|
1620
|
+
baseUrl?: string;
|
|
1621
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1622
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1623
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1624
|
+
}) | undefined;
|
|
1625
|
+
}) => import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof getAccount>>, TError, TData> & {
|
|
1626
|
+
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, TData, TError>;
|
|
1627
|
+
};
|
|
1628
|
+
getDeleteAccountUrl: (id: string) => string;
|
|
1629
|
+
deleteAccount: (id: string, options?: RequestInit) => Promise<DeleteAccountResponse>;
|
|
1630
|
+
getDeleteAccountMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
1631
|
+
mutation?: import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof deleteAccount>>, TError, {
|
|
1632
|
+
id: string;
|
|
1633
|
+
}, TContext>;
|
|
1634
|
+
request?: (RequestInit & {
|
|
1635
|
+
method?: string;
|
|
1636
|
+
baseUrl?: string;
|
|
1637
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1638
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1639
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1640
|
+
}) | undefined;
|
|
1641
|
+
}) => import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof deleteAccount>>, TError, {
|
|
1642
|
+
id: string;
|
|
1643
|
+
}, TContext>;
|
|
1644
|
+
useDeleteAccount: <TError = unknown, TContext = unknown>(options?: {
|
|
1645
|
+
mutation?: import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof deleteAccount>>, TError, {
|
|
1646
|
+
id: string;
|
|
1647
|
+
}, TContext>;
|
|
1648
|
+
request?: (RequestInit & {
|
|
1649
|
+
method?: string;
|
|
1650
|
+
baseUrl?: string;
|
|
1651
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1652
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1653
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1654
|
+
}) | undefined;
|
|
1655
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient) => import("@tanstack/react-query").UseMutationResult<Awaited<ReturnType<typeof deleteAccount>>, TError, {
|
|
1656
|
+
id: string;
|
|
1657
|
+
}, TContext>;
|
|
1658
|
+
getUpdateAccountUrl: (id: string) => string;
|
|
1659
|
+
updateAccount: (id: string, updateAccountRequest?: UpdateAccountRequest, options?: RequestInit) => Promise<UpdateAccountResponse>;
|
|
1660
|
+
getUpdateAccountMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
1661
|
+
mutation?: import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof updateAccount>>, TError, {
|
|
1662
|
+
id: string;
|
|
1663
|
+
data?: UpdateAccountRequest;
|
|
1664
|
+
}, TContext>;
|
|
1665
|
+
request?: (RequestInit & {
|
|
1666
|
+
method?: string;
|
|
1667
|
+
baseUrl?: string;
|
|
1668
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1669
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1670
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1671
|
+
}) | undefined;
|
|
1672
|
+
}) => import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof updateAccount>>, TError, {
|
|
1673
|
+
id: string;
|
|
1674
|
+
data?: UpdateAccountRequest;
|
|
1675
|
+
}, TContext>;
|
|
1676
|
+
useUpdateAccount: <TError = unknown, TContext = unknown>(options?: {
|
|
1677
|
+
mutation?: import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof updateAccount>>, TError, {
|
|
1678
|
+
id: string;
|
|
1679
|
+
data?: UpdateAccountRequest;
|
|
1680
|
+
}, TContext>;
|
|
1681
|
+
request?: (RequestInit & {
|
|
1682
|
+
method?: string;
|
|
1683
|
+
baseUrl?: string;
|
|
1684
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1685
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1686
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1687
|
+
}) | undefined;
|
|
1688
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient) => import("@tanstack/react-query").UseMutationResult<Awaited<ReturnType<typeof updateAccount>>, TError, {
|
|
1689
|
+
id: string;
|
|
1690
|
+
data?: UpdateAccountRequest;
|
|
1691
|
+
}, TContext>;
|
|
1692
|
+
getListUserAccountsUrl: (userId: string) => string;
|
|
1693
|
+
listUserAccounts: (userId: string, options?: RequestInit) => Promise<UserAccountsResponse>;
|
|
1694
|
+
getListUserAccountsQueryKey: (userId: string) => readonly [`/admin/users/${string}/accounts`];
|
|
1695
|
+
getListUserAccountsQueryOptions: <TData = Awaited<ReturnType<typeof listUserAccounts>>, TError = unknown>(userId: string, options?: {
|
|
1696
|
+
query?: Partial<import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof listUserAccounts>>, TError, TData>>;
|
|
1697
|
+
request?: (RequestInit & {
|
|
1698
|
+
method?: string;
|
|
1699
|
+
baseUrl?: string;
|
|
1700
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1701
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1702
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1703
|
+
}) | undefined;
|
|
1704
|
+
}) => import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof listUserAccounts>>, TError, TData> & {
|
|
1705
|
+
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, TData, TError>;
|
|
1706
|
+
};
|
|
1707
|
+
getCreateAccountUrl: (userId: string) => string;
|
|
1708
|
+
createAccount: (userId: string, createAccountRequest?: CreateAccountRequest, options?: RequestInit) => Promise<CreateAccountResponse>;
|
|
1709
|
+
getCreateAccountMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
1710
|
+
mutation?: import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof createAccount>>, TError, {
|
|
1711
|
+
userId: string;
|
|
1712
|
+
data?: CreateAccountRequest;
|
|
1713
|
+
}, TContext>;
|
|
1714
|
+
request?: (RequestInit & {
|
|
1715
|
+
method?: string;
|
|
1716
|
+
baseUrl?: string;
|
|
1717
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1718
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1719
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1720
|
+
}) | undefined;
|
|
1721
|
+
}) => import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof createAccount>>, TError, {
|
|
1722
|
+
userId: string;
|
|
1723
|
+
data?: CreateAccountRequest;
|
|
1724
|
+
}, TContext>;
|
|
1725
|
+
useCreateAccount: <TError = unknown, TContext = unknown>(options?: {
|
|
1726
|
+
mutation?: import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof createAccount>>, TError, {
|
|
1727
|
+
userId: string;
|
|
1728
|
+
data?: CreateAccountRequest;
|
|
1729
|
+
}, TContext>;
|
|
1730
|
+
request?: (RequestInit & {
|
|
1731
|
+
method?: string;
|
|
1732
|
+
baseUrl?: string;
|
|
1733
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1734
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1735
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1736
|
+
}) | undefined;
|
|
1737
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient) => import("@tanstack/react-query").UseMutationResult<Awaited<ReturnType<typeof createAccount>>, TError, {
|
|
1738
|
+
userId: string;
|
|
1739
|
+
data?: CreateAccountRequest;
|
|
1740
|
+
}, TContext>;
|
|
1741
|
+
useListUsers<TData = UsersPage, TError = unknown>(params: undefined | ListUsersParams, options: {
|
|
1742
|
+
query: Partial<import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof listUsers>>, TError, TData>> & Pick<import("@tanstack/react-query").DefinedInitialDataOptions<Awaited<ReturnType<typeof listUsers>>, TError, Awaited<ReturnType<typeof listUsers>>>, "initialData">;
|
|
1743
|
+
request?: (RequestInit & {
|
|
1744
|
+
method?: string;
|
|
1745
|
+
baseUrl?: string;
|
|
1746
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1747
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1748
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1749
|
+
}) | undefined;
|
|
1750
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient): import("@tanstack/react-query").DefinedUseQueryResult<TData, TError> & {
|
|
1751
|
+
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, TData, TError>;
|
|
1752
|
+
};
|
|
1753
|
+
useListUsers<TData = UsersPage, TError = unknown>(params?: ListUsersParams, options?: {
|
|
1754
|
+
query?: Partial<import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof listUsers>>, TError, TData>> & Pick<import("@tanstack/react-query").UndefinedInitialDataOptions<Awaited<ReturnType<typeof listUsers>>, TError, Awaited<ReturnType<typeof listUsers>>>, "initialData">;
|
|
1755
|
+
request?: (RequestInit & {
|
|
1756
|
+
method?: string;
|
|
1757
|
+
baseUrl?: string;
|
|
1758
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1759
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1760
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1761
|
+
}) | undefined;
|
|
1762
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient): import("@tanstack/react-query").UseQueryResult<TData, TError> & {
|
|
1763
|
+
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, TData, TError>;
|
|
1764
|
+
};
|
|
1765
|
+
useListUsers<TData = UsersPage, TError = unknown>(params?: ListUsersParams, options?: {
|
|
1766
|
+
query?: Partial<import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof listUsers>>, TError, TData>>;
|
|
1767
|
+
request?: (RequestInit & {
|
|
1768
|
+
method?: string;
|
|
1769
|
+
baseUrl?: string;
|
|
1770
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1771
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1772
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1773
|
+
}) | undefined;
|
|
1774
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient): import("@tanstack/react-query").UseQueryResult<TData, TError> & {
|
|
1775
|
+
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, TData, TError>;
|
|
1776
|
+
};
|
|
1777
|
+
useGetUser<TData = GetUserByIDResponse, TError = unknown>(userId: string, options: {
|
|
1778
|
+
query: Partial<import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof getUser>>, TError, TData>> & Pick<import("@tanstack/react-query").DefinedInitialDataOptions<Awaited<ReturnType<typeof getUser>>, TError, Awaited<ReturnType<typeof getUser>>>, "initialData">;
|
|
1779
|
+
request?: (RequestInit & {
|
|
1780
|
+
method?: string;
|
|
1781
|
+
baseUrl?: string;
|
|
1782
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1783
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1784
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1785
|
+
}) | undefined;
|
|
1786
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient): import("@tanstack/react-query").DefinedUseQueryResult<TData, TError> & {
|
|
1787
|
+
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, TData, TError>;
|
|
1788
|
+
};
|
|
1789
|
+
useGetUser<TData = GetUserByIDResponse, TError = unknown>(userId: string, options?: {
|
|
1790
|
+
query?: Partial<import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof getUser>>, TError, TData>> & Pick<import("@tanstack/react-query").UndefinedInitialDataOptions<Awaited<ReturnType<typeof getUser>>, TError, Awaited<ReturnType<typeof getUser>>>, "initialData">;
|
|
1791
|
+
request?: (RequestInit & {
|
|
1792
|
+
method?: string;
|
|
1793
|
+
baseUrl?: string;
|
|
1794
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1795
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1796
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1797
|
+
}) | undefined;
|
|
1798
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient): import("@tanstack/react-query").UseQueryResult<TData, TError> & {
|
|
1799
|
+
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, TData, TError>;
|
|
1800
|
+
};
|
|
1801
|
+
useGetUser<TData = GetUserByIDResponse, TError = unknown>(userId: string, options?: {
|
|
1802
|
+
query?: Partial<import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof getUser>>, TError, TData>>;
|
|
1803
|
+
request?: (RequestInit & {
|
|
1804
|
+
method?: string;
|
|
1805
|
+
baseUrl?: string;
|
|
1806
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1807
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1808
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1809
|
+
}) | undefined;
|
|
1810
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient): import("@tanstack/react-query").UseQueryResult<TData, TError> & {
|
|
1811
|
+
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, TData, TError>;
|
|
1812
|
+
};
|
|
1813
|
+
getListUsersUrl: (params?: ListUsersParams) => string;
|
|
1814
|
+
listUsers: (params?: ListUsersParams, options?: RequestInit) => Promise<UsersPage>;
|
|
1815
|
+
getListUsersQueryKey: (params?: ListUsersParams) => readonly ["/admin/users", ...ListUsersParams[]];
|
|
1816
|
+
getListUsersQueryOptions: <TData = Awaited<ReturnType<typeof listUsers>>, TError = unknown>(params?: ListUsersParams, options?: {
|
|
1817
|
+
query?: Partial<import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof listUsers>>, TError, TData>>;
|
|
1818
|
+
request?: (RequestInit & {
|
|
1819
|
+
method?: string;
|
|
1820
|
+
baseUrl?: string;
|
|
1821
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1822
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1823
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1824
|
+
}) | undefined;
|
|
1825
|
+
}) => import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof listUsers>>, TError, TData> & {
|
|
1826
|
+
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, TData, TError>;
|
|
1827
|
+
};
|
|
1828
|
+
getCreateUserUrl: () => string;
|
|
1829
|
+
createUser: (createUserRequest?: CreateUserRequest, options?: RequestInit) => Promise<CreateUserResponse>;
|
|
1830
|
+
getCreateUserMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
1831
|
+
mutation?: import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof createUser>>, TError, {
|
|
1832
|
+
data?: CreateUserRequest;
|
|
1833
|
+
}, TContext>;
|
|
1834
|
+
request?: (RequestInit & {
|
|
1835
|
+
method?: string;
|
|
1836
|
+
baseUrl?: string;
|
|
1837
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1838
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1839
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1840
|
+
}) | undefined;
|
|
1841
|
+
}) => import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof createUser>>, TError, {
|
|
1842
|
+
data?: CreateUserRequest;
|
|
1843
|
+
}, TContext>;
|
|
1844
|
+
useCreateUser: <TError = unknown, TContext = unknown>(options?: {
|
|
1845
|
+
mutation?: import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof createUser>>, TError, {
|
|
1846
|
+
data?: CreateUserRequest;
|
|
1847
|
+
}, TContext>;
|
|
1848
|
+
request?: (RequestInit & {
|
|
1849
|
+
method?: string;
|
|
1850
|
+
baseUrl?: string;
|
|
1851
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1852
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1853
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1854
|
+
}) | undefined;
|
|
1855
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient) => import("@tanstack/react-query").UseMutationResult<Awaited<ReturnType<typeof createUser>>, TError, {
|
|
1856
|
+
data?: CreateUserRequest;
|
|
1857
|
+
}, TContext>;
|
|
1858
|
+
getGetUserUrl: (userId: string) => string;
|
|
1859
|
+
getUser: (userId: string, options?: RequestInit) => Promise<GetUserByIDResponse>;
|
|
1860
|
+
getGetUserQueryKey: (userId: string) => readonly [`/admin/users/${string}`];
|
|
1861
|
+
getGetUserQueryOptions: <TData = Awaited<ReturnType<typeof getUser>>, TError = unknown>(userId: string, options?: {
|
|
1862
|
+
query?: Partial<import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof getUser>>, TError, TData>>;
|
|
1863
|
+
request?: (RequestInit & {
|
|
1864
|
+
method?: string;
|
|
1865
|
+
baseUrl?: string;
|
|
1866
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1867
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1868
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1869
|
+
}) | undefined;
|
|
1870
|
+
}) => import("@tanstack/react-query").UseQueryOptions<Awaited<ReturnType<typeof getUser>>, TError, TData> & {
|
|
1871
|
+
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, TData, TError>;
|
|
1872
|
+
};
|
|
1873
|
+
getDeleteUserUrl: (userId: string) => string;
|
|
1874
|
+
deleteUser: (userId: string, options?: RequestInit) => Promise<DeleteUserResponse>;
|
|
1875
|
+
getDeleteUserMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
1876
|
+
mutation?: import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof deleteUser>>, TError, {
|
|
1877
|
+
userId: string;
|
|
1878
|
+
}, TContext>;
|
|
1879
|
+
request?: (RequestInit & {
|
|
1880
|
+
method?: string;
|
|
1881
|
+
baseUrl?: string;
|
|
1882
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1883
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1884
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1885
|
+
}) | undefined;
|
|
1886
|
+
}) => import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof deleteUser>>, TError, {
|
|
1887
|
+
userId: string;
|
|
1888
|
+
}, TContext>;
|
|
1889
|
+
useDeleteUser: <TError = unknown, TContext = unknown>(options?: {
|
|
1890
|
+
mutation?: import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof deleteUser>>, TError, {
|
|
1891
|
+
userId: string;
|
|
1892
|
+
}, TContext>;
|
|
1893
|
+
request?: (RequestInit & {
|
|
1894
|
+
method?: string;
|
|
1895
|
+
baseUrl?: string;
|
|
1896
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1897
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1898
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1899
|
+
}) | undefined;
|
|
1900
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient) => import("@tanstack/react-query").UseMutationResult<Awaited<ReturnType<typeof deleteUser>>, TError, {
|
|
1901
|
+
userId: string;
|
|
1902
|
+
}, TContext>;
|
|
1903
|
+
getUpdateUserUrl: (userId: string) => string;
|
|
1904
|
+
updateUser: (userId: string, updateUserRequest?: UpdateUserRequest, options?: RequestInit) => Promise<UpdateUserResponse>;
|
|
1905
|
+
getUpdateUserMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
1906
|
+
mutation?: import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof updateUser>>, TError, {
|
|
1907
|
+
userId: string;
|
|
1908
|
+
data?: UpdateUserRequest;
|
|
1909
|
+
}, TContext>;
|
|
1910
|
+
request?: (RequestInit & {
|
|
1911
|
+
method?: string;
|
|
1912
|
+
baseUrl?: string;
|
|
1913
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1914
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1915
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1916
|
+
}) | undefined;
|
|
1917
|
+
}) => import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof updateUser>>, TError, {
|
|
1918
|
+
userId: string;
|
|
1919
|
+
data?: UpdateUserRequest;
|
|
1920
|
+
}, TContext>;
|
|
1921
|
+
useUpdateUser: <TError = unknown, TContext = unknown>(options?: {
|
|
1922
|
+
mutation?: import("@tanstack/react-query").UseMutationOptions<Awaited<ReturnType<typeof updateUser>>, TError, {
|
|
1923
|
+
userId: string;
|
|
1924
|
+
data?: UpdateUserRequest;
|
|
1925
|
+
}, TContext>;
|
|
1926
|
+
request?: (RequestInit & {
|
|
1927
|
+
method?: string;
|
|
1928
|
+
baseUrl?: string;
|
|
1929
|
+
cookies?: () => CookieStore | Promise<CookieStore>;
|
|
1930
|
+
onBeforeFetch?: (ctx: FetchContext) => Promise<void>;
|
|
1931
|
+
onAfterFetch?: (ctx: FetchContext, res: Response) => Promise<"retry" | void>;
|
|
1932
|
+
}) | undefined;
|
|
1933
|
+
}, queryClient?: import("@tanstack/react-query").QueryClient) => import("@tanstack/react-query").UseMutationResult<Awaited<ReturnType<typeof updateUser>>, TError, {
|
|
1934
|
+
userId: string;
|
|
1935
|
+
data?: UpdateUserRequest;
|
|
1936
|
+
}, TContext>;
|
|
459
1937
|
};
|
|
460
1938
|
}
|
|
1939
|
+
declare namespace api_keys_d_exports {
|
|
1940
|
+
export { CreateApiKeyMutationBody, CreateApiKeyMutationError, CreateApiKeyMutationResult, DeleteApiKeyMutationError, DeleteApiKeyMutationResult, GetApiKeyQueryError, GetApiKeyQueryResult, ListApiKeysQueryError, ListApiKeysQueryResult, UpdateApiKeyMutationBody, UpdateApiKeyMutationError, UpdateApiKeyMutationResult, VerifyApiKeyMutationBody, VerifyApiKeyMutationError, VerifyApiKeyMutationResult, createApiKey, deleteApiKey, getApiKey, getCreateApiKeyMutationOptions, getCreateApiKeyUrl, getDeleteApiKeyMutationOptions, getDeleteApiKeyUrl, getGetApiKeyQueryKey, getGetApiKeyQueryOptions, getGetApiKeyUrl, getListApiKeysQueryKey, getListApiKeysQueryOptions, getListApiKeysUrl, getUpdateApiKeyMutationOptions, getUpdateApiKeyUrl, getVerifyApiKeyMutationOptions, getVerifyApiKeyUrl, listApiKeys, updateApiKey, useCreateApiKey, useDeleteApiKey, useGetApiKey, useListApiKeys, useUpdateApiKey, useVerifyApiKey, verifyApiKey };
|
|
1941
|
+
}
|
|
1942
|
+
type SecondParameter$7<T extends (...args: never) => unknown> = Parameters<T>[1];
|
|
1943
|
+
declare const getListApiKeysUrl: (params?: ListApiKeysParams) => string;
|
|
1944
|
+
/**
|
|
1945
|
+
* Lists API keys with pagination, optionally filtered by owner.
|
|
1946
|
+
* @summary List API keys
|
|
1947
|
+
*/
|
|
1948
|
+
declare const listApiKeys: (params?: ListApiKeysParams, options?: RequestInit) => Promise<GetAllApiKeysResponse>;
|
|
1949
|
+
declare const getListApiKeysQueryKey: (params?: ListApiKeysParams) => readonly ["/api-keys", ...ListApiKeysParams[]];
|
|
1950
|
+
declare const getListApiKeysQueryOptions: <TData = Awaited<ReturnType<typeof listApiKeys>>, TError = unknown>(params?: ListApiKeysParams, options?: {
|
|
1951
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listApiKeys>>, TError, TData>>;
|
|
1952
|
+
request?: SecondParameter$7<typeof customFetch>;
|
|
1953
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof listApiKeys>>, TError, TData> & {
|
|
1954
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
1955
|
+
};
|
|
1956
|
+
type ListApiKeysQueryResult = NonNullable<Awaited<ReturnType<typeof listApiKeys>>>;
|
|
1957
|
+
type ListApiKeysQueryError = unknown;
|
|
1958
|
+
declare function useListApiKeys<TData = Awaited<ReturnType<typeof listApiKeys>>, TError = unknown>(params: undefined | ListApiKeysParams, options: {
|
|
1959
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof listApiKeys>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof listApiKeys>>, TError, Awaited<ReturnType<typeof listApiKeys>>>, "initialData">;
|
|
1960
|
+
request?: SecondParameter$7<typeof customFetch>;
|
|
1961
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
1962
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
1963
|
+
};
|
|
1964
|
+
declare function useListApiKeys<TData = Awaited<ReturnType<typeof listApiKeys>>, TError = unknown>(params?: ListApiKeysParams, options?: {
|
|
1965
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listApiKeys>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof listApiKeys>>, TError, Awaited<ReturnType<typeof listApiKeys>>>, "initialData">;
|
|
1966
|
+
request?: SecondParameter$7<typeof customFetch>;
|
|
1967
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
1968
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
1969
|
+
};
|
|
1970
|
+
declare function useListApiKeys<TData = Awaited<ReturnType<typeof listApiKeys>>, TError = unknown>(params?: ListApiKeysParams, options?: {
|
|
1971
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listApiKeys>>, TError, TData>>;
|
|
1972
|
+
request?: SecondParameter$7<typeof customFetch>;
|
|
1973
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
1974
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
1975
|
+
};
|
|
1976
|
+
declare const getCreateApiKeyUrl: () => string;
|
|
1977
|
+
/**
|
|
1978
|
+
* Creates a new API key for the specified owner.
|
|
1979
|
+
* @summary Create API key
|
|
1980
|
+
*/
|
|
1981
|
+
declare const createApiKey: (createApiKeyRequest?: CreateApiKeyRequest, options?: RequestInit) => Promise<CreateApiKeyResponse>;
|
|
1982
|
+
declare const getCreateApiKeyMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
1983
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof createApiKey>>, TError, {
|
|
1984
|
+
data?: CreateApiKeyRequest;
|
|
1985
|
+
}, TContext>;
|
|
1986
|
+
request?: SecondParameter$7<typeof customFetch>;
|
|
1987
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof createApiKey>>, TError, {
|
|
1988
|
+
data?: CreateApiKeyRequest;
|
|
1989
|
+
}, TContext>;
|
|
1990
|
+
type CreateApiKeyMutationResult = NonNullable<Awaited<ReturnType<typeof createApiKey>>>;
|
|
1991
|
+
type CreateApiKeyMutationBody = CreateApiKeyRequest | undefined;
|
|
1992
|
+
type CreateApiKeyMutationError = unknown;
|
|
1993
|
+
/**
|
|
1994
|
+
* @summary Create API key
|
|
1995
|
+
*/
|
|
1996
|
+
declare const useCreateApiKey: <TError = unknown, TContext = unknown>(options?: {
|
|
1997
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof createApiKey>>, TError, {
|
|
1998
|
+
data?: CreateApiKeyRequest;
|
|
1999
|
+
}, TContext>;
|
|
2000
|
+
request?: SecondParameter$7<typeof customFetch>;
|
|
2001
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof createApiKey>>, TError, {
|
|
2002
|
+
data?: CreateApiKeyRequest;
|
|
2003
|
+
}, TContext>;
|
|
2004
|
+
declare const getVerifyApiKeyUrl: () => string;
|
|
2005
|
+
/**
|
|
2006
|
+
* Verifies an API key by its raw value and returns the associated key details.
|
|
2007
|
+
* @summary Verify API key
|
|
2008
|
+
*/
|
|
2009
|
+
declare const verifyApiKey: (verifyApiKeyRequest?: VerifyApiKeyRequest, options?: RequestInit) => Promise<VerifyApiKeyResponse>;
|
|
2010
|
+
declare const getVerifyApiKeyMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
2011
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof verifyApiKey>>, TError, {
|
|
2012
|
+
data?: VerifyApiKeyRequest;
|
|
2013
|
+
}, TContext>;
|
|
2014
|
+
request?: SecondParameter$7<typeof customFetch>;
|
|
2015
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof verifyApiKey>>, TError, {
|
|
2016
|
+
data?: VerifyApiKeyRequest;
|
|
2017
|
+
}, TContext>;
|
|
2018
|
+
type VerifyApiKeyMutationResult = NonNullable<Awaited<ReturnType<typeof verifyApiKey>>>;
|
|
2019
|
+
type VerifyApiKeyMutationBody = VerifyApiKeyRequest | undefined;
|
|
2020
|
+
type VerifyApiKeyMutationError = unknown;
|
|
2021
|
+
/**
|
|
2022
|
+
* @summary Verify API key
|
|
2023
|
+
*/
|
|
2024
|
+
declare const useVerifyApiKey: <TError = unknown, TContext = unknown>(options?: {
|
|
2025
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof verifyApiKey>>, TError, {
|
|
2026
|
+
data?: VerifyApiKeyRequest;
|
|
2027
|
+
}, TContext>;
|
|
2028
|
+
request?: SecondParameter$7<typeof customFetch>;
|
|
2029
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof verifyApiKey>>, TError, {
|
|
2030
|
+
data?: VerifyApiKeyRequest;
|
|
2031
|
+
}, TContext>;
|
|
2032
|
+
declare const getGetApiKeyUrl: (id: string) => string;
|
|
2033
|
+
/**
|
|
2034
|
+
* Retrieves an API key by its ID.
|
|
2035
|
+
* @summary Get API key by ID
|
|
2036
|
+
*/
|
|
2037
|
+
declare const getApiKey: (id: string, options?: RequestInit) => Promise<GetApiKeyResponse>;
|
|
2038
|
+
declare const getGetApiKeyQueryKey: (id: string) => readonly [`/api-keys/${string}`];
|
|
2039
|
+
declare const getGetApiKeyQueryOptions: <TData = Awaited<ReturnType<typeof getApiKey>>, TError = unknown>(id: string, options?: {
|
|
2040
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getApiKey>>, TError, TData>>;
|
|
2041
|
+
request?: SecondParameter$7<typeof customFetch>;
|
|
2042
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof getApiKey>>, TError, TData> & {
|
|
2043
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
2044
|
+
};
|
|
2045
|
+
type GetApiKeyQueryResult = NonNullable<Awaited<ReturnType<typeof getApiKey>>>;
|
|
2046
|
+
type GetApiKeyQueryError = unknown;
|
|
2047
|
+
declare function useGetApiKey<TData = Awaited<ReturnType<typeof getApiKey>>, TError = unknown>(id: string, options: {
|
|
2048
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getApiKey>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getApiKey>>, TError, Awaited<ReturnType<typeof getApiKey>>>, "initialData">;
|
|
2049
|
+
request?: SecondParameter$7<typeof customFetch>;
|
|
2050
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
2051
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
2052
|
+
};
|
|
2053
|
+
declare function useGetApiKey<TData = Awaited<ReturnType<typeof getApiKey>>, TError = unknown>(id: string, options?: {
|
|
2054
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getApiKey>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getApiKey>>, TError, Awaited<ReturnType<typeof getApiKey>>>, "initialData">;
|
|
2055
|
+
request?: SecondParameter$7<typeof customFetch>;
|
|
2056
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
2057
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
2058
|
+
};
|
|
2059
|
+
declare function useGetApiKey<TData = Awaited<ReturnType<typeof getApiKey>>, TError = unknown>(id: string, options?: {
|
|
2060
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getApiKey>>, TError, TData>>;
|
|
2061
|
+
request?: SecondParameter$7<typeof customFetch>;
|
|
2062
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
2063
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
2064
|
+
};
|
|
2065
|
+
declare const getDeleteApiKeyUrl: (id: string) => string;
|
|
2066
|
+
/**
|
|
2067
|
+
* Deletes an API key.
|
|
2068
|
+
* @summary Delete API key
|
|
2069
|
+
*/
|
|
2070
|
+
declare const deleteApiKey: (id: string, options?: RequestInit) => Promise<DeleteApiKeyResponse>;
|
|
2071
|
+
declare const getDeleteApiKeyMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
2072
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof deleteApiKey>>, TError, {
|
|
2073
|
+
id: string;
|
|
2074
|
+
}, TContext>;
|
|
2075
|
+
request?: SecondParameter$7<typeof customFetch>;
|
|
2076
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof deleteApiKey>>, TError, {
|
|
2077
|
+
id: string;
|
|
2078
|
+
}, TContext>;
|
|
2079
|
+
type DeleteApiKeyMutationResult = NonNullable<Awaited<ReturnType<typeof deleteApiKey>>>;
|
|
2080
|
+
type DeleteApiKeyMutationError = unknown;
|
|
2081
|
+
/**
|
|
2082
|
+
* @summary Delete API key
|
|
2083
|
+
*/
|
|
2084
|
+
declare const useDeleteApiKey: <TError = unknown, TContext = unknown>(options?: {
|
|
2085
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof deleteApiKey>>, TError, {
|
|
2086
|
+
id: string;
|
|
2087
|
+
}, TContext>;
|
|
2088
|
+
request?: SecondParameter$7<typeof customFetch>;
|
|
2089
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof deleteApiKey>>, TError, {
|
|
2090
|
+
id: string;
|
|
2091
|
+
}, TContext>;
|
|
2092
|
+
declare const getUpdateApiKeyUrl: (id: string) => string;
|
|
2093
|
+
/**
|
|
2094
|
+
* Updates an API key's attributes.
|
|
2095
|
+
* @summary Update API key
|
|
2096
|
+
*/
|
|
2097
|
+
declare const updateApiKey: (id: string, updateApiKeyRequest?: UpdateApiKeyRequest, options?: RequestInit) => Promise<UpdateApiKeyResponse>;
|
|
2098
|
+
declare const getUpdateApiKeyMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
2099
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof updateApiKey>>, TError, {
|
|
2100
|
+
id: string;
|
|
2101
|
+
data?: UpdateApiKeyRequest;
|
|
2102
|
+
}, TContext>;
|
|
2103
|
+
request?: SecondParameter$7<typeof customFetch>;
|
|
2104
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof updateApiKey>>, TError, {
|
|
2105
|
+
id: string;
|
|
2106
|
+
data?: UpdateApiKeyRequest;
|
|
2107
|
+
}, TContext>;
|
|
2108
|
+
type UpdateApiKeyMutationResult = NonNullable<Awaited<ReturnType<typeof updateApiKey>>>;
|
|
2109
|
+
type UpdateApiKeyMutationBody = UpdateApiKeyRequest | undefined;
|
|
2110
|
+
type UpdateApiKeyMutationError = unknown;
|
|
2111
|
+
/**
|
|
2112
|
+
* @summary Update API key
|
|
2113
|
+
*/
|
|
2114
|
+
declare const useUpdateApiKey: <TError = unknown, TContext = unknown>(options?: {
|
|
2115
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof updateApiKey>>, TError, {
|
|
2116
|
+
id: string;
|
|
2117
|
+
data?: UpdateApiKeyRequest;
|
|
2118
|
+
}, TContext>;
|
|
2119
|
+
request?: SecondParameter$7<typeof customFetch>;
|
|
2120
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof updateApiKey>>, TError, {
|
|
2121
|
+
id: string;
|
|
2122
|
+
data?: UpdateApiKeyRequest;
|
|
2123
|
+
}, TContext>;
|
|
461
2124
|
//#endregion
|
|
462
|
-
//#region src/plugins/
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
};
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
2125
|
+
//#region src/plugins/api-key/plugin.d.ts
|
|
2126
|
+
declare class ApiKeyPlugin implements Plugin {
|
|
2127
|
+
readonly id = "apiKey";
|
|
2128
|
+
constructor();
|
|
2129
|
+
init(client: AuthulaClient): typeof api_keys_d_exports;
|
|
2130
|
+
}
|
|
2131
|
+
declare namespace jwt_plugin_d_exports {
|
|
2132
|
+
export { GetJWKSQueryError, GetJWKSQueryResult, RefreshTokenMutationBody, RefreshTokenMutationError, RefreshTokenMutationResult, getGetJWKSQueryKey, getGetJWKSQueryOptions, getGetJWKSUrl, getJWKS, getRefreshTokenMutationOptions, getRefreshTokenUrl, refreshToken, useGetJWKS, useRefreshToken };
|
|
2133
|
+
}
|
|
2134
|
+
type SecondParameter$6<T extends (...args: never) => unknown> = Parameters<T>[1];
|
|
2135
|
+
declare const getGetJWKSUrl: () => string;
|
|
2136
|
+
/**
|
|
2137
|
+
* Returns the JSON Web Key Set (JWKS) containing the public keys used to verify JWT signatures.
|
|
2138
|
+
* @summary Get JWKS
|
|
2139
|
+
*/
|
|
2140
|
+
declare const getJWKS: (options?: RequestInit) => Promise<WellKnownJWKSResponse>;
|
|
2141
|
+
declare const getGetJWKSQueryKey: () => readonly ["/.well-known/jwks.json"];
|
|
2142
|
+
declare const getGetJWKSQueryOptions: <TData = Awaited<ReturnType<typeof getJWKS>>, TError = unknown>(options?: {
|
|
2143
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getJWKS>>, TError, TData>>;
|
|
2144
|
+
request?: SecondParameter$6<typeof customFetch>;
|
|
2145
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof getJWKS>>, TError, TData> & {
|
|
2146
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
2147
|
+
};
|
|
2148
|
+
type GetJWKSQueryResult = NonNullable<Awaited<ReturnType<typeof getJWKS>>>;
|
|
2149
|
+
type GetJWKSQueryError = unknown;
|
|
2150
|
+
declare function useGetJWKS<TData = Awaited<ReturnType<typeof getJWKS>>, TError = unknown>(options: {
|
|
2151
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getJWKS>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getJWKS>>, TError, Awaited<ReturnType<typeof getJWKS>>>, "initialData">;
|
|
2152
|
+
request?: SecondParameter$6<typeof customFetch>;
|
|
2153
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
2154
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
2155
|
+
};
|
|
2156
|
+
declare function useGetJWKS<TData = Awaited<ReturnType<typeof getJWKS>>, TError = unknown>(options?: {
|
|
2157
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getJWKS>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getJWKS>>, TError, Awaited<ReturnType<typeof getJWKS>>>, "initialData">;
|
|
2158
|
+
request?: SecondParameter$6<typeof customFetch>;
|
|
2159
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
2160
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
2161
|
+
};
|
|
2162
|
+
declare function useGetJWKS<TData = Awaited<ReturnType<typeof getJWKS>>, TError = unknown>(options?: {
|
|
2163
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getJWKS>>, TError, TData>>;
|
|
2164
|
+
request?: SecondParameter$6<typeof customFetch>;
|
|
2165
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
2166
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
2167
|
+
};
|
|
2168
|
+
declare const getRefreshTokenUrl: () => string;
|
|
2169
|
+
/**
|
|
2170
|
+
* Exchanges a valid refresh token for a new access token and refresh token pair.
|
|
2171
|
+
* @summary Refresh JWT token
|
|
2172
|
+
*/
|
|
2173
|
+
declare const refreshToken: (refreshTokenRequest?: RefreshTokenRequest, options?: RequestInit) => Promise<RefreshTokenResponse>;
|
|
2174
|
+
declare const getRefreshTokenMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
2175
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof refreshToken>>, TError, {
|
|
2176
|
+
data?: RefreshTokenRequest;
|
|
2177
|
+
}, TContext>;
|
|
2178
|
+
request?: SecondParameter$6<typeof customFetch>;
|
|
2179
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof refreshToken>>, TError, {
|
|
2180
|
+
data?: RefreshTokenRequest;
|
|
2181
|
+
}, TContext>;
|
|
2182
|
+
type RefreshTokenMutationResult = NonNullable<Awaited<ReturnType<typeof refreshToken>>>;
|
|
2183
|
+
type RefreshTokenMutationBody = RefreshTokenRequest | undefined;
|
|
2184
|
+
type RefreshTokenMutationError = unknown;
|
|
2185
|
+
/**
|
|
2186
|
+
* @summary Refresh JWT token
|
|
2187
|
+
*/
|
|
2188
|
+
declare const useRefreshToken: <TError = unknown, TContext = unknown>(options?: {
|
|
2189
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof refreshToken>>, TError, {
|
|
2190
|
+
data?: RefreshTokenRequest;
|
|
2191
|
+
}, TContext>;
|
|
2192
|
+
request?: SecondParameter$6<typeof customFetch>;
|
|
2193
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof refreshToken>>, TError, {
|
|
2194
|
+
data?: RefreshTokenRequest;
|
|
2195
|
+
}, TContext>;
|
|
487
2196
|
//#endregion
|
|
488
2197
|
//#region src/plugins/jwt/plugin.d.ts
|
|
489
2198
|
declare class JWTPlugin implements Plugin {
|
|
490
2199
|
readonly id = "jwt";
|
|
491
2200
|
constructor();
|
|
492
|
-
init(client: AuthulaClient):
|
|
493
|
-
refreshToken: (data: TokenRefreshRequest) => Promise<TokenRefreshResponse>;
|
|
494
|
-
getJWKSKeys: () => Promise<Array<JWKSKey>>;
|
|
495
|
-
};
|
|
2201
|
+
init(client: AuthulaClient): typeof jwt_plugin_d_exports;
|
|
496
2202
|
}
|
|
497
2203
|
//#endregion
|
|
2204
|
+
//#region src/plugins/bearer/types.d.ts
|
|
2205
|
+
type BearerPluginOptions = {
|
|
2206
|
+
headerName?: string;
|
|
2207
|
+
};
|
|
2208
|
+
//#endregion
|
|
498
2209
|
//#region src/plugins/bearer/plugin.d.ts
|
|
499
2210
|
declare class BearerPlugin implements Plugin {
|
|
500
2211
|
private readonly options?;
|
|
@@ -503,6 +2214,78 @@ declare class BearerPlugin implements Plugin {
|
|
|
503
2214
|
constructor(options?: BearerPluginOptions | undefined);
|
|
504
2215
|
init(client: ClientWithPlugins<[JWTPlugin]>): {};
|
|
505
2216
|
}
|
|
2217
|
+
declare namespace core_d_exports {
|
|
2218
|
+
export { GetMeQueryError, GetMeQueryResult, SignOutMutationBody, SignOutMutationError, SignOutMutationResult, getGetMeQueryKey, getGetMeQueryOptions, getGetMeUrl, getMe, getSignOutMutationOptions, getSignOutUrl, signOut, useGetMe, useSignOut };
|
|
2219
|
+
}
|
|
2220
|
+
type SecondParameter$5<T extends (...args: never) => unknown> = Parameters<T>[1];
|
|
2221
|
+
declare const getGetMeUrl: () => string;
|
|
2222
|
+
/**
|
|
2223
|
+
* Retrieves the authenticated user's profile and current session.
|
|
2224
|
+
* @summary Get current user
|
|
2225
|
+
*/
|
|
2226
|
+
declare const getMe: (options?: RequestInit) => Promise<GetMeResponse>;
|
|
2227
|
+
declare const getGetMeQueryKey: () => readonly ["/me"];
|
|
2228
|
+
declare const getGetMeQueryOptions: <TData = Awaited<ReturnType<typeof getMe>>, TError = unknown>(options?: {
|
|
2229
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getMe>>, TError, TData>>;
|
|
2230
|
+
request?: SecondParameter$5<typeof customFetch>;
|
|
2231
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof getMe>>, TError, TData> & {
|
|
2232
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
2233
|
+
};
|
|
2234
|
+
type GetMeQueryResult = NonNullable<Awaited<ReturnType<typeof getMe>>>;
|
|
2235
|
+
type GetMeQueryError = unknown;
|
|
2236
|
+
declare function useGetMe<TData = Awaited<ReturnType<typeof getMe>>, TError = unknown>(options: {
|
|
2237
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getMe>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getMe>>, TError, Awaited<ReturnType<typeof getMe>>>, "initialData">;
|
|
2238
|
+
request?: SecondParameter$5<typeof customFetch>;
|
|
2239
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
2240
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
2241
|
+
};
|
|
2242
|
+
declare function useGetMe<TData = Awaited<ReturnType<typeof getMe>>, TError = unknown>(options?: {
|
|
2243
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getMe>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getMe>>, TError, Awaited<ReturnType<typeof getMe>>>, "initialData">;
|
|
2244
|
+
request?: SecondParameter$5<typeof customFetch>;
|
|
2245
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
2246
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
2247
|
+
};
|
|
2248
|
+
declare function useGetMe<TData = Awaited<ReturnType<typeof getMe>>, TError = unknown>(options?: {
|
|
2249
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getMe>>, TError, TData>>;
|
|
2250
|
+
request?: SecondParameter$5<typeof customFetch>;
|
|
2251
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
2252
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
2253
|
+
};
|
|
2254
|
+
declare const getSignOutUrl: () => string;
|
|
2255
|
+
/**
|
|
2256
|
+
* Signs out the authenticated user. Optionally sign out a specific session or all sessions.
|
|
2257
|
+
* @summary Sign out
|
|
2258
|
+
*/
|
|
2259
|
+
declare const signOut: (signOutRequest?: SignOutRequest, options?: RequestInit) => Promise<SignOutResponse>;
|
|
2260
|
+
declare const getSignOutMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
2261
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof signOut>>, TError, {
|
|
2262
|
+
data?: SignOutRequest;
|
|
2263
|
+
}, TContext>;
|
|
2264
|
+
request?: SecondParameter$5<typeof customFetch>;
|
|
2265
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof signOut>>, TError, {
|
|
2266
|
+
data?: SignOutRequest;
|
|
2267
|
+
}, TContext>;
|
|
2268
|
+
type SignOutMutationResult = NonNullable<Awaited<ReturnType<typeof signOut>>>;
|
|
2269
|
+
type SignOutMutationBody = SignOutRequest | undefined;
|
|
2270
|
+
type SignOutMutationError = unknown;
|
|
2271
|
+
/**
|
|
2272
|
+
* @summary Sign out
|
|
2273
|
+
*/
|
|
2274
|
+
declare const useSignOut: <TError = unknown, TContext = unknown>(options?: {
|
|
2275
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof signOut>>, TError, {
|
|
2276
|
+
data?: SignOutRequest;
|
|
2277
|
+
}, TContext>;
|
|
2278
|
+
request?: SecondParameter$5<typeof customFetch>;
|
|
2279
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof signOut>>, TError, {
|
|
2280
|
+
data?: SignOutRequest;
|
|
2281
|
+
}, TContext>;
|
|
2282
|
+
//#endregion
|
|
2283
|
+
//#region src/plugins/core/plugin.d.ts
|
|
2284
|
+
declare class CorePlugin implements Plugin {
|
|
2285
|
+
readonly id = "core";
|
|
2286
|
+
constructor();
|
|
2287
|
+
init(client: AuthulaClient): typeof core_d_exports;
|
|
2288
|
+
}
|
|
506
2289
|
//#endregion
|
|
507
2290
|
//#region src/plugins/csrf/types.d.ts
|
|
508
2291
|
type CSRFPluginOptions = {
|
|
@@ -516,310 +2299,724 @@ declare class CSRFPlugin implements Plugin {
|
|
|
516
2299
|
readonly id = "csrf";
|
|
517
2300
|
constructor(options: CSRFPluginOptions);
|
|
518
2301
|
init(client: AuthulaClient): {};
|
|
519
|
-
private cookies?;
|
|
520
|
-
attachCookies(fn: () => Promise<any>): void;
|
|
521
2302
|
}
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
type
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
2303
|
+
declare namespace email_password_plugin_d_exports {
|
|
2304
|
+
export { ChangePasswordMutationBody, ChangePasswordMutationError, ChangePasswordMutationResult, RequestEmailChangeMutationBody, RequestEmailChangeMutationError, RequestEmailChangeMutationResult, RequestPasswordResetMutationBody, RequestPasswordResetMutationError, RequestPasswordResetMutationResult, SendEmailVerificationMutationBody, SendEmailVerificationMutationError, SendEmailVerificationMutationResult, SignInMutationBody, SignInMutationError, SignInMutationResult, SignUpMutationBody, SignUpMutationError, SignUpMutationResult, VerifyEmailQueryError, VerifyEmailQueryResult, changePassword, getChangePasswordMutationOptions, getChangePasswordUrl, getRequestEmailChangeMutationOptions, getRequestEmailChangeUrl, getRequestPasswordResetMutationOptions, getRequestPasswordResetUrl, getSendEmailVerificationMutationOptions, getSendEmailVerificationUrl, getSignInMutationOptions, getSignInUrl, getSignUpMutationOptions, getSignUpUrl, getVerifyEmailQueryKey, getVerifyEmailQueryOptions, getVerifyEmailUrl, requestEmailChange, requestPasswordReset, sendEmailVerification, signIn, signUp, useChangePassword, useRequestEmailChange, useRequestPasswordReset, useSendEmailVerification, useSignIn, useSignUp, useVerifyEmail, verifyEmail };
|
|
2305
|
+
}
|
|
2306
|
+
type SecondParameter$4<T extends (...args: never) => unknown> = Parameters<T>[1];
|
|
2307
|
+
declare const getChangePasswordUrl: () => string;
|
|
2308
|
+
/**
|
|
2309
|
+
* Changes the user's password using a reset token
|
|
2310
|
+
* @summary Change password
|
|
2311
|
+
*/
|
|
2312
|
+
declare const changePassword: (changePasswordRequest?: ChangePasswordRequest, options?: RequestInit) => Promise<ChangePasswordResponse>;
|
|
2313
|
+
declare const getChangePasswordMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
2314
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof changePassword>>, TError, {
|
|
2315
|
+
data?: ChangePasswordRequest;
|
|
2316
|
+
}, TContext>;
|
|
2317
|
+
request?: SecondParameter$4<typeof customFetch>;
|
|
2318
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof changePassword>>, TError, {
|
|
2319
|
+
data?: ChangePasswordRequest;
|
|
2320
|
+
}, TContext>;
|
|
2321
|
+
type ChangePasswordMutationResult = NonNullable<Awaited<ReturnType<typeof changePassword>>>;
|
|
2322
|
+
type ChangePasswordMutationBody = ChangePasswordRequest | undefined;
|
|
2323
|
+
type ChangePasswordMutationError = unknown;
|
|
2324
|
+
/**
|
|
2325
|
+
* @summary Change password
|
|
2326
|
+
*/
|
|
2327
|
+
declare const useChangePassword: <TError = unknown, TContext = unknown>(options?: {
|
|
2328
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof changePassword>>, TError, {
|
|
2329
|
+
data?: ChangePasswordRequest;
|
|
2330
|
+
}, TContext>;
|
|
2331
|
+
request?: SecondParameter$4<typeof customFetch>;
|
|
2332
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof changePassword>>, TError, {
|
|
2333
|
+
data?: ChangePasswordRequest;
|
|
2334
|
+
}, TContext>;
|
|
2335
|
+
declare const getRequestEmailChangeUrl: () => string;
|
|
2336
|
+
/**
|
|
2337
|
+
* Requests to change the authenticated user's email address
|
|
2338
|
+
* @summary Request email change
|
|
2339
|
+
*/
|
|
2340
|
+
declare const requestEmailChange: (requestEmailChangeRequest?: RequestEmailChangeRequest, options?: RequestInit) => Promise<ChangeEmailResponse>;
|
|
2341
|
+
declare const getRequestEmailChangeMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
2342
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof requestEmailChange>>, TError, {
|
|
2343
|
+
data?: RequestEmailChangeRequest;
|
|
2344
|
+
}, TContext>;
|
|
2345
|
+
request?: SecondParameter$4<typeof customFetch>;
|
|
2346
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof requestEmailChange>>, TError, {
|
|
2347
|
+
data?: RequestEmailChangeRequest;
|
|
2348
|
+
}, TContext>;
|
|
2349
|
+
type RequestEmailChangeMutationResult = NonNullable<Awaited<ReturnType<typeof requestEmailChange>>>;
|
|
2350
|
+
type RequestEmailChangeMutationBody = RequestEmailChangeRequest | undefined;
|
|
2351
|
+
type RequestEmailChangeMutationError = unknown;
|
|
2352
|
+
/**
|
|
2353
|
+
* @summary Request email change
|
|
2354
|
+
*/
|
|
2355
|
+
declare const useRequestEmailChange: <TError = unknown, TContext = unknown>(options?: {
|
|
2356
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof requestEmailChange>>, TError, {
|
|
2357
|
+
data?: RequestEmailChangeRequest;
|
|
2358
|
+
}, TContext>;
|
|
2359
|
+
request?: SecondParameter$4<typeof customFetch>;
|
|
2360
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof requestEmailChange>>, TError, {
|
|
2361
|
+
data?: RequestEmailChangeRequest;
|
|
2362
|
+
}, TContext>;
|
|
2363
|
+
declare const getRequestPasswordResetUrl: () => string;
|
|
2364
|
+
/**
|
|
2365
|
+
* Requests a password reset link to be sent to the user's email
|
|
2366
|
+
* @summary Request password reset
|
|
2367
|
+
*/
|
|
2368
|
+
declare const requestPasswordReset: (requestPasswordResetRequest?: RequestPasswordResetRequest, options?: RequestInit) => Promise<ChangePasswordResponse>;
|
|
2369
|
+
declare const getRequestPasswordResetMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
2370
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof requestPasswordReset>>, TError, {
|
|
2371
|
+
data?: RequestPasswordResetRequest;
|
|
2372
|
+
}, TContext>;
|
|
2373
|
+
request?: SecondParameter$4<typeof customFetch>;
|
|
2374
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof requestPasswordReset>>, TError, {
|
|
2375
|
+
data?: RequestPasswordResetRequest;
|
|
2376
|
+
}, TContext>;
|
|
2377
|
+
type RequestPasswordResetMutationResult = NonNullable<Awaited<ReturnType<typeof requestPasswordReset>>>;
|
|
2378
|
+
type RequestPasswordResetMutationBody = RequestPasswordResetRequest | undefined;
|
|
2379
|
+
type RequestPasswordResetMutationError = unknown;
|
|
2380
|
+
/**
|
|
2381
|
+
* @summary Request password reset
|
|
2382
|
+
*/
|
|
2383
|
+
declare const useRequestPasswordReset: <TError = unknown, TContext = unknown>(options?: {
|
|
2384
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof requestPasswordReset>>, TError, {
|
|
2385
|
+
data?: RequestPasswordResetRequest;
|
|
2386
|
+
}, TContext>;
|
|
2387
|
+
request?: SecondParameter$4<typeof customFetch>;
|
|
2388
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof requestPasswordReset>>, TError, {
|
|
2389
|
+
data?: RequestPasswordResetRequest;
|
|
2390
|
+
}, TContext>;
|
|
2391
|
+
declare const getSendEmailVerificationUrl: () => string;
|
|
2392
|
+
/**
|
|
2393
|
+
* Sends a verification email to the authenticated user
|
|
2394
|
+
* @summary Send email verification
|
|
2395
|
+
*/
|
|
2396
|
+
declare const sendEmailVerification: (sendEmailVerificationRequest?: SendEmailVerificationRequest, options?: RequestInit) => Promise<ChangePasswordResponse>;
|
|
2397
|
+
declare const getSendEmailVerificationMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
2398
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof sendEmailVerification>>, TError, {
|
|
2399
|
+
data?: SendEmailVerificationRequest;
|
|
2400
|
+
}, TContext>;
|
|
2401
|
+
request?: SecondParameter$4<typeof customFetch>;
|
|
2402
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof sendEmailVerification>>, TError, {
|
|
2403
|
+
data?: SendEmailVerificationRequest;
|
|
2404
|
+
}, TContext>;
|
|
2405
|
+
type SendEmailVerificationMutationResult = NonNullable<Awaited<ReturnType<typeof sendEmailVerification>>>;
|
|
2406
|
+
type SendEmailVerificationMutationBody = SendEmailVerificationRequest | undefined;
|
|
2407
|
+
type SendEmailVerificationMutationError = unknown;
|
|
2408
|
+
/**
|
|
2409
|
+
* @summary Send email verification
|
|
2410
|
+
*/
|
|
2411
|
+
declare const useSendEmailVerification: <TError = unknown, TContext = unknown>(options?: {
|
|
2412
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof sendEmailVerification>>, TError, {
|
|
2413
|
+
data?: SendEmailVerificationRequest;
|
|
2414
|
+
}, TContext>;
|
|
2415
|
+
request?: SecondParameter$4<typeof customFetch>;
|
|
2416
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof sendEmailVerification>>, TError, {
|
|
2417
|
+
data?: SendEmailVerificationRequest;
|
|
2418
|
+
}, TContext>;
|
|
2419
|
+
declare const getSignInUrl: () => string;
|
|
2420
|
+
/**
|
|
2421
|
+
* Authenticates a user with email and password
|
|
2422
|
+
* @summary Sign in
|
|
2423
|
+
*/
|
|
2424
|
+
declare const signIn: (signInRequest?: SignInRequest, options?: RequestInit) => Promise<SignInResponse>;
|
|
2425
|
+
declare const getSignInMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
2426
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof signIn>>, TError, {
|
|
2427
|
+
data?: SignInRequest;
|
|
2428
|
+
}, TContext>;
|
|
2429
|
+
request?: SecondParameter$4<typeof customFetch>;
|
|
2430
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof signIn>>, TError, {
|
|
2431
|
+
data?: SignInRequest;
|
|
2432
|
+
}, TContext>;
|
|
2433
|
+
type SignInMutationResult = NonNullable<Awaited<ReturnType<typeof signIn>>>;
|
|
2434
|
+
type SignInMutationBody = SignInRequest | undefined;
|
|
2435
|
+
type SignInMutationError = unknown;
|
|
2436
|
+
/**
|
|
2437
|
+
* @summary Sign in
|
|
2438
|
+
*/
|
|
2439
|
+
declare const useSignIn: <TError = unknown, TContext = unknown>(options?: {
|
|
2440
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof signIn>>, TError, {
|
|
2441
|
+
data?: SignInRequest;
|
|
2442
|
+
}, TContext>;
|
|
2443
|
+
request?: SecondParameter$4<typeof customFetch>;
|
|
2444
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof signIn>>, TError, {
|
|
2445
|
+
data?: SignInRequest;
|
|
2446
|
+
}, TContext>;
|
|
2447
|
+
declare const getSignUpUrl: () => string;
|
|
2448
|
+
/**
|
|
2449
|
+
* Registers a new user with email and password
|
|
2450
|
+
* @summary Register new user
|
|
2451
|
+
*/
|
|
2452
|
+
declare const signUp: (signUpRequest?: SignUpRequest, options?: RequestInit) => Promise<SignUpResponse>;
|
|
2453
|
+
declare const getSignUpMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
2454
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof signUp>>, TError, {
|
|
2455
|
+
data?: SignUpRequest;
|
|
2456
|
+
}, TContext>;
|
|
2457
|
+
request?: SecondParameter$4<typeof customFetch>;
|
|
2458
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof signUp>>, TError, {
|
|
2459
|
+
data?: SignUpRequest;
|
|
2460
|
+
}, TContext>;
|
|
2461
|
+
type SignUpMutationResult = NonNullable<Awaited<ReturnType<typeof signUp>>>;
|
|
2462
|
+
type SignUpMutationBody = SignUpRequest | undefined;
|
|
2463
|
+
type SignUpMutationError = unknown;
|
|
2464
|
+
/**
|
|
2465
|
+
* @summary Register new user
|
|
2466
|
+
*/
|
|
2467
|
+
declare const useSignUp: <TError = unknown, TContext = unknown>(options?: {
|
|
2468
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof signUp>>, TError, {
|
|
2469
|
+
data?: SignUpRequest;
|
|
2470
|
+
}, TContext>;
|
|
2471
|
+
request?: SecondParameter$4<typeof customFetch>;
|
|
2472
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof signUp>>, TError, {
|
|
2473
|
+
data?: SignUpRequest;
|
|
2474
|
+
}, TContext>;
|
|
2475
|
+
declare const getVerifyEmailUrl: () => string;
|
|
2476
|
+
/**
|
|
2477
|
+
* Verifies an email address or processes a password reset token using a verification token
|
|
2478
|
+
* @summary Verify email
|
|
2479
|
+
*/
|
|
2480
|
+
declare const verifyEmail: (options?: RequestInit) => Promise<ChangePasswordResponse>;
|
|
2481
|
+
declare const getVerifyEmailQueryKey: () => readonly ["/email-password/verify-email"];
|
|
2482
|
+
declare const getVerifyEmailQueryOptions: <TData = Awaited<ReturnType<typeof verifyEmail>>, TError = unknown>(options?: {
|
|
2483
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof verifyEmail>>, TError, TData>>;
|
|
2484
|
+
request?: SecondParameter$4<typeof customFetch>;
|
|
2485
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof verifyEmail>>, TError, TData> & {
|
|
2486
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
2487
|
+
};
|
|
2488
|
+
type VerifyEmailQueryResult = NonNullable<Awaited<ReturnType<typeof verifyEmail>>>;
|
|
2489
|
+
type VerifyEmailQueryError = unknown;
|
|
2490
|
+
declare function useVerifyEmail<TData = Awaited<ReturnType<typeof verifyEmail>>, TError = unknown>(options: {
|
|
2491
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof verifyEmail>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof verifyEmail>>, TError, Awaited<ReturnType<typeof verifyEmail>>>, "initialData">;
|
|
2492
|
+
request?: SecondParameter$4<typeof customFetch>;
|
|
2493
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
2494
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
2495
|
+
};
|
|
2496
|
+
declare function useVerifyEmail<TData = Awaited<ReturnType<typeof verifyEmail>>, TError = unknown>(options?: {
|
|
2497
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof verifyEmail>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof verifyEmail>>, TError, Awaited<ReturnType<typeof verifyEmail>>>, "initialData">;
|
|
2498
|
+
request?: SecondParameter$4<typeof customFetch>;
|
|
2499
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
2500
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
2501
|
+
};
|
|
2502
|
+
declare function useVerifyEmail<TData = Awaited<ReturnType<typeof verifyEmail>>, TError = unknown>(options?: {
|
|
2503
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof verifyEmail>>, TError, TData>>;
|
|
2504
|
+
request?: SecondParameter$4<typeof customFetch>;
|
|
2505
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
2506
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
553
2507
|
};
|
|
554
2508
|
//#endregion
|
|
555
2509
|
//#region src/plugins/email-password/plugin.d.ts
|
|
556
2510
|
declare class EmailPasswordPlugin implements Plugin {
|
|
557
2511
|
readonly id = "emailPassword";
|
|
558
|
-
init(client: AuthulaClient):
|
|
559
|
-
signUp: <T>(data: SignUpRequest) => Promise<T>;
|
|
560
|
-
signIn: <T>(data: SignInRequest) => Promise<T>;
|
|
561
|
-
sendEmailVerification: (data: SendEmailVerificationRequest) => Promise<void>;
|
|
562
|
-
requestPasswordReset: (data: RequestPasswordResetRequest) => Promise<void>;
|
|
563
|
-
changePassword: (data: ChangePasswordRequest) => Promise<void>;
|
|
564
|
-
requestEmailChange: (data: RequestEmailChangeRequest) => Promise<void>;
|
|
565
|
-
};
|
|
2512
|
+
init(client: AuthulaClient): typeof email_password_plugin_d_exports;
|
|
566
2513
|
}
|
|
567
2514
|
//#endregion
|
|
568
|
-
//#region src/plugins/
|
|
569
|
-
type
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
type MagicLinkVerifyRequest = {
|
|
578
|
-
token: string;
|
|
579
|
-
callbackUrl?: string;
|
|
580
|
-
};
|
|
581
|
-
type MagicLinkVerifyResponse = {
|
|
582
|
-
message: string;
|
|
583
|
-
token: string;
|
|
2515
|
+
//#region src/plugins/jwt/types.d.ts
|
|
2516
|
+
type JWTTokenType = "Bearer";
|
|
2517
|
+
/**
|
|
2518
|
+
* The type that is returned when using the `jwt.repond_json` capability.
|
|
2519
|
+
*/
|
|
2520
|
+
type JWTTokensResponse = {
|
|
2521
|
+
tokenType: JWTTokenType;
|
|
2522
|
+
accessToken: string;
|
|
2523
|
+
refreshToken?: string;
|
|
584
2524
|
};
|
|
585
|
-
|
|
586
|
-
|
|
2525
|
+
declare namespace magic_link_plugin_d_exports {
|
|
2526
|
+
export { ExchangeMagicLinkMutationBody, ExchangeMagicLinkMutationError, ExchangeMagicLinkMutationResult, SignInWithMagicLinkMutationBody, SignInWithMagicLinkMutationError, SignInWithMagicLinkMutationResult, VerifyMagicLinkQueryError, VerifyMagicLinkQueryResult, exchangeMagicLink, getExchangeMagicLinkMutationOptions, getExchangeMagicLinkUrl, getSignInWithMagicLinkMutationOptions, getSignInWithMagicLinkUrl, getVerifyMagicLinkQueryKey, getVerifyMagicLinkQueryOptions, getVerifyMagicLinkUrl, signInWithMagicLink, useExchangeMagicLink, useSignInWithMagicLink, useVerifyMagicLink, verifyMagicLink };
|
|
2527
|
+
}
|
|
2528
|
+
type SecondParameter$3<T extends (...args: never) => unknown> = Parameters<T>[1];
|
|
2529
|
+
declare const getExchangeMagicLinkUrl: () => string;
|
|
2530
|
+
/**
|
|
2531
|
+
* Exchanges a verified magic link token for an authenticated user session.
|
|
2532
|
+
* @summary Exchange magic link token for session
|
|
2533
|
+
*/
|
|
2534
|
+
declare const exchangeMagicLink: (magicLinkExchangeRequest?: MagicLinkExchangeRequest, options?: RequestInit) => Promise<MagicLinkExchangeResponse>;
|
|
2535
|
+
declare const getExchangeMagicLinkMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
2536
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof exchangeMagicLink>>, TError, {
|
|
2537
|
+
data?: MagicLinkExchangeRequest;
|
|
2538
|
+
}, TContext>;
|
|
2539
|
+
request?: SecondParameter$3<typeof customFetch>;
|
|
2540
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof exchangeMagicLink>>, TError, {
|
|
2541
|
+
data?: MagicLinkExchangeRequest;
|
|
2542
|
+
}, TContext>;
|
|
2543
|
+
type ExchangeMagicLinkMutationResult = NonNullable<Awaited<ReturnType<typeof exchangeMagicLink>>>;
|
|
2544
|
+
type ExchangeMagicLinkMutationBody = MagicLinkExchangeRequest | undefined;
|
|
2545
|
+
type ExchangeMagicLinkMutationError = unknown;
|
|
2546
|
+
/**
|
|
2547
|
+
* @summary Exchange magic link token for session
|
|
2548
|
+
*/
|
|
2549
|
+
declare const useExchangeMagicLink: <TError = unknown, TContext = unknown>(options?: {
|
|
2550
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof exchangeMagicLink>>, TError, {
|
|
2551
|
+
data?: MagicLinkExchangeRequest;
|
|
2552
|
+
}, TContext>;
|
|
2553
|
+
request?: SecondParameter$3<typeof customFetch>;
|
|
2554
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof exchangeMagicLink>>, TError, {
|
|
2555
|
+
data?: MagicLinkExchangeRequest;
|
|
2556
|
+
}, TContext>;
|
|
2557
|
+
declare const getSignInWithMagicLinkUrl: () => string;
|
|
2558
|
+
/**
|
|
2559
|
+
* Sends a magic link to the given email address if an account exists. Optionally creates a new account if sign-up is enabled.
|
|
2560
|
+
* @summary Sign in with magic link
|
|
2561
|
+
*/
|
|
2562
|
+
declare const signInWithMagicLink: (magicLinkSignInRequest?: MagicLinkSignInRequest, options?: RequestInit) => Promise<MagicLinkSignInResponse>;
|
|
2563
|
+
declare const getSignInWithMagicLinkMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
2564
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof signInWithMagicLink>>, TError, {
|
|
2565
|
+
data?: MagicLinkSignInRequest;
|
|
2566
|
+
}, TContext>;
|
|
2567
|
+
request?: SecondParameter$3<typeof customFetch>;
|
|
2568
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof signInWithMagicLink>>, TError, {
|
|
2569
|
+
data?: MagicLinkSignInRequest;
|
|
2570
|
+
}, TContext>;
|
|
2571
|
+
type SignInWithMagicLinkMutationResult = NonNullable<Awaited<ReturnType<typeof signInWithMagicLink>>>;
|
|
2572
|
+
type SignInWithMagicLinkMutationBody = MagicLinkSignInRequest | undefined;
|
|
2573
|
+
type SignInWithMagicLinkMutationError = unknown;
|
|
2574
|
+
/**
|
|
2575
|
+
* @summary Sign in with magic link
|
|
2576
|
+
*/
|
|
2577
|
+
declare const useSignInWithMagicLink: <TError = unknown, TContext = unknown>(options?: {
|
|
2578
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof signInWithMagicLink>>, TError, {
|
|
2579
|
+
data?: MagicLinkSignInRequest;
|
|
2580
|
+
}, TContext>;
|
|
2581
|
+
request?: SecondParameter$3<typeof customFetch>;
|
|
2582
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof signInWithMagicLink>>, TError, {
|
|
2583
|
+
data?: MagicLinkSignInRequest;
|
|
2584
|
+
}, TContext>;
|
|
2585
|
+
declare const getVerifyMagicLinkUrl: (params: VerifyMagicLinkParams) => string;
|
|
2586
|
+
/**
|
|
2587
|
+
* Verifies a magic link token. If a callback_url is provided and trusted, redirects the user with an exchange token appended. Otherwise returns the exchange token in the JSON response.
|
|
2588
|
+
* @summary Verify magic link token
|
|
2589
|
+
*/
|
|
2590
|
+
declare const verifyMagicLink: (params: VerifyMagicLinkParams, options?: RequestInit) => Promise<MagicLinkVerifyResponse>;
|
|
2591
|
+
declare const getVerifyMagicLinkQueryKey: (params?: VerifyMagicLinkParams) => readonly ["/magic-link/verify", ...VerifyMagicLinkParams[]];
|
|
2592
|
+
declare const getVerifyMagicLinkQueryOptions: <TData = Awaited<ReturnType<typeof verifyMagicLink>>, TError = unknown>(params: VerifyMagicLinkParams, options?: {
|
|
2593
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof verifyMagicLink>>, TError, TData>>;
|
|
2594
|
+
request?: SecondParameter$3<typeof customFetch>;
|
|
2595
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof verifyMagicLink>>, TError, TData> & {
|
|
2596
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
2597
|
+
};
|
|
2598
|
+
type VerifyMagicLinkQueryResult = NonNullable<Awaited<ReturnType<typeof verifyMagicLink>>>;
|
|
2599
|
+
type VerifyMagicLinkQueryError = unknown;
|
|
2600
|
+
declare function useVerifyMagicLink<TData = Awaited<ReturnType<typeof verifyMagicLink>>, TError = unknown>(params: VerifyMagicLinkParams, options: {
|
|
2601
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof verifyMagicLink>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof verifyMagicLink>>, TError, Awaited<ReturnType<typeof verifyMagicLink>>>, "initialData">;
|
|
2602
|
+
request?: SecondParameter$3<typeof customFetch>;
|
|
2603
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
2604
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
2605
|
+
};
|
|
2606
|
+
declare function useVerifyMagicLink<TData = Awaited<ReturnType<typeof verifyMagicLink>>, TError = unknown>(params: VerifyMagicLinkParams, options?: {
|
|
2607
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof verifyMagicLink>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof verifyMagicLink>>, TError, Awaited<ReturnType<typeof verifyMagicLink>>>, "initialData">;
|
|
2608
|
+
request?: SecondParameter$3<typeof customFetch>;
|
|
2609
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
2610
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
2611
|
+
};
|
|
2612
|
+
declare function useVerifyMagicLink<TData = Awaited<ReturnType<typeof verifyMagicLink>>, TError = unknown>(params: VerifyMagicLinkParams, options?: {
|
|
2613
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof verifyMagicLink>>, TError, TData>>;
|
|
2614
|
+
request?: SecondParameter$3<typeof customFetch>;
|
|
2615
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
2616
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
587
2617
|
};
|
|
588
2618
|
//#endregion
|
|
589
2619
|
//#region src/plugins/magic-link/plugin.d.ts
|
|
590
2620
|
declare class MagicLinkPlugin implements Plugin {
|
|
591
2621
|
readonly id = "magicLink";
|
|
592
2622
|
constructor();
|
|
593
|
-
init(client: AuthulaClient):
|
|
594
|
-
signIn: (data: MagicLinkSignInRequest) => Promise<MagicLinkSignInResponse>;
|
|
595
|
-
verify: (data: MagicLinkVerifyRequest) => Promise<MagicLinkVerifyResponse>;
|
|
596
|
-
exchange: <T>(data: MagicLinkExchangeRequest) => Promise<T>;
|
|
597
|
-
};
|
|
2623
|
+
init(client: AuthulaClient): typeof magic_link_plugin_d_exports;
|
|
598
2624
|
}
|
|
599
|
-
|
|
600
|
-
|
|
2625
|
+
declare namespace oauth2_plugin_d_exports {
|
|
2626
|
+
export { OauthAuthorizeQueryError, OauthAuthorizeQueryResult, OauthCallbackQueryError, OauthCallbackQueryResult, getOauthAuthorizeQueryKey, getOauthAuthorizeQueryOptions, getOauthAuthorizeUrl, getOauthCallbackQueryKey, getOauthCallbackQueryOptions, getOauthCallbackUrl, oauthAuthorize, oauthCallback, useOauthAuthorize, useOauthCallback };
|
|
2627
|
+
}
|
|
2628
|
+
type SecondParameter$2<T extends (...args: never) => unknown> = Parameters<T>[1];
|
|
2629
|
+
declare const getOauthAuthorizeUrl: (provider: string, params?: OauthAuthorizeParams) => string;
|
|
601
2630
|
/**
|
|
602
|
-
* OAuth2 provider
|
|
2631
|
+
* Initiates the OAuth2 authorization flow with the specified provider. Returns the provider's authorization URL to redirect the user to.
|
|
2632
|
+
* @summary Authorize with OAuth2 provider
|
|
603
2633
|
*/
|
|
604
|
-
|
|
2634
|
+
declare const oauthAuthorize: (provider: string, params?: OauthAuthorizeParams, options?: RequestInit) => Promise<AuthorizeResponse>;
|
|
2635
|
+
declare const getOauthAuthorizeQueryKey: (provider: string, params?: OauthAuthorizeParams) => readonly [`/oauth2/authorize/${string}`, ...OauthAuthorizeParams[]];
|
|
2636
|
+
declare const getOauthAuthorizeQueryOptions: <TData = Awaited<ReturnType<typeof oauthAuthorize>>, TError = unknown>(provider: string, params?: OauthAuthorizeParams, options?: {
|
|
2637
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof oauthAuthorize>>, TError, TData>>;
|
|
2638
|
+
request?: SecondParameter$2<typeof customFetch>;
|
|
2639
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof oauthAuthorize>>, TError, TData> & {
|
|
2640
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
2641
|
+
};
|
|
2642
|
+
type OauthAuthorizeQueryResult = NonNullable<Awaited<ReturnType<typeof oauthAuthorize>>>;
|
|
2643
|
+
type OauthAuthorizeQueryError = unknown;
|
|
2644
|
+
declare function useOauthAuthorize<TData = Awaited<ReturnType<typeof oauthAuthorize>>, TError = unknown>(provider: string, params: undefined | OauthAuthorizeParams, options: {
|
|
2645
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof oauthAuthorize>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof oauthAuthorize>>, TError, Awaited<ReturnType<typeof oauthAuthorize>>>, "initialData">;
|
|
2646
|
+
request?: SecondParameter$2<typeof customFetch>;
|
|
2647
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
2648
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
2649
|
+
};
|
|
2650
|
+
declare function useOauthAuthorize<TData = Awaited<ReturnType<typeof oauthAuthorize>>, TError = unknown>(provider: string, params?: OauthAuthorizeParams, options?: {
|
|
2651
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof oauthAuthorize>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof oauthAuthorize>>, TError, Awaited<ReturnType<typeof oauthAuthorize>>>, "initialData">;
|
|
2652
|
+
request?: SecondParameter$2<typeof customFetch>;
|
|
2653
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
2654
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
2655
|
+
};
|
|
2656
|
+
declare function useOauthAuthorize<TData = Awaited<ReturnType<typeof oauthAuthorize>>, TError = unknown>(provider: string, params?: OauthAuthorizeParams, options?: {
|
|
2657
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof oauthAuthorize>>, TError, TData>>;
|
|
2658
|
+
request?: SecondParameter$2<typeof customFetch>;
|
|
2659
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
2660
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
2661
|
+
};
|
|
2662
|
+
declare const getOauthCallbackUrl: (provider: string, params: OauthCallbackParams) => string;
|
|
605
2663
|
/**
|
|
606
|
-
* OAuth2 authorization
|
|
2664
|
+
* Handles the OAuth2 callback from the provider. Exchanges the authorization code for tokens, creates or links a user account, and returns the authenticated user and session.
|
|
2665
|
+
* @summary OAuth2 callback
|
|
607
2666
|
*/
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
2667
|
+
declare const oauthCallback: (provider: string, params: OauthCallbackParams, options?: RequestInit) => Promise<CallbackResponse>;
|
|
2668
|
+
declare const getOauthCallbackQueryKey: (provider: string, params?: OauthCallbackParams) => readonly [`/oauth2/callback/${string}`, ...OauthCallbackParams[]];
|
|
2669
|
+
declare const getOauthCallbackQueryOptions: <TData = Awaited<ReturnType<typeof oauthCallback>>, TError = unknown>(provider: string, params: OauthCallbackParams, options?: {
|
|
2670
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof oauthCallback>>, TError, TData>>;
|
|
2671
|
+
request?: SecondParameter$2<typeof customFetch>;
|
|
2672
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof oauthCallback>>, TError, TData> & {
|
|
2673
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
2674
|
+
};
|
|
2675
|
+
type OauthCallbackQueryResult = NonNullable<Awaited<ReturnType<typeof oauthCallback>>>;
|
|
2676
|
+
type OauthCallbackQueryError = unknown;
|
|
2677
|
+
declare function useOauthCallback<TData = Awaited<ReturnType<typeof oauthCallback>>, TError = unknown>(provider: string, params: OauthCallbackParams, options: {
|
|
2678
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof oauthCallback>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof oauthCallback>>, TError, Awaited<ReturnType<typeof oauthCallback>>>, "initialData">;
|
|
2679
|
+
request?: SecondParameter$2<typeof customFetch>;
|
|
2680
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
2681
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
2682
|
+
};
|
|
2683
|
+
declare function useOauthCallback<TData = Awaited<ReturnType<typeof oauthCallback>>, TError = unknown>(provider: string, params: OauthCallbackParams, options?: {
|
|
2684
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof oauthCallback>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof oauthCallback>>, TError, Awaited<ReturnType<typeof oauthCallback>>>, "initialData">;
|
|
2685
|
+
request?: SecondParameter$2<typeof customFetch>;
|
|
2686
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
2687
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
2688
|
+
};
|
|
2689
|
+
declare function useOauthCallback<TData = Awaited<ReturnType<typeof oauthCallback>>, TError = unknown>(provider: string, params: OauthCallbackParams, options?: {
|
|
2690
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof oauthCallback>>, TError, TData>>;
|
|
2691
|
+
request?: SecondParameter$2<typeof customFetch>;
|
|
2692
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
2693
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
614
2694
|
};
|
|
615
2695
|
//#endregion
|
|
616
2696
|
//#region src/plugins/oauth2/plugin.d.ts
|
|
617
2697
|
declare class OAuth2Plugin implements Plugin {
|
|
618
2698
|
readonly id = "oauth2";
|
|
619
|
-
init(client: AuthulaClient):
|
|
620
|
-
signIn: (data: SignInWithOAuth2Request) => Promise<SignInWithOAuth2Response>;
|
|
621
|
-
};
|
|
2699
|
+
init(client: AuthulaClient): typeof oauth2_plugin_d_exports;
|
|
622
2700
|
}
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
2701
|
+
declare namespace organizations_d_exports {
|
|
2702
|
+
export { CreateOrganizationMutationBody, CreateOrganizationMutationError, CreateOrganizationMutationResult, DeleteOrganizationMutationError, DeleteOrganizationMutationResult, GetOrganizationQueryError, GetOrganizationQueryResult, ListOrganizationsQueryError, ListOrganizationsQueryResult, UpdateOrganizationMutationBody, UpdateOrganizationMutationError, UpdateOrganizationMutationResult, createOrganization, deleteOrganization, getCreateOrganizationMutationOptions, getCreateOrganizationUrl, getDeleteOrganizationMutationOptions, getDeleteOrganizationUrl, getGetOrganizationQueryKey, getGetOrganizationQueryOptions, getGetOrganizationUrl, getListOrganizationsQueryKey, getListOrganizationsQueryOptions, getListOrganizationsUrl, getOrganization, getUpdateOrganizationMutationOptions, getUpdateOrganizationUrl, listOrganizations, updateOrganization, useCreateOrganization, useDeleteOrganization, useGetOrganization, useListOrganizations, useUpdateOrganization };
|
|
2703
|
+
}
|
|
2704
|
+
type SecondParameter$1<T extends (...args: never) => unknown> = Parameters<T>[1];
|
|
2705
|
+
declare const getListOrganizationsUrl: () => string;
|
|
2706
|
+
/**
|
|
2707
|
+
* Lists all organizations owned by the authenticated user.
|
|
2708
|
+
* @summary List organizations
|
|
2709
|
+
*/
|
|
2710
|
+
declare const listOrganizations: (options?: RequestInit) => Promise<Organization[] | null>;
|
|
2711
|
+
declare const getListOrganizationsQueryKey: () => readonly ["/organizations"];
|
|
2712
|
+
declare const getListOrganizationsQueryOptions: <TData = Awaited<ReturnType<typeof listOrganizations>>, TError = unknown>(options?: {
|
|
2713
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listOrganizations>>, TError, TData>>;
|
|
2714
|
+
request?: SecondParameter$1<typeof customFetch>;
|
|
2715
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof listOrganizations>>, TError, TData> & {
|
|
2716
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
2717
|
+
};
|
|
2718
|
+
type ListOrganizationsQueryResult = NonNullable<Awaited<ReturnType<typeof listOrganizations>>>;
|
|
2719
|
+
type ListOrganizationsQueryError = unknown;
|
|
2720
|
+
declare function useListOrganizations<TData = Awaited<ReturnType<typeof listOrganizations>>, TError = unknown>(options: {
|
|
2721
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof listOrganizations>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof listOrganizations>>, TError, Awaited<ReturnType<typeof listOrganizations>>>, "initialData">;
|
|
2722
|
+
request?: SecondParameter$1<typeof customFetch>;
|
|
2723
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
2724
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
2725
|
+
};
|
|
2726
|
+
declare function useListOrganizations<TData = Awaited<ReturnType<typeof listOrganizations>>, TError = unknown>(options?: {
|
|
2727
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listOrganizations>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof listOrganizations>>, TError, Awaited<ReturnType<typeof listOrganizations>>>, "initialData">;
|
|
2728
|
+
request?: SecondParameter$1<typeof customFetch>;
|
|
2729
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
2730
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
2731
|
+
};
|
|
2732
|
+
declare function useListOrganizations<TData = Awaited<ReturnType<typeof listOrganizations>>, TError = unknown>(options?: {
|
|
2733
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listOrganizations>>, TError, TData>>;
|
|
2734
|
+
request?: SecondParameter$1<typeof customFetch>;
|
|
2735
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
2736
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
2737
|
+
};
|
|
2738
|
+
declare const getCreateOrganizationUrl: () => string;
|
|
2739
|
+
/**
|
|
2740
|
+
* Creates a new organization with the authenticated user as the owner.
|
|
2741
|
+
* @summary Create organization
|
|
2742
|
+
*/
|
|
2743
|
+
declare const createOrganization: (createOrganizationRequest?: CreateOrganizationRequest, options?: RequestInit) => Promise<Organization>;
|
|
2744
|
+
declare const getCreateOrganizationMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
2745
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof createOrganization>>, TError, {
|
|
2746
|
+
data?: CreateOrganizationRequest;
|
|
2747
|
+
}, TContext>;
|
|
2748
|
+
request?: SecondParameter$1<typeof customFetch>;
|
|
2749
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof createOrganization>>, TError, {
|
|
2750
|
+
data?: CreateOrganizationRequest;
|
|
2751
|
+
}, TContext>;
|
|
2752
|
+
type CreateOrganizationMutationResult = NonNullable<Awaited<ReturnType<typeof createOrganization>>>;
|
|
2753
|
+
type CreateOrganizationMutationBody = CreateOrganizationRequest | undefined;
|
|
2754
|
+
type CreateOrganizationMutationError = unknown;
|
|
2755
|
+
/**
|
|
2756
|
+
* @summary Create organization
|
|
2757
|
+
*/
|
|
2758
|
+
declare const useCreateOrganization: <TError = unknown, TContext = unknown>(options?: {
|
|
2759
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof createOrganization>>, TError, {
|
|
2760
|
+
data?: CreateOrganizationRequest;
|
|
2761
|
+
}, TContext>;
|
|
2762
|
+
request?: SecondParameter$1<typeof customFetch>;
|
|
2763
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof createOrganization>>, TError, {
|
|
2764
|
+
data?: CreateOrganizationRequest;
|
|
2765
|
+
}, TContext>;
|
|
2766
|
+
declare const getGetOrganizationUrl: (organizationId: string) => string;
|
|
2767
|
+
/**
|
|
2768
|
+
* Retrieves an organization by its ID.
|
|
2769
|
+
* @summary Get organization
|
|
2770
|
+
*/
|
|
2771
|
+
declare const getOrganization: (organizationId: string, options?: RequestInit) => Promise<Organization>;
|
|
2772
|
+
declare const getGetOrganizationQueryKey: (organizationId: string) => readonly [`/organizations/${string}`];
|
|
2773
|
+
declare const getGetOrganizationQueryOptions: <TData = Awaited<ReturnType<typeof getOrganization>>, TError = unknown>(organizationId: string, options?: {
|
|
2774
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganization>>, TError, TData>>;
|
|
2775
|
+
request?: SecondParameter$1<typeof customFetch>;
|
|
2776
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof getOrganization>>, TError, TData> & {
|
|
2777
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
2778
|
+
};
|
|
2779
|
+
type GetOrganizationQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganization>>>;
|
|
2780
|
+
type GetOrganizationQueryError = unknown;
|
|
2781
|
+
declare function useGetOrganization<TData = Awaited<ReturnType<typeof getOrganization>>, TError = unknown>(organizationId: string, options: {
|
|
2782
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganization>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getOrganization>>, TError, Awaited<ReturnType<typeof getOrganization>>>, "initialData">;
|
|
2783
|
+
request?: SecondParameter$1<typeof customFetch>;
|
|
2784
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
2785
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
2786
|
+
};
|
|
2787
|
+
declare function useGetOrganization<TData = Awaited<ReturnType<typeof getOrganization>>, TError = unknown>(organizationId: string, options?: {
|
|
2788
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganization>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getOrganization>>, TError, Awaited<ReturnType<typeof getOrganization>>>, "initialData">;
|
|
2789
|
+
request?: SecondParameter$1<typeof customFetch>;
|
|
2790
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
2791
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
2792
|
+
};
|
|
2793
|
+
declare function useGetOrganization<TData = Awaited<ReturnType<typeof getOrganization>>, TError = unknown>(organizationId: string, options?: {
|
|
2794
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganization>>, TError, TData>>;
|
|
2795
|
+
request?: SecondParameter$1<typeof customFetch>;
|
|
2796
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
2797
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
2798
|
+
};
|
|
2799
|
+
declare const getDeleteOrganizationUrl: (organizationId: string) => string;
|
|
2800
|
+
/**
|
|
2801
|
+
* Deletes an organization.
|
|
2802
|
+
* @summary Delete organization
|
|
2803
|
+
*/
|
|
2804
|
+
declare const deleteOrganization: (organizationId: string, options?: RequestInit) => Promise<DeleteOrganizationResponse>;
|
|
2805
|
+
declare const getDeleteOrganizationMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
2806
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof deleteOrganization>>, TError, {
|
|
2807
|
+
organizationId: string;
|
|
2808
|
+
}, TContext>;
|
|
2809
|
+
request?: SecondParameter$1<typeof customFetch>;
|
|
2810
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof deleteOrganization>>, TError, {
|
|
640
2811
|
organizationId: string;
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
2812
|
+
}, TContext>;
|
|
2813
|
+
type DeleteOrganizationMutationResult = NonNullable<Awaited<ReturnType<typeof deleteOrganization>>>;
|
|
2814
|
+
type DeleteOrganizationMutationError = unknown;
|
|
2815
|
+
/**
|
|
2816
|
+
* @summary Delete organization
|
|
2817
|
+
*/
|
|
2818
|
+
declare const useDeleteOrganization: <TError = unknown, TContext = unknown>(options?: {
|
|
2819
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof deleteOrganization>>, TError, {
|
|
2820
|
+
organizationId: string;
|
|
2821
|
+
}, TContext>;
|
|
2822
|
+
request?: SecondParameter$1<typeof customFetch>;
|
|
2823
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof deleteOrganization>>, TError, {
|
|
649
2824
|
organizationId: string;
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
2825
|
+
}, TContext>;
|
|
2826
|
+
declare const getUpdateOrganizationUrl: (organizationId: string) => string;
|
|
2827
|
+
/**
|
|
2828
|
+
* Updates an existing organization.
|
|
2829
|
+
* @summary Update organization
|
|
2830
|
+
*/
|
|
2831
|
+
declare const updateOrganization: (organizationId: string, updateOrganizationRequest?: UpdateOrganizationRequest, options?: RequestInit) => Promise<Organization>;
|
|
2832
|
+
declare const getUpdateOrganizationMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
2833
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof updateOrganization>>, TError, {
|
|
2834
|
+
organizationId: string;
|
|
2835
|
+
data?: UpdateOrganizationRequest;
|
|
2836
|
+
}, TContext>;
|
|
2837
|
+
request?: SecondParameter$1<typeof customFetch>;
|
|
2838
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof updateOrganization>>, TError, {
|
|
657
2839
|
organizationId: string;
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
}
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
metadata?: Record<string, unknown> | null;
|
|
677
|
-
};
|
|
678
|
-
type CreateOrganizationResponse = Organization;
|
|
679
|
-
type GetAllOrganizationsResponse = Array<Organization>;
|
|
680
|
-
type GetOrganizationByIdResponse = Organization;
|
|
681
|
-
type UpdateOrganizationRequest = {
|
|
682
|
-
name: string;
|
|
683
|
-
slug?: string | null;
|
|
684
|
-
logo?: string | null;
|
|
685
|
-
metadata?: Record<string, unknown> | null;
|
|
686
|
-
};
|
|
687
|
-
type UpdateOrganizationResponse = Organization;
|
|
688
|
-
type DeleteOrganizationResponse = {
|
|
689
|
-
message: string;
|
|
690
|
-
};
|
|
691
|
-
type AddOrganizationMemberRequest = {
|
|
692
|
-
userId: string;
|
|
693
|
-
role: string;
|
|
694
|
-
};
|
|
695
|
-
type AddOrganizationMemberResponse = OrganizationMember;
|
|
696
|
-
type GetOrganizationMembersResponse = Array<OrganizationMember>;
|
|
697
|
-
type GetOrganizationMemberResponse = OrganizationMember;
|
|
698
|
-
type UpdateOrganizationMemberRequest = {
|
|
699
|
-
role: string;
|
|
700
|
-
};
|
|
701
|
-
type UpdateOrganizationMemberResponse = OrganizationMember;
|
|
702
|
-
type DeleteOrganizationMemberResponse = {
|
|
703
|
-
message: string;
|
|
704
|
-
};
|
|
705
|
-
type CreateOrganizationTeamRequest = {
|
|
706
|
-
name: string;
|
|
707
|
-
slug?: string | null;
|
|
708
|
-
description?: string | null;
|
|
709
|
-
metadata?: Record<string, unknown> | null;
|
|
710
|
-
};
|
|
711
|
-
type CreateOrganizationTeamResponse = OrganizationTeam;
|
|
712
|
-
type GetAllOrganizationTeamsResponse = Array<OrganizationTeam>;
|
|
713
|
-
type GetOrganizationTeamResponse = OrganizationTeam;
|
|
714
|
-
type UpdateOrganizationTeamRequest = {
|
|
715
|
-
name: string;
|
|
716
|
-
slug?: string | null;
|
|
717
|
-
description?: string | null;
|
|
718
|
-
metadata?: Record<string, unknown> | null;
|
|
719
|
-
};
|
|
720
|
-
type UpdateOrganizationTeamResponse = OrganizationTeam;
|
|
721
|
-
type DeleteOrganizationTeamResponse = {
|
|
722
|
-
message: string;
|
|
723
|
-
};
|
|
724
|
-
type AddOrganizationTeamMemberRequest = {
|
|
725
|
-
memberId: string;
|
|
726
|
-
};
|
|
727
|
-
type AddOrganizationTeamMemberResponse = OrganizationTeamMember;
|
|
728
|
-
type GetAllOrganizationTeamMembersResponse = Array<OrganizationTeamMember>;
|
|
729
|
-
type GetOrganizationTeamMemberResponse = OrganizationTeamMember;
|
|
730
|
-
type DeleteOrganizationTeamMemberResponse = {
|
|
731
|
-
message: string;
|
|
732
|
-
};
|
|
733
|
-
type CreateOrganizationInvitationRequest = {
|
|
734
|
-
email: string;
|
|
735
|
-
role: string;
|
|
736
|
-
redirectUrl?: string;
|
|
737
|
-
};
|
|
738
|
-
type CreateOrganizationInvitationResponse = OrganizationInvitation;
|
|
739
|
-
type GetAllOrganizationInvitationsResponse = Array<OrganizationInvitation>;
|
|
740
|
-
type GetOrganizationInvitationResponse = OrganizationInvitation;
|
|
741
|
-
type RevokeOrganizationInvitationResponse = OrganizationInvitation;
|
|
742
|
-
type AcceptOrganizationInvitationRequest = {
|
|
743
|
-
redirectUrl?: string;
|
|
744
|
-
};
|
|
745
|
-
type AcceptOrganizationInvitationResponse = OrganizationInvitation;
|
|
746
|
-
type RejectOrganizationInvitationResponse = OrganizationInvitation;
|
|
2840
|
+
data?: UpdateOrganizationRequest;
|
|
2841
|
+
}, TContext>;
|
|
2842
|
+
type UpdateOrganizationMutationResult = NonNullable<Awaited<ReturnType<typeof updateOrganization>>>;
|
|
2843
|
+
type UpdateOrganizationMutationBody = UpdateOrganizationRequest | undefined;
|
|
2844
|
+
type UpdateOrganizationMutationError = unknown;
|
|
2845
|
+
/**
|
|
2846
|
+
* @summary Update organization
|
|
2847
|
+
*/
|
|
2848
|
+
declare const useUpdateOrganization: <TError = unknown, TContext = unknown>(options?: {
|
|
2849
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof updateOrganization>>, TError, {
|
|
2850
|
+
organizationId: string;
|
|
2851
|
+
data?: UpdateOrganizationRequest;
|
|
2852
|
+
}, TContext>;
|
|
2853
|
+
request?: SecondParameter$1<typeof customFetch>;
|
|
2854
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof updateOrganization>>, TError, {
|
|
2855
|
+
organizationId: string;
|
|
2856
|
+
data?: UpdateOrganizationRequest;
|
|
2857
|
+
}, TContext>;
|
|
747
2858
|
//#endregion
|
|
748
2859
|
//#region src/plugins/organizations/plugin.d.ts
|
|
749
2860
|
declare class OrganizationsPlugin implements Plugin {
|
|
750
2861
|
readonly id = "organizations";
|
|
751
|
-
init(client: AuthulaClient):
|
|
752
|
-
createOrganization: (data: CreateOrganizationRequest) => Promise<CreateOrganizationResponse>;
|
|
753
|
-
getAllOrganizations: () => Promise<GetAllOrganizationsResponse>;
|
|
754
|
-
getOrganizationById: (organizationId: string) => Promise<GetOrganizationByIdResponse>;
|
|
755
|
-
updateOrganization: (organizationId: string, data: UpdateOrganizationRequest) => Promise<UpdateOrganizationResponse>;
|
|
756
|
-
deleteOrganization: (organizationId: string) => Promise<DeleteOrganizationResponse>;
|
|
757
|
-
createOrganizationInvitation: (organizationId: string, data: CreateOrganizationInvitationRequest) => Promise<CreateOrganizationInvitationResponse>;
|
|
758
|
-
getAllOrganizationInvitations: (organizationId: string) => Promise<GetAllOrganizationInvitationsResponse>;
|
|
759
|
-
getOrganizationInvitation: (organizationId: string, invitationId: string) => Promise<GetOrganizationInvitationResponse>;
|
|
760
|
-
revokeOrganizationInvitation: (organizationId: string, invitationId: string) => Promise<RevokeOrganizationInvitationResponse>;
|
|
761
|
-
acceptOrganizationInvitation: (organizationId: string, invitationId: string, data?: AcceptOrganizationInvitationRequest) => Promise<AcceptOrganizationInvitationResponse>;
|
|
762
|
-
rejectOrganizationInvitation: (organizationId: string, invitationId: string) => Promise<RejectOrganizationInvitationResponse>;
|
|
763
|
-
addOrganizationMember: (organizationId: string, data: AddOrganizationMemberRequest) => Promise<AddOrganizationMemberResponse>;
|
|
764
|
-
getAllOrganizationMembers: (organizationId: string) => Promise<GetOrganizationMembersResponse>;
|
|
765
|
-
getOrganizationMember: (organizationId: string, memberId: string) => Promise<GetOrganizationMemberResponse>;
|
|
766
|
-
updateOrganizationMember: (organizationId: string, memberId: string, data: UpdateOrganizationMemberRequest) => Promise<UpdateOrganizationMemberResponse>;
|
|
767
|
-
deleteOrganizationMember: (organizationId: string, memberId: string) => Promise<DeleteOrganizationMemberResponse>;
|
|
768
|
-
createOrganizationTeam: (organizationId: string, data: CreateOrganizationTeamRequest) => Promise<CreateOrganizationTeamResponse>;
|
|
769
|
-
getAllOrganizationTeams: (organizationId: string) => Promise<GetAllOrganizationTeamsResponse>;
|
|
770
|
-
getOrganizationTeam: (organizationId: string, teamId: string) => Promise<GetOrganizationTeamResponse>;
|
|
771
|
-
updateOrganizationTeam: (organizationId: string, teamId: string, data: UpdateOrganizationTeamRequest) => Promise<UpdateOrganizationTeamResponse>;
|
|
772
|
-
deleteOrganizationTeam: (organizationId: string, teamId: string) => Promise<DeleteOrganizationTeamResponse>;
|
|
773
|
-
addOrganizationTeamMember: (organizationId: string, teamId: string, data: AddOrganizationTeamMemberRequest) => Promise<AddOrganizationTeamMemberResponse>;
|
|
774
|
-
getAllOrganizationTeamMembers: (organizationId: string, teamId: string) => Promise<GetAllOrganizationTeamMembersResponse>;
|
|
775
|
-
getOrganizationTeamMember: (organizationId: string, teamId: string, memberId: string) => Promise<GetOrganizationTeamMemberResponse>;
|
|
776
|
-
deleteOrganizationTeamMember: (organizationId: string, teamId: string, memberId: string) => Promise<DeleteOrganizationTeamMemberResponse>;
|
|
777
|
-
};
|
|
2862
|
+
init(client: AuthulaClient): typeof organizations_d_exports;
|
|
778
2863
|
}
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
2864
|
+
declare namespace totp_plugin_d_exports {
|
|
2865
|
+
export { DisableTotpMutationError, DisableTotpMutationResult, EnableTotpMutationError, EnableTotpMutationResult, GenerateTotpBackupCodesMutationError, GenerateTotpBackupCodesMutationResult, GetTotpURIQueryError, GetTotpURIQueryResult, VerifyTotpBackupCodeMutationBody, VerifyTotpBackupCodeMutationError, VerifyTotpBackupCodeMutationResult, VerifyTotpMutationBody, VerifyTotpMutationError, VerifyTotpMutationResult, disableTotp, enableTotp, generateTotpBackupCodes, getDisableTotpMutationOptions, getDisableTotpUrl, getEnableTotpMutationOptions, getEnableTotpUrl, getGenerateTotpBackupCodesMutationOptions, getGenerateTotpBackupCodesUrl, getGetTotpURIQueryKey, getGetTotpURIQueryOptions, getGetTotpURIUrl, getTotpURI, getVerifyTotpBackupCodeMutationOptions, getVerifyTotpBackupCodeUrl, getVerifyTotpMutationOptions, getVerifyTotpUrl, useDisableTotp, useEnableTotp, useGenerateTotpBackupCodes, useGetTotpURI, useVerifyTotp, useVerifyTotpBackupCode, verifyTotp, verifyTotpBackupCode };
|
|
2866
|
+
}
|
|
2867
|
+
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
|
2868
|
+
declare const getDisableTotpUrl: () => string;
|
|
2869
|
+
/**
|
|
2870
|
+
* Disables TOTP two-factor authentication for the authenticated user.
|
|
2871
|
+
* @summary Disable TOTP
|
|
2872
|
+
*/
|
|
2873
|
+
declare const disableTotp: (options?: RequestInit) => Promise<DisableResponse>;
|
|
2874
|
+
declare const getDisableTotpMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
2875
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof disableTotp>>, TError, void, TContext>;
|
|
2876
|
+
request?: SecondParameter<typeof customFetch>;
|
|
2877
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof disableTotp>>, TError, void, TContext>;
|
|
2878
|
+
type DisableTotpMutationResult = NonNullable<Awaited<ReturnType<typeof disableTotp>>>;
|
|
2879
|
+
type DisableTotpMutationError = unknown;
|
|
2880
|
+
/**
|
|
2881
|
+
* @summary Disable TOTP
|
|
2882
|
+
*/
|
|
2883
|
+
declare const useDisableTotp: <TError = unknown, TContext = unknown>(options?: {
|
|
2884
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof disableTotp>>, TError, void, TContext>;
|
|
2885
|
+
request?: SecondParameter<typeof customFetch>;
|
|
2886
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof disableTotp>>, TError, void, TContext>;
|
|
2887
|
+
declare const getEnableTotpUrl: () => string;
|
|
2888
|
+
/**
|
|
2889
|
+
* Enables TOTP two-factor authentication for the authenticated user. Returns the TOTP URI and backup codes.
|
|
2890
|
+
* @summary Enable TOTP
|
|
2891
|
+
*/
|
|
2892
|
+
declare const enableTotp: (options?: RequestInit) => Promise<EnableResponse>;
|
|
2893
|
+
declare const getEnableTotpMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
2894
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof enableTotp>>, TError, void, TContext>;
|
|
2895
|
+
request?: SecondParameter<typeof customFetch>;
|
|
2896
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof enableTotp>>, TError, void, TContext>;
|
|
2897
|
+
type EnableTotpMutationResult = NonNullable<Awaited<ReturnType<typeof enableTotp>>>;
|
|
2898
|
+
type EnableTotpMutationError = unknown;
|
|
2899
|
+
/**
|
|
2900
|
+
* @summary Enable TOTP
|
|
2901
|
+
*/
|
|
2902
|
+
declare const useEnableTotp: <TError = unknown, TContext = unknown>(options?: {
|
|
2903
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof enableTotp>>, TError, void, TContext>;
|
|
2904
|
+
request?: SecondParameter<typeof customFetch>;
|
|
2905
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof enableTotp>>, TError, void, TContext>;
|
|
2906
|
+
declare const getGenerateTotpBackupCodesUrl: () => string;
|
|
2907
|
+
/**
|
|
2908
|
+
* Generates a new set of backup codes for the authenticated user. Previous backup codes are invalidated.
|
|
2909
|
+
* @summary Generate backup codes
|
|
2910
|
+
*/
|
|
2911
|
+
declare const generateTotpBackupCodes: (options?: RequestInit) => Promise<GenerateBackupCodesResponse>;
|
|
2912
|
+
declare const getGenerateTotpBackupCodesMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
2913
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof generateTotpBackupCodes>>, TError, void, TContext>;
|
|
2914
|
+
request?: SecondParameter<typeof customFetch>;
|
|
2915
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof generateTotpBackupCodes>>, TError, void, TContext>;
|
|
2916
|
+
type GenerateTotpBackupCodesMutationResult = NonNullable<Awaited<ReturnType<typeof generateTotpBackupCodes>>>;
|
|
2917
|
+
type GenerateTotpBackupCodesMutationError = unknown;
|
|
2918
|
+
/**
|
|
2919
|
+
* @summary Generate backup codes
|
|
2920
|
+
*/
|
|
2921
|
+
declare const useGenerateTotpBackupCodes: <TError = unknown, TContext = unknown>(options?: {
|
|
2922
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof generateTotpBackupCodes>>, TError, void, TContext>;
|
|
2923
|
+
request?: SecondParameter<typeof customFetch>;
|
|
2924
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof generateTotpBackupCodes>>, TError, void, TContext>;
|
|
2925
|
+
declare const getGetTotpURIUrl: () => string;
|
|
2926
|
+
/**
|
|
2927
|
+
* Returns the current TOTP URI for the authenticated user's authenticator app configuration.
|
|
2928
|
+
* @summary Get TOTP URI
|
|
2929
|
+
*/
|
|
2930
|
+
declare const getTotpURI: (options?: RequestInit) => Promise<GetTOTPURIResponse>;
|
|
2931
|
+
declare const getGetTotpURIQueryKey: () => readonly ["/totp/get-uri"];
|
|
2932
|
+
declare const getGetTotpURIQueryOptions: <TData = Awaited<ReturnType<typeof getTotpURI>>, TError = unknown>(options?: {
|
|
2933
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getTotpURI>>, TError, TData>>;
|
|
2934
|
+
request?: SecondParameter<typeof customFetch>;
|
|
2935
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof getTotpURI>>, TError, TData> & {
|
|
2936
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
2937
|
+
};
|
|
2938
|
+
type GetTotpURIQueryResult = NonNullable<Awaited<ReturnType<typeof getTotpURI>>>;
|
|
2939
|
+
type GetTotpURIQueryError = unknown;
|
|
2940
|
+
declare function useGetTotpURI<TData = Awaited<ReturnType<typeof getTotpURI>>, TError = unknown>(options: {
|
|
2941
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getTotpURI>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getTotpURI>>, TError, Awaited<ReturnType<typeof getTotpURI>>>, "initialData">;
|
|
2942
|
+
request?: SecondParameter<typeof customFetch>;
|
|
2943
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
2944
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
2945
|
+
};
|
|
2946
|
+
declare function useGetTotpURI<TData = Awaited<ReturnType<typeof getTotpURI>>, TError = unknown>(options?: {
|
|
2947
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getTotpURI>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getTotpURI>>, TError, Awaited<ReturnType<typeof getTotpURI>>>, "initialData">;
|
|
2948
|
+
request?: SecondParameter<typeof customFetch>;
|
|
2949
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
2950
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
2951
|
+
};
|
|
2952
|
+
declare function useGetTotpURI<TData = Awaited<ReturnType<typeof getTotpURI>>, TError = unknown>(options?: {
|
|
2953
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getTotpURI>>, TError, TData>>;
|
|
2954
|
+
request?: SecondParameter<typeof customFetch>;
|
|
2955
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
2956
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
2957
|
+
};
|
|
2958
|
+
declare const getVerifyTotpUrl: () => string;
|
|
2959
|
+
/**
|
|
2960
|
+
* Verifies a TOTP code from the authenticator app and completes authentication. Requires a pending TOTP cookie set during sign-in.
|
|
2961
|
+
* @summary Verify TOTP code
|
|
2962
|
+
*/
|
|
2963
|
+
declare const verifyTotp: (verifyTOTPRequest?: VerifyTOTPRequest, options?: RequestInit) => Promise<VerifyTOTPResponse>;
|
|
2964
|
+
declare const getVerifyTotpMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
2965
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof verifyTotp>>, TError, {
|
|
2966
|
+
data?: VerifyTOTPRequest;
|
|
2967
|
+
}, TContext>;
|
|
2968
|
+
request?: SecondParameter<typeof customFetch>;
|
|
2969
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof verifyTotp>>, TError, {
|
|
2970
|
+
data?: VerifyTOTPRequest;
|
|
2971
|
+
}, TContext>;
|
|
2972
|
+
type VerifyTotpMutationResult = NonNullable<Awaited<ReturnType<typeof verifyTotp>>>;
|
|
2973
|
+
type VerifyTotpMutationBody = VerifyTOTPRequest | undefined;
|
|
2974
|
+
type VerifyTotpMutationError = unknown;
|
|
2975
|
+
/**
|
|
2976
|
+
* @summary Verify TOTP code
|
|
2977
|
+
*/
|
|
2978
|
+
declare const useVerifyTotp: <TError = unknown, TContext = unknown>(options?: {
|
|
2979
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof verifyTotp>>, TError, {
|
|
2980
|
+
data?: VerifyTOTPRequest;
|
|
2981
|
+
}, TContext>;
|
|
2982
|
+
request?: SecondParameter<typeof customFetch>;
|
|
2983
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof verifyTotp>>, TError, {
|
|
2984
|
+
data?: VerifyTOTPRequest;
|
|
2985
|
+
}, TContext>;
|
|
2986
|
+
declare const getVerifyTotpBackupCodeUrl: () => string;
|
|
2987
|
+
/**
|
|
2988
|
+
* Verifies a backup code as an alternative to TOTP verification. Completes authentication if the code is valid.
|
|
2989
|
+
* @summary Verify backup code
|
|
2990
|
+
*/
|
|
2991
|
+
declare const verifyTotpBackupCode: (verifyBackupCodeRequest?: VerifyBackupCodeRequest, options?: RequestInit) => Promise<VerifyBackupCodeResponse>;
|
|
2992
|
+
declare const getVerifyTotpBackupCodeMutationOptions: <TError = unknown, TContext = unknown>(options?: {
|
|
2993
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof verifyTotpBackupCode>>, TError, {
|
|
2994
|
+
data?: VerifyBackupCodeRequest;
|
|
2995
|
+
}, TContext>;
|
|
2996
|
+
request?: SecondParameter<typeof customFetch>;
|
|
2997
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof verifyTotpBackupCode>>, TError, {
|
|
2998
|
+
data?: VerifyBackupCodeRequest;
|
|
2999
|
+
}, TContext>;
|
|
3000
|
+
type VerifyTotpBackupCodeMutationResult = NonNullable<Awaited<ReturnType<typeof verifyTotpBackupCode>>>;
|
|
3001
|
+
type VerifyTotpBackupCodeMutationBody = VerifyBackupCodeRequest | undefined;
|
|
3002
|
+
type VerifyTotpBackupCodeMutationError = unknown;
|
|
3003
|
+
/**
|
|
3004
|
+
* @summary Verify backup code
|
|
3005
|
+
*/
|
|
3006
|
+
declare const useVerifyTotpBackupCode: <TError = unknown, TContext = unknown>(options?: {
|
|
3007
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof verifyTotpBackupCode>>, TError, {
|
|
3008
|
+
data?: VerifyBackupCodeRequest;
|
|
3009
|
+
}, TContext>;
|
|
3010
|
+
request?: SecondParameter<typeof customFetch>;
|
|
3011
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof verifyTotpBackupCode>>, TError, {
|
|
3012
|
+
data?: VerifyBackupCodeRequest;
|
|
3013
|
+
}, TContext>;
|
|
810
3014
|
//#endregion
|
|
811
3015
|
//#region src/plugins/totp/plugin.d.ts
|
|
812
3016
|
declare class TOTPPlugin implements Plugin {
|
|
813
3017
|
readonly id = "totp";
|
|
814
|
-
init(client: AuthulaClient):
|
|
815
|
-
enable: () => Promise<EnableResponse>;
|
|
816
|
-
disable: () => Promise<DisableResponse>;
|
|
817
|
-
getUri: () => Promise<GetTOTPURIResponse>;
|
|
818
|
-
verify: (data: VerifyTOTPRequest) => Promise<VerifyTOTPResponse>;
|
|
819
|
-
verifyBackupCode: (data: VerifyBackupCodeRequest) => Promise<VerifyBackupCodeResponse>;
|
|
820
|
-
generateBackupCodes: () => Promise<GenerateBackupCodesResponse>;
|
|
821
|
-
};
|
|
3018
|
+
init(client: AuthulaClient): typeof totp_plugin_d_exports;
|
|
822
3019
|
}
|
|
823
3020
|
//#endregion
|
|
824
|
-
export {
|
|
3021
|
+
export { AccessControlPlugin, AdminPlugin, ApiKeyPlugin, BearerPlugin, BearerPluginOptions, CSRFPlugin, CSRFPluginOptions, CorePlugin, EmailPasswordPlugin, JWTPlugin, JWTTokenType, JWTTokensResponse, MagicLinkPlugin, OAuth2Plugin, OrganizationsPlugin, TOTPPlugin };
|
|
825
3022
|
//# sourceMappingURL=index.d.ts.map
|