@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
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* Builds the common native policy without discovery hooks.
|
|
3
|
+
* @param scope - User or workspace identifier stored in the database request context.
|
|
4
|
+
* @param options - Configuration for this operation.
|
|
5
|
+
* @returns Native database policy that compares the row with the request scope.
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
2
8
|
export function createScopePolicy(scope, options) {
|
|
3
9
|
const type = options.type ?? "bigint";
|
|
4
10
|
const property = options.property ?? scope;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-scope-policy.js","sourceRoot":"","sources":["../../src/policies/create-scope-policy.ts"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"create-scope-policy.js","sourceRoot":"","sources":["../../src/policies/create-scope-policy.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAC/B,KAA2B,EAC3B,OAA2B;IAE3B,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,QAAQ,CAAC;IACtC,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,KAAK,CAAC;IAC3C,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,KAAK,CAAC;IACzC,MAAM,KAAK,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IAExD,IAAI,CAAC,CAAC,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;QAC1D,MAAM,IAAI,SAAS,CAAC,kCAAkC,IAAI,EAAE,CAAC,CAAC;IAChE,CAAC;IACD,IAAI,CAAC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,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACxD,GAAG,CAAC,OAAO,KAAK,KAAK,IAAI,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,QAAQ;YACnE,CAAC,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE;YACzB,CAAC,CAAC,EAAE,CAAC;KACR,CAAC;AACJ,CAAC"}
|
|
@@ -7,5 +7,7 @@ import type { ScopePolicyOptions } from "../interfaces/scope-policy-options.inte
|
|
|
7
7
|
* Missing/empty session identifiers match no rows. The property must map to a
|
|
8
8
|
* single column; type is the explicit SQL cast, not an inferred TypeScript type.
|
|
9
9
|
* Compose in Entity.policies; no Filter or discovery hook is required.
|
|
10
|
+
* @param options - Configuration for this operation.
|
|
11
|
+
* @returns Native policy scoped to the current user identifier.
|
|
10
12
|
*/
|
|
11
13
|
export declare function userScopePolicy(options?: ScopePolicyOptions): PolicyDef;
|
|
@@ -6,6 +6,8 @@ import { createScopePolicy } from "./create-scope-policy.js";
|
|
|
6
6
|
* Missing/empty session identifiers match no rows. The property must map to a
|
|
7
7
|
* single column; type is the explicit SQL cast, not an inferred TypeScript type.
|
|
8
8
|
* Compose in Entity.policies; no Filter or discovery hook is required.
|
|
9
|
+
* @param options - Configuration for this operation.
|
|
10
|
+
* @returns Native policy scoped to the current user identifier.
|
|
9
11
|
*/
|
|
10
12
|
export function userScopePolicy(options = {}) {
|
|
11
13
|
return createScopePolicy("user", options);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-scope.policy.js","sourceRoot":"","sources":["../../src/policies/user-scope.policy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D
|
|
1
|
+
{"version":3,"file":"user-scope.policy.js","sourceRoot":"","sources":["../../src/policies/user-scope.policy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D;;;;;;;;;GASG;AACH,MAAM,UAAU,eAAe,CAAC,UAA8B,EAAE;IAC9D,OAAO,iBAAiB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAC5C,CAAC"}
|
|
@@ -7,5 +7,7 @@ import type { ScopePolicyOptions } from "../interfaces/scope-policy-options.inte
|
|
|
7
7
|
* service authorization. Missing/empty session identifiers match no rows.
|
|
8
8
|
* Requires a single-column mapping and a matching explicit SQL type.
|
|
9
9
|
* Compose in Entity.policies; no Filter or discovery hook is required.
|
|
10
|
+
* @param options - Configuration for this operation.
|
|
11
|
+
* @returns Native policy scoped to the current workspace identifier.
|
|
10
12
|
*/
|
|
11
13
|
export declare function workspaceScopePolicy(options?: ScopePolicyOptions): PolicyDef;
|
|
@@ -6,6 +6,8 @@ import { createScopePolicy } from "./create-scope-policy.js";
|
|
|
6
6
|
* service authorization. Missing/empty session identifiers match no rows.
|
|
7
7
|
* Requires a single-column mapping and a matching explicit SQL type.
|
|
8
8
|
* Compose in Entity.policies; no Filter or discovery hook is required.
|
|
9
|
+
* @param options - Configuration for this operation.
|
|
10
|
+
* @returns Native policy scoped to the current workspace identifier.
|
|
9
11
|
*/
|
|
10
12
|
export function workspaceScopePolicy(options = {}) {
|
|
11
13
|
return createScopePolicy("workspace", options);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-scope.policy.js","sourceRoot":"","sources":["../../src/policies/workspace-scope.policy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D
|
|
1
|
+
{"version":3,"file":"workspace-scope.policy.js","sourceRoot":"","sources":["../../src/policies/workspace-scope.policy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D;;;;;;;;;GASG;AACH,MAAM,UAAU,oBAAoB,CAClC,UAA8B,EAAE;IAEhC,OAAO,iBAAiB,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;AACjD,CAAC"}
|
|
@@ -29,40 +29,107 @@ export declare class AuthResolver {
|
|
|
29
29
|
* @param authService - Application authentication service.
|
|
30
30
|
*/
|
|
31
31
|
constructor(authService: AuthService);
|
|
32
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* Returns password limits without requiring a session.
|
|
34
|
+
* @returns Configured password length limits.
|
|
35
|
+
*/
|
|
33
36
|
passwordPolicy(): PasswordPolicy;
|
|
34
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* Returns the currently authenticated user.
|
|
39
|
+
* @returns Authenticated user from the current request.
|
|
40
|
+
*/
|
|
35
41
|
currentUser(): User;
|
|
36
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* Returns the social and generic OAuth providers enabled by the server.
|
|
44
|
+
* @returns Available social authentication providers.
|
|
45
|
+
*/
|
|
37
46
|
socialProviders(): Promise<AuthSocialProviderType[]>;
|
|
38
|
-
/**
|
|
47
|
+
/**
|
|
48
|
+
* Returns the unified effective CASL rules for the current request identity.
|
|
49
|
+
* @returns Serializable authorization rules for the current request.
|
|
50
|
+
*/
|
|
39
51
|
currentAbilityRules(): AuthAbilityRuleType[];
|
|
40
|
-
/**
|
|
52
|
+
/**
|
|
53
|
+
* Registers a user with an email address and password.
|
|
54
|
+
* @param input - Requested field values for the operation.
|
|
55
|
+
* @returns Created user identifier and optional session token.
|
|
56
|
+
*/
|
|
41
57
|
signUp(input: AuthSignUpInput): Promise<SignUpPayload>;
|
|
42
|
-
/**
|
|
58
|
+
/**
|
|
59
|
+
* Signs in with an email address and password.
|
|
60
|
+
* @param input - Requested field values for the operation.
|
|
61
|
+
* @returns Sign-in response with the authenticated user.
|
|
62
|
+
*/
|
|
43
63
|
signIn(input: AuthSignInInput): Promise<AuthSignInResultType>;
|
|
44
|
-
/**
|
|
64
|
+
/**
|
|
65
|
+
* Starts a social or generic OAuth sign-in flow.
|
|
66
|
+
* @param input - Requested field values for the operation.
|
|
67
|
+
* @returns Social sign-in result and any redirect information.
|
|
68
|
+
*/
|
|
45
69
|
signInSocial(input: AuthSignInSocialInput): Promise<AuthSignInSocialResultType>;
|
|
46
|
-
/**
|
|
70
|
+
/**
|
|
71
|
+
* Signs out and forwards the session-cookie removal header.
|
|
72
|
+
* @returns Whether the current session was signed out successfully.
|
|
73
|
+
*/
|
|
47
74
|
signOut(): Promise<boolean>;
|
|
48
|
-
/**
|
|
75
|
+
/**
|
|
76
|
+
* Sends an email-verification message.
|
|
77
|
+
* @param input - Requested field values for the operation.
|
|
78
|
+
* @returns Whether the verification email request succeeded.
|
|
79
|
+
*/
|
|
49
80
|
sendVerificationEmail(input: AuthSendVerificationEmailInput): Promise<boolean>;
|
|
50
|
-
/**
|
|
81
|
+
/**
|
|
82
|
+
* Requests an enumeration-safe password-reset message.
|
|
83
|
+
* @param input - Requested field values for the operation.
|
|
84
|
+
* @returns Password reset request status and message.
|
|
85
|
+
*/
|
|
51
86
|
requestPasswordReset(input: AuthRequestPasswordResetInput): Promise<AuthRequestPasswordResetResultType>;
|
|
52
|
-
/**
|
|
87
|
+
/**
|
|
88
|
+
* Resets a password with a password-reset token.
|
|
89
|
+
* @param input - Requested field values for the operation.
|
|
90
|
+
* @returns Whether the password was reset successfully.
|
|
91
|
+
*/
|
|
53
92
|
resetPassword(input: AuthResetPasswordInput): Promise<boolean>;
|
|
54
|
-
/**
|
|
93
|
+
/**
|
|
94
|
+
* Updates the authenticated user's profile.
|
|
95
|
+
* @param input - Requested field values for the operation.
|
|
96
|
+
* @returns Whether the profile update succeeded.
|
|
97
|
+
*/
|
|
55
98
|
updateCurrentUser(input: AuthUpdateUserInput): Promise<boolean>;
|
|
56
|
-
/**
|
|
99
|
+
/**
|
|
100
|
+
* Starts or completes an authenticated email change.
|
|
101
|
+
* @param input - Requested field values for the operation.
|
|
102
|
+
* @returns Whether the email change request succeeded.
|
|
103
|
+
*/
|
|
57
104
|
changeCurrentUserEmail(input: AuthChangeEmailInput): Promise<boolean>;
|
|
58
|
-
/**
|
|
105
|
+
/**
|
|
106
|
+
* Changes the authenticated user's password.
|
|
107
|
+
* @param input - Requested field values for the operation.
|
|
108
|
+
* @returns Replacement session token, when the password change issues one.
|
|
109
|
+
*/
|
|
59
110
|
changeCurrentUserPassword(input: AuthChangePasswordInput): Promise<AuthChangePasswordResultType>;
|
|
60
|
-
/**
|
|
111
|
+
/**
|
|
112
|
+
* Adds a credential password to the authenticated account.
|
|
113
|
+
* @param newPassword - New plaintext password to validate and store.
|
|
114
|
+
* @returns Whether the credential password was set successfully.
|
|
115
|
+
*/
|
|
61
116
|
setCurrentUserPassword(newPassword: string): Promise<boolean>;
|
|
62
|
-
/**
|
|
117
|
+
/**
|
|
118
|
+
* Requests deletion of the authenticated user.
|
|
119
|
+
* @param input - Requested field values for the operation.
|
|
120
|
+
* @returns Account deletion status and any redirect information.
|
|
121
|
+
*/
|
|
63
122
|
deleteCurrentUser(input?: AuthDeleteUserInput): Promise<AuthDeleteUserResultType>;
|
|
64
|
-
/**
|
|
123
|
+
/**
|
|
124
|
+
* Starts a social or OpenID Connect account-linking flow.
|
|
125
|
+
* @param input - Requested field values for the operation.
|
|
126
|
+
* @returns Account linking response and any provider redirect URL.
|
|
127
|
+
*/
|
|
65
128
|
linkCurrentUserAccount(input: AuthLinkSocialAccountInput): Promise<AuthLinkSocialAccountResultType>;
|
|
66
|
-
/**
|
|
129
|
+
/**
|
|
130
|
+
* Unlinks an authentication account from the current user.
|
|
131
|
+
* @param id - Identifier of the record to access.
|
|
132
|
+
* @returns Whether the provider account was unlinked successfully.
|
|
133
|
+
*/
|
|
67
134
|
unlinkCurrentUserAccount(id: string): Promise<boolean>;
|
|
68
135
|
}
|
|
@@ -47,81 +47,148 @@ let AuthResolver = class AuthResolver {
|
|
|
47
47
|
constructor(authService) {
|
|
48
48
|
this.authService = authService;
|
|
49
49
|
}
|
|
50
|
-
/**
|
|
50
|
+
/**
|
|
51
|
+
* Returns password limits without requiring a session.
|
|
52
|
+
* @returns Configured password length limits.
|
|
53
|
+
*/
|
|
51
54
|
passwordPolicy() {
|
|
52
55
|
return this.authService.getPasswordPolicy();
|
|
53
56
|
}
|
|
54
|
-
/**
|
|
57
|
+
/**
|
|
58
|
+
* Returns the currently authenticated user.
|
|
59
|
+
* @returns Authenticated user from the current request.
|
|
60
|
+
*/
|
|
55
61
|
currentUser() {
|
|
56
62
|
return this.authService.getCurrentUser();
|
|
57
63
|
}
|
|
58
|
-
/**
|
|
64
|
+
/**
|
|
65
|
+
* Returns the social and generic OAuth providers enabled by the server.
|
|
66
|
+
* @returns Available social authentication providers.
|
|
67
|
+
*/
|
|
59
68
|
async socialProviders() {
|
|
60
69
|
return await this.authService.listSocialProviders();
|
|
61
70
|
}
|
|
62
|
-
/**
|
|
71
|
+
/**
|
|
72
|
+
* Returns the unified effective CASL rules for the current request identity.
|
|
73
|
+
* @returns Serializable authorization rules for the current request.
|
|
74
|
+
*/
|
|
63
75
|
currentAbilityRules() {
|
|
64
76
|
return toAbilityRuleTypes(serializeAbilityRules(getAuthAbility()));
|
|
65
77
|
}
|
|
66
|
-
/**
|
|
78
|
+
/**
|
|
79
|
+
* Registers a user with an email address and password.
|
|
80
|
+
* @param input - Requested field values for the operation.
|
|
81
|
+
* @returns Created user identifier and optional session token.
|
|
82
|
+
*/
|
|
67
83
|
async signUp(input) {
|
|
68
84
|
return await this.authService.signUpPayload({ ...input });
|
|
69
85
|
}
|
|
70
|
-
/**
|
|
86
|
+
/**
|
|
87
|
+
* Signs in with an email address and password.
|
|
88
|
+
* @param input - Requested field values for the operation.
|
|
89
|
+
* @returns Sign-in response with the authenticated user.
|
|
90
|
+
*/
|
|
71
91
|
async signIn(input) {
|
|
72
92
|
return await this.authService.signInEntity(input);
|
|
73
93
|
}
|
|
74
|
-
/**
|
|
94
|
+
/**
|
|
95
|
+
* Starts a social or generic OAuth sign-in flow.
|
|
96
|
+
* @param input - Requested field values for the operation.
|
|
97
|
+
* @returns Social sign-in result and any redirect information.
|
|
98
|
+
*/
|
|
75
99
|
async signInSocial(input) {
|
|
76
100
|
return await this.authService.signInSocialEntity({
|
|
77
101
|
...input,
|
|
78
102
|
disableRedirect: true,
|
|
79
103
|
});
|
|
80
104
|
}
|
|
81
|
-
/**
|
|
105
|
+
/**
|
|
106
|
+
* Signs out and forwards the session-cookie removal header.
|
|
107
|
+
* @returns Whether the current session was signed out successfully.
|
|
108
|
+
*/
|
|
82
109
|
async signOut() {
|
|
83
110
|
return await this.authService.signOut();
|
|
84
111
|
}
|
|
85
|
-
/**
|
|
112
|
+
/**
|
|
113
|
+
* Sends an email-verification message.
|
|
114
|
+
* @param input - Requested field values for the operation.
|
|
115
|
+
* @returns Whether the verification email request succeeded.
|
|
116
|
+
*/
|
|
86
117
|
async sendVerificationEmail(input) {
|
|
87
118
|
return await this.authService.sendVerificationEmail(input);
|
|
88
119
|
}
|
|
89
|
-
/**
|
|
120
|
+
/**
|
|
121
|
+
* Requests an enumeration-safe password-reset message.
|
|
122
|
+
* @param input - Requested field values for the operation.
|
|
123
|
+
* @returns Password reset request status and message.
|
|
124
|
+
*/
|
|
90
125
|
async requestPasswordReset(input) {
|
|
91
126
|
return await this.authService.requestPasswordReset(input);
|
|
92
127
|
}
|
|
93
|
-
/**
|
|
128
|
+
/**
|
|
129
|
+
* Resets a password with a password-reset token.
|
|
130
|
+
* @param input - Requested field values for the operation.
|
|
131
|
+
* @returns Whether the password was reset successfully.
|
|
132
|
+
*/
|
|
94
133
|
async resetPassword(input) {
|
|
95
134
|
return await this.authService.resetPassword(input);
|
|
96
135
|
}
|
|
97
|
-
/**
|
|
136
|
+
/**
|
|
137
|
+
* Updates the authenticated user's profile.
|
|
138
|
+
* @param input - Requested field values for the operation.
|
|
139
|
+
* @returns Whether the profile update succeeded.
|
|
140
|
+
*/
|
|
98
141
|
async updateCurrentUser(input) {
|
|
99
142
|
return await this.authService.updateCurrentUser({ ...input });
|
|
100
143
|
}
|
|
101
|
-
/**
|
|
144
|
+
/**
|
|
145
|
+
* Starts or completes an authenticated email change.
|
|
146
|
+
* @param input - Requested field values for the operation.
|
|
147
|
+
* @returns Whether the email change request succeeded.
|
|
148
|
+
*/
|
|
102
149
|
async changeCurrentUserEmail(input) {
|
|
103
150
|
return await this.authService.changeCurrentUserEmail(input);
|
|
104
151
|
}
|
|
105
|
-
/**
|
|
152
|
+
/**
|
|
153
|
+
* Changes the authenticated user's password.
|
|
154
|
+
* @param input - Requested field values for the operation.
|
|
155
|
+
* @returns Replacement session token, when the password change issues one.
|
|
156
|
+
*/
|
|
106
157
|
async changeCurrentUserPassword(input) {
|
|
107
158
|
return await this.authService.changeCurrentUserPassword(input);
|
|
108
159
|
}
|
|
109
|
-
/**
|
|
160
|
+
/**
|
|
161
|
+
* Adds a credential password to the authenticated account.
|
|
162
|
+
* @param newPassword - New plaintext password to validate and store.
|
|
163
|
+
* @returns Whether the credential password was set successfully.
|
|
164
|
+
*/
|
|
110
165
|
async setCurrentUserPassword(newPassword) {
|
|
111
166
|
return await this.authService.setCurrentUserPassword(newPassword);
|
|
112
167
|
}
|
|
113
|
-
/**
|
|
168
|
+
/**
|
|
169
|
+
* Requests deletion of the authenticated user.
|
|
170
|
+
* @param input - Requested field values for the operation.
|
|
171
|
+
* @returns Account deletion status and any redirect information.
|
|
172
|
+
*/
|
|
114
173
|
async deleteCurrentUser(input) {
|
|
115
174
|
return await this.authService.deleteCurrentUser(input ?? {});
|
|
116
175
|
}
|
|
117
|
-
/**
|
|
176
|
+
/**
|
|
177
|
+
* Starts a social or OpenID Connect account-linking flow.
|
|
178
|
+
* @param input - Requested field values for the operation.
|
|
179
|
+
* @returns Account linking response and any provider redirect URL.
|
|
180
|
+
*/
|
|
118
181
|
async linkCurrentUserAccount(input) {
|
|
119
182
|
return await this.authService.linkCurrentUserAccount({
|
|
120
183
|
...input,
|
|
121
184
|
disableRedirect: true,
|
|
122
185
|
});
|
|
123
186
|
}
|
|
124
|
-
/**
|
|
187
|
+
/**
|
|
188
|
+
* Unlinks an authentication account from the current user.
|
|
189
|
+
* @param id - Identifier of the record to access.
|
|
190
|
+
* @returns Whether the provider account was unlinked successfully.
|
|
191
|
+
*/
|
|
125
192
|
async unlinkCurrentUserAccount(id) {
|
|
126
193
|
return await this.authService.unlinkCurrentUserAccount({
|
|
127
194
|
accountId: id,
|
|
@@ -263,6 +330,11 @@ AuthResolver = __decorate([
|
|
|
263
330
|
__metadata("design:paramtypes", [AuthService])
|
|
264
331
|
], AuthResolver);
|
|
265
332
|
export { AuthResolver };
|
|
333
|
+
/**
|
|
334
|
+
* Returns graphQL rule objects with actions and subjects normalized to arrays.
|
|
335
|
+
* @param rules - Authorization rules to apply.
|
|
336
|
+
* @returns GraphQL rule objects with actions and subjects normalized to arrays.
|
|
337
|
+
*/
|
|
266
338
|
function toAbilityRuleTypes(rules) {
|
|
267
339
|
return rules.map((rule) => ({
|
|
268
340
|
actions: Array.isArray(rule.action) ? rule.action : [rule.action],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.resolver.js","sourceRoot":"","sources":["../../src/resolvers/auth.resolver.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEzE,OAAO,EAAE,MAAM,EAAE,MAAM,mCAAmC,CAAC;AAC3D,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AACzF,OAAO,EAAE,6BAA6B,EAAE,MAAM,gDAAgD,CAAC;AAC/F,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAChF,OAAO,EAAE,8BAA8B,EAAE,MAAM,iDAAiD,CAAC;AACjG,O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member API-key domain service. */
|
|
12
12
|
readonly apiKeyService: MemberApiKeyService;
|
|
13
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* Creates the member API-key resolver.
|
|
15
|
+
* @param apiKeyService - Service for validating or managing API keys.
|
|
16
|
+
*/
|
|
14
17
|
constructor(
|
|
15
18
|
/** Member API-key domain service. */
|
|
16
19
|
apiKeyService: MemberApiKeyService);
|
|
17
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* Lists permission choices for keys owned by the selected workspace.
|
|
22
|
+
* @param workspace - The workspace that scopes this operation.
|
|
23
|
+
* @returns Permission choices and grant availability for member API keys.
|
|
24
|
+
*/
|
|
18
25
|
memberApiKeyPermissions(workspace: Workspace): MemberApiKeyPermissionOption[];
|
|
19
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* Creates a credential and returns its plaintext once.
|
|
28
|
+
* @param input - Requested field values for the operation.
|
|
29
|
+
* @param workspace - The workspace that scopes this operation.
|
|
30
|
+
* @returns Created key metadata and its one-time plaintext credential.
|
|
31
|
+
*/
|
|
20
32
|
createMemberApiKey(input: CreateMemberApiKeyInput, workspace: Workspace): Promise<CreateMemberApiKeyResult>;
|
|
21
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* Updates a credential owned by the current workspace.
|
|
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
|
updateMemberApiKey(id: string, input: UpdateMemberApiKeyInput): Promise<ApiKeyMetadata<MemberApiKey>>;
|
|
23
|
-
/**
|
|
40
|
+
/**
|
|
41
|
+
* Deletes a credential owned by the current workspace.
|
|
42
|
+
* @param id - Identifier of the record to access.
|
|
43
|
+
* @returns Deleted API key metadata without the stored credential hash.
|
|
44
|
+
*/
|
|
24
45
|
deleteMemberApiKey(id: string): Promise<ApiKeyMetadata<MemberApiKey>>;
|
|
25
46
|
}
|
|
@@ -22,17 +22,29 @@ import { MemberApiKeyService } from "../services/member-api-key.service.js";
|
|
|
22
22
|
/** GraphQL mutations for member-owned, workspace-scoped API keys. */
|
|
23
23
|
let MemberApiKeyResolver = class MemberApiKeyResolver {
|
|
24
24
|
apiKeyService;
|
|
25
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* Creates the member API-key resolver.
|
|
27
|
+
* @param apiKeyService - Service for validating or managing API keys.
|
|
28
|
+
*/
|
|
26
29
|
constructor(
|
|
27
30
|
/** Member 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 selected workspace.
|
|
36
|
+
* @param workspace - The workspace that scopes this operation.
|
|
37
|
+
* @returns Permission choices and grant availability for member API keys.
|
|
38
|
+
*/
|
|
32
39
|
memberApiKeyPermissions(workspace) {
|
|
33
40
|
return this.apiKeyService.getMemberApiKeyPermissions(workspace);
|
|
34
41
|
}
|
|
35
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* Creates a credential and returns its plaintext once.
|
|
44
|
+
* @param input - Requested field values for the operation.
|
|
45
|
+
* @param workspace - The workspace that scopes this operation.
|
|
46
|
+
* @returns Created key metadata and its one-time plaintext credential.
|
|
47
|
+
*/
|
|
36
48
|
async createMemberApiKey(input, workspace) {
|
|
37
49
|
const { memberId, ...options } = input;
|
|
38
50
|
return await this.apiKeyService.createMemberApiKey(workspace, {
|
|
@@ -40,11 +52,20 @@ let MemberApiKeyResolver = class MemberApiKeyResolver {
|
|
|
40
52
|
...(memberId ? { member: memberId } : {}),
|
|
41
53
|
});
|
|
42
54
|
}
|
|
43
|
-
/**
|
|
55
|
+
/**
|
|
56
|
+
* Updates a credential owned by the current workspace.
|
|
57
|
+
* @param id - Identifier of the record to access.
|
|
58
|
+
* @param input - Requested field values for the operation.
|
|
59
|
+
* @returns Updated API key metadata without the stored credential hash.
|
|
60
|
+
*/
|
|
44
61
|
async updateMemberApiKey(id, input) {
|
|
45
62
|
return await this.apiKeyService.updateMemberApiKey(id, input);
|
|
46
63
|
}
|
|
47
|
-
/**
|
|
64
|
+
/**
|
|
65
|
+
* Deletes a credential owned by the current workspace.
|
|
66
|
+
* @param id - Identifier of the record to access.
|
|
67
|
+
* @returns Deleted API key metadata without the stored credential hash.
|
|
68
|
+
*/
|
|
48
69
|
async deleteMemberApiKey(id) {
|
|
49
70
|
return await this.apiKeyService.deleteMemberApiKey(id);
|
|
50
71
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"member-api-key.resolver.js","sourceRoot":"","sources":["../../src/resolvers/member-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,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,0CAA0C,CAAC;AACnF,OAAO,EAAE,uBAAuB,EAAE,MAAM,0CAA0C,CAAC;AACnF,OAAO,EAAE,wBAAwB,EAAE,MAAM,mDAAmD,CAAC;AAC7F,OAAO,EAAE,4BAA4B,EAAE,MAAM,uDAAuD,CAAC;AACrG,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAG5E,qEAAqE;AAE9D,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;
|
|
1
|
+
{"version":3,"file":"member-api-key.resolver.js","sourceRoot":"","sources":["../../src/resolvers/member-api-key.resolver.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,E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AE,KAAK,CAAC,CAAC;IAChE,CAAC;IAED;;;;OAIG;IAEG,AAAN,KAAK,CAAC,kBAAkB,CACU,EAAU;QAE1C,OAAO,MAAM,IAAI,CAAC,aAAa,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC;IACzD,CAAC;CACF,CAAA;AAjDC;IADC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,4BAA4B,CAAC,CAAC;IAEzC,WAAA,gBAAgB,EAAE,CAAA;;qCAAY,SAAS;;mEAGzC;AASK;IADL,QAAQ,CAAC,GAAG,EAAE,CAAC,wBAAwB,CAAC;IAEtC,WAAA,IAAI,CAAC,OAAO,CAAC,CAAA;IACb,WAAA,gBAAgB,EAAE,CAAA;;qCADG,uBAAuB;QACd,SAAS;;8DAOzC;AASK;IADL,QAAQ,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC;IAE1B,WAAA,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CAAA;IAC9B,WAAA,IAAI,CAAC,OAAO,CAAC,CAAA;;6CAAQ,uBAAuB;;8DAG9C;AAQK;IADL,QAAQ,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC;IAE1B,WAAA,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CAAA;;;;8DAGhC;AAhEU,oBAAoB;IADhC,QAAQ,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC;qCAQD,mBAAmB;GAPlC,oBAAoB,CAiEhC"}
|
|
@@ -19,33 +19,40 @@ export declare class MemberResolver {
|
|
|
19
19
|
readonly memberService: MemberService;
|
|
20
20
|
/**
|
|
21
21
|
* Creates the workspace member resolver.
|
|
22
|
-
*
|
|
22
|
+
* @param memberService - Service for workspace memberships and service accounts.
|
|
23
23
|
*/
|
|
24
24
|
constructor(
|
|
25
25
|
/** Auth-owned workspace role and permission operations. */
|
|
26
26
|
memberService: MemberService);
|
|
27
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Resolves the user associated with a workspace member.
|
|
29
|
+
* @param member - The workspace membership to inspect or change.
|
|
30
|
+
* @returns Matching user, or null if unavailable.
|
|
31
|
+
*/
|
|
28
32
|
user(member: Member): Promise<User | null>;
|
|
29
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* Lists configured workspace roles with the current principal's grant availability.
|
|
35
|
+
* @returns Workspace role choices and whether each may be granted.
|
|
36
|
+
*/
|
|
30
37
|
workspaceRoles(): WorkspaceRoleOption[];
|
|
31
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* Lists configured workspace permissions with the current principal's grant availability.
|
|
40
|
+
* @returns Workspace permission choices and whether each may be granted.
|
|
41
|
+
*/
|
|
32
42
|
workspacePermissions(): WorkspacePermissionOption[];
|
|
33
43
|
/**
|
|
34
44
|
* Returns the workspace member selected for the current request.
|
|
35
|
-
*
|
|
36
45
|
* @returns Current workspace member, or null when no member was resolved.
|
|
37
46
|
*/
|
|
38
47
|
currentMember(): Member | null;
|
|
39
48
|
/**
|
|
40
49
|
* Returns a workspace member by ID.
|
|
41
|
-
*
|
|
42
50
|
* @param id - Workspace member ID.
|
|
43
51
|
* @returns Matching workspace member, or null when not found.
|
|
44
52
|
*/
|
|
45
53
|
member(id: string): Promise<Member | null>;
|
|
46
54
|
/**
|
|
47
55
|
* Adds an existing user to the workspace by email.
|
|
48
|
-
*
|
|
49
56
|
* @param workspace - Current workspace.
|
|
50
57
|
* @param input - Input for adding a member.
|
|
51
58
|
* @returns Newly created member identifier.
|
|
@@ -53,19 +60,27 @@ export declare class MemberResolver {
|
|
|
53
60
|
addMember(workspace: Workspace, input: AddMemberInput): Promise<AddMemberPayload>;
|
|
54
61
|
/**
|
|
55
62
|
* Updates workspace member details.
|
|
56
|
-
*
|
|
57
63
|
* @param id - ID of the workspace member to update.
|
|
58
64
|
* @param input - Member update input.
|
|
59
65
|
* @returns Updated member identifier.
|
|
60
66
|
*/
|
|
61
67
|
updateMember(id: string, input: UpdateMemberInput): Promise<UpdateMemberPayload | null>;
|
|
62
|
-
/**
|
|
68
|
+
/**
|
|
69
|
+
* Replaces roles assigned to a workspace member.
|
|
70
|
+
* @param id - Identifier of the record to access.
|
|
71
|
+
* @param input - Requested field values for the operation.
|
|
72
|
+
* @returns Identifier of the member whose roles were replaced.
|
|
73
|
+
*/
|
|
63
74
|
setMemberRoles(id: string, input: SetMemberRolesInput): Promise<SetMemberRolesPayload>;
|
|
64
|
-
/**
|
|
75
|
+
/**
|
|
76
|
+
* Replaces direct permissions assigned to a workspace member.
|
|
77
|
+
* @param id - Identifier of the record to access.
|
|
78
|
+
* @param input - Requested field values for the operation.
|
|
79
|
+
* @returns Identifier of the member whose permissions were replaced.
|
|
80
|
+
*/
|
|
65
81
|
setMemberPermissions(id: string, input: SetMemberPermissionsInput): Promise<SetMemberPermissionsPayload>;
|
|
66
82
|
/**
|
|
67
83
|
* Removes a workspace member.
|
|
68
|
-
*
|
|
69
84
|
* @param id - ID of the workspace member to remove.
|
|
70
85
|
* @returns Identifier of the removed workspace member.
|
|
71
86
|
*/
|