@meistrari/auth-core 1.36.0 → 1.37.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 +48 -27
- package/dist/index.d.ts +48 -27
- package/dist/index.mjs +5 -9
- package/package.json +1 -1
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 "
|
|
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 "
|
|
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<"
|
|
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<"
|
|
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;
|
|
@@ -6733,6 +6733,25 @@ declare class AdminService {
|
|
|
6733
6733
|
} | null>;
|
|
6734
6734
|
}
|
|
6735
6735
|
|
|
6736
|
+
/**
|
|
6737
|
+
* Optional related data that can be included when listing organizations.
|
|
6738
|
+
*/
|
|
6739
|
+
type ListOrganizationsOptions = {
|
|
6740
|
+
/** Additional organization data to include in the response. */
|
|
6741
|
+
include?: readonly 'role'[];
|
|
6742
|
+
};
|
|
6743
|
+
/**
|
|
6744
|
+
* Organization list options that guarantee the current user's membership role.
|
|
6745
|
+
*/
|
|
6746
|
+
type ListOrganizationsWithRoleOptions = {
|
|
6747
|
+
include: readonly ['role', ...'role'[]];
|
|
6748
|
+
};
|
|
6749
|
+
/**
|
|
6750
|
+
* An organization with the current user's membership role.
|
|
6751
|
+
*/
|
|
6752
|
+
type OrganizationWithRole = ExtendedOrganization & {
|
|
6753
|
+
role: string;
|
|
6754
|
+
};
|
|
6736
6755
|
/**
|
|
6737
6756
|
* Result of accepting an organization invitation.
|
|
6738
6757
|
*/
|
|
@@ -6877,9 +6896,11 @@ declare class OrganizationService {
|
|
|
6877
6896
|
/**
|
|
6878
6897
|
* Lists all organizations accessible to the current user.
|
|
6879
6898
|
*
|
|
6899
|
+
* @param options - Optional related organization data to include
|
|
6880
6900
|
* @returns An array of organizations
|
|
6881
6901
|
*/
|
|
6882
|
-
listOrganizations(): Promise<
|
|
6902
|
+
listOrganizations(options: ListOrganizationsWithRoleOptions): Promise<OrganizationWithRole[]>;
|
|
6903
|
+
listOrganizations(options?: ListOrganizationsOptions): Promise<ExtendedOrganization[]>;
|
|
6883
6904
|
/**
|
|
6884
6905
|
* Sets the active organization for the current user session.
|
|
6885
6906
|
*
|
|
@@ -7174,10 +7195,10 @@ declare class SessionService {
|
|
|
7174
7195
|
} & {
|
|
7175
7196
|
preferredLanguage: string;
|
|
7176
7197
|
} & {
|
|
7177
|
-
lastActiveAt?: Date | null | undefined;
|
|
7178
7198
|
displayName?: string | null | undefined;
|
|
7179
7199
|
title?: string | null | undefined;
|
|
7180
7200
|
pronouns?: string | null | undefined;
|
|
7201
|
+
lastActiveAt?: Date | null | undefined;
|
|
7181
7202
|
}>;
|
|
7182
7203
|
session: better_auth.StripEmptyObjects<{
|
|
7183
7204
|
id: string;
|
|
@@ -7415,10 +7436,10 @@ declare class EmailOTPService {
|
|
|
7415
7436
|
} & {
|
|
7416
7437
|
preferredLanguage: string;
|
|
7417
7438
|
} & {
|
|
7418
|
-
lastActiveAt?: Date | null | undefined;
|
|
7419
7439
|
displayName?: string | null | undefined;
|
|
7420
7440
|
title?: string | null | undefined;
|
|
7421
7441
|
pronouns?: string | null | undefined;
|
|
7442
|
+
lastActiveAt?: Date | null | undefined;
|
|
7422
7443
|
}>;
|
|
7423
7444
|
}>;
|
|
7424
7445
|
}
|
|
@@ -7468,10 +7489,10 @@ declare class UserService {
|
|
|
7468
7489
|
} & {
|
|
7469
7490
|
preferredLanguage: string;
|
|
7470
7491
|
} & {
|
|
7471
|
-
lastActiveAt?: Date | null | undefined;
|
|
7472
7492
|
displayName?: string | null | undefined;
|
|
7473
7493
|
title?: string | null | undefined;
|
|
7474
7494
|
pronouns?: string | null | undefined;
|
|
7495
|
+
lastActiveAt?: Date | null | undefined;
|
|
7475
7496
|
}>;
|
|
7476
7497
|
}>;
|
|
7477
7498
|
updateProfile(profile: UpdateUserProfilePayload): Promise<{
|
|
@@ -7699,4 +7720,4 @@ declare function validateToken(token: string, apiUrl: string): Promise<boolean>;
|
|
|
7699
7720
|
declare function extractTokenPayload(token: string): DecodedJWTPayload;
|
|
7700
7721
|
|
|
7701
7722
|
export { AAL, AALBrand, AALs, ACR, ACRBrand, ACRs, AMR, AMRBrand, AMRs, ApiKeyMetadata, ApplicationConfig, ApplicationError, ApplicationSessionAssuranceConfig, ApplicationSessionAssuranceError, ApplicationTokenStorage, 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, STEP_UP_MAX_AGE_SECONDS, 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 };
|
|
7702
|
-
export type { APIClient, AcceptInvitationResult, AdminApplication, AdminApplicationEntitlement, AdminApplicationEntitlementRecord, AdminApplicationIdentity, AdminApplicationMember, AdminApplicationOrganization, AdminApplicationRecord, AdminApplicationRole, AdminApplicationSecret, AdminEntitlementRule, AdminEntitlementRuleType, AdminEntitlementWithRules, AdminMember, AdminOrganization, AdminOrganizationApplication, AdminOrganizationMember, AdminOrganizationMemberApplication, AdminOrganizationMemberRecord, AdminOrganizationMemberTeam, AdminOrganizationSummary, AdminOrganizationTeam, AdminOrganizationTeamRecord, AdminUser, AdminUserAccess, AdminUserAccessApplication, AdminUserAccessOrganization, AdminUserAccessTeam, AdminUserInvitation, AdminUserOrganization, ApiKey, ApiKeyWithoutSecret, Application, ApplicationAuthContextResponse, ApplicationTokenStorageOptions, AssuranceFields, BaseOrganization, BeginOAuthStepUpParams, BillingMode, ClientCredentialsGrant, ClientCredentialsTokenResponse, CompleteAuthorizationFlowResponse, CreateAdminApplicationEntitlementOptions, CreateAdminApplicationOptions, CreateAdminApplicationRoleOptions, CreateAdminApplicationSecretOptions, CreateAdminOrganizationOptions, CreateAdminOrganizationTeamOptions, CreateApiKeyPayload, CreateTeamPayload, CreatedAdminApplicationSecret, DecodedJWTPayload, DeviceAuthorizationActionResponse, DeviceAuthorizationContextResponse, DeviceAuthorizationResponse, DeviceContextApplication, EmailOTPSignInOptions, FullOrganization, GetAdminOrganizationOptions, GetAdminOrganizationsSummaryOptions, GetTokenOptions, Invitation, InviteAdminOrganizationUsersOptions, InviteAdminOrganizationUsersResult, InviteUserToOrganizationOptions, JWTPayloadData, ListAdminApplicationsOptions, ListAdminApplicationsResult, ListAdminOrganizationMembersOptions, ListAdminOrganizationMembersResult, ListAdminOrganizationTeamsOptions, ListAdminOrganizationTeamsResult, ListAdminOrganizationsOptions, ListAdminOrganizationsResult, ListAdminUsersOptions, ListAdminUsersResult, ListCandidateOrganizationsResponse, ListMembersOptions, Member, ExtendedOrganization as Organization, OrganizationSettings, RemoveAdminMemberOptions, RemoveUserFromOrganizationOptions, ResendAdminInviteOptions, Role, SendVerificationOTPOptions, Session, SessionAssuranceActions, SessionData, SetAdminEntitlementRulesOptions, SetAdminUserApplicationRoleOptions, SetAdminUserTeamOptions, SignInWithEmailAndPasswordOptions, SignInWithSamlOptions, SocialSignInOptions, StartAuthorizationFlowResponse, Strict, Team, TeamMember, UpdateAdminApplicationRoleOptions, UpdateAdminEntitlementOptions, UpdateAdminMemberRoleOptions, UpdateAdminOrganizationOptions, UpdateApiKeyPayload, UpdateMemberRoleOptions, UpdateOrganizationPayload, UpdateTeamPayload, User, UserProfile, WhoAmIInclude, WhoAmIOptions, WhoAmIOrganization, WhoAmIResponse };
|
|
7723
|
+
export type { APIClient, AcceptInvitationResult, AdminApplication, AdminApplicationEntitlement, AdminApplicationEntitlementRecord, AdminApplicationIdentity, AdminApplicationMember, AdminApplicationOrganization, AdminApplicationRecord, AdminApplicationRole, AdminApplicationSecret, AdminEntitlementRule, AdminEntitlementRuleType, AdminEntitlementWithRules, AdminMember, AdminOrganization, AdminOrganizationApplication, AdminOrganizationMember, AdminOrganizationMemberApplication, AdminOrganizationMemberRecord, AdminOrganizationMemberTeam, AdminOrganizationSummary, AdminOrganizationTeam, AdminOrganizationTeamRecord, AdminUser, AdminUserAccess, AdminUserAccessApplication, AdminUserAccessOrganization, AdminUserAccessTeam, AdminUserInvitation, AdminUserOrganization, ApiKey, ApiKeyWithoutSecret, Application, ApplicationAuthContextResponse, ApplicationTokenStorageOptions, AssuranceFields, BaseOrganization, BeginOAuthStepUpParams, BillingMode, ClientCredentialsGrant, ClientCredentialsTokenResponse, CompleteAuthorizationFlowResponse, CreateAdminApplicationEntitlementOptions, CreateAdminApplicationOptions, CreateAdminApplicationRoleOptions, CreateAdminApplicationSecretOptions, CreateAdminOrganizationOptions, CreateAdminOrganizationTeamOptions, CreateApiKeyPayload, CreateTeamPayload, CreatedAdminApplicationSecret, DecodedJWTPayload, DeviceAuthorizationActionResponse, DeviceAuthorizationContextResponse, DeviceAuthorizationResponse, DeviceContextApplication, EmailOTPSignInOptions, FullOrganization, GetAdminOrganizationOptions, GetAdminOrganizationsSummaryOptions, GetTokenOptions, Invitation, InviteAdminOrganizationUsersOptions, InviteAdminOrganizationUsersResult, InviteUserToOrganizationOptions, JWTPayloadData, ListAdminApplicationsOptions, ListAdminApplicationsResult, ListAdminOrganizationMembersOptions, ListAdminOrganizationMembersResult, ListAdminOrganizationTeamsOptions, ListAdminOrganizationTeamsResult, ListAdminOrganizationsOptions, ListAdminOrganizationsResult, ListAdminUsersOptions, ListAdminUsersResult, ListCandidateOrganizationsResponse, ListMembersOptions, ListOrganizationsOptions, ListOrganizationsWithRoleOptions, Member, ExtendedOrganization as Organization, OrganizationSettings, OrganizationWithRole, RemoveAdminMemberOptions, RemoveUserFromOrganizationOptions, ResendAdminInviteOptions, Role, SendVerificationOTPOptions, Session, SessionAssuranceActions, SessionData, SetAdminEntitlementRulesOptions, SetAdminUserApplicationRoleOptions, SetAdminUserTeamOptions, SignInWithEmailAndPasswordOptions, SignInWithSamlOptions, SocialSignInOptions, StartAuthorizationFlowResponse, Strict, Team, TeamMember, UpdateAdminApplicationRoleOptions, UpdateAdminEntitlementOptions, UpdateAdminMemberRoleOptions, UpdateAdminOrganizationOptions, UpdateApiKeyPayload, UpdateMemberRoleOptions, UpdateOrganizationPayload, UpdateTeamPayload, User, UserProfile, WhoAmIInclude, WhoAmIOptions, WhoAmIOrganization, WhoAmIResponse };
|
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 "
|
|
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 "
|
|
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<"
|
|
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<"
|
|
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;
|
|
@@ -6733,6 +6733,25 @@ declare class AdminService {
|
|
|
6733
6733
|
} | null>;
|
|
6734
6734
|
}
|
|
6735
6735
|
|
|
6736
|
+
/**
|
|
6737
|
+
* Optional related data that can be included when listing organizations.
|
|
6738
|
+
*/
|
|
6739
|
+
type ListOrganizationsOptions = {
|
|
6740
|
+
/** Additional organization data to include in the response. */
|
|
6741
|
+
include?: readonly 'role'[];
|
|
6742
|
+
};
|
|
6743
|
+
/**
|
|
6744
|
+
* Organization list options that guarantee the current user's membership role.
|
|
6745
|
+
*/
|
|
6746
|
+
type ListOrganizationsWithRoleOptions = {
|
|
6747
|
+
include: readonly ['role', ...'role'[]];
|
|
6748
|
+
};
|
|
6749
|
+
/**
|
|
6750
|
+
* An organization with the current user's membership role.
|
|
6751
|
+
*/
|
|
6752
|
+
type OrganizationWithRole = ExtendedOrganization & {
|
|
6753
|
+
role: string;
|
|
6754
|
+
};
|
|
6736
6755
|
/**
|
|
6737
6756
|
* Result of accepting an organization invitation.
|
|
6738
6757
|
*/
|
|
@@ -6877,9 +6896,11 @@ declare class OrganizationService {
|
|
|
6877
6896
|
/**
|
|
6878
6897
|
* Lists all organizations accessible to the current user.
|
|
6879
6898
|
*
|
|
6899
|
+
* @param options - Optional related organization data to include
|
|
6880
6900
|
* @returns An array of organizations
|
|
6881
6901
|
*/
|
|
6882
|
-
listOrganizations(): Promise<
|
|
6902
|
+
listOrganizations(options: ListOrganizationsWithRoleOptions): Promise<OrganizationWithRole[]>;
|
|
6903
|
+
listOrganizations(options?: ListOrganizationsOptions): Promise<ExtendedOrganization[]>;
|
|
6883
6904
|
/**
|
|
6884
6905
|
* Sets the active organization for the current user session.
|
|
6885
6906
|
*
|
|
@@ -7174,10 +7195,10 @@ declare class SessionService {
|
|
|
7174
7195
|
} & {
|
|
7175
7196
|
preferredLanguage: string;
|
|
7176
7197
|
} & {
|
|
7177
|
-
lastActiveAt?: Date | null | undefined;
|
|
7178
7198
|
displayName?: string | null | undefined;
|
|
7179
7199
|
title?: string | null | undefined;
|
|
7180
7200
|
pronouns?: string | null | undefined;
|
|
7201
|
+
lastActiveAt?: Date | null | undefined;
|
|
7181
7202
|
}>;
|
|
7182
7203
|
session: better_auth.StripEmptyObjects<{
|
|
7183
7204
|
id: string;
|
|
@@ -7415,10 +7436,10 @@ declare class EmailOTPService {
|
|
|
7415
7436
|
} & {
|
|
7416
7437
|
preferredLanguage: string;
|
|
7417
7438
|
} & {
|
|
7418
|
-
lastActiveAt?: Date | null | undefined;
|
|
7419
7439
|
displayName?: string | null | undefined;
|
|
7420
7440
|
title?: string | null | undefined;
|
|
7421
7441
|
pronouns?: string | null | undefined;
|
|
7442
|
+
lastActiveAt?: Date | null | undefined;
|
|
7422
7443
|
}>;
|
|
7423
7444
|
}>;
|
|
7424
7445
|
}
|
|
@@ -7468,10 +7489,10 @@ declare class UserService {
|
|
|
7468
7489
|
} & {
|
|
7469
7490
|
preferredLanguage: string;
|
|
7470
7491
|
} & {
|
|
7471
|
-
lastActiveAt?: Date | null | undefined;
|
|
7472
7492
|
displayName?: string | null | undefined;
|
|
7473
7493
|
title?: string | null | undefined;
|
|
7474
7494
|
pronouns?: string | null | undefined;
|
|
7495
|
+
lastActiveAt?: Date | null | undefined;
|
|
7475
7496
|
}>;
|
|
7476
7497
|
}>;
|
|
7477
7498
|
updateProfile(profile: UpdateUserProfilePayload): Promise<{
|
|
@@ -7699,4 +7720,4 @@ declare function validateToken(token: string, apiUrl: string): Promise<boolean>;
|
|
|
7699
7720
|
declare function extractTokenPayload(token: string): DecodedJWTPayload;
|
|
7700
7721
|
|
|
7701
7722
|
export { AAL, AALBrand, AALs, ACR, ACRBrand, ACRs, AMR, AMRBrand, AMRs, ApiKeyMetadata, ApplicationConfig, ApplicationError, ApplicationSessionAssuranceConfig, ApplicationSessionAssuranceError, ApplicationTokenStorage, 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, STEP_UP_MAX_AGE_SECONDS, 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 };
|
|
7702
|
-
export type { APIClient, AcceptInvitationResult, AdminApplication, AdminApplicationEntitlement, AdminApplicationEntitlementRecord, AdminApplicationIdentity, AdminApplicationMember, AdminApplicationOrganization, AdminApplicationRecord, AdminApplicationRole, AdminApplicationSecret, AdminEntitlementRule, AdminEntitlementRuleType, AdminEntitlementWithRules, AdminMember, AdminOrganization, AdminOrganizationApplication, AdminOrganizationMember, AdminOrganizationMemberApplication, AdminOrganizationMemberRecord, AdminOrganizationMemberTeam, AdminOrganizationSummary, AdminOrganizationTeam, AdminOrganizationTeamRecord, AdminUser, AdminUserAccess, AdminUserAccessApplication, AdminUserAccessOrganization, AdminUserAccessTeam, AdminUserInvitation, AdminUserOrganization, ApiKey, ApiKeyWithoutSecret, Application, ApplicationAuthContextResponse, ApplicationTokenStorageOptions, AssuranceFields, BaseOrganization, BeginOAuthStepUpParams, BillingMode, ClientCredentialsGrant, ClientCredentialsTokenResponse, CompleteAuthorizationFlowResponse, CreateAdminApplicationEntitlementOptions, CreateAdminApplicationOptions, CreateAdminApplicationRoleOptions, CreateAdminApplicationSecretOptions, CreateAdminOrganizationOptions, CreateAdminOrganizationTeamOptions, CreateApiKeyPayload, CreateTeamPayload, CreatedAdminApplicationSecret, DecodedJWTPayload, DeviceAuthorizationActionResponse, DeviceAuthorizationContextResponse, DeviceAuthorizationResponse, DeviceContextApplication, EmailOTPSignInOptions, FullOrganization, GetAdminOrganizationOptions, GetAdminOrganizationsSummaryOptions, GetTokenOptions, Invitation, InviteAdminOrganizationUsersOptions, InviteAdminOrganizationUsersResult, InviteUserToOrganizationOptions, JWTPayloadData, ListAdminApplicationsOptions, ListAdminApplicationsResult, ListAdminOrganizationMembersOptions, ListAdminOrganizationMembersResult, ListAdminOrganizationTeamsOptions, ListAdminOrganizationTeamsResult, ListAdminOrganizationsOptions, ListAdminOrganizationsResult, ListAdminUsersOptions, ListAdminUsersResult, ListCandidateOrganizationsResponse, ListMembersOptions, Member, ExtendedOrganization as Organization, OrganizationSettings, RemoveAdminMemberOptions, RemoveUserFromOrganizationOptions, ResendAdminInviteOptions, Role, SendVerificationOTPOptions, Session, SessionAssuranceActions, SessionData, SetAdminEntitlementRulesOptions, SetAdminUserApplicationRoleOptions, SetAdminUserTeamOptions, SignInWithEmailAndPasswordOptions, SignInWithSamlOptions, SocialSignInOptions, StartAuthorizationFlowResponse, Strict, Team, TeamMember, UpdateAdminApplicationRoleOptions, UpdateAdminEntitlementOptions, UpdateAdminMemberRoleOptions, UpdateAdminOrganizationOptions, UpdateApiKeyPayload, UpdateMemberRoleOptions, UpdateOrganizationPayload, UpdateTeamPayload, User, UserProfile, WhoAmIInclude, WhoAmIOptions, WhoAmIOrganization, WhoAmIResponse };
|
|
7723
|
+
export type { APIClient, AcceptInvitationResult, AdminApplication, AdminApplicationEntitlement, AdminApplicationEntitlementRecord, AdminApplicationIdentity, AdminApplicationMember, AdminApplicationOrganization, AdminApplicationRecord, AdminApplicationRole, AdminApplicationSecret, AdminEntitlementRule, AdminEntitlementRuleType, AdminEntitlementWithRules, AdminMember, AdminOrganization, AdminOrganizationApplication, AdminOrganizationMember, AdminOrganizationMemberApplication, AdminOrganizationMemberRecord, AdminOrganizationMemberTeam, AdminOrganizationSummary, AdminOrganizationTeam, AdminOrganizationTeamRecord, AdminUser, AdminUserAccess, AdminUserAccessApplication, AdminUserAccessOrganization, AdminUserAccessTeam, AdminUserInvitation, AdminUserOrganization, ApiKey, ApiKeyWithoutSecret, Application, ApplicationAuthContextResponse, ApplicationTokenStorageOptions, AssuranceFields, BaseOrganization, BeginOAuthStepUpParams, BillingMode, ClientCredentialsGrant, ClientCredentialsTokenResponse, CompleteAuthorizationFlowResponse, CreateAdminApplicationEntitlementOptions, CreateAdminApplicationOptions, CreateAdminApplicationRoleOptions, CreateAdminApplicationSecretOptions, CreateAdminOrganizationOptions, CreateAdminOrganizationTeamOptions, CreateApiKeyPayload, CreateTeamPayload, CreatedAdminApplicationSecret, DecodedJWTPayload, DeviceAuthorizationActionResponse, DeviceAuthorizationContextResponse, DeviceAuthorizationResponse, DeviceContextApplication, EmailOTPSignInOptions, FullOrganization, GetAdminOrganizationOptions, GetAdminOrganizationsSummaryOptions, GetTokenOptions, Invitation, InviteAdminOrganizationUsersOptions, InviteAdminOrganizationUsersResult, InviteUserToOrganizationOptions, JWTPayloadData, ListAdminApplicationsOptions, ListAdminApplicationsResult, ListAdminOrganizationMembersOptions, ListAdminOrganizationMembersResult, ListAdminOrganizationTeamsOptions, ListAdminOrganizationTeamsResult, ListAdminOrganizationsOptions, ListAdminOrganizationsResult, ListAdminUsersOptions, ListAdminUsersResult, ListCandidateOrganizationsResponse, ListMembersOptions, ListOrganizationsOptions, ListOrganizationsWithRoleOptions, Member, ExtendedOrganization as Organization, OrganizationSettings, OrganizationWithRole, RemoveAdminMemberOptions, RemoveUserFromOrganizationOptions, ResendAdminInviteOptions, Role, SendVerificationOTPOptions, Session, SessionAssuranceActions, SessionData, SetAdminEntitlementRulesOptions, SetAdminUserApplicationRoleOptions, SetAdminUserTeamOptions, SignInWithEmailAndPasswordOptions, SignInWithSamlOptions, SocialSignInOptions, StartAuthorizationFlowResponse, Strict, Team, TeamMember, UpdateAdminApplicationRoleOptions, UpdateAdminEntitlementOptions, UpdateAdminMemberRoleOptions, UpdateAdminOrganizationOptions, UpdateApiKeyPayload, UpdateMemberRoleOptions, UpdateOrganizationPayload, UpdateTeamPayload, User, UserProfile, WhoAmIInclude, WhoAmIOptions, WhoAmIOrganization, WhoAmIResponse };
|
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.
|
|
24
|
+
const version = "1.37.0";
|
|
25
25
|
|
|
26
26
|
function parsedEnumValues(schema) {
|
|
27
27
|
return Object.fromEntries(
|
|
@@ -1572,14 +1572,10 @@ class OrganizationService {
|
|
|
1572
1572
|
});
|
|
1573
1573
|
return organization;
|
|
1574
1574
|
}
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
*/
|
|
1580
|
-
async listOrganizations() {
|
|
1581
|
-
const organizations = await this.client.organization.list();
|
|
1582
|
-
return organizations;
|
|
1575
|
+
async listOrganizations(options = {}) {
|
|
1576
|
+
return await this.client.organization.list({
|
|
1577
|
+
query: options.include?.length ? { include: options.include.join(",") } : void 0
|
|
1578
|
+
});
|
|
1583
1579
|
}
|
|
1584
1580
|
/**
|
|
1585
1581
|
* Sets the active organization for the current user session.
|