gg-express 1.0.112 → 1.0.113
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.
|
@@ -17,7 +17,7 @@ function extract(allData, prepareRoute) {
|
|
|
17
17
|
prepareRoute[route.method][route.url] = {
|
|
18
18
|
requireParams: parentInputToCode(route.requireParams, route.isPartialRequireParam),
|
|
19
19
|
parameter: route.parameter
|
|
20
|
-
? parentInputToCode(
|
|
20
|
+
? parentInputToCode(route.parameter, false)
|
|
21
21
|
: "never",
|
|
22
22
|
responseStructure: parentInputToCode(route.responseStructure, false),
|
|
23
23
|
isPartial: route.isPartialRequireParam,
|
|
@@ -27,9 +27,6 @@ function extract(allData, prepareRoute) {
|
|
|
27
27
|
}
|
|
28
28
|
function parentInputToCode(data, isPartialRequireParam) {
|
|
29
29
|
const recursiveExtract = (target, parentKeyName) => {
|
|
30
|
-
console.log("parentKeyName :", parentKeyName);
|
|
31
|
-
console.log("target :", target);
|
|
32
|
-
console.log("-------");
|
|
33
30
|
const getParentKeyCode = (parentKeyName) => {
|
|
34
31
|
if (isPartialRequireParam === true)
|
|
35
32
|
return `${parentKeyName}?`;
|
package/package.json
CHANGED
|
@@ -41,7 +41,7 @@ function extract(
|
|
|
41
41
|
route.isPartialRequireParam
|
|
42
42
|
),
|
|
43
43
|
parameter: route.parameter
|
|
44
|
-
? parentInputToCode(
|
|
44
|
+
? parentInputToCode(route.parameter, false)
|
|
45
45
|
: "never",
|
|
46
46
|
responseStructure: parentInputToCode(route.responseStructure, false),
|
|
47
47
|
isPartial: route.isPartialRequireParam,
|
|
@@ -56,9 +56,6 @@ function parentInputToCode(
|
|
|
56
56
|
isPartialRequireParam: boolean
|
|
57
57
|
) {
|
|
58
58
|
const recursiveExtract = (target: ConstSchemaType, parentKeyName: string) => {
|
|
59
|
-
console.log("parentKeyName :", parentKeyName)
|
|
60
|
-
console.log("target :", target)
|
|
61
|
-
console.log("-------")
|
|
62
59
|
const getParentKeyCode = (parentKeyName: string) => {
|
|
63
60
|
if (isPartialRequireParam === true) return `${parentKeyName}?`
|
|
64
61
|
else return parentKeyName
|
|
@@ -1,60 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
editTime: string
|
|
16
|
-
createTime: string
|
|
17
|
-
shiftDate: string
|
|
18
|
-
shiftName: string | null
|
|
19
|
-
userName: string
|
|
20
|
-
bookingStatus: "ACTIVE" | "CLOSE" | "CANCEL" | "NO_SHOW"
|
|
21
|
-
is_specificRoom: number
|
|
22
|
-
guestCount: number
|
|
23
|
-
reasonToCancel: string
|
|
24
|
-
note?: string | undefined | null
|
|
25
|
-
}
|
|
26
|
-
parameter: {
|
|
27
|
-
data: { xx: boolean; data: string[] }
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
responseStructure: {
|
|
31
|
-
data: {
|
|
32
|
-
id: number
|
|
33
|
-
bookingGroupID: number
|
|
34
|
-
checkInDate: string
|
|
35
|
-
checkOutDate: string
|
|
36
|
-
checkInTime: string
|
|
37
|
-
checkOutTime: string
|
|
38
|
-
roomRate: number
|
|
39
|
-
extraBedRate: number
|
|
40
|
-
roomNumber?: string | undefined | null
|
|
41
|
-
editTime: string
|
|
42
|
-
createTime: string
|
|
43
|
-
shiftDate: string
|
|
44
|
-
shiftName: string | null
|
|
45
|
-
userName: string
|
|
46
|
-
bookingStatus: "ACTIVE" | "CLOSE" | "CANCEL" | "NO_SHOW"
|
|
47
|
-
is_specificRoom: number
|
|
48
|
-
guestCount: number
|
|
49
|
-
reasonToCancel: string
|
|
50
|
-
note?: string | undefined | null
|
|
51
|
-
}[]
|
|
52
|
-
status: "SUCCESS" | "ERROR"
|
|
53
|
-
message: string
|
|
54
|
-
}
|
|
55
|
-
}
|
|
1
|
+
|
|
2
|
+
export interface staticRouteInterface_hotel_v2 {
|
|
3
|
+
get : {
|
|
4
|
+
"/api/v2/hotel/users/id" : {
|
|
5
|
+
requireParams : { data: { id : number,bookingGroupID : number,checkInDate : string,checkOutDate : string,checkInTime : string,checkOutTime : string,roomRate : number,extraBedRate : number,roomNumber? : string | undefined | null,editTime : string,createTime : string,shiftDate : string,shiftName : string | null,userName : string,bookingStatus : "ACTIVE" | "CLOSE" | "CANCEL" | "NO_SHOW" ,is_specificRoom : number,guestCount : number,reasonToCancel : string,note? : string | undefined | null } , parameter : { xx : boolean,data : (string)[] } },
|
|
6
|
+
responseStructure : {
|
|
7
|
+
data : { id : number,bookingGroupID : number,checkInDate : string,checkOutDate : string,checkInTime : string,checkOutTime : string,roomRate : number,extraBedRate : number,roomNumber? : string | undefined | null,editTime : string,createTime : string,shiftDate : string,shiftName : string | null,userName : string,bookingStatus : "ACTIVE" | "CLOSE" | "CANCEL" | "NO_SHOW" ,is_specificRoom : number,guestCount : number,reasonToCancel : string,note? : string | undefined | null } [] ,
|
|
8
|
+
status: "SUCCESS" | "ERROR",
|
|
9
|
+
message: string
|
|
10
|
+
}
|
|
11
|
+
} },
|
|
12
|
+
post : { },
|
|
13
|
+
put : { },
|
|
14
|
+
delete : { },
|
|
56
15
|
}
|
|
57
|
-
|
|
58
|
-
put: {}
|
|
59
|
-
delete: {}
|
|
60
|
-
}
|
|
16
|
+
|