@meistrari/auth-nuxt 3.22.0 → 3.23.1
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/module.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AdminApplicationRecord, AdminApplicationEntitlementRecord, AdminOrganization, AdminOrganizationSummary, AdminOrganizationTeamRecord, AdminUserAccess, CreateAdminApplicationEntitlementOptions, CreateAdminApplicationOptions, CreateAdminOrganizationOptions, CreateAdminOrganizationTeamOptions, GetAdminOrganizationOptions, GetAdminOrganizationsSummaryOptions, InviteAdminOrganizationUsersOptions, InviteAdminOrganizationUsersResult, ListAdminApplicationsOptions, ListAdminApplicationsResult, ListAdminOrganizationMembersOptions, ListAdminOrganizationMembersResult, ListAdminOrganizationsOptions, ListAdminOrganizationsResult, ListAdminOrganizationTeamsOptions, ListAdminOrganizationTeamsResult, ListAdminUsersOptions, ListAdminUsersResult, AdminMember, RemoveAdminMemberOptions, ResendAdminInviteOptions, SetAdminUserApplicationRoleOptions, SetAdminUserTeamOptions, UpdateAdminMemberRoleOptions, UpdateAdminOrganizationOptions } from '@meistrari/auth-core';
|
|
1
|
+
import type { AdminApplicationRecord, AdminApplicationEntitlementRecord, AdminOrganization, AdminOrganizationSummary, AdminOrganizationTeamRecord, AdminUser, AdminUserAccess, CreateAdminApplicationEntitlementOptions, CreateAdminApplicationOptions, CreateAdminOrganizationOptions, CreateAdminOrganizationTeamOptions, GetAdminOrganizationOptions, GetAdminOrganizationsSummaryOptions, InviteAdminOrganizationUsersOptions, InviteAdminOrganizationUsersResult, ListAdminApplicationsOptions, ListAdminApplicationsResult, ListAdminOrganizationMembersOptions, ListAdminOrganizationMembersResult, ListAdminOrganizationsOptions, ListAdminOrganizationsResult, ListAdminOrganizationTeamsOptions, ListAdminOrganizationTeamsResult, ListAdminUsersOptions, ListAdminUsersResult, AdminMember, RemoveAdminMemberOptions, ResendAdminInviteOptions, SetAdminUserApplicationRoleOptions, SetAdminUserTeamOptions, UpdateAdminMemberRoleOptions, UpdateAdminOrganizationOptions } from '@meistrari/auth-core';
|
|
2
2
|
export interface UseTelaAdminReturn {
|
|
3
3
|
/**
|
|
4
4
|
* Lists users as a global admin, optionally with organization previews
|
|
@@ -7,6 +7,12 @@ export interface UseTelaAdminReturn {
|
|
|
7
7
|
* @returns The paginated user listing
|
|
8
8
|
*/
|
|
9
9
|
listUsers: (options?: ListAdminUsersOptions) => Promise<ListAdminUsersResult>;
|
|
10
|
+
/**
|
|
11
|
+
* Fetches a single user by ID as a global admin.
|
|
12
|
+
* @param userId - ID of the user to fetch
|
|
13
|
+
* @returns The user
|
|
14
|
+
*/
|
|
15
|
+
getUser: (userId: string) => Promise<AdminUser>;
|
|
10
16
|
/**
|
|
11
17
|
* Lists applications as a global admin, optionally filtered by organization.
|
|
12
18
|
* @param options - Pagination, ordering, organization filter, and search options
|
|
@@ -42,6 +42,9 @@ export function useTelaAdmin() {
|
|
|
42
42
|
async function listUsers(options) {
|
|
43
43
|
return await authClient.admin.listUsers(options);
|
|
44
44
|
}
|
|
45
|
+
async function getUser(userId) {
|
|
46
|
+
return await authClient.admin.getUser(userId);
|
|
47
|
+
}
|
|
45
48
|
async function listApplications(options) {
|
|
46
49
|
const token = useCookie(jwtCookieName).value;
|
|
47
50
|
const headers = new Headers({ Accept: "application/json" });
|
|
@@ -180,6 +183,7 @@ export function useTelaAdmin() {
|
|
|
180
183
|
}
|
|
181
184
|
return {
|
|
182
185
|
listUsers,
|
|
186
|
+
getUser,
|
|
183
187
|
listApplications,
|
|
184
188
|
createApplication,
|
|
185
189
|
updateApplication,
|
|
@@ -79,12 +79,12 @@ export interface UseTelaApplicationOrganizationReturn {
|
|
|
79
79
|
*
|
|
80
80
|
* For an application-scoped invitation, accepting **grants the user access to
|
|
81
81
|
* the associated application** (the Auth API writes an entitlement rule) and
|
|
82
|
-
* returns that application's `homeUrl`. For an invitation with no
|
|
83
|
-
*
|
|
84
|
-
* afterwards.
|
|
82
|
+
* returns that application's identity and `homeUrl`. For an invitation with no
|
|
83
|
+
* application, it returns the configured post-acceptance URL. The active
|
|
84
|
+
* organization's member list is refreshed afterwards.
|
|
85
85
|
*
|
|
86
86
|
* @param id - The invitation id to accept.
|
|
87
|
-
* @returns The accepted member and the
|
|
87
|
+
* @returns The accepted member and the invitation's post-acceptance context.
|
|
88
88
|
*/
|
|
89
89
|
acceptInvitation: (id: string) => Promise<AcceptInvitationResult>;
|
|
90
90
|
/**
|
|
@@ -46,8 +46,8 @@ export interface UseTelaOrganizationReturn {
|
|
|
46
46
|
/**
|
|
47
47
|
* Accepts an organization invitation and updates the active organization state.
|
|
48
48
|
* @param id - The invitation ID to accept
|
|
49
|
-
* @returns The accepted member
|
|
50
|
-
*
|
|
49
|
+
* @returns The accepted member, application context for app-scoped invitations,
|
|
50
|
+
* and the configured post-acceptance URL for plain organization invitations.
|
|
51
51
|
*/
|
|
52
52
|
acceptInvitation: (id: string) => Promise<AcceptInvitationResult>;
|
|
53
53
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meistrari/auth-nuxt",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.23.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"docs": "nuxt-module-build prepare && typedoc"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@meistrari/auth-core": "1.
|
|
39
|
+
"@meistrari/auth-core": "1.33.1",
|
|
40
40
|
"jose": "6.1.3"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|