@alba-cars/common-modules 1.10.2 → 1.10.3
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/core/network/endpoint-config.d.ts +1 -0
- package/dist/core/network/endpoint-config.js +1 -0
- package/dist/features/deposits/data/dto/DepositDTOs.d.ts +8 -0
- package/dist/features/deposits/data/dto/DepositDTOs.js +21 -2
- package/dist/features/google-review/data/dto/google_review_dto.d.ts +10 -0
- package/dist/features/google-review/data/dto/google_review_dto.js +49 -1
- package/package.json +1 -1
|
@@ -28,6 +28,7 @@ type MetaEndpoints = BaseEndpoint & {
|
|
|
28
28
|
};
|
|
29
29
|
type DepositEndpoints = BaseEndpoint & {
|
|
30
30
|
initiateRefund: string | EndpointFunction;
|
|
31
|
+
getOrCreateUserInformation: string;
|
|
31
32
|
};
|
|
32
33
|
type UserEndpoints = BaseEndpoint & {
|
|
33
34
|
changeProfilePicture: EndpointFunction;
|
|
@@ -6,6 +6,11 @@ export declare enum DepositStatus {
|
|
|
6
6
|
COMPLETED = "completed",
|
|
7
7
|
FAILED = "failed"
|
|
8
8
|
}
|
|
9
|
+
export declare enum PaymentOption {
|
|
10
|
+
CASH = "cash",
|
|
11
|
+
BANK_TYPE_A = "bank-a",
|
|
12
|
+
BANK_TYPE_B = "bank-b"
|
|
13
|
+
}
|
|
9
14
|
export declare class DepositDTO {
|
|
10
15
|
id: string;
|
|
11
16
|
stripePaymentIntentId: string;
|
|
@@ -13,6 +18,7 @@ export declare class DepositDTO {
|
|
|
13
18
|
currency: string;
|
|
14
19
|
status: DepositStatus;
|
|
15
20
|
isRefundable: boolean;
|
|
21
|
+
paymentOption: PaymentOption;
|
|
16
22
|
isRefunded: boolean;
|
|
17
23
|
lead?: LeadDTO;
|
|
18
24
|
vehicle: Vehicle;
|
|
@@ -26,6 +32,7 @@ export declare class DepositDTO {
|
|
|
26
32
|
export declare class DepositCreateDTO {
|
|
27
33
|
stripePaymentIntentId: string;
|
|
28
34
|
amount: number;
|
|
35
|
+
paymentOption: PaymentOption;
|
|
29
36
|
currency: string;
|
|
30
37
|
status: DepositStatus;
|
|
31
38
|
isRefundable?: boolean;
|
|
@@ -41,6 +48,7 @@ export declare class DepositUpdateDTO {
|
|
|
41
48
|
status?: DepositStatus;
|
|
42
49
|
isRefundable?: boolean;
|
|
43
50
|
isRefunded?: boolean;
|
|
51
|
+
paymentOption?: PaymentOption;
|
|
44
52
|
isDeleted?: boolean;
|
|
45
53
|
validate(): string[];
|
|
46
54
|
static fromPlain(plain: Record<string, unknown>): DepositUpdateDTO;
|
|
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.DepositGetDTO = exports.DepositOptions = exports.DepositFilter = exports.DepositUpdateDTO = exports.DepositCreateDTO = exports.DepositDTO = exports.DepositStatus = void 0;
|
|
12
|
+
exports.DepositGetDTO = exports.DepositOptions = exports.DepositFilter = exports.DepositUpdateDTO = exports.DepositCreateDTO = exports.DepositDTO = exports.PaymentOption = exports.DepositStatus = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
const class_transformer_1 = require("class-transformer");
|
|
15
15
|
const global_1 = require("../../../../global");
|
|
@@ -21,6 +21,12 @@ var DepositStatus;
|
|
|
21
21
|
DepositStatus["COMPLETED"] = "completed";
|
|
22
22
|
DepositStatus["FAILED"] = "failed";
|
|
23
23
|
})(DepositStatus = exports.DepositStatus || (exports.DepositStatus = {}));
|
|
24
|
+
var PaymentOption;
|
|
25
|
+
(function (PaymentOption) {
|
|
26
|
+
PaymentOption["CASH"] = "cash";
|
|
27
|
+
PaymentOption["BANK_TYPE_A"] = "bank-a";
|
|
28
|
+
PaymentOption["BANK_TYPE_B"] = "bank-b";
|
|
29
|
+
})(PaymentOption = exports.PaymentOption || (exports.PaymentOption = {}));
|
|
24
30
|
class DepositDTO {
|
|
25
31
|
validate() {
|
|
26
32
|
const errors = (0, class_validator_1.validateSync)(this);
|
|
@@ -57,6 +63,10 @@ __decorate([
|
|
|
57
63
|
(0, class_validator_1.IsBoolean)(),
|
|
58
64
|
__metadata("design:type", Boolean)
|
|
59
65
|
], DepositDTO.prototype, "isRefundable", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, class_validator_1.IsEnum)(PaymentOption),
|
|
68
|
+
__metadata("design:type", String)
|
|
69
|
+
], DepositDTO.prototype, "paymentOption", void 0);
|
|
60
70
|
__decorate([
|
|
61
71
|
(0, class_validator_1.IsBoolean)(),
|
|
62
72
|
__metadata("design:type", Boolean)
|
|
@@ -90,7 +100,7 @@ __decorate([
|
|
|
90
100
|
exports.DepositDTO = DepositDTO;
|
|
91
101
|
class DepositCreateDTO {
|
|
92
102
|
constructor() {
|
|
93
|
-
this.currency =
|
|
103
|
+
this.currency = "aed";
|
|
94
104
|
this.status = DepositStatus.PENDING;
|
|
95
105
|
this.isRefundable = false;
|
|
96
106
|
this.isRefunded = false;
|
|
@@ -114,6 +124,10 @@ __decorate([
|
|
|
114
124
|
(0, class_validator_1.IsNumber)(),
|
|
115
125
|
__metadata("design:type", Number)
|
|
116
126
|
], DepositCreateDTO.prototype, "amount", void 0);
|
|
127
|
+
__decorate([
|
|
128
|
+
(0, class_validator_1.IsEnum)(PaymentOption),
|
|
129
|
+
__metadata("design:type", String)
|
|
130
|
+
], DepositCreateDTO.prototype, "paymentOption", void 0);
|
|
117
131
|
__decorate([
|
|
118
132
|
(0, class_validator_1.IsString)(),
|
|
119
133
|
__metadata("design:type", String)
|
|
@@ -174,6 +188,11 @@ __decorate([
|
|
|
174
188
|
(0, class_validator_1.IsBoolean)(),
|
|
175
189
|
__metadata("design:type", Boolean)
|
|
176
190
|
], DepositUpdateDTO.prototype, "isRefunded", void 0);
|
|
191
|
+
__decorate([
|
|
192
|
+
(0, class_validator_1.IsOptional)(),
|
|
193
|
+
(0, class_validator_1.IsEnum)(PaymentOption),
|
|
194
|
+
__metadata("design:type", String)
|
|
195
|
+
], DepositUpdateDTO.prototype, "paymentOption", void 0);
|
|
177
196
|
__decorate([
|
|
178
197
|
(0, class_validator_1.IsOptional)(),
|
|
179
198
|
(0, class_validator_1.IsBoolean)(),
|
|
@@ -87,6 +87,16 @@ export declare class UpdateReviewDTO {
|
|
|
87
87
|
placeId?: string;
|
|
88
88
|
updatedAt?: Date;
|
|
89
89
|
}
|
|
90
|
+
export declare class CreateReviewDTO {
|
|
91
|
+
username?: string;
|
|
92
|
+
photo?: string;
|
|
93
|
+
platform?: ReviewPlatform;
|
|
94
|
+
comment?: string;
|
|
95
|
+
rating?: number;
|
|
96
|
+
showPublic?: boolean;
|
|
97
|
+
placeId?: string;
|
|
98
|
+
date?: Date;
|
|
99
|
+
}
|
|
90
100
|
export declare class UpdateReviewShowPublicDTO {
|
|
91
101
|
id: string;
|
|
92
102
|
showPublic: boolean;
|
|
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.UpdateReviewShowPublicDTO = exports.UpdateReviewDTO = exports.ReviewOptions = exports.ReviewFilter = exports.ReviewGetDTO = exports.GoogleReviewResponseDTO = exports.SaveGoogleReviewDTO = exports.FetchGoogleReviewsDTO = exports.GoogleReviewDTO = exports.ReviewDTO = void 0;
|
|
12
|
+
exports.UpdateReviewShowPublicDTO = exports.CreateReviewDTO = exports.UpdateReviewDTO = exports.ReviewOptions = exports.ReviewFilter = exports.ReviewGetDTO = exports.GoogleReviewResponseDTO = exports.SaveGoogleReviewDTO = exports.FetchGoogleReviewsDTO = exports.GoogleReviewDTO = exports.ReviewDTO = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
const class_transformer_1 = require("class-transformer");
|
|
15
15
|
const enums_1 = require("../enums");
|
|
@@ -403,6 +403,54 @@ __decorate([
|
|
|
403
403
|
__metadata("design:type", Date)
|
|
404
404
|
], UpdateReviewDTO.prototype, "updatedAt", void 0);
|
|
405
405
|
exports.UpdateReviewDTO = UpdateReviewDTO;
|
|
406
|
+
class CreateReviewDTO {
|
|
407
|
+
}
|
|
408
|
+
__decorate([
|
|
409
|
+
(0, class_validator_1.IsString)(),
|
|
410
|
+
(0, class_validator_1.IsOptional)(),
|
|
411
|
+
(0, class_validator_1.Length)(1, 100),
|
|
412
|
+
__metadata("design:type", String)
|
|
413
|
+
], CreateReviewDTO.prototype, "username", void 0);
|
|
414
|
+
__decorate([
|
|
415
|
+
(0, class_validator_1.IsOptional)(),
|
|
416
|
+
(0, class_validator_1.IsString)(),
|
|
417
|
+
__metadata("design:type", String)
|
|
418
|
+
], CreateReviewDTO.prototype, "photo", void 0);
|
|
419
|
+
__decorate([
|
|
420
|
+
(0, class_validator_1.IsEnum)(enums_1.ReviewPlatform),
|
|
421
|
+
(0, class_validator_1.IsOptional)(),
|
|
422
|
+
__metadata("design:type", String)
|
|
423
|
+
], CreateReviewDTO.prototype, "platform", void 0);
|
|
424
|
+
__decorate([
|
|
425
|
+
(0, class_validator_1.IsString)(),
|
|
426
|
+
(0, class_validator_1.IsOptional)(),
|
|
427
|
+
(0, class_validator_1.Length)(1, 1000),
|
|
428
|
+
__metadata("design:type", String)
|
|
429
|
+
], CreateReviewDTO.prototype, "comment", void 0);
|
|
430
|
+
__decorate([
|
|
431
|
+
(0, class_validator_1.IsNumber)(),
|
|
432
|
+
(0, class_validator_1.IsOptional)(),
|
|
433
|
+
(0, class_validator_1.Min)(1),
|
|
434
|
+
(0, class_validator_1.Max)(5),
|
|
435
|
+
__metadata("design:type", Number)
|
|
436
|
+
], CreateReviewDTO.prototype, "rating", void 0);
|
|
437
|
+
__decorate([
|
|
438
|
+
(0, class_validator_1.IsBoolean)(),
|
|
439
|
+
(0, class_validator_1.IsOptional)(),
|
|
440
|
+
__metadata("design:type", Boolean)
|
|
441
|
+
], CreateReviewDTO.prototype, "showPublic", void 0);
|
|
442
|
+
__decorate([
|
|
443
|
+
(0, class_validator_1.IsString)(),
|
|
444
|
+
(0, class_validator_1.IsOptional)(),
|
|
445
|
+
__metadata("design:type", String)
|
|
446
|
+
], CreateReviewDTO.prototype, "placeId", void 0);
|
|
447
|
+
__decorate([
|
|
448
|
+
(0, class_transformer_1.Type)(() => Date),
|
|
449
|
+
(0, class_validator_1.IsDate)(),
|
|
450
|
+
(0, class_validator_1.IsOptional)(),
|
|
451
|
+
__metadata("design:type", Date)
|
|
452
|
+
], CreateReviewDTO.prototype, "date", void 0);
|
|
453
|
+
exports.CreateReviewDTO = CreateReviewDTO;
|
|
406
454
|
class UpdateReviewShowPublicDTO {
|
|
407
455
|
}
|
|
408
456
|
__decorate([
|
package/package.json
CHANGED