@aldb2b/common 1.0.852 → 1.0.855

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 (198) hide show
  1. package/build/db/CustomModel.d.ts +25 -0
  2. package/build/db/MongooseBase.d.ts +25 -0
  3. package/build/db/aggregate/AggregateConvertor.d.ts +25 -0
  4. package/build/entities/interfaces/connection-dictionary.interface.d.ts +25 -0
  5. package/build/entities/models/common/common.provider.d.ts +25 -0
  6. package/build/entities/models/common/entities/audit-trail.entity.d.ts +25 -0
  7. package/build/entities/models/common/entities/location.entity.d.ts +61 -0
  8. package/build/entities/models/common/entities/location.entity.js.map +1 -0
  9. package/build/entities/models/common/index.d.ts +1 -0
  10. package/build/entities/models/common/index.js +1 -0
  11. package/build/entities/models/common/index.js.map +1 -1
  12. package/build/entities/models/companies/companies.provider.d.ts +26 -1
  13. package/build/entities/models/companies/companies.provider.js +1 -1
  14. package/build/entities/models/companies/companies.provider.js.map +1 -1
  15. package/build/entities/models/companies/entities/companies/company-contact-detail.schema.d.ts +70 -0
  16. package/build/entities/models/companies/entities/companies/company-contact-detail.schema.js +37 -0
  17. package/build/entities/models/companies/entities/companies/company-contact-detail.schema.js.map +1 -0
  18. package/build/entities/models/companies/entities/companies/company-size.enum.d.ts +6 -0
  19. package/build/entities/models/companies/entities/companies/company-size.enum.js +11 -0
  20. package/build/entities/models/companies/entities/companies/company-size.enum.js.map +1 -0
  21. package/build/entities/models/companies/entities/companies/company-statistic.entity.d.ts +25 -0
  22. package/build/entities/models/companies/entities/companies/company-type.enum.d.ts +26 -0
  23. package/build/entities/models/companies/entities/companies/company-type.enum.js +31 -0
  24. package/build/entities/models/companies/entities/companies/company-type.enum.js.map +1 -0
  25. package/build/entities/models/companies/entities/companies/company-user-type.enum.d.ts +9 -0
  26. package/build/entities/models/companies/entities/companies/company-user-type.enum.js +14 -0
  27. package/build/entities/models/companies/entities/companies/company-user-type.enum.js.map +1 -0
  28. package/build/entities/models/companies/entities/companies/company.entity.d.ts +138 -4
  29. package/build/entities/models/companies/entities/companies/company.entity.js +526 -13
  30. package/build/entities/models/companies/entities/companies/company.entity.js.map +1 -1
  31. package/build/entities/models/companies/entities/companies/export-capability.schema.d.ts +70 -0
  32. package/build/entities/models/companies/entities/companies/export-capability.schema.js +27 -0
  33. package/build/entities/models/companies/entities/companies/export-capability.schema.js.map +1 -0
  34. package/build/entities/models/companies/entities/companies/fortune.enum.d.ts +6 -0
  35. package/build/entities/models/companies/entities/companies/fortune.enum.js +11 -0
  36. package/build/entities/models/companies/entities/companies/fortune.enum.js.map +1 -0
  37. package/build/entities/models/companies/entities/companies/funding-stage.enum.d.ts +12 -0
  38. package/build/entities/models/companies/entities/companies/funding-stage.enum.js +17 -0
  39. package/build/entities/models/companies/entities/companies/funding-stage.enum.js.map +1 -0
  40. package/build/entities/models/companies/entities/companies/group.enum.d.ts +6 -0
  41. package/build/entities/models/companies/entities/companies/group.enum.js +11 -0
  42. package/build/entities/models/companies/entities/companies/group.enum.js.map +1 -0
  43. package/build/entities/models/companies/entities/companies/hr-data.schema.d.ts +61 -0
  44. package/build/entities/models/companies/entities/companies/hr-data.schema.js +18 -0
  45. package/build/entities/models/companies/entities/companies/hr-data.schema.js.map +1 -0
  46. package/build/entities/models/companies/entities/companies/index.d.ts +21 -1
  47. package/build/entities/models/companies/entities/companies/index.js +21 -1
  48. package/build/entities/models/companies/entities/companies/index.js.map +1 -1
  49. package/build/entities/models/companies/entities/companies/investment-ticket.enum.d.ts +10 -0
  50. package/build/entities/models/companies/entities/companies/investment-ticket.enum.js +15 -0
  51. package/build/entities/models/companies/entities/companies/investment-ticket.enum.js.map +1 -0
  52. package/build/entities/models/companies/entities/companies/investment-type.enum.d.ts +22 -0
  53. package/build/entities/models/companies/entities/companies/investment-type.enum.js +27 -0
  54. package/build/entities/models/companies/entities/companies/investment-type.enum.js.map +1 -0
  55. package/build/entities/models/companies/entities/companies/investor.schema.d.ts +95 -0
  56. package/build/entities/models/companies/entities/companies/investor.schema.js +52 -0
  57. package/build/entities/models/companies/entities/companies/investor.schema.js.map +1 -0
  58. package/build/entities/models/companies/entities/companies/manufacturer.schema.d.ts +63 -0
  59. package/build/entities/models/companies/entities/companies/manufacturer.schema.js +20 -0
  60. package/build/entities/models/companies/entities/companies/manufacturer.schema.js.map +1 -0
  61. package/build/entities/models/companies/entities/companies/number-of-employees.enum.d.ts +10 -0
  62. package/build/entities/models/companies/entities/companies/number-of-employees.enum.js +15 -0
  63. package/build/entities/models/companies/entities/companies/number-of-employees.enum.js.map +1 -0
  64. package/build/entities/models/companies/entities/companies/number-of-followers.enum.d.ts +7 -0
  65. package/build/entities/models/companies/entities/companies/number-of-followers.enum.js +12 -0
  66. package/build/entities/models/companies/entities/companies/number-of-followers.enum.js.map +1 -0
  67. package/build/entities/models/companies/entities/companies/ownership-status.enum.d.ts +12 -0
  68. package/build/entities/models/companies/entities/companies/ownership-status.enum.js +17 -0
  69. package/build/entities/models/companies/entities/companies/ownership-status.enum.js.map +1 -0
  70. package/build/entities/models/companies/entities/companies/preference.schema.d.ts +69 -0
  71. package/build/entities/models/companies/entities/companies/preference.schema.js +26 -0
  72. package/build/entities/models/companies/entities/companies/preference.schema.js.map +1 -0
  73. package/build/entities/models/companies/entities/companies/sector.schema.d.ts +62 -0
  74. package/build/entities/models/companies/entities/companies/sector.schema.js +20 -0
  75. package/build/entities/models/companies/entities/companies/sector.schema.js.map +1 -0
  76. package/build/entities/models/companies/entities/companies/status-detail.schema.d.ts +63 -0
  77. package/build/entities/models/companies/entities/companies/status-detail.schema.js +26 -0
  78. package/build/entities/models/companies/entities/companies/status-detail.schema.js.map +1 -0
  79. package/build/entities/models/companies/entities/companies/trade-show-attended-as.enum.d.ts +11 -0
  80. package/build/entities/models/companies/entities/companies/trade-show-attended-as.enum.js +16 -0
  81. package/build/entities/models/companies/entities/companies/trade-show-attended-as.enum.js.map +1 -0
  82. package/build/entities/models/companies/entities/contacts/activity-log.schema.d.ts +62 -0
  83. package/build/entities/models/companies/entities/contacts/activity-log.schema.js +24 -0
  84. package/build/entities/models/companies/entities/contacts/activity-log.schema.js.map +1 -0
  85. package/build/entities/models/companies/entities/contacts/company-status-detail.schema.d.ts +63 -0
  86. package/build/entities/models/companies/entities/contacts/company-status-detail.schema.js +26 -0
  87. package/build/entities/models/companies/entities/contacts/company-status-detail.schema.js.map +1 -0
  88. package/build/entities/models/companies/entities/contacts/connection-degree.enum.d.ts +5 -0
  89. package/build/entities/models/companies/entities/contacts/connection-degree.enum.js +10 -0
  90. package/build/entities/models/companies/entities/contacts/connection-degree.enum.js.map +1 -0
  91. package/build/entities/models/companies/entities/contacts/contact-detail.schema.d.ts +70 -0
  92. package/build/entities/models/companies/entities/contacts/contact-detail.schema.js +31 -0
  93. package/build/entities/models/companies/entities/contacts/contact-detail.schema.js.map +1 -0
  94. package/build/entities/models/companies/entities/contacts/contact.entity.d.ts +144 -0
  95. package/build/entities/models/companies/entities/contacts/contact.entity.js +380 -0
  96. package/build/entities/models/companies/entities/contacts/contact.entity.js.map +1 -0
  97. package/build/entities/models/companies/entities/contacts/data-association-modules.enum.d.ts +10 -0
  98. package/build/entities/models/companies/entities/contacts/data-association-modules.enum.js +15 -0
  99. package/build/entities/models/companies/entities/contacts/data-association-modules.enum.js.map +1 -0
  100. package/build/entities/models/companies/entities/contacts/department.enum.d.ts +31 -0
  101. package/build/entities/models/companies/entities/contacts/department.enum.js +36 -0
  102. package/build/entities/models/companies/entities/contacts/department.enum.js.map +1 -0
  103. package/build/entities/models/companies/entities/contacts/device-notification.schema.d.ts +60 -0
  104. package/build/entities/models/companies/entities/contacts/device-notification.schema.js +18 -0
  105. package/build/entities/models/companies/entities/contacts/device-notification.schema.js.map +1 -0
  106. package/build/entities/models/companies/entities/contacts/device.enum.d.ts +5 -0
  107. package/build/entities/models/companies/entities/contacts/device.enum.js +10 -0
  108. package/build/entities/models/companies/entities/contacts/device.enum.js.map +1 -0
  109. package/build/entities/models/companies/entities/contacts/index.d.ts +16 -0
  110. package/build/entities/models/companies/entities/contacts/index.js +33 -0
  111. package/build/entities/models/companies/entities/contacts/index.js.map +1 -0
  112. package/build/entities/models/companies/entities/contacts/position.enum.d.ts +16 -0
  113. package/build/entities/models/companies/entities/contacts/position.enum.js +21 -0
  114. package/build/entities/models/companies/entities/contacts/position.enum.js.map +1 -0
  115. package/build/entities/models/companies/entities/contacts/seniority-level.enum.d.ts +15 -0
  116. package/build/entities/models/companies/entities/contacts/seniority-level.enum.js +20 -0
  117. package/build/entities/models/companies/entities/contacts/seniority-level.enum.js.map +1 -0
  118. package/build/entities/models/companies/entities/contacts/status.enum.d.ts +6 -0
  119. package/build/entities/models/companies/entities/contacts/status.enum.js +11 -0
  120. package/build/entities/models/companies/entities/contacts/status.enum.js.map +1 -0
  121. package/build/entities/models/companies/entities/contacts/user-activity.enum.d.ts +4 -0
  122. package/build/entities/models/companies/entities/contacts/user-activity.enum.js +9 -0
  123. package/build/entities/models/companies/entities/contacts/user-activity.enum.js.map +1 -0
  124. package/build/entities/models/companies/entities/contacts/web-notification-key.schema.d.ts +59 -0
  125. package/build/entities/models/companies/entities/contacts/web-notification-key.schema.js +16 -0
  126. package/build/entities/models/companies/entities/contacts/web-notification-key.schema.js.map +1 -0
  127. package/build/entities/models/companies/entities/contacts/web-notification.schema.d.ts +61 -0
  128. package/build/entities/models/companies/entities/contacts/web-notification.schema.js +19 -0
  129. package/build/entities/models/companies/entities/contacts/web-notification.schema.js.map +1 -0
  130. package/build/entities/models/companies/entities/contacts/years-of-experience.enum.d.ts +7 -0
  131. package/build/entities/models/companies/entities/contacts/years-of-experience.enum.js +12 -0
  132. package/build/entities/models/companies/entities/contacts/years-of-experience.enum.js.map +1 -0
  133. package/build/entities/models/companies/index.d.ts +3 -2
  134. package/build/entities/models/companies/index.js +3 -2
  135. package/build/entities/models/companies/index.js.map +1 -1
  136. package/build/entities/models/companies/repositories/contact-common.repository.d.ts +7 -0
  137. package/build/entities/models/companies/repositories/contact-common.repository.js +12 -0
  138. package/build/entities/models/companies/repositories/contact-common.repository.js.map +1 -0
  139. package/build/entities/models/events/entities/event/event.entity.d.ts +25 -0
  140. package/build/entities/models/events/entities/eventProfile/company-profile-item.entity.d.ts +25 -0
  141. package/build/entities/models/events/entities/eventProfile/event-profile.entity.d.ts +25 -0
  142. package/build/entities/models/events/entities/eventType/event-type.entity.d.ts +25 -0
  143. package/build/entities/models/events/entities/timestamp.entity.d.ts +25 -0
  144. package/build/entities/models/events/events.provider.d.ts +25 -0
  145. package/build/entities/models/meetings/entities/meetingRequests/meeting-request.entity.d.ts +25 -0
  146. package/build/entities/models/meetings/entities/meetingRequests/rejected-contact.entity.d.ts +25 -0
  147. package/build/entities/models/meetings/entities/meetings/meeting.entity.d.ts +25 -0
  148. package/build/entities/models/meetings/entities/userAvailabilities/user-availability-timeslot.entity.d.ts +25 -0
  149. package/build/entities/models/meetings/entities/userAvailabilities/user-availability.entity.d.ts +25 -0
  150. package/build/entities/models/meetings/meetings.provider.d.ts +25 -0
  151. package/build/entities/models/model.providers.d.ts +25 -0
  152. package/build/entities/models/subscriptions/entities/companySubscriptions/company-subscription-user.entity.d.ts +25 -0
  153. package/build/entities/models/subscriptions/entities/companySubscriptions/company-subscription.entity.d.ts +25 -0
  154. package/build/entities/models/subscriptions/entities/eventSubscriptions/event-subscription.entity.d.ts +25 -0
  155. package/build/entities/models/subscriptions/entities/features/endpoint.entity.d.ts +25 -0
  156. package/build/entities/models/subscriptions/entities/features/feature.entity.d.ts +25 -0
  157. package/build/entities/models/subscriptions/entities/subscriptionLogs/subscription-log.entity.d.ts +25 -0
  158. package/build/entities/models/subscriptions/subscriptions.provider.d.ts +25 -0
  159. package/build/entities/models/users/entities/rolePermissions/permission.entity.d.ts +25 -0
  160. package/build/entities/models/users/entities/rolePermissions/role-permission.entity.d.ts +25 -0
  161. package/build/entities/models/users/entities/users/chat-info.entity.d.ts +25 -0
  162. package/build/entities/models/users/entities/users/event-info.entity.d.ts +25 -0
  163. package/build/entities/models/users/entities/users/index.d.ts +1 -1
  164. package/build/entities/models/users/entities/users/index.js +1 -1
  165. package/build/entities/models/users/entities/users/index.js.map +1 -1
  166. package/build/entities/models/users/entities/users/user.entity.d.ts +25 -0
  167. package/build/entities/models/users/entities/users/user.entity.js +5 -5
  168. package/build/entities/models/users/entities/users/user.entity.js.map +1 -1
  169. package/build/entities/models/users/users.provider.d.ts +25 -0
  170. package/build/entities/mongoose.providers.d.ts +25 -0
  171. package/build/entities/services/generate-model.d.ts +25 -0
  172. package/build/entities/services/get-model-ref.d.ts +25 -0
  173. package/build/enums/company-status-condition.enum.d.ts +6 -0
  174. package/build/enums/company-status-condition.enum.js +11 -0
  175. package/build/enums/company-status-condition.enum.js.map +1 -0
  176. package/build/enums/company-status.enum.d.ts +9 -0
  177. package/build/enums/company-status.enum.js +14 -0
  178. package/build/enums/company-status.enum.js.map +1 -0
  179. package/build/enums/contact-type.enum.d.ts +8 -0
  180. package/build/enums/contact-type.enum.js +13 -0
  181. package/build/enums/contact-type.enum.js.map +1 -0
  182. package/build/enums/territory.enum.d.ts +27 -0
  183. package/build/enums/territory.enum.js +32 -0
  184. package/build/enums/territory.enum.js.map +1 -0
  185. package/build/enums/verify-data-source.enum.d.ts +4 -0
  186. package/build/enums/verify-data-source.enum.js +9 -0
  187. package/build/enums/verify-data-source.enum.js.map +1 -0
  188. package/build/index.d.ts +5 -0
  189. package/build/index.js +5 -0
  190. package/build/index.js.map +1 -1
  191. package/build/tsconfig.tsbuildinfo +1 -1
  192. package/package.json +1 -1
  193. package/build/entities/models/companies/entities/contact.entity.d.ts +0 -45
  194. package/build/entities/models/companies/entities/contact.entity.js +0 -52
  195. package/build/entities/models/companies/entities/contact.entity.js.map +0 -1
  196. package/build/entities/models/users/entities/users/location.entity.d.ts +0 -36
  197. package/build/entities/models/users/entities/users/location.entity.js.map +0 -1
  198. /package/build/entities/models/{users/entities/users → common/entities}/location.entity.js +0 -0
@@ -0,0 +1,380 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.contactFactory = exports.Contact = void 0;
4
+ const validateProjectionResult_1 = require("../../../../../validators/validateProjectionResult");
5
+ const validateProjection_1 = require("../../../../../validators/validateProjection");
6
+ const validateNewItem_1 = require("../../../../../validators/validateNewItem");
7
+ const validateUpdateItem_1 = require("../../../../../validators/validateUpdateItem");
8
+ const mongoose_1 = require("mongoose");
9
+ const common_1 = require("@aldb2b/common");
10
+ const department_enum_1 = require("./department.enum");
11
+ const years_of_experience_enum_1 = require("./years-of-experience.enum");
12
+ const connection_degree_enum_1 = require("./connection-degree.enum");
13
+ const seniority_level_enum_1 = require("./seniority-level.enum");
14
+ const company_status_detail_schema_1 = require("./company-status-detail.schema");
15
+ const contact_detail_schema_1 = require("./contact-detail.schema");
16
+ const company_status_enum_1 = require("../../../../../enums/company-status.enum");
17
+ const status_enum_1 = require("./status.enum");
18
+ const device_notification_schema_1 = require("./device-notification.schema");
19
+ const web_notification_schema_1 = require("./web-notification.schema");
20
+ const activity_log_schema_1 = require("./activity-log.schema");
21
+ const territory_enum_1 = require("../../../../../enums/territory.enum");
22
+ const device_enum_1 = require("./device.enum");
23
+ const common_2 = require("../../../common");
24
+ const services_1 = require("../../../../../entities/services");
25
+ const ObjectId = mongoose_1.Schema.Types.ObjectId;
26
+ class Contact {
27
+ }
28
+ exports.Contact = Contact;
29
+ const contactFactory = (connection, eventConnection) => {
30
+ const deviceNotificationSchema = (0, device_notification_schema_1.getDeviceNotificationSchema)();
31
+ const webNotificationSchema = (0, web_notification_schema_1.getWebNotificationSchema)();
32
+ const activityLogSchema = (0, activity_log_schema_1.getActivityLogSchema)();
33
+ const companyStatusDetailSchema = (0, company_status_detail_schema_1.getCompanyStatusDetailSchema)();
34
+ const contactDetailSchema = (0, contact_detail_schema_1.getContactDetailSchema)();
35
+ const contactSchema = new mongoose_1.Schema({
36
+ batch: { type: ObjectId, ref: 'Import' },
37
+ eventId: {
38
+ type: ObjectId,
39
+ ref: (0, services_1.getModelRef)('Event', eventConnection),
40
+ },
41
+ location: { type: common_2.Location },
42
+ managedBy: {
43
+ type: ObjectId,
44
+ ref: 'Contact',
45
+ },
46
+ role: {
47
+ type: String,
48
+ trim: true,
49
+ enum: common_1.UserRole,
50
+ default: common_1.UserRole.USER,
51
+ },
52
+ roleType: {
53
+ type: String,
54
+ trim: true,
55
+ enum: common_1.UserType,
56
+ default: common_1.UserType.USER,
57
+ },
58
+ firstname: { type: String, trim: true, required: true },
59
+ lastname: { type: String, trim: true, required: true },
60
+ fullname: {
61
+ type: String,
62
+ trim: true,
63
+ set: function (value, oldValue) {
64
+ if (value && value !== '') {
65
+ return value;
66
+ }
67
+ else if (this.firstname && this.lastname) {
68
+ return this.firstname + ' ' + this.lastname;
69
+ }
70
+ else {
71
+ return oldValue;
72
+ }
73
+ },
74
+ },
75
+ title: { type: String, trim: true },
76
+ avatar: { type: String, trim: true },
77
+ email: { type: String, trim: true, required: true },
78
+ mobile: { type: String, trim: true },
79
+ age: { type: Number },
80
+ gender: { type: String, trim: true },
81
+ jobDepartment: {
82
+ type: String,
83
+ trim: true,
84
+ enum: Object.values(department_enum_1.Department),
85
+ },
86
+ jobLevel: { type: String, trim: true },
87
+ jobTitle: {
88
+ type: String,
89
+ trim: true,
90
+ },
91
+ reportingTo: { type: ObjectId, ref: 'Contact' },
92
+ instagram: { type: String, trim: true },
93
+ linkedin: { type: String, trim: true },
94
+ twitter: { type: String, trim: true },
95
+ facebook: { type: String, trim: true },
96
+ description: { type: String, trim: true },
97
+ conversationStarter: { type: String, trim: true },
98
+ isDepartmentHead: { type: Boolean },
99
+ userType: {
100
+ type: String,
101
+ trim: true,
102
+ enum: Object.values(common_1.UserType),
103
+ },
104
+ company: {
105
+ type: ObjectId,
106
+ ref: 'Company',
107
+ required: true,
108
+ },
109
+ yearsOfExperience: {
110
+ type: String,
111
+ trim: true,
112
+ enum: Object.keys(years_of_experience_enum_1.YearsOfExperience),
113
+ },
114
+ yearsInCurrentPosition: { type: Number },
115
+ yearsAtCurrentCompany: { type: Number },
116
+ territory: {
117
+ type: String,
118
+ trim: true,
119
+ enum: Object.values(territory_enum_1.Territory),
120
+ },
121
+ city: { type: ObjectId, ref: 'City', default: null },
122
+ country: { type: ObjectId, ref: 'Country', default: null },
123
+ postcode: { type: String, trim: true },
124
+ address: { type: String, trim: true },
125
+ HQAddress: { type: String, trim: true },
126
+ schoolAttended: { type: Boolean },
127
+ numberOfMeetingsPerShow: { type: Number },
128
+ numberOfMeetingsPerYear: { type: Number },
129
+ numberOfMeetingsPerSector: { type: Number },
130
+ keywords: [{ type: String, trim: true }],
131
+ badges: [{ type: String, trim: true }],
132
+ savedWishList: [{ type: String, trim: true }],
133
+ postActivities: [{ type: String, trim: true }],
134
+ metBefore: { type: Boolean },
135
+ tradeshowMember: { type: Boolean },
136
+ matchedBefore: { type: Boolean },
137
+ hasTransactionBefore: { type: Boolean },
138
+ profileLanguage: { type: String, trim: true },
139
+ joinDate: { type: Date },
140
+ connectionDegree: {
141
+ type: String,
142
+ trim: true,
143
+ enum: Object.values(connection_degree_enum_1.ConnectionDegree),
144
+ },
145
+ seniorityLevel: {
146
+ type: String,
147
+ trim: true,
148
+ enum: Object.values(seniority_level_enum_1.SeniorityLevel),
149
+ },
150
+ status: {
151
+ type: String,
152
+ trim: true,
153
+ enum: Object.values(status_enum_1.Status),
154
+ default: status_enum_1.Status.ACTIVE,
155
+ },
156
+ companyStatus: {
157
+ type: String,
158
+ trim: true,
159
+ enum: Object.values(company_status_enum_1.CompanyStatus),
160
+ },
161
+ isFirstTimeOnboarding: { type: Boolean, required: true, default: true },
162
+ androidNotificationDevices: [{ type: deviceNotificationSchema }],
163
+ iosNotificationDevices: [{ type: deviceNotificationSchema }],
164
+ webNotifications: [{ type: webNotificationSchema }],
165
+ devices: [{ type: String, trim: true, enum: Object.values(device_enum_1.Device) }],
166
+ activityLogs: [{ type: activityLogSchema }],
167
+ createdBy: { type: ObjectId },
168
+ updatedBy: { type: ObjectId },
169
+ createdAt: { type: Date, required: true, default: Date.now },
170
+ updatedAt: { type: Date, required: true, default: Date.now },
171
+ deletedBy: { type: ObjectId },
172
+ deletedAt: { type: Date },
173
+ companyStatusDetails: [{ type: companyStatusDetailSchema, default: [] }],
174
+ contactDetails: [{ type: contactDetailSchema, default: [] }],
175
+ }, { strict: false });
176
+ const allProjectionFieldArray = [];
177
+ const allValidateNewItemFieldArray = [
178
+ '_id',
179
+ 'eventId',
180
+ 'firstname',
181
+ 'lastname',
182
+ 'title',
183
+ 'fullname',
184
+ 'avatar',
185
+ 'email',
186
+ 'mobile',
187
+ 'location',
188
+ 'age',
189
+ 'userType',
190
+ 'gender',
191
+ 'jobDepartment',
192
+ 'jobLevel',
193
+ 'jobTitle',
194
+ 'reportingTo',
195
+ 'instagram',
196
+ 'twitter',
197
+ 'linkedin',
198
+ 'facebook',
199
+ 'company',
200
+ 'yearsOfExperience',
201
+ 'yearsInCurrentPosition',
202
+ 'yearsAtCurrentCompany',
203
+ 'territory',
204
+ 'city',
205
+ 'country',
206
+ 'postcode',
207
+ 'address',
208
+ 'HQAddress',
209
+ 'schoolAttended',
210
+ 'numberOfMeetingsPerShow',
211
+ 'numberOfMeetingsPerYear',
212
+ 'numberOfMeetingsPerSector',
213
+ 'keywords',
214
+ 'badges',
215
+ 'savedWishList',
216
+ 'postActivities',
217
+ 'metBefore',
218
+ 'tradeshowMember',
219
+ 'matchedBefore',
220
+ 'hasTransactionBefore',
221
+ 'profileLanguage',
222
+ 'joinDate',
223
+ 'connectionDegree',
224
+ 'seniorityLevel',
225
+ 'description',
226
+ 'conversationStarter',
227
+ 'isDepartmentHead',
228
+ 'isFirstTimeOnboarding',
229
+ 'status',
230
+ 'role',
231
+ 'roleType',
232
+ 'androidNotificationDevices',
233
+ 'iosNotificationDevices',
234
+ 'webNotifications',
235
+ 'managedBy',
236
+ 'reportingTo',
237
+ 'companyStatus',
238
+ 'activityLogs',
239
+ 'createdBy',
240
+ 'updatedBy',
241
+ 'createdAt',
242
+ 'updatedAt',
243
+ 'deletedBy',
244
+ 'deletedAt',
245
+ 'companyStatusDetails',
246
+ 'contactDetails',
247
+ ];
248
+ const allValidateUpdateItemFieldArray = [
249
+ '_id',
250
+ 'eventId',
251
+ 'batch',
252
+ 'userType',
253
+ 'firstname',
254
+ 'lastname',
255
+ 'fullname',
256
+ 'avatar',
257
+ 'email',
258
+ 'mobile',
259
+ 'location',
260
+ 'age',
261
+ 'gender',
262
+ 'jobDepartment',
263
+ 'jobLevel',
264
+ 'jobTitle',
265
+ 'reportingTo',
266
+ 'instagram',
267
+ 'twitter',
268
+ 'linkedin',
269
+ 'facebook',
270
+ 'yearsOfExperience',
271
+ 'yearsInCurrentPosition',
272
+ 'yearsAtCurrentCompany',
273
+ 'territory',
274
+ 'city',
275
+ 'country',
276
+ 'postcode',
277
+ 'address',
278
+ 'company',
279
+ 'HQAddress',
280
+ 'schoolAttended',
281
+ 'numberOfMeetingsPerShow',
282
+ 'numberOfMeetingsPerYear',
283
+ 'numberOfMeetingsPerSector',
284
+ 'keywords',
285
+ 'badges',
286
+ 'savedWishList',
287
+ 'postActivities',
288
+ 'metBefore',
289
+ 'tradeshowMember',
290
+ 'matchedBefore',
291
+ 'hasTransactionBefore',
292
+ 'profileLanguage',
293
+ 'joinDate',
294
+ 'connectionDegree',
295
+ 'seniorityLevel',
296
+ 'description',
297
+ 'conversationStarter',
298
+ 'isDepartmentHead',
299
+ 'isFirstTimeOnboarding',
300
+ 'status',
301
+ 'role',
302
+ 'roleType',
303
+ 'androidNotificationDevices',
304
+ 'iosNotificationDevices',
305
+ 'webNotifications',
306
+ 'companyStatus',
307
+ 'activityLogs',
308
+ 'managedBy',
309
+ 'updatedBy',
310
+ 'createdAt',
311
+ 'updatedAt',
312
+ 'deletedBy',
313
+ 'deletedAt',
314
+ 'companyStatusDetails',
315
+ 'contactDetails',
316
+ ];
317
+ const allProjectionNestedField = {
318
+ contactDetails: [
319
+ '_id',
320
+ 'contactType',
321
+ 'dataSource',
322
+ 'value',
323
+ 'isValid',
324
+ 'evaluatedAt',
325
+ 'evaluatedBy',
326
+ 'isPrimary',
327
+ 'failureMessage',
328
+ 'createdAt',
329
+ 'updatedAt',
330
+ ],
331
+ };
332
+ const allValidateNestedNewItemField = {
333
+ contactDetails: [
334
+ '_id',
335
+ 'contactType',
336
+ 'dataSource',
337
+ 'value',
338
+ 'isValid',
339
+ 'evaluatedAt',
340
+ 'evaluatedBy',
341
+ 'isPrimary',
342
+ 'failureMessage',
343
+ 'createdAt',
344
+ 'updatedAt',
345
+ ],
346
+ };
347
+ const allValidateNestedUpdateItemField = {
348
+ contactDetails: [
349
+ 'dataSource',
350
+ 'value',
351
+ 'isValid',
352
+ 'evaluatedAt',
353
+ 'evaluatedBy',
354
+ 'isPrimary',
355
+ 'failureMessage',
356
+ 'updatedAt',
357
+ ],
358
+ };
359
+ contactSchema.statics.validateProjectionResult = (necessaryProjectionObj) => (0, validateProjectionResult_1.validateProjectionResult)(allProjectionFieldArray, necessaryProjectionObj);
360
+ contactSchema.statics.validateProjection = (necessaryProjectionArray) => (0, validateProjection_1.validateProjection)(allProjectionFieldArray, necessaryProjectionArray);
361
+ contactSchema.statics.validateNewItem = (newItemObj) => (0, validateNewItem_1.validateNewItem)(allValidateNewItemFieldArray, newItemObj);
362
+ contactSchema.statics.validateUpdateItem = (updateItemObj) => (0, validateUpdateItem_1.validateUpdateItem)(allValidateUpdateItemFieldArray, updateItemObj);
363
+ contactSchema.statics.validatedNestedProjectionResult = (necessaryProjectionObj, nestedField) => (0, validateProjectionResult_1.validateProjectionResult)(allProjectionNestedField[nestedField], necessaryProjectionObj);
364
+ contactSchema.statics.validatedNestedProjection = (necessaryProjectionArray, nestedField) => (0, validateProjection_1.validateProjection)(allProjectionNestedField[nestedField], necessaryProjectionArray);
365
+ contactSchema.statics.validatedNestedNewItem = (newItemObj, nestedField) => (0, validateNewItem_1.validateNewItem)(allValidateNestedNewItemField[nestedField], newItemObj);
366
+ contactSchema.statics.validatedNestedUpdateItem = (updateItemObj, nestedField) => (0, validateUpdateItem_1.validateUpdateItem)(allValidateNestedUpdateItemField[nestedField], updateItemObj);
367
+ contactSchema.pre('findOneAndUpdate', async function (next) {
368
+ this._update.updatedAt = new Date();
369
+ next();
370
+ });
371
+ contactSchema.index({ createdAt: -1 });
372
+ contactSchema.index({ eventId: 1 });
373
+ contactSchema.index({ company: 1 });
374
+ contactSchema.index({ companyStatus: 1 });
375
+ contactSchema.index({ email: 1, fullname: 1 });
376
+ contactSchema.index({ email: 1, eventId: 1 });
377
+ return (0, services_1.generateModel)('Contact', connection, contactSchema);
378
+ };
379
+ exports.contactFactory = contactFactory;
380
+ //# sourceMappingURL=contact.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contact.entity.js","sourceRoot":"","sources":["../../../../../../src/entities/models/companies/entities/contacts/contact.entity.ts"],"names":[],"mappings":";;;AAAA,iGAA6F;AAC7F,qFAAiF;AACjF,+EAA2E;AAC3E,qFAAiF;AAEjF,uCAA6C;AAG7C,2CAAmD;AACnD,uDAA8C;AAC9C,yEAA8D;AAC9D,qEAA2D;AAC3D,iEAAuD;AACvD,iFAGuC;AACvC,mEAA+E;AAC/E,kFAAwE;AACxE,+CAAsC;AACtC,6EAGqC;AACrC,uEAGkC;AAClC,+DAAyE;AACzE,wEAA+D;AAC/D,+CAAsC;AACtC,4CAA0C;AAC1C,+DAA6E;AAE7E,MAAM,QAAQ,GAAG,iBAAM,CAAC,KAAK,CAAC,QAAQ,CAAA;AAGtC,MAAa,OAAO;CAuEnB;AAvED,0BAuEC;AAEM,MAAM,cAAc,GAAG,CAC5B,UAAsB,EACtB,eAA2B,EAC3B,EAAE;IACF,MAAM,wBAAwB,GAAG,IAAA,wDAA2B,GAAE,CAAA;IAC9D,MAAM,qBAAqB,GAAG,IAAA,kDAAwB,GAAE,CAAA;IACxD,MAAM,iBAAiB,GAAG,IAAA,0CAAoB,GAAE,CAAA;IAChD,MAAM,yBAAyB,GAAG,IAAA,2DAA4B,GA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AC,CAAA;IACnC,aAAa,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAA;IACnC,aAAa,CAAC,KAAK,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,CAAC,CAAA;IAEzC,aAAa,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAA;IAC9C,aAAa,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAA;IAE7C,OAAO,IAAA,wBAAa,EAClB,SAAS,EACT,UAAU,EACV,aAAa,CACd,CAAA;AACH,CAAC,CAAA;AApcY,QAAA,cAAc,kBAoc1B"}
@@ -0,0 +1,10 @@
1
+ export declare enum DataAssociationModules {
2
+ CONTACT = "contact",
3
+ MATCH_LIST = "matchLists",
4
+ SCAN = "scans",
5
+ RFQ = "rfqs",
6
+ QUOTATION = "quotations",
7
+ MEETING = "meetingData",
8
+ SHARED_LIST = "sharedLists",
9
+ EVENT_INFO = "eventInfo"
10
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DataAssociationModules = void 0;
4
+ var DataAssociationModules;
5
+ (function (DataAssociationModules) {
6
+ DataAssociationModules["CONTACT"] = "contact";
7
+ DataAssociationModules["MATCH_LIST"] = "matchLists";
8
+ DataAssociationModules["SCAN"] = "scans";
9
+ DataAssociationModules["RFQ"] = "rfqs";
10
+ DataAssociationModules["QUOTATION"] = "quotations";
11
+ DataAssociationModules["MEETING"] = "meetingData";
12
+ DataAssociationModules["SHARED_LIST"] = "sharedLists";
13
+ DataAssociationModules["EVENT_INFO"] = "eventInfo";
14
+ })(DataAssociationModules || (exports.DataAssociationModules = DataAssociationModules = {}));
15
+ //# sourceMappingURL=data-association-modules.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-association-modules.enum.js","sourceRoot":"","sources":["../../../../../../src/entities/models/companies/entities/contacts/data-association-modules.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,sBASX;AATD,WAAY,sBAAsB;IAChC,6CAAmB,CAAA;IACnB,mDAAyB,CAAA;IACzB,wCAAc,CAAA;IACd,sCAAY,CAAA;IACZ,kDAAwB,CAAA;IACxB,iDAAuB,CAAA;IACvB,qDAA2B,CAAA;IAC3B,kDAAwB,CAAA;AAC1B,CAAC,EATW,sBAAsB,sCAAtB,sBAAsB,QASjC"}
@@ -0,0 +1,31 @@
1
+ export declare enum Department {
2
+ UPPER_MANAGEMENT = "Upper Management",
3
+ ACCOUNTING = "Accounting",
4
+ ADMINISTRATIVE = "Administrative",
5
+ ARTS_AND_DESIGN = "Arts and Design",
6
+ BUSINESS_DEVELOPMENT = "Business Development",
7
+ COMMUNITY_AND_SOCIAL_SERVICES = "Community and Social Services",
8
+ CONSULTING = "Consulting",
9
+ CUSTOMER_SUCCESS_AND_SUPPORT = "Customer Success and Support",
10
+ DATA_SCIENCE_AND_ANALYTICS = "Data Science and Analytics",
11
+ EDUCATION = "Education",
12
+ ENGINEERING = "Engineering",
13
+ ENTREPRENEURSHIP = "Entrepreneurship",
14
+ FINANCE = "Finance",
15
+ HEALTHCARE_SERVICES = "Healthcare Services",
16
+ HUMAN_RESOURCES = "Human Resources",
17
+ INFORMATION_TECHNOLOGY = "Information Technology",
18
+ LEGAL = "Legal",
19
+ MARKETING = "Marketing",
20
+ MEDIA_AND_COMMUNICATION = "Media and Communication",
21
+ MILITARY_AND_PROTECTIVE_SERVICES = "Military and Protective Services",
22
+ OPERATIONS = "Operations",
23
+ PRODUCT_MANAGEMENT = "Product Management",
24
+ PROGRAM_AND_PROJECT_MANAGEMENT = "Program and Project Management",
25
+ PURCHASING = "Purchasing",
26
+ QUALITY_ASSURANCE = "Quality Assurance",
27
+ REAL_ESTATE = "Real Estate",
28
+ RESEARCH = "Research",
29
+ SALES = "Sales",
30
+ SUPPORT = "Support"
31
+ }
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Department = void 0;
4
+ var Department;
5
+ (function (Department) {
6
+ Department["UPPER_MANAGEMENT"] = "Upper Management";
7
+ Department["ACCOUNTING"] = "Accounting";
8
+ Department["ADMINISTRATIVE"] = "Administrative";
9
+ Department["ARTS_AND_DESIGN"] = "Arts and Design";
10
+ Department["BUSINESS_DEVELOPMENT"] = "Business Development";
11
+ Department["COMMUNITY_AND_SOCIAL_SERVICES"] = "Community and Social Services";
12
+ Department["CONSULTING"] = "Consulting";
13
+ Department["CUSTOMER_SUCCESS_AND_SUPPORT"] = "Customer Success and Support";
14
+ Department["DATA_SCIENCE_AND_ANALYTICS"] = "Data Science and Analytics";
15
+ Department["EDUCATION"] = "Education";
16
+ Department["ENGINEERING"] = "Engineering";
17
+ Department["ENTREPRENEURSHIP"] = "Entrepreneurship";
18
+ Department["FINANCE"] = "Finance";
19
+ Department["HEALTHCARE_SERVICES"] = "Healthcare Services";
20
+ Department["HUMAN_RESOURCES"] = "Human Resources";
21
+ Department["INFORMATION_TECHNOLOGY"] = "Information Technology";
22
+ Department["LEGAL"] = "Legal";
23
+ Department["MARKETING"] = "Marketing";
24
+ Department["MEDIA_AND_COMMUNICATION"] = "Media and Communication";
25
+ Department["MILITARY_AND_PROTECTIVE_SERVICES"] = "Military and Protective Services";
26
+ Department["OPERATIONS"] = "Operations";
27
+ Department["PRODUCT_MANAGEMENT"] = "Product Management";
28
+ Department["PROGRAM_AND_PROJECT_MANAGEMENT"] = "Program and Project Management";
29
+ Department["PURCHASING"] = "Purchasing";
30
+ Department["QUALITY_ASSURANCE"] = "Quality Assurance";
31
+ Department["REAL_ESTATE"] = "Real Estate";
32
+ Department["RESEARCH"] = "Research";
33
+ Department["SALES"] = "Sales";
34
+ Department["SUPPORT"] = "Support";
35
+ })(Department || (exports.Department = Department = {}));
36
+ //# sourceMappingURL=department.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"department.enum.js","sourceRoot":"","sources":["../../../../../../src/entities/models/companies/entities/contacts/department.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,UA8BX;AA9BD,WAAY,UAAU;IACpB,mDAAoC,CAAA;IACpC,uCAAyB,CAAA;IACzB,+CAAiC,CAAA;IACjC,iDAAmC,CAAA;IACnC,2DAA6C,CAAA;IAC7C,6EAA+D,CAAA;IAC/D,uCAAyB,CAAA;IACzB,2EAA6D,CAAA;IAC7D,uEAAyD,CAAA;IACzD,qCAAuB,CAAA;IACvB,yCAA2B,CAAA;IAC3B,mDAAqC,CAAA;IACrC,iCAAmB,CAAA;IACnB,yDAA2C,CAAA;IAC3C,iDAAmC,CAAA;IACnC,+DAAiD,CAAA;IACjD,6BAAe,CAAA;IACf,qCAAuB,CAAA;IACvB,iEAAmD,CAAA;IACnD,mFAAqE,CAAA;IACrE,uCAAyB,CAAA;IACzB,uDAAyC,CAAA;IACzC,+EAAiE,CAAA;IACjE,uCAAyB,CAAA;IACzB,qDAAuC,CAAA;IACvC,yCAA2B,CAAA;IAC3B,mCAAqB,CAAA;IACrB,6BAAe,CAAA;IACf,iCAAmB,CAAA;AACrB,CAAC,EA9BW,UAAU,0BAAV,UAAU,QA8BrB"}
@@ -0,0 +1,60 @@
1
+ /// <reference types="mongoose/types/aggregate" />
2
+ /// <reference types="mongoose/types/callback" />
3
+ /// <reference types="mongoose/types/collection" />
4
+ /// <reference types="mongoose/types/connection" />
5
+ /// <reference types="mongoose/types/cursor" />
6
+ /// <reference types="mongoose/types/document" />
7
+ /// <reference types="mongoose/types/error" />
8
+ /// <reference types="mongoose/types/expressions" />
9
+ /// <reference types="mongoose/types/helpers" />
10
+ /// <reference types="mongoose/types/middlewares" />
11
+ /// <reference types="mongoose/types/indexes" />
12
+ /// <reference types="mongoose/types/models" />
13
+ /// <reference types="mongoose/types/mongooseoptions" />
14
+ /// <reference types="mongoose/types/pipelinestage" />
15
+ /// <reference types="mongoose/types/populate" />
16
+ /// <reference types="mongoose/types/query" />
17
+ /// <reference types="mongoose/types/schemaoptions" />
18
+ /// <reference types="mongoose/types/schematypes" />
19
+ /// <reference types="mongoose/types/session" />
20
+ /// <reference types="mongoose/types/types" />
21
+ /// <reference types="mongoose/types/utility" />
22
+ /// <reference types="mongoose/types/validation" />
23
+ /// <reference types="mongoose/types/virtuals" />
24
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/aggregate" />
25
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/callback" />
26
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/collection" />
27
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/connection" />
28
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/cursor" />
29
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/document" />
30
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/error" />
31
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/expressions" />
32
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/helpers" />
33
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/middlewares" />
34
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/indexes" />
35
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/models" />
36
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/mongooseoptions" />
37
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/pipelinestage" />
38
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/populate" />
39
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/query" />
40
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/schemaoptions" />
41
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/schematypes" />
42
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/session" />
43
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/types" />
44
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/utility" />
45
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/validation" />
46
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/virtuals" />
47
+ /// <reference types="@aldb2b/common/node_modules/mongoose" />
48
+ /// <reference types="mongoose/types/inferschematype" />
49
+ /// <reference types="mongoose/types/inferrawdoctype" />
50
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/inferschematype" />
51
+ import { Schema } from 'mongoose';
52
+ import { CustomModel } from '../../../../../db/CustomModel';
53
+ export type DeviceNotificationModel = CustomModel<DeviceNotification>;
54
+ export declare class DeviceNotification {
55
+ _id: string;
56
+ deviceToken: string;
57
+ endpointARN: string;
58
+ tags: any[];
59
+ }
60
+ export declare const getDeviceNotificationSchema: () => Schema<DeviceNotification, DeviceNotificationModel>;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getDeviceNotificationSchema = exports.DeviceNotification = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ const ObjectId = mongoose_1.Schema.Types.ObjectId;
6
+ class DeviceNotification {
7
+ }
8
+ exports.DeviceNotification = DeviceNotification;
9
+ const getDeviceNotificationSchema = () => {
10
+ const deviceNotificationSchema = new mongoose_1.Schema({
11
+ deviceToken: { type: String, required: true, trim: true },
12
+ endpointARN: { type: String, required: true, trim: true },
13
+ tags: [{ type: ObjectId, ref: 'Tag' }],
14
+ });
15
+ return deviceNotificationSchema;
16
+ };
17
+ exports.getDeviceNotificationSchema = getDeviceNotificationSchema;
18
+ //# sourceMappingURL=device-notification.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"device-notification.schema.js","sourceRoot":"","sources":["../../../../../../src/entities/models/companies/entities/contacts/device-notification.schema.ts"],"names":[],"mappings":";;;AAAA,uCAAiC;AAGjC,MAAM,QAAQ,GAAG,iBAAM,CAAC,KAAK,CAAC,QAAQ,CAAA;AAGtC,MAAa,kBAAkB;CAK9B;AALD,gDAKC;AAEM,MAAM,2BAA2B,GAAG,GAGzC,EAAE;IACF,MAAM,wBAAwB,GAAG,IAAI,iBAAM,CAGzC;QACA,WAAW,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE;QACzD,WAAW,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE;QACzD,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;KACvC,CAAC,CAAA;IAEF,OAAO,wBAAwB,CAAA;AACjC,CAAC,CAAA;AAdY,QAAA,2BAA2B,+BAcvC"}
@@ -0,0 +1,5 @@
1
+ export declare enum Device {
2
+ IOS = "ios",
3
+ ANDROID = "android",
4
+ WEB = "web"
5
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Device = void 0;
4
+ var Device;
5
+ (function (Device) {
6
+ Device["IOS"] = "ios";
7
+ Device["ANDROID"] = "android";
8
+ Device["WEB"] = "web";
9
+ })(Device || (exports.Device = Device = {}));
10
+ //# sourceMappingURL=device.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"device.enum.js","sourceRoot":"","sources":["../../../../../../src/entities/models/companies/entities/contacts/device.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,MAIX;AAJD,WAAY,MAAM;IAChB,qBAAW,CAAA;IACX,6BAAmB,CAAA;IACnB,qBAAW,CAAA;AACb,CAAC,EAJW,MAAM,sBAAN,MAAM,QAIjB"}
@@ -0,0 +1,16 @@
1
+ export * from './activity-log.schema';
2
+ export * from './company-status-detail.schema';
3
+ export * from './connection-degree.enum';
4
+ export * from './contact-detail.schema';
5
+ export * from './contact.entity';
6
+ export * from './data-association-modules.enum';
7
+ export * from './department.enum';
8
+ export * from './device-notification.schema';
9
+ export * from './device.enum';
10
+ export * from './position.enum';
11
+ export * from './seniority-level.enum';
12
+ export * from './status.enum';
13
+ export * from './user-activity.enum';
14
+ export * from './web-notification-key.schema';
15
+ export * from './web-notification.schema';
16
+ export * from './years-of-experience.enum';