@imaginamossas/farmabien-common 1.0.30 → 1.0.31
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/customer-address.entity.d.ts +7 -7
- package/dist/entities/customer-address.entity.js +31 -28
- package/dist/entities/customer-address.entity.js.map +1 -1
- package/dist/entities/index.d.ts +0 -2
- package/dist/entities/index.js +0 -2
- package/dist/entities/index.js.map +1 -1
- package/dist/repositories/global.repository.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/entities/city.entity.d.ts +0 -11
- package/dist/entities/city.entity.js +0 -63
- package/dist/entities/city.entity.js.map +0 -1
- package/dist/entities/state.entity.d.ts +0 -9
- package/dist/entities/state.entity.js +0 -56
- package/dist/entities/state.entity.js.map +0 -1
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import { CustomerEntity } from './customer.entity';
|
|
2
|
-
import { CityEntity } from './city.entity';
|
|
3
2
|
export declare class CustomerAddressEntity {
|
|
4
3
|
id: number;
|
|
5
4
|
customerId: number;
|
|
6
|
-
cityId: number;
|
|
7
5
|
countryId: string;
|
|
8
6
|
label: string;
|
|
9
|
-
recipientName: string;
|
|
10
7
|
recipientPhone: string;
|
|
11
|
-
|
|
8
|
+
mainAddress: string;
|
|
9
|
+
city: string;
|
|
10
|
+
state: string;
|
|
12
11
|
complement: string | null;
|
|
13
12
|
neighborhood: string | null;
|
|
14
13
|
postalCode: string | null;
|
|
15
|
-
latitude: number
|
|
16
|
-
longitude: number
|
|
14
|
+
latitude: number;
|
|
15
|
+
longitude: number;
|
|
16
|
+
googlePlaceId: string;
|
|
17
|
+
rawGoogleResponse: object | null;
|
|
17
18
|
deliveryInstructions: string | null;
|
|
18
19
|
isMain: boolean;
|
|
19
20
|
isActive: boolean;
|
|
@@ -21,5 +22,4 @@ export declare class CustomerAddressEntity {
|
|
|
21
22
|
updatedAt: Date;
|
|
22
23
|
deletedAt: Date | null;
|
|
23
24
|
customer: CustomerEntity;
|
|
24
|
-
city: CityEntity;
|
|
25
25
|
}
|
|
@@ -12,21 +12,22 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.CustomerAddressEntity = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const customer_entity_1 = require("./customer.entity");
|
|
15
|
-
const city_entity_1 = require("./city.entity");
|
|
16
15
|
let CustomerAddressEntity = class CustomerAddressEntity {
|
|
17
16
|
id;
|
|
18
17
|
customerId;
|
|
19
|
-
cityId;
|
|
20
18
|
countryId;
|
|
21
19
|
label;
|
|
22
|
-
recipientName;
|
|
23
20
|
recipientPhone;
|
|
24
|
-
|
|
21
|
+
mainAddress;
|
|
22
|
+
city;
|
|
23
|
+
state;
|
|
25
24
|
complement;
|
|
26
25
|
neighborhood;
|
|
27
26
|
postalCode;
|
|
28
27
|
latitude;
|
|
29
28
|
longitude;
|
|
29
|
+
googlePlaceId;
|
|
30
|
+
rawGoogleResponse;
|
|
30
31
|
deliveryInstructions;
|
|
31
32
|
isMain;
|
|
32
33
|
isActive;
|
|
@@ -34,7 +35,6 @@ let CustomerAddressEntity = class CustomerAddressEntity {
|
|
|
34
35
|
updatedAt;
|
|
35
36
|
deletedAt;
|
|
36
37
|
customer;
|
|
37
|
-
city;
|
|
38
38
|
};
|
|
39
39
|
exports.CustomerAddressEntity = CustomerAddressEntity;
|
|
40
40
|
__decorate([
|
|
@@ -45,10 +45,6 @@ __decorate([
|
|
|
45
45
|
(0, typeorm_1.Column)({ name: 'customer_id', type: 'int' }),
|
|
46
46
|
__metadata("design:type", Number)
|
|
47
47
|
], CustomerAddressEntity.prototype, "customerId", void 0);
|
|
48
|
-
__decorate([
|
|
49
|
-
(0, typeorm_1.Column)({ name: 'city_id', type: 'int' }),
|
|
50
|
-
__metadata("design:type", Number)
|
|
51
|
-
], CustomerAddressEntity.prototype, "cityId", void 0);
|
|
52
48
|
__decorate([
|
|
53
49
|
(0, typeorm_1.Column)({ name: 'country_id', type: 'char', length: 2 }),
|
|
54
50
|
__metadata("design:type", String)
|
|
@@ -57,18 +53,22 @@ __decorate([
|
|
|
57
53
|
(0, typeorm_1.Column)({ type: 'varchar', length: 60 }),
|
|
58
54
|
__metadata("design:type", String)
|
|
59
55
|
], CustomerAddressEntity.prototype, "label", void 0);
|
|
60
|
-
__decorate([
|
|
61
|
-
(0, typeorm_1.Column)({ name: 'recipient_name', type: 'varchar', length: 200 }),
|
|
62
|
-
__metadata("design:type", String)
|
|
63
|
-
], CustomerAddressEntity.prototype, "recipientName", void 0);
|
|
64
56
|
__decorate([
|
|
65
57
|
(0, typeorm_1.Column)({ name: 'recipient_phone', type: 'varchar', length: 25 }),
|
|
66
58
|
__metadata("design:type", String)
|
|
67
59
|
], CustomerAddressEntity.prototype, "recipientPhone", void 0);
|
|
68
60
|
__decorate([
|
|
69
|
-
(0, typeorm_1.Column)({ name: '
|
|
61
|
+
(0, typeorm_1.Column)({ name: 'main_address', type: 'varchar', length: 500 }),
|
|
62
|
+
__metadata("design:type", String)
|
|
63
|
+
], CustomerAddressEntity.prototype, "mainAddress", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100 }),
|
|
66
|
+
__metadata("design:type", String)
|
|
67
|
+
], CustomerAddressEntity.prototype, "city", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100 }),
|
|
70
70
|
__metadata("design:type", String)
|
|
71
|
-
], CustomerAddressEntity.prototype, "
|
|
71
|
+
], CustomerAddressEntity.prototype, "state", void 0);
|
|
72
72
|
__decorate([
|
|
73
73
|
(0, typeorm_1.Column)({ type: 'varchar', length: 200, nullable: true }),
|
|
74
74
|
__metadata("design:type", Object)
|
|
@@ -86,27 +86,35 @@ __decorate([
|
|
|
86
86
|
type: 'decimal',
|
|
87
87
|
precision: 10,
|
|
88
88
|
scale: 8,
|
|
89
|
-
nullable:
|
|
89
|
+
nullable: false,
|
|
90
90
|
transformer: {
|
|
91
91
|
to: (value) => value,
|
|
92
|
-
from: (value) =>
|
|
92
|
+
from: (value) => parseFloat(value),
|
|
93
93
|
},
|
|
94
94
|
}),
|
|
95
|
-
__metadata("design:type",
|
|
95
|
+
__metadata("design:type", Number)
|
|
96
96
|
], CustomerAddressEntity.prototype, "latitude", void 0);
|
|
97
97
|
__decorate([
|
|
98
98
|
(0, typeorm_1.Column)({
|
|
99
99
|
type: 'decimal',
|
|
100
100
|
precision: 11,
|
|
101
101
|
scale: 8,
|
|
102
|
-
nullable:
|
|
102
|
+
nullable: false,
|
|
103
103
|
transformer: {
|
|
104
104
|
to: (value) => value,
|
|
105
|
-
from: (value) =>
|
|
105
|
+
from: (value) => parseFloat(value),
|
|
106
106
|
},
|
|
107
107
|
}),
|
|
108
|
-
__metadata("design:type",
|
|
108
|
+
__metadata("design:type", Number)
|
|
109
109
|
], CustomerAddressEntity.prototype, "longitude", void 0);
|
|
110
|
+
__decorate([
|
|
111
|
+
(0, typeorm_1.Column)({ name: 'google_place_id', type: 'varchar', length: 300 }),
|
|
112
|
+
__metadata("design:type", String)
|
|
113
|
+
], CustomerAddressEntity.prototype, "googlePlaceId", void 0);
|
|
114
|
+
__decorate([
|
|
115
|
+
(0, typeorm_1.Column)({ name: 'raw_google_response', type: 'jsonb', nullable: true }),
|
|
116
|
+
__metadata("design:type", Object)
|
|
117
|
+
], CustomerAddressEntity.prototype, "rawGoogleResponse", void 0);
|
|
110
118
|
__decorate([
|
|
111
119
|
(0, typeorm_1.Column)({ name: 'delivery_instructions', type: 'varchar', length: 500, nullable: true }),
|
|
112
120
|
__metadata("design:type", Object)
|
|
@@ -136,15 +144,10 @@ __decorate([
|
|
|
136
144
|
(0, typeorm_1.JoinColumn)({ name: 'customer_id' }),
|
|
137
145
|
__metadata("design:type", customer_entity_1.CustomerEntity)
|
|
138
146
|
], CustomerAddressEntity.prototype, "customer", void 0);
|
|
139
|
-
__decorate([
|
|
140
|
-
(0, typeorm_1.ManyToOne)(() => city_entity_1.CityEntity, (city) => city.addresses),
|
|
141
|
-
(0, typeorm_1.JoinColumn)({ name: 'city_id' }),
|
|
142
|
-
__metadata("design:type", city_entity_1.CityEntity)
|
|
143
|
-
], CustomerAddressEntity.prototype, "city", void 0);
|
|
144
147
|
exports.CustomerAddressEntity = CustomerAddressEntity = __decorate([
|
|
145
148
|
(0, typeorm_1.Entity)('customer_addresses'),
|
|
146
149
|
(0, typeorm_1.Index)('idx_customer_addresses_customer_id', ['customerId']),
|
|
147
|
-
(0, typeorm_1.Index)('
|
|
148
|
-
(0, typeorm_1.Index)('
|
|
150
|
+
(0, typeorm_1.Index)('idx_customer_addresses_country_id', ['countryId']),
|
|
151
|
+
(0, typeorm_1.Index)('idx_customer_addresses_google_place_id', ['googlePlaceId'])
|
|
149
152
|
], CustomerAddressEntity);
|
|
150
153
|
//# sourceMappingURL=customer-address.entity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customer-address.entity.js","sourceRoot":"","sources":["../../src/entities/customer-address.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAUiB;AACjB,uDAAmD;
|
|
1
|
+
{"version":3,"file":"customer-address.entity.js","sourceRoot":"","sources":["../../src/entities/customer-address.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAUiB;AACjB,uDAAmD;AAqB5C,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAKhC,EAAE,CAAS;IAMX,UAAU,CAAS;IAOnB,SAAS,CAAS;IAMlB,KAAK,CAAS;IAOd,cAAc,CAAS;IAOvB,WAAW,CAAS;IAOpB,IAAI,CAAS;IAOb,KAAK,CAAS;IAMd,UAAU,CAAgB;IAM1B,YAAY,CAAgB;IAM5B,UAAU,CAAgB;IAgB1B,QAAQ,CAAS;IAgBjB,SAAS,CAAS;IAOlB,aAAa,CAAS;IAOtB,iBAAiB,CAAgB;IAOjC,oBAAoB,CAAgB;IAMp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AE,CAAC;;qDAC7C;AAMhB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;uDAC5C;AAOlB;IADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;8BACnD,IAAI;wDAAC;AAGhB;IADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;8BACnD,IAAI;wDAAC;AAGhB;IADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wDACvD;AAWvB;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,gCAAc,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC;IACjE,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;8BAC1B,gCAAc;uDAAC;gCA/Jd,qBAAqB;IAJjC,IAAA,gBAAM,EAAC,oBAAoB,CAAC;IAC5B,IAAA,eAAK,EAAC,oCAAoC,EAAE,CAAC,YAAY,CAAC,CAAC;IAC3D,IAAA,eAAK,EAAC,mCAAmC,EAAE,CAAC,WAAW,CAAC,CAAC;IACzD,IAAA,eAAK,EAAC,wCAAwC,EAAE,CAAC,eAAe,CAAC,CAAC;GACtD,qBAAqB,CAgKjC"}
|
package/dist/entities/index.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
export * from './base.entity';
|
|
2
2
|
export * from './customer.entity';
|
|
3
3
|
export * from './customer-address.entity';
|
|
4
|
-
export * from './state.entity';
|
|
5
|
-
export * from './city.entity';
|
|
6
4
|
export * from './providers-code.entity';
|
|
7
5
|
export * from './customer-provider.entity';
|
|
8
6
|
export * from './email-verification-token.entity';
|
package/dist/entities/index.js
CHANGED
|
@@ -17,8 +17,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./base.entity"), exports);
|
|
18
18
|
__exportStar(require("./customer.entity"), exports);
|
|
19
19
|
__exportStar(require("./customer-address.entity"), exports);
|
|
20
|
-
__exportStar(require("./state.entity"), exports);
|
|
21
|
-
__exportStar(require("./city.entity"), exports);
|
|
22
20
|
__exportStar(require("./providers-code.entity"), exports);
|
|
23
21
|
__exportStar(require("./customer-provider.entity"), exports);
|
|
24
22
|
__exportStar(require("./email-verification-token.entity"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAgBA,gDAA8B;AAC9B,oDAAkC;AAClC,4DAA0C;AAC1C,0DAAwC;AACxC,6DAA2C;AAC3C,oEAAkD;AAClD,yDAAuC;AACvC,gEAA8C;AAC9C,yDAAuC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global.repository.js","sourceRoot":"","sources":["../../src/repositories/global.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAuCA,2CAA4C;AAC5C,6CAAsD;AACtD,qCAAqD;AAG9C,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;
|
|
1
|
+
{"version":3,"file":"global.repository.js","sourceRoot":"","sources":["../../src/repositories/global.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAuCA,2CAA4C;AAC5C,6CAAsD;AACtD,qCAAqD;AAG9C,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAC2B;IAAtD,YAAsD,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;IAAG,CAAC;IAS/E,KAAK,CAAC,iBAAiB;QAC5B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