-
Notifications
You must be signed in to change notification settings - Fork 0
/
interfaces.ts
75 lines (65 loc) · 1.44 KB
/
interfaces.ts
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import type { APIResponseBodyError } from '../interfaces.js'
export interface Product {
categoria: string
cod: string
costo: string
desc: string
desc_iva: string
giacenza_iniziale?: number
id: string
magazzino: boolean
nome: string
note: string
prezzo_ivato: boolean
prezzo_lordo?: string
prezzo_netto: string
um: string
valore_iva: string
}
export interface ListOptions {
categoria?: string
cod?: string
nome?: string
page?: number
}
export interface RetrieveConfig {
categoria?: string
cod?: string
id?: string
nome?: string
}
export interface CreateRequestBody {
categoria?: string
cod?: string
cod_iva?: string
desc?: string
desc_iva?: string
giacenza_iniziale?: number
magazzino?: boolean
nome: string
note?: string
prezzo_ivato?: boolean
prezzo_lordo?: number
prezzo_netto?: number
um?: string
}
export interface DeleteRequestBody {
id: string
}
// responses from the FattureInCloud API ==================================== //
export interface APIResponseBodyList extends APIResponseBodyError {
lista_prodotti: Product[]
numero_pagine: number
pagina_corrente: number
success: boolean
}
export interface APIResponseBodyCreate extends APIResponseBodyError {
id: string
success: boolean
}
export interface APIResponseBodyUpdate extends APIResponseBodyError {
success: boolean
}
export interface APIResponseBodyDelete extends APIResponseBodyError {
success: boolean
}