refactor: remove Uuid and RoleName from @standardnotes/common in favour of @standardnotes/domain-core value objects (#2167)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { ComponentPermission } from '../Component/ComponentPermission'
|
||||
import { ContentType, RoleName, SubscriptionName } from '@standardnotes/common'
|
||||
import { ContentType, SubscriptionName } from '@standardnotes/common'
|
||||
import { ComponentArea } from '../Component/ComponentArea'
|
||||
import { PermissionName } from '../Permission/PermissionName'
|
||||
import { FeatureIdentifier } from './FeatureIdentifier'
|
||||
@@ -9,11 +9,11 @@ import { ThemeDockIcon } from '../Component/ThemeDockIcon'
|
||||
|
||||
type RoleFields = {
|
||||
/** Server populated */
|
||||
role_name?: RoleName
|
||||
role_name?: string
|
||||
|
||||
/** Statically populated. Non-influencing; used as a reference by other static consumers (such as email service) */
|
||||
availableInSubscriptions: SubscriptionName[]
|
||||
availableInRoles?: RoleName[]
|
||||
availableInRoles?: string[]
|
||||
}
|
||||
|
||||
export type BaseFeatureDescription = RoleFields & {
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { ClientFeatureDescription } from '../Feature/FeatureDescription'
|
||||
import { PermissionName } from '../Permission/PermissionName'
|
||||
import { FeatureIdentifier } from '../Feature/FeatureIdentifier'
|
||||
import { RoleName, SubscriptionName } from '@standardnotes/common'
|
||||
import { SubscriptionName } from '@standardnotes/common'
|
||||
import { RoleName } from '@standardnotes/domain-core'
|
||||
|
||||
export function clientFeatures(): ClientFeatureDescription[] {
|
||||
return [
|
||||
@@ -19,7 +20,7 @@ export function clientFeatures(): ClientFeatureDescription[] {
|
||||
permission_name: PermissionName.SuperEditor,
|
||||
description:
|
||||
'Type / to bring up the block selection menu, or @ to embed images or link other tags and notes. Type - then space to start a list, or [] then space to start a checklist. Drag and drop an image or file to embed it in your note.',
|
||||
availableInRoles: [RoleName.PlusUser, RoleName.ProUser],
|
||||
availableInRoles: [RoleName.NAMES.PlusUser, RoleName.NAMES.ProUser],
|
||||
},
|
||||
{
|
||||
availableInSubscriptions: [SubscriptionName.PlusPlan, SubscriptionName.ProPlan],
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { Uuid } from '@standardnotes/common'
|
||||
|
||||
import { PermissionName } from './PermissionName'
|
||||
|
||||
export type Permission = {
|
||||
uuid: Uuid
|
||||
uuid: string
|
||||
name: PermissionName
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user