@intelact/driveup 2.4.4 → 2.4.5
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/package.json +2 -2
- package/lib/agent/agent.dto.d.ts +0 -6
- package/lib/agent/agent.dto.js +0 -39
- package/lib/agent/agent.dto.js.map +0 -1
- package/lib/agent/agent.model.d.ts +0 -13
- package/lib/agent/agent.model.js +0 -60
- package/lib/agent/agent.model.js.map +0 -1
- package/lib/agent/client.model.d.ts +0 -8
- package/lib/agent/client.model.js +0 -37
- package/lib/agent/client.model.js.map +0 -1
- package/lib/agent/code.model.d.ts +0 -12
- package/lib/agent/code.model.js +0 -43
- package/lib/agent/code.model.js.map +0 -1
- package/lib/alert/alert.model.d.ts +0 -16
- package/lib/alert/alert.model.js +0 -66
- package/lib/alert/alert.model.js.map +0 -1
- package/lib/auth/signin.dto.d.ts +0 -6
- package/lib/auth/signin.dto.js +0 -35
- package/lib/auth/signin.dto.js.map +0 -1
- package/lib/auth/signup.dto.d.ts +0 -9
- package/lib/auth/signup.dto.js +0 -46
- package/lib/auth/signup.dto.js.map +0 -1
- package/lib/bill/bill-item.model.d.ts +0 -38
- package/lib/bill/bill-item.model.js +0 -88
- package/lib/bill/bill-item.model.js.map +0 -1
- package/lib/bill/bill.model.d.ts +0 -36
- package/lib/bill/bill.model.js +0 -101
- package/lib/bill/bill.model.js.map +0 -1
- package/lib/calendar/appointment.d.ts +0 -92
- package/lib/calendar/appointment.js +0 -213
- package/lib/calendar/appointment.js.map +0 -1
- package/lib/calendar/date.d.ts +0 -23
- package/lib/calendar/date.js +0 -87
- package/lib/calendar/date.js.map +0 -1
- package/lib/calendar/holiday.d.ts +0 -7
- package/lib/calendar/holiday.js +0 -28
- package/lib/calendar/holiday.js.map +0 -1
- package/lib/calendar/token.d.ts +0 -15
- package/lib/calendar/token.js +0 -3
- package/lib/calendar/token.js.map +0 -1
- package/lib/calendar/working.d.ts +0 -9
- package/lib/calendar/working.js +0 -41
- package/lib/calendar/working.js.map +0 -1
- package/lib/common/app-info.d.ts +0 -21
- package/lib/common/app-info.js +0 -93
- package/lib/common/app-info.js.map +0 -1
- package/lib/common/content.d.ts +0 -21
- package/lib/common/content.js +0 -78
- package/lib/common/content.js.map +0 -1
- package/lib/common/email.d.ts +0 -4
- package/lib/common/email.js +0 -29
- package/lib/common/email.js.map +0 -1
- package/lib/common/id.d.ts +0 -3
- package/lib/common/id.js +0 -25
- package/lib/common/id.js.map +0 -1
- package/lib/common/language.d.ts +0 -4
- package/lib/common/language.js +0 -22
- package/lib/common/language.js.map +0 -1
- package/lib/common/phone.d.ts +0 -4
- package/lib/common/phone.js +0 -31
- package/lib/common/phone.js.map +0 -1
- package/lib/common/price.d.ts +0 -3
- package/lib/common/price.js +0 -25
- package/lib/common/price.js.map +0 -1
- package/lib/common/profile.d.ts +0 -5
- package/lib/common/profile.js +0 -28
- package/lib/common/profile.js.map +0 -1
- package/lib/common/promotion.d.ts +0 -3
- package/lib/common/promotion.js +0 -24
- package/lib/common/promotion.js.map +0 -1
- package/lib/common/search.d.ts +0 -3
- package/lib/common/search.js +0 -23
- package/lib/common/search.js.map +0 -1
- package/lib/common/social.d.ts +0 -7
- package/lib/common/social.js +0 -40
- package/lib/common/social.js.map +0 -1
- package/lib/common/sort.d.ts +0 -7
- package/lib/common/sort.js +0 -39
- package/lib/common/sort.js.map +0 -1
- package/lib/common/url.d.ts +0 -3
- package/lib/common/url.js +0 -24
- package/lib/common/url.js.map +0 -1
- package/lib/company/company-widget.model.d.ts +0 -10
- package/lib/company/company-widget.model.js +0 -35
- package/lib/company/company-widget.model.js.map +0 -1
- package/lib/company/company.model.d.ts +0 -75
- package/lib/company/company.model.js +0 -227
- package/lib/company/company.model.js.map +0 -1
- package/lib/company/dependency.model.d.ts +0 -5
- package/lib/company/dependency.model.js +0 -30
- package/lib/company/dependency.model.js.map +0 -1
- package/lib/country/country.dto.d.ts +0 -24
- package/lib/country/country.dto.js +0 -132
- package/lib/country/country.dto.js.map +0 -1
- package/lib/country/country.model.d.ts +0 -19
- package/lib/country/country.model.js +0 -80
- package/lib/country/country.model.js.map +0 -1
- package/lib/course/appointment.model.d.ts +0 -14
- package/lib/course/appointment.model.js +0 -47
- package/lib/course/appointment.model.js.map +0 -1
- package/lib/course/course.model.d.ts +0 -44
- package/lib/course/course.model.js +0 -141
- package/lib/course/course.model.js.map +0 -1
- package/lib/course/definition.model.d.ts +0 -15
- package/lib/course/definition.model.js +0 -66
- package/lib/course/definition.model.js.map +0 -1
- package/lib/course/dto.d.ts +0 -47
- package/lib/course/dto.js +0 -191
- package/lib/course/dto.js.map +0 -1
- package/lib/course/part.model.d.ts +0 -23
- package/lib/course/part.model.js +0 -86
- package/lib/course/part.model.js.map +0 -1
- package/lib/credit/credit.model.d.ts +0 -8
- package/lib/credit/credit.model.js +0 -43
- package/lib/credit/credit.model.js.map +0 -1
- package/lib/currency/currency.dto.d.ts +0 -19
- package/lib/currency/currency.dto.js +0 -109
- package/lib/currency/currency.dto.js.map +0 -1
- package/lib/currency/currency.model.d.ts +0 -11
- package/lib/currency/currency.model.js +0 -53
- package/lib/currency/currency.model.js.map +0 -1
- package/lib/device/device.agent.d.ts +0 -51
- package/lib/device/device.agent.js +0 -3
- package/lib/device/device.agent.js.map +0 -1
- package/lib/device/device.model.d.ts +0 -11
- package/lib/device/device.model.js +0 -53
- package/lib/device/device.model.js.map +0 -1
- package/lib/device/device.signature.d.ts +0 -4
- package/lib/device/device.signature.js +0 -30
- package/lib/device/device.signature.js.map +0 -1
- package/lib/driving/category/category.dto.d.ts +0 -37
- package/lib/driving/category/category.dto.js +0 -144
- package/lib/driving/category/category.dto.js.map +0 -1
- package/lib/driving/category/category.model.d.ts +0 -35
- package/lib/driving/category/category.model.js +0 -99
- package/lib/driving/category/category.model.js.map +0 -1
- package/lib/driving/exam/exam.dto.d.ts +0 -8
- package/lib/driving/exam/exam.dto.js +0 -39
- package/lib/driving/exam/exam.dto.js.map +0 -1
- package/lib/driving/exam/exam.model.d.ts +0 -8
- package/lib/driving/exam/exam.model.js +0 -39
- package/lib/driving/exam/exam.model.js.map +0 -1
- package/lib/driving/lesson/lesson.d.ts +0 -10
- package/lib/driving/lesson/lesson.js +0 -48
- package/lib/driving/lesson/lesson.js.map +0 -1
- package/lib/driving/lesson/skill.d.ts +0 -13
- package/lib/driving/lesson/skill.dto.d.ts +0 -7
- package/lib/driving/lesson/skill.dto.js +0 -32
- package/lib/driving/lesson/skill.dto.js.map +0 -1
- package/lib/driving/lesson/skill.js +0 -43
- package/lib/driving/lesson/skill.js.map +0 -1
- package/lib/driving/lesson/topic.d.ts +0 -20
- package/lib/driving/lesson/topic.dto.d.ts +0 -18
- package/lib/driving/lesson/topic.dto.js +0 -72
- package/lib/driving/lesson/topic.dto.js.map +0 -1
- package/lib/driving/lesson/topic.js +0 -72
- package/lib/driving/lesson/topic.js.map +0 -1
- package/lib/expense/category.model.d.ts +0 -18
- package/lib/expense/category.model.js +0 -69
- package/lib/expense/category.model.js.map +0 -1
- package/lib/expense/expense.dto.d.ts +0 -28
- package/lib/expense/expense.dto.js +0 -144
- package/lib/expense/expense.dto.js.map +0 -1
- package/lib/expense/expense.model.d.ts +0 -19
- package/lib/expense/expense.model.js +0 -85
- package/lib/expense/expense.model.js.map +0 -1
- package/lib/finance/company-payment.model.d.ts +0 -10
- package/lib/finance/company-payment.model.js +0 -45
- package/lib/finance/company-payment.model.js.map +0 -1
- package/lib/finance/discount.dto.d.ts +0 -4
- package/lib/finance/discount.dto.js +0 -30
- package/lib/finance/discount.dto.js.map +0 -1
- package/lib/finance/finance.dto.d.ts +0 -56
- package/lib/finance/finance.dto.js +0 -277
- package/lib/finance/finance.dto.js.map +0 -1
- package/lib/finance/finance.model.d.ts +0 -34
- package/lib/finance/finance.model.js +0 -124
- package/lib/finance/finance.model.js.map +0 -1
- package/lib/finance/payment-method.model.d.ts +0 -20
- package/lib/finance/payment-method.model.js +0 -72
- package/lib/finance/payment-method.model.js.map +0 -1
- package/lib/finance/payment.dto.d.ts +0 -6
- package/lib/finance/payment.dto.js +0 -37
- package/lib/finance/payment.dto.js.map +0 -1
- package/lib/finance/refund.dto.d.ts +0 -4
- package/lib/finance/refund.dto.js +0 -30
- package/lib/finance/refund.dto.js.map +0 -1
- package/lib/free-benefit/free-benefit.model.d.ts +0 -7
- package/lib/free-benefit/free-benefit.model.js +0 -31
- package/lib/free-benefit/free-benefit.model.js.map +0 -1
- package/lib/geo/address.dto.d.ts +0 -19
- package/lib/geo/address.dto.js +0 -73
- package/lib/geo/address.dto.js.map +0 -1
- package/lib/geo/geoinfo.interface.d.ts +0 -17
- package/lib/geo/geoinfo.interface.js +0 -3
- package/lib/geo/geoinfo.interface.js.map +0 -1
- package/lib/geo/pickup.model.d.ts +0 -11
- package/lib/geo/pickup.model.js +0 -55
- package/lib/geo/pickup.model.js.map +0 -1
- package/lib/giftcode/giftcode-group.model.d.ts +0 -13
- package/lib/giftcode/giftcode-group.model.js +0 -56
- package/lib/giftcode/giftcode-group.model.js.map +0 -1
- package/lib/giftcode/giftcode.dto.d.ts +0 -37
- package/lib/giftcode/giftcode.dto.js +0 -130
- package/lib/giftcode/giftcode.dto.js.map +0 -1
- package/lib/giftcode/giftcode.model.d.ts +0 -19
- package/lib/giftcode/giftcode.model.js +0 -70
- package/lib/giftcode/giftcode.model.js.map +0 -1
- package/lib/handover/handover.dto.d.ts +0 -6
- package/lib/handover/handover.dto.js +0 -41
- package/lib/handover/handover.dto.js.map +0 -1
- package/lib/handover/handover.model.d.ts +0 -14
- package/lib/handover/handover.model.js +0 -59
- package/lib/handover/handover.model.js.map +0 -1
- package/lib/index.d.ts +0 -118
- package/lib/index.js +0 -309
- package/lib/index.js.map +0 -1
- package/lib/instructor/instructor.dto.d.ts +0 -19
- package/lib/instructor/instructor.dto.js +0 -95
- package/lib/instructor/instructor.dto.js.map +0 -1
- package/lib/instructor/instructor.model.d.ts +0 -46
- package/lib/instructor/instructor.model.js +0 -164
- package/lib/instructor/instructor.model.js.map +0 -1
- package/lib/invoice/invoice.dto.d.ts +0 -10
- package/lib/invoice/invoice.dto.js +0 -60
- package/lib/invoice/invoice.dto.js.map +0 -1
- package/lib/invoice/invoice.model.d.ts +0 -33
- package/lib/invoice/invoice.model.js +0 -137
- package/lib/invoice/invoice.model.js.map +0 -1
- package/lib/invoice/item.model.d.ts +0 -7
- package/lib/invoice/item.model.js +0 -38
- package/lib/invoice/item.model.js.map +0 -1
- package/lib/item/item.model.d.ts +0 -68
- package/lib/item/item.model.js +0 -46
- package/lib/item/item.model.js.map +0 -1
- package/lib/license/license.model.d.ts +0 -7
- package/lib/license/license.model.js +0 -47
- package/lib/license/license.model.js.map +0 -1
- package/lib/log/log.model.d.ts +0 -8
- package/lib/log/log.model.js +0 -38
- package/lib/log/log.model.js.map +0 -1
- package/lib/metric/metric.model.d.ts +0 -43
- package/lib/metric/metric.model.js +0 -113
- package/lib/metric/metric.model.js.map +0 -1
- package/lib/notification/notification.model.d.ts +0 -13
- package/lib/notification/notification.model.js +0 -60
- package/lib/notification/notification.model.js.map +0 -1
- package/lib/notification/preference.dto.d.ts +0 -5
- package/lib/notification/preference.dto.js +0 -33
- package/lib/notification/preference.dto.js.map +0 -1
- package/lib/notification/preference.model.d.ts +0 -8
- package/lib/notification/preference.model.js +0 -42
- package/lib/notification/preference.model.js.map +0 -1
- package/lib/payout/payout.model.d.ts +0 -12
- package/lib/payout/payout.model.js +0 -59
- package/lib/payout/payout.model.js.map +0 -1
- package/lib/priceplan/plan.dto.d.ts +0 -13
- package/lib/priceplan/plan.dto.js +0 -67
- package/lib/priceplan/plan.dto.js.map +0 -1
- package/lib/priceplan/plan.model.d.ts +0 -38
- package/lib/priceplan/plan.model.js +0 -111
- package/lib/priceplan/plan.model.js.map +0 -1
- package/lib/public/contac-us.dto.d.ts +0 -6
- package/lib/public/contac-us.dto.js +0 -43
- package/lib/public/contac-us.dto.js.map +0 -1
- package/lib/public/contact-sales.dto.d.ts +0 -9
- package/lib/public/contact-sales.dto.js +0 -62
- package/lib/public/contact-sales.dto.js.map +0 -1
- package/lib/public/country-support.dto.d.ts +0 -6
- package/lib/public/country-support.dto.js +0 -43
- package/lib/public/country-support.dto.js.map +0 -1
- package/lib/security/role.dto.d.ts +0 -4
- package/lib/security/role.dto.js +0 -23
- package/lib/security/role.dto.js.map +0 -1
- package/lib/security/token.d.ts +0 -30
- package/lib/security/token.js +0 -3
- package/lib/security/token.js.map +0 -1
- package/lib/session/driving/session.dto.d.ts +0 -13
- package/lib/session/driving/session.dto.js +0 -71
- package/lib/session/driving/session.dto.js.map +0 -1
- package/lib/session/driving/session.model.d.ts +0 -16
- package/lib/session/driving/session.model.js +0 -56
- package/lib/session/driving/session.model.js.map +0 -1
- package/lib/session/driving/session.skill.d.ts +0 -5
- package/lib/session/driving/session.skill.js +0 -27
- package/lib/session/driving/session.skill.js.map +0 -1
- package/lib/session/driving/session.topic.d.ts +0 -13
- package/lib/session/driving/session.topic.js +0 -53
- package/lib/session/driving/session.topic.js.map +0 -1
- package/lib/setting/setting.dto.d.ts +0 -3
- package/lib/setting/setting.dto.js +0 -24
- package/lib/setting/setting.dto.js.map +0 -1
- package/lib/setting/setting.model.d.ts +0 -10
- package/lib/setting/setting.model.js +0 -46
- package/lib/setting/setting.model.js.map +0 -1
- package/lib/signature/signature.model.d.ts +0 -10
- package/lib/signature/signature.model.js +0 -43
- package/lib/signature/signature.model.js.map +0 -1
- package/lib/student/student.dto.d.ts +0 -20
- package/lib/student/student.dto.js +0 -115
- package/lib/student/student.dto.js.map +0 -1
- package/lib/student/student.model.d.ts +0 -27
- package/lib/student/student.model.js +0 -107
- package/lib/student/student.model.js.map +0 -1
- package/lib/task/task.dto.d.ts +0 -24
- package/lib/task/task.dto.js +0 -137
- package/lib/task/task.dto.js.map +0 -1
- package/lib/task/task.model.d.ts +0 -8
- package/lib/task/task.model.js +0 -44
- package/lib/task/task.model.js.map +0 -1
- package/lib/ticket/ticket.dto.d.ts +0 -13
- package/lib/ticket/ticket.dto.js +0 -60
- package/lib/ticket/ticket.dto.js.map +0 -1
- package/lib/ticket/ticket.model.d.ts +0 -11
- package/lib/ticket/ticket.model.js +0 -48
- package/lib/ticket/ticket.model.js.map +0 -1
- package/lib/training/request.dto.d.ts +0 -4
- package/lib/training/request.dto.js +0 -23
- package/lib/training/request.dto.js.map +0 -1
- package/lib/training/request.model.d.ts +0 -25
- package/lib/training/request.model.js +0 -88
- package/lib/training/request.model.js.map +0 -1
- package/lib/training/training-actions.model.d.ts +0 -7
- package/lib/training/training-actions.model.js +0 -40
- package/lib/training/training-actions.model.js.map +0 -1
- package/lib/training/training.dto.d.ts +0 -56
- package/lib/training/training.dto.js +0 -255
- package/lib/training/training.dto.js.map +0 -1
- package/lib/training/training.model.d.ts +0 -137
- package/lib/training/training.model.js +0 -308
- package/lib/training/training.model.js.map +0 -1
- package/lib/tsconfig.tsbuildinfo +0 -1
- package/lib/user/agent.interface.d.ts +0 -6
- package/lib/user/agent.interface.js +0 -3
- package/lib/user/agent.interface.js.map +0 -1
- package/lib/user/profile.dto.d.ts +0 -12
- package/lib/user/profile.dto.js +0 -52
- package/lib/user/profile.dto.js.map +0 -1
- package/lib/user/user.model.d.ts +0 -50
- package/lib/user/user.model.js +0 -174
- package/lib/user/user.model.js.map +0 -1
- package/lib/utils/array.helper.d.ts +0 -28
- package/lib/utils/array.helper.js +0 -42
- package/lib/utils/array.helper.js.map +0 -1
- package/lib/utils/compare.validator.d.ts +0 -9
- package/lib/utils/compare.validator.js +0 -35
- package/lib/utils/compare.validator.js.map +0 -1
- package/lib/utils/date.helper.d.ts +0 -127
- package/lib/utils/date.helper.js +0 -265
- package/lib/utils/date.helper.js.map +0 -1
- package/lib/utils/phone.helper.d.ts +0 -9
- package/lib/utils/phone.helper.js +0 -17
- package/lib/utils/phone.helper.js.map +0 -1
- package/lib/utils/required.validator.d.ts +0 -77
- package/lib/utils/required.validator.js +0 -151
- package/lib/utils/required.validator.js.map +0 -1
- package/lib/utils/transformers.helper.d.ts +0 -49
- package/lib/utils/transformers.helper.js +0 -203
- package/lib/utils/transformers.helper.js.map +0 -1
package/lib/user/profile.dto.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.CloseProfileDto = exports.ChangeProfileDto = exports.CreateProfileDto = void 0;
|
|
13
|
-
const shared_1 = require("@driveup/shared");
|
|
14
|
-
const class_validator_1 = require("class-validator");
|
|
15
|
-
const transformers_helper_1 = require("../utils/transformers.helper");
|
|
16
|
-
class CreateProfileDto {
|
|
17
|
-
}
|
|
18
|
-
exports.CreateProfileDto = CreateProfileDto;
|
|
19
|
-
__decorate([
|
|
20
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
21
|
-
(0, class_validator_1.IsEnum)(shared_1.ProfileType),
|
|
22
|
-
__metadata("design:type", String)
|
|
23
|
-
], CreateProfileDto.prototype, "type", void 0);
|
|
24
|
-
__decorate([
|
|
25
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
26
|
-
(0, class_validator_1.IsEnum)(shared_1.Language),
|
|
27
|
-
__metadata("design:type", String)
|
|
28
|
-
], CreateProfileDto.prototype, "language", void 0);
|
|
29
|
-
class ChangeProfileDto {
|
|
30
|
-
}
|
|
31
|
-
exports.ChangeProfileDto = ChangeProfileDto;
|
|
32
|
-
__decorate([
|
|
33
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
34
|
-
(0, class_validator_1.IsEnum)(shared_1.ProfileType),
|
|
35
|
-
__metadata("design:type", String)
|
|
36
|
-
], ChangeProfileDto.prototype, "type", void 0);
|
|
37
|
-
__decorate([
|
|
38
|
-
(0, class_validator_1.IsOptional)(),
|
|
39
|
-
(0, transformers_helper_1.ToNumber)(),
|
|
40
|
-
(0, class_validator_1.IsNumber)(),
|
|
41
|
-
__metadata("design:type", Number)
|
|
42
|
-
], ChangeProfileDto.prototype, "id", void 0);
|
|
43
|
-
class CloseProfileDto {
|
|
44
|
-
}
|
|
45
|
-
exports.CloseProfileDto = CloseProfileDto;
|
|
46
|
-
__decorate([
|
|
47
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
48
|
-
(0, transformers_helper_1.Trim)(),
|
|
49
|
-
(0, class_validator_1.IsString)(),
|
|
50
|
-
__metadata("design:type", String)
|
|
51
|
-
], CloseProfileDto.prototype, "otp", void 0);
|
|
52
|
-
//# sourceMappingURL=profile.dto.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"profile.dto.js","sourceRoot":"","sources":["../../src/user/profile.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAAwD;AACxD,qDAAqF;AACrF,sEAA6E;AAC7E,MAAa,gBAAgB;CAS5B;AATD,4CASC;AALA;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,EAAC,oBAAW,CAAC;;8CACF;AAIlB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,EAAC,iBAAQ,CAAC;;kDACE;AAGpB,MAAa,gBAAgB;CAU5B;AAVD,4CAUC;AANA;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,EAAC,oBAAW,CAAC;;8CACF;AAKlB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,8BAAQ,GAAE;IACV,IAAA,0BAAQ,GAAE;;4CACA;AAGZ,MAAa,eAAe;CAK3B;AALD,0CAKC;AADA;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAI,GAAE;IACN,IAAA,0BAAQ,GAAE;;4CACC"}
|
package/lib/user/user.model.d.ts
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { Coordinate, Language, SelectedProfile, StatusType } from "@driveup/shared";
|
|
2
|
-
import { Agent } from "../agent/agent.model";
|
|
3
|
-
import { UserAlert } from "../alert/alert.model";
|
|
4
|
-
import { Company } from "../company/company.model";
|
|
5
|
-
import { Country } from "../country/country.model";
|
|
6
|
-
import { Instructor } from "../instructor/instructor.model";
|
|
7
|
-
import { Metric } from "../metric/metric.model";
|
|
8
|
-
import { Student } from "../student/student.model";
|
|
9
|
-
/**
|
|
10
|
-
* Implemented for all kind of users (student, instructor, company user or agent).
|
|
11
|
-
* Depends on app sessions (public, mobile, admin, console).
|
|
12
|
-
* Some of properties can have different validaition rules.
|
|
13
|
-
*/
|
|
14
|
-
export declare class User {
|
|
15
|
-
id: number;
|
|
16
|
-
uid: string;
|
|
17
|
-
language: Language;
|
|
18
|
-
status: StatusType;
|
|
19
|
-
/******************** Personal Data ********************/
|
|
20
|
-
name: string;
|
|
21
|
-
phone: string;
|
|
22
|
-
image: string;
|
|
23
|
-
imageUrl: string;
|
|
24
|
-
email: string;
|
|
25
|
-
birthday: Date;
|
|
26
|
-
address: string;
|
|
27
|
-
zipCode: string;
|
|
28
|
-
location: string;
|
|
29
|
-
coord: Coordinate;
|
|
30
|
-
timezone: string;
|
|
31
|
-
/************************* alerts *************************/
|
|
32
|
-
alerts: UserAlert[];
|
|
33
|
-
/************************** activity ***************************/
|
|
34
|
-
lastActivity: Date;
|
|
35
|
-
overdatedActivity: boolean;
|
|
36
|
-
/************************* profiles **************************/
|
|
37
|
-
selectedProfile: SelectedProfile;
|
|
38
|
-
student: Student;
|
|
39
|
-
agent: Agent;
|
|
40
|
-
instructor: Instructor;
|
|
41
|
-
companies: Company[];
|
|
42
|
-
country: Country;
|
|
43
|
-
company: Company;
|
|
44
|
-
createdOn: Date;
|
|
45
|
-
metrics: Metric[];
|
|
46
|
-
/************************* methods *************************/
|
|
47
|
-
constructor(props?: Partial<User>);
|
|
48
|
-
static toInstance(data: any): User[];
|
|
49
|
-
isActive(): boolean;
|
|
50
|
-
}
|
package/lib/user/user.model.js
DELETED
|
@@ -1,174 +0,0 @@
|
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.User = void 0;
|
|
13
|
-
const shared_1 = require("@driveup/shared");
|
|
14
|
-
const class_transformer_1 = require("class-transformer");
|
|
15
|
-
const agent_model_1 = require("../agent/agent.model");
|
|
16
|
-
const alert_model_1 = require("../alert/alert.model");
|
|
17
|
-
const company_model_1 = require("../company/company.model");
|
|
18
|
-
const country_model_1 = require("../country/country.model");
|
|
19
|
-
const instructor_model_1 = require("../instructor/instructor.model");
|
|
20
|
-
const metric_model_1 = require("../metric/metric.model");
|
|
21
|
-
const student_model_1 = require("../student/student.model");
|
|
22
|
-
/**
|
|
23
|
-
* Implemented for all kind of users (student, instructor, company user or agent).
|
|
24
|
-
* Depends on app sessions (public, mobile, admin, console).
|
|
25
|
-
* Some of properties can have different validaition rules.
|
|
26
|
-
*/
|
|
27
|
-
class User {
|
|
28
|
-
/************************* methods *************************/
|
|
29
|
-
constructor(props) {
|
|
30
|
-
Object.assign(this, props);
|
|
31
|
-
}
|
|
32
|
-
static toInstance(data) {
|
|
33
|
-
return data ? (0, class_transformer_1.plainToInstance)(User, data) : null;
|
|
34
|
-
}
|
|
35
|
-
isActive() {
|
|
36
|
-
return this.status === shared_1.StatusType.Active;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
exports.User = User;
|
|
40
|
-
__decorate([
|
|
41
|
-
(0, class_transformer_1.Expose)(),
|
|
42
|
-
(0, class_transformer_1.Type)(() => Number),
|
|
43
|
-
__metadata("design:type", Number)
|
|
44
|
-
], User.prototype, "id", void 0);
|
|
45
|
-
__decorate([
|
|
46
|
-
(0, class_transformer_1.Expose)(),
|
|
47
|
-
__metadata("design:type", String)
|
|
48
|
-
], User.prototype, "uid", void 0);
|
|
49
|
-
__decorate([
|
|
50
|
-
(0, class_transformer_1.Expose)(),
|
|
51
|
-
__metadata("design:type", String)
|
|
52
|
-
], User.prototype, "language", void 0);
|
|
53
|
-
__decorate([
|
|
54
|
-
(0, class_transformer_1.Expose)(),
|
|
55
|
-
__metadata("design:type", String)
|
|
56
|
-
], User.prototype, "status", void 0);
|
|
57
|
-
__decorate([
|
|
58
|
-
(0, class_transformer_1.Expose)(),
|
|
59
|
-
__metadata("design:type", String)
|
|
60
|
-
], User.prototype, "name", void 0);
|
|
61
|
-
__decorate([
|
|
62
|
-
(0, class_transformer_1.Expose)(),
|
|
63
|
-
__metadata("design:type", String)
|
|
64
|
-
], User.prototype, "phone", void 0);
|
|
65
|
-
__decorate([
|
|
66
|
-
(0, class_transformer_1.Expose)(),
|
|
67
|
-
__metadata("design:type", String)
|
|
68
|
-
], User.prototype, "image", void 0);
|
|
69
|
-
__decorate([
|
|
70
|
-
(0, class_transformer_1.Expose)(),
|
|
71
|
-
__metadata("design:type", String)
|
|
72
|
-
], User.prototype, "imageUrl", void 0);
|
|
73
|
-
__decorate([
|
|
74
|
-
(0, class_transformer_1.Expose)(),
|
|
75
|
-
__metadata("design:type", String)
|
|
76
|
-
], User.prototype, "email", void 0);
|
|
77
|
-
__decorate([
|
|
78
|
-
(0, class_transformer_1.Expose)(),
|
|
79
|
-
(0, class_transformer_1.Type)(() => Date),
|
|
80
|
-
__metadata("design:type", Date)
|
|
81
|
-
], User.prototype, "birthday", void 0);
|
|
82
|
-
__decorate([
|
|
83
|
-
(0, class_transformer_1.Expose)(),
|
|
84
|
-
__metadata("design:type", String)
|
|
85
|
-
], User.prototype, "address", void 0);
|
|
86
|
-
__decorate([
|
|
87
|
-
(0, class_transformer_1.Expose)(),
|
|
88
|
-
__metadata("design:type", String)
|
|
89
|
-
], User.prototype, "zipCode", void 0);
|
|
90
|
-
__decorate([
|
|
91
|
-
(0, class_transformer_1.Expose)(),
|
|
92
|
-
__metadata("design:type", String)
|
|
93
|
-
], User.prototype, "location", void 0);
|
|
94
|
-
__decorate([
|
|
95
|
-
(0, class_transformer_1.Expose)(),
|
|
96
|
-
(0, class_transformer_1.Type)(() => shared_1.Coordinate),
|
|
97
|
-
__metadata("design:type", shared_1.Coordinate)
|
|
98
|
-
], User.prototype, "coord", void 0);
|
|
99
|
-
__decorate([
|
|
100
|
-
(0, class_transformer_1.Expose)(),
|
|
101
|
-
__metadata("design:type", String)
|
|
102
|
-
], User.prototype, "timezone", void 0);
|
|
103
|
-
__decorate([
|
|
104
|
-
(0, class_transformer_1.Expose)(),
|
|
105
|
-
(0, class_transformer_1.Type)(() => alert_model_1.UserAlert),
|
|
106
|
-
__metadata("design:type", Array)
|
|
107
|
-
], User.prototype, "alerts", void 0);
|
|
108
|
-
__decorate([
|
|
109
|
-
(0, class_transformer_1.Expose)(),
|
|
110
|
-
(0, class_transformer_1.Type)(() => Date),
|
|
111
|
-
__metadata("design:type", Date)
|
|
112
|
-
], User.prototype, "lastActivity", void 0);
|
|
113
|
-
__decorate([
|
|
114
|
-
(0, class_transformer_1.Expose)(),
|
|
115
|
-
(0, class_transformer_1.Type)(() => Boolean),
|
|
116
|
-
__metadata("design:type", Boolean)
|
|
117
|
-
], User.prototype, "overdatedActivity", void 0);
|
|
118
|
-
__decorate([
|
|
119
|
-
(0, class_transformer_1.Expose)(),
|
|
120
|
-
__metadata("design:type", Object)
|
|
121
|
-
], User.prototype, "selectedProfile", void 0);
|
|
122
|
-
__decorate([
|
|
123
|
-
(0, class_transformer_1.Expose)(),
|
|
124
|
-
(0, class_transformer_1.Type)(() => student_model_1.Student),
|
|
125
|
-
__metadata("design:type", student_model_1.Student)
|
|
126
|
-
], User.prototype, "student", void 0);
|
|
127
|
-
__decorate([
|
|
128
|
-
(0, class_transformer_1.Expose)(),
|
|
129
|
-
(0, class_transformer_1.Type)(() => agent_model_1.Agent),
|
|
130
|
-
__metadata("design:type", agent_model_1.Agent)
|
|
131
|
-
], User.prototype, "agent", void 0);
|
|
132
|
-
__decorate([
|
|
133
|
-
(0, class_transformer_1.Expose)(),
|
|
134
|
-
(0, class_transformer_1.Type)(() => instructor_model_1.Instructor),
|
|
135
|
-
__metadata("design:type", instructor_model_1.Instructor)
|
|
136
|
-
], User.prototype, "instructor", void 0);
|
|
137
|
-
__decorate([
|
|
138
|
-
(0, class_transformer_1.Expose)(),
|
|
139
|
-
(0, class_transformer_1.Type)(() => company_model_1.Company),
|
|
140
|
-
__metadata("design:type", Array)
|
|
141
|
-
], User.prototype, "companies", void 0);
|
|
142
|
-
__decorate([
|
|
143
|
-
(0, class_transformer_1.Expose)(),
|
|
144
|
-
(0, class_transformer_1.Type)(() => country_model_1.Country),
|
|
145
|
-
__metadata("design:type", country_model_1.Country)
|
|
146
|
-
], User.prototype, "country", void 0);
|
|
147
|
-
__decorate([
|
|
148
|
-
(0, class_transformer_1.Expose)(),
|
|
149
|
-
(0, class_transformer_1.Type)(() => company_model_1.Company),
|
|
150
|
-
__metadata("design:type", company_model_1.Company)
|
|
151
|
-
], User.prototype, "company", void 0);
|
|
152
|
-
__decorate([
|
|
153
|
-
(0, class_transformer_1.Expose)(),
|
|
154
|
-
(0, class_transformer_1.Type)(() => Date),
|
|
155
|
-
__metadata("design:type", Date)
|
|
156
|
-
], User.prototype, "createdOn", void 0);
|
|
157
|
-
__decorate([
|
|
158
|
-
(0, class_transformer_1.Expose)(),
|
|
159
|
-
(0, class_transformer_1.Type)(() => metric_model_1.Metric),
|
|
160
|
-
__metadata("design:type", Array)
|
|
161
|
-
], User.prototype, "metrics", void 0);
|
|
162
|
-
__decorate([
|
|
163
|
-
(0, class_transformer_1.Expose)({ groups: ['admin'] }),
|
|
164
|
-
__metadata("design:type", Function),
|
|
165
|
-
__metadata("design:paramtypes", []),
|
|
166
|
-
__metadata("design:returntype", Boolean)
|
|
167
|
-
], User.prototype, "isActive", null);
|
|
168
|
-
__decorate([
|
|
169
|
-
(0, class_transformer_1.Expose)(),
|
|
170
|
-
__metadata("design:type", Function),
|
|
171
|
-
__metadata("design:paramtypes", [Object]),
|
|
172
|
-
__metadata("design:returntype", void 0)
|
|
173
|
-
], User, "toInstance", null);
|
|
174
|
-
//# sourceMappingURL=user.model.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"user.model.js","sourceRoot":"","sources":["../../src/user/user.model.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
export declare class ArrayHelper {
|
|
2
|
-
/**
|
|
3
|
-
* Get a random item from an array
|
|
4
|
-
* @param val Given T type array
|
|
5
|
-
* @returns Given T type
|
|
6
|
-
*/
|
|
7
|
-
static getRandom<T>(val: T[]): T;
|
|
8
|
-
/**
|
|
9
|
-
* Get the last item from an array
|
|
10
|
-
* @param val Given T type array
|
|
11
|
-
* @returns Given T type
|
|
12
|
-
*/
|
|
13
|
-
static getLastItem<T>(val: T[]): T;
|
|
14
|
-
/**
|
|
15
|
-
* Sum all numbers in a number array
|
|
16
|
-
* @param val Number[]
|
|
17
|
-
* @param toFixed (2)
|
|
18
|
-
* @returns Sum number
|
|
19
|
-
*/
|
|
20
|
-
static getSum(val: number[], toFixed?: number): number;
|
|
21
|
-
/**
|
|
22
|
-
* Get the average number in a number array
|
|
23
|
-
* @param val Number[]
|
|
24
|
-
* @param toFixed (2)
|
|
25
|
-
* @returns Average number
|
|
26
|
-
*/
|
|
27
|
-
static getAvg(val: number[], toFixed?: number): number;
|
|
28
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ArrayHelper = void 0;
|
|
4
|
-
class ArrayHelper {
|
|
5
|
-
/**
|
|
6
|
-
* Get a random item from an array
|
|
7
|
-
* @param val Given T type array
|
|
8
|
-
* @returns Given T type
|
|
9
|
-
*/
|
|
10
|
-
static getRandom(val) {
|
|
11
|
-
const randomIndex = Math.floor(Math.random() * val.length);
|
|
12
|
-
return val[randomIndex];
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Get the last item from an array
|
|
16
|
-
* @param val Given T type array
|
|
17
|
-
* @returns Given T type
|
|
18
|
-
*/
|
|
19
|
-
static getLastItem(val) {
|
|
20
|
-
return val?.length ? val[val.length - 1] : undefined;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Sum all numbers in a number array
|
|
24
|
-
* @param val Number[]
|
|
25
|
-
* @param toFixed (2)
|
|
26
|
-
* @returns Sum number
|
|
27
|
-
*/
|
|
28
|
-
static getSum(val, toFixed = 2) {
|
|
29
|
-
return +val.reduce((acc, curr) => +acc + +curr, 0).toFixed(toFixed);
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Get the average number in a number array
|
|
33
|
-
* @param val Number[]
|
|
34
|
-
* @param toFixed (2)
|
|
35
|
-
* @returns Average number
|
|
36
|
-
*/
|
|
37
|
-
static getAvg(val, toFixed = 2) {
|
|
38
|
-
return +(ArrayHelper.getSum(val) / val.length).toFixed(toFixed);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
exports.ArrayHelper = ArrayHelper;
|
|
42
|
-
//# sourceMappingURL=array.helper.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"array.helper.js","sourceRoot":"","sources":["../../src/utils/array.helper.ts"],"names":[],"mappings":";;;AAAA,MAAa,WAAW;IAEvB;;;;OAIG;IACH,MAAM,CAAC,SAAS,CAAI,GAAQ;QAC3B,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC;QAC3D,OAAO,GAAG,CAAC,WAAW,CAAC,CAAC;IACzB,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,WAAW,CAAI,GAAQ;QAC7B,OAAO,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACtD,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,MAAM,CAAC,GAAa,EAAE,OAAO,GAAC,CAAC;QACrC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACrE,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,MAAM,CAAC,GAAa,EAAE,OAAO,GAAC,CAAC;QACrC,OAAO,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACjE,CAAC;CACD;AAxCD,kCAwCC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ValidationArguments, ValidatorConstraintInterface } from "class-validator";
|
|
2
|
-
/**
|
|
3
|
-
* Checks if the start date is less than or equal to the end date
|
|
4
|
-
* If one of the does not have a valid value, returns true
|
|
5
|
-
*/
|
|
6
|
-
export declare class CompareWithEndDate implements ValidatorConstraintInterface {
|
|
7
|
-
validate(startDate: Date, args: ValidationArguments): boolean;
|
|
8
|
-
defaultMessage(args?: ValidationArguments): string;
|
|
9
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.CompareWithEndDate = void 0;
|
|
10
|
-
const class_validator_1 = require("class-validator");
|
|
11
|
-
const luxon_1 = require("luxon");
|
|
12
|
-
/**
|
|
13
|
-
* Checks if the start date is less than or equal to the end date
|
|
14
|
-
* If one of the does not have a valid value, returns true
|
|
15
|
-
*/
|
|
16
|
-
let CompareWithEndDate = class CompareWithEndDate {
|
|
17
|
-
// startDate must be there before the args param,
|
|
18
|
-
// if it's not there the args will be treated as the startDate and we won't have access to the object
|
|
19
|
-
validate(startDate, args) {
|
|
20
|
-
const dto = args.object;
|
|
21
|
-
// no validation is performed if either is not provided
|
|
22
|
-
if (!luxon_1.DateTime.fromJSDate(dto.startDate).isValid ||
|
|
23
|
-
!luxon_1.DateTime.fromJSDate(dto.endDate).isValid)
|
|
24
|
-
return true;
|
|
25
|
-
return dto.startDate < dto.endDate;
|
|
26
|
-
}
|
|
27
|
-
defaultMessage(args) {
|
|
28
|
-
return 'start date cannot be greater than end date';
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
exports.CompareWithEndDate = CompareWithEndDate;
|
|
32
|
-
exports.CompareWithEndDate = CompareWithEndDate = __decorate([
|
|
33
|
-
(0, class_validator_1.ValidatorConstraint)({ name: 'CompareWithEndDate', async: false })
|
|
34
|
-
], CompareWithEndDate);
|
|
35
|
-
//# sourceMappingURL=compare.validator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compare.validator.js","sourceRoot":"","sources":["../../src/utils/compare.validator.ts"],"names":[],"mappings":";;;;;;;;;AAAA,qDAAyG;AACzG,iCAAiC;AAEjC;;;GAGG;AAEI,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAC9B,kDAAkD;IAClD,qGAAqG;IACrG,QAAQ,CAAC,SAAe,EAAE,IAAyB;QAClD,MAAM,GAAG,GAAG,IAAI,CAAC,MAAgB,CAAC;QAElC,uDAAuD;QACvD,IACC,CAAC,gBAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,OAAO;YAC3C,CAAC,gBAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,OAAO;YAEzC,OAAO,IAAI,CAAC;QAEb,OAAO,GAAG,CAAC,SAAS,GAAG,GAAG,CAAC,OAAO,CAAC;IACpC,CAAC;IAED,cAAc,CAAC,IAA0B;QACxC,OAAO,4CAA4C,CAAC;IACrD,CAAC;CACD,CAAA;AAnBY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,qCAAmB,EAAC,EAAE,IAAI,EAAE,oBAAoB,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;GACrD,kBAAkB,CAmB9B"}
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import { WeekDay } from '@driveup/shared';
|
|
2
|
-
import { DateTime, WeekdayNumbers } from 'luxon';
|
|
3
|
-
import { Appointment } from "../calendar/appointment";
|
|
4
|
-
import { Period } from "../calendar/date";
|
|
5
|
-
export declare class DateHelper {
|
|
6
|
-
/**
|
|
7
|
-
* Set timezone to date
|
|
8
|
-
* @param date Date
|
|
9
|
-
* @param timezone string
|
|
10
|
-
* @returns Date
|
|
11
|
-
*/
|
|
12
|
-
static setTimezone(date: Date, timezone: string): Date;
|
|
13
|
-
/**
|
|
14
|
-
* Format like 'October 14, 1983'
|
|
15
|
-
* @param date Date
|
|
16
|
-
* @param timezone string
|
|
17
|
-
* @returns string
|
|
18
|
-
*/
|
|
19
|
-
static toLocalDate(date: Date, timezone?: string): string;
|
|
20
|
-
/**
|
|
21
|
-
* Format like 'Oct 14, 1983, 9:30 AM'. Only 12-hour if the locale is.
|
|
22
|
-
* @param date Date
|
|
23
|
-
* @param timezone string
|
|
24
|
-
* @returns string
|
|
25
|
-
*/
|
|
26
|
-
static toLocalDateTime(date: Date, timezone?: string): string;
|
|
27
|
-
/**
|
|
28
|
-
* Format like 'Fri, 14 Oct 1983, 9:30 AM'. Only 12-hour if the locale is.
|
|
29
|
-
* @param date Date
|
|
30
|
-
* @param timezone string
|
|
31
|
-
* @returns string
|
|
32
|
-
*/
|
|
33
|
-
static toLocalWeekDayAndDateTime(date: Date, timezone?: string): string;
|
|
34
|
-
/**
|
|
35
|
-
* Is date between start and end dates
|
|
36
|
-
* @param date Date
|
|
37
|
-
* @param start Date
|
|
38
|
-
* @param end Date
|
|
39
|
-
* @returns
|
|
40
|
-
*/
|
|
41
|
-
static isBetween(date: Date, start: Date, end: Date): boolean;
|
|
42
|
-
/**
|
|
43
|
-
* Converts a Date to a date-only string in the format "YYYY-MM-DD".
|
|
44
|
-
* @param date Given date
|
|
45
|
-
* @returns Date string
|
|
46
|
-
*/
|
|
47
|
-
static toDateOnly(date: Date): string;
|
|
48
|
-
/**
|
|
49
|
-
* Converts a Date to a time-only string in the format "HH:MM:SS.sssZ".
|
|
50
|
-
* @param date Given date
|
|
51
|
-
* @returns Time string
|
|
52
|
-
*/
|
|
53
|
-
static toTimeOnly(date: Date): string;
|
|
54
|
-
/**
|
|
55
|
-
* Get DateTime instance from Date
|
|
56
|
-
* @param date
|
|
57
|
-
* @returns DateTime
|
|
58
|
-
*/
|
|
59
|
-
static toDateTimeInstance(date: Date): DateTime;
|
|
60
|
-
/**
|
|
61
|
-
* Check if date is start of day
|
|
62
|
-
* @param date Given date
|
|
63
|
-
* @returns True if date is start of day
|
|
64
|
-
*/
|
|
65
|
-
static isStartOfDay(date: Date): boolean;
|
|
66
|
-
/**
|
|
67
|
-
* Check if date is end of day
|
|
68
|
-
* @param date Given date
|
|
69
|
-
* @returns True if date is end of day
|
|
70
|
-
*/
|
|
71
|
-
static isEndOfDay(date: Date): boolean;
|
|
72
|
-
/**
|
|
73
|
-
* Converts a number to a WeekdayNumbers enum from luxon.
|
|
74
|
-
* @param val
|
|
75
|
-
* @returns
|
|
76
|
-
*/
|
|
77
|
-
static toWeekdayNumber(val: number): WeekdayNumbers;
|
|
78
|
-
/**
|
|
79
|
-
* Converts a WeekDay enum from intelact/driveup to a WeekdayNumbers enum from luxon.
|
|
80
|
-
* @param Weekday - The weekday to convert
|
|
81
|
-
* @returns WeekdayNumbers from luxon - 1 to 7
|
|
82
|
-
*/
|
|
83
|
-
static getWeekdayNumber(weekday: WeekDay): WeekdayNumbers;
|
|
84
|
-
/**
|
|
85
|
-
* Get WeekDay from DateTime
|
|
86
|
-
* @param date
|
|
87
|
-
* @returns WeekDay
|
|
88
|
-
*/
|
|
89
|
-
static getWeekday(date: DateTime): WeekDay;
|
|
90
|
-
/**
|
|
91
|
-
* Converts a WeekDay enum from intelact/driveup to a MySQL weekday number.
|
|
92
|
-
* @param Weekday - The weekday to convert
|
|
93
|
-
* @returns number - MySQL weekday number (0 = Monday, 6 = Sunday)
|
|
94
|
-
*/
|
|
95
|
-
static getMySqlWeekday(weekday: WeekDay): number;
|
|
96
|
-
/**
|
|
97
|
-
* Merge periods
|
|
98
|
-
* @param Period[]
|
|
99
|
-
* @returns Period[] - Returns an array of merged periods
|
|
100
|
-
*/
|
|
101
|
-
static mergePeriods(periods: Period[]): Period[];
|
|
102
|
-
/**
|
|
103
|
-
* Merge appointment periods
|
|
104
|
-
* @param Appointment[]
|
|
105
|
-
* @returns Appointment[] - Returns an array of merged appointments
|
|
106
|
-
*/
|
|
107
|
-
static mergeAppointmentPeriods(appointments: Appointment[]): Appointment[];
|
|
108
|
-
/**
|
|
109
|
-
* Get a formatted date string in "DD MMM YYYY" format,
|
|
110
|
-
* or an empty string if the given date is invalid.
|
|
111
|
-
* Example: "23 Oct 2025"
|
|
112
|
-
* @param date string | number | Date
|
|
113
|
-
* @param local Default de
|
|
114
|
-
* @returns Formatted date string
|
|
115
|
-
*/
|
|
116
|
-
static formatDate(date: string | number | Date, local?: string): string;
|
|
117
|
-
/**
|
|
118
|
-
* Get a formatted date and time string in "DD MMM YYYY - HH:MM" format,
|
|
119
|
-
* or an empty string if the given date is invalid.
|
|
120
|
-
* Example: "23 Oct 2025 - 14:30"
|
|
121
|
-
* @param date string | number | Date
|
|
122
|
-
* @param seperator Default '-'
|
|
123
|
-
* @param local Default de
|
|
124
|
-
* @returns Formatted date and time string
|
|
125
|
-
*/
|
|
126
|
-
static formatDateAndTime(date: string | number | Date, seperator?: string, local?: string): string;
|
|
127
|
-
}
|