]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/account/account-interface.ts
Fix error when creating a fresh database
[github/Chocobozzz/PeerTube.git] / server / models / account / account-interface.ts
index 6fc36ae9d7fe447c47eee9e84c5b9e0e3b77de7d..1a567fb7a8802cd1242bef0985ab5e24c8d9c638 100644 (file)
@@ -1,8 +1,7 @@
 import * as Bluebird from 'bluebird'
 import * as Sequelize from 'sequelize'
 import { Account as FormattedAccount, ActivityPubActor } from '../../../shared'
-import { ResultList } from '../../../shared/models/result-list.model'
-import { PodInstance } from '../pod/pod-interface'
+import { ServerInstance } from '../server/server-interface'
 import { VideoChannelInstance } from '../video/video-channel-interface'
 
 export namespace AccountMethods {
@@ -11,14 +10,10 @@ export namespace AccountMethods {
   export type Load = (id: number) => Bluebird<AccountInstance>
   export type LoadByUUID = (uuid: string) => Bluebird<AccountInstance>
   export type LoadByUrl = (url: string, transaction?: Sequelize.Transaction) => Bluebird<AccountInstance>
-  export type LoadAccountByPodAndUUID = (uuid: string, podId: number, transaction: Sequelize.Transaction) => Bluebird<AccountInstance>
+  export type LoadAccountByServerAndUUID = (uuid: string, serverId: number, transaction: Sequelize.Transaction) => Bluebird<AccountInstance>
   export type LoadLocalByName = (name: string) => Bluebird<AccountInstance>
   export type LoadByNameAndHost = (name: string, host: string) => Bluebird<AccountInstance>
   export type ListOwned = () => Bluebird<AccountInstance[]>
-  export type ListAcceptedFollowerUrlsForApi = (id: number, start: number, count?: number) => Promise< ResultList<string> >
-  export type ListAcceptedFollowingUrlsForApi = (id: number, start: number, count?: number) => Promise< ResultList<string> >
-  export type ListFollowingForApi = (id: number, start: number, count: number, sort: string) => Bluebird< ResultList<AccountInstance> >
-  export type ListFollowersForApi = (id: number, start: number, count: number, sort: string) => Bluebird< ResultList<AccountInstance> >
 
   export type ToActivityPubObject = (this: AccountInstance) => ActivityPubActor
   export type ToFormattedJSON = (this: AccountInstance) => FormattedAccount
@@ -31,17 +26,13 @@ export namespace AccountMethods {
 
 export interface AccountClass {
   loadApplication: AccountMethods.LoadApplication
-  loadAccountByPodAndUUID: AccountMethods.LoadAccountByPodAndUUID
+  loadAccountByServerAndUUID: AccountMethods.LoadAccountByServerAndUUID
   load: AccountMethods.Load
   loadByUUID: AccountMethods.LoadByUUID
   loadByUrl: AccountMethods.LoadByUrl
   loadLocalByName: AccountMethods.LoadLocalByName
   loadByNameAndHost: AccountMethods.LoadByNameAndHost
   listOwned: AccountMethods.ListOwned
-  listAcceptedFollowerUrlsForApi: AccountMethods.ListAcceptedFollowerUrlsForApi
-  listAcceptedFollowingUrlsForApi: AccountMethods.ListAcceptedFollowingUrlsForApi
-  listFollowingForApi: AccountMethods.ListFollowingForApi
-  listFollowersForApi: AccountMethods.ListFollowersForApi
 }
 
 export interface AccountAttributes {
@@ -59,7 +50,7 @@ export interface AccountAttributes {
 
   uuid?: string
 
-  podId?: number
+  serverId?: number
   userId?: number
   applicationId?: number
 }
@@ -77,7 +68,7 @@ export interface AccountInstance extends AccountClass, AccountAttributes, Sequel
   createdAt: Date
   updatedAt: Date
 
-  Pod: PodInstance
+  Server: ServerInstance
   VideoChannels: VideoChannelInstance[]
 }