@aldb2b/common 1.0.334 → 1.0.335

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.
Files changed (252) hide show
  1. package/build/db/CustomModel.d.ts +4 -0
  2. package/build/db/CustomModel.js +8 -0
  3. package/build/db/CustomModel.js.map +1 -0
  4. package/build/db/MongooseBase.d.ts +41 -0
  5. package/build/db/MongooseBase.js +346 -0
  6. package/build/db/MongooseBase.js.map +1 -0
  7. package/build/db/aggregate/AggregateConvertor.d.ts +23 -0
  8. package/build/db/aggregate/AggregateConvertor.js +212 -0
  9. package/build/db/aggregate/AggregateConvertor.js.map +1 -0
  10. package/build/db/aggregate/createAggregateResponse.d.ts +2 -0
  11. package/build/db/aggregate/createAggregateResponse.js +50 -0
  12. package/build/db/aggregate/createAggregateResponse.js.map +1 -0
  13. package/build/db/mongoose-find-options.d.ts +12 -0
  14. package/build/db/mongoose-find-options.js +68 -0
  15. package/build/db/mongoose-find-options.js.map +1 -0
  16. package/build/decorators/get-event-id-decorator.d.ts +1 -0
  17. package/build/decorators/get-event-id-decorator.js +13 -0
  18. package/build/decorators/get-event-id-decorator.js.map +1 -0
  19. package/build/decorators/get-user-decorator.d.ts +1 -0
  20. package/build/decorators/get-user-decorator.js +13 -0
  21. package/build/decorators/get-user-decorator.js.map +1 -0
  22. package/build/events/exchanges.d.ts +4 -0
  23. package/build/events/exchanges.js +9 -0
  24. package/build/events/exchanges.js.map +1 -0
  25. package/build/index.js.map +1 -1
  26. package/build/interceptors/response-with-code.interceptor.d.ts +6 -0
  27. package/build/interceptors/response-with-code.interceptor.js +32 -0
  28. package/build/interceptors/response-with-code.interceptor.js.map +1 -0
  29. package/build/interceptors/response.interceptor.d.ts +6 -0
  30. package/build/interceptors/response.interceptor.js +31 -0
  31. package/build/interceptors/response.interceptor.js.map +1 -0
  32. package/build/interceptors/serialize.interceptor.d.ts +12 -0
  33. package/build/interceptors/serialize.interceptor.js +25 -0
  34. package/build/interceptors/serialize.interceptor.js.map +1 -0
  35. package/build/middlewares/app.middleware.d.ts +6 -0
  36. package/build/middlewares/app.middleware.js +30 -0
  37. package/build/middlewares/app.middleware.js.map +1 -0
  38. package/build/middlewares/event-status.middleware.d.ts +6 -0
  39. package/build/middlewares/event-status.middleware.js +29 -0
  40. package/build/middlewares/event-status.middleware.js.map +1 -0
  41. package/build/tsconfig.tsbuildinfo +1 -1
  42. package/build/types/analytic-group.interface.d.ts +12 -0
  43. package/build/types/analytic-group.interface.js +3 -0
  44. package/build/types/analytic-group.interface.js.map +1 -0
  45. package/build/types/bulk-users.enum.d.ts +5 -0
  46. package/build/types/bulk-users.enum.js +10 -0
  47. package/build/types/bulk-users.enum.js.map +1 -0
  48. package/build/types/calendar-source-type.enum.d.ts +7 -0
  49. package/build/types/calendar-source-type.enum.js +12 -0
  50. package/build/types/calendar-source-type.enum.js.map +1 -0
  51. package/build/types/chat-group.interface.d.ts +4 -0
  52. package/build/types/chat-group.interface.js +3 -0
  53. package/build/types/chat-group.interface.js.map +1 -0
  54. package/build/types/default-visibility.interface.d.ts +13 -0
  55. package/build/types/default-visibility.interface.js +3 -0
  56. package/build/types/default-visibility.interface.js.map +1 -0
  57. package/build/types/download-presigned-url.interface.d.ts +4 -0
  58. package/build/types/download-presigned-url.interface.js +3 -0
  59. package/build/types/download-presigned-url.interface.js.map +1 -0
  60. package/build/types/enddpoint.interface.d.ts +10 -0
  61. package/build/types/enddpoint.interface.js +3 -0
  62. package/build/types/enddpoint.interface.js.map +1 -0
  63. package/build/types/endpoint-type.enum.d.ts +5 -0
  64. package/build/types/endpoint-type.enum.js +10 -0
  65. package/build/types/endpoint-type.enum.js.map +1 -0
  66. package/build/types/event-status.enum.d.ts +8 -0
  67. package/build/types/event-status.enum.js +13 -0
  68. package/build/types/event-status.enum.js.map +1 -0
  69. package/build/types/feature-mappings.d.ts +18 -0
  70. package/build/types/feature-mappings.js +29 -0
  71. package/build/types/feature-mappings.js.map +1 -0
  72. package/build/types/feature-type.enum.d.ts +20 -0
  73. package/build/types/feature-type.enum.js +25 -0
  74. package/build/types/feature-type.enum.js.map +1 -0
  75. package/build/types/feature.interface.d.ts +10 -0
  76. package/build/types/feature.interface.js +3 -0
  77. package/build/types/feature.interface.js.map +1 -0
  78. package/build/types/group-visibility.interface.d.ts +13 -0
  79. package/build/types/group-visibility.interface.js +3 -0
  80. package/build/types/group-visibility.interface.js.map +1 -0
  81. package/build/types/header-user.interface.d.ts +10 -0
  82. package/build/types/header-user.interface.js +3 -0
  83. package/build/types/header-user.interface.js.map +1 -0
  84. package/build/types/match-group.interface.d.ts +7 -0
  85. package/build/types/match-group.interface.js +3 -0
  86. package/build/types/match-group.interface.js.map +1 -0
  87. package/build/types/match.interface.d.ts +6 -0
  88. package/build/types/match.interface.js +3 -0
  89. package/build/types/match.interface.js.map +1 -0
  90. package/build/types/meeting-request-token.interface.d.ts +6 -0
  91. package/build/types/meeting-request-token.interface.js +3 -0
  92. package/build/types/meeting-request-token.interface.js.map +1 -0
  93. package/build/types/meeting-type.enum.d.ts +8 -0
  94. package/build/types/meeting-type.enum.js +13 -0
  95. package/build/types/meeting-type.enum.js.map +1 -0
  96. package/build/types/notification-event.enum.d.ts +25 -0
  97. package/build/types/notification-event.enum.js +30 -0
  98. package/build/types/notification-event.enum.js.map +1 -0
  99. package/build/types/notification-type.enum.d.ts +6 -0
  100. package/build/types/notification-type.enum.js +11 -0
  101. package/build/types/notification-type.enum.js.map +1 -0
  102. package/build/types/onboarded-thru.enum.d.ts +11 -0
  103. package/build/types/onboarded-thru.enum.js +16 -0
  104. package/build/types/onboarded-thru.enum.js.map +1 -0
  105. package/build/types/operation-types.d.ts +6 -0
  106. package/build/types/operation-types.js +11 -0
  107. package/build/types/operation-types.js.map +1 -0
  108. package/build/types/payment-method.enum.d.ts +5 -0
  109. package/build/types/payment-method.enum.js +10 -0
  110. package/build/types/payment-method.enum.js.map +1 -0
  111. package/build/types/priority.enum.d.ts +6 -0
  112. package/build/types/priority.enum.js +11 -0
  113. package/build/types/priority.enum.js.map +1 -0
  114. package/build/types/read-result.interface.d.ts +5 -0
  115. package/build/types/read-result.interface.js +3 -0
  116. package/build/types/read-result.interface.js.map +1 -0
  117. package/build/types/record-type.enum.d.ts +19 -0
  118. package/build/types/record-type.enum.js +24 -0
  119. package/build/types/record-type.enum.js.map +1 -0
  120. package/build/types/subscription-model.enum.d.ts +4 -0
  121. package/build/types/subscription-model.enum.js +9 -0
  122. package/build/types/subscription-model.enum.js.map +1 -0
  123. package/build/types/update-input-data.interface.d.ts +11 -0
  124. package/build/types/update-input-data.interface.js +3 -0
  125. package/build/types/update-input-data.interface.js.map +1 -0
  126. package/build/types/upload-presigned-url.interface.d.ts +4 -0
  127. package/build/types/upload-presigned-url.interface.js +3 -0
  128. package/build/types/upload-presigned-url.interface.js.map +1 -0
  129. package/build/types/user-invitations.interface.d.ts +6 -0
  130. package/build/types/user-invitations.interface.js +3 -0
  131. package/build/types/user-invitations.interface.js.map +1 -0
  132. package/build/types/user-language.enum.d.ts +5 -0
  133. package/build/types/user-language.enum.js +10 -0
  134. package/build/types/user-language.enum.js.map +1 -0
  135. package/build/types/user-role.enum.d.ts +8 -0
  136. package/build/types/user-role.enum.js +13 -0
  137. package/build/types/user-role.enum.js.map +1 -0
  138. package/build/types/user-type.enum.d.ts +5 -0
  139. package/build/types/user-type.enum.js +10 -0
  140. package/build/types/user-type.enum.js.map +1 -0
  141. package/build/types/visibility-group.interface.d.ts +6 -0
  142. package/build/types/visibility-group.interface.js +3 -0
  143. package/build/types/visibility-group.interface.js.map +1 -0
  144. package/build/utils/addDaysToDate.d.ts +1 -0
  145. package/build/utils/addDaysToDate.js +10 -0
  146. package/build/utils/addDaysToDate.js.map +1 -0
  147. package/build/utils/addHours.d.ts +1 -0
  148. package/build/utils/addHours.js +9 -0
  149. package/build/utils/addHours.js.map +1 -0
  150. package/build/utils/adjustForTimezone.d.ts +1 -0
  151. package/build/utils/adjustForTimezone.js +10 -0
  152. package/build/utils/adjustForTimezone.js.map +1 -0
  153. package/build/utils/create-default-directories.d.ts +1 -0
  154. package/build/utils/create-default-directories.js +24 -0
  155. package/build/utils/create-default-directories.js.map +1 -0
  156. package/build/utils/equal-array-object.d.ts +1 -0
  157. package/build/utils/equal-array-object.js +10 -0
  158. package/build/utils/equal-array-object.js.map +1 -0
  159. package/build/utils/equal-object.d.ts +1 -0
  160. package/build/utils/equal-object.js +9 -0
  161. package/build/utils/equal-object.js.map +1 -0
  162. package/build/utils/get-parsed-query.d.ts +1 -0
  163. package/build/utils/get-parsed-query.js +18 -0
  164. package/build/utils/get-parsed-query.js.map +1 -0
  165. package/build/utils/getEndpoint.d.ts +5 -0
  166. package/build/utils/getEndpoint.js +43 -0
  167. package/build/utils/getEndpoint.js.map +1 -0
  168. package/build/utils/getHeaderParam.d.ts +1 -0
  169. package/build/utils/getHeaderParam.js +8 -0
  170. package/build/utils/getHeaderParam.js.map +1 -0
  171. package/build/utils/parse-query.d.ts +1 -0
  172. package/build/utils/parse-query.js +31 -0
  173. package/build/utils/parse-query.js.map +1 -0
  174. package/build/utils/projection.d.ts +1 -0
  175. package/build/utils/projection.js +26 -0
  176. package/build/utils/projection.js.map +1 -0
  177. package/build/utils/redis-client.d.ts +9 -0
  178. package/build/utils/redis-client.js +55 -0
  179. package/build/utils/redis-client.js.map +1 -0
  180. package/build/utils/rmq/client/rabbitmq.client.d.ts +29 -0
  181. package/build/utils/rmq/client/rabbitmq.client.js +162 -0
  182. package/build/utils/rmq/client/rabbitmq.client.js.map +1 -0
  183. package/build/utils/rmq/constants.d.ts +9 -0
  184. package/build/utils/rmq/constants.js +13 -0
  185. package/build/utils/rmq/constants.js.map +1 -0
  186. package/build/utils/rmq/ctx-host/rmq.context.d.ts +9 -0
  187. package/build/utils/rmq/ctx-host/rmq.context.js +20 -0
  188. package/build/utils/rmq/ctx-host/rmq.context.js.map +1 -0
  189. package/build/utils/rmq/index.d.ts +4 -0
  190. package/build/utils/rmq/index.js +10 -0
  191. package/build/utils/rmq/index.js.map +1 -0
  192. package/build/utils/rmq/interfaces/rmq-options.interfaces.d.ts +79 -0
  193. package/build/utils/rmq/interfaces/rmq-options.interfaces.js +12 -0
  194. package/build/utils/rmq/interfaces/rmq-options.interfaces.js.map +1 -0
  195. package/build/utils/rmq/server/rabbitmq.server.d.ts +19 -0
  196. package/build/utils/rmq/server/rabbitmq.server.js +114 -0
  197. package/build/utils/rmq/server/rabbitmq.server.js.map +1 -0
  198. package/build/utils/timezone.d.ts +2 -0
  199. package/build/utils/timezone.js +15 -0
  200. package/build/utils/timezone.js.map +1 -0
  201. package/build/validators/conditional-required.d.ts +2 -0
  202. package/build/validators/conditional-required.js +24 -0
  203. package/build/validators/conditional-required.js.map +1 -0
  204. package/build/validators/date-validator.d.ts +2 -0
  205. package/build/validators/date-validator.js +21 -0
  206. package/build/validators/date-validator.js.map +1 -0
  207. package/build/validators/responses/customizeArrayResponse.d.ts +3 -0
  208. package/build/validators/responses/customizeArrayResponse.js +24 -0
  209. package/build/validators/responses/customizeArrayResponse.js.map +1 -0
  210. package/build/validators/responses/error-with-code.d.ts +2 -0
  211. package/build/validators/responses/error-with-code.interface.d.ts +5 -0
  212. package/build/validators/responses/error-with-code.interface.js +3 -0
  213. package/build/validators/responses/error-with-code.interface.js.map +1 -0
  214. package/build/validators/responses/error-with-code.js +30 -0
  215. package/build/validators/responses/error-with-code.js.map +1 -0
  216. package/build/validators/responses/error.d.ts +2 -0
  217. package/build/validators/responses/error.interface.d.ts +4 -0
  218. package/build/validators/responses/error.interface.js +3 -0
  219. package/build/validators/responses/error.interface.js.map +1 -0
  220. package/build/validators/responses/error.js +29 -0
  221. package/build/validators/responses/error.js.map +1 -0
  222. package/build/validators/responses/response-option.interface.d.ts +7 -0
  223. package/build/validators/responses/response-option.interface.js +3 -0
  224. package/build/validators/responses/response-option.interface.js.map +1 -0
  225. package/build/validators/responses/succes-result.interface.d.ts +10 -0
  226. package/build/validators/responses/succes-result.interface.js +3 -0
  227. package/build/validators/responses/succes-result.interface.js.map +1 -0
  228. package/build/validators/responses/success-with-code.d.ts +3 -0
  229. package/build/validators/responses/success-with-code.interface.d.ts +4 -0
  230. package/build/validators/responses/success-with-code.interface.js +3 -0
  231. package/build/validators/responses/success-with-code.interface.js.map +1 -0
  232. package/build/validators/responses/success-with-code.js +15 -0
  233. package/build/validators/responses/success-with-code.js.map +1 -0
  234. package/build/validators/responses/success.d.ts +3 -0
  235. package/build/validators/responses/success.interface.d.ts +4 -0
  236. package/build/validators/responses/success.interface.js +3 -0
  237. package/build/validators/responses/success.interface.js.map +1 -0
  238. package/build/validators/responses/success.js +15 -0
  239. package/build/validators/responses/success.js.map +1 -0
  240. package/build/validators/validateNewItem.d.ts +1 -0
  241. package/build/validators/validateNewItem.js +23 -0
  242. package/build/validators/validateNewItem.js.map +1 -0
  243. package/build/validators/validateProjection.d.ts +1 -0
  244. package/build/validators/validateProjection.js +33 -0
  245. package/build/validators/validateProjection.js.map +1 -0
  246. package/build/validators/validateProjectionResult.d.ts +1 -0
  247. package/build/validators/validateProjectionResult.js +37 -0
  248. package/build/validators/validateProjectionResult.js.map +1 -0
  249. package/build/validators/validateUpdateItem.d.ts +1 -0
  250. package/build/validators/validateUpdateItem.js +23 -0
  251. package/build/validators/validateUpdateItem.js.map +1 -0
  252. package/package.json +1 -1
@@ -0,0 +1,6 @@
1
+ export interface UserInvitation {
2
+ exhibitorCompanyUser?: number;
3
+ sponsorCompanyUser?: number;
4
+ visitorCompanyUser?: number;
5
+ hostExhibitorCompanyUser?: number;
6
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=user-invitations.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-invitations.interface.js","sourceRoot":"","sources":["../../src/types/user-invitations.interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ export declare enum UserLanguage {
2
+ ENGLISH = "en",
3
+ ARABIC = "ar",
4
+ FRENCH = "fr"
5
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserLanguage = void 0;
4
+ var UserLanguage;
5
+ (function (UserLanguage) {
6
+ UserLanguage["ENGLISH"] = "en";
7
+ UserLanguage["ARABIC"] = "ar";
8
+ UserLanguage["FRENCH"] = "fr";
9
+ })(UserLanguage = exports.UserLanguage || (exports.UserLanguage = {}));
10
+ //# sourceMappingURL=user-language.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-language.enum.js","sourceRoot":"","sources":["../../src/types/user-language.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,8BAAc,CAAA;IACd,6BAAa,CAAA;IACb,6BAAa,CAAA;AACf,CAAC,EAJW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAIvB"}
@@ -0,0 +1,8 @@
1
+ export declare enum UserRole {
2
+ ADMIN = "Admin",
3
+ MANAGER = "Manager",
4
+ OPERATION = "Operation",
5
+ ONGROUND = "Onground",
6
+ USER = "User",
7
+ EDITOR = "Editor"
8
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserRole = void 0;
4
+ var UserRole;
5
+ (function (UserRole) {
6
+ UserRole["ADMIN"] = "Admin";
7
+ UserRole["MANAGER"] = "Manager";
8
+ UserRole["OPERATION"] = "Operation";
9
+ UserRole["ONGROUND"] = "Onground";
10
+ UserRole["USER"] = "User";
11
+ UserRole["EDITOR"] = "Editor";
12
+ })(UserRole = exports.UserRole || (exports.UserRole = {}));
13
+ //# sourceMappingURL=user-role.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-role.enum.js","sourceRoot":"","sources":["../../src/types/user-role.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,QAOX;AAPD,WAAY,QAAQ;IAClB,2BAAe,CAAA;IACf,+BAAmB,CAAA;IACnB,mCAAuB,CAAA;IACvB,iCAAqB,CAAA;IACrB,yBAAa,CAAA;IACb,6BAAiB,CAAA;AACnB,CAAC,EAPW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAOnB"}
@@ -0,0 +1,5 @@
1
+ export declare enum UserType {
2
+ ADMIN = "Admin",
3
+ ORGANIZER = "Organizer",
4
+ USER = "User"
5
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserType = void 0;
4
+ var UserType;
5
+ (function (UserType) {
6
+ UserType["ADMIN"] = "Admin";
7
+ UserType["ORGANIZER"] = "Organizer";
8
+ UserType["USER"] = "User";
9
+ })(UserType = exports.UserType || (exports.UserType = {}));
10
+ //# sourceMappingURL=user-type.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-type.enum.js","sourceRoot":"","sources":["../../src/types/user-type.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,QAIX;AAJD,WAAY,QAAQ;IAClB,2BAAe,CAAA;IACf,mCAAuB,CAAA;IACvB,yBAAa,CAAA;AACf,CAAC,EAJW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAInB"}
@@ -0,0 +1,6 @@
1
+ export interface VisibilityGroup {
2
+ exhibitor?: boolean;
3
+ visitor?: boolean;
4
+ sponsor?: boolean;
5
+ batches?: boolean;
6
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=visibility-group.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"visibility-group.interface.js","sourceRoot":"","sources":["../../src/types/visibility-group.interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export declare function addDaysToDate(date: Date, days: number): Date;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addDaysToDate = void 0;
4
+ function addDaysToDate(date, days) {
5
+ const result = new Date(date);
6
+ result.setDate(result.getDate() + days);
7
+ return result;
8
+ }
9
+ exports.addDaysToDate = addDaysToDate;
10
+ //# sourceMappingURL=addDaysToDate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"addDaysToDate.js","sourceRoot":"","sources":["../../src/utils/addDaysToDate.ts"],"names":[],"mappings":";;;AAAA,SAAgB,aAAa,CAAC,IAAU,EAAE,IAAY;IACpD,MAAM,MAAM,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAA;IAC7B,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAA;IACvC,OAAO,MAAM,CAAA;AACf,CAAC;AAJD,sCAIC"}
@@ -0,0 +1 @@
1
+ export declare function addHours(hours: number, date: Date): Date;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addHours = void 0;
4
+ function addHours(hours, date) {
5
+ date.setTime(date.getTime() + hours * 60 * 60 * 1000);
6
+ return date;
7
+ }
8
+ exports.addHours = addHours;
9
+ //# sourceMappingURL=addHours.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"addHours.js","sourceRoot":"","sources":["../../src/utils/addHours.ts"],"names":[],"mappings":";;;AAAA,SAAgB,QAAQ,CAAC,KAAa,EAAE,IAAU;IAChD,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,KAAK,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAA;IACrD,OAAO,IAAI,CAAA;AACb,CAAC;AAHD,4BAGC"}
@@ -0,0 +1 @@
1
+ export declare const adjustForTimezone: (date: Date) => Date;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.adjustForTimezone = void 0;
4
+ const adjustForTimezone = (date) => {
5
+ const timeOffsetInMS = date.getTimezoneOffset() * 60000;
6
+ date.setTime(date.getTime() - timeOffsetInMS);
7
+ return date;
8
+ };
9
+ exports.adjustForTimezone = adjustForTimezone;
10
+ //# sourceMappingURL=adjustForTimezone.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adjustForTimezone.js","sourceRoot":"","sources":["../../src/utils/adjustForTimezone.ts"],"names":[],"mappings":";;;AAAO,MAAM,iBAAiB,GAAG,CAAC,IAAU,EAAE,EAAE;IAC9C,MAAM,cAAc,GAAG,IAAI,CAAC,iBAAiB,EAAE,GAAG,KAAK,CAAA;IACvD,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,cAAc,CAAC,CAAA;IAC7C,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAJY,QAAA,iBAAiB,qBAI7B"}
@@ -0,0 +1 @@
1
+ export declare const createDefaultDirectories: (requiredDirs: any) => void;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createDefaultDirectories = void 0;
4
+ const fs = require("fs");
5
+ const createDefaultDirectories = (requiredDirs) => {
6
+ const initialDirectory = './uploads';
7
+ if (!fs.existsSync(initialDirectory)) {
8
+ fs.mkdirSync(initialDirectory);
9
+ }
10
+ const createFiles = (requiredDirs, initialRoute) => {
11
+ requiredDirs.forEach(file => {
12
+ let finalRoute = `${initialRoute}/${file.name}`;
13
+ if (!fs.existsSync(finalRoute)) {
14
+ fs.mkdirSync(finalRoute);
15
+ }
16
+ if (file.subDirs.length) {
17
+ createFiles(file.subDirs, finalRoute);
18
+ }
19
+ });
20
+ };
21
+ createFiles(requiredDirs, initialDirectory);
22
+ };
23
+ exports.createDefaultDirectories = createDefaultDirectories;
24
+ //# sourceMappingURL=create-default-directories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-default-directories.js","sourceRoot":"","sources":["../../src/utils/create-default-directories.ts"],"names":[],"mappings":";;;AAAA,yBAAyB;AAElB,MAAM,wBAAwB,GAAG,CAAC,YAAY,EAAE,EAAE;IACrD,MAAM,gBAAgB,GAAG,WAAW,CAAA;IACtC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE;QACpC,EAAE,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAA;KAC/B;IAED,MAAM,WAAW,GAAG,CAAC,YAAY,EAAE,YAAY,EAAE,EAAE;QACjD,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YAC1B,IAAI,UAAU,GAAG,GAAG,YAAY,IAAI,IAAI,CAAC,IAAI,EAAE,CAAA;YAC/C,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE;gBAC9B,EAAE,CAAC,SAAS,CAAC,UAAU,CAAC,CAAA;aACzB;YAED,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;gBACvB,WAAW,CAAC,IAAI,CAAC,OAAO,EAAE,UAAU,CAAC,CAAA;aACtC;QACH,CAAC,CAAC,CAAA;IACJ,CAAC,CAAA;IACD,WAAW,CAAC,YAAY,EAAE,gBAAgB,CAAC,CAAA;AAC7C,CAAC,CAAA;AAnBY,QAAA,wBAAwB,4BAmBpC"}
@@ -0,0 +1 @@
1
+ export declare function equalArrayObject(arr1: object[], arr2: object[]): boolean;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.equalArrayObject = void 0;
4
+ const equal_object_1 = require("./equal-object");
5
+ function equalArrayObject(arr1, arr2) {
6
+ return (arr1.length === arr2.length &&
7
+ arr1.every((o, idx) => equal_object_1.equalObject(o, arr2[idx])));
8
+ }
9
+ exports.equalArrayObject = equalArrayObject;
10
+ //# sourceMappingURL=equal-array-object.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"equal-array-object.js","sourceRoot":"","sources":["../../src/utils/equal-array-object.ts"],"names":[],"mappings":";;;AAAA,iDAA6C;AAE7C,SAAgB,gBAAgB,CAAC,IAAc,EAAE,IAAc;IAC7D,OAAO,CACL,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,MAAM;QAC3B,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC,0BAAW,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAClD,CAAC;AACJ,CAAC;AALD,4CAKC"}
@@ -0,0 +1 @@
1
+ export declare function equalObject(obj1: object, obj2: object): boolean;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.equalObject = void 0;
4
+ function equalObject(obj1, obj2) {
5
+ return (Object.keys(obj1).length === Object.keys(obj2).length &&
6
+ Object.keys(obj1).every((p) => obj1[p] === obj2[p]));
7
+ }
8
+ exports.equalObject = equalObject;
9
+ //# sourceMappingURL=equal-object.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"equal-object.js","sourceRoot":"","sources":["../../src/utils/equal-object.ts"],"names":[],"mappings":";;;AAAA,SAAgB,WAAW,CAAC,IAAY,EAAE,IAAY;IACpD,OAAO,CACL,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM;QACrD,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,CACpD,CAAC;AACJ,CAAC;AALD,kCAKC"}
@@ -0,0 +1 @@
1
+ export declare function getParsedQuery(filterDto: any): any;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getParsedQuery = void 0;
4
+ function getParsedQuery(filterDto) {
5
+ if (filterDto.query) {
6
+ try {
7
+ return JSON.parse(filterDto.query);
8
+ }
9
+ catch (err) {
10
+ return filterDto.query;
11
+ }
12
+ }
13
+ else {
14
+ return {};
15
+ }
16
+ }
17
+ exports.getParsedQuery = getParsedQuery;
18
+ //# sourceMappingURL=get-parsed-query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-parsed-query.js","sourceRoot":"","sources":["../../src/utils/get-parsed-query.ts"],"names":[],"mappings":";;;AAAA,SAAgB,cAAc,CAAC,SAAS;IACtC,IAAI,SAAS,CAAC,KAAK,EAAE;QACnB,IAAI;YACF,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,CAAA;SACnC;QAAC,OAAO,GAAG,EAAE;YACZ,OAAO,SAAS,CAAC,KAAK,CAAA;SACvB;KACF;SAAM;QACL,OAAO,EAAE,CAAA;KACV;AACH,CAAC;AAVD,wCAUC"}
@@ -0,0 +1,5 @@
1
+ import { Feature } from 'src/types/feature.interface';
2
+ export declare function getEndpoint(features: Feature[], method: string, path: string): {
3
+ endpoint: any;
4
+ feature: any;
5
+ };
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getEndpoint = void 0;
4
+ const common_1 = require("@nestjs/common");
5
+ const feature_mappings_1 = require("../types/feature-mappings");
6
+ function getEndpoint(features, method, path) {
7
+ let matchedEndpoint = undefined;
8
+ let matchedFeature = undefined;
9
+ features.find((feature) => {
10
+ const featureMappings = feature_mappings_1.FeatureMapping[feature.featureType];
11
+ const hasPath = featureMappings === null || featureMappings === void 0 ? void 0 : featureMappings.findIndex((mapping) => path.includes(mapping));
12
+ if (hasPath > -1) {
13
+ matchedFeature = feature;
14
+ const endpoint = feature.endpoints.find((endpoint) => {
15
+ return endpoint.method === method && path.endsWith(endpoint.path);
16
+ });
17
+ if (endpoint) {
18
+ matchedEndpoint = endpoint;
19
+ return feature;
20
+ }
21
+ }
22
+ });
23
+ console.log('matchedFeature: ', matchedFeature);
24
+ if (!matchedFeature) {
25
+ throw new common_1.ForbiddenException({
26
+ statusCode: 403,
27
+ message: 'Forbidden feature',
28
+ error: 'Forbidden',
29
+ description: 'Please upgrade your subscription',
30
+ });
31
+ }
32
+ if (matchedFeature.isActive === false) {
33
+ throw new common_1.ForbiddenException({
34
+ statusCode: 403,
35
+ message: 'Inactive feature',
36
+ error: 'Forbidden',
37
+ description: 'Please upgrade your subscription',
38
+ });
39
+ }
40
+ return { endpoint: matchedEndpoint, feature: matchedFeature };
41
+ }
42
+ exports.getEndpoint = getEndpoint;
43
+ //# sourceMappingURL=getEndpoint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getEndpoint.js","sourceRoot":"","sources":["../../src/utils/getEndpoint.ts"],"names":[],"mappings":";;;AAAA,2CAAmD;AAEnD,gEAA0D;AAE1D,SAAgB,WAAW,CAAC,QAAmB,EAAE,MAAc,EAAE,IAAY;IAC3E,IAAI,eAAe,GAAG,SAAS,CAAC;IAChC,IAAI,cAAc,GAAG,SAAS,CAAC;IAC/B,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE;QACxB,MAAM,eAAe,GAAG,iCAAc,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QAC5D,MAAM,OAAO,GAAG,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,SAAS,CAAC,CAAC,OAAO,EAAE,EAAE,CACnD,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CACzB,CAAC;QACF,IAAI,OAAO,GAAG,CAAC,CAAC,EAAE;YAChB,cAAc,GAAG,OAAO,CAAC;YACzB,MAAM,QAAQ,GAAG,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;gBACnD,OAAO,QAAQ,CAAC,MAAM,KAAK,MAAM,IAAI,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACpE,CAAC,CAAC,CAAC;YACH,IAAI,QAAQ,EAAE;gBACZ,eAAe,GAAG,QAAQ,CAAC;gBAC3B,OAAO,OAAO,CAAC;aAChB;SACF;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,cAAc,CAAC,CAAC;IAChD,IAAI,CAAC,cAAc,EAAE;QACnB,MAAM,IAAI,2BAAkB,CAAC;YAC3B,UAAU,EAAE,GAAG;YACf,OAAO,EAAE,mBAAmB;YAC5B,KAAK,EAAE,WAAW;YAClB,WAAW,EAAE,kCAAkC;SAChD,CAAC,CAAC;KACJ;IAED,IAAI,cAAc,CAAC,QAAQ,KAAK,KAAK,EAAE;QACrC,MAAM,IAAI,2BAAkB,CAAC;YAC3B,UAAU,EAAE,GAAG;YACf,OAAO,EAAE,kBAAkB;YAC3B,KAAK,EAAE,WAAW;YAClB,WAAW,EAAE,kCAAkC;SAChD,CAAC,CAAC;KACJ;IAED,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC;AAChE,CAAC;AAxCD,kCAwCC"}
@@ -0,0 +1 @@
1
+ export declare function getHeaderParam(headers: any, param: any): string;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getHeaderParam = void 0;
4
+ function getHeaderParam(headers, param) {
5
+ return Array.isArray(headers[param]) ? headers[param][0] : headers[param];
6
+ }
7
+ exports.getHeaderParam = getHeaderParam;
8
+ //# sourceMappingURL=getHeaderParam.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getHeaderParam.js","sourceRoot":"","sources":["../../src/utils/getHeaderParam.ts"],"names":[],"mappings":";;;AAAA,SAAgB,cAAc,CAAC,OAAO,EAAE,KAAK;IAC3C,OAAO,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;AAC3E,CAAC;AAFD,wCAEC"}
@@ -0,0 +1 @@
1
+ export declare function parseQuery(filterDto: any): any;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseQuery = void 0;
4
+ function parseQuery(filterDto) {
5
+ if (typeof filterDto === 'object' && (filterDto === null || filterDto === void 0 ? void 0 : filterDto.order)) {
6
+ const newDto = JSON.parse(filterDto.order);
7
+ filterDto.order = newDto;
8
+ }
9
+ if (filterDto === null || filterDto === void 0 ? void 0 : filterDto.join) {
10
+ const newDto = JSON.parse(filterDto.join);
11
+ filterDto.join = newDto;
12
+ }
13
+ if ((filterDto === null || filterDto === void 0 ? void 0 : filterDto.where) && typeof filterDto.where === 'string') {
14
+ const newDto = JSON.parse(filterDto.where);
15
+ filterDto.where = newDto;
16
+ }
17
+ if ((filterDto === null || filterDto === void 0 ? void 0 : filterDto.where) && Array.isArray(filterDto.where)) {
18
+ const newWhere = filterDto.where.map((item) => {
19
+ if (typeof item === 'string') {
20
+ JSON.parse(item);
21
+ }
22
+ else {
23
+ return item;
24
+ }
25
+ });
26
+ filterDto.where = newWhere;
27
+ }
28
+ return filterDto;
29
+ }
30
+ exports.parseQuery = parseQuery;
31
+ //# sourceMappingURL=parse-query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parse-query.js","sourceRoot":"","sources":["../../src/utils/parse-query.ts"],"names":[],"mappings":";;;AAAA,SAAgB,UAAU,CAAC,SAAc;IACvC,IAAI,OAAO,SAAS,KAAK,QAAQ,KAAI,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,KAAK,CAAA,EAAE;QACrD,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QAC3C,SAAS,CAAC,KAAK,GAAG,MAAM,CAAC;KAC1B;IACD,IAAI,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,IAAI,EAAE;QACnB,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAC1C,SAAS,CAAC,IAAI,GAAG,MAAM,CAAC;KACzB;IACD,IAAI,CAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,KAAK,KAAI,OAAO,SAAS,CAAC,KAAK,KAAK,QAAQ,EAAE;QAC3D,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QAC3C,SAAS,CAAC,KAAK,GAAG,MAAM,CAAC;KAC1B;IACD,IAAI,CAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,KAAK,KAAI,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE;QACtD,MAAM,QAAQ,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;YAC5C,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;gBAC5B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;aAClB;iBAAM;gBACL,OAAO,IAAI,CAAC;aACb;QACH,CAAC,CAAC,CAAC;QACH,SAAS,CAAC,KAAK,GAAG,QAAQ,CAAC;KAC5B;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAxBD,gCAwBC"}
@@ -0,0 +1 @@
1
+ export declare function projection(allProjectionFieldArray: string[], necessaryProjectionArray: string[]): {};
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.projection = void 0;
4
+ function projection(allProjectionFieldArray, necessaryProjectionArray) {
5
+ try {
6
+ const projection = {};
7
+ let returnAll = true;
8
+ Array.isArray(necessaryProjectionArray) &&
9
+ necessaryProjectionArray.length &&
10
+ necessaryProjectionArray.map((key) => {
11
+ if (allProjectionFieldArray.includes(key)) {
12
+ returnAll = false;
13
+ projection[key] = true;
14
+ }
15
+ });
16
+ if (returnAll) {
17
+ allProjectionFieldArray.map((key) => (projection[key] = true));
18
+ }
19
+ return projection;
20
+ }
21
+ catch (err) {
22
+ throw err;
23
+ }
24
+ }
25
+ exports.projection = projection;
26
+ //# sourceMappingURL=projection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"projection.js","sourceRoot":"","sources":["../../src/utils/projection.ts"],"names":[],"mappings":";;;AAAA,SAAgB,UAAU,CACxB,uBAAiC,EACjC,wBAAkC;IAElC,IAAI;QACF,MAAM,UAAU,GAAG,EAAE,CAAC;QACtB,IAAI,SAAS,GAAG,IAAI,CAAC;QAErB,KAAK,CAAC,OAAO,CAAC,wBAAwB,CAAC;YACrC,wBAAwB,CAAC,MAAM;YAC/B,wBAAwB,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;gBACnC,IAAI,uBAAuB,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;oBACzC,SAAS,GAAG,KAAK,CAAC;oBAClB,UAAU,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;iBACxB;YACH,CAAC,CAAC,CAAC;QAEL,IAAI,SAAS,EAAE;YACb,uBAAuB,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;SAChE;QAED,OAAO,UAAU,CAAC;KACnB;IAAC,OAAO,GAAG,EAAE;QACZ,MAAM,GAAG,CAAC;KACX;AACH,CAAC;AAzBD,gCAyBC"}
@@ -0,0 +1,9 @@
1
+ export declare class RedisClient {
2
+ private redisClient;
3
+ constructor();
4
+ private connectToRedis;
5
+ getData(key: string): Promise<any>;
6
+ getAllKeys(): Promise<any>;
7
+ setData(key: string, value: string, validityTime?: number): Promise<any>;
8
+ flushAll(): Promise<any>;
9
+ }
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RedisClient = void 0;
4
+ const redis_1 = require("redis");
5
+ class RedisClient {
6
+ constructor() {
7
+ this.redisClient = redis_1.createClient({
8
+ url: process.env.REDIS_URI,
9
+ });
10
+ }
11
+ async connectToRedis() {
12
+ try {
13
+ await this.redisClient.connect();
14
+ }
15
+ catch (err) { }
16
+ }
17
+ async getData(key) {
18
+ try {
19
+ await this.connectToRedis();
20
+ return this.redisClient.get(key);
21
+ }
22
+ catch (err) {
23
+ console.log('REDIS GET DATA ERROR--------', err);
24
+ }
25
+ }
26
+ async getAllKeys() {
27
+ try {
28
+ await this.connectToRedis();
29
+ return this.redisClient.keys('*');
30
+ }
31
+ catch (err) {
32
+ console.log('REDIS GET DATA ERROR--------', err);
33
+ }
34
+ }
35
+ async setData(key, value, validityTime = 10) {
36
+ try {
37
+ await this.connectToRedis();
38
+ return this.redisClient.set(key, value, { EX: validityTime * 60 });
39
+ }
40
+ catch (err) {
41
+ console.log('REDIS SET DATA ERROR--------', err);
42
+ }
43
+ }
44
+ async flushAll() {
45
+ try {
46
+ await this.connectToRedis();
47
+ return this.redisClient.flushall();
48
+ }
49
+ catch (err) {
50
+ console.log('REDIS GET DATA ERROR--------', err);
51
+ }
52
+ }
53
+ }
54
+ exports.RedisClient = RedisClient;
55
+ //# sourceMappingURL=redis-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"redis-client.js","sourceRoot":"","sources":["../../src/utils/redis-client.ts"],"names":[],"mappings":";;;AAAA,iCAAoC;AAEpC,MAAa,WAAW;IAGtB;QACE,IAAI,CAAC,WAAW,GAAG,oBAAY,CAAC;YAC9B,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,SAAS;SAC3B,CAAC,CAAA;IACJ,CAAC;IAEO,KAAK,CAAC,cAAc;QAC1B,IAAI;YACF,MAAM,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAA;SACjC;QAAC,OAAO,GAAG,EAAE,GAAE;IAClB,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,GAAW;QACvB,IAAI;YACF,MAAM,IAAI,CAAC,cAAc,EAAE,CAAA;YAC3B,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;SACjC;QAAC,OAAO,GAAG,EAAE;YACZ,OAAO,CAAC,GAAG,CAAC,8BAA8B,EAAE,GAAG,CAAC,CAAA;SACjD;IACH,CAAC;IAED,KAAK,CAAC,UAAU;QACd,IAAI;YACF,MAAM,IAAI,CAAC,cAAc,EAAE,CAAA;YAC3B,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;SAClC;QAAC,OAAO,GAAG,EAAE;YACZ,OAAO,CAAC,GAAG,CAAC,8BAA8B,EAAE,GAAG,CAAC,CAAA;SACjD;IACH,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,GAAW,EAAE,KAAa,EAAE,YAAY,GAAG,EAAE;QACzD,IAAI;YACF,MAAM,IAAI,CAAC,cAAc,EAAE,CAAA;YAC3B,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,YAAY,GAAG,EAAE,EAAE,CAAC,CAAA;SACnE;QAAC,OAAO,GAAG,EAAE;YACZ,OAAO,CAAC,GAAG,CAAC,8BAA8B,EAAE,GAAG,CAAC,CAAA;SACjD;IACH,CAAC;IAED,KAAK,CAAC,QAAQ;QACZ,IAAI;YACF,MAAM,IAAI,CAAC,cAAc,EAAE,CAAA;YAC3B,OAAO,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAA;SACnC;QAAC,OAAO,GAAG,EAAE;YACZ,OAAO,CAAC,GAAG,CAAC,8BAA8B,EAAE,GAAG,CAAC,CAAA;SACjD;IACH,CAAC;CACF;AAlDD,kCAkDC"}
@@ -0,0 +1,29 @@
1
+ /// <reference types="node" />
2
+ import { ClientProxy, ReadPacket, WritePacket } from '@nestjs/microservices';
3
+ import { AmqpConnectionManager, ChannelWrapper } from 'amqp-connection-manager';
4
+ import { ConfirmChannel } from 'amqplib';
5
+ import { EventEmitter } from 'events';
6
+ import { RMQClientOptions, RMQMessage } from '../interfaces/rmq-options.interfaces';
7
+ import { Observable } from 'rxjs';
8
+ import { Logger } from '@nestjs/common';
9
+ export declare class RabbitMQClient extends ClientProxy {
10
+ private readonly options;
11
+ protected readonly logger: Logger;
12
+ protected client: AmqpConnectionManager;
13
+ protected channel: ChannelWrapper;
14
+ protected responseEmitter: EventEmitter;
15
+ protected connection: Promise<any>;
16
+ protected replyQueue: string;
17
+ constructor(options: RMQClientOptions);
18
+ connect(): Promise<any>;
19
+ createClient(): AmqpConnectionManager;
20
+ handleRMQEvents(): void;
21
+ mergeDisconnectEvent<T = any>(instance: any, source$: Observable<T>): Observable<T>;
22
+ createChannel(): Promise<void>;
23
+ setupChannel(channel: ConfirmChannel, resolve: any): Promise<void>;
24
+ consumeChannel(): void;
25
+ protected publish(message: ReadPacket<string | RMQMessage>, callback: (packet: WritePacket) => any): any;
26
+ handleMessage(packet: unknown, callback: (packet: WritePacket) => any): Promise<void>;
27
+ protected dispatchEvent(packet: ReadPacket<string | RMQMessage>): Promise<any>;
28
+ close(): void;
29
+ }