@konplit-services/common 1.0.61 → 1.0.63

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.
@@ -44,7 +44,7 @@ const configureSwagger = (app, paths) => {
44
44
  },
45
45
  ],
46
46
  },
47
- apis: [paths],
47
+ apis: ["./routes/*.js"],
48
48
  };
49
49
  const swaggerSpec = (0, swagger_jsdoc_1.default)(options);
50
50
  console.log("====================================");
@@ -0,0 +1,130 @@
1
+ /**
2
+ * @swagger
3
+ * components:
4
+ * schemas:
5
+ * ActivityLog:
6
+ * type: object
7
+ * required:
8
+ * - action
9
+ * - data
10
+ * properties:
11
+ * id:
12
+ * type: string
13
+ * description: The auto-generated id of the role
14
+ * accountId:
15
+ * type: string
16
+ * description: the account id optional
17
+ * role:
18
+ * type: string
19
+ * description: The name of the role
20
+ * email:
21
+ * type: string
22
+ * description: email of the person that carried out the action
23
+ * data:
24
+ * type: object
25
+ * description: email of the person that carried out the action
26
+ * example:
27
+ * id: 36356-376363-33663
28
+ * role: ADMIN
29
+ * email: ibraheemyousouf@gmail.com
30
+ * accountId: 123
31
+ * data: {name: John, email: example@gmail.com}
32
+ * ErrorResponse:
33
+ * type: object
34
+ * properties:
35
+ * status:
36
+ * type: string
37
+ * enum: [FAILED]
38
+ * errors:
39
+ * type: array
40
+ * items:
41
+ * type: object
42
+ * properties:
43
+ * message:
44
+ * type: string
45
+ * field:
46
+ * type: string
47
+ * error_code:
48
+ * type: string
49
+ * code:
50
+ * type: integer
51
+ * SuccessResponse:
52
+ * type: object
53
+ * properties:
54
+ * status:
55
+ * type: string
56
+ * enum: [Success]
57
+ * data:
58
+ * type: object
59
+ * message:
60
+ * type: string
61
+ * code:
62
+ * type: string
63
+ * securitySchemes:
64
+ * type: http
65
+ * scheme: bearer
66
+ * bearerFormat: JWT
67
+ * tags:
68
+ * name: Activity Logs
69
+ * description: The Logs Activity managing API
70
+ * /v1/activityLogs/admins:
71
+ * get:
72
+ * summary: Get Admin Activity Logs
73
+ * tags: [Activity Logs]
74
+ * security:
75
+ * - bearerAuth: []
76
+ * parameters:
77
+ * - in: query
78
+ * name: action
79
+ * schema:
80
+ * type: string
81
+ * description: Filter logs by action
82
+ * - in: query
83
+ * name: email
84
+ * schema:
85
+ * type: string
86
+ * description: Filter logs by email
87
+ * responses:
88
+ * '200':
89
+ * description: Successful operation
90
+ * content:
91
+ * application/json:
92
+ * schema:
93
+ * $ref: '#/components/schemas/SuccessResponse'
94
+ * '400':
95
+ * description: Invalid input
96
+ * content:
97
+ * application/json:
98
+ * schema:
99
+ * $ref: '#/components/schemas/ErrorResponse'
100
+ * /v1/activityLogs/merchants:
101
+ * get:
102
+ * summary: Get Merchant Activity Logs
103
+ * tags: [Activity Logs]
104
+ * security:
105
+ * - bearerAuth: []
106
+ * parameters:
107
+ * - in: query
108
+ * name: action
109
+ * schema:
110
+ * type: string
111
+ * description: Filter logs by action
112
+ * - in: query
113
+ * name: email
114
+ * schema:
115
+ * type: string
116
+ * description: Filter logs by email
117
+ * responses:
118
+ * '200':
119
+ * description: Successful operation
120
+ * content:
121
+ * application/json:
122
+ * schema:
123
+ * $ref: '#/components/schemas/SuccessResponse'
124
+ * '400':
125
+ * description: Invalid input
126
+ * content:
127
+ * application/json:
128
+ * schema:
129
+ * $ref: '#/components/schemas/ErrorResponse'
130
+ */
@@ -0,0 +1,131 @@
1
+ "use strict";
2
+ /**
3
+ * @swagger
4
+ * components:
5
+ * schemas:
6
+ * ActivityLog:
7
+ * type: object
8
+ * required:
9
+ * - action
10
+ * - data
11
+ * properties:
12
+ * id:
13
+ * type: string
14
+ * description: The auto-generated id of the role
15
+ * accountId:
16
+ * type: string
17
+ * description: the account id optional
18
+ * role:
19
+ * type: string
20
+ * description: The name of the role
21
+ * email:
22
+ * type: string
23
+ * description: email of the person that carried out the action
24
+ * data:
25
+ * type: object
26
+ * description: email of the person that carried out the action
27
+ * example:
28
+ * id: 36356-376363-33663
29
+ * role: ADMIN
30
+ * email: ibraheemyousouf@gmail.com
31
+ * accountId: 123
32
+ * data: {name: John, email: example@gmail.com}
33
+ * ErrorResponse:
34
+ * type: object
35
+ * properties:
36
+ * status:
37
+ * type: string
38
+ * enum: [FAILED]
39
+ * errors:
40
+ * type: array
41
+ * items:
42
+ * type: object
43
+ * properties:
44
+ * message:
45
+ * type: string
46
+ * field:
47
+ * type: string
48
+ * error_code:
49
+ * type: string
50
+ * code:
51
+ * type: integer
52
+ * SuccessResponse:
53
+ * type: object
54
+ * properties:
55
+ * status:
56
+ * type: string
57
+ * enum: [Success]
58
+ * data:
59
+ * type: object
60
+ * message:
61
+ * type: string
62
+ * code:
63
+ * type: string
64
+ * securitySchemes:
65
+ * type: http
66
+ * scheme: bearer
67
+ * bearerFormat: JWT
68
+ * tags:
69
+ * name: Activity Logs
70
+ * description: The Logs Activity managing API
71
+ * /v1/activityLogs/admins:
72
+ * get:
73
+ * summary: Get Admin Activity Logs
74
+ * tags: [Activity Logs]
75
+ * security:
76
+ * - bearerAuth: []
77
+ * parameters:
78
+ * - in: query
79
+ * name: action
80
+ * schema:
81
+ * type: string
82
+ * description: Filter logs by action
83
+ * - in: query
84
+ * name: email
85
+ * schema:
86
+ * type: string
87
+ * description: Filter logs by email
88
+ * responses:
89
+ * '200':
90
+ * description: Successful operation
91
+ * content:
92
+ * application/json:
93
+ * schema:
94
+ * $ref: '#/components/schemas/SuccessResponse'
95
+ * '400':
96
+ * description: Invalid input
97
+ * content:
98
+ * application/json:
99
+ * schema:
100
+ * $ref: '#/components/schemas/ErrorResponse'
101
+ * /v1/activityLogs/merchants:
102
+ * get:
103
+ * summary: Get Merchant Activity Logs
104
+ * tags: [Activity Logs]
105
+ * security:
106
+ * - bearerAuth: []
107
+ * parameters:
108
+ * - in: query
109
+ * name: action
110
+ * schema:
111
+ * type: string
112
+ * description: Filter logs by action
113
+ * - in: query
114
+ * name: email
115
+ * schema:
116
+ * type: string
117
+ * description: Filter logs by email
118
+ * responses:
119
+ * '200':
120
+ * description: Successful operation
121
+ * content:
122
+ * application/json:
123
+ * schema:
124
+ * $ref: '#/components/schemas/SuccessResponse'
125
+ * '400':
126
+ * description: Invalid input
127
+ * content:
128
+ * application/json:
129
+ * schema:
130
+ * $ref: '#/components/schemas/ErrorResponse'
131
+ */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@konplit-services/common",
3
- "version": "1.0.61",
3
+ "version": "1.0.63",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -1,12 +0,0 @@
1
- export declare enum QUEUEGROUPNAME {
2
- ACCOUNT_CREATED_QUEUE_NAME = "ACCOUNT_CREATED_QUEUE_NAME",
3
- ACCOUNT_UPDATED_QUEUE_NAME = "ACCOUNT_UPDATED_QUEUE_NAME",
4
- EMAIL_CREATED_QUEUE_NAME = "EMAIL_CREATED_QUEUE_NAME",
5
- SMS_CREATED_QUEUE_NAME = "SMS_CREATED_QUEUE_NAME",
6
- MERCHANT_LOG_CREATED_QUEUE_NAME = "MERCHANT_LOG_CREATED_QUEUE_NAME",
7
- ADMIN_LOG_CREATED_QUEUE_NAME = "ADMIN_LOG_CREATED_QUEUE_NAME",
8
- PERMISSION_CREATED_QUEUE_NAME = "PERMISSION_CREATED_QUEUE_NAME",
9
- PERMISSION_REMOVE_QUEUE_NAME = "PERMISSION_REMOVE_QUEUE_NAME",
10
- USER_CREATED_QUEUE_NAME = "USER_CREATED_QUEUE_NAME",
11
- USER_UPDATED_QUEUE_NAME = "USER_UPDATED_QUEUE_NAME"
12
- }
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.QUEUEGROUPNAME = void 0;
4
- var QUEUEGROUPNAME;
5
- (function (QUEUEGROUPNAME) {
6
- QUEUEGROUPNAME["ACCOUNT_CREATED_QUEUE_NAME"] = "ACCOUNT_CREATED_QUEUE_NAME";
7
- QUEUEGROUPNAME["ACCOUNT_UPDATED_QUEUE_NAME"] = "ACCOUNT_UPDATED_QUEUE_NAME";
8
- QUEUEGROUPNAME["EMAIL_CREATED_QUEUE_NAME"] = "EMAIL_CREATED_QUEUE_NAME";
9
- QUEUEGROUPNAME["SMS_CREATED_QUEUE_NAME"] = "SMS_CREATED_QUEUE_NAME";
10
- QUEUEGROUPNAME["MERCHANT_LOG_CREATED_QUEUE_NAME"] = "MERCHANT_LOG_CREATED_QUEUE_NAME";
11
- QUEUEGROUPNAME["ADMIN_LOG_CREATED_QUEUE_NAME"] = "ADMIN_LOG_CREATED_QUEUE_NAME";
12
- QUEUEGROUPNAME["PERMISSION_CREATED_QUEUE_NAME"] = "PERMISSION_CREATED_QUEUE_NAME";
13
- QUEUEGROUPNAME["PERMISSION_REMOVE_QUEUE_NAME"] = "PERMISSION_REMOVE_QUEUE_NAME";
14
- QUEUEGROUPNAME["USER_CREATED_QUEUE_NAME"] = "USER_CREATED_QUEUE_NAME";
15
- QUEUEGROUPNAME["USER_UPDATED_QUEUE_NAME"] = "USER_UPDATED_QUEUE_NAME";
16
- })(QUEUEGROUPNAME = exports.QUEUEGROUPNAME || (exports.QUEUEGROUPNAME = {}));