@meistrari/auth-core 1.23.0 → 1.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -6,6 +6,7 @@ import z, { z as z$1 } from 'zod';
6
6
  import * as better_auth_client from 'better-auth/client';
7
7
  import { BetterFetchOption } from 'better-auth/client';
8
8
  import * as jose from 'jose';
9
+ import * as _better_auth_sso from '@better-auth/sso';
9
10
  import { ApiKey as ApiKey$1 } from '@better-auth/api-key';
10
11
 
11
12
  declare const AMRBrand: unique symbol;
@@ -13,11 +14,11 @@ declare const AALBrand: unique symbol;
13
14
  declare const ACRBrand: unique symbol;
14
15
  declare const AuthMethodBrand: unique symbol;
15
16
  declare const AMRs: {
16
- readonly Pwd: ("sso" & z.core.$brand<typeof AMRBrand>) | ("saml" & z.core.$brand<typeof AMRBrand>) | ("otp" & z.core.$brand<typeof AMRBrand>) | ("pwd" & z.core.$brand<typeof AMRBrand>) | ("oauth" & z.core.$brand<typeof AMRBrand>);
17
- readonly Otp: ("sso" & z.core.$brand<typeof AMRBrand>) | ("saml" & z.core.$brand<typeof AMRBrand>) | ("otp" & z.core.$brand<typeof AMRBrand>) | ("pwd" & z.core.$brand<typeof AMRBrand>) | ("oauth" & z.core.$brand<typeof AMRBrand>);
18
- readonly Oauth: ("sso" & z.core.$brand<typeof AMRBrand>) | ("saml" & z.core.$brand<typeof AMRBrand>) | ("otp" & z.core.$brand<typeof AMRBrand>) | ("pwd" & z.core.$brand<typeof AMRBrand>) | ("oauth" & z.core.$brand<typeof AMRBrand>);
19
- readonly Sso: ("sso" & z.core.$brand<typeof AMRBrand>) | ("saml" & z.core.$brand<typeof AMRBrand>) | ("otp" & z.core.$brand<typeof AMRBrand>) | ("pwd" & z.core.$brand<typeof AMRBrand>) | ("oauth" & z.core.$brand<typeof AMRBrand>);
20
- readonly Saml: ("sso" & z.core.$brand<typeof AMRBrand>) | ("saml" & z.core.$brand<typeof AMRBrand>) | ("otp" & z.core.$brand<typeof AMRBrand>) | ("pwd" & z.core.$brand<typeof AMRBrand>) | ("oauth" & z.core.$brand<typeof AMRBrand>);
17
+ readonly Pwd: ("pwd" & z.core.$brand<typeof AMRBrand>) | ("otp" & z.core.$brand<typeof AMRBrand>) | ("oauth" & z.core.$brand<typeof AMRBrand>) | ("sso" & z.core.$brand<typeof AMRBrand>) | ("saml" & z.core.$brand<typeof AMRBrand>);
18
+ readonly Otp: ("pwd" & z.core.$brand<typeof AMRBrand>) | ("otp" & z.core.$brand<typeof AMRBrand>) | ("oauth" & z.core.$brand<typeof AMRBrand>) | ("sso" & z.core.$brand<typeof AMRBrand>) | ("saml" & z.core.$brand<typeof AMRBrand>);
19
+ readonly Oauth: ("pwd" & z.core.$brand<typeof AMRBrand>) | ("otp" & z.core.$brand<typeof AMRBrand>) | ("oauth" & z.core.$brand<typeof AMRBrand>) | ("sso" & z.core.$brand<typeof AMRBrand>) | ("saml" & z.core.$brand<typeof AMRBrand>);
20
+ readonly Sso: ("pwd" & z.core.$brand<typeof AMRBrand>) | ("otp" & z.core.$brand<typeof AMRBrand>) | ("oauth" & z.core.$brand<typeof AMRBrand>) | ("sso" & z.core.$brand<typeof AMRBrand>) | ("saml" & z.core.$brand<typeof AMRBrand>);
21
+ readonly Saml: ("pwd" & z.core.$brand<typeof AMRBrand>) | ("otp" & z.core.$brand<typeof AMRBrand>) | ("oauth" & z.core.$brand<typeof AMRBrand>) | ("sso" & z.core.$brand<typeof AMRBrand>) | ("saml" & z.core.$brand<typeof AMRBrand>);
21
22
  };
22
23
  declare const AALs: {
23
24
  readonly Aal1: ("aal1" & z.core.$brand<typeof AALBrand>) | ("aal2" & z.core.$brand<typeof AALBrand>) | ("aal3" & z.core.$brand<typeof AALBrand>);
@@ -28,11 +29,11 @@ declare const ACRs: {
28
29
  readonly Unspecified: "urn:tela:auth:unspecified" & z.core.$brand<typeof ACRBrand>;
29
30
  };
30
31
  declare const AuthMethods: {
31
- readonly Password: ("saml" & z.core.$brand<typeof AuthMethodBrand>) | ("unknown" & z.core.$brand<typeof AuthMethodBrand>) | ("password" & z.core.$brand<typeof AuthMethodBrand>) | ("oauth" & z.core.$brand<typeof AuthMethodBrand>) | ("email_otp" & z.core.$brand<typeof AuthMethodBrand>);
32
- readonly EmailOTP: ("saml" & z.core.$brand<typeof AuthMethodBrand>) | ("unknown" & z.core.$brand<typeof AuthMethodBrand>) | ("password" & z.core.$brand<typeof AuthMethodBrand>) | ("oauth" & z.core.$brand<typeof AuthMethodBrand>) | ("email_otp" & z.core.$brand<typeof AuthMethodBrand>);
33
- readonly OAuth: ("saml" & z.core.$brand<typeof AuthMethodBrand>) | ("unknown" & z.core.$brand<typeof AuthMethodBrand>) | ("password" & z.core.$brand<typeof AuthMethodBrand>) | ("oauth" & z.core.$brand<typeof AuthMethodBrand>) | ("email_otp" & z.core.$brand<typeof AuthMethodBrand>);
34
- readonly SAML: ("saml" & z.core.$brand<typeof AuthMethodBrand>) | ("unknown" & z.core.$brand<typeof AuthMethodBrand>) | ("password" & z.core.$brand<typeof AuthMethodBrand>) | ("oauth" & z.core.$brand<typeof AuthMethodBrand>) | ("email_otp" & z.core.$brand<typeof AuthMethodBrand>);
35
- readonly Unknown: ("saml" & z.core.$brand<typeof AuthMethodBrand>) | ("unknown" & z.core.$brand<typeof AuthMethodBrand>) | ("password" & z.core.$brand<typeof AuthMethodBrand>) | ("oauth" & z.core.$brand<typeof AuthMethodBrand>) | ("email_otp" & z.core.$brand<typeof AuthMethodBrand>);
32
+ readonly Password: ("oauth" & z.core.$brand<typeof AuthMethodBrand>) | ("saml" & z.core.$brand<typeof AuthMethodBrand>) | ("password" & z.core.$brand<typeof AuthMethodBrand>) | ("email_otp" & z.core.$brand<typeof AuthMethodBrand>) | ("unknown" & z.core.$brand<typeof AuthMethodBrand>);
33
+ readonly EmailOTP: ("oauth" & z.core.$brand<typeof AuthMethodBrand>) | ("saml" & z.core.$brand<typeof AuthMethodBrand>) | ("password" & z.core.$brand<typeof AuthMethodBrand>) | ("email_otp" & z.core.$brand<typeof AuthMethodBrand>) | ("unknown" & z.core.$brand<typeof AuthMethodBrand>);
34
+ readonly OAuth: ("oauth" & z.core.$brand<typeof AuthMethodBrand>) | ("saml" & z.core.$brand<typeof AuthMethodBrand>) | ("password" & z.core.$brand<typeof AuthMethodBrand>) | ("email_otp" & z.core.$brand<typeof AuthMethodBrand>) | ("unknown" & z.core.$brand<typeof AuthMethodBrand>);
35
+ readonly SAML: ("oauth" & z.core.$brand<typeof AuthMethodBrand>) | ("saml" & z.core.$brand<typeof AuthMethodBrand>) | ("password" & z.core.$brand<typeof AuthMethodBrand>) | ("email_otp" & z.core.$brand<typeof AuthMethodBrand>) | ("unknown" & z.core.$brand<typeof AuthMethodBrand>);
36
+ readonly Unknown: ("oauth" & z.core.$brand<typeof AuthMethodBrand>) | ("saml" & z.core.$brand<typeof AuthMethodBrand>) | ("password" & z.core.$brand<typeof AuthMethodBrand>) | ("email_otp" & z.core.$brand<typeof AuthMethodBrand>) | ("unknown" & z.core.$brand<typeof AuthMethodBrand>);
36
37
  };
37
38
  declare const AMR: z.core.$ZodBranded<z.ZodEnum<{
38
39
  readonly Pwd: "pwd";
@@ -260,6 +261,30 @@ declare const userAdditionalFields: {
260
261
  required: false;
261
262
  defaultValue: null;
262
263
  };
264
+ displayName: {
265
+ type: "string";
266
+ input: true;
267
+ required: false;
268
+ defaultValue: null;
269
+ };
270
+ title: {
271
+ type: "string";
272
+ input: true;
273
+ required: false;
274
+ defaultValue: null;
275
+ };
276
+ pronouns: {
277
+ type: "string";
278
+ input: true;
279
+ required: false;
280
+ defaultValue: null;
281
+ };
282
+ preferredLanguage: {
283
+ type: "string";
284
+ input: true;
285
+ required: true;
286
+ defaultValue: string;
287
+ };
263
288
  };
264
289
  /**
265
290
  * Additional database fields added to the `organization` table.
@@ -1052,239 +1077,2857 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1052
1077
  role: string;
1053
1078
  }>;
1054
1079
  } & {
1055
- signIn: {
1056
- social: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1057
- provider: (string & {}) | "google" | "microsoft" | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel";
1058
- callbackURL?: string | undefined;
1059
- newUserCallbackURL?: string | undefined;
1060
- errorCallbackURL?: string | undefined;
1061
- disableRedirect?: boolean | undefined;
1062
- idToken?: {
1063
- token: string;
1064
- nonce?: string | undefined;
1065
- accessToken?: string | undefined;
1066
- refreshToken?: string | undefined;
1067
- expiresAt?: number | undefined;
1068
- } | undefined;
1069
- scopes?: string[] | undefined;
1070
- requestSignUp?: boolean | undefined;
1071
- loginHint?: string | undefined;
1072
- additionalData?: Record<string, any> | undefined;
1073
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1074
- provider: (string & {}) | "google" | "microsoft" | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel";
1075
- callbackURL?: string | undefined;
1076
- newUserCallbackURL?: string | undefined;
1077
- errorCallbackURL?: string | undefined;
1078
- disableRedirect?: boolean | undefined;
1079
- idToken?: {
1080
- token: string;
1081
- nonce?: string | undefined;
1082
- accessToken?: string | undefined;
1083
- refreshToken?: string | undefined;
1084
- expiresAt?: number | undefined;
1085
- } | undefined;
1086
- scopes?: string[] | undefined;
1087
- requestSignUp?: boolean | undefined;
1088
- loginHint?: string | undefined;
1089
- additionalData?: Record<string, any> | undefined;
1090
- } & {
1091
- fetchOptions?: FetchOptions | undefined;
1092
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1093
- redirect: boolean;
1094
- url: string;
1095
- } | (Omit<{
1096
- redirect: boolean;
1097
- token: string;
1098
- url: undefined;
1099
- user: {
1100
- id: string;
1101
- createdAt: Date;
1102
- updatedAt: Date;
1103
- email: string;
1104
- emailVerified: boolean;
1105
- name: string;
1106
- image?: string | null | undefined | undefined;
1080
+ customEndpoints: {
1081
+ teams: {
1082
+ ":id": {
1083
+ members: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, {
1084
+ id: string;
1085
+ }>>(data_0?: better_auth.Prettify<{
1086
+ query?: Record<string, any> | undefined;
1087
+ fetchOptions?: FetchOptions | undefined;
1088
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1089
+ teamMembers: {
1090
+ id: string;
1091
+ teamId: string;
1092
+ userId: string;
1093
+ createdAt: Date;
1094
+ }[];
1095
+ }, {
1096
+ code?: string | undefined;
1097
+ message?: string | undefined;
1098
+ }, FetchOptions["throw"] extends true ? true : true>>;
1107
1099
  };
1108
- }, "user"> & {
1109
- user: better_auth.StripEmptyObjects<{
1100
+ };
1101
+ };
1102
+ } & {
1103
+ customEndpoints: {
1104
+ organizations: {
1105
+ apiKeys: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
1106
+ query?: Record<string, any> | undefined;
1107
+ fetchOptions?: FetchOptions | undefined;
1108
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1110
1109
  id: string;
1110
+ name: string;
1111
+ start: string | null;
1112
+ prefix: string | null;
1113
+ referenceId: string;
1114
+ configId: string;
1115
+ refillInterval: number | null;
1116
+ refillAmount: number | null;
1117
+ lastRefillAt: Date | null;
1118
+ enabled: boolean;
1119
+ rateLimitEnabled: boolean;
1120
+ rateLimitTimeWindow: number | null;
1121
+ rateLimitMax: number | null;
1122
+ requestCount: number;
1123
+ remaining: number | null;
1124
+ lastRequest: Date | null;
1125
+ expiresAt: Date | null;
1111
1126
  createdAt: Date;
1112
1127
  updatedAt: Date;
1113
- email: string;
1114
- emailVerified: boolean;
1115
- name: string;
1116
- image?: string | null | undefined;
1117
- } & {
1118
- twoFactorEnabled: boolean | null | undefined;
1119
- } & {} & {
1120
- banned: boolean | null | undefined;
1121
- } & {
1122
- role?: string | null | undefined;
1123
- banReason?: string | null | undefined;
1124
- banExpires?: Date | null | undefined;
1125
- } & {} & {
1126
- lastActiveAt?: Date | null | undefined;
1127
- }>;
1128
- }), {
1129
- code?: string | undefined;
1130
- message?: string | undefined;
1131
- }, FetchOptions["throw"] extends true ? true : true>>;
1128
+ permissions: string | null;
1129
+ metadata: any;
1130
+ }[], {
1131
+ code?: string | undefined;
1132
+ message?: string | undefined;
1133
+ }, FetchOptions["throw"] extends true ? true : true>>;
1134
+ };
1132
1135
  };
1133
1136
  } & {
1134
- signOut: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
1135
- query?: Record<string, any> | undefined;
1137
+ handshake: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
1138
+ origin: string;
1139
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1140
+ query: {
1141
+ origin: string;
1142
+ };
1136
1143
  fetchOptions?: FetchOptions | undefined;
1137
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1138
- success: boolean;
1144
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1145
+ status: ("OK" | "CREATED" | "ACCEPTED" | "NO_CONTENT" | "MULTIPLE_CHOICES" | "MOVED_PERMANENTLY" | "FOUND" | "SEE_OTHER" | "NOT_MODIFIED" | "TEMPORARY_REDIRECT" | "BAD_REQUEST" | "UNAUTHORIZED" | "PAYMENT_REQUIRED" | "FORBIDDEN" | "NOT_FOUND" | "METHOD_NOT_ALLOWED" | "NOT_ACCEPTABLE" | "PROXY_AUTHENTICATION_REQUIRED" | "REQUEST_TIMEOUT" | "CONFLICT" | "GONE" | "LENGTH_REQUIRED" | "PRECONDITION_FAILED" | "PAYLOAD_TOO_LARGE" | "URI_TOO_LONG" | "UNSUPPORTED_MEDIA_TYPE" | "RANGE_NOT_SATISFIABLE" | "EXPECTATION_FAILED" | "I'M_A_TEAPOT" | "MISDIRECTED_REQUEST" | "UNPROCESSABLE_ENTITY" | "LOCKED" | "FAILED_DEPENDENCY" | "TOO_EARLY" | "UPGRADE_REQUIRED" | "PRECONDITION_REQUIRED" | "TOO_MANY_REQUESTS" | "REQUEST_HEADER_FIELDS_TOO_LARGE" | "UNAVAILABLE_FOR_LEGAL_REASONS" | "INTERNAL_SERVER_ERROR" | "NOT_IMPLEMENTED" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "GATEWAY_TIMEOUT" | "HTTP_VERSION_NOT_SUPPORTED" | "VARIANT_ALSO_NEGOTIATES" | "INSUFFICIENT_STORAGE" | "LOOP_DETECTED" | "NOT_EXTENDED" | "NETWORK_AUTHENTICATION_REQUIRED") | better_auth.Status;
1146
+ body: ({
1147
+ message?: string;
1148
+ code?: string;
1149
+ cause?: unknown;
1150
+ } & Record<string, any>) | undefined;
1151
+ headers: HeadersInit;
1152
+ statusCode: number;
1153
+ name: string;
1154
+ message: string;
1155
+ stack?: string;
1156
+ cause?: unknown;
1139
1157
  }, {
1140
1158
  code?: string | undefined;
1141
1159
  message?: string | undefined;
1142
1160
  }, FetchOptions["throw"] extends true ? true : true>>;
1143
1161
  } & {
1144
- signUp: {
1145
- email: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1146
- name: string;
1147
- email: string;
1148
- password: string;
1149
- image?: string | undefined;
1150
- callbackURL?: string | undefined;
1151
- rememberMe?: boolean | undefined;
1152
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1153
- email: string;
1154
- name: string;
1155
- password: string;
1156
- image?: string | undefined;
1157
- callbackURL?: string | undefined;
1158
- fetchOptions?: FetchOptions | undefined;
1159
- } & {} & {} & {} & {} & {} & {
1160
- lastActiveAt?: Date | null | undefined;
1161
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<(Omit<{
1162
- token: null;
1163
- user: {
1164
- id: string;
1165
- createdAt: Date;
1166
- updatedAt: Date;
1167
- email: string;
1168
- emailVerified: boolean;
1169
- name: string;
1170
- image?: string | null | undefined | undefined;
1162
+ handshake: {
1163
+ noncePayload: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
1164
+ nonce: string;
1165
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1166
+ query: {
1167
+ nonce: string;
1171
1168
  };
1172
- }, "user"> & {
1173
- user: better_auth.StripEmptyObjects<{
1174
- id: string;
1175
- createdAt: Date;
1176
- updatedAt: Date;
1177
- email: string;
1178
- emailVerified: boolean;
1179
- name: string;
1180
- image?: string | null | undefined;
1181
- } & {
1182
- twoFactorEnabled: boolean | null | undefined;
1183
- } & {} & {
1184
- banned: boolean | null | undefined;
1185
- } & {
1186
- role?: string | null | undefined;
1187
- banReason?: string | null | undefined;
1188
- banExpires?: Date | null | undefined;
1189
- } & {} & {
1190
- lastActiveAt?: Date | null | undefined;
1191
- }>;
1192
- }) | (Omit<{
1169
+ fetchOptions?: FetchOptions | undefined;
1170
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1193
1171
  token: string;
1194
- user: {
1195
- id: string;
1196
- createdAt: Date;
1197
- updatedAt: Date;
1198
- email: string;
1199
- emailVerified: boolean;
1200
- name: string;
1201
- image?: string | null | undefined | undefined;
1202
- };
1203
- }, "user"> & {
1204
- user: better_auth.StripEmptyObjects<{
1205
- id: string;
1206
- createdAt: Date;
1207
- updatedAt: Date;
1208
- email: string;
1209
- emailVerified: boolean;
1210
- name: string;
1211
- image?: string | null | undefined;
1212
- } & {
1213
- twoFactorEnabled: boolean | null | undefined;
1214
- } & {} & {
1215
- banned: boolean | null | undefined;
1216
- } & {
1217
- role?: string | null | undefined;
1218
- banReason?: string | null | undefined;
1219
- banExpires?: Date | null | undefined;
1220
- } & {} & {
1221
- lastActiveAt?: Date | null | undefined;
1222
- }>;
1223
- }), {
1172
+ }, {
1224
1173
  code?: string | undefined;
1225
1174
  message?: string | undefined;
1226
1175
  }, FetchOptions["throw"] extends true ? true : true>>;
1227
1176
  };
1228
1177
  } & {
1229
- signIn: {
1230
- email: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1231
- email: string;
1232
- password: string;
1233
- callbackURL?: string | undefined;
1234
- rememberMe?: boolean | undefined;
1178
+ organization: {
1179
+ create: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1180
+ name: string;
1181
+ slug: string;
1182
+ userId?: string | undefined;
1183
+ logo?: string | undefined;
1184
+ metadata?: Record<string, any> | undefined;
1185
+ keepCurrentActiveOrganization?: boolean | undefined;
1235
1186
  }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1236
- email: string;
1237
- password: string;
1238
- callbackURL?: string | undefined;
1239
- rememberMe?: boolean | undefined;
1187
+ name: string;
1188
+ slug: string;
1189
+ userId?: string | undefined;
1190
+ logo?: string | undefined;
1191
+ metadata?: Record<string, any> | undefined;
1192
+ keepCurrentActiveOrganization?: boolean | undefined;
1240
1193
  } & {
1241
1194
  fetchOptions?: FetchOptions | undefined;
1242
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<Omit<{
1243
- redirect: boolean;
1244
- token: string;
1245
- url?: string | undefined;
1246
- user: {
1247
- id: string;
1248
- createdAt: Date;
1249
- updatedAt: Date;
1250
- email: string;
1251
- emailVerified: boolean;
1252
- name: string;
1253
- image?: string | null | undefined | undefined;
1254
- };
1255
- }, "user"> & {
1256
- user: better_auth.StripEmptyObjects<{
1195
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<NonNullable<{
1196
+ id: string;
1197
+ name: string;
1198
+ slug: string;
1199
+ createdAt: Date;
1200
+ logo?: string | null | undefined | undefined;
1201
+ metadata?: any;
1202
+ } & {
1203
+ metadata: any;
1204
+ members: ({
1257
1205
  id: string;
1206
+ organizationId: string;
1207
+ userId: string;
1208
+ role: string;
1258
1209
  createdAt: Date;
1259
- updatedAt: Date;
1260
- email: string;
1261
- emailVerified: boolean;
1262
- name: string;
1263
- image?: string | null | undefined;
1264
- } & {
1265
- twoFactorEnabled: boolean | null | undefined;
1266
- } & {} & {
1267
- banned: boolean | null | undefined;
1268
- } & {
1269
- role?: string | null | undefined;
1270
- banReason?: string | null | undefined;
1271
- banExpires?: Date | null | undefined;
1272
- } & {} & {
1273
- lastActiveAt?: Date | null | undefined;
1274
- }>;
1275
- }, {
1210
+ } | undefined)[];
1211
+ }>, {
1276
1212
  code?: string | undefined;
1277
1213
  message?: string | undefined;
1278
1214
  }, FetchOptions["throw"] extends true ? true : true>>;
1279
1215
  };
1280
1216
  } & {
1281
- resetPassword: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1282
- newPassword: string;
1283
- token?: string | undefined;
1284
- }> & Record<string, any>, Partial<{
1285
- token?: string | undefined;
1286
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1287
- newPassword: string;
1217
+ organization: {
1218
+ update: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1219
+ data: {
1220
+ name?: string | undefined;
1221
+ slug?: string | undefined;
1222
+ logo?: string | undefined;
1223
+ metadata?: Record<string, any> | undefined;
1224
+ } & Partial<{}>;
1225
+ organizationId?: string | undefined;
1226
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1227
+ data: {
1228
+ name?: string | undefined;
1229
+ slug?: string | undefined;
1230
+ logo?: string | undefined;
1231
+ metadata?: Record<string, any> | undefined;
1232
+ } & Partial<{}>;
1233
+ organizationId?: string | undefined;
1234
+ } & {
1235
+ fetchOptions?: FetchOptions | undefined;
1236
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1237
+ id: string;
1238
+ name: string;
1239
+ slug: string;
1240
+ createdAt: Date;
1241
+ logo?: string | null | undefined | undefined;
1242
+ metadata?: any;
1243
+ }, {
1244
+ code?: string | undefined;
1245
+ message?: string | undefined;
1246
+ }, FetchOptions["throw"] extends true ? true : true>>;
1247
+ };
1248
+ } & {
1249
+ organization: {
1250
+ delete: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1251
+ organizationId: string;
1252
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1253
+ organizationId: string;
1254
+ } & {
1255
+ fetchOptions?: FetchOptions | undefined;
1256
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1257
+ id: string;
1258
+ name: string;
1259
+ slug: string;
1260
+ createdAt: Date;
1261
+ logo?: string | null | undefined | undefined;
1262
+ metadata?: any;
1263
+ }, {
1264
+ code?: string | undefined;
1265
+ message?: string | undefined;
1266
+ }, FetchOptions["throw"] extends true ? true : true>>;
1267
+ };
1268
+ } & {
1269
+ organization: {
1270
+ setActive: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1271
+ organizationId?: string | null | undefined;
1272
+ organizationSlug?: string | undefined;
1273
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
1274
+ organizationId?: string | null | undefined;
1275
+ organizationSlug?: string | undefined;
1276
+ } & {
1277
+ fetchOptions?: FetchOptions | undefined;
1278
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1279
+ members: {
1280
+ id: string;
1281
+ organizationId: string;
1282
+ role: "org:admin" | "org:member" | "org:reviewer";
1283
+ createdAt: Date;
1284
+ userId: string;
1285
+ teamId?: string | undefined | undefined;
1286
+ user: {
1287
+ id: string;
1288
+ email: string;
1289
+ name: string;
1290
+ image?: string | undefined;
1291
+ };
1292
+ }[];
1293
+ invitations: {
1294
+ id: string;
1295
+ organizationId: string;
1296
+ email: string;
1297
+ role: "org:admin" | "org:member" | "org:reviewer";
1298
+ status: better_auth_plugins.InvitationStatus;
1299
+ inviterId: string;
1300
+ expiresAt: Date;
1301
+ createdAt: Date;
1302
+ teamId?: string | undefined | undefined;
1303
+ }[];
1304
+ teams: {
1305
+ id: string;
1306
+ name: string;
1307
+ organizationId: string;
1308
+ createdAt: Date;
1309
+ updatedAt?: Date | undefined;
1310
+ }[];
1311
+ } & {
1312
+ id: string;
1313
+ name: string;
1314
+ slug: string;
1315
+ createdAt: Date;
1316
+ logo?: string | null | undefined | undefined;
1317
+ metadata?: any;
1318
+ }, {
1319
+ code?: string | undefined;
1320
+ message?: string | undefined;
1321
+ }, FetchOptions["throw"] extends true ? true : true>>;
1322
+ };
1323
+ } & {
1324
+ organization: {
1325
+ getFullOrganization: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
1326
+ organizationId?: string | undefined;
1327
+ organizationSlug?: string | undefined;
1328
+ membersLimit?: string | number | undefined;
1329
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
1330
+ query?: {
1331
+ organizationId?: string | undefined;
1332
+ organizationSlug?: string | undefined;
1333
+ membersLimit?: string | number | undefined;
1334
+ } | undefined;
1335
+ fetchOptions?: FetchOptions | undefined;
1336
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1337
+ members: {
1338
+ id: string;
1339
+ organizationId: string;
1340
+ role: "org:admin" | "org:member" | "org:reviewer";
1341
+ createdAt: Date;
1342
+ userId: string;
1343
+ teamId?: string | undefined | undefined;
1344
+ user: {
1345
+ id: string;
1346
+ email: string;
1347
+ name: string;
1348
+ image?: string | undefined;
1349
+ };
1350
+ }[];
1351
+ invitations: {
1352
+ id: string;
1353
+ organizationId: string;
1354
+ email: string;
1355
+ role: "org:admin" | "org:member" | "org:reviewer";
1356
+ status: better_auth_plugins.InvitationStatus;
1357
+ inviterId: string;
1358
+ expiresAt: Date;
1359
+ createdAt: Date;
1360
+ teamId?: string | undefined | undefined;
1361
+ }[];
1362
+ teams: {
1363
+ id: string;
1364
+ name: string;
1365
+ organizationId: string;
1366
+ createdAt: Date;
1367
+ updatedAt?: Date | undefined;
1368
+ }[];
1369
+ } & {
1370
+ id: string;
1371
+ name: string;
1372
+ slug: string;
1373
+ createdAt: Date;
1374
+ logo?: string | null | undefined | undefined;
1375
+ metadata?: any;
1376
+ }, {
1377
+ code?: string | undefined;
1378
+ message?: string | undefined;
1379
+ }, FetchOptions["throw"] extends true ? true : true>>;
1380
+ };
1381
+ } & {
1382
+ organization: {
1383
+ list: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
1384
+ query?: Record<string, any> | undefined;
1385
+ fetchOptions?: FetchOptions | undefined;
1386
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1387
+ id: string;
1388
+ name: string;
1389
+ slug: string;
1390
+ createdAt: Date;
1391
+ logo?: string | null | undefined | undefined;
1392
+ metadata?: any;
1393
+ }[], {
1394
+ code?: string | undefined;
1395
+ message?: string | undefined;
1396
+ }, FetchOptions["throw"] extends true ? true : true>>;
1397
+ };
1398
+ } & {
1399
+ organization: {
1400
+ inviteMember: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1401
+ email: string;
1402
+ role: "org:admin" | "org:member" | "org:reviewer" | ("org:admin" | "org:member" | "org:reviewer")[];
1403
+ organizationId?: string | undefined;
1404
+ resend?: boolean | undefined;
1405
+ } & {
1406
+ teamId?: (string | string[]) | undefined;
1407
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1408
+ email: string;
1409
+ role: "org:admin" | "org:member" | "org:reviewer" | ("org:admin" | "org:member" | "org:reviewer")[];
1410
+ organizationId?: string | undefined;
1411
+ resend?: boolean | undefined;
1412
+ } & {
1413
+ teamId?: (string | string[]) | undefined;
1414
+ } & {
1415
+ fetchOptions?: FetchOptions | undefined;
1416
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<NonNullable<{
1417
+ id: string;
1418
+ organizationId: string;
1419
+ email: string;
1420
+ role: "org:admin" | "org:member" | "org:reviewer";
1421
+ status: better_auth_plugins.InvitationStatus;
1422
+ inviterId: string;
1423
+ expiresAt: Date;
1424
+ createdAt: Date;
1425
+ teamId?: string | undefined | undefined;
1426
+ } | {
1427
+ id: string;
1428
+ organizationId: string;
1429
+ email: string;
1430
+ role: "org:admin" | "org:member" | "org:reviewer";
1431
+ status: better_auth_plugins.InvitationStatus;
1432
+ inviterId: string;
1433
+ expiresAt: Date;
1434
+ createdAt: Date;
1435
+ teamId?: string | undefined | undefined;
1436
+ }>, {
1437
+ code?: string | undefined;
1438
+ message?: string | undefined;
1439
+ }, FetchOptions["throw"] extends true ? true : true>>;
1440
+ };
1441
+ } & {
1442
+ organization: {
1443
+ cancelInvitation: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1444
+ invitationId: string;
1445
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1446
+ invitationId: string;
1447
+ } & {
1448
+ fetchOptions?: FetchOptions | undefined;
1449
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1450
+ id: string;
1451
+ organizationId: string;
1452
+ email: string;
1453
+ role: "org:admin" | "org:member" | "org:reviewer";
1454
+ status: better_auth_plugins.InvitationStatus;
1455
+ inviterId: string;
1456
+ expiresAt: Date;
1457
+ createdAt: Date;
1458
+ teamId?: string | undefined | undefined;
1459
+ }, {
1460
+ code?: string | undefined;
1461
+ message?: string | undefined;
1462
+ }, FetchOptions["throw"] extends true ? true : true>>;
1463
+ };
1464
+ } & {
1465
+ organization: {
1466
+ acceptInvitation: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1467
+ invitationId: string;
1468
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1469
+ invitationId: string;
1470
+ } & {
1471
+ fetchOptions?: FetchOptions | undefined;
1472
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1473
+ invitation: {
1474
+ id: string;
1475
+ organizationId: string;
1476
+ email: string;
1477
+ role: "org:admin" | "org:member" | "org:reviewer";
1478
+ status: better_auth_plugins.InvitationStatus;
1479
+ inviterId: string;
1480
+ expiresAt: Date;
1481
+ createdAt: Date;
1482
+ teamId?: string | undefined | undefined;
1483
+ };
1484
+ member: {
1485
+ id: string;
1486
+ organizationId: string;
1487
+ userId: string;
1488
+ role: string;
1489
+ createdAt: Date;
1490
+ };
1491
+ }, {
1492
+ code?: string | undefined;
1493
+ message?: string | undefined;
1494
+ }, FetchOptions["throw"] extends true ? true : true>>;
1495
+ };
1496
+ } & {
1497
+ organization: {
1498
+ getInvitation: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
1499
+ id: string;
1500
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1501
+ query: {
1502
+ id: string;
1503
+ };
1504
+ fetchOptions?: FetchOptions | undefined;
1505
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<NonNullable<{
1506
+ id: string;
1507
+ organizationId: string;
1508
+ email: string;
1509
+ role: "org:admin" | "org:member" | "org:reviewer";
1510
+ status: better_auth_plugins.InvitationStatus;
1511
+ inviterId: string;
1512
+ expiresAt: Date;
1513
+ createdAt: Date;
1514
+ teamId?: string | undefined | undefined;
1515
+ } & {
1516
+ organizationName: string;
1517
+ organizationSlug: string;
1518
+ inviterEmail: string;
1519
+ }>, {
1520
+ code?: string | undefined;
1521
+ message?: string | undefined;
1522
+ }, FetchOptions["throw"] extends true ? true : true>>;
1523
+ };
1524
+ } & {
1525
+ organization: {
1526
+ rejectInvitation: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1527
+ invitationId: string;
1528
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1529
+ invitationId: string;
1530
+ } & {
1531
+ fetchOptions?: FetchOptions | undefined;
1532
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1533
+ invitation: {
1534
+ id: string;
1535
+ organizationId: string;
1536
+ email: string;
1537
+ role: "admin" | "member" | "owner";
1538
+ status: better_auth_plugins.InvitationStatus;
1539
+ inviterId: string;
1540
+ expiresAt: Date;
1541
+ createdAt: Date;
1542
+ } | null;
1543
+ member: null;
1544
+ }, {
1545
+ code?: string | undefined;
1546
+ message?: string | undefined;
1547
+ }, FetchOptions["throw"] extends true ? true : true>>;
1548
+ };
1549
+ } & {
1550
+ organization: {
1551
+ listInvitations: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
1552
+ organizationId?: string | undefined;
1553
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
1554
+ query?: {
1555
+ organizationId?: string | undefined;
1556
+ } | undefined;
1557
+ fetchOptions?: FetchOptions | undefined;
1558
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1559
+ id: string;
1560
+ organizationId: string;
1561
+ email: string;
1562
+ role: "org:admin" | "org:member" | "org:reviewer";
1563
+ status: better_auth_plugins.InvitationStatus;
1564
+ inviterId: string;
1565
+ expiresAt: Date;
1566
+ createdAt: Date;
1567
+ teamId?: string | undefined | undefined;
1568
+ }[], {
1569
+ code?: string | undefined;
1570
+ message?: string | undefined;
1571
+ }, FetchOptions["throw"] extends true ? true : true>>;
1572
+ };
1573
+ } & {
1574
+ organization: {
1575
+ getActiveMember: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
1576
+ query?: Record<string, any> | undefined;
1577
+ fetchOptions?: FetchOptions | undefined;
1578
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<NonNullable<Omit<{
1579
+ id: string;
1580
+ organizationId: string;
1581
+ role: "org:admin" | "org:member" | "org:reviewer";
1582
+ createdAt: Date;
1583
+ userId: string;
1584
+ teamId?: string | undefined | undefined;
1585
+ user: {
1586
+ id: string;
1587
+ email: string;
1588
+ name: string;
1589
+ image?: string | undefined;
1590
+ };
1591
+ } & {
1592
+ user: {
1593
+ id: string;
1594
+ createdAt: Date;
1595
+ updatedAt: Date;
1596
+ email: string;
1597
+ emailVerified: boolean;
1598
+ name: string;
1599
+ image?: string | null | undefined;
1600
+ };
1601
+ }, "user"> & {
1602
+ user: {
1603
+ id: string;
1604
+ name: string;
1605
+ email: string;
1606
+ image: string | undefined;
1607
+ };
1608
+ }>, {
1609
+ code?: string | undefined;
1610
+ message?: string | undefined;
1611
+ }, FetchOptions["throw"] extends true ? true : true>>;
1612
+ };
1613
+ } & {
1614
+ organization: {
1615
+ checkSlug: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1616
+ slug: string;
1617
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1618
+ slug: string;
1619
+ } & {
1620
+ fetchOptions?: FetchOptions | undefined;
1621
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1622
+ status: boolean;
1623
+ }, {
1624
+ code?: string | undefined;
1625
+ message?: string | undefined;
1626
+ }, FetchOptions["throw"] extends true ? true : true>>;
1627
+ };
1628
+ } & {
1629
+ organization: {
1630
+ removeMember: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1631
+ memberIdOrEmail: string;
1632
+ organizationId?: string | undefined;
1633
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1634
+ memberIdOrEmail: string;
1635
+ organizationId?: string | undefined;
1636
+ } & {
1637
+ fetchOptions?: FetchOptions | undefined;
1638
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1639
+ member: {
1640
+ id: string;
1641
+ organizationId: string;
1642
+ role: "org:admin" | "org:member" | "org:reviewer";
1643
+ createdAt: Date;
1644
+ userId: string;
1645
+ teamId?: string | undefined | undefined;
1646
+ user: {
1647
+ id: string;
1648
+ email: string;
1649
+ name: string;
1650
+ image?: string | undefined;
1651
+ };
1652
+ };
1653
+ }, {
1654
+ code?: string | undefined;
1655
+ message?: string | undefined;
1656
+ }, FetchOptions["throw"] extends true ? true : true>>;
1657
+ };
1658
+ } & {
1659
+ organization: {
1660
+ updateMemberRole: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1661
+ role: better_auth.LiteralString | "org:admin" | "org:member" | "org:reviewer" | better_auth.LiteralString[] | ("org:admin" | "org:member" | "org:reviewer")[];
1662
+ memberId: string;
1663
+ organizationId?: string | undefined;
1664
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1665
+ role: better_auth.LiteralString | "org:admin" | "org:member" | "org:reviewer" | better_auth.LiteralString[] | ("org:admin" | "org:member" | "org:reviewer")[];
1666
+ memberId: string;
1667
+ organizationId?: string | undefined;
1668
+ } & {
1669
+ fetchOptions?: FetchOptions | undefined;
1670
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1671
+ id: string;
1672
+ organizationId: string;
1673
+ role: "admin" | "member" | "owner";
1674
+ createdAt: Date;
1675
+ userId: string;
1676
+ user: {
1677
+ id: string;
1678
+ email: string;
1679
+ name: string;
1680
+ image?: string | undefined;
1681
+ };
1682
+ }, {
1683
+ code?: string | undefined;
1684
+ message?: string | undefined;
1685
+ }, FetchOptions["throw"] extends true ? true : true>>;
1686
+ };
1687
+ } & {
1688
+ organization: {
1689
+ leave: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1690
+ organizationId: string;
1691
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1692
+ organizationId: string;
1693
+ } & {
1694
+ fetchOptions?: FetchOptions | undefined;
1695
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<NonNullable<Omit<{
1696
+ id: string;
1697
+ organizationId: string;
1698
+ role: "org:admin" | "org:member" | "org:reviewer";
1699
+ createdAt: Date;
1700
+ userId: string;
1701
+ teamId?: string | undefined | undefined;
1702
+ user: {
1703
+ id: string;
1704
+ email: string;
1705
+ name: string;
1706
+ image?: string | undefined;
1707
+ };
1708
+ } & {
1709
+ user: {
1710
+ id: string;
1711
+ createdAt: Date;
1712
+ updatedAt: Date;
1713
+ email: string;
1714
+ emailVerified: boolean;
1715
+ name: string;
1716
+ image?: string | null | undefined;
1717
+ };
1718
+ }, "user"> & {
1719
+ user: {
1720
+ id: string;
1721
+ name: string;
1722
+ email: string;
1723
+ image: string | undefined;
1724
+ };
1725
+ }>, {
1726
+ code?: string | undefined;
1727
+ message?: string | undefined;
1728
+ }, FetchOptions["throw"] extends true ? true : true>>;
1729
+ };
1730
+ } & {
1731
+ organization: {
1732
+ listUserInvitations: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
1733
+ email?: string | undefined;
1734
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
1735
+ query?: {
1736
+ email?: string | undefined;
1737
+ } | undefined;
1738
+ fetchOptions?: FetchOptions | undefined;
1739
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<(Omit<{
1740
+ id: string;
1741
+ organizationId: string;
1742
+ email: string;
1743
+ role: "org:admin" | "org:member" | "org:reviewer";
1744
+ status: better_auth_plugins.InvitationStatus;
1745
+ inviterId: string;
1746
+ expiresAt: Date;
1747
+ createdAt: Date;
1748
+ teamId?: string | undefined | undefined;
1749
+ } & {
1750
+ organization: {
1751
+ id: string;
1752
+ name: string;
1753
+ slug: string;
1754
+ createdAt: Date;
1755
+ logo?: string | null | undefined | undefined;
1756
+ metadata?: any;
1757
+ };
1758
+ }, "organization"> & {
1759
+ organizationName: string;
1760
+ })[], {
1761
+ code?: string | undefined;
1762
+ message?: string | undefined;
1763
+ }, FetchOptions["throw"] extends true ? true : true>>;
1764
+ };
1765
+ } & {
1766
+ organization: {
1767
+ listMembers: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
1768
+ limit?: string | number | undefined;
1769
+ offset?: string | number | undefined;
1770
+ sortBy?: string | undefined;
1771
+ sortDirection?: "asc" | "desc" | undefined;
1772
+ filterField?: string | undefined;
1773
+ filterValue?: string | number | boolean | string[] | number[] | undefined;
1774
+ filterOperator?: "in" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
1775
+ organizationId?: string | undefined;
1776
+ organizationSlug?: string | undefined;
1777
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
1778
+ query?: {
1779
+ limit?: string | number | undefined;
1780
+ offset?: string | number | undefined;
1781
+ sortBy?: string | undefined;
1782
+ sortDirection?: "asc" | "desc" | undefined;
1783
+ filterField?: string | undefined;
1784
+ filterValue?: string | number | boolean | string[] | number[] | undefined;
1785
+ filterOperator?: "in" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
1786
+ organizationId?: string | undefined;
1787
+ organizationSlug?: string | undefined;
1788
+ } | undefined;
1789
+ fetchOptions?: FetchOptions | undefined;
1790
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1791
+ members: ({
1792
+ id: string;
1793
+ organizationId: string;
1794
+ role: "org:admin" | "org:member" | "org:reviewer";
1795
+ createdAt: Date;
1796
+ userId: string;
1797
+ teamId?: string | undefined | undefined;
1798
+ user: {
1799
+ id: string;
1800
+ email: string;
1801
+ name: string;
1802
+ image?: string | undefined;
1803
+ };
1804
+ } & {
1805
+ user: {
1806
+ id: string;
1807
+ name: string;
1808
+ email: string;
1809
+ image: string | null | undefined;
1810
+ };
1811
+ })[];
1812
+ total: number;
1813
+ }, {
1814
+ code?: string | undefined;
1815
+ message?: string | undefined;
1816
+ }, FetchOptions["throw"] extends true ? true : true>>;
1817
+ };
1818
+ } & {
1819
+ organization: {
1820
+ getActiveMemberRole: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
1821
+ userId?: string | undefined;
1822
+ organizationId?: string | undefined;
1823
+ organizationSlug?: string | undefined;
1824
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
1825
+ query?: {
1826
+ userId?: string | undefined;
1827
+ organizationId?: string | undefined;
1828
+ organizationSlug?: string | undefined;
1829
+ } | undefined;
1830
+ fetchOptions?: FetchOptions | undefined;
1831
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1832
+ role: "org:admin" | "org:member" | "org:reviewer";
1833
+ }, {
1834
+ code?: string | undefined;
1835
+ message?: string | undefined;
1836
+ }, FetchOptions["throw"] extends true ? true : true>>;
1837
+ };
1838
+ } & {
1839
+ organization: {
1840
+ hasPermission: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1841
+ permissions: {
1842
+ access?: string[] | undefined;
1843
+ organization?: ("update" | "delete")[] | undefined;
1844
+ member?: ("update" | "delete" | "create")[] | undefined;
1845
+ invitation?: ("create" | "cancel")[] | undefined;
1846
+ team?: ("update" | "delete" | "create")[] | undefined;
1847
+ ac?: ("update" | "delete" | "create" | "read")[] | undefined;
1848
+ };
1849
+ } & {
1850
+ organizationId?: string | undefined;
1851
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1852
+ permissions: {
1853
+ access?: string[] | undefined;
1854
+ organization?: ("update" | "delete")[] | undefined;
1855
+ member?: ("update" | "delete" | "create")[] | undefined;
1856
+ invitation?: ("create" | "cancel")[] | undefined;
1857
+ team?: ("update" | "delete" | "create")[] | undefined;
1858
+ ac?: ("update" | "delete" | "create" | "read")[] | undefined;
1859
+ };
1860
+ } & {
1861
+ organizationId?: string | undefined;
1862
+ } & {
1863
+ fetchOptions?: FetchOptions | undefined;
1864
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1865
+ error: null;
1866
+ success: boolean;
1867
+ }, {
1868
+ code?: string | undefined;
1869
+ message?: string | undefined;
1870
+ }, FetchOptions["throw"] extends true ? true : true>>;
1871
+ };
1872
+ } & {
1873
+ organization: {
1874
+ createTeam: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1875
+ name: string;
1876
+ organizationId?: string | undefined;
1877
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1878
+ name: string;
1879
+ organizationId?: string | undefined;
1880
+ } & {
1881
+ fetchOptions?: FetchOptions | undefined;
1882
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1883
+ id: string;
1884
+ name: string;
1885
+ organizationId: string;
1886
+ createdAt: Date;
1887
+ updatedAt?: Date | undefined;
1888
+ }, {
1889
+ code?: string | undefined;
1890
+ message?: string | undefined;
1891
+ }, FetchOptions["throw"] extends true ? true : true>>;
1892
+ };
1893
+ } & {
1894
+ organization: {
1895
+ listTeams: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
1896
+ organizationId?: string | undefined;
1897
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
1898
+ query?: {
1899
+ organizationId?: string | undefined;
1900
+ } | undefined;
1901
+ fetchOptions?: FetchOptions | undefined;
1902
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1903
+ id: string;
1904
+ name: string;
1905
+ organizationId: string;
1906
+ createdAt: Date;
1907
+ updatedAt?: Date | undefined;
1908
+ }[], {
1909
+ code?: string | undefined;
1910
+ message?: string | undefined;
1911
+ }, FetchOptions["throw"] extends true ? true : true>>;
1912
+ };
1913
+ } & {
1914
+ organization: {
1915
+ removeTeam: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1916
+ teamId: string;
1917
+ organizationId?: string | undefined;
1918
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1919
+ teamId: string;
1920
+ organizationId?: string | undefined;
1921
+ } & {
1922
+ fetchOptions?: FetchOptions | undefined;
1923
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1924
+ message: string;
1925
+ }, {
1926
+ code?: string | undefined;
1927
+ message?: string | undefined;
1928
+ }, FetchOptions["throw"] extends true ? true : true>>;
1929
+ };
1930
+ } & {
1931
+ organization: {
1932
+ updateTeam: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1933
+ teamId: string;
1934
+ data: Partial<{
1935
+ name: string;
1936
+ organizationId: string;
1937
+ }>;
1938
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1939
+ teamId: string;
1940
+ data: Partial<{
1941
+ name: string;
1942
+ organizationId: string;
1943
+ }>;
1944
+ } & {
1945
+ fetchOptions?: FetchOptions | undefined;
1946
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1947
+ id: string;
1948
+ name: string;
1949
+ organizationId: string;
1950
+ createdAt: Date;
1951
+ updatedAt?: Date | undefined;
1952
+ }, {
1953
+ code?: string | undefined;
1954
+ message?: string | undefined;
1955
+ }, FetchOptions["throw"] extends true ? true : true>>;
1956
+ };
1957
+ } & {
1958
+ organization: {
1959
+ setActiveTeam: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1960
+ teamId?: string | null | undefined;
1961
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
1962
+ teamId?: string | null | undefined;
1963
+ } & {
1964
+ fetchOptions?: FetchOptions | undefined;
1965
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1966
+ id: string;
1967
+ name: string;
1968
+ organizationId: string;
1969
+ createdAt: Date;
1970
+ updatedAt?: Date | undefined;
1971
+ }, {
1972
+ code?: string | undefined;
1973
+ message?: string | undefined;
1974
+ }, FetchOptions["throw"] extends true ? true : true>>;
1975
+ };
1976
+ } & {
1977
+ organization: {
1978
+ listUserTeams: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
1979
+ query?: Record<string, any> | undefined;
1980
+ fetchOptions?: FetchOptions | undefined;
1981
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1982
+ id: string;
1983
+ name: string;
1984
+ organizationId: string;
1985
+ createdAt: Date;
1986
+ updatedAt?: Date | undefined;
1987
+ }[], {
1988
+ code?: string | undefined;
1989
+ message?: string | undefined;
1990
+ }, FetchOptions["throw"] extends true ? true : true>>;
1991
+ };
1992
+ } & {
1993
+ organization: {
1994
+ listTeamMembers: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
1995
+ teamId?: string | undefined;
1996
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
1997
+ query?: {
1998
+ teamId?: string | undefined;
1999
+ } | undefined;
2000
+ fetchOptions?: FetchOptions | undefined;
2001
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2002
+ id: string;
2003
+ teamId: string;
2004
+ userId: string;
2005
+ createdAt: Date;
2006
+ }[], {
2007
+ code?: string | undefined;
2008
+ message?: string | undefined;
2009
+ }, FetchOptions["throw"] extends true ? true : true>>;
2010
+ };
2011
+ } & {
2012
+ organization: {
2013
+ addTeamMember: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2014
+ teamId: string;
2015
+ userId: unknown;
2016
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
2017
+ teamId: string;
2018
+ userId: unknown;
2019
+ } & {
2020
+ fetchOptions?: FetchOptions | undefined;
2021
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2022
+ id: string;
2023
+ teamId: string;
2024
+ userId: string;
2025
+ createdAt: Date;
2026
+ }, {
2027
+ code?: string | undefined;
2028
+ message?: string | undefined;
2029
+ }, FetchOptions["throw"] extends true ? true : true>>;
2030
+ };
2031
+ } & {
2032
+ organization: {
2033
+ removeTeamMember: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2034
+ teamId: string;
2035
+ userId: unknown;
2036
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
2037
+ teamId: string;
2038
+ userId: unknown;
2039
+ } & {
2040
+ fetchOptions?: FetchOptions | undefined;
2041
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2042
+ message: string;
2043
+ }, {
2044
+ code?: string | undefined;
2045
+ message?: string | undefined;
2046
+ }, FetchOptions["throw"] extends true ? true : true>>;
2047
+ };
2048
+ } & {
2049
+ sso: {
2050
+ saml2: {
2051
+ sp: {
2052
+ metadata: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
2053
+ providerId: string;
2054
+ format?: "json" | "xml" | undefined;
2055
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
2056
+ query: {
2057
+ providerId: string;
2058
+ format?: "json" | "xml" | undefined;
2059
+ };
2060
+ fetchOptions?: FetchOptions | undefined;
2061
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<Response, {
2062
+ code?: string | undefined;
2063
+ message?: string | undefined;
2064
+ }, FetchOptions["throw"] extends true ? true : true>>;
2065
+ };
2066
+ };
2067
+ };
2068
+ } & {
2069
+ sso: {
2070
+ register: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2071
+ providerId: string;
2072
+ issuer: string;
2073
+ domain: string;
2074
+ oidcConfig?: {
2075
+ clientId: string;
2076
+ clientSecret: string;
2077
+ authorizationEndpoint?: string | undefined;
2078
+ tokenEndpoint?: string | undefined;
2079
+ userInfoEndpoint?: string | undefined;
2080
+ tokenEndpointAuthentication?: "client_secret_post" | "client_secret_basic" | undefined;
2081
+ jwksEndpoint?: string | undefined;
2082
+ discoveryEndpoint?: string | undefined;
2083
+ skipDiscovery?: boolean | undefined;
2084
+ scopes?: string[] | undefined;
2085
+ pkce?: boolean | undefined;
2086
+ mapping?: {
2087
+ id: string;
2088
+ email: string;
2089
+ name: string;
2090
+ emailVerified?: string | undefined;
2091
+ image?: string | undefined;
2092
+ extraFields?: Record<string, any> | undefined;
2093
+ } | undefined;
2094
+ } | undefined;
2095
+ samlConfig?: {
2096
+ entryPoint: string;
2097
+ cert: string;
2098
+ callbackUrl: string;
2099
+ spMetadata: {
2100
+ metadata?: string | undefined;
2101
+ entityID?: string | undefined;
2102
+ binding?: string | undefined;
2103
+ privateKey?: string | undefined;
2104
+ privateKeyPass?: string | undefined;
2105
+ isAssertionEncrypted?: boolean | undefined;
2106
+ encPrivateKey?: string | undefined;
2107
+ encPrivateKeyPass?: string | undefined;
2108
+ };
2109
+ audience?: string | undefined;
2110
+ idpMetadata?: {
2111
+ metadata?: string | undefined;
2112
+ entityID?: string | undefined;
2113
+ cert?: string | undefined;
2114
+ privateKey?: string | undefined;
2115
+ privateKeyPass?: string | undefined;
2116
+ isAssertionEncrypted?: boolean | undefined;
2117
+ encPrivateKey?: string | undefined;
2118
+ encPrivateKeyPass?: string | undefined;
2119
+ singleSignOnService?: {
2120
+ Binding: string;
2121
+ Location: string;
2122
+ }[] | undefined;
2123
+ } | undefined;
2124
+ wantAssertionsSigned?: boolean | undefined;
2125
+ authnRequestsSigned?: boolean | undefined;
2126
+ signatureAlgorithm?: string | undefined;
2127
+ digestAlgorithm?: string | undefined;
2128
+ identifierFormat?: string | undefined;
2129
+ privateKey?: string | undefined;
2130
+ decryptionPvk?: string | undefined;
2131
+ additionalParams?: Record<string, any> | undefined;
2132
+ mapping?: {
2133
+ id: string;
2134
+ email: string;
2135
+ name: string;
2136
+ emailVerified?: string | undefined;
2137
+ firstName?: string | undefined;
2138
+ lastName?: string | undefined;
2139
+ extraFields?: Record<string, any> | undefined;
2140
+ } | undefined;
2141
+ } | undefined;
2142
+ organizationId?: string | undefined;
2143
+ overrideUserInfo?: boolean | undefined;
2144
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
2145
+ providerId: string;
2146
+ issuer: string;
2147
+ domain: string;
2148
+ oidcConfig?: {
2149
+ clientId: string;
2150
+ clientSecret: string;
2151
+ authorizationEndpoint?: string | undefined;
2152
+ tokenEndpoint?: string | undefined;
2153
+ userInfoEndpoint?: string | undefined;
2154
+ tokenEndpointAuthentication?: "client_secret_post" | "client_secret_basic" | undefined;
2155
+ jwksEndpoint?: string | undefined;
2156
+ discoveryEndpoint?: string | undefined;
2157
+ skipDiscovery?: boolean | undefined;
2158
+ scopes?: string[] | undefined;
2159
+ pkce?: boolean | undefined;
2160
+ mapping?: {
2161
+ id: string;
2162
+ email: string;
2163
+ name: string;
2164
+ emailVerified?: string | undefined;
2165
+ image?: string | undefined;
2166
+ extraFields?: Record<string, any> | undefined;
2167
+ } | undefined;
2168
+ } | undefined;
2169
+ samlConfig?: {
2170
+ entryPoint: string;
2171
+ cert: string;
2172
+ callbackUrl: string;
2173
+ spMetadata: {
2174
+ metadata?: string | undefined;
2175
+ entityID?: string | undefined;
2176
+ binding?: string | undefined;
2177
+ privateKey?: string | undefined;
2178
+ privateKeyPass?: string | undefined;
2179
+ isAssertionEncrypted?: boolean | undefined;
2180
+ encPrivateKey?: string | undefined;
2181
+ encPrivateKeyPass?: string | undefined;
2182
+ };
2183
+ audience?: string | undefined;
2184
+ idpMetadata?: {
2185
+ metadata?: string | undefined;
2186
+ entityID?: string | undefined;
2187
+ cert?: string | undefined;
2188
+ privateKey?: string | undefined;
2189
+ privateKeyPass?: string | undefined;
2190
+ isAssertionEncrypted?: boolean | undefined;
2191
+ encPrivateKey?: string | undefined;
2192
+ encPrivateKeyPass?: string | undefined;
2193
+ singleSignOnService?: {
2194
+ Binding: string;
2195
+ Location: string;
2196
+ }[] | undefined;
2197
+ } | undefined;
2198
+ wantAssertionsSigned?: boolean | undefined;
2199
+ authnRequestsSigned?: boolean | undefined;
2200
+ signatureAlgorithm?: string | undefined;
2201
+ digestAlgorithm?: string | undefined;
2202
+ identifierFormat?: string | undefined;
2203
+ privateKey?: string | undefined;
2204
+ decryptionPvk?: string | undefined;
2205
+ additionalParams?: Record<string, any> | undefined;
2206
+ mapping?: {
2207
+ id: string;
2208
+ email: string;
2209
+ name: string;
2210
+ emailVerified?: string | undefined;
2211
+ firstName?: string | undefined;
2212
+ lastName?: string | undefined;
2213
+ extraFields?: Record<string, any> | undefined;
2214
+ } | undefined;
2215
+ } | undefined;
2216
+ organizationId?: string | undefined;
2217
+ overrideUserInfo?: boolean | undefined;
2218
+ } & {
2219
+ fetchOptions?: FetchOptions | undefined;
2220
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<NonNullable<{
2221
+ redirectURI: string;
2222
+ oidcConfig: _better_auth_sso.OIDCConfig | null;
2223
+ samlConfig: _better_auth_sso.SAMLConfig | null;
2224
+ } & Omit<{
2225
+ issuer: string;
2226
+ oidcConfig?: _better_auth_sso.OIDCConfig | undefined;
2227
+ samlConfig?: _better_auth_sso.SAMLConfig | undefined;
2228
+ userId: string;
2229
+ providerId: string;
2230
+ organizationId?: string | undefined;
2231
+ domain: string;
2232
+ }, "oidcConfig" | "samlConfig">>, {
2233
+ code?: string | undefined;
2234
+ message?: string | undefined;
2235
+ }, FetchOptions["throw"] extends true ? true : true>>;
2236
+ };
2237
+ } & {
2238
+ signIn: {
2239
+ sso: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2240
+ callbackURL: string;
2241
+ email?: string | undefined;
2242
+ organizationSlug?: string | undefined;
2243
+ providerId?: string | undefined;
2244
+ domain?: string | undefined;
2245
+ errorCallbackURL?: string | undefined;
2246
+ newUserCallbackURL?: string | undefined;
2247
+ scopes?: string[] | undefined;
2248
+ loginHint?: string | undefined;
2249
+ requestSignUp?: boolean | undefined;
2250
+ providerType?: "saml" | "oidc" | undefined;
2251
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
2252
+ callbackURL: string;
2253
+ email?: string | undefined;
2254
+ organizationSlug?: string | undefined;
2255
+ providerId?: string | undefined;
2256
+ domain?: string | undefined;
2257
+ errorCallbackURL?: string | undefined;
2258
+ newUserCallbackURL?: string | undefined;
2259
+ scopes?: string[] | undefined;
2260
+ loginHint?: string | undefined;
2261
+ requestSignUp?: boolean | undefined;
2262
+ providerType?: "saml" | "oidc" | undefined;
2263
+ } & {
2264
+ fetchOptions?: FetchOptions | undefined;
2265
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2266
+ url: string;
2267
+ redirect: boolean;
2268
+ }, {
2269
+ code?: string | undefined;
2270
+ message?: string | undefined;
2271
+ }, FetchOptions["throw"] extends true ? true : true>>;
2272
+ };
2273
+ } & {
2274
+ sso: {
2275
+ providers: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
2276
+ query?: Record<string, any> | undefined;
2277
+ fetchOptions?: FetchOptions | undefined;
2278
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2279
+ providers: {
2280
+ providerId: string;
2281
+ type: string;
2282
+ issuer: string;
2283
+ domain: string;
2284
+ organizationId: string | null;
2285
+ domainVerified: boolean;
2286
+ oidcConfig: {
2287
+ discoveryEndpoint: string;
2288
+ clientIdLastFour: string;
2289
+ pkce: boolean;
2290
+ authorizationEndpoint: string | undefined;
2291
+ tokenEndpoint: string | undefined;
2292
+ userInfoEndpoint: string | undefined;
2293
+ jwksEndpoint: string | undefined;
2294
+ scopes: string[] | undefined;
2295
+ tokenEndpointAuthentication: "client_secret_post" | "client_secret_basic" | undefined;
2296
+ } | undefined;
2297
+ samlConfig: {
2298
+ entryPoint: string;
2299
+ callbackUrl: string;
2300
+ audience: string | undefined;
2301
+ wantAssertionsSigned: boolean | undefined;
2302
+ authnRequestsSigned: boolean | undefined;
2303
+ identifierFormat: string | undefined;
2304
+ signatureAlgorithm: string | undefined;
2305
+ digestAlgorithm: string | undefined;
2306
+ certificate: {
2307
+ fingerprintSha256: string;
2308
+ notBefore: string;
2309
+ notAfter: string;
2310
+ publicKeyAlgorithm: string;
2311
+ } | {
2312
+ error: string;
2313
+ };
2314
+ } | undefined;
2315
+ spMetadataUrl: string;
2316
+ }[];
2317
+ }, {
2318
+ code?: string | undefined;
2319
+ message?: string | undefined;
2320
+ }, FetchOptions["throw"] extends true ? true : true>>;
2321
+ };
2322
+ } & {
2323
+ sso: {
2324
+ getProvider: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
2325
+ providerId: string;
2326
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
2327
+ query: {
2328
+ providerId: string;
2329
+ };
2330
+ fetchOptions?: FetchOptions | undefined;
2331
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2332
+ providerId: string;
2333
+ type: string;
2334
+ issuer: string;
2335
+ domain: string;
2336
+ organizationId: string | null;
2337
+ domainVerified: boolean;
2338
+ oidcConfig: {
2339
+ discoveryEndpoint: string;
2340
+ clientIdLastFour: string;
2341
+ pkce: boolean;
2342
+ authorizationEndpoint: string | undefined;
2343
+ tokenEndpoint: string | undefined;
2344
+ userInfoEndpoint: string | undefined;
2345
+ jwksEndpoint: string | undefined;
2346
+ scopes: string[] | undefined;
2347
+ tokenEndpointAuthentication: "client_secret_post" | "client_secret_basic" | undefined;
2348
+ } | undefined;
2349
+ samlConfig: {
2350
+ entryPoint: string;
2351
+ callbackUrl: string;
2352
+ audience: string | undefined;
2353
+ wantAssertionsSigned: boolean | undefined;
2354
+ authnRequestsSigned: boolean | undefined;
2355
+ identifierFormat: string | undefined;
2356
+ signatureAlgorithm: string | undefined;
2357
+ digestAlgorithm: string | undefined;
2358
+ certificate: {
2359
+ fingerprintSha256: string;
2360
+ notBefore: string;
2361
+ notAfter: string;
2362
+ publicKeyAlgorithm: string;
2363
+ } | {
2364
+ error: string;
2365
+ };
2366
+ } | undefined;
2367
+ spMetadataUrl: string;
2368
+ }, {
2369
+ code?: string | undefined;
2370
+ message?: string | undefined;
2371
+ }, FetchOptions["throw"] extends true ? true : true>>;
2372
+ };
2373
+ } & {
2374
+ sso: {
2375
+ updateProvider: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2376
+ providerId: string;
2377
+ issuer?: string | undefined;
2378
+ domain?: string | undefined;
2379
+ oidcConfig?: {
2380
+ clientId?: string | undefined;
2381
+ clientSecret?: string | undefined;
2382
+ authorizationEndpoint?: string | undefined;
2383
+ tokenEndpoint?: string | undefined;
2384
+ userInfoEndpoint?: string | undefined;
2385
+ tokenEndpointAuthentication?: "client_secret_post" | "client_secret_basic" | undefined;
2386
+ jwksEndpoint?: string | undefined;
2387
+ discoveryEndpoint?: string | undefined;
2388
+ scopes?: string[] | undefined;
2389
+ pkce?: boolean | undefined;
2390
+ overrideUserInfo?: boolean | undefined;
2391
+ mapping?: {
2392
+ id?: string | undefined;
2393
+ email?: string | undefined;
2394
+ emailVerified?: string | undefined;
2395
+ name?: string | undefined;
2396
+ image?: string | undefined;
2397
+ extraFields?: Record<string, any> | undefined;
2398
+ } | undefined;
2399
+ } | undefined;
2400
+ samlConfig?: {
2401
+ entryPoint?: string | undefined;
2402
+ cert?: string | undefined;
2403
+ callbackUrl?: string | undefined;
2404
+ audience?: string | undefined;
2405
+ idpMetadata?: {
2406
+ metadata?: string | undefined;
2407
+ entityID?: string | undefined;
2408
+ cert?: string | undefined;
2409
+ privateKey?: string | undefined;
2410
+ privateKeyPass?: string | undefined;
2411
+ isAssertionEncrypted?: boolean | undefined;
2412
+ encPrivateKey?: string | undefined;
2413
+ encPrivateKeyPass?: string | undefined;
2414
+ singleSignOnService?: {
2415
+ Binding: string;
2416
+ Location: string;
2417
+ }[] | undefined;
2418
+ } | undefined;
2419
+ spMetadata?: {
2420
+ metadata?: string | undefined;
2421
+ entityID?: string | undefined;
2422
+ binding?: string | undefined;
2423
+ privateKey?: string | undefined;
2424
+ privateKeyPass?: string | undefined;
2425
+ isAssertionEncrypted?: boolean | undefined;
2426
+ encPrivateKey?: string | undefined;
2427
+ encPrivateKeyPass?: string | undefined;
2428
+ } | undefined;
2429
+ wantAssertionsSigned?: boolean | undefined;
2430
+ authnRequestsSigned?: boolean | undefined;
2431
+ signatureAlgorithm?: string | undefined;
2432
+ digestAlgorithm?: string | undefined;
2433
+ identifierFormat?: string | undefined;
2434
+ privateKey?: string | undefined;
2435
+ decryptionPvk?: string | undefined;
2436
+ additionalParams?: Record<string, any> | undefined;
2437
+ mapping?: {
2438
+ id?: string | undefined;
2439
+ email?: string | undefined;
2440
+ emailVerified?: string | undefined;
2441
+ name?: string | undefined;
2442
+ firstName?: string | undefined;
2443
+ lastName?: string | undefined;
2444
+ extraFields?: Record<string, any> | undefined;
2445
+ } | undefined;
2446
+ } | undefined;
2447
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
2448
+ providerId: string;
2449
+ issuer?: string | undefined;
2450
+ domain?: string | undefined;
2451
+ oidcConfig?: {
2452
+ clientId?: string | undefined;
2453
+ clientSecret?: string | undefined;
2454
+ authorizationEndpoint?: string | undefined;
2455
+ tokenEndpoint?: string | undefined;
2456
+ userInfoEndpoint?: string | undefined;
2457
+ tokenEndpointAuthentication?: "client_secret_post" | "client_secret_basic" | undefined;
2458
+ jwksEndpoint?: string | undefined;
2459
+ discoveryEndpoint?: string | undefined;
2460
+ scopes?: string[] | undefined;
2461
+ pkce?: boolean | undefined;
2462
+ overrideUserInfo?: boolean | undefined;
2463
+ mapping?: {
2464
+ id?: string | undefined;
2465
+ email?: string | undefined;
2466
+ emailVerified?: string | undefined;
2467
+ name?: string | undefined;
2468
+ image?: string | undefined;
2469
+ extraFields?: Record<string, any> | undefined;
2470
+ } | undefined;
2471
+ } | undefined;
2472
+ samlConfig?: {
2473
+ entryPoint?: string | undefined;
2474
+ cert?: string | undefined;
2475
+ callbackUrl?: string | undefined;
2476
+ audience?: string | undefined;
2477
+ idpMetadata?: {
2478
+ metadata?: string | undefined;
2479
+ entityID?: string | undefined;
2480
+ cert?: string | undefined;
2481
+ privateKey?: string | undefined;
2482
+ privateKeyPass?: string | undefined;
2483
+ isAssertionEncrypted?: boolean | undefined;
2484
+ encPrivateKey?: string | undefined;
2485
+ encPrivateKeyPass?: string | undefined;
2486
+ singleSignOnService?: {
2487
+ Binding: string;
2488
+ Location: string;
2489
+ }[] | undefined;
2490
+ } | undefined;
2491
+ spMetadata?: {
2492
+ metadata?: string | undefined;
2493
+ entityID?: string | undefined;
2494
+ binding?: string | undefined;
2495
+ privateKey?: string | undefined;
2496
+ privateKeyPass?: string | undefined;
2497
+ isAssertionEncrypted?: boolean | undefined;
2498
+ encPrivateKey?: string | undefined;
2499
+ encPrivateKeyPass?: string | undefined;
2500
+ } | undefined;
2501
+ wantAssertionsSigned?: boolean | undefined;
2502
+ authnRequestsSigned?: boolean | undefined;
2503
+ signatureAlgorithm?: string | undefined;
2504
+ digestAlgorithm?: string | undefined;
2505
+ identifierFormat?: string | undefined;
2506
+ privateKey?: string | undefined;
2507
+ decryptionPvk?: string | undefined;
2508
+ additionalParams?: Record<string, any> | undefined;
2509
+ mapping?: {
2510
+ id?: string | undefined;
2511
+ email?: string | undefined;
2512
+ emailVerified?: string | undefined;
2513
+ name?: string | undefined;
2514
+ firstName?: string | undefined;
2515
+ lastName?: string | undefined;
2516
+ extraFields?: Record<string, any> | undefined;
2517
+ } | undefined;
2518
+ } | undefined;
2519
+ } & {
2520
+ fetchOptions?: FetchOptions | undefined;
2521
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2522
+ providerId: string;
2523
+ type: string;
2524
+ issuer: string;
2525
+ domain: string;
2526
+ organizationId: string | null;
2527
+ domainVerified: boolean;
2528
+ oidcConfig: {
2529
+ discoveryEndpoint: string;
2530
+ clientIdLastFour: string;
2531
+ pkce: boolean;
2532
+ authorizationEndpoint: string | undefined;
2533
+ tokenEndpoint: string | undefined;
2534
+ userInfoEndpoint: string | undefined;
2535
+ jwksEndpoint: string | undefined;
2536
+ scopes: string[] | undefined;
2537
+ tokenEndpointAuthentication: "client_secret_post" | "client_secret_basic" | undefined;
2538
+ } | undefined;
2539
+ samlConfig: {
2540
+ entryPoint: string;
2541
+ callbackUrl: string;
2542
+ audience: string | undefined;
2543
+ wantAssertionsSigned: boolean | undefined;
2544
+ authnRequestsSigned: boolean | undefined;
2545
+ identifierFormat: string | undefined;
2546
+ signatureAlgorithm: string | undefined;
2547
+ digestAlgorithm: string | undefined;
2548
+ certificate: {
2549
+ fingerprintSha256: string;
2550
+ notBefore: string;
2551
+ notAfter: string;
2552
+ publicKeyAlgorithm: string;
2553
+ } | {
2554
+ error: string;
2555
+ };
2556
+ } | undefined;
2557
+ spMetadataUrl: string;
2558
+ }, {
2559
+ code?: string | undefined;
2560
+ message?: string | undefined;
2561
+ }, FetchOptions["throw"] extends true ? true : true>>;
2562
+ };
2563
+ } & {
2564
+ sso: {
2565
+ deleteProvider: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2566
+ providerId: string;
2567
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
2568
+ providerId: string;
2569
+ } & {
2570
+ fetchOptions?: FetchOptions | undefined;
2571
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2572
+ success: boolean;
2573
+ }, {
2574
+ code?: string | undefined;
2575
+ message?: string | undefined;
2576
+ }, FetchOptions["throw"] extends true ? true : true>>;
2577
+ };
2578
+ } & {
2579
+ twoFactor: {
2580
+ enable: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2581
+ password: string;
2582
+ issuer?: string | undefined;
2583
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
2584
+ password: string;
2585
+ issuer?: string | undefined;
2586
+ } & {
2587
+ fetchOptions?: FetchOptions | undefined;
2588
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2589
+ totpURI: string;
2590
+ backupCodes: string[];
2591
+ }, {
2592
+ code?: string | undefined;
2593
+ message?: string | undefined;
2594
+ }, FetchOptions["throw"] extends true ? true : true>>;
2595
+ };
2596
+ } & {
2597
+ twoFactor: {
2598
+ disable: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2599
+ password: string;
2600
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
2601
+ password: string;
2602
+ } & {
2603
+ fetchOptions?: FetchOptions | undefined;
2604
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2605
+ status: boolean;
2606
+ }, {
2607
+ code?: string | undefined;
2608
+ message?: string | undefined;
2609
+ }, FetchOptions["throw"] extends true ? true : true>>;
2610
+ };
2611
+ } & {
2612
+ twoFactor: {
2613
+ verifyBackupCode: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2614
+ code: string;
2615
+ disableSession?: boolean | undefined;
2616
+ trustDevice?: boolean | undefined;
2617
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
2618
+ code: string;
2619
+ disableSession?: boolean | undefined;
2620
+ trustDevice?: boolean | undefined;
2621
+ } & {
2622
+ fetchOptions?: FetchOptions | undefined;
2623
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<Omit<{
2624
+ token: string | undefined;
2625
+ user: (Record<string, any> & {
2626
+ id: string;
2627
+ createdAt: Date;
2628
+ updatedAt: Date;
2629
+ email: string;
2630
+ emailVerified: boolean;
2631
+ name: string;
2632
+ image?: string | null | undefined;
2633
+ }) | better_auth_plugins.UserWithTwoFactor;
2634
+ }, "user"> & {
2635
+ user: better_auth.StripEmptyObjects<{
2636
+ id: string;
2637
+ createdAt: Date;
2638
+ updatedAt: Date;
2639
+ email: string;
2640
+ emailVerified: boolean;
2641
+ name: string;
2642
+ image?: string | null | undefined;
2643
+ } & {
2644
+ twoFactorEnabled: boolean | null | undefined;
2645
+ } & {} & {
2646
+ banned: boolean | null | undefined;
2647
+ } & {
2648
+ role?: string | null | undefined;
2649
+ banReason?: string | null | undefined;
2650
+ banExpires?: Date | null | undefined;
2651
+ } & {
2652
+ preferredLanguage: string;
2653
+ } & {
2654
+ lastActiveAt?: Date | null | undefined;
2655
+ displayName?: string | null | undefined;
2656
+ title?: string | null | undefined;
2657
+ pronouns?: string | null | undefined;
2658
+ }>;
2659
+ }, {
2660
+ code?: string | undefined;
2661
+ message?: string | undefined;
2662
+ }, FetchOptions["throw"] extends true ? true : true>>;
2663
+ };
2664
+ } & {
2665
+ twoFactor: {
2666
+ generateBackupCodes: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2667
+ password: string;
2668
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
2669
+ password: string;
2670
+ } & {
2671
+ fetchOptions?: FetchOptions | undefined;
2672
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2673
+ status: boolean;
2674
+ backupCodes: string[];
2675
+ }, {
2676
+ code?: string | undefined;
2677
+ message?: string | undefined;
2678
+ }, FetchOptions["throw"] extends true ? true : true>>;
2679
+ };
2680
+ } & {
2681
+ twoFactor: {
2682
+ sendOtp: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2683
+ trustDevice?: boolean | undefined;
2684
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
2685
+ query?: Record<string, any> | undefined;
2686
+ fetchOptions?: FetchOptions | undefined;
2687
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2688
+ status: boolean;
2689
+ }, {
2690
+ code?: string | undefined;
2691
+ message?: string | undefined;
2692
+ }, FetchOptions["throw"] extends true ? true : true>>;
2693
+ };
2694
+ } & {
2695
+ twoFactor: {
2696
+ verifyOtp: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2697
+ code: string;
2698
+ trustDevice?: boolean | undefined;
2699
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
2700
+ code: string;
2701
+ trustDevice?: boolean | undefined;
2702
+ } & {
2703
+ fetchOptions?: FetchOptions | undefined;
2704
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<(Omit<{
2705
+ token: string;
2706
+ user: better_auth_plugins.UserWithTwoFactor;
2707
+ }, "user"> & {
2708
+ user: better_auth.StripEmptyObjects<{
2709
+ id: string;
2710
+ createdAt: Date;
2711
+ updatedAt: Date;
2712
+ email: string;
2713
+ emailVerified: boolean;
2714
+ name: string;
2715
+ image?: string | null | undefined;
2716
+ } & {
2717
+ twoFactorEnabled: boolean | null | undefined;
2718
+ } & {} & {
2719
+ banned: boolean | null | undefined;
2720
+ } & {
2721
+ role?: string | null | undefined;
2722
+ banReason?: string | null | undefined;
2723
+ banExpires?: Date | null | undefined;
2724
+ } & {
2725
+ preferredLanguage: string;
2726
+ } & {
2727
+ lastActiveAt?: Date | null | undefined;
2728
+ displayName?: string | null | undefined;
2729
+ title?: string | null | undefined;
2730
+ pronouns?: string | null | undefined;
2731
+ }>;
2732
+ }) | (Omit<{
2733
+ token: string;
2734
+ user: Record<string, any> & {
2735
+ id: string;
2736
+ createdAt: Date;
2737
+ updatedAt: Date;
2738
+ email: string;
2739
+ emailVerified: boolean;
2740
+ name: string;
2741
+ image?: string | null | undefined;
2742
+ };
2743
+ }, "user"> & {
2744
+ user: better_auth.StripEmptyObjects<{
2745
+ id: string;
2746
+ createdAt: Date;
2747
+ updatedAt: Date;
2748
+ email: string;
2749
+ emailVerified: boolean;
2750
+ name: string;
2751
+ image?: string | null | undefined;
2752
+ } & {
2753
+ twoFactorEnabled: boolean | null | undefined;
2754
+ } & {} & {
2755
+ banned: boolean | null | undefined;
2756
+ } & {
2757
+ role?: string | null | undefined;
2758
+ banReason?: string | null | undefined;
2759
+ banExpires?: Date | null | undefined;
2760
+ } & {
2761
+ preferredLanguage: string;
2762
+ } & {
2763
+ lastActiveAt?: Date | null | undefined;
2764
+ displayName?: string | null | undefined;
2765
+ title?: string | null | undefined;
2766
+ pronouns?: string | null | undefined;
2767
+ }>;
2768
+ }), {
2769
+ code?: string | undefined;
2770
+ message?: string | undefined;
2771
+ }, FetchOptions["throw"] extends true ? true : true>>;
2772
+ };
2773
+ } & {
2774
+ twoFactor: {
2775
+ getTotpUri: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2776
+ password: string;
2777
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
2778
+ password: string;
2779
+ } & {
2780
+ fetchOptions?: FetchOptions | undefined;
2781
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2782
+ totpURI: string;
2783
+ }, {
2784
+ code?: string | undefined;
2785
+ message?: string | undefined;
2786
+ }, FetchOptions["throw"] extends true ? true : true>>;
2787
+ };
2788
+ } & {
2789
+ twoFactor: {
2790
+ verifyTotp: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2791
+ code: string;
2792
+ trustDevice?: boolean | undefined;
2793
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
2794
+ code: string;
2795
+ trustDevice?: boolean | undefined;
2796
+ } & {
2797
+ fetchOptions?: FetchOptions | undefined;
2798
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<(Omit<{
2799
+ token: string;
2800
+ user: better_auth_plugins.UserWithTwoFactor;
2801
+ }, "user"> & {
2802
+ user: better_auth.StripEmptyObjects<{
2803
+ id: string;
2804
+ createdAt: Date;
2805
+ updatedAt: Date;
2806
+ email: string;
2807
+ emailVerified: boolean;
2808
+ name: string;
2809
+ image?: string | null | undefined;
2810
+ } & {
2811
+ twoFactorEnabled: boolean | null | undefined;
2812
+ } & {} & {
2813
+ banned: boolean | null | undefined;
2814
+ } & {
2815
+ role?: string | null | undefined;
2816
+ banReason?: string | null | undefined;
2817
+ banExpires?: Date | null | undefined;
2818
+ } & {
2819
+ preferredLanguage: string;
2820
+ } & {
2821
+ lastActiveAt?: Date | null | undefined;
2822
+ displayName?: string | null | undefined;
2823
+ title?: string | null | undefined;
2824
+ pronouns?: string | null | undefined;
2825
+ }>;
2826
+ }) | (Omit<{
2827
+ token: string;
2828
+ user: Record<string, any> & {
2829
+ id: string;
2830
+ createdAt: Date;
2831
+ updatedAt: Date;
2832
+ email: string;
2833
+ emailVerified: boolean;
2834
+ name: string;
2835
+ image?: string | null | undefined;
2836
+ };
2837
+ }, "user"> & {
2838
+ user: better_auth.StripEmptyObjects<{
2839
+ id: string;
2840
+ createdAt: Date;
2841
+ updatedAt: Date;
2842
+ email: string;
2843
+ emailVerified: boolean;
2844
+ name: string;
2845
+ image?: string | null | undefined;
2846
+ } & {
2847
+ twoFactorEnabled: boolean | null | undefined;
2848
+ } & {} & {
2849
+ banned: boolean | null | undefined;
2850
+ } & {
2851
+ role?: string | null | undefined;
2852
+ banReason?: string | null | undefined;
2853
+ banExpires?: Date | null | undefined;
2854
+ } & {
2855
+ preferredLanguage: string;
2856
+ } & {
2857
+ lastActiveAt?: Date | null | undefined;
2858
+ displayName?: string | null | undefined;
2859
+ title?: string | null | undefined;
2860
+ pronouns?: string | null | undefined;
2861
+ }>;
2862
+ }), {
2863
+ code?: string | undefined;
2864
+ message?: string | undefined;
2865
+ }, FetchOptions["throw"] extends true ? true : true>>;
2866
+ };
2867
+ } & {
2868
+ token: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
2869
+ query?: Record<string, any> | undefined;
2870
+ fetchOptions?: FetchOptions | undefined;
2871
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2872
+ token: string;
2873
+ }, {
2874
+ code?: string | undefined;
2875
+ message?: string | undefined;
2876
+ }, FetchOptions["throw"] extends true ? true : true>>;
2877
+ } & {
2878
+ apiKey: {
2879
+ create: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2880
+ configId?: string | undefined;
2881
+ name?: string | undefined;
2882
+ expiresIn?: number | null | undefined;
2883
+ prefix?: string | undefined;
2884
+ remaining?: number | null | undefined;
2885
+ metadata?: any;
2886
+ refillAmount?: number | undefined;
2887
+ refillInterval?: number | undefined;
2888
+ rateLimitTimeWindow?: number | undefined;
2889
+ rateLimitMax?: number | undefined;
2890
+ rateLimitEnabled?: boolean | undefined;
2891
+ permissions?: Record<string, string[]> | undefined;
2892
+ userId?: unknown;
2893
+ organizationId?: unknown;
2894
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
2895
+ configId?: string | undefined;
2896
+ name?: string | undefined;
2897
+ expiresIn?: number | null | undefined;
2898
+ prefix?: string | undefined;
2899
+ remaining?: number | null | undefined;
2900
+ metadata?: any;
2901
+ refillAmount?: number | undefined;
2902
+ refillInterval?: number | undefined;
2903
+ rateLimitTimeWindow?: number | undefined;
2904
+ rateLimitMax?: number | undefined;
2905
+ rateLimitEnabled?: boolean | undefined;
2906
+ permissions?: Record<string, string[]> | undefined;
2907
+ userId?: unknown;
2908
+ organizationId?: unknown;
2909
+ } & {
2910
+ fetchOptions?: FetchOptions | undefined;
2911
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2912
+ key: string;
2913
+ metadata: any;
2914
+ permissions: any;
2915
+ id: string;
2916
+ configId: string;
2917
+ name: string | null;
2918
+ start: string | null;
2919
+ prefix: string | null;
2920
+ referenceId: string;
2921
+ refillInterval: number | null;
2922
+ refillAmount: number | null;
2923
+ lastRefillAt: Date | null;
2924
+ enabled: boolean;
2925
+ rateLimitEnabled: boolean;
2926
+ rateLimitTimeWindow: number | null;
2927
+ rateLimitMax: number | null;
2928
+ requestCount: number;
2929
+ remaining: number | null;
2930
+ lastRequest: Date | null;
2931
+ expiresAt: Date | null;
2932
+ createdAt: Date;
2933
+ updatedAt: Date;
2934
+ }, {
2935
+ code?: string | undefined;
2936
+ message?: string | undefined;
2937
+ }, FetchOptions["throw"] extends true ? true : true>>;
2938
+ };
2939
+ } & {
2940
+ apiKey: {
2941
+ get: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
2942
+ id: string;
2943
+ configId?: string | undefined;
2944
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
2945
+ query: {
2946
+ id: string;
2947
+ configId?: string | undefined;
2948
+ };
2949
+ fetchOptions?: FetchOptions | undefined;
2950
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2951
+ metadata: Record<string, any> | null;
2952
+ permissions: {
2953
+ [key: string]: string[];
2954
+ } | null;
2955
+ id: string;
2956
+ configId: string;
2957
+ name: string | null;
2958
+ start: string | null;
2959
+ prefix: string | null;
2960
+ referenceId: string;
2961
+ refillInterval: number | null;
2962
+ refillAmount: number | null;
2963
+ lastRefillAt: Date | null;
2964
+ enabled: boolean;
2965
+ rateLimitEnabled: boolean;
2966
+ rateLimitTimeWindow: number | null;
2967
+ rateLimitMax: number | null;
2968
+ requestCount: number;
2969
+ remaining: number | null;
2970
+ lastRequest: Date | null;
2971
+ expiresAt: Date | null;
2972
+ createdAt: Date;
2973
+ updatedAt: Date;
2974
+ }, {
2975
+ code?: string | undefined;
2976
+ message?: string | undefined;
2977
+ }, FetchOptions["throw"] extends true ? true : true>>;
2978
+ };
2979
+ } & {
2980
+ apiKey: {
2981
+ update: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2982
+ keyId: string;
2983
+ configId?: string | undefined;
2984
+ userId?: unknown;
2985
+ name?: string | undefined;
2986
+ enabled?: boolean | undefined;
2987
+ remaining?: number | undefined;
2988
+ refillAmount?: number | undefined;
2989
+ refillInterval?: number | undefined;
2990
+ metadata?: any;
2991
+ expiresIn?: number | null | undefined;
2992
+ rateLimitEnabled?: boolean | undefined;
2993
+ rateLimitTimeWindow?: number | undefined;
2994
+ rateLimitMax?: number | undefined;
2995
+ permissions?: Record<string, string[]> | null | undefined;
2996
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
2997
+ keyId: string;
2998
+ configId?: string | undefined;
2999
+ userId?: unknown;
3000
+ name?: string | undefined;
3001
+ enabled?: boolean | undefined;
3002
+ remaining?: number | undefined;
3003
+ refillAmount?: number | undefined;
3004
+ refillInterval?: number | undefined;
3005
+ metadata?: any;
3006
+ expiresIn?: number | null | undefined;
3007
+ rateLimitEnabled?: boolean | undefined;
3008
+ rateLimitTimeWindow?: number | undefined;
3009
+ rateLimitMax?: number | undefined;
3010
+ permissions?: Record<string, string[]> | null | undefined;
3011
+ } & {
3012
+ fetchOptions?: FetchOptions | undefined;
3013
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
3014
+ metadata: Record<string, any> | null;
3015
+ permissions: {
3016
+ [key: string]: string[];
3017
+ } | null;
3018
+ id: string;
3019
+ configId: string;
3020
+ name: string | null;
3021
+ start: string | null;
3022
+ prefix: string | null;
3023
+ referenceId: string;
3024
+ refillInterval: number | null;
3025
+ refillAmount: number | null;
3026
+ lastRefillAt: Date | null;
3027
+ enabled: boolean;
3028
+ rateLimitEnabled: boolean;
3029
+ rateLimitTimeWindow: number | null;
3030
+ rateLimitMax: number | null;
3031
+ requestCount: number;
3032
+ remaining: number | null;
3033
+ lastRequest: Date | null;
3034
+ expiresAt: Date | null;
3035
+ createdAt: Date;
3036
+ updatedAt: Date;
3037
+ }, {
3038
+ code?: string | undefined;
3039
+ message?: string | undefined;
3040
+ }, FetchOptions["throw"] extends true ? true : true>>;
3041
+ };
3042
+ } & {
3043
+ apiKey: {
3044
+ delete: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
3045
+ keyId: string;
3046
+ configId?: string | undefined;
3047
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3048
+ keyId: string;
3049
+ configId?: string | undefined;
3050
+ } & {
3051
+ fetchOptions?: FetchOptions | undefined;
3052
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
3053
+ success: boolean;
3054
+ }, {
3055
+ code?: string | undefined;
3056
+ message?: string | undefined;
3057
+ }, FetchOptions["throw"] extends true ? true : true>>;
3058
+ };
3059
+ } & {
3060
+ apiKey: {
3061
+ list: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
3062
+ configId?: string | undefined;
3063
+ organizationId?: string | undefined;
3064
+ limit?: unknown;
3065
+ offset?: unknown;
3066
+ sortBy?: string | undefined;
3067
+ sortDirection?: "asc" | "desc" | undefined;
3068
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
3069
+ query?: {
3070
+ configId?: string | undefined;
3071
+ organizationId?: string | undefined;
3072
+ limit?: unknown;
3073
+ offset?: unknown;
3074
+ sortBy?: string | undefined;
3075
+ sortDirection?: "asc" | "desc" | undefined;
3076
+ } | undefined;
3077
+ fetchOptions?: FetchOptions | undefined;
3078
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
3079
+ apiKeys: {
3080
+ metadata: Record<string, any> | null;
3081
+ permissions: {
3082
+ [key: string]: string[];
3083
+ } | null;
3084
+ id: string;
3085
+ configId: string;
3086
+ name: string | null;
3087
+ start: string | null;
3088
+ prefix: string | null;
3089
+ referenceId: string;
3090
+ refillInterval: number | null;
3091
+ refillAmount: number | null;
3092
+ lastRefillAt: Date | null;
3093
+ enabled: boolean;
3094
+ rateLimitEnabled: boolean;
3095
+ rateLimitTimeWindow: number | null;
3096
+ rateLimitMax: number | null;
3097
+ requestCount: number;
3098
+ remaining: number | null;
3099
+ lastRequest: Date | null;
3100
+ expiresAt: Date | null;
3101
+ createdAt: Date;
3102
+ updatedAt: Date;
3103
+ }[];
3104
+ total: number;
3105
+ limit: number | undefined;
3106
+ offset: number | undefined;
3107
+ }, {
3108
+ code?: string | undefined;
3109
+ message?: string | undefined;
3110
+ }, FetchOptions["throw"] extends true ? true : true>>;
3111
+ };
3112
+ } & {
3113
+ admin: {
3114
+ setRole: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
3115
+ userId: string;
3116
+ role: "admin" | "user" | ("admin" | "user")[];
3117
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3118
+ userId: string;
3119
+ role: "admin" | "user" | ("admin" | "user")[];
3120
+ } & {
3121
+ fetchOptions?: FetchOptions | undefined;
3122
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
3123
+ user: better_auth_plugins.UserWithRole;
3124
+ }, {
3125
+ code?: string | undefined;
3126
+ message?: string | undefined;
3127
+ }, FetchOptions["throw"] extends true ? true : true>>;
3128
+ };
3129
+ } & {
3130
+ admin: {
3131
+ getUser: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
3132
+ id: string;
3133
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3134
+ query: {
3135
+ id: string;
3136
+ };
3137
+ fetchOptions?: FetchOptions | undefined;
3138
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<better_auth_plugins.UserWithRole, {
3139
+ code?: string | undefined;
3140
+ message?: string | undefined;
3141
+ }, FetchOptions["throw"] extends true ? true : true>>;
3142
+ };
3143
+ } & {
3144
+ admin: {
3145
+ createUser: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
3146
+ email: string;
3147
+ password?: string | undefined;
3148
+ name: string;
3149
+ role?: "admin" | "user" | ("admin" | "user")[] | undefined;
3150
+ data?: Record<string, any> | undefined;
3151
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3152
+ email: string;
3153
+ password?: string | undefined;
3154
+ name: string;
3155
+ role?: "admin" | "user" | ("admin" | "user")[] | undefined;
3156
+ data?: Record<string, any> | undefined;
3157
+ } & {
3158
+ fetchOptions?: FetchOptions | undefined;
3159
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
3160
+ user: better_auth_plugins.UserWithRole;
3161
+ }, {
3162
+ code?: string | undefined;
3163
+ message?: string | undefined;
3164
+ }, FetchOptions["throw"] extends true ? true : true>>;
3165
+ };
3166
+ } & {
3167
+ admin: {
3168
+ updateUser: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
3169
+ userId: unknown;
3170
+ data: Record<any, any>;
3171
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3172
+ userId: unknown;
3173
+ data: Record<any, any>;
3174
+ } & {
3175
+ fetchOptions?: FetchOptions | undefined;
3176
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<better_auth_plugins.UserWithRole, {
3177
+ code?: string | undefined;
3178
+ message?: string | undefined;
3179
+ }, FetchOptions["throw"] extends true ? true : true>>;
3180
+ };
3181
+ } & {
3182
+ admin: {
3183
+ listUsers: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
3184
+ searchValue?: string | undefined;
3185
+ searchField?: "name" | "email" | undefined;
3186
+ searchOperator?: "contains" | "starts_with" | "ends_with" | undefined;
3187
+ limit?: string | number | undefined;
3188
+ offset?: string | number | undefined;
3189
+ sortBy?: string | undefined;
3190
+ sortDirection?: "asc" | "desc" | undefined;
3191
+ filterField?: string | undefined;
3192
+ filterValue?: string | number | boolean | string[] | number[] | undefined;
3193
+ filterOperator?: "in" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
3194
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3195
+ query: {
3196
+ searchValue?: string | undefined;
3197
+ searchField?: "name" | "email" | undefined;
3198
+ searchOperator?: "contains" | "starts_with" | "ends_with" | undefined;
3199
+ limit?: string | number | undefined;
3200
+ offset?: string | number | undefined;
3201
+ sortBy?: string | undefined;
3202
+ sortDirection?: "asc" | "desc" | undefined;
3203
+ filterField?: string | undefined;
3204
+ filterValue?: string | number | boolean | string[] | number[] | undefined;
3205
+ filterOperator?: "in" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
3206
+ };
3207
+ fetchOptions?: FetchOptions | undefined;
3208
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
3209
+ users: better_auth_plugins.UserWithRole[];
3210
+ total: number;
3211
+ }, {
3212
+ code?: string | undefined;
3213
+ message?: string | undefined;
3214
+ }, FetchOptions["throw"] extends true ? true : true>>;
3215
+ };
3216
+ } & {
3217
+ admin: {
3218
+ listUserSessions: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
3219
+ userId: unknown;
3220
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3221
+ userId: unknown;
3222
+ } & {
3223
+ fetchOptions?: FetchOptions | undefined;
3224
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
3225
+ sessions: better_auth_plugins.SessionWithImpersonatedBy[];
3226
+ }, {
3227
+ code?: string | undefined;
3228
+ message?: string | undefined;
3229
+ }, FetchOptions["throw"] extends true ? true : true>>;
3230
+ };
3231
+ } & {
3232
+ admin: {
3233
+ unbanUser: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
3234
+ userId: unknown;
3235
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3236
+ userId: unknown;
3237
+ } & {
3238
+ fetchOptions?: FetchOptions | undefined;
3239
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
3240
+ user: better_auth_plugins.UserWithRole;
3241
+ }, {
3242
+ code?: string | undefined;
3243
+ message?: string | undefined;
3244
+ }, FetchOptions["throw"] extends true ? true : true>>;
3245
+ };
3246
+ } & {
3247
+ admin: {
3248
+ banUser: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
3249
+ userId: unknown;
3250
+ banReason?: string | undefined;
3251
+ banExpiresIn?: number | undefined;
3252
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3253
+ userId: unknown;
3254
+ banReason?: string | undefined;
3255
+ banExpiresIn?: number | undefined;
3256
+ } & {
3257
+ fetchOptions?: FetchOptions | undefined;
3258
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
3259
+ user: better_auth_plugins.UserWithRole;
3260
+ }, {
3261
+ code?: string | undefined;
3262
+ message?: string | undefined;
3263
+ }, FetchOptions["throw"] extends true ? true : true>>;
3264
+ };
3265
+ } & {
3266
+ admin: {
3267
+ impersonateUser: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
3268
+ userId: unknown;
3269
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3270
+ userId: unknown;
3271
+ } & {
3272
+ fetchOptions?: FetchOptions | undefined;
3273
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
3274
+ session: {
3275
+ id: string;
3276
+ createdAt: Date;
3277
+ updatedAt: Date;
3278
+ userId: string;
3279
+ expiresAt: Date;
3280
+ token: string;
3281
+ ipAddress?: string | null | undefined;
3282
+ userAgent?: string | null | undefined;
3283
+ };
3284
+ user: better_auth_plugins.UserWithRole;
3285
+ }, {
3286
+ code?: string | undefined;
3287
+ message?: string | undefined;
3288
+ }, FetchOptions["throw"] extends true ? true : true>>;
3289
+ };
3290
+ } & {
3291
+ admin: {
3292
+ stopImpersonating: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
3293
+ query?: Record<string, any> | undefined;
3294
+ fetchOptions?: FetchOptions | undefined;
3295
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
3296
+ session: {
3297
+ id: string;
3298
+ createdAt: Date;
3299
+ updatedAt: Date;
3300
+ userId: string;
3301
+ expiresAt: Date;
3302
+ token: string;
3303
+ ipAddress?: string | null | undefined;
3304
+ userAgent?: string | null | undefined;
3305
+ } & Record<string, any>;
3306
+ user: {
3307
+ id: string;
3308
+ createdAt: Date;
3309
+ updatedAt: Date;
3310
+ email: string;
3311
+ emailVerified: boolean;
3312
+ name: string;
3313
+ image?: string | null | undefined;
3314
+ } & Record<string, any>;
3315
+ }, {
3316
+ code?: string | undefined;
3317
+ message?: string | undefined;
3318
+ }, FetchOptions["throw"] extends true ? true : true>>;
3319
+ };
3320
+ } & {
3321
+ admin: {
3322
+ revokeUserSession: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
3323
+ sessionToken: string;
3324
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3325
+ sessionToken: string;
3326
+ } & {
3327
+ fetchOptions?: FetchOptions | undefined;
3328
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
3329
+ success: boolean;
3330
+ }, {
3331
+ code?: string | undefined;
3332
+ message?: string | undefined;
3333
+ }, FetchOptions["throw"] extends true ? true : true>>;
3334
+ };
3335
+ } & {
3336
+ admin: {
3337
+ revokeUserSessions: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
3338
+ userId: unknown;
3339
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3340
+ userId: unknown;
3341
+ } & {
3342
+ fetchOptions?: FetchOptions | undefined;
3343
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
3344
+ success: boolean;
3345
+ }, {
3346
+ code?: string | undefined;
3347
+ message?: string | undefined;
3348
+ }, FetchOptions["throw"] extends true ? true : true>>;
3349
+ };
3350
+ } & {
3351
+ admin: {
3352
+ removeUser: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
3353
+ userId: unknown;
3354
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3355
+ userId: unknown;
3356
+ } & {
3357
+ fetchOptions?: FetchOptions | undefined;
3358
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
3359
+ success: boolean;
3360
+ }, {
3361
+ code?: string | undefined;
3362
+ message?: string | undefined;
3363
+ }, FetchOptions["throw"] extends true ? true : true>>;
3364
+ };
3365
+ } & {
3366
+ admin: {
3367
+ setUserPassword: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
3368
+ newPassword: string;
3369
+ userId: unknown;
3370
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3371
+ newPassword: string;
3372
+ userId: unknown;
3373
+ } & {
3374
+ fetchOptions?: FetchOptions | undefined;
3375
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
3376
+ status: boolean;
3377
+ }, {
3378
+ code?: string | undefined;
3379
+ message?: string | undefined;
3380
+ }, FetchOptions["throw"] extends true ? true : true>>;
3381
+ };
3382
+ } & {
3383
+ admin: {
3384
+ hasPermission: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
3385
+ permissions: {
3386
+ readonly user?: ("update" | "delete" | "create" | "list" | "set-role" | "ban" | "impersonate" | "impersonate-admins" | "set-password" | "get")[] | undefined;
3387
+ readonly session?: ("delete" | "list" | "revoke")[] | undefined;
3388
+ };
3389
+ } & {
3390
+ userId?: string | undefined;
3391
+ role?: "admin" | "user" | undefined;
3392
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3393
+ permissions: {
3394
+ readonly user?: ("update" | "delete" | "create" | "list" | "set-role" | "ban" | "impersonate" | "impersonate-admins" | "set-password" | "get")[] | undefined;
3395
+ readonly session?: ("delete" | "list" | "revoke")[] | undefined;
3396
+ };
3397
+ } & {
3398
+ userId?: string | undefined;
3399
+ role?: "admin" | "user" | undefined;
3400
+ } & {
3401
+ fetchOptions?: FetchOptions | undefined;
3402
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
3403
+ error: null;
3404
+ success: boolean;
3405
+ }, {
3406
+ code?: string | undefined;
3407
+ message?: string | undefined;
3408
+ }, FetchOptions["throw"] extends true ? true : true>>;
3409
+ };
3410
+ } & {
3411
+ emailOtp: {
3412
+ sendVerificationOtp: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
3413
+ email: string;
3414
+ type: "sign-in" | "change-email" | "email-verification" | "forget-password";
3415
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3416
+ email: string;
3417
+ type: "sign-in" | "change-email" | "email-verification" | "forget-password";
3418
+ } & {
3419
+ fetchOptions?: FetchOptions | undefined;
3420
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
3421
+ success: boolean;
3422
+ }, {
3423
+ code?: string | undefined;
3424
+ message?: string | undefined;
3425
+ }, FetchOptions["throw"] extends true ? true : true>>;
3426
+ };
3427
+ } & {
3428
+ emailOtp: {
3429
+ checkVerificationOtp: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
3430
+ email: string;
3431
+ type: "sign-in" | "change-email" | "email-verification" | "forget-password";
3432
+ otp: string;
3433
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3434
+ email: string;
3435
+ type: "sign-in" | "change-email" | "email-verification" | "forget-password";
3436
+ otp: string;
3437
+ } & {
3438
+ fetchOptions?: FetchOptions | undefined;
3439
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
3440
+ success: boolean;
3441
+ }, {
3442
+ code?: string | undefined;
3443
+ message?: string | undefined;
3444
+ }, FetchOptions["throw"] extends true ? true : true>>;
3445
+ };
3446
+ } & {
3447
+ emailOtp: {
3448
+ verifyEmail: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
3449
+ email: string;
3450
+ otp: string;
3451
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3452
+ email: string;
3453
+ otp: string;
3454
+ } & {
3455
+ fetchOptions?: FetchOptions | undefined;
3456
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<(Omit<{
3457
+ status: boolean;
3458
+ token: string;
3459
+ user: {
3460
+ id: string;
3461
+ createdAt: Date;
3462
+ updatedAt: Date;
3463
+ email: string;
3464
+ emailVerified: boolean;
3465
+ name: string;
3466
+ image?: string | null | undefined;
3467
+ } & Record<string, any>;
3468
+ }, "user"> & {
3469
+ user: better_auth.StripEmptyObjects<{
3470
+ id: string;
3471
+ createdAt: Date;
3472
+ updatedAt: Date;
3473
+ email: string;
3474
+ emailVerified: boolean;
3475
+ name: string;
3476
+ image?: string | null | undefined;
3477
+ } & {
3478
+ twoFactorEnabled: boolean | null | undefined;
3479
+ } & {} & {
3480
+ banned: boolean | null | undefined;
3481
+ } & {
3482
+ role?: string | null | undefined;
3483
+ banReason?: string | null | undefined;
3484
+ banExpires?: Date | null | undefined;
3485
+ } & {
3486
+ preferredLanguage: string;
3487
+ } & {
3488
+ lastActiveAt?: Date | null | undefined;
3489
+ displayName?: string | null | undefined;
3490
+ title?: string | null | undefined;
3491
+ pronouns?: string | null | undefined;
3492
+ }>;
3493
+ }) | (Omit<{
3494
+ status: boolean;
3495
+ token: null;
3496
+ user: {
3497
+ id: string;
3498
+ createdAt: Date;
3499
+ updatedAt: Date;
3500
+ email: string;
3501
+ emailVerified: boolean;
3502
+ name: string;
3503
+ image?: string | null | undefined;
3504
+ } & Record<string, any>;
3505
+ }, "user"> & {
3506
+ user: better_auth.StripEmptyObjects<{
3507
+ id: string;
3508
+ createdAt: Date;
3509
+ updatedAt: Date;
3510
+ email: string;
3511
+ emailVerified: boolean;
3512
+ name: string;
3513
+ image?: string | null | undefined;
3514
+ } & {
3515
+ twoFactorEnabled: boolean | null | undefined;
3516
+ } & {} & {
3517
+ banned: boolean | null | undefined;
3518
+ } & {
3519
+ role?: string | null | undefined;
3520
+ banReason?: string | null | undefined;
3521
+ banExpires?: Date | null | undefined;
3522
+ } & {
3523
+ preferredLanguage: string;
3524
+ } & {
3525
+ lastActiveAt?: Date | null | undefined;
3526
+ displayName?: string | null | undefined;
3527
+ title?: string | null | undefined;
3528
+ pronouns?: string | null | undefined;
3529
+ }>;
3530
+ }), {
3531
+ code?: string | undefined;
3532
+ message?: string | undefined;
3533
+ }, FetchOptions["throw"] extends true ? true : true>>;
3534
+ };
3535
+ } & {
3536
+ signIn: {
3537
+ emailOtp: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
3538
+ email: string;
3539
+ otp: string;
3540
+ name?: string | undefined;
3541
+ image?: string | undefined;
3542
+ } & Record<string, any>> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3543
+ email: string;
3544
+ otp: string;
3545
+ name?: string | undefined;
3546
+ image?: string | undefined;
3547
+ } & Record<string, any> & {
3548
+ fetchOptions?: FetchOptions | undefined;
3549
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<Omit<{
3550
+ token: string;
3551
+ user: {
3552
+ id: string;
3553
+ createdAt: Date;
3554
+ updatedAt: Date;
3555
+ email: string;
3556
+ emailVerified: boolean;
3557
+ name: string;
3558
+ image?: string | null | undefined;
3559
+ };
3560
+ }, "user"> & {
3561
+ user: better_auth.StripEmptyObjects<{
3562
+ id: string;
3563
+ createdAt: Date;
3564
+ updatedAt: Date;
3565
+ email: string;
3566
+ emailVerified: boolean;
3567
+ name: string;
3568
+ image?: string | null | undefined;
3569
+ } & {
3570
+ twoFactorEnabled: boolean | null | undefined;
3571
+ } & {} & {
3572
+ banned: boolean | null | undefined;
3573
+ } & {
3574
+ role?: string | null | undefined;
3575
+ banReason?: string | null | undefined;
3576
+ banExpires?: Date | null | undefined;
3577
+ } & {
3578
+ preferredLanguage: string;
3579
+ } & {
3580
+ lastActiveAt?: Date | null | undefined;
3581
+ displayName?: string | null | undefined;
3582
+ title?: string | null | undefined;
3583
+ pronouns?: string | null | undefined;
3584
+ }>;
3585
+ }, {
3586
+ code?: string | undefined;
3587
+ message?: string | undefined;
3588
+ }, FetchOptions["throw"] extends true ? true : true>>;
3589
+ };
3590
+ } & {
3591
+ emailOtp: {
3592
+ requestPasswordReset: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
3593
+ email: string;
3594
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3595
+ email: string;
3596
+ } & {
3597
+ fetchOptions?: FetchOptions | undefined;
3598
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
3599
+ success: boolean;
3600
+ }, {
3601
+ code?: string | undefined;
3602
+ message?: string | undefined;
3603
+ }, FetchOptions["throw"] extends true ? true : true>>;
3604
+ };
3605
+ } & {
3606
+ forgetPassword: {
3607
+ emailOtp: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
3608
+ email: string;
3609
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3610
+ email: string;
3611
+ } & {
3612
+ fetchOptions?: FetchOptions | undefined;
3613
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
3614
+ success: boolean;
3615
+ }, {
3616
+ code?: string | undefined;
3617
+ message?: string | undefined;
3618
+ }, FetchOptions["throw"] extends true ? true : true>>;
3619
+ };
3620
+ } & {
3621
+ emailOtp: {
3622
+ resetPassword: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
3623
+ email: string;
3624
+ otp: string;
3625
+ password: string;
3626
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3627
+ email: string;
3628
+ otp: string;
3629
+ password: string;
3630
+ } & {
3631
+ fetchOptions?: FetchOptions | undefined;
3632
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
3633
+ success: boolean;
3634
+ }, {
3635
+ code?: string | undefined;
3636
+ message?: string | undefined;
3637
+ }, FetchOptions["throw"] extends true ? true : true>>;
3638
+ };
3639
+ } & {
3640
+ emailOtp: {
3641
+ requestEmailChange: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
3642
+ newEmail: string;
3643
+ otp?: string | undefined;
3644
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3645
+ newEmail: string;
3646
+ otp?: string | undefined;
3647
+ } & {
3648
+ fetchOptions?: FetchOptions | undefined;
3649
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
3650
+ success: boolean;
3651
+ }, {
3652
+ code?: string | undefined;
3653
+ message?: string | undefined;
3654
+ }, FetchOptions["throw"] extends true ? true : true>>;
3655
+ };
3656
+ } & {
3657
+ emailOtp: {
3658
+ changeEmail: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
3659
+ newEmail: string;
3660
+ otp: string;
3661
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3662
+ newEmail: string;
3663
+ otp: string;
3664
+ } & {
3665
+ fetchOptions?: FetchOptions | undefined;
3666
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
3667
+ success: boolean;
3668
+ }, {
3669
+ code?: string | undefined;
3670
+ message?: string | undefined;
3671
+ }, FetchOptions["throw"] extends true ? true : true>>;
3672
+ };
3673
+ } & {
3674
+ signIn: {
3675
+ social: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
3676
+ provider: (string & {}) | "google" | "microsoft" | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel";
3677
+ callbackURL?: string | undefined;
3678
+ newUserCallbackURL?: string | undefined;
3679
+ errorCallbackURL?: string | undefined;
3680
+ disableRedirect?: boolean | undefined;
3681
+ idToken?: {
3682
+ token: string;
3683
+ nonce?: string | undefined;
3684
+ accessToken?: string | undefined;
3685
+ refreshToken?: string | undefined;
3686
+ expiresAt?: number | undefined;
3687
+ } | undefined;
3688
+ scopes?: string[] | undefined;
3689
+ requestSignUp?: boolean | undefined;
3690
+ loginHint?: string | undefined;
3691
+ additionalData?: Record<string, any> | undefined;
3692
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3693
+ provider: (string & {}) | "google" | "microsoft" | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel";
3694
+ callbackURL?: string | undefined;
3695
+ newUserCallbackURL?: string | undefined;
3696
+ errorCallbackURL?: string | undefined;
3697
+ disableRedirect?: boolean | undefined;
3698
+ idToken?: {
3699
+ token: string;
3700
+ nonce?: string | undefined;
3701
+ accessToken?: string | undefined;
3702
+ refreshToken?: string | undefined;
3703
+ expiresAt?: number | undefined;
3704
+ } | undefined;
3705
+ scopes?: string[] | undefined;
3706
+ requestSignUp?: boolean | undefined;
3707
+ loginHint?: string | undefined;
3708
+ additionalData?: Record<string, any> | undefined;
3709
+ } & {
3710
+ fetchOptions?: FetchOptions | undefined;
3711
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
3712
+ redirect: boolean;
3713
+ url: string;
3714
+ } | (Omit<{
3715
+ redirect: boolean;
3716
+ token: string;
3717
+ url: undefined;
3718
+ user: {
3719
+ id: string;
3720
+ createdAt: Date;
3721
+ updatedAt: Date;
3722
+ email: string;
3723
+ emailVerified: boolean;
3724
+ name: string;
3725
+ image?: string | null | undefined | undefined;
3726
+ };
3727
+ }, "user"> & {
3728
+ user: better_auth.StripEmptyObjects<{
3729
+ id: string;
3730
+ createdAt: Date;
3731
+ updatedAt: Date;
3732
+ email: string;
3733
+ emailVerified: boolean;
3734
+ name: string;
3735
+ image?: string | null | undefined;
3736
+ } & {
3737
+ twoFactorEnabled: boolean | null | undefined;
3738
+ } & {} & {
3739
+ banned: boolean | null | undefined;
3740
+ } & {
3741
+ role?: string | null | undefined;
3742
+ banReason?: string | null | undefined;
3743
+ banExpires?: Date | null | undefined;
3744
+ } & {
3745
+ preferredLanguage: string;
3746
+ } & {
3747
+ lastActiveAt?: Date | null | undefined;
3748
+ displayName?: string | null | undefined;
3749
+ title?: string | null | undefined;
3750
+ pronouns?: string | null | undefined;
3751
+ }>;
3752
+ }), {
3753
+ code?: string | undefined;
3754
+ message?: string | undefined;
3755
+ }, FetchOptions["throw"] extends true ? true : true>>;
3756
+ };
3757
+ } & {
3758
+ signOut: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
3759
+ query?: Record<string, any> | undefined;
3760
+ fetchOptions?: FetchOptions | undefined;
3761
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
3762
+ success: boolean;
3763
+ }, {
3764
+ code?: string | undefined;
3765
+ message?: string | undefined;
3766
+ }, FetchOptions["throw"] extends true ? true : true>>;
3767
+ } & {
3768
+ signUp: {
3769
+ email: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
3770
+ name: string;
3771
+ email: string;
3772
+ password: string;
3773
+ image?: string | undefined;
3774
+ callbackURL?: string | undefined;
3775
+ rememberMe?: boolean | undefined;
3776
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3777
+ email: string;
3778
+ name: string;
3779
+ password: string;
3780
+ image?: string | undefined;
3781
+ callbackURL?: string | undefined;
3782
+ fetchOptions?: FetchOptions | undefined;
3783
+ } & {} & {} & {} & {} & {} & {
3784
+ lastActiveAt?: Date | null | undefined;
3785
+ displayName?: string | null | undefined;
3786
+ title?: string | null | undefined;
3787
+ pronouns?: string | null | undefined;
3788
+ preferredLanguage?: string | null | undefined;
3789
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<(Omit<{
3790
+ token: null;
3791
+ user: {
3792
+ id: string;
3793
+ createdAt: Date;
3794
+ updatedAt: Date;
3795
+ email: string;
3796
+ emailVerified: boolean;
3797
+ name: string;
3798
+ image?: string | null | undefined | undefined;
3799
+ };
3800
+ }, "user"> & {
3801
+ user: better_auth.StripEmptyObjects<{
3802
+ id: string;
3803
+ createdAt: Date;
3804
+ updatedAt: Date;
3805
+ email: string;
3806
+ emailVerified: boolean;
3807
+ name: string;
3808
+ image?: string | null | undefined;
3809
+ } & {
3810
+ twoFactorEnabled: boolean | null | undefined;
3811
+ } & {} & {
3812
+ banned: boolean | null | undefined;
3813
+ } & {
3814
+ role?: string | null | undefined;
3815
+ banReason?: string | null | undefined;
3816
+ banExpires?: Date | null | undefined;
3817
+ } & {
3818
+ preferredLanguage: string;
3819
+ } & {
3820
+ lastActiveAt?: Date | null | undefined;
3821
+ displayName?: string | null | undefined;
3822
+ title?: string | null | undefined;
3823
+ pronouns?: string | null | undefined;
3824
+ }>;
3825
+ }) | (Omit<{
3826
+ token: string;
3827
+ user: {
3828
+ id: string;
3829
+ createdAt: Date;
3830
+ updatedAt: Date;
3831
+ email: string;
3832
+ emailVerified: boolean;
3833
+ name: string;
3834
+ image?: string | null | undefined | undefined;
3835
+ };
3836
+ }, "user"> & {
3837
+ user: better_auth.StripEmptyObjects<{
3838
+ id: string;
3839
+ createdAt: Date;
3840
+ updatedAt: Date;
3841
+ email: string;
3842
+ emailVerified: boolean;
3843
+ name: string;
3844
+ image?: string | null | undefined;
3845
+ } & {
3846
+ twoFactorEnabled: boolean | null | undefined;
3847
+ } & {} & {
3848
+ banned: boolean | null | undefined;
3849
+ } & {
3850
+ role?: string | null | undefined;
3851
+ banReason?: string | null | undefined;
3852
+ banExpires?: Date | null | undefined;
3853
+ } & {
3854
+ preferredLanguage: string;
3855
+ } & {
3856
+ lastActiveAt?: Date | null | undefined;
3857
+ displayName?: string | null | undefined;
3858
+ title?: string | null | undefined;
3859
+ pronouns?: string | null | undefined;
3860
+ }>;
3861
+ }), {
3862
+ code?: string | undefined;
3863
+ message?: string | undefined;
3864
+ }, FetchOptions["throw"] extends true ? true : true>>;
3865
+ };
3866
+ } & {
3867
+ signIn: {
3868
+ email: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
3869
+ email: string;
3870
+ password: string;
3871
+ callbackURL?: string | undefined;
3872
+ rememberMe?: boolean | undefined;
3873
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3874
+ email: string;
3875
+ password: string;
3876
+ callbackURL?: string | undefined;
3877
+ rememberMe?: boolean | undefined;
3878
+ } & {
3879
+ fetchOptions?: FetchOptions | undefined;
3880
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<Omit<{
3881
+ redirect: boolean;
3882
+ token: string;
3883
+ url?: string | undefined;
3884
+ user: {
3885
+ id: string;
3886
+ createdAt: Date;
3887
+ updatedAt: Date;
3888
+ email: string;
3889
+ emailVerified: boolean;
3890
+ name: string;
3891
+ image?: string | null | undefined | undefined;
3892
+ };
3893
+ }, "user"> & {
3894
+ user: better_auth.StripEmptyObjects<{
3895
+ id: string;
3896
+ createdAt: Date;
3897
+ updatedAt: Date;
3898
+ email: string;
3899
+ emailVerified: boolean;
3900
+ name: string;
3901
+ image?: string | null | undefined;
3902
+ } & {
3903
+ twoFactorEnabled: boolean | null | undefined;
3904
+ } & {} & {
3905
+ banned: boolean | null | undefined;
3906
+ } & {
3907
+ role?: string | null | undefined;
3908
+ banReason?: string | null | undefined;
3909
+ banExpires?: Date | null | undefined;
3910
+ } & {
3911
+ preferredLanguage: string;
3912
+ } & {
3913
+ lastActiveAt?: Date | null | undefined;
3914
+ displayName?: string | null | undefined;
3915
+ title?: string | null | undefined;
3916
+ pronouns?: string | null | undefined;
3917
+ }>;
3918
+ }, {
3919
+ code?: string | undefined;
3920
+ message?: string | undefined;
3921
+ }, FetchOptions["throw"] extends true ? true : true>>;
3922
+ };
3923
+ } & {
3924
+ resetPassword: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
3925
+ newPassword: string;
3926
+ token?: string | undefined;
3927
+ }> & Record<string, any>, Partial<{
3928
+ token?: string | undefined;
3929
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3930
+ newPassword: string;
1288
3931
  token?: string | undefined;
1289
3932
  } & {
1290
3933
  fetchOptions?: FetchOptions | undefined;
@@ -1387,8 +4030,13 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1387
4030
  role?: string | null | undefined;
1388
4031
  banReason?: string | null | undefined;
1389
4032
  banExpires?: Date | null | undefined;
1390
- } & {} & {
4033
+ } & {
4034
+ preferredLanguage: string;
4035
+ } & {
1391
4036
  lastActiveAt?: Date | null | undefined;
4037
+ displayName?: string | null | undefined;
4038
+ title?: string | null | undefined;
4039
+ pronouns?: string | null | undefined;
1392
4040
  }>;
1393
4041
  }, {
1394
4042
  code?: string | undefined;
@@ -1422,6 +4070,10 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1422
4070
  fetchOptions?: FetchOptions | undefined;
1423
4071
  } & Partial<{} & {} & {} & {} & {} & {
1424
4072
  lastActiveAt?: Date | null | undefined;
4073
+ displayName?: string | null | undefined;
4074
+ title?: string | null | undefined;
4075
+ pronouns?: string | null | undefined;
4076
+ preferredLanguage?: string | null | undefined;
1425
4077
  }>> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1426
4078
  status: boolean;
1427
4079
  }, {
@@ -1704,8 +4356,13 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1704
4356
  role?: string | null | undefined;
1705
4357
  banReason?: string | null | undefined;
1706
4358
  banExpires?: Date | null | undefined;
1707
- } & {} & {
4359
+ } & {
4360
+ preferredLanguage: string;
4361
+ } & {
1708
4362
  lastActiveAt?: Date | null | undefined;
4363
+ displayName?: string | null | undefined;
4364
+ title?: string | null | undefined;
4365
+ pronouns?: string | null | undefined;
1709
4366
  }>;
1710
4367
  session: better_auth.StripEmptyObjects<{
1711
4368
  id: string;
@@ -1727,17 +4384,17 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1727
4384
  message?: string | undefined;
1728
4385
  }, FetchOptions["throw"] extends true ? true : true>>;
1729
4386
  } & {
1730
- applications: {
1731
- getApplicationAuthContext: (applicationId: string) => Promise<{
1732
- data: ApplicationAuthContextResponse;
1733
- error: null;
1734
- } | {
4387
+ applications: {
4388
+ getApplicationAuthContext: (applicationId: string) => Promise<{
1735
4389
  data: null;
1736
4390
  error: {
1737
4391
  message?: string | undefined;
1738
4392
  status: number;
1739
4393
  statusText: string;
1740
4394
  };
4395
+ } | {
4396
+ data: ApplicationAuthContextResponse;
4397
+ error: null;
1741
4398
  }>;
1742
4399
  listCandidateOrganizations: (applicationId: string) => Promise<{
1743
4400
  data: ListCandidateOrganizationsResponse;
@@ -2083,8 +4740,13 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2083
4740
  role?: string | null | undefined;
2084
4741
  banReason?: string | null | undefined;
2085
4742
  banExpires?: Date | null | undefined;
2086
- } & {} & {
4743
+ } & {
4744
+ preferredLanguage: string;
4745
+ } & {
2087
4746
  lastActiveAt?: Date | null | undefined;
4747
+ displayName?: string | null | undefined;
4748
+ title?: string | null | undefined;
4749
+ pronouns?: string | null | undefined;
2088
4750
  }>;
2089
4751
  session: better_auth.StripEmptyObjects<{
2090
4752
  id: string;
@@ -2166,7 +4828,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2166
4828
  body?: any;
2167
4829
  query?: any;
2168
4830
  params?: any;
2169
- duplex? /** Number of hours to retain data before automatic cleanup. */: "full" | "half" | undefined;
4831
+ duplex?: "full" | "half" | undefined;
2170
4832
  jsonParser: (text: string) => Promise<any> | any;
2171
4833
  retry?: better_auth_client.RetryOptions | undefined;
2172
4834
  retryAttempt?: number | undefined;
@@ -2198,8 +4860,13 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2198
4860
  role?: string | null | undefined;
2199
4861
  banReason?: string | null | undefined;
2200
4862
  banExpires?: Date | null | undefined;
2201
- } & {} & {
4863
+ } & {
4864
+ preferredLanguage: string;
4865
+ } & {
2202
4866
  lastActiveAt?: Date | null | undefined;
4867
+ displayName?: string | null | undefined;
4868
+ title?: string | null | undefined;
4869
+ pronouns?: string | null | undefined;
2203
4870
  }>;
2204
4871
  session: better_auth.StripEmptyObjects<{
2205
4872
  id: string;
@@ -3040,6 +5707,23 @@ type ListAdminApplicationsOptions = {
3040
5707
  /** Free-text search matched against application name, description, and UUIDs. */
3041
5708
  search?: string;
3042
5709
  };
5710
+ /**
5711
+ * Options accepted when creating an application as a global admin.
5712
+ */
5713
+ type CreateAdminApplicationOptions = {
5714
+ /** Display name of the application. */
5715
+ name: string;
5716
+ /** Human-readable application description. */
5717
+ description?: string;
5718
+ /** Logo or icon URL. */
5719
+ imageUrl?: string | null;
5720
+ /** Allowed OAuth redirect URIs for this application. */
5721
+ redirectUris: string[];
5722
+ /** Application home URL. */
5723
+ homeUrl?: string | null;
5724
+ /** Custom application authentication settings. */
5725
+ config?: ApplicationConfig | null;
5726
+ };
3043
5727
  /**
3044
5728
  * Options accepted when fetching a single organization as a global admin.
3045
5729
  */
@@ -3211,6 +5895,10 @@ type AdminApplication = {
3211
5895
  /** Preview of the first users with application access. Present when requested via membersPreview. */
3212
5896
  members?: AdminApplicationMember[];
3213
5897
  };
5898
+ /**
5899
+ * Application record returned by create/update-style management endpoints.
5900
+ */
5901
+ type AdminApplicationRecord = Omit<AdminApplication, 'entitlements' | 'memberCount' | 'members'>;
3214
5902
  /**
3215
5903
  * Admin application listing response.
3216
5904
  */
@@ -3286,15 +5974,15 @@ declare class AdminService {
3286
5974
  * @returns The paginated organization listing
3287
5975
  */
3288
5976
  listOrganizations(options?: ListAdminOrganizationsOptions): Promise<{
5977
+ data: ListAdminOrganizationsResult;
5978
+ error: null;
5979
+ } | {
3289
5980
  data: null;
3290
5981
  error: {
3291
5982
  message?: string | undefined;
3292
5983
  status: number;
3293
5984
  statusText: string;
3294
5985
  };
3295
- } | {
3296
- data: ListAdminOrganizationsResult;
3297
- error: null;
3298
5986
  }>;
3299
5987
  /**
3300
5988
  * Lists all Better Auth users from the user table.
@@ -3450,7 +6138,47 @@ declare class OrganizationService {
3450
6138
  * @param id - The organization ID
3451
6139
  * @returns The organization with members, invitations, and teams
3452
6140
  */
3453
- getOrganization(id: string): Promise<any>;
6141
+ getOrganization(id: string): Promise<{
6142
+ members: {
6143
+ id: string;
6144
+ organizationId: string;
6145
+ role: "org:admin" | "org:member" | "org:reviewer";
6146
+ createdAt: Date;
6147
+ userId: string;
6148
+ teamId?: string | undefined | undefined;
6149
+ user: {
6150
+ id: string;
6151
+ email: string;
6152
+ name: string;
6153
+ image?: string | undefined;
6154
+ };
6155
+ }[];
6156
+ invitations: {
6157
+ id: string;
6158
+ organizationId: string;
6159
+ email: string;
6160
+ role: "org:admin" | "org:member" | "org:reviewer";
6161
+ status: better_auth_plugins.InvitationStatus;
6162
+ inviterId: string;
6163
+ expiresAt: Date;
6164
+ createdAt: Date;
6165
+ teamId?: string | undefined | undefined;
6166
+ }[];
6167
+ teams: {
6168
+ id: string;
6169
+ name: string;
6170
+ organizationId: string;
6171
+ createdAt: Date;
6172
+ updatedAt?: Date | undefined;
6173
+ }[];
6174
+ } & {
6175
+ id: string;
6176
+ name: string;
6177
+ slug: string;
6178
+ createdAt: Date;
6179
+ logo?: string | null | undefined | undefined;
6180
+ metadata?: any;
6181
+ }>;
3454
6182
  /**
3455
6183
  * Lists all organizations accessible to the current user.
3456
6184
  *
@@ -3478,13 +6206,63 @@ declare class OrganizationService {
3478
6206
  * @param options.offset - Number of members to skip
3479
6207
  * @returns An array of organization members
3480
6208
  */
3481
- listMembers(options?: ListMembersOptions): Promise<any>;
6209
+ listMembers(options?: ListMembersOptions): Promise<({
6210
+ id: string;
6211
+ organizationId: string;
6212
+ role: "org:admin" | "org:member" | "org:reviewer";
6213
+ createdAt: Date;
6214
+ userId: string;
6215
+ teamId?: string | undefined | undefined;
6216
+ user: {
6217
+ id: string;
6218
+ email: string;
6219
+ name: string;
6220
+ image?: string | undefined;
6221
+ };
6222
+ } & {
6223
+ user: {
6224
+ id: string;
6225
+ name: string;
6226
+ email: string;
6227
+ image: string | null | undefined;
6228
+ };
6229
+ })[]>;
3482
6230
  /**
3483
6231
  * Gets the currently active organization member for the authenticated user.
3484
6232
  *
3485
6233
  * @returns The active member object
3486
6234
  */
3487
- getActiveMember(): Promise<any>;
6235
+ getActiveMember(): Promise<NonNullable<Omit<{
6236
+ id: string;
6237
+ organizationId: string;
6238
+ role: "org:admin" | "org:member" | "org:reviewer";
6239
+ createdAt: Date;
6240
+ userId: string;
6241
+ teamId?: string | undefined | undefined;
6242
+ user: {
6243
+ id: string;
6244
+ email: string;
6245
+ name: string;
6246
+ image?: string | undefined;
6247
+ };
6248
+ } & {
6249
+ user: {
6250
+ id: string;
6251
+ createdAt: Date;
6252
+ updatedAt: Date;
6253
+ email: string;
6254
+ emailVerified: boolean;
6255
+ name: string;
6256
+ image?: string | null | undefined;
6257
+ };
6258
+ }, "user"> & {
6259
+ user: {
6260
+ id: string;
6261
+ name: string;
6262
+ email: string;
6263
+ image: string | undefined;
6264
+ };
6265
+ }>>;
3488
6266
  /**
3489
6267
  * Invites a user to join the active organization.
3490
6268
  *
@@ -3498,7 +6276,27 @@ declare class OrganizationService {
3498
6276
  * @param options.resend - Whether to resend if invitation already exists
3499
6277
  * @returns The created invitation
3500
6278
  */
3501
- inviteUserToOrganization({ userEmail, role, teamId, resend }: InviteUserToOrganizationOptions): Promise<any>;
6279
+ inviteUserToOrganization({ userEmail, role, teamId, resend }: InviteUserToOrganizationOptions): Promise<NonNullable<{
6280
+ id: string;
6281
+ organizationId: string;
6282
+ email: string;
6283
+ role: "org:admin" | "org:member" | "org:reviewer";
6284
+ status: better_auth_plugins.InvitationStatus;
6285
+ inviterId: string;
6286
+ expiresAt: Date;
6287
+ createdAt: Date;
6288
+ teamId?: string | undefined | undefined;
6289
+ } | {
6290
+ id: string;
6291
+ organizationId: string;
6292
+ email: string;
6293
+ role: "org:admin" | "org:member" | "org:reviewer";
6294
+ status: better_auth_plugins.InvitationStatus;
6295
+ inviterId: string;
6296
+ expiresAt: Date;
6297
+ createdAt: Date;
6298
+ teamId?: string | undefined | undefined;
6299
+ }>>;
3502
6300
  /**
3503
6301
  * Cancels a pending organization invitation.
3504
6302
  *
@@ -3535,7 +6333,13 @@ declare class OrganizationService {
3535
6333
  * @param payload - Team configuration with a `name` field
3536
6334
  * @returns The created team
3537
6335
  */
3538
- createTeam(payload: CreateTeamPayload): Promise<any>;
6336
+ createTeam(payload: CreateTeamPayload): Promise<{
6337
+ id: string;
6338
+ name: string;
6339
+ organizationId: string;
6340
+ createdAt: Date;
6341
+ updatedAt?: Date | undefined;
6342
+ }>;
3539
6343
  /**
3540
6344
  * Updates an existing team's details.
3541
6345
  *
@@ -3543,7 +6347,13 @@ declare class OrganizationService {
3543
6347
  * @param payload - Team fields to update (currently supports `name`)
3544
6348
  * @returns The updated team
3545
6349
  */
3546
- updateTeam(id: string, payload: UpdateTeamPayload): Promise<any>;
6350
+ updateTeam(id: string, payload: UpdateTeamPayload): Promise<{
6351
+ id: string;
6352
+ name: string;
6353
+ organizationId: string;
6354
+ createdAt: Date;
6355
+ updatedAt?: Date | undefined;
6356
+ }>;
3547
6357
  /**
3548
6358
  * Deletes a team from the active organization.
3549
6359
  *
@@ -3555,14 +6365,25 @@ declare class OrganizationService {
3555
6365
  *
3556
6366
  * @returns An array of teams
3557
6367
  */
3558
- listTeams(): Promise<any>;
6368
+ listTeams(): Promise<{
6369
+ id: string;
6370
+ name: string;
6371
+ organizationId: string;
6372
+ createdAt: Date;
6373
+ updatedAt?: Date | undefined;
6374
+ }[]>;
3559
6375
  /**
3560
6376
  * Lists all members of a specific team.
3561
6377
  *
3562
6378
  * @param id - The team ID
3563
6379
  * @returns An array of team members
3564
6380
  */
3565
- listTeamMembers(id: string): Promise<any>;
6381
+ listTeamMembers(id: string): Promise<{
6382
+ id: string;
6383
+ teamId: string;
6384
+ userId: string;
6385
+ createdAt: Date;
6386
+ }[]>;
3566
6387
  /**
3567
6388
  * Adds a user to a team.
3568
6389
  *
@@ -3570,7 +6391,12 @@ declare class OrganizationService {
3570
6391
  * @param userId - The user ID to add
3571
6392
  * @returns The added team member
3572
6393
  */
3573
- addTeamMember(teamId: string, userId: string): Promise<any>;
6394
+ addTeamMember(teamId: string, userId: string): Promise<{
6395
+ id: string;
6396
+ teamId: string;
6397
+ userId: string;
6398
+ createdAt: Date;
6399
+ }>;
3574
6400
  /**
3575
6401
  * Removes a user from a team.
3576
6402
  *
@@ -3652,8 +6478,13 @@ declare class SessionService {
3652
6478
  role?: string | null | undefined;
3653
6479
  banReason?: string | null | undefined;
3654
6480
  banExpires?: Date | null | undefined;
3655
- } & {} & {
6481
+ } & {
6482
+ preferredLanguage: string;
6483
+ } & {
3656
6484
  lastActiveAt?: Date | null | undefined;
6485
+ displayName?: string | null | undefined;
6486
+ title?: string | null | undefined;
6487
+ pronouns?: string | null | undefined;
3657
6488
  }>;
3658
6489
  session: better_auth.StripEmptyObjects<{
3659
6490
  id: string;
@@ -3676,7 +6507,9 @@ declare class SessionService {
3676
6507
  *
3677
6508
  * @returns The JWT token
3678
6509
  */
3679
- getToken(): Promise<any>;
6510
+ getToken(): Promise<{
6511
+ token: string;
6512
+ }>;
3680
6513
  /**
3681
6514
  * Initiates social authentication flow with Google or Microsoft.
3682
6515
  *
@@ -3736,7 +6569,9 @@ declare class SessionService {
3736
6569
  * @param nonce - The nonce to retrieve the token for
3737
6570
  * @returns The JWT token for the nonce
3738
6571
  */
3739
- getNoncePayload(nonce: string): Promise<any>;
6572
+ getNoncePayload(nonce: string): Promise<{
6573
+ token: string;
6574
+ }>;
3740
6575
  }
3741
6576
 
3742
6577
  /**
@@ -3799,7 +6634,9 @@ declare class ApiKeyService {
3799
6634
  *
3800
6635
  * @param id - The API key ID to delete
3801
6636
  */
3802
- deleteApiKey(id: string): Promise<any>;
6637
+ deleteApiKey(id: string): Promise<{
6638
+ success: boolean;
6639
+ }>;
3803
6640
  }
3804
6641
 
3805
6642
  /**
@@ -3843,7 +6680,9 @@ declare class EmailOTPService {
3843
6680
  * @param options - Request configuration
3844
6681
  * @returns The underlying email OTP API response
3845
6682
  */
3846
- sendVerificationOTP(email: string, options: SendVerificationOTPOptions): Promise<any>;
6683
+ sendVerificationOTP(email: string, options: SendVerificationOTPOptions): Promise<{
6684
+ success: boolean;
6685
+ }>;
3847
6686
  /**
3848
6687
  * Completes email OTP sign-in with a one-time passcode.
3849
6688
  *
@@ -3852,7 +6691,137 @@ declare class EmailOTPService {
3852
6691
  * @param options - Request configuration
3853
6692
  * @returns The underlying email OTP sign-in API response
3854
6693
  */
3855
- signIn(email: string, otp: string, options: EmailOTPSignInOptions): Promise<any>;
6694
+ signIn(email: string, otp: string, options: EmailOTPSignInOptions): Promise<Omit<{
6695
+ token: string;
6696
+ user: {
6697
+ id: string;
6698
+ createdAt: Date;
6699
+ updatedAt: Date;
6700
+ email: string;
6701
+ emailVerified: boolean;
6702
+ name: string;
6703
+ image?: string | null | undefined;
6704
+ };
6705
+ }, "user"> & {
6706
+ user: better_auth.StripEmptyObjects<{
6707
+ id: string;
6708
+ createdAt: Date;
6709
+ updatedAt: Date;
6710
+ email: string;
6711
+ emailVerified: boolean;
6712
+ name: string;
6713
+ image?: string | null | undefined;
6714
+ } & {
6715
+ twoFactorEnabled: boolean | null | undefined;
6716
+ } & {} & {
6717
+ banned: boolean | null | undefined;
6718
+ } & {
6719
+ role?: string | null | undefined;
6720
+ banReason?: string | null | undefined;
6721
+ banExpires?: Date | null | undefined;
6722
+ } & {
6723
+ preferredLanguage: string;
6724
+ } & {
6725
+ lastActiveAt?: Date | null | undefined;
6726
+ displayName?: string | null | undefined;
6727
+ title?: string | null | undefined;
6728
+ pronouns?: string | null | undefined;
6729
+ }>;
6730
+ }>;
6731
+ }
6732
+
6733
+ type UserProfile = Pick<User, 'name' | 'displayName' | 'title' | 'pronouns' | 'preferredLanguage' | 'image'>;
6734
+
6735
+ type UpdateUserProfilePayload = Partial<UserProfile>;
6736
+ declare class UserService {
6737
+ private readonly client;
6738
+ constructor(client: APIClient);
6739
+ changePassword(currentPassword: string, newPassword: string): Promise<Omit<{
6740
+ token: string | null;
6741
+ user: {
6742
+ id: string;
6743
+ createdAt: Date;
6744
+ updatedAt: Date;
6745
+ email: string;
6746
+ emailVerified: boolean;
6747
+ name: string;
6748
+ image?: string | null | undefined;
6749
+ } & Record<string, any> & {
6750
+ id: string;
6751
+ createdAt: Date;
6752
+ updatedAt: Date;
6753
+ email: string;
6754
+ emailVerified: boolean;
6755
+ name: string;
6756
+ image?: string | null | undefined;
6757
+ };
6758
+ }, "user"> & {
6759
+ user: better_auth.StripEmptyObjects<{
6760
+ id: string;
6761
+ createdAt: Date;
6762
+ updatedAt: Date;
6763
+ email: string;
6764
+ emailVerified: boolean;
6765
+ name: string;
6766
+ image?: string | null | undefined;
6767
+ } & {
6768
+ twoFactorEnabled: boolean | null | undefined;
6769
+ } & {} & {
6770
+ banned: boolean | null | undefined;
6771
+ } & {
6772
+ role?: string | null | undefined;
6773
+ banReason?: string | null | undefined;
6774
+ banExpires?: Date | null | undefined;
6775
+ } & {
6776
+ preferredLanguage: string;
6777
+ } & {
6778
+ lastActiveAt?: Date | null | undefined;
6779
+ displayName?: string | null | undefined;
6780
+ title?: string | null | undefined;
6781
+ pronouns?: string | null | undefined;
6782
+ }>;
6783
+ }>;
6784
+ updateProfile(profile: UpdateUserProfilePayload): Promise<{
6785
+ status: boolean;
6786
+ }>;
6787
+ /**
6788
+ * Lists the authentication accounts (providers) linked to the current user.
6789
+ * Returns provider identifiers and timestamps only — never tokens.
6790
+ *
6791
+ * The underlying client is configured with `throw: true`, so it resolves to
6792
+ * the response data directly (the account array), not a `{ data }` envelope.
6793
+ */
6794
+ listAccounts(): Promise<{
6795
+ scopes: string[];
6796
+ id: string;
6797
+ createdAt: Date;
6798
+ updatedAt: Date;
6799
+ userId: string;
6800
+ providerId: string;
6801
+ accountId: string;
6802
+ }[]>;
6803
+ /**
6804
+ * Begins linking a social provider to the current user. Resolves to
6805
+ * `{ url, redirect }`; the caller navigates to `url`. Requires an AAL2
6806
+ * session (gated server-side).
6807
+ */
6808
+ linkSocial(params: {
6809
+ provider: 'google' | 'microsoft';
6810
+ callbackURL: string;
6811
+ }): Promise<{
6812
+ url: string;
6813
+ redirect: boolean;
6814
+ }>;
6815
+ /**
6816
+ * Unlinks a provider from the current user. Requires an AAL2 session (gated
6817
+ * server-side). The server refuses to remove the user's last account.
6818
+ */
6819
+ unlinkAccount(params: {
6820
+ providerId: string;
6821
+ accountId?: string;
6822
+ }): Promise<{
6823
+ status: boolean;
6824
+ }>;
3856
6825
  }
3857
6826
 
3858
6827
  /**
@@ -3928,6 +6897,10 @@ declare class AuthClient {
3928
6897
  * Session assurance service for step-up operations
3929
6898
  */
3930
6899
  sessionAssurance: SessionAssuranceService;
6900
+ /**
6901
+ * Magane the logged-in user's account and profile
6902
+ */
6903
+ user: UserService;
3931
6904
  /**
3932
6905
  * Admin service for global admin operations
3933
6906
  */
@@ -4006,4 +6979,4 @@ declare function validateToken(token: string, apiUrl: string): Promise<boolean>;
4006
6979
  declare function extractTokenPayload(token: string): DecodedJWTPayload;
4007
6980
 
4008
6981
  export { AAL, AALBrand, AALs, ACR, ACRBrand, ACRs, AMR, AMRBrand, AMRs, ApiKeyMetadata, ApplicationConfig, ApplicationError, ApplicationSessionAssuranceConfig, ApplicationSessionAssuranceError, AuthClient, AuthMethod, AuthMethodBrand, AuthMethods, AuthorizationFlowError, DEFAULT_APPLICATION_CONFIG, DEFAULT_JWT_ASSURANCE, DEFAULT_SESSION_ASSURANCE_CONFIG, DeviceAccessDeniedError, DeviceAuthorizationPendingError, DeviceAuthorizationSlowDownError, DeviceCodeExpiredError, DeviceTransientServerError, EmailOTPService, EmailRequired, InvalidCallbackURL, InvalidSocialProvider, JWTPayload, JWTPayloadAssurance, JWTPayloadUser, JWTPayloadWorkspace, OAuthBeginStepUpResponse, OAuthCompleteStepUpResponse, OAuthStepUpProvider, RefreshTokenExpiredError, Roles, SENSITIVE_ACTION_ASSURANCE_POLICY, SendOtpResponse, SessionAssurancePolicy, SessionAssuranceRequiredError, SessionAssuranceRequiredPayload, SessionAssuranceResponse, SessionAssuranceService, StepUpOption, UserNotLoggedInError, ac, assuranceFields, canStepUpWithAmr, createAPIClient, extractTokenPayload, getAalRank, invitationAdditionalFields, isAssuranceSufficientForPolicy, isSessionAssuranceSufficient, isTokenExpired, memberAdditionalFields, mergeStepUpAssurance, organizationAdditionalFields, parseSessionAssuranceRequiredPayload, rolesAccessControl, sessionAssurancePluginClient, userAdditionalFields, validateToken };
4009
- export type { APIClient, AdminApplication, AdminApplicationEntitlement, AdminApplicationMember, AdminApplicationOrganization, AdminOrganization, AdminOrganizationApplication, AdminOrganizationMember, AdminOrganizationMemberRecord, AdminUser, ApiKey, ApiKeyWithoutSecret, Application, ApplicationAuthContextResponse, AssuranceFields, BaseOrganization, BeginOAuthStepUpParams, BillingMode, CompleteAuthorizationFlowResponse, CreateAdminOrganizationOptions, CreateApiKeyPayload, CreateTeamPayload, DecodedJWTPayload, DeviceAuthorizationActionResponse, DeviceAuthorizationContextResponse, DeviceAuthorizationResponse, DeviceContextApplication, EmailOTPSignInOptions, FullOrganization, GetAdminOrganizationOptions, Invitation, InviteUserToOrganizationOptions, JWTPayloadData, ListAdminApplicationsOptions, ListAdminApplicationsResult, ListAdminOrganizationMembersOptions, ListAdminOrganizationMembersResult, ListAdminOrganizationsOptions, ListAdminOrganizationsResult, ListAdminUsersOptions, ListAdminUsersResult, ListCandidateOrganizationsResponse, ListMembersOptions, Member, ExtendedOrganization as Organization, OrganizationSettings, RemoveUserFromOrganizationOptions, Role, SendVerificationOTPOptions, Session, SessionAssuranceActions, SignInWithEmailAndPasswordOptions, SignInWithSamlOptions, SocialSignInOptions, StartAuthorizationFlowResponse, Strict, Team, TeamMember, UpdateAdminOrganizationOptions, UpdateApiKeyPayload, UpdateMemberRoleOptions, UpdateOrganizationPayload, UpdateTeamPayload, User, WhoAmIInclude, WhoAmIOptions, WhoAmIOrganization, WhoAmIResponse };
6982
+ export type { APIClient, AdminApplication, AdminApplicationEntitlement, AdminApplicationMember, AdminApplicationOrganization, AdminApplicationRecord, AdminOrganization, AdminOrganizationApplication, AdminOrganizationMember, AdminOrganizationMemberRecord, AdminUser, ApiKey, ApiKeyWithoutSecret, Application, ApplicationAuthContextResponse, AssuranceFields, BaseOrganization, BeginOAuthStepUpParams, BillingMode, CompleteAuthorizationFlowResponse, CreateAdminApplicationOptions, CreateAdminOrganizationOptions, CreateApiKeyPayload, CreateTeamPayload, DecodedJWTPayload, DeviceAuthorizationActionResponse, DeviceAuthorizationContextResponse, DeviceAuthorizationResponse, DeviceContextApplication, EmailOTPSignInOptions, FullOrganization, GetAdminOrganizationOptions, Invitation, InviteUserToOrganizationOptions, JWTPayloadData, ListAdminApplicationsOptions, ListAdminApplicationsResult, ListAdminOrganizationMembersOptions, ListAdminOrganizationMembersResult, ListAdminOrganizationsOptions, ListAdminOrganizationsResult, ListAdminUsersOptions, ListAdminUsersResult, ListCandidateOrganizationsResponse, ListMembersOptions, Member, ExtendedOrganization as Organization, OrganizationSettings, RemoveUserFromOrganizationOptions, Role, SendVerificationOTPOptions, Session, SessionAssuranceActions, SignInWithEmailAndPasswordOptions, SignInWithSamlOptions, SocialSignInOptions, StartAuthorizationFlowResponse, Strict, Team, TeamMember, UpdateAdminOrganizationOptions, UpdateApiKeyPayload, UpdateMemberRoleOptions, UpdateOrganizationPayload, UpdateTeamPayload, User, UserProfile, WhoAmIInclude, WhoAmIOptions, WhoAmIOrganization, WhoAmIResponse };