aboutsummaryrefslogtreecommitdiffstats
path: root/src/wwwroot/scripts/api/order-api.types.ts
blob: 8f4ca253a0041aba9ef445f3a6347a9ff0c69879 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import {Base} from "./db-base";

export interface ValidateOrderPayload {
    products: Array<ProductValidationDto>
}

export interface Order extends Base {
    comment: string,
    paymentType: OrderPaymentType,
    status: OrderStatus,
    ContactInfo: ContactInformation,
    ProductIds: Array<string>
}

export interface SubmitOrderPayload extends Order {
}

export interface ContactInformation {
    name: string,
    phoneNumber: string,
    emailaddress: string
}

export interface ProductValidationDto {
    id: string,
    count: number
}

export enum OrderPaymentType {
    Vipps = 0,
    InvoiceByEmail = 1
}

export enum OrderStatus {
    InProgress = 0,
    Completed = 3,
    Canceled = 1,
    Failed = 2
}