codevdesign 0.0.16 → 0.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.ts +6 -0
- package/modeles/apiReponse.ts +12 -0
- package/modeles/data.ts +21 -0
- package/modeles/response.ts +13 -0
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -16,6 +16,9 @@ import Unite from './modeles/unite'
|
|
|
16
16
|
import Intervention from './modeles/intervention'
|
|
17
17
|
import modeleSnackbar from './modeles/composants/snackbar'
|
|
18
18
|
import modeleDatatableColonne from './modeles/composants/datatableColonne'
|
|
19
|
+
import apiReponse from './modeles/apiReponse'
|
|
20
|
+
import data from './modeles/data'
|
|
21
|
+
import response from './modeles/response'
|
|
19
22
|
import csqcEn from './locales/en.json'
|
|
20
23
|
import csqcFr from './locales/fr.json'
|
|
21
24
|
|
|
@@ -39,4 +42,7 @@ export {
|
|
|
39
42
|
Intervention,
|
|
40
43
|
modeleSnackbar,
|
|
41
44
|
modeleDatatableColonne,
|
|
45
|
+
apiReponse,
|
|
46
|
+
data,
|
|
47
|
+
response,
|
|
42
48
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import response from './response'
|
|
2
|
+
class APIReponse {
|
|
3
|
+
public statusCode: number
|
|
4
|
+
public location?: string
|
|
5
|
+
public response: response
|
|
6
|
+
constructor(statusCode: number, response: any, location?: string) {
|
|
7
|
+
this.statusCode = statusCode
|
|
8
|
+
this.location = location
|
|
9
|
+
this.response = response
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export default APIReponse
|
package/modeles/data.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
class data {
|
|
2
|
+
version: string
|
|
3
|
+
date: Date
|
|
4
|
+
horodatage: number
|
|
5
|
+
//succes: boolean
|
|
6
|
+
code: number
|
|
7
|
+
message: string
|
|
8
|
+
resultat: object | string
|
|
9
|
+
|
|
10
|
+
// Constructeur de la classe
|
|
11
|
+
constructor(code: number, message: string, resultat: any = null, version: string = '1.0') {
|
|
12
|
+
this.version = version
|
|
13
|
+
this.date = new Date()
|
|
14
|
+
this.horodatage = 0
|
|
15
|
+
this.code = code
|
|
16
|
+
this.message = message
|
|
17
|
+
this.resultat = resultat
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export default data
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import datatableColonne from './composants/datatableColonne'
|
|
2
|
+
import data from './data'
|
|
3
|
+
class response {
|
|
4
|
+
public data: data
|
|
5
|
+
public status: number
|
|
6
|
+
// Constructeur de la classe
|
|
7
|
+
constructor(data: any, status: number) {
|
|
8
|
+
this.data = data
|
|
9
|
+
this.status = status
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default response
|