From eee41cc6ba322df2f93b9f8dca5148e12b14785c Mon Sep 17 00:00:00 2001 From: mattyatea Date: Wed, 17 Jan 2024 15:41:55 +0900 Subject: [PATCH] Feat: remote local timeline --- .../backend/src/server/api/EndpointsModule.ts | 18 +- packages/backend/src/server/api/endpoints.ts | 2 + .../api/endpoints/notes/any-local-timeline.ts | 247 ++++++++++++++ .../frontend/src/components/MkTimeline.vue | 15 +- .../frontend/src/pages/settings/general.vue | 130 ++++++++ packages/frontend/src/pages/timeline.vue | 311 ++++++++++-------- packages/frontend/src/store.ts | 80 +++++ 7 files changed, 652 insertions(+), 151 deletions(-) create mode 100644 packages/backend/src/server/api/endpoints/notes/any-local-timeline.ts diff --git a/packages/backend/src/server/api/EndpointsModule.ts b/packages/backend/src/server/api/EndpointsModule.ts index 813cdeaaf8..6ae73c9dc3 100644 --- a/packages/backend/src/server/api/EndpointsModule.ts +++ b/packages/backend/src/server/api/EndpointsModule.ts @@ -283,6 +283,7 @@ import * as ep___notes_featured from './endpoints/notes/featured.js'; import * as ep___notes_globalTimeline from './endpoints/notes/global-timeline.js'; import * as ep___notes_hybridTimeline from './endpoints/notes/hybrid-timeline.js'; import * as ep___notes_localTimeline from './endpoints/notes/local-timeline.js'; +import * as ep___notes_anyLocalTimeline from './endpoints/notes/any-local-timeline.js'; import * as ep___notes_mentions from './endpoints/notes/mentions.js'; import * as ep___notes_polls_recommendation from './endpoints/notes/polls/recommendation.js'; import * as ep___notes_polls_vote from './endpoints/notes/polls/vote.js'; @@ -600,7 +601,7 @@ const $i_importMuting: Provider = { provide: 'ep:i/import-muting', useClass: ep_ const $i_importUserLists: Provider = { provide: 'ep:i/import-user-lists', useClass: ep___i_importUserLists.default }; const $i_importAntennas: Provider = { provide: 'ep:i/import-antennas', useClass: ep___i_importAntennas.default }; const $i_notifications: Provider = { provide: 'ep:i/notifications', useClass: ep___i_notifications.default }; -const $i_userstats: Provider = { provide: 'ep:i/stats', useClass: ep___users_user_stats.default } +const $i_userstats: Provider = { provide: 'ep:i/stats', useClass: ep___users_user_stats.default }; const $i_notificationsGrouped: Provider = { provide: 'ep:i/notifications-grouped', useClass: ep___i_notificationsGrouped.default }; const $i_pageLikes: Provider = { provide: 'ep:i/page-likes', useClass: ep___i_pageLikes.default }; const $i_pages: Provider = { provide: 'ep:i/pages', useClass: ep___i_pages.default }; @@ -658,6 +659,7 @@ const $notes_featured: Provider = { provide: 'ep:notes/featured', useClass: ep__ const $notes_globalTimeline: Provider = { provide: 'ep:notes/global-timeline', useClass: ep___notes_globalTimeline.default }; const $notes_hybridTimeline: Provider = { provide: 'ep:notes/hybrid-timeline', useClass: ep___notes_hybridTimeline.default }; const $notes_localTimeline: Provider = { provide: 'ep:notes/local-timeline', useClass: ep___notes_localTimeline.default }; +const $notes_anyLocalTimeline: Provider = { provide: 'ep:notes/any-local-timeline', useClass: ep___notes_anyLocalTimeline.default }; const $notes_mentions: Provider = { provide: 'ep:notes/mentions', useClass: ep___notes_mentions.default }; const $notes_polls_recommendation: Provider = { provide: 'ep:notes/polls/recommendation', useClass: ep___notes_polls_recommendation.default }; const $notes_polls_vote: Provider = { provide: 'ep:notes/polls/vote', useClass: ep___notes_polls_vote.default }; @@ -783,8 +785,8 @@ const $bubbleGame_ranking: Provider = { provide: 'ep:bubble-game/ranking', useCl $admin_drive_files, $admin_drive_showFile, $admin_emoji_addAliasesBulk, - $admin_emoji_setlocalOnlyBulk, - $admin_emoji_setisSensitiveBulk, + $admin_emoji_setlocalOnlyBulk, + $admin_emoji_setisSensitiveBulk, $admin_emoji_add, $admin_emoji_addRequest, $admin_emoji_copy, @@ -866,7 +868,7 @@ const $bubbleGame_ranking: Provider = { provide: 'ep:bubble-game/ranking', useCl $channels_timeline, $channels_unfollow, $channels_update, - $i_userstats, + $i_userstats, $channels_favorite, $channels_unfavorite, $channels_myFavorites, @@ -1036,6 +1038,7 @@ const $bubbleGame_ranking: Provider = { provide: 'ep:bubble-game/ranking', useCl $notes_globalTimeline, $notes_hybridTimeline, $notes_localTimeline, + $notes_anyLocalTimeline, $notes_mentions, $notes_polls_recommendation, $notes_polls_vote, @@ -1168,12 +1171,12 @@ const $bubbleGame_ranking: Provider = { provide: 'ep:bubble-game/ranking', useCl $admin_emoji_setAliasesBulk, $admin_emoji_setCategoryBulk, $admin_emoji_setLicenseBulk, - $admin_emoji_setlocalOnlyBulk, - $admin_emoji_setisSensitiveBulk, + $admin_emoji_setlocalOnlyBulk, + $admin_emoji_setisSensitiveBulk, $admin_emoji_update, $admin_emoji_updateRequest, $admin_federation_deleteAllFiles, - $i_userstats, + $i_userstats, $admin_federation_refreshRemoteInstanceMetadata, $admin_federation_removeAllFollowing, $admin_federation_updateInstance, @@ -1408,6 +1411,7 @@ const $bubbleGame_ranking: Provider = { provide: 'ep:bubble-game/ranking', useCl $notes_globalTimeline, $notes_hybridTimeline, $notes_localTimeline, + $notes_anyLocalTimeline, $notes_mentions, $notes_polls_recommendation, $notes_polls_vote, diff --git a/packages/backend/src/server/api/endpoints.ts b/packages/backend/src/server/api/endpoints.ts index 7e5e6d5e97..c858735870 100644 --- a/packages/backend/src/server/api/endpoints.ts +++ b/packages/backend/src/server/api/endpoints.ts @@ -284,6 +284,7 @@ import * as ep___notes_featured from './endpoints/notes/featured.js'; import * as ep___notes_globalTimeline from './endpoints/notes/global-timeline.js'; import * as ep___notes_hybridTimeline from './endpoints/notes/hybrid-timeline.js'; import * as ep___notes_localTimeline from './endpoints/notes/local-timeline.js'; +import * as ep___notes_anyLocalTimeline from './endpoints/notes/any-local-timeline.js'; import * as ep___notes_mentions from './endpoints/notes/mentions.js'; import * as ep___notes_polls_recommendation from './endpoints/notes/polls/recommendation.js'; import * as ep___notes_polls_vote from './endpoints/notes/polls/vote.js'; @@ -656,6 +657,7 @@ const eps = [ ['notes/global-timeline', ep___notes_globalTimeline], ['notes/hybrid-timeline', ep___notes_hybridTimeline], ['notes/local-timeline', ep___notes_localTimeline], + ['notes/any-local-timeline', ep___notes_anyLocalTimeline], ['notes/mentions', ep___notes_mentions], ['notes/polls/recommendation', ep___notes_polls_recommendation], ['notes/polls/vote', ep___notes_polls_vote], diff --git a/packages/backend/src/server/api/endpoints/notes/any-local-timeline.ts b/packages/backend/src/server/api/endpoints/notes/any-local-timeline.ts new file mode 100644 index 0000000000..3619661be8 --- /dev/null +++ b/packages/backend/src/server/api/endpoints/notes/any-local-timeline.ts @@ -0,0 +1,247 @@ +/* + * SPDX-FileCopyrightText: syuilo and other misskey contributors + * SPDX-License-Identifier: AGPL-3.0-only + */ + +import { Inject, Injectable } from '@nestjs/common'; +import { In } from 'typeorm'; +import { Endpoint } from '@/server/api/endpoint-base.js'; +import { IdService } from '@/core/IdService.js'; +import { FederatedInstanceService } from '@/core/FederatedInstanceService.js'; +import { HttpRequestService } from '@/core/HttpRequestService.js'; +import { ApDbResolverService } from '@/core/activitypub/ApDbResolverService.js'; +import { ApResolverService } from '@/core/activitypub/ApResolverService.js'; +import { getApId, isActor, isPost } from '@/core/activitypub/type.js'; +import { ApNoteService } from '@/core/activitypub/models/ApNoteService.js'; +import { NoteEntityService } from '@/core/entities/NoteEntityService.js'; +import { DI } from '@/di-symbols.js'; +import type { NotesRepository } from '@/models/_.js'; +import { MiNote, MiUser } from '@/models/_.js'; +import { bindThis } from '@/decorators.js'; +import { MiLocalUser } from '@/models/User.js'; +import { SchemaType } from '@/misc/json-schema.js'; +import { UtilityService } from '@/core/UtilityService.js'; +import { UserEntityService } from '@/core/entities/UserEntityService.js'; +import { MetaService } from '@/core/MetaService.js'; +import { ApPersonService } from '@/core/activitypub/models/ApPersonService.js'; +import { ApiError } from '../../error.js'; + +export const meta = { + tags: ['notes'], + + res: { + type: 'array', + optional: false, nullable: false, + items: { + type: 'object', + optional: false, nullable: false, + ref: 'Note', + }, + }, + + errors: { + hostIsNull: { + message: 'Host is null', + code: 'HOST_NULL', + id: 'PRSMSK-ANY-LTL-0001', + }, + + bothWithRepliesAndWithFiles: { + message: 'Specifying both withReplies and withFiles is not supported', + code: 'BOTH_WITH_REPLIES_AND_WITH_FILES', + id: 'dd9c8400-1cb5-4eef-8a31-200c5f933793', + }, + remoteTokenIsNull: { + message: 'remoteToken is null', + code: 'REMOTE_TOKEN_NULL', + id: 'PRSMSK-ANY-LTL-0002', + }, + }, +} as const; + +export const paramDef = { + type: 'object', + properties: { + withFiles: { type: 'boolean', default: false }, + withRenotes: { type: 'boolean', default: true }, + withReplies: { type: 'boolean', default: false }, + limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, + sinceId: { type: 'string', format: 'misskey:id' }, + untilId: { type: 'string', format: 'misskey:id' }, + allowPartial: { type: 'boolean', default: false }, // true is recommended but for compatibility false by default + sinceDate: { type: 'integer' }, + untilDate: { type: 'integer' }, + host: { type: 'string' }, + remoteToken: { type: 'string' }, + }, + required: [], +} as const; + +@Injectable() +export default class extends Endpoint { // eslint-disable-line import/no-default-export + constructor( + @Inject(DI.notesRepository) + private notesRepository: NotesRepository, + private idService: IdService, + private federatedInstanceService: FederatedInstanceService, + private httpRequestService: HttpRequestService, + private utilityService: UtilityService, + private userEntityService: UserEntityService, + private noteEntityService: NoteEntityService, + private metaService: MetaService, + private apResolverService: ApResolverService, + private apDbResolverService: ApDbResolverService, + private apPersonService: ApPersonService, + private apNoteService: ApNoteService, + ) { + super(meta, paramDef, async (ps, me) => { + const untilId = ps.untilId ?? (ps.untilDate ? this.idService.gen(ps.untilDate!) : null); + const sinceId = ps.sinceId ?? (ps.sinceDate ? this.idService.gen(ps.sinceDate!) : null); + if (ps.host === undefined) throw new ApiError(meta.errors.hostIsNull); + if (ps.remoteToken === undefined) throw new ApiError(meta.errors.remoteTokenIsNull); + const i = await this.federatedInstanceService.fetch(ps.host); + const noteIds = []; + + if (i.softwareName === 'misskey') { + const remoteTimeline: string[] = await (await this.httpRequestService.send('https://' + ps.host + '/api/notes/local-timeline', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + body: JSON.stringify({ + i: ps.remoteToken, + withFiles: ps.withFiles, + withRenotes: ps.withRenotes, + withReplies: ps.withReplies, + limit: 30, + }), + })).json() as string[]; + + if (remoteTimeline.length > 0) { + for (const note of remoteTimeline) { + const uri = `https://${ps.host}/notes/${note.id}`; + const note_ = await this.fetchAny(uri, me); + if (note_ == null) continue; + noteIds.push(note_.id); + } + } + + let notes = await this.notesRepository.findBy({ id: In(noteIds) }); + let packedNote: any[] = await this.noteEntityService.packMany(notes, me, { detail: true }); + if (untilId) { + let lastRemoteId; + const lastUri = packedNote[packedNote.length - 1].uri; + lastRemoteId = lastUri.split('/')[lastUri.split('/').length - 1]; + do { + const remoteTimeline: string[] = await (await this.httpRequestService.send('https://' + ps.host + '/api/notes/local-timeline', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + body: JSON.stringify({ + i: ps.remoteToken, + withFiles: ps.withFiles, + withRenotes: ps.withRenotes, + withReplies: ps.withReplies, + untilId: lastRemoteId, + limit: 30, + }), + })).json() as string[]; + + if (remoteTimeline.length > 0) { + for (const note of remoteTimeline) { + const uri = `https://${ps.host}/notes/${note.id}`; + const note_ = await this.fetchAny(uri, me); + if (note_ == null) continue; + //noteIds.push(note_.id); + lastRemoteId = note_.id; + if (lastRemoteId === ps.untilId) { + break; + } + } + } + } while (lastRemoteId !== ps.untilId); + const remoteTimeline: string[] = await (await this.httpRequestService.send('https://' + ps.host + '/api/notes/local-timeline', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + body: JSON.stringify({ + i: ps.remoteToken, + withFiles: ps.withFiles, + withRenotes: ps.withRenotes, + withReplies: ps.withReplies, + untilId: lastRemoteId, + limit: 30, + }), + })).json() as string[]; + + if (remoteTimeline.length > 0) { + for (const note of remoteTimeline) { + const uri = `https://${ps.host}/notes/${note.id}`; + const note_ = await this.fetchAny(uri, me); + if (note_ == null) continue; + noteIds.push(note_.id); + } + } + } + + notes = await this.notesRepository.findBy({ id: In(noteIds) }); + packedNote = await this.noteEntityService.packMany(notes, me, { detail: true }); + return packedNote.reverse(); + } + }); + } + @bindThis + private async fetchAny(uri: string, me: MiLocalUser | null | undefined) { + // ブロックしてたら中断 + const fetchedMeta = await this.metaService.fetch(); + if (this.utilityService.isBlockedHost(fetchedMeta.blockedHosts, this.utilityService.extractDbHost(uri))) return null; + + let local = await this.mergePack(me, ...await Promise.all([ + this.apDbResolverService.getUserFromApId(uri), + this.apDbResolverService.getNoteFromApId(uri), + ])); + if (local != null) return local; + + // リモートから一旦オブジェクトフェッチ + let object; + try { + const resolver = this.apResolverService.createResolver(); + object = await resolver.resolve(uri) as any; + } catch (e) { + return null; + } + if (!object) return null; + // /@user のような正規id以外で取得できるURIが指定されていた場合、ここで初めて正規URIが確定する + // これはDBに存在する可能性があるため再度DB検索 + if (uri !== object.id) { + local = await this.mergePack(me, ...await Promise.all([ + this.apDbResolverService.getUserFromApId(object.id), + this.apDbResolverService.getNoteFromApId(object.id), + ])); + if (local != null) return local; + } + + return await this.mergePack( + me, + isActor(object) ? await this.apPersonService.createPerson(getApId(object)) : null, + isPost(object) ? await this.apNoteService.createNote(getApId(object), undefined, true) : null, + ); + } + + @bindThis + private async mergePack(me: MiLocalUser | null | undefined, user: MiUser | null | undefined, note: MiNote | null | undefined) { + if (note != null) { + try { + const object = await this.noteEntityService.pack(note, me, { detail: true }); + + return object; + } catch (e) { + return null; + } + } + + return null; + } +} diff --git a/packages/frontend/src/components/MkTimeline.vue b/packages/frontend/src/components/MkTimeline.vue index 3971c71e5e..4f14c62ade 100644 --- a/packages/frontend/src/components/MkTimeline.vue +++ b/packages/frontend/src/components/MkTimeline.vue @@ -152,6 +152,9 @@ function connectChannel() { roleId: props.role, }); } + if (props.src.startsWith('custom-timeline')) { + return; + } if (props.src !== 'directs' || props.src !== 'mentions') connection.on('note', prepend); } @@ -189,13 +192,13 @@ function updatePaginationQuery() { withReplies: props.withReplies, withFiles: props.onlyFiles ? true : undefined, }; - }else if (props.src === 'global') { + } else if (props.src === 'global') { endpoint = 'notes/global-timeline'; query = { withRenotes: props.withRenotes, withFiles: props.onlyFiles ? true : undefined, }; - }else if(props.src === 'media'){ + } else if (props.src === 'media') { endpoint = 'notes/hybrid-timeline'; query = { withFiles: true, @@ -227,7 +230,13 @@ function updatePaginationQuery() { query = { roleId: props.role, }; - } else { + } else if (props.src.startsWith('custom-timeline')) { + endpoint = "notes/any-local-timeline"; + query = { + host: defaultStore.state[`remoteLocalTimelineDomain${props.src.split("-")[2]}`], + remoteToken:defaultStore.state[`remoteLocalTimelineToken${props.src.split("-")[2]}`] + }; + }else { endpoint = null; query = null; } diff --git a/packages/frontend/src/pages/settings/general.vue b/packages/frontend/src/pages/settings/general.vue index 8256670474..44214e925a 100644 --- a/packages/frontend/src/pages/settings/general.vue +++ b/packages/frontend/src/pages/settings/general.vue @@ -220,6 +220,88 @@ SPDX-License-Identifier: AGPL-3.0-only
+ + +
+
+ + + + + + + + + + + + {{ i18n.ts.enable }} + +
+
+ + + + + + + + + + + + {{ i18n.ts.enable }} + +
+
+ + + + + + + + + + + + {{ i18n.ts.enable }} + +
+
+ + + + + + + + + + {{ i18n.ts.enable }} + +
+
+ + + + + + + + + + + + {{ i18n.ts.enable }} + + +
+ + {{ i18n.ts.save}} + +
+
@@ -261,6 +343,7 @@ import { globalEvents } from '@/events.js'; import { claimAchievement } from '@/scripts/achievements.js'; import MkColorInput from '@/components/MkColorInput.vue'; import MkFoldableSection from '@/components/MkFoldableSection.vue'; +import MkInput from '@/components/MkInput.vue'; const lang = ref(miLocalStorage.getItem('lang')); const fontSize = ref(miLocalStorage.getItem('fontSize')); @@ -326,6 +409,29 @@ const showVisibilityColor = computed(defaultStore.makeGetterSetter('showVisibili const disableStreamingTimeline = computed(defaultStore.makeGetterSetter('disableStreamingTimeline')); const useGroupedNotifications = computed(defaultStore.makeGetterSetter('useGroupedNotifications')); const enableSeasonalScreenEffect = computed(defaultStore.makeGetterSetter('enableSeasonalScreenEffect')); +const maxLocalTimeline = 3; +const remoteLocalTimelineDomain1 = ref(defaultStore.state['remoteLocalTimelineDomain1']); +const remoteLocalTimelineToken1 = ref(defaultStore.state['remoteLocalTimelineToken1']); +const remoteLocalTimelineDomain2 = ref(defaultStore.state['remoteLocalTimelineDomain2']); +const remoteLocalTimelineToken2 = ref(defaultStore.state['remoteLocalTimelineToken2']); +const remoteLocalTimelineDomain3 = ref(defaultStore.state['remoteLocalTimelineDomain3']); +const remoteLocalTimelineToken3 = ref(defaultStore.state['remoteLocalTimelineToken3']); +const remoteLocalTimelineDomain4 = ref(defaultStore.state['remoteLocalTimelineDomain4']); +const remoteLocalTimelineToken4 = ref(defaultStore.state['remoteLocalTimelineToken4']); +const remoteLocalTimelineDomain5 = ref(defaultStore.state['remoteLocalTimelineDomain5']); +const remoteLocalTimelineToken5 = ref(defaultStore.state['remoteLocalTimelineToken5']); +const remoteLocalTimelineName1 = ref(defaultStore.state['remoteLocalTimelineName1']); +const remoteLocalTimelineName2 = ref(defaultStore.state['remoteLocalTimelineName2']); +const remoteLocalTimelineName3 = ref(defaultStore.state['remoteLocalTimelineName3']); +const remoteLocalTimelineName4 = ref(defaultStore.state['remoteLocalTimelineName4']); +const remoteLocalTimelineName5 = ref(defaultStore.state['remoteLocalTimelineName5']); + +const remoteLocalTimelineEnable1 = computed(defaultStore.makeGetterSetter('remoteLocalTimelineEnable1')); +const remoteLocalTimelineEnable2 = computed(defaultStore.makeGetterSetter('remoteLocalTimelineEnable2')); +const remoteLocalTimelineEnable3 = computed(defaultStore.makeGetterSetter('remoteLocalTimelineEnable3')); +const remoteLocalTimelineEnable4 = computed(defaultStore.makeGetterSetter('remoteLocalTimelineEnable4')); +const remoteLocalTimelineEnable5 = computed(defaultStore.makeGetterSetter('remoteLocalTimelineEnable5')); + watch(lang, () => { miLocalStorage.setItem('lang', lang.value as string); miLocalStorage.removeItem('locale'); @@ -398,6 +504,30 @@ watch([ await reloadAsk(); }); +async function remoteLocaltimelineSave() { + os.alert({ + type: 'success', + text: i18n.ts.saved, + }); + await reloadAsk(); + defaultStore.set('remoteLocalTimelineDomain1', remoteLocalTimelineDomain1.value); + defaultStore.set('remoteLocalTimelineToken1', remoteLocalTimelineToken1.value); + defaultStore.set('remoteLocalTimelineDomain2', remoteLocalTimelineDomain2.value); + defaultStore.set('remoteLocalTimelineToken2', remoteLocalTimelineToken2.value); + defaultStore.set('remoteLocalTimelineDomain3', remoteLocalTimelineDomain3.value); + defaultStore.set('remoteLocalTimelineToken3', remoteLocalTimelineToken3.value); + defaultStore.set('remoteLocalTimelineDomain4', remoteLocalTimelineDomain4.value); + defaultStore.set('remoteLocalTimelineToken4', remoteLocalTimelineToken4.value); + defaultStore.set('remoteLocalTimelineDomain5', remoteLocalTimelineDomain5.value); + defaultStore.set('remoteLocalTimelineToken5', remoteLocalTimelineToken5.value); + defaultStore.set('remoteLocalTimelineName1', remoteLocalTimelineName1.value); + defaultStore.set('remoteLocalTimelineName2', remoteLocalTimelineName2.value); + defaultStore.set('remoteLocalTimelineName3', remoteLocalTimelineName3.value); + defaultStore.set('remoteLocalTimelineName4', remoteLocalTimelineName4.value); + defaultStore.set('remoteLocalTimelineName5', remoteLocalTimelineName5.value); + +} + const emojiIndexLangs = ['en-US', 'ja-JP', 'ja-JP_hira'] as const; function getEmojiIndexLangName(targetLang: typeof emojiIndexLangs[number]) { diff --git a/packages/frontend/src/pages/timeline.vue b/packages/frontend/src/pages/timeline.vue index 9f2d02f68f..8d5ab4f990 100644 --- a/packages/frontend/src/pages/timeline.vue +++ b/packages/frontend/src/pages/timeline.vue @@ -4,32 +4,32 @@ SPDX-License-Identifier: AGPL-3.0-only --> diff --git a/packages/frontend/src/store.ts b/packages/frontend/src/store.ts index d4181d21d8..aba29558db 100644 --- a/packages/frontend/src/store.ts +++ b/packages/frontend/src/store.ts @@ -465,6 +465,86 @@ export const defaultStore = markRaw(new Storage('base', { where: 'device', default: 44, }, + remoteLocalTimelineDomain1: { + where: 'account', + default: '', + }, + remoteLocalTimelineDomain2: { + where: 'account', + default: '', + }, + remoteLocalTimelineDomain3: { + where: 'account', + default: '', + }, + remoteLocalTimelineDomain4: { + where: 'account', + default: '', + }, + remoteLocalTimelineDomain5: { + where: 'account', + default: '', + }, + remoteLocalTimelineToken1: { + where: 'account', + default: '', + }, + remoteLocalTimelineToken2: { + where: 'account', + default: '', + }, + remoteLocalTimelineToken3: { + where: 'account', + default: '', + }, + remoteLocalTimelineToken4: { + where: 'account', + default: '', + }, + remoteLocalTimelineToken5: { + where: 'account', + default: '', + }, + remoteLocalTimelineEnable1: { + where: 'account', + default: false, + }, + remoteLocalTimelineEnable2: { + where: 'account', + default: false, + }, + remoteLocalTimelineEnable3: { + where: 'account', + default: false, + }, + remoteLocalTimelineEnable4: { + where: 'account', + default: false, + }, + remoteLocalTimelineEnable5: { + where: 'account', + default: false, + }, + remoteLocalTimelineName1: { + where: 'account', + default: 'custom timeline 1', + }, + remoteLocalTimelineName2: { + where: 'account', + default: 'custom timeline 2 ', + }, + remoteLocalTimelineName3: { + where: 'account', + default: 'custom timeline 3', + }, + remoteLocalTimelineName4: { + where: 'account', + default: 'custom timeline 4', + }, + remoteLocalTimelineName5: { + where: 'account', + default: 'custom timeline 5', + }, onlyAndWithSave: { where: 'device', default: false,