@aldb2b/common 1.0.846 → 1.0.852
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.
- package/build/db/CustomModel.d.ts +0 -25
- package/build/db/MongooseBase.d.ts +0 -25
- package/build/db/aggregate/AggregateConvertor.d.ts +0 -25
- package/build/db/auditTrail/interfaces/Audit-trail-input.interface.d.ts +1 -1
- package/build/entities/interfaces/connection-dictionary.interface.d.ts +0 -25
- package/build/entities/models/common/common.provider.d.ts +5 -30
- package/build/entities/models/common/common.provider.js +5 -5
- package/build/entities/models/common/common.provider.js.map +1 -1
- package/build/entities/models/common/controllers/audit-trail.controller.js +2 -2
- package/build/entities/models/common/controllers/audit-trail.controller.js.map +1 -1
- package/build/entities/models/common/entities/audit-trail.entity.d.ts +0 -25
- package/build/entities/models/companies/companies.provider.d.ts +49 -26
- package/build/entities/models/companies/companies.provider.js +66 -1
- package/build/entities/models/companies/companies.provider.js.map +1 -1
- package/build/entities/models/companies/dto/update-company-statistics.dto.d.ts +10 -0
- package/build/{types/enddpoint.interface.js → entities/models/companies/dto/update-company-statistics.dto.js} +1 -1
- package/build/entities/models/companies/dto/update-company-statistics.dto.js.map +1 -0
- package/build/entities/models/companies/entities/companies/company-statistic-entity.enum.d.ts +5 -0
- package/build/entities/models/companies/entities/companies/company-statistic-entity.enum.js +10 -0
- package/build/entities/models/companies/entities/companies/company-statistic-entity.enum.js.map +1 -0
- package/build/entities/models/companies/entities/companies/company-statistic-type.enum.d.ts +4 -0
- package/build/entities/models/companies/entities/companies/company-statistic-type.enum.js +9 -0
- package/build/entities/models/companies/entities/companies/company-statistic-type.enum.js.map +1 -0
- package/build/entities/models/companies/entities/companies/company-statistic.entity.d.ts +44 -0
- package/build/entities/models/companies/entities/companies/company-statistic.entity.js +60 -0
- package/build/entities/models/companies/entities/companies/company-statistic.entity.js.map +1 -0
- package/build/entities/models/companies/entities/companies/company.entity.d.ts +50 -0
- package/build/entities/models/companies/entities/{company.entity.js → companies/company.entity.js} +12 -5
- package/build/entities/models/companies/entities/companies/company.entity.js.map +1 -0
- package/build/entities/models/companies/entities/companies/index.d.ts +4 -0
- package/build/entities/models/companies/entities/companies/index.js +21 -0
- package/build/entities/models/companies/entities/companies/index.js.map +1 -0
- package/build/entities/models/companies/entities/contact.entity.d.ts +1 -26
- package/build/entities/models/companies/index.d.ts +3 -1
- package/build/entities/models/companies/index.js +3 -1
- package/build/entities/models/companies/index.js.map +1 -1
- package/build/entities/models/companies/repositories/company-common.repository.d.ts +7 -0
- package/build/entities/models/companies/repositories/company-common.repository.js +12 -0
- package/build/entities/models/companies/repositories/company-common.repository.js.map +1 -0
- package/build/entities/models/companies/services/company-common.service.d.ts +19 -0
- package/build/entities/models/companies/services/company-common.service.js +96 -0
- package/build/entities/models/companies/services/company-common.service.js.map +1 -0
- package/build/entities/models/events/entities/event/event.entity.d.ts +0 -25
- package/build/entities/models/events/entities/eventProfile/company-profile-item.entity.d.ts +0 -25
- package/build/entities/models/events/entities/eventProfile/event-profile.entity.d.ts +0 -25
- package/build/entities/models/events/entities/eventType/event-type.entity.d.ts +0 -25
- package/build/entities/models/events/entities/timestamp.entity.d.ts +0 -25
- package/build/entities/models/events/events.provider.d.ts +0 -25
- package/build/entities/models/meetings/entities/meetingRequests/meeting-request.entity.d.ts +0 -25
- package/build/entities/models/meetings/entities/meetingRequests/rejected-contact.entity.d.ts +0 -25
- package/build/entities/models/meetings/entities/meetings/meeting.entity.d.ts +0 -25
- package/build/entities/models/meetings/entities/userAvailabilities/user-availability-timeslot.entity.d.ts +0 -25
- package/build/entities/models/meetings/entities/userAvailabilities/user-availability.entity.d.ts +0 -25
- package/build/entities/models/meetings/index.d.ts +2 -0
- package/build/entities/models/meetings/index.js +2 -0
- package/build/entities/models/meetings/index.js.map +1 -1
- package/build/entities/models/meetings/meetings.provider.d.ts +0 -25
- package/build/entities/models/meetings/repositories/meeting-common.repository.d.ts +9 -0
- package/build/entities/models/meetings/repositories/meeting-common.repository.js +43 -0
- package/build/entities/models/meetings/repositories/meeting-common.repository.js.map +1 -0
- package/build/entities/models/meetings/repositories/meeting-request-common.repository.d.ts +9 -0
- package/build/entities/models/meetings/repositories/meeting-request-common.repository.js +43 -0
- package/build/entities/models/meetings/repositories/meeting-request-common.repository.js.map +1 -0
- package/build/entities/models/model.providers.d.ts +47 -28
- package/build/entities/models/model.providers.js +2 -0
- package/build/entities/models/model.providers.js.map +1 -1
- package/build/entities/models/subscriptions/entities/companySubscriptions/company-subscription-status.enum.d.ts +8 -0
- package/build/entities/models/subscriptions/entities/companySubscriptions/company-subscription-status.enum.js +13 -0
- package/build/entities/models/subscriptions/entities/companySubscriptions/company-subscription-status.enum.js.map +1 -0
- package/build/entities/models/subscriptions/entities/companySubscriptions/company-subscription-user-status.enum.d.ts +4 -0
- package/build/entities/models/subscriptions/entities/companySubscriptions/company-subscription-user-status.enum.js +9 -0
- package/build/entities/models/subscriptions/entities/companySubscriptions/company-subscription-user-status.enum.js.map +1 -0
- package/build/entities/models/subscriptions/entities/companySubscriptions/company-subscription-user.entity.d.ts +41 -0
- package/build/entities/models/subscriptions/entities/companySubscriptions/company-subscription-user.entity.js +49 -0
- package/build/entities/models/subscriptions/entities/companySubscriptions/company-subscription-user.entity.js.map +1 -0
- package/build/entities/models/subscriptions/entities/companySubscriptions/company-subscription.entity.d.ts +55 -0
- package/build/entities/models/subscriptions/entities/companySubscriptions/company-subscription.entity.js +133 -0
- package/build/entities/models/subscriptions/entities/companySubscriptions/company-subscription.entity.js.map +1 -0
- package/build/entities/models/subscriptions/entities/companySubscriptions/index.d.ts +4 -0
- package/build/entities/models/subscriptions/entities/companySubscriptions/index.js +21 -0
- package/build/entities/models/subscriptions/entities/companySubscriptions/index.js.map +1 -0
- package/build/entities/models/subscriptions/entities/eventSubscriptions/event-subscription-status.enum.d.ts +6 -0
- package/build/entities/models/subscriptions/entities/eventSubscriptions/event-subscription-status.enum.js +11 -0
- package/build/entities/models/subscriptions/entities/eventSubscriptions/event-subscription-status.enum.js.map +1 -0
- package/build/entities/models/subscriptions/entities/eventSubscriptions/event-subscription.entity.d.ts +50 -0
- package/build/entities/models/subscriptions/entities/eventSubscriptions/event-subscription.entity.js +112 -0
- package/build/entities/models/subscriptions/entities/eventSubscriptions/event-subscription.entity.js.map +1 -0
- package/build/entities/models/subscriptions/entities/eventSubscriptions/index.d.ts +2 -0
- package/build/entities/models/subscriptions/entities/eventSubscriptions/index.js +19 -0
- package/build/entities/models/subscriptions/entities/eventSubscriptions/index.js.map +1 -0
- package/build/entities/models/subscriptions/entities/features/endpoint.entity.d.ts +40 -0
- package/build/entities/models/subscriptions/entities/features/endpoint.entity.js +32 -0
- package/build/entities/models/subscriptions/entities/features/endpoint.entity.js.map +1 -0
- package/build/entities/models/subscriptions/entities/features/feature.entity.d.ts +44 -0
- package/build/entities/models/subscriptions/entities/features/feature.entity.js +77 -0
- package/build/entities/models/subscriptions/entities/features/feature.entity.js.map +1 -0
- package/build/entities/models/subscriptions/entities/features/index.d.ts +2 -0
- package/build/entities/models/subscriptions/entities/features/index.js +19 -0
- package/build/entities/models/subscriptions/entities/features/index.js.map +1 -0
- package/build/entities/models/subscriptions/entities/subscriptionLogs/index.d.ts +1 -0
- package/build/entities/models/subscriptions/entities/subscriptionLogs/index.js +18 -0
- package/build/entities/models/subscriptions/entities/subscriptionLogs/index.js.map +1 -0
- package/build/entities/models/subscriptions/entities/subscriptionLogs/subscription-log.entity.d.ts +51 -0
- package/build/entities/models/subscriptions/entities/subscriptionLogs/subscription-log.entity.js +132 -0
- package/build/entities/models/subscriptions/entities/subscriptionLogs/subscription-log.entity.js.map +1 -0
- package/build/entities/models/subscriptions/index.d.ts +5 -0
- package/build/entities/models/subscriptions/index.js +22 -0
- package/build/entities/models/subscriptions/index.js.map +1 -0
- package/build/entities/models/subscriptions/repositories/company-subscription-common.repository.d.ts +7 -0
- package/build/entities/models/subscriptions/repositories/company-subscription-common.repository.js +12 -0
- package/build/entities/models/subscriptions/repositories/company-subscription-common.repository.js.map +1 -0
- package/build/entities/models/subscriptions/repositories/event-subscription-common.repository.d.ts +7 -0
- package/build/entities/models/subscriptions/repositories/event-subscription-common.repository.js +12 -0
- package/build/entities/models/subscriptions/repositories/event-subscription-common.repository.js.map +1 -0
- package/build/entities/models/subscriptions/repositories/index.d.ts +3 -0
- package/build/entities/models/subscriptions/repositories/index.js +20 -0
- package/build/entities/models/subscriptions/repositories/index.js.map +1 -0
- package/build/entities/models/subscriptions/repositories/subscription-log.repository.d.ts +7 -0
- package/build/entities/models/subscriptions/repositories/subscription-log.repository.js +12 -0
- package/build/entities/models/subscriptions/repositories/subscription-log.repository.js.map +1 -0
- package/build/entities/models/subscriptions/subscriptions.provider.d.ts +53 -0
- package/build/entities/models/subscriptions/subscriptions.provider.js +44 -0
- package/build/entities/models/subscriptions/subscriptions.provider.js.map +1 -0
- package/build/entities/models/users/entities/rolePermissions/permission.entity.d.ts +0 -25
- package/build/entities/models/users/entities/rolePermissions/role-permission.entity.d.ts +0 -25
- package/build/entities/models/users/entities/users/chat-info.entity.d.ts +0 -25
- package/build/entities/models/users/entities/users/event-info.entity.d.ts +0 -25
- package/build/entities/models/users/entities/users/location.entity.d.ts +0 -25
- package/build/entities/models/users/entities/users/user.entity.d.ts +0 -25
- package/build/entities/models/users/users.provider.d.ts +0 -25
- package/build/entities/mongoose.providers.d.ts +0 -25
- package/build/entities/mongoose.providers.js +4 -0
- package/build/entities/mongoose.providers.js.map +1 -1
- package/build/entities/services/generate-model.d.ts +0 -25
- package/build/entities/services/get-model-ref.d.ts +0 -25
- package/build/enums/database-connection.enum.d.ts +2 -1
- package/build/enums/database-connection.enum.js +1 -0
- package/build/enums/database-connection.enum.js.map +1 -1
- package/build/enums/database-model.enum.d.ts +5 -1
- package/build/enums/database-model.enum.js +4 -0
- package/build/enums/database-model.enum.js.map +1 -1
- package/build/enums/repository-provider.enum.d.ts +9 -0
- package/build/enums/repository-provider.enum.js +14 -0
- package/build/enums/repository-provider.enum.js.map +1 -0
- package/build/enums/request-method.enum.d.ts +7 -0
- package/build/enums/request-method.enum.js +12 -0
- package/build/enums/request-method.enum.js.map +1 -0
- package/build/enums/service-provider.enum.d.ts +4 -0
- package/build/enums/service-provider.enum.js +9 -0
- package/build/enums/service-provider.enum.js.map +1 -0
- package/build/index.d.ts +6 -5
- package/build/index.js +6 -5
- package/build/index.js.map +1 -1
- package/build/middlewares/inject-subscription.middleware.d.ts +15 -0
- package/build/middlewares/inject-subscription.middleware.js +219 -0
- package/build/middlewares/inject-subscription.middleware.js.map +1 -0
- package/build/middlewares/subscription-validator.middleware.js +4 -1
- package/build/middlewares/subscription-validator.middleware.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/utils/getEndpoint.d.ts +4 -4
- package/build/utils/getEndpoint.js.map +1 -1
- package/package.json +1 -1
- package/build/entities/models/companies/entities/company.entity.d.ts +0 -73
- package/build/entities/models/companies/entities/company.entity.js.map +0 -1
- package/build/enums/repository-provide.enum.d.ts +0 -3
- package/build/enums/repository-provide.enum.js +0 -8
- package/build/enums/repository-provide.enum.js.map +0 -1
- package/build/enums/service-provide.enum.d.ts +0 -3
- package/build/enums/service-provide.enum.js +0 -8
- package/build/enums/service-provide.enum.js.map +0 -1
- package/build/types/enddpoint.interface.d.ts +0 -10
- package/build/types/enddpoint.interface.js.map +0 -1
- package/build/types/feature.interface.d.ts +0 -10
- package/build/types/feature.interface.js +0 -3
- package/build/types/feature.interface.js.map +0 -1
package/build/index.d.ts
CHANGED
|
@@ -72,7 +72,6 @@ export * from './events/exchanges';
|
|
|
72
72
|
export * from './events/sync-event-creation.interface';
|
|
73
73
|
export * from './events/sync-accessibility-creation.interface';
|
|
74
74
|
export * from './events/campaign-meeting-request-created.interface';
|
|
75
|
-
export * from './events/has-subscription.interface';
|
|
76
75
|
export * from './events/subtract-subscription-point.interface';
|
|
77
76
|
export * from './events/subtract-subscription-limit.interface';
|
|
78
77
|
export * from './events/update-company-meeting-stats.interface';
|
|
@@ -132,6 +131,7 @@ export * from './events/elastic-find-event.interface';
|
|
|
132
131
|
export * from './events/create-ticket-hs.interface';
|
|
133
132
|
export * from './events/delete-company-custom-fields.interface';
|
|
134
133
|
export * from './events/update-elastic-dynamic-property.interface';
|
|
134
|
+
export * from './events/has-subscription.interface';
|
|
135
135
|
export * from './validators/conditional-required';
|
|
136
136
|
export * from './validators/date-validator';
|
|
137
137
|
export * from './validators/validateNewItem';
|
|
@@ -183,10 +183,9 @@ export * from './types/notification-event.enum';
|
|
|
183
183
|
export * from './types/calendar-source-type.enum';
|
|
184
184
|
export * from './types/notification-type.enum';
|
|
185
185
|
export * from './types/record-type.enum';
|
|
186
|
-
export * from './types/enddpoint.interface';
|
|
187
186
|
export * from './types/subscription-model.enum';
|
|
188
187
|
export * from './types/user-language.enum';
|
|
189
|
-
export * from './types/feature.
|
|
188
|
+
export * from './types/feature-type.enum';
|
|
190
189
|
export * from './types/endpoint-type.enum';
|
|
191
190
|
export * from './types/feature-mappings';
|
|
192
191
|
export * from './types/feature-type.enum';
|
|
@@ -213,6 +212,7 @@ export * from './middlewares/verify-contact.middleware';
|
|
|
213
212
|
export * from './middlewares/full-fill-verification.middleware';
|
|
214
213
|
export * from './middlewares/global-request.middleware';
|
|
215
214
|
export * from './middlewares/event-profile.middleware';
|
|
215
|
+
export * from './middlewares/inject-subscription.middleware';
|
|
216
216
|
export * from './utils/create-default-directories';
|
|
217
217
|
export * from './utils/equal-array-object';
|
|
218
218
|
export * from './utils/equal-object';
|
|
@@ -245,8 +245,8 @@ export * from './enums/challenge-status.enum';
|
|
|
245
245
|
export * from './enums/database-connection.enum';
|
|
246
246
|
export * from './enums/database-model.enum';
|
|
247
247
|
export * from './enums/chat-preferences-enum';
|
|
248
|
-
export * from './enums/repository-
|
|
249
|
-
export * from './enums/service-
|
|
248
|
+
export * from './enums/repository-provider.enum';
|
|
249
|
+
export * from './enums/service-provider.enum';
|
|
250
250
|
export * from './enums/query-type.enum';
|
|
251
251
|
export * from './enums/company-order.enum';
|
|
252
252
|
export * from './enums/elastic-search-type.enum';
|
|
@@ -272,6 +272,7 @@ export * from './entities/models/events';
|
|
|
272
272
|
export * from './entities/models/common';
|
|
273
273
|
export * from './entities/services';
|
|
274
274
|
export * from './entities/models/meetings';
|
|
275
|
+
export * from './entities/models/subscriptions';
|
|
275
276
|
export * from './common/common.module';
|
|
276
277
|
export * from './common/const';
|
|
277
278
|
export * from './common/controllers/common.controller';
|
package/build/index.js
CHANGED
|
@@ -88,7 +88,6 @@ __exportStar(require("./events/exchanges"), exports);
|
|
|
88
88
|
__exportStar(require("./events/sync-event-creation.interface"), exports);
|
|
89
89
|
__exportStar(require("./events/sync-accessibility-creation.interface"), exports);
|
|
90
90
|
__exportStar(require("./events/campaign-meeting-request-created.interface"), exports);
|
|
91
|
-
__exportStar(require("./events/has-subscription.interface"), exports);
|
|
92
91
|
__exportStar(require("./events/subtract-subscription-point.interface"), exports);
|
|
93
92
|
__exportStar(require("./events/subtract-subscription-limit.interface"), exports);
|
|
94
93
|
__exportStar(require("./events/update-company-meeting-stats.interface"), exports);
|
|
@@ -148,6 +147,7 @@ __exportStar(require("./events/elastic-find-event.interface"), exports);
|
|
|
148
147
|
__exportStar(require("./events/create-ticket-hs.interface"), exports);
|
|
149
148
|
__exportStar(require("./events/delete-company-custom-fields.interface"), exports);
|
|
150
149
|
__exportStar(require("./events/update-elastic-dynamic-property.interface"), exports);
|
|
150
|
+
__exportStar(require("./events/has-subscription.interface"), exports);
|
|
151
151
|
__exportStar(require("./validators/conditional-required"), exports);
|
|
152
152
|
__exportStar(require("./validators/date-validator"), exports);
|
|
153
153
|
__exportStar(require("./validators/validateNewItem"), exports);
|
|
@@ -199,10 +199,9 @@ __exportStar(require("./types/notification-event.enum"), exports);
|
|
|
199
199
|
__exportStar(require("./types/calendar-source-type.enum"), exports);
|
|
200
200
|
__exportStar(require("./types/notification-type.enum"), exports);
|
|
201
201
|
__exportStar(require("./types/record-type.enum"), exports);
|
|
202
|
-
__exportStar(require("./types/enddpoint.interface"), exports);
|
|
203
202
|
__exportStar(require("./types/subscription-model.enum"), exports);
|
|
204
203
|
__exportStar(require("./types/user-language.enum"), exports);
|
|
205
|
-
__exportStar(require("./types/feature.
|
|
204
|
+
__exportStar(require("./types/feature-type.enum"), exports);
|
|
206
205
|
__exportStar(require("./types/endpoint-type.enum"), exports);
|
|
207
206
|
__exportStar(require("./types/feature-mappings"), exports);
|
|
208
207
|
__exportStar(require("./types/feature-type.enum"), exports);
|
|
@@ -229,6 +228,7 @@ __exportStar(require("./middlewares/verify-contact.middleware"), exports);
|
|
|
229
228
|
__exportStar(require("./middlewares/full-fill-verification.middleware"), exports);
|
|
230
229
|
__exportStar(require("./middlewares/global-request.middleware"), exports);
|
|
231
230
|
__exportStar(require("./middlewares/event-profile.middleware"), exports);
|
|
231
|
+
__exportStar(require("./middlewares/inject-subscription.middleware"), exports);
|
|
232
232
|
__exportStar(require("./utils/create-default-directories"), exports);
|
|
233
233
|
__exportStar(require("./utils/equal-array-object"), exports);
|
|
234
234
|
__exportStar(require("./utils/equal-object"), exports);
|
|
@@ -261,8 +261,8 @@ __exportStar(require("./enums/challenge-status.enum"), exports);
|
|
|
261
261
|
__exportStar(require("./enums/database-connection.enum"), exports);
|
|
262
262
|
__exportStar(require("./enums/database-model.enum"), exports);
|
|
263
263
|
__exportStar(require("./enums/chat-preferences-enum"), exports);
|
|
264
|
-
__exportStar(require("./enums/repository-
|
|
265
|
-
__exportStar(require("./enums/service-
|
|
264
|
+
__exportStar(require("./enums/repository-provider.enum"), exports);
|
|
265
|
+
__exportStar(require("./enums/service-provider.enum"), exports);
|
|
266
266
|
__exportStar(require("./enums/query-type.enum"), exports);
|
|
267
267
|
__exportStar(require("./enums/company-order.enum"), exports);
|
|
268
268
|
__exportStar(require("./enums/elastic-search-type.enum"), exports);
|
|
@@ -288,6 +288,7 @@ __exportStar(require("./entities/models/events"), exports);
|
|
|
288
288
|
__exportStar(require("./entities/models/common"), exports);
|
|
289
289
|
__exportStar(require("./entities/services"), exports);
|
|
290
290
|
__exportStar(require("./entities/models/meetings"), exports);
|
|
291
|
+
__exportStar(require("./entities/models/subscriptions"), exports);
|
|
291
292
|
__exportStar(require("./common/common.module"), exports);
|
|
292
293
|
__exportStar(require("./common/const"), exports);
|
|
293
294
|
__exportStar(require("./common/controllers/common.controller"), exports);
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oEAAiD;AACjD,oDAAiC;AACjC,iEAA8C;AAC9C,mEAAgD;AAChD,+DAA4C;AAC5C,oEAAiD;AACjD,qEAAkD;AAClD,oEAAiD;AACjD,sEAAmD;AACnD,6EAA0D;AAC1D,uEAAoD;AACpD,sEAAmD;AACnD,6EAA0D;AAC1D,2EAAwD;AACxD,4EAAyD;AACzD,iEAA8C;AAC9C,4EAAyD;AACzD,4EAAyD;AACzD,wEAAqD;AACrD,yEAAsD;AACtD,yEAAsD;AACtD,oEAAiD;AACjD,6EAA0D;AAC1D,2EAAwD;AACxD,8EAA2D;AAC3D,mEAAgD;AAChD,oEAAiD;AACjD,oEAAiD;AACjD,oEAAiD;AACjD,wEAAqD;AACrD,2EAAwD;AACxD,0EAAuD;AACvD,mEAAgD;AAChD,kDAA+B;AAC/B,oEAAiD;AACjD,2EAAwD;AACxD,oEAAiD;AACjD,qEAAkD;AAClD,qEAAkD;AAClD,wEAAqD;AACrD,sEAAmD;AACnD,0EAAuD;AACvD,wEAAqD;AACrD,4EAAyD;AACzD,oEAAiD;AACjD,oEAAiD;AACjD,wEAAqD;AACrD,0EAAuD;AACvD,2EAAwD;AACxD,yEAAsD;AACtD,kFAA+D;AAC/D,qEAAkD;AAClD,qEAAkD;AAClD,qEAAkD;AAClD,qEAAkD;AAClD,mEAAgD;AAChD,mEAAgD;AAChD,qEAAkD;AAClD,6EAA0D;AAC1D,qEAAkD;AAClD,qEAAkD;AAClD,qEAAkD;AAClD,uEAAoD;AACpD,uEAAoD;AACpD,iEAA8C;AAC9C,iEAA8C;AAC9C,qEAAkD;AAClD,qEAAkD;AAClD,4EAAyD;AACzD,4EAAyD;AACzD,qDAAkC;AAClC,yEAAsD;AACtD,iFAA8D;AAC9D,sFAAmE;AACnE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oEAAiD;AACjD,oDAAiC;AACjC,iEAA8C;AAC9C,mEAAgD;AAChD,+DAA4C;AAC5C,oEAAiD;AACjD,qEAAkD;AAClD,oEAAiD;AACjD,sEAAmD;AACnD,6EAA0D;AAC1D,uEAAoD;AACpD,sEAAmD;AACnD,6EAA0D;AAC1D,2EAAwD;AACxD,4EAAyD;AACzD,iEAA8C;AAC9C,4EAAyD;AACzD,4EAAyD;AACzD,wEAAqD;AACrD,yEAAsD;AACtD,yEAAsD;AACtD,oEAAiD;AACjD,6EAA0D;AAC1D,2EAAwD;AACxD,8EAA2D;AAC3D,mEAAgD;AAChD,oEAAiD;AACjD,oEAAiD;AACjD,oEAAiD;AACjD,wEAAqD;AACrD,2EAAwD;AACxD,0EAAuD;AACvD,mEAAgD;AAChD,kDAA+B;AAC/B,oEAAiD;AACjD,2EAAwD;AACxD,oEAAiD;AACjD,qEAAkD;AAClD,qEAAkD;AAClD,wEAAqD;AACrD,sEAAmD;AACnD,0EAAuD;AACvD,wEAAqD;AACrD,4EAAyD;AACzD,oEAAiD;AACjD,oEAAiD;AACjD,wEAAqD;AACrD,0EAAuD;AACvD,2EAAwD;AACxD,yEAAsD;AACtD,kFAA+D;AAC/D,qEAAkD;AAClD,qEAAkD;AAClD,qEAAkD;AAClD,qEAAkD;AAClD,mEAAgD;AAChD,mEAAgD;AAChD,qEAAkD;AAClD,6EAA0D;AAC1D,qEAAkD;AAClD,qEAAkD;AAClD,qEAAkD;AAClD,uEAAoD;AACpD,uEAAoD;AACpD,i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6B;AAC7B,iDAA8B;AAC9B,uDAAoC;AACpC,wDAAqC;AACrC,uDAAoC;AACpC,0DAAuC;AACvC,wDAAqC;AAErC,qEAAkD;AAClD,kEAA+C;AAC/C,oEAAiD;AACjD,yDAAsC;AACtC,gEAA6C;AAC7C,8DAA2C;AAC3C,gEAA6C;AAC7C,mEAAgD;AAChD,8DAA2C;AAC3C,gEAA6C;AAC7C,mEAAgD;AAChD,gEAA6C;AAC7C,0DAAuC;AACvC,6DAA0C;AAC1C,mEAAgD;AAChD,wEAAqD;AACrD,iEAA8C;AAC9C,6EAA0D;AAE1D,iEAA8C;AAC9C,wEAAqD;AACrD,mEAAgD;AAChD,iEAA8C;AAC9C,iEAA8C;AAC9C,oEAAiD;AACjD,iEAA8C;AAE9C,qEAAkD;AAClD,qEAAkD;AAElD,6DAA0C;AAC1C,wFAAqE;AACrE,gEAA6C;AAC7C,oEAAiD;AACjD,8DAA2C;AAC3C,0DAAuC;AACvC,2DAAwC;AACxC,2DAAwC;AACxC,sDAAmC;AACnC,6DAA0C;AAC1C,kEAA+C;AAE/C,yDAAsC;AACtC,iDAA8B;AAC9B,yEAAsD;AACtD,4EAAyD;AACzD,6EAA0D;AAC1D,wFAAqE;AACrE,iFAA8D;AAC9D,mEAAgD;AAChD,iDAA8B;AAE9B,4EAAyD;AACzD,6EAA0D"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Request, Response, NextFunction } from 'express';
|
|
2
|
+
import { SubscriptionLogRepository } from '../entities/models/subscriptions/repositories/subscription-log.repository';
|
|
3
|
+
import { CompanySubscriptionCommonRepository, EventSubscriptionCommonRepository } from '../entities/models/subscriptions';
|
|
4
|
+
import { ClientProxy } from '@nestjs/microservices';
|
|
5
|
+
import { CompanyCommonService } from '../entities/models/companies';
|
|
6
|
+
export declare function InjectSubscriptionLogMiddleware(relatedRecordId?: string): {
|
|
7
|
+
new (subscriptionLogRepository: SubscriptionLogRepository, companySubscriptionRepository: CompanySubscriptionCommonRepository, eventSubscriptionRepository: EventSubscriptionCommonRepository, client: ClientProxy, companyCommonService: CompanyCommonService): {
|
|
8
|
+
subscriptionLogRepository: SubscriptionLogRepository;
|
|
9
|
+
companySubscriptionRepository: CompanySubscriptionCommonRepository;
|
|
10
|
+
eventSubscriptionRepository: EventSubscriptionCommonRepository;
|
|
11
|
+
client: ClientProxy;
|
|
12
|
+
companyCommonService: CompanyCommonService;
|
|
13
|
+
use(request: Request, response: Response, next: NextFunction): Promise<void>;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.InjectSubscriptionLogMiddleware = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const subscription_log_repository_1 = require("../entities/models/subscriptions/repositories/subscription-log.repository");
|
|
18
|
+
const getHeaderParam_1 = require("../utils/getHeaderParam");
|
|
19
|
+
const get_parsed_query_1 = require("../utils/get-parsed-query");
|
|
20
|
+
const subscriptions_1 = require("../entities/models/subscriptions");
|
|
21
|
+
const endpoint_type_enum_1 = require("../types/endpoint-type.enum");
|
|
22
|
+
const getEndpoint_1 = require("../utils/getEndpoint");
|
|
23
|
+
const rxjs_1 = require("rxjs");
|
|
24
|
+
const microservices_1 = require("@nestjs/microservices");
|
|
25
|
+
const subjects_1 = require("../events/subjects");
|
|
26
|
+
const companies_1 = require("../entities/models/companies");
|
|
27
|
+
function InjectSubscriptionLogMiddleware(relatedRecordId) {
|
|
28
|
+
let SubscriptionLogMiddleware = class SubscriptionLogMiddleware {
|
|
29
|
+
constructor(subscriptionLogRepository, companySubscriptionRepository, eventSubscriptionRepository, client, companyCommonService) {
|
|
30
|
+
this.subscriptionLogRepository = subscriptionLogRepository;
|
|
31
|
+
this.companySubscriptionRepository = companySubscriptionRepository;
|
|
32
|
+
this.eventSubscriptionRepository = eventSubscriptionRepository;
|
|
33
|
+
this.client = client;
|
|
34
|
+
this.companyCommonService = companyCommonService;
|
|
35
|
+
}
|
|
36
|
+
async use(request, response, next) {
|
|
37
|
+
let hasSubscriptionLog = false;
|
|
38
|
+
const userId = (0, getHeaderParam_1.getHeaderParam)(request.headers, 'id');
|
|
39
|
+
const companyId = (0, getHeaderParam_1.getHeaderParam)(request.headers, 'company');
|
|
40
|
+
const contactId = (0, getHeaderParam_1.getHeaderParam)(request.headers, 'contactId');
|
|
41
|
+
const eventId = (0, getHeaderParam_1.getHeaderParam)(request.headers, 'event-id');
|
|
42
|
+
if (relatedRecordId) {
|
|
43
|
+
const response = await this.subscriptionLogRepository.read({
|
|
44
|
+
query: {
|
|
45
|
+
relatedRecordId: relatedRecordId,
|
|
46
|
+
companyId: companyId,
|
|
47
|
+
},
|
|
48
|
+
lean: true,
|
|
49
|
+
necessaryProjectionArray: ['_id'],
|
|
50
|
+
limit: 1,
|
|
51
|
+
});
|
|
52
|
+
hasSubscriptionLog =
|
|
53
|
+
response.data && response.data.length ? true : false;
|
|
54
|
+
}
|
|
55
|
+
if (hasSubscriptionLog === false) {
|
|
56
|
+
let subscription = null;
|
|
57
|
+
let companySubscriptionId;
|
|
58
|
+
let eventSubscriptionId;
|
|
59
|
+
const companySubscription = await this.companySubscriptionRepository.findOne({ company: companyId, status: subscriptions_1.CompanySubscriptionStatus.ACTIVE }, {}, [], {
|
|
60
|
+
lean: true,
|
|
61
|
+
});
|
|
62
|
+
if (companySubscription) {
|
|
63
|
+
subscription = companySubscription;
|
|
64
|
+
companySubscriptionId = companySubscription._id;
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
const eventSubscription = await this.eventSubscriptionRepository.findOne({ company: companyId, status: subscriptions_1.CompanySubscriptionStatus.ACTIVE }, {}, [], {
|
|
68
|
+
lean: true,
|
|
69
|
+
});
|
|
70
|
+
if (eventSubscription) {
|
|
71
|
+
subscription = eventSubscription;
|
|
72
|
+
eventSubscriptionId = eventSubscription._id;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
if (!subscription) {
|
|
76
|
+
throw new common_1.ForbiddenException('Subscription is required');
|
|
77
|
+
}
|
|
78
|
+
const features = subscription
|
|
79
|
+
? subscription.features && subscription.features.length
|
|
80
|
+
? subscription.features
|
|
81
|
+
: []
|
|
82
|
+
: [];
|
|
83
|
+
const remainingPoints = subscription
|
|
84
|
+
? subscription.remainingPoints
|
|
85
|
+
? subscription.remainingPoints
|
|
86
|
+
: 0
|
|
87
|
+
: 0;
|
|
88
|
+
const { endpoint, feature } = validateSubscription(features, remainingPoints, request.method, request.route.path);
|
|
89
|
+
const chunks = [];
|
|
90
|
+
let oldWrite = response.write;
|
|
91
|
+
const overwriteWrite = async (...restArgs) => {
|
|
92
|
+
chunks.push(Buffer.from(restArgs[0]));
|
|
93
|
+
oldWrite.apply(response, restArgs);
|
|
94
|
+
};
|
|
95
|
+
response.write = overwriteWrite;
|
|
96
|
+
let oldEnd = response.end;
|
|
97
|
+
const overwriteEnd = async (...restArgs) => {
|
|
98
|
+
if (restArgs[0]) {
|
|
99
|
+
chunks.push(Buffer.from(restArgs[0]));
|
|
100
|
+
}
|
|
101
|
+
let body = Buffer.concat(chunks).toString('utf8');
|
|
102
|
+
if (body == null || body == undefined) {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
body = (0, get_parsed_query_1.getParsedQuery)(body, null);
|
|
107
|
+
if (body.success) {
|
|
108
|
+
relatedRecordId = relatedRecordId
|
|
109
|
+
? relatedRecordId
|
|
110
|
+
: body.result && Array.isArray(body.result) == false
|
|
111
|
+
? body.result['_id']
|
|
112
|
+
: null;
|
|
113
|
+
await this.subscriptionLogRepository.create({
|
|
114
|
+
userId: userId,
|
|
115
|
+
contactId: contactId,
|
|
116
|
+
companyId: companyId,
|
|
117
|
+
companySubscriptionId: companySubscriptionId,
|
|
118
|
+
eventSubscriptionId: eventSubscriptionId,
|
|
119
|
+
subscriptionId: subscription.subscription,
|
|
120
|
+
relatedRecordId: relatedRecordId,
|
|
121
|
+
featureType: feature.featureType,
|
|
122
|
+
featureId: feature._id,
|
|
123
|
+
endpointId: endpoint._id,
|
|
124
|
+
});
|
|
125
|
+
const description = subtractSubscriptionDescription(endpoint, feature, response['description']);
|
|
126
|
+
(0, rxjs_1.firstValueFrom)(this.client.send(subjects_1.Subjects.SubtractSubscriptionPoint, {
|
|
127
|
+
point: endpoint.point,
|
|
128
|
+
id: subscription._id,
|
|
129
|
+
method: endpoint.method,
|
|
130
|
+
action: 'endpoint-called',
|
|
131
|
+
description: description.trim(),
|
|
132
|
+
createdBy: contactId,
|
|
133
|
+
relatedRecord: relatedRecordId,
|
|
134
|
+
relatedRecordType: feature.featureType,
|
|
135
|
+
event: eventId,
|
|
136
|
+
}));
|
|
137
|
+
await this.companyCommonService.updateCompanyStatistics({
|
|
138
|
+
eventId: eventId,
|
|
139
|
+
companyIds: [companyId],
|
|
140
|
+
featureType: feature.featureType,
|
|
141
|
+
statisticType: companies_1.CompanyStatisticType.FEATURE,
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
oldEnd.apply(response, restArgs);
|
|
146
|
+
};
|
|
147
|
+
response.end = overwriteEnd;
|
|
148
|
+
}
|
|
149
|
+
next();
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
SubscriptionLogMiddleware = __decorate([
|
|
153
|
+
(0, common_1.Injectable)(),
|
|
154
|
+
__param(3, (0, common_1.Inject)('SUBSCRIPTION_SERVICE')),
|
|
155
|
+
__param(4, (0, common_1.Inject)('COMPANY_COMMON_SERVICE')),
|
|
156
|
+
__metadata("design:paramtypes", [subscription_log_repository_1.SubscriptionLogRepository,
|
|
157
|
+
subscriptions_1.CompanySubscriptionCommonRepository,
|
|
158
|
+
subscriptions_1.EventSubscriptionCommonRepository,
|
|
159
|
+
microservices_1.ClientProxy,
|
|
160
|
+
companies_1.CompanyCommonService])
|
|
161
|
+
], SubscriptionLogMiddleware);
|
|
162
|
+
return SubscriptionLogMiddleware;
|
|
163
|
+
}
|
|
164
|
+
exports.InjectSubscriptionLogMiddleware = InjectSubscriptionLogMiddleware;
|
|
165
|
+
const validateSubscription = (features, remainingPoints, method, path) => {
|
|
166
|
+
const { endpoint, feature, exceptionResp } = (0, getEndpoint_1.getEndpoint)(features, method, path);
|
|
167
|
+
if (exceptionResp) {
|
|
168
|
+
throw new common_1.ForbiddenException(exceptionResp);
|
|
169
|
+
}
|
|
170
|
+
if (endpoint && endpoint.isFree == false) {
|
|
171
|
+
if (endpoint.endpointType === endpoint_type_enum_1.EndpointType.BINARY) {
|
|
172
|
+
throw new common_1.ForbiddenException({
|
|
173
|
+
statusCode: 403,
|
|
174
|
+
message: 'Please upgrade your subscription',
|
|
175
|
+
error: 'Forbidden',
|
|
176
|
+
description: 'Please upgrade your subscription',
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
else if (endpoint.endpointType === endpoint_type_enum_1.EndpointType.LIMIT &&
|
|
180
|
+
endpoint.limit == 0) {
|
|
181
|
+
throw new common_1.ForbiddenException({
|
|
182
|
+
statusCode: 402,
|
|
183
|
+
message: 'Limits exceeded',
|
|
184
|
+
error: 'Forbidden',
|
|
185
|
+
description: 'Limits exceeded, please renew your subscription or upgrade your plan',
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
else if (endpoint.endpointType === endpoint_type_enum_1.EndpointType.CREDIT &&
|
|
189
|
+
remainingPoints < endpoint.point) {
|
|
190
|
+
throw new common_1.ForbiddenException({
|
|
191
|
+
statusCode: 402,
|
|
192
|
+
message: 'Insufficient credit',
|
|
193
|
+
error: 'Forbidden',
|
|
194
|
+
description: 'Insufficient credits, please renew your subscription or upgrade your plan',
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
return { endpoint, feature };
|
|
199
|
+
};
|
|
200
|
+
const subtractSubscriptionDescription = (endpoint, feature, description) => {
|
|
201
|
+
description = description ? description : '';
|
|
202
|
+
if (endpoint.isFree === false &&
|
|
203
|
+
endpoint.endpointType !== endpoint_type_enum_1.EndpointType.BINARY) {
|
|
204
|
+
if (endpoint?.endpointType === endpoint_type_enum_1.EndpointType.LIMIT) {
|
|
205
|
+
description =
|
|
206
|
+
description +
|
|
207
|
+
' ' +
|
|
208
|
+
`Deduct ${endpoint.limit} ${endpoint.endpointType} for ${feature.featureType}`;
|
|
209
|
+
}
|
|
210
|
+
else if (endpoint?.endpointType === endpoint_type_enum_1.EndpointType.CREDIT) {
|
|
211
|
+
description =
|
|
212
|
+
description +
|
|
213
|
+
' ' +
|
|
214
|
+
`Deduct ${endpoint.point} ${endpoint.endpointType} for ${feature.featureType}`;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
return description;
|
|
218
|
+
};
|
|
219
|
+
//# sourceMappingURL=inject-subscription.middleware.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inject-subscription.middleware.js","sourceRoot":"","sources":["../../src/middlewares/inject-subscription.middleware.ts"],"names":[],"mappings":";;;;;;;;;;;;;;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M,IAAI,QAAQ,EAAE,YAAY,KAAK,iCAAY,CAAC,MAAM,EAAE,CAAC;YAC1D,WAAW;gBACT,WAAW;oBACX,GAAG;oBACH,UAAU,QAAQ,CAAC,KAAK,IAAI,QAAQ,CAAC,YAAY,QAAQ,OAAO,CAAC,WAAW,EAAE,CAAA;QAClF,CAAC;IACH,CAAC;IACD,OAAO,WAAW,CAAA;AACpB,CAAC,CAAA"}
|
|
@@ -72,7 +72,10 @@ let SubscriptionValidatorMiddleware = class SubscriptionValidatorMiddleware {
|
|
|
72
72
|
}
|
|
73
73
|
async isPermitted(subscription, method, path) {
|
|
74
74
|
const { features, remainingPoints } = subscription;
|
|
75
|
-
const { endpoint, feature } = (0, getEndpoint_1.getEndpoint)(features, method, path);
|
|
75
|
+
const { endpoint, feature, exceptionResp } = (0, getEndpoint_1.getEndpoint)(features, method, path);
|
|
76
|
+
if (exceptionResp) {
|
|
77
|
+
throw new common_1.ForbiddenException(exceptionResp);
|
|
78
|
+
}
|
|
76
79
|
if (endpoint && endpoint.isFree == false) {
|
|
77
80
|
if (endpoint.endpointType === endpoint_type_enum_1.EndpointType.BINARY) {
|
|
78
81
|
throw new common_1.ForbiddenException({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscription-validator.middleware.js","sourceRoot":"","sources":["../../src/middlewares/subscription-validator.middleware.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAKuB;AACvB,yDAAmD;AAEnD,+BAAqC;AACrC,sDAAkD;AAClD,iDAA6C;AAC7C,oEAA0D;AAC1D,4DAAwD;AACxD,wDAAmD;AAG5C,IAAM,+BAA+B,GAArC,MAAM,+BAA+B;IAE1C,YACmD,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;QAEpE,IAAI,CAAC,WAAW,GAAG,IAAI,0BAAW,EAAE,CAAA;IACtC,CAAC;IAED,KAAK,CAAC,GAAG,CACP,OAAgB,EAChB,QAAkB,EAClB,IAAkB;QAElB,IAAI,OAA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AAI,CAAC,WAAW,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAA;gBAClE,SAAS,GAAG,MAAM,IAAI,CAAC,WAAW,CAChC,IAAI,EACJ,OAAO,CAAC,MAAM,EACd,OAAO,CAAC,KAAK,CAAC,IAAI,CACnB,CAAA;YACH,CAAC;QACH,CAAC;QAED,IAAI,IAAI,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;YACrB,OAAO,CAAC,gBAAgB,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QAC9C,CAAC;QACD,IAAI,SAAS,IAAI,SAAS,CAAC,OAAO,EAAE,CAAC;YACnC,OAAO,CAAC,WAAW,CAAC,GAAG,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;QACtD,CAAC;QACD,IAAI,SAAS,IAAI,SAAS,CAAC,QAAQ,EAAE,CAAC;YACpC,OAAO,CAAC,YAAY,CAAC,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;QACxD,CAAC;QAED,OAAO,IAAI,EAAE,CAAA;IACf,CAAC;IAEO,KAAK,CAAC,WAAW,CAAC,YAAY,EAAE,MAAc,EAAE,IAAY;QAClE,MAAM,EAAE,QAAQ,EAAE,eAAe,EAAE,GAAG,YAAY,CAAA;QAElD,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAA,yBAAW,
|
|
1
|
+
{"version":3,"file":"subscription-validator.middleware.js","sourceRoot":"","sources":["../../src/middlewares/subscription-validator.middleware.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAKuB;AACvB,yDAAmD;AAEnD,+BAAqC;AACrC,sDAAkD;AAClD,iDAA6C;AAC7C,oEAA0D;AAC1D,4DAAwD;AACxD,wDAAmD;AAG5C,IAAM,+BAA+B,GAArC,MAAM,+BAA+B;IAE1C,YACmD,MA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