@intelact/driveup 1.4.46 → 1.4.47
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 +1 -1
- package/lib/agent/agent.dto.d.ts +0 -6
- package/lib/agent/agent.dto.js +0 -51
- 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 -64
- package/lib/agent/agent.model.js.map +0 -1
- package/lib/agent/asset.type.d.ts +0 -5
- package/lib/agent/asset.type.js +0 -10
- package/lib/agent/asset.type.js.map +0 -1
- package/lib/agent/client.model.d.ts +0 -8
- package/lib/agent/client.model.js +0 -40
- 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 -51
- package/lib/agent/code.model.js.map +0 -1
- package/lib/agent/earning.type.d.ts +0 -6
- package/lib/agent/earning.type.js +0 -3
- package/lib/agent/earning.type.js.map +0 -1
- package/lib/agent/index.d.ts +0 -6
- package/lib/agent/index.js +0 -23
- package/lib/agent/index.js.map +0 -1
- package/lib/alert/alert.content.d.ts +0 -4
- package/lib/alert/alert.content.js +0 -9
- package/lib/alert/alert.content.js.map +0 -1
- package/lib/alert/alert.model.d.ts +0 -17
- package/lib/alert/alert.model.js +0 -73
- package/lib/alert/alert.model.js.map +0 -1
- package/lib/alert/index.d.ts +0 -2
- package/lib/alert/index.js +0 -19
- package/lib/alert/index.js.map +0 -1
- package/lib/auth/index.d.ts +0 -2
- package/lib/auth/index.js +0 -19
- package/lib/auth/index.js.map +0 -1
- package/lib/auth/signin.dto.d.ts +0 -6
- package/lib/auth/signin.dto.js +0 -37
- package/lib/auth/signin.dto.js.map +0 -1
- package/lib/auth/signup.dto.d.ts +0 -5
- package/lib/auth/signup.dto.js +0 -38
- package/lib/auth/signup.dto.js.map +0 -1
- package/lib/bank/account.model.d.ts +0 -9
- package/lib/bank/account.model.js +0 -63
- package/lib/bank/account.model.js.map +0 -1
- package/lib/bank/index.d.ts +0 -1
- package/lib/bank/index.js +0 -18
- package/lib/bank/index.js.map +0 -1
- package/lib/bill/bill-item.model.d.ts +0 -38
- package/lib/bill/bill-item.model.js +0 -120
- package/lib/bill/bill-item.model.js.map +0 -1
- package/lib/bill/bill-item.type.d.ts +0 -5
- package/lib/bill/bill-item.type.js +0 -10
- package/lib/bill/bill-item.type.js.map +0 -1
- package/lib/bill/bill.model.d.ts +0 -36
- package/lib/bill/bill.model.js +0 -131
- package/lib/bill/bill.model.js.map +0 -1
- package/lib/bill/bill.status.d.ts +0 -5
- package/lib/bill/bill.status.js +0 -13
- package/lib/bill/bill.status.js.map +0 -1
- package/lib/bill/index.d.ts +0 -4
- package/lib/bill/index.js +0 -21
- package/lib/bill/index.js.map +0 -1
- package/lib/calendar/appointment.d.ts +0 -89
- package/lib/calendar/appointment.js +0 -277
- package/lib/calendar/appointment.js.map +0 -1
- package/lib/calendar/date.d.ts +0 -23
- package/lib/calendar/date.js +0 -92
- package/lib/calendar/date.js.map +0 -1
- package/lib/calendar/holiday.d.ts +0 -11
- package/lib/calendar/holiday.js +0 -46
- package/lib/calendar/holiday.js.map +0 -1
- package/lib/calendar/index.d.ts +0 -6
- package/lib/calendar/index.js +0 -23
- package/lib/calendar/index.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/types.d.ts +0 -19
- package/lib/calendar/types.js +0 -25
- package/lib/calendar/types.js.map +0 -1
- package/lib/calendar/working.d.ts +0 -9
- package/lib/calendar/working.js +0 -44
- package/lib/calendar/working.js.map +0 -1
- package/lib/common/app-info.d.ts +0 -8
- package/lib/common/app-info.js +0 -43
- package/lib/common/app-info.js.map +0 -1
- package/lib/common/content.d.ts +0 -21
- package/lib/common/content.js +0 -85
- package/lib/common/content.js.map +0 -1
- package/lib/common/context.d.ts +0 -6
- package/lib/common/context.js +0 -11
- package/lib/common/context.js.map +0 -1
- package/lib/common/email.d.ts +0 -4
- package/lib/common/email.js +0 -31
- package/lib/common/email.js.map +0 -1
- package/lib/common/id.d.ts +0 -3
- package/lib/common/id.js +0 -30
- package/lib/common/id.js.map +0 -1
- package/lib/common/identity.d.ts +0 -27
- package/lib/common/identity.js +0 -3
- package/lib/common/identity.js.map +0 -1
- package/lib/common/index.d.ts +0 -15
- package/lib/common/index.js +0 -32
- package/lib/common/index.js.map +0 -1
- package/lib/common/language.d.ts +0 -9
- package/lib/common/language.js +0 -29
- package/lib/common/language.js.map +0 -1
- package/lib/common/person.d.ts +0 -16
- package/lib/common/person.js +0 -60
- package/lib/common/person.js.map +0 -1
- package/lib/common/phone.d.ts +0 -4
- package/lib/common/phone.js +0 -32
- package/lib/common/phone.js.map +0 -1
- package/lib/common/price.d.ts +0 -3
- package/lib/common/price.js +0 -28
- package/lib/common/price.js.map +0 -1
- package/lib/common/profile.d.ts +0 -5
- package/lib/common/profile.js +0 -30
- package/lib/common/profile.js.map +0 -1
- package/lib/common/promotion.d.ts +0 -3
- package/lib/common/promotion.js +0 -23
- package/lib/common/promotion.js.map +0 -1
- package/lib/common/search.d.ts +0 -3
- package/lib/common/search.js +0 -24
- package/lib/common/search.js.map +0 -1
- package/lib/common/social.d.ts +0 -7
- package/lib/common/social.js +0 -42
- package/lib/common/social.js.map +0 -1
- package/lib/common/sort.d.ts +0 -7
- package/lib/common/sort.js +0 -46
- package/lib/common/sort.js.map +0 -1
- package/lib/common/url.d.ts +0 -3
- package/lib/common/url.js +0 -25
- 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 -41
- package/lib/company/company-widget.model.js.map +0 -1
- package/lib/company/company.model.d.ts +0 -77
- package/lib/company/company.model.js +0 -290
- 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 -32
- package/lib/company/dependency.model.js.map +0 -1
- package/lib/company/index.d.ts +0 -3
- package/lib/company/index.js +0 -20
- package/lib/company/index.js.map +0 -1
- package/lib/country/country.dto.d.ts +0 -24
- package/lib/country/country.dto.js +0 -150
- package/lib/country/country.dto.js.map +0 -1
- package/lib/country/country.model.d.ts +0 -18
- package/lib/country/country.model.js +0 -87
- package/lib/country/country.model.js.map +0 -1
- package/lib/country/index.d.ts +0 -2
- package/lib/country/index.js +0 -19
- package/lib/country/index.js.map +0 -1
- package/lib/course/appointment.model.d.ts +0 -14
- package/lib/course/appointment.model.js +0 -51
- package/lib/course/appointment.model.js.map +0 -1
- package/lib/course/course.model.d.ts +0 -41
- package/lib/course/course.model.js +0 -163
- 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 -75
- package/lib/course/definition.model.js.map +0 -1
- package/lib/course/dto.d.ts +0 -48
- package/lib/course/dto.js +0 -235
- package/lib/course/dto.js.map +0 -1
- package/lib/course/index.d.ts +0 -6
- package/lib/course/index.js +0 -23
- package/lib/course/index.js.map +0 -1
- package/lib/course/part.model.d.ts +0 -23
- package/lib/course/part.model.js +0 -103
- package/lib/course/part.model.js.map +0 -1
- package/lib/course/types.d.ts +0 -15
- package/lib/course/types.js +0 -22
- package/lib/course/types.js.map +0 -1
- package/lib/credit/credit.model.d.ts +0 -9
- package/lib/credit/credit.model.js +0 -50
- package/lib/credit/credit.model.js.map +0 -1
- package/lib/credit/index.d.ts +0 -1
- package/lib/credit/index.js +0 -18
- package/lib/credit/index.js.map +0 -1
- package/lib/currency/currency.dto.d.ts +0 -19
- package/lib/currency/currency.dto.js +0 -123
- 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 -60
- package/lib/currency/currency.model.js.map +0 -1
- package/lib/currency/index.d.ts +0 -2
- package/lib/currency/index.js +0 -19
- package/lib/currency/index.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 -61
- 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 -32
- package/lib/device/device.signature.js.map +0 -1
- package/lib/device/index.d.ts +0 -3
- package/lib/device/index.js +0 -20
- package/lib/device/index.js.map +0 -1
- package/lib/discount/discount.dto.d.ts +0 -4
- package/lib/discount/discount.dto.js +0 -32
- package/lib/discount/discount.dto.js.map +0 -1
- package/lib/discount/discount.model.d.ts +0 -23
- package/lib/discount/discount.model.js +0 -102
- package/lib/discount/discount.model.js.map +0 -1
- package/lib/discount/index.d.ts +0 -2
- package/lib/discount/index.js +0 -19
- package/lib/discount/index.js.map +0 -1
- package/lib/driving/category/category.dto.d.ts +0 -32
- package/lib/driving/category/category.dto.js +0 -147
- 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 -119
- package/lib/driving/category/category.model.js.map +0 -1
- package/lib/driving/category/index.d.ts +0 -2
- package/lib/driving/category/index.js +0 -19
- package/lib/driving/category/index.js.map +0 -1
- package/lib/driving/exam/exam.dto.d.ts +0 -9
- package/lib/driving/exam/exam.dto.js +0 -42
- package/lib/driving/exam/exam.dto.js.map +0 -1
- package/lib/driving/exam/exam.model.d.ts +0 -9
- package/lib/driving/exam/exam.model.js +0 -44
- package/lib/driving/exam/exam.model.js.map +0 -1
- package/lib/driving/exam/index.d.ts +0 -2
- package/lib/driving/exam/index.js +0 -19
- package/lib/driving/exam/index.js.map +0 -1
- package/lib/driving/index.d.ts +0 -4
- package/lib/driving/index.js +0 -21
- package/lib/driving/index.js.map +0 -1
- package/lib/driving/lesson/index.d.ts +0 -5
- package/lib/driving/lesson/index.js +0 -22
- package/lib/driving/lesson/index.js.map +0 -1
- package/lib/driving/lesson/skill.d.ts +0 -14
- package/lib/driving/lesson/skill.dto.d.ts +0 -7
- package/lib/driving/lesson/skill.dto.js +0 -34
- package/lib/driving/lesson/skill.dto.js.map +0 -1
- package/lib/driving/lesson/skill.js +0 -48
- 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 -10
- package/lib/driving/lesson/topic.dto.js +0 -59
- package/lib/driving/lesson/topic.dto.js.map +0 -1
- package/lib/driving/lesson/topic.js +0 -83
- package/lib/driving/lesson/topic.js.map +0 -1
- package/lib/driving/lesson/types.d.ts +0 -15
- package/lib/driving/lesson/types.js +0 -21
- package/lib/driving/lesson/types.js.map +0 -1
- package/lib/driving/types.d.ts +0 -9
- package/lib/driving/types.js +0 -15
- package/lib/driving/types.js.map +0 -1
- package/lib/event/event.dto.d.ts +0 -24
- package/lib/event/event.dto.js +0 -146
- package/lib/event/event.dto.js.map +0 -1
- package/lib/event/event.model.d.ts +0 -8
- package/lib/event/event.model.js +0 -49
- package/lib/event/event.model.js.map +0 -1
- package/lib/event/index.d.ts +0 -2
- package/lib/event/index.js +0 -19
- package/lib/event/index.js.map +0 -1
- package/lib/events/agent/account.events.d.ts +0 -27
- package/lib/events/agent/account.events.js +0 -32
- package/lib/events/agent/account.events.js.map +0 -1
- package/lib/events/agent/payout.events.d.ts +0 -29
- package/lib/events/agent/payout.events.js +0 -34
- package/lib/events/agent/payout.events.js.map +0 -1
- package/lib/events/agent/profile.events.d.ts +0 -18
- package/lib/events/agent/profile.events.js +0 -23
- package/lib/events/agent/profile.events.js.map +0 -1
- package/lib/events/agent/promotion.events.d.ts +0 -42
- package/lib/events/agent/promotion.events.js +0 -47
- package/lib/events/agent/promotion.events.js.map +0 -1
- package/lib/events/auth/auth.events.d.ts +0 -16
- package/lib/events/auth/auth.events.js +0 -21
- package/lib/events/auth/auth.events.js.map +0 -1
- package/lib/events/auth/token.events.d.ts +0 -23
- package/lib/events/auth/token.events.js +0 -28
- package/lib/events/auth/token.events.js.map +0 -1
- package/lib/events/auth/verify.events.d.ts +0 -17
- package/lib/events/auth/verify.events.js +0 -22
- package/lib/events/auth/verify.events.js.map +0 -1
- package/lib/events/company/account/account.events.d.ts +0 -64
- package/lib/events/company/account/account.events.js +0 -69
- package/lib/events/company/account/account.events.js.map +0 -1
- package/lib/events/company/account/profile.events.d.ts +0 -169
- package/lib/events/company/account/profile.events.js +0 -174
- package/lib/events/company/account/profile.events.js.map +0 -1
- package/lib/events/company/course/appointment.events.d.ts +0 -56
- package/lib/events/company/course/appointment.events.js +0 -61
- package/lib/events/company/course/appointment.events.js.map +0 -1
- package/lib/events/company/course/course.events.d.ts +0 -118
- package/lib/events/company/course/course.events.js +0 -123
- package/lib/events/company/course/course.events.js.map +0 -1
- package/lib/events/company/course/lesson.events.d.ts +0 -56
- package/lib/events/company/course/lesson.events.js +0 -61
- package/lib/events/company/course/lesson.events.js.map +0 -1
- package/lib/events/company/course/topic.events.d.ts +0 -76
- package/lib/events/company/course/topic.events.js +0 -81
- package/lib/events/company/course/topic.events.js.map +0 -1
- package/lib/events/company/product/addon.events.d.ts +0 -34
- package/lib/events/company/product/addon.events.js +0 -39
- package/lib/events/company/product/addon.events.js.map +0 -1
- package/lib/events/company/product/campaign.events.d.ts +0 -13
- package/lib/events/company/product/campaign.events.js +0 -18
- package/lib/events/company/product/campaign.events.js.map +0 -1
- package/lib/events/company/product/product.events.d.ts +0 -54
- package/lib/events/company/product/product.events.js +0 -59
- package/lib/events/company/product/product.events.js.map +0 -1
- package/lib/events/index.d.ts +0 -25
- package/lib/events/index.js +0 -42
- package/lib/events/index.js.map +0 -1
- package/lib/events/instructor/account/account.events.d.ts +0 -123
- package/lib/events/instructor/account/account.events.js +0 -128
- package/lib/events/instructor/account/account.events.js.map +0 -1
- package/lib/events/instructor/account/profile.events.d.ts +0 -31
- package/lib/events/instructor/account/profile.events.js +0 -36
- package/lib/events/instructor/account/profile.events.js.map +0 -1
- package/lib/events/instructor/task/task.events.d.ts +0 -24
- package/lib/events/instructor/task/task.events.js +0 -29
- package/lib/events/instructor/task/task.events.js.map +0 -1
- package/lib/events/student/account/account.events.d.ts +0 -36
- package/lib/events/student/account/account.events.js +0 -41
- package/lib/events/student/account/account.events.js.map +0 -1
- package/lib/events/user/account.events.d.ts +0 -84
- package/lib/events/user/account.events.js +0 -89
- package/lib/events/user/account.events.js.map +0 -1
- package/lib/events/user/alert.events.d.ts +0 -16
- package/lib/events/user/alert.events.js +0 -21
- package/lib/events/user/alert.events.js.map +0 -1
- package/lib/events/user/device.events.d.ts +0 -30
- package/lib/events/user/device.events.js +0 -35
- package/lib/events/user/device.events.js.map +0 -1
- package/lib/events/user/notification.events.d.ts +0 -30
- package/lib/events/user/notification.events.js +0 -35
- package/lib/events/user/notification.events.js.map +0 -1
- package/lib/events/user/profile.events.d.ts +0 -60
- package/lib/events/user/profile.events.js +0 -65
- package/lib/events/user/profile.events.js.map +0 -1
- package/lib/expense/category.model.d.ts +0 -18
- package/lib/expense/category.model.js +0 -80
- package/lib/expense/category.model.js.map +0 -1
- package/lib/expense/expense.dto.d.ts +0 -29
- package/lib/expense/expense.dto.js +0 -174
- package/lib/expense/expense.dto.js.map +0 -1
- package/lib/expense/expense.model.d.ts +0 -20
- package/lib/expense/expense.model.js +0 -104
- package/lib/expense/expense.model.js.map +0 -1
- package/lib/expense/expense.types.d.ts +0 -5
- package/lib/expense/expense.types.js +0 -10
- package/lib/expense/expense.types.js.map +0 -1
- package/lib/expense/index.d.ts +0 -4
- package/lib/expense/index.js +0 -21
- package/lib/expense/index.js.map +0 -1
- package/lib/feedback/feedback.model.d.ts +0 -11
- package/lib/feedback/feedback.model.js +0 -68
- package/lib/feedback/feedback.model.js.map +0 -1
- package/lib/feedback/index.d.ts +0 -1
- package/lib/feedback/index.js +0 -18
- package/lib/feedback/index.js.map +0 -1
- package/lib/finance/finance.dto.d.ts +0 -58
- package/lib/finance/finance.dto.js +0 -399
- package/lib/finance/finance.dto.js.map +0 -1
- package/lib/finance/finance.model.d.ts +0 -35
- package/lib/finance/finance.model.js +0 -146
- package/lib/finance/finance.model.js.map +0 -1
- package/lib/finance/finance.type.d.ts +0 -21
- package/lib/finance/finance.type.js +0 -21
- package/lib/finance/finance.type.js.map +0 -1
- package/lib/finance/index.d.ts +0 -3
- package/lib/finance/index.js +0 -20
- package/lib/finance/index.js.map +0 -1
- package/lib/free-benefit/free-benefit.model.d.ts +0 -7
- package/lib/free-benefit/free-benefit.model.js +0 -33
- package/lib/free-benefit/free-benefit.model.js.map +0 -1
- package/lib/free-benefit/free-benefit.type.d.ts +0 -4
- package/lib/free-benefit/free-benefit.type.js +0 -9
- package/lib/free-benefit/free-benefit.type.js.map +0 -1
- package/lib/free-benefit/index.d.ts +0 -2
- package/lib/free-benefit/index.js +0 -19
- package/lib/free-benefit/index.js.map +0 -1
- package/lib/geo/address.dto.d.ts +0 -19
- package/lib/geo/address.dto.js +0 -80
- package/lib/geo/address.dto.js.map +0 -1
- package/lib/geo/address.model.d.ts +0 -9
- package/lib/geo/address.model.js +0 -42
- package/lib/geo/address.model.js.map +0 -1
- package/lib/geo/coordinate.model.d.ts +0 -4
- package/lib/geo/coordinate.model.js +0 -41
- package/lib/geo/coordinate.model.js.map +0 -1
- package/lib/geo/index.d.ts +0 -4
- package/lib/geo/index.js +0 -21
- package/lib/geo/index.js.map +0 -1
- package/lib/geo/pickup.model.d.ts +0 -11
- package/lib/geo/pickup.model.js +0 -60
- 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 -63
- 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 -156
- 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 -80
- package/lib/giftcode/giftcode.model.js.map +0 -1
- package/lib/giftcode/index.d.ts +0 -3
- package/lib/giftcode/index.js +0 -20
- package/lib/giftcode/index.js.map +0 -1
- package/lib/handover/handover.document.d.ts +0 -5
- package/lib/handover/handover.document.js +0 -3
- package/lib/handover/handover.document.js.map +0 -1
- package/lib/handover/handover.dto.d.ts +0 -6
- package/lib/handover/handover.dto.js +0 -45
- 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 -66
- package/lib/handover/handover.model.js.map +0 -1
- package/lib/handover/index.d.ts +0 -3
- package/lib/handover/index.js +0 -20
- package/lib/handover/index.js.map +0 -1
- package/lib/index.d.ts +0 -47
- package/lib/index.js +0 -64
- package/lib/index.js.map +0 -1
- package/lib/instructor/index.d.ts +0 -2
- package/lib/instructor/index.js +0 -19
- package/lib/instructor/index.js.map +0 -1
- package/lib/instructor/instructor.dto.d.ts +0 -21
- package/lib/instructor/instructor.dto.js +0 -122
- package/lib/instructor/instructor.dto.js.map +0 -1
- package/lib/instructor/instructor.model.d.ts +0 -50
- package/lib/instructor/instructor.model.js +0 -206
- package/lib/instructor/instructor.model.js.map +0 -1
- package/lib/invoice/index.d.ts +0 -4
- package/lib/invoice/index.js +0 -21
- package/lib/invoice/index.js.map +0 -1
- package/lib/invoice/invoice.dto.d.ts +0 -10
- package/lib/invoice/invoice.dto.js +0 -66
- package/lib/invoice/invoice.dto.js.map +0 -1
- package/lib/invoice/invoice.model.d.ts +0 -36
- package/lib/invoice/invoice.model.js +0 -170
- package/lib/invoice/invoice.model.js.map +0 -1
- package/lib/invoice/invoice.types.d.ts +0 -6
- package/lib/invoice/invoice.types.js +0 -11
- package/lib/invoice/invoice.types.js.map +0 -1
- package/lib/invoice/item.model.d.ts +0 -7
- package/lib/invoice/item.model.js +0 -42
- package/lib/invoice/item.model.js.map +0 -1
- package/lib/item/index.d.ts +0 -1
- package/lib/item/index.js +0 -18
- package/lib/item/index.js.map +0 -1
- package/lib/item/item.model.d.ts +0 -55
- package/lib/item/item.model.js +0 -80
- package/lib/item/item.model.js.map +0 -1
- package/lib/license/index.d.ts +0 -1
- package/lib/license/index.js +0 -18
- package/lib/license/index.js.map +0 -1
- package/lib/license/license.model.d.ts +0 -5
- package/lib/license/license.model.js +0 -41
- package/lib/license/license.model.js.map +0 -1
- package/lib/link/index.d.ts +0 -1
- package/lib/link/index.js +0 -18
- package/lib/link/index.js.map +0 -1
- package/lib/link/link.model.d.ts +0 -55
- package/lib/link/link.model.js +0 -75
- package/lib/link/link.model.js.map +0 -1
- package/lib/log/index.d.ts +0 -2
- package/lib/log/index.js +0 -19
- package/lib/log/index.js.map +0 -1
- package/lib/log/log.model.d.ts +0 -8
- package/lib/log/log.model.js +0 -42
- package/lib/log/log.model.js.map +0 -1
- package/lib/log/log.type.d.ts +0 -9
- package/lib/log/log.type.js +0 -14
- package/lib/log/log.type.js.map +0 -1
- package/lib/metric/index.d.ts +0 -1
- package/lib/metric/index.js +0 -18
- package/lib/metric/index.js.map +0 -1
- package/lib/metric/metric.model.d.ts +0 -43
- package/lib/metric/metric.model.js +0 -129
- package/lib/metric/metric.model.js.map +0 -1
- package/lib/note/index.d.ts +0 -1
- package/lib/note/index.js +0 -18
- package/lib/note/index.js.map +0 -1
- package/lib/note/note.model.d.ts +0 -9
- package/lib/note/note.model.js +0 -57
- package/lib/note/note.model.js.map +0 -1
- package/lib/notification/index.d.ts +0 -4
- package/lib/notification/index.js +0 -21
- package/lib/notification/index.js.map +0 -1
- package/lib/notification/notification.channel.d.ts +0 -6
- package/lib/notification/notification.channel.js +0 -11
- package/lib/notification/notification.channel.js.map +0 -1
- package/lib/notification/notification.model.d.ts +0 -14
- package/lib/notification/notification.model.js +0 -69
- 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 -34
- 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 -47
- package/lib/notification/preference.model.js.map +0 -1
- package/lib/payment/company-payment.model.d.ts +0 -10
- package/lib/payment/company-payment.model.js +0 -50
- package/lib/payment/company-payment.model.js.map +0 -1
- package/lib/payment/index.d.ts +0 -5
- package/lib/payment/index.js +0 -22
- package/lib/payment/index.js.map +0 -1
- package/lib/payment/payment-method.model.d.ts +0 -20
- package/lib/payment/payment-method.model.js +0 -86
- package/lib/payment/payment-method.model.js.map +0 -1
- package/lib/payment/payment.dto.d.ts +0 -6
- package/lib/payment/payment.dto.js +0 -40
- package/lib/payment/payment.dto.js.map +0 -1
- package/lib/payment/payment.model.d.ts +0 -25
- package/lib/payment/payment.model.js +0 -108
- package/lib/payment/payment.model.js.map +0 -1
- package/lib/payment/payment.types.d.ts +0 -13
- package/lib/payment/payment.types.js +0 -20
- package/lib/payment/payment.types.js.map +0 -1
- package/lib/payout/index.d.ts +0 -2
- package/lib/payout/index.js +0 -19
- package/lib/payout/index.js.map +0 -1
- package/lib/payout/payout.model.d.ts +0 -14
- package/lib/payout/payout.model.js +0 -70
- package/lib/payout/payout.model.js.map +0 -1
- package/lib/payout/payout.types.d.ts +0 -4
- package/lib/payout/payout.types.js +0 -9
- package/lib/payout/payout.types.js.map +0 -1
- package/lib/priceplan/index.d.ts +0 -3
- package/lib/priceplan/index.js +0 -20
- package/lib/priceplan/index.js.map +0 -1
- package/lib/priceplan/plan.dto.d.ts +0 -13
- package/lib/priceplan/plan.dto.js +0 -74
- package/lib/priceplan/plan.dto.js.map +0 -1
- package/lib/priceplan/plan.enum.d.ts +0 -23
- package/lib/priceplan/plan.enum.js +0 -29
- package/lib/priceplan/plan.enum.js.map +0 -1
- package/lib/priceplan/plan.model.d.ts +0 -41
- package/lib/priceplan/plan.model.js +0 -141
- package/lib/priceplan/plan.model.js.map +0 -1
- package/lib/product/index.d.ts +0 -3
- package/lib/product/index.js +0 -20
- package/lib/product/index.js.map +0 -1
- package/lib/product/product.dto.d.ts +0 -12
- package/lib/product/product.dto.js +0 -69
- package/lib/product/product.dto.js.map +0 -1
- package/lib/product/product.model.d.ts +0 -12
- package/lib/product/product.model.js +0 -61
- package/lib/product/product.model.js.map +0 -1
- package/lib/product/product.type.d.ts +0 -4
- package/lib/product/product.type.js +0 -9
- package/lib/product/product.type.js.map +0 -1
- package/lib/refund/index.d.ts +0 -2
- package/lib/refund/index.js +0 -19
- package/lib/refund/index.js.map +0 -1
- package/lib/refund/refund.dto.d.ts +0 -4
- package/lib/refund/refund.dto.js +0 -32
- package/lib/refund/refund.dto.js.map +0 -1
- package/lib/refund/refund.model.d.ts +0 -25
- package/lib/refund/refund.model.js +0 -109
- package/lib/refund/refund.model.js.map +0 -1
- package/lib/security/account.types.d.ts +0 -8
- package/lib/security/account.types.js +0 -13
- package/lib/security/account.types.js.map +0 -1
- package/lib/security/acl.d.ts +0 -6
- package/lib/security/acl.js +0 -11
- package/lib/security/acl.js.map +0 -1
- package/lib/security/index.d.ts +0 -6
- package/lib/security/index.js +0 -23
- package/lib/security/index.js.map +0 -1
- package/lib/security/permissions.d.ts +0 -9
- package/lib/security/permissions.js +0 -14
- package/lib/security/permissions.js.map +0 -1
- package/lib/security/role.dto.d.ts +0 -4
- package/lib/security/role.dto.js +0 -24
- package/lib/security/role.dto.js.map +0 -1
- package/lib/security/role.types.d.ts +0 -41
- package/lib/security/role.types.js +0 -46
- package/lib/security/role.types.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/index.d.ts +0 -4
- package/lib/session/driving/index.js +0 -21
- package/lib/session/driving/index.js.map +0 -1
- package/lib/session/driving/session.dto.d.ts +0 -13
- package/lib/session/driving/session.dto.js +0 -74
- 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 -63
- 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 -28
- package/lib/session/driving/session.skill.js.map +0 -1
- package/lib/session/driving/session.topic.d.ts +0 -14
- package/lib/session/driving/session.topic.js +0 -61
- package/lib/session/driving/session.topic.js.map +0 -1
- package/lib/session/index.d.ts +0 -1
- package/lib/session/index.js +0 -18
- package/lib/session/index.js.map +0 -1
- package/lib/setting/index.d.ts +0 -3
- package/lib/setting/index.js +0 -20
- package/lib/setting/index.js.map +0 -1
- package/lib/setting/setting.dto.d.ts +0 -3
- package/lib/setting/setting.dto.js +0 -25
- 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 -52
- package/lib/setting/setting.model.js.map +0 -1
- package/lib/setting/setting.type.d.ts +0 -7
- package/lib/setting/setting.type.js +0 -12
- package/lib/setting/setting.type.js.map +0 -1
- package/lib/signature/index.d.ts +0 -1
- package/lib/signature/index.js +0 -18
- package/lib/signature/index.js.map +0 -1
- package/lib/signature/signature.model.d.ts +0 -9
- package/lib/signature/signature.model.js +0 -44
- package/lib/signature/signature.model.js.map +0 -1
- package/lib/student/index.d.ts +0 -2
- package/lib/student/index.js +0 -19
- package/lib/student/index.js.map +0 -1
- package/lib/student/student.dto.d.ts +0 -13
- package/lib/student/student.dto.js +0 -84
- package/lib/student/student.dto.js.map +0 -1
- package/lib/student/student.model.d.ts +0 -22
- package/lib/student/student.model.js +0 -108
- package/lib/student/student.model.js.map +0 -1
- package/lib/task/index.d.ts +0 -2
- package/lib/task/index.js +0 -19
- package/lib/task/index.js.map +0 -1
- package/lib/task/task.dto.d.ts +0 -24
- package/lib/task/task.dto.js +0 -142
- 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 -49
- package/lib/task/task.model.js.map +0 -1
- package/lib/ticket/index.d.ts +0 -3
- package/lib/ticket/index.js +0 -20
- package/lib/ticket/index.js.map +0 -1
- package/lib/ticket/ticket.dto.d.ts +0 -13
- package/lib/ticket/ticket.dto.js +0 -68
- package/lib/ticket/ticket.dto.js.map +0 -1
- package/lib/ticket/ticket.enum.d.ts +0 -5
- package/lib/ticket/ticket.enum.js +0 -10
- package/lib/ticket/ticket.enum.js.map +0 -1
- package/lib/ticket/ticket.model.d.ts +0 -11
- package/lib/ticket/ticket.model.js +0 -54
- package/lib/ticket/ticket.model.js.map +0 -1
- package/lib/training/course.model.d.ts +0 -8
- package/lib/training/course.model.js +0 -36
- package/lib/training/course.model.js.map +0 -1
- package/lib/training/driving.model.d.ts +0 -17
- package/lib/training/driving.model.js +0 -73
- package/lib/training/driving.model.js.map +0 -1
- package/lib/training/index.d.ts +0 -7
- package/lib/training/index.js +0 -24
- package/lib/training/index.js.map +0 -1
- package/lib/training/request.dto.d.ts +0 -4
- package/lib/training/request.dto.js +0 -24
- package/lib/training/request.dto.js.map +0 -1
- package/lib/training/request.model.d.ts +0 -27
- package/lib/training/request.model.js +0 -111
- package/lib/training/request.model.js.map +0 -1
- package/lib/training/training.dto.d.ts +0 -47
- package/lib/training/training.dto.js +0 -305
- package/lib/training/training.dto.js.map +0 -1
- package/lib/training/training.model.d.ts +0 -94
- package/lib/training/training.model.js +0 -319
- package/lib/training/training.model.js.map +0 -1
- package/lib/training/training.types.d.ts +0 -15
- package/lib/training/training.types.js +0 -22
- package/lib/training/training.types.js.map +0 -1
- package/lib/tsconfig.tsbuildinfo +0 -1
- package/lib/types/activity.type.d.ts +0 -46
- package/lib/types/activity.type.js +0 -51
- package/lib/types/activity.type.js.map +0 -1
- package/lib/types/addon.type.d.ts +0 -66
- package/lib/types/addon.type.js +0 -71
- package/lib/types/addon.type.js.map +0 -1
- package/lib/types/calendar.type.d.ts +0 -24
- package/lib/types/calendar.type.js +0 -31
- package/lib/types/calendar.type.js.map +0 -1
- package/lib/types/driving.type.d.ts +0 -12
- package/lib/types/driving.type.js +0 -18
- package/lib/types/driving.type.js.map +0 -1
- package/lib/types/earning.type.d.ts +0 -6
- package/lib/types/earning.type.js +0 -3
- package/lib/types/earning.type.js.map +0 -1
- package/lib/types/finance.type.d.ts +0 -67
- package/lib/types/finance.type.js +0 -77
- package/lib/types/finance.type.js.map +0 -1
- package/lib/types/index.d.ts +0 -15
- package/lib/types/index.js +0 -32
- package/lib/types/index.js.map +0 -1
- package/lib/types/interface.d.ts +0 -79
- package/lib/types/interface.js +0 -4
- package/lib/types/interface.js.map +0 -1
- package/lib/types/metric.type.d.ts +0 -34
- package/lib/types/metric.type.js +0 -39
- package/lib/types/metric.type.js.map +0 -1
- package/lib/types/policy.type.d.ts +0 -27
- package/lib/types/policy.type.js +0 -32
- package/lib/types/policy.type.js.map +0 -1
- package/lib/types/priceplan.type.d.ts +0 -39
- package/lib/types/priceplan.type.js +0 -48
- package/lib/types/priceplan.type.js.map +0 -1
- package/lib/types/product.type.d.ts +0 -202
- package/lib/types/product.type.js +0 -209
- package/lib/types/product.type.js.map +0 -1
- package/lib/types/program.type.d.ts +0 -23
- package/lib/types/program.type.js +0 -28
- package/lib/types/program.type.js.map +0 -1
- package/lib/types/security.type.d.ts +0 -54
- package/lib/types/security.type.js +0 -60
- package/lib/types/security.type.js.map +0 -1
- package/lib/types/support.type.d.ts +0 -128
- package/lib/types/support.type.js +0 -145
- package/lib/types/support.type.js.map +0 -1
- package/lib/types/training.type.d.ts +0 -16
- package/lib/types/training.type.js +0 -22
- package/lib/types/training.type.js.map +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/index.d.ts +0 -4
- package/lib/user/index.js +0 -21
- package/lib/user/index.js.map +0 -1
- package/lib/user/profile.dto.d.ts +0 -16
- package/lib/user/profile.dto.js +0 -64
- package/lib/user/profile.dto.js.map +0 -1
- package/lib/user/profile.type.d.ts +0 -10
- package/lib/user/profile.type.js +0 -15
- package/lib/user/profile.type.js.map +0 -1
- package/lib/user/user.model.d.ts +0 -53
- package/lib/user/user.model.js +0 -200
- package/lib/user/user.model.js.map +0 -1
- package/lib/utils/array.helper.d.ts +0 -21
- package/lib/utils/array.helper.js +0 -33
- 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 -97
- package/lib/utils/date.helper.js +0 -226
- package/lib/utils/date.helper.js.map +0 -1
- package/lib/utils/index.d.ts +0 -3
- package/lib/utils/index.js +0 -20
- package/lib/utils/index.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 -48
- package/lib/utils/transformers.helper.js +0 -184
- package/lib/utils/transformers.helper.js.map +0 -1
- package/lib/validators/compare.validator.d.ts +0 -9
- package/lib/validators/compare.validator.js +0 -34
- package/lib/validators/compare.validator.js.map +0 -1
- package/lib/validators/index.d.ts +0 -2
- package/lib/validators/index.js +0 -19
- package/lib/validators/index.js.map +0 -1
- package/lib/validators/required.validator.d.ts +0 -21
- package/lib/validators/required.validator.js +0 -95
- package/lib/validators/required.validator.js.map +0 -1
package/lib/utils/index.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./array.helper"), exports);
|
|
18
|
-
__exportStar(require("./date.helper"), exports);
|
|
19
|
-
__exportStar(require("./phone.helper"), exports);
|
|
20
|
-
//# sourceMappingURL=index.js.map
|
package/lib/utils/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,gDAA8B;AAC9B,iDAA+B"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare class PhoneHelper {
|
|
2
|
-
/**
|
|
3
|
-
* Extracts the country code from a given phone number string.
|
|
4
|
-
* @param phoneNumber - The phone number string to extract the country code from.
|
|
5
|
-
* @param prefix - The prefix to prepend to the extracted country code. Default is '+'.
|
|
6
|
-
* @returns The extracted country code with the specified prefix, or null if not found.
|
|
7
|
-
*/
|
|
8
|
-
static extractCountryCode(phoneNumber: string, prefix?: string): string;
|
|
9
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PhoneHelper = void 0;
|
|
4
|
-
class PhoneHelper {
|
|
5
|
-
/**
|
|
6
|
-
* Extracts the country code from a given phone number string.
|
|
7
|
-
* @param phoneNumber - The phone number string to extract the country code from.
|
|
8
|
-
* @param prefix - The prefix to prepend to the extracted country code. Default is '+'.
|
|
9
|
-
* @returns The extracted country code with the specified prefix, or null if not found.
|
|
10
|
-
*/
|
|
11
|
-
static extractCountryCode(phoneNumber, prefix = '+') {
|
|
12
|
-
const match = /^\+(\d{1,4})/.exec(phoneNumber);
|
|
13
|
-
return match ? prefix + match[1] : null;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
exports.PhoneHelper = PhoneHelper;
|
|
17
|
-
//# sourceMappingURL=phone.helper.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"phone.helper.js","sourceRoot":"","sources":["../../src/utils/phone.helper.ts"],"names":[],"mappings":";;;AACA,MAAa,WAAW;IAEvB;;;;;OAKG;IACH,MAAM,CAAC,kBAAkB,CAAC,WAAmB,EAAE,MAAM,GAAG,GAAG;QAC1D,MAAM,KAAK,GAAG,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC/C,OAAO,KAAK,CAAC,CAAC,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACzC,CAAC;CACD;AAZD,kCAYC"}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { ValidationArguments, ValidationOptions, ValidatorConstraintInterface } from "class-validator";
|
|
2
|
-
/**
|
|
3
|
-
* Validator constraint that ensures two fields are both empty or both filled
|
|
4
|
-
* Used for mutually dependent fields that should be set together
|
|
5
|
-
*/
|
|
6
|
-
export declare class MutuallyRequiredConstraint implements ValidatorConstraintInterface {
|
|
7
|
-
/**
|
|
8
|
-
* Validates that both fields are either empty or both have values
|
|
9
|
-
* @param value - The value of the decorated field
|
|
10
|
-
* @param args - Validation arguments containing the related field name
|
|
11
|
-
* @returns True if both fields are empty or both have values, false otherwise
|
|
12
|
-
*/
|
|
13
|
-
validate(value: any, args: ValidationArguments): boolean;
|
|
14
|
-
/**
|
|
15
|
-
* Returns the default error message when validation fails
|
|
16
|
-
* @param args - Validation arguments
|
|
17
|
-
* @returns Error message string
|
|
18
|
-
*/
|
|
19
|
-
defaultMessage(args: ValidationArguments): string;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Decorator that checks if two fields are mutually empty or both with value
|
|
23
|
-
* Both fields must be either empty or filled together
|
|
24
|
-
*
|
|
25
|
-
* @param relatedField - The field name that needs to be checked with the decorated field
|
|
26
|
-
* @param validationOptions - Optional class-validator validation options
|
|
27
|
-
* @returns Property decorator function
|
|
28
|
-
*
|
|
29
|
-
* @example
|
|
30
|
-
* ```typescript
|
|
31
|
-
* class MyDto {
|
|
32
|
-
* @MutuallyRequired('endDate')
|
|
33
|
-
* startDate: Date;
|
|
34
|
-
*
|
|
35
|
-
* endDate: Date;
|
|
36
|
-
* }
|
|
37
|
-
* ```
|
|
38
|
-
*/
|
|
39
|
-
export declare function MutuallyRequired(relatedField: string, validationOptions?: ValidationOptions): (object: Object, propertyName: string) => void;
|
|
40
|
-
/**
|
|
41
|
-
* Validator constraint that ensures at least one of two fields has a value
|
|
42
|
-
* Used for fields where at least one must be provided
|
|
43
|
-
*/
|
|
44
|
-
export declare class EitherRequiredConstraint implements ValidatorConstraintInterface {
|
|
45
|
-
/**
|
|
46
|
-
* Validates that at least one of the two fields has a value
|
|
47
|
-
* @param value - The value of the decorated field
|
|
48
|
-
* @param args - Validation arguments containing the related field name
|
|
49
|
-
* @returns True if at least one field has a value, false if both are empty
|
|
50
|
-
*/
|
|
51
|
-
validate(value: any, args: ValidationArguments): boolean;
|
|
52
|
-
/**
|
|
53
|
-
* Returns the default error message when validation fails
|
|
54
|
-
* @param args - Validation arguments
|
|
55
|
-
* @returns Error message string
|
|
56
|
-
*/
|
|
57
|
-
defaultMessage(args: ValidationArguments): string;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Decorator that checks if at least one of two fields has a value
|
|
61
|
-
* At least one field must be provided
|
|
62
|
-
*
|
|
63
|
-
* @param relatedField - The field name that needs to be checked with the decorated field
|
|
64
|
-
* @param validationOptions - Optional class-validator validation options
|
|
65
|
-
* @returns Property decorator function
|
|
66
|
-
*
|
|
67
|
-
* @example
|
|
68
|
-
* ```typescript
|
|
69
|
-
* class MyDto {
|
|
70
|
-
* @EitherRequired('email')
|
|
71
|
-
* phone: string;
|
|
72
|
-
*
|
|
73
|
-
* email: string;
|
|
74
|
-
* }
|
|
75
|
-
* ```
|
|
76
|
-
*/
|
|
77
|
-
export declare function EitherRequired(relatedField: string, validationOptions?: ValidationOptions): (object: Object, propertyName: string) => void;
|
|
@@ -1,151 +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.EitherRequiredConstraint = exports.MutuallyRequiredConstraint = void 0;
|
|
10
|
-
exports.MutuallyRequired = MutuallyRequired;
|
|
11
|
-
exports.EitherRequired = EitherRequired;
|
|
12
|
-
const class_validator_1 = require("class-validator");
|
|
13
|
-
/**
|
|
14
|
-
* Validator constraint that ensures two fields are both empty or both filled
|
|
15
|
-
* Used for mutually dependent fields that should be set together
|
|
16
|
-
*/
|
|
17
|
-
let MutuallyRequiredConstraint = class MutuallyRequiredConstraint {
|
|
18
|
-
/**
|
|
19
|
-
* Validates that both fields are either empty or both have values
|
|
20
|
-
* @param value - The value of the decorated field
|
|
21
|
-
* @param args - Validation arguments containing the related field name
|
|
22
|
-
* @returns True if both fields are empty or both have values, false otherwise
|
|
23
|
-
*/
|
|
24
|
-
validate(value, args) {
|
|
25
|
-
const dto = args.object;
|
|
26
|
-
const relatedField = args.constraints[0]; // field name passed in the decorator
|
|
27
|
-
const relatedValue = dto[relatedField];
|
|
28
|
-
if (!value && !relatedValue) {
|
|
29
|
-
// Both are empty: validation passes
|
|
30
|
-
return true;
|
|
31
|
-
}
|
|
32
|
-
if (value && relatedValue) {
|
|
33
|
-
// Both fields set: validation passes
|
|
34
|
-
return true;
|
|
35
|
-
}
|
|
36
|
-
// One field has a value but the other does not. validation fails
|
|
37
|
-
return false;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Returns the default error message when validation fails
|
|
41
|
-
* @param args - Validation arguments
|
|
42
|
-
* @returns Error message string
|
|
43
|
-
*/
|
|
44
|
-
defaultMessage(args) {
|
|
45
|
-
return `${args.property} cannot be null if ${args.constraints[0]} is provided`;
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
exports.MutuallyRequiredConstraint = MutuallyRequiredConstraint;
|
|
49
|
-
exports.MutuallyRequiredConstraint = MutuallyRequiredConstraint = __decorate([
|
|
50
|
-
(0, class_validator_1.ValidatorConstraint)({
|
|
51
|
-
name: 'MutuallyRequired',
|
|
52
|
-
async: false
|
|
53
|
-
})
|
|
54
|
-
], MutuallyRequiredConstraint);
|
|
55
|
-
/**
|
|
56
|
-
* Decorator that checks if two fields are mutually empty or both with value
|
|
57
|
-
* Both fields must be either empty or filled together
|
|
58
|
-
*
|
|
59
|
-
* @param relatedField - The field name that needs to be checked with the decorated field
|
|
60
|
-
* @param validationOptions - Optional class-validator validation options
|
|
61
|
-
* @returns Property decorator function
|
|
62
|
-
*
|
|
63
|
-
* @example
|
|
64
|
-
* ```typescript
|
|
65
|
-
* class MyDto {
|
|
66
|
-
* @MutuallyRequired('endDate')
|
|
67
|
-
* startDate: Date;
|
|
68
|
-
*
|
|
69
|
-
* endDate: Date;
|
|
70
|
-
* }
|
|
71
|
-
* ```
|
|
72
|
-
*/
|
|
73
|
-
function MutuallyRequired(relatedField, validationOptions) {
|
|
74
|
-
return function (object, propertyName) {
|
|
75
|
-
(0, class_validator_1.registerDecorator)({
|
|
76
|
-
target: object.constructor,
|
|
77
|
-
propertyName: propertyName,
|
|
78
|
-
options: validationOptions,
|
|
79
|
-
constraints: [relatedField], // This should be dynamic
|
|
80
|
-
validator: MutuallyRequiredConstraint
|
|
81
|
-
});
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Validator constraint that ensures at least one of two fields has a value
|
|
86
|
-
* Used for fields where at least one must be provided
|
|
87
|
-
*/
|
|
88
|
-
let EitherRequiredConstraint = class EitherRequiredConstraint {
|
|
89
|
-
/**
|
|
90
|
-
* Validates that at least one of the two fields has a value
|
|
91
|
-
* @param value - The value of the decorated field
|
|
92
|
-
* @param args - Validation arguments containing the related field name
|
|
93
|
-
* @returns True if at least one field has a value, false if both are empty
|
|
94
|
-
*/
|
|
95
|
-
validate(value, args) {
|
|
96
|
-
const dto = args.object;
|
|
97
|
-
const relatedField = args.constraints[0]; // field name passed in the decorator
|
|
98
|
-
const relatedValue = dto[relatedField];
|
|
99
|
-
if (value || relatedValue) {
|
|
100
|
-
// One has value: validation passes
|
|
101
|
-
return true;
|
|
102
|
-
}
|
|
103
|
-
// Neither has value: validation fails
|
|
104
|
-
return false;
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* Returns the default error message when validation fails
|
|
108
|
-
* @param args - Validation arguments
|
|
109
|
-
* @returns Error message string
|
|
110
|
-
*/
|
|
111
|
-
defaultMessage(args) {
|
|
112
|
-
return `${args.property} cannot be empty if ${args.constraints[0]} is also empty`;
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
exports.EitherRequiredConstraint = EitherRequiredConstraint;
|
|
116
|
-
exports.EitherRequiredConstraint = EitherRequiredConstraint = __decorate([
|
|
117
|
-
(0, class_validator_1.ValidatorConstraint)({
|
|
118
|
-
name: 'EitherRequired',
|
|
119
|
-
async: false
|
|
120
|
-
})
|
|
121
|
-
], EitherRequiredConstraint);
|
|
122
|
-
/**
|
|
123
|
-
* Decorator that checks if at least one of two fields has a value
|
|
124
|
-
* At least one field must be provided
|
|
125
|
-
*
|
|
126
|
-
* @param relatedField - The field name that needs to be checked with the decorated field
|
|
127
|
-
* @param validationOptions - Optional class-validator validation options
|
|
128
|
-
* @returns Property decorator function
|
|
129
|
-
*
|
|
130
|
-
* @example
|
|
131
|
-
* ```typescript
|
|
132
|
-
* class MyDto {
|
|
133
|
-
* @EitherRequired('email')
|
|
134
|
-
* phone: string;
|
|
135
|
-
*
|
|
136
|
-
* email: string;
|
|
137
|
-
* }
|
|
138
|
-
* ```
|
|
139
|
-
*/
|
|
140
|
-
function EitherRequired(relatedField, validationOptions) {
|
|
141
|
-
return function (object, propertyName) {
|
|
142
|
-
(0, class_validator_1.registerDecorator)({
|
|
143
|
-
target: object.constructor,
|
|
144
|
-
propertyName: propertyName,
|
|
145
|
-
options: validationOptions,
|
|
146
|
-
constraints: [relatedField], // This should be dynamic
|
|
147
|
-
validator: EitherRequiredConstraint
|
|
148
|
-
});
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
//# sourceMappingURL=required.validator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"required.validator.js","sourceRoot":"","sources":["../../src/utils/required.validator.ts"],"names":[],"mappings":";;;;;;;;;AAsEA,4CAaC;AA2DD,wCAaC;AA3JD,qDAMyB;AAEzB;;;GAGG;AAKI,IAAM,0BAA0B,GAAhC,MAAM,0BAA0B;IACtC;;;;;OAKG;IACH,QAAQ,CAAC,KAAU,EAAE,IAAyB;QAC7C,MAAM,GAAG,GAAG,IAAI,CAAC,MAA6B,CAAC;QAC/C,MAAM,YAAY,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,qCAAqC;QAC/E,MAAM,YAAY,GAAG,GAAG,CAAC,YAAY,CAAC,CAAC;QAEvC,IAAI,CAAC,KAAK,IAAI,CAAC,YAAY,EAAE,CAAC;YAC7B,oCAAoC;YACpC,OAAO,IAAI,CAAC;QACb,CAAC;QAED,IAAI,KAAK,IAAI,YAAY,EAAE,CAAC;YAC3B,qCAAqC;YACrC,OAAO,IA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C,QAAQ,uBAAuB,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,gBAAgB,CAAC;IACnF,CAAC;CACD,CAAA;AA7BY,4DAAwB;mCAAxB,wBAAwB;IAJpC,IAAA,qCAAmB,EAAC;QACpB,IAAI,EAAE,gBAAgB;QACtB,KAAK,EAAE,KAAK;KACZ,CAAC;GACW,wBAAwB,CA6BpC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,SAAgB,cAAc,CAC7B,YAAoB,EACpB,iBAAqC;IAErC,OAAO,UAAU,MAAc,EAAE,YAAoB;QACpD,IAAA,mCAAiB,EAAC;YACjB,MAAM,EAAE,MAAM,CAAC,WAAW;YAC1B,YAAY,EAAE,YAAY;YAC1B,OAAO,EAAE,iBAAiB;YAC1B,WAAW,EAAE,CAAC,YAAY,CAAC,EAAE,yBAAyB;YACtD,SAAS,EAAE,wBAAwB;SACnC,CAAC,CAAC;IACJ,CAAC,CAAC;AACH,CAAC"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Transforms a value to an array of numbers
|
|
3
|
-
* Handles comma-separated strings, single values, and arrays
|
|
4
|
-
* Filters out NaN values
|
|
5
|
-
* @returns A class-transformer decorator
|
|
6
|
-
*/
|
|
7
|
-
export declare function ToNumberArray(): PropertyDecorator;
|
|
8
|
-
/**
|
|
9
|
-
* Transforms a value to an array of strings
|
|
10
|
-
* Handles comma-separated strings, single values, and arrays
|
|
11
|
-
* Trims and filters out empty strings
|
|
12
|
-
* @returns A class-transformer decorator
|
|
13
|
-
*/
|
|
14
|
-
export declare function ToStringArray(): PropertyDecorator;
|
|
15
|
-
/**
|
|
16
|
-
* Transforms a value to an enum type
|
|
17
|
-
* Matches by value or key (case-insensitive)
|
|
18
|
-
* @template E - The enum type
|
|
19
|
-
* @param enumType - The enum object to transform to
|
|
20
|
-
* @returns A class-transformer decorator
|
|
21
|
-
*/
|
|
22
|
-
export declare function ToEnum<E extends object>(enumType: E): PropertyDecorator;
|
|
23
|
-
/**
|
|
24
|
-
* Transforms a value to an array of enum values
|
|
25
|
-
* Matches by value or key (case-insensitive)
|
|
26
|
-
* @template E - The enum type
|
|
27
|
-
* @param enumType - The enum object to transform to
|
|
28
|
-
* @returns A class-transformer decorator
|
|
29
|
-
*/
|
|
30
|
-
export declare function ToEnumArray<E extends object>(enumType: E): PropertyDecorator;
|
|
31
|
-
/**
|
|
32
|
-
* Transforms a value to a number
|
|
33
|
-
* Returns original value if conversion results in NaN
|
|
34
|
-
* @returns A class-transformer decorator
|
|
35
|
-
*/
|
|
36
|
-
export declare function ToNumber(): PropertyDecorator;
|
|
37
|
-
/**
|
|
38
|
-
* Trims whitespace from string values
|
|
39
|
-
* Returns non-string values unchanged
|
|
40
|
-
* @returns A class-transformer decorator
|
|
41
|
-
*/
|
|
42
|
-
export declare function Trim(): PropertyDecorator;
|
|
43
|
-
/**
|
|
44
|
-
* Transforms a value to a boolean
|
|
45
|
-
* Handles string values ('true', 'false', '1', '0') and numeric values (1, 0)
|
|
46
|
-
* @returns A class-transformer decorator
|
|
47
|
-
*/
|
|
48
|
-
export declare function ToBoolean(): PropertyDecorator;
|
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ToNumberArray = ToNumberArray;
|
|
4
|
-
exports.ToStringArray = ToStringArray;
|
|
5
|
-
exports.ToEnum = ToEnum;
|
|
6
|
-
exports.ToEnumArray = ToEnumArray;
|
|
7
|
-
exports.ToNumber = ToNumber;
|
|
8
|
-
exports.Trim = Trim;
|
|
9
|
-
exports.ToBoolean = ToBoolean;
|
|
10
|
-
const class_transformer_1 = require("class-transformer");
|
|
11
|
-
/**
|
|
12
|
-
* Transforms a value to an array of numbers
|
|
13
|
-
* Handles comma-separated strings, single values, and arrays
|
|
14
|
-
* Filters out NaN values
|
|
15
|
-
* @returns A class-transformer decorator
|
|
16
|
-
*/
|
|
17
|
-
function ToNumberArray() {
|
|
18
|
-
return (0, class_transformer_1.Transform)(({ value }) => {
|
|
19
|
-
if (value === undefined || value === null)
|
|
20
|
-
return [];
|
|
21
|
-
if (typeof value === 'string') {
|
|
22
|
-
value = value.split(',');
|
|
23
|
-
}
|
|
24
|
-
if (!Array.isArray(value)) {
|
|
25
|
-
value = [value];
|
|
26
|
-
}
|
|
27
|
-
return value
|
|
28
|
-
.map((v) => Number(v))
|
|
29
|
-
.filter((v) => !isNaN(v));
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Transforms a value to an array of strings
|
|
34
|
-
* Handles comma-separated strings, single values, and arrays
|
|
35
|
-
* Trims and filters out empty strings
|
|
36
|
-
* @returns A class-transformer decorator
|
|
37
|
-
*/
|
|
38
|
-
function ToStringArray() {
|
|
39
|
-
return (0, class_transformer_1.Transform)(({ value }) => {
|
|
40
|
-
if (value === undefined || value === null)
|
|
41
|
-
return [];
|
|
42
|
-
// If comma-separated string → split
|
|
43
|
-
if (typeof value === 'string') {
|
|
44
|
-
return value
|
|
45
|
-
.split(',')
|
|
46
|
-
.map(v => v.trim())
|
|
47
|
-
.filter(v => v.length > 0);
|
|
48
|
-
}
|
|
49
|
-
// If not array → wrap into array
|
|
50
|
-
if (!Array.isArray(value)) {
|
|
51
|
-
value = [value];
|
|
52
|
-
}
|
|
53
|
-
// Normalize every element to a string
|
|
54
|
-
return value
|
|
55
|
-
.map((v) => (v != null ? String(v).trim() : ''))
|
|
56
|
-
.filter((v) => v.length > 0);
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Transforms a value to an enum type
|
|
61
|
-
* Matches by value or key (case-insensitive)
|
|
62
|
-
* @template E - The enum type
|
|
63
|
-
* @param enumType - The enum object to transform to
|
|
64
|
-
* @returns A class-transformer decorator
|
|
65
|
-
*/
|
|
66
|
-
function ToEnum(enumType) {
|
|
67
|
-
return (0, class_transformer_1.Transform)(({ value }) => {
|
|
68
|
-
if (value == null)
|
|
69
|
-
return value;
|
|
70
|
-
// Normalize: trim strings
|
|
71
|
-
const normalized = typeof value === 'string'
|
|
72
|
-
? value.trim()
|
|
73
|
-
: value;
|
|
74
|
-
// Try to match enum by value or key
|
|
75
|
-
for (const key of Object.keys(enumType)) {
|
|
76
|
-
const enumValue = enumType[key];
|
|
77
|
-
// match by value
|
|
78
|
-
if (enumValue === normalized)
|
|
79
|
-
return enumValue;
|
|
80
|
-
// match by key (case-insensitive)
|
|
81
|
-
if (key.toLowerCase() === String(normalized).toLowerCase()) {
|
|
82
|
-
return enumValue;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
// Fallback: return original or throw
|
|
86
|
-
return value;
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Transforms a value to an array of enum values
|
|
91
|
-
* Matches by value or key (case-insensitive)
|
|
92
|
-
* @template E - The enum type
|
|
93
|
-
* @param enumType - The enum object to transform to
|
|
94
|
-
* @returns A class-transformer decorator
|
|
95
|
-
*/
|
|
96
|
-
function ToEnumArray(enumType) {
|
|
97
|
-
return (0, class_transformer_1.Transform)(({ value }) => {
|
|
98
|
-
if (value == null)
|
|
99
|
-
return [];
|
|
100
|
-
// Normalize to array
|
|
101
|
-
const arr = Array.isArray(value) ? value : [value];
|
|
102
|
-
const result = [];
|
|
103
|
-
for (let item of arr) {
|
|
104
|
-
if (item == null)
|
|
105
|
-
continue;
|
|
106
|
-
const normalized = typeof item === 'string' ? item.trim() : item;
|
|
107
|
-
let matched = undefined;
|
|
108
|
-
for (const key of Object.keys(enumType)) {
|
|
109
|
-
const enumValue = enumType[key];
|
|
110
|
-
// match value directly
|
|
111
|
-
if (enumValue === normalized) {
|
|
112
|
-
matched = enumValue;
|
|
113
|
-
break;
|
|
114
|
-
}
|
|
115
|
-
// match by key (case-insensitive)
|
|
116
|
-
if (typeof normalized === 'string' &&
|
|
117
|
-
key.toLowerCase() === normalized.toLowerCase()) {
|
|
118
|
-
matched = enumValue;
|
|
119
|
-
break;
|
|
120
|
-
}
|
|
121
|
-
if (matched === undefined) {
|
|
122
|
-
throw new Error(`validation.invalidEnumValue`);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
result.push(matched);
|
|
126
|
-
}
|
|
127
|
-
return result;
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* Transforms a value to a number
|
|
132
|
-
* Returns original value if conversion results in NaN
|
|
133
|
-
* @returns A class-transformer decorator
|
|
134
|
-
*/
|
|
135
|
-
function ToNumber() {
|
|
136
|
-
return (0, class_transformer_1.Transform)(({ value }) => {
|
|
137
|
-
if (value === undefined || value === null)
|
|
138
|
-
return value;
|
|
139
|
-
const num = Number(value);
|
|
140
|
-
return isNaN(num) ? value : num;
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
|
-
/**
|
|
144
|
-
* Trims whitespace from string values
|
|
145
|
-
* Returns non-string values unchanged
|
|
146
|
-
* @returns A class-transformer decorator
|
|
147
|
-
*/
|
|
148
|
-
function Trim() {
|
|
149
|
-
return (0, class_transformer_1.Transform)(({ value }) => {
|
|
150
|
-
if (typeof value !== 'string')
|
|
151
|
-
return value;
|
|
152
|
-
return value.trim();
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
/**
|
|
156
|
-
* Transforms a value to a boolean
|
|
157
|
-
* Handles string values ('true', 'false', '1', '0') and numeric values (1, 0)
|
|
158
|
-
* @returns A class-transformer decorator
|
|
159
|
-
*/
|
|
160
|
-
function ToBoolean() {
|
|
161
|
-
return (0, class_transformer_1.Transform)(({ value }) => {
|
|
162
|
-
if (value === undefined || value === null)
|
|
163
|
-
return value;
|
|
164
|
-
// Already boolean
|
|
165
|
-
if (typeof value === 'boolean')
|
|
166
|
-
return value;
|
|
167
|
-
// Numeric or numeric-like string
|
|
168
|
-
if (value === 1 || value === '1')
|
|
169
|
-
return true;
|
|
170
|
-
if (value === 0 || value === '0')
|
|
171
|
-
return false;
|
|
172
|
-
// String true/false
|
|
173
|
-
if (typeof value === 'string') {
|
|
174
|
-
const v = value.trim().toLowerCase();
|
|
175
|
-
if (v === 'true')
|
|
176
|
-
return true;
|
|
177
|
-
if (v === 'false')
|
|
178
|
-
return false;
|
|
179
|
-
}
|
|
180
|
-
// Fallback: return original
|
|
181
|
-
return value;
|
|
182
|
-
});
|
|
183
|
-
}
|
|
184
|
-
//# sourceMappingURL=transformers.helper.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transformers.helper.js","sourceRoot":"","sources":["../../src/utils/transformers.helper.ts"],"names":[],"mappings":";;AAQA,sCAgBC;AAQD,sCAsBC;AASD,wBAyBC;AASD,kCA2CC;AAOD,4BAMC;AAOD,oBAKC;AAOD,8BAqBC;AAjMD,yDAA8C;AAE9C;;;;;GAKG;AACH,SAAgB,aAAa;IAC5B,OAAO,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;QAC9B,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI;YAAE,OAAO,EAAE,CAAC;QAErD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC/B,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC1B,CAAC;QAED,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YAC3B,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC;QACjB,CAAC;QAED,OAAO,KAAK;aACV,GAAG,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;aAC1B,MAAM,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,SAAgB,aAAa;IAC5B,OAAO,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EA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SAAS;YAAE,OAAO,KAAK,CAAC;QAE7C,iCAAiC;QACjC,IAAI,KAAK,KAAK,CAAC,IAAI,KAAK,KAAK,GAAG;YAAE,OAAO,IAAI,CAAC;QAC9C,IAAI,KAAK,KAAK,CAAC,IAAI,KAAK,KAAK,GAAG;YAAE,OAAO,KAAK,CAAC;QAE/C,oBAAoB;QACpB,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAChC,MAAM,CAAC,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;YACrC,IAAI,CAAC,KAAK,MAAM;gBAAE,OAAO,IAAI,CAAC;YAC9B,IAAI,CAAC,KAAK,OAAO;gBAAE,OAAO,KAAK,CAAC;QAChC,CAAC;QAED,4BAA4B;QAC5B,OAAO,KAAK,CAAC;IACd,CAAC,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -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,34 +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, if it's not there the args will be treated as the startDate and we won't have access to the object
|
|
18
|
-
validate(startDate, args) {
|
|
19
|
-
const dto = args.object;
|
|
20
|
-
// no validation is performed if either is not provided
|
|
21
|
-
if (!luxon_1.DateTime.fromJSDate(dto.startDate).isValid ||
|
|
22
|
-
!luxon_1.DateTime.fromJSDate(dto.endDate).isValid)
|
|
23
|
-
return true;
|
|
24
|
-
return dto.startDate < dto.endDate;
|
|
25
|
-
}
|
|
26
|
-
defaultMessage(args) {
|
|
27
|
-
return 'start date cannot be greater than end date';
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
exports.CompareWithEndDate = CompareWithEndDate;
|
|
31
|
-
exports.CompareWithEndDate = CompareWithEndDate = __decorate([
|
|
32
|
-
(0, class_validator_1.ValidatorConstraint)({ name: 'CompareWithEndDate', async: false })
|
|
33
|
-
], CompareWithEndDate);
|
|
34
|
-
//# sourceMappingURL=compare.validator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compare.validator.js","sourceRoot":"","sources":["../../src/validators/compare.validator.ts"],"names":[],"mappings":";;;;;;;;;AAAA,qDAAyG;AACzG,iCAAiC;AAGjC;;;GAGG;AAEI,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAC9B,oJAAoJ;IACpJ,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;AAlBY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,qCAAmB,EAAC,EAAE,IAAI,EAAE,oBAAoB,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;GACrD,kBAAkB,CAkB9B"}
|
package/lib/validators/index.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./compare.validator"), exports);
|
|
18
|
-
__exportStar(require("./required.validator"), exports);
|
|
19
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/validators/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,uDAAqC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ValidationArguments, ValidationOptions, ValidatorConstraintInterface } from "class-validator";
|
|
2
|
-
export declare class MutuallyRequiredConstraint implements ValidatorConstraintInterface {
|
|
3
|
-
validate(value: any, args: ValidationArguments): boolean;
|
|
4
|
-
defaultMessage(args: ValidationArguments): string;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Checks if the two fields are mutually empty or with value.
|
|
8
|
-
*
|
|
9
|
-
* @param relatedField the field name that needs to be checked with the field the decorator has been applied to
|
|
10
|
-
*/
|
|
11
|
-
export declare function MutuallyRequired(relatedField: string, validationOptions?: ValidationOptions): (object: Object, propertyName: string) => void;
|
|
12
|
-
export declare class EitherRequiredConstraint implements ValidatorConstraintInterface {
|
|
13
|
-
validate(value: any, args: ValidationArguments): boolean;
|
|
14
|
-
defaultMessage(args: ValidationArguments): string;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Checks if the two fields are mutually empty or with value.
|
|
18
|
-
*
|
|
19
|
-
* @param relatedField the field name that needs to be checked with the field the decorator has been applied to
|
|
20
|
-
*/
|
|
21
|
-
export declare function EitherRequired(relatedField: string, validationOptions?: ValidationOptions): (object: Object, propertyName: string) => void;
|