aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/pod/pod-interface.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/pod/pod-interface.ts')
-rw-r--r--server/models/pod/pod-interface.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/server/models/pod/pod-interface.ts b/server/models/pod/pod-interface.ts
index fc763acac..7e095d424 100644
--- a/server/models/pod/pod-interface.ts
+++ b/server/models/pod/pod-interface.ts
@@ -3,6 +3,7 @@ import * as Promise from 'bluebird'
3 3
4// Don't use barrel, import just what we need 4// Don't use barrel, import just what we need
5import { Pod as FormattedPod } from '../../../shared/models/pods/pod.model' 5import { Pod as FormattedPod } from '../../../shared/models/pods/pod.model'
6import { ResultList } from '../../../shared/models/result-list.model'
6 7
7export namespace PodMethods { 8export namespace PodMethods {
8 export type ToFormattedJSON = (this: PodInstance) => FormattedPod 9 export type ToFormattedJSON = (this: PodInstance) => FormattedPod
@@ -13,6 +14,8 @@ export namespace PodMethods {
13 14
14 export type List = () => Promise<PodInstance[]> 15 export type List = () => Promise<PodInstance[]>
15 16
17 export type ListForApi = (start: number, count: number, sort: string) => Promise< ResultList<PodInstance> >
18
16 export type ListAllIds = (transaction: Sequelize.Transaction) => Promise<number[]> 19 export type ListAllIds = (transaction: Sequelize.Transaction) => Promise<number[]>
17 20
18 export type ListRandomPodIdsWithRequest = (limit: number, tableWithPods: string, tableWithPodsJoins: string) => Promise<number[]> 21 export type ListRandomPodIdsWithRequest = (limit: number, tableWithPods: string, tableWithPodsJoins: string) => Promise<number[]>
@@ -32,6 +35,7 @@ export interface PodClass {
32 countAll: PodMethods.CountAll 35 countAll: PodMethods.CountAll
33 incrementScores: PodMethods.IncrementScores 36 incrementScores: PodMethods.IncrementScores
34 list: PodMethods.List 37 list: PodMethods.List
38 listForApi: PodMethods.ListForApi
35 listAllIds: PodMethods.ListAllIds 39 listAllIds: PodMethods.ListAllIds
36 listRandomPodIdsWithRequest: PodMethods.ListRandomPodIdsWithRequest 40 listRandomPodIdsWithRequest: PodMethods.ListRandomPodIdsWithRequest
37 listBadPods: PodMethods.ListBadPods 41 listBadPods: PodMethods.ListBadPods