@aura-stack/next 0.1.0 → 0.2.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.
@@ -1,5 +1,35 @@
1
1
  import * as _$buffer from "buffer";
2
2
 
3
+ //#region ../../node_modules/.pnpm/typebox@1.1.38/node_modules/typebox/build/type/types/schema.d.mts
4
+ interface TSchema {}
5
+ //#endregion
6
+ //#region ../../node_modules/.pnpm/typebox@1.1.38/node_modules/typebox/build/type/types/_optional.d.mts
7
+ type TOptional<Type extends TSchema = TSchema> = (Type & {
8
+ '~optional': true;
9
+ });
10
+ //#endregion
11
+ //#region ../../node_modules/.pnpm/typebox@1.1.38/node_modules/typebox/build/type/types/object.d.mts
12
+ /** Represents an Object type. */
13
+ interface TObject<Properties extends TProperties = TProperties> extends TSchema {
14
+ '~kind': 'Object';
15
+ type: 'object';
16
+ properties: Properties;
17
+ required: TRequiredArray<Properties>;
18
+ }
19
+ //#endregion
20
+ //#region ../../node_modules/.pnpm/typebox@1.1.38/node_modules/typebox/build/type/engine/helpers/union.d.mts
21
+ type TUnionToIntersect<U> = (U extends unknown ? (arg: U) => 0 : never) extends ((arg: infer I) => 0) ? I : never;
22
+ type TUnionLast<U> = TUnionToIntersect<U extends unknown ? (x: U) => 0 : never> extends ((x: infer L) => 0) ? L : never;
23
+ type TUnionToTuple<U, Result extends unknown[] = [], R = TUnionLast<U>> = [U] extends [never] ? Result : TUnionToTuple<Exclude<U, R>, [Extract<U, R>, ...Result]>;
24
+ //#endregion
25
+ //#region ../../node_modules/.pnpm/typebox@1.1.38/node_modules/typebox/build/type/types/properties.d.mts
26
+ /** Represents a Record<PropertyKey, TSchema> structure. */
27
+ interface TProperties extends TSchema {
28
+ [key: PropertyKey]: TSchema;
29
+ }
30
+ /** Creates a RequiredArray derived from the given TProperties value. */
31
+ type TRequiredArray<Properties extends TProperties, RequiredProperties extends TProperties = { [Key in keyof Properties as Properties[Key] extends TOptional<Properties[Key]> ? never : Key]: Properties[Key] }, RequiredKeys extends string[] = TUnionToTuple<Extract<keyof RequiredProperties, string>>, Result extends string[] | undefined = (RequiredKeys extends [] ? undefined : RequiredKeys)> = Result;
32
+ //#endregion
3
33
  //#region ../../node_modules/.pnpm/valibot@1.4.0_typescript@5.9.3/node_modules/valibot/dist/index.d.mts
4
34
  //#endregion
5
35
  //#region src/methods/fallback/fallback.d.ts
@@ -523,7 +553,7 @@ type MaybePromise<TValue$1> = TValue$1 | Promise<TValue$1>;
523
553
  * Hint: This type has no effect and is only used so that TypeScript displays
524
554
  * the final type in the preview instead of the utility types used.
525
555
  */
526
- type Prettify$2<TObject> = { [TKey in keyof TObject]: TObject[TKey] } & {};
556
+ type Prettify$3<TObject> = { [TKey in keyof TObject]: TObject[TKey] } & {};
527
557
  /**
528
558
  * Marks specific keys as optional.
529
559
  */
@@ -611,11 +641,11 @@ type OutputWithReadonly<TEntries$1 extends ObjectEntries | ObjectEntriesAsync, T
611
641
  /**
612
642
  * Infer object input type.
613
643
  */
614
- type InferObjectInput<TEntries$1 extends ObjectEntries | ObjectEntriesAsync> = Prettify$2<InputWithQuestionMarks<TEntries$1, InferEntriesInput<TEntries$1>>>;
644
+ type InferObjectInput<TEntries$1 extends ObjectEntries | ObjectEntriesAsync> = Prettify$3<InputWithQuestionMarks<TEntries$1, InferEntriesInput<TEntries$1>>>;
615
645
  /**
616
646
  * Infer object output type.
617
647
  */
618
- type InferObjectOutput<TEntries$1 extends ObjectEntries | ObjectEntriesAsync> = Prettify$2<OutputWithReadonly<TEntries$1, OutputWithQuestionMarks<TEntries$1, InferEntriesOutput<TEntries$1>>>>;
648
+ type InferObjectOutput<TEntries$1 extends ObjectEntries | ObjectEntriesAsync> = Prettify$3<OutputWithReadonly<TEntries$1, OutputWithQuestionMarks<TEntries$1, InferEntriesOutput<TEntries$1>>>>;
619
649
  /**
620
650
  * Infer object issue type.
621
651
  */
@@ -1215,15 +1245,6 @@ declare function readonly<TInput$1>(): ReadonlyAction<TInput$1>; //#endregion
1215
1245
  * Array action type.
1216
1246
  */
1217
1247
  //#endregion
1218
- //#region ../../node_modules/.pnpm/typebox@1.1.38/node_modules/typebox/build/type/types/schema.d.mts
1219
- interface TSchema {}
1220
- //#endregion
1221
- //#region ../../node_modules/.pnpm/typebox@1.1.38/node_modules/typebox/build/type/types/properties.d.mts
1222
- /** Represents a Record<PropertyKey, TSchema> structure. */
1223
- interface TProperties extends TSchema {
1224
- [key: PropertyKey]: TSchema;
1225
- }
1226
- //#endregion
1227
1248
  //#region ../../node_modules/.pnpm/@ark+util@0.56.0/node_modules/@ark/util/out/functions.d.ts
1228
1249
  type Fn<args extends readonly any[] = readonly any[], returns = unknown> = (...args: args) => returns;
1229
1250
  type Thunk<ret = unknown> = () => ret;
@@ -7603,7 +7624,7 @@ type MakeReadonly<T> = T extends Map<infer K, infer V> ? ReadonlyMap<K, V> : T e
7603
7624
  type SomeObject = Record<PropertyKey, any>;
7604
7625
  type Identity$1<T> = T;
7605
7626
  type Flatten<T> = Identity$1<{ [k in keyof T]: T[k] }>;
7606
- type Prettify$1<T> = { [K in keyof T]: T[K] } & {};
7627
+ type Prettify$2<T> = { [K in keyof T]: T[K] } & {};
7607
7628
  type Extend<A extends SomeObject, B extends SomeObject> = Flatten<keyof A & keyof B extends never ? A & B : { [K in keyof A as K extends keyof B ? never : K]: A[K] } & { [K in keyof B]: B[K] }>;
7608
7629
  type TupleItems = ReadonlyArray<SomeType>;
7609
7630
  type AnyFunc = (...args: any[]) => any;
@@ -8089,8 +8110,8 @@ type OptionalInSchema = {
8089
8110
  optin: "optional";
8090
8111
  };
8091
8112
  };
8092
- type $InferObjectOutput<T extends $ZodLooseShape, Extra extends Record<string, unknown>> = string extends keyof T ? IsAny<T[keyof T]> extends true ? Record<string, unknown> : Record<string, output<T[keyof T]>> : keyof (T & Extra) extends never ? Record<string, never> : Prettify$1<{ -readonly [k in keyof T as T[k] extends OptionalOutSchema ? never : k]: T[k]["_zod"]["output"] } & { -readonly [k in keyof T as T[k] extends OptionalOutSchema ? k : never]?: T[k]["_zod"]["output"] } & Extra>;
8093
- type $InferObjectInput<T extends $ZodLooseShape, Extra extends Record<string, unknown>> = string extends keyof T ? IsAny<T[keyof T]> extends true ? Record<string, unknown> : Record<string, input<T[keyof T]>> : keyof (T & Extra) extends never ? Record<string, never> : Prettify$1<{ -readonly [k in keyof T as T[k] extends OptionalInSchema ? never : k]: T[k]["_zod"]["input"] } & { -readonly [k in keyof T as T[k] extends OptionalInSchema ? k : never]?: T[k]["_zod"]["input"] } & Extra>;
8113
+ type $InferObjectOutput<T extends $ZodLooseShape, Extra extends Record<string, unknown>> = string extends keyof T ? IsAny<T[keyof T]> extends true ? Record<string, unknown> : Record<string, output<T[keyof T]>> : keyof (T & Extra) extends never ? Record<string, never> : Prettify$2<{ -readonly [k in keyof T as T[k] extends OptionalOutSchema ? never : k]: T[k]["_zod"]["output"] } & { -readonly [k in keyof T as T[k] extends OptionalOutSchema ? k : never]?: T[k]["_zod"]["output"] } & Extra>;
8114
+ type $InferObjectInput<T extends $ZodLooseShape, Extra extends Record<string, unknown>> = string extends keyof T ? IsAny<T[keyof T]> extends true ? Record<string, unknown> : Record<string, input<T[keyof T]>> : keyof (T & Extra) extends never ? Record<string, never> : Prettify$2<{ -readonly [k in keyof T as T[k] extends OptionalInSchema ? never : k]: T[k]["_zod"]["input"] } & { -readonly [k in keyof T as T[k] extends OptionalInSchema ? k : never]?: T[k]["_zod"]["input"] } & Extra>;
8094
8115
  type $ZodObjectConfig = {
8095
8116
  out: Record<string, unknown>;
8096
8117
  in: Record<string, unknown>;
@@ -8948,7 +8969,52 @@ interface $RefinementCtx<T = unknown> extends ParsePayload<T> {
8948
8969
  addIssue(arg: string | $ZodSuperRefineIssue): void;
8949
8970
  }
8950
8971
  //#endregion
8951
- //#region ../../node_modules/.pnpm/@aura-stack+router@0.7.2_ar_46e9fd9f26e06a8bd2d707503ee82b43/node_modules/@aura-stack/router/dist/index-gwkwO9nx.d.ts
8972
+ //#region ../../node_modules/.pnpm/@aura-stack+router@0.9.0_ar_a3f421822035902904aea7e26fcc38b6/node_modules/@aura-stack/router/dist/types-DZPXsPNl.d.ts
8973
+ //#endregion
8974
+ //#region src/@types/schemas.d.ts
8975
+ /**
8976
+ * Utility type to infer the output type of a Valibot ObjectSchema. This utility is used instead
8977
+ * of `InferOutput` directly to avoid performance issues caused by deeply nested conditional types.
8978
+ *
8979
+ * Note: relies on Valibot's internal `~types` field. Verify compatibility on every Valibot major/minor bump.
8980
+ */
8981
+ type InferValibotSchema<S extends ObjectSchema<any, undefined>> = NonNullable<S["~types"]>["output"];
8982
+ /**
8983
+ * Infer the schema kind (Zod, Valibot, TypeBox, Arktype) based on the provided schema type.
8984
+ */
8985
+ type SchemaKind<T> = [T] extends [$ZodType] ? "zod" : [T] extends [ObjectSchema<any, undefined>] ? "valibot" : [T] extends [TObject] ? "typebox" : [T] extends [Type<any>] ? "arktype" : "unknown"; //#endregion
8986
+ //#region src/error.d.ts
8987
+ /**
8988
+ * The HTTP status codes used in AuraStack Router.
8989
+ */
8990
+ /**
8991
+ * Route pattern must start with a slash and can contain parameters prefixed with a colon.
8992
+ * @example
8993
+ * const getUser:RoutePattern = "/users/:userId"
8994
+ * const getPostsComments:RoutePattern = "/posts/:postId/comments/:commentId"
8995
+ */
8996
+ type RoutePattern = `/${string}`;
8997
+ type Prettify$1<Obj extends object> = { [Key in keyof Obj]: Obj[Key] } & {};
8998
+ type GetParam<Route extends string> = Route extends `:${infer Param}` ? { [K in Param]: string } : {};
8999
+ /**
9000
+ * Extracts route parameters from a given route pattern through colon-prefixed segments.
9001
+ * Returns an object type where keys are parameter names and values are strings.
9002
+ * If no parameters are found, returns an empty object type.
9003
+ *
9004
+ * @example
9005
+ * // Expected: { userId: string }
9006
+ * type UserParams = Params<"/users/:userId">;
9007
+ *
9008
+ * // Expected: { postId: string; commentId: string }
9009
+ * type PostCommentParams = Params<"/posts/:postId/comments/:commentId">;
9010
+ *
9011
+ * // Expected: {}
9012
+ * type NoParams = Params<"/about">;
9013
+ */
9014
+ type GetRouteParams<Route extends RoutePattern> = Route extends `/${infer Path}/${infer Str}` ? Prettify$1<GetParam<Path> & GetRouteParams<`/${Str}`>> : Route extends `/${infer Path}` ? GetParam<Path> : {};
9015
+ /**
9016
+ * Available schemas validation for an endpoint. It can include body and searchParams schemas.
9017
+ */
8952
9018
  /**
8953
9019
  * Global context type that can be extended when creating the router. It allows passing
8954
9020
  * additional data to all route handlers and middlewares. For a type-inference use module
@@ -8956,9 +9022,13 @@ interface $RefinementCtx<T = unknown> extends ParsePayload<T> {
8956
9022
  */
8957
9023
  interface GlobalContext {}
8958
9024
  /**
8959
- * Configuration for an endpoint, including optional schemas for request validation and middlewares.
9025
+ * Base context available at the earliest hook stage (`onRequest`), before route matching.
8960
9026
  */
8961
9027
  //#endregion
9028
+ //#region ../../node_modules/.pnpm/@aura-stack+router@0.9.0_ar_a3f421822035902904aea7e26fcc38b6/node_modules/@aura-stack/router/dist/index-DhwKT9vu.d.ts
9029
+ //#region src/@types/client.d.ts
9030
+ type InferSchema<T, Kind = SchemaKind<T>> = Kind extends "zod" ? output<T> : Kind extends "valibot" ? InferValibotSchema<T & ObjectSchema<any, undefined>> : Kind extends "typebox" ? {} : [T] extends [Type<infer U>] ? U : T;
9031
+ //#endregion
8962
9032
  //#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/classic/errors.d.cts
8963
9033
  /** An Error-like class used to store Zod validation issues. */
8964
9034
  interface ZodError<T = unknown> extends $ZodError<T> {
@@ -9622,7 +9692,7 @@ interface DecodeJWTOptions {
9622
9692
  decrypt?: DecryptOptions;
9623
9693
  }
9624
9694
  //#endregion
9625
- //#region ../core/dist/index-1ADcIVGC.d.ts
9695
+ //#region ../core/dist/index-DIcbmH1M.d.ts
9626
9696
  //#endregion
9627
9697
  //#region src/jose.d.ts
9628
9698
  /**
@@ -9647,8 +9717,17 @@ declare const createJoseInstance: <DefaultUser extends User = User>(secret?: JWT
9647
9717
  encodeJWT: (payload: TypedJWTPayload<Partial<DefaultUser>>, options?: EncodeJWTOptions) => Promise<string>;
9648
9718
  decodeJWT: (token: string, options?: DecodeJWTOptions) => Promise<TypedJWTPayload<DefaultUser>>;
9649
9719
  }; //#endregion
9720
+ //#region src/shared/identity.d.ts
9721
+ declare const UserIdentity: ZodObject<{
9722
+ sub: ZodString;
9723
+ name: ZodOptional<ZodNullable<ZodString>>;
9724
+ image: ZodOptional<ZodNullable<ZodString>>;
9725
+ email: ZodOptional<ZodNullable<ZodEmail>>;
9726
+ }, $strip>;
9727
+ type SchemaTypes = ZodObject<any> | ObjectSchema<any, undefined> | Type<{}> | TObject;
9728
+ //#endregion
9650
9729
  //#region src/api/createApi.d.ts
9651
- declare const createAuthAPI: <DefaultUser extends User = User>(ctx: GlobalContext) => {
9730
+ declare const createAuthAPI: <DefaultUser extends User = User, SignUpSchema extends SchemaTypes = ZodObject<any>>(ctx: GlobalContext) => {
9652
9731
  /**
9653
9732
  * Retrieves the current session data from the server-side.
9654
9733
  *
@@ -9688,6 +9767,26 @@ declare const createAuthAPI: <DefaultUser extends User = User>(ctx: GlobalContex
9688
9767
  * })
9689
9768
  */
9690
9769
  signInCredentials: (options: SignInCredentialsAPIOptions) => Promise<SignInCredentialsAPIReturn>;
9770
+ /**
9771
+ * Signs up a new user on the server-side. It requires a `payload` with the necessary information for
9772
+ * user creation and a callback function configured in `signUp.onCreateUser` to handle the actual user
9773
+ * creation logic.
9774
+ *
9775
+ * @params options - Options for the API call, including the sign-up payload, headers, and redirect behavior.
9776
+ * @return The object returned by the API call {@link SignUpAPIReturn}
9777
+ * @example
9778
+ * const response = await api.signUp({
9779
+ * payload: {
9780
+ * name: "John",
9781
+ * lastName: "Doe",
9782
+ * email: "john.doe@example.com",
9783
+ * password: "1234567890"
9784
+ * },
9785
+ * redirectTo: "/dashboard",
9786
+ * request: await getRequest()
9787
+ * })
9788
+ */
9789
+ signUp: <Payload extends Record<string, any> = Wrap<RemoveIndexSignature<InferSchema<SignUpSchema, SchemaKind<SignUpSchema>>>>>(options: SignUpAPIOptions<Payload>) => Promise<SignUpAPIReturn>;
9691
9790
  /**
9692
9791
  * Updates the current session on the server-side. It allows partial updates to the session object, such as
9693
9792
  * modifying user fields or extending the session expiry. It implements CSRF Protection by default, for
@@ -9728,13 +9827,11 @@ declare const createAuthAPI: <DefaultUser extends User = User>(ctx: GlobalContex
9728
9827
  */
9729
9828
  signOut: (options: SignOutAPIOptions) => Promise<SignOutAPIReturn>;
9730
9829
  }; //#endregion
9731
- //#region src/shared/identity.d.ts
9732
- declare const UserIdentity: ZodObject<{
9733
- sub: ZodString;
9734
- name: ZodOptional<ZodNullable<ZodString>>;
9735
- image: ZodOptional<ZodNullable<ZodString>>;
9736
- email: ZodOptional<ZodNullable<ZodEmail>>;
9737
- }, $strip>;
9830
+ //#region src/shared/logger.d.ts
9831
+ /**
9832
+ * Log message definitions organized by category.
9833
+ * Each message includes facility, severity, msgId, and default message.
9834
+ */
9738
9835
  //#endregion
9739
9836
  //#region src/oauth/github.d.ts
9740
9837
  /**
@@ -10345,119 +10442,245 @@ interface DribbbleProfile extends DribbbleDefault {
10345
10442
  * @see [Dribbble - User](https://developer.dribbble.com/v2/user/)
10346
10443
  */
10347
10444
  //#endregion
10348
- //#region src/oauth/index.d.ts
10349
- declare const builtInOAuthProviders: {
10350
- readonly github: <DefaultUser extends User = {
10351
- sub: string;
10352
- name?: string | null | undefined;
10353
- image?: string | null | undefined;
10354
- email?: string | null | undefined;
10355
- }>(options?: Partial<OAuthProviderCredentials<GitHubProfile, DefaultUser>>) => OAuthProviderCredentials<GitHubProfile, DefaultUser>;
10356
- readonly bitbucket: <DefaultUser extends User = {
10357
- sub: string;
10358
- name?: string | null | undefined;
10359
- image?: string | null | undefined;
10360
- email?: string | null | undefined;
10361
- }>(options?: Partial<OAuthProviderCredentials<BitbucketProfile, DefaultUser>>) => OAuthProviderCredentials<BitbucketProfile, DefaultUser>;
10362
- readonly figma: <DefaultUser extends User = {
10363
- sub: string;
10364
- name?: string | null | undefined;
10365
- image?: string | null | undefined;
10366
- email?: string | null | undefined;
10367
- }>(options?: Partial<OAuthProviderCredentials<FigmaProfile, DefaultUser>>) => OAuthProviderCredentials<FigmaProfile, DefaultUser>;
10368
- readonly discord: <DefaultUser extends User = {
10369
- sub: string;
10370
- name?: string | null | undefined;
10371
- image?: string | null | undefined;
10372
- email?: string | null | undefined;
10373
- }>(options?: Partial<OAuthProviderCredentials<DiscordProfile, DefaultUser>>) => OAuthProviderCredentials<DiscordProfile, DefaultUser>;
10374
- readonly gitlab: <DefaultUser extends User = {
10375
- sub: string;
10376
- name?: string | null | undefined;
10377
- image?: string | null | undefined;
10378
- email?: string | null | undefined;
10379
- }>(options?: Partial<OAuthProviderCredentials<GitLabProfile, DefaultUser>>) => OAuthProviderCredentials<GitLabProfile, DefaultUser>;
10380
- readonly spotify: <DefaultUser extends User = {
10381
- sub: string;
10382
- name?: string | null | undefined;
10383
- image?: string | null | undefined;
10384
- email?: string | null | undefined;
10385
- }>(options?: Partial<OAuthProviderCredentials<SpotifyProfile, DefaultUser>>) => OAuthProviderCredentials<SpotifyProfile, DefaultUser>;
10386
- readonly x: <DefaultUser extends User = {
10387
- sub: string;
10388
- name?: string | null | undefined;
10389
- image?: string | null | undefined;
10390
- email?: string | null | undefined;
10391
- }>(options?: Partial<OAuthProviderCredentials<XProfile, DefaultUser>>) => OAuthProviderCredentials<XProfile, DefaultUser>;
10392
- readonly strava: <DefaultUser extends User = {
10393
- sub: string;
10394
- name?: string | null | undefined;
10395
- image?: string | null | undefined;
10396
- email?: string | null | undefined;
10397
- }>(options?: Partial<OAuthProviderCredentials<StravaProfile, DefaultUser>>) => OAuthProviderCredentials<StravaProfile, DefaultUser>;
10398
- readonly mailchimp: <DefaultUser extends User = {
10399
- sub: string;
10400
- name?: string | null | undefined;
10401
- image?: string | null | undefined;
10402
- email?: string | null | undefined;
10403
- }>(options?: Partial<OAuthProviderCredentials<MailchimpProfile, DefaultUser>>) => OAuthProviderCredentials<MailchimpProfile, DefaultUser>;
10404
- readonly pinterest: <DefaultUser extends User = {
10405
- sub: string;
10406
- name?: string | null | undefined;
10407
- image?: string | null | undefined;
10408
- email?: string | null | undefined;
10409
- }>(options?: Partial<OAuthProviderCredentials<PinterestProfile, DefaultUser>>) => OAuthProviderCredentials<PinterestProfile, DefaultUser>;
10410
- readonly twitch: <DefaultUser extends User = {
10411
- sub: string;
10412
- name?: string | null | undefined;
10413
- image?: string | null | undefined;
10414
- email?: string | null | undefined;
10415
- }>(options?: Partial<OAuthProviderCredentials<TwitchProfile, DefaultUser>>) => OAuthProviderCredentials<TwitchProfile, DefaultUser>;
10416
- readonly notion: <DefaultUser extends User = {
10417
- sub: string;
10418
- name?: string | null | undefined;
10419
- image?: string | null | undefined;
10420
- email?: string | null | undefined;
10421
- }>(options?: Partial<OAuthProviderCredentials<NotionProfile, DefaultUser>>) => OAuthProviderCredentials<NotionProfile, DefaultUser>;
10422
- readonly dropbox: <DefaultUser extends User = {
10423
- sub: string;
10424
- name?: string | null | undefined;
10425
- image?: string | null | undefined;
10426
- email?: string | null | undefined;
10427
- }>(options?: Partial<OAuthProviderCredentials<DropboxProfile, DefaultUser>>) => OAuthProviderCredentials<DropboxProfile, DefaultUser>;
10428
- readonly atlassian: <DefaultUser extends User = {
10429
- sub: string;
10430
- name?: string | null | undefined;
10431
- image?: string | null | undefined;
10432
- email?: string | null | undefined;
10433
- }>(options?: Partial<OAuthProviderCredentials<AtlassianProfile, DefaultUser>>) => OAuthProviderCredentials<AtlassianProfile, DefaultUser>;
10434
- readonly clickUp: <DefaultUser extends User = {
10435
- sub: string;
10436
- name?: string | null | undefined;
10437
- image?: string | null | undefined;
10438
- email?: string | null | undefined;
10439
- }>(options?: Partial<OAuthProviderCredentials<ClickUpProfile, DefaultUser>>) => OAuthProviderCredentials<ClickUpProfile, DefaultUser>;
10440
- readonly dribbble: <DefaultUser extends User = {
10441
- sub: string;
10442
- name?: string | null | undefined;
10443
- image?: string | null | undefined;
10444
- email?: string | null | undefined;
10445
- }>(options?: Partial<OAuthProviderCredentials<DribbbleProfile, DefaultUser>>) => OAuthProviderCredentials<DribbbleProfile, DefaultUser>;
10446
- };
10445
+ //#region src/oauth/hubspot.d.ts
10446
+ interface HubSportSignedAccessToken {
10447
+ appId: number;
10448
+ appInstallId: number;
10449
+ audience: string;
10450
+ expiresAt: string;
10451
+ hubId: number;
10452
+ hublet: string;
10453
+ installingUserId: number;
10454
+ isPrivateDistribution: boolean;
10455
+ isServiceAccount: boolean;
10456
+ isUserLevel: boolean;
10457
+ newSignature: string;
10458
+ scopeToScopeGroupPks: string;
10459
+ scopes: string;
10460
+ signature: string;
10461
+ trialScopeToScopeGroupPks: string;
10462
+ trialScopes: string;
10463
+ userId: number;
10464
+ }
10465
+ /**
10466
+ * @see [HubSpot - Retrieve OAuth token metadata](https://developers.hubspot.com/docs/api-reference/legacy/authentication/oauth-tokens/v1/get-oauth-token-metadata)
10467
+ */
10468
+ interface HubSpotProfile {
10469
+ /**
10470
+ * The ID of the application associated with the access token.
10471
+ */
10472
+ app_id: number;
10473
+ /**
10474
+ * The time in seconds until the access token expires.
10475
+ */
10476
+ expires_in: number;
10477
+ /**
10478
+ * The ID of the HubSpot account associated with the access token.
10479
+ */
10480
+ hub_id: number;
10481
+ /**
10482
+ * An array of strings indicating the scopes
10483
+ */
10484
+ scopes: string[];
10485
+ /**
10486
+ * The access token string used to make API calls.
10487
+ */
10488
+ token: string;
10489
+ /**
10490
+ * The type of token, typically indicating the authentication scheme.
10491
+ * @default `bearer`
10492
+ */
10493
+ token_type: string;
10494
+ /**
10495
+ * The ID of the hubspot user for whom the access token was created.
10496
+ */
10497
+ user_id: number;
10498
+ /**
10499
+ * The domain of the HubSpot account associated with the access token.
10500
+ */
10501
+ hub_domain: string;
10502
+ /**
10503
+ * Indicates whether the token is for a privately distributed application. If false, it is marketplace distributed.
10504
+ */
10505
+ is_private_distribution: boolean;
10506
+ signed_access_token: HubSportSignedAccessToken;
10507
+ /**
10508
+ * The email address of the hubspot user for whom the access token was created.
10509
+ */
10510
+ user: string;
10511
+ }
10447
10512
  /**
10448
- * Constructs OAuth provider configurations from an array of provider names or configurations.
10449
- * It loads the client ID and client secret from environment variables if only the provider name is provided.
10513
+ * HubSpot OAuth provider
10514
+ * Profile Type {@link HubSpotProfile}
10450
10515
  *
10451
- * @param oauth - Array of OAuth provider configurations or provider names to be defined from environment variables
10452
- * @returns A record of OAuth provider configurations
10453
- * @example
10454
- * // Using built-in provider with env variables
10455
- * createBuiltInOAuthProviders(["github"])
10516
+ * @see [HubSpot - Working with OAuth](https://developers.hubspot.com/docs/apps/legacy-apps/authentication/oauth-quickstart-guide#getting-oauth-tokens)
10517
+ * @see [HubSpot - Scopes](https://developers.hubspot.com/docs/apps/legacy-apps/authentication/scopes)
10518
+ * @see [HubSpot - Retrieve OAuth token metadata](https://developers.hubspot.com/docs/api-reference/legacy/authentication/oauth-tokens/v1/get-oauth-token-metadata)
10519
+ */
10520
+ //#endregion
10521
+ //#region src/oauth/google.d.ts
10522
+ /**
10523
+ * @see [Google - ID Token (Claims)](https://developers.google.com/identity/openid-connect/reference#id_token_claims)
10524
+ */
10525
+ interface GoogleProfile {
10526
+ /**
10527
+ * The issuer identifier for the issuer of the response.
10528
+ * Typically `https://accounts.google.com` or `accounts.google.com`
10529
+ */
10530
+ iss: string;
10531
+ /**
10532
+ * The subject identifier for the user. This is a unique and immutable
10533
+ * identifier for the user.
10534
+ */
10535
+ sub: string;
10536
+ /**
10537
+ * The audience for which the ID token is intended.
10538
+ */
10539
+ aud: string;
10540
+ /**
10541
+ * The time of the ID token was issued.
10542
+ */
10543
+ iat: number;
10544
+ /**
10545
+ * Expiration time on or after which the ID token must not be accepted.
10546
+ */
10547
+ exp: string;
10548
+ /**
10549
+ * The client Identifier for the authorized presenter, obtained from
10550
+ * the Google Cloud Console.
10551
+ */
10552
+ azp?: string;
10553
+ /**
10554
+ * The value of the `nonce` supplied by the client.
10555
+ */
10556
+ nonce?: string;
10557
+ /**
10558
+ * The time user authentication took placea JSON number representing
10559
+ * the number of seconds.
10560
+ */
10561
+ auth_time?: number;
10562
+ /**
10563
+ * Access token hash. Provides validation that the Access Token is tied
10564
+ * to the identity token.
10565
+ */
10566
+ at_hash?: string;
10567
+ /**
10568
+ * The domain associated with the Google Workspace or Cloud organization of the user.
10569
+ */
10570
+ hd?: string;
10571
+ /**
10572
+ * The user's email address.
10573
+ * > Note: Provided only if you included the `email` scope in your request.
10574
+ *
10575
+ * > Warning: Don't use email address as an identifier because a Google
10576
+ * Account can have multiple email addresses at different points in time.
10577
+ * Always use the `sub` field as the identifier for the user.
10578
+ */
10579
+ email: string;
10580
+ /**
10581
+ * `True` if the user's email address has been verified.
10582
+ */
10583
+ email_verified?: boolean;
10584
+ /**
10585
+ * The user's full name.
10586
+ * > Note: Provided only if you included the `profile` scope in your request.
10587
+ */
10588
+ name: string;
10589
+ /**
10590
+ * The URL of the user's profile picture.
10591
+ * > Note: Provided only if you included the `profile` scope in your request.
10592
+ */
10593
+ picture: string;
10594
+ /**
10595
+ * The user's give name(s) or first name(s).
10596
+ */
10597
+ given_name?: string;
10598
+ /**
10599
+ * The user's family name(s) or last name(s).
10600
+ */
10601
+ family_name?: string;
10602
+ }
10603
+ /**
10604
+ * Google OpenID Connect Provider
10456
10605
  *
10457
- * // Using built-in provider with explicit credentials via factory
10458
- * createBuiltInOAuthProviders([github({ clientId: "...", clientSecret: "..." })])
10606
+ * @see [Google - Using OAuth 2.0 to Access Google APIs](https://developers.google.com/identity/protocols/oauth2)
10607
+ * @see [Google - OpenID Connect](https://developers.google.com/identity/openid-connect/openid-connect)
10608
+ * @see [Google - OpenID Connect API Reference](https://developers.google.com/identity/openid-connect/reference)
10609
+ * @see [Google - Client Credentials](https://console.cloud.google.com/auth/clients)
10459
10610
  */
10460
- type BuiltInOAuthProvider = keyof typeof builtInOAuthProviders; //#endregion
10611
+ //#endregion
10612
+ //#region src/oauth/huggingface.d.ts
10613
+ interface HuggingFaceResourceGroup {
10614
+ sub: string;
10615
+ name: string;
10616
+ role: "admin" | "write" | "contributor" | "read" | "no_access";
10617
+ }
10618
+ interface HuggingFaceOrg {
10619
+ sub: string;
10620
+ name: string;
10621
+ picture: string;
10622
+ preferred_username: string;
10623
+ plan?: "team" | "enterprise" | "plus" | "academia";
10624
+ canPay?: boolean;
10625
+ billingMode?: "prepaid" | "postpaid";
10626
+ roleInOrg?: "admin" | "write" | "contributor" | "read" | "no_access";
10627
+ pendingSSO?: boolean;
10628
+ missingMFA?: boolean;
10629
+ securityRestrictions?: ("mfa" | "token-policy" | "token-revoked" | "sso" | "ip")[];
10630
+ resourceGroups?: HuggingFaceResourceGroup;
10631
+ }
10632
+ /**
10633
+ * @see [Hugging Face - Open API Metadata](https://huggingface.co/.well-known/openapi.json)
10634
+ */
10635
+ interface HuggingFaceProfile {
10636
+ sub: string;
10637
+ isPro: boolean;
10638
+ orgs: HuggingFaceOrg[];
10639
+ name?: string;
10640
+ preferred_username?: string;
10641
+ picture?: string;
10642
+ profile?: string;
10643
+ website?: string;
10644
+ email?: string;
10645
+ email_verified?: boolean;
10646
+ canPay?: boolean;
10647
+ billingMode?: "prepaid" | "postpaid";
10648
+ }
10649
+ /**
10650
+ * Hugging Face OpenID Connect Provider
10651
+ *
10652
+ * @see [Hugging Face - Sign in with Hugging Face](https://huggingface.co/docs/hub/en/oauth)
10653
+ * @see [Hugging Face - Create an OAuth App](https://huggingface.co/settings/applications/new)
10654
+ * @see [Hugging Face - OpenID Metadata](https://huggingface.co/.well-known/openid-configuration)
10655
+ */
10656
+ //#endregion
10657
+ //#region src/oauth/authentik.d.ts
10658
+ interface AuthentikProfile {
10659
+ iss: string;
10660
+ sub: string;
10661
+ aud: string;
10662
+ exp: number;
10663
+ iat: number;
10664
+ auth_time: number;
10665
+ acr: string;
10666
+ c_hash: string;
10667
+ nonce: string;
10668
+ at_hash: string;
10669
+ email: string;
10670
+ email_verified: boolean;
10671
+ name: string;
10672
+ given_name: string;
10673
+ family_name: string;
10674
+ preferred_username: string;
10675
+ nickname: string;
10676
+ }
10677
+ /**
10678
+ * Authentik OpenID Connect Provider
10679
+ *
10680
+ * @see [Authentik - OAuth 2.0 Provider](https://docs.goauthentik.io/add-secure-apps/providers/oauth2/)
10681
+ * @see [Authentik - Create an OAuth2 Provider](https://docs.goauthentik.io/add-secure-apps/providers/oauth2/create-oauth2-provider/)
10682
+ */
10683
+ //#endregion
10461
10684
  //#region src/@types/session.d.ts
10462
10685
  /** Application user type, inferred from the configured identity schema (defaults to the built-in user shape). */
10463
10686
  type User = output<typeof UserIdentity>;
@@ -10583,8 +10806,177 @@ type StatelessStrategyConfig = {
10583
10806
  */
10584
10807
  type SessionConfig = StatelessStrategyConfig;
10585
10808
  /** Result of reading a stateless (JWT) session from a request: session payload and outgoing header mutations. */
10586
- //#endregion
10809
+ type OpenIDProvider<Profile extends object = Record<string, any>, DefaultUser = User, Issuer extends string = string> = {
10810
+ id: string;
10811
+ name: string;
10812
+ /**
10813
+ * URL to concatenating the string /.well-known/openid-configuration to the Issuer.
10814
+ */
10815
+ issuer: Issuer;
10816
+ clientId?: string;
10817
+ clientSecret?: string;
10818
+ /**
10819
+ * Override the default OIDC scope (`openid profile email`).
10820
+ */
10821
+ scope?: string;
10822
+ profile?: (profile: Profile) => DefaultUser | Promise<DefaultUser>;
10823
+ } & GetRouteParams<`/${Issuer}`>; //#endregion
10824
+ //#region src/oauth/index.d.ts
10825
+ declare const builtInOAuthProviders: {
10826
+ readonly github: <DefaultUser extends User = {
10827
+ sub: string;
10828
+ name?: string | null | undefined;
10829
+ image?: string | null | undefined;
10830
+ email?: string | null | undefined;
10831
+ }>(options?: Partial<OAuthProviderCredentials<GitHubProfile, DefaultUser>>) => OAuthProviderCredentials<GitHubProfile, DefaultUser>;
10832
+ readonly bitbucket: <DefaultUser extends User = {
10833
+ sub: string;
10834
+ name?: string | null | undefined;
10835
+ image?: string | null | undefined;
10836
+ email?: string | null | undefined;
10837
+ }>(options?: Partial<OAuthProviderCredentials<BitbucketProfile, DefaultUser>>) => OAuthProviderCredentials<BitbucketProfile, DefaultUser>;
10838
+ readonly figma: <DefaultUser extends User = {
10839
+ sub: string;
10840
+ name?: string | null | undefined;
10841
+ image?: string | null | undefined;
10842
+ email?: string | null | undefined;
10843
+ }>(options?: Partial<OAuthProviderCredentials<FigmaProfile, DefaultUser>>) => OAuthProviderCredentials<FigmaProfile, DefaultUser>;
10844
+ readonly discord: <DefaultUser extends User = {
10845
+ sub: string;
10846
+ name?: string | null | undefined;
10847
+ image?: string | null | undefined;
10848
+ email?: string | null | undefined;
10849
+ }>(options?: Partial<OAuthProviderCredentials<DiscordProfile, DefaultUser>>) => OAuthProviderCredentials<DiscordProfile, DefaultUser>;
10850
+ readonly gitlab: <DefaultUser extends User = {
10851
+ sub: string;
10852
+ name?: string | null | undefined;
10853
+ image?: string | null | undefined;
10854
+ email?: string | null | undefined;
10855
+ }>(options?: Partial<OAuthProviderCredentials<GitLabProfile, DefaultUser>>) => OAuthProviderCredentials<GitLabProfile, DefaultUser>;
10856
+ readonly spotify: <DefaultUser extends User = {
10857
+ sub: string;
10858
+ name?: string | null | undefined;
10859
+ image?: string | null | undefined;
10860
+ email?: string | null | undefined;
10861
+ }>(options?: Partial<OAuthProviderCredentials<SpotifyProfile, DefaultUser>>) => OAuthProviderCredentials<SpotifyProfile, DefaultUser>;
10862
+ readonly x: <DefaultUser extends User = {
10863
+ sub: string;
10864
+ name?: string | null | undefined;
10865
+ image?: string | null | undefined;
10866
+ email?: string | null | undefined;
10867
+ }>(options?: Partial<OAuthProviderCredentials<XProfile, DefaultUser>>) => OAuthProviderCredentials<XProfile, DefaultUser>;
10868
+ readonly strava: <DefaultUser extends User = {
10869
+ sub: string;
10870
+ name?: string | null | undefined;
10871
+ image?: string | null | undefined;
10872
+ email?: string | null | undefined;
10873
+ }>(options?: Partial<OAuthProviderCredentials<StravaProfile, DefaultUser>>) => OAuthProviderCredentials<StravaProfile, DefaultUser>;
10874
+ readonly mailchimp: <DefaultUser extends User = {
10875
+ sub: string;
10876
+ name?: string | null | undefined;
10877
+ image?: string | null | undefined;
10878
+ email?: string | null | undefined;
10879
+ }>(options?: Partial<OAuthProviderCredentials<MailchimpProfile, DefaultUser>>) => OAuthProviderCredentials<MailchimpProfile, DefaultUser>;
10880
+ readonly pinterest: <DefaultUser extends User = {
10881
+ sub: string;
10882
+ name?: string | null | undefined;
10883
+ image?: string | null | undefined;
10884
+ email?: string | null | undefined;
10885
+ }>(options?: Partial<OAuthProviderCredentials<PinterestProfile, DefaultUser>>) => OAuthProviderCredentials<PinterestProfile, DefaultUser>;
10886
+ readonly twitch: <DefaultUser extends User = {
10887
+ sub: string;
10888
+ name?: string | null | undefined;
10889
+ image?: string | null | undefined;
10890
+ email?: string | null | undefined;
10891
+ }>(options?: Partial<OAuthProviderCredentials<TwitchProfile, DefaultUser>>) => OAuthProviderCredentials<TwitchProfile, DefaultUser>;
10892
+ readonly notion: <DefaultUser extends User = {
10893
+ sub: string;
10894
+ name?: string | null | undefined;
10895
+ image?: string | null | undefined;
10896
+ email?: string | null | undefined;
10897
+ }>(options?: Partial<OAuthProviderCredentials<NotionProfile, DefaultUser>>) => OAuthProviderCredentials<NotionProfile, DefaultUser>;
10898
+ readonly dropbox: <DefaultUser extends User = {
10899
+ sub: string;
10900
+ name?: string | null | undefined;
10901
+ image?: string | null | undefined;
10902
+ email?: string | null | undefined;
10903
+ }>(options?: Partial<OAuthProviderCredentials<DropboxProfile, DefaultUser>>) => OAuthProviderCredentials<DropboxProfile, DefaultUser>;
10904
+ readonly atlassian: <DefaultUser extends User = {
10905
+ sub: string;
10906
+ name?: string | null | undefined;
10907
+ image?: string | null | undefined;
10908
+ email?: string | null | undefined;
10909
+ }>(options?: Partial<OAuthProviderCredentials<AtlassianProfile, DefaultUser>>) => OAuthProviderCredentials<AtlassianProfile, DefaultUser>;
10910
+ readonly clickUp: <DefaultUser extends User = {
10911
+ sub: string;
10912
+ name?: string | null | undefined;
10913
+ image?: string | null | undefined;
10914
+ email?: string | null | undefined;
10915
+ }>(options?: Partial<OAuthProviderCredentials<ClickUpProfile, DefaultUser>>) => OAuthProviderCredentials<ClickUpProfile, DefaultUser>;
10916
+ readonly dribbble: <DefaultUser extends User = {
10917
+ sub: string;
10918
+ name?: string | null | undefined;
10919
+ image?: string | null | undefined;
10920
+ email?: string | null | undefined;
10921
+ }>(options?: Partial<OAuthProviderCredentials<DribbbleProfile, DefaultUser>>) => OAuthProviderCredentials<DribbbleProfile, DefaultUser>;
10922
+ readonly hubspot: <DefaultUser extends User = {
10923
+ sub: string;
10924
+ name?: string | null | undefined;
10925
+ image?: string | null | undefined;
10926
+ email?: string | null | undefined;
10927
+ }>(options?: OAuthProviderConfig<HubSpotProfile, DefaultUser>) => OAuthProviderConfig<HubSpotProfile, DefaultUser>;
10928
+ readonly google: <DefaultUser extends User = {
10929
+ sub: string;
10930
+ name?: string | null | undefined;
10931
+ image?: string | null | undefined;
10932
+ email?: string | null | undefined;
10933
+ }>(options?: Partial<OpenIDProvider<GoogleProfile, DefaultUser>>) => OpenIDProvider<GoogleProfile, DefaultUser>;
10934
+ readonly huggingface: <DefaultUser extends User = {
10935
+ sub: string;
10936
+ name?: string | null | undefined;
10937
+ image?: string | null | undefined;
10938
+ email?: string | null | undefined;
10939
+ }>(options?: Partial<OpenIDProvider<HuggingFaceProfile, DefaultUser>>) => OpenIDProvider<HuggingFaceProfile, DefaultUser>;
10940
+ readonly authentik: <DefaultUser extends User = {
10941
+ sub: string;
10942
+ name?: string | null | undefined;
10943
+ image?: string | null | undefined;
10944
+ email?: string | null | undefined;
10945
+ }>(options?: Partial<OpenIDProvider<AuthentikProfile, DefaultUser>>) => OpenIDProvider<AuthentikProfile, DefaultUser>;
10946
+ };
10947
+ type BuiltInOAuthProvider = keyof typeof builtInOAuthProviders; //#endregion
10587
10948
  //#region src/@types/oauth.d.ts
10949
+ type AccessTokenContext = {
10950
+ /**
10951
+ * Access token string returned by the OAuth provider's token endpoint. The token
10952
+ * must be used to exchange for user information from the provider's userinfo endpoint.
10953
+ */
10954
+ accessToken: string;
10955
+ /**
10956
+ * The access token type returned by the OAuth provider's token endpoint, typically "Bearer".
10957
+ */
10958
+ tokenType?: string | undefined;
10959
+ /**
10960
+ * The number of seconds until the access token expires, as returned by the OAuth provider's
10961
+ * token endpoint.
10962
+ */
10963
+ expiresIn?: number | undefined;
10964
+ /**
10965
+ * Optional refresh token returned by the OAuth provider's token endpoint, which can be
10966
+ * used to obtain a new access token when the current one expires.
10967
+ */
10968
+ refreshToken?: string | undefined;
10969
+ /**
10970
+ * The scopes granted by the user for the access token, as returned by the OAuth provider's
10971
+ * token endpoint.
10972
+ */
10973
+ scope?: string | string[] | null | undefined;
10974
+ /**
10975
+ * The userinfo endpoint URL of the OAuth provider. This is required to fetch user
10976
+ * information using the access token.
10977
+ */
10978
+ userInfoURL: string;
10979
+ };
10588
10980
  /** Known query parameter names supported when building an OAuth authorization URL. */
10589
10981
  type AuthorizeParams = LiteralUnion<"clientId" | "prompt" | "scope" | "responseMode" | "audience" | "loginHint" | "nonce" | "display">;
10590
10982
  /** OAuth 2.0 `response_type` values used in authorization requests. */
@@ -10615,6 +11007,9 @@ interface OAuthProviderConfig<Profile extends object = Record<string, any>, Defa
10615
11007
  url: string;
10616
11008
  headers?: Record<string, string>;
10617
11009
  method?: string;
11010
+ } | {
11011
+ url: string;
11012
+ request: (context: AccessTokenContext) => Profile | Promise<Profile>;
10618
11013
  };
10619
11014
  /**
10620
11015
  * @deprecated
@@ -10643,7 +11038,7 @@ interface OAuthProviderCredentials<Profile extends object = Record<string, any>,
10643
11038
  * Programmatic auth API returned with the auth instance: `getSession`, `signIn`, `signInCredentials`, `signOut`, `updateSession`.
10644
11039
  * Each method returns a result object plus `headers` and `toResponse()` for HTTP responses.
10645
11040
  */
10646
- type AuthAPI<DefaultUser extends User = User> = ReturnType<typeof createAuthAPI<DefaultUser>>;
11041
+ type AuthAPI<DefaultUser extends User = User, SignUpSchema extends SchemaTypes = ZodObject<any>> = ReturnType<typeof createAuthAPI<DefaultUser, SignUpSchema>>;
10647
11042
  /** JWT and crypto helpers bound to the configured identity schema (sign, verify, claims). */
10648
11043
  type JoseInstance<DefaultUser extends User = User> = ReturnType<typeof createJoseInstance<DefaultUser>>;
10649
11044
  /** Normalized internal logger with resolved level and structured log function. */
@@ -10659,11 +11054,11 @@ interface CredentialsPayload {
10659
11054
  /**
10660
11055
  * Public auth instance: programmatic {@link AuthAPI}, {@link JoseInstance}, and HTTP {@link AuthClient} handlers.
10661
11056
  */
10662
- interface AuthInstance<DefaultUser extends User = User> {
11057
+ interface AuthInstance<DefaultUser extends User = User, SignUpSchema extends SchemaTypes = ZodObject<any>> {
10663
11058
  /**
10664
11059
  * Programmatic API for authentication actions (getSession, signIn, signOut, etc.) that can be used in server-side contexts or API routes.
10665
11060
  */
10666
- api: AuthAPI<DefaultUser>;
11061
+ api: AuthAPI<DefaultUser, SignUpSchema>;
10667
11062
  /**
10668
11063
  * JOSE helper functions for signin, encryption and verification of JWTs.
10669
11064
  */
@@ -10704,7 +11099,6 @@ type Merge<A, B> = Omit<A, keyof B> & B;
10704
11099
  */
10705
11100
  type ZodShapeToObject<S extends ZodRawShape = ZodRawShape> = Merge<output<ZodObject<S>>, User>;
10706
11101
  type FromShapeToObject<S> = S extends ZodRawShape ? ZodShapeToObject<S> : S extends ObjectEntries ? ValibotShapeToObject<S> : S extends Type ? ArktypeShapeToObject<S> : S extends TProperties ? TypeboxShapeToObject<S> : S extends User ? S : never;
10707
- /** Recursively makes every property required. */
10708
11102
  /** Recursively makes every property optional. */
10709
11103
  type DeepPartial<T> = { [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P] };
10710
11104
  /** Wraps a type in an object with the same keys. */
@@ -10722,6 +11116,7 @@ type Wrap<T> = T extends any ? { [K in keyof T]: T[K] } : never;
10722
11116
  *
10723
11117
  * type User = InferUser<typeof auth>
10724
11118
  */
11119
+ type RemoveIndexSignature<T> = { [K in keyof T as string extends K ? never : number extends K ? never : symbol extends K ? never : K]: T[K] };
10725
11120
  /**
10726
11121
  * HTTP `Response` with `json()` typed to resolve to `Body` (defaults to `unknown`).
10727
11122
  */
@@ -10885,7 +11280,7 @@ type SignInCredentialsReturnData = /** redirect: true & redirectTo: string */{
10885
11280
  };
10886
11281
  /** Client-side credentials sign-in return type (redirect mode or manual redirect data). */
10887
11282
  /** Server/programmatic credentials sign-in options. */
10888
- interface SignInCredentialsAPIOptions extends APIOptionsWithRedirectTo, APIOptionsWithRequest {
11283
+ interface SignInCredentialsAPIOptions extends APIOptionsWithRedirectTo, APIOptionsWithRequest, APIOptionsWithSkipCSRFCheck {
10889
11284
  /**
10890
11285
  * Credentials payload validated by the configured `credentials.authorize` function.
10891
11286
  * @example
@@ -10963,11 +11358,31 @@ interface UpdateSessionAPIOptions<DefaultUser extends User = User> extends Requi
10963
11358
  session: DeepPartial<Session<DefaultUser>>;
10964
11359
  }
10965
11360
  /** Programmatic session update result with redirect metadata and `toResponse()`. */
10966
- type UpdateSessionAPIReturn<DefaultUser extends User = User> = AuthActionAPIReturn<UpdateSessionReturnData<DefaultUser>>; //#endregion
10967
- //#region src/@types/index.d.ts
10968
- /**
10969
- * Standard JWT claims that are managed internally by the token system.
10970
- * These fields are typically filtered out before returning user data.
10971
- */
11361
+ type UpdateSessionAPIReturn<DefaultUser extends User = User> = AuthActionAPIReturn<UpdateSessionReturnData<DefaultUser>>;
11362
+ interface SignUpAPIOptions<Payload extends Record<string, any> = Record<string, any>> extends APIOptionsWithRedirectTo, APIOptionsWithRequest, APIOptionsWithSkipCSRFCheck {
11363
+ payload: Payload;
11364
+ }
11365
+ type SignUpReturnData = /** redirect: true & redirectTo: string */{
11366
+ success: true;
11367
+ redirect: true;
11368
+ redirectURL: null;
11369
+ } /** redirect: false & redirectTo: string */ | {
11370
+ success: true;
11371
+ redirect: false;
11372
+ redirectURL: string;
11373
+ }
11374
+ /** redirect: false & redirectTo: null | undefined (not set) */
11375
+ /** redirect: true & redirectTo: null | undefined (not set) */
11376
+ | {
11377
+ success: true;
11378
+ redirect: false;
11379
+ redirectURL: null;
11380
+ } /** Failed sign-up */ | {
11381
+ success: false;
11382
+ redirect: false;
11383
+ redirectURL: null;
11384
+ };
11385
+ /** Programmatic sign-up result with redirect metadata and `toResponse()`. */
11386
+ type SignUpAPIReturn = AuthActionAPIReturn<SignUpReturnData>;
10972
11387
  //#endregion
10973
- export { DecodeJWTOptions as _, GetSessionAPIReturn as a, Session as c, SignInCredentialsAPIOptions as d, SignInCredentialsAPIReturn as f, UpdateSessionAPIReturn as g, UpdateSessionAPIOptions as h, GetSessionAPIOptions as i, SignInAPIOptions as l, SignOutAPIReturn as m, BuiltInOAuthProvider as n, LiteralUnion as o, SignOutAPIOptions as p, FromShapeToObject as r, Prettify as s, AuthInstance as t, SignInAPIReturn as u, EncodeJWTOptions as v, TypedJWTPayload as y };
11388
+ export { UpdateSessionAPIOptions as _, GetSessionAPIReturn as a, EncodeJWTOptions as b, Session as c, SignInCredentialsAPIOptions as d, SignInCredentialsAPIReturn as f, SignUpAPIReturn as g, SignUpAPIOptions as h, GetSessionAPIOptions as i, SignInAPIOptions as l, SignOutAPIReturn as m, BuiltInOAuthProvider as n, LiteralUnion as o, SignOutAPIOptions as p, FromShapeToObject as r, Prettify as s, AuthInstance as t, SignInAPIReturn as u, UpdateSessionAPIReturn as v, TypedJWTPayload as x, DecodeJWTOptions as y };