aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/request/abstract-request-interface.ts
blob: a384f4d270c43f5215edbb6a518efca519a206da (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
import * as Promise from 'bluebird'

export interface AbstractRequestClass <T> {
  countTotalRequests: () => Promise<number>
  listWithLimitAndRandom: (limitPods: number, limitRequestsPerPod: number) => Promise<T>
  removeWithEmptyTo: () => Promise<number>
  removeAll: () => Promise<void>
}

export interface AbstractRequestToPodClass {
  removeByRequestIdsAndPod: (ids: number[], podId: number) => Promise<number>
}