@reachu/database 1.0.34 → 1.0.36
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/dist/entity/User.d.ts +2 -0
- package/dist/entity/User.js +9 -0
- package/dist/entity/User.js.map +1 -1
- package/dist/entity/index.d.ts +2 -1
- package/dist/entity/index.js +3 -1
- package/dist/entity/index.js.map +1 -1
- package/dist/entity/modules/subscriptions/Plan.d.ts +1 -0
- package/dist/entity/modules/subscriptions/Plan.js +4 -0
- package/dist/entity/modules/subscriptions/Plan.js.map +1 -1
- package/dist/entity/modules/subscriptions/UserCountPlan.d.ts +10 -0
- package/dist/entity/modules/subscriptions/UserCountPlan.js +49 -0
- package/dist/entity/modules/subscriptions/UserCountPlan.js.map +1 -0
- package/dist/migrations/1682475704295-Subscriptions_v3.d.ts +6 -0
- package/dist/migrations/1682475704295-Subscriptions_v3.js +42 -0
- package/dist/migrations/1682475704295-Subscriptions_v3.js.map +1 -0
- package/dist/repositories/index.d.ts +2 -2
- package/dist/repositories/index.js +2 -1
- package/dist/repositories/index.js.map +1 -1
- package/dist/repositories/subscriptions/index.d.ts +3 -0
- package/dist/repositories/subscriptions/index.js +8 -1
- package/dist/repositories/subscriptions/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +329 -15
- package/package.json +3 -3
- package/src/entity/User.ts +8 -0
- package/src/entity/index.ts +2 -0
- package/src/entity/modules/subscriptions/Plan.ts +11 -2
- package/src/entity/modules/subscriptions/UserCountPlan.ts +34 -0
- package/src/migrations/1682475704295-Subscriptions_v3.ts +27 -0
- package/src/repositories/index.ts +2 -2
- package/src/repositories/subscriptions/index.ts +4 -0
package/dist/entity/User.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ import UserRole from './UserRole';
|
|
|
14
14
|
import UserSettings from './UserSettings';
|
|
15
15
|
import Shipping from './modules/shipping/Shipping';
|
|
16
16
|
import Subscription from './modules/subscriptions/Subscription';
|
|
17
|
+
import UserCountPlan from './modules/subscriptions/UserCountPlan';
|
|
17
18
|
export default class User extends AuditedModel {
|
|
18
19
|
id: number;
|
|
19
20
|
deletedAt: Date;
|
|
@@ -84,6 +85,7 @@ export default class User extends AuditedModel {
|
|
|
84
85
|
userRole: UserRole[];
|
|
85
86
|
shipping: Shipping[];
|
|
86
87
|
subscriptions: Subscription[];
|
|
88
|
+
userCountPlan: UserCountPlan;
|
|
87
89
|
static invalidateCache(userId: any, removeCache: (key: any) => Promise<void>): void;
|
|
88
90
|
static getUsersMeKey(id: any): string;
|
|
89
91
|
}
|
package/dist/entity/User.js
CHANGED
|
@@ -30,6 +30,7 @@ const UserRole_1 = __importDefault(require("./UserRole"));
|
|
|
30
30
|
const UserSettings_1 = __importDefault(require("./UserSettings"));
|
|
31
31
|
const Shipping_1 = __importDefault(require("./modules/shipping/Shipping"));
|
|
32
32
|
const Subscription_1 = __importDefault(require("./modules/subscriptions/Subscription"));
|
|
33
|
+
const UserCountPlan_1 = __importDefault(require("./modules/subscriptions/UserCountPlan"));
|
|
33
34
|
let User = class User extends AuditedModel_1.default {
|
|
34
35
|
static invalidateCache(userId, removeCache) {
|
|
35
36
|
logger_1.logger.debug('User: Invalidating cache');
|
|
@@ -323,6 +324,14 @@ __decorate([
|
|
|
323
324
|
typeorm_1.JoinColumn(),
|
|
324
325
|
__metadata("design:type", Array)
|
|
325
326
|
], User.prototype, "subscriptions", void 0);
|
|
327
|
+
__decorate([
|
|
328
|
+
typeorm_1.OneToOne(() => UserCountPlan_1.default, (userCountPlan) => userCountPlan.user, {
|
|
329
|
+
cascade: true,
|
|
330
|
+
eager: true,
|
|
331
|
+
}),
|
|
332
|
+
typeorm_1.JoinColumn(),
|
|
333
|
+
__metadata("design:type", UserCountPlan_1.default)
|
|
334
|
+
], User.prototype, "userCountPlan", void 0);
|
|
326
335
|
User = __decorate([
|
|
327
336
|
typeorm_1.Entity()
|
|
328
337
|
], User);
|
package/dist/entity/User.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"User.js","sourceRoot":"","sources":["../../src/entity/User.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAWiB;AACjB,kEAA0C;AAC1C,0DAAkC;AAClC,wDAAgC;AAChC,wDAAgC;AAChC,0DAAkC;AAClC,wEAAgD;AAChD,oDAA4B;AAC5B,oEAA4C;AAC5C,0DAAkC;AAClC,4EAAoD;AACpD,2CAAwC;AAExC,oEAA4C;AAC5C,yEAA+D;AAC/D,0DAAkC;AAClC,kEAA0C;AAC1C,2EAAmD;AACnD,wFAAgE;
|
|
1
|
+
{"version":3,"file":"User.js","sourceRoot":"","sources":["../../src/entity/User.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAWiB;AACjB,kEAA0C;AAC1C,0DAAkC;AAClC,wDAAgC;AAChC,wDAAgC;AAChC,0DAAkC;AAClC,wEAAgD;AAChD,oDAA4B;AAC5B,oEAA4C;AAC5C,0DAAkC;AAClC,4EAAoD;AACpD,2CAAwC;AAExC,oEAA4C;AAC5C,yEAA+D;AAC/D,0DAAkC;AAClC,kEAA0C;AAC1C,2EAAmD;AACnD,wFAAgE;AAChE,0FAAkE;AAGlE,IAAqB,IAAI,GAAzB,MAAqB,IAAK,SAAQ,sBAAY;IA2O5C,MAAM,CAAC,eAAe,CAAC,MAAM,EAAE,WAAwC;QACrE,eAAM,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC;QACzC,WAAW,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC;IAC1C,CAAC;IAED,MAAM,CAAC,aAAa,CAAC,EAAE;QACrB,OAAO,iBAAiB,EAAE,EAAE,CAAC;IAC/B,CAAC;CACF,CAAA;AAjPC;IADC,gCAAsB,EAAE;;gCACd;AAGX;IADC,0BAAgB,EAAE;8BACR,IAAI;uCAAC;AAGhB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;wCAClB;AAIpB;IAFC,kB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AAO,EAAE,IAAI,EAAE,CAAC;IACnF,oBAAU,EAAE;;sCACQ;AAIrB;IAFC,mBAAS,CAAC,GAAG,EAAE,CAAC,kBAAQ,EAAE,CAAC,QAAkB,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IACnF,oBAAU,EAAE;;sCACQ;AAOrB;IALC,mBAAS,CAAC,GAAG,EAAE,CAAC,sBAAY,EAAE,CAAC,YAA0B,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE;QAChF,OAAO,EAAE,IAAI;QACb,KAAK,EAAE,IAAI;KACZ,CAAC;IACD,oBAAU,EAAE;;2CACiB;AAO9B;IALC,kBAAQ,CAAC,GAAG,EAAE,CAAC,uBAAa,EAAE,CAAC,aAA4B,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,EAAE;QACnF,OAAO,EAAE,IAAI;QACb,KAAK,EAAE,IAAI;KACZ,CAAC;IACD,oBAAU,EAAE;8BACE,uBAAa;2CAAC;AAzOV,IAAI;IADxB,gBAAM,EAAE;GACY,IAAI,CAmPxB;kBAnPoB,IAAI"}
|
package/dist/entity/index.d.ts
CHANGED
|
@@ -88,4 +88,5 @@ import TemplateEcommerceSchemeConfigVariant from './modules/templates/schemeVari
|
|
|
88
88
|
import TemplateEcommerceSchemeConfigVariantMapped from './modules/templates/schemeVariant/TemplateEcommerceSchemeConfigVariantMapped';
|
|
89
89
|
import Plan from './modules/subscriptions/Plan';
|
|
90
90
|
import Subscription from './modules/subscriptions/Subscription';
|
|
91
|
-
|
|
91
|
+
import UserCountPlan from './modules/subscriptions/UserCountPlan';
|
|
92
|
+
export { CustomVariant, CustomProduct, CustomProductImage, Cart, CartItem, Checkout, CheckoutBillingAddress, CheckoutShippingAddress, PriceData, ProductShipping, Shipping, ShippingCountry, Address, ApiCredential, AuditedModel, BankAccount, Business, BusinessProducts, CardRegistration, Category, Channel, Check, CheckoutMetadata, Contact, Country, Courier, FlatRate, FlatRateCountry, Fulfillment, Image, ImportedProduct, MagentoConnection, MetricActiveUser, Notification, Option, Order, OrderCustomer, OrderItem, OrderShipping, OrderTracking, Payment, PaymentShopify, Permission, Price, Product, Request, Return, ReturnAddress, Role, RolePermission, ShippingPackage, ShopifyConnection, Subcategory, User, UserRole, Variant, Wallet, WooConnection, UserTokenWolt, UserSettings, PaymentMethod, Collection, CollectionItem, CollectionShared, ChannelGroup, ChannelUser, ChannelUserProductSync, UserChannelApiKey, Currency, ExchangeRate, Attribute, ProductAttribute, CategoryImages, AuthInfo, AuthMethod, EndpointTemplateEcommerce, TemplateEcommerce, UserTemplateEcommerce, TemplateEcommerceSchemeConfigOrder, TemplateEcommerceSchemeConfigOrderMapped, ReachuSchemeConfigOrder, TemplateEcommerceSchemeConfigProduct, TemplateEcommerceSchemeConfigProductMapped, ReachuSchemeConfigProduct, TemplateEcommerceSchemeConfigVariant, TemplateEcommerceSchemeConfigVariantMapped, ReachuSchemeConfigVariant, Plan, Subscription, UserCountPlan, EnvironmentConfiguration, };
|
package/dist/entity/index.js
CHANGED
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.RolePermission = exports.Role = exports.ReturnAddress = exports.Return = exports.Request = exports.Product = exports.Price = exports.Permission = exports.PaymentShopify = exports.Payment = exports.OrderTracking = exports.OrderShipping = exports.OrderItem = exports.OrderCustomer = exports.Order = exports.Option = exports.Notification = exports.MetricActiveUser = exports.MagentoConnection = exports.ImportedProduct = exports.Image = exports.Fulfillment = exports.FlatRateCountry = exports.FlatRate = exports.Courier = exports.Country = exports.Contact = exports.CheckoutMetadata = exports.Check = exports.Channel = exports.Category = exports.CardRegistration = exports.BusinessProducts = exports.Business = exports.BankAccount = exports.AuditedModel = exports.ApiCredential = exports.Address = exports.ShippingCountry = exports.Shipping = exports.ProductShipping = exports.PriceData = exports.CheckoutShippingAddress = exports.CheckoutBillingAddress = exports.Checkout = exports.CartItem = exports.Cart = exports.CustomProductImage = exports.CustomProduct = exports.CustomVariant = void 0;
|
|
7
|
-
exports.EnvironmentConfiguration = exports.Subscription = exports.Plan = exports.ReachuSchemeConfigVariant = exports.TemplateEcommerceSchemeConfigVariantMapped = exports.TemplateEcommerceSchemeConfigVariant = exports.ReachuSchemeConfigProduct = exports.TemplateEcommerceSchemeConfigProductMapped = exports.TemplateEcommerceSchemeConfigProduct = exports.ReachuSchemeConfigOrder = exports.TemplateEcommerceSchemeConfigOrderMapped = exports.TemplateEcommerceSchemeConfigOrder = exports.UserTemplateEcommerce = exports.TemplateEcommerce = exports.EndpointTemplateEcommerce = exports.AuthMethod = exports.AuthInfo = exports.CategoryImages = exports.ProductAttribute = exports.Attribute = exports.ExchangeRate = exports.Currency = exports.UserChannelApiKey = exports.ChannelUserProductSync = exports.ChannelUser = exports.ChannelGroup = exports.CollectionShared = exports.CollectionItem = exports.Collection = exports.PaymentMethod = exports.UserSettings = exports.UserTokenWolt = exports.WooConnection = exports.Wallet = exports.Variant = exports.UserRole = exports.User = exports.Subcategory = exports.ShopifyConnection = exports.ShippingPackage = void 0;
|
|
7
|
+
exports.EnvironmentConfiguration = exports.UserCountPlan = exports.Subscription = exports.Plan = exports.ReachuSchemeConfigVariant = exports.TemplateEcommerceSchemeConfigVariantMapped = exports.TemplateEcommerceSchemeConfigVariant = exports.ReachuSchemeConfigProduct = exports.TemplateEcommerceSchemeConfigProductMapped = exports.TemplateEcommerceSchemeConfigProduct = exports.ReachuSchemeConfigOrder = exports.TemplateEcommerceSchemeConfigOrderMapped = exports.TemplateEcommerceSchemeConfigOrder = exports.UserTemplateEcommerce = exports.TemplateEcommerce = exports.EndpointTemplateEcommerce = exports.AuthMethod = exports.AuthInfo = exports.CategoryImages = exports.ProductAttribute = exports.Attribute = exports.ExchangeRate = exports.Currency = exports.UserChannelApiKey = exports.ChannelUserProductSync = exports.ChannelUser = exports.ChannelGroup = exports.CollectionShared = exports.CollectionItem = exports.Collection = exports.PaymentMethod = exports.UserSettings = exports.UserTokenWolt = exports.WooConnection = exports.Wallet = exports.Variant = exports.UserRole = exports.User = exports.Subcategory = exports.ShopifyConnection = exports.ShippingPackage = void 0;
|
|
8
8
|
const Address_1 = __importDefault(require("./Address"));
|
|
9
9
|
exports.Address = Address_1.default;
|
|
10
10
|
const ApiCredential_1 = __importDefault(require("./ApiCredential"));
|
|
@@ -185,4 +185,6 @@ const Plan_1 = __importDefault(require("./modules/subscriptions/Plan"));
|
|
|
185
185
|
exports.Plan = Plan_1.default;
|
|
186
186
|
const Subscription_1 = __importDefault(require("./modules/subscriptions/Subscription"));
|
|
187
187
|
exports.Subscription = Subscription_1.default;
|
|
188
|
+
const UserCountPlan_1 = __importDefault(require("./modules/subscriptions/UserCountPlan"));
|
|
189
|
+
exports.UserCountPlan = UserCountPlan_1.default;
|
|
188
190
|
//# sourceMappingURL=index.js.map
|
package/dist/entity/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/entity/index.ts"],"names":[],"mappings":";;;;;;;AAAA,wDAAgC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/entity/index.ts"],"names":[],"mappings":";;;;;;;AAAA,wDAAgC;AAsH9B,kBAtHK,iBAAO,CAsHL;AArHT,oEAA4C;AAsH1C,wBAtHK,uBAAa,CAsHL;AArHf,kEAA0C;AAsHxC,uBAtHK,sBAAY,CAsHL;AArHd,gEAAwC;AAsHtC,sBAtHK,qBAAW,CAsHL;AArHb,0DAAkC;AAsHhC,mBAtHK,kBAAQ,CAsHL;AArHV,0EAAkD;AAsHhD,2BAtHK,0BAAgB,CAsHL;AArHlB,0EAAkD;AAsHhD,2BAtHK,0BAAgB,CAsHL;AArHlB,0DAAkC;AAsHhC,mBAtHK,kBAAQ,CAsHL;AArHV,wDAAgC;AAsH9B,kBAtHK,iBAAO,CAsHL;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FK,oDAA0C,CA6FL;AA1F5C,wEAAgD;AA4F9C,eA5FK,cAAI,CA4FL;AA3FN,wFAAgE;AA4F9D,uBA5FK,sBAAY,CA4FL;AA3Fd,0FAAkE;AA4FhE,wBA5FK,uBAAa,CA4FL"}
|
|
@@ -46,6 +46,10 @@ __decorate([
|
|
|
46
46
|
typeorm_1.JoinColumn(),
|
|
47
47
|
__metadata("design:type", Array)
|
|
48
48
|
], Plan.prototype, "subscriptions", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
typeorm_1.Column('varchar', { nullable: true }),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], Plan.prototype, "options", void 0);
|
|
49
53
|
Plan = __decorate([
|
|
50
54
|
typeorm_1.Entity()
|
|
51
55
|
], Plan);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Plan.js","sourceRoot":"","sources":["../../../../src/entity/modules/subscriptions/Plan.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,sEAA8C;AAC9C,
|
|
1
|
+
{"version":3,"file":"Plan.js","sourceRoot":"","sources":["../../../../src/entity/modules/subscriptions/Plan.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,sEAA8C;AAC9C,qCAOiB;AACjB,kEAA0C;AAG1C,IAAqB,IAAI,GAAzB,MAAqB,IAAK,SAAQ,sBAAY;CAyB7C,CAAA;AAvBC;IADC,0BAAgB,EAAE;8BACR,IAAI;uCAAC;AAGhB;IADC,gCAAsB,EAAE;;gCACd;AAGX;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;kCACtB;AAGb;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCAClB;AAGpB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sCACrB;AAGjB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sCACrB;AAIjB;IAFC,mBAAS,CAAC,GAAG,EAAE,CAAC,sBAAY,EAAE,CAAC,YAA0B,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC;IAChF,oBAAU,EAAE;;2CACiB;AAG9B;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qCACtB;AAxBG,IAAI;IADxB,gBAAM,EAAE;GACY,IAAI,CAyBxB;kBAzBoB,IAAI"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import AuditedModel from '../../AuditedModel';
|
|
2
|
+
import User from '../../User';
|
|
3
|
+
export default class UserCountPlan extends AuditedModel {
|
|
4
|
+
id: number;
|
|
5
|
+
deletedAt: Date;
|
|
6
|
+
user: User;
|
|
7
|
+
totalSku: number;
|
|
8
|
+
totalConnection: number;
|
|
9
|
+
totalChannel: number;
|
|
10
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
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 __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
const AuditedModel_1 = __importDefault(require("../../AuditedModel"));
|
|
16
|
+
const User_1 = __importDefault(require("../../User"));
|
|
17
|
+
const typeorm_1 = require("typeorm");
|
|
18
|
+
let UserCountPlan = class UserCountPlan extends AuditedModel_1.default {
|
|
19
|
+
};
|
|
20
|
+
__decorate([
|
|
21
|
+
typeorm_1.PrimaryGeneratedColumn(),
|
|
22
|
+
__metadata("design:type", Number)
|
|
23
|
+
], UserCountPlan.prototype, "id", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
typeorm_1.DeleteDateColumn(),
|
|
26
|
+
__metadata("design:type", Date)
|
|
27
|
+
], UserCountPlan.prototype, "deletedAt", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
typeorm_1.OneToOne(() => User_1.default, (user) => user.id, { onDelete: 'CASCADE' }),
|
|
30
|
+
typeorm_1.JoinColumn(),
|
|
31
|
+
__metadata("design:type", User_1.default)
|
|
32
|
+
], UserCountPlan.prototype, "user", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
typeorm_1.Column('integer'),
|
|
35
|
+
__metadata("design:type", Number)
|
|
36
|
+
], UserCountPlan.prototype, "totalSku", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
typeorm_1.Column('integer'),
|
|
39
|
+
__metadata("design:type", Number)
|
|
40
|
+
], UserCountPlan.prototype, "totalConnection", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
typeorm_1.Column('integer'),
|
|
43
|
+
__metadata("design:type", Number)
|
|
44
|
+
], UserCountPlan.prototype, "totalChannel", void 0);
|
|
45
|
+
UserCountPlan = __decorate([
|
|
46
|
+
typeorm_1.Entity()
|
|
47
|
+
], UserCountPlan);
|
|
48
|
+
exports.default = UserCountPlan;
|
|
49
|
+
//# sourceMappingURL=UserCountPlan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserCountPlan.js","sourceRoot":"","sources":["../../../../src/entity/modules/subscriptions/UserCountPlan.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,sEAA8C;AAC9C,sDAA8B;AAG9B,qCAOiB;AAGjB,IAAqB,aAAa,GAAlC,MAAqB,aAAc,SAAQ,sBAAY;CAmBtD,CAAA;AAjBC;IADC,gCAAsB,EAAE;;yCACd;AAGX;IADC,0BAAgB,EAAE;8BACR,IAAI;gDAAC;AAIhB;IAFC,kBAAQ,CAAC,GAAG,EAAE,CAAC,cAAI,EAAE,CAAC,IAAU,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IACtE,oBAAU,EAAE;8BACP,cAAI;2CAAC;AAGX;IADC,gBAAM,CAAC,SAAS,CAAC;;+CACD;AAGjB;IADC,gBAAM,CAAC,SAAS,CAAC;;sDACM;AAGxB;IADC,gBAAM,CAAC,SAAS,CAAC;;mDACG;AAlBF,aAAa;IADjC,gBAAM,EAAE;GACY,aAAa,CAmBjC;kBAnBoB,aAAa"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.SubscriptionsV31682475704295 = void 0;
|
|
13
|
+
class SubscriptionsV31682475704295 {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.name = 'SubscriptionsV31682475704295';
|
|
16
|
+
}
|
|
17
|
+
up(queryRunner) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
yield queryRunner.query(`CREATE TABLE \`user_count_plan\` (\`created_at\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), \`updated_at\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), \`id\` int NOT NULL AUTO_INCREMENT, \`deleted_at\` datetime(6) NULL, \`total_sku\` int NOT NULL, \`total_connection\` int NOT NULL, \`total_channel\` int NOT NULL, \`user_id\` int NULL, UNIQUE INDEX \`REL_9a755b2580dbbf81ee392f4c48\` (\`user_id\`), PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
|
|
20
|
+
yield queryRunner.query(`ALTER TABLE \`plan\` ADD \`options\` varchar(255) NULL`);
|
|
21
|
+
yield queryRunner.query(`ALTER TABLE \`user\` ADD \`user_count_plan_id\` int NULL`);
|
|
22
|
+
yield queryRunner.query(`ALTER TABLE \`user\` ADD UNIQUE INDEX \`IDX_6c8d3e69e34f746d1f30e322a6\` (\`user_count_plan_id\`)`);
|
|
23
|
+
yield queryRunner.query(`CREATE UNIQUE INDEX \`REL_6c8d3e69e34f746d1f30e322a6\` ON \`user\` (\`user_count_plan_id\`)`);
|
|
24
|
+
yield queryRunner.query(`ALTER TABLE \`user_count_plan\` ADD CONSTRAINT \`FK_9a755b2580dbbf81ee392f4c48d\` FOREIGN KEY (\`user_id\`) REFERENCES \`user\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
25
|
+
yield queryRunner.query(`ALTER TABLE \`user\` ADD CONSTRAINT \`FK_6c8d3e69e34f746d1f30e322a6e\` FOREIGN KEY (\`user_count_plan_id\`) REFERENCES \`user_count_plan\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
down(queryRunner) {
|
|
29
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
30
|
+
yield queryRunner.query(`ALTER TABLE \`user\` DROP FOREIGN KEY \`FK_6c8d3e69e34f746d1f30e322a6e\``);
|
|
31
|
+
yield queryRunner.query(`ALTER TABLE \`user_count_plan\` DROP FOREIGN KEY \`FK_9a755b2580dbbf81ee392f4c48d\``);
|
|
32
|
+
yield queryRunner.query(`DROP INDEX \`REL_6c8d3e69e34f746d1f30e322a6\` ON \`user\``);
|
|
33
|
+
yield queryRunner.query(`ALTER TABLE \`user\` DROP INDEX \`IDX_6c8d3e69e34f746d1f30e322a6\``);
|
|
34
|
+
yield queryRunner.query(`ALTER TABLE \`user\` DROP COLUMN \`user_count_plan_id\``);
|
|
35
|
+
yield queryRunner.query(`ALTER TABLE \`plan\` DROP COLUMN \`options\``);
|
|
36
|
+
yield queryRunner.query(`DROP INDEX \`REL_9a755b2580dbbf81ee392f4c48\` ON \`user_count_plan\``);
|
|
37
|
+
yield queryRunner.query(`DROP TABLE \`user_count_plan\``);
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.SubscriptionsV31682475704295 = SubscriptionsV31682475704295;
|
|
42
|
+
//# sourceMappingURL=1682475704295-Subscriptions_v3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1682475704295-Subscriptions_v3.js","sourceRoot":"","sources":["../../src/migrations/1682475704295-Subscriptions_v3.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,4BAA4B;IAAzC;QACI,SAAI,GAAG,8BAA8B,CAAA;IAuBzC,CAAC;IArBgB,EAAE,CAAC,WAAwB;;YACpC,MAAM,WAAW,CAAC,KAAK,CAAC,meAAme,CAAC,CAAC;YAC7f,MAAM,WAAW,CAAC,KAAK,CAAC,wDAAwD,CAAC,CAAC;YAClF,MAAM,WAAW,CAAC,KAAK,CAAC,0DAA0D,CAAC,CAAC;YACpF,MAAM,WAAW,CAAC,KAAK,CAAC,mGAAmG,CAAC,CAAC;YAC7H,MAAM,WAAW,CAAC,KAAK,CAAC,6FAA6F,CAAC,CAAC;YACvH,MAAM,WAAW,CAAC,KAAK,CAAC,+KAA+K,CAAC,CAAC;YACzM,MAAM,WAAW,CAAC,KAAK,CAAC,4LAA4L,CAAC,CAAC;QAC1N,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CAAC,0EAA0E,CAAC,CAAC;YACpG,MAAM,WAAW,CAAC,KAAK,CAAC,qFAAqF,CAAC,CAAC;YAC/G,MAAM,WAAW,CAAC,KAAK,CAAC,2DAA2D,CAAC,CAAC;YACrF,MAAM,WAAW,CAAC,KAAK,CAAC,oEAAoE,CAAC,CAAC;YAC9F,MAAM,WAAW,CAAC,KAAK,CAAC,yDAAyD,CAAC,CAAC;YACnF,MAAM,WAAW,CAAC,KAAK,CAAC,8CAA8C,CAAC,CAAC;YACxE,MAAM,WAAW,CAAC,KAAK,CAAC,sEAAsE,CAAC,CAAC;YAChG,MAAM,WAAW,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC;QAC9D,CAAC;KAAA;CAEJ;AAxBD,oEAwBC"}
|
|
@@ -56,7 +56,7 @@ import EnvironmentConfiguration from '../entity/EnvironmentConfiguration';
|
|
|
56
56
|
import { CartItemRepository, CartRepository, CheckoutBillingAddressRepository, CheckoutRepository, CheckoutShippingAddressRepository, PriceDataRepository } from './shopcart';
|
|
57
57
|
import { ProductShippingRepository, ShippingCountryRepository, ShippingRepository } from './shipping';
|
|
58
58
|
import { AuthInfoRepository, AuthMethodRepository, EndpointTemplateEcommerceRepository, ReachuSchemeConfigOrderRepository, ReachuSchemeConfigProductRepository, ReachuSchemeConfigVariantRepository, TemplateEcommerceRepository, TemplateEcommerceSchemeConfigOrderMappedRepository, TemplateEcommerceSchemeConfigOrderRepository, TemplateEcommerceSchemeConfigProductMappedRepository, TemplateEcommerceSchemeConfigProductRepository, TemplateEcommerceSchemeConfigVariantMappedRepository, TemplateEcommerceSchemeConfigVariantRepository, UserTemplateEcommerceRepository } from './templates';
|
|
59
|
-
import { PlanRepository, SubscriptionRepository } from './subscriptions';
|
|
59
|
+
import { PlanRepository, SubscriptionRepository, UserCountPlanRepository } from './subscriptions';
|
|
60
60
|
import { Repository } from 'typeorm';
|
|
61
61
|
export declare class CategoryImagesRepository extends Repository<CategoryImages> {
|
|
62
62
|
}
|
|
@@ -171,4 +171,4 @@ export declare class EnvironmentConfigurationRepository extends Repository<Envir
|
|
|
171
171
|
export { CartItemRepository, CartRepository, CheckoutBillingAddressRepository, CheckoutRepository, CheckoutShippingAddressRepository, PriceDataRepository, };
|
|
172
172
|
export { AuthInfoRepository, AuthMethodRepository, EndpointTemplateEcommerceRepository, ReachuSchemeConfigOrderRepository, ReachuSchemeConfigProductRepository, ReachuSchemeConfigVariantRepository, TemplateEcommerceRepository, TemplateEcommerceSchemeConfigOrderMappedRepository, TemplateEcommerceSchemeConfigOrderRepository, TemplateEcommerceSchemeConfigProductMappedRepository, TemplateEcommerceSchemeConfigProductRepository, TemplateEcommerceSchemeConfigVariantMappedRepository, TemplateEcommerceSchemeConfigVariantRepository, UserTemplateEcommerceRepository, };
|
|
173
173
|
export { ProductShippingRepository, ShippingCountryRepository, ShippingRepository };
|
|
174
|
-
export { PlanRepository, SubscriptionRepository };
|
|
174
|
+
export { PlanRepository, SubscriptionRepository, UserCountPlanRepository };
|
|
@@ -10,7 +10,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.ChannelUserRepository = exports.ChannelGroupRepository = exports.CollectionSharedRepository = exports.CollectionItemRepository = exports.CollectionRepository = exports.PaymentMethodRepository = exports.UserSettingsRepository = exports.UserTokenWoltRepository = exports.WooConnectionRepository = exports.WalletRepository = exports.VariantRepository = exports.UserRoleRepository = exports.UserRepository = exports.SubcategoryRepository = exports.ShopifyConnectionRepository = exports.ShippingPackageRepository = exports.RolePermissionRepository = exports.RoleRepository = exports.RequestRepository = exports.ProductRepository = exports.PermissionRepository = exports.PaymentShopifyRepository = exports.PaymentRepository = exports.OrderTrackingRepository = exports.OrderShippingRepository = exports.OrderItemRepository = exports.OrderRepository = exports.OptionRepository = exports.NotificationRepository = exports.MetricActiveUserRepository = exports.MagentoConnectionRepository = exports.ImportedProductRepository = exports.ImageRepository = exports.FlatRateCountryRepository = exports.FlatRateRepository = exports.CourierRepository = exports.CountryRepository = exports.CheckoutMetadataRepository = exports.ChannelRepository = exports.CategoryRepository = exports.CardRegistrationRepository = exports.BusinessRepository = exports.BankAccountRepository = exports.ApiCredentialRepository = exports.CustomProductImageRepository = exports.CustomProductRepository = exports.CustomVariantRepository = exports.AttributeRepository = exports.ProductAttributeRepository = exports.CategoryImagesRepository = void 0;
|
|
13
|
-
exports.SubscriptionRepository = exports.PlanRepository = exports.ShippingRepository = exports.ShippingCountryRepository = exports.ProductShippingRepository = exports.UserTemplateEcommerceRepository = exports.TemplateEcommerceSchemeConfigVariantRepository = exports.TemplateEcommerceSchemeConfigVariantMappedRepository = exports.TemplateEcommerceSchemeConfigProductRepository = exports.TemplateEcommerceSchemeConfigProductMappedRepository = exports.TemplateEcommerceSchemeConfigOrderRepository = exports.TemplateEcommerceSchemeConfigOrderMappedRepository = exports.TemplateEcommerceRepository = exports.ReachuSchemeConfigVariantRepository = exports.ReachuSchemeConfigProductRepository = exports.ReachuSchemeConfigOrderRepository = exports.EndpointTemplateEcommerceRepository = exports.AuthMethodRepository = exports.AuthInfoRepository = exports.PriceDataRepository = exports.CheckoutShippingAddressRepository = exports.CheckoutRepository = exports.CheckoutBillingAddressRepository = exports.CartRepository = exports.CartItemRepository = exports.EnvironmentConfigurationRepository = exports.ExchangeRateRepository = exports.CurrencyRepository = exports.UserChannelApiKeyRepository = exports.ChannelUserProductSyncRepository = void 0;
|
|
13
|
+
exports.UserCountPlanRepository = exports.SubscriptionRepository = exports.PlanRepository = exports.ShippingRepository = exports.ShippingCountryRepository = exports.ProductShippingRepository = exports.UserTemplateEcommerceRepository = exports.TemplateEcommerceSchemeConfigVariantRepository = exports.TemplateEcommerceSchemeConfigVariantMappedRepository = exports.TemplateEcommerceSchemeConfigProductRepository = exports.TemplateEcommerceSchemeConfigProductMappedRepository = exports.TemplateEcommerceSchemeConfigOrderRepository = exports.TemplateEcommerceSchemeConfigOrderMappedRepository = exports.TemplateEcommerceRepository = exports.ReachuSchemeConfigVariantRepository = exports.ReachuSchemeConfigProductRepository = exports.ReachuSchemeConfigOrderRepository = exports.EndpointTemplateEcommerceRepository = exports.AuthMethodRepository = exports.AuthInfoRepository = exports.PriceDataRepository = exports.CheckoutShippingAddressRepository = exports.CheckoutRepository = exports.CheckoutBillingAddressRepository = exports.CartRepository = exports.CartItemRepository = exports.EnvironmentConfigurationRepository = exports.ExchangeRateRepository = exports.CurrencyRepository = exports.UserChannelApiKeyRepository = exports.ChannelUserProductSyncRepository = void 0;
|
|
14
14
|
const ApiCredential_1 = __importDefault(require("../entity/ApiCredential"));
|
|
15
15
|
const BankAccount_1 = __importDefault(require("../entity/BankAccount"));
|
|
16
16
|
const Business_1 = __importDefault(require("../entity/Business"));
|
|
@@ -95,6 +95,7 @@ Object.defineProperty(exports, "UserTemplateEcommerceRepository", { enumerable:
|
|
|
95
95
|
const subscriptions_1 = require("./subscriptions");
|
|
96
96
|
Object.defineProperty(exports, "PlanRepository", { enumerable: true, get: function () { return subscriptions_1.PlanRepository; } });
|
|
97
97
|
Object.defineProperty(exports, "SubscriptionRepository", { enumerable: true, get: function () { return subscriptions_1.SubscriptionRepository; } });
|
|
98
|
+
Object.defineProperty(exports, "UserCountPlanRepository", { enumerable: true, get: function () { return subscriptions_1.UserCountPlanRepository; } });
|
|
98
99
|
const typeorm_1 = require("typeorm");
|
|
99
100
|
let CategoryImagesRepository = class CategoryImagesRepository extends typeorm_1.Repository {
|
|
100
101
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/repositories/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,4EAAoD;AACpD,wEAAgD;AAChD,kEAA0C;AAC1C,kFAA0D;AAC1D,kEAA0C;AAC1C,gEAAwC;AACxC,kFAA0D;AAC1D,gEAAwC;AACxC,gEAAwC;AACxC,kEAA0C;AAC1C,gFAAwD;AACxD,4DAAoC;AACpC,gFAAwD;AACxD,iFAAuE;AACvE,kFAA0D;AAC1D,0EAAkD;AAClD,8DAAsC;AACtC,4DAAoC;AACpC,oEAA4C;AAC5C,4EAAoD;AACpD,4EAAoD;AACpD,gEAAwC;AACxC,8EAAsD;AACtD,sEAA8C;AAC9C,6DAAmD;AACnD,gEAAwC;AACxC,0DAAkC;AAClC,8EAAsD;AACtD,gFAAwD;AACxD,oFAA4D;AAC5D,wEAAgD;AAChD,0DAAkC;AAClC,kEAA0C;AAC1C,gEAAwC;AACxC,8DAAsC;AACtC,4EAAoD;AACpD,4EAAoD;AACpD,0EAAkD;AAClD,4EAAoD;AACpD,sEAA8C;AAC9C,8EAAsD;AACtD,kFAA0D;AAC1D,0EAAkD;AAClD,wEAAgD;AAChD,8FAAsE;AACtE,oFAA4D;AAC5D,kEAA0C;AAC1C,0EAAkD;AAElD,4EAAoD;AACpD,2DAAwD;AACxD,sFAA8D;AAE9D,oEAA4C;AAC5C,kFAA0D;AAC1D,8EAAsD;AAEtD,kGAA0E;AAE1E,yCAOoB;AAmMlB,mGAzMA,6BAAkB,OAyMA;AAClB,+FAzMA,yBAAc,OAyMA;AACd,iHAzMA,2CAAgC,OAyMA;AAChC,mGAzMA,6BAAkB,OAyMA;AAClB,kHAzMA,4CAAiC,OAyMA;AACjC,oGAzMA,8BAAmB,OAyMA;AAtMrB,yCAIoB;AAsNX,0GAzNP,oCAAyB,OAyNO;AAAE,0GAxNlC,oCAAyB,OAwNkC;AAAE,mGAvN7D,6BAAkB,OAuN6D;AApNjF,2CAeqB;AAqLnB,mGAnMA,8BAAkB,OAmMA;AAClB,qGAnMA,gCAAoB,OAmMA;AACpB,oHAnMA,+CAAmC,OAmMA;AACnC,kHAnMA,6CAAiC,OAmMA;AACjC,oHAnMA,+CAAmC,OAmMA;AACnC,oHAnMA,+CAAmC,OAmMA;AACnC,4GAnMA,uCAA2B,OAmMA;AAC3B,mIAnMA,8DAAkD,OAmMA;AAClD,6HAnMA,wDAA4C,OAmMA;AAC5C,qIAnMA,gEAAoD,OAmMA;AACpD,+HAnMA,0DAA8C,OAmMA;AAC9C,qIAnMA,gEAAoD,OAmMA;AACpD,+HAnMA,0DAA8C,OAmMA;AAC9C,gHAnMA,2CAA+B,OAmMA;AAhMjC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/repositories/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,4EAAoD;AACpD,wEAAgD;AAChD,kEAA0C;AAC1C,kFAA0D;AAC1D,kEAA0C;AAC1C,gEAAwC;AACxC,kFAA0D;AAC1D,gEAAwC;AACxC,gEAAwC;AACxC,kEAA0C;AAC1C,gFAAwD;AACxD,4DAAoC;AACpC,gFAAwD;AACxD,iFAAuE;AACvE,kFAA0D;AAC1D,0EAAkD;AAClD,8DAAsC;AACtC,4DAAoC;AACpC,oEAA4C;AAC5C,4EAAoD;AACpD,4EAAoD;AACpD,gEAAwC;AACxC,8EAAsD;AACtD,sEAA8C;AAC9C,6DAAmD;AACnD,gEAAwC;AACxC,0DAAkC;AAClC,8EAAsD;AACtD,gFAAwD;AACxD,oFAA4D;AAC5D,wEAAgD;AAChD,0DAAkC;AAClC,kEAA0C;AAC1C,gEAAwC;AACxC,8DAAsC;AACtC,4EAAoD;AACpD,4EAAoD;AACpD,0EAAkD;AAClD,4EAAoD;AACpD,sEAA8C;AAC9C,8EAAsD;AACtD,kFAA0D;AAC1D,0EAAkD;AAClD,wEAAgD;AAChD,8FAAsE;AACtE,oFAA4D;AAC5D,kEAA0C;AAC1C,0E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,sBAAsB,CAAoC;AAA1D,wDAAsB;AAGnC,IAAa,qBAAqB,GAAlC,MAAa,qBAAsB,SAAQ,oBAAuB;CAAG,CAAA;AAAxD,qBAAqB;IADjC,0BAAgB,CAAC,qBAAW,CAAC;GACjB,qBAAqB,CAAmC;AAAxD,sDAAqB;AAGlC,IAAa,gCAAgC,GAA7C,MAAa,gCAAiC,SAAQ,oBAAkC;CAAG,CAAA;AAA9E,gCAAgC;IAD5C,0BAAgB,CAAC,gCAAsB,CAAC;GAC5B,gCAAgC,CAA8C;AAA9E,4EAAgC;AAG7C,IAAa,2BAA2B,GAAxC,MAAa,2BAA4B,SAAQ,oBAA6B;CAAG,CAAA;AAApE,2BAA2B;IADvC,0BAAgB,CAAC,2BAAiB,CAAC;GACvB,2BAA2B,CAAyC;AAApE,kEAA2B;AAGxC,IAAa,kBAAkB,GAA/B,MAAa,kBAAmB,SAAQ,oBAAoB;CAAG,CAAA;AAAlD,kBAAkB;IAD9B,0BAAgB,CAAC,kBAAQ,CAAC;GACd,kBAAkB,CAAgC;AAAlD,gDAAkB;AAG/B,IAAa,sBAAsB,GAAnC,MAAa,sBAAuB,SAAQ,oBAAwB;CAAG,CAAA;AAA1D,sBAAsB;IADlC,0BAAgB,CAAC,sBAAY,CAAC;GAClB,sBAAsB,CAAoC;AAA1D,wDAAsB;AAGnC,IAAa,kCAAkC,GAA/C,MAAa,kCAAmC,SAAQ,oBAAoC;CAAG,CAAA;AAAlF,kCAAkC;IAD9C,0BAAgB,CAAC,kCAAwB,CAAC;GAC9B,kCAAkC,CAAgD;AAAlF,gFAAkC"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { Repository } from 'typeorm';
|
|
2
2
|
import Plan from '../../entity/modules/subscriptions/Plan';
|
|
3
3
|
import Subscription from '../../entity/modules/subscriptions/Subscription';
|
|
4
|
+
import UserCountPlan from '../../entity/modules/subscriptions/UserCountPlan';
|
|
4
5
|
export declare class PlanRepository extends Repository<Plan> {
|
|
5
6
|
}
|
|
6
7
|
export declare class SubscriptionRepository extends Repository<Subscription> {
|
|
7
8
|
}
|
|
9
|
+
export declare class UserCountPlanRepository extends Repository<UserCountPlan> {
|
|
10
|
+
}
|
|
@@ -9,10 +9,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
9
9
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.SubscriptionRepository = exports.PlanRepository = void 0;
|
|
12
|
+
exports.UserCountPlanRepository = exports.SubscriptionRepository = exports.PlanRepository = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const Plan_1 = __importDefault(require("../../entity/modules/subscriptions/Plan"));
|
|
15
15
|
const Subscription_1 = __importDefault(require("../../entity/modules/subscriptions/Subscription"));
|
|
16
|
+
const UserCountPlan_1 = __importDefault(require("../../entity/modules/subscriptions/UserCountPlan"));
|
|
16
17
|
let PlanRepository = class PlanRepository extends typeorm_1.Repository {
|
|
17
18
|
};
|
|
18
19
|
PlanRepository = __decorate([
|
|
@@ -25,4 +26,10 @@ SubscriptionRepository = __decorate([
|
|
|
25
26
|
typeorm_1.EntityRepository(Subscription_1.default)
|
|
26
27
|
], SubscriptionRepository);
|
|
27
28
|
exports.SubscriptionRepository = SubscriptionRepository;
|
|
29
|
+
let UserCountPlanRepository = class UserCountPlanRepository extends typeorm_1.Repository {
|
|
30
|
+
};
|
|
31
|
+
UserCountPlanRepository = __decorate([
|
|
32
|
+
typeorm_1.EntityRepository(UserCountPlan_1.default)
|
|
33
|
+
], UserCountPlanRepository);
|
|
34
|
+
exports.UserCountPlanRepository = UserCountPlanRepository;
|
|
28
35
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/repositories/subscriptions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAuD;AACvD,mFAA2D;AAC3D,mGAA2E;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/repositories/subscriptions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAuD;AACvD,mFAA2D;AAC3D,mGAA2E;AAC3E,qGAA6E;AAG7E,IAAa,cAAc,GAA3B,MAAa,cAAe,SAAQ,oBAAgB;CAAG,CAAA;AAA1C,cAAc;IAD1B,0BAAgB,CAAC,cAAI,CAAC;GACV,cAAc,CAA4B;AAA1C,wCAAc;AAG3B,IAAa,sBAAsB,GAAnC,MAAa,sBAAuB,SAAQ,oBAAwB;CAAG,CAAA;AAA1D,sBAAsB;IADlC,0BAAgB,CAAC,sBAAY,CAAC;GAClB,sBAAsB,CAAoC;AAA1D,wDAAsB;AAGnC,IAAa,uBAAuB,GAApC,MAAa,uBAAwB,SAAQ,oBAAyB;CAAG,CAAA;AAA5D,uBAAuB;IADnC,0BAAgB,CAAC,uBAAa,CAAC;GACnB,uBAAuB,CAAqC;AAA5D,0DAAuB"}
|
|
@@ -2552,8 +2552,8 @@
|
|
|
2552
2552
|
"affectsGlobalScope": false
|
|
2553
2553
|
},
|
|
2554
2554
|
"../src/entity/modules/subscriptions/plan.ts": {
|
|
2555
|
-
"version": "
|
|
2556
|
-
"signature": "
|
|
2555
|
+
"version": "065f3188526fe4c7f7537d3d6f2bd5a08bf5f4fb6956f26ff4285e8f05005c95",
|
|
2556
|
+
"signature": "243c69dc0603af127fd61d668fbf1da2bb361f022b59bb4b15060a1f35b2401e",
|
|
2557
2557
|
"affectsGlobalScope": false
|
|
2558
2558
|
},
|
|
2559
2559
|
"../src/entity/modules/subscriptions/subscription.ts": {
|
|
@@ -2561,9 +2561,14 @@
|
|
|
2561
2561
|
"signature": "cdab4b6c9e16417c6f6ef01b8e0181b35913219d9fa2afafd7e7c700e083ed74",
|
|
2562
2562
|
"affectsGlobalScope": false
|
|
2563
2563
|
},
|
|
2564
|
+
"../src/entity/modules/subscriptions/usercountplan.ts": {
|
|
2565
|
+
"version": "6c24bc2e675fecf27454e84d8f17081a6012405952930657d5124c7fadbfa081",
|
|
2566
|
+
"signature": "05141f7dc7b1f23d868721b5ba76820adba98ba9b807a0bce05281d5d5383553",
|
|
2567
|
+
"affectsGlobalScope": false
|
|
2568
|
+
},
|
|
2564
2569
|
"../src/entity/user.ts": {
|
|
2565
|
-
"version": "
|
|
2566
|
-
"signature": "
|
|
2570
|
+
"version": "9448f87a4ae2146bffd7b64f9a2a7918980a2f75f6852d56ed80370cdb837a36",
|
|
2571
|
+
"signature": "50268c140454fac353eb73681563986faad0c589cf83eeaa0c73d94efaabbe0d",
|
|
2567
2572
|
"affectsGlobalScope": false
|
|
2568
2573
|
},
|
|
2569
2574
|
"../src/entity/apicredential.ts": {
|
|
@@ -2707,8 +2712,8 @@
|
|
|
2707
2712
|
"affectsGlobalScope": false
|
|
2708
2713
|
},
|
|
2709
2714
|
"../src/entity/index.ts": {
|
|
2710
|
-
"version": "
|
|
2711
|
-
"signature": "
|
|
2715
|
+
"version": "ae58f439e6ef549ad065bbce164ccb01eb91fa9c7e79091d12be255956584768",
|
|
2716
|
+
"signature": "b130e538a758a1b83564c702bc2066fc612679956ff283e6c5fd4c868b1ae1d6",
|
|
2712
2717
|
"affectsGlobalScope": false
|
|
2713
2718
|
},
|
|
2714
2719
|
"../src/staticdata/productorigin.ts": {
|
|
@@ -2782,13 +2787,13 @@
|
|
|
2782
2787
|
"affectsGlobalScope": false
|
|
2783
2788
|
},
|
|
2784
2789
|
"../src/repositories/subscriptions/index.ts": {
|
|
2785
|
-
"version": "
|
|
2786
|
-
"signature": "
|
|
2790
|
+
"version": "fb2ce5c6b06b7b03e85f2a7db2ae88ff95b4e059cfc31d802923b58167e0e639",
|
|
2791
|
+
"signature": "e0c202c6c131a21df335201bfa7a25de1add8ab54c53ee665be989600c5f2222",
|
|
2787
2792
|
"affectsGlobalScope": false
|
|
2788
2793
|
},
|
|
2789
2794
|
"../src/repositories/index.ts": {
|
|
2790
|
-
"version": "
|
|
2791
|
-
"signature": "
|
|
2795
|
+
"version": "c2e1c9ec3bde4dd103ce1e6f2c348540e8ce93e3bc3ccec9471030305ab2c653",
|
|
2796
|
+
"signature": "92402c13fc4c4c4cd566eab58874543819206f0f8820d26fec761be1d363b041",
|
|
2792
2797
|
"affectsGlobalScope": false
|
|
2793
2798
|
},
|
|
2794
2799
|
"../src/subscribers/productsubscriber.ts": {
|
|
@@ -3176,6 +3181,11 @@
|
|
|
3176
3181
|
"signature": "556984f615533477aa11bfd2d7baea697ecbb0f914f782aa60eeb23247ceb4a9",
|
|
3177
3182
|
"affectsGlobalScope": false
|
|
3178
3183
|
},
|
|
3184
|
+
"../src/migrations/1682475704295-subscriptions_v3.ts": {
|
|
3185
|
+
"version": "98ffee309f1e464dfb138d26717385647149dde41385c4dbd5f14c70a9672808",
|
|
3186
|
+
"signature": "65e61ec85f9337c37d059ba9be7548d5bd5aad6b451cae48742d77293b2bb963",
|
|
3187
|
+
"affectsGlobalScope": false
|
|
3188
|
+
},
|
|
3179
3189
|
"../src/migrations/execute/index.ts": {
|
|
3180
3190
|
"version": "8b5bf13d095aeb57afd593adf3d799681176a13c327e2f77e0028e178c4ee3b9",
|
|
3181
3191
|
"signature": "8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881",
|
|
@@ -3202,8 +3212,8 @@
|
|
|
3202
3212
|
"affectsGlobalScope": false
|
|
3203
3213
|
},
|
|
3204
3214
|
"../node_modules/@types/babel__traverse/index.d.ts": {
|
|
3205
|
-
"version": "
|
|
3206
|
-
"signature": "
|
|
3215
|
+
"version": "1295d3424f392c0d866521eb32fbd26d70849ad11b469e27376f13a831343751",
|
|
3216
|
+
"signature": "1295d3424f392c0d866521eb32fbd26d70849ad11b469e27376f13a831343751",
|
|
3207
3217
|
"affectsGlobalScope": false
|
|
3208
3218
|
},
|
|
3209
3219
|
"../node_modules/@types/babel__core/index.d.ts": {
|
|
@@ -5327,6 +5337,7 @@
|
|
|
5327
5337
|
"../src/entity/modules/shopcart/pricedata.ts",
|
|
5328
5338
|
"../src/entity/modules/subscriptions/plan.ts",
|
|
5329
5339
|
"../src/entity/modules/subscriptions/subscription.ts",
|
|
5340
|
+
"../src/entity/modules/subscriptions/usercountplan.ts",
|
|
5330
5341
|
"../src/entity/modules/templates/authinfo.ts",
|
|
5331
5342
|
"../src/entity/modules/templates/authmethod.ts",
|
|
5332
5343
|
"../src/entity/modules/templates/endpointtemplateecommerce.ts",
|
|
@@ -5443,6 +5454,12 @@
|
|
|
5443
5454
|
"../src/entity/modules/subscriptions/plan.ts",
|
|
5444
5455
|
"../src/entity/user.ts"
|
|
5445
5456
|
],
|
|
5457
|
+
"../src/entity/modules/subscriptions/usercountplan.ts": [
|
|
5458
|
+
"../node_modules/typeorm/index.d.ts",
|
|
5459
|
+
"../src/entity/auditedmodel.ts",
|
|
5460
|
+
"../src/entity/modules/subscriptions/plan.ts",
|
|
5461
|
+
"../src/entity/user.ts"
|
|
5462
|
+
],
|
|
5446
5463
|
"../src/entity/modules/templates/authinfo.ts": [
|
|
5447
5464
|
"../node_modules/typeorm/index.d.ts",
|
|
5448
5465
|
"../src/entity/auditedmodel.ts",
|
|
@@ -5669,6 +5686,7 @@
|
|
|
5669
5686
|
"../src/entity/magentoconnection.entity.ts",
|
|
5670
5687
|
"../src/entity/modules/shipping/shipping.ts",
|
|
5671
5688
|
"../src/entity/modules/subscriptions/subscription.ts",
|
|
5689
|
+
"../src/entity/modules/subscriptions/usercountplan.ts",
|
|
5672
5690
|
"../src/entity/shippingpackage.ts",
|
|
5673
5691
|
"../src/entity/shopifyconnection.ts",
|
|
5674
5692
|
"../src/entity/userrole.ts",
|
|
@@ -5930,6 +5948,9 @@
|
|
|
5930
5948
|
"../src/migrations/1681967226231-subscriptions_v2.ts": [
|
|
5931
5949
|
"../node_modules/typeorm/index.d.ts"
|
|
5932
5950
|
],
|
|
5951
|
+
"../src/migrations/1682475704295-subscriptions_v3.ts": [
|
|
5952
|
+
"../node_modules/typeorm/index.d.ts"
|
|
5953
|
+
],
|
|
5933
5954
|
"../src/migrations/execute/index.ts": [
|
|
5934
5955
|
"../src/config/connect.ts"
|
|
5935
5956
|
],
|
|
@@ -6025,7 +6046,8 @@
|
|
|
6025
6046
|
"../src/repositories/subscriptions/index.ts": [
|
|
6026
6047
|
"../node_modules/typeorm/index.d.ts",
|
|
6027
6048
|
"../src/entity/modules/subscriptions/plan.ts",
|
|
6028
|
-
"../src/entity/modules/subscriptions/subscription.ts"
|
|
6049
|
+
"../src/entity/modules/subscriptions/subscription.ts",
|
|
6050
|
+
"../src/entity/modules/subscriptions/usercountplan.ts"
|
|
6029
6051
|
],
|
|
6030
6052
|
"../src/repositories/templates/index.ts": [
|
|
6031
6053
|
"../node_modules/typeorm/index.d.ts",
|
|
@@ -8026,6 +8048,7 @@
|
|
|
8026
8048
|
"../src/entity/modules/shopcart/pricedata.ts",
|
|
8027
8049
|
"../src/entity/modules/subscriptions/plan.ts",
|
|
8028
8050
|
"../src/entity/modules/subscriptions/subscription.ts",
|
|
8051
|
+
"../src/entity/modules/subscriptions/usercountplan.ts",
|
|
8029
8052
|
"../src/entity/modules/templates/authinfo.ts",
|
|
8030
8053
|
"../src/entity/modules/templates/authmethod.ts",
|
|
8031
8054
|
"../src/entity/modules/templates/endpointtemplateecommerce.ts",
|
|
@@ -8127,6 +8150,10 @@
|
|
|
8127
8150
|
"../src/entity/modules/subscriptions/plan.ts",
|
|
8128
8151
|
"../src/entity/user.ts"
|
|
8129
8152
|
],
|
|
8153
|
+
"../src/entity/modules/subscriptions/usercountplan.ts": [
|
|
8154
|
+
"../src/entity/auditedmodel.ts",
|
|
8155
|
+
"../src/entity/user.ts"
|
|
8156
|
+
],
|
|
8130
8157
|
"../src/entity/modules/templates/authinfo.ts": [
|
|
8131
8158
|
"../src/entity/auditedmodel.ts",
|
|
8132
8159
|
"../src/entity/modules/templates/usertemplateecommerce.ts"
|
|
@@ -8303,6 +8330,7 @@
|
|
|
8303
8330
|
"../src/entity/magentoconnection.entity.ts",
|
|
8304
8331
|
"../src/entity/modules/shipping/shipping.ts",
|
|
8305
8332
|
"../src/entity/modules/subscriptions/subscription.ts",
|
|
8333
|
+
"../src/entity/modules/subscriptions/usercountplan.ts",
|
|
8306
8334
|
"../src/entity/shippingpackage.ts",
|
|
8307
8335
|
"../src/entity/shopifyconnection.ts",
|
|
8308
8336
|
"../src/entity/userrole.ts",
|
|
@@ -8540,6 +8568,9 @@
|
|
|
8540
8568
|
"../src/migrations/1681967226231-subscriptions_v2.ts": [
|
|
8541
8569
|
"../node_modules/typeorm/index.d.ts"
|
|
8542
8570
|
],
|
|
8571
|
+
"../src/migrations/1682475704295-subscriptions_v3.ts": [
|
|
8572
|
+
"../node_modules/typeorm/index.d.ts"
|
|
8573
|
+
],
|
|
8543
8574
|
"../src/migrations/index.ts": [
|
|
8544
8575
|
"../src/migrations/1628474597284-initialschema.ts",
|
|
8545
8576
|
"../src/migrations/1630077596132-removemangopay.ts",
|
|
@@ -8632,7 +8663,8 @@
|
|
|
8632
8663
|
"../src/repositories/subscriptions/index.ts": [
|
|
8633
8664
|
"../node_modules/typeorm/index.d.ts",
|
|
8634
8665
|
"../src/entity/modules/subscriptions/plan.ts",
|
|
8635
|
-
"../src/entity/modules/subscriptions/subscription.ts"
|
|
8666
|
+
"../src/entity/modules/subscriptions/subscription.ts",
|
|
8667
|
+
"../src/entity/modules/subscriptions/usercountplan.ts"
|
|
8636
8668
|
],
|
|
8637
8669
|
"../src/repositories/templates/index.ts": [
|
|
8638
8670
|
"../node_modules/typeorm/index.d.ts",
|
|
@@ -8708,7 +8740,287 @@
|
|
|
8708
8740
|
"../node_modules/@types/babel__core/index.d.ts",
|
|
8709
8741
|
"../node_modules/@types/babel__generator/index.d.ts",
|
|
8710
8742
|
"../node_modules/@types/babel__template/index.d.ts",
|
|
8711
|
-
|
|
8743
|
+
[
|
|
8744
|
+
"../node_modules/@types/babel__traverse/index.d.ts",
|
|
8745
|
+
[
|
|
8746
|
+
{
|
|
8747
|
+
"file": "../node_modules/@types/babel__traverse/index.d.ts",
|
|
8748
|
+
"start": 9555,
|
|
8749
|
+
"length": 11,
|
|
8750
|
+
"code": 2677,
|
|
8751
|
+
"category": 1,
|
|
8752
|
+
"messageText": {
|
|
8753
|
+
"messageText": "A type predicate's type must be assignable to its parameter's type.",
|
|
8754
|
+
"category": 1,
|
|
8755
|
+
"code": 2677,
|
|
8756
|
+
"next": [
|
|
8757
|
+
{
|
|
8758
|
+
"messageText": "Type 'NodePath<T>' is not assignable to type 'NodePath<Node>'.",
|
|
8759
|
+
"category": 1,
|
|
8760
|
+
"code": 2322,
|
|
8761
|
+
"next": [
|
|
8762
|
+
{
|
|
8763
|
+
"messageText": "Types of property 'hasNode' are incompatible.",
|
|
8764
|
+
"category": 1,
|
|
8765
|
+
"code": 2326,
|
|
8766
|
+
"next": [
|
|
8767
|
+
{
|
|
8768
|
+
"messageText": "Type '() => this is NodePath<NonNullable<T>>' is not assignable to type '() => this is NodePath<Node>'.",
|
|
8769
|
+
"category": 1,
|
|
8770
|
+
"code": 2322,
|
|
8771
|
+
"next": [
|
|
8772
|
+
{
|
|
8773
|
+
"messageText": "Type predicate 'this is NodePath<NonNullable<T>>' is not assignable to 'this is NodePath<Node>'.",
|
|
8774
|
+
"category": 1,
|
|
8775
|
+
"code": 1226,
|
|
8776
|
+
"next": [
|
|
8777
|
+
{
|
|
8778
|
+
"messageText": "Type 'NodePath<NonNullable<T>>' is not assignable to type 'NodePath<Node>'.",
|
|
8779
|
+
"category": 1,
|
|
8780
|
+
"code": 2322,
|
|
8781
|
+
"next": [
|
|
8782
|
+
{
|
|
8783
|
+
"messageText": "Types of property 'hasNode' are incompatible.",
|
|
8784
|
+
"category": 1,
|
|
8785
|
+
"code": 2326,
|
|
8786
|
+
"next": [
|
|
8787
|
+
{
|
|
8788
|
+
"messageText": "Type '() => this is NodePath<NonNullable<NonNullable<T>>>' is not assignable to type '() => this is NodePath<Node>'.",
|
|
8789
|
+
"category": 1,
|
|
8790
|
+
"code": 2322,
|
|
8791
|
+
"next": [
|
|
8792
|
+
{
|
|
8793
|
+
"messageText": "Type predicate 'this is NodePath<NonNullable<NonNullable<T>>>' is not assignable to 'this is NodePath<Node>'.",
|
|
8794
|
+
"category": 1,
|
|
8795
|
+
"code": 1226,
|
|
8796
|
+
"next": [
|
|
8797
|
+
{
|
|
8798
|
+
"messageText": "Type 'NodePath<NonNullable<NonNullable<T>>>' is not assignable to type 'NodePath<Node>'.",
|
|
8799
|
+
"category": 1,
|
|
8800
|
+
"code": 2322,
|
|
8801
|
+
"next": [
|
|
8802
|
+
{
|
|
8803
|
+
"messageText": "Types of property 'hasNode' are incompatible.",
|
|
8804
|
+
"category": 1,
|
|
8805
|
+
"code": 2326,
|
|
8806
|
+
"next": [
|
|
8807
|
+
{
|
|
8808
|
+
"messageText": "Type '() => this is NodePath<NonNullable<NonNullable<NonNullable<T>>>>' is not assignable to type '() => this is NodePath<Node>'.",
|
|
8809
|
+
"category": 1,
|
|
8810
|
+
"code": 2322,
|
|
8811
|
+
"next": [
|
|
8812
|
+
{
|
|
8813
|
+
"messageText": "Type predicate 'this is NodePath<NonNullable<NonNullable<NonNullable<T>>>>' is not assignable to 'this is NodePath<Node>'.",
|
|
8814
|
+
"category": 1,
|
|
8815
|
+
"code": 1226,
|
|
8816
|
+
"next": [
|
|
8817
|
+
{
|
|
8818
|
+
"messageText": "Type 'NodePath<NonNullable<NonNullable<NonNullable<T>>>>' is not assignable to type 'NodePath<Node>'.",
|
|
8819
|
+
"category": 1,
|
|
8820
|
+
"code": 2322,
|
|
8821
|
+
"next": [
|
|
8822
|
+
{
|
|
8823
|
+
"messageText": "Types of property 'unshiftContainer' are incompatible.",
|
|
8824
|
+
"category": 1,
|
|
8825
|
+
"code": 2326,
|
|
8826
|
+
"next": [
|
|
8827
|
+
{
|
|
8828
|
+
"messageText": "Type '<Nodes extends AnyTypeAnnotation | ArgumentPlaceholder | ArrayExpression | ArrayPattern | ArrayTypeAnnotation | ... 248 more ... | readonly Node[]>(listKey: keyof { [P in keyof NonNullable<...> as NonNullable<...>[P] extends any[] ? P : never]: P; }, nodes: Nodes) => NodePaths<...>' is not assignable to type '<Nodes extends AnyTypeAnnotation | ArgumentPlaceholder | ArrayExpression | ArrayPattern | ArrayTypeAnnotation | ... 248 more ... | readonly Node[]>(listKey: \"leadingComments\" | ... 2 more ... | \"range\", nodes: Nodes) => NodePaths<...>'.",
|
|
8829
|
+
"category": 1,
|
|
8830
|
+
"code": 2322,
|
|
8831
|
+
"next": [
|
|
8832
|
+
{
|
|
8833
|
+
"messageText": "Types of parameters 'listKey' and 'listKey' are incompatible.",
|
|
8834
|
+
"category": 1,
|
|
8835
|
+
"code": 2328,
|
|
8836
|
+
"next": [
|
|
8837
|
+
{
|
|
8838
|
+
"messageText": "Type 'string' is not assignable to type 'keyof { [P in keyof NonNullable<NonNullable<NonNullable<T>>> as NonNullable<NonNullable<NonNullable<T>>>[P] extends any[] ? P : never]: P; }'.",
|
|
8839
|
+
"category": 1,
|
|
8840
|
+
"code": 2322,
|
|
8841
|
+
"next": [
|
|
8842
|
+
{
|
|
8843
|
+
"messageText": "Type 'string' is not assignable to type 'keyof { [P in keyof NonNullable<NonNullable<NonNullable<T>>> as NonNullable<NonNullable<NonNullable<T>>>[P] extends any[] ? P : never]: P; }'.",
|
|
8844
|
+
"category": 1,
|
|
8845
|
+
"code": 2322
|
|
8846
|
+
}
|
|
8847
|
+
]
|
|
8848
|
+
}
|
|
8849
|
+
]
|
|
8850
|
+
}
|
|
8851
|
+
]
|
|
8852
|
+
}
|
|
8853
|
+
]
|
|
8854
|
+
}
|
|
8855
|
+
]
|
|
8856
|
+
}
|
|
8857
|
+
]
|
|
8858
|
+
}
|
|
8859
|
+
]
|
|
8860
|
+
}
|
|
8861
|
+
]
|
|
8862
|
+
}
|
|
8863
|
+
]
|
|
8864
|
+
}
|
|
8865
|
+
]
|
|
8866
|
+
}
|
|
8867
|
+
]
|
|
8868
|
+
}
|
|
8869
|
+
]
|
|
8870
|
+
}
|
|
8871
|
+
]
|
|
8872
|
+
}
|
|
8873
|
+
]
|
|
8874
|
+
}
|
|
8875
|
+
]
|
|
8876
|
+
}
|
|
8877
|
+
]
|
|
8878
|
+
}
|
|
8879
|
+
]
|
|
8880
|
+
}
|
|
8881
|
+
]
|
|
8882
|
+
}
|
|
8883
|
+
},
|
|
8884
|
+
{
|
|
8885
|
+
"file": "../node_modules/@types/babel__traverse/index.d.ts",
|
|
8886
|
+
"start": 9966,
|
|
8887
|
+
"length": 11,
|
|
8888
|
+
"code": 2677,
|
|
8889
|
+
"category": 1,
|
|
8890
|
+
"messageText": {
|
|
8891
|
+
"messageText": "A type predicate's type must be assignable to its parameter's type.",
|
|
8892
|
+
"category": 1,
|
|
8893
|
+
"code": 2677,
|
|
8894
|
+
"next": [
|
|
8895
|
+
{
|
|
8896
|
+
"messageText": "Type 'NodePath<T>' is not assignable to type 'NodePath<Node>'.",
|
|
8897
|
+
"category": 1,
|
|
8898
|
+
"code": 2322,
|
|
8899
|
+
"next": [
|
|
8900
|
+
{
|
|
8901
|
+
"messageText": "Types of property 'hasNode' are incompatible.",
|
|
8902
|
+
"category": 1,
|
|
8903
|
+
"code": 2326,
|
|
8904
|
+
"next": [
|
|
8905
|
+
{
|
|
8906
|
+
"messageText": "Type '() => this is NodePath<NonNullable<T>>' is not assignable to type '() => this is NodePath<Node>'.",
|
|
8907
|
+
"category": 1,
|
|
8908
|
+
"code": 2322,
|
|
8909
|
+
"next": [
|
|
8910
|
+
{
|
|
8911
|
+
"messageText": "Type predicate 'this is NodePath<NonNullable<T>>' is not assignable to 'this is NodePath<Node>'.",
|
|
8912
|
+
"category": 1,
|
|
8913
|
+
"code": 1226,
|
|
8914
|
+
"next": [
|
|
8915
|
+
{
|
|
8916
|
+
"messageText": "Type 'NodePath<NonNullable<T>>' is not assignable to type 'NodePath<Node>'.",
|
|
8917
|
+
"category": 1,
|
|
8918
|
+
"code": 2322,
|
|
8919
|
+
"next": [
|
|
8920
|
+
{
|
|
8921
|
+
"messageText": "Types of property 'hasNode' are incompatible.",
|
|
8922
|
+
"category": 1,
|
|
8923
|
+
"code": 2326,
|
|
8924
|
+
"next": [
|
|
8925
|
+
{
|
|
8926
|
+
"messageText": "Type '() => this is NodePath<NonNullable<NonNullable<T>>>' is not assignable to type '() => this is NodePath<Node>'.",
|
|
8927
|
+
"category": 1,
|
|
8928
|
+
"code": 2322,
|
|
8929
|
+
"next": [
|
|
8930
|
+
{
|
|
8931
|
+
"messageText": "Type predicate 'this is NodePath<NonNullable<NonNullable<T>>>' is not assignable to 'this is NodePath<Node>'.",
|
|
8932
|
+
"category": 1,
|
|
8933
|
+
"code": 1226,
|
|
8934
|
+
"next": [
|
|
8935
|
+
{
|
|
8936
|
+
"messageText": "Type 'NodePath<NonNullable<NonNullable<T>>>' is not assignable to type 'NodePath<Node>'.",
|
|
8937
|
+
"category": 1,
|
|
8938
|
+
"code": 2322,
|
|
8939
|
+
"next": [
|
|
8940
|
+
{
|
|
8941
|
+
"messageText": "Types of property 'hasNode' are incompatible.",
|
|
8942
|
+
"category": 1,
|
|
8943
|
+
"code": 2326,
|
|
8944
|
+
"next": [
|
|
8945
|
+
{
|
|
8946
|
+
"messageText": "Type '() => this is NodePath<NonNullable<NonNullable<NonNullable<T>>>>' is not assignable to type '() => this is NodePath<Node>'.",
|
|
8947
|
+
"category": 1,
|
|
8948
|
+
"code": 2322,
|
|
8949
|
+
"next": [
|
|
8950
|
+
{
|
|
8951
|
+
"messageText": "Type predicate 'this is NodePath<NonNullable<NonNullable<NonNullable<T>>>>' is not assignable to 'this is NodePath<Node>'.",
|
|
8952
|
+
"category": 1,
|
|
8953
|
+
"code": 1226,
|
|
8954
|
+
"next": [
|
|
8955
|
+
{
|
|
8956
|
+
"messageText": "Type 'NodePath<NonNullable<NonNullable<NonNullable<T>>>>' is not assignable to type 'NodePath<Node>'.",
|
|
8957
|
+
"category": 1,
|
|
8958
|
+
"code": 2322,
|
|
8959
|
+
"next": [
|
|
8960
|
+
{
|
|
8961
|
+
"messageText": "Types of property 'unshiftContainer' are incompatible.",
|
|
8962
|
+
"category": 1,
|
|
8963
|
+
"code": 2326,
|
|
8964
|
+
"next": [
|
|
8965
|
+
{
|
|
8966
|
+
"messageText": "Type '<Nodes extends AnyTypeAnnotation | ArgumentPlaceholder | ArrayExpression | ArrayPattern | ArrayTypeAnnotation | ... 248 more ... | readonly Node[]>(listKey: keyof { [P in keyof NonNullable<...> as NonNullable<...>[P] extends any[] ? P : never]: P; }, nodes: Nodes) => NodePaths<...>' is not assignable to type '<Nodes extends AnyTypeAnnotation | ArgumentPlaceholder | ArrayExpression | ArrayPattern | ArrayTypeAnnotation | ... 248 more ... | readonly Node[]>(listKey: \"leadingComments\" | ... 2 more ... | \"range\", nodes: Nodes) => NodePaths<...>'.",
|
|
8967
|
+
"category": 1,
|
|
8968
|
+
"code": 2322,
|
|
8969
|
+
"next": [
|
|
8970
|
+
{
|
|
8971
|
+
"messageText": "Types of parameters 'listKey' and 'listKey' are incompatible.",
|
|
8972
|
+
"category": 1,
|
|
8973
|
+
"code": 2328,
|
|
8974
|
+
"next": [
|
|
8975
|
+
{
|
|
8976
|
+
"messageText": "Type 'string' is not assignable to type 'keyof { [P in keyof NonNullable<NonNullable<NonNullable<T>>> as NonNullable<NonNullable<NonNullable<T>>>[P] extends any[] ? P : never]: P; }'.",
|
|
8977
|
+
"category": 1,
|
|
8978
|
+
"code": 2322,
|
|
8979
|
+
"next": [
|
|
8980
|
+
{
|
|
8981
|
+
"messageText": "Type 'string' is not assignable to type 'keyof { [P in keyof NonNullable<NonNullable<NonNullable<T>>> as NonNullable<NonNullable<NonNullable<T>>>[P] extends any[] ? P : never]: P; }'.",
|
|
8982
|
+
"category": 1,
|
|
8983
|
+
"code": 2322
|
|
8984
|
+
}
|
|
8985
|
+
]
|
|
8986
|
+
}
|
|
8987
|
+
]
|
|
8988
|
+
}
|
|
8989
|
+
]
|
|
8990
|
+
}
|
|
8991
|
+
]
|
|
8992
|
+
}
|
|
8993
|
+
]
|
|
8994
|
+
}
|
|
8995
|
+
]
|
|
8996
|
+
}
|
|
8997
|
+
]
|
|
8998
|
+
}
|
|
8999
|
+
]
|
|
9000
|
+
}
|
|
9001
|
+
]
|
|
9002
|
+
}
|
|
9003
|
+
]
|
|
9004
|
+
}
|
|
9005
|
+
]
|
|
9006
|
+
}
|
|
9007
|
+
]
|
|
9008
|
+
}
|
|
9009
|
+
]
|
|
9010
|
+
}
|
|
9011
|
+
]
|
|
9012
|
+
}
|
|
9013
|
+
]
|
|
9014
|
+
}
|
|
9015
|
+
]
|
|
9016
|
+
}
|
|
9017
|
+
]
|
|
9018
|
+
}
|
|
9019
|
+
]
|
|
9020
|
+
}
|
|
9021
|
+
}
|
|
9022
|
+
]
|
|
9023
|
+
],
|
|
8712
9024
|
"../node_modules/@types/body-parser/index.d.ts",
|
|
8713
9025
|
"../node_modules/@types/connect/index.d.ts",
|
|
8714
9026
|
"../node_modules/@types/express-serve-static-core/index.d.ts",
|
|
@@ -9209,6 +9521,7 @@
|
|
|
9209
9521
|
"../src/entity/modules/shopcart/pricedata.ts",
|
|
9210
9522
|
"../src/entity/modules/subscriptions/plan.ts",
|
|
9211
9523
|
"../src/entity/modules/subscriptions/subscription.ts",
|
|
9524
|
+
"../src/entity/modules/subscriptions/usercountplan.ts",
|
|
9212
9525
|
"../src/entity/modules/templates/authinfo.ts",
|
|
9213
9526
|
"../src/entity/modules/templates/authmethod.ts",
|
|
9214
9527
|
"../src/entity/modules/templates/endpointtemplateecommerce.ts",
|
|
@@ -9319,6 +9632,7 @@
|
|
|
9319
9632
|
"../src/migrations/1681741033630-subscriptions.ts",
|
|
9320
9633
|
"../src/migrations/1681765500644-template-auth-fix.ts",
|
|
9321
9634
|
"../src/migrations/1681967226231-subscriptions_v2.ts",
|
|
9635
|
+
"../src/migrations/1682475704295-subscriptions_v3.ts",
|
|
9322
9636
|
"../src/migrations/execute/index.ts",
|
|
9323
9637
|
"../src/migrations/index.ts",
|
|
9324
9638
|
"../src/repositories/index.ts",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reachu/database",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.36",
|
|
4
4
|
"description": "reachu-database",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"author": "reachu",
|
|
22
22
|
"license": "ISC",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@reachu/logger": "1.0.
|
|
25
|
-
"@reachu/utils": "1.0.
|
|
24
|
+
"@reachu/logger": "1.0.35",
|
|
25
|
+
"@reachu/utils": "1.0.35",
|
|
26
26
|
"dotenv": "8.0.0",
|
|
27
27
|
"express": "4.17.1",
|
|
28
28
|
"mysql2": "1.5.2",
|
package/src/entity/User.ts
CHANGED
|
@@ -28,6 +28,7 @@ import UserRole from './UserRole';
|
|
|
28
28
|
import UserSettings from './UserSettings';
|
|
29
29
|
import Shipping from './modules/shipping/Shipping';
|
|
30
30
|
import Subscription from './modules/subscriptions/Subscription';
|
|
31
|
+
import UserCountPlan from './modules/subscriptions/UserCountPlan';
|
|
31
32
|
|
|
32
33
|
@Entity()
|
|
33
34
|
export default class User extends AuditedModel {
|
|
@@ -258,6 +259,13 @@ export default class User extends AuditedModel {
|
|
|
258
259
|
@JoinColumn()
|
|
259
260
|
subscriptions: Subscription[];
|
|
260
261
|
|
|
262
|
+
@OneToOne(() => UserCountPlan, (userCountPlan: UserCountPlan) => userCountPlan.user, {
|
|
263
|
+
cascade: true,
|
|
264
|
+
eager: true,
|
|
265
|
+
})
|
|
266
|
+
@JoinColumn()
|
|
267
|
+
userCountPlan: UserCountPlan;
|
|
268
|
+
|
|
261
269
|
static invalidateCache(userId, removeCache: (key: any) => Promise<void>) {
|
|
262
270
|
logger.debug('User: Invalidating cache');
|
|
263
271
|
removeCache(this.getUsersMeKey(userId));
|
package/src/entity/index.ts
CHANGED
|
@@ -101,6 +101,7 @@ import TemplateEcommerceSchemeConfigVariantMapped from './modules/templates/sche
|
|
|
101
101
|
//Subscriptions
|
|
102
102
|
import Plan from './modules/subscriptions/Plan';
|
|
103
103
|
import Subscription from './modules/subscriptions/Subscription';
|
|
104
|
+
import UserCountPlan from './modules/subscriptions/UserCountPlan';
|
|
104
105
|
|
|
105
106
|
export {
|
|
106
107
|
CustomVariant,
|
|
@@ -192,5 +193,6 @@ export {
|
|
|
192
193
|
ReachuSchemeConfigVariant,
|
|
193
194
|
Plan,
|
|
194
195
|
Subscription,
|
|
196
|
+
UserCountPlan,
|
|
195
197
|
EnvironmentConfiguration,
|
|
196
198
|
};
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import AuditedModel from '../../AuditedModel';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
Column,
|
|
4
|
+
DeleteDateColumn,
|
|
5
|
+
Entity,
|
|
6
|
+
JoinColumn,
|
|
7
|
+
OneToMany,
|
|
8
|
+
PrimaryGeneratedColumn,
|
|
9
|
+
} from 'typeorm';
|
|
3
10
|
import Subscription from './Subscription';
|
|
4
11
|
|
|
5
12
|
@Entity()
|
|
6
13
|
export default class Plan extends AuditedModel {
|
|
7
|
-
|
|
8
14
|
@DeleteDateColumn()
|
|
9
15
|
deletedAt: Date;
|
|
10
16
|
|
|
@@ -26,4 +32,7 @@ export default class Plan extends AuditedModel {
|
|
|
26
32
|
@OneToMany(() => Subscription, (subscription: Subscription) => subscription.plan)
|
|
27
33
|
@JoinColumn()
|
|
28
34
|
subscriptions: Subscription[];
|
|
35
|
+
|
|
36
|
+
@Column('varchar', { nullable: true })
|
|
37
|
+
options: string;
|
|
29
38
|
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import AuditedModel from '../../AuditedModel';
|
|
2
|
+
import User from '../../User';
|
|
3
|
+
import Plan from './Plan';
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
Column,
|
|
7
|
+
DeleteDateColumn,
|
|
8
|
+
Entity,
|
|
9
|
+
JoinColumn,
|
|
10
|
+
OneToOne,
|
|
11
|
+
PrimaryGeneratedColumn,
|
|
12
|
+
} from 'typeorm';
|
|
13
|
+
|
|
14
|
+
@Entity()
|
|
15
|
+
export default class UserCountPlan extends AuditedModel {
|
|
16
|
+
@PrimaryGeneratedColumn()
|
|
17
|
+
id: number;
|
|
18
|
+
|
|
19
|
+
@DeleteDateColumn()
|
|
20
|
+
deletedAt: Date;
|
|
21
|
+
|
|
22
|
+
@OneToOne(() => User, (user: User) => user.id, { onDelete: 'CASCADE' })
|
|
23
|
+
@JoinColumn()
|
|
24
|
+
user: User;
|
|
25
|
+
|
|
26
|
+
@Column('integer')
|
|
27
|
+
totalSku: number;
|
|
28
|
+
|
|
29
|
+
@Column('integer')
|
|
30
|
+
totalConnection: number;
|
|
31
|
+
|
|
32
|
+
@Column('integer')
|
|
33
|
+
totalChannel: number;
|
|
34
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import {MigrationInterface, QueryRunner} from "typeorm";
|
|
2
|
+
|
|
3
|
+
export class SubscriptionsV31682475704295 implements MigrationInterface {
|
|
4
|
+
name = 'SubscriptionsV31682475704295'
|
|
5
|
+
|
|
6
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
7
|
+
await queryRunner.query(`CREATE TABLE \`user_count_plan\` (\`created_at\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), \`updated_at\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), \`id\` int NOT NULL AUTO_INCREMENT, \`deleted_at\` datetime(6) NULL, \`total_sku\` int NOT NULL, \`total_connection\` int NOT NULL, \`total_channel\` int NOT NULL, \`user_id\` int NULL, UNIQUE INDEX \`REL_9a755b2580dbbf81ee392f4c48\` (\`user_id\`), PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE \`plan\` ADD \`options\` varchar(255) NULL`);
|
|
9
|
+
await queryRunner.query(`ALTER TABLE \`user\` ADD \`user_count_plan_id\` int NULL`);
|
|
10
|
+
await queryRunner.query(`ALTER TABLE \`user\` ADD UNIQUE INDEX \`IDX_6c8d3e69e34f746d1f30e322a6\` (\`user_count_plan_id\`)`);
|
|
11
|
+
await queryRunner.query(`CREATE UNIQUE INDEX \`REL_6c8d3e69e34f746d1f30e322a6\` ON \`user\` (\`user_count_plan_id\`)`);
|
|
12
|
+
await queryRunner.query(`ALTER TABLE \`user_count_plan\` ADD CONSTRAINT \`FK_9a755b2580dbbf81ee392f4c48d\` FOREIGN KEY (\`user_id\`) REFERENCES \`user\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
13
|
+
await queryRunner.query(`ALTER TABLE \`user\` ADD CONSTRAINT \`FK_6c8d3e69e34f746d1f30e322a6e\` FOREIGN KEY (\`user_count_plan_id\`) REFERENCES \`user_count_plan\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
17
|
+
await queryRunner.query(`ALTER TABLE \`user\` DROP FOREIGN KEY \`FK_6c8d3e69e34f746d1f30e322a6e\``);
|
|
18
|
+
await queryRunner.query(`ALTER TABLE \`user_count_plan\` DROP FOREIGN KEY \`FK_9a755b2580dbbf81ee392f4c48d\``);
|
|
19
|
+
await queryRunner.query(`DROP INDEX \`REL_6c8d3e69e34f746d1f30e322a6\` ON \`user\``);
|
|
20
|
+
await queryRunner.query(`ALTER TABLE \`user\` DROP INDEX \`IDX_6c8d3e69e34f746d1f30e322a6\``);
|
|
21
|
+
await queryRunner.query(`ALTER TABLE \`user\` DROP COLUMN \`user_count_plan_id\``);
|
|
22
|
+
await queryRunner.query(`ALTER TABLE \`plan\` DROP COLUMN \`options\``);
|
|
23
|
+
await queryRunner.query(`DROP INDEX \`REL_9a755b2580dbbf81ee392f4c48\` ON \`user_count_plan\``);
|
|
24
|
+
await queryRunner.query(`DROP TABLE \`user_count_plan\``);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
}
|
|
@@ -89,7 +89,7 @@ import {
|
|
|
89
89
|
UserTemplateEcommerceRepository,
|
|
90
90
|
} from './templates';
|
|
91
91
|
|
|
92
|
-
import { PlanRepository, SubscriptionRepository } from './subscriptions';
|
|
92
|
+
import { PlanRepository, SubscriptionRepository, UserCountPlanRepository } from './subscriptions';
|
|
93
93
|
|
|
94
94
|
import { Repository, EntityRepository } from 'typeorm';
|
|
95
95
|
|
|
@@ -286,4 +286,4 @@ export {
|
|
|
286
286
|
|
|
287
287
|
export { ProductShippingRepository, ShippingCountryRepository, ShippingRepository };
|
|
288
288
|
|
|
289
|
-
export { PlanRepository, SubscriptionRepository };
|
|
289
|
+
export { PlanRepository, SubscriptionRepository, UserCountPlanRepository };
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { Repository, EntityRepository } from 'typeorm';
|
|
2
2
|
import Plan from '../../entity/modules/subscriptions/Plan';
|
|
3
3
|
import Subscription from '../../entity/modules/subscriptions/Subscription';
|
|
4
|
+
import UserCountPlan from '../../entity/modules/subscriptions/UserCountPlan';
|
|
4
5
|
|
|
5
6
|
@EntityRepository(Plan)
|
|
6
7
|
export class PlanRepository extends Repository<Plan> {}
|
|
7
8
|
|
|
8
9
|
@EntityRepository(Subscription)
|
|
9
10
|
export class SubscriptionRepository extends Repository<Subscription> {}
|
|
11
|
+
|
|
12
|
+
@EntityRepository(UserCountPlan)
|
|
13
|
+
export class UserCountPlanRepository extends Repository<UserCountPlan> {}
|