chore(snjs): remove cloudlink
This commit is contained in:
@@ -1,9 +1,5 @@
|
|||||||
export enum FeatureIdentifier {
|
export enum FeatureIdentifier {
|
||||||
CloudLink = 'org.standardnotes.cloudlink',
|
|
||||||
DailyDropboxBackup = 'org.standardnotes.daily-dropbox-backup',
|
|
||||||
DailyEmailBackup = 'org.standardnotes.daily-email-backup',
|
DailyEmailBackup = 'org.standardnotes.daily-email-backup',
|
||||||
DailyGDriveBackup = 'org.standardnotes.daily-gdrive-backup',
|
|
||||||
DailyOneDriveBackup = 'org.standardnotes.daily-onedrive-backup',
|
|
||||||
Files = 'org.standardnotes.files',
|
Files = 'org.standardnotes.files',
|
||||||
FilesLowStorageTier = 'org.standardnotes.files-low-storage-tier',
|
FilesLowStorageTier = 'org.standardnotes.files-low-storage-tier',
|
||||||
FilesMaximumStorageTier = 'org.standardnotes.files-max-storage-tier',
|
FilesMaximumStorageTier = 'org.standardnotes.files-max-storage-tier',
|
||||||
|
|||||||
@@ -41,21 +41,6 @@ export function serverFeatures(): ServerFeatureDescription[] {
|
|||||||
identifier: FeatureIdentifier.SignInAlerts,
|
identifier: FeatureIdentifier.SignInAlerts,
|
||||||
permission_name: PermissionName.SignInAlerts,
|
permission_name: PermissionName.SignInAlerts,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
availableInSubscriptions: [SubscriptionName.PlusPlan, SubscriptionName.ProPlan],
|
|
||||||
identifier: FeatureIdentifier.DailyDropboxBackup,
|
|
||||||
permission_name: PermissionName.DailyDropboxBackup,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
availableInSubscriptions: [SubscriptionName.PlusPlan, SubscriptionName.ProPlan],
|
|
||||||
identifier: FeatureIdentifier.DailyGDriveBackup,
|
|
||||||
permission_name: PermissionName.DailyGDriveBackup,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
availableInSubscriptions: [SubscriptionName.PlusPlan, SubscriptionName.ProPlan],
|
|
||||||
identifier: FeatureIdentifier.DailyOneDriveBackup,
|
|
||||||
permission_name: PermissionName.DailyOneDriveBackup,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
availableInSubscriptions: [SubscriptionName.ProPlan],
|
availableInSubscriptions: [SubscriptionName.ProPlan],
|
||||||
identifier: FeatureIdentifier.FilesMaximumStorageTier,
|
identifier: FeatureIdentifier.FilesMaximumStorageTier,
|
||||||
|
|||||||
@@ -2,14 +2,10 @@ export enum PermissionName {
|
|||||||
AccountSwitcher = 'app:account-switcher',
|
AccountSwitcher = 'app:account-switcher',
|
||||||
AutobiographyTheme = 'theme:autobiography',
|
AutobiographyTheme = 'theme:autobiography',
|
||||||
BoldEditor = 'editor:bold',
|
BoldEditor = 'editor:bold',
|
||||||
CloudLink = 'component:cloud-link',
|
|
||||||
CodeEditor = 'editor:code-editor',
|
CodeEditor = 'editor:code-editor',
|
||||||
ComponentFilesafe = 'component:filesafe',
|
ComponentFilesafe = 'component:filesafe',
|
||||||
ComponentFolders = 'component:folders',
|
ComponentFolders = 'component:folders',
|
||||||
DailyDropboxBackup = 'server:daily-dropbox-backup',
|
|
||||||
DailyEmailBackup = 'server:daily-email-backup',
|
DailyEmailBackup = 'server:daily-email-backup',
|
||||||
DailyGDriveBackup = 'server:daily-gdrive-backup',
|
|
||||||
DailyOneDriveBackup = 'server:daily-onedrive-backup',
|
|
||||||
Files = 'app:files',
|
Files = 'app:files',
|
||||||
FilesMaximumStorageTier = 'server:files-max-storage-tier',
|
FilesMaximumStorageTier = 'server:files-max-storage-tier',
|
||||||
FilesLowStorageTier = 'server:files-low-storage-tier',
|
FilesLowStorageTier = 'server:files-low-storage-tier',
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ import * as Models from '@standardnotes/models'
|
|||||||
import * as Responses from '@standardnotes/responses'
|
import * as Responses from '@standardnotes/responses'
|
||||||
import * as InternalServices from '../Services'
|
import * as InternalServices from '../Services'
|
||||||
import * as Utils from '@standardnotes/utils'
|
import * as Utils from '@standardnotes/utils'
|
||||||
import * as Settings from '@standardnotes/settings'
|
|
||||||
import { Subscription } from '@standardnotes/security'
|
import { Subscription } from '@standardnotes/security'
|
||||||
import { UuidString, ApplicationEventPayload } from '../Types'
|
import { UuidString, ApplicationEventPayload } from '../Types'
|
||||||
import { applicationEventForSyncEvent } from '@Lib/Application/Event'
|
import { applicationEventForSyncEvent } from '@Lib/Application/Event'
|
||||||
@@ -1154,10 +1153,6 @@ export class SNApplication implements ApplicationInterface, AppGroupManagedAppli
|
|||||||
return this.apiService.isThirdPartyHostUsed()
|
return this.apiService.isThirdPartyHostUsed()
|
||||||
}
|
}
|
||||||
|
|
||||||
public getCloudProviderIntegrationUrl(cloudProviderName: Settings.CloudProvider): string {
|
|
||||||
return this.settingsService.getCloudProviderIntegrationUrl(cloudProviderName)
|
|
||||||
}
|
|
||||||
|
|
||||||
private constructServices() {
|
private constructServices() {
|
||||||
this.createMappers()
|
this.createMappers()
|
||||||
this.createPayloadManager()
|
this.createPayloadManager()
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
import { SNApiService } from '../Api/ApiService'
|
import { SNApiService } from '../Api/ApiService'
|
||||||
import { SettingsGateway } from './SettingsGateway'
|
import { SettingsGateway } from './SettingsGateway'
|
||||||
import { SNSessionManager } from '../Session/SessionManager'
|
import { SNSessionManager } from '../Session/SessionManager'
|
||||||
import { CloudProvider, EmailBackupFrequency, SettingName } from '@standardnotes/settings'
|
import { EmailBackupFrequency, SettingName } from '@standardnotes/settings'
|
||||||
import { ExtensionsServerURL } from '@Lib/Hosts'
|
|
||||||
import { AbstractService, InternalEventBusInterface } from '@standardnotes/services'
|
import { AbstractService, InternalEventBusInterface } from '@standardnotes/services'
|
||||||
import { SettingsClientInterface } from './SettingsClientInterface'
|
import { SettingsClientInterface } from './SettingsClientInterface'
|
||||||
|
|
||||||
@@ -14,12 +13,6 @@ export class SNSettingsService extends AbstractService implements SettingsClient
|
|||||||
[EmailBackupFrequency.Weekly]: 'Weekly',
|
[EmailBackupFrequency.Weekly]: 'Weekly',
|
||||||
}
|
}
|
||||||
|
|
||||||
private cloudProviderIntegrationUrlEndpoints = {
|
|
||||||
[CloudProvider.Dropbox]: 'dropbox',
|
|
||||||
[CloudProvider.Google]: 'gdrive',
|
|
||||||
[CloudProvider.OneDrive]: 'onedrive',
|
|
||||||
}
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private readonly sessionManager: SNSessionManager,
|
private readonly sessionManager: SNSessionManager,
|
||||||
private readonly apiService: SNApiService,
|
private readonly apiService: SNApiService,
|
||||||
@@ -60,11 +53,6 @@ export class SNSettingsService extends AbstractService implements SettingsClient
|
|||||||
return this.frequencyOptionsLabels[frequency]
|
return this.frequencyOptionsLabels[frequency]
|
||||||
}
|
}
|
||||||
|
|
||||||
getCloudProviderIntegrationUrl(cloudProviderName: CloudProvider): string {
|
|
||||||
const { Prod } = ExtensionsServerURL
|
|
||||||
return `${Prod}/${this.cloudProviderIntegrationUrlEndpoints[cloudProviderName]}?redirect_url=${Prod}/components/cloudlink?`
|
|
||||||
}
|
|
||||||
|
|
||||||
override deinit(): void {
|
override deinit(): void {
|
||||||
this.provider?.deinit()
|
this.provider?.deinit()
|
||||||
;(this.provider as unknown) = undefined
|
;(this.provider as unknown) = undefined
|
||||||
|
|||||||
@@ -1,13 +1,9 @@
|
|||||||
import { SettingData } from '@standardnotes/responses'
|
import { SettingData } from '@standardnotes/responses'
|
||||||
import {
|
import {
|
||||||
OneDriveBackupFrequency,
|
|
||||||
MuteSignInEmailsOption,
|
MuteSignInEmailsOption,
|
||||||
MuteFailedCloudBackupsEmailsOption,
|
MuteFailedCloudBackupsEmailsOption,
|
||||||
MuteFailedBackupsEmailsOption,
|
MuteFailedBackupsEmailsOption,
|
||||||
CloudProvider,
|
|
||||||
DropboxBackupFrequency,
|
|
||||||
EmailBackupFrequency,
|
EmailBackupFrequency,
|
||||||
GoogleDriveBackupFrequency,
|
|
||||||
ListedAuthorSecretsData,
|
ListedAuthorSecretsData,
|
||||||
LogSessionUserAgentOption,
|
LogSessionUserAgentOption,
|
||||||
SettingName,
|
SettingName,
|
||||||
@@ -15,17 +11,13 @@ import {
|
|||||||
} from '@standardnotes/settings'
|
} from '@standardnotes/settings'
|
||||||
|
|
||||||
type SettingType =
|
type SettingType =
|
||||||
| CloudProvider
|
|
||||||
| DropboxBackupFrequency
|
|
||||||
| EmailBackupFrequency
|
| EmailBackupFrequency
|
||||||
| GoogleDriveBackupFrequency
|
|
||||||
| ListedAuthorSecretsData
|
| ListedAuthorSecretsData
|
||||||
| LogSessionUserAgentOption
|
| LogSessionUserAgentOption
|
||||||
| MuteFailedBackupsEmailsOption
|
| MuteFailedBackupsEmailsOption
|
||||||
| MuteFailedCloudBackupsEmailsOption
|
| MuteFailedCloudBackupsEmailsOption
|
||||||
| MuteSignInEmailsOption
|
| MuteSignInEmailsOption
|
||||||
| MuteMarketingEmailsOption
|
| MuteMarketingEmailsOption
|
||||||
| OneDriveBackupFrequency
|
|
||||||
|
|
||||||
export class SettingsList {
|
export class SettingsList {
|
||||||
private map: Partial<Record<string, SettingData>> = {}
|
private map: Partial<Record<string, SettingData>> = {}
|
||||||
|
|||||||
Reference in New Issue
Block a user