response-kit 1.0.0 → 2.0.0

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.
@@ -0,0 +1,39 @@
1
+ const HTTP_STATUS = {
2
+ OK: 200,
3
+ CREATED: 201,
4
+ BAD_REQUEST: 400,
5
+ UNAUTHORIZED: 401,
6
+ FORBIDDEN: 403,
7
+ NOT_FOUND: 404,
8
+ CONFLICT: 409,
9
+ UNPROCESSABLE_ENTITY: 422,
10
+ INTERNAL_SERVER_ERROR: 500,
11
+ };
12
+
13
+ const DEFAULT_MESSAGES = {
14
+ SUCCESS: 'Success',
15
+ CREATED: 'Created Successfully',
16
+ BAD_REQUEST: 'Bad Request',
17
+ UNAUTHORIZED: 'Unauthorized',
18
+ FORBIDDEN: 'Forbidden',
19
+ NOT_FOUND: 'Not Found',
20
+ CONFLICT: 'Conflict',
21
+ INTERNAL_ERROR: 'Internal Server Error',
22
+ VALIDATION_FAILED: 'Validation Failed',
23
+ };
24
+
25
+ const CONFIG_KEYS = {
26
+ SUCCESS_KEY: 'successKey',
27
+ DATA_KEY: 'dataKey',
28
+ MESSAGE_KEY: 'messageKey',
29
+ ERROR_KEY: 'errorKey',
30
+ TIMESTAMP_KEY: 'timestampKey',
31
+ REQUEST_ID_KEY: 'requestIdKey',
32
+ META_KEY: 'metaKey',
33
+ };
34
+
35
+ module.exports = {
36
+ HTTP_STATUS,
37
+ DEFAULT_MESSAGES,
38
+ CONFIG_KEYS,
39
+ };