mirror of
https://github.com/standardnotes/server
synced 2026-01-16 20:04:32 -05:00
fix: strings for role names
This commit is contained in:
13
.pnp.cjs
generated
13
.pnp.cjs
generated
@@ -3063,18 +3063,6 @@ const RAW_RUNTIME_STATE =
|
||||
"linkType": "HARD"\
|
||||
}]\
|
||||
]],\
|
||||
["@standardnotes/payloads", [\
|
||||
["npm:1.5.1", {\
|
||||
"packageLocation": "./.yarn/cache/@standardnotes-payloads-npm-1.5.1-45dffe2f5c-092457c23a.zip/node_modules/@standardnotes/payloads/",\
|
||||
"packageDependencies": [\
|
||||
["@standardnotes/payloads", "npm:1.5.1"],\
|
||||
["@standardnotes/common", "workspace:packages/common"],\
|
||||
["@standardnotes/features", "npm:1.53.1"],\
|
||||
["@standardnotes/utils", "npm:1.10.0"]\
|
||||
],\
|
||||
"linkType": "HARD"\
|
||||
}]\
|
||||
]],\
|
||||
["@standardnotes/predicates", [\
|
||||
["workspace:packages/predicates", {\
|
||||
"packageLocation": "./packages/predicates/",\
|
||||
@@ -3296,7 +3284,6 @@ const RAW_RUNTIME_STATE =
|
||||
["@standardnotes/domain-core", "workspace:packages/domain-core"],\
|
||||
["@standardnotes/domain-events", "workspace:packages/domain-events"],\
|
||||
["@standardnotes/domain-events-infra", "workspace:packages/domain-events-infra"],\
|
||||
["@standardnotes/payloads", "npm:1.5.1"],\
|
||||
["@standardnotes/responses", "npm:1.11.1"],\
|
||||
["@standardnotes/security", "workspace:packages/security"],\
|
||||
["@standardnotes/settings", "workspace:packages/settings"],\
|
||||
|
||||
Binary file not shown.
@@ -21,7 +21,7 @@ export class FeatureService implements FeatureServiceInterface {
|
||||
@inject(TYPES.Timer) private timer: TimerInterface,
|
||||
) {}
|
||||
|
||||
async getFeaturesForOfflineUser(email: string): Promise<{ features: FeatureDescription[]; roles: Role[] }> {
|
||||
async getFeaturesForOfflineUser(email: string): Promise<{ features: FeatureDescription[]; roles: string[] }> {
|
||||
const userSubscriptions = await this.offlineUserSubscriptionRepository.findByEmail(
|
||||
email,
|
||||
this.timer.getTimestampInMicroseconds(),
|
||||
@@ -37,7 +37,7 @@ export class FeatureService implements FeatureServiceInterface {
|
||||
const roles = [...userRolesMap.values()]
|
||||
return {
|
||||
features: await this.getFeaturesForSubscriptions(userSubscriptions, roles),
|
||||
roles,
|
||||
roles: roles.map((role) => role.name),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import { FeatureDescription } from '@standardnotes/features'
|
||||
|
||||
import { Role } from '../Role/Role'
|
||||
import { User } from '../User/User'
|
||||
|
||||
export interface FeatureServiceInterface {
|
||||
getFeaturesForUser(user: User): Promise<Array<FeatureDescription>>
|
||||
getFeaturesForOfflineUser(email: string): Promise<{ features: FeatureDescription[]; roles: Role[] }>
|
||||
getFeaturesForOfflineUser(email: string): Promise<{ features: FeatureDescription[]; roles: string[] }>
|
||||
}
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
import { FeatureDescription } from '@standardnotes/features'
|
||||
|
||||
import { Role } from './../../Role/Role'
|
||||
|
||||
export type GetUserFeaturesResponse =
|
||||
| {
|
||||
success: true
|
||||
features: FeatureDescription[]
|
||||
offlineRoles?: Role[]
|
||||
offlineRoles?: string[]
|
||||
userUuid?: string
|
||||
}
|
||||
| {
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
"@standardnotes/domain-core": "workspace:^",
|
||||
"@standardnotes/domain-events": "workspace:*",
|
||||
"@standardnotes/domain-events-infra": "workspace:*",
|
||||
"@standardnotes/payloads": "^1.5.1",
|
||||
"@standardnotes/responses": "^1.6.39",
|
||||
"@standardnotes/security": "workspace:*",
|
||||
"@standardnotes/settings": "workspace:*",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ContentType } from '@standardnotes/common'
|
||||
import { IntegrityPayload } from '@standardnotes/payloads'
|
||||
import { IntegrityPayload } from '@standardnotes/responses'
|
||||
|
||||
export type ExtendedIntegrityPayload = IntegrityPayload & {
|
||||
content_type: ContentType
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { inject, injectable } from 'inversify'
|
||||
import { IntegrityPayload } from '@standardnotes/payloads'
|
||||
import { IntegrityPayload } from '@standardnotes/responses'
|
||||
import { ContentType } from '@standardnotes/common'
|
||||
|
||||
import TYPES from '../../../Bootstrap/Types'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { IntegrityPayload } from '@standardnotes/payloads'
|
||||
import { IntegrityPayload } from '@standardnotes/responses'
|
||||
|
||||
export type CheckIntegrityDTO = {
|
||||
userUuid: string
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { IntegrityPayload } from '@standardnotes/payloads'
|
||||
import { IntegrityPayload } from '@standardnotes/responses'
|
||||
|
||||
export type CheckIntegrityResponse = {
|
||||
mismatches: IntegrityPayload[]
|
||||
|
||||
18
yarn.lock
18
yarn.lock
@@ -2045,7 +2045,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@standardnotes/common@npm:^1.19.1, @standardnotes/common@npm:^1.23.1, @standardnotes/common@npm:^1.39.0, @standardnotes/common@npm:^1.43.0, @standardnotes/common@npm:^1.46.3, @standardnotes/common@workspace:*, @standardnotes/common@workspace:^, @standardnotes/common@workspace:packages/common":
|
||||
"@standardnotes/common@npm:^1.23.1, @standardnotes/common@npm:^1.39.0, @standardnotes/common@npm:^1.43.0, @standardnotes/common@npm:^1.46.3, @standardnotes/common@workspace:*, @standardnotes/common@workspace:^, @standardnotes/common@workspace:packages/common":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@standardnotes/common@workspace:packages/common"
|
||||
dependencies:
|
||||
@@ -2171,7 +2171,7 @@ __metadata:
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@standardnotes/features@npm:1.53.1, @standardnotes/features@npm:^1.36.3":
|
||||
"@standardnotes/features@npm:1.53.1":
|
||||
version: 1.53.1
|
||||
resolution: "@standardnotes/features@npm:1.53.1"
|
||||
dependencies:
|
||||
@@ -2288,17 +2288,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@standardnotes/payloads@npm:^1.5.1":
|
||||
version: 1.5.1
|
||||
resolution: "@standardnotes/payloads@npm:1.5.1"
|
||||
dependencies:
|
||||
"@standardnotes/common": "npm:^1.19.1"
|
||||
"@standardnotes/features": "npm:^1.36.3"
|
||||
"@standardnotes/utils": "npm:^1.4.6"
|
||||
checksum: 092457c23ae76d6c402f9eac77de167a7bbe05701186b55569af5c1afd320728b8cfa327468e61572141cd541c7188b2182ba534a7e712fc80af26ba9382d264
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@standardnotes/predicates@workspace:*, @standardnotes/predicates@workspace:packages/predicates":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@standardnotes/predicates@workspace:packages/predicates"
|
||||
@@ -2504,7 +2493,6 @@ __metadata:
|
||||
"@standardnotes/domain-core": "workspace:^"
|
||||
"@standardnotes/domain-events": "workspace:*"
|
||||
"@standardnotes/domain-events-infra": "workspace:*"
|
||||
"@standardnotes/payloads": "npm:^1.5.1"
|
||||
"@standardnotes/responses": "npm:^1.6.39"
|
||||
"@standardnotes/security": "workspace:*"
|
||||
"@standardnotes/settings": "workspace:*"
|
||||
@@ -2566,7 +2554,7 @@ __metadata:
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@standardnotes/utils@npm:1.10.0, @standardnotes/utils@npm:^1.4.6":
|
||||
"@standardnotes/utils@npm:1.10.0":
|
||||
version: 1.10.0
|
||||
resolution: "@standardnotes/utils@npm:1.10.0"
|
||||
dependencies:
|
||||
|
||||
Reference in New Issue
Block a user