@reachu/database 1.0.24 → 1.0.26
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/EnvironmentConfiguration.d.ts +7 -0
- package/dist/entity/EnvironmentConfiguration.js +39 -0
- package/dist/entity/EnvironmentConfiguration.js.map +1 -0
- package/dist/entity/index.d.ts +4 -1
- package/dist/entity/index.js +7 -1
- package/dist/entity/index.js.map +1 -1
- package/dist/entity/modules/subscriptions/Plan.d.ts +8 -0
- package/dist/entity/modules/subscriptions/Plan.js +43 -0
- package/dist/entity/modules/subscriptions/Plan.js.map +1 -0
- package/dist/entity/modules/subscriptions/Subscription.d.ts +13 -0
- package/dist/entity/modules/subscriptions/Subscription.js +59 -0
- package/dist/entity/modules/subscriptions/Subscription.js.map +1 -0
- package/dist/entity/modules/templates/TemplateEcommerce.d.ts +2 -0
- package/dist/entity/modules/templates/TemplateEcommerce.js +8 -0
- package/dist/entity/modules/templates/TemplateEcommerce.js.map +1 -1
- package/dist/migrations/1681485990275-template-ecommerce-two.d.ts +6 -0
- package/dist/migrations/1681485990275-template-ecommerce-two.js +31 -0
- package/dist/migrations/1681485990275-template-ecommerce-two.js.map +1 -0
- package/dist/migrations/1681741033630-Subscriptions.d.ts +6 -0
- package/dist/migrations/1681741033630-Subscriptions.js +37 -0
- package/dist/migrations/1681741033630-Subscriptions.js.map +1 -0
- package/dist/repositories/index.d.ts +5 -0
- package/dist/repositories/index.js +11 -1
- package/dist/repositories/index.js.map +1 -1
- package/dist/repositories/subscriptions/index.d.ts +7 -0
- package/dist/repositories/subscriptions/index.js +28 -0
- package/dist/repositories/subscriptions/index.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +99 -6
- package/package.json +3 -3
- package/src/entity/EnvironmentConfiguration.ts +17 -0
- package/src/entity/index.ts +8 -0
- package/src/entity/modules/subscriptions/Plan.ts +20 -0
- package/src/entity/modules/subscriptions/Subscription.ts +34 -0
- package/src/entity/modules/templates/TemplateEcommerce.ts +6 -0
- package/src/migrations/1681485990275-template-ecommerce-two.ts +16 -0
- package/src/migrations/1681741033630-Subscriptions.ts +22 -0
- package/src/repositories/index.ts +9 -0
- package/src/repositories/subscriptions/index.ts +9 -0
|
@@ -0,0 +1,39 @@
|
|
|
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 typeorm_1 = require("typeorm");
|
|
17
|
+
let EnvironmentConfiguration = class EnvironmentConfiguration extends AuditedModel_1.default {
|
|
18
|
+
};
|
|
19
|
+
__decorate([
|
|
20
|
+
typeorm_1.PrimaryGeneratedColumn(),
|
|
21
|
+
__metadata("design:type", Number)
|
|
22
|
+
], EnvironmentConfiguration.prototype, "id", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
typeorm_1.Column('varchar'),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], EnvironmentConfiguration.prototype, "key", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
typeorm_1.Column('varchar'),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], EnvironmentConfiguration.prototype, "value", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
typeorm_1.Column('varchar', { length: 20 }),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], EnvironmentConfiguration.prototype, "stage", void 0);
|
|
35
|
+
EnvironmentConfiguration = __decorate([
|
|
36
|
+
typeorm_1.Entity()
|
|
37
|
+
], EnvironmentConfiguration);
|
|
38
|
+
exports.default = EnvironmentConfiguration;
|
|
39
|
+
//# sourceMappingURL=EnvironmentConfiguration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EnvironmentConfiguration.js","sourceRoot":"","sources":["../../src/entity/EnvironmentConfiguration.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,kEAA0C;AAC1C,qCAAiE;AAGjE,IAAqB,wBAAwB,GAA7C,MAAqB,wBAAyB,SAAQ,sBAAY;CAYjE,CAAA;AAVC;IADC,gCAAsB,EAAE;;oDACd;AAGX;IADC,gBAAM,CAAC,SAAS,CAAC;;qDACN;AAGZ;IADC,gBAAM,CAAC,SAAS,CAAC;;uDACJ;AAGd;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;;uDACpB;AAXK,wBAAwB;IAD5C,gBAAM,EAAE;GACY,wBAAwB,CAY5C;kBAZoB,wBAAwB"}
|
package/dist/entity/index.d.ts
CHANGED
|
@@ -56,6 +56,7 @@ import ChannelUserProductSync from './ChannelUserProductSync';
|
|
|
56
56
|
import UserChannelApiKey from './UserChannelApiKey';
|
|
57
57
|
import Currency from './Currency';
|
|
58
58
|
import ExchangeRate from './ExchangeRate';
|
|
59
|
+
import EnvironmentConfiguration from './EnvironmentConfiguration';
|
|
59
60
|
import Cart from './modules/shopcart/Cart';
|
|
60
61
|
import CartItem from './modules/shopcart/CartItem';
|
|
61
62
|
import Checkout from './modules/shopcart/Checkout';
|
|
@@ -85,4 +86,6 @@ import TemplateEcommerceSchemeConfigProductMapped from './modules/templates/sche
|
|
|
85
86
|
import ReachuSchemeConfigVariant from './modules/templates/schemeVariant/ReachuSchemeConfigVariant';
|
|
86
87
|
import TemplateEcommerceSchemeConfigVariant from './modules/templates/schemeVariant/TemplateEcommerceSchemeConfigVariant';
|
|
87
88
|
import TemplateEcommerceSchemeConfigVariantMapped from './modules/templates/schemeVariant/TemplateEcommerceSchemeConfigVariantMapped';
|
|
88
|
-
|
|
89
|
+
import Plan from './modules/subscriptions/Plan';
|
|
90
|
+
import Subscription from './modules/subscriptions/Subscription';
|
|
91
|
+
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, 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.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.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"));
|
|
@@ -121,6 +121,8 @@ const Currency_1 = __importDefault(require("./Currency"));
|
|
|
121
121
|
exports.Currency = Currency_1.default;
|
|
122
122
|
const ExchangeRate_1 = __importDefault(require("./ExchangeRate"));
|
|
123
123
|
exports.ExchangeRate = ExchangeRate_1.default;
|
|
124
|
+
const EnvironmentConfiguration_1 = __importDefault(require("./EnvironmentConfiguration"));
|
|
125
|
+
exports.EnvironmentConfiguration = EnvironmentConfiguration_1.default;
|
|
124
126
|
const Cart_1 = __importDefault(require("./modules/shopcart/Cart"));
|
|
125
127
|
exports.Cart = Cart_1.default;
|
|
126
128
|
const CartItem_1 = __importDefault(require("./modules/shopcart/CartItem"));
|
|
@@ -179,4 +181,8 @@ const TemplateEcommerceSchemeConfigVariant_1 = __importDefault(require("./module
|
|
|
179
181
|
exports.TemplateEcommerceSchemeConfigVariant = TemplateEcommerceSchemeConfigVariant_1.default;
|
|
180
182
|
const TemplateEcommerceSchemeConfigVariantMapped_1 = __importDefault(require("./modules/templates/schemeVariant/TemplateEcommerceSchemeConfigVariantMapped"));
|
|
181
183
|
exports.TemplateEcommerceSchemeConfigVariantMapped = TemplateEcommerceSchemeConfigVariantMapped_1.default;
|
|
184
|
+
const Plan_1 = __importDefault(require("./modules/subscriptions/Plan"));
|
|
185
|
+
exports.Plan = Plan_1.default;
|
|
186
|
+
const Subscription_1 = __importDefault(require("./modules/subscriptions/Subscription"));
|
|
187
|
+
exports.Subscription = Subscription_1.default;
|
|
182
188
|
//# 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;AAqH9B,kBArHK,iBAAO,CAqHL;AApHT,oEAA4C;AAqH1C,wBArHK,uBAAa,CAqHL;AApHf,kEAA0C;AAqHxC,uBArHK,sBAAY,CAqHL;AApHd,gEAAwC;AAqHtC,sBArHK,qBAAW,CAqHL;AApHb,0DAAkC;AAqHhC,mBArHK,kBAAQ,CAqHL;AApHV,0EAAkD;AAqHhD,2BArHK,0BAAgB,CAqHL;AApHlB,0EAAkD;AAqHhD,2BArHK,0BAAgB,CAqHL;AApHlB,0DAAkC;AAqHhC,mBArHK,kBAAQ,CAqHL;AApHV,wDAAgC;AAqH9B,kBArHK,iBAAO,CAqHL;AApHT,oDAA4B;AAqH1B,gBArHK,eAAK,CAqHL;AApHP,0EAAkD;A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|
@@ -0,0 +1,43 @@
|
|
|
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 typeorm_1 = require("typeorm");
|
|
17
|
+
let Plan = class Plan extends AuditedModel_1.default {
|
|
18
|
+
};
|
|
19
|
+
__decorate([
|
|
20
|
+
typeorm_1.PrimaryGeneratedColumn(),
|
|
21
|
+
__metadata("design:type", Number)
|
|
22
|
+
], Plan.prototype, "id", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
typeorm_1.Column('varchar', { length: 100 }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], Plan.prototype, "name", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
typeorm_1.Column('varchar', { nullable: true }),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], Plan.prototype, "description", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
typeorm_1.Column('varchar', { nullable: true }),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], Plan.prototype, "originId", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
typeorm_1.Column('varchar', { nullable: true }),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], Plan.prototype, "response", void 0);
|
|
39
|
+
Plan = __decorate([
|
|
40
|
+
typeorm_1.Entity()
|
|
41
|
+
], Plan);
|
|
42
|
+
exports.default = Plan;
|
|
43
|
+
//# sourceMappingURL=Plan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Plan.js","sourceRoot":"","sources":["../../../../src/entity/modules/subscriptions/Plan.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,sEAA8C;AAC9C,qCAAiE;AAGjE,IAAqB,IAAI,GAAzB,MAAqB,IAAK,SAAQ,sBAAY;CAe7C,CAAA;AAbC;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;AAdE,IAAI;IADxB,gBAAM,EAAE;GACY,IAAI,CAexB;kBAfoB,IAAI"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import AuditedModel from '../../AuditedModel';
|
|
2
|
+
import User from '../../User';
|
|
3
|
+
import Plan from './Plan';
|
|
4
|
+
export default class Subscription extends AuditedModel {
|
|
5
|
+
id: number;
|
|
6
|
+
user: User;
|
|
7
|
+
plan: Plan;
|
|
8
|
+
customerId: string;
|
|
9
|
+
isProd: boolean;
|
|
10
|
+
status: string;
|
|
11
|
+
originId: string;
|
|
12
|
+
response: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
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 Plan_1 = __importDefault(require("./Plan"));
|
|
18
|
+
const typeorm_1 = require("typeorm");
|
|
19
|
+
let Subscription = class Subscription extends AuditedModel_1.default {
|
|
20
|
+
};
|
|
21
|
+
__decorate([
|
|
22
|
+
typeorm_1.PrimaryGeneratedColumn(),
|
|
23
|
+
__metadata("design:type", Number)
|
|
24
|
+
], Subscription.prototype, "id", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
typeorm_1.ManyToOne(() => User_1.default, (user) => user.id, { eager: true, onDelete: 'CASCADE' }),
|
|
27
|
+
typeorm_1.JoinColumn(),
|
|
28
|
+
__metadata("design:type", User_1.default)
|
|
29
|
+
], Subscription.prototype, "user", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
typeorm_1.ManyToOne(() => Plan_1.default, (plan) => plan.id, { eager: true, onDelete: 'CASCADE' }),
|
|
32
|
+
typeorm_1.JoinColumn(),
|
|
33
|
+
__metadata("design:type", Plan_1.default)
|
|
34
|
+
], Subscription.prototype, "plan", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
typeorm_1.Column('varchar', { nullable: true }),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], Subscription.prototype, "customerId", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
typeorm_1.Column('boolean'),
|
|
41
|
+
__metadata("design:type", Boolean)
|
|
42
|
+
], Subscription.prototype, "isProd", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
typeorm_1.Column('varchar', { length: 100, nullable: true }),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], Subscription.prototype, "status", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
typeorm_1.Column('varchar', { nullable: true }),
|
|
49
|
+
__metadata("design:type", String)
|
|
50
|
+
], Subscription.prototype, "originId", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
typeorm_1.Column('varchar', { nullable: true }),
|
|
53
|
+
__metadata("design:type", String)
|
|
54
|
+
], Subscription.prototype, "response", void 0);
|
|
55
|
+
Subscription = __decorate([
|
|
56
|
+
typeorm_1.Entity()
|
|
57
|
+
], Subscription);
|
|
58
|
+
exports.default = Subscription;
|
|
59
|
+
//# sourceMappingURL=Subscription.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Subscription.js","sourceRoot":"","sources":["../../../../src/entity/modules/subscriptions/Subscription.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,sEAA8C;AAC9C,sDAA8B;AAC9B,kDAA0B;AAE1B,qCAAwF;AAGxF,IAAqB,YAAY,GAAjC,MAAqB,YAAa,SAAQ,sBAAY;CA0BrD,CAAA;AAxBC;IADC,gCAAsB,EAAE;;wCACd;AAIX;IAFC,mBAAS,CAAC,GAAG,EAAE,CAAC,cAAI,EAAE,CAAC,IAAU,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IACpF,oBAAU,EAAE;8BACP,cAAI;0CAAC;AAIX;IAFC,mBAAS,CAAC,GAAG,EAAE,CAAC,cAAI,EAAE,CAAC,IAAU,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IACpF,oBAAU,EAAE;8BACP,cAAI;0CAAC;AAGX;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACnB;AAGnB;IADC,gBAAM,CAAC,SAAS,CAAC;;4CACF;AAGhB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACpC;AAGf;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACrB;AAGjB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACrB;AAzBE,YAAY;IADhC,gBAAM,EAAE;GACY,YAAY,CA0BhC;kBA1BoB,YAAY"}
|
|
@@ -14,6 +14,8 @@ export default class TemplateEcommerce extends AuditedModel {
|
|
|
14
14
|
id: number;
|
|
15
15
|
deletedAt: Date;
|
|
16
16
|
name: string;
|
|
17
|
+
public: boolean;
|
|
18
|
+
image: string;
|
|
17
19
|
authMethod: AuthMethod;
|
|
18
20
|
userTemplateEcommerce: UserTemplateEcommerce[];
|
|
19
21
|
reachuSchemeConfigProduct: ReachuSchemeConfigProduct;
|
|
@@ -39,6 +39,14 @@ __decorate([
|
|
|
39
39
|
typeorm_1.Column('varchar', { nullable: false }),
|
|
40
40
|
__metadata("design:type", String)
|
|
41
41
|
], TemplateEcommerce.prototype, "name", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
typeorm_1.Column({ type: 'boolean', default: false }),
|
|
44
|
+
__metadata("design:type", Boolean)
|
|
45
|
+
], TemplateEcommerce.prototype, "public", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
typeorm_1.Column('varchar', { nullable: false }),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], TemplateEcommerce.prototype, "image", void 0);
|
|
42
50
|
__decorate([
|
|
43
51
|
typeorm_1.ManyToOne(() => AuthMethod_1.default, (authMethod) => authMethod.templateEcommerce, {
|
|
44
52
|
eager: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TemplateEcommerce.js","sourceRoot":"","sources":["../../../../src/entity/modules/templates/TemplateEcommerce.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAQiB;AACjB,sEAA8C;AAC9C,oFAA4D;AAC5D,0GAAkF;AAClF,gIAAwG;AACxG,4IAAoH;AACpH,0GAAkF;AAClF,gIAAwG;AACxG,4IAAoH;AACpH,oGAA4E;AAC5E,0HAAkG;AAClG,sIAA8G;AAC9G,8DAAsC;AAGtC,IAAqB,iBAAiB,GAAtC,MAAqB,iBAAkB,SAAQ,sBAAY;
|
|
1
|
+
{"version":3,"file":"TemplateEcommerce.js","sourceRoot":"","sources":["../../../../src/entity/modules/templates/TemplateEcommerce.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAQiB;AACjB,sEAA8C;AAC9C,oFAA4D;AAC5D,0GAAkF;AAClF,gIAAwG;AACxG,4IAAoH;AACpH,0GAAkF;AAClF,gIAAwG;AACxG,4IAAoH;AACpH,oGAA4E;AAC5E,0HAAkG;AAClG,sIAA8G;AAC9G,8DAAsC;AAGtC,IAAqB,iBAAiB,GAAtC,MAAqB,iBAAkB,SAAQ,sBAAY;CAwI1D,CAAA;AAtIC;IADC,gCAA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C,mBAAS,CACR,GAAG,EAAE,CAAC,kDAAwC,EAC9C,CAAC,wCAAkF,EAAE,EAAE,CACrF,wCAAwC,CAAC,iBAAiB,EAC5D;QACE,KAAK,EAAE,IAAI;QACX,QAAQ,EAAE,SAAS;KACpB,CACF;IACA,oBAAU,EAAE;8BAC6B,kDAAwC;mFAAC;AAvIhE,iBAAiB;IADrC,gBAAM,EAAE;GACY,iBAAiB,CAwIrC;kBAxIoB,iBAAiB"}
|
|
@@ -0,0 +1,31 @@
|
|
|
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.templateEcommerceTwo1681485990275 = void 0;
|
|
13
|
+
class templateEcommerceTwo1681485990275 {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.name = 'templateEcommerceTwo1681485990275';
|
|
16
|
+
}
|
|
17
|
+
up(queryRunner) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
yield queryRunner.query(`ALTER TABLE \`template_ecommerce\` ADD \`public\` tinyint NOT NULL DEFAULT 0`);
|
|
20
|
+
yield queryRunner.query(`ALTER TABLE \`template_ecommerce\` ADD \`image\` varchar(255) NOT NULL`);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
down(queryRunner) {
|
|
24
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
25
|
+
yield queryRunner.query(`ALTER TABLE \`template_ecommerce\` DROP COLUMN \`image\``);
|
|
26
|
+
yield queryRunner.query(`ALTER TABLE \`template_ecommerce\` DROP COLUMN \`public\``);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.templateEcommerceTwo1681485990275 = templateEcommerceTwo1681485990275;
|
|
31
|
+
//# sourceMappingURL=1681485990275-template-ecommerce-two.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1681485990275-template-ecommerce-two.js","sourceRoot":"","sources":["../../src/migrations/1681485990275-template-ecommerce-two.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,iCAAiC;IAA9C;QACI,SAAI,GAAG,mCAAmC,CAAA;IAY9C,CAAC;IAVgB,EAAE,CAAC,WAAwB;;YACpC,MAAM,WAAW,CAAC,KAAK,CAAC,8EAA8E,CAAC,CAAC;YACxG,MAAM,WAAW,CAAC,KAAK,CAAC,wEAAwE,CAAC,CAAC;QACtG,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CAAC,0DAA0D,CAAC,CAAC;YACpF,MAAM,WAAW,CAAC,KAAK,CAAC,2DAA2D,CAAC,CAAC;QACzF,CAAC;KAAA;CAEJ;AAbD,8EAaC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
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.Subscriptions1681741033630 = void 0;
|
|
13
|
+
class Subscriptions1681741033630 {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.name = 'Subscriptions1681741033630';
|
|
16
|
+
}
|
|
17
|
+
up(queryRunner) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
yield queryRunner.query(`CREATE TABLE \`environment_configuration\` (\`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, \`key\` varchar(255) NOT NULL, \`value\` varchar(255) NOT NULL, \`stage\` varchar(20) NOT NULL, PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
|
|
20
|
+
yield queryRunner.query(`CREATE TABLE \`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, \`name\` varchar(100) NOT NULL, \`description\` varchar(255) NULL, \`origin_id\` varchar(255) NULL, \`response\` varchar(255) NULL, PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
|
|
21
|
+
yield queryRunner.query(`CREATE TABLE \`subscription\` (\`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, \`customer_id\` varchar(255) NULL, \`is_prod\` tinyint NOT NULL, \`status\` varchar(100) NULL, \`origin_id\` varchar(255) NULL, \`response\` varchar(255) NULL, \`user_id\` int NULL, \`plan_id\` int NULL, PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
|
|
22
|
+
yield queryRunner.query(`ALTER TABLE \`subscription\` ADD CONSTRAINT \`FK_940d49a105d50bbd616be540013\` FOREIGN KEY (\`user_id\`) REFERENCES \`user\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
23
|
+
yield queryRunner.query(`ALTER TABLE \`subscription\` ADD CONSTRAINT \`FK_5fde988e5d9b9a522d70ebec27c\` FOREIGN KEY (\`plan_id\`) REFERENCES \`plan\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
down(queryRunner) {
|
|
27
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
yield queryRunner.query(`ALTER TABLE \`subscription\` DROP FOREIGN KEY \`FK_5fde988e5d9b9a522d70ebec27c\``);
|
|
29
|
+
yield queryRunner.query(`ALTER TABLE \`subscription\` DROP FOREIGN KEY \`FK_940d49a105d50bbd616be540013\``);
|
|
30
|
+
yield queryRunner.query(`DROP TABLE \`subscription\``);
|
|
31
|
+
yield queryRunner.query(`DROP TABLE \`plan\``);
|
|
32
|
+
yield queryRunner.query(`DROP TABLE \`environment_configuration\``);
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.Subscriptions1681741033630 = Subscriptions1681741033630;
|
|
37
|
+
//# sourceMappingURL=1681741033630-Subscriptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1681741033630-Subscriptions.js","sourceRoot":"","sources":["../../src/migrations/1681741033630-Subscriptions.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,0BAA0B;IAAvC;QACI,SAAI,GAAG,4BAA4B,CAAA;IAkBvC,CAAC;IAhBgB,EAAE,CAAC,WAAwB;;YACpC,MAAM,WAAW,CAAC,KAAK,CAAC,wXAAwX,CAAC,CAAC;YAClZ,MAAM,WAAW,CAAC,KAAK,CAAC,uYAAuY,CAAC,CAAC;YACja,MAAM,WAAW,CAAC,KAAK,CAAC,udAAud,CAAC,CAAC;YACjf,MAAM,WAAW,CAAC,KAAK,CAAC,4KAA4K,CAAC,CAAC;YACtM,MAAM,WAAW,CAAC,KAAK,CAAC,4KAA4K,CAAC,CAAC;QAC1M,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CAAC,kFAAkF,CAAC,CAAC;YAC5G,MAAM,WAAW,CAAC,KAAK,CAAC,kFAAkF,CAAC,CAAC;YAC5G,MAAM,WAAW,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC;YACvD,MAAM,WAAW,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;YAC/C,MAAM,WAAW,CAAC,KAAK,CAAC,0CAA0C,CAAC,CAAC;QACxE,CAAC;KAAA;CAEJ;AAnBD,gEAmBC"}
|
|
@@ -52,9 +52,11 @@ import CustomProductImage from '../entity/CustomProductImage';
|
|
|
52
52
|
import Attribute from '../entity/Attribute';
|
|
53
53
|
import ProductAttribute from '../entity/ProductAttribute';
|
|
54
54
|
import CategoryImages from '../entity/CategoryImages';
|
|
55
|
+
import EnvironmentConfiguration from '../entity/EnvironmentConfiguration';
|
|
55
56
|
import { CartItemRepository, CartRepository, CheckoutBillingAddressRepository, CheckoutRepository, CheckoutShippingAddressRepository, PriceDataRepository } from './shopcart';
|
|
56
57
|
import { ProductShippingRepository, ShippingCountryRepository, ShippingRepository } from './shipping';
|
|
57
58
|
import { AuthInfoRepository, AuthMethodRepository, EndpointTemplateEcommerceRepository, ReachuSchemeConfigOrderRepository, ReachuSchemeConfigProductRepository, ReachuSchemeConfigVariantRepository, TemplateEcommerceRepository, TemplateEcommerceSchemeConfigOrderMappedRepository, TemplateEcommerceSchemeConfigOrderRepository, TemplateEcommerceSchemeConfigProductMappedRepository, TemplateEcommerceSchemeConfigProductRepository, TemplateEcommerceSchemeConfigVariantMappedRepository, TemplateEcommerceSchemeConfigVariantRepository, UserTemplateEcommerceRepository } from './templates';
|
|
59
|
+
import { PlanRepository, SubscriptionRepository } from './subscriptions';
|
|
58
60
|
import { Repository } from 'typeorm';
|
|
59
61
|
export declare class CategoryImagesRepository extends Repository<CategoryImages> {
|
|
60
62
|
}
|
|
@@ -164,6 +166,9 @@ export declare class CurrencyRepository extends Repository<Currency> {
|
|
|
164
166
|
}
|
|
165
167
|
export declare class ExchangeRateRepository extends Repository<ExchangeRate> {
|
|
166
168
|
}
|
|
169
|
+
export declare class EnvironmentConfigurationRepository extends Repository<EnvironmentConfiguration> {
|
|
170
|
+
}
|
|
167
171
|
export { CartItemRepository, CartRepository, CheckoutBillingAddressRepository, CheckoutRepository, CheckoutShippingAddressRepository, PriceDataRepository, };
|
|
168
172
|
export { AuthInfoRepository, AuthMethodRepository, EndpointTemplateEcommerceRepository, ReachuSchemeConfigOrderRepository, ReachuSchemeConfigProductRepository, ReachuSchemeConfigVariantRepository, TemplateEcommerceRepository, TemplateEcommerceSchemeConfigOrderMappedRepository, TemplateEcommerceSchemeConfigOrderRepository, TemplateEcommerceSchemeConfigProductMappedRepository, TemplateEcommerceSchemeConfigProductRepository, TemplateEcommerceSchemeConfigVariantMappedRepository, TemplateEcommerceSchemeConfigVariantRepository, UserTemplateEcommerceRepository, };
|
|
169
173
|
export { ProductShippingRepository, ShippingCountryRepository, ShippingRepository };
|
|
174
|
+
export { PlanRepository, SubscriptionRepository };
|
|
@@ -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.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.ExchangeRateRepository = exports.CurrencyRepository = exports.UserChannelApiKeyRepository = exports.ChannelUserProductSyncRepository = 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;
|
|
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"));
|
|
@@ -65,6 +65,7 @@ const CustomProductImage_1 = __importDefault(require("../entity/CustomProductIma
|
|
|
65
65
|
const Attribute_1 = __importDefault(require("../entity/Attribute"));
|
|
66
66
|
const ProductAttribute_1 = __importDefault(require("../entity/ProductAttribute"));
|
|
67
67
|
const CategoryImages_1 = __importDefault(require("../entity/CategoryImages"));
|
|
68
|
+
const EnvironmentConfiguration_1 = __importDefault(require("../entity/EnvironmentConfiguration"));
|
|
68
69
|
const shopcart_1 = require("./shopcart");
|
|
69
70
|
Object.defineProperty(exports, "CartItemRepository", { enumerable: true, get: function () { return shopcart_1.CartItemRepository; } });
|
|
70
71
|
Object.defineProperty(exports, "CartRepository", { enumerable: true, get: function () { return shopcart_1.CartRepository; } });
|
|
@@ -91,6 +92,9 @@ Object.defineProperty(exports, "TemplateEcommerceSchemeConfigProductRepository",
|
|
|
91
92
|
Object.defineProperty(exports, "TemplateEcommerceSchemeConfigVariantMappedRepository", { enumerable: true, get: function () { return templates_1.TemplateEcommerceSchemeConfigVariantMappedRepository; } });
|
|
92
93
|
Object.defineProperty(exports, "TemplateEcommerceSchemeConfigVariantRepository", { enumerable: true, get: function () { return templates_1.TemplateEcommerceSchemeConfigVariantRepository; } });
|
|
93
94
|
Object.defineProperty(exports, "UserTemplateEcommerceRepository", { enumerable: true, get: function () { return templates_1.UserTemplateEcommerceRepository; } });
|
|
95
|
+
const subscriptions_1 = require("./subscriptions");
|
|
96
|
+
Object.defineProperty(exports, "PlanRepository", { enumerable: true, get: function () { return subscriptions_1.PlanRepository; } });
|
|
97
|
+
Object.defineProperty(exports, "SubscriptionRepository", { enumerable: true, get: function () { return subscriptions_1.SubscriptionRepository; } });
|
|
94
98
|
const typeorm_1 = require("typeorm");
|
|
95
99
|
let CategoryImagesRepository = class CategoryImagesRepository extends typeorm_1.Repository {
|
|
96
100
|
};
|
|
@@ -416,4 +420,10 @@ ExchangeRateRepository = __decorate([
|
|
|
416
420
|
typeorm_1.EntityRepository(ExchangeRate_1.default)
|
|
417
421
|
], ExchangeRateRepository);
|
|
418
422
|
exports.ExchangeRateRepository = ExchangeRateRepository;
|
|
423
|
+
let EnvironmentConfigurationRepository = class EnvironmentConfigurationRepository extends typeorm_1.Repository {
|
|
424
|
+
};
|
|
425
|
+
EnvironmentConfigurationRepository = __decorate([
|
|
426
|
+
typeorm_1.EntityRepository(EnvironmentConfiguration_1.default)
|
|
427
|
+
], EnvironmentConfigurationRepository);
|
|
428
|
+
exports.EnvironmentConfigurationRepository = EnvironmentConfigurationRepository;
|
|
419
429
|
//# sourceMappingURL=index.js.map
|
|
@@ -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,yCAOoB;
|
|
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,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CAAkC;IAD9C,0BAAgB,CAAC,kCAAwB,CAAC;GAC9B,kCAAkC,CAAgD;AAAlF,gFAAkC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Repository } from 'typeorm';
|
|
2
|
+
import Plan from '../../entity/modules/subscriptions/Plan';
|
|
3
|
+
import Subscription from '../../entity/modules/subscriptions/Subscription';
|
|
4
|
+
export declare class PlanRepository extends Repository<Plan> {
|
|
5
|
+
}
|
|
6
|
+
export declare class SubscriptionRepository extends Repository<Subscription> {
|
|
7
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
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 __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.SubscriptionRepository = exports.PlanRepository = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const Plan_1 = __importDefault(require("../../entity/modules/subscriptions/Plan"));
|
|
15
|
+
const Subscription_1 = __importDefault(require("../../entity/modules/subscriptions/Subscription"));
|
|
16
|
+
let PlanRepository = class PlanRepository extends typeorm_1.Repository {
|
|
17
|
+
};
|
|
18
|
+
PlanRepository = __decorate([
|
|
19
|
+
typeorm_1.EntityRepository(Plan_1.default)
|
|
20
|
+
], PlanRepository);
|
|
21
|
+
exports.PlanRepository = PlanRepository;
|
|
22
|
+
let SubscriptionRepository = class SubscriptionRepository extends typeorm_1.Repository {
|
|
23
|
+
};
|
|
24
|
+
SubscriptionRepository = __decorate([
|
|
25
|
+
typeorm_1.EntityRepository(Subscription_1.default)
|
|
26
|
+
], SubscriptionRepository);
|
|
27
|
+
exports.SubscriptionRepository = SubscriptionRepository;
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/repositories/subscriptions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAuD;AACvD,mFAA2D;AAC3D,mGAA2E;AAG3E,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"}
|
|
@@ -2621,6 +2621,11 @@
|
|
|
2621
2621
|
"signature": "edfc427eed5128dec1fecd84338bbbf23d9737b2b637ef70601411e733545186",
|
|
2622
2622
|
"affectsGlobalScope": false
|
|
2623
2623
|
},
|
|
2624
|
+
"../src/entity/environmentconfiguration.ts": {
|
|
2625
|
+
"version": "4c5880a7be44ce1b1b0a0e38a29c5528fb16d519157fa3a2d64739d0596da4d4",
|
|
2626
|
+
"signature": "7fcdec100c9f2117182bee40540c09ef5c38cc643a1dca4a483fdf44f5059c40",
|
|
2627
|
+
"affectsGlobalScope": false
|
|
2628
|
+
},
|
|
2624
2629
|
"../src/entity/modules/templates/endpointtemplateecommerce.ts": {
|
|
2625
2630
|
"version": "3f2087a47674670eec0ea9ce95b916ff464a30e6b4e96f00216e0e8cfbc3af45",
|
|
2626
2631
|
"signature": "78be799e286e35e9a4006d0974e5c73b85a5a7b73f7c7ae3302834f690dc5d92",
|
|
@@ -2677,8 +2682,8 @@
|
|
|
2677
2682
|
"affectsGlobalScope": false
|
|
2678
2683
|
},
|
|
2679
2684
|
"../src/entity/modules/templates/templateecommerce.ts": {
|
|
2680
|
-
"version": "
|
|
2681
|
-
"signature": "
|
|
2685
|
+
"version": "9720d4da04ca1b275803c62a03a39233272d0dfa51904e188093abe284d64074",
|
|
2686
|
+
"signature": "6a67837b865232d7582f049e46601a26c9467784ecce29739c01974128831377",
|
|
2682
2687
|
"affectsGlobalScope": false
|
|
2683
2688
|
},
|
|
2684
2689
|
"../src/entity/modules/templates/usertemplateecommerce.ts": {
|
|
@@ -2691,9 +2696,19 @@
|
|
|
2691
2696
|
"signature": "60080c55ede647941c0ab1932f7a3484fb629cd4ba5d90dbe4e10e5c37b5cda6",
|
|
2692
2697
|
"affectsGlobalScope": false
|
|
2693
2698
|
},
|
|
2699
|
+
"../src/entity/modules/subscriptions/plan.ts": {
|
|
2700
|
+
"version": "b35778da21802a48cd07e936de75ae8a85d038497f0d74a52908065b83b2b799",
|
|
2701
|
+
"signature": "40da83598233ac7d7916fdf2958126f3b1b11cdfb54f07efa6d63c68112a8990",
|
|
2702
|
+
"affectsGlobalScope": false
|
|
2703
|
+
},
|
|
2704
|
+
"../src/entity/modules/subscriptions/subscription.ts": {
|
|
2705
|
+
"version": "ca1280cfb7e02bcef83dbdc7e4249bcc3bde354987b35aa308f3b03cd40d688a",
|
|
2706
|
+
"signature": "7eff71f603580974d59982e4388e11cf90e4dbe8b05a2d0b1f27f62242559590",
|
|
2707
|
+
"affectsGlobalScope": false
|
|
2708
|
+
},
|
|
2694
2709
|
"../src/entity/index.ts": {
|
|
2695
|
-
"version": "
|
|
2696
|
-
"signature": "
|
|
2710
|
+
"version": "2290e81a9b74eb041717bb247c1efac35457dcda359a972b6885d42c8eae064a",
|
|
2711
|
+
"signature": "b314027d68a484e41e4f6e2a86f7607679987ee03d973eb9afe059588f735596",
|
|
2697
2712
|
"affectsGlobalScope": false
|
|
2698
2713
|
},
|
|
2699
2714
|
"../src/staticdata/productorigin.ts": {
|
|
@@ -2766,9 +2781,14 @@
|
|
|
2766
2781
|
"signature": "fd822c40807b9622276013800239377094976c7abc6dd30837569da3097afee7",
|
|
2767
2782
|
"affectsGlobalScope": false
|
|
2768
2783
|
},
|
|
2784
|
+
"../src/repositories/subscriptions/index.ts": {
|
|
2785
|
+
"version": "a4b854981256f03ee5d161aa7217584be0b4e5dae7493f9c044f93b37537cde0",
|
|
2786
|
+
"signature": "5acfd1d20663293dafb88d0837cc307ec13a3e8ac578899f228492ced33f7b03",
|
|
2787
|
+
"affectsGlobalScope": false
|
|
2788
|
+
},
|
|
2769
2789
|
"../src/repositories/index.ts": {
|
|
2770
|
-
"version": "
|
|
2771
|
-
"signature": "
|
|
2790
|
+
"version": "2264dc4bf25966b73472cb6917431c830ae7f4eabbbcc748a0917fdf20818bce",
|
|
2791
|
+
"signature": "03b8252e8893161e233d1b11d74a4045f7e78094508b969947f7b4a8df65e876",
|
|
2772
2792
|
"affectsGlobalScope": false
|
|
2773
2793
|
},
|
|
2774
2794
|
"../src/subscribers/productsubscriber.ts": {
|
|
@@ -3136,6 +3156,16 @@
|
|
|
3136
3156
|
"signature": "1d703d70b320ef1ecf2f304877e53f68f1fe6a14de4f80db592b8472705ca997",
|
|
3137
3157
|
"affectsGlobalScope": false
|
|
3138
3158
|
},
|
|
3159
|
+
"../src/migrations/1681485990275-template-ecommerce-two.ts": {
|
|
3160
|
+
"version": "1990c308d7caccbbda7706ea9b70bc8d7a09fee7729a083b8dd87ff3c552b72f",
|
|
3161
|
+
"signature": "c954fe3cd013dd874cd5754bef83552b5600b19563092a8c699b2c490a9c9cb4",
|
|
3162
|
+
"affectsGlobalScope": false
|
|
3163
|
+
},
|
|
3164
|
+
"../src/migrations/1681741033630-subscriptions.ts": {
|
|
3165
|
+
"version": "084c6e083664a66125a81e97074d06fbd1c095a54053484a957c935eefae376d",
|
|
3166
|
+
"signature": "a5083d4216fe33cafecb5b62bd8af8e186c7bc9bbf4296ae5c1a31fc169ab0e7",
|
|
3167
|
+
"affectsGlobalScope": false
|
|
3168
|
+
},
|
|
3139
3169
|
"../src/migrations/execute/index.ts": {
|
|
3140
3170
|
"version": "8b5bf13d095aeb57afd593adf3d799681176a13c327e2f77e0028e178c4ee3b9",
|
|
3141
3171
|
"signature": "8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881",
|
|
@@ -5211,6 +5241,10 @@
|
|
|
5211
5241
|
"../src/entity/customproduct.ts",
|
|
5212
5242
|
"../src/entity/variant.ts"
|
|
5213
5243
|
],
|
|
5244
|
+
"../src/entity/environmentconfiguration.ts": [
|
|
5245
|
+
"../node_modules/typeorm/index.d.ts",
|
|
5246
|
+
"../src/entity/auditedmodel.ts"
|
|
5247
|
+
],
|
|
5214
5248
|
"../src/entity/exchangerate.ts": [
|
|
5215
5249
|
"../node_modules/typeorm/index.d.ts",
|
|
5216
5250
|
"../src/entity/auditedmodel.ts"
|
|
@@ -5263,6 +5297,7 @@
|
|
|
5263
5297
|
"../src/entity/customproduct.ts",
|
|
5264
5298
|
"../src/entity/customproductimage.ts",
|
|
5265
5299
|
"../src/entity/customvariant.ts",
|
|
5300
|
+
"../src/entity/environmentconfiguration.ts",
|
|
5266
5301
|
"../src/entity/exchangerate.ts",
|
|
5267
5302
|
"../src/entity/flatrate.ts",
|
|
5268
5303
|
"../src/entity/flatratecountry.ts",
|
|
@@ -5280,6 +5315,8 @@
|
|
|
5280
5315
|
"../src/entity/modules/shopcart/checkoutbillingaddress.ts",
|
|
5281
5316
|
"../src/entity/modules/shopcart/checkoutshippingaddress.ts",
|
|
5282
5317
|
"../src/entity/modules/shopcart/pricedata.ts",
|
|
5318
|
+
"../src/entity/modules/subscriptions/plan.ts",
|
|
5319
|
+
"../src/entity/modules/subscriptions/subscription.ts",
|
|
5283
5320
|
"../src/entity/modules/templates/authinfo.ts",
|
|
5284
5321
|
"../src/entity/modules/templates/authmethod.ts",
|
|
5285
5322
|
"../src/entity/modules/templates/endpointtemplateecommerce.ts",
|
|
@@ -5385,6 +5422,16 @@
|
|
|
5385
5422
|
"../node_modules/typeorm/index.d.ts",
|
|
5386
5423
|
"../src/entity/modules/shopcart/cartitem.ts"
|
|
5387
5424
|
],
|
|
5425
|
+
"../src/entity/modules/subscriptions/plan.ts": [
|
|
5426
|
+
"../node_modules/typeorm/index.d.ts",
|
|
5427
|
+
"../src/entity/auditedmodel.ts"
|
|
5428
|
+
],
|
|
5429
|
+
"../src/entity/modules/subscriptions/subscription.ts": [
|
|
5430
|
+
"../node_modules/typeorm/index.d.ts",
|
|
5431
|
+
"../src/entity/auditedmodel.ts",
|
|
5432
|
+
"../src/entity/modules/subscriptions/plan.ts",
|
|
5433
|
+
"../src/entity/user.ts"
|
|
5434
|
+
],
|
|
5388
5435
|
"../src/entity/modules/templates/authinfo.ts": [
|
|
5389
5436
|
"../node_modules/typeorm/index.d.ts",
|
|
5390
5437
|
"../src/entity/auditedmodel.ts",
|
|
@@ -5859,6 +5906,12 @@
|
|
|
5859
5906
|
"../src/migrations/1681485048240-template-ecommerce.ts": [
|
|
5860
5907
|
"../node_modules/typeorm/index.d.ts"
|
|
5861
5908
|
],
|
|
5909
|
+
"../src/migrations/1681485990275-template-ecommerce-two.ts": [
|
|
5910
|
+
"../node_modules/typeorm/index.d.ts"
|
|
5911
|
+
],
|
|
5912
|
+
"../src/migrations/1681741033630-subscriptions.ts": [
|
|
5913
|
+
"../node_modules/typeorm/index.d.ts"
|
|
5914
|
+
],
|
|
5862
5915
|
"../src/migrations/execute/index.ts": [
|
|
5863
5916
|
"../src/config/connect.ts"
|
|
5864
5917
|
],
|
|
@@ -5897,6 +5950,7 @@
|
|
|
5897
5950
|
"../src/entity/customproduct.ts",
|
|
5898
5951
|
"../src/entity/customproductimage.ts",
|
|
5899
5952
|
"../src/entity/customvariant.ts",
|
|
5953
|
+
"../src/entity/environmentconfiguration.ts",
|
|
5900
5954
|
"../src/entity/exchangerate.ts",
|
|
5901
5955
|
"../src/entity/flatrate.ts",
|
|
5902
5956
|
"../src/entity/flatratecountry.ts",
|
|
@@ -5932,6 +5986,7 @@
|
|
|
5932
5986
|
"../src/entity/wooconnection.ts",
|
|
5933
5987
|
"../src/repositories/shipping/index.ts",
|
|
5934
5988
|
"../src/repositories/shopcart/index.ts",
|
|
5989
|
+
"../src/repositories/subscriptions/index.ts",
|
|
5935
5990
|
"../src/repositories/templates/index.ts"
|
|
5936
5991
|
],
|
|
5937
5992
|
"../src/repositories/shipping/index.ts": [
|
|
@@ -5949,6 +6004,11 @@
|
|
|
5949
6004
|
"../src/entity/modules/shopcart/checkoutshippingaddress.ts",
|
|
5950
6005
|
"../src/entity/modules/shopcart/pricedata.ts"
|
|
5951
6006
|
],
|
|
6007
|
+
"../src/repositories/subscriptions/index.ts": [
|
|
6008
|
+
"../node_modules/typeorm/index.d.ts",
|
|
6009
|
+
"../src/entity/modules/subscriptions/plan.ts",
|
|
6010
|
+
"../src/entity/modules/subscriptions/subscription.ts"
|
|
6011
|
+
],
|
|
5952
6012
|
"../src/repositories/templates/index.ts": [
|
|
5953
6013
|
"../node_modules/typeorm/index.d.ts",
|
|
5954
6014
|
"../src/entity/modules/templates/authinfo.ts",
|
|
@@ -7881,6 +7941,9 @@
|
|
|
7881
7941
|
"../src/entity/customproduct.ts",
|
|
7882
7942
|
"../src/entity/variant.ts"
|
|
7883
7943
|
],
|
|
7944
|
+
"../src/entity/environmentconfiguration.ts": [
|
|
7945
|
+
"../src/entity/auditedmodel.ts"
|
|
7946
|
+
],
|
|
7884
7947
|
"../src/entity/exchangerate.ts": [
|
|
7885
7948
|
"../src/entity/auditedmodel.ts"
|
|
7886
7949
|
],
|
|
@@ -7925,6 +7988,7 @@
|
|
|
7925
7988
|
"../src/entity/customproduct.ts",
|
|
7926
7989
|
"../src/entity/customproductimage.ts",
|
|
7927
7990
|
"../src/entity/customvariant.ts",
|
|
7991
|
+
"../src/entity/environmentconfiguration.ts",
|
|
7928
7992
|
"../src/entity/exchangerate.ts",
|
|
7929
7993
|
"../src/entity/flatrate.ts",
|
|
7930
7994
|
"../src/entity/flatratecountry.ts",
|
|
@@ -7942,6 +8006,8 @@
|
|
|
7942
8006
|
"../src/entity/modules/shopcart/checkoutbillingaddress.ts",
|
|
7943
8007
|
"../src/entity/modules/shopcart/checkoutshippingaddress.ts",
|
|
7944
8008
|
"../src/entity/modules/shopcart/pricedata.ts",
|
|
8009
|
+
"../src/entity/modules/subscriptions/plan.ts",
|
|
8010
|
+
"../src/entity/modules/subscriptions/subscription.ts",
|
|
7945
8011
|
"../src/entity/modules/templates/authinfo.ts",
|
|
7946
8012
|
"../src/entity/modules/templates/authmethod.ts",
|
|
7947
8013
|
"../src/entity/modules/templates/endpointtemplateecommerce.ts",
|
|
@@ -8034,6 +8100,14 @@
|
|
|
8034
8100
|
"../src/entity/modules/shopcart/pricedata.ts": [
|
|
8035
8101
|
"../src/entity/modules/shopcart/cartitem.ts"
|
|
8036
8102
|
],
|
|
8103
|
+
"../src/entity/modules/subscriptions/plan.ts": [
|
|
8104
|
+
"../src/entity/auditedmodel.ts"
|
|
8105
|
+
],
|
|
8106
|
+
"../src/entity/modules/subscriptions/subscription.ts": [
|
|
8107
|
+
"../src/entity/auditedmodel.ts",
|
|
8108
|
+
"../src/entity/modules/subscriptions/plan.ts",
|
|
8109
|
+
"../src/entity/user.ts"
|
|
8110
|
+
],
|
|
8037
8111
|
"../src/entity/modules/templates/authinfo.ts": [
|
|
8038
8112
|
"../src/entity/auditedmodel.ts",
|
|
8039
8113
|
"../src/entity/modules/templates/usertemplateecommerce.ts"
|
|
@@ -8434,6 +8508,12 @@
|
|
|
8434
8508
|
"../src/migrations/1681485048240-template-ecommerce.ts": [
|
|
8435
8509
|
"../node_modules/typeorm/index.d.ts"
|
|
8436
8510
|
],
|
|
8511
|
+
"../src/migrations/1681485990275-template-ecommerce-two.ts": [
|
|
8512
|
+
"../node_modules/typeorm/index.d.ts"
|
|
8513
|
+
],
|
|
8514
|
+
"../src/migrations/1681741033630-subscriptions.ts": [
|
|
8515
|
+
"../node_modules/typeorm/index.d.ts"
|
|
8516
|
+
],
|
|
8437
8517
|
"../src/migrations/index.ts": [
|
|
8438
8518
|
"../src/migrations/1628474597284-initialschema.ts",
|
|
8439
8519
|
"../src/migrations/1630077596132-removemangopay.ts",
|
|
@@ -8469,6 +8549,7 @@
|
|
|
8469
8549
|
"../src/entity/customproduct.ts",
|
|
8470
8550
|
"../src/entity/customproductimage.ts",
|
|
8471
8551
|
"../src/entity/customvariant.ts",
|
|
8552
|
+
"../src/entity/environmentconfiguration.ts",
|
|
8472
8553
|
"../src/entity/exchangerate.ts",
|
|
8473
8554
|
"../src/entity/flatrate.ts",
|
|
8474
8555
|
"../src/entity/flatratecountry.ts",
|
|
@@ -8504,6 +8585,7 @@
|
|
|
8504
8585
|
"../src/entity/wooconnection.ts",
|
|
8505
8586
|
"../src/repositories/shipping/index.ts",
|
|
8506
8587
|
"../src/repositories/shopcart/index.ts",
|
|
8588
|
+
"../src/repositories/subscriptions/index.ts",
|
|
8507
8589
|
"../src/repositories/templates/index.ts"
|
|
8508
8590
|
],
|
|
8509
8591
|
"../src/repositories/shipping/index.ts": [
|
|
@@ -8521,6 +8603,11 @@
|
|
|
8521
8603
|
"../src/entity/modules/shopcart/checkoutshippingaddress.ts",
|
|
8522
8604
|
"../src/entity/modules/shopcart/pricedata.ts"
|
|
8523
8605
|
],
|
|
8606
|
+
"../src/repositories/subscriptions/index.ts": [
|
|
8607
|
+
"../node_modules/typeorm/index.d.ts",
|
|
8608
|
+
"../src/entity/modules/subscriptions/plan.ts",
|
|
8609
|
+
"../src/entity/modules/subscriptions/subscription.ts"
|
|
8610
|
+
],
|
|
8524
8611
|
"../src/repositories/templates/index.ts": [
|
|
8525
8612
|
"../node_modules/typeorm/index.d.ts",
|
|
8526
8613
|
"../src/entity/modules/templates/authinfo.ts",
|
|
@@ -9075,6 +9162,7 @@
|
|
|
9075
9162
|
"../src/entity/customproduct.ts",
|
|
9076
9163
|
"../src/entity/customproductimage.ts",
|
|
9077
9164
|
"../src/entity/customvariant.ts",
|
|
9165
|
+
"../src/entity/environmentconfiguration.ts",
|
|
9078
9166
|
"../src/entity/exchangerate.ts",
|
|
9079
9167
|
"../src/entity/flatrate.ts",
|
|
9080
9168
|
"../src/entity/flatratecountry.ts",
|
|
@@ -9093,6 +9181,8 @@
|
|
|
9093
9181
|
"../src/entity/modules/shopcart/checkoutbillingaddress.ts",
|
|
9094
9182
|
"../src/entity/modules/shopcart/checkoutshippingaddress.ts",
|
|
9095
9183
|
"../src/entity/modules/shopcart/pricedata.ts",
|
|
9184
|
+
"../src/entity/modules/subscriptions/plan.ts",
|
|
9185
|
+
"../src/entity/modules/subscriptions/subscription.ts",
|
|
9096
9186
|
"../src/entity/modules/templates/authinfo.ts",
|
|
9097
9187
|
"../src/entity/modules/templates/authmethod.ts",
|
|
9098
9188
|
"../src/entity/modules/templates/endpointtemplateecommerce.ts",
|
|
@@ -9199,11 +9289,14 @@
|
|
|
9199
9289
|
"../src/migrations/1681236978678-template-channel-update.ts",
|
|
9200
9290
|
"../src/migrations/1681258240525-template-channel-update-2.ts",
|
|
9201
9291
|
"../src/migrations/1681485048240-template-ecommerce.ts",
|
|
9292
|
+
"../src/migrations/1681485990275-template-ecommerce-two.ts",
|
|
9293
|
+
"../src/migrations/1681741033630-subscriptions.ts",
|
|
9202
9294
|
"../src/migrations/execute/index.ts",
|
|
9203
9295
|
"../src/migrations/index.ts",
|
|
9204
9296
|
"../src/repositories/index.ts",
|
|
9205
9297
|
"../src/repositories/shipping/index.ts",
|
|
9206
9298
|
"../src/repositories/shopcart/index.ts",
|
|
9299
|
+
"../src/repositories/subscriptions/index.ts",
|
|
9207
9300
|
"../src/repositories/templates/index.ts",
|
|
9208
9301
|
"../src/staticdata/channelname.ts",
|
|
9209
9302
|
"../src/staticdata/connectiontype.ts",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reachu/database",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.26",
|
|
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.26",
|
|
25
|
+
"@reachu/utils": "1.0.26",
|
|
26
26
|
"dotenv": "8.0.0",
|
|
27
27
|
"express": "4.17.1",
|
|
28
28
|
"mysql2": "1.5.2",
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import AuditedModel from './AuditedModel';
|
|
2
|
+
import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';
|
|
3
|
+
|
|
4
|
+
@Entity()
|
|
5
|
+
export default class EnvironmentConfiguration extends AuditedModel {
|
|
6
|
+
@PrimaryGeneratedColumn()
|
|
7
|
+
id: number;
|
|
8
|
+
|
|
9
|
+
@Column('varchar')
|
|
10
|
+
key: string;
|
|
11
|
+
|
|
12
|
+
@Column('varchar')
|
|
13
|
+
value: string;
|
|
14
|
+
|
|
15
|
+
@Column('varchar', { length: 20 })
|
|
16
|
+
stage: string;
|
|
17
|
+
}
|
package/src/entity/index.ts
CHANGED
|
@@ -56,6 +56,7 @@ import ChannelUserProductSync from './ChannelUserProductSync';
|
|
|
56
56
|
import UserChannelApiKey from './UserChannelApiKey';
|
|
57
57
|
import Currency from './Currency';
|
|
58
58
|
import ExchangeRate from './ExchangeRate';
|
|
59
|
+
import EnvironmentConfiguration from './EnvironmentConfiguration';
|
|
59
60
|
|
|
60
61
|
//shopCart
|
|
61
62
|
import Cart from './modules/shopcart/Cart';
|
|
@@ -97,6 +98,10 @@ import ReachuSchemeConfigVariant from './modules/templates/schemeVariant/ReachuS
|
|
|
97
98
|
import TemplateEcommerceSchemeConfigVariant from './modules/templates/schemeVariant/TemplateEcommerceSchemeConfigVariant';
|
|
98
99
|
import TemplateEcommerceSchemeConfigVariantMapped from './modules/templates/schemeVariant/TemplateEcommerceSchemeConfigVariantMapped';
|
|
99
100
|
|
|
101
|
+
//Subscriptions
|
|
102
|
+
import Plan from './modules/subscriptions/Plan';
|
|
103
|
+
import Subscription from './modules/subscriptions/Subscription';
|
|
104
|
+
|
|
100
105
|
export {
|
|
101
106
|
CustomVariant,
|
|
102
107
|
CustomProduct,
|
|
@@ -185,4 +190,7 @@ export {
|
|
|
185
190
|
TemplateEcommerceSchemeConfigVariant,
|
|
186
191
|
TemplateEcommerceSchemeConfigVariantMapped,
|
|
187
192
|
ReachuSchemeConfigVariant,
|
|
193
|
+
Plan,
|
|
194
|
+
Subscription,
|
|
195
|
+
EnvironmentConfiguration,
|
|
188
196
|
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import AuditedModel from '../../AuditedModel';
|
|
2
|
+
import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';
|
|
3
|
+
|
|
4
|
+
@Entity()
|
|
5
|
+
export default class Plan extends AuditedModel {
|
|
6
|
+
@PrimaryGeneratedColumn()
|
|
7
|
+
id: number;
|
|
8
|
+
|
|
9
|
+
@Column('varchar', { length: 100 })
|
|
10
|
+
name: string;
|
|
11
|
+
|
|
12
|
+
@Column('varchar', { nullable: true })
|
|
13
|
+
description: string;
|
|
14
|
+
|
|
15
|
+
@Column('varchar', { nullable: true })
|
|
16
|
+
originId: string;
|
|
17
|
+
|
|
18
|
+
@Column('varchar', { nullable: true })
|
|
19
|
+
response: string;
|
|
20
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import AuditedModel from '../../AuditedModel';
|
|
2
|
+
import User from '../../User';
|
|
3
|
+
import Plan from './Plan';
|
|
4
|
+
|
|
5
|
+
import { Column, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn } from 'typeorm';
|
|
6
|
+
|
|
7
|
+
@Entity()
|
|
8
|
+
export default class Subscription extends AuditedModel {
|
|
9
|
+
@PrimaryGeneratedColumn()
|
|
10
|
+
id: number;
|
|
11
|
+
|
|
12
|
+
@ManyToOne(() => User, (user: User) => user.id, { eager: true, onDelete: 'CASCADE' })
|
|
13
|
+
@JoinColumn()
|
|
14
|
+
user: User;
|
|
15
|
+
|
|
16
|
+
@ManyToOne(() => Plan, (plan: Plan) => plan.id, { eager: true, onDelete: 'CASCADE' })
|
|
17
|
+
@JoinColumn()
|
|
18
|
+
plan: Plan;
|
|
19
|
+
|
|
20
|
+
@Column('varchar', { nullable: true })
|
|
21
|
+
customerId: string;
|
|
22
|
+
|
|
23
|
+
@Column('boolean')
|
|
24
|
+
isProd: boolean;
|
|
25
|
+
|
|
26
|
+
@Column('varchar', { length: 100, nullable: true })
|
|
27
|
+
status: string;
|
|
28
|
+
|
|
29
|
+
@Column('varchar', { nullable: true })
|
|
30
|
+
originId: string;
|
|
31
|
+
|
|
32
|
+
@Column('varchar', { nullable: true })
|
|
33
|
+
response: string;
|
|
34
|
+
}
|
|
@@ -31,6 +31,12 @@ export default class TemplateEcommerce extends AuditedModel {
|
|
|
31
31
|
@Column('varchar', { nullable: false })
|
|
32
32
|
name: string;
|
|
33
33
|
|
|
34
|
+
@Column({ type: 'boolean', default: false })
|
|
35
|
+
public: boolean;
|
|
36
|
+
|
|
37
|
+
@Column('varchar', { nullable: false })
|
|
38
|
+
image: string;
|
|
39
|
+
|
|
34
40
|
@ManyToOne(() => AuthMethod, (authMethod: AuthMethod) => authMethod.templateEcommerce, {
|
|
35
41
|
eager: true,
|
|
36
42
|
onDelete: 'CASCADE',
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {MigrationInterface, QueryRunner} from "typeorm";
|
|
2
|
+
|
|
3
|
+
export class templateEcommerceTwo1681485990275 implements MigrationInterface {
|
|
4
|
+
name = 'templateEcommerceTwo1681485990275'
|
|
5
|
+
|
|
6
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE \`template_ecommerce\` ADD \`public\` tinyint NOT NULL DEFAULT 0`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE \`template_ecommerce\` ADD \`image\` varchar(255) NOT NULL`);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
12
|
+
await queryRunner.query(`ALTER TABLE \`template_ecommerce\` DROP COLUMN \`image\``);
|
|
13
|
+
await queryRunner.query(`ALTER TABLE \`template_ecommerce\` DROP COLUMN \`public\``);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {MigrationInterface, QueryRunner} from "typeorm";
|
|
2
|
+
|
|
3
|
+
export class Subscriptions1681741033630 implements MigrationInterface {
|
|
4
|
+
name = 'Subscriptions1681741033630'
|
|
5
|
+
|
|
6
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
7
|
+
await queryRunner.query(`CREATE TABLE \`environment_configuration\` (\`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, \`key\` varchar(255) NOT NULL, \`value\` varchar(255) NOT NULL, \`stage\` varchar(20) NOT NULL, PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
|
|
8
|
+
await queryRunner.query(`CREATE TABLE \`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, \`name\` varchar(100) NOT NULL, \`description\` varchar(255) NULL, \`origin_id\` varchar(255) NULL, \`response\` varchar(255) NULL, PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
|
|
9
|
+
await queryRunner.query(`CREATE TABLE \`subscription\` (\`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, \`customer_id\` varchar(255) NULL, \`is_prod\` tinyint NOT NULL, \`status\` varchar(100) NULL, \`origin_id\` varchar(255) NULL, \`response\` varchar(255) NULL, \`user_id\` int NULL, \`plan_id\` int NULL, PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
|
|
10
|
+
await queryRunner.query(`ALTER TABLE \`subscription\` ADD CONSTRAINT \`FK_940d49a105d50bbd616be540013\` FOREIGN KEY (\`user_id\`) REFERENCES \`user\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
11
|
+
await queryRunner.query(`ALTER TABLE \`subscription\` ADD CONSTRAINT \`FK_5fde988e5d9b9a522d70ebec27c\` FOREIGN KEY (\`plan_id\`) REFERENCES \`plan\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
15
|
+
await queryRunner.query(`ALTER TABLE \`subscription\` DROP FOREIGN KEY \`FK_5fde988e5d9b9a522d70ebec27c\``);
|
|
16
|
+
await queryRunner.query(`ALTER TABLE \`subscription\` DROP FOREIGN KEY \`FK_940d49a105d50bbd616be540013\``);
|
|
17
|
+
await queryRunner.query(`DROP TABLE \`subscription\``);
|
|
18
|
+
await queryRunner.query(`DROP TABLE \`plan\``);
|
|
19
|
+
await queryRunner.query(`DROP TABLE \`environment_configuration\``);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
}
|
|
@@ -55,6 +55,8 @@ import Attribute from '../entity/Attribute';
|
|
|
55
55
|
import ProductAttribute from '../entity/ProductAttribute';
|
|
56
56
|
import CategoryImages from '../entity/CategoryImages';
|
|
57
57
|
|
|
58
|
+
import EnvironmentConfiguration from '../entity/EnvironmentConfiguration';
|
|
59
|
+
|
|
58
60
|
import {
|
|
59
61
|
CartItemRepository,
|
|
60
62
|
CartRepository,
|
|
@@ -87,6 +89,8 @@ import {
|
|
|
87
89
|
UserTemplateEcommerceRepository,
|
|
88
90
|
} from './templates';
|
|
89
91
|
|
|
92
|
+
import { PlanRepository, SubscriptionRepository } from './subscriptions';
|
|
93
|
+
|
|
90
94
|
import { Repository, EntityRepository } from 'typeorm';
|
|
91
95
|
|
|
92
96
|
@EntityRepository(CategoryImages)
|
|
@@ -251,6 +255,9 @@ export class CurrencyRepository extends Repository<Currency> {}
|
|
|
251
255
|
@EntityRepository(ExchangeRate)
|
|
252
256
|
export class ExchangeRateRepository extends Repository<ExchangeRate> {}
|
|
253
257
|
|
|
258
|
+
@EntityRepository(EnvironmentConfiguration)
|
|
259
|
+
export class EnvironmentConfigurationRepository extends Repository<EnvironmentConfiguration> {}
|
|
260
|
+
|
|
254
261
|
export {
|
|
255
262
|
CartItemRepository,
|
|
256
263
|
CartRepository,
|
|
@@ -278,3 +285,5 @@ export {
|
|
|
278
285
|
};
|
|
279
286
|
|
|
280
287
|
export { ProductShippingRepository, ShippingCountryRepository, ShippingRepository };
|
|
288
|
+
|
|
289
|
+
export { PlanRepository, SubscriptionRepository };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Repository, EntityRepository } from 'typeorm';
|
|
2
|
+
import Plan from '../../entity/modules/subscriptions/Plan';
|
|
3
|
+
import Subscription from '../../entity/modules/subscriptions/Subscription';
|
|
4
|
+
|
|
5
|
+
@EntityRepository(Plan)
|
|
6
|
+
export class PlanRepository extends Repository<Plan> {}
|
|
7
|
+
|
|
8
|
+
@EntityRepository(Subscription)
|
|
9
|
+
export class SubscriptionRepository extends Repository<Subscription> {}
|