@spytecgps/nova-orm 1.0.85 → 1.0.87
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/entities/asinPromotion.d.ts +4 -0
- package/dist/entities/asinPromotion.js +27 -0
- package/dist/entities/asinPromotion.js.map +1 -0
- package/dist/entities/client.d.ts +0 -2
- package/dist/entities/client.js +0 -6
- package/dist/entities/client.js.map +1 -1
- package/dist/entities/device.js +1 -0
- package/dist/entities/device.js.map +1 -1
- package/dist/entities/devicePromotion.d.ts +0 -13
- package/dist/entities/devicePromotion.js +1 -79
- package/dist/entities/devicePromotion.js.map +1 -1
- package/dist/entities/deviceType.d.ts +0 -2
- package/dist/entities/deviceType.js +0 -6
- package/dist/entities/deviceType.js.map +1 -1
- package/dist/entities/deviceTypePromotion.d.ts +4 -0
- package/dist/entities/deviceTypePromotion.js +27 -0
- package/dist/entities/deviceTypePromotion.js.map +1 -0
- package/dist/entities/marketplacePromotion.d.ts +4 -0
- package/dist/entities/marketplacePromotion.js +27 -0
- package/dist/entities/marketplacePromotion.js.map +1 -0
- package/dist/entities/notificationRecipient.js +1 -0
- package/dist/entities/notificationRecipient.js.map +1 -1
- package/dist/entities/promotion.d.ts +2 -10
- package/dist/entities/promotion.js +17 -43
- package/dist/entities/promotion.js.map +1 -1
- package/dist/entities/promotionHistory.d.ts +12 -0
- package/dist/entities/promotionHistory.js +89 -0
- package/dist/entities/promotionHistory.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/repositories/tasks/completeTask.js +2 -0
- package/dist/repositories/tasks/completeTask.js.map +1 -1
- package/dist/types/tasks.d.ts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { Column, Entity } from 'typeorm';
|
|
11
|
+
let AsinPromotion = class AsinPromotion {
|
|
12
|
+
asin;
|
|
13
|
+
promotionId;
|
|
14
|
+
};
|
|
15
|
+
__decorate([
|
|
16
|
+
Column('varchar', { name: 'asin', length: 15, primary: true }),
|
|
17
|
+
__metadata("design:type", String)
|
|
18
|
+
], AsinPromotion.prototype, "asin", void 0);
|
|
19
|
+
__decorate([
|
|
20
|
+
Column('bigint', { name: 'promotionId', primary: true }),
|
|
21
|
+
__metadata("design:type", Number)
|
|
22
|
+
], AsinPromotion.prototype, "promotionId", void 0);
|
|
23
|
+
AsinPromotion = __decorate([
|
|
24
|
+
Entity('asinPromotion', { schema: 'nova' })
|
|
25
|
+
], AsinPromotion);
|
|
26
|
+
export { AsinPromotion };
|
|
27
|
+
//# sourceMappingURL=asinPromotion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"asinPromotion.js","sourceRoot":"","sources":["../../src/entities/asinPromotion.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAGjC,IAAM,aAAa,GAAnB,MAAM,aAAa;IAExB,IAAI,CAAQ;IAGZ,WAAW,CAAQ;CACpB,CAAA;AALC;IAAC,MAAM,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;2CACnD;AAEZ;IAAC,MAAM,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;kDACtC;AALR,aAAa;IADzB,MAAM,CAAC,eAAe,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;GAC/B,aAAa,CAMzB;SANY,aAAa"}
|
|
@@ -5,7 +5,6 @@ import { CustomerAttribute } from './customerAttribute';
|
|
|
5
5
|
import { Device } from './device';
|
|
6
6
|
import { DeviceCustomConfiguration } from './deviceCustomConfiguration';
|
|
7
7
|
import { Organization } from './organization';
|
|
8
|
-
import { Promotion } from './promotion';
|
|
9
8
|
import { User } from './user';
|
|
10
9
|
export declare class Client {
|
|
11
10
|
id: number;
|
|
@@ -29,7 +28,6 @@ export declare class Client {
|
|
|
29
28
|
organization: Relation<Organization>;
|
|
30
29
|
users: Relation<User>[];
|
|
31
30
|
devices: Relation<Device>[];
|
|
32
|
-
promotions: Relation<Promotion>[];
|
|
33
31
|
deviceCustomConfigurations: Relation<DeviceCustomConfiguration>[];
|
|
34
32
|
customerAttribute: Relation<CustomerAttribute>;
|
|
35
33
|
}
|
package/dist/entities/client.js
CHANGED
|
@@ -13,7 +13,6 @@ import { CustomerAttribute } from './customerAttribute';
|
|
|
13
13
|
import { Device } from './device';
|
|
14
14
|
import { DeviceCustomConfiguration } from './deviceCustomConfiguration';
|
|
15
15
|
import { Organization } from './organization';
|
|
16
|
-
import { Promotion } from './promotion';
|
|
17
16
|
import { User } from './user';
|
|
18
17
|
let Client = class Client {
|
|
19
18
|
id;
|
|
@@ -37,7 +36,6 @@ let Client = class Client {
|
|
|
37
36
|
organization;
|
|
38
37
|
users;
|
|
39
38
|
devices;
|
|
40
|
-
promotions;
|
|
41
39
|
deviceCustomConfigurations;
|
|
42
40
|
customerAttribute;
|
|
43
41
|
};
|
|
@@ -131,10 +129,6 @@ __decorate([
|
|
|
131
129
|
OneToMany(() => Device, device => device.client),
|
|
132
130
|
__metadata("design:type", Array)
|
|
133
131
|
], Client.prototype, "devices", void 0);
|
|
134
|
-
__decorate([
|
|
135
|
-
OneToMany(() => Promotion, promotion => promotion.client),
|
|
136
|
-
__metadata("design:type", Array)
|
|
137
|
-
], Client.prototype, "promotions", void 0);
|
|
138
132
|
__decorate([
|
|
139
133
|
OneToMany(() => DeviceCustomConfiguration, deviceCustomConfiguration => deviceCustomConfiguration.client),
|
|
140
134
|
__metadata("design:type", Array)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/entities/client.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACL,MAAM,EACN,MAAM,EACN,KAAK,EACL,UAAU,EACV,SAAS,EACT,SAAS,EACT,QAAQ,EACR,sBAAsB,GAEvB,MAAM,SAAS,CAAA;AAEhB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/entities/client.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACL,MAAM,EACN,MAAM,EACN,KAAK,EACL,UAAU,EACV,SAAS,EACT,SAAS,EACT,QAAQ,EACR,sBAAsB,GAEvB,MAAM,SAAS,CAAA;AAEhB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AACvE,OAAO,EAAE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E,WAAW,EAAE,KAAK,EAAE,CAAC;IACnD,MAAM,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;GACxB,MAAM,CAuFlB;SAvFY,MAAM"}
|
package/dist/entities/device.js
CHANGED
|
@@ -155,6 +155,7 @@ Device = __decorate([
|
|
|
155
155
|
Index('ixDeviceImei', ['imei'], {}),
|
|
156
156
|
Index('ixDeviceImeiLower', { synchronize: false }),
|
|
157
157
|
Index('ixDeviceStatus', ['status'], {}),
|
|
158
|
+
Index('ixDeviceClientIdImei', ['clientId', 'imei'], {}),
|
|
158
159
|
Entity('device', { schema: 'nova' })
|
|
159
160
|
], Device);
|
|
160
161
|
export { Device };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device.js","sourceRoot":"","sources":["../../src/entities/device.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACL,MAAM,EACN,MAAM,EACN,KAAK,EACL,UAAU,EACV,SAAS,EACT,QAAQ,EACR,sBAAsB,GAEvB,MAAM,SAAS,CAAA;AAEhB,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAA;AAC1E,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEjC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"device.js","sourceRoot":"","sources":["../../src/entities/device.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACL,MAAM,EACN,MAAM,EACN,KAAK,EACL,UAAU,EACV,SAAS,EACT,QAAQ,EACR,sBAAsB,GAEvB,MAAM,SAAS,CAAA;AAEhB,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAA;AAC1E,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEjC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAYlC,IAAM,MAAM,GAAZ,MAAM,MAAM;IAEjB,EAAE,CAAQ;IAGV,UAAU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AAM,CAAC,EAAE,EAAE,CAAC;IACnC,KAAK,CAAC,mBAAmB,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC;IAClD,KAAK,CAAC,gBAAgB,EAAE,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;IACvC,KAAK,CAAC,sBAAsB,EAAE,CAAC,UAAU,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC;IACvD,MAAM,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;GACxB,MAAM,CA0FlB;SA1FY,MAAM"}
|
|
@@ -1,17 +1,4 @@
|
|
|
1
|
-
import { Relation } from 'typeorm';
|
|
2
|
-
import { Client } from './client';
|
|
3
|
-
import { Promotion } from './promotion';
|
|
4
1
|
export declare class DevicePromotion {
|
|
5
2
|
imei: string;
|
|
6
3
|
promotionId: number;
|
|
7
|
-
promotion: Relation<Promotion>;
|
|
8
|
-
clientId: number;
|
|
9
|
-
client: Relation<Client>;
|
|
10
|
-
marketPlace: string;
|
|
11
|
-
asin: string;
|
|
12
|
-
promotionType: string;
|
|
13
|
-
promotionDiscount: number;
|
|
14
|
-
promotionDiscountBillingCycles: number;
|
|
15
|
-
promotionFreeServiceMonths: number;
|
|
16
|
-
appliedAt: Date;
|
|
17
4
|
}
|
|
@@ -7,22 +7,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
|
-
import { Column, Entity
|
|
11
|
-
import { Client } from './client';
|
|
12
|
-
import { Promotion } from './promotion';
|
|
10
|
+
import { Column, Entity } from 'typeorm';
|
|
13
11
|
let DevicePromotion = class DevicePromotion {
|
|
14
12
|
imei;
|
|
15
13
|
promotionId;
|
|
16
|
-
promotion;
|
|
17
|
-
clientId;
|
|
18
|
-
client;
|
|
19
|
-
marketPlace;
|
|
20
|
-
asin;
|
|
21
|
-
promotionType;
|
|
22
|
-
promotionDiscount;
|
|
23
|
-
promotionDiscountBillingCycles;
|
|
24
|
-
promotionFreeServiceMonths;
|
|
25
|
-
appliedAt;
|
|
26
14
|
};
|
|
27
15
|
__decorate([
|
|
28
16
|
Column('varchar', { name: 'imei', length: 15, primary: true }),
|
|
@@ -32,72 +20,6 @@ __decorate([
|
|
|
32
20
|
Column('bigint', { name: 'promotionId', primary: true }),
|
|
33
21
|
__metadata("design:type", Number)
|
|
34
22
|
], DevicePromotion.prototype, "promotionId", void 0);
|
|
35
|
-
__decorate([
|
|
36
|
-
OneToOne(() => Promotion, { createForeignKeyConstraints: false }),
|
|
37
|
-
JoinColumn(),
|
|
38
|
-
__metadata("design:type", Object)
|
|
39
|
-
], DevicePromotion.prototype, "promotion", void 0);
|
|
40
|
-
__decorate([
|
|
41
|
-
Column('int', { name: 'clientId', nullable: true }),
|
|
42
|
-
__metadata("design:type", Number)
|
|
43
|
-
], DevicePromotion.prototype, "clientId", void 0);
|
|
44
|
-
__decorate([
|
|
45
|
-
OneToOne(() => Client, {
|
|
46
|
-
createForeignKeyConstraints: false,
|
|
47
|
-
}),
|
|
48
|
-
JoinColumn(),
|
|
49
|
-
__metadata("design:type", Object)
|
|
50
|
-
], DevicePromotion.prototype, "client", void 0);
|
|
51
|
-
__decorate([
|
|
52
|
-
Column('varchar', {
|
|
53
|
-
name: 'marketPlace',
|
|
54
|
-
length: 25,
|
|
55
|
-
comment: 'The marketplace of the device at the time the promotion was applied',
|
|
56
|
-
}),
|
|
57
|
-
__metadata("design:type", String)
|
|
58
|
-
], DevicePromotion.prototype, "marketPlace", void 0);
|
|
59
|
-
__decorate([
|
|
60
|
-
Column('varchar', { name: 'asin', nullable: true, length: 25 }),
|
|
61
|
-
__metadata("design:type", String)
|
|
62
|
-
], DevicePromotion.prototype, "asin", void 0);
|
|
63
|
-
__decorate([
|
|
64
|
-
Column('varchar', {
|
|
65
|
-
name: 'promotionType',
|
|
66
|
-
length: 25,
|
|
67
|
-
comment: 'The type of promotion: freeService or discount.',
|
|
68
|
-
}),
|
|
69
|
-
__metadata("design:type", String)
|
|
70
|
-
], DevicePromotion.prototype, "promotionType", void 0);
|
|
71
|
-
__decorate([
|
|
72
|
-
Column('decimal', {
|
|
73
|
-
name: 'promotionDiscount',
|
|
74
|
-
nullable: true,
|
|
75
|
-
precision: 19,
|
|
76
|
-
scale: 4,
|
|
77
|
-
comment: 'The discount value if the type is discount offered in US Dollars.',
|
|
78
|
-
}),
|
|
79
|
-
__metadata("design:type", Number)
|
|
80
|
-
], DevicePromotion.prototype, "promotionDiscount", void 0);
|
|
81
|
-
__decorate([
|
|
82
|
-
Column('int', {
|
|
83
|
-
name: 'promotionDiscountBillingCycles',
|
|
84
|
-
nullable: true,
|
|
85
|
-
comment: 'The number of billing cycles that the discount will be applied. Required when type is discount',
|
|
86
|
-
}),
|
|
87
|
-
__metadata("design:type", Number)
|
|
88
|
-
], DevicePromotion.prototype, "promotionDiscountBillingCycles", void 0);
|
|
89
|
-
__decorate([
|
|
90
|
-
Column('int', {
|
|
91
|
-
name: 'promotionFreeServiceMonths',
|
|
92
|
-
nullable: true,
|
|
93
|
-
comment: 'The number of months that the service will be free. Required when type is freeService',
|
|
94
|
-
}),
|
|
95
|
-
__metadata("design:type", Number)
|
|
96
|
-
], DevicePromotion.prototype, "promotionFreeServiceMonths", void 0);
|
|
97
|
-
__decorate([
|
|
98
|
-
Column('datetime', { name: 'appliedAt', comment: 'The date that the promotion was applied' }),
|
|
99
|
-
__metadata("design:type", Date)
|
|
100
|
-
], DevicePromotion.prototype, "appliedAt", void 0);
|
|
101
23
|
DevicePromotion = __decorate([
|
|
102
24
|
Entity('devicePromotion', { schema: 'nova' })
|
|
103
25
|
], DevicePromotion);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devicePromotion.js","sourceRoot":"","sources":["../../src/entities/devicePromotion.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"devicePromotion.js","sourceRoot":"","sources":["../../src/entities/devicePromotion.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAGjC,IAAM,eAAe,GAArB,MAAM,eAAe;IAE1B,IAAI,CAAQ;IAGZ,WAAW,CAAQ;CACpB,CAAA;AALC;IAAC,MAAM,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;6CACnD;AAEZ;IAAC,MAAM,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;oDACtC;AALR,eAAe;IAD3B,MAAM,CAAC,iBAAiB,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;GACjC,eAAe,CAM3B;SANY,eAAe"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Relation } from 'typeorm';
|
|
2
2
|
import { Device } from './device';
|
|
3
|
-
import { Promotion } from './promotion';
|
|
4
3
|
export declare class DeviceType {
|
|
5
4
|
id: number;
|
|
6
5
|
brand: string;
|
|
@@ -23,6 +22,5 @@ export declare class DeviceType {
|
|
|
23
22
|
landingPage: string | null;
|
|
24
23
|
troubleshooting: string | null;
|
|
25
24
|
protocol: string | null;
|
|
26
|
-
promotions: Relation<Promotion>[];
|
|
27
25
|
devices: Relation<Device>[];
|
|
28
26
|
}
|
|
@@ -10,7 +10,6 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
import { Column, Entity, OneToMany, PrimaryGeneratedColumn } from 'typeorm';
|
|
11
11
|
import { BoolToNumberTransformer } from '../utils/boolToNumberTransformer';
|
|
12
12
|
import { Device } from './device';
|
|
13
|
-
import { Promotion } from './promotion';
|
|
14
13
|
let DeviceType = class DeviceType {
|
|
15
14
|
id;
|
|
16
15
|
brand;
|
|
@@ -33,7 +32,6 @@ let DeviceType = class DeviceType {
|
|
|
33
32
|
landingPage;
|
|
34
33
|
troubleshooting;
|
|
35
34
|
protocol;
|
|
36
|
-
promotions;
|
|
37
35
|
devices;
|
|
38
36
|
};
|
|
39
37
|
__decorate([
|
|
@@ -135,10 +133,6 @@ __decorate([
|
|
|
135
133
|
Column('varchar', { name: 'protocol', nullable: true, length: 50 }),
|
|
136
134
|
__metadata("design:type", String)
|
|
137
135
|
], DeviceType.prototype, "protocol", void 0);
|
|
138
|
-
__decorate([
|
|
139
|
-
OneToMany(() => Promotion, promotion => promotion.deviceType),
|
|
140
|
-
__metadata("design:type", Array)
|
|
141
|
-
], DeviceType.prototype, "promotions", void 0);
|
|
142
136
|
__decorate([
|
|
143
137
|
OneToMany(() => Device, device => device.deviceType),
|
|
144
138
|
__metadata("design:type", Array)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deviceType.js","sourceRoot":"","sources":["../../src/entities/deviceType.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,sBAAsB,EAAY,MAAM,SAAS,CAAA;AAErF,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAA;AAC1E,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"deviceType.js","sourceRoot":"","sources":["../../src/entities/deviceType.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,sBAAsB,EAAY,MAAM,SAAS,CAAA;AAErF,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAA;AAC1E,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAG1B,IAAM,UAAU,GAAhB,MAAM,UAAU;IAErB,EAAE,CAAQ;IAGV,KAAK,CAAQ;IAGb,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EAAE,CAAC;;iDAC5C;AAE5B;IAAC,MAAM,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;;yCAC7C;AAEpB;IAAC,MAAM,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;;kDACpC;AAEtB;IAAC,MAAM,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;+CAC/C;AAE1B;IAAC,MAAM,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;mDAC/C;AAE9B;IAAC,MAAM,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;;4CAC7C;AAEvB;IAAC,SAAS,CACR,GAAG,EAAE,CAAC,MAAM,EACZ,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,UAAU,CAC5B;;2CAC0B;AAnFhB,UAAU;IADtB,MAAM,CAAC,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;GAC5B,UAAU,CAoFtB;SApFY,UAAU"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { Column, Entity } from 'typeorm';
|
|
11
|
+
let DeviceTypePromotion = class DeviceTypePromotion {
|
|
12
|
+
deviceTypeId;
|
|
13
|
+
promotionId;
|
|
14
|
+
};
|
|
15
|
+
__decorate([
|
|
16
|
+
Column('smallint', { name: 'deviceTypeId', primary: true }),
|
|
17
|
+
__metadata("design:type", Number)
|
|
18
|
+
], DeviceTypePromotion.prototype, "deviceTypeId", void 0);
|
|
19
|
+
__decorate([
|
|
20
|
+
Column('bigint', { name: 'promotionId', primary: true }),
|
|
21
|
+
__metadata("design:type", Number)
|
|
22
|
+
], DeviceTypePromotion.prototype, "promotionId", void 0);
|
|
23
|
+
DeviceTypePromotion = __decorate([
|
|
24
|
+
Entity('deviceTypePromotion', { schema: 'nova' })
|
|
25
|
+
], DeviceTypePromotion);
|
|
26
|
+
export { DeviceTypePromotion };
|
|
27
|
+
//# sourceMappingURL=deviceTypePromotion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deviceTypePromotion.js","sourceRoot":"","sources":["../../src/entities/deviceTypePromotion.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAGjC,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAE9B,YAAY,CAAQ;IAGpB,WAAW,CAAQ;CACpB,CAAA;AALC;IAAC,MAAM,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;yDACxC;AAEpB;IAAC,MAAM,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;wDACtC;AALR,mBAAmB;IAD/B,MAAM,CAAC,qBAAqB,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;GACrC,mBAAmB,CAM/B;SANY,mBAAmB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { Column, Entity } from 'typeorm';
|
|
11
|
+
let MarketplacePromotion = class MarketplacePromotion {
|
|
12
|
+
marketplaceId;
|
|
13
|
+
promotionId;
|
|
14
|
+
};
|
|
15
|
+
__decorate([
|
|
16
|
+
Column('varchar', { name: 'marketplaceId', length: 15, primary: true }),
|
|
17
|
+
__metadata("design:type", String)
|
|
18
|
+
], MarketplacePromotion.prototype, "marketplaceId", void 0);
|
|
19
|
+
__decorate([
|
|
20
|
+
Column('bigint', { name: 'promotionId', primary: true }),
|
|
21
|
+
__metadata("design:type", Number)
|
|
22
|
+
], MarketplacePromotion.prototype, "promotionId", void 0);
|
|
23
|
+
MarketplacePromotion = __decorate([
|
|
24
|
+
Entity('marketplacePromotion', { schema: 'nova' })
|
|
25
|
+
], MarketplacePromotion);
|
|
26
|
+
export { MarketplacePromotion };
|
|
27
|
+
//# sourceMappingURL=marketplacePromotion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"marketplacePromotion.js","sourceRoot":"","sources":["../../src/entities/marketplacePromotion.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAGjC,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAE/B,aAAa,CAAQ;IAGrB,WAAW,CAAQ;CACpB,CAAA;AALC;IAAC,MAAM,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;2DACnD;AAErB;IAAC,MAAM,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;yDACtC;AALR,oBAAoB;IADhC,MAAM,CAAC,sBAAsB,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;GACtC,oBAAoB,CAMhC;SANY,oBAAoB"}
|
|
@@ -109,6 +109,7 @@ NotificationRecipient = __decorate([
|
|
|
109
109
|
Index('ixNotificationRecipientNotificationType', ['notificationType'], {}),
|
|
110
110
|
Index('ixNotificationRecipientRecipient', ['recipient'], {}),
|
|
111
111
|
Index('ixNotificationRecipientNotificationTypeRecipient', ['notificationType', 'recipient'], {}),
|
|
112
|
+
Index('ixNotificationRecipientClientIdUserIdNotificationTypeRecipient', ['clientId', 'userId', 'notificationType', 'recipient'], {}),
|
|
112
113
|
Entity('notificationRecipient', { schema: 'nova' })
|
|
113
114
|
], NotificationRecipient);
|
|
114
115
|
export { NotificationRecipient };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notificationRecipient.js","sourceRoot":"","sources":["../../src/entities/notificationRecipient.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACL,MAAM,EACN,MAAM,EACN,KAAK,EACL,UAAU,EACV,SAAS,EACT,sBAAsB,GAEvB,MAAM,SAAS,CAAA;AAE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QAAQ,EAAE,IAAI,EAAE,CAAC;IAC/F,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC,CAAC;;qEACtB;AA1D9C,qBAAqB;IAfjC,KAAK,CAAC,iDAAiD,EAAE,CAAC,UAAU,EAAE,WAAW,EAAE,QAAQ,CAAC,EAAE;QAC7F,MAAM,EAAE,IAAI;KACb,CAAC;IACD,KAAK,CAAC,iCAAiC,EAAE,CAAC,UAAU,CAAC,EAAE,EAAE,CAAC;IAC1D,KAAK,CAAC,kCAAkC,EAAE,CAAC,WAAW,CAAC,EAAE,EAAE,CAAC;IAC5D,KAAK,CAAC,sCAAsC,EAAE,CAAC,eAAe,CAAC,EAAE,EAAE,CAAC;IACpE,KAAK,CAAC,yCAAyC,EAAE,CAAC,kBAAkB,CAAC,EAAE,EAAE,CAAC;IAC1E,KAAK,CAAC,kCAAkC,EAAE,CAAC,WAAW,CAAC,EAAE,EAAE,CAAC;IAC5D,KAAK,CAAC,kDAAkD,EAAE,CAAC,kBAAkB,EAAE,WAAW,CAAC,EAAE,EAAE,CAAC;IAChG,KAAK,CACJ,gEAAgE,EAChE,CAAC,UAAU,EAAE,QAAQ,EAAE,kBAAkB,EAAE,WAAW,CAAC,EACvD,EAAE,CACH;IACA,MAAM,CAAC,uBAAuB,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;GACvC,qBAAqB,CA2DjC;SA3DY,qBAAqB"}
|
|
@@ -1,17 +1,7 @@
|
|
|
1
|
-
import { Relation } from 'typeorm';
|
|
2
|
-
import { Client } from './client';
|
|
3
|
-
import { DeviceType } from './deviceType';
|
|
4
1
|
export declare class Promotion {
|
|
5
2
|
id: number;
|
|
6
3
|
name: string;
|
|
7
4
|
description: string;
|
|
8
|
-
clientId: number;
|
|
9
|
-
client: Relation<Client>;
|
|
10
|
-
imei: string | null;
|
|
11
|
-
deviceTypeId: number;
|
|
12
|
-
deviceType: Relation<DeviceType>;
|
|
13
|
-
marketPlace: string;
|
|
14
|
-
asin: string;
|
|
15
5
|
type: string;
|
|
16
6
|
discount: number;
|
|
17
7
|
discountBillingCycles: number;
|
|
@@ -19,4 +9,6 @@ export declare class Promotion {
|
|
|
19
9
|
startDate: Date;
|
|
20
10
|
endDate: Date;
|
|
21
11
|
status: string;
|
|
12
|
+
bannerText: string;
|
|
13
|
+
trackerText: string;
|
|
22
14
|
}
|
|
@@ -7,20 +7,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
|
-
import { Column, Entity,
|
|
11
|
-
import { Client } from './client';
|
|
12
|
-
import { DeviceType } from './deviceType';
|
|
10
|
+
import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';
|
|
13
11
|
let Promotion = class Promotion {
|
|
14
12
|
id;
|
|
15
13
|
name;
|
|
16
14
|
description;
|
|
17
|
-
clientId;
|
|
18
|
-
client;
|
|
19
|
-
imei;
|
|
20
|
-
deviceTypeId;
|
|
21
|
-
deviceType;
|
|
22
|
-
marketPlace;
|
|
23
|
-
asin;
|
|
24
15
|
type;
|
|
25
16
|
discount;
|
|
26
17
|
discountBillingCycles;
|
|
@@ -28,6 +19,8 @@ let Promotion = class Promotion {
|
|
|
28
19
|
startDate;
|
|
29
20
|
endDate;
|
|
30
21
|
status;
|
|
22
|
+
bannerText;
|
|
23
|
+
trackerText;
|
|
31
24
|
};
|
|
32
25
|
__decorate([
|
|
33
26
|
PrimaryGeneratedColumn({ type: 'bigint', name: 'id' }),
|
|
@@ -41,39 +34,6 @@ __decorate([
|
|
|
41
34
|
Column('varchar', { name: 'description', length: 255 }),
|
|
42
35
|
__metadata("design:type", String)
|
|
43
36
|
], Promotion.prototype, "description", void 0);
|
|
44
|
-
__decorate([
|
|
45
|
-
Column('int', { name: 'clientId', nullable: true }),
|
|
46
|
-
__metadata("design:type", Number)
|
|
47
|
-
], Promotion.prototype, "clientId", void 0);
|
|
48
|
-
__decorate([
|
|
49
|
-
OneToMany(() => Client, client => client.promotions),
|
|
50
|
-
__metadata("design:type", Object)
|
|
51
|
-
], Promotion.prototype, "client", void 0);
|
|
52
|
-
__decorate([
|
|
53
|
-
Column('varchar', { name: 'imei', nullable: true, length: 15 }),
|
|
54
|
-
__metadata("design:type", String)
|
|
55
|
-
], Promotion.prototype, "imei", void 0);
|
|
56
|
-
__decorate([
|
|
57
|
-
Column('smallint', { name: 'deviceTypeId', nullable: true }),
|
|
58
|
-
__metadata("design:type", Number)
|
|
59
|
-
], Promotion.prototype, "deviceTypeId", void 0);
|
|
60
|
-
__decorate([
|
|
61
|
-
OneToMany(() => DeviceType, deviceType => deviceType.promotions),
|
|
62
|
-
__metadata("design:type", Object)
|
|
63
|
-
], Promotion.prototype, "deviceType", void 0);
|
|
64
|
-
__decorate([
|
|
65
|
-
Column('varchar', {
|
|
66
|
-
name: 'marketPlace',
|
|
67
|
-
length: 25,
|
|
68
|
-
nullable: true,
|
|
69
|
-
comment: 'Should be used to offer promotions to devices sold in a specific marketplace, as in AMZ US, MX, etc…',
|
|
70
|
-
}),
|
|
71
|
-
__metadata("design:type", String)
|
|
72
|
-
], Promotion.prototype, "marketPlace", void 0);
|
|
73
|
-
__decorate([
|
|
74
|
-
Column('varchar', { name: 'asin', nullable: true, length: 25 }),
|
|
75
|
-
__metadata("design:type", String)
|
|
76
|
-
], Promotion.prototype, "asin", void 0);
|
|
77
37
|
__decorate([
|
|
78
38
|
Column('varchar', {
|
|
79
39
|
name: 'type',
|
|
@@ -128,6 +88,20 @@ __decorate([
|
|
|
128
88
|
}),
|
|
129
89
|
__metadata("design:type", String)
|
|
130
90
|
], Promotion.prototype, "status", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
Column('varchar', {
|
|
93
|
+
name: 'bannerText',
|
|
94
|
+
length: 255,
|
|
95
|
+
}),
|
|
96
|
+
__metadata("design:type", String)
|
|
97
|
+
], Promotion.prototype, "bannerText", void 0);
|
|
98
|
+
__decorate([
|
|
99
|
+
Column('varchar', {
|
|
100
|
+
name: 'trackerText',
|
|
101
|
+
length: 255,
|
|
102
|
+
}),
|
|
103
|
+
__metadata("design:type", String)
|
|
104
|
+
], Promotion.prototype, "trackerText", void 0);
|
|
131
105
|
Promotion = __decorate([
|
|
132
106
|
Entity('promotion', { schema: 'nova' })
|
|
133
107
|
], Promotion);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"promotion.js","sourceRoot":"","sources":["../../src/entities/promotion.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"promotion.js","sourceRoot":"","sources":["../../src/entities/promotion.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAGzD,IAAM,SAAS,GAAf,MAAM,SAAS;IAEpB,EAAE,CAAQ;IAGV,IAAI,CAAQ;IAGZ,WAAW,CAAQ;IAOnB,IAAI,CAAQ;IASZ,QAAQ,CAAQ;IAQhB,qBAAqB,CAAQ;IAQ7B,iBAAiB,CAAQ;IAGzB,SAAS,CAAM;IAOf,OAAO,CAAM;IAOb,MAAM,CAAQ;IAMd,UAAU,CAAQ;IAMlB,WAAW,CAAQ;CACpB,CAAA;AArEC;IAAC,sBAAsB,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;qCAC7C;AAEV;IAAC,MAAM,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;uCACrC;AAEZ;IAAC,MAAM,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;8CACr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EAAE,MAAM,EAAE,CAAC;GAC3B,SAAS,CAsErB;SAtEY,SAAS"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare class PromotionHistory {
|
|
2
|
+
imei: string;
|
|
3
|
+
promotionId: number;
|
|
4
|
+
clientId: number;
|
|
5
|
+
marketPlaceId: string;
|
|
6
|
+
asin: string;
|
|
7
|
+
promotionType: string;
|
|
8
|
+
promotionDiscount: number;
|
|
9
|
+
promotionDiscountBillingCycles: number;
|
|
10
|
+
promotionFreeServiceMonths: number;
|
|
11
|
+
appliedAt: Date;
|
|
12
|
+
}
|