@kipicore/dbcore 1.1.386 → 1.1.388

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.
@@ -853,13 +853,16 @@ export declare enum WALLET_HISTORY_TYPE {
853
853
  BUY = "BUY",
854
854
  SEND = "SEND",
855
855
  RECEIVE = "RECEIVE",
856
- REFUND = "REFUND"
856
+ REFUND = "REFUND",
857
+ REWARD = "REWARD"
857
858
  }
858
859
  export declare enum WALLET_HISTORY_ITEM_TYPE {
859
860
  COIN = "COIN",
860
861
  STORAGE = "STORAGE",
861
862
  PLAN = "PLAN",
862
- USER = "USER"
863
+ USER = "USER",
864
+ MODULE = "MODULE",
865
+ COURSE = "COURSE"
863
866
  }
864
867
  export declare enum WALLET_HISTORY_ACTION {
865
868
  DEBIT = "DEBIT",
@@ -910,13 +913,9 @@ export declare enum PAYMENT_METHODS {
910
913
  }
911
914
  export declare const WALLET_TRANSACTION_VALID_DATE_IN_MINUTES = 60;
912
915
  export declare const WALLET_TRANSACTION_VALID_DATE_FOR_OTP_IN_MINUTES = 2;
913
- export declare const COIN_PURCHASE_GST_PERCENTAGE = 18;
914
916
  export declare const PAYMENT_PROCESSING_STATUS_URL: string;
915
917
  export declare const PAYMENT_PROCESSING_PAGE_URL: string;
916
918
  export declare const PAYMENT_PROCESSING_CALLBACK_URL: string;
917
- export declare const INITIAL_FREE_COIN = 500;
918
- export declare const INITIAL_FREE_STORAGE_IN_GB = 1;
919
- export declare const FREE_SUBSCRIPTION_SEQUENCE: number[];
920
919
  export declare enum LOST_FOUND_ITEM_STATUS {
921
920
  PENDING = "PENDING",
922
921
  SUBMITTED_TO_RIGHT_OWNER = "SUBMITTED_TO_RIGHT_OWNER",
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NO_TYPE = exports.ADMISSION_TYPE = exports.INSTITUTE_ENTITY_TYPE_SEQUENCE = exports.INSTITUTE_ENTITY_TYPE_STATUS = exports.INSTITUTE_ENTITY_STATUS = exports.SCHOOL_SHIFT = exports.WORKIN_DAY_STATUS = exports.LEAVE_STATUS = exports.LEAVE = exports.LEAVE_TYPE = exports.OFFER_NAME = exports.OFFER_TYPE = exports.INSTITUTE_STATUS = exports.FEE_PAYMENT_STATUS = exports.STUDENT_FEE_COLLECTION_STATUS = exports.PAYMENT_TYPE = exports.FEE_TYPE_FREQUENCY = exports.FEE_REMINDER_SETTING_FREQUENCY = exports.FEE_REMINDER_SETTING_TYPE = exports.TERM_DURATION = exports.FEE_REMINDER_SETTING_STATUS = exports.GREETING_TYPE = exports.TRIP_TYPE = exports.USER_COURSE_STATUS = exports.COMMAN_STATUS = exports.TOKEN_TYPES = exports.USER_TYPES = exports.ACADEMIC_CALENDARS_TYPE = exports.RETURN_STATUS = exports.ASSIGN_TYPE = exports.GENDER = exports.SCHOOL_SUB_TYPE = exports.SCHOOL_TYPE = exports.ATTENDANCE_TYPE = exports.ATTENDANCE_STATUS = exports.USER_INVENTORY_ACTION = exports.INVENTORY_TYPE = exports.USER_STATUS = exports.PDF_MICRO_SERVICE_END_POINT = exports.MOBILE_VERIFICATION = exports.EMAIL_VERIFICATION = exports.PAGINATION_UPDATE_ORDER = exports.PAGINATION_ORDER = exports.DEFAULT_BATCH_TITLE = exports.DEFAULT_CLASS_ROOM_TITLE = exports.PAGINATION = exports.USER_INSTITUTE_META_STATUS_REJECTED_COUNT = exports.ONE_THOUSAND = exports.ONE_HUNDRED = exports.SIXTY = void 0;
4
4
  exports.QDC_NAME = exports.USER_PAYOUT_TYPE = exports.PARENTS_CHILDREN_CURRENT = exports.CHAPTER_INDEX_FILE_TYPE = exports.FEE_HISTORY_STATUS = exports.USER_CHAPTER_INDEX_STATUS = exports.CHAPTER_INDEX_TYPE = exports.IMAGE__NAME = exports.INQUIRY_STATUS = exports.INQUIRY_REFERRED_BY = exports.EXAM_GROUP_STANDARD_RESULT = exports.EXAM_GROUP_STATUS = exports.SUBJECT_INDEX_TYPE = exports.LECTURE_SLOT_DURATION = exports.EXAM_ANSWER_SHEET_QUESTION_RESULT = exports.PAYMENT_TERMS_TYPE = exports.PAYMENT_TERMS_STATUS = exports.EXAM_ANSWER_SHEET_RESULT_TYPE = exports.EXAM_ANSWER_SHEET_RESULT_STATUS = exports.EXAM_ANSWER_SHEET_STATUS = exports.EXAM_VALID_ANSWER_TYPE = exports.EXAM_ANSWER_SELECTION_TYPE = exports.EXAM_STATUS = exports.COURSE_STATUS = exports.EXAM_MODE = exports.GREETING_STATUS = exports.USER_HAS_ANNOUCEMENT_STATUS = exports.ANNOUCEMENT_STATUS = exports.TYPE_OF_USER = exports.ANNOUCEMENT_SCHEDULE_TYPE = exports.APPROVE_REQUEST_STATUS = exports.APPROVE_REQUEST_TYPE = exports.TYPE_MANAGEMENT_STATUS = exports.TYPE_MANAGEMENT_TYPE = exports.FILE_TYPE = exports.ACADEMIC_CALENDARS_STATUS = exports.BANNER_TYPE = exports.APP_TYPE = exports.FEED_BACK_STATUS = exports.FEED_BACK_TYPE = exports.FACILITY_TYPE = exports.EMPLOYMENT_TYPE = exports.USER_INSTITUTE_META_STATUS = exports.USER_HAS_PARENT_STATUS = exports.GUARDIANS_USER_META_MODEL_STATUS = exports.DISABILITY_TYPE = exports.WORK_CATEGORY = exports.BLOG_STATUS = exports.WORK_TYPE = exports.USER_DETAILS = void 0;
5
5
  exports.PDF_CHEQUE_STATUS = exports.LANGUAGES = exports.HOME_WORK_STATUS = exports.SOCKET_EVENTS = exports.SUBSCRIPTION_PLAN_FILES_TYPE = exports.VALID_CURRENCY = exports.SUBSCRIPTION_PLAN_CHARGE_INTERVAL = exports.DISCOUNT_TYPE = exports.CONTACT_FEED_BACK_TYPE = exports.PLANNER_SYNC_STATUS = exports.NOTIFICATION_ACTION = exports.NOTIFICATION_MODULE_TYPE = exports.NOTIFICATION_STATUS = exports.NOTIFICATION_TYPE = exports.PROJECT_ASSESSMENT_OPTION_STATUS = exports.USER_BOOK_ASSESSMENT_STATUS = exports.BOOK_ASSESSMENT_DATE_STATUS = exports.TASK_MANAGEMENT_STATUS = exports.USER_DETAILS_FILED = exports.DEVICE_TYPE = exports.templateKeyWord = exports.bankAccountRegexMap = exports.EMAIL_SUBJECTS = exports.PDF_TEMPLATES = exports.EMAIL_TEMPLATES = exports.PINCODE_API_URL = exports.APPLE_AUTH = exports.META_AUTH = exports.GOOGLE_AUTH = exports.API_URL = exports.DEFAULT_USER_LOGO = exports.DEFAULT_INSTITUTED_LOGO = exports.UPLOAD_PATH = exports.SVG_URL_PATH = exports.TO_DO_STATUS = exports.LECTURE_TITLE = exports.LECTURE_STATUS = exports.SCHOOL_INFORMATION_STEP = exports.CASTE = exports.RELIGION_CASTE = exports.NATIONALITY = exports.CATEGORY = exports.IS_PRINCIPAL = exports.FEE_TYPE = exports.BOOLEAN_STATUS = exports.PROPERTY_STATUS = exports.DESIGNATION_OF_PERSON = exports.TRUST_REGISTERED_UNDER = exports.TRUST_TYPE = exports.SVA_NAME = void 0;
6
- exports.BANK_ACCOUNT_TYPE = exports.STUDENT_LEAVE_TYPE = exports.STUDENT_LEAVE_STATUS = exports.CERTIFICATE_TYPE = exports.CERTIFICATE_FOR = exports.SHEET_TYPE = exports.COMPETITION_USER_ROLE = exports.RESULT_STATUS = exports.COMPETITION_STATUS = exports.STATUS_BY_PARENTS = exports.COMPETITION_TYPE = exports.CAMPUS_CARNIVAL_STATUS = exports.COMPETITION_TYPE_CATEGORY = exports.COMPETITION_EVENTS = exports.PAYMENT_STATUS = exports.INCOME_EXPENSE_SOURCE = exports.INCOME_EXPENSE_TYPE = exports.APPOINTMENT_STATUS = exports.MAINTENANCE_MODULE_NAME = exports.MAINTENANCE_TYPE = exports.MAINTENANCE_MODE = exports.ASSIGN_FILE_TYPE = exports.LOST_FOUND_ITEM_STATUS = exports.FREE_SUBSCRIPTION_SEQUENCE = exports.INITIAL_FREE_STORAGE_IN_GB = exports.INITIAL_FREE_COIN = exports.PAYMENT_PROCESSING_CALLBACK_URL = exports.PAYMENT_PROCESSING_PAGE_URL = exports.PAYMENT_PROCESSING_STATUS_URL = exports.COIN_PURCHASE_GST_PERCENTAGE = exports.WALLET_TRANSACTION_VALID_DATE_FOR_OTP_IN_MINUTES = exports.WALLET_TRANSACTION_VALID_DATE_IN_MINUTES = exports.PAYMENT_METHODS = exports.PAYMENT_GATEWAY_TYPES = exports.JOB_ACTION = exports.ONE_GB_BYTES = exports.CHARGE_PER_TRANSACTION_ITEM_UNIT = exports.INSTITUTE_SUBSCRIPTION_PLAN_STATUS = exports.WALLET_TRANSACTION_USERS_TYPE = exports.WALLET_HISTORY_STATUS = exports.WALLET_HISTORY_ACTION = exports.WALLET_HISTORY_ITEM_TYPE = exports.WALLET_HISTORY_TYPE = exports.REPLACE_TEACHER_STATUS = exports.TEACHER_TYPE = exports.INVOICE_TYPE = exports.PURCHASE_STATUS = exports.COLUMN_LIST_TITLE = exports.INVOICE_PAYMENT_TYPE = exports.PDF_CHEQUE_FREQUENCY = void 0;
7
- exports.SEARCH_TYPE = exports.REPORT_TYPE = exports.DEVICE_TYPE_APP_ANALYTICS = exports.APP_ANALYTICS_EVENT_TYPE = exports.EXPORT_SHEET_TYPE = exports.GRANT_AND_DONATION_TYPE = exports.TICKET_RAISE_PRIORITY = exports.TICKET_RAISE_STATUS = exports.TERM_AND_CONDITION_STATUS = exports.EDUCATION_OFFICER_TYPE = exports.HOME_WORK_TYPE = exports.STUDENT_FEE_PROCESS_STATUS = exports.FEE_COLLECTION_TYPE = void 0;
6
+ exports.EDUCATION_OFFICER_TYPE = exports.HOME_WORK_TYPE = exports.STUDENT_FEE_PROCESS_STATUS = exports.FEE_COLLECTION_TYPE = exports.BANK_ACCOUNT_TYPE = exports.STUDENT_LEAVE_TYPE = exports.STUDENT_LEAVE_STATUS = exports.CERTIFICATE_TYPE = exports.CERTIFICATE_FOR = exports.SHEET_TYPE = exports.COMPETITION_USER_ROLE = exports.RESULT_STATUS = exports.COMPETITION_STATUS = exports.STATUS_BY_PARENTS = exports.COMPETITION_TYPE = exports.CAMPUS_CARNIVAL_STATUS = exports.COMPETITION_TYPE_CATEGORY = exports.COMPETITION_EVENTS = exports.PAYMENT_STATUS = exports.INCOME_EXPENSE_SOURCE = exports.INCOME_EXPENSE_TYPE = exports.APPOINTMENT_STATUS = exports.MAINTENANCE_MODULE_NAME = exports.MAINTENANCE_TYPE = exports.MAINTENANCE_MODE = exports.ASSIGN_FILE_TYPE = exports.LOST_FOUND_ITEM_STATUS = exports.PAYMENT_PROCESSING_CALLBACK_URL = exports.PAYMENT_PROCESSING_PAGE_URL = exports.PAYMENT_PROCESSING_STATUS_URL = exports.WALLET_TRANSACTION_VALID_DATE_FOR_OTP_IN_MINUTES = exports.WALLET_TRANSACTION_VALID_DATE_IN_MINUTES = exports.PAYMENT_METHODS = exports.PAYMENT_GATEWAY_TYPES = exports.JOB_ACTION = exports.ONE_GB_BYTES = exports.CHARGE_PER_TRANSACTION_ITEM_UNIT = exports.INSTITUTE_SUBSCRIPTION_PLAN_STATUS = exports.WALLET_TRANSACTION_USERS_TYPE = exports.WALLET_HISTORY_STATUS = exports.WALLET_HISTORY_ACTION = exports.WALLET_HISTORY_ITEM_TYPE = exports.WALLET_HISTORY_TYPE = exports.REPLACE_TEACHER_STATUS = exports.TEACHER_TYPE = exports.INVOICE_TYPE = exports.PURCHASE_STATUS = exports.COLUMN_LIST_TITLE = exports.INVOICE_PAYMENT_TYPE = exports.PDF_CHEQUE_FREQUENCY = void 0;
7
+ exports.SEARCH_TYPE = exports.REPORT_TYPE = exports.DEVICE_TYPE_APP_ANALYTICS = exports.APP_ANALYTICS_EVENT_TYPE = exports.EXPORT_SHEET_TYPE = exports.GRANT_AND_DONATION_TYPE = exports.TICKET_RAISE_PRIORITY = exports.TICKET_RAISE_STATUS = exports.TERM_AND_CONDITION_STATUS = void 0;
8
8
  const env_1 = require("../configs/env");
9
9
  exports.SIXTY = 60;
10
10
  exports.ONE_HUNDRED = 100;
@@ -1077,6 +1077,7 @@ var WALLET_HISTORY_TYPE;
1077
1077
  WALLET_HISTORY_TYPE["SEND"] = "SEND";
1078
1078
  WALLET_HISTORY_TYPE["RECEIVE"] = "RECEIVE";
1079
1079
  WALLET_HISTORY_TYPE["REFUND"] = "REFUND";
1080
+ WALLET_HISTORY_TYPE["REWARD"] = "REWARD";
1080
1081
  })(WALLET_HISTORY_TYPE || (exports.WALLET_HISTORY_TYPE = WALLET_HISTORY_TYPE = {}));
1081
1082
  var WALLET_HISTORY_ITEM_TYPE;
1082
1083
  (function (WALLET_HISTORY_ITEM_TYPE) {
@@ -1084,6 +1085,8 @@ var WALLET_HISTORY_ITEM_TYPE;
1084
1085
  WALLET_HISTORY_ITEM_TYPE["STORAGE"] = "STORAGE";
1085
1086
  WALLET_HISTORY_ITEM_TYPE["PLAN"] = "PLAN";
1086
1087
  WALLET_HISTORY_ITEM_TYPE["USER"] = "USER";
1088
+ WALLET_HISTORY_ITEM_TYPE["MODULE"] = "MODULE";
1089
+ WALLET_HISTORY_ITEM_TYPE["COURSE"] = "COURSE";
1087
1090
  })(WALLET_HISTORY_ITEM_TYPE || (exports.WALLET_HISTORY_ITEM_TYPE = WALLET_HISTORY_ITEM_TYPE = {}));
1088
1091
  var WALLET_HISTORY_ACTION;
1089
1092
  (function (WALLET_HISTORY_ACTION) {
@@ -1142,13 +1145,13 @@ var PAYMENT_METHODS;
1142
1145
  })(PAYMENT_METHODS || (exports.PAYMENT_METHODS = PAYMENT_METHODS = {}));
1143
1146
  exports.WALLET_TRANSACTION_VALID_DATE_IN_MINUTES = 60;
1144
1147
  exports.WALLET_TRANSACTION_VALID_DATE_FOR_OTP_IN_MINUTES = 2;
1145
- exports.COIN_PURCHASE_GST_PERCENTAGE = 18;
1148
+ // export let COIN_PURCHASE_GST_PERCENTAGE = 18;
1146
1149
  exports.PAYMENT_PROCESSING_STATUS_URL = env_1.ENV_VARIABLE.SERVER_URL + '/api/v1/openRoute/paymentProcessor/status';
1147
1150
  exports.PAYMENT_PROCESSING_PAGE_URL = env_1.ENV_VARIABLE.SERVER_URL + '/api/v1/openRoute/paymentProcessor/paymentPage';
1148
1151
  exports.PAYMENT_PROCESSING_CALLBACK_URL = env_1.ENV_VARIABLE.SERVER_URL + '/api/v1/paymentProcessor/callback';
1149
- exports.INITIAL_FREE_COIN = 500;
1150
- exports.INITIAL_FREE_STORAGE_IN_GB = 1;
1151
- exports.FREE_SUBSCRIPTION_SEQUENCE = [1];
1152
+ // export let INITIAL_FREE_COIN = 500;
1153
+ // export let INITIAL_FREE_STORAGE_IN_GB = 1;
1154
+ // export const FREE_SUBSCRIPTION_SEQUENCE = [1];
1152
1155
  var LOST_FOUND_ITEM_STATUS;
1153
1156
  (function (LOST_FOUND_ITEM_STATUS) {
1154
1157
  LOST_FOUND_ITEM_STATUS["PENDING"] = "PENDING";
@@ -0,0 +1,2 @@
1
+ export function up(queryInterface: any): Promise<void>;
2
+ export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -0,0 +1,22 @@
1
+ 'use strict';
2
+ const up = async (queryInterface) => {
3
+ const table = await queryInterface.describeTable('coin_purchase_offers');
4
+ if (table.validity_in_days) {
5
+ await queryInterface.removeColumn('coin_purchase_offers', 'validity_in_days');
6
+ }
7
+ };
8
+ const down = async (queryInterface, Sequelize) => {
9
+ const table = await queryInterface.describeTable('coin_purchase_offers');
10
+ if (!table.validity_in_days) {
11
+ await queryInterface.addColumn('coin_purchase_offers', 'validity_in_days', {
12
+ type: Sequelize.INTEGER,
13
+ allowNull: false,
14
+ defaultValue: 0,
15
+ field: 'validity_in_days',
16
+ });
17
+ }
18
+ };
19
+ module.exports = {
20
+ up,
21
+ down,
22
+ };
@@ -0,0 +1,2 @@
1
+ export function up(queryInterface: any, Sequelize: any): Promise<void>;
2
+ export function down(queryInterface: any): Promise<void>;
@@ -0,0 +1,22 @@
1
+ 'use strict';
2
+ const up = async (queryInterface, Sequelize) => {
3
+ const table = await queryInterface.describeTable('cloud_storage');
4
+ if (!table.validity_in_days) {
5
+ await queryInterface.addColumn('cloud_storage', 'validity_in_days', {
6
+ type: Sequelize.INTEGER,
7
+ allowNull: false,
8
+ defaultValue: 0,
9
+ field: 'validity_in_days',
10
+ });
11
+ }
12
+ };
13
+ const down = async (queryInterface) => {
14
+ const table = await queryInterface.describeTable('cloud_storage');
15
+ if (table.validity_in_days) {
16
+ await queryInterface.removeColumn('cloud_storage', 'validity_in_days');
17
+ }
18
+ };
19
+ module.exports = {
20
+ up,
21
+ down,
22
+ };
@@ -12,4 +12,5 @@ export interface ICloudStorageModelAttributes extends IDefaultAttributes {
12
12
  totalPayableAmount: number;
13
13
  isDefault: boolean;
14
14
  status: COMMAN_STATUS;
15
+ validityInDays: number;
15
16
  }
@@ -175,3 +175,4 @@ export * from './finalMarkSheetInterface';
175
175
  export * from './subjectInternalMarkInterface';
176
176
  export * from './pdcChequeConfigurationInterface';
177
177
  export * from './modulePriceInterface';
178
+ export * from './subscriptionConfigurationInterface';
@@ -191,3 +191,4 @@ __exportStar(require("./finalMarkSheetInterface"), exports);
191
191
  __exportStar(require("./subjectInternalMarkInterface"), exports);
192
192
  __exportStar(require("./pdcChequeConfigurationInterface"), exports);
193
193
  __exportStar(require("./modulePriceInterface"), exports);
194
+ __exportStar(require("./subscriptionConfigurationInterface"), exports);
@@ -0,0 +1,15 @@
1
+ import { Document } from 'mongoose';
2
+ import { IDefaultAttributes } from './commonInterface';
3
+ import { APP_TYPE } from '../constants';
4
+ export interface ISubscriptionConfigurationBaseInterface {
5
+ uuid: string;
6
+ coinPurchaseGstPercentage: number;
7
+ initialFreeCoin: number;
8
+ initialFreeStorageInGb: number;
9
+ updatedTime: Date;
10
+ }
11
+ export interface ISubscriptionConfigurationModelAttributes extends ISubscriptionConfigurationBaseInterface, IDefaultAttributes, Document {
12
+ id: string;
13
+ history: ISubscriptionConfigurationBaseInterface[];
14
+ appType: APP_TYPE;
15
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -26,4 +26,6 @@ export interface ISubscriptionPlanModelAttributes extends IDefaultAttributes, Do
26
26
  appType: APP_TYPE;
27
27
  detailsList?: any;
28
28
  sequence: number;
29
+ isFree?: boolean;
30
+ isTrial?: number;
29
31
  }
@@ -60,3 +60,4 @@ export { default as MarkSheetConfigurationModel } from './markSheetConfiguration
60
60
  export { default as FinalMarkSheetModel } from './finalMarkSheetModel';
61
61
  export { default as PdcChequeConfigurationModel } from './pdcChequeConfigurationModel';
62
62
  export { default as ModulePriceModel } from './modulePriceModel';
63
+ export { default as SubscriptionConfigurationModel } from './subscriptionConfigurationModel';
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.PollSelectionModel = exports.CreatePollModel = exports.SheetFieldMappingModel = exports.FileUploadUserDetails = exports.CompetitionUsersModel = exports.CompetitionGroupModel = exports.CompetitionModel = exports.CampusCarnivalModel = exports.AppointmentHistoryModel = exports.AppointmentModel = exports.SeatingArrangementModel = exports.AssignFileModel = exports.ThemeModel = exports.BDayWishModel = exports.AdditionalDetailModel = exports.CanteenModel = exports.WalletTransactionModel = exports.VideoAnalystModel = exports.UserSchoolMetaModel = exports.UserInstituteMetaModel = exports.UserDetailsModel = exports.UniqueNumberCounterModel = exports.TaskManagementModel = exports.SubscriptionPlanModel = exports.SubjectIndexModel = exports.ReplaceTeacherModel = exports.PlannerModel = exports.PhotosGalleryModel = exports.JobApplyModel = exports.InvoiceModel = exports.InquiryModel = exports.InformationSupportModel = exports.HolidayModel = exports.GenerateIdCardModel = exports.FeedBackModel = exports.FeeReminderTypeModel = exports.ExamModel = exports.ExamHasAnswerSheetModel = exports.ExamGroupModel = exports.EventModel = exports.DashboardManagementModel = exports.DailyBookModel = exports.ColumnModel = exports.CertificatesManagementModel = exports.CertificatesHistoryModel = exports.CareerModel = exports.BlogModel = exports.AttendanceModel = exports.ApprovalRequestModel = exports.connectMongoDb = void 0;
7
- exports.ModulePriceModel = exports.PdcChequeConfigurationModel = exports.FinalMarkSheetModel = exports.MarkSheetConfigurationModel = exports.AppAnalyticsEventModel = exports.GrantAndDonationModel = exports.TicketRaiseModel = exports.EducationOfficerModel = exports.InstituteFeeModel = exports.SchoolFee1Model = exports.FeeConfigModel = exports.EventTemplatesModel = void 0;
7
+ exports.SubscriptionConfigurationModel = exports.ModulePriceModel = exports.PdcChequeConfigurationModel = exports.FinalMarkSheetModel = exports.MarkSheetConfigurationModel = exports.AppAnalyticsEventModel = exports.GrantAndDonationModel = exports.TicketRaiseModel = exports.EducationOfficerModel = exports.InstituteFeeModel = exports.SchoolFee1Model = exports.FeeConfigModel = exports.EventTemplatesModel = void 0;
8
8
  const mongoose_1 = __importDefault(require("mongoose"));
9
9
  const env_1 = require("../../configs/env");
10
10
  const transformIdInQueryPlugin_1 = __importDefault(require("./plugin/transformIdInQueryPlugin"));
@@ -147,3 +147,5 @@ var pdcChequeConfigurationModel_1 = require("./pdcChequeConfigurationModel");
147
147
  Object.defineProperty(exports, "PdcChequeConfigurationModel", { enumerable: true, get: function () { return __importDefault(pdcChequeConfigurationModel_1).default; } });
148
148
  var modulePriceModel_1 = require("./modulePriceModel");
149
149
  Object.defineProperty(exports, "ModulePriceModel", { enumerable: true, get: function () { return __importDefault(modulePriceModel_1).default; } });
150
+ var subscriptionConfigurationModel_1 = require("./subscriptionConfigurationModel");
151
+ Object.defineProperty(exports, "SubscriptionConfigurationModel", { enumerable: true, get: function () { return __importDefault(subscriptionConfigurationModel_1).default; } });
@@ -0,0 +1,4 @@
1
+ import { Model } from 'mongoose';
2
+ import { ISubscriptionConfigurationModelAttributes } from '../../interfaces/subscriptionConfigurationInterface';
3
+ declare const SubscriptionConfigurationModel: Model<ISubscriptionConfigurationModelAttributes>;
4
+ export default SubscriptionConfigurationModel;
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ const mongoose_1 = __importStar(require("mongoose"));
37
+ const constants_1 = require("../../constants");
38
+ const historySchema = new mongoose_1.Schema({
39
+ coinPurchaseGstPercentage: { type: Number, required: true },
40
+ initialFreeCoin: { type: Number, required: true },
41
+ initialFreeStorageInGb: { type: Number, required: true },
42
+ uuid: { type: String, required: true },
43
+ updatedTime: { type: Date, required: true },
44
+ }, { _id: false });
45
+ const subscriptionConfigurationModelSchema = new mongoose_1.Schema({
46
+ coinPurchaseGstPercentage: { type: Number, required: true },
47
+ initialFreeCoin: { type: Number, required: true },
48
+ initialFreeStorageInGb: { type: Number, required: true },
49
+ uuid: { type: String, required: true },
50
+ history: {
51
+ type: [historySchema],
52
+ required: false,
53
+ default: [],
54
+ },
55
+ appType: {
56
+ type: String,
57
+ enum: Object.values(constants_1.APP_TYPE),
58
+ required: true,
59
+ },
60
+ createdBy: { type: String, required: false },
61
+ updatedBy: { type: String, required: false },
62
+ deletedBy: { type: String, required: false },
63
+ }, {
64
+ timestamps: true,
65
+ versionKey: false,
66
+ });
67
+ const SubscriptionConfigurationModel = mongoose_1.default.model('subscription_configuration', subscriptionConfigurationModelSchema);
68
+ exports.default = SubscriptionConfigurationModel;
@@ -123,6 +123,14 @@ const subscriptionPlanModelSchema = new mongoose_1.Schema({
123
123
  type: String,
124
124
  required: true,
125
125
  },
126
+ isFree: {
127
+ type: Boolean,
128
+ default: false,
129
+ },
130
+ isTrial: {
131
+ type: Boolean,
132
+ default: false,
133
+ },
126
134
  sequence: { type: Number, required: false },
127
135
  }, {
128
136
  timestamps: true,
@@ -14,6 +14,7 @@ export declare class CloudStorageModel extends Model<ICloudStorageModelAttribute
14
14
  totalPayableAmount: number;
15
15
  isDefault: boolean;
16
16
  status: COMMAN_STATUS;
17
+ validityInDays: number;
17
18
  createdBy: string;
18
19
  updatedBy: string;
19
20
  deletedBy: string;
@@ -77,6 +77,11 @@ CloudStorageModel.init({
77
77
  allowNull: false,
78
78
  defaultValue: app_1.COMMAN_STATUS.ACTIVE,
79
79
  },
80
+ validityInDays: {
81
+ type: sequelize_1.DataTypes.NUMBER,
82
+ field: 'validity_in_days',
83
+ allowNull: false,
84
+ },
80
85
  }, {
81
86
  modelName: 'CloudStorageModel',
82
87
  tableName: 'cloud_storage',
@@ -76,7 +76,7 @@ CoinPurchaseOfferModel.init({
76
76
  type: sequelize_1.DataTypes.FLOAT,
77
77
  allowNull: false,
78
78
  field: 'gst_percentage',
79
- defaultValue: app_1.COIN_PURCHASE_GST_PERCENTAGE,
79
+ defaultValue: 0,
80
80
  },
81
81
  payableAmount: {
82
82
  type: sequelize_1.DataTypes.FLOAT,
@@ -166,3 +166,4 @@ export * from './finalMarkSheetType';
166
166
  export * from './subjectInternalMarkType';
167
167
  export * from './pdcChequeConfigurationType';
168
168
  export * from './modulePriceType';
169
+ export * from './subscriptionConfigurationType';
@@ -182,3 +182,4 @@ __exportStar(require("./finalMarkSheetType"), exports);
182
182
  __exportStar(require("./subjectInternalMarkType"), exports);
183
183
  __exportStar(require("./pdcChequeConfigurationType"), exports);
184
184
  __exportStar(require("./modulePriceType"), exports);
185
+ __exportStar(require("./subscriptionConfigurationType"), exports);
@@ -0,0 +1,2 @@
1
+ import { ISubscriptionConfigurationModelAttributes } from '../interfaces/subscriptionConfigurationInterface';
2
+ export type TSubscriptionConfigurationModelCreationAttributes = Omit<ISubscriptionConfigurationModelAttributes, 'id'>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kipicore/dbcore",
3
- "version": "1.1.386",
3
+ "version": "1.1.388",
4
4
  "description": "Reusable DB core package with Postgres, MongoDB, models, services, interfaces, and types",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",