@react-pakistan/util-functions 1.25.89 → 2.0.0
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/README.md +74 -315
- package/constants/api-methods.d.ts +3 -1
- package/constants/api-methods.js +1 -15
- package/constants/cache-time.d.ts +7 -5
- package/constants/cache-time.js +1 -8
- package/constants/countries-timezones.d.ts +4 -2
- package/constants/countries-timezones.js +1 -1411
- package/constants/currencies.d.ts +4 -2
- package/constants/currencies.js +1 -1076
- package/constants/dial-codes.d.ts +5 -3
- package/constants/dial-codes.js +1 -1216
- package/constants/layout-direction.d.ts +3 -1
- package/constants/layout-direction.js +1 -8
- package/constants/react-pakistan-meta.d.ts +4 -2
- package/constants/react-pakistan-meta.js +1 -35
- package/constants/react-pakistan.d.ts +5 -3
- package/constants/react-pakistan.js +12 -104
- package/constants/select-value-delimiter.d.ts +3 -1
- package/constants/select-value-delimiter.js +1 -13
- package/constants/social-media-colors.d.ts +3 -1
- package/constants/social-media-colors.js +1 -42
- package/constants/social-media-sizes.d.ts +6 -4
- package/constants/social-media-sizes.js +1 -327
- package/constants/user-roles.d.ts +3 -1
- package/constants/user-roles.js +1 -9
- package/edu-pilot-pro/types/academics.d.ts +2 -0
- package/edu-pilot-pro/types/academics.js +1 -0
- package/edu-pilot-pro/types/admission.d.ts +878 -0
- package/edu-pilot-pro/types/admission.js +1 -0
- package/edu-pilot-pro/types/communication.d.ts +2 -0
- package/edu-pilot-pro/types/communication.js +1 -0
- package/edu-pilot-pro/types/enums.d.ts +413 -0
- package/edu-pilot-pro/types/enums.js +1 -0
- package/edu-pilot-pro/types/finance.d.ts +2 -0
- package/edu-pilot-pro/types/finance.js +1 -0
- package/edu-pilot-pro/types/index.d.ts +2 -0
- package/edu-pilot-pro/types/index.js +1 -0
- package/edu-pilot-pro/types/user-management.d.ts +2 -0
- package/edu-pilot-pro/types/user-management.js +1 -0
- package/factory/generic-component-factory.d.ts +12 -9
- package/factory/generic-component-factory.js +1 -131
- package/factory/generic-module-factory.d.ts +14 -10
- package/factory/generic-module-factory.js +1 -190
- package/general/basic-get.d.ts +8 -1
- package/general/basic-get.js +1 -83
- package/general/basic-post.d.ts +8 -1
- package/general/basic-post.js +1 -70
- package/general/calculate-pages.d.ts +9 -1
- package/general/calculate-pages.js +1 -7
- package/general/camel-to-sentence-case.d.ts +3 -1
- package/general/camel-to-sentence-case.js +1 -20
- package/general/check-even-odd-length.d.ts +3 -1
- package/general/check-even-odd-length.js +1 -17
- package/general/clear-cache.d.ts +7 -2
- package/general/clear-cache.js +1 -12
- package/general/cnic-formatter.d.ts +16 -3
- package/general/cnic-formatter.js +1 -53
- package/general/convert-url-to-base64.d.ts +8 -6
- package/general/convert-url-to-base64.js +1 -231
- package/general/countries.d.ts +5 -3
- package/general/countries.js +1 -514
- package/general/create-date.d.ts +3 -1
- package/general/create-date.js +1 -22
- package/general/crypto.d.ts +4 -2
- package/general/crypto.js +1 -45
- package/general/currencies.d.ts +2 -0
- package/general/currencies.js +0 -1077
- package/general/delete-image-from-private-supabase.d.ts +10 -2
- package/general/delete-image-from-private-supabase.js +1 -66
- package/general/delete-image-from-public-supabase.d.ts +10 -2
- package/general/delete-image-from-public-supabase.js +1 -66
- package/general/download-from-url.d.ts +8 -1
- package/general/download-from-url.js +1 -82
- package/general/dynamic-page-limit.d.ts +9 -3
- package/general/dynamic-page-limit.js +1 -7
- package/general/enum-to-text.d.ts +8 -1
- package/general/enum-to-text.js +1 -11
- package/general/fetch-data.d.ts +16 -4
- package/general/fetch-data.js +1 -95
- package/general/fetch-supabase-image.d.ts +11 -2
- package/general/fetch-supabase-image.js +1 -67
- package/general/fetch-supabase-private-assets.d.ts +11 -2
- package/general/fetch-supabase-private-assets.js +1 -69
- package/general/format-date.d.ts +10 -2
- package/general/format-date.js +1 -49
- package/general/format-number.d.ts +12 -2
- package/general/format-number.js +1 -35
- package/general/format-phone-display.d.ts +9 -1
- package/general/format-phone-display.js +1 -32
- package/general/format-phone.d.ts +10 -2
- package/general/format-phone.js +1 -20
- package/general/format-pricing.d.ts +8 -1
- package/general/format-pricing.js +1 -23
- package/general/format-secs.d.ts +8 -1
- package/general/format-secs.js +1 -21
- package/general/format-time.d.ts +8 -2
- package/general/format-time.js +1 -38
- package/general/format-value.d.ts +8 -1
- package/general/format-value.js +1 -7
- package/general/full-month-range.d.ts +3 -2
- package/general/full-month-range.js +1 -24
- package/general/full-year-range.d.ts +3 -2
- package/general/full-year-range.js +1 -20
- package/general/generate-article-schema.d.ts +3 -2
- package/general/generate-article-schema.js +1 -100
- package/general/generate-blog-schema.d.ts +3 -2
- package/general/generate-blog-schema.js +1 -32
- package/general/generate-book-schema.d.ts +3 -2
- package/general/generate-book-schema.js +1 -109
- package/general/generate-breadcrumb-schema.d.ts +3 -2
- package/general/generate-breadcrumb-schema.js +1 -34
- package/general/generate-carousel-schema.d.ts +3 -2
- package/general/generate-carousel-schema.js +1 -172
- package/general/generate-course-schema.d.ts +3 -2
- package/general/generate-course-schema.js +1 -124
- package/general/generate-dataset-schema.d.ts +3 -2
- package/general/generate-dataset-schema.js +1 -156
- package/general/generate-discussion-forum-schema.d.ts +3 -2
- package/general/generate-discussion-forum-schema.js +1 -67
- package/general/generate-education-schema.d.ts +3 -2
- package/general/generate-education-schema.js +1 -137
- package/general/generate-employer-aggregate-rating-schema.d.ts +3 -2
- package/general/generate-employer-aggregate-rating-schema.js +1 -64
- package/general/generate-event-schema.d.ts +3 -2
- package/general/generate-event-schema.js +1 -214
- package/general/generate-faq-schema.d.ts +3 -2
- package/general/generate-faq-schema.js +1 -43
- package/general/generate-grid.d.ts +3 -2
- package/general/generate-grid.js +1 -55
- package/general/generate-image-metadata-schema.d.ts +3 -2
- package/general/generate-image-metadata-schema.js +1 -73
- package/general/generate-job-posting-schema.d.ts +3 -2
- package/general/generate-job-posting-schema.js +1 -120
- package/general/generate-local-business-schema.d.ts +3 -2
- package/general/generate-local-business-schema.js +1 -75
- package/general/generate-math-solver-schema.d.ts +3 -2
- package/general/generate-math-solver-schema.js +1 -83
- package/general/generate-movie-carousel-schema.d.ts +3 -2
- package/general/generate-movie-carousel-schema.js +1 -160
- package/general/generate-organization-schema.d.ts +3 -2
- package/general/generate-organization-schema.js +1 -39
- package/general/generate-profile-page-schema.d.ts +3 -2
- package/general/generate-profile-page-schema.js +1 -82
- package/general/generate-qa-page-schema.d.ts +3 -2
- package/general/generate-qa-page-schema.js +1 -67
- package/general/generate-recipe-schema.d.ts +3 -2
- package/general/generate-recipe-schema.js +1 -104
- package/general/generate-ref.d.ts +8 -2
- package/general/generate-ref.js +1 -12
- package/general/generate-review-snippet-schema.d.ts +3 -2
- package/general/generate-review-snippet-schema.js +1 -137
- package/general/generate-shopping-loyalty-program-schema.d.ts +3 -2
- package/general/generate-shopping-loyalty-program-schema.js +1 -59
- package/general/generate-shopping-merchant-listing-schema.d.ts +3 -2
- package/general/generate-shopping-merchant-listing-schema.js +1 -153
- package/general/generate-shopping-merchant-return-policy-schema.d.ts +3 -2
- package/general/generate-shopping-merchant-return-policy-schema.js +1 -68
- package/general/generate-shopping-merchant-shipping-policy-schema.d.ts +3 -2
- package/general/generate-shopping-merchant-shipping-policy-schema.js +1 -74
- package/general/generate-shopping-overview-schema.d.ts +3 -2
- package/general/generate-shopping-overview-schema.js +1 -157
- package/general/generate-shopping-product-snippet-schema.d.ts +3 -2
- package/general/generate-shopping-product-snippet-schema.js +1 -167
- package/general/generate-shopping-variants-schema.d.ts +3 -2
- package/general/generate-shopping-variants-schema.js +1 -143
- package/general/generate-software-app-schema.d.ts +3 -2
- package/general/generate-software-app-schema.js +1 -143
- package/general/generate-speakable-schema.d.ts +3 -2
- package/general/generate-speakable-schema.js +1 -139
- package/general/generate-subscription-schema.d.ts +3 -2
- package/general/generate-subscription-schema.js +1 -133
- package/general/generate-vacation-rental-schema.d.ts +3 -2
- package/general/generate-vacation-rental-schema.js +1 -135
- package/general/generate-video-schema.d.ts +3 -2
- package/general/generate-video-schema.js +1 -163
- package/general/generic-cache.d.ts +17 -15
- package/general/generic-cache.js +1 -659
- package/general/get-available-page-limit.d.ts +8 -2
- package/general/get-available-page-limit.js +1 -31
- package/general/get-calendar-current-month.d.ts +11 -3
- package/general/get-calendar-current-month.js +1 -31
- package/general/get-calendar-dates.d.ts +11 -3
- package/general/get-calendar-dates.js +1 -42
- package/general/get-calendar-next-month.d.ts +12 -3
- package/general/get-calendar-next-month.js +1 -32
- package/general/get-calendar-previous-month.d.ts +12 -3
- package/general/get-calendar-previous-month.js +1 -36
- package/general/get-current-year.d.ts +7 -1
- package/general/get-current-year.js +1 -5
- package/general/get-day-name.d.ts +5 -3
- package/general/get-day-name.js +1 -14
- package/general/get-dial-code.d.ts +8 -1
- package/general/get-dial-code.js +1 -8
- package/general/get-full-name.d.ts +9 -2
- package/general/get-full-name.js +1 -8
- package/general/get-href.d.ts +3 -1
- package/general/get-href.js +1 -13
- package/general/get-month-name.d.ts +5 -3
- package/general/get-month-name.js +1 -19
- package/general/get-month-number.d.ts +5 -3
- package/general/get-month-number.js +1 -29
- package/general/get-number-of-days-in-month.d.ts +9 -2
- package/general/get-number-of-days-in-month.js +1 -12
- package/general/get-pathname.d.ts +3 -1
- package/general/get-pathname.js +1 -16
- package/general/get-week-day.d.ts +8 -1
- package/general/get-week-day.js +1 -9
- package/general/image-url-to-base64.d.ts +3 -1
- package/general/image-url-to-base64.js +1 -80
- package/general/is-created-or-updated.d.ts +3 -1
- package/general/is-created-or-updated.js +1 -26
- package/general/is-next-button-disabled.d.ts +9 -1
- package/general/is-next-button-disabled.js +1 -5
- package/general/is-odd.d.ts +3 -1
- package/general/is-odd.js +1 -13
- package/general/is-previous-button-disabled.d.ts +8 -1
- package/general/is-previous-button-disabled.js +1 -7
- package/general/linear-gradients.d.ts +4 -2
- package/general/linear-gradients.js +1 -52
- package/general/multi-part-search.d.ts +10 -2
- package/general/multi-part-search.js +1 -16
- package/general/normalize-phone.d.ts +15 -2
- package/general/normalize-phone.js +1 -40
- package/general/parse-frontmatter.d.ts +11 -4
- package/general/parse-frontmatter.js +2 -35
- package/general/remove-data-image-prefix.d.ts +8 -1
- package/general/remove-data-image-prefix.js +1 -7
- package/general/repeat-times.d.ts +3 -1
- package/general/repeat-times.js +1 -21
- package/general/resolve-anchor-link.d.ts +3 -1
- package/general/resolve-anchor-link.js +1 -26
- package/general/resolve-current-date.d.ts +3 -1
- package/general/resolve-current-date.js +1 -22
- package/general/resolve-grid.d.ts +3 -1
- package/general/resolve-grid.js +1 -18
- package/general/resolve-initials.d.ts +3 -1
- package/general/resolve-initials.js +1 -17
- package/general/set-timezone.d.ts +11 -1
- package/general/set-timezone.js +1 -12
- package/general/slugify.d.ts +3 -1
- package/general/slugify.js +1 -24
- package/general/text-to-enum.d.ts +8 -1
- package/general/text-to-enum.js +1 -10
- package/general/text-to-sentence-case.d.ts +3 -1
- package/general/text-to-sentence-case.js +1 -16
- package/general/time-out.d.ts +3 -1
- package/general/time-out.js +1 -16
- package/general/time-zones.d.ts +3 -1
- package/general/time-zones.js +1 -437
- package/general/truncate-text.d.ts +3 -1
- package/general/truncate-text.js +1 -18
- package/general/type.d.ts +3 -1
- package/general/type.js +1 -2
- package/general/upload-blob-to-private-supabase.d.ts +14 -2
- package/general/upload-blob-to-private-supabase.js +1 -62
- package/general/upload-blob-to-public-supabase.d.ts +14 -2
- package/general/upload-blob-to-public-supabase.js +1 -62
- package/general/upload-image-to-private-supabase.d.ts +15 -3
- package/general/upload-image-to-private-supabase.js +1 -66
- package/general/upload-image-to-public-supabase.d.ts +15 -3
- package/general/upload-image-to-public-supabase.js +1 -66
- package/general/url-to-sentence-case.d.ts +3 -1
- package/general/url-to-sentence-case.js +1 -19
- package/general/validate-comment.d.ts +3 -1
- package/general/validate-comment.js +1 -21
- package/general/validate-email.d.ts +3 -1
- package/general/validate-email.js +1 -24
- package/general/validate-form.d.ts +12 -3
- package/general/validate-form.js +1 -29
- package/general/validate-name.d.ts +3 -1
- package/general/validate-name.js +1 -21
- package/hooks/use-change.d.ts +11 -2
- package/hooks/use-change.js +1 -23
- package/hooks/use-debounce.d.ts +10 -1
- package/hooks/use-debounce.js +1 -14
- package/hooks/use-fetch.d.ts +7 -5
- package/hooks/use-fetch.js +1 -239
- package/hooks/use-force-render.d.ts +6 -2
- package/hooks/use-force-render.js +1 -17
- package/hooks/use-ip-geo-location.d.ts +8 -1
- package/hooks/use-ip-geo-location.js +1 -79
- package/hooks/use-is-mobile.d.ts +8 -1
- package/hooks/use-is-mobile.js +1 -22
- package/hooks/use-module-entity-v2.d.ts +7 -4
- package/hooks/use-module-entity-v2.js +1 -188
- package/hooks/use-module-entity.d.ts +7 -4
- package/hooks/use-module-entity.js +1 -177
- package/hooks/use-phone-formatter.d.ts +10 -2
- package/hooks/use-phone-formatter.js +1 -23
- package/hooks/use-position.d.ts +6 -3
- package/hooks/use-position.js +1 -43
- package/hooks/use-rtl.d.ts +4 -2
- package/hooks/use-rtl.js +1 -84
- package/hooks/use-sticky.d.ts +3 -1
- package/hooks/use-sticky.js +1 -39
- package/hooks/use-toggle-state.d.ts +3 -2
- package/hooks/use-toggle-state.js +1 -26
- package/hooks/use-window-event-listener.d.ts +9 -1
- package/hooks/use-window-event-listener.js +1 -11
- package/hooks/with-seo.d.ts +11 -2
- package/hooks/with-seo.js +1 -37
- package/local-storage/get-storage-value.d.ts +5 -2
- package/local-storage/get-storage-value.js +1 -20
- package/local-storage/remove-storage-value.d.ts +3 -1
- package/local-storage/remove-storage-value.js +1 -14
- package/local-storage/set-storage-value.d.ts +3 -1
- package/local-storage/set-storage-value.js +1 -14
- package/local-storage/type.d.ts +3 -1
- package/local-storage/type.js +1 -2
- package/npm.d.d.ts +2 -0
- package/npm.d.js +0 -0
- package/package.json +20 -18
- package/storybook/generate-sitemap.d.ts +3 -1
- package/storybook/generate-sitemap.js +17 -26
- package/storybook/preview.d.ts +4 -2
- package/storybook/preview.js +1 -62
- package/storybook/react-design-story-script.d.ts +3 -1
- package/storybook/react-design-story-script.js +5 -27
- package/storybook/react-emoji-collection.d.ts +3 -1
- package/storybook/react-emoji-collection.js +10 -55
- package/storybook/react-emoji-story-script.d.ts +3 -1
- package/storybook/react-emoji-story-script.js +5 -31
- package/storybook/react-emoji-story-template.d.ts +3 -1
- package/storybook/react-emoji-story-template.js +45 -15
- package/storybook/react-icon-collection.d.ts +3 -1
- package/storybook/react-icon-collection.js +10 -42
- package/storybook/react-icon-story-script.d.ts +3 -1
- package/storybook/react-icon-story-script.js +5 -27
- package/storybook/react-icon-story-template.d.ts +3 -1
- package/storybook/react-icon-story-template.js +45 -14
- package/storybook/react-logo-collection.d.ts +3 -1
- package/storybook/react-logo-collection.js +10 -42
- package/storybook/react-logo-story-script.d.ts +3 -1
- package/storybook/react-logo-story-script.js +5 -27
- package/storybook/react-logo-story-template.d.ts +3 -1
- package/storybook/react-logo-story-template.js +45 -14
- package/storybook/react-pakistan-theme.d.ts +3 -1
- package/storybook/react-pakistan-theme.js +1 -31
- package/storybook/responsive-args.d.ts +11 -10
- package/storybook/responsive-args.js +1 -19
- package/storybook/responsive-component.d.ts +4 -2
- package/storybook/responsive-component.js +37 -23
- package/storybook/responsive-screens.d.ts +3 -1
- package/storybook/responsive-screens.js +1 -109
- package/storybook/theme.d.ts +17 -15
- package/storybook/theme.js +1 -1022
- package/api/stellar-solutions/app-user/index.d.ts +0 -51
- package/api/stellar-solutions/app-user/index.js +0 -210
- package/api/stellar-solutions/bank/index.d.ts +0 -59
- package/api/stellar-solutions/bank/index.js +0 -210
- package/api/stellar-solutions/branch/index.d.ts +0 -58
- package/api/stellar-solutions/branch/index.js +0 -220
- package/api/stellar-solutions/company/index.d.ts +0 -57
- package/api/stellar-solutions/company/index.js +0 -218
- package/api/stellar-solutions/company-report/index.d.ts +0 -15
- package/api/stellar-solutions/company-report/index.js +0 -74
- package/api/stellar-solutions/constants.d.ts +0 -19
- package/api/stellar-solutions/constants.js +0 -22
- package/api/stellar-solutions/contact/index.d.ts +0 -56
- package/api/stellar-solutions/contact/index.js +0 -217
- package/api/stellar-solutions/currency/index.d.ts +0 -55
- package/api/stellar-solutions/currency/index.js +0 -212
- package/api/stellar-solutions/customer/index.d.ts +0 -68
- package/api/stellar-solutions/customer/index.js +0 -249
- package/api/stellar-solutions/expense/index.d.ts +0 -58
- package/api/stellar-solutions/expense/index.js +0 -229
- package/api/stellar-solutions/expense-category/index.d.ts +0 -53
- package/api/stellar-solutions/expense-category/index.js +0 -214
- package/api/stellar-solutions/lead/index.d.ts +0 -51
- package/api/stellar-solutions/lead/index.js +0 -206
- package/api/stellar-solutions/menu-order/index.d.ts +0 -53
- package/api/stellar-solutions/menu-order/index.js +0 -202
- package/api/stellar-solutions/payment/index.d.ts +0 -65
- package/api/stellar-solutions/payment/index.js +0 -230
- package/api/stellar-solutions/payment-mode/index.d.ts +0 -53
- package/api/stellar-solutions/payment-mode/index.js +0 -191
- package/api/stellar-solutions/preference/index.d.ts +0 -25
- package/api/stellar-solutions/preference/index.js +0 -114
- package/api/stellar-solutions/product/index.d.ts +0 -64
- package/api/stellar-solutions/product/index.js +0 -235
- package/api/stellar-solutions/product-category/index.d.ts +0 -51
- package/api/stellar-solutions/product-category/index.js +0 -212
- package/api/stellar-solutions/profile/index.d.ts +0 -78
- package/api/stellar-solutions/profile/index.js +0 -234
- package/api/stellar-solutions/quote-invoice/index.d.ts +0 -97
- package/api/stellar-solutions/quote-invoice/index.js +0 -369
- package/api/stellar-solutions/quote-invoice-report/index.d.ts +0 -15
- package/api/stellar-solutions/quote-invoice-report/index.js +0 -74
- package/api/stellar-solutions/tax/index.d.ts +0 -55
- package/api/stellar-solutions/tax/index.js +0 -224
- package/api/stellar-solutions/types/common.d.ts +0 -24
- package/api/stellar-solutions/types/common.js +0 -22
- package/api/stellar-solutions/types/erp.d.ts +0 -302
- package/api/stellar-solutions/types/erp.js +0 -73
- package/api/stellar-solutions/types/index.d.ts +0 -3
- package/api/stellar-solutions/types/index.js +0 -19
- package/api/stellar-solutions/types/pos.d.ts +0 -176
- package/api/stellar-solutions/types/pos.js +0 -61
- package/constants/index.d.ts +0 -12
- package/constants/index.js +0 -28
- package/factory/index.d.ts +0 -2
- package/factory/index.js +0 -18
- package/general/index.d.ts +0 -95
- package/general/index.js +0 -111
- package/index.d.ts +0 -28
- package/index.js +0 -44
- package/local-storage/index.d.ts +0 -4
- package/local-storage/index.js +0 -20
- package/setupTests.d.ts +0 -1
- package/setupTests.js +0 -52
- package/storybook/index.d.ts +0 -17
- package/storybook/index.js +0 -33
|
@@ -0,0 +1,878 @@
|
|
|
1
|
+
import { ADMISSION_STATUS, GENDER, FEE_TYPE, FEE_RISK_LEVEL, PAYMENT_STATUS, FEE_AGENT_ACTION_TYPE, FEE_CONVERSATION_INTENT, FEE_CONVERSATION_SENDER, DISCOUNT_TYPE, EXPENSE_CATEGORY, PAYMENT_METHOD, EXPENSE_STATUS, NOTIFICATION_TYPE, DEVICE_PLATFORM, CAMPAIGN_STATUS, CAMPAIGN_CONTACT_STATUS, REFERRAL_CHANNEL, REFERRAL_STATUS, CURRENCY, USER_ROLE, ACCESS_LEVEL, BILLING_INTERVAL, PLAN_TYPE, ATTENDANCE_STATUS, FAMILY_MEMBER_ROLE, STUDENT_STATUS, GRADE_TYPE, DAY_OF_WEEK } from './enums.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* TypeScript Types Generated from Prisma Schema - Admission
|
|
5
|
+
*
|
|
6
|
+
* This file contains TypeScript interfaces for the admission domain models.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
interface AdmissionDetails {
|
|
10
|
+
classForAdmission: string;
|
|
11
|
+
previousSchool: string;
|
|
12
|
+
siblings: string;
|
|
13
|
+
}
|
|
14
|
+
interface FatherDetails {
|
|
15
|
+
fatherIdNumber: string;
|
|
16
|
+
fatherFirstName: string;
|
|
17
|
+
fatherLastName: string;
|
|
18
|
+
fatherMobile: string;
|
|
19
|
+
fatherOccupation: string;
|
|
20
|
+
fatherOrganization: string;
|
|
21
|
+
emergencyContact: boolean;
|
|
22
|
+
}
|
|
23
|
+
interface MotherDetails {
|
|
24
|
+
motherIdNumber: string;
|
|
25
|
+
motherFirstName: string;
|
|
26
|
+
motherLastName: string;
|
|
27
|
+
motherMobile: string;
|
|
28
|
+
emergencyContact: boolean;
|
|
29
|
+
}
|
|
30
|
+
interface HomeDetails {
|
|
31
|
+
address: string;
|
|
32
|
+
city: string;
|
|
33
|
+
country: string;
|
|
34
|
+
postalCode: string;
|
|
35
|
+
state: string;
|
|
36
|
+
}
|
|
37
|
+
interface StudentDetails {
|
|
38
|
+
studentIdNumber: string;
|
|
39
|
+
discountCodeId: string;
|
|
40
|
+
dob: string;
|
|
41
|
+
emergencyContact: string;
|
|
42
|
+
firstName: string;
|
|
43
|
+
gender: GENDER;
|
|
44
|
+
hafiz: boolean;
|
|
45
|
+
lastName: string;
|
|
46
|
+
orphan: boolean;
|
|
47
|
+
registrationCode: string;
|
|
48
|
+
}
|
|
49
|
+
interface OfficeUse {
|
|
50
|
+
admissionNotes: string;
|
|
51
|
+
notes: string;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* StudentAdmission stores raw application payloads as JSON blobs.
|
|
55
|
+
* This model mirrors the Prisma StudentAdmission model which keeps
|
|
56
|
+
* structured form data in Json columns so the application layer can
|
|
57
|
+
* process/transform it into domain entities on approval.
|
|
58
|
+
*/
|
|
59
|
+
interface AdmissionAIBE {
|
|
60
|
+
id: string;
|
|
61
|
+
admissionId: string;
|
|
62
|
+
schoolId: string;
|
|
63
|
+
score: number;
|
|
64
|
+
decision: string;
|
|
65
|
+
reasons: string[];
|
|
66
|
+
confidence: number;
|
|
67
|
+
processedAt: string;
|
|
68
|
+
createdAt: string;
|
|
69
|
+
updatedAt: string;
|
|
70
|
+
}
|
|
71
|
+
interface AdmissionBE {
|
|
72
|
+
admissionDetails: AdmissionDetails | null;
|
|
73
|
+
createdAt: string;
|
|
74
|
+
enabled: boolean;
|
|
75
|
+
fatherDetails: FatherDetails | null;
|
|
76
|
+
homeDetails: HomeDetails | null;
|
|
77
|
+
id: string;
|
|
78
|
+
motherDetails: MotherDetails | null;
|
|
79
|
+
officeUse: OfficeUse | null;
|
|
80
|
+
schoolId: string;
|
|
81
|
+
status: ADMISSION_STATUS;
|
|
82
|
+
studentDetails: StudentDetails | null;
|
|
83
|
+
updatedAt: string;
|
|
84
|
+
school?: SchoolBE;
|
|
85
|
+
aiAnalysis?: AdmissionAIBE | null;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* TypeScript Types Generated from Prisma Schema - Finance
|
|
90
|
+
*
|
|
91
|
+
* This file contains TypeScript interfaces for fee structures, discount codes,
|
|
92
|
+
* student fees, expenses, fee agent activities, and fee conversations.
|
|
93
|
+
*/
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* FeeStructure defines fee templates for different classes/categories
|
|
97
|
+
*/
|
|
98
|
+
interface FeeStructureBE {
|
|
99
|
+
amount: number;
|
|
100
|
+
classId?: string | null;
|
|
101
|
+
createdAt: string;
|
|
102
|
+
description: string | null;
|
|
103
|
+
enabled: boolean;
|
|
104
|
+
feeType: FEE_TYPE;
|
|
105
|
+
frequency: string | null;
|
|
106
|
+
id: string;
|
|
107
|
+
name: string;
|
|
108
|
+
schoolId: string;
|
|
109
|
+
updatedAt: string;
|
|
110
|
+
class?: ClassBE;
|
|
111
|
+
school?: SchoolBE;
|
|
112
|
+
studentFees?: StudentFeeBE[];
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* DiscountCode represents discount codes available for fee reductions
|
|
116
|
+
*/
|
|
117
|
+
interface DiscountCodeBE {
|
|
118
|
+
code: string;
|
|
119
|
+
createdAt: string;
|
|
120
|
+
description: string | null;
|
|
121
|
+
discountType: DISCOUNT_TYPE;
|
|
122
|
+
discountValue: number;
|
|
123
|
+
enabled: boolean;
|
|
124
|
+
id: string;
|
|
125
|
+
schoolId: string;
|
|
126
|
+
updatedAt: string;
|
|
127
|
+
school?: SchoolBE;
|
|
128
|
+
studentFees?: StudentFeeBE[];
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* StudentFee represents fees assigned to individual students
|
|
132
|
+
*/
|
|
133
|
+
interface StudentFeeBE {
|
|
134
|
+
amount: number;
|
|
135
|
+
amountDue: number;
|
|
136
|
+
amountPaid: number;
|
|
137
|
+
createdAt: string;
|
|
138
|
+
discountAmount: number | null;
|
|
139
|
+
discountCodeId: string | null;
|
|
140
|
+
dueDate: Date | string;
|
|
141
|
+
enabled: boolean;
|
|
142
|
+
familyId: string;
|
|
143
|
+
feeStructureId: string;
|
|
144
|
+
fine: number | null;
|
|
145
|
+
id: string;
|
|
146
|
+
lastRemindedAt: Date | string | null;
|
|
147
|
+
nextFollowUpAt: Date | string | null;
|
|
148
|
+
reliabilityScore: number | null;
|
|
149
|
+
paidAt: Date | string | null;
|
|
150
|
+
remarks: string | null;
|
|
151
|
+
riskLevel: FEE_RISK_LEVEL | null;
|
|
152
|
+
schoolId: string;
|
|
153
|
+
status: PAYMENT_STATUS;
|
|
154
|
+
studentProfileId: string;
|
|
155
|
+
updatedAt: string;
|
|
156
|
+
agentActivities?: FeeAgentActivityBE[];
|
|
157
|
+
conversations?: FeeConversationBE[];
|
|
158
|
+
discountCode?: DiscountCodeBE;
|
|
159
|
+
family?: FamilyBE;
|
|
160
|
+
feeStructure?: FeeStructureBE;
|
|
161
|
+
school?: SchoolBE;
|
|
162
|
+
studentProfile?: StudentProfileBE;
|
|
163
|
+
}
|
|
164
|
+
interface FeeAgentActivityBE {
|
|
165
|
+
actionType: FEE_AGENT_ACTION_TYPE;
|
|
166
|
+
createdAt: string;
|
|
167
|
+
id: string;
|
|
168
|
+
payload: Record<string, unknown>;
|
|
169
|
+
schoolId: string;
|
|
170
|
+
status: string;
|
|
171
|
+
studentFeeId: string;
|
|
172
|
+
updatedAt: string;
|
|
173
|
+
}
|
|
174
|
+
interface FeeConversationBE {
|
|
175
|
+
createdAt: string;
|
|
176
|
+
id: string;
|
|
177
|
+
intent: FEE_CONVERSATION_INTENT;
|
|
178
|
+
message: string;
|
|
179
|
+
metadata: Record<string, unknown> | null;
|
|
180
|
+
schoolId: string;
|
|
181
|
+
sender: FEE_CONVERSATION_SENDER;
|
|
182
|
+
studentFeeId: string;
|
|
183
|
+
studentId: string;
|
|
184
|
+
updatedAt: string;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Expense represents outgoing payments and school expenditure tracking
|
|
188
|
+
*/
|
|
189
|
+
interface ExpenseBE {
|
|
190
|
+
amount: number;
|
|
191
|
+
approvedBy: string | null;
|
|
192
|
+
attachments: string[];
|
|
193
|
+
category: EXPENSE_CATEGORY;
|
|
194
|
+
createdAt: string;
|
|
195
|
+
description: string | null;
|
|
196
|
+
enabled: boolean;
|
|
197
|
+
expenseDate: Date | string;
|
|
198
|
+
id: string;
|
|
199
|
+
invoiceNumber: string | null;
|
|
200
|
+
paidBy: string | null;
|
|
201
|
+
paymentDate: Date | string | null;
|
|
202
|
+
paymentMethod: PAYMENT_METHOD | null;
|
|
203
|
+
receiptNumber: string | null;
|
|
204
|
+
remarks: string | null;
|
|
205
|
+
schoolId: string;
|
|
206
|
+
status: EXPENSE_STATUS;
|
|
207
|
+
title: string;
|
|
208
|
+
transactionId: string | null;
|
|
209
|
+
updatedAt: string;
|
|
210
|
+
vendorContact: string | null;
|
|
211
|
+
vendorName: string | null;
|
|
212
|
+
school?: SchoolBE;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* TypeScript Types Generated from Prisma Schema - Communication
|
|
217
|
+
*
|
|
218
|
+
* This file contains TypeScript interfaces for campaigns, blog posts,
|
|
219
|
+
* referrals, push tokens, mobile notifications, and notification preferences.
|
|
220
|
+
*/
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Individual recipient within a broadcast campaign
|
|
224
|
+
*/
|
|
225
|
+
interface CampaignContactBE {
|
|
226
|
+
campaignId: string;
|
|
227
|
+
createdAt: string;
|
|
228
|
+
errorMessage: string | null;
|
|
229
|
+
id: string;
|
|
230
|
+
name: string;
|
|
231
|
+
phoneNumber: string;
|
|
232
|
+
sentAt: string | null;
|
|
233
|
+
status: CAMPAIGN_CONTACT_STATUS;
|
|
234
|
+
updatedAt: string;
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* WhatsApp broadcast campaign
|
|
238
|
+
*/
|
|
239
|
+
interface CampaignBE {
|
|
240
|
+
createdAt: string;
|
|
241
|
+
enabled: boolean;
|
|
242
|
+
id: string;
|
|
243
|
+
messageTemplate: string;
|
|
244
|
+
name: string;
|
|
245
|
+
schoolId: string;
|
|
246
|
+
status: CAMPAIGN_STATUS;
|
|
247
|
+
updatedAt: string;
|
|
248
|
+
workerJobId: string | null;
|
|
249
|
+
contacts?: CampaignContactBE[];
|
|
250
|
+
_count?: {
|
|
251
|
+
contacts: number;
|
|
252
|
+
};
|
|
253
|
+
school?: SchoolBE;
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* BlogPost metadata and content (MDX/Markdown stored in `content`).
|
|
257
|
+
*/
|
|
258
|
+
interface BlogPostBE {
|
|
259
|
+
authorId: string | null;
|
|
260
|
+
clapCount: number;
|
|
261
|
+
commentCount: number;
|
|
262
|
+
content: string;
|
|
263
|
+
createdAt: string;
|
|
264
|
+
enabled: boolean;
|
|
265
|
+
excerpt: string | null;
|
|
266
|
+
id: string;
|
|
267
|
+
publishedAt: Date | string | null;
|
|
268
|
+
schoolId: string | null;
|
|
269
|
+
slug: string;
|
|
270
|
+
title: string;
|
|
271
|
+
updatedAt: string;
|
|
272
|
+
author?: UserBE;
|
|
273
|
+
claps?: BlogPostClapBE[];
|
|
274
|
+
comments?: BlogCommentBE[];
|
|
275
|
+
school?: SchoolBE | null;
|
|
276
|
+
}
|
|
277
|
+
interface BlogCommentBE {
|
|
278
|
+
authorId: string | null;
|
|
279
|
+
clapCount: number;
|
|
280
|
+
content: string;
|
|
281
|
+
createdAt: string;
|
|
282
|
+
enabled: boolean;
|
|
283
|
+
id: string;
|
|
284
|
+
parentId: string | null;
|
|
285
|
+
postId: string;
|
|
286
|
+
updatedAt: string;
|
|
287
|
+
author?: UserBE | null;
|
|
288
|
+
claps?: BlogCommentClapBE[];
|
|
289
|
+
parent?: BlogCommentBE | null;
|
|
290
|
+
post?: BlogPostBE;
|
|
291
|
+
replies?: BlogCommentBE[];
|
|
292
|
+
}
|
|
293
|
+
interface BlogPostClapBE {
|
|
294
|
+
createdAt: string;
|
|
295
|
+
id: string;
|
|
296
|
+
postId: string;
|
|
297
|
+
sessionId: string | null;
|
|
298
|
+
userId: string | null;
|
|
299
|
+
post?: BlogPostBE;
|
|
300
|
+
user?: UserBE | null;
|
|
301
|
+
}
|
|
302
|
+
interface BlogCommentClapBE {
|
|
303
|
+
commentId: string;
|
|
304
|
+
createdAt: string;
|
|
305
|
+
id: string;
|
|
306
|
+
sessionId: string | null;
|
|
307
|
+
userId: string | null;
|
|
308
|
+
comment?: BlogCommentBE;
|
|
309
|
+
user?: UserBE | null;
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* A referral invite sent by a school user to encourage another school to join the platform
|
|
313
|
+
*/
|
|
314
|
+
interface ReferralBE {
|
|
315
|
+
channel: REFERRAL_CHANNEL;
|
|
316
|
+
createdAt: string;
|
|
317
|
+
enabled: boolean;
|
|
318
|
+
errorMessage: string | null;
|
|
319
|
+
id: string;
|
|
320
|
+
inviterUserId: string;
|
|
321
|
+
personalNote: string | null;
|
|
322
|
+
recipientEmail: string | null;
|
|
323
|
+
recipientName: string | null;
|
|
324
|
+
recipientPhone: string | null;
|
|
325
|
+
schoolId: string;
|
|
326
|
+
sentAt: string | null;
|
|
327
|
+
status: REFERRAL_STATUS;
|
|
328
|
+
updatedAt: string;
|
|
329
|
+
workerJobId: string | null;
|
|
330
|
+
school?: SchoolBE;
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Expo push token registered by a mobile device for a specific user
|
|
334
|
+
*/
|
|
335
|
+
interface UserPushTokenBE {
|
|
336
|
+
appVersion: string | null;
|
|
337
|
+
createdAt: string;
|
|
338
|
+
deviceId: string | null;
|
|
339
|
+
id: string;
|
|
340
|
+
platform: DEVICE_PLATFORM;
|
|
341
|
+
pushToken: string;
|
|
342
|
+
updatedAt: string;
|
|
343
|
+
userId: string;
|
|
344
|
+
user?: UserBE;
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* Push notification delivered to a mobile user
|
|
348
|
+
*/
|
|
349
|
+
interface MobileNotificationBE {
|
|
350
|
+
archived: boolean;
|
|
351
|
+
body: string;
|
|
352
|
+
createdAt: string;
|
|
353
|
+
data: Record<string, unknown> | null;
|
|
354
|
+
id: string;
|
|
355
|
+
read: boolean;
|
|
356
|
+
title: string;
|
|
357
|
+
type: NOTIFICATION_TYPE;
|
|
358
|
+
updatedAt: string;
|
|
359
|
+
userId: string;
|
|
360
|
+
user?: UserBE;
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* Per-user notification category and channel preferences
|
|
364
|
+
*/
|
|
365
|
+
interface NotificationPreferenceBE {
|
|
366
|
+
alertEnabled: boolean;
|
|
367
|
+
assignmentEnabled: boolean;
|
|
368
|
+
attendanceEnabled: boolean;
|
|
369
|
+
createdAt: string;
|
|
370
|
+
emailEnabled: boolean;
|
|
371
|
+
generalEnabled: boolean;
|
|
372
|
+
id: string;
|
|
373
|
+
paymentEnabled: boolean;
|
|
374
|
+
pushEnabled: boolean;
|
|
375
|
+
updatedAt: string;
|
|
376
|
+
userId: string;
|
|
377
|
+
user?: UserBE;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* TypeScript Types Generated from Prisma Schema - User Management
|
|
382
|
+
*
|
|
383
|
+
* This file contains TypeScript interfaces for user, workspace, role,
|
|
384
|
+
* permission, plan, school, and campus domain models.
|
|
385
|
+
*/
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* Subscription plan defining usage limits and features for workspaces
|
|
389
|
+
*/
|
|
390
|
+
interface PlanBE {
|
|
391
|
+
createdAt: string;
|
|
392
|
+
currency: CURRENCY;
|
|
393
|
+
enabled: boolean;
|
|
394
|
+
id: string;
|
|
395
|
+
maxClasses: number;
|
|
396
|
+
maxCourses: number;
|
|
397
|
+
maxFamilies: number;
|
|
398
|
+
maxStaffAccounts: number;
|
|
399
|
+
maxStudents: number;
|
|
400
|
+
maxTeachers: number;
|
|
401
|
+
name: string;
|
|
402
|
+
priceMonthly: number;
|
|
403
|
+
priceYearly: number;
|
|
404
|
+
storageLimitMB: number;
|
|
405
|
+
type: PLAN_TYPE;
|
|
406
|
+
updatedAt: string;
|
|
407
|
+
workspaces?: WorkspaceBE[];
|
|
408
|
+
}
|
|
409
|
+
/**
|
|
410
|
+
* Workspace represents a tenant in the multi-vendor system
|
|
411
|
+
* Each workspace has exactly ONE school (1:1 relationship)
|
|
412
|
+
*/
|
|
413
|
+
interface WorkspaceBE {
|
|
414
|
+
agreedCurrency: CURRENCY;
|
|
415
|
+
agreedPrice: number;
|
|
416
|
+
billingDate: number;
|
|
417
|
+
billingInterval: BILLING_INTERVAL;
|
|
418
|
+
classesCount: number;
|
|
419
|
+
coursesCount: number;
|
|
420
|
+
createdAt: string;
|
|
421
|
+
description: string | null;
|
|
422
|
+
dueDateLength: number;
|
|
423
|
+
enabled: boolean;
|
|
424
|
+
familiesCount: number;
|
|
425
|
+
id: string;
|
|
426
|
+
logo: string | null;
|
|
427
|
+
name: string;
|
|
428
|
+
planEndDate: Date | string | null;
|
|
429
|
+
planId: string | null;
|
|
430
|
+
planStartDate: Date | string | null;
|
|
431
|
+
secrets?: any | null;
|
|
432
|
+
staffAccountsCount: number;
|
|
433
|
+
storageUsedMB: number;
|
|
434
|
+
studentsCount: number;
|
|
435
|
+
subdomain: string;
|
|
436
|
+
teachersCount: number;
|
|
437
|
+
updatedAt: string;
|
|
438
|
+
customRoles?: RoleBE[];
|
|
439
|
+
plan?: PlanBE;
|
|
440
|
+
rolePermissions?: RolePermissionBE[];
|
|
441
|
+
school?: SchoolBE;
|
|
442
|
+
users?: WorkspaceUserBE[];
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* Join table managing user-workspace relationships and roles
|
|
446
|
+
* Allows users to belong to multiple workspaces with different roles
|
|
447
|
+
*/
|
|
448
|
+
interface WorkspaceUserBE {
|
|
449
|
+
createdAt: string;
|
|
450
|
+
enabled: boolean;
|
|
451
|
+
id: string;
|
|
452
|
+
roleId: string | null;
|
|
453
|
+
updatedAt: string;
|
|
454
|
+
userId: string;
|
|
455
|
+
workspaceId: string;
|
|
456
|
+
role?: RoleBE;
|
|
457
|
+
user?: UserBE;
|
|
458
|
+
workspace?: WorkspaceBE;
|
|
459
|
+
workspaceUserPermissions?: WorkspaceUserPermissionBE[];
|
|
460
|
+
}
|
|
461
|
+
/**
|
|
462
|
+
* Role defines a named set of default permissions.
|
|
463
|
+
* System roles (isSystem = true) are seeded once and map 1:1 with UserRole enum values.
|
|
464
|
+
* Workspace custom roles (isSystem = false, workspaceId set) are created by SCHOOL_ADMINs.
|
|
465
|
+
*/
|
|
466
|
+
interface RoleBE {
|
|
467
|
+
createdAt: string;
|
|
468
|
+
description: string | null;
|
|
469
|
+
id: string;
|
|
470
|
+
isSystem: boolean;
|
|
471
|
+
name: string;
|
|
472
|
+
updatedAt: string;
|
|
473
|
+
userRole: USER_ROLE | null;
|
|
474
|
+
workspaceId: string | null;
|
|
475
|
+
rolePermissions?: RolePermissionBE[];
|
|
476
|
+
workspace?: WorkspaceBE;
|
|
477
|
+
workspaceUsers?: WorkspaceBE[];
|
|
478
|
+
}
|
|
479
|
+
/**
|
|
480
|
+
* Permission describes a module-level capability and access level (e.g., 'courses', READ/READ_WRITE).
|
|
481
|
+
*/
|
|
482
|
+
interface PermissionBE {
|
|
483
|
+
access: ACCESS_LEVEL;
|
|
484
|
+
createdAt: string;
|
|
485
|
+
description: string | null;
|
|
486
|
+
id: string;
|
|
487
|
+
module: string;
|
|
488
|
+
updatedAt: string;
|
|
489
|
+
rolePermissions?: RolePermissionBE[];
|
|
490
|
+
workspaceUserPermissions?: WorkspaceUserPermissionBE[];
|
|
491
|
+
}
|
|
492
|
+
/**
|
|
493
|
+
* RolePermission links a Permission to a Role, with an optional workspace scope.
|
|
494
|
+
* workspaceId IS NULL → global default grant for the role (seeded by system)
|
|
495
|
+
* workspaceId IS SET → workspace-level override set by SCHOOL_ADMIN for their workspace
|
|
496
|
+
* allowed = true → explicitly grant the permission
|
|
497
|
+
* allowed = false → explicitly deny/revoke the permission (overrides the global default)
|
|
498
|
+
*/
|
|
499
|
+
interface RolePermissionBE {
|
|
500
|
+
allowed: boolean;
|
|
501
|
+
createdAt: string;
|
|
502
|
+
id: string;
|
|
503
|
+
permissionId: string;
|
|
504
|
+
roleId: string;
|
|
505
|
+
updatedAt: string;
|
|
506
|
+
workspaceId: string | null;
|
|
507
|
+
permission?: PermissionBE;
|
|
508
|
+
role?: RoleBE;
|
|
509
|
+
workspace?: WorkspaceBE;
|
|
510
|
+
}
|
|
511
|
+
/**
|
|
512
|
+
* WorkspaceUserPermission is a per-user override for a given Permission within a workspace.
|
|
513
|
+
* allowed indicates explicit allow (true) or deny (false); overrides take precedence over role grants.
|
|
514
|
+
*/
|
|
515
|
+
interface WorkspaceUserPermissionBE {
|
|
516
|
+
allowed: boolean;
|
|
517
|
+
createdAt: string;
|
|
518
|
+
id: string;
|
|
519
|
+
permissionId: string;
|
|
520
|
+
updatedAt: string;
|
|
521
|
+
workspaceUserId: string;
|
|
522
|
+
permission?: PermissionBE;
|
|
523
|
+
workspaceUser?: WorkspaceUserBE;
|
|
524
|
+
}
|
|
525
|
+
/**
|
|
526
|
+
* School represents an individual educational institution
|
|
527
|
+
* Has a 1:1 relationship with Workspace (each school is a separate tenant)
|
|
528
|
+
*/
|
|
529
|
+
interface SchoolBE {
|
|
530
|
+
address: string | null;
|
|
531
|
+
city: string | null;
|
|
532
|
+
code: string;
|
|
533
|
+
country: string | null;
|
|
534
|
+
createdAt: string;
|
|
535
|
+
currency: CURRENCY;
|
|
536
|
+
email: string | null;
|
|
537
|
+
enabled: boolean;
|
|
538
|
+
id: string;
|
|
539
|
+
logo: string | null;
|
|
540
|
+
name: string;
|
|
541
|
+
phone: string | null;
|
|
542
|
+
postalCode: string | null;
|
|
543
|
+
principalId: string | null;
|
|
544
|
+
state: string | null;
|
|
545
|
+
updatedAt: string;
|
|
546
|
+
website: string | null;
|
|
547
|
+
workspaceId: string;
|
|
548
|
+
attendances?: AttendanceBE[];
|
|
549
|
+
blogPosts?: BlogPostBE[];
|
|
550
|
+
classes?: ClassBE[];
|
|
551
|
+
courses?: CourseBE[];
|
|
552
|
+
expenses?: ExpenseBE[];
|
|
553
|
+
families?: FamilyBE[];
|
|
554
|
+
feeStructures?: FeeStructureBE[];
|
|
555
|
+
discountCodes?: DiscountCodeBE[];
|
|
556
|
+
grades?: GradeBE[];
|
|
557
|
+
schedules?: ScheduleBE[];
|
|
558
|
+
sections?: SectionBE[];
|
|
559
|
+
admissions?: AdmissionBE[];
|
|
560
|
+
studentFees?: StudentFeeBE[];
|
|
561
|
+
subjects?: SubjectBE[];
|
|
562
|
+
teachers?: TeacherBE[];
|
|
563
|
+
workspace?: WorkspaceBE;
|
|
564
|
+
}
|
|
565
|
+
/**
|
|
566
|
+
* Core user model synchronized with Supabase Auth
|
|
567
|
+
* Shared by entire family - parents and students use same login
|
|
568
|
+
*/
|
|
569
|
+
interface UserBE {
|
|
570
|
+
avatar: string | null;
|
|
571
|
+
createdAt: string;
|
|
572
|
+
email: string;
|
|
573
|
+
enabled: boolean;
|
|
574
|
+
id: string;
|
|
575
|
+
name: string | null;
|
|
576
|
+
phone: string | null;
|
|
577
|
+
updatedAt: string;
|
|
578
|
+
blogCommentClaps?: BlogCommentClapBE[];
|
|
579
|
+
blogComments?: BlogCommentBE[];
|
|
580
|
+
blogPostClaps?: BlogPostClapBE[];
|
|
581
|
+
blogPosts?: BlogPostBE[];
|
|
582
|
+
mobileNotifications?: MobileNotificationBE[];
|
|
583
|
+
notificationPreference?: NotificationPreferenceBE;
|
|
584
|
+
pushTokens?: UserPushTokenBE[];
|
|
585
|
+
teacherProfile?: TeacherBE;
|
|
586
|
+
workspaces?: WorkspaceUserBE[];
|
|
587
|
+
}
|
|
588
|
+
/**
|
|
589
|
+
* Campus represents a physical branch/location of a school
|
|
590
|
+
*/
|
|
591
|
+
interface CampusBE {
|
|
592
|
+
address: string | null;
|
|
593
|
+
campusId?: string | null;
|
|
594
|
+
city: string | null;
|
|
595
|
+
code: string;
|
|
596
|
+
country: string | null;
|
|
597
|
+
createdAt: string;
|
|
598
|
+
enabled: boolean;
|
|
599
|
+
id: string;
|
|
600
|
+
name: string;
|
|
601
|
+
phone: string | null;
|
|
602
|
+
schoolId: string;
|
|
603
|
+
state: string | null;
|
|
604
|
+
updatedAt: string;
|
|
605
|
+
school?: SchoolBE;
|
|
606
|
+
_count?: {
|
|
607
|
+
classes: number;
|
|
608
|
+
teachers: number;
|
|
609
|
+
studentProfiles: number;
|
|
610
|
+
};
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
/**
|
|
614
|
+
* TypeScript Types Generated from Prisma Schema - Academics
|
|
615
|
+
*
|
|
616
|
+
* This file contains TypeScript interfaces for class, section, subject, course,
|
|
617
|
+
* teacher, enrollment, attendance, grade, schedule, student profile, family,
|
|
618
|
+
* and family member domain models.
|
|
619
|
+
*/
|
|
620
|
+
|
|
621
|
+
/**
|
|
622
|
+
* Family represents a household sharing a single user account
|
|
623
|
+
* Contains parents and students using the same login credentials
|
|
624
|
+
*/
|
|
625
|
+
interface FamilyBE {
|
|
626
|
+
address: string | null;
|
|
627
|
+
city: string | null;
|
|
628
|
+
country: string | null;
|
|
629
|
+
createdAt: string;
|
|
630
|
+
enabled: boolean;
|
|
631
|
+
familyCode: string;
|
|
632
|
+
id: string;
|
|
633
|
+
postalCode: string | null;
|
|
634
|
+
schoolId: string;
|
|
635
|
+
state: string | null;
|
|
636
|
+
updatedAt: string;
|
|
637
|
+
members?: FamilyMemberBE[];
|
|
638
|
+
school?: SchoolBE;
|
|
639
|
+
studentFees?: StudentFeeBE[];
|
|
640
|
+
}
|
|
641
|
+
/**
|
|
642
|
+
* FamilyMember represents individuals within a family
|
|
643
|
+
* Multiple members (parents + students) share the family's user account
|
|
644
|
+
*/
|
|
645
|
+
interface FamilyMemberBE {
|
|
646
|
+
avatar: string | null;
|
|
647
|
+
bloodGroup: string | null;
|
|
648
|
+
createdAt: string;
|
|
649
|
+
dateOfBirth: Date | string | null;
|
|
650
|
+
email: string | null;
|
|
651
|
+
emergencyPhone: string | null;
|
|
652
|
+
enabled: boolean;
|
|
653
|
+
familyId: string;
|
|
654
|
+
firstName: string;
|
|
655
|
+
gender: GENDER;
|
|
656
|
+
id: string;
|
|
657
|
+
idNumber: string;
|
|
658
|
+
isPrimary: boolean;
|
|
659
|
+
lastName: string;
|
|
660
|
+
occupation: string | null;
|
|
661
|
+
organization: string | null;
|
|
662
|
+
phone: string | null;
|
|
663
|
+
relationship: string;
|
|
664
|
+
role: FAMILY_MEMBER_ROLE;
|
|
665
|
+
updatedAt: string;
|
|
666
|
+
family?: FamilyBE;
|
|
667
|
+
studentProfile?: StudentProfileBE;
|
|
668
|
+
}
|
|
669
|
+
/**
|
|
670
|
+
* StudentProfile extends FamilyMember with student-specific data
|
|
671
|
+
*/
|
|
672
|
+
interface StudentProfileBE {
|
|
673
|
+
campusId: string | null;
|
|
674
|
+
computerNumber: string;
|
|
675
|
+
createdAt: string;
|
|
676
|
+
discountCodeId: string | null;
|
|
677
|
+
enabled: boolean;
|
|
678
|
+
familyMemberId: string;
|
|
679
|
+
hafiz: boolean;
|
|
680
|
+
id: string;
|
|
681
|
+
notes: string | null;
|
|
682
|
+
orphan: boolean;
|
|
683
|
+
previousSchool: string | null;
|
|
684
|
+
remarks: string | null;
|
|
685
|
+
schoolId: string;
|
|
686
|
+
status: STUDENT_STATUS;
|
|
687
|
+
studentCode: string;
|
|
688
|
+
updatedAt: string;
|
|
689
|
+
attendances?: AttendanceBE[];
|
|
690
|
+
campus?: CampusBE;
|
|
691
|
+
enrollments?: EnrollmentBE[];
|
|
692
|
+
familyMember?: FamilyMemberBE;
|
|
693
|
+
grades?: GradeBE[];
|
|
694
|
+
studentFees?: StudentFeeBE[];
|
|
695
|
+
}
|
|
696
|
+
/**
|
|
697
|
+
* Class represents grade levels (e.g., Grade 1, Grade 2, Grade 10)
|
|
698
|
+
*/
|
|
699
|
+
interface ClassBE {
|
|
700
|
+
campusId: string | null;
|
|
701
|
+
code: string;
|
|
702
|
+
createdAt: string;
|
|
703
|
+
description: string | null;
|
|
704
|
+
enabled: boolean;
|
|
705
|
+
id: string;
|
|
706
|
+
name: string;
|
|
707
|
+
schoolId: string;
|
|
708
|
+
updatedAt: string;
|
|
709
|
+
campus?: CampusBE;
|
|
710
|
+
feeStructures?: FeeStructureBE[];
|
|
711
|
+
school?: SchoolBE;
|
|
712
|
+
sections?: SectionBE[];
|
|
713
|
+
}
|
|
714
|
+
/**
|
|
715
|
+
* Section represents a named division within a school (school-wide pool).
|
|
716
|
+
*/
|
|
717
|
+
interface SectionBE {
|
|
718
|
+
capacity: number | null;
|
|
719
|
+
createdAt: string;
|
|
720
|
+
enabled: boolean;
|
|
721
|
+
id: string;
|
|
722
|
+
name: string;
|
|
723
|
+
schoolId: string;
|
|
724
|
+
updatedAt: string;
|
|
725
|
+
class?: ClassBE;
|
|
726
|
+
courses?: CourseBE[];
|
|
727
|
+
enrollments?: EnrollmentBE[];
|
|
728
|
+
school?: SchoolBE;
|
|
729
|
+
}
|
|
730
|
+
/**
|
|
731
|
+
* Subject represents academic subjects (e.g., Mathematics, English, Science)
|
|
732
|
+
*/
|
|
733
|
+
interface SubjectBE {
|
|
734
|
+
code: string;
|
|
735
|
+
createdAt: string;
|
|
736
|
+
description: string | null;
|
|
737
|
+
enabled: boolean;
|
|
738
|
+
id: string;
|
|
739
|
+
name: string;
|
|
740
|
+
schoolId: string;
|
|
741
|
+
updatedAt: string;
|
|
742
|
+
courses?: CourseBE[];
|
|
743
|
+
school?: SchoolBE;
|
|
744
|
+
}
|
|
745
|
+
/**
|
|
746
|
+
* Course represents a subject taught in a specific section by a teacher
|
|
747
|
+
*/
|
|
748
|
+
interface CourseBE {
|
|
749
|
+
classId: string;
|
|
750
|
+
code: string;
|
|
751
|
+
createdAt: string;
|
|
752
|
+
enabled: boolean;
|
|
753
|
+
id: string;
|
|
754
|
+
schoolId: string;
|
|
755
|
+
sectionId: string;
|
|
756
|
+
subjectId: string;
|
|
757
|
+
teacherId: string;
|
|
758
|
+
updatedAt: Date;
|
|
759
|
+
class?: ClassBE;
|
|
760
|
+
grades?: GradeBE[];
|
|
761
|
+
schedules?: ScheduleBE[];
|
|
762
|
+
school?: SchoolBE;
|
|
763
|
+
section?: SectionBE;
|
|
764
|
+
subject?: SubjectBE;
|
|
765
|
+
teacher?: TeacherBE;
|
|
766
|
+
}
|
|
767
|
+
/**
|
|
768
|
+
* Teacher represents teaching staff
|
|
769
|
+
*/
|
|
770
|
+
interface TeacherBE {
|
|
771
|
+
address: string | null;
|
|
772
|
+
avatar: string | null;
|
|
773
|
+
bio: string | null;
|
|
774
|
+
campusId: string | null;
|
|
775
|
+
city: string | null;
|
|
776
|
+
country: string | null;
|
|
777
|
+
createdAt: string;
|
|
778
|
+
dateOfBirth: Date | string | null;
|
|
779
|
+
emergencyPhone: string | null;
|
|
780
|
+
enabled: boolean;
|
|
781
|
+
experience: number | null;
|
|
782
|
+
firstName: string;
|
|
783
|
+
gender: GENDER | null;
|
|
784
|
+
id: string;
|
|
785
|
+
joiningDate: Date | string;
|
|
786
|
+
lastName: string;
|
|
787
|
+
phone: string | null;
|
|
788
|
+
postalCode: string | null;
|
|
789
|
+
qualification: string | null;
|
|
790
|
+
schoolId: string;
|
|
791
|
+
specialization: string | null;
|
|
792
|
+
state: string | null;
|
|
793
|
+
teacherCode: string;
|
|
794
|
+
updatedAt: Date;
|
|
795
|
+
userId: string | null;
|
|
796
|
+
campus?: CampusBE;
|
|
797
|
+
courses?: CourseBE[];
|
|
798
|
+
school?: SchoolBE;
|
|
799
|
+
user?: UserBE | null;
|
|
800
|
+
}
|
|
801
|
+
/**
|
|
802
|
+
* Enrollment represents a student enrolled in a section.
|
|
803
|
+
* All courses taught in that section are implied.
|
|
804
|
+
*/
|
|
805
|
+
interface EnrollmentBE {
|
|
806
|
+
createdAt: string;
|
|
807
|
+
enabled: boolean;
|
|
808
|
+
enrollmentDate: Date | string;
|
|
809
|
+
id: string;
|
|
810
|
+
classId: string;
|
|
811
|
+
sectionId: string;
|
|
812
|
+
studentProfileId: string;
|
|
813
|
+
updatedAt: string;
|
|
814
|
+
class?: ClassBE;
|
|
815
|
+
grades?: GradeBE[];
|
|
816
|
+
section?: SectionBE;
|
|
817
|
+
studentProfile?: StudentProfileBE;
|
|
818
|
+
}
|
|
819
|
+
/**
|
|
820
|
+
* Attendance tracks daily student presence in courses
|
|
821
|
+
*/
|
|
822
|
+
interface AttendanceBE {
|
|
823
|
+
createdAt: string;
|
|
824
|
+
date: Date | string;
|
|
825
|
+
enabled: boolean;
|
|
826
|
+
id: string;
|
|
827
|
+
remarks: string | null;
|
|
828
|
+
schoolId: string;
|
|
829
|
+
status: ATTENDANCE_STATUS;
|
|
830
|
+
studentProfileId: string;
|
|
831
|
+
updatedAt: string;
|
|
832
|
+
school?: SchoolBE;
|
|
833
|
+
studentProfile?: StudentProfileBE;
|
|
834
|
+
}
|
|
835
|
+
/**
|
|
836
|
+
* Grade represents student assessment results
|
|
837
|
+
*/
|
|
838
|
+
interface GradeBE {
|
|
839
|
+
assessmentDate: Date | string;
|
|
840
|
+
courseId: string;
|
|
841
|
+
createdAt: Date;
|
|
842
|
+
enabled: boolean;
|
|
843
|
+
enrollmentId: string;
|
|
844
|
+
grade: string | null;
|
|
845
|
+
gradeType: GRADE_TYPE;
|
|
846
|
+
id: string;
|
|
847
|
+
marksObtained: number;
|
|
848
|
+
maxMarks: number;
|
|
849
|
+
percentage: number | null;
|
|
850
|
+
remarks: string | null;
|
|
851
|
+
schoolId: string;
|
|
852
|
+
studentProfileId: string;
|
|
853
|
+
title: string;
|
|
854
|
+
updatedAt: Date;
|
|
855
|
+
course?: CourseBE;
|
|
856
|
+
enrollment?: EnrollmentBE;
|
|
857
|
+
school?: SchoolBE;
|
|
858
|
+
studentProfile?: StudentProfileBE;
|
|
859
|
+
}
|
|
860
|
+
/**
|
|
861
|
+
* Schedule represents class timetable
|
|
862
|
+
*/
|
|
863
|
+
interface ScheduleBE {
|
|
864
|
+
courseId: string;
|
|
865
|
+
createdAt: string;
|
|
866
|
+
dayOfWeek: DAY_OF_WEEK;
|
|
867
|
+
enabled: boolean;
|
|
868
|
+
endTime: string;
|
|
869
|
+
id: string;
|
|
870
|
+
room: string | null;
|
|
871
|
+
schoolId: string;
|
|
872
|
+
startTime: string;
|
|
873
|
+
updatedAt: string;
|
|
874
|
+
course?: CourseBE;
|
|
875
|
+
school?: SchoolBE;
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
export type { AttendanceBE as A, AdmissionAIBE, AdmissionBE, AdmissionDetails, BlogCommentBE as B, CampaignBE as C, DiscountCodeBE as D, ExpenseBE as E, FeeAgentActivityBE as F, FatherDetails, GradeBE as G, HomeDetails, MobileNotificationBE as M, MotherDetails, NotificationPreferenceBE as N, OfficeUse, PermissionBE as P, ReferralBE as R, StudentFeeBE as S, StudentDetails, TeacherBE as T, UserPushTokenBE as U, WorkspaceBE as W, FeeConversationBE as a, FeeStructureBE as b, BlogCommentClapBE as c, BlogPostBE as d, BlogPostClapBE as e, CampaignContactBE as f, CampusBE as g, PlanBE as h, RoleBE as i, RolePermissionBE as j, SchoolBE as k, UserBE as l, WorkspaceUserBE as m, WorkspaceUserPermissionBE as n, ClassBE as o, CourseBE as p, EnrollmentBE as q, FamilyBE as r, FamilyMemberBE as s, ScheduleBE as t, SectionBE as u, StudentProfileBE as v, SubjectBE as w };
|