@digitraffic/common 2022.11.23-3 → 2022.11.23-5
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.
@@ -24,4 +24,5 @@ export declare class DigitrafficMethodResponse {
|
|
24
24
|
static response(statusCode: string, model: IModel, mediaType: MediaType, disableCors?: boolean): MethodResponse;
|
25
25
|
static response200(model: IModel, mediaType?: MediaType): MethodResponse;
|
26
26
|
static response500(model?: IModel, mediaType?: MediaType): MethodResponse;
|
27
|
+
static response400(model?: IModel, mediaType?: MediaType): MethodResponse;
|
27
28
|
}
|
@@ -84,6 +84,9 @@ class DigitrafficMethodResponse {
|
|
84
84
|
static response500(model = aws_apigateway_1.Model.EMPTY_MODEL, mediaType = mediatypes_1.MediaType.APPLICATION_JSON) {
|
85
85
|
return DigitrafficMethodResponse.response("500", model, mediaType, false);
|
86
86
|
}
|
87
|
+
static response400(model = aws_apigateway_1.Model.EMPTY_MODEL, mediaType = mediatypes_1.MediaType.APPLICATION_JSON) {
|
88
|
+
return DigitrafficMethodResponse.response("400", model, mediaType, false);
|
89
|
+
}
|
87
90
|
}
|
88
91
|
exports.DigitrafficMethodResponse = DigitrafficMethodResponse;
|
89
92
|
//# sourceMappingURL=response.js.map
|
package/package.json
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
{
|
2
2
|
"name": "@digitraffic/common",
|
3
|
-
"version": "2022.11.23-
|
3
|
+
"version": "2022.11.23-5",
|
4
4
|
"description": "",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
7
7
|
"url": "https://github.com/tmfg/digitraffic-common.git"
|
8
8
|
},
|
9
9
|
"engines": {
|
10
|
-
"node": ">=14 <17"
|
11
|
-
"yarn": ">1.2 <2"
|
10
|
+
"node": ">=14 <17"
|
12
11
|
},
|
13
12
|
"license": "EUPL-1.2",
|
14
13
|
"private": false,
|
@@ -25,7 +24,7 @@
|
|
25
24
|
"@types/geojson": "^7946.0.10",
|
26
25
|
"aws-cdk-lib": "^2.51.1",
|
27
26
|
"aws-sdk": "^2.1241.0",
|
28
|
-
"axios": "^
|
27
|
+
"axios": "^1.2.0",
|
29
28
|
"change-case": "^4.1.2",
|
30
29
|
"geojson-validation": "^1.0.2",
|
31
30
|
"moment": "^2.29.4",
|
@@ -133,4 +133,16 @@ export class DigitrafficMethodResponse {
|
|
133
133
|
false
|
134
134
|
);
|
135
135
|
}
|
136
|
+
|
137
|
+
static response400(
|
138
|
+
model = Model.EMPTY_MODEL,
|
139
|
+
mediaType = MediaType.APPLICATION_JSON
|
140
|
+
) {
|
141
|
+
return DigitrafficMethodResponse.response(
|
142
|
+
"400",
|
143
|
+
model,
|
144
|
+
mediaType,
|
145
|
+
false
|
146
|
+
);
|
147
|
+
}
|
136
148
|
}
|