UNPKG

unleash-server

Version:

Unleash is an enterprise ready feature flag service. It provides different strategies for handling feature flags.

372 lines • 20.3 kB
import type { FromSchema } from 'json-schema-to-ts'; export declare const userAccessOverviewSchema: { readonly $id: "#/components/schemas/userAccessOverviewSchema"; readonly type: "object"; readonly required: readonly ["overview", "user", "rootRole", "projectRoles"]; readonly additionalProperties: false; readonly description: "Describes the access overview (list of permissions and metadata) for a user."; readonly properties: { readonly overview: { readonly type: "object"; readonly required: readonly ["root", "project", "environment"]; readonly additionalProperties: false; readonly description: "The access overview (list of permissions) for the user"; readonly properties: { readonly root: { readonly type: "array"; readonly description: "The list of root permissions"; readonly items: { readonly required: readonly ["id", "name", "displayName", "type", "hasPermission"]; readonly properties: { readonly hasPermission: { readonly type: "boolean"; readonly description: "Whether the user has this permission"; readonly example: true; }; readonly id: { readonly type: "integer"; readonly description: "The ID of the permission"; readonly example: 1; }; readonly name: { readonly type: "string"; readonly description: "The name of the permission"; readonly example: "CREATE_FEATURE_STRATEGY"; }; readonly displayName: { readonly type: "string"; readonly description: "The display name of the permission"; readonly example: "Create activation strategies"; }; readonly type: { readonly type: "string"; readonly description: "The type of the permission"; readonly example: "environment"; }; readonly environment: { readonly type: "string"; readonly nullable: true; readonly description: "The environment that the permission applies to"; readonly example: "dev"; }; }; readonly type: "object"; readonly additionalProperties: false; }; }; readonly project: { readonly type: "array"; readonly description: "The list of project permissions"; readonly items: { readonly required: readonly ["id", "name", "displayName", "type", "hasPermission"]; readonly properties: { readonly hasPermission: { readonly type: "boolean"; readonly description: "Whether the user has this permission"; readonly example: true; }; readonly id: { readonly type: "integer"; readonly description: "The ID of the permission"; readonly example: 1; }; readonly name: { readonly type: "string"; readonly description: "The name of the permission"; readonly example: "CREATE_FEATURE_STRATEGY"; }; readonly displayName: { readonly type: "string"; readonly description: "The display name of the permission"; readonly example: "Create activation strategies"; }; readonly type: { readonly type: "string"; readonly description: "The type of the permission"; readonly example: "environment"; }; readonly environment: { readonly type: "string"; readonly nullable: true; readonly description: "The environment that the permission applies to"; readonly example: "dev"; }; }; readonly type: "object"; readonly additionalProperties: false; }; }; readonly environment: { readonly type: "array"; readonly description: "The list of environment permissions"; readonly items: { readonly required: readonly ["id", "name", "displayName", "type", "hasPermission"]; readonly properties: { readonly hasPermission: { readonly type: "boolean"; readonly description: "Whether the user has this permission"; readonly example: true; }; readonly id: { readonly type: "integer"; readonly description: "The ID of the permission"; readonly example: 1; }; readonly name: { readonly type: "string"; readonly description: "The name of the permission"; readonly example: "CREATE_FEATURE_STRATEGY"; }; readonly displayName: { readonly type: "string"; readonly description: "The display name of the permission"; readonly example: "Create activation strategies"; }; readonly type: { readonly type: "string"; readonly description: "The type of the permission"; readonly example: "environment"; }; readonly environment: { readonly type: "string"; readonly nullable: true; readonly description: "The environment that the permission applies to"; readonly example: "dev"; }; }; readonly type: "object"; readonly additionalProperties: false; }; }; }; }; readonly user: { readonly description: "The user that this access overview is for"; readonly $ref: "#/components/schemas/userSchema"; }; readonly rootRole: { readonly description: "The name of the root role that this user has"; readonly $ref: "#/components/schemas/roleSchema"; }; readonly projectRoles: { readonly type: "array"; readonly description: "The list of project roles that this user has in the selected project"; readonly items: { readonly type: "object"; readonly required: readonly ["id", "type", "name", "permissions"]; readonly additionalProperties: false; readonly properties: { readonly permissions: { readonly type: "array"; readonly description: "The permissions that this role has"; readonly items: { readonly type: "object"; readonly required: readonly ["id", "name", "displayName", "type"]; readonly additionalProperties: false; readonly properties: { readonly id: { readonly type: "integer"; readonly description: "The ID of the permission"; readonly example: 1; }; readonly name: { readonly type: "string"; readonly description: "The name of the permission"; readonly example: "CREATE_FEATURE_STRATEGY"; }; readonly displayName: { readonly type: "string"; readonly description: "The display name of the permission"; readonly example: "Create activation strategies"; }; readonly type: { readonly type: "string"; readonly description: "The type of the permission"; readonly example: "environment"; }; readonly environment: { readonly type: "string"; readonly nullable: true; readonly description: "The environment that the permission applies to"; readonly example: "dev"; }; }; }; }; readonly id: { readonly type: "integer"; readonly description: "The role id"; readonly example: 9; readonly minimum: 0; }; readonly type: { readonly description: "A role can either be a global root role (applies to all projects) or a project role"; readonly type: "string"; readonly example: "root"; }; readonly name: { readonly description: "The name of the role"; readonly type: "string"; readonly example: "Editor"; }; readonly description: { readonly description: "A more detailed description of the role and what use it's intended for"; readonly type: "string"; readonly example: "Users with the editor role have access to most features in Unleash but can not manage users and roles in the global scope. Editors will be added as project owners when creating projects and get superuser rights within the context of these projects. Users with the editor role will also get access to most permissions on the default project by default."; }; readonly project: { readonly description: "What project the role belongs to"; readonly type: "string"; readonly nullable: true; readonly example: "default"; }; }; }; }; }; readonly components: { readonly schemas: { readonly userSchema: { readonly $id: "#/components/schemas/userSchema"; readonly type: "object"; readonly additionalProperties: false; readonly description: "An Unleash user"; readonly required: readonly ["id"]; readonly properties: { readonly id: { readonly description: "The user id"; readonly type: "integer"; readonly example: 123; }; readonly name: { readonly description: "Name of the user"; readonly type: "string"; readonly example: "User"; readonly nullable: true; }; readonly email: { readonly description: "Email of the user"; readonly type: "string"; readonly example: "user@example.com"; }; readonly username: { readonly description: "A unique username for the user"; readonly type: "string"; readonly example: "hunter"; readonly nullable: true; }; readonly imageUrl: { readonly description: "URL used for the user profile image"; readonly type: "string"; readonly example: "https://example.com/242x200.png"; }; readonly inviteLink: { readonly description: "If the user is actively inviting other users, this is the link that can be shared with other users"; readonly type: "string"; readonly example: "http://localhost:4242/invite-link/some-secret"; }; readonly loginAttempts: { readonly description: "How many unsuccessful attempts at logging in has the user made"; readonly type: "integer"; readonly minimum: 0; readonly example: 3; }; readonly emailSent: { readonly description: "Is the welcome email sent to the user or not"; readonly type: "boolean"; readonly example: false; }; readonly rootRole: { readonly description: "Which [root role](https://docs.getunleash.io/reference/rbac#predefined-roles) this user is assigned"; readonly type: "integer"; readonly example: 1; readonly minimum: 0; }; readonly seenAt: { readonly description: "The last time this user logged in"; readonly type: "string"; readonly format: "date-time"; readonly nullable: true; readonly example: "2023-06-30T11:42:00.345Z"; }; readonly createdAt: { readonly description: "The user was created at this time"; readonly type: "string"; readonly format: "date-time"; readonly example: "2023-06-30T11:41:00.123Z"; }; readonly accountType: { readonly description: "A user is either an actual User or a Service Account"; readonly type: "string"; readonly enum: readonly ["User", "Service Account"]; readonly example: "User"; }; readonly permissions: { readonly description: "Deprecated"; readonly type: "array"; readonly items: { readonly type: "string"; }; }; readonly scimId: { readonly description: "The SCIM ID of the user, only present if managed by SCIM"; readonly type: "string"; readonly nullable: true; readonly example: "01HTMEXAMPLESCIMID7SWWGHN6"; }; readonly activeSessions: { readonly description: "Count of active browser sessions for this user"; readonly type: "integer"; readonly nullable: true; readonly example: 2; }; readonly deletedSessions: { readonly description: "Experimental. The number of deleted browser sessions after last login"; readonly type: "number"; readonly example: 1; }; }; readonly components: {}; }; readonly roleSchema: { readonly $id: "#/components/schemas/roleSchema"; readonly type: "object"; readonly description: "A role holds permissions to allow Unleash to decide what actions a role holder is allowed to perform"; readonly additionalProperties: false; readonly required: readonly ["id", "type", "name"]; readonly properties: { readonly id: { readonly type: "integer"; readonly description: "The role id"; readonly example: 9; readonly minimum: 0; }; readonly type: { readonly description: "A role can either be a global root role (applies to all projects) or a project role"; readonly type: "string"; readonly example: "root"; }; readonly name: { readonly description: "The name of the role"; readonly type: "string"; readonly example: "Editor"; }; readonly description: { readonly description: "A more detailed description of the role and what use it's intended for"; readonly type: "string"; readonly example: "Users with the editor role have access to most features in Unleash but can not manage users and roles in the global scope. Editors will be added as project owners when creating projects and get superuser rights within the context of these projects. Users with the editor role will also get access to most permissions on the default project by default."; }; readonly project: { readonly description: "What project the role belongs to"; readonly type: "string"; readonly nullable: true; readonly example: "default"; }; }; readonly components: {}; }; }; }; }; export type UserAccessOverviewSchema = FromSchema<typeof userAccessOverviewSchema>; //# sourceMappingURL=user-access-overview-schema.d.ts.map