1 import * as Sequelize from 'sequelize'
2 import * as Bluebird from 'bluebird'
3 import { FollowState } from '../../../shared/models/accounts/follow.model'
4 import { ResultList } from '../../../shared/models/result-list.model'
5 import { AccountInstance } from './account-interface'
7 export namespace AccountFollowMethods {
8 export type LoadByAccountAndTarget = (accountId: number, targetAccountId: number) => Bluebird<AccountFollowInstance>
10 export type ListFollowingForApi = (id: number, start: number, count: number, sort: string) => Bluebird< ResultList<AccountInstance> >
11 export type ListFollowersForApi = (id: number, start: number, count: number, sort: string) => Bluebird< ResultList<AccountInstance> >
13 export type ListAcceptedFollowerUrlsForApi = (accountId: number[], start?: number, count?: number) => Promise< ResultList<string> >
14 export type ListAcceptedFollowingUrlsForApi = (accountId: number[], start?: number, count?: number) => Promise< ResultList<string> >
15 export type ListAcceptedFollowerSharedInboxUrls = (accountId: number[]) => Promise< ResultList<string> >
18 export interface AccountFollowClass {
19 loadByAccountAndTarget: AccountFollowMethods.LoadByAccountAndTarget
20 listFollowersForApi: AccountFollowMethods.ListFollowersForApi
21 listFollowingForApi: AccountFollowMethods.ListFollowingForApi
23 listAcceptedFollowerUrlsForApi: AccountFollowMethods.ListAcceptedFollowerUrlsForApi
24 listAcceptedFollowingUrlsForApi: AccountFollowMethods.ListAcceptedFollowingUrlsForApi
25 listAcceptedFollowerSharedInboxUrls: AccountFollowMethods.ListAcceptedFollowerSharedInboxUrls
28 export interface AccountFollowAttributes {
30 targetAccountId: number
34 export interface AccountFollowInstance extends AccountFollowClass, AccountFollowAttributes, Sequelize.Instance<AccountFollowAttributes> {
39 AccountFollower?: AccountInstance
40 AccountFollowing?: AccountInstance
43 export interface AccountFollowModel extends AccountFollowClass, Sequelize.Model<AccountFollowInstance, AccountFollowAttributes> {}