@meistrari/auth-core 1.38.0 → 1.39.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
@@ -92,7 +92,7 @@ type AssuranceFields = {
92
92
  };
93
93
 
94
94
  declare const ac: {
95
- newRole<K extends "member" | "access" | "organization" | "invitation" | "team" | "ac">(statements: better_auth_plugins.Subset<K, {
95
+ newRole<K extends "organization" | "ac" | "member" | "access" | "invitation" | "team">(statements: better_auth_plugins.Subset<K, {
96
96
  access: string[];
97
97
  organization: readonly ["update", "delete"];
98
98
  member: readonly ["create", "update", "delete"];
@@ -166,7 +166,7 @@ type Role = typeof Roles[keyof typeof Roles];
166
166
  */
167
167
  declare const rolesAccessControl: {
168
168
  "org:admin": {
169
- authorize<K_1 extends "member" | "access" | "organization" | "invitation" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins.Subset<"member" | "access" | "organization" | "invitation" | "team", {
169
+ authorize<K_1 extends "organization" | "member" | "access" | "invitation" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins.Subset<"organization" | "member" | "access" | "invitation" | "team", {
170
170
  access: string[];
171
171
  organization: readonly ["update", "delete"];
172
172
  member: readonly ["create", "update", "delete"];
@@ -174,7 +174,7 @@ declare const rolesAccessControl: {
174
174
  team: readonly ["create", "update", "delete"];
175
175
  ac: readonly ["create", "read", "update", "delete"];
176
176
  }>[key] | {
177
- actions: better_auth_plugins.Subset<"member" | "access" | "organization" | "invitation" | "team", {
177
+ actions: better_auth_plugins.Subset<"organization" | "member" | "access" | "invitation" | "team", {
178
178
  access: string[];
179
179
  organization: readonly ["update", "delete"];
180
180
  member: readonly ["create", "update", "delete"];
@@ -184,7 +184,7 @@ declare const rolesAccessControl: {
184
184
  }>[key];
185
185
  connector: "OR" | "AND";
186
186
  } | undefined; } : never, connector?: "OR" | "AND"): better_auth_plugins.AuthorizeResponse;
187
- statements: better_auth_plugins.Subset<"member" | "access" | "organization" | "invitation" | "team", {
187
+ statements: better_auth_plugins.Subset<"organization" | "member" | "access" | "invitation" | "team", {
188
188
  access: string[];
189
189
  organization: readonly ["update", "delete"];
190
190
  member: readonly ["create", "update", "delete"];
@@ -2720,10 +2720,10 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2720
2720
  } & {
2721
2721
  preferredLanguage: string;
2722
2722
  } & {
2723
- lastActiveAt?: Date | null | undefined;
2724
2723
  displayName?: string | null | undefined;
2725
2724
  title?: string | null | undefined;
2726
2725
  pronouns?: string | null | undefined;
2726
+ lastActiveAt?: Date | null | undefined;
2727
2727
  }>;
2728
2728
  }, {
2729
2729
  code?: string | undefined;
@@ -2793,10 +2793,10 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2793
2793
  } & {
2794
2794
  preferredLanguage: string;
2795
2795
  } & {
2796
- lastActiveAt?: Date | null | undefined;
2797
2796
  displayName?: string | null | undefined;
2798
2797
  title?: string | null | undefined;
2799
2798
  pronouns?: string | null | undefined;
2799
+ lastActiveAt?: Date | null | undefined;
2800
2800
  }>;
2801
2801
  }) | (Omit<{
2802
2802
  token: string;
@@ -2829,10 +2829,10 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2829
2829
  } & {
2830
2830
  preferredLanguage: string;
2831
2831
  } & {
2832
- lastActiveAt?: Date | null | undefined;
2833
2832
  displayName?: string | null | undefined;
2834
2833
  title?: string | null | undefined;
2835
2834
  pronouns?: string | null | undefined;
2835
+ lastActiveAt?: Date | null | undefined;
2836
2836
  }>;
2837
2837
  }), {
2838
2838
  code?: string | undefined;
@@ -2887,10 +2887,10 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2887
2887
  } & {
2888
2888
  preferredLanguage: string;
2889
2889
  } & {
2890
- lastActiveAt?: Date | null | undefined;
2891
2890
  displayName?: string | null | undefined;
2892
2891
  title?: string | null | undefined;
2893
2892
  pronouns?: string | null | undefined;
2893
+ lastActiveAt?: Date | null | undefined;
2894
2894
  }>;
2895
2895
  }) | (Omit<{
2896
2896
  token: string;
@@ -2923,10 +2923,10 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2923
2923
  } & {
2924
2924
  preferredLanguage: string;
2925
2925
  } & {
2926
- lastActiveAt?: Date | null | undefined;
2927
2926
  displayName?: string | null | undefined;
2928
2927
  title?: string | null | undefined;
2929
2928
  pronouns?: string | null | undefined;
2929
+ lastActiveAt?: Date | null | undefined;
2930
2930
  }>;
2931
2931
  }), {
2932
2932
  code?: string | undefined;
@@ -3554,10 +3554,10 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
3554
3554
  } & {
3555
3555
  preferredLanguage: string;
3556
3556
  } & {
3557
- lastActiveAt?: Date | null | undefined;
3558
3557
  displayName?: string | null | undefined;
3559
3558
  title?: string | null | undefined;
3560
3559
  pronouns?: string | null | undefined;
3560
+ lastActiveAt?: Date | null | undefined;
3561
3561
  }>;
3562
3562
  }) | (Omit<{
3563
3563
  status: boolean;
@@ -3591,10 +3591,10 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
3591
3591
  } & {
3592
3592
  preferredLanguage: string;
3593
3593
  } & {
3594
- lastActiveAt?: Date | null | undefined;
3595
3594
  displayName?: string | null | undefined;
3596
3595
  title?: string | null | undefined;
3597
3596
  pronouns?: string | null | undefined;
3597
+ lastActiveAt?: Date | null | undefined;
3598
3598
  }>;
3599
3599
  }), {
3600
3600
  code?: string | undefined;
@@ -3646,10 +3646,10 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
3646
3646
  } & {
3647
3647
  preferredLanguage: string;
3648
3648
  } & {
3649
- lastActiveAt?: Date | null | undefined;
3650
3649
  displayName?: string | null | undefined;
3651
3650
  title?: string | null | undefined;
3652
3651
  pronouns?: string | null | undefined;
3652
+ lastActiveAt?: Date | null | undefined;
3653
3653
  }>;
3654
3654
  }, {
3655
3655
  code?: string | undefined;
@@ -3813,10 +3813,10 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
3813
3813
  } & {
3814
3814
  preferredLanguage: string;
3815
3815
  } & {
3816
- lastActiveAt?: Date | null | undefined;
3817
3816
  displayName?: string | null | undefined;
3818
3817
  title?: string | null | undefined;
3819
3818
  pronouns?: string | null | undefined;
3819
+ lastActiveAt?: Date | null | undefined;
3820
3820
  }>;
3821
3821
  }), {
3822
3822
  code?: string | undefined;
@@ -3850,11 +3850,11 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
3850
3850
  callbackURL?: string | undefined;
3851
3851
  fetchOptions?: FetchOptions | undefined;
3852
3852
  } & {} & {} & {} & {} & {} & {
3853
- lastActiveAt?: Date | null | undefined;
3854
3853
  displayName?: string | null | undefined;
3855
3854
  title?: string | null | undefined;
3856
3855
  pronouns?: string | null | undefined;
3857
3856
  preferredLanguage?: string | null | undefined;
3857
+ lastActiveAt?: Date | null | undefined;
3858
3858
  }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<(Omit<{
3859
3859
  token: null;
3860
3860
  user: {
@@ -3886,10 +3886,10 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
3886
3886
  } & {
3887
3887
  preferredLanguage: string;
3888
3888
  } & {
3889
- lastActiveAt?: Date | null | undefined;
3890
3889
  displayName?: string | null | undefined;
3891
3890
  title?: string | null | undefined;
3892
3891
  pronouns?: string | null | undefined;
3892
+ lastActiveAt?: Date | null | undefined;
3893
3893
  }>;
3894
3894
  }) | (Omit<{
3895
3895
  token: string;
@@ -3922,10 +3922,10 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
3922
3922
  } & {
3923
3923
  preferredLanguage: string;
3924
3924
  } & {
3925
- lastActiveAt?: Date | null | undefined;
3926
3925
  displayName?: string | null | undefined;
3927
3926
  title?: string | null | undefined;
3928
3927
  pronouns?: string | null | undefined;
3928
+ lastActiveAt?: Date | null | undefined;
3929
3929
  }>;
3930
3930
  }), {
3931
3931
  code?: string | undefined;
@@ -3979,10 +3979,10 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
3979
3979
  } & {
3980
3980
  preferredLanguage: string;
3981
3981
  } & {
3982
- lastActiveAt?: Date | null | undefined;
3983
3982
  displayName?: string | null | undefined;
3984
3983
  title?: string | null | undefined;
3985
3984
  pronouns?: string | null | undefined;
3985
+ lastActiveAt?: Date | null | undefined;
3986
3986
  }>;
3987
3987
  }, {
3988
3988
  code?: string | undefined;
@@ -4102,10 +4102,10 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
4102
4102
  } & {
4103
4103
  preferredLanguage: string;
4104
4104
  } & {
4105
- lastActiveAt?: Date | null | undefined;
4106
4105
  displayName?: string | null | undefined;
4107
4106
  title?: string | null | undefined;
4108
4107
  pronouns?: string | null | undefined;
4108
+ lastActiveAt?: Date | null | undefined;
4109
4109
  }>;
4110
4110
  }, {
4111
4111
  code?: string | undefined;
@@ -4138,11 +4138,11 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
4138
4138
  name?: string | undefined;
4139
4139
  fetchOptions?: FetchOptions | undefined;
4140
4140
  } & Partial<{} & {} & {} & {} & {} & {
4141
- lastActiveAt?: Date | null | undefined;
4142
4141
  displayName?: string | null | undefined;
4143
4142
  title?: string | null | undefined;
4144
4143
  pronouns?: string | null | undefined;
4145
4144
  preferredLanguage?: string | null | undefined;
4145
+ lastActiveAt?: Date | null | undefined;
4146
4146
  }>> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
4147
4147
  status: boolean;
4148
4148
  }, {
@@ -4428,10 +4428,10 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
4428
4428
  } & {
4429
4429
  preferredLanguage: string;
4430
4430
  } & {
4431
- lastActiveAt?: Date | null | undefined;
4432
4431
  displayName?: string | null | undefined;
4433
4432
  title?: string | null | undefined;
4434
4433
  pronouns?: string | null | undefined;
4434
+ lastActiveAt?: Date | null | undefined;
4435
4435
  }>;
4436
4436
  session: better_auth.StripEmptyObjects<{
4437
4437
  id: string;
@@ -4823,10 +4823,10 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
4823
4823
  } & {
4824
4824
  preferredLanguage: string;
4825
4825
  } & {
4826
- lastActiveAt?: Date | null | undefined;
4827
4826
  displayName?: string | null | undefined;
4828
4827
  title?: string | null | undefined;
4829
4828
  pronouns?: string | null | undefined;
4829
+ lastActiveAt?: Date | null | undefined;
4830
4830
  }>;
4831
4831
  session: better_auth.StripEmptyObjects<{
4832
4832
  id: string;
@@ -4943,10 +4943,10 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
4943
4943
  } & {
4944
4944
  preferredLanguage: string;
4945
4945
  } & {
4946
- lastActiveAt?: Date | null | undefined;
4947
4946
  displayName?: string | null | undefined;
4948
4947
  title?: string | null | undefined;
4949
4948
  pronouns?: string | null | undefined;
4949
+ lastActiveAt?: Date | null | undefined;
4950
4950
  }>;
4951
4951
  session: better_auth.StripEmptyObjects<{
4952
4952
  id: string;
@@ -6392,6 +6392,13 @@ type InviteAdminOrganizationUsersOptions = {
6392
6392
  /** Teams joined when each invitation is accepted. */
6393
6393
  teamIds?: string[];
6394
6394
  applicationId?: string;
6395
+ /**
6396
+ * When false, skips the invitation flow and adds each user as a member
6397
+ * immediately, creating the user account if it does not exist yet.
6398
+ * This mode is restricted to global administrators.
6399
+ * Defaults to true (send an invitation email).
6400
+ */
6401
+ sendInvite?: boolean;
6395
6402
  };
6396
6403
  /**
6397
6404
  * Per-email outcome of a batch organization invite.
@@ -6734,8 +6741,10 @@ declare class AdminService {
6734
6741
  */
6735
6742
  resendInvite(options: ResendAdminInviteOptions): Promise<void>;
6736
6743
  /**
6737
- * Invites several users to an organization in one call. Failures are
6738
- * isolated per email in the results payload.
6744
+ * Invites several users to an organization in one call, or — with
6745
+ * `sendInvite: false` — adds them as members immediately, creating user
6746
+ * accounts as needed. Failures are isolated per email in the results
6747
+ * payload.
6739
6748
  *
6740
6749
  * @param options - Organization, emails, role, and optional teams/application
6741
6750
  * @returns Per-email invite outcomes
@@ -7216,10 +7225,10 @@ declare class SessionService {
7216
7225
  } & {
7217
7226
  preferredLanguage: string;
7218
7227
  } & {
7219
- lastActiveAt?: Date | null | undefined;
7220
7228
  displayName?: string | null | undefined;
7221
7229
  title?: string | null | undefined;
7222
7230
  pronouns?: string | null | undefined;
7231
+ lastActiveAt?: Date | null | undefined;
7223
7232
  }>;
7224
7233
  session: better_auth.StripEmptyObjects<{
7225
7234
  id: string;
@@ -7457,10 +7466,10 @@ declare class EmailOTPService {
7457
7466
  } & {
7458
7467
  preferredLanguage: string;
7459
7468
  } & {
7460
- lastActiveAt?: Date | null | undefined;
7461
7469
  displayName?: string | null | undefined;
7462
7470
  title?: string | null | undefined;
7463
7471
  pronouns?: string | null | undefined;
7472
+ lastActiveAt?: Date | null | undefined;
7464
7473
  }>;
7465
7474
  }>;
7466
7475
  }
@@ -7510,10 +7519,10 @@ declare class UserService {
7510
7519
  } & {
7511
7520
  preferredLanguage: string;
7512
7521
  } & {
7513
- lastActiveAt?: Date | null | undefined;
7514
7522
  displayName?: string | null | undefined;
7515
7523
  title?: string | null | undefined;
7516
7524
  pronouns?: string | null | undefined;
7525
+ lastActiveAt?: Date | null | undefined;
7517
7526
  }>;
7518
7527
  }>;
7519
7528
  updateProfile(profile: UpdateUserProfilePayload): Promise<{
package/dist/index.d.ts CHANGED
@@ -92,7 +92,7 @@ type AssuranceFields = {
92
92
  };
93
93
 
94
94
  declare const ac: {
95
- newRole<K extends "member" | "access" | "organization" | "invitation" | "team" | "ac">(statements: better_auth_plugins.Subset<K, {
95
+ newRole<K extends "organization" | "ac" | "member" | "access" | "invitation" | "team">(statements: better_auth_plugins.Subset<K, {
96
96
  access: string[];
97
97
  organization: readonly ["update", "delete"];
98
98
  member: readonly ["create", "update", "delete"];
@@ -166,7 +166,7 @@ type Role = typeof Roles[keyof typeof Roles];
166
166
  */
167
167
  declare const rolesAccessControl: {
168
168
  "org:admin": {
169
- authorize<K_1 extends "member" | "access" | "organization" | "invitation" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins.Subset<"member" | "access" | "organization" | "invitation" | "team", {
169
+ authorize<K_1 extends "organization" | "member" | "access" | "invitation" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins.Subset<"organization" | "member" | "access" | "invitation" | "team", {
170
170
  access: string[];
171
171
  organization: readonly ["update", "delete"];
172
172
  member: readonly ["create", "update", "delete"];
@@ -174,7 +174,7 @@ declare const rolesAccessControl: {
174
174
  team: readonly ["create", "update", "delete"];
175
175
  ac: readonly ["create", "read", "update", "delete"];
176
176
  }>[key] | {
177
- actions: better_auth_plugins.Subset<"member" | "access" | "organization" | "invitation" | "team", {
177
+ actions: better_auth_plugins.Subset<"organization" | "member" | "access" | "invitation" | "team", {
178
178
  access: string[];
179
179
  organization: readonly ["update", "delete"];
180
180
  member: readonly ["create", "update", "delete"];
@@ -184,7 +184,7 @@ declare const rolesAccessControl: {
184
184
  }>[key];
185
185
  connector: "OR" | "AND";
186
186
  } | undefined; } : never, connector?: "OR" | "AND"): better_auth_plugins.AuthorizeResponse;
187
- statements: better_auth_plugins.Subset<"member" | "access" | "organization" | "invitation" | "team", {
187
+ statements: better_auth_plugins.Subset<"organization" | "member" | "access" | "invitation" | "team", {
188
188
  access: string[];
189
189
  organization: readonly ["update", "delete"];
190
190
  member: readonly ["create", "update", "delete"];
@@ -2720,10 +2720,10 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2720
2720
  } & {
2721
2721
  preferredLanguage: string;
2722
2722
  } & {
2723
- lastActiveAt?: Date | null | undefined;
2724
2723
  displayName?: string | null | undefined;
2725
2724
  title?: string | null | undefined;
2726
2725
  pronouns?: string | null | undefined;
2726
+ lastActiveAt?: Date | null | undefined;
2727
2727
  }>;
2728
2728
  }, {
2729
2729
  code?: string | undefined;
@@ -2793,10 +2793,10 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2793
2793
  } & {
2794
2794
  preferredLanguage: string;
2795
2795
  } & {
2796
- lastActiveAt?: Date | null | undefined;
2797
2796
  displayName?: string | null | undefined;
2798
2797
  title?: string | null | undefined;
2799
2798
  pronouns?: string | null | undefined;
2799
+ lastActiveAt?: Date | null | undefined;
2800
2800
  }>;
2801
2801
  }) | (Omit<{
2802
2802
  token: string;
@@ -2829,10 +2829,10 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2829
2829
  } & {
2830
2830
  preferredLanguage: string;
2831
2831
  } & {
2832
- lastActiveAt?: Date | null | undefined;
2833
2832
  displayName?: string | null | undefined;
2834
2833
  title?: string | null | undefined;
2835
2834
  pronouns?: string | null | undefined;
2835
+ lastActiveAt?: Date | null | undefined;
2836
2836
  }>;
2837
2837
  }), {
2838
2838
  code?: string | undefined;
@@ -2887,10 +2887,10 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2887
2887
  } & {
2888
2888
  preferredLanguage: string;
2889
2889
  } & {
2890
- lastActiveAt?: Date | null | undefined;
2891
2890
  displayName?: string | null | undefined;
2892
2891
  title?: string | null | undefined;
2893
2892
  pronouns?: string | null | undefined;
2893
+ lastActiveAt?: Date | null | undefined;
2894
2894
  }>;
2895
2895
  }) | (Omit<{
2896
2896
  token: string;
@@ -2923,10 +2923,10 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2923
2923
  } & {
2924
2924
  preferredLanguage: string;
2925
2925
  } & {
2926
- lastActiveAt?: Date | null | undefined;
2927
2926
  displayName?: string | null | undefined;
2928
2927
  title?: string | null | undefined;
2929
2928
  pronouns?: string | null | undefined;
2929
+ lastActiveAt?: Date | null | undefined;
2930
2930
  }>;
2931
2931
  }), {
2932
2932
  code?: string | undefined;
@@ -3554,10 +3554,10 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
3554
3554
  } & {
3555
3555
  preferredLanguage: string;
3556
3556
  } & {
3557
- lastActiveAt?: Date | null | undefined;
3558
3557
  displayName?: string | null | undefined;
3559
3558
  title?: string | null | undefined;
3560
3559
  pronouns?: string | null | undefined;
3560
+ lastActiveAt?: Date | null | undefined;
3561
3561
  }>;
3562
3562
  }) | (Omit<{
3563
3563
  status: boolean;
@@ -3591,10 +3591,10 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
3591
3591
  } & {
3592
3592
  preferredLanguage: string;
3593
3593
  } & {
3594
- lastActiveAt?: Date | null | undefined;
3595
3594
  displayName?: string | null | undefined;
3596
3595
  title?: string | null | undefined;
3597
3596
  pronouns?: string | null | undefined;
3597
+ lastActiveAt?: Date | null | undefined;
3598
3598
  }>;
3599
3599
  }), {
3600
3600
  code?: string | undefined;
@@ -3646,10 +3646,10 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
3646
3646
  } & {
3647
3647
  preferredLanguage: string;
3648
3648
  } & {
3649
- lastActiveAt?: Date | null | undefined;
3650
3649
  displayName?: string | null | undefined;
3651
3650
  title?: string | null | undefined;
3652
3651
  pronouns?: string | null | undefined;
3652
+ lastActiveAt?: Date | null | undefined;
3653
3653
  }>;
3654
3654
  }, {
3655
3655
  code?: string | undefined;
@@ -3813,10 +3813,10 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
3813
3813
  } & {
3814
3814
  preferredLanguage: string;
3815
3815
  } & {
3816
- lastActiveAt?: Date | null | undefined;
3817
3816
  displayName?: string | null | undefined;
3818
3817
  title?: string | null | undefined;
3819
3818
  pronouns?: string | null | undefined;
3819
+ lastActiveAt?: Date | null | undefined;
3820
3820
  }>;
3821
3821
  }), {
3822
3822
  code?: string | undefined;
@@ -3850,11 +3850,11 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
3850
3850
  callbackURL?: string | undefined;
3851
3851
  fetchOptions?: FetchOptions | undefined;
3852
3852
  } & {} & {} & {} & {} & {} & {
3853
- lastActiveAt?: Date | null | undefined;
3854
3853
  displayName?: string | null | undefined;
3855
3854
  title?: string | null | undefined;
3856
3855
  pronouns?: string | null | undefined;
3857
3856
  preferredLanguage?: string | null | undefined;
3857
+ lastActiveAt?: Date | null | undefined;
3858
3858
  }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<(Omit<{
3859
3859
  token: null;
3860
3860
  user: {
@@ -3886,10 +3886,10 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
3886
3886
  } & {
3887
3887
  preferredLanguage: string;
3888
3888
  } & {
3889
- lastActiveAt?: Date | null | undefined;
3890
3889
  displayName?: string | null | undefined;
3891
3890
  title?: string | null | undefined;
3892
3891
  pronouns?: string | null | undefined;
3892
+ lastActiveAt?: Date | null | undefined;
3893
3893
  }>;
3894
3894
  }) | (Omit<{
3895
3895
  token: string;
@@ -3922,10 +3922,10 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
3922
3922
  } & {
3923
3923
  preferredLanguage: string;
3924
3924
  } & {
3925
- lastActiveAt?: Date | null | undefined;
3926
3925
  displayName?: string | null | undefined;
3927
3926
  title?: string | null | undefined;
3928
3927
  pronouns?: string | null | undefined;
3928
+ lastActiveAt?: Date | null | undefined;
3929
3929
  }>;
3930
3930
  }), {
3931
3931
  code?: string | undefined;
@@ -3979,10 +3979,10 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
3979
3979
  } & {
3980
3980
  preferredLanguage: string;
3981
3981
  } & {
3982
- lastActiveAt?: Date | null | undefined;
3983
3982
  displayName?: string | null | undefined;
3984
3983
  title?: string | null | undefined;
3985
3984
  pronouns?: string | null | undefined;
3985
+ lastActiveAt?: Date | null | undefined;
3986
3986
  }>;
3987
3987
  }, {
3988
3988
  code?: string | undefined;
@@ -4102,10 +4102,10 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
4102
4102
  } & {
4103
4103
  preferredLanguage: string;
4104
4104
  } & {
4105
- lastActiveAt?: Date | null | undefined;
4106
4105
  displayName?: string | null | undefined;
4107
4106
  title?: string | null | undefined;
4108
4107
  pronouns?: string | null | undefined;
4108
+ lastActiveAt?: Date | null | undefined;
4109
4109
  }>;
4110
4110
  }, {
4111
4111
  code?: string | undefined;
@@ -4138,11 +4138,11 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
4138
4138
  name?: string | undefined;
4139
4139
  fetchOptions?: FetchOptions | undefined;
4140
4140
  } & Partial<{} & {} & {} & {} & {} & {
4141
- lastActiveAt?: Date | null | undefined;
4142
4141
  displayName?: string | null | undefined;
4143
4142
  title?: string | null | undefined;
4144
4143
  pronouns?: string | null | undefined;
4145
4144
  preferredLanguage?: string | null | undefined;
4145
+ lastActiveAt?: Date | null | undefined;
4146
4146
  }>> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
4147
4147
  status: boolean;
4148
4148
  }, {
@@ -4428,10 +4428,10 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
4428
4428
  } & {
4429
4429
  preferredLanguage: string;
4430
4430
  } & {
4431
- lastActiveAt?: Date | null | undefined;
4432
4431
  displayName?: string | null | undefined;
4433
4432
  title?: string | null | undefined;
4434
4433
  pronouns?: string | null | undefined;
4434
+ lastActiveAt?: Date | null | undefined;
4435
4435
  }>;
4436
4436
  session: better_auth.StripEmptyObjects<{
4437
4437
  id: string;
@@ -4823,10 +4823,10 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
4823
4823
  } & {
4824
4824
  preferredLanguage: string;
4825
4825
  } & {
4826
- lastActiveAt?: Date | null | undefined;
4827
4826
  displayName?: string | null | undefined;
4828
4827
  title?: string | null | undefined;
4829
4828
  pronouns?: string | null | undefined;
4829
+ lastActiveAt?: Date | null | undefined;
4830
4830
  }>;
4831
4831
  session: better_auth.StripEmptyObjects<{
4832
4832
  id: string;
@@ -4943,10 +4943,10 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
4943
4943
  } & {
4944
4944
  preferredLanguage: string;
4945
4945
  } & {
4946
- lastActiveAt?: Date | null | undefined;
4947
4946
  displayName?: string | null | undefined;
4948
4947
  title?: string | null | undefined;
4949
4948
  pronouns?: string | null | undefined;
4949
+ lastActiveAt?: Date | null | undefined;
4950
4950
  }>;
4951
4951
  session: better_auth.StripEmptyObjects<{
4952
4952
  id: string;
@@ -6392,6 +6392,13 @@ type InviteAdminOrganizationUsersOptions = {
6392
6392
  /** Teams joined when each invitation is accepted. */
6393
6393
  teamIds?: string[];
6394
6394
  applicationId?: string;
6395
+ /**
6396
+ * When false, skips the invitation flow and adds each user as a member
6397
+ * immediately, creating the user account if it does not exist yet.
6398
+ * This mode is restricted to global administrators.
6399
+ * Defaults to true (send an invitation email).
6400
+ */
6401
+ sendInvite?: boolean;
6395
6402
  };
6396
6403
  /**
6397
6404
  * Per-email outcome of a batch organization invite.
@@ -6734,8 +6741,10 @@ declare class AdminService {
6734
6741
  */
6735
6742
  resendInvite(options: ResendAdminInviteOptions): Promise<void>;
6736
6743
  /**
6737
- * Invites several users to an organization in one call. Failures are
6738
- * isolated per email in the results payload.
6744
+ * Invites several users to an organization in one call, or — with
6745
+ * `sendInvite: false` — adds them as members immediately, creating user
6746
+ * accounts as needed. Failures are isolated per email in the results
6747
+ * payload.
6739
6748
  *
6740
6749
  * @param options - Organization, emails, role, and optional teams/application
6741
6750
  * @returns Per-email invite outcomes
@@ -7216,10 +7225,10 @@ declare class SessionService {
7216
7225
  } & {
7217
7226
  preferredLanguage: string;
7218
7227
  } & {
7219
- lastActiveAt?: Date | null | undefined;
7220
7228
  displayName?: string | null | undefined;
7221
7229
  title?: string | null | undefined;
7222
7230
  pronouns?: string | null | undefined;
7231
+ lastActiveAt?: Date | null | undefined;
7223
7232
  }>;
7224
7233
  session: better_auth.StripEmptyObjects<{
7225
7234
  id: string;
@@ -7457,10 +7466,10 @@ declare class EmailOTPService {
7457
7466
  } & {
7458
7467
  preferredLanguage: string;
7459
7468
  } & {
7460
- lastActiveAt?: Date | null | undefined;
7461
7469
  displayName?: string | null | undefined;
7462
7470
  title?: string | null | undefined;
7463
7471
  pronouns?: string | null | undefined;
7472
+ lastActiveAt?: Date | null | undefined;
7464
7473
  }>;
7465
7474
  }>;
7466
7475
  }
@@ -7510,10 +7519,10 @@ declare class UserService {
7510
7519
  } & {
7511
7520
  preferredLanguage: string;
7512
7521
  } & {
7513
- lastActiveAt?: Date | null | undefined;
7514
7522
  displayName?: string | null | undefined;
7515
7523
  title?: string | null | undefined;
7516
7524
  pronouns?: string | null | undefined;
7525
+ lastActiveAt?: Date | null | undefined;
7517
7526
  }>;
7518
7527
  }>;
7519
7528
  updateProfile(profile: UpdateUserProfilePayload): Promise<{
package/dist/index.mjs CHANGED
@@ -21,7 +21,7 @@ function isTokenExpired(token, expiresInMs) {
21
21
  return nowInSeconds > expirationTime;
22
22
  }
23
23
 
24
- const version = "1.38.0";
24
+ const version = "1.39.0";
25
25
 
26
26
  function parsedEnumValues(schema) {
27
27
  return Object.fromEntries(
@@ -977,8 +977,10 @@ class AdminService {
977
977
  });
978
978
  }
979
979
  /**
980
- * Invites several users to an organization in one call. Failures are
981
- * isolated per email in the results payload.
980
+ * Invites several users to an organization in one call, or — with
981
+ * `sendInvite: false` — adds them as members immediately, creating user
982
+ * accounts as needed. Failures are isolated per email in the results
983
+ * payload.
982
984
  *
983
985
  * @param options - Organization, emails, role, and optional teams/application
984
986
  * @returns Per-email invite outcomes
@@ -986,7 +988,7 @@ class AdminService {
986
988
  async inviteOrganizationUsers(options) {
987
989
  const { data } = await this.client.$fetch("/admin/organizations/users", {
988
990
  method: "POST",
989
- body: { ...options, sendInvite: true }
991
+ body: { ...options, sendInvite: options.sendInvite ?? true }
990
992
  });
991
993
  return data;
992
994
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meistrari/auth-core",
3
- "version": "1.38.0",
3
+ "version": "1.39.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {