@nest-boot/auth 8.0.9-beta.1 → 8.0.9-beta.3
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/adapters/mikro-orm/adapter-config.d.ts +5 -0
- package/dist/adapters/mikro-orm/adapter-config.js +5 -0
- package/dist/adapters/mikro-orm/adapter-config.js.map +1 -1
- package/dist/adapters/mikro-orm/create-custom-adapter.d.ts +9 -0
- package/dist/adapters/mikro-orm/create-custom-adapter.js +9 -0
- package/dist/adapters/mikro-orm/create-custom-adapter.js.map +1 -1
- package/dist/adapters/mikro-orm/entity-metadata-resolver.d.ts +7 -0
- package/dist/adapters/mikro-orm/entity-metadata-resolver.js +7 -0
- package/dist/adapters/mikro-orm/entity-metadata-resolver.js.map +1 -1
- package/dist/adapters/mikro-orm/where-compiler.d.ts +7 -0
- package/dist/adapters/mikro-orm/where-compiler.js +11 -0
- package/dist/adapters/mikro-orm/where-compiler.js.map +1 -1
- package/dist/api-key-usage.interceptor.d.ts +10 -2
- package/dist/api-key-usage.interceptor.js +10 -2
- package/dist/api-key-usage.interceptor.js.map +1 -1
- package/dist/auth-handler.middleware.d.ts +14 -3
- package/dist/auth-handler.middleware.js +14 -3
- package/dist/auth-handler.middleware.js.map +1 -1
- package/dist/auth.ability.d.ts +11 -2
- package/dist/auth.ability.js +11 -2
- package/dist/auth.ability.js.map +1 -1
- package/dist/auth.constants.d.ts +4 -1
- package/dist/auth.constants.js +4 -1
- package/dist/auth.constants.js.map +1 -1
- package/dist/auth.guard.d.ts +0 -4
- package/dist/auth.guard.js +0 -4
- package/dist/auth.guard.js.map +1 -1
- package/dist/auth.middleware.d.ts +24 -4
- package/dist/auth.middleware.js +24 -4
- package/dist/auth.middleware.js.map +1 -1
- package/dist/auth.module.d.ts +0 -1
- package/dist/auth.module.js +0 -1
- package/dist/auth.module.js.map +1 -1
- package/dist/decorators/can.decorator.d.ts +6 -1
- package/dist/decorators/can.decorator.js +6 -1
- package/dist/decorators/can.decorator.js.map +1 -1
- package/dist/decorators/public.decorator.d.ts +5 -1
- package/dist/decorators/public.decorator.js +5 -1
- package/dist/decorators/public.decorator.js.map +1 -1
- package/dist/entities/account.entity.d.ts +4 -1
- package/dist/entities/account.entity.js +4 -1
- package/dist/entities/account.entity.js.map +1 -1
- package/dist/entities/invitation.entity.d.ts +4 -1
- package/dist/entities/invitation.entity.js +4 -1
- package/dist/entities/invitation.entity.js.map +1 -1
- package/dist/entities/member-api-key.entity.d.ts +8 -2
- package/dist/entities/member-api-key.entity.js +8 -2
- package/dist/entities/member-api-key.entity.js.map +1 -1
- package/dist/entities/member.entity.d.ts +4 -1
- package/dist/entities/member.entity.js +4 -1
- package/dist/entities/member.entity.js.map +1 -1
- package/dist/features/invitations/invitation.resolver.d.ts +43 -8
- package/dist/features/invitations/invitation.resolver.js +43 -8
- package/dist/features/invitations/invitation.resolver.js.map +1 -1
- package/dist/features/invitations/invitation.service.d.ts +75 -12
- package/dist/features/invitations/invitation.service.js +75 -12
- package/dist/features/invitations/invitation.service.js.map +1 -1
- package/dist/infrastructure/api-key-authentication.service.d.ts +20 -4
- package/dist/infrastructure/api-key-authentication.service.js +20 -4
- package/dist/infrastructure/api-key-authentication.service.js.map +1 -1
- package/dist/infrastructure/api-key-lifecycle.d.ts +31 -5
- package/dist/infrastructure/api-key-lifecycle.js +31 -5
- package/dist/infrastructure/api-key-lifecycle.js.map +1 -1
- package/dist/infrastructure/auth-ability.factory.d.ts +14 -3
- package/dist/infrastructure/auth-ability.factory.js +14 -3
- package/dist/infrastructure/auth-ability.factory.js.map +1 -1
- package/dist/infrastructure/auth-enum-registry.d.ts +4 -1
- package/dist/infrastructure/auth-enum-registry.js +4 -1
- package/dist/infrastructure/auth-enum-registry.js.map +1 -1
- package/dist/infrastructure/auth-service.providers.d.ts +4 -1
- package/dist/infrastructure/auth-service.providers.js +4 -1
- package/dist/infrastructure/auth-service.providers.js.map +1 -1
- package/dist/infrastructure/better-auth-adapter.d.ts +6 -1
- package/dist/infrastructure/better-auth-adapter.js +2 -0
- package/dist/infrastructure/better-auth-adapter.js.map +1 -1
- package/dist/infrastructure/create-auth-instance.d.ts +20 -2
- package/dist/infrastructure/create-auth-instance.js +29 -2
- package/dist/infrastructure/create-auth-instance.js.map +1 -1
- package/dist/infrastructure/create-contextual-auth-service.d.ts +4 -0
- package/dist/infrastructure/create-contextual-auth-service.js +4 -0
- package/dist/infrastructure/create-contextual-auth-service.js.map +1 -1
- package/dist/infrastructure/request-identity.d.ts +88 -19
- package/dist/infrastructure/request-identity.js +88 -19
- package/dist/infrastructure/request-identity.js.map +1 -1
- package/dist/infrastructure/revoked-authentication.exception.d.ts +4 -1
- package/dist/infrastructure/revoked-authentication.exception.js +4 -1
- package/dist/infrastructure/revoked-authentication.exception.js.map +1 -1
- package/dist/interfaces/request-identity-patch.interface.d.ts +4 -1
- package/dist/interfaces/request-permissions.interface.d.ts +4 -1
- package/dist/policies/create-scope-policy.d.ts +7 -1
- package/dist/policies/create-scope-policy.js +7 -1
- package/dist/policies/create-scope-policy.js.map +1 -1
- package/dist/policies/user-scope.policy.d.ts +2 -0
- package/dist/policies/user-scope.policy.js +2 -0
- package/dist/policies/user-scope.policy.js.map +1 -1
- package/dist/policies/workspace-scope.policy.d.ts +2 -0
- package/dist/policies/workspace-scope.policy.js +2 -0
- package/dist/policies/workspace-scope.policy.js.map +1 -1
- package/dist/resolvers/auth.resolver.d.ts +85 -18
- package/dist/resolvers/auth.resolver.js +90 -18
- package/dist/resolvers/auth.resolver.js.map +1 -1
- package/dist/resolvers/member-api-key.resolver.d.ts +26 -5
- package/dist/resolvers/member-api-key.resolver.js +26 -5
- package/dist/resolvers/member-api-key.resolver.js.map +1 -1
- package/dist/resolvers/member.resolver.d.ts +26 -11
- package/dist/resolvers/member.resolver.js +26 -11
- package/dist/resolvers/member.resolver.js.map +1 -1
- package/dist/resolvers/session.resolver.d.ts +59 -12
- package/dist/resolvers/session.resolver.js +59 -12
- package/dist/resolvers/session.resolver.js.map +1 -1
- package/dist/resolvers/user-api-key.resolver.d.ts +26 -5
- package/dist/resolvers/user-api-key.resolver.js +26 -5
- package/dist/resolvers/user-api-key.resolver.js.map +1 -1
- package/dist/resolvers/user.resolver.d.ts +114 -19
- package/dist/resolvers/user.resolver.js +114 -19
- package/dist/resolvers/user.resolver.js.map +1 -1
- package/dist/resolvers/workspace.resolver.d.ts +33 -11
- package/dist/resolvers/workspace.resolver.js +33 -11
- package/dist/resolvers/workspace.resolver.js.map +1 -1
- package/dist/services/account.service.d.ts +11 -2
- package/dist/services/account.service.js +11 -2
- package/dist/services/account.service.js.map +1 -1
- package/dist/services/auth.service.d.ts +132 -27
- package/dist/services/auth.service.js +132 -27
- package/dist/services/auth.service.js.map +1 -1
- package/dist/services/member-api-key.service.d.ts +40 -7
- package/dist/services/member-api-key.service.js +40 -7
- package/dist/services/member-api-key.service.js.map +1 -1
- package/dist/services/member.service.d.ts +108 -19
- package/dist/services/member.service.js +108 -19
- package/dist/services/member.service.js.map +1 -1
- package/dist/services/session.service.d.ts +37 -10
- package/dist/services/session.service.js +69 -10
- package/dist/services/session.service.js.map +1 -1
- package/dist/services/user-api-key.service.d.ts +40 -7
- package/dist/services/user-api-key.service.js +40 -7
- package/dist/services/user-api-key.service.js.map +1 -1
- package/dist/services/user-deletion.service.d.ts +7 -1
- package/dist/services/user-deletion.service.js +7 -1
- package/dist/services/user-deletion.service.js.map +1 -1
- package/dist/services/user.service.d.ts +109 -20
- package/dist/services/user.service.js +109 -20
- package/dist/services/user.service.js.map +1 -1
- package/dist/services/workspace.service.d.ts +50 -9
- package/dist/services/workspace.service.js +50 -9
- package/dist/services/workspace.service.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/lowercase-identifier.type.d.ts +4 -1
- package/dist/utils/api-key-credential.util.d.ts +12 -2
- package/dist/utils/api-key-credential.util.js +12 -2
- package/dist/utils/api-key-credential.util.js.map +1 -1
- package/dist/utils/api-key-permissions.util.d.ts +14 -2
- package/dist/utils/api-key-permissions.util.js +14 -2
- package/dist/utils/api-key-permissions.util.js.map +1 -1
- package/dist/utils/append-metadata.util.d.ts +6 -1
- package/dist/utils/append-metadata.util.js +6 -1
- package/dist/utils/append-metadata.util.js.map +1 -1
- package/dist/utils/apply-auth-response-cookies.util.d.ts +4 -1
- package/dist/utils/apply-auth-response-cookies.util.js +4 -1
- package/dist/utils/apply-auth-response-cookies.util.js.map +1 -1
- package/dist/utils/auth-role.util.d.ts +50 -8
- package/dist/utils/auth-role.util.js +50 -8
- package/dist/utils/auth-role.util.js.map +1 -1
- package/dist/utils/authorize.util.d.ts +6 -1
- package/dist/utils/authorize.util.js +6 -1
- package/dist/utils/authorize.util.js.map +1 -1
- package/dist/utils/build-request-ability.util.d.ts +5 -1
- package/dist/utils/build-request-ability.util.js +5 -1
- package/dist/utils/build-request-ability.util.js.map +1 -1
- package/dist/utils/can.util.d.ts +7 -1
- package/dist/utils/can.util.js +7 -1
- package/dist/utils/can.util.js.map +1 -1
- package/dist/utils/create-email-and-password-config.d.ts +8 -0
- package/dist/utils/create-email-and-password-config.js +8 -0
- package/dist/utils/create-email-and-password-config.js.map +1 -1
- package/dist/utils/create-email-verification-config.d.ts +6 -1
- package/dist/utils/create-email-verification-config.js +6 -1
- package/dist/utils/create-email-verification-config.js.map +1 -1
- package/dist/utils/create-generic-oauth-config.d.ts +7 -1
- package/dist/utils/create-generic-oauth-config.js +7 -1
- package/dist/utils/create-generic-oauth-config.js.map +1 -1
- package/dist/utils/create-oidc-config.d.ts +5 -0
- package/dist/utils/create-oidc-config.js +5 -0
- package/dist/utils/create-oidc-config.js.map +1 -1
- package/dist/utils/create-permission-enum.util.d.ts +5 -1
- package/dist/utils/create-permission-enum.util.js +5 -1
- package/dist/utils/create-permission-enum.util.js.map +1 -1
- package/dist/utils/create-social-provider-config.d.ts +7 -0
- package/dist/utils/create-social-provider-config.js +7 -0
- package/dist/utils/create-social-provider-config.js.map +1 -1
- package/dist/utils/create-social-providers-config.d.ts +6 -0
- package/dist/utils/create-social-providers-config.js +6 -0
- package/dist/utils/create-social-providers-config.js.map +1 -1
- package/dist/utils/create-user-config.d.ts +7 -1
- package/dist/utils/create-user-config.js +7 -1
- package/dist/utils/create-user-config.js.map +1 -1
- package/dist/utils/estimate-entropy.d.ts +0 -1
- package/dist/utils/estimate-entropy.js +0 -1
- package/dist/utils/estimate-entropy.js.map +1 -1
- package/dist/utils/extend-ability.util.d.ts +9 -1
- package/dist/utils/extend-ability.util.js +24 -1
- package/dist/utils/extend-ability.util.js.map +1 -1
- package/dist/utils/extract-api-key.util.d.ts +5 -1
- package/dist/utils/extract-api-key.util.js +5 -1
- package/dist/utils/extract-api-key.util.js.map +1 -1
- package/dist/utils/get-auth-ability.util.d.ts +1 -0
- package/dist/utils/get-auth-ability.util.js +1 -0
- package/dist/utils/get-auth-ability.util.js.map +1 -1
- package/dist/utils/get-current-api-key.util.d.ts +5 -1
- package/dist/utils/get-current-api-key.util.js +5 -1
- package/dist/utils/get-current-api-key.util.js.map +1 -1
- package/dist/utils/has-oidc-env-config.d.ts +4 -0
- package/dist/utils/has-oidc-env-config.js +4 -0
- package/dist/utils/has-oidc-env-config.js.map +1 -1
- package/dist/utils/has-social-provider-credential-env-config.d.ts +5 -0
- package/dist/utils/has-social-provider-credential-env-config.js +5 -0
- package/dist/utils/has-social-provider-credential-env-config.js.map +1 -1
- package/dist/utils/has-social-provider-env-config.d.ts +5 -0
- package/dist/utils/has-social-provider-env-config.js +5 -0
- package/dist/utils/has-social-provider-env-config.js.map +1 -1
- package/dist/utils/is-env-true.d.ts +5 -0
- package/dist/utils/is-env-true.js +5 -0
- package/dist/utils/is-env-true.js.map +1 -1
- package/dist/utils/omit-credentials.util.d.ts +7 -1
- package/dist/utils/omit-credentials.util.js +7 -1
- package/dist/utils/omit-credentials.util.js.map +1 -1
- package/dist/utils/permission-grants.util.d.ts +28 -4
- package/dist/utils/permission-grants.util.js +28 -4
- package/dist/utils/permission-grants.util.js.map +1 -1
- package/dist/utils/resolve-auth-catalog.util.d.ts +6 -1
- package/dist/utils/resolve-auth-catalog.util.js +6 -1
- package/dist/utils/resolve-auth-catalog.util.js.map +1 -1
- package/dist/utils/resolve-effective-permissions.util.d.ts +21 -3
- package/dist/utils/resolve-effective-permissions.util.js +21 -3
- package/dist/utils/resolve-effective-permissions.util.js.map +1 -1
- package/dist/utils/resolve-oidc-prompt.d.ts +4 -0
- package/dist/utils/resolve-oidc-prompt.js +4 -0
- package/dist/utils/resolve-oidc-prompt.js.map +1 -1
- package/dist/utils/resolve-oidc-scopes.d.ts +4 -0
- package/dist/utils/resolve-oidc-scopes.js +4 -0
- package/dist/utils/resolve-oidc-scopes.js.map +1 -1
- package/dist/utils/resolve-request-member.util.d.ts +5 -1
- package/dist/utils/resolve-request-member.util.js +5 -1
- package/dist/utils/resolve-request-member.util.js.map +1 -1
- package/dist/utils/resolve-request-permissions.util.d.ts +10 -2
- package/dist/utils/resolve-request-permissions.util.js +10 -2
- package/dist/utils/resolve-request-permissions.util.js.map +1 -1
- package/dist/utils/resolve-required-oidc-env.d.ts +5 -0
- package/dist/utils/resolve-required-oidc-env.js +5 -0
- package/dist/utils/resolve-required-oidc-env.js.map +1 -1
- package/dist/utils/resolve-required-social-provider-env.d.ts +6 -0
- package/dist/utils/resolve-required-social-provider-env.js +6 -0
- package/dist/utils/resolve-required-social-provider-env.js.map +1 -1
- package/dist/utils/resolve-secret.d.ts +5 -0
- package/dist/utils/resolve-secret.js +5 -0
- package/dist/utils/resolve-secret.js.map +1 -1
- package/dist/utils/resolve-social-provider-enabled.d.ts +5 -0
- package/dist/utils/resolve-social-provider-enabled.js +5 -0
- package/dist/utils/resolve-social-provider-enabled.js.map +1 -1
- package/dist/utils/run-auth-query.d.ts +3 -0
- package/dist/utils/run-auth-query.js +3 -0
- package/dist/utils/run-auth-query.js.map +1 -1
- package/dist/utils/serialize-ability-rules.util.d.ts +5 -1
- package/dist/utils/serialize-ability-rules.util.js +15 -1
- package/dist/utils/serialize-ability-rules.util.js.map +1 -1
- package/dist/utils/split-auth-providers.d.ts +5 -1
- package/dist/utils/split-auth-providers.js +6 -4
- package/dist/utils/split-auth-providers.js.map +1 -1
- package/package.json +21 -27
|
@@ -34,28 +34,37 @@ let MemberResolver = class MemberResolver {
|
|
|
34
34
|
memberService;
|
|
35
35
|
/**
|
|
36
36
|
* Creates the workspace member resolver.
|
|
37
|
-
*
|
|
37
|
+
* @param memberService - Service for workspace memberships and service accounts.
|
|
38
38
|
*/
|
|
39
39
|
constructor(
|
|
40
40
|
/** Auth-owned workspace role and permission operations. */
|
|
41
41
|
memberService) {
|
|
42
42
|
this.memberService = memberService;
|
|
43
43
|
}
|
|
44
|
-
/**
|
|
44
|
+
/**
|
|
45
|
+
* Resolves the user associated with a workspace member.
|
|
46
|
+
* @param member - The workspace membership to inspect or change.
|
|
47
|
+
* @returns Matching user, or null if unavailable.
|
|
48
|
+
*/
|
|
45
49
|
async user(member) {
|
|
46
50
|
return await this.memberService.getMemberUser(member);
|
|
47
51
|
}
|
|
48
|
-
/**
|
|
52
|
+
/**
|
|
53
|
+
* Lists configured workspace roles with the current principal's grant availability.
|
|
54
|
+
* @returns Workspace role choices and whether each may be granted.
|
|
55
|
+
*/
|
|
49
56
|
workspaceRoles() {
|
|
50
57
|
return this.memberService.listRoles();
|
|
51
58
|
}
|
|
52
|
-
/**
|
|
59
|
+
/**
|
|
60
|
+
* Lists configured workspace permissions with the current principal's grant availability.
|
|
61
|
+
* @returns Workspace permission choices and whether each may be granted.
|
|
62
|
+
*/
|
|
53
63
|
workspacePermissions() {
|
|
54
64
|
return this.memberService.listPermissions();
|
|
55
65
|
}
|
|
56
66
|
/**
|
|
57
67
|
* Returns the workspace member selected for the current request.
|
|
58
|
-
*
|
|
59
68
|
* @returns Current workspace member, or null when no member was resolved.
|
|
60
69
|
*/
|
|
61
70
|
currentMember() {
|
|
@@ -63,7 +72,6 @@ let MemberResolver = class MemberResolver {
|
|
|
63
72
|
}
|
|
64
73
|
/**
|
|
65
74
|
* Returns a workspace member by ID.
|
|
66
|
-
*
|
|
67
75
|
* @param id - Workspace member ID.
|
|
68
76
|
* @returns Matching workspace member, or null when not found.
|
|
69
77
|
*/
|
|
@@ -72,7 +80,6 @@ let MemberResolver = class MemberResolver {
|
|
|
72
80
|
}
|
|
73
81
|
/**
|
|
74
82
|
* Adds an existing user to the workspace by email.
|
|
75
|
-
*
|
|
76
83
|
* @param workspace - Current workspace.
|
|
77
84
|
* @param input - Input for adding a member.
|
|
78
85
|
* @returns Newly created member identifier.
|
|
@@ -91,7 +98,6 @@ let MemberResolver = class MemberResolver {
|
|
|
91
98
|
}
|
|
92
99
|
/**
|
|
93
100
|
* Updates workspace member details.
|
|
94
|
-
*
|
|
95
101
|
* @param id - ID of the workspace member to update.
|
|
96
102
|
* @param input - Member update input.
|
|
97
103
|
* @returns Updated member identifier.
|
|
@@ -100,19 +106,28 @@ let MemberResolver = class MemberResolver {
|
|
|
100
106
|
const member = await this.memberService.updateMember(id, input);
|
|
101
107
|
return member ? { id: member.id } : null;
|
|
102
108
|
}
|
|
103
|
-
/**
|
|
109
|
+
/**
|
|
110
|
+
* Replaces roles assigned to a workspace member.
|
|
111
|
+
* @param id - Identifier of the record to access.
|
|
112
|
+
* @param input - Requested field values for the operation.
|
|
113
|
+
* @returns Identifier of the member whose roles were replaced.
|
|
114
|
+
*/
|
|
104
115
|
async setMemberRoles(id, input) {
|
|
105
116
|
const member = await this.memberService.setMemberRoles(id, input.roles);
|
|
106
117
|
return { id: member.id };
|
|
107
118
|
}
|
|
108
|
-
/**
|
|
119
|
+
/**
|
|
120
|
+
* Replaces direct permissions assigned to a workspace member.
|
|
121
|
+
* @param id - Identifier of the record to access.
|
|
122
|
+
* @param input - Requested field values for the operation.
|
|
123
|
+
* @returns Identifier of the member whose permissions were replaced.
|
|
124
|
+
*/
|
|
109
125
|
async setMemberPermissions(id, input) {
|
|
110
126
|
const member = await this.memberService.setMemberPermissions(id, input.permissions);
|
|
111
127
|
return { id: member.id };
|
|
112
128
|
}
|
|
113
129
|
/**
|
|
114
130
|
* Removes a workspace member.
|
|
115
|
-
*
|
|
116
131
|
* @param id - ID of the workspace member to remove.
|
|
117
132
|
* @returns Identifier of the removed workspace member.
|
|
118
133
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"member.resolver.js","sourceRoot":"","sources":["../../src/resolvers/member.resolver.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EACL,IAAI,EACJ,EAAE,EACF,QAAQ,EACR,MAAM,EACN,KAAK,EACL,YAAY,EACZ,QAAQ,GACT,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAErD,OAAO,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAChF,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,yBAAyB,EAAE,MAAM,2CAA2C,CAAC;AACtF,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAC3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AACjF,OAAO,EAAE,2BAA2B,EAAE,MAAM,qDAAqD,CAAC;AAClG,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AACtF,OAAO,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AACjF,OAAO,EAAE,yBAAyB,EAAE,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E,CAAC;IAErD,WAAA,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CAAA;IAC9B,WAAA,IAAI,CAAC,OAAO,CAAC,CAAA;;6CAAQ,iBAAiB;;kDAIxC;AASK;IADL,QAAQ,CAAC,GAAG,EAAE,CAAC,qBAAqB,CAAC;IAEnC,WAAA,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CAAA;IAC9B,WAAA,IAAI,CAAC,OAAO,CAAC,CAAA;;6CAAQ,mBAAmB;;oDAI1C;AASK;IADL,QAAQ,CAAC,GAAG,EAAE,CAAC,2BAA2B,CAAC;IAEzC,WAAA,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CAAA;IAC9B,WAAA,IAAI,CAAC,OAAO,CAAC,CAAA;;6CAAQ,yBAAyB;;0DAOhD;AAQK;IADL,QAAQ,CAAC,GAAG,EAAE,CAAC,mBAAmB,CAAC;IAEjC,WAAA,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CAAA;;;;kDAIhC;AAvJU,cAAc;IAD1B,QAAQ,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC;qCAQK,aAAa;GAP5B,cAAc,CAwJ1B"}
|
|
@@ -6,28 +6,75 @@ import { SessionService } from "../services/session.service.js";
|
|
|
6
6
|
export declare class SessionResolver {
|
|
7
7
|
private readonly sessionService;
|
|
8
8
|
private readonly authService;
|
|
9
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* Creates the session-management resolver.
|
|
11
|
+
* @param sessionService - Service for session queries and revocation.
|
|
12
|
+
* @param authService - Service for authentication operations.
|
|
13
|
+
*/
|
|
10
14
|
constructor(sessionService: SessionService, authService: AuthService);
|
|
11
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* Returns the session represented by the current request.
|
|
17
|
+
* @param currentSession - Session represented by the current request.
|
|
18
|
+
* @returns Current authenticated session, or null.
|
|
19
|
+
*/
|
|
12
20
|
currentSession(currentSession: Session | null): Session | null;
|
|
13
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* Whether the parent session is making the current request.
|
|
23
|
+
* @param session - Session whose metadata is being accessed.
|
|
24
|
+
* @param currentSession - Session represented by the current request.
|
|
25
|
+
* @returns Whether the parent session is the current request's session.
|
|
26
|
+
*/
|
|
14
27
|
current(session: Session, currentSession: Session | null): boolean;
|
|
15
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* Administrator that started the parent impersonation session.
|
|
30
|
+
* @param session - Session whose metadata is being accessed.
|
|
31
|
+
* @returns Identifier of the impersonating administrator, or null.
|
|
32
|
+
*/
|
|
16
33
|
impersonatedById(session: Session): string | null;
|
|
17
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* Resolves the administrator after Service-level profile authorization.
|
|
36
|
+
* @param session - Session whose metadata is being accessed.
|
|
37
|
+
* @returns Administrator who started impersonation, or null.
|
|
38
|
+
*/
|
|
18
39
|
impersonatedBy(session: Session): Promise<User | null>;
|
|
19
|
-
/**
|
|
40
|
+
/**
|
|
41
|
+
* Revokes one active session owned by the authenticated user.
|
|
42
|
+
* @param id - Identifier of the record to access.
|
|
43
|
+
* @returns Whether the selected session was revoked successfully.
|
|
44
|
+
*/
|
|
20
45
|
revokeCurrentUserSession(id: string): Promise<boolean>;
|
|
21
|
-
/**
|
|
46
|
+
/**
|
|
47
|
+
* Revokes every active session except the current session.
|
|
48
|
+
* @returns Whether the other sessions were revoked successfully.
|
|
49
|
+
*/
|
|
22
50
|
revokeCurrentUserOtherSessions(): Promise<boolean>;
|
|
23
|
-
/**
|
|
51
|
+
/**
|
|
52
|
+
* Revokes every active session owned by the authenticated user.
|
|
53
|
+
* @returns Whether the user's sessions were revoked successfully.
|
|
54
|
+
*/
|
|
24
55
|
revokeCurrentUserSessions(): Promise<boolean>;
|
|
25
|
-
/**
|
|
56
|
+
/**
|
|
57
|
+
* Revokes one user session by its public ID.
|
|
58
|
+
* @param userId - Identifier of the user that owns the resource.
|
|
59
|
+
* @param id - Identifier of the record to access.
|
|
60
|
+
* @returns Whether the selected session was revoked.
|
|
61
|
+
*/
|
|
26
62
|
revokeSession(userId: string, id: string): Promise<boolean>;
|
|
27
|
-
/**
|
|
63
|
+
/**
|
|
64
|
+
* Revokes all sessions belonging to a user.
|
|
65
|
+
* @param userId - Identifier of the user that owns the resource.
|
|
66
|
+
* @returns True after the requested sessions are revoked.
|
|
67
|
+
*/
|
|
28
68
|
revokeUserSessions(userId: string): Promise<boolean>;
|
|
29
|
-
/**
|
|
69
|
+
/**
|
|
70
|
+
* Starts a browser session that acts as another user.
|
|
71
|
+
* @param id - Identifier of the record to access.
|
|
72
|
+
* @returns User represented by the new impersonation session.
|
|
73
|
+
*/
|
|
30
74
|
impersonateUser(id: string): Promise<User>;
|
|
31
|
-
/**
|
|
75
|
+
/**
|
|
76
|
+
* Restores the administrator session that started impersonation.
|
|
77
|
+
* @returns Restored administrator, or null when there was no impersonation session.
|
|
78
|
+
*/
|
|
32
79
|
stopImpersonating(): Promise<User | null>;
|
|
33
80
|
}
|
|
@@ -20,53 +20,100 @@ import { SessionService } from "../services/session.service.js";
|
|
|
20
20
|
let SessionResolver = class SessionResolver {
|
|
21
21
|
sessionService;
|
|
22
22
|
authService;
|
|
23
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* Creates the session-management resolver.
|
|
25
|
+
* @param sessionService - Service for session queries and revocation.
|
|
26
|
+
* @param authService - Service for authentication operations.
|
|
27
|
+
*/
|
|
24
28
|
constructor(sessionService, authService) {
|
|
25
29
|
this.sessionService = sessionService;
|
|
26
30
|
this.authService = authService;
|
|
27
31
|
}
|
|
28
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* Returns the session represented by the current request.
|
|
34
|
+
* @param currentSession - Session represented by the current request.
|
|
35
|
+
* @returns Current authenticated session, or null.
|
|
36
|
+
*/
|
|
29
37
|
currentSession(currentSession) {
|
|
30
38
|
return currentSession;
|
|
31
39
|
}
|
|
32
|
-
/**
|
|
40
|
+
/**
|
|
41
|
+
* Whether the parent session is making the current request.
|
|
42
|
+
* @param session - Session whose metadata is being accessed.
|
|
43
|
+
* @param currentSession - Session represented by the current request.
|
|
44
|
+
* @returns Whether the parent session is the current request's session.
|
|
45
|
+
*/
|
|
33
46
|
current(session, currentSession) {
|
|
34
47
|
return session.id === currentSession?.id;
|
|
35
48
|
}
|
|
36
|
-
/**
|
|
49
|
+
/**
|
|
50
|
+
* Administrator that started the parent impersonation session.
|
|
51
|
+
* @param session - Session whose metadata is being accessed.
|
|
52
|
+
* @returns Identifier of the impersonating administrator, or null.
|
|
53
|
+
*/
|
|
37
54
|
impersonatedById(session) {
|
|
38
55
|
return session.impersonatedBy ? String(session.impersonatedBy.id) : null;
|
|
39
56
|
}
|
|
40
|
-
/**
|
|
57
|
+
/**
|
|
58
|
+
* Resolves the administrator after Service-level profile authorization.
|
|
59
|
+
* @param session - Session whose metadata is being accessed.
|
|
60
|
+
* @returns Administrator who started impersonation, or null.
|
|
61
|
+
*/
|
|
41
62
|
async impersonatedBy(session) {
|
|
42
63
|
return await this.sessionService.getSessionImpersonator(session);
|
|
43
64
|
}
|
|
44
|
-
/**
|
|
65
|
+
/**
|
|
66
|
+
* Revokes one active session owned by the authenticated user.
|
|
67
|
+
* @param id - Identifier of the record to access.
|
|
68
|
+
* @returns Whether the selected session was revoked successfully.
|
|
69
|
+
*/
|
|
45
70
|
async revokeCurrentUserSession(id) {
|
|
46
71
|
return await this.sessionService.revokeCurrentUserSession(id);
|
|
47
72
|
}
|
|
48
|
-
/**
|
|
73
|
+
/**
|
|
74
|
+
* Revokes every active session except the current session.
|
|
75
|
+
* @returns Whether the other sessions were revoked successfully.
|
|
76
|
+
*/
|
|
49
77
|
async revokeCurrentUserOtherSessions() {
|
|
50
78
|
return await this.sessionService.revokeCurrentUserOtherSessions();
|
|
51
79
|
}
|
|
52
|
-
/**
|
|
80
|
+
/**
|
|
81
|
+
* Revokes every active session owned by the authenticated user.
|
|
82
|
+
* @returns Whether the user's sessions were revoked successfully.
|
|
83
|
+
*/
|
|
53
84
|
async revokeCurrentUserSessions() {
|
|
54
85
|
return await this.sessionService.revokeCurrentUserSessions();
|
|
55
86
|
}
|
|
56
|
-
/**
|
|
87
|
+
/**
|
|
88
|
+
* Revokes one user session by its public ID.
|
|
89
|
+
* @param userId - Identifier of the user that owns the resource.
|
|
90
|
+
* @param id - Identifier of the record to access.
|
|
91
|
+
* @returns Whether the selected session was revoked.
|
|
92
|
+
*/
|
|
57
93
|
async revokeSession(userId, id) {
|
|
58
94
|
return await this.sessionService.revokeSession(userId, id);
|
|
59
95
|
}
|
|
60
|
-
/**
|
|
96
|
+
/**
|
|
97
|
+
* Revokes all sessions belonging to a user.
|
|
98
|
+
* @param userId - Identifier of the user that owns the resource.
|
|
99
|
+
* @returns True after the requested sessions are revoked.
|
|
100
|
+
*/
|
|
61
101
|
async revokeUserSessions(userId) {
|
|
62
102
|
await this.sessionService.revokeUserSessions(userId);
|
|
63
103
|
return true;
|
|
64
104
|
}
|
|
65
|
-
/**
|
|
105
|
+
/**
|
|
106
|
+
* Starts a browser session that acts as another user.
|
|
107
|
+
* @param id - Identifier of the record to access.
|
|
108
|
+
* @returns User represented by the new impersonation session.
|
|
109
|
+
*/
|
|
66
110
|
async impersonateUser(id) {
|
|
67
111
|
return await this.authService.impersonateUser(id);
|
|
68
112
|
}
|
|
69
|
-
/**
|
|
113
|
+
/**
|
|
114
|
+
* Restores the administrator session that started impersonation.
|
|
115
|
+
* @returns Restored administrator, or null when there was no impersonation session.
|
|
116
|
+
*/
|
|
70
117
|
async stopImpersonating() {
|
|
71
118
|
return await this.authService.stopImpersonating();
|
|
72
119
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.resolver.js","sourceRoot":"","sources":["../../src/resolvers/session.resolver.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EACL,IAAI,EACJ,EAAE,EACF,QAAQ,EACR,MAAM,EACN,KAAK,EACL,YAAY,EACZ,QAAQ,GACT,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAEhE,8EAA8E;AAEvE,IAAM,eAAe,GAArB,MAAM,eAAe;
|
|
1
|
+
{"version":3,"file":"session.resolver.js","sourceRoot":"","sources":["../../src/resolvers/session.resolver.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EACL,IAAI,EACJ,EAAE,EACF,QAAQ,EACR,MAAM,EACN,KAAK,EACL,YAAY,EACZ,QAAQ,GACT,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAEhE,8EAA8E;AAEvE,IAAM,eAAe,GAArB,MAAM,eAAe;IAOP;IACA;IAPnB;;;;OAIG;IACH,YACmB,cAA8B,EAC9B,WAAwB;QADxB,mBAAc,GAAd,cAAc,CAAgB;QAC9B,gBAAW,GAAX,WAAW,CAAa;IACxC,CAAC;IAEJ;;;;OAIG;IAEH,cAAc,CACM,cAA8B;QAEhD,OAAO,cAAc,CAAC;IACxB,CAAC;IAED;;;;;OAKG;IAE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AAE,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CAAA;;;;oDAGhC;AAQK;IADL,QAAQ,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC;IAErB,WAAA,IAAI,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CAAA;;;;yDAIpC;AAQK;IADL,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC;IAElB,WAAA,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CAAA;;;;sDAGhC;AAOK;IADL,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;;;wDAGxC;AArIU,eAAe;IAD3B,QAAQ,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC;qCAQa,cAAc;QACjB,WAAW;GARhC,eAAe,CAsI3B"}
|
|
@@ -10,16 +10,37 @@ import type { ApiKeyMetadata } from "../types/api-key-metadata.type.js";
|
|
|
10
10
|
export declare class UserApiKeyResolver {
|
|
11
11
|
/** User API-key domain service. */
|
|
12
12
|
readonly apiKeyService: UserApiKeyService;
|
|
13
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* Creates the user API-key resolver.
|
|
15
|
+
* @param apiKeyService - Service for validating or managing API keys.
|
|
16
|
+
*/
|
|
14
17
|
constructor(
|
|
15
18
|
/** User API-key domain service. */
|
|
16
19
|
apiKeyService: UserApiKeyService);
|
|
17
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* Lists permission choices for keys owned by the current user.
|
|
22
|
+
* @param user - The user whose account is being accessed.
|
|
23
|
+
* @returns Permission choices and grant availability for user API keys.
|
|
24
|
+
*/
|
|
18
25
|
userApiKeyPermissions(user: User): UserApiKeyPermissionOption[];
|
|
19
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* Creates a credential and returns its plaintext once.
|
|
28
|
+
* @param input - Requested field values for the operation.
|
|
29
|
+
* @param user - The user whose account is being accessed.
|
|
30
|
+
* @returns Created key metadata and its one-time plaintext credential.
|
|
31
|
+
*/
|
|
20
32
|
createUserApiKey(input: CreateUserApiKeyInput, user: User): Promise<CreateUserApiKeyResult>;
|
|
21
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* Updates a credential owned by the current user.
|
|
35
|
+
* @param id - Identifier of the record to access.
|
|
36
|
+
* @param input - Requested field values for the operation.
|
|
37
|
+
* @returns Updated API key metadata without the stored credential hash.
|
|
38
|
+
*/
|
|
22
39
|
updateUserApiKey(id: string, input: UpdateUserApiKeyInput): Promise<ApiKeyMetadata<UserApiKey>>;
|
|
23
|
-
/**
|
|
40
|
+
/**
|
|
41
|
+
* Deletes a credential owned by the current user.
|
|
42
|
+
* @param id - Identifier of the record to access.
|
|
43
|
+
* @returns Deleted API key metadata without the stored credential hash.
|
|
44
|
+
*/
|
|
24
45
|
deleteUserApiKey(id: string): Promise<ApiKeyMetadata<UserApiKey>>;
|
|
25
46
|
}
|
|
@@ -22,25 +22,46 @@ import { UserApiKeyService } from "../services/user-api-key.service.js";
|
|
|
22
22
|
/** GraphQL mutations for user-owned API keys. */
|
|
23
23
|
let UserApiKeyResolver = class UserApiKeyResolver {
|
|
24
24
|
apiKeyService;
|
|
25
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* Creates the user API-key resolver.
|
|
27
|
+
* @param apiKeyService - Service for validating or managing API keys.
|
|
28
|
+
*/
|
|
26
29
|
constructor(
|
|
27
30
|
/** User API-key domain service. */
|
|
28
31
|
apiKeyService) {
|
|
29
32
|
this.apiKeyService = apiKeyService;
|
|
30
33
|
}
|
|
31
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* Lists permission choices for keys owned by the current user.
|
|
36
|
+
* @param user - The user whose account is being accessed.
|
|
37
|
+
* @returns Permission choices and grant availability for user API keys.
|
|
38
|
+
*/
|
|
32
39
|
userApiKeyPermissions(user) {
|
|
33
40
|
return this.apiKeyService.getUserApiKeyPermissions(user);
|
|
34
41
|
}
|
|
35
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* Creates a credential and returns its plaintext once.
|
|
44
|
+
* @param input - Requested field values for the operation.
|
|
45
|
+
* @param user - The user whose account is being accessed.
|
|
46
|
+
* @returns Created key metadata and its one-time plaintext credential.
|
|
47
|
+
*/
|
|
36
48
|
async createUserApiKey(input, user) {
|
|
37
49
|
return await this.apiKeyService.createUserApiKey(user, input);
|
|
38
50
|
}
|
|
39
|
-
/**
|
|
51
|
+
/**
|
|
52
|
+
* Updates a credential owned by the current user.
|
|
53
|
+
* @param id - Identifier of the record to access.
|
|
54
|
+
* @param input - Requested field values for the operation.
|
|
55
|
+
* @returns Updated API key metadata without the stored credential hash.
|
|
56
|
+
*/
|
|
40
57
|
async updateUserApiKey(id, input) {
|
|
41
58
|
return await this.apiKeyService.updateUserApiKey(id, input);
|
|
42
59
|
}
|
|
43
|
-
/**
|
|
60
|
+
/**
|
|
61
|
+
* Deletes a credential owned by the current user.
|
|
62
|
+
* @param id - Identifier of the record to access.
|
|
63
|
+
* @returns Deleted API key metadata without the stored credential hash.
|
|
64
|
+
*/
|
|
44
65
|
async deleteUserApiKey(id) {
|
|
45
66
|
return await this.apiKeyService.deleteUserApiKey(id);
|
|
46
67
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-api-key.resolver.js","sourceRoot":"","sources":["../../src/resolvers/user-api-key.resolver.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEzE,OAAO,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AACtE,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,EAAE,qB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CAQC,iBAAiB;GAPhC,kBAAkB,CA6D9B"}
|
|
@@ -36,42 +36,137 @@ export declare class UserResolver {
|
|
|
36
36
|
private readonly sessionService;
|
|
37
37
|
private readonly invitationService;
|
|
38
38
|
private readonly accountService;
|
|
39
|
-
/**
|
|
39
|
+
/**
|
|
40
|
+
* Creates the user-management GraphQL resolver.
|
|
41
|
+
* @param userService - Service for user profiles and permissions.
|
|
42
|
+
* @param workspaceService - Service for workspace queries and mutations.
|
|
43
|
+
* @param apiKeyService - Service for validating or managing API keys.
|
|
44
|
+
* @param sessionService - Service for session queries and revocation.
|
|
45
|
+
* @param invitationService - Service for invitation queries and mutations.
|
|
46
|
+
* @param accountService - Service for linked authentication accounts.
|
|
47
|
+
*/
|
|
40
48
|
constructor(userService: UserService, workspaceService: WorkspaceService, apiKeyService: UserApiKeyService, sessionService: SessionService, invitationService: InvitationService, accountService: AccountService);
|
|
41
|
-
/**
|
|
49
|
+
/**
|
|
50
|
+
* Lists active sessions belonging to the parent user after service authorization.
|
|
51
|
+
* @param user - The user whose account is being accessed.
|
|
52
|
+
* @param args - Pagination, filtering, and ordering arguments.
|
|
53
|
+
* @param info - GraphQL selection information used to shape the query.
|
|
54
|
+
* @returns Paginated active sessions belonging to the user.
|
|
55
|
+
*/
|
|
42
56
|
sessions(user: User, args: ConnectionArgsInterface<Session>, info?: GraphQLResolveInfo): Promise<import("@nest-boot/graphql-connection").ConnectionResult<Omit<Session, "token">>>;
|
|
43
|
-
/**
|
|
57
|
+
/**
|
|
58
|
+
* Paginates the parent's linked accounts after service authorization.
|
|
59
|
+
* @param user - The user whose account is being accessed.
|
|
60
|
+
* @param args - Pagination, filtering, and ordering arguments.
|
|
61
|
+
* @param info - GraphQL selection information used to shape the query.
|
|
62
|
+
* @returns Paginated linked accounts with credentials omitted.
|
|
63
|
+
*/
|
|
44
64
|
accounts(user: User, args: ConnectionArgsInterface<Account>, info?: GraphQLResolveInfo): Promise<import("@nest-boot/graphql-connection").ConnectionResult<Omit<Account, "accessToken" | "refreshToken" | "idToken" | "password">>>;
|
|
45
|
-
/**
|
|
65
|
+
/**
|
|
66
|
+
* Paginates workspaces joined by the parent user.
|
|
67
|
+
* @param user - The user whose account is being accessed.
|
|
68
|
+
* @param args - Pagination, filtering, and ordering arguments.
|
|
69
|
+
* @param info - GraphQL selection information used to shape the query.
|
|
70
|
+
* @returns Paginated workspaces accessible to the user.
|
|
71
|
+
*/
|
|
46
72
|
workspaces(user: User, args: ConnectionArgsInterface<Workspace>, info?: GraphQLResolveInfo): Promise<import("@nest-boot/graphql-connection").ConnectionResult<Workspace>>;
|
|
47
|
-
/**
|
|
73
|
+
/**
|
|
74
|
+
* Returns an accessible API key owned by the parent user.
|
|
75
|
+
* @param user - The user whose account is being accessed.
|
|
76
|
+
* @param id - Identifier of the record to access.
|
|
77
|
+
* @returns Accessible API key metadata, or null if unavailable.
|
|
78
|
+
*/
|
|
48
79
|
apiKey(user: User, id: string): Promise<ApiKeyMetadata<UserApiKey> | null>;
|
|
49
|
-
/**
|
|
80
|
+
/**
|
|
81
|
+
* Paginates API keys owned by the parent user.
|
|
82
|
+
* @param user - The user whose account is being accessed.
|
|
83
|
+
* @param args - Pagination, filtering, and ordering arguments.
|
|
84
|
+
* @param info - GraphQL selection information used to shape the query.
|
|
85
|
+
* @returns Paginated API key metadata with credential hashes omitted.
|
|
86
|
+
*/
|
|
50
87
|
apiKeys(user: User, args: ConnectionArgsInterface<UserApiKey>, info?: GraphQLResolveInfo): Promise<import("@nest-boot/graphql-connection").ConnectionResult<Omit<UserApiKey, "key">>>;
|
|
51
|
-
/**
|
|
88
|
+
/**
|
|
89
|
+
* Paginates pending invitations addressed to the parent user.
|
|
90
|
+
* @param user - The user whose account is being accessed.
|
|
91
|
+
* @param args - Pagination, filtering, and ordering arguments.
|
|
92
|
+
* @param info - GraphQL selection information used to shape the query.
|
|
93
|
+
* @returns Paginated invitations visible to the current principal.
|
|
94
|
+
*/
|
|
52
95
|
invitations(user: User, args: ConnectionArgsInterface<Invitation>, info?: GraphQLResolveInfo): Promise<import("@nest-boot/graphql-connection").ConnectionResult<Invitation>>;
|
|
53
|
-
/**
|
|
96
|
+
/**
|
|
97
|
+
* Lists configured user roles with the current principal's grant availability.
|
|
98
|
+
* @returns User role choices and whether each may be granted.
|
|
99
|
+
*/
|
|
54
100
|
userRoles(): UserRoleOption[];
|
|
55
|
-
/**
|
|
101
|
+
/**
|
|
102
|
+
* Lists configured user permissions with the current principal's grant availability.
|
|
103
|
+
* @returns User permission choices and whether each may be granted.
|
|
104
|
+
*/
|
|
56
105
|
userPermissions(): UserPermissionOption[];
|
|
57
|
-
/**
|
|
106
|
+
/**
|
|
107
|
+
* Paginates users using the application's connection definition.
|
|
108
|
+
* @param args - Pagination, filtering, and ordering arguments.
|
|
109
|
+
* @param info - GraphQL selection information used to shape the query.
|
|
110
|
+
* @returns Paginated users matching the query.
|
|
111
|
+
*/
|
|
58
112
|
users(args: ConnectionArgsInterface<User>, info?: GraphQLResolveInfo): Promise<import("@nest-boot/graphql-connection").ConnectionResult<User>>;
|
|
59
|
-
/**
|
|
113
|
+
/**
|
|
114
|
+
* Returns a user by identifier.
|
|
115
|
+
* @param id - Identifier of the record to access.
|
|
116
|
+
* @returns Matching user, or null if unavailable.
|
|
117
|
+
*/
|
|
60
118
|
user(id: string): Promise<User | null>;
|
|
61
|
-
/**
|
|
119
|
+
/**
|
|
120
|
+
* Creates a credential user.
|
|
121
|
+
* @param input - Requested field values for the operation.
|
|
122
|
+
* @returns Identifier of the created user.
|
|
123
|
+
*/
|
|
62
124
|
createUser(input: CreateUserInput): Promise<CreateUserPayload>;
|
|
63
|
-
/**
|
|
125
|
+
/**
|
|
126
|
+
* Updates mutable user profile fields.
|
|
127
|
+
* @param id - Identifier of the record to access.
|
|
128
|
+
* @param input - Requested field values for the operation.
|
|
129
|
+
* @returns Identifier of the updated user.
|
|
130
|
+
*/
|
|
64
131
|
updateUser(id: string, input: UpdateUserInput): Promise<UpdateUserPayload>;
|
|
65
|
-
/**
|
|
132
|
+
/**
|
|
133
|
+
* Replaces the direct permissions assigned to a user.
|
|
134
|
+
* @param id - Identifier of the record to access.
|
|
135
|
+
* @param input - Requested field values for the operation.
|
|
136
|
+
* @returns Identifier of the user whose permissions were replaced.
|
|
137
|
+
*/
|
|
66
138
|
setUserPermissions(id: string, input: SetUserPermissionsInput): Promise<SetUserPermissionsPayload>;
|
|
67
|
-
/**
|
|
139
|
+
/**
|
|
140
|
+
* Replaces the application roles assigned to a user.
|
|
141
|
+
* @param id - Identifier of the record to access.
|
|
142
|
+
* @param input - Requested field values for the operation.
|
|
143
|
+
* @returns Identifier of the user whose roles were replaced.
|
|
144
|
+
*/
|
|
68
145
|
setUserRoles(id: string, input: SetUserRolesInput): Promise<SetUserRolesPayload>;
|
|
69
|
-
/**
|
|
146
|
+
/**
|
|
147
|
+
* Bans a user and revokes their sessions.
|
|
148
|
+
* @param id - Identifier of the record to access.
|
|
149
|
+
* @param input - Requested field values for the operation.
|
|
150
|
+
* @returns Identifier of the banned user.
|
|
151
|
+
*/
|
|
70
152
|
banUser(id: string, input?: BanUserInput): Promise<BanUserPayload>;
|
|
71
|
-
/**
|
|
153
|
+
/**
|
|
154
|
+
* Removes an active user ban.
|
|
155
|
+
* @param id - Identifier of the record to access.
|
|
156
|
+
* @returns Identifier of the unbanned user.
|
|
157
|
+
*/
|
|
72
158
|
unbanUser(id: string): Promise<UnbanUserPayload>;
|
|
73
|
-
/**
|
|
159
|
+
/**
|
|
160
|
+
* Replaces a user's credential password.
|
|
161
|
+
* @param id - Identifier of the record to access.
|
|
162
|
+
* @param input - Requested field values for the operation.
|
|
163
|
+
* @returns Whether the password was replaced successfully.
|
|
164
|
+
*/
|
|
74
165
|
setUserPassword(id: string, input: SetUserPasswordInput): Promise<boolean>;
|
|
75
|
-
/**
|
|
166
|
+
/**
|
|
167
|
+
* Permanently deletes a user and returns only the deleted user's ID.
|
|
168
|
+
* @param id - Identifier of the record to access.
|
|
169
|
+
* @returns Identifier of the deleted user.
|
|
170
|
+
*/
|
|
76
171
|
deleteUser(id: string): Promise<DeleteUserPayload>;
|
|
77
172
|
}
|