@aldb2b/common 1.0.2133 → 1.0.2135
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/entities/interfaces/connection-dictionary.interface.d.ts +0 -25
- package/build/entities/models/common/common.provider.d.ts +0 -25
- package/build/entities/models/common/entities/audit-trail.entity.d.ts +0 -25
- package/build/entities/models/common/entities/location.entity.d.ts +0 -25
- package/build/entities/models/common/entities/preference-customization.entity.d.ts +0 -25
- package/build/entities/models/common/entities/tracing.entity.d.ts +0 -25
- package/build/entities/models/common/repositories/tracing.repository.d.ts +3 -2
- package/build/entities/models/common/repositories/tracing.repository.js +6 -5
- package/build/entities/models/common/repositories/tracing.repository.js.map +1 -1
- package/build/entities/models/companies/companies.provider.d.ts +0 -25
- package/build/entities/models/companies/entities/categories/category.schema.d.ts +0 -25
- package/build/entities/models/companies/entities/cities/city.schema.d.ts +0 -25
- package/build/entities/models/companies/entities/companies/assignee.schema.d.ts +0 -25
- package/build/entities/models/companies/entities/companies/company-contact-detail.schema.d.ts +0 -25
- package/build/entities/models/companies/entities/companies/company-statistic.entity.d.ts +0 -25
- package/build/entities/models/companies/entities/companies/company.entity.d.ts +0 -25
- package/build/entities/models/companies/entities/companies/custom-fields.schema.d.ts +0 -25
- package/build/entities/models/companies/entities/companies/export-capability.schema.d.ts +0 -25
- package/build/entities/models/companies/entities/companies/hr-data.schema.d.ts +0 -25
- package/build/entities/models/companies/entities/companies/investor.schema.d.ts +0 -25
- package/build/entities/models/companies/entities/companies/manufacturer.schema.d.ts +0 -25
- package/build/entities/models/companies/entities/companies/preference.schema.d.ts +0 -25
- package/build/entities/models/companies/entities/companies/sector.schema.d.ts +0 -25
- package/build/entities/models/companies/entities/companies/status-detail.schema.d.ts +0 -25
- package/build/entities/models/companies/entities/contacts/activity-log.schema.d.ts +0 -25
- package/build/entities/models/companies/entities/contacts/company-status-detail.schema.d.ts +0 -25
- package/build/entities/models/companies/entities/contacts/contact-detail.schema.d.ts +0 -25
- package/build/entities/models/companies/entities/contacts/contact.entity.d.ts +2 -26
- package/build/entities/models/companies/entities/contacts/contact.entity.js +8 -7
- package/build/entities/models/companies/entities/contacts/contact.entity.js.map +1 -1
- package/build/entities/models/companies/entities/contacts/device-notification.schema.d.ts +0 -25
- package/build/entities/models/companies/entities/contacts/location.schema.d.ts +0 -25
- package/build/entities/models/companies/entities/contacts/web-notification-key.schema.d.ts +0 -25
- package/build/entities/models/companies/entities/contacts/web-notification.schema.d.ts +0 -25
- package/build/entities/models/companies/entities/countries/country.schema.d.ts +0 -25
- package/build/entities/models/events/entities/event/event.entity.d.ts +0 -25
- package/build/entities/models/events/entities/event/sponsor.schema.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/meetings/meeting.entity.js +0 -10
- package/build/entities/models/meetings/entities/meetings/meeting.entity.js.map +1 -1
- 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/entities/userAvailabilities/user-availability.entity.js +6 -2
- package/build/entities/models/meetings/entities/userAvailabilities/user-availability.entity.js.map +1 -1
- package/build/entities/models/meetings/meetings.provider.d.ts +0 -25
- package/build/entities/models/model.providers.d.ts +10 -25
- package/build/entities/models/subscriptions/entities/companySubscriptions/company-subscription-user.entity.d.ts +0 -25
- package/build/entities/models/subscriptions/entities/companySubscriptions/company-subscription.entity.d.ts +0 -25
- package/build/entities/models/subscriptions/entities/eventSubscriptions/event-subscription.entity.d.ts +0 -25
- package/build/entities/models/subscriptions/entities/features/endpoint.entity.d.ts +0 -25
- package/build/entities/models/subscriptions/entities/features/feature.entity.d.ts +0 -25
- package/build/entities/models/subscriptions/entities/managedServiceSubscriptions/index.d.ts +4 -0
- package/build/entities/models/subscriptions/entities/managedServiceSubscriptions/index.js +21 -0
- package/build/entities/models/subscriptions/entities/managedServiceSubscriptions/index.js.map +1 -0
- package/build/entities/models/subscriptions/entities/managedServiceSubscriptions/managed-service-subscription-status.enum.d.ts +9 -0
- package/build/entities/models/subscriptions/entities/managedServiceSubscriptions/managed-service-subscription-status.enum.js +14 -0
- package/build/entities/models/subscriptions/entities/managedServiceSubscriptions/managed-service-subscription-status.enum.js.map +1 -0
- package/build/entities/models/subscriptions/entities/managedServiceSubscriptions/managed-service-subscription-user-status.enum.d.ts +4 -0
- package/build/entities/models/subscriptions/entities/managedServiceSubscriptions/managed-service-subscription-user-status.enum.js +9 -0
- package/build/entities/models/subscriptions/entities/managedServiceSubscriptions/managed-service-subscription-user-status.enum.js.map +1 -0
- package/build/entities/models/subscriptions/entities/managedServiceSubscriptions/managed-service-subscription-user.entity.d.ts +43 -0
- package/build/entities/models/subscriptions/entities/managedServiceSubscriptions/managed-service-subscription-user.entity.js +49 -0
- package/build/entities/models/subscriptions/entities/managedServiceSubscriptions/managed-service-subscription-user.entity.js.map +1 -0
- package/build/entities/models/subscriptions/entities/managedServiceSubscriptions/managed-service-subscription.entity.d.ts +60 -0
- package/build/entities/models/subscriptions/entities/managedServiceSubscriptions/managed-service-subscription.entity.js +155 -0
- package/build/entities/models/subscriptions/entities/managedServiceSubscriptions/managed-service-subscription.entity.js.map +1 -0
- package/build/entities/models/subscriptions/entities/subscription/subscription-model.enum.d.ts +2 -1
- package/build/entities/models/subscriptions/entities/subscription/subscription-model.enum.js +1 -0
- package/build/entities/models/subscriptions/entities/subscription/subscription-model.enum.js.map +1 -1
- package/build/entities/models/subscriptions/entities/subscription/subscription.entity.d.ts +0 -25
- package/build/entities/models/subscriptions/entities/subscription/user-settin-option.entity.d.ts +0 -25
- package/build/entities/models/subscriptions/entities/subscriptionLogs/subscription-log.entity.d.ts +0 -25
- package/build/entities/models/subscriptions/index.d.ts +1 -0
- package/build/entities/models/subscriptions/index.js +1 -0
- package/build/entities/models/subscriptions/index.js.map +1 -1
- package/build/entities/models/subscriptions/repositories/index.d.ts +1 -0
- package/build/entities/models/subscriptions/repositories/index.js +1 -0
- package/build/entities/models/subscriptions/repositories/index.js.map +1 -1
- package/build/entities/models/subscriptions/repositories/managed-service-subscription-common.repository.d.ts +7 -0
- package/build/entities/models/subscriptions/repositories/managed-service-subscription-common.repository.js +12 -0
- package/build/entities/models/subscriptions/repositories/managed-service-subscription-common.repository.js.map +1 -0
- package/build/entities/models/subscriptions/subscriptions.provider.d.ts +19 -33
- package/build/entities/models/subscriptions/subscriptions.provider.js +15 -0
- package/build/entities/models/subscriptions/subscriptions.provider.js.map +1 -1
- 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/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/services/generate-model.d.ts +0 -25
- package/build/entities/services/get-model-ref.d.ts +0 -25
- package/build/enums/database-model.enum.d.ts +1 -0
- package/build/enums/database-model.enum.js +1 -0
- package/build/enums/database-model.enum.js.map +1 -1
- package/build/enums/repository-provider.enum.d.ts +1 -0
- package/build/enums/repository-provider.enum.js +1 -0
- package/build/enums/repository-provider.enum.js.map +1 -1
- package/build/events/get-categories-by-query.interface.d.ts +1 -1
- package/build/events/get-cities-by-query.interface.d.ts +1 -1
- package/build/events/get-countries-by-query.interface.d.ts +1 -1
- package/build/events/get-industries-by-query.interface.d.ts +1 -1
- package/build/events/get-itp-by-id.interface.d.ts +11 -0
- package/build/events/get-itp-by-id.interface.js +3 -0
- package/build/events/get-itp-by-id.interface.js.map +1 -0
- package/build/events/get-tags-by-query.interface.d.ts +1 -1
- package/build/events/subjects.d.ts +1 -0
- package/build/events/subjects.js +1 -0
- package/build/events/subjects.js.map +1 -1
- package/build/index.d.ts +1 -0
- package/build/index.js +1 -0
- package/build/index.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/utils/getEndpoint.js.map +1 -1
- package/package.json +1 -2
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getManagedServiceSubscriptionUserSchema = exports.ManagedServiceSubscriptionUser = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
const services_1 = require("../../../../services");
|
|
6
|
+
const managed_service_subscription_user_status_enum_1 = require("./managed-service-subscription-user-status.enum");
|
|
7
|
+
const user_type_enum_1 = require("../../../../../types/user-type.enum");
|
|
8
|
+
const ObjectId = mongoose_1.Schema.Types.ObjectId;
|
|
9
|
+
class ManagedServiceSubscriptionUser {
|
|
10
|
+
}
|
|
11
|
+
exports.ManagedServiceSubscriptionUser = ManagedServiceSubscriptionUser;
|
|
12
|
+
const getManagedServiceSubscriptionUserSchema = (connection, userConnection) => {
|
|
13
|
+
const managedServiceSubscriptionUserSchema = new mongoose_1.Schema({
|
|
14
|
+
userId: {
|
|
15
|
+
type: ObjectId,
|
|
16
|
+
ref: (0, services_1.getModelRef)("User", userConnection),
|
|
17
|
+
},
|
|
18
|
+
status: {
|
|
19
|
+
type: String,
|
|
20
|
+
enum: Object.values(managed_service_subscription_user_status_enum_1.ManagedServiceSubscriptionUserStatus),
|
|
21
|
+
},
|
|
22
|
+
type: {
|
|
23
|
+
type: String,
|
|
24
|
+
enum: Object.values(user_type_enum_1.UserType),
|
|
25
|
+
},
|
|
26
|
+
creditLimit: {
|
|
27
|
+
type: Number,
|
|
28
|
+
},
|
|
29
|
+
remainingPoints: {
|
|
30
|
+
type: Number,
|
|
31
|
+
},
|
|
32
|
+
features: {
|
|
33
|
+
type: [ObjectId],
|
|
34
|
+
ref: (0, services_1.getModelRef)("Feature", connection),
|
|
35
|
+
default: [],
|
|
36
|
+
},
|
|
37
|
+
countries: {
|
|
38
|
+
type: [ObjectId],
|
|
39
|
+
default: [],
|
|
40
|
+
},
|
|
41
|
+
locations: {
|
|
42
|
+
type: [ObjectId],
|
|
43
|
+
default: [],
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
return managedServiceSubscriptionUserSchema;
|
|
47
|
+
};
|
|
48
|
+
exports.getManagedServiceSubscriptionUserSchema = getManagedServiceSubscriptionUserSchema;
|
|
49
|
+
//# sourceMappingURL=managed-service-subscription-user.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"managed-service-subscription-user.entity.js","sourceRoot":"","sources":["../../../../../../src/entities/models/subscriptions/entities/managedServiceSubscriptions/managed-service-subscription-user.entity.ts"],"names":[],"mappings":";;;AAAA,uCAA8C;AAE9C,mDAAmD;AACnD,mHAAuG;AACvG,wEAA+D;AAM/D,MAAM,QAAQ,GAAG,iBAAM,CAAC,KAAK,CAAC,QAAQ,CAAC;AAIvC,MAAa,8BAA8B;CAU1C;AAVD,wEAUC;AAEM,MAAM,uCAAuC,GAAG,CACrD,UAAsB,EACtB,cAA0B,EAI1B,EAAE;IACF,MAAM,oCAAoC,GAAG,IAAI,iBAAM,CAGrD;QACA,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,GAAG,EAAE,IAAA,sBAAW,EAAkB,MAAM,EAAE,cAAc,CAAC;SAC1D;QACD,MAAM,EAAE;YACN,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,oFAAoC,CAAC;SAC1D;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,yBAAQ,CAAC;SAC9B;QACD,WAAW,EAAE;YACX,IAAI,EAAE,MAAM;SACb;QACD,eAAe,EAAE;YACf,IAAI,EAAE,MAAM;SACb;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,CAAC,QAAQ,CAAC;YAChB,GAAG,EAAE,IAAA,sBAAW,EAAwB,SAAS,EAAE,UAAU,CAAC;YAC9D,OAAO,EAAE,EAAE;SACZ;QACD,SAAS,EAAE;YACT,IAAI,EAAE,CAAC,QAAQ,CAAC;YAChB,OAAO,EAAE,EAAE;SACZ;QACD,SAAS,EAAE;YACT,IAAI,EAAE,CAAC,QAAQ,CAAC;YAChB,OAAO,EAAE,EAAE;SACZ;KACF,CAAC,CAAC;IAEH,OAAO,oCAAoC,CAAC;AAC9C,CAAC,CAAC;AA7CW,QAAA,uCAAuC,2CA6ClD"}
|
|
@@ -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="mongoose/types/inferschematype" />
|
|
25
|
+
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
26
|
+
import { Connection, Schema } from "mongoose";
|
|
27
|
+
import { Company } from "../../../companies";
|
|
28
|
+
import { Event } from "../../../events";
|
|
29
|
+
import { CustomModel } from "../../../../../db/CustomModel";
|
|
30
|
+
import { ManagedServiceSubscriptionUser } from "./managed-service-subscription-user.entity";
|
|
31
|
+
import { Feature } from "../features/feature.entity";
|
|
32
|
+
import { ManagedServiceSubscriptionStatus } from "./managed-service-subscription-status.enum";
|
|
33
|
+
import { Subscription } from "../subscription/subscription.entity";
|
|
34
|
+
export type ManagedServiceSubscriptionModel = CustomModel<ManagedServiceSubscription>;
|
|
35
|
+
export declare class ManagedServiceSubscription {
|
|
36
|
+
_id: string;
|
|
37
|
+
subscription: Subscription;
|
|
38
|
+
features: Feature[];
|
|
39
|
+
payment: any;
|
|
40
|
+
points: number;
|
|
41
|
+
maxSubscribers: number;
|
|
42
|
+
expiryDate: Date;
|
|
43
|
+
users: ManagedServiceSubscriptionUser[];
|
|
44
|
+
company: Company;
|
|
45
|
+
event: Event;
|
|
46
|
+
remainingPoints: number;
|
|
47
|
+
status: ManagedServiceSubscriptionStatus;
|
|
48
|
+
createdAt: Date;
|
|
49
|
+
updatedAt: Date;
|
|
50
|
+
canceledAt: Date;
|
|
51
|
+
assessmentNote: string;
|
|
52
|
+
hasAssessmentFeature: boolean;
|
|
53
|
+
assessmentFeatures: Feature[];
|
|
54
|
+
badges: any[];
|
|
55
|
+
stripeSubscriptionId?: string;
|
|
56
|
+
}
|
|
57
|
+
export declare const getManagedServiceSubscriptionSchema: (connection: Connection, companyConnection: Connection, eventConnection: Connection) => Schema<ManagedServiceSubscription, ManagedServiceSubscriptionModel>;
|
|
58
|
+
export declare const managedServiceSubscriptionFactory: (connection: Connection, companyConnection: Connection, eventConnection: Connection) => import("mongoose").Model<ManagedServiceSubscription, {}, {}, {}, import("mongoose").Document<unknown, {}, ManagedServiceSubscription> & ManagedServiceSubscription & Required<{
|
|
59
|
+
_id: string;
|
|
60
|
+
}>, any>;
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.managedServiceSubscriptionFactory = exports.getManagedServiceSubscriptionSchema = exports.ManagedServiceSubscription = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
const validateProjectionResult_1 = require("../../../../../validators/validateProjectionResult");
|
|
6
|
+
const validateProjection_1 = require("../../../../../validators/validateProjection");
|
|
7
|
+
const validateNewItem_1 = require("../../../../../validators/validateNewItem");
|
|
8
|
+
const validateUpdateItem_1 = require("../../../../../validators/validateUpdateItem");
|
|
9
|
+
const generate_model_1 = require("../../../../services/generate-model");
|
|
10
|
+
const managed_service_subscription_user_entity_1 = require("./managed-service-subscription-user.entity");
|
|
11
|
+
const feature_entity_1 = require("../features/feature.entity");
|
|
12
|
+
const managed_service_subscription_status_enum_1 = require("./managed-service-subscription-status.enum");
|
|
13
|
+
const services_1 = require("../../../../../entities/services");
|
|
14
|
+
const ObjectId = mongoose_1.Schema.Types.ObjectId;
|
|
15
|
+
class ManagedServiceSubscription {
|
|
16
|
+
}
|
|
17
|
+
exports.ManagedServiceSubscription = ManagedServiceSubscription;
|
|
18
|
+
const getManagedServiceSubscriptionSchema = (connection, companyConnection, eventConnection) => {
|
|
19
|
+
const managedServiceSubscriptionUserSchema = (0, managed_service_subscription_user_entity_1.getManagedServiceSubscriptionUserSchema)(connection, companyConnection);
|
|
20
|
+
const featureSchema = (0, feature_entity_1.getFeatureSchema)();
|
|
21
|
+
return new mongoose_1.Schema({
|
|
22
|
+
subscription: {
|
|
23
|
+
type: ObjectId,
|
|
24
|
+
ref: (0, services_1.getModelRef)("Subscription", connection),
|
|
25
|
+
},
|
|
26
|
+
features: { type: [featureSchema], required: true, default: [] },
|
|
27
|
+
payment: {
|
|
28
|
+
type: ObjectId,
|
|
29
|
+
ref: "Payment",
|
|
30
|
+
},
|
|
31
|
+
points: { type: Number, required: true },
|
|
32
|
+
maxSubscribers: { type: Number, required: true },
|
|
33
|
+
expiryDate: { type: Date },
|
|
34
|
+
users: {
|
|
35
|
+
type: [managedServiceSubscriptionUserSchema],
|
|
36
|
+
required: true,
|
|
37
|
+
default: [],
|
|
38
|
+
},
|
|
39
|
+
company: {
|
|
40
|
+
type: ObjectId,
|
|
41
|
+
ref: (0, services_1.getModelRef)("ManagedService", companyConnection),
|
|
42
|
+
required: true,
|
|
43
|
+
},
|
|
44
|
+
event: {
|
|
45
|
+
type: ObjectId,
|
|
46
|
+
ref: (0, services_1.getModelRef)("Event", eventConnection),
|
|
47
|
+
},
|
|
48
|
+
remainingPoints: { type: Number, required: true },
|
|
49
|
+
status: {
|
|
50
|
+
type: String,
|
|
51
|
+
enum: Object.values(managed_service_subscription_status_enum_1.ManagedServiceSubscriptionStatus),
|
|
52
|
+
default: managed_service_subscription_status_enum_1.ManagedServiceSubscriptionStatus.ACTIVE,
|
|
53
|
+
required: true,
|
|
54
|
+
},
|
|
55
|
+
createdAt: { type: Date, required: true, default: Date.now },
|
|
56
|
+
updatedAt: { type: Date, required: true, default: Date.now },
|
|
57
|
+
canceledAt: { type: Date },
|
|
58
|
+
assessmentNote: { type: String, trim: true },
|
|
59
|
+
hasAssessmentFeature: { type: Boolean, required: true, default: false },
|
|
60
|
+
assessmentFeatures: { type: [featureSchema], required: true, default: [] },
|
|
61
|
+
badges: { type: [ObjectId], default: [] },
|
|
62
|
+
stripeSubscriptionId: { type: String },
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
exports.getManagedServiceSubscriptionSchema = getManagedServiceSubscriptionSchema;
|
|
66
|
+
const managedServiceSubscriptionFactory = (connection, companyConnection, eventConnection) => {
|
|
67
|
+
const managedServiceSubscriptionSchema = (0, exports.getManagedServiceSubscriptionSchema)(connection, companyConnection, eventConnection);
|
|
68
|
+
const allProjectionFieldArray = [
|
|
69
|
+
"_id",
|
|
70
|
+
"subscription",
|
|
71
|
+
"features",
|
|
72
|
+
"payment",
|
|
73
|
+
"points",
|
|
74
|
+
"maxSubscribers",
|
|
75
|
+
"expiryDate",
|
|
76
|
+
"users",
|
|
77
|
+
"company",
|
|
78
|
+
"event",
|
|
79
|
+
"remainingPoints",
|
|
80
|
+
"createdAt",
|
|
81
|
+
"status",
|
|
82
|
+
"updatedAt",
|
|
83
|
+
"canceledAt",
|
|
84
|
+
"hasAssessmentFeature",
|
|
85
|
+
"assessmentFeatures",
|
|
86
|
+
"assessmentNote",
|
|
87
|
+
"badges",
|
|
88
|
+
"stripeSubscriptionId",
|
|
89
|
+
];
|
|
90
|
+
const allValidateNewItemFieldArray = [
|
|
91
|
+
"_id",
|
|
92
|
+
"subscription",
|
|
93
|
+
"features",
|
|
94
|
+
"payment",
|
|
95
|
+
"points",
|
|
96
|
+
"maxSubscribers",
|
|
97
|
+
"expiryDate",
|
|
98
|
+
"users",
|
|
99
|
+
"company",
|
|
100
|
+
"event",
|
|
101
|
+
"remainingPoints",
|
|
102
|
+
"createdAt",
|
|
103
|
+
"status",
|
|
104
|
+
"updatedAt",
|
|
105
|
+
"canceledAt",
|
|
106
|
+
"hasAssessmentFeature",
|
|
107
|
+
"assessmentFeatures",
|
|
108
|
+
"assessmentNote",
|
|
109
|
+
"badges",
|
|
110
|
+
"stripeSubscriptionId",
|
|
111
|
+
];
|
|
112
|
+
const allValidateUpdateItemFieldArray = [
|
|
113
|
+
"_id",
|
|
114
|
+
"subscription",
|
|
115
|
+
"features",
|
|
116
|
+
"payment",
|
|
117
|
+
"points",
|
|
118
|
+
"maxSubscribers",
|
|
119
|
+
"expiryDate",
|
|
120
|
+
"users",
|
|
121
|
+
"company",
|
|
122
|
+
"event",
|
|
123
|
+
"remainingPoints",
|
|
124
|
+
"createdAt",
|
|
125
|
+
"status",
|
|
126
|
+
"updatedAt",
|
|
127
|
+
"canceledAt",
|
|
128
|
+
"hasAssessmentFeature",
|
|
129
|
+
"assessmentFeatures",
|
|
130
|
+
"assessmentNote",
|
|
131
|
+
"badges",
|
|
132
|
+
"stripeSubscriptionId",
|
|
133
|
+
];
|
|
134
|
+
const defaultPopulations = [];
|
|
135
|
+
managedServiceSubscriptionSchema.statics.validateProjectionResult = (necessaryProjectionObj) => (0, validateProjectionResult_1.validateProjectionResult)(allProjectionFieldArray, necessaryProjectionObj);
|
|
136
|
+
managedServiceSubscriptionSchema.statics.validateProjection = (necessaryProjectionArray) => (0, validateProjection_1.validateProjection)(allProjectionFieldArray, necessaryProjectionArray);
|
|
137
|
+
managedServiceSubscriptionSchema.statics.validateNewItem = (newItemObj) => (0, validateNewItem_1.validateNewItem)(allValidateNewItemFieldArray, newItemObj);
|
|
138
|
+
managedServiceSubscriptionSchema.statics.validateUpdateItem = (updateItemObj) => (0, validateUpdateItem_1.validateUpdateItem)(allValidateUpdateItemFieldArray, updateItemObj);
|
|
139
|
+
managedServiceSubscriptionSchema.statics.getDefaultPopulations = () => defaultPopulations;
|
|
140
|
+
managedServiceSubscriptionSchema.pre("findOneAndUpdate", async function (next) {
|
|
141
|
+
this._update.updatedAt = new Date();
|
|
142
|
+
next();
|
|
143
|
+
});
|
|
144
|
+
managedServiceSubscriptionSchema.index({
|
|
145
|
+
event: 1,
|
|
146
|
+
company: 1,
|
|
147
|
+
payment: 1,
|
|
148
|
+
subscription: 1,
|
|
149
|
+
status: 1,
|
|
150
|
+
createdAt: -1,
|
|
151
|
+
});
|
|
152
|
+
return (0, generate_model_1.generateModel)("ManagedServiceSubscription", connection, managedServiceSubscriptionSchema);
|
|
153
|
+
};
|
|
154
|
+
exports.managedServiceSubscriptionFactory = managedServiceSubscriptionFactory;
|
|
155
|
+
//# sourceMappingURL=managed-service-subscription.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"managed-service-subscription.entity.js","sourceRoot":"","sources":["../../../../../../src/entities/models/subscriptions/entities/managedServiceSubscriptions/managed-service-subscription.entity.ts"],"names":[],"mappings":";;;AAAA,uCAA8C;AAC9C,iGAA8F;AAC9F,qFAAkF;AAClF,+EAA4E;AAC5E,qFAAkF;AAGlF,wEAAoE;AAEpE,yGAGoD;AACpD,+DAAuE;AACvE,yGAA8F;AAC9F,+DAA+D;AAM/D,MAAM,QAAQ,GAAG,iBAAM,CAAC,KAAK,CAAC,QAAQ,CAAC;AAIvC,MAAa,0BAA0B;CAqBtC;AArBD,gEAqBC;AAEM,MAAM,mCAAmC,GAAG,CACjD,UAAsB,EACtB,iBAA6B,EAC7B,eAA2B,EAC0C,EAAE;IACvE,MAAM,oCAAoC,GACxC,IAAA,kFAAuC,EAAC,UAAU,EAAE,iBAAiB,CAAC,CAAC;IACzE,MAAM,aAAa,GAAG,IAAA,iCAAgB,GAAE,CAAC;IAEzC,OAAO,IAAI,iBAAM,CAGf;QACA,YAAY,EAAE;YACZ,IAAI,EAAE,QAAQ;YACd,GAAG,EAAE,IAAA,sBAAW,EACd,cAAc,EACd,UAAU,CACX;SACF;QACD,QAAQ,EAAE,EAAE,IAAI,EAAE,CAAC,aAAa,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE;QAChE,OAAO,EAAE;YACP,IAAI,EAAE,QAAQ;YACd,GAAG,EAAE,SAAS;SACf;QACD,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EA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model.enum.js
CHANGED
|
@@ -6,5 +6,6 @@ var SubscriptionModelEnum;
|
|
|
6
6
|
SubscriptionModelEnum["EVENT"] = "Event";
|
|
7
7
|
SubscriptionModelEnum["COMPANY"] = "Company";
|
|
8
8
|
SubscriptionModelEnum["TRADE"] = "Trade";
|
|
9
|
+
SubscriptionModelEnum["MANAGED_SERVICE"] = "ManagedService";
|
|
9
10
|
})(SubscriptionModelEnum || (exports.SubscriptionModelEnum = SubscriptionModelEnum = {}));
|
|
10
11
|
//# sourceMappingURL=subscription-model.enum.js.map
|
package/build/entities/models/subscriptions/entities/subscription/subscription-model.enum.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscription-model.enum.js","sourceRoot":"","sources":["../../../../../../src/entities/models/subscriptions/entities/subscription/subscription-model.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,
|
|
1
|
+
{"version":3,"file":"subscription-model.enum.js","sourceRoot":"","sources":["../../../../../../src/entities/models/subscriptions/entities/subscription/subscription-model.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,qBAKX;AALD,WAAY,qBAAqB;IAC/B,wCAAe,CAAA;IACf,4CAAmB,CAAA;IACnB,wCAAe,CAAA;IACf,2DAAkC,CAAA;AACpC,CAAC,EALW,qBAAqB,qCAArB,qBAAqB,QAKhC"}
|
|
@@ -21,33 +21,8 @@
|
|
|
21
21
|
/// <reference types="mongoose/types/utility" />
|
|
22
22
|
/// <reference types="mongoose/types/validation" />
|
|
23
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
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
49
25
|
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
50
|
-
/// <reference types="@aldb2b/common/node_modules/mongoose/types/inferschematype" />
|
|
51
26
|
import { Connection, Schema } from 'mongoose';
|
|
52
27
|
import { CustomModel } from '../../../../../db/CustomModel';
|
|
53
28
|
import { SubscriptionType } from "./subscription-type.enum";
|
package/build/entities/models/subscriptions/entities/subscription/user-settin-option.entity.d.ts
CHANGED
|
@@ -21,33 +21,8 @@
|
|
|
21
21
|
/// <reference types="mongoose/types/utility" />
|
|
22
22
|
/// <reference types="mongoose/types/validation" />
|
|
23
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
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
49
25
|
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
50
|
-
/// <reference types="@aldb2b/common/node_modules/mongoose/types/inferschematype" />
|
|
51
26
|
import { Schema } from 'mongoose';
|
|
52
27
|
import { CustomModel } from '../../../../../db/CustomModel';
|
|
53
28
|
export type UserSetterOptionModel = CustomModel<UserSetterOption>;
|
package/build/entities/models/subscriptions/entities/subscriptionLogs/subscription-log.entity.d.ts
CHANGED
|
@@ -21,33 +21,8 @@
|
|
|
21
21
|
/// <reference types="mongoose/types/utility" />
|
|
22
22
|
/// <reference types="mongoose/types/validation" />
|
|
23
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
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
49
25
|
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
50
|
-
/// <reference types="@aldb2b/common/node_modules/mongoose/types/inferschematype" />
|
|
51
26
|
import { Connection } from 'mongoose';
|
|
52
27
|
import { Company, Contact } from '../../../companies';
|
|
53
28
|
import { CustomModel } from '../../../../../db/CustomModel';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './entities/subscription';
|
|
2
2
|
export * from './entities/eventSubscriptions';
|
|
3
3
|
export * from './entities/companySubscriptions';
|
|
4
|
+
export * from './entities/managedServiceSubscriptions';
|
|
4
5
|
export * from './entities/subscriptionLogs';
|
|
5
6
|
export * from './entities/features';
|
|
6
7
|
export * from './repositories';
|
|
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./entities/subscription"), exports);
|
|
18
18
|
__exportStar(require("./entities/eventSubscriptions"), exports);
|
|
19
19
|
__exportStar(require("./entities/companySubscriptions"), exports);
|
|
20
|
+
__exportStar(require("./entities/managedServiceSubscriptions"), exports);
|
|
20
21
|
__exportStar(require("./entities/subscriptionLogs"), exports);
|
|
21
22
|
__exportStar(require("./entities/features"), exports);
|
|
22
23
|
__exportStar(require("./repositories"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/entities/models/subscriptions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAuC;AACvC,gEAA6C;AAC7C,kEAA+C;AAC/C,8DAA2C;AAC3C,sDAAmC;AACnC,iDAA8B;AAC9B,2DAAwC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/entities/models/subscriptions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAuC;AACvC,gEAA6C;AAC7C,kEAA+C;AAC/C,yEAAsD;AACtD,8DAA2C;AAC3C,sDAAmC;AACnC,iDAA8B;AAC9B,2DAAwC"}
|
|
@@ -16,5 +16,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./company-subscription-common.repository"), exports);
|
|
18
18
|
__exportStar(require("./event-subscription-common.repository"), exports);
|
|
19
|
+
__exportStar(require("./managed-service-subscription-common.repository"), exports);
|
|
19
20
|
__exportStar(require("./subscription-log.repository"), exports);
|
|
20
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/entities/models/subscriptions/repositories/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2EAAwD;AACxD,yEAAsD;AACtD,gEAA6C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/entities/models/subscriptions/repositories/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2EAAwD;AACxD,yEAAsD;AACtD,mFAAgE;AAChE,gEAA6C"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CustomModel } from '../../../../db/CustomModel';
|
|
2
|
+
import { MongooseBase } from '../../../../db/MongooseBase';
|
|
3
|
+
import { ManagedServiceSubscription } from '../entities/managedServiceSubscriptions';
|
|
4
|
+
export declare class ManagedServiceSubscriptionCommonRepository extends MongooseBase<ManagedServiceSubscription> {
|
|
5
|
+
private managedServiceSubscriptionModel;
|
|
6
|
+
constructor(managedServiceSubscriptionModel: CustomModel<ManagedServiceSubscription>);
|
|
7
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ManagedServiceSubscriptionCommonRepository = void 0;
|
|
4
|
+
const MongooseBase_1 = require("../../../../db/MongooseBase");
|
|
5
|
+
class ManagedServiceSubscriptionCommonRepository extends MongooseBase_1.MongooseBase {
|
|
6
|
+
constructor(managedServiceSubscriptionModel) {
|
|
7
|
+
super(managedServiceSubscriptionModel);
|
|
8
|
+
this.managedServiceSubscriptionModel = managedServiceSubscriptionModel;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.ManagedServiceSubscriptionCommonRepository = ManagedServiceSubscriptionCommonRepository;
|
|
12
|
+
//# sourceMappingURL=managed-service-subscription-common.repository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"managed-service-subscription-common.repository.js","sourceRoot":"","sources":["../../../../../src/entities/models/subscriptions/repositories/managed-service-subscription-common.repository.ts"],"names":[],"mappings":";;;AACA,8DAA0D;AAG1D,MAAa,0CAA2C,SAAQ,2BAAwC;IACtG,YACU,+BAAwE;QAEhF,KAAK,CAAC,+BAA+B,CAAC,CAAA;QAF9B,oCAA+B,GAA/B,+BAA+B,CAAyC;IAGlF,CAAC;CACF;AAND,gGAMC"}
|
|
@@ -22,47 +22,29 @@
|
|
|
22
22
|
/// <reference types="mongoose/types/validation" />
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose" />
|
|
25
|
-
/// <reference types="@aldb2b/common/node_modules/mongoose/types/aggregate" />
|
|
26
|
-
/// <reference types="@aldb2b/common/node_modules/mongoose/types/callback" />
|
|
27
|
-
/// <reference types="@aldb2b/common/node_modules/mongoose/types/collection" />
|
|
28
|
-
/// <reference types="@aldb2b/common/node_modules/mongoose/types/connection" />
|
|
29
|
-
/// <reference types="@aldb2b/common/node_modules/mongoose/types/cursor" />
|
|
30
|
-
/// <reference types="@aldb2b/common/node_modules/mongoose/types/document" />
|
|
31
|
-
/// <reference types="@aldb2b/common/node_modules/mongoose/types/error" />
|
|
32
|
-
/// <reference types="@aldb2b/common/node_modules/mongoose/types/expressions" />
|
|
33
|
-
/// <reference types="@aldb2b/common/node_modules/mongoose/types/helpers" />
|
|
34
|
-
/// <reference types="@aldb2b/common/node_modules/mongoose/types/middlewares" />
|
|
35
|
-
/// <reference types="@aldb2b/common/node_modules/mongoose/types/indexes" />
|
|
36
|
-
/// <reference types="@aldb2b/common/node_modules/mongoose/types/models" />
|
|
37
|
-
/// <reference types="@aldb2b/common/node_modules/mongoose/types/mongooseoptions" />
|
|
38
|
-
/// <reference types="@aldb2b/common/node_modules/mongoose/types/pipelinestage" />
|
|
39
|
-
/// <reference types="@aldb2b/common/node_modules/mongoose/types/populate" />
|
|
40
|
-
/// <reference types="@aldb2b/common/node_modules/mongoose/types/query" />
|
|
41
|
-
/// <reference types="@aldb2b/common/node_modules/mongoose/types/schemaoptions" />
|
|
42
|
-
/// <reference types="@aldb2b/common/node_modules/mongoose/types/schematypes" />
|
|
43
|
-
/// <reference types="@aldb2b/common/node_modules/mongoose/types/session" />
|
|
44
|
-
/// <reference types="@aldb2b/common/node_modules/mongoose/types/types" />
|
|
45
|
-
/// <reference types="@aldb2b/common/node_modules/mongoose/types/utility" />
|
|
46
|
-
/// <reference types="@aldb2b/common/node_modules/mongoose/types/validation" />
|
|
47
|
-
/// <reference types="@aldb2b/common/node_modules/mongoose/types/virtuals" />
|
|
48
|
-
/// <reference types="@aldb2b/common/node_modules/mongoose" />
|
|
49
25
|
/// <reference types="mongoose/types/inferschematype" />
|
|
50
26
|
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
51
|
-
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import { EventSubscription } from
|
|
56
|
-
import { SubscriptionLog } from
|
|
57
|
-
import { RepositoryProvider } from
|
|
58
|
-
import { CompanySubscriptionCommonRepository, EventSubscriptionCommonRepository, SubscriptionLogRepository } from
|
|
59
|
-
import { CustomModel } from
|
|
27
|
+
import { DatabaseModel } from "../../../enums/database-model.enum";
|
|
28
|
+
import { DatabaseConnection } from "../../../enums/database-connection.enum";
|
|
29
|
+
import { CompanySubscription } from "./entities/companySubscriptions";
|
|
30
|
+
import { ManagedServiceSubscription } from "./entities/managedServiceSubscriptions";
|
|
31
|
+
import { EventSubscription } from "./entities/eventSubscriptions";
|
|
32
|
+
import { SubscriptionLog } from "./entities/subscriptionLogs";
|
|
33
|
+
import { RepositoryProvider } from "../../../enums/repository-provider.enum";
|
|
34
|
+
import { CompanySubscriptionCommonRepository, EventSubscriptionCommonRepository, ManagedServiceSubscriptionCommonRepository, SubscriptionLogRepository } from "./repositories";
|
|
35
|
+
import { CustomModel } from "../../../db/CustomModel";
|
|
60
36
|
export declare const subscriptionProviders: ({
|
|
61
37
|
provide: DatabaseModel;
|
|
62
38
|
useFactory: (connection: import("mongoose").Connection) => import("mongoose").Model<import("./entities/subscription/subscription.entity").Subscription, {}, {}, {}, import("mongoose").Document<unknown, {}, import("./entities/subscription/subscription.entity").Subscription> & import("./entities/subscription/subscription.entity").Subscription & Required<{
|
|
63
39
|
_id: string;
|
|
64
40
|
}>, any>;
|
|
65
41
|
inject: DatabaseConnection[];
|
|
42
|
+
} | {
|
|
43
|
+
provide: DatabaseModel;
|
|
44
|
+
useFactory: (connection: import("mongoose").Connection, companyConnection: import("mongoose").Connection, eventConnection: import("mongoose").Connection) => import("mongoose").Model<ManagedServiceSubscription, {}, {}, {}, import("mongoose").Document<unknown, {}, ManagedServiceSubscription> & ManagedServiceSubscription & Required<{
|
|
45
|
+
_id: string;
|
|
46
|
+
}>, any>;
|
|
47
|
+
inject: DatabaseConnection[];
|
|
66
48
|
} | {
|
|
67
49
|
provide: DatabaseModel;
|
|
68
50
|
useFactory: (connection: import("mongoose").Connection) => import("mongoose").Model<import("./entities/features").Feature, {}, {}, {}, import("mongoose").Document<unknown, {}, import("./entities/features").Feature> & import("./entities/features").Feature & Required<{
|
|
@@ -87,6 +69,10 @@ export declare const subscriptionProviders: ({
|
|
|
87
69
|
_id: string;
|
|
88
70
|
}>, any>;
|
|
89
71
|
inject: DatabaseConnection[];
|
|
72
|
+
} | {
|
|
73
|
+
provide: RepositoryProvider;
|
|
74
|
+
inject: DatabaseModel[];
|
|
75
|
+
useFactory: (companySubscription: CustomModel<ManagedServiceSubscription>) => ManagedServiceSubscriptionCommonRepository;
|
|
90
76
|
} | {
|
|
91
77
|
provide: RepositoryProvider;
|
|
92
78
|
inject: DatabaseModel[];
|
|
@@ -5,6 +5,7 @@ const database_model_enum_1 = require("../../../enums/database-model.enum");
|
|
|
5
5
|
const database_connection_enum_1 = require("../../../enums/database-connection.enum");
|
|
6
6
|
const features_1 = require("./entities/features");
|
|
7
7
|
const companySubscriptions_1 = require("./entities/companySubscriptions");
|
|
8
|
+
const managedServiceSubscriptions_1 = require("./entities/managedServiceSubscriptions");
|
|
8
9
|
const eventSubscriptions_1 = require("./entities/eventSubscriptions");
|
|
9
10
|
const subscriptionLogs_1 = require("./entities/subscriptionLogs");
|
|
10
11
|
const repository_provider_enum_1 = require("../../../enums/repository-provider.enum");
|
|
@@ -16,6 +17,15 @@ exports.subscriptionProviders = [
|
|
|
16
17
|
useFactory: subscription_entity_1.subscriptionFactory,
|
|
17
18
|
inject: [database_connection_enum_1.DatabaseConnection.SUBSCRIPTION_CONNECTION],
|
|
18
19
|
},
|
|
20
|
+
{
|
|
21
|
+
provide: database_model_enum_1.DatabaseModel.MANAGED_SERVICE_SUBSCRIPTION_MODEL,
|
|
22
|
+
useFactory: managedServiceSubscriptions_1.managedServiceSubscriptionFactory,
|
|
23
|
+
inject: [
|
|
24
|
+
database_connection_enum_1.DatabaseConnection.SUBSCRIPTION_CONNECTION,
|
|
25
|
+
database_connection_enum_1.DatabaseConnection.COMPANY_CONNECTION,
|
|
26
|
+
database_connection_enum_1.DatabaseConnection.EVENT_CONNECTION,
|
|
27
|
+
],
|
|
28
|
+
},
|
|
19
29
|
{
|
|
20
30
|
provide: database_model_enum_1.DatabaseModel.FEATURE_MODEL,
|
|
21
31
|
useFactory: features_1.featureFactory,
|
|
@@ -48,6 +58,11 @@ exports.subscriptionProviders = [
|
|
|
48
58
|
database_connection_enum_1.DatabaseConnection.USER_CONNECTION,
|
|
49
59
|
],
|
|
50
60
|
},
|
|
61
|
+
{
|
|
62
|
+
provide: repository_provider_enum_1.RepositoryProvider.MANAGED_SERVICE_SUBSCRIPTION_COMMON_REPOSITORY,
|
|
63
|
+
inject: [database_model_enum_1.DatabaseModel.MANAGED_SERVICE_SUBSCRIPTION_MODEL],
|
|
64
|
+
useFactory: (companySubscription) => new repositories_1.ManagedServiceSubscriptionCommonRepository(companySubscription),
|
|
65
|
+
},
|
|
51
66
|
{
|
|
52
67
|
provide: repository_provider_enum_1.RepositoryProvider.COMPANY_SUBSCRIPTION_COMMON_REPOSITORY,
|
|
53
68
|
inject: [database_model_enum_1.DatabaseModel.COMPANY_SUBSCRIPTION_MODEL],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscriptions.provider.js","sourceRoot":"","sources":["../../../../src/entities/models/subscriptions/subscriptions.provider.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"subscriptions.provider.js","sourceRoot":"","sources":["../../../../src/entities/models/subscriptions/subscriptions.provider.ts"],"names":[],"mappings":";;;AAAA,4EAAmE;AACnE,sFAA6E;AAC7E,kDAAqD;AACrD,0EAGyC;AACzC,wFAGgD;AAChD,sEAGuC;AACvC,kEAGqC;AACrC,sFAA6E;AAC7E,iDAKwB;AAExB,qFAAkF;AAErE,QAAA,qBAAqB,GAAG;IACnC;QACE,OAAO,EAAE,mCAAa,CAAC,kBAAkB;QACzC,UAAU,EAAE,yCAAmB;QAC/B,MAAM,EAAE,CAAC,6CAAkB,CAAC,uBAAuB,CAAC;KACrD;IACD;QACE,OAAO,EAAE,mCAAa,CAAC,kCAAkC;QACzD,UAAU,EAAE,+DAAiC;QAC7C,MAAM,EAAE;YACN,6CAAkB,CAAC,uBAAuB;YAC1C,6CAAkB,CAAC,kBAAkB;YACrC,6CAAkB,CAAC,gBAAgB;SACpC;KACF;IACD;QACE,OAAO,EAAE,mCAAa,CAAC,aAAa;QACpC,UAAU,EAAE,yBAAc;QAC1B,MAAM,EAAE,CAAC,6CAAkB,CAAC,uBAAuB,CAAC;KACrD;IACD;QACE,OAAO,EAAE,mCAAa,CAAC,0BAA0B;QACjD,UAAU,EAAE,iDAA0B;QACtC,MAAM,EAAE;YACN,6CAAkB,CAAC,uBAAuB;YAC1C,6CAAkB,CAAC,kBAAkB;YACrC,6CAAkB,CAAC,gBAAgB;SACpC;KACF;IACD;QACE,OAAO,EAAE,mCAAa,CAAC,wBAAwB;QAC/C,UAAU,EAAE,6CAAwB;QACpC,MAAM,EAAE;YACN,6CAAkB,CAAC,uBAAuB;YAC1C,6CAAkB,CAAC,kBAAkB;YACrC,6CAAkB,CAAC,gBAAgB;SACpC;KACF;IACD;QACE,OAAO,EAAE,mCAAa,CAAC,sBAAsB;QAC7C,UAAU,EAAE,yCAAsB;QAClC,MAAM,EAAE;YACN,6CAAkB,CAAC,uBAAuB;Y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