@intelact/driveup 1.4.47 → 1.4.49
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/lib/agent/agent.dto.d.ts +6 -0
- package/lib/agent/agent.dto.js +51 -0
- package/lib/agent/agent.dto.js.map +1 -0
- package/lib/agent/agent.model.d.ts +13 -0
- package/lib/agent/agent.model.js +64 -0
- package/lib/agent/agent.model.js.map +1 -0
- package/lib/agent/asset.type.d.ts +5 -0
- package/lib/agent/asset.type.js +10 -0
- package/lib/agent/asset.type.js.map +1 -0
- package/lib/agent/client.model.d.ts +8 -0
- package/lib/agent/client.model.js +40 -0
- package/lib/agent/client.model.js.map +1 -0
- package/lib/agent/code.model.d.ts +12 -0
- package/lib/agent/code.model.js +51 -0
- package/lib/agent/code.model.js.map +1 -0
- package/lib/agent/earning.type.d.ts +6 -0
- package/lib/agent/earning.type.js +3 -0
- package/lib/agent/earning.type.js.map +1 -0
- package/lib/agent/index.d.ts +6 -0
- package/lib/agent/index.js +23 -0
- package/lib/agent/index.js.map +1 -0
- package/lib/alert/alert.content.d.ts +4 -0
- package/lib/alert/alert.content.js +9 -0
- package/lib/alert/alert.content.js.map +1 -0
- package/lib/alert/alert.model.d.ts +17 -0
- package/lib/alert/alert.model.js +73 -0
- package/lib/alert/alert.model.js.map +1 -0
- package/lib/alert/index.d.ts +2 -0
- package/lib/alert/index.js +19 -0
- package/lib/alert/index.js.map +1 -0
- package/lib/auth/index.d.ts +2 -0
- package/lib/auth/index.js +19 -0
- package/lib/auth/index.js.map +1 -0
- package/lib/auth/signin.dto.d.ts +6 -0
- package/lib/auth/signin.dto.js +37 -0
- package/lib/auth/signin.dto.js.map +1 -0
- package/lib/auth/signup.dto.d.ts +5 -0
- package/lib/auth/signup.dto.js +38 -0
- package/lib/auth/signup.dto.js.map +1 -0
- package/lib/bank/account.model.d.ts +9 -0
- package/lib/bank/account.model.js +63 -0
- package/lib/bank/account.model.js.map +1 -0
- package/lib/bank/index.d.ts +1 -0
- package/lib/bank/index.js +18 -0
- package/lib/bank/index.js.map +1 -0
- package/lib/bill/bill-item.model.d.ts +38 -0
- package/lib/bill/bill-item.model.js +120 -0
- package/lib/bill/bill-item.model.js.map +1 -0
- package/lib/bill/bill-item.type.d.ts +5 -0
- package/lib/bill/bill-item.type.js +10 -0
- package/lib/bill/bill-item.type.js.map +1 -0
- package/lib/bill/bill.model.d.ts +36 -0
- package/lib/bill/bill.model.js +131 -0
- package/lib/bill/bill.model.js.map +1 -0
- package/lib/bill/bill.status.d.ts +5 -0
- package/lib/bill/bill.status.js +13 -0
- package/lib/bill/bill.status.js.map +1 -0
- package/lib/bill/index.d.ts +4 -0
- package/lib/bill/index.js +21 -0
- package/lib/bill/index.js.map +1 -0
- package/lib/calendar/appointment.d.ts +89 -0
- package/lib/calendar/appointment.js +277 -0
- package/lib/calendar/appointment.js.map +1 -0
- package/lib/calendar/date.d.ts +23 -0
- package/lib/calendar/date.js +92 -0
- package/lib/calendar/date.js.map +1 -0
- package/lib/calendar/holiday.d.ts +11 -0
- package/lib/calendar/holiday.js +46 -0
- package/lib/calendar/holiday.js.map +1 -0
- package/lib/calendar/index.d.ts +6 -0
- package/lib/calendar/index.js +23 -0
- package/lib/calendar/index.js.map +1 -0
- package/lib/calendar/token.d.ts +15 -0
- package/lib/calendar/token.js +3 -0
- package/lib/calendar/token.js.map +1 -0
- package/lib/calendar/types.d.ts +19 -0
- package/lib/calendar/types.js +25 -0
- package/lib/calendar/types.js.map +1 -0
- package/lib/calendar/working.d.ts +9 -0
- package/lib/calendar/working.js +44 -0
- package/lib/calendar/working.js.map +1 -0
- package/lib/common/app-info.d.ts +8 -0
- package/lib/common/app-info.js +43 -0
- package/lib/common/app-info.js.map +1 -0
- package/lib/common/content.d.ts +21 -0
- package/lib/common/content.js +85 -0
- package/lib/common/content.js.map +1 -0
- package/lib/common/context.d.ts +6 -0
- package/lib/common/context.js +11 -0
- package/lib/common/context.js.map +1 -0
- package/lib/common/email.d.ts +4 -0
- package/lib/common/email.js +31 -0
- package/lib/common/email.js.map +1 -0
- package/lib/common/id.d.ts +3 -0
- package/lib/common/id.js +30 -0
- package/lib/common/id.js.map +1 -0
- package/lib/common/identity.d.ts +27 -0
- package/lib/common/identity.js +3 -0
- package/lib/common/identity.js.map +1 -0
- package/lib/common/index.d.ts +15 -0
- package/lib/common/index.js +32 -0
- package/lib/common/index.js.map +1 -0
- package/lib/common/language.d.ts +9 -0
- package/lib/common/language.js +29 -0
- package/lib/common/language.js.map +1 -0
- package/lib/common/phone.d.ts +4 -0
- package/lib/common/phone.js +32 -0
- package/lib/common/phone.js.map +1 -0
- package/lib/common/price.d.ts +3 -0
- package/lib/common/price.js +28 -0
- package/lib/common/price.js.map +1 -0
- package/lib/common/profile.d.ts +5 -0
- package/lib/common/profile.js +30 -0
- package/lib/common/profile.js.map +1 -0
- package/lib/common/promotion.d.ts +3 -0
- package/lib/common/promotion.js +23 -0
- package/lib/common/promotion.js.map +1 -0
- package/lib/common/search.d.ts +3 -0
- package/lib/common/search.js +24 -0
- package/lib/common/search.js.map +1 -0
- package/lib/common/social.d.ts +7 -0
- package/lib/common/social.js +42 -0
- package/lib/common/social.js.map +1 -0
- package/lib/common/sort.d.ts +7 -0
- package/lib/common/sort.js +46 -0
- package/lib/common/sort.js.map +1 -0
- package/lib/common/url.d.ts +3 -0
- package/lib/common/url.js +25 -0
- package/lib/common/url.js.map +1 -0
- package/lib/company/company-widget.model.d.ts +10 -0
- package/lib/company/company-widget.model.js +41 -0
- package/lib/company/company-widget.model.js.map +1 -0
- package/lib/company/company.model.d.ts +77 -0
- package/lib/company/company.model.js +290 -0
- package/lib/company/company.model.js.map +1 -0
- package/lib/company/dependency.model.d.ts +5 -0
- package/lib/company/dependency.model.js +32 -0
- package/lib/company/dependency.model.js.map +1 -0
- package/lib/company/index.d.ts +3 -0
- package/lib/company/index.js +20 -0
- package/lib/company/index.js.map +1 -0
- package/lib/country/country.dto.d.ts +24 -0
- package/lib/country/country.dto.js +150 -0
- package/lib/country/country.dto.js.map +1 -0
- package/lib/country/country.model.d.ts +18 -0
- package/lib/country/country.model.js +87 -0
- package/lib/country/country.model.js.map +1 -0
- package/lib/country/index.d.ts +2 -0
- package/lib/country/index.js +19 -0
- package/lib/country/index.js.map +1 -0
- package/lib/course/appointment.model.d.ts +14 -0
- package/lib/course/appointment.model.js +51 -0
- package/lib/course/appointment.model.js.map +1 -0
- package/lib/course/course.model.d.ts +41 -0
- package/lib/course/course.model.js +163 -0
- package/lib/course/course.model.js.map +1 -0
- package/lib/course/definition.model.d.ts +15 -0
- package/lib/course/definition.model.js +75 -0
- package/lib/course/definition.model.js.map +1 -0
- package/lib/course/dto.d.ts +48 -0
- package/lib/course/dto.js +235 -0
- package/lib/course/dto.js.map +1 -0
- package/lib/course/index.d.ts +6 -0
- package/lib/course/index.js +23 -0
- package/lib/course/index.js.map +1 -0
- package/lib/course/part.model.d.ts +23 -0
- package/lib/course/part.model.js +103 -0
- package/lib/course/part.model.js.map +1 -0
- package/lib/course/types.d.ts +15 -0
- package/lib/course/types.js +22 -0
- package/lib/course/types.js.map +1 -0
- package/lib/credit/credit.model.d.ts +9 -0
- package/lib/credit/credit.model.js +50 -0
- package/lib/credit/credit.model.js.map +1 -0
- package/lib/credit/index.d.ts +1 -0
- package/lib/credit/index.js +18 -0
- package/lib/credit/index.js.map +1 -0
- package/lib/currency/currency.dto.d.ts +19 -0
- package/lib/currency/currency.dto.js +123 -0
- package/lib/currency/currency.dto.js.map +1 -0
- package/lib/currency/currency.model.d.ts +11 -0
- package/lib/currency/currency.model.js +60 -0
- package/lib/currency/currency.model.js.map +1 -0
- package/lib/currency/index.d.ts +2 -0
- package/lib/currency/index.js +19 -0
- package/lib/currency/index.js.map +1 -0
- package/lib/device/device.agent.d.ts +51 -0
- package/lib/device/device.agent.js +3 -0
- package/lib/device/device.agent.js.map +1 -0
- package/lib/device/device.model.d.ts +11 -0
- package/lib/device/device.model.js +61 -0
- package/lib/device/device.model.js.map +1 -0
- package/lib/device/device.signature.d.ts +4 -0
- package/lib/device/device.signature.js +32 -0
- package/lib/device/device.signature.js.map +1 -0
- package/lib/device/index.d.ts +3 -0
- package/lib/device/index.js +20 -0
- package/lib/device/index.js.map +1 -0
- package/lib/discount/discount.dto.d.ts +4 -0
- package/lib/discount/discount.dto.js +32 -0
- package/lib/discount/discount.dto.js.map +1 -0
- package/lib/discount/discount.model.d.ts +23 -0
- package/lib/discount/discount.model.js +102 -0
- package/lib/discount/discount.model.js.map +1 -0
- package/lib/discount/index.d.ts +2 -0
- package/lib/discount/index.js +19 -0
- package/lib/discount/index.js.map +1 -0
- package/lib/driving/category/category.dto.d.ts +32 -0
- package/lib/driving/category/category.dto.js +147 -0
- package/lib/driving/category/category.dto.js.map +1 -0
- package/lib/driving/category/category.model.d.ts +35 -0
- package/lib/driving/category/category.model.js +119 -0
- package/lib/driving/category/category.model.js.map +1 -0
- package/lib/driving/category/index.d.ts +2 -0
- package/lib/driving/category/index.js +19 -0
- package/lib/driving/category/index.js.map +1 -0
- package/lib/driving/exam/exam.dto.d.ts +9 -0
- package/lib/driving/exam/exam.dto.js +42 -0
- package/lib/driving/exam/exam.dto.js.map +1 -0
- package/lib/driving/exam/exam.model.d.ts +9 -0
- package/lib/driving/exam/exam.model.js +44 -0
- package/lib/driving/exam/exam.model.js.map +1 -0
- package/lib/driving/exam/index.d.ts +2 -0
- package/lib/driving/exam/index.js +19 -0
- package/lib/driving/exam/index.js.map +1 -0
- package/lib/driving/index.d.ts +4 -0
- package/lib/driving/index.js +21 -0
- package/lib/driving/index.js.map +1 -0
- package/lib/driving/lesson/index.d.ts +5 -0
- package/lib/driving/lesson/index.js +22 -0
- package/lib/driving/lesson/index.js.map +1 -0
- package/lib/driving/lesson/skill.d.ts +14 -0
- package/lib/driving/lesson/skill.dto.d.ts +7 -0
- package/lib/driving/lesson/skill.dto.js +34 -0
- package/lib/driving/lesson/skill.dto.js.map +1 -0
- package/lib/driving/lesson/skill.js +48 -0
- package/lib/driving/lesson/skill.js.map +1 -0
- package/lib/driving/lesson/topic.d.ts +20 -0
- package/lib/driving/lesson/topic.dto.d.ts +10 -0
- package/lib/driving/lesson/topic.dto.js +59 -0
- package/lib/driving/lesson/topic.dto.js.map +1 -0
- package/lib/driving/lesson/topic.js +83 -0
- package/lib/driving/lesson/topic.js.map +1 -0
- package/lib/driving/lesson/types.d.ts +15 -0
- package/lib/driving/lesson/types.js +21 -0
- package/lib/driving/lesson/types.js.map +1 -0
- package/lib/driving/types.d.ts +9 -0
- package/lib/driving/types.js +15 -0
- package/lib/driving/types.js.map +1 -0
- package/lib/event/event.dto.d.ts +24 -0
- package/lib/event/event.dto.js +146 -0
- package/lib/event/event.dto.js.map +1 -0
- package/lib/event/event.model.d.ts +8 -0
- package/lib/event/event.model.js +49 -0
- package/lib/event/event.model.js.map +1 -0
- package/lib/event/index.d.ts +2 -0
- package/lib/event/index.js +19 -0
- package/lib/event/index.js.map +1 -0
- package/lib/expense/category.model.d.ts +18 -0
- package/lib/expense/category.model.js +80 -0
- package/lib/expense/category.model.js.map +1 -0
- package/lib/expense/expense.dto.d.ts +29 -0
- package/lib/expense/expense.dto.js +174 -0
- package/lib/expense/expense.dto.js.map +1 -0
- package/lib/expense/expense.model.d.ts +20 -0
- package/lib/expense/expense.model.js +104 -0
- package/lib/expense/expense.model.js.map +1 -0
- package/lib/expense/expense.types.d.ts +5 -0
- package/lib/expense/expense.types.js +10 -0
- package/lib/expense/expense.types.js.map +1 -0
- package/lib/expense/index.d.ts +4 -0
- package/lib/expense/index.js +21 -0
- package/lib/expense/index.js.map +1 -0
- package/lib/feedback/feedback.model.d.ts +11 -0
- package/lib/feedback/feedback.model.js +68 -0
- package/lib/feedback/feedback.model.js.map +1 -0
- package/lib/feedback/index.d.ts +1 -0
- package/lib/feedback/index.js +18 -0
- package/lib/feedback/index.js.map +1 -0
- package/lib/finance/finance.dto.d.ts +58 -0
- package/lib/finance/finance.dto.js +399 -0
- package/lib/finance/finance.dto.js.map +1 -0
- package/lib/finance/finance.model.d.ts +35 -0
- package/lib/finance/finance.model.js +146 -0
- package/lib/finance/finance.model.js.map +1 -0
- package/lib/finance/finance.type.d.ts +21 -0
- package/lib/finance/finance.type.js +21 -0
- package/lib/finance/finance.type.js.map +1 -0
- package/lib/finance/index.d.ts +3 -0
- package/lib/finance/index.js +20 -0
- package/lib/finance/index.js.map +1 -0
- package/lib/free-benefit/free-benefit.model.d.ts +7 -0
- package/lib/free-benefit/free-benefit.model.js +33 -0
- package/lib/free-benefit/free-benefit.model.js.map +1 -0
- package/lib/free-benefit/free-benefit.type.d.ts +4 -0
- package/lib/free-benefit/free-benefit.type.js +9 -0
- package/lib/free-benefit/free-benefit.type.js.map +1 -0
- package/lib/free-benefit/index.d.ts +2 -0
- package/lib/free-benefit/index.js +19 -0
- package/lib/free-benefit/index.js.map +1 -0
- package/lib/geo/address.dto.d.ts +19 -0
- package/lib/geo/address.dto.js +80 -0
- package/lib/geo/address.dto.js.map +1 -0
- package/lib/geo/address.model.d.ts +9 -0
- package/lib/geo/address.model.js +42 -0
- package/lib/geo/address.model.js.map +1 -0
- package/lib/geo/coordinate.model.d.ts +4 -0
- package/lib/geo/coordinate.model.js +41 -0
- package/lib/geo/coordinate.model.js.map +1 -0
- package/lib/geo/index.d.ts +4 -0
- package/lib/geo/index.js +21 -0
- package/lib/geo/index.js.map +1 -0
- package/lib/geo/pickup.model.d.ts +11 -0
- package/lib/geo/pickup.model.js +60 -0
- package/lib/geo/pickup.model.js.map +1 -0
- package/lib/giftcode/giftcode-group.model.d.ts +13 -0
- package/lib/giftcode/giftcode-group.model.js +63 -0
- package/lib/giftcode/giftcode-group.model.js.map +1 -0
- package/lib/giftcode/giftcode.dto.d.ts +37 -0
- package/lib/giftcode/giftcode.dto.js +156 -0
- package/lib/giftcode/giftcode.dto.js.map +1 -0
- package/lib/giftcode/giftcode.model.d.ts +19 -0
- package/lib/giftcode/giftcode.model.js +80 -0
- package/lib/giftcode/giftcode.model.js.map +1 -0
- package/lib/giftcode/index.d.ts +3 -0
- package/lib/giftcode/index.js +20 -0
- package/lib/giftcode/index.js.map +1 -0
- package/lib/handover/handover.document.d.ts +5 -0
- package/lib/handover/handover.document.js +3 -0
- package/lib/handover/handover.document.js.map +1 -0
- package/lib/handover/handover.dto.d.ts +6 -0
- package/lib/handover/handover.dto.js +45 -0
- package/lib/handover/handover.dto.js.map +1 -0
- package/lib/handover/handover.model.d.ts +14 -0
- package/lib/handover/handover.model.js +66 -0
- package/lib/handover/handover.model.js.map +1 -0
- package/lib/handover/index.d.ts +3 -0
- package/lib/handover/index.js +20 -0
- package/lib/handover/index.js.map +1 -0
- package/lib/index.d.ts +47 -0
- package/lib/index.js +64 -0
- package/lib/index.js.map +1 -0
- package/lib/instructor/index.d.ts +2 -0
- package/lib/instructor/index.js +19 -0
- package/lib/instructor/index.js.map +1 -0
- package/lib/instructor/instructor.dto.d.ts +21 -0
- package/lib/instructor/instructor.dto.js +122 -0
- package/lib/instructor/instructor.dto.js.map +1 -0
- package/lib/instructor/instructor.model.d.ts +50 -0
- package/lib/instructor/instructor.model.js +206 -0
- package/lib/instructor/instructor.model.js.map +1 -0
- package/lib/invoice/index.d.ts +4 -0
- package/lib/invoice/index.js +21 -0
- package/lib/invoice/index.js.map +1 -0
- package/lib/invoice/invoice.dto.d.ts +10 -0
- package/lib/invoice/invoice.dto.js +66 -0
- package/lib/invoice/invoice.dto.js.map +1 -0
- package/lib/invoice/invoice.model.d.ts +36 -0
- package/lib/invoice/invoice.model.js +170 -0
- package/lib/invoice/invoice.model.js.map +1 -0
- package/lib/invoice/invoice.types.d.ts +6 -0
- package/lib/invoice/invoice.types.js +11 -0
- package/lib/invoice/invoice.types.js.map +1 -0
- package/lib/invoice/item.model.d.ts +7 -0
- package/lib/invoice/item.model.js +42 -0
- package/lib/invoice/item.model.js.map +1 -0
- package/lib/item/index.d.ts +1 -0
- package/lib/item/index.js +18 -0
- package/lib/item/index.js.map +1 -0
- package/lib/item/item.model.d.ts +55 -0
- package/lib/item/item.model.js +80 -0
- package/lib/item/item.model.js.map +1 -0
- package/lib/license/index.d.ts +1 -0
- package/lib/license/index.js +18 -0
- package/lib/license/index.js.map +1 -0
- package/lib/license/license.model.d.ts +5 -0
- package/lib/license/license.model.js +41 -0
- package/lib/license/license.model.js.map +1 -0
- package/lib/link/index.d.ts +1 -0
- package/lib/link/index.js +18 -0
- package/lib/link/index.js.map +1 -0
- package/lib/link/link.model.d.ts +55 -0
- package/lib/link/link.model.js +75 -0
- package/lib/link/link.model.js.map +1 -0
- package/lib/log/index.d.ts +2 -0
- package/lib/log/index.js +19 -0
- package/lib/log/index.js.map +1 -0
- package/lib/log/log.model.d.ts +8 -0
- package/lib/log/log.model.js +42 -0
- package/lib/log/log.model.js.map +1 -0
- package/lib/log/log.type.d.ts +9 -0
- package/lib/log/log.type.js +14 -0
- package/lib/log/log.type.js.map +1 -0
- package/lib/metric/index.d.ts +1 -0
- package/lib/metric/index.js +18 -0
- package/lib/metric/index.js.map +1 -0
- package/lib/metric/metric.model.d.ts +43 -0
- package/lib/metric/metric.model.js +129 -0
- package/lib/metric/metric.model.js.map +1 -0
- package/lib/note/index.d.ts +1 -0
- package/lib/note/index.js +18 -0
- package/lib/note/index.js.map +1 -0
- package/lib/note/note.model.d.ts +9 -0
- package/lib/note/note.model.js +57 -0
- package/lib/note/note.model.js.map +1 -0
- package/lib/notification/index.d.ts +4 -0
- package/lib/notification/index.js +21 -0
- package/lib/notification/index.js.map +1 -0
- package/lib/notification/notification.channel.d.ts +6 -0
- package/lib/notification/notification.channel.js +11 -0
- package/lib/notification/notification.channel.js.map +1 -0
- package/lib/notification/notification.model.d.ts +14 -0
- package/lib/notification/notification.model.js +69 -0
- package/lib/notification/notification.model.js.map +1 -0
- package/lib/notification/preference.dto.d.ts +5 -0
- package/lib/notification/preference.dto.js +34 -0
- package/lib/notification/preference.dto.js.map +1 -0
- package/lib/notification/preference.model.d.ts +8 -0
- package/lib/notification/preference.model.js +47 -0
- package/lib/notification/preference.model.js.map +1 -0
- package/lib/payment/company-payment.model.d.ts +10 -0
- package/lib/payment/company-payment.model.js +50 -0
- package/lib/payment/company-payment.model.js.map +1 -0
- package/lib/payment/index.d.ts +5 -0
- package/lib/payment/index.js +22 -0
- package/lib/payment/index.js.map +1 -0
- package/lib/payment/payment-method.model.d.ts +20 -0
- package/lib/payment/payment-method.model.js +86 -0
- package/lib/payment/payment-method.model.js.map +1 -0
- package/lib/payment/payment.dto.d.ts +6 -0
- package/lib/payment/payment.dto.js +40 -0
- package/lib/payment/payment.dto.js.map +1 -0
- package/lib/payment/payment.model.d.ts +25 -0
- package/lib/payment/payment.model.js +108 -0
- package/lib/payment/payment.model.js.map +1 -0
- package/lib/payment/payment.types.d.ts +13 -0
- package/lib/payment/payment.types.js +20 -0
- package/lib/payment/payment.types.js.map +1 -0
- package/lib/payout/index.d.ts +2 -0
- package/lib/payout/index.js +19 -0
- package/lib/payout/index.js.map +1 -0
- package/lib/payout/payout.model.d.ts +14 -0
- package/lib/payout/payout.model.js +70 -0
- package/lib/payout/payout.model.js.map +1 -0
- package/lib/payout/payout.types.d.ts +4 -0
- package/lib/payout/payout.types.js +9 -0
- package/lib/payout/payout.types.js.map +1 -0
- package/lib/priceplan/index.d.ts +3 -0
- package/lib/priceplan/index.js +20 -0
- package/lib/priceplan/index.js.map +1 -0
- package/lib/priceplan/plan.dto.d.ts +13 -0
- package/lib/priceplan/plan.dto.js +74 -0
- package/lib/priceplan/plan.dto.js.map +1 -0
- package/lib/priceplan/plan.enum.d.ts +23 -0
- package/lib/priceplan/plan.enum.js +29 -0
- package/lib/priceplan/plan.enum.js.map +1 -0
- package/lib/priceplan/plan.model.d.ts +41 -0
- package/lib/priceplan/plan.model.js +141 -0
- package/lib/priceplan/plan.model.js.map +1 -0
- package/lib/product/index.d.ts +3 -0
- package/lib/product/index.js +20 -0
- package/lib/product/index.js.map +1 -0
- package/lib/product/product.dto.d.ts +12 -0
- package/lib/product/product.dto.js +69 -0
- package/lib/product/product.dto.js.map +1 -0
- package/lib/product/product.model.d.ts +12 -0
- package/lib/product/product.model.js +61 -0
- package/lib/product/product.model.js.map +1 -0
- package/lib/product/product.type.d.ts +4 -0
- package/lib/product/product.type.js +9 -0
- package/lib/product/product.type.js.map +1 -0
- package/lib/refund/index.d.ts +2 -0
- package/lib/refund/index.js +19 -0
- package/lib/refund/index.js.map +1 -0
- package/lib/refund/refund.dto.d.ts +4 -0
- package/lib/refund/refund.dto.js +32 -0
- package/lib/refund/refund.dto.js.map +1 -0
- package/lib/refund/refund.model.d.ts +25 -0
- package/lib/refund/refund.model.js +109 -0
- package/lib/refund/refund.model.js.map +1 -0
- package/lib/security/account.types.d.ts +8 -0
- package/lib/security/account.types.js +13 -0
- package/lib/security/account.types.js.map +1 -0
- package/lib/security/acl.d.ts +6 -0
- package/lib/security/acl.js +11 -0
- package/lib/security/acl.js.map +1 -0
- package/lib/security/index.d.ts +6 -0
- package/lib/security/index.js +23 -0
- package/lib/security/index.js.map +1 -0
- package/lib/security/permissions.d.ts +9 -0
- package/lib/security/permissions.js +14 -0
- package/lib/security/permissions.js.map +1 -0
- package/lib/security/role.dto.d.ts +4 -0
- package/lib/security/role.dto.js +24 -0
- package/lib/security/role.dto.js.map +1 -0
- package/lib/security/role.types.d.ts +41 -0
- package/lib/security/role.types.js +46 -0
- package/lib/security/role.types.js.map +1 -0
- package/lib/security/token.d.ts +30 -0
- package/lib/security/token.js +3 -0
- package/lib/security/token.js.map +1 -0
- package/lib/session/driving/index.d.ts +4 -0
- package/lib/session/driving/index.js +21 -0
- package/lib/session/driving/index.js.map +1 -0
- package/lib/session/driving/session.dto.d.ts +13 -0
- package/lib/session/driving/session.dto.js +74 -0
- package/lib/session/driving/session.dto.js.map +1 -0
- package/lib/session/driving/session.model.d.ts +16 -0
- package/lib/session/driving/session.model.js +63 -0
- package/lib/session/driving/session.model.js.map +1 -0
- package/lib/session/driving/session.skill.d.ts +5 -0
- package/lib/session/driving/session.skill.js +28 -0
- package/lib/session/driving/session.skill.js.map +1 -0
- package/lib/session/driving/session.topic.d.ts +14 -0
- package/lib/session/driving/session.topic.js +61 -0
- package/lib/session/driving/session.topic.js.map +1 -0
- package/lib/session/index.d.ts +1 -0
- package/lib/session/index.js +18 -0
- package/lib/session/index.js.map +1 -0
- package/lib/setting/index.d.ts +3 -0
- package/lib/setting/index.js +20 -0
- package/lib/setting/index.js.map +1 -0
- package/lib/setting/setting.dto.d.ts +3 -0
- package/lib/setting/setting.dto.js +25 -0
- package/lib/setting/setting.dto.js.map +1 -0
- package/lib/setting/setting.model.d.ts +10 -0
- package/lib/setting/setting.model.js +52 -0
- package/lib/setting/setting.model.js.map +1 -0
- package/lib/setting/setting.type.d.ts +7 -0
- package/lib/setting/setting.type.js +12 -0
- package/lib/setting/setting.type.js.map +1 -0
- package/lib/signature/index.d.ts +1 -0
- package/lib/signature/index.js +18 -0
- package/lib/signature/index.js.map +1 -0
- package/lib/signature/signature.model.d.ts +9 -0
- package/lib/signature/signature.model.js +44 -0
- package/lib/signature/signature.model.js.map +1 -0
- package/lib/student/index.d.ts +2 -0
- package/lib/student/index.js +19 -0
- package/lib/student/index.js.map +1 -0
- package/lib/student/student.dto.d.ts +16 -0
- package/lib/student/student.dto.js +98 -0
- package/lib/student/student.dto.js.map +1 -0
- package/lib/student/student.model.d.ts +22 -0
- package/lib/student/student.model.js +108 -0
- package/lib/student/student.model.js.map +1 -0
- package/lib/ticket/index.d.ts +3 -0
- package/lib/ticket/index.js +20 -0
- package/lib/ticket/index.js.map +1 -0
- package/lib/ticket/ticket.dto.d.ts +13 -0
- package/lib/ticket/ticket.dto.js +68 -0
- package/lib/ticket/ticket.dto.js.map +1 -0
- package/lib/ticket/ticket.enum.d.ts +5 -0
- package/lib/ticket/ticket.enum.js +10 -0
- package/lib/ticket/ticket.enum.js.map +1 -0
- package/lib/ticket/ticket.model.d.ts +11 -0
- package/lib/ticket/ticket.model.js +54 -0
- package/lib/ticket/ticket.model.js.map +1 -0
- package/lib/training/course.model.d.ts +8 -0
- package/lib/training/course.model.js +36 -0
- package/lib/training/course.model.js.map +1 -0
- package/lib/training/driving.model.d.ts +17 -0
- package/lib/training/driving.model.js +73 -0
- package/lib/training/driving.model.js.map +1 -0
- package/lib/training/index.d.ts +7 -0
- package/lib/training/index.js +24 -0
- package/lib/training/index.js.map +1 -0
- package/lib/training/request.dto.d.ts +4 -0
- package/lib/training/request.dto.js +24 -0
- package/lib/training/request.dto.js.map +1 -0
- package/lib/training/request.model.d.ts +27 -0
- package/lib/training/request.model.js +111 -0
- package/lib/training/request.model.js.map +1 -0
- package/lib/training/training.dto.d.ts +47 -0
- package/lib/training/training.dto.js +305 -0
- package/lib/training/training.dto.js.map +1 -0
- package/lib/training/training.model.d.ts +94 -0
- package/lib/training/training.model.js +319 -0
- package/lib/training/training.model.js.map +1 -0
- package/lib/training/training.types.d.ts +15 -0
- package/lib/training/training.types.js +22 -0
- package/lib/training/training.types.js.map +1 -0
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/lib/user/agent.interface.d.ts +6 -0
- package/lib/user/agent.interface.js +3 -0
- package/lib/user/agent.interface.js.map +1 -0
- package/lib/user/index.d.ts +4 -0
- package/lib/user/index.js +21 -0
- package/lib/user/index.js.map +1 -0
- package/lib/user/profile.dto.d.ts +19 -0
- package/lib/user/profile.dto.js +73 -0
- package/lib/user/profile.dto.js.map +1 -0
- package/lib/user/profile.type.d.ts +10 -0
- package/lib/user/profile.type.js +15 -0
- package/lib/user/profile.type.js.map +1 -0
- package/lib/user/user.model.d.ts +53 -0
- package/lib/user/user.model.js +200 -0
- package/lib/user/user.model.js.map +1 -0
- package/lib/utils/array.helper.d.ts +21 -0
- package/lib/utils/array.helper.js +33 -0
- package/lib/utils/array.helper.js.map +1 -0
- package/lib/utils/date.helper.d.ts +97 -0
- package/lib/utils/date.helper.js +226 -0
- package/lib/utils/date.helper.js.map +1 -0
- package/lib/utils/index.d.ts +3 -0
- package/lib/utils/index.js +20 -0
- package/lib/utils/index.js.map +1 -0
- package/lib/utils/phone.helper.d.ts +9 -0
- package/lib/utils/phone.helper.js +17 -0
- package/lib/utils/phone.helper.js.map +1 -0
- package/lib/validators/compare.validator.d.ts +9 -0
- package/lib/validators/compare.validator.js +34 -0
- package/lib/validators/compare.validator.js.map +1 -0
- package/lib/validators/index.d.ts +2 -0
- package/lib/validators/index.js +19 -0
- package/lib/validators/index.js.map +1 -0
- package/lib/validators/required.validator.d.ts +21 -0
- package/lib/validators/required.validator.js +95 -0
- package/lib/validators/required.validator.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,200 @@
|
|
|
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 class_transformer_1 = require("class-transformer");
|
|
14
|
+
const common_1 = require("../common");
|
|
15
|
+
const security_1 = require("../security");
|
|
16
|
+
const company_model_1 = require("../company/company.model");
|
|
17
|
+
const instructor_model_1 = require("../instructor/instructor.model");
|
|
18
|
+
const country_1 = require("../country");
|
|
19
|
+
const agent_1 = require("../agent");
|
|
20
|
+
const student_1 = require("../student");
|
|
21
|
+
const profile_type_1 = require("./profile.type");
|
|
22
|
+
const geo_1 = require("../geo");
|
|
23
|
+
const alert_model_1 = require("../alert/alert.model");
|
|
24
|
+
const metric_1 = require("../metric");
|
|
25
|
+
/**
|
|
26
|
+
* Implemented for all kind of users (student, instructor, company user or agent).
|
|
27
|
+
* Depends on app sessions (public, mobile, admin, console).
|
|
28
|
+
* Some of properties can have different validaition rules.
|
|
29
|
+
*/
|
|
30
|
+
class User {
|
|
31
|
+
id;
|
|
32
|
+
uid;
|
|
33
|
+
language;
|
|
34
|
+
status;
|
|
35
|
+
/******************** Personal Data ********************/
|
|
36
|
+
name;
|
|
37
|
+
phone;
|
|
38
|
+
image;
|
|
39
|
+
email;
|
|
40
|
+
birthday;
|
|
41
|
+
address;
|
|
42
|
+
zipCode;
|
|
43
|
+
coord;
|
|
44
|
+
timezone;
|
|
45
|
+
/************************* alerts *************************/
|
|
46
|
+
alerts;
|
|
47
|
+
/************************** activity ***************************/
|
|
48
|
+
lastActivity;
|
|
49
|
+
overdatedActivity;
|
|
50
|
+
/************************* FCM tokens (for push notifications) *************************/
|
|
51
|
+
fcmTokens;
|
|
52
|
+
/************************* profiles **************************/
|
|
53
|
+
selectedProfile;
|
|
54
|
+
student;
|
|
55
|
+
agent;
|
|
56
|
+
instructor;
|
|
57
|
+
companies;
|
|
58
|
+
country;
|
|
59
|
+
company;
|
|
60
|
+
createdOn;
|
|
61
|
+
metrics;
|
|
62
|
+
/************************* methods *************************/
|
|
63
|
+
constructor(props) {
|
|
64
|
+
Object.assign(this, props);
|
|
65
|
+
}
|
|
66
|
+
static toInstance(data) {
|
|
67
|
+
return data ? (0, class_transformer_1.plainToInstance)(User, data) : null;
|
|
68
|
+
}
|
|
69
|
+
isActive() {
|
|
70
|
+
return this.status === security_1.AccountStatus.Active;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
exports.User = User;
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, class_transformer_1.Expose)(),
|
|
76
|
+
(0, class_transformer_1.Type)(() => Number),
|
|
77
|
+
__metadata("design:type", Number)
|
|
78
|
+
], User.prototype, "id", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, class_transformer_1.Expose)(),
|
|
81
|
+
__metadata("design:type", String)
|
|
82
|
+
], User.prototype, "uid", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, class_transformer_1.Expose)(),
|
|
85
|
+
__metadata("design:type", String)
|
|
86
|
+
], User.prototype, "language", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
(0, class_transformer_1.Expose)(),
|
|
89
|
+
__metadata("design:type", String)
|
|
90
|
+
], User.prototype, "status", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
(0, class_transformer_1.Expose)(),
|
|
93
|
+
__metadata("design:type", String)
|
|
94
|
+
], User.prototype, "name", void 0);
|
|
95
|
+
__decorate([
|
|
96
|
+
(0, class_transformer_1.Expose)(),
|
|
97
|
+
__metadata("design:type", String)
|
|
98
|
+
], User.prototype, "phone", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
(0, class_transformer_1.Expose)(),
|
|
101
|
+
__metadata("design:type", String)
|
|
102
|
+
], User.prototype, "image", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
(0, class_transformer_1.Expose)(),
|
|
105
|
+
__metadata("design:type", String)
|
|
106
|
+
], User.prototype, "email", void 0);
|
|
107
|
+
__decorate([
|
|
108
|
+
(0, class_transformer_1.Expose)(),
|
|
109
|
+
(0, class_transformer_1.Type)(() => Date),
|
|
110
|
+
__metadata("design:type", Date)
|
|
111
|
+
], User.prototype, "birthday", void 0);
|
|
112
|
+
__decorate([
|
|
113
|
+
(0, class_transformer_1.Expose)(),
|
|
114
|
+
__metadata("design:type", String)
|
|
115
|
+
], User.prototype, "address", void 0);
|
|
116
|
+
__decorate([
|
|
117
|
+
(0, class_transformer_1.Expose)(),
|
|
118
|
+
__metadata("design:type", String)
|
|
119
|
+
], User.prototype, "zipCode", void 0);
|
|
120
|
+
__decorate([
|
|
121
|
+
(0, class_transformer_1.Expose)(),
|
|
122
|
+
(0, class_transformer_1.Type)(() => geo_1.Coordinate),
|
|
123
|
+
__metadata("design:type", geo_1.Coordinate)
|
|
124
|
+
], User.prototype, "coord", void 0);
|
|
125
|
+
__decorate([
|
|
126
|
+
(0, class_transformer_1.Expose)(),
|
|
127
|
+
__metadata("design:type", String)
|
|
128
|
+
], User.prototype, "timezone", void 0);
|
|
129
|
+
__decorate([
|
|
130
|
+
(0, class_transformer_1.Expose)(),
|
|
131
|
+
(0, class_transformer_1.Type)(() => alert_model_1.UserAlert),
|
|
132
|
+
__metadata("design:type", Array)
|
|
133
|
+
], User.prototype, "alerts", void 0);
|
|
134
|
+
__decorate([
|
|
135
|
+
(0, class_transformer_1.Expose)(),
|
|
136
|
+
(0, class_transformer_1.Type)(() => Date),
|
|
137
|
+
__metadata("design:type", Date)
|
|
138
|
+
], User.prototype, "lastActivity", void 0);
|
|
139
|
+
__decorate([
|
|
140
|
+
(0, class_transformer_1.Expose)(),
|
|
141
|
+
(0, class_transformer_1.Type)(() => Boolean),
|
|
142
|
+
__metadata("design:type", Boolean)
|
|
143
|
+
], User.prototype, "overdatedActivity", void 0);
|
|
144
|
+
__decorate([
|
|
145
|
+
(0, class_transformer_1.Expose)(),
|
|
146
|
+
__metadata("design:type", String)
|
|
147
|
+
], User.prototype, "selectedProfile", void 0);
|
|
148
|
+
__decorate([
|
|
149
|
+
(0, class_transformer_1.Expose)(),
|
|
150
|
+
(0, class_transformer_1.Type)(() => student_1.Student),
|
|
151
|
+
__metadata("design:type", student_1.Student)
|
|
152
|
+
], User.prototype, "student", void 0);
|
|
153
|
+
__decorate([
|
|
154
|
+
(0, class_transformer_1.Expose)(),
|
|
155
|
+
(0, class_transformer_1.Type)(() => agent_1.Agent),
|
|
156
|
+
__metadata("design:type", agent_1.Agent)
|
|
157
|
+
], User.prototype, "agent", void 0);
|
|
158
|
+
__decorate([
|
|
159
|
+
(0, class_transformer_1.Expose)(),
|
|
160
|
+
(0, class_transformer_1.Type)(() => instructor_model_1.Instructor),
|
|
161
|
+
__metadata("design:type", instructor_model_1.Instructor)
|
|
162
|
+
], User.prototype, "instructor", void 0);
|
|
163
|
+
__decorate([
|
|
164
|
+
(0, class_transformer_1.Expose)(),
|
|
165
|
+
(0, class_transformer_1.Type)(() => company_model_1.Company),
|
|
166
|
+
__metadata("design:type", Array)
|
|
167
|
+
], User.prototype, "companies", void 0);
|
|
168
|
+
__decorate([
|
|
169
|
+
(0, class_transformer_1.Expose)(),
|
|
170
|
+
(0, class_transformer_1.Type)(() => country_1.Country),
|
|
171
|
+
__metadata("design:type", country_1.Country)
|
|
172
|
+
], User.prototype, "country", void 0);
|
|
173
|
+
__decorate([
|
|
174
|
+
(0, class_transformer_1.Expose)(),
|
|
175
|
+
(0, class_transformer_1.Type)(() => company_model_1.Company),
|
|
176
|
+
__metadata("design:type", company_model_1.Company)
|
|
177
|
+
], User.prototype, "company", void 0);
|
|
178
|
+
__decorate([
|
|
179
|
+
(0, class_transformer_1.Expose)(),
|
|
180
|
+
(0, class_transformer_1.Type)(() => Date),
|
|
181
|
+
__metadata("design:type", Date)
|
|
182
|
+
], User.prototype, "createdOn", void 0);
|
|
183
|
+
__decorate([
|
|
184
|
+
(0, class_transformer_1.Expose)(),
|
|
185
|
+
(0, class_transformer_1.Type)(() => metric_1.Metric),
|
|
186
|
+
__metadata("design:type", Array)
|
|
187
|
+
], User.prototype, "metrics", void 0);
|
|
188
|
+
__decorate([
|
|
189
|
+
(0, class_transformer_1.Expose)({ groups: ['admin'] }),
|
|
190
|
+
__metadata("design:type", Function),
|
|
191
|
+
__metadata("design:paramtypes", []),
|
|
192
|
+
__metadata("design:returntype", Boolean)
|
|
193
|
+
], User.prototype, "isActive", null);
|
|
194
|
+
__decorate([
|
|
195
|
+
(0, class_transformer_1.Expose)(),
|
|
196
|
+
__metadata("design:type", Function),
|
|
197
|
+
__metadata("design:paramtypes", [Object]),
|
|
198
|
+
__metadata("design:returntype", void 0)
|
|
199
|
+
], User, "toInstance", null);
|
|
200
|
+
//# sourceMappingURL=user.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.model.js","sourceRoot":"","sources":["../../src/user/user.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAkE;AAClE,sCAAqC;AACrC,0CAA2C;AAC3C,4DAAmD;AACnD,qEAA4D;AAC5D,wCAAqC;AACrC,oCAAiC;AACjC,wCAAqC;AACrC,iDAA6C;AAC7C,gCAAoC;AACpC,sDAAiD;AACjD,sCAAmC;AAGnC;;;;GAIG;AACH,MAAa,IAAI;IAIhB,EAAE,CAAS;IAGX,GAAG,CAAS;IAGZ,QAAQ,CAAW;IAGnB,MAAM,CAAgB;IAEtB,yDAAyD;IAGzD,IAAI,CAAS;IAGb,KAAK,CAAS;IAGd,KAAK,CAAS;IAGd,KAAK,CAAS;IAId,QAAQ,CAAO;IAGf,OAAO,CAAS;IAGhB,OAAO,CAAS;IAIhB,KAAK,CAAa;IAGlB,QAAQ,CAAS;IAEjB,4DAA4D;IAI5D,MAAM,CAAc;IAEpB,iEAAiE;IAIjE,YAAY,CAAO;IAInB,iBAAiB,CAAU;IAE3B,yFAAyF;IAEzF,SAAS,CAAW;IAEpB,+DAA+D;IAG/D,eAAe,CAAc;IAI7B,OAAO,CAAU;IAIjB,KAAK,CAAQ;IAIb,UAAU,CAAa;IAIvB,SAAS,CAAY;IAIrB,OAAO,CAAU;IAIjB,OAAO,CAAU;IAIjB,SAAS,CAAO;IAIhB,OAAO,CAAW;IAElB,6DAA6D;IAE7D,YAAY,KAAqB;QAChC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;IAGM,AAAP,MAAM,CAAC,UAAU,CAAC,IAAS;QAC1B,OAAO,IAAI,CAAC,CAAC,CAAC,IAAA,mCAAe,EAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAClD,CAAC;IAGD,QAA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;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,aAAK,CAAC;8BACX,aAAK;mCAAC;AAIb;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,6BAAU,CAAC;8BACX,6BAAU;wCAAC;AAIvB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,uBAAO,CAAC;;uCACC;AAIrB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,iBAAO,CAAC;8BACX,iBAAO;qCAAC;AAIjB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,uBAAO,CAAC;8BACX,uBAAO;qCAAC;AAIjB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,IAAI,CAAC;8BACN,IAAI;uCAAC;AAIhB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,eAAM,CAAC;;qCACD;AAclB;IADC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;;;;oCAG7B;AAPM;IADN,IAAA,0BAAM,GAAE;;;;4BAGR"}
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
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() * this.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[this.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
|
+
exports.ArrayHelper = ArrayHelper;
|
|
33
|
+
//# sourceMappingURL=array.helper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"array.helper.js","sourceRoot":"","sources":["../../src/utils/array.helper.ts"],"names":[],"mappings":";;;AACA,MAAa,WAAW;IAEvB;;;;OAIG;IACH,MAAM,CAAC,SAAS,CAAI,GAAQ;QAC3B,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;QAC5D,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,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACvD,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;CACD;AA9BD,kCA8BC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { DateTime, WeekdayNumbers } from 'luxon';
|
|
2
|
+
import { Appointment, Period, WeekDay } from '../calendar';
|
|
3
|
+
export declare class DateHelper {
|
|
4
|
+
/**
|
|
5
|
+
* Is date between start and end dates
|
|
6
|
+
* @param date Date
|
|
7
|
+
* @param start Date
|
|
8
|
+
* @param end Date
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
static isBetween(date: Date, start: Date, end: Date): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Converts a Date to a date-only string in the format "YYYY-MM-DD".
|
|
14
|
+
* @param date Given date
|
|
15
|
+
* @returns Date string
|
|
16
|
+
*/
|
|
17
|
+
static toDateOnly(date: Date): string;
|
|
18
|
+
/**
|
|
19
|
+
* Converts a Date to a time-only string in the format "HH:MM:SS.sssZ".
|
|
20
|
+
* @param date Given date
|
|
21
|
+
* @returns Time string
|
|
22
|
+
*/
|
|
23
|
+
static toTimeOnly(date: Date): string;
|
|
24
|
+
/**
|
|
25
|
+
* Get DateTime instance from Date
|
|
26
|
+
* @param date
|
|
27
|
+
* @returns DateTime
|
|
28
|
+
*/
|
|
29
|
+
static toDateTimeInstance(date: Date): DateTime;
|
|
30
|
+
/**
|
|
31
|
+
* Check if date is start of day
|
|
32
|
+
* @param date Given date
|
|
33
|
+
* @returns True if date is start of day
|
|
34
|
+
*/
|
|
35
|
+
static isStartOfDay(date: Date): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Check if date is end of day
|
|
38
|
+
* @param date Given date
|
|
39
|
+
* @returns True if date is end of day
|
|
40
|
+
*/
|
|
41
|
+
static isEndOfDay(date: Date): boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Converts a number to a WeekdayNumbers enum from luxon.
|
|
44
|
+
* @param val
|
|
45
|
+
* @returns
|
|
46
|
+
*/
|
|
47
|
+
static toWeekdayNumber(val: number): WeekdayNumbers;
|
|
48
|
+
/**
|
|
49
|
+
* Converts a WeekDay enum from intelact/driveup to a WeekdayNumbers enum from luxon.
|
|
50
|
+
* @param Weekday - The weekday to convert
|
|
51
|
+
* @returns WeekdayNumbers from luxon - 1 to 7
|
|
52
|
+
*/
|
|
53
|
+
static getWeekdayNumber(weekday: WeekDay): WeekdayNumbers;
|
|
54
|
+
/**
|
|
55
|
+
* Get WeekDay from DateTime
|
|
56
|
+
* @param date
|
|
57
|
+
* @returns WeekDay
|
|
58
|
+
*/
|
|
59
|
+
static getWeekday(date: DateTime): WeekDay;
|
|
60
|
+
/**
|
|
61
|
+
* Converts a WeekDay enum from intelact/driveup to a MySQL weekday number.
|
|
62
|
+
* @param Weekday - The weekday to convert
|
|
63
|
+
* @returns number - MySQL weekday number (0 = Monday, 6 = Sunday)
|
|
64
|
+
*/
|
|
65
|
+
static getMySqlWeekday(weekday: WeekDay): number;
|
|
66
|
+
/**
|
|
67
|
+
* Merge periods
|
|
68
|
+
* @param Period[]
|
|
69
|
+
* @returns Period[] - Returns an array of merged periods
|
|
70
|
+
*/
|
|
71
|
+
static mergePeriods(periods: Period[]): Period[];
|
|
72
|
+
/**
|
|
73
|
+
* Merge appointment periods
|
|
74
|
+
* @param Appointment[]
|
|
75
|
+
* @returns Appointment[] - Returns an array of merged appointments
|
|
76
|
+
*/
|
|
77
|
+
static mergeAppointmentPeriods(appointments: Appointment[]): Appointment[];
|
|
78
|
+
/**
|
|
79
|
+
* Get a formatted date string in "DD MMM YYYY" format,
|
|
80
|
+
* or an empty string if the given date is invalid.
|
|
81
|
+
* Example: "23 Oct 2025"
|
|
82
|
+
* @param date string | number | Date
|
|
83
|
+
* @param local Default en-GB
|
|
84
|
+
* @returns Formatted date string
|
|
85
|
+
*/
|
|
86
|
+
static formatDate(date: string | number | Date, local?: string): string;
|
|
87
|
+
/**
|
|
88
|
+
* Get a formatted date and time string in "DD MMM YYYY - HH:MM" format,
|
|
89
|
+
* or an empty string if the given date is invalid.
|
|
90
|
+
* Example: "23 Oct 2025 - 14:30"
|
|
91
|
+
* @param date string | number | Date
|
|
92
|
+
* @param seperator Default '-'
|
|
93
|
+
* @param local Default en-GB
|
|
94
|
+
* @returns Formatted date and time string
|
|
95
|
+
*/
|
|
96
|
+
static formatDateAndTime(date: string | number | Date, seperator?: string, local?: string): string;
|
|
97
|
+
}
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DateHelper = void 0;
|
|
4
|
+
const luxon_1 = require("luxon");
|
|
5
|
+
const calendar_1 = require("../calendar");
|
|
6
|
+
class DateHelper {
|
|
7
|
+
/**
|
|
8
|
+
* Is date between start and end dates
|
|
9
|
+
* @param date Date
|
|
10
|
+
* @param start Date
|
|
11
|
+
* @param end Date
|
|
12
|
+
* @returns
|
|
13
|
+
*/
|
|
14
|
+
static isBetween(date, start, end) {
|
|
15
|
+
return date.getTime() >= start.getTime() && date.getTime() <= end.getTime();
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Converts a Date to a date-only string in the format "YYYY-MM-DD".
|
|
19
|
+
* @param date Given date
|
|
20
|
+
* @returns Date string
|
|
21
|
+
*/
|
|
22
|
+
static toDateOnly(date) {
|
|
23
|
+
return date.toISOString().split('T')[0];
|
|
24
|
+
}
|
|
25
|
+
;
|
|
26
|
+
/**
|
|
27
|
+
* Converts a Date to a time-only string in the format "HH:MM:SS.sssZ".
|
|
28
|
+
* @param date Given date
|
|
29
|
+
* @returns Time string
|
|
30
|
+
*/
|
|
31
|
+
static toTimeOnly(date) {
|
|
32
|
+
return date.toISOString().split('T')[1];
|
|
33
|
+
}
|
|
34
|
+
;
|
|
35
|
+
/**
|
|
36
|
+
* Get DateTime instance from Date
|
|
37
|
+
* @param date
|
|
38
|
+
* @returns DateTime
|
|
39
|
+
*/
|
|
40
|
+
static toDateTimeInstance(date) {
|
|
41
|
+
const dt = luxon_1.DateTime.fromJSDate(date);
|
|
42
|
+
return dt.isValid ? dt : null;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Check if date is start of day
|
|
46
|
+
* @param date Given date
|
|
47
|
+
* @returns True if date is start of day
|
|
48
|
+
*/
|
|
49
|
+
static isStartOfDay(date) {
|
|
50
|
+
return (date.getHours() === 0 &&
|
|
51
|
+
date.getMinutes() === 0 &&
|
|
52
|
+
date.getSeconds() === 0 &&
|
|
53
|
+
date.getMilliseconds() === 0);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Check if date is end of day
|
|
57
|
+
* @param date Given date
|
|
58
|
+
* @returns True if date is end of day
|
|
59
|
+
*/
|
|
60
|
+
static isEndOfDay(date) {
|
|
61
|
+
return (date.getHours() === 23 &&
|
|
62
|
+
date.getMinutes() === 59 &&
|
|
63
|
+
date.getSeconds() === 59 &&
|
|
64
|
+
date.getMilliseconds() === 999);
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Converts a number to a WeekdayNumbers enum from luxon.
|
|
68
|
+
* @param val
|
|
69
|
+
* @returns
|
|
70
|
+
*/
|
|
71
|
+
static toWeekdayNumber(val) {
|
|
72
|
+
return (val === 1 ? 1
|
|
73
|
+
: val === 2 ? 2
|
|
74
|
+
: val === 3 ? 3
|
|
75
|
+
: val === 4 ? 4
|
|
76
|
+
: val === 5 ? 5
|
|
77
|
+
: val === 6 ? 6
|
|
78
|
+
: val === 7 ? 7
|
|
79
|
+
: undefined);
|
|
80
|
+
}
|
|
81
|
+
;
|
|
82
|
+
/**
|
|
83
|
+
* Converts a WeekDay enum from intelact/driveup to a WeekdayNumbers enum from luxon.
|
|
84
|
+
* @param Weekday - The weekday to convert
|
|
85
|
+
* @returns WeekdayNumbers from luxon - 1 to 7
|
|
86
|
+
*/
|
|
87
|
+
static getWeekdayNumber(weekday) {
|
|
88
|
+
return (weekday === calendar_1.WeekDay.Monday ? 1
|
|
89
|
+
: weekday === calendar_1.WeekDay.Tuesday ? 2
|
|
90
|
+
: weekday === calendar_1.WeekDay.Wednesday ? 3
|
|
91
|
+
: weekday === calendar_1.WeekDay.Thursday ? 4
|
|
92
|
+
: weekday === calendar_1.WeekDay.Friday ? 5
|
|
93
|
+
: weekday === calendar_1.WeekDay.Saturday ? 6
|
|
94
|
+
: 7 // Sunday
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Get WeekDay from DateTime
|
|
99
|
+
* @param date
|
|
100
|
+
* @returns WeekDay
|
|
101
|
+
*/
|
|
102
|
+
static getWeekday(date) {
|
|
103
|
+
const number = date.weekday;
|
|
104
|
+
return (number === 1 ? calendar_1.WeekDay.Monday
|
|
105
|
+
: number === 2 ? calendar_1.WeekDay.Tuesday
|
|
106
|
+
: number === 3 ? calendar_1.WeekDay.Wednesday
|
|
107
|
+
: number === 4 ? calendar_1.WeekDay.Thursday
|
|
108
|
+
: number === 5 ? calendar_1.WeekDay.Friday
|
|
109
|
+
: number === 6 ? calendar_1.WeekDay.Saturday
|
|
110
|
+
: calendar_1.WeekDay.Sunday);
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Converts a WeekDay enum from intelact/driveup to a MySQL weekday number.
|
|
114
|
+
* @param Weekday - The weekday to convert
|
|
115
|
+
* @returns number - MySQL weekday number (0 = Monday, 6 = Sunday)
|
|
116
|
+
*/
|
|
117
|
+
static getMySqlWeekday(weekday) {
|
|
118
|
+
return (weekday === calendar_1.WeekDay.Monday ? 0
|
|
119
|
+
: weekday === calendar_1.WeekDay.Tuesday ? 1
|
|
120
|
+
: weekday === calendar_1.WeekDay.Wednesday ? 2
|
|
121
|
+
: weekday === calendar_1.WeekDay.Thursday ? 3
|
|
122
|
+
: weekday === calendar_1.WeekDay.Friday ? 4
|
|
123
|
+
: weekday === calendar_1.WeekDay.Saturday ? 5
|
|
124
|
+
: 6 // Sunday
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Merge periods
|
|
129
|
+
* @param Period[]
|
|
130
|
+
* @returns Period[] - Returns an array of merged periods
|
|
131
|
+
*/
|
|
132
|
+
static mergePeriods(periods) {
|
|
133
|
+
if (!periods?.length)
|
|
134
|
+
return [];
|
|
135
|
+
periods.sort((a, b) => a.startDate.getTime() - b.startDate.getTime());
|
|
136
|
+
const merged = [];
|
|
137
|
+
for (const period of periods) {
|
|
138
|
+
// if this is the first itteration of the loop, add the period to the reslult array
|
|
139
|
+
if (!merged.length) {
|
|
140
|
+
merged.push(period);
|
|
141
|
+
continue;
|
|
142
|
+
}
|
|
143
|
+
const last = merged[merged.length - 1];
|
|
144
|
+
// if the period overlaps with the last one, merge them
|
|
145
|
+
if (period.startDate <= last.endDate) {
|
|
146
|
+
last.endDate = last.endDate > period.endDate ? last.endDate : period.endDate;
|
|
147
|
+
}
|
|
148
|
+
else {
|
|
149
|
+
merged.push(period);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
return merged;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Merge appointment periods
|
|
156
|
+
* @param Appointment[]
|
|
157
|
+
* @returns Appointment[] - Returns an array of merged appointments
|
|
158
|
+
*/
|
|
159
|
+
static mergeAppointmentPeriods(appointments) {
|
|
160
|
+
if (!appointments?.length)
|
|
161
|
+
return [];
|
|
162
|
+
appointments.sort((a, b) => new Date(a.startDate).getTime() - new Date(b.startDate).getTime());
|
|
163
|
+
const merged = [];
|
|
164
|
+
for (const appointment of appointments) {
|
|
165
|
+
// if this is the first itteration of the loop, add the period to the reslult array
|
|
166
|
+
if (!merged.length) {
|
|
167
|
+
merged.push(appointment);
|
|
168
|
+
continue;
|
|
169
|
+
}
|
|
170
|
+
// if the period overlaps with the last period in the array, merge them
|
|
171
|
+
const last = merged[merged.length - 1];
|
|
172
|
+
if (new Date(appointment.startDate) <= new Date(last.endDate)) {
|
|
173
|
+
last.endDate =
|
|
174
|
+
last.endDate > appointment.endDate ? last.endDate : appointment.endDate;
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
merged.push(appointment);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
return merged;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Get a formatted date string in "DD MMM YYYY" format,
|
|
184
|
+
* or an empty string if the given date is invalid.
|
|
185
|
+
* Example: "23 Oct 2025"
|
|
186
|
+
* @param date string | number | Date
|
|
187
|
+
* @param local Default en-GB
|
|
188
|
+
* @returns Formatted date string
|
|
189
|
+
*/
|
|
190
|
+
static formatDate(date, local = 'en-GB') {
|
|
191
|
+
if (!date)
|
|
192
|
+
return '';
|
|
193
|
+
return new Date(date).toLocaleDateString(local, {
|
|
194
|
+
day: 'numeric',
|
|
195
|
+
month: 'short',
|
|
196
|
+
year: 'numeric'
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Get a formatted date and time string in "DD MMM YYYY - HH:MM" format,
|
|
201
|
+
* or an empty string if the given date is invalid.
|
|
202
|
+
* Example: "23 Oct 2025 - 14:30"
|
|
203
|
+
* @param date string | number | Date
|
|
204
|
+
* @param seperator Default '-'
|
|
205
|
+
* @param local Default en-GB
|
|
206
|
+
* @returns Formatted date and time string
|
|
207
|
+
*/
|
|
208
|
+
static formatDateAndTime(date, seperator = '-', local = 'en-GB') {
|
|
209
|
+
if (!date)
|
|
210
|
+
return '';
|
|
211
|
+
const dateObj = new Date(date);
|
|
212
|
+
const datePart = dateObj.toLocaleDateString(local, {
|
|
213
|
+
day: 'numeric',
|
|
214
|
+
month: 'short',
|
|
215
|
+
year: 'numeric'
|
|
216
|
+
});
|
|
217
|
+
const timePart = dateObj.toLocaleTimeString(local, {
|
|
218
|
+
hour: '2-digit',
|
|
219
|
+
minute: '2-digit',
|
|
220
|
+
hour12: false
|
|
221
|
+
});
|
|
222
|
+
return `${datePart} ${seperator} ${timePart}`;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
exports.DateHelper = DateHelper;
|
|
226
|
+
//# sourceMappingURL=date.helper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date.helper.js","sourceRoot":"","sources":["../../src/utils/date.helper.ts"],"names":[],"mappings":";;;AAAA,iCAAiD;AACjD,0CAA2D;AAE3D,MAAa,UAAU;IAEtB;;;;;;OAMG;IACH,MAAM,CAAC,SAAS,CAAC,IAAU,EAAE,KAAW,EAAE,GAAS;QAClD,OAAO,IAAI,CAAC,OAAO,EAAE,IAAI,KAAK,CAAC,OAAO,EAAE,IAAI,IAAI,CAAC,OAAO,EAAE,IAAI,GAAG,CAAC,OAAO,EAAE,CAAC;IAC7E,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,UAAU,CAAC,IAAU;QAC3B,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACzC,CAAC;IAAA,CAAC;IAEF;;;;OAIG;IACH,MAAM,CAAC,UAAU,CAAC,IAAU;QAC3B,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACzC,C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AC;QACF,CAAC;QAED,OAAO,MAAM,CAAC;IACf,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,UAAU,CAAC,IAA4B,EAAE,QAAgB,OAAO;QACtE,IAAI,CAAC,IAAI;YAAE,OAAO,EAAE,CAAC;QACrB,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,kBAAkB,CAAC,KAAK,EAAE;YAC/C,GAAG,EAAE,SAAS;YACd,KAAK,EAAE,OAAO;YACd,IAAI,EAAE,SAAS;SACf,CAAC,CAAC;IACJ,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,CAAC,iBAAiB,CAAC,IAA4B,EAAE,YAAoB,GAAG,EAAE,QAAgB,OAAO;QACtG,IAAI,CAAC,IAAI;YAAE,OAAO,EAAE,CAAC;QACrB,MAAM,OAAO,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;QAE/B,MAAM,QAAQ,GAAG,OAAO,CAAC,kBAAkB,CAAC,KAAK,EAAE;YAClD,GAAG,EAAE,SAAS;YACd,KAAK,EAAE,OAAO;YACd,IAAI,EAAE,SAAS;SACf,CAAC,CAAC;QAEH,MAAM,QAAQ,GAAG,OAAO,CAAC,kBAAkB,CAAC,KAAK,EAAE;YAClD,IAAI,EAAE,SAAS;YACf,MAAM,EAAE,SAAS;YACjB,MAAM,EAAE,KAAK;SACb,CAAC,CAAC;QAEH,OAAO,GAAG,QAAQ,IAAI,SAAS,IAAI,QAAQ,EAAE,CAAC;IAC/C,CAAC;CACD;AAvPD,gCAuPC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,gDAA8B;AAC9B,iDAA+B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
}
|