@baasix/baasix 0.1.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/LICENSE.MD +85 -0
- package/README.md +526 -0
- package/assets/banner.jpg +0 -0
- package/assets/banner_small.jpg +0 -0
- package/assets/logo_icon.svg +20 -0
- package/assets/logo_icon_rounded.svg +20 -0
- package/dist/LICENSE.MD +85 -0
- package/dist/README.md +526 -0
- package/dist/app/404/index.html +1 -0
- package/dist/app/404.html +1 -0
- package/dist/app/_next/static/chunks/041e1f03-56ae8a902a7f2fe6.js +24 -0
- package/dist/app/_next/static/chunks/1117-05479929a8da73e3.js +1 -0
- package/dist/app/_next/static/chunks/1299.77cc7b7b76b75cba.js +1 -0
- package/dist/app/_next/static/chunks/1303-35a96e9c9cdeab9d.js +1 -0
- package/dist/app/_next/static/chunks/1509-56ac00cdaaecdf53.js +1 -0
- package/dist/app/_next/static/chunks/1668-e3eabd0f6753c780.js +1 -0
- package/dist/app/_next/static/chunks/1783-d9fb550fd324300c.js +1 -0
- package/dist/app/_next/static/chunks/2117-29b5fa47421595ad.js +2 -0
- package/dist/app/_next/static/chunks/2344.35b46d2179a765b5.js +1 -0
- package/dist/app/_next/static/chunks/257.990da16794a31292.js +1 -0
- package/dist/app/_next/static/chunks/2676-73b0ee7c80073a84.js +1 -0
- package/dist/app/_next/static/chunks/3563-b8842744384391fe.js +1 -0
- package/dist/app/_next/static/chunks/363642f4-933b579ed3c85f60.js +1 -0
- package/dist/app/_next/static/chunks/3817-e20c8f0a0810fc95.js +1 -0
- package/dist/app/_next/static/chunks/3834.84944e390d902509.js +2 -0
- package/dist/app/_next/static/chunks/4043-3a30c8a75896f241.js +1 -0
- package/dist/app/_next/static/chunks/4225-14090c7c0cd9dec6.js +1 -0
- package/dist/app/_next/static/chunks/4438-c9a12ca15b6e9160.js +1 -0
- package/dist/app/_next/static/chunks/4458-679fd0c6884f456a.js +1 -0
- package/dist/app/_next/static/chunks/4475-8bdfbd536fba8c48.js +1 -0
- package/dist/app/_next/static/chunks/4883-8a924721bb21b3b0.js +1 -0
- package/dist/app/_next/static/chunks/489-683ab07188f9df2b.js +1 -0
- package/dist/app/_next/static/chunks/4952-1b97320cf61f3f21.js +1 -0
- package/dist/app/_next/static/chunks/5094-8d53e403235d4ca6.js +1 -0
- package/dist/app/_next/static/chunks/5101-3a146e0625747ad1.js +1 -0
- package/dist/app/_next/static/chunks/54a60aa6-d9747982e0a81f58.js +79 -0
- package/dist/app/_next/static/chunks/5650-f096291df402bfc2.js +1 -0
- package/dist/app/_next/static/chunks/600-539045311240f579.js +1 -0
- package/dist/app/_next/static/chunks/6170-803b82e19d3ade6d.js +89 -0
- package/dist/app/_next/static/chunks/6241-30d7169d1010e5a4.js +1 -0
- package/dist/app/_next/static/chunks/6530-a91e10cffa4200c4.js +1 -0
- package/dist/app/_next/static/chunks/6547-4bbbdb5c399aef1e.js +1 -0
- package/dist/app/_next/static/chunks/6712-781937c53a2c49da.js +1 -0
- package/dist/app/_next/static/chunks/6fcbdc68-90be1a5480b8d353.js +1 -0
- package/dist/app/_next/static/chunks/70e0d97a-aeaf0cdc26ba1a58.js +1 -0
- package/dist/app/_next/static/chunks/7214-5154a89d08d24dde.js +1 -0
- package/dist/app/_next/static/chunks/7324-b53229c59a640880.js +10 -0
- package/dist/app/_next/static/chunks/7636-66424f0b51d350e9.js +1 -0
- package/dist/app/_next/static/chunks/7874-39a3f2541165a675.js +1 -0
- package/dist/app/_next/static/chunks/7982-9da12b83f11e3f5f.js +1 -0
- package/dist/app/_next/static/chunks/8213a2eb-da25a3b3c5521b2b.js +1 -0
- package/dist/app/_next/static/chunks/8473-6598318371eca31b.js +1 -0
- package/dist/app/_next/static/chunks/8640fa6b-72e43370f68e5587.js +1 -0
- package/dist/app/_next/static/chunks/9090-3ef676f29c95f1c7.js +1 -0
- package/dist/app/_next/static/chunks/9124-a02f9e209e6e3cce.js +1 -0
- package/dist/app/_next/static/chunks/926-156f32067d111d6b.js +1 -0
- package/dist/app/_next/static/chunks/9487-b17481605e513b83.js +1 -0
- package/dist/app/_next/static/chunks/9599-a7e572bb88c3392b.js +1 -0
- package/dist/app/_next/static/chunks/9881-419697138376e755.js +1 -0
- package/dist/app/_next/static/chunks/app/(authenticated)/activity-log/all-activity/page-8917930b4d663405.js +1 -0
- package/dist/app/_next/static/chunks/app/(authenticated)/activity-log/email-log/page-b27a6ee32782d7df.js +1 -0
- package/dist/app/_next/static/chunks/app/(authenticated)/activity-log/notifications/page-b7eda523ede2702c.js +1 -0
- package/dist/app/_next/static/chunks/app/(authenticated)/activity-log/page-1cfa62d1caedaed0.js +1 -0
- package/dist/app/_next/static/chunks/app/(authenticated)/activity-log/sessions/page-3e21e20db90aeff7.js +1 -0
- package/dist/app/_next/static/chunks/app/(authenticated)/activity-log/workflow-executions/page-27bcc26b747fb29b.js +1 -0
- package/dist/app/_next/static/chunks/app/(authenticated)/activity-log/workflow-logs/page-9f9e9e952aef436e.js +1 -0
- package/dist/app/_next/static/chunks/app/(authenticated)/change-password/page-8d61aa499eabb127.js +1 -0
- package/dist/app/_next/static/chunks/app/(authenticated)/dashboard/page-1ceeac9e72997a8a.js +1 -0
- package/dist/app/_next/static/chunks/app/(authenticated)/data-browser/page-8cda2b57759dd670.js +1 -0
- package/dist/app/_next/static/chunks/app/(authenticated)/file-manager/page-8c6f1b1da66ad7e4.js +1 -0
- package/dist/app/_next/static/chunks/app/(authenticated)/layout-f70d225b2759c998.js +1 -0
- package/dist/app/_next/static/chunks/app/(authenticated)/settings/migrations/page-aacec8f7cfb40ab2.js +1 -0
- package/dist/app/_next/static/chunks/app/(authenticated)/settings/permissions/page-828110cfcde429c6.js +1 -0
- package/dist/app/_next/static/chunks/app/(authenticated)/settings/project/page-420e794bb76bd204.js +1 -0
- package/dist/app/_next/static/chunks/app/(authenticated)/settings/roles/page-9001d02b28f70708.js +1 -0
- package/dist/app/_next/static/chunks/app/(authenticated)/settings/schema/page-899574f35091dd58.js +1 -0
- package/dist/app/_next/static/chunks/app/(authenticated)/settings/tasks/page-ad7ab3e27c83f44f.js +1 -0
- package/dist/app/_next/static/chunks/app/(authenticated)/settings/templates/edit/page-bd83414cb8c4cb04.js +1 -0
- package/dist/app/_next/static/chunks/app/(authenticated)/settings/templates/page-3181447f8772b1d3.js +1 -0
- package/dist/app/_next/static/chunks/app/(authenticated)/settings/tenants/page-ef9bfbacef5a1d73.js +1 -0
- package/dist/app/_next/static/chunks/app/(authenticated)/users/invites/page-480306b7b2bbac7e.js +1 -0
- package/dist/app/_next/static/chunks/app/(authenticated)/users/list/page-74da51254c2606b3.js +1 -0
- package/dist/app/_next/static/chunks/app/(authenticated)/users/page-e99c6f0b915001b2.js +1 -0
- package/dist/app/_next/static/chunks/app/(authenticated)/users/preferences/page-1a935630ce8f2b12.js +1 -0
- package/dist/app/_next/static/chunks/app/(authenticated)/users/user-roles/page-901dfb8ea1f39ca8.js +1 -0
- package/dist/app/_next/static/chunks/app/(authenticated)/workflows/detail/page-9a6b839aea688ca4.js +1 -0
- package/dist/app/_next/static/chunks/app/(authenticated)/workflows/edit/page-11774efbc2fecae2.js +1 -0
- package/dist/app/_next/static/chunks/app/(authenticated)/workflows/execution/page-8ec1aea90412c03d.js +1 -0
- package/dist/app/_next/static/chunks/app/(authenticated)/workflows/page-88bc5b36ccb0a1f7.js +1 -0
- package/dist/app/_next/static/chunks/app/(public)/forgot-password/page-ed263fd46ef81c20.js +1 -0
- package/dist/app/_next/static/chunks/app/(public)/layout-f538977545844af8.js +1 -0
- package/dist/app/_next/static/chunks/app/(public)/login/page-c0a10b137f346096.js +1 -0
- package/dist/app/_next/static/chunks/app/(public)/register/page-4cb7644893efd9b3.js +1 -0
- package/dist/app/_next/static/chunks/app/_not-found/page-653f8815b78256cc.js +1 -0
- package/dist/app/_next/static/chunks/app/layout-591ca7a3e16528a1.js +1 -0
- package/dist/app/_next/static/chunks/app/page-dd19d124b5fa2577.js +1 -0
- package/dist/app/_next/static/chunks/c37d3baf.c2ff165f5b02c692.js +1 -0
- package/dist/app/_next/static/chunks/d0deef33.0379166a4ec23470.js +1 -0
- package/dist/app/_next/static/chunks/fd9d1056-54169f07cd680d6c.js +1 -0
- package/dist/app/_next/static/chunks/framework-8e0e0f4a6b83a956.js +1 -0
- package/dist/app/_next/static/chunks/main-324e91f5a430cddf.js +1 -0
- package/dist/app/_next/static/chunks/main-app-55bcae20c77aaf0e.js +1 -0
- package/dist/app/_next/static/chunks/pages/_app-3c9ca398d360b709.js +1 -0
- package/dist/app/_next/static/chunks/pages/_error-cf5ca766ac8f493f.js +1 -0
- package/dist/app/_next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
- package/dist/app/_next/static/chunks/webpack-2c306566f7ee1b63.js +1 -0
- package/dist/app/_next/static/css/6c4002bae4e236b2.css +3 -0
- package/dist/app/_next/static/css/a275cc2b185e04f8.css +1 -0
- package/dist/app/_next/static/eCWhKA8XHqmB1zgFcEtN2/_buildManifest.js +1 -0
- package/dist/app/_next/static/eCWhKA8XHqmB1zgFcEtN2/_ssgManifest.js +1 -0
- package/dist/app/activity-log/all-activity/index.html +1 -0
- package/dist/app/activity-log/all-activity/index.txt +14 -0
- package/dist/app/activity-log/email-log/index.html +1 -0
- package/dist/app/activity-log/email-log/index.txt +14 -0
- package/dist/app/activity-log/index.html +1 -0
- package/dist/app/activity-log/index.txt +14 -0
- package/dist/app/activity-log/notifications/index.html +1 -0
- package/dist/app/activity-log/notifications/index.txt +14 -0
- package/dist/app/activity-log/sessions/index.html +1 -0
- package/dist/app/activity-log/sessions/index.txt +14 -0
- package/dist/app/activity-log/workflow-executions/index.html +1 -0
- package/dist/app/activity-log/workflow-executions/index.txt +14 -0
- package/dist/app/activity-log/workflow-logs/index.html +1 -0
- package/dist/app/activity-log/workflow-logs/index.txt +14 -0
- package/dist/app/change-password/index.html +1 -0
- package/dist/app/change-password/index.txt +14 -0
- package/dist/app/dashboard/index.html +1 -0
- package/dist/app/dashboard/index.txt +14 -0
- package/dist/app/data-browser/index.html +1 -0
- package/dist/app/data-browser/index.txt +14 -0
- package/dist/app/file-manager/index.html +1 -0
- package/dist/app/file-manager/index.txt +14 -0
- package/dist/app/forgot-password/index.html +1 -0
- package/dist/app/forgot-password/index.txt +13 -0
- package/dist/app/index.html +1 -0
- package/dist/app/index.txt +9 -0
- package/dist/app/login/index.html +1 -0
- package/dist/app/login/index.txt +13 -0
- package/dist/app/logo-dark.png +0 -0
- package/dist/app/logo-icon.svg +81 -0
- package/dist/app/logo-light.png +0 -0
- package/dist/app/register/index.html +1 -0
- package/dist/app/register/index.txt +13 -0
- package/dist/app/settings/migrations/index.html +1 -0
- package/dist/app/settings/migrations/index.txt +14 -0
- package/dist/app/settings/permissions/index.html +1 -0
- package/dist/app/settings/permissions/index.txt +14 -0
- package/dist/app/settings/project/index.html +1 -0
- package/dist/app/settings/project/index.txt +14 -0
- package/dist/app/settings/roles/index.html +1 -0
- package/dist/app/settings/roles/index.txt +14 -0
- package/dist/app/settings/schema/index.html +1 -0
- package/dist/app/settings/schema/index.txt +14 -0
- package/dist/app/settings/tasks/index.html +1 -0
- package/dist/app/settings/tasks/index.txt +14 -0
- package/dist/app/settings/templates/edit/index.html +1 -0
- package/dist/app/settings/templates/edit/index.txt +14 -0
- package/dist/app/settings/templates/index.html +1 -0
- package/dist/app/settings/templates/index.txt +14 -0
- package/dist/app/settings/tenants/index.html +1 -0
- package/dist/app/settings/tenants/index.txt +14 -0
- package/dist/app/users/index.html +1 -0
- package/dist/app/users/index.txt +14 -0
- package/dist/app/users/invites/index.html +1 -0
- package/dist/app/users/invites/index.txt +14 -0
- package/dist/app/users/list/index.html +1 -0
- package/dist/app/users/list/index.txt +14 -0
- package/dist/app/users/preferences/index.html +1 -0
- package/dist/app/users/preferences/index.txt +14 -0
- package/dist/app/users/user-roles/index.html +1 -0
- package/dist/app/users/user-roles/index.txt +14 -0
- package/dist/app/workflows/detail/index.html +1 -0
- package/dist/app/workflows/detail/index.txt +14 -0
- package/dist/app/workflows/edit/index.html +1 -0
- package/dist/app/workflows/edit/index.txt +14 -0
- package/dist/app/workflows/execution/index.html +1 -0
- package/dist/app/workflows/execution/index.txt +14 -0
- package/dist/app/workflows/index.html +1 -0
- package/dist/app/workflows/index.txt +14 -0
- package/dist/app.d.ts +36 -0
- package/dist/app.d.ts.map +1 -0
- package/dist/app.js +546 -0
- package/dist/app.js.map +1 -0
- package/dist/auth/adapters/baasix-adapter.d.ts +12 -0
- package/dist/auth/adapters/baasix-adapter.d.ts.map +1 -0
- package/dist/auth/adapters/baasix-adapter.js +318 -0
- package/dist/auth/adapters/baasix-adapter.js.map +1 -0
- package/dist/auth/adapters/index.d.ts +6 -0
- package/dist/auth/adapters/index.d.ts.map +1 -0
- package/dist/auth/adapters/index.js +5 -0
- package/dist/auth/adapters/index.js.map +1 -0
- package/dist/auth/core.d.ts +73 -0
- package/dist/auth/core.d.ts.map +1 -0
- package/dist/auth/core.js +528 -0
- package/dist/auth/core.js.map +1 -0
- package/dist/auth/index.d.ts +56 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +58 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/auth/oauth2/index.d.ts +5 -0
- package/dist/auth/oauth2/index.d.ts.map +1 -0
- package/dist/auth/oauth2/index.js +5 -0
- package/dist/auth/oauth2/index.js.map +1 -0
- package/dist/auth/oauth2/utils.d.ts +90 -0
- package/dist/auth/oauth2/utils.d.ts.map +1 -0
- package/dist/auth/oauth2/utils.js +167 -0
- package/dist/auth/oauth2/utils.js.map +1 -0
- package/dist/auth/providers/apple.d.ts +28 -0
- package/dist/auth/providers/apple.d.ts.map +1 -0
- package/dist/auth/providers/apple.js +192 -0
- package/dist/auth/providers/apple.js.map +1 -0
- package/dist/auth/providers/credential.d.ts +87 -0
- package/dist/auth/providers/credential.d.ts.map +1 -0
- package/dist/auth/providers/credential.js +162 -0
- package/dist/auth/providers/credential.js.map +1 -0
- package/dist/auth/providers/facebook.d.ts +26 -0
- package/dist/auth/providers/facebook.d.ts.map +1 -0
- package/dist/auth/providers/facebook.js +112 -0
- package/dist/auth/providers/facebook.js.map +1 -0
- package/dist/auth/providers/github.d.ts +29 -0
- package/dist/auth/providers/github.d.ts.map +1 -0
- package/dist/auth/providers/github.js +144 -0
- package/dist/auth/providers/github.js.map +1 -0
- package/dist/auth/providers/google.d.ts +32 -0
- package/dist/auth/providers/google.d.ts.map +1 -0
- package/dist/auth/providers/google.js +145 -0
- package/dist/auth/providers/google.js.map +1 -0
- package/dist/auth/providers/index.d.ts +22 -0
- package/dist/auth/providers/index.d.ts.map +1 -0
- package/dist/auth/providers/index.js +17 -0
- package/dist/auth/providers/index.js.map +1 -0
- package/dist/auth/routes.d.ts +63 -0
- package/dist/auth/routes.d.ts.map +1 -0
- package/dist/auth/routes.js +827 -0
- package/dist/auth/routes.js.map +1 -0
- package/dist/auth/services/index.d.ts +10 -0
- package/dist/auth/services/index.d.ts.map +1 -0
- package/dist/auth/services/index.js +7 -0
- package/dist/auth/services/index.js.map +1 -0
- package/dist/auth/services/session.d.ts +81 -0
- package/dist/auth/services/session.d.ts.map +1 -0
- package/dist/auth/services/session.js +186 -0
- package/dist/auth/services/session.js.map +1 -0
- package/dist/auth/services/token.d.ts +41 -0
- package/dist/auth/services/token.d.ts.map +1 -0
- package/dist/auth/services/token.js +44 -0
- package/dist/auth/services/token.js.map +1 -0
- package/dist/auth/services/verification.d.ts +77 -0
- package/dist/auth/services/verification.d.ts.map +1 -0
- package/dist/auth/services/verification.js +143 -0
- package/dist/auth/services/verification.js.map +1 -0
- package/dist/auth/types.d.ts +318 -0
- package/dist/auth/types.d.ts.map +1 -0
- package/dist/auth/types.js +6 -0
- package/dist/auth/types.js.map +1 -0
- package/dist/customTypes/arrays.d.ts +200 -0
- package/dist/customTypes/arrays.d.ts.map +1 -0
- package/dist/customTypes/arrays.js +309 -0
- package/dist/customTypes/arrays.js.map +1 -0
- package/dist/customTypes/index.d.ts +8 -0
- package/dist/customTypes/index.d.ts.map +1 -0
- package/dist/customTypes/index.js +11 -0
- package/dist/customTypes/index.js.map +1 -0
- package/dist/customTypes/postgis.d.ts +146 -0
- package/dist/customTypes/postgis.d.ts.map +1 -0
- package/dist/customTypes/postgis.js +315 -0
- package/dist/customTypes/postgis.js.map +1 -0
- package/dist/customTypes/ranges.d.ts +128 -0
- package/dist/customTypes/ranges.d.ts.map +1 -0
- package/dist/customTypes/ranges.js +257 -0
- package/dist/customTypes/ranges.js.map +1 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +42 -0
- package/dist/index.js.map +1 -0
- package/dist/migrations/0.1.0-alpha.0_initial_setup.d.ts +29 -0
- package/dist/migrations/0.1.0-alpha.0_initial_setup.d.ts.map +1 -0
- package/dist/migrations/0.1.0-alpha.0_initial_setup.js +72 -0
- package/dist/migrations/0.1.0-alpha.0_initial_setup.js.map +1 -0
- package/dist/migrations/_example_migration.d.ts +31 -0
- package/dist/migrations/_example_migration.d.ts.map +1 -0
- package/dist/migrations/_example_migration.js +75 -0
- package/dist/migrations/_example_migration.js.map +1 -0
- package/dist/plugins/definePlugin.d.ts +49 -0
- package/dist/plugins/definePlugin.d.ts.map +1 -0
- package/dist/plugins/definePlugin.js +131 -0
- package/dist/plugins/definePlugin.js.map +1 -0
- package/dist/plugins/softDelete.d.ts +179 -0
- package/dist/plugins/softDelete.d.ts.map +1 -0
- package/dist/plugins/softDelete.js +235 -0
- package/dist/plugins/softDelete.js.map +1 -0
- package/dist/routes/auth.route.d.ts +14 -0
- package/dist/routes/auth.route.d.ts.map +1 -0
- package/dist/routes/auth.route.js +421 -0
- package/dist/routes/auth.route.js.map +1 -0
- package/dist/routes/file.route.d.ts +7 -0
- package/dist/routes/file.route.d.ts.map +1 -0
- package/dist/routes/file.route.js +274 -0
- package/dist/routes/file.route.js.map +1 -0
- package/dist/routes/items.route.d.ts +7 -0
- package/dist/routes/items.route.d.ts.map +1 -0
- package/dist/routes/items.route.js +369 -0
- package/dist/routes/items.route.js.map +1 -0
- package/dist/routes/migration.route.d.ts +7 -0
- package/dist/routes/migration.route.d.ts.map +1 -0
- package/dist/routes/migration.route.js +225 -0
- package/dist/routes/migration.route.js.map +1 -0
- package/dist/routes/notification.route.d.ts +7 -0
- package/dist/routes/notification.route.d.ts.map +1 -0
- package/dist/routes/notification.route.js +124 -0
- package/dist/routes/notification.route.js.map +1 -0
- package/dist/routes/openapi.route.d.ts +7 -0
- package/dist/routes/openapi.route.d.ts.map +1 -0
- package/dist/routes/openapi.route.js +2169 -0
- package/dist/routes/openapi.route.js.map +1 -0
- package/dist/routes/permission.route.d.ts +7 -0
- package/dist/routes/permission.route.d.ts.map +1 -0
- package/dist/routes/permission.route.js +158 -0
- package/dist/routes/permission.route.js.map +1 -0
- package/dist/routes/realtime.route.d.ts +21 -0
- package/dist/routes/realtime.route.d.ts.map +1 -0
- package/dist/routes/realtime.route.js +243 -0
- package/dist/routes/realtime.route.js.map +1 -0
- package/dist/routes/reports.route.d.ts +7 -0
- package/dist/routes/reports.route.d.ts.map +1 -0
- package/dist/routes/reports.route.js +95 -0
- package/dist/routes/reports.route.js.map +1 -0
- package/dist/routes/schema.route.d.ts +7 -0
- package/dist/routes/schema.route.d.ts.map +1 -0
- package/dist/routes/schema.route.js +1780 -0
- package/dist/routes/schema.route.js.map +1 -0
- package/dist/routes/settings.route.d.ts +7 -0
- package/dist/routes/settings.route.d.ts.map +1 -0
- package/dist/routes/settings.route.js +154 -0
- package/dist/routes/settings.route.js.map +1 -0
- package/dist/routes/templates.route.d.ts +7 -0
- package/dist/routes/templates.route.d.ts.map +1 -0
- package/dist/routes/templates.route.js +91 -0
- package/dist/routes/templates.route.js.map +1 -0
- package/dist/routes/utils.route.d.ts +7 -0
- package/dist/routes/utils.route.d.ts.map +1 -0
- package/dist/routes/utils.route.js +33 -0
- package/dist/routes/utils.route.js.map +1 -0
- package/dist/routes/workflow.route.d.ts +7 -0
- package/dist/routes/workflow.route.d.ts.map +1 -0
- package/dist/routes/workflow.route.js +787 -0
- package/dist/routes/workflow.route.js.map +1 -0
- package/dist/services/AssetsService.d.ts +39 -0
- package/dist/services/AssetsService.d.ts.map +1 -0
- package/dist/services/AssetsService.js +255 -0
- package/dist/services/AssetsService.js.map +1 -0
- package/dist/services/CacheService.d.ts +169 -0
- package/dist/services/CacheService.d.ts.map +1 -0
- package/dist/services/CacheService.js +722 -0
- package/dist/services/CacheService.js.map +1 -0
- package/dist/services/FilesService.d.ts +30 -0
- package/dist/services/FilesService.d.ts.map +1 -0
- package/dist/services/FilesService.js +268 -0
- package/dist/services/FilesService.js.map +1 -0
- package/dist/services/HooksManager.d.ts +38 -0
- package/dist/services/HooksManager.d.ts.map +1 -0
- package/dist/services/HooksManager.js +165 -0
- package/dist/services/HooksManager.js.map +1 -0
- package/dist/services/ItemsService.d.ts +273 -0
- package/dist/services/ItemsService.d.ts.map +1 -0
- package/dist/services/ItemsService.js +2458 -0
- package/dist/services/ItemsService.js.map +1 -0
- package/dist/services/MailService.d.ts +76 -0
- package/dist/services/MailService.d.ts.map +1 -0
- package/dist/services/MailService.js +585 -0
- package/dist/services/MailService.js.map +1 -0
- package/dist/services/MigrationService.d.ts +243 -0
- package/dist/services/MigrationService.d.ts.map +1 -0
- package/dist/services/MigrationService.js +914 -0
- package/dist/services/MigrationService.js.map +1 -0
- package/dist/services/NotificationService.d.ts +35 -0
- package/dist/services/NotificationService.d.ts.map +1 -0
- package/dist/services/NotificationService.js +159 -0
- package/dist/services/NotificationService.js.map +1 -0
- package/dist/services/PermissionService.d.ts +128 -0
- package/dist/services/PermissionService.d.ts.map +1 -0
- package/dist/services/PermissionService.js +373 -0
- package/dist/services/PermissionService.js.map +1 -0
- package/dist/services/PluginManager.d.ts +138 -0
- package/dist/services/PluginManager.d.ts.map +1 -0
- package/dist/services/PluginManager.js +463 -0
- package/dist/services/PluginManager.js.map +1 -0
- package/dist/services/RealtimeService.d.ts +209 -0
- package/dist/services/RealtimeService.d.ts.map +1 -0
- package/dist/services/RealtimeService.js +978 -0
- package/dist/services/RealtimeService.js.map +1 -0
- package/dist/services/ReportService.d.ts +13 -0
- package/dist/services/ReportService.d.ts.map +1 -0
- package/dist/services/ReportService.js +91 -0
- package/dist/services/ReportService.js.map +1 -0
- package/dist/services/SettingsService.d.ts +60 -0
- package/dist/services/SettingsService.d.ts.map +1 -0
- package/dist/services/SettingsService.js +474 -0
- package/dist/services/SettingsService.js.map +1 -0
- package/dist/services/SocketService.d.ts +129 -0
- package/dist/services/SocketService.d.ts.map +1 -0
- package/dist/services/SocketService.js +600 -0
- package/dist/services/SocketService.js.map +1 -0
- package/dist/services/StatsService.d.ts +10 -0
- package/dist/services/StatsService.d.ts.map +1 -0
- package/dist/services/StatsService.js +40 -0
- package/dist/services/StatsService.js.map +1 -0
- package/dist/services/StorageService.d.ts +20 -0
- package/dist/services/StorageService.d.ts.map +1 -0
- package/dist/services/StorageService.js +164 -0
- package/dist/services/StorageService.js.map +1 -0
- package/dist/services/TasksService.d.ts +74 -0
- package/dist/services/TasksService.d.ts.map +1 -0
- package/dist/services/TasksService.js +404 -0
- package/dist/services/TasksService.js.map +1 -0
- package/dist/services/WorkflowService.d.ts +305 -0
- package/dist/services/WorkflowService.d.ts.map +1 -0
- package/dist/services/WorkflowService.js +1811 -0
- package/dist/services/WorkflowService.js.map +1 -0
- package/dist/templates/logo/logo.png +0 -0
- package/dist/templates/mails/default.liquid +23 -0
- package/dist/types/aggregation.d.ts +40 -0
- package/dist/types/aggregation.d.ts.map +1 -0
- package/dist/types/aggregation.js +6 -0
- package/dist/types/aggregation.js.map +1 -0
- package/dist/types/assets.d.ts +32 -0
- package/dist/types/assets.d.ts.map +1 -0
- package/dist/types/assets.js +6 -0
- package/dist/types/assets.js.map +1 -0
- package/dist/types/auth.d.ts +50 -0
- package/dist/types/auth.d.ts.map +1 -0
- package/dist/types/auth.js +6 -0
- package/dist/types/auth.js.map +1 -0
- package/dist/types/cache.d.ts +47 -0
- package/dist/types/cache.d.ts.map +1 -0
- package/dist/types/cache.js +6 -0
- package/dist/types/cache.js.map +1 -0
- package/dist/types/database.d.ts +16 -0
- package/dist/types/database.d.ts.map +1 -0
- package/dist/types/database.js +6 -0
- package/dist/types/database.js.map +1 -0
- package/dist/types/fields.d.ts +71 -0
- package/dist/types/fields.d.ts.map +1 -0
- package/dist/types/fields.js +6 -0
- package/dist/types/fields.js.map +1 -0
- package/dist/types/files.d.ts +33 -0
- package/dist/types/files.d.ts.map +1 -0
- package/dist/types/files.js +6 -0
- package/dist/types/files.js.map +1 -0
- package/dist/types/hooks.d.ts +29 -0
- package/dist/types/hooks.d.ts.map +1 -0
- package/dist/types/hooks.js +6 -0
- package/dist/types/hooks.js.map +1 -0
- package/dist/types/import-export.d.ts +62 -0
- package/dist/types/import-export.d.ts.map +1 -0
- package/dist/types/import-export.js +6 -0
- package/dist/types/import-export.js.map +1 -0
- package/dist/types/index.d.ts +31 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +58 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/mail.d.ts +34 -0
- package/dist/types/mail.d.ts.map +1 -0
- package/dist/types/mail.js +6 -0
- package/dist/types/mail.js.map +1 -0
- package/dist/types/notifications.d.ts +16 -0
- package/dist/types/notifications.d.ts.map +1 -0
- package/dist/types/notifications.js +6 -0
- package/dist/types/notifications.js.map +1 -0
- package/dist/types/plugin.d.ts +351 -0
- package/dist/types/plugin.d.ts.map +1 -0
- package/dist/types/plugin.js +8 -0
- package/dist/types/plugin.js.map +1 -0
- package/dist/types/query.d.ts +71 -0
- package/dist/types/query.d.ts.map +1 -0
- package/dist/types/query.js +6 -0
- package/dist/types/query.js.map +1 -0
- package/dist/types/relations.d.ts +111 -0
- package/dist/types/relations.d.ts.map +1 -0
- package/dist/types/relations.js +6 -0
- package/dist/types/relations.js.map +1 -0
- package/dist/types/reports.d.ts +17 -0
- package/dist/types/reports.d.ts.map +1 -0
- package/dist/types/reports.js +6 -0
- package/dist/types/reports.js.map +1 -0
- package/dist/types/schema.d.ts +26 -0
- package/dist/types/schema.d.ts.map +1 -0
- package/dist/types/schema.js +6 -0
- package/dist/types/schema.js.map +1 -0
- package/dist/types/seed.d.ts +27 -0
- package/dist/types/seed.d.ts.map +1 -0
- package/dist/types/seed.js +6 -0
- package/dist/types/seed.js.map +1 -0
- package/dist/types/services.d.ts +68 -0
- package/dist/types/services.d.ts.map +1 -0
- package/dist/types/services.js +6 -0
- package/dist/types/services.js.map +1 -0
- package/dist/types/settings.d.ts +36 -0
- package/dist/types/settings.d.ts.map +1 -0
- package/dist/types/settings.js +6 -0
- package/dist/types/settings.js.map +1 -0
- package/dist/types/sockets.d.ts +26 -0
- package/dist/types/sockets.d.ts.map +1 -0
- package/dist/types/sockets.js +6 -0
- package/dist/types/sockets.js.map +1 -0
- package/dist/types/sort.d.ts +25 -0
- package/dist/types/sort.d.ts.map +1 -0
- package/dist/types/sort.js +6 -0
- package/dist/types/sort.js.map +1 -0
- package/dist/types/spatial.d.ts +19 -0
- package/dist/types/spatial.d.ts.map +1 -0
- package/dist/types/spatial.js +6 -0
- package/dist/types/spatial.js.map +1 -0
- package/dist/types/stats.d.ts +21 -0
- package/dist/types/stats.d.ts.map +1 -0
- package/dist/types/stats.js +6 -0
- package/dist/types/stats.js.map +1 -0
- package/dist/types/storage.d.ts +19 -0
- package/dist/types/storage.d.ts.map +1 -0
- package/dist/types/storage.js +6 -0
- package/dist/types/storage.js.map +1 -0
- package/dist/types/tasks.d.ts +14 -0
- package/dist/types/tasks.d.ts.map +1 -0
- package/dist/types/tasks.js +6 -0
- package/dist/types/tasks.js.map +1 -0
- package/dist/types/utils.d.ts +54 -0
- package/dist/types/utils.d.ts.map +1 -0
- package/dist/types/utils.js +6 -0
- package/dist/types/utils.js.map +1 -0
- package/dist/types/workflow.d.ts +17 -0
- package/dist/types/workflow.d.ts.map +1 -0
- package/dist/types/workflow.js +6 -0
- package/dist/types/workflow.js.map +1 -0
- package/dist/utils/aggregationUtils.d.ts +192 -0
- package/dist/utils/aggregationUtils.d.ts.map +1 -0
- package/dist/utils/aggregationUtils.js +450 -0
- package/dist/utils/aggregationUtils.js.map +1 -0
- package/dist/utils/auth.d.ts +93 -0
- package/dist/utils/auth.d.ts.map +1 -0
- package/dist/utils/auth.js +557 -0
- package/dist/utils/auth.js.map +1 -0
- package/dist/utils/cache.d.ts +64 -0
- package/dist/utils/cache.d.ts.map +1 -0
- package/dist/utils/cache.js +464 -0
- package/dist/utils/cache.js.map +1 -0
- package/dist/utils/common.d.ts +53 -0
- package/dist/utils/common.d.ts.map +1 -0
- package/dist/utils/common.js +162 -0
- package/dist/utils/common.js.map +1 -0
- package/dist/utils/db.d.ts +101 -0
- package/dist/utils/db.d.ts.map +1 -0
- package/dist/utils/db.js +413 -0
- package/dist/utils/db.js.map +1 -0
- package/dist/utils/dirname.d.ts +30 -0
- package/dist/utils/dirname.d.ts.map +1 -0
- package/dist/utils/dirname.js +95 -0
- package/dist/utils/dirname.js.map +1 -0
- package/dist/utils/dynamicVariableResolver.d.ts +17 -0
- package/dist/utils/dynamicVariableResolver.d.ts.map +1 -0
- package/dist/utils/dynamicVariableResolver.js +262 -0
- package/dist/utils/dynamicVariableResolver.js.map +1 -0
- package/dist/utils/env.d.ts +38 -0
- package/dist/utils/env.d.ts.map +1 -0
- package/dist/utils/env.js +80 -0
- package/dist/utils/env.js.map +1 -0
- package/dist/utils/errorHandler.d.ts +14 -0
- package/dist/utils/errorHandler.d.ts.map +1 -0
- package/dist/utils/errorHandler.js +79 -0
- package/dist/utils/errorHandler.js.map +1 -0
- package/dist/utils/fieldExpansion.d.ts +30 -0
- package/dist/utils/fieldExpansion.d.ts.map +1 -0
- package/dist/utils/fieldExpansion.js +145 -0
- package/dist/utils/fieldExpansion.js.map +1 -0
- package/dist/utils/fieldUtils.d.ts +179 -0
- package/dist/utils/fieldUtils.d.ts.map +1 -0
- package/dist/utils/fieldUtils.js +424 -0
- package/dist/utils/fieldUtils.js.map +1 -0
- package/dist/utils/filterOperators.d.ts +472 -0
- package/dist/utils/filterOperators.d.ts.map +1 -0
- package/dist/utils/filterOperators.js +1229 -0
- package/dist/utils/filterOperators.js.map +1 -0
- package/dist/utils/importUtils.d.ts +127 -0
- package/dist/utils/importUtils.d.ts.map +1 -0
- package/dist/utils/importUtils.js +437 -0
- package/dist/utils/importUtils.js.map +1 -0
- package/dist/utils/index.d.ts +75 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +101 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/logger.d.ts +41 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +217 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/orderUtils.d.ts +117 -0
- package/dist/utils/orderUtils.d.ts.map +1 -0
- package/dist/utils/orderUtils.js +249 -0
- package/dist/utils/orderUtils.js.map +1 -0
- package/dist/utils/queryBuilder.d.ts +118 -0
- package/dist/utils/queryBuilder.d.ts.map +1 -0
- package/dist/utils/queryBuilder.js +489 -0
- package/dist/utils/queryBuilder.js.map +1 -0
- package/dist/utils/relationLoader.d.ts +65 -0
- package/dist/utils/relationLoader.d.ts.map +1 -0
- package/dist/utils/relationLoader.js +1081 -0
- package/dist/utils/relationLoader.js.map +1 -0
- package/dist/utils/relationPathResolver.d.ts +30 -0
- package/dist/utils/relationPathResolver.d.ts.map +1 -0
- package/dist/utils/relationPathResolver.js +173 -0
- package/dist/utils/relationPathResolver.js.map +1 -0
- package/dist/utils/relationUtils.d.ts +139 -0
- package/dist/utils/relationUtils.d.ts.map +1 -0
- package/dist/utils/relationUtils.js +711 -0
- package/dist/utils/relationUtils.js.map +1 -0
- package/dist/utils/router.d.ts +6 -0
- package/dist/utils/router.d.ts.map +1 -0
- package/dist/utils/router.js +95 -0
- package/dist/utils/router.js.map +1 -0
- package/dist/utils/schema.d.ts +88 -0
- package/dist/utils/schema.d.ts.map +1 -0
- package/dist/utils/schema.js +24 -0
- package/dist/utils/schema.js.map +1 -0
- package/dist/utils/schemaManager.d.ts +238 -0
- package/dist/utils/schemaManager.d.ts.map +1 -0
- package/dist/utils/schemaManager.js +1992 -0
- package/dist/utils/schemaManager.js.map +1 -0
- package/dist/utils/schemaValidator.d.ts +83 -0
- package/dist/utils/schemaValidator.d.ts.map +1 -0
- package/dist/utils/schemaValidator.js +491 -0
- package/dist/utils/schemaValidator.js.map +1 -0
- package/dist/utils/seed.d.ts +45 -0
- package/dist/utils/seed.d.ts.map +1 -0
- package/dist/utils/seed.js +248 -0
- package/dist/utils/seed.js.map +1 -0
- package/dist/utils/sessionCleanup.d.ts +10 -0
- package/dist/utils/sessionCleanup.d.ts.map +1 -0
- package/dist/utils/sessionCleanup.js +49 -0
- package/dist/utils/sessionCleanup.js.map +1 -0
- package/dist/utils/sortUtils.d.ts +117 -0
- package/dist/utils/sortUtils.d.ts.map +1 -0
- package/dist/utils/sortUtils.js +232 -0
- package/dist/utils/sortUtils.js.map +1 -0
- package/dist/utils/spatialUtils.d.ts +244 -0
- package/dist/utils/spatialUtils.d.ts.map +1 -0
- package/dist/utils/spatialUtils.js +359 -0
- package/dist/utils/spatialUtils.js.map +1 -0
- package/dist/utils/systemschema.d.ts +11040 -0
- package/dist/utils/systemschema.d.ts.map +1 -0
- package/dist/utils/systemschema.js +1777 -0
- package/dist/utils/systemschema.js.map +1 -0
- package/dist/utils/tenantUtils.d.ts +34 -0
- package/dist/utils/tenantUtils.d.ts.map +1 -0
- package/dist/utils/tenantUtils.js +124 -0
- package/dist/utils/tenantUtils.js.map +1 -0
- package/dist/utils/typeMapper.d.ts +25 -0
- package/dist/utils/typeMapper.d.ts.map +1 -0
- package/dist/utils/typeMapper.js +282 -0
- package/dist/utils/typeMapper.js.map +1 -0
- package/dist/utils/valueValidator.d.ts +60 -0
- package/dist/utils/valueValidator.d.ts.map +1 -0
- package/dist/utils/valueValidator.js +303 -0
- package/dist/utils/valueValidator.js.map +1 -0
- package/dist/utils/workflow.d.ts +87 -0
- package/dist/utils/workflow.d.ts.map +1 -0
- package/dist/utils/workflow.js +205 -0
- package/dist/utils/workflow.js.map +1 -0
- package/package.json +115 -0
|
@@ -0,0 +1,1777 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
export const systemSchemas = {
|
|
3
|
+
schemas: [
|
|
4
|
+
{
|
|
5
|
+
collectionName: "baasix_SchemaDefinition",
|
|
6
|
+
schema: {
|
|
7
|
+
name: "SchemaDefinition",
|
|
8
|
+
timestamps: true,
|
|
9
|
+
fields: {
|
|
10
|
+
collectionName: {
|
|
11
|
+
type: "String",
|
|
12
|
+
primaryKey: true,
|
|
13
|
+
allowNull: false,
|
|
14
|
+
SystemGenerated: "true",
|
|
15
|
+
},
|
|
16
|
+
schema: { type: "JSON", allowNull: false, SystemGenerated: "true" },
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
collectionName: "baasix_Role",
|
|
22
|
+
schema: {
|
|
23
|
+
name: "Role",
|
|
24
|
+
timestamps: true,
|
|
25
|
+
fields: {
|
|
26
|
+
id: {
|
|
27
|
+
type: "UUID",
|
|
28
|
+
primaryKey: true,
|
|
29
|
+
defaultValue: { type: "UUIDV4" },
|
|
30
|
+
SystemGenerated: "true",
|
|
31
|
+
},
|
|
32
|
+
name: { type: "String", allowNull: false, SystemGenerated: "true" },
|
|
33
|
+
description: { type: "String", SystemGenerated: "true" },
|
|
34
|
+
isTenantSpecific: {
|
|
35
|
+
type: "Boolean",
|
|
36
|
+
allowNull: false,
|
|
37
|
+
defaultValue: true,
|
|
38
|
+
SystemGenerated: "true",
|
|
39
|
+
description: "Indicates if role permissions apply within tenant context",
|
|
40
|
+
},
|
|
41
|
+
canInviteRoleIds: {
|
|
42
|
+
type: "JSON",
|
|
43
|
+
allowNull: true,
|
|
44
|
+
defaultValue: [],
|
|
45
|
+
SystemGenerated: "true",
|
|
46
|
+
description: "Array of role IDs this role can invite",
|
|
47
|
+
},
|
|
48
|
+
permissions: {
|
|
49
|
+
relType: "HasMany",
|
|
50
|
+
target: "baasix_Permission",
|
|
51
|
+
foreignKey: "role_Id",
|
|
52
|
+
as: "permissions",
|
|
53
|
+
SystemGenerated: "true",
|
|
54
|
+
description: "M2O Alias",
|
|
55
|
+
},
|
|
56
|
+
userRoles: {
|
|
57
|
+
relType: "HasMany",
|
|
58
|
+
target: "baasix_UserRole",
|
|
59
|
+
foreignKey: "role_Id",
|
|
60
|
+
as: "userRoles",
|
|
61
|
+
SystemGenerated: "true",
|
|
62
|
+
description: "M2O Alias",
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
indexes: [
|
|
66
|
+
{
|
|
67
|
+
fields: ["name"],
|
|
68
|
+
unique: true,
|
|
69
|
+
name: "baasix_Role_name_unique",
|
|
70
|
+
SystemGenerated: "true",
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
collectionName: "baasix_Permission",
|
|
77
|
+
schema: {
|
|
78
|
+
name: "Permission",
|
|
79
|
+
timestamps: true,
|
|
80
|
+
fields: {
|
|
81
|
+
id: {
|
|
82
|
+
type: "UUID",
|
|
83
|
+
primaryKey: true,
|
|
84
|
+
defaultValue: { type: "UUIDV4" },
|
|
85
|
+
SystemGenerated: "true",
|
|
86
|
+
},
|
|
87
|
+
action: { type: "String", allowNull: false, SystemGenerated: "true" },
|
|
88
|
+
collection: { type: "String", allowNull: false, SystemGenerated: "true" },
|
|
89
|
+
role_Id: { type: "UUID", allowNull: false, SystemGenerated: "true" },
|
|
90
|
+
fields: { type: "JSON", SystemGenerated: "true" },
|
|
91
|
+
defaultValues: { type: "JSON", SystemGenerated: "true" },
|
|
92
|
+
conditions: { type: "JSON", SystemGenerated: "true" },
|
|
93
|
+
relConditions: { type: "JSON", SystemGenerated: "true" },
|
|
94
|
+
role: {
|
|
95
|
+
relType: "BelongsTo",
|
|
96
|
+
target: "baasix_Role",
|
|
97
|
+
foreignKey: "role_Id",
|
|
98
|
+
as: "role",
|
|
99
|
+
SystemGenerated: "true",
|
|
100
|
+
description: "M2O",
|
|
101
|
+
showAs: ["name"],
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
indexes: [
|
|
105
|
+
{
|
|
106
|
+
fields: ["role_Id", "collection", "action"],
|
|
107
|
+
unique: true,
|
|
108
|
+
name: "baasix_Permission_action_unique",
|
|
109
|
+
SystemGenerated: "true",
|
|
110
|
+
},
|
|
111
|
+
],
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
collectionName: "baasix_UserRole",
|
|
116
|
+
schema: {
|
|
117
|
+
name: "UserRole",
|
|
118
|
+
timestamps: true,
|
|
119
|
+
fields: {
|
|
120
|
+
id: {
|
|
121
|
+
type: "UUID",
|
|
122
|
+
primaryKey: true,
|
|
123
|
+
defaultValue: { type: "UUIDV4" },
|
|
124
|
+
SystemGenerated: "true",
|
|
125
|
+
},
|
|
126
|
+
user_Id: { type: "UUID", allowNull: false, SystemGenerated: "true" },
|
|
127
|
+
role_Id: { type: "UUID", allowNull: false, SystemGenerated: "true" },
|
|
128
|
+
tenant_Id: { type: "UUID", allowNull: true, SystemGenerated: "true" },
|
|
129
|
+
user: {
|
|
130
|
+
relType: "BelongsTo",
|
|
131
|
+
target: "baasix_User",
|
|
132
|
+
foreignKey: "user_Id",
|
|
133
|
+
as: "user",
|
|
134
|
+
SystemGenerated: "true",
|
|
135
|
+
description: "M2O",
|
|
136
|
+
onDelete: "CASCADE",
|
|
137
|
+
showAs: ["fullName", " (", "email", ")", " "],
|
|
138
|
+
},
|
|
139
|
+
role: {
|
|
140
|
+
relType: "BelongsTo",
|
|
141
|
+
target: "baasix_Role",
|
|
142
|
+
foreignKey: "role_Id",
|
|
143
|
+
as: "role",
|
|
144
|
+
SystemGenerated: "true",
|
|
145
|
+
description: "M2O",
|
|
146
|
+
showAs: ["name"],
|
|
147
|
+
},
|
|
148
|
+
tenant: {
|
|
149
|
+
relType: "BelongsTo",
|
|
150
|
+
target: "baasix_Tenant",
|
|
151
|
+
foreignKey: "tenant_Id",
|
|
152
|
+
as: "tenant",
|
|
153
|
+
SystemGenerated: "true",
|
|
154
|
+
description: "M2O",
|
|
155
|
+
showAs: ["name"],
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
collectionName: "baasix_Tenant",
|
|
162
|
+
schema: {
|
|
163
|
+
name: "Tenant",
|
|
164
|
+
timestamps: true,
|
|
165
|
+
fields: {
|
|
166
|
+
id: {
|
|
167
|
+
type: "UUID",
|
|
168
|
+
primaryKey: true,
|
|
169
|
+
defaultValue: { type: "UUIDV4" },
|
|
170
|
+
SystemGenerated: "true",
|
|
171
|
+
},
|
|
172
|
+
name: { type: "String", allowNull: false, SystemGenerated: "true" },
|
|
173
|
+
userRoles: {
|
|
174
|
+
relType: "HasMany",
|
|
175
|
+
target: "baasix_UserRole",
|
|
176
|
+
foreignKey: "tenant_Id",
|
|
177
|
+
as: "userRoles",
|
|
178
|
+
SystemGenerated: "true",
|
|
179
|
+
description: "M2O Alias",
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
indexes: [
|
|
183
|
+
{
|
|
184
|
+
fields: ["name"],
|
|
185
|
+
unique: true,
|
|
186
|
+
name: "baasix_Tenant_name_unique",
|
|
187
|
+
SystemGenerated: "true",
|
|
188
|
+
},
|
|
189
|
+
],
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
collectionName: "baasix_User",
|
|
194
|
+
schema: {
|
|
195
|
+
name: "User",
|
|
196
|
+
timestamps: true,
|
|
197
|
+
fields: {
|
|
198
|
+
id: {
|
|
199
|
+
type: "UUID",
|
|
200
|
+
primaryKey: true,
|
|
201
|
+
defaultValue: { type: "UUIDV4" },
|
|
202
|
+
SystemGenerated: "true",
|
|
203
|
+
},
|
|
204
|
+
firstName: { type: "String", allowNull: false, SystemGenerated: "true" },
|
|
205
|
+
lastName: { type: "String", allowNull: true, SystemGenerated: "true" },
|
|
206
|
+
fullName: {
|
|
207
|
+
type: "VIRTUAL",
|
|
208
|
+
calculated: "COALESCE(\"firstName\", '') || ' ' || COALESCE(\"lastName\", '')",
|
|
209
|
+
SystemGenerated: "true",
|
|
210
|
+
},
|
|
211
|
+
phone: { type: "String", allowNull: true, SystemGenerated: "true" },
|
|
212
|
+
email: { type: "String", allowNull: true, SystemGenerated: "true" },
|
|
213
|
+
emailVerified: { type: "Boolean", allowNull: false, defaultValue: false, SystemGenerated: "true" },
|
|
214
|
+
avatar_Id: { type: "UUID", SystemGenerated: "true" },
|
|
215
|
+
password: { type: "String", allowNull: true, SystemGenerated: "true", hidden: true },
|
|
216
|
+
lastAccess: { type: "DateTime", allowNull: true, SystemGenerated: "true" },
|
|
217
|
+
userRoles: {
|
|
218
|
+
relType: "HasMany",
|
|
219
|
+
target: "baasix_UserRole",
|
|
220
|
+
foreignKey: "user_Id",
|
|
221
|
+
as: "userRoles",
|
|
222
|
+
SystemGenerated: "true",
|
|
223
|
+
description: "M2O Alias",
|
|
224
|
+
onDelete: "CASCADE",
|
|
225
|
+
},
|
|
226
|
+
avatar: {
|
|
227
|
+
relType: "BelongsTo",
|
|
228
|
+
target: "baasix_File",
|
|
229
|
+
foreignKey: "avatar_Id",
|
|
230
|
+
as: "avatar",
|
|
231
|
+
SystemGenerated: "true",
|
|
232
|
+
description: "M2O",
|
|
233
|
+
showAs: ["title", " - ", "originalFilename"],
|
|
234
|
+
},
|
|
235
|
+
status: {
|
|
236
|
+
type: "ENUM",
|
|
237
|
+
values: ["active", "inactive", "deleted", "suspended", "pending"],
|
|
238
|
+
allowNull: false,
|
|
239
|
+
defaultValue: "active", // Default value can be one of the allowed values
|
|
240
|
+
},
|
|
241
|
+
},
|
|
242
|
+
indexes: [
|
|
243
|
+
{
|
|
244
|
+
fields: ["email"],
|
|
245
|
+
unique: true,
|
|
246
|
+
name: "baasix_User_email_unique",
|
|
247
|
+
SystemGenerated: "true",
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
fields: ["phone"],
|
|
251
|
+
unique: true,
|
|
252
|
+
name: "baasix_User_phone_unique",
|
|
253
|
+
SystemGenerated: "true",
|
|
254
|
+
},
|
|
255
|
+
],
|
|
256
|
+
},
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
collectionName: "baasix_Sessions",
|
|
260
|
+
schema: {
|
|
261
|
+
name: "Session",
|
|
262
|
+
timestamps: true,
|
|
263
|
+
fields: {
|
|
264
|
+
id: {
|
|
265
|
+
type: "UUID",
|
|
266
|
+
primaryKey: true,
|
|
267
|
+
defaultValue: { type: "UUIDV4" },
|
|
268
|
+
SystemGenerated: "true",
|
|
269
|
+
},
|
|
270
|
+
token: {
|
|
271
|
+
type: "String",
|
|
272
|
+
allowNull: false,
|
|
273
|
+
SystemGenerated: "true",
|
|
274
|
+
hidden: true,
|
|
275
|
+
},
|
|
276
|
+
user_Id: {
|
|
277
|
+
type: "UUID",
|
|
278
|
+
allowNull: false,
|
|
279
|
+
SystemGenerated: "true",
|
|
280
|
+
},
|
|
281
|
+
tenant_Id: { type: "UUID", allowNull: true, SystemGenerated: "true" },
|
|
282
|
+
expiresAt: {
|
|
283
|
+
type: "DateTime",
|
|
284
|
+
allowNull: false,
|
|
285
|
+
SystemGenerated: "true",
|
|
286
|
+
},
|
|
287
|
+
ipAddress: {
|
|
288
|
+
type: "String",
|
|
289
|
+
allowNull: true,
|
|
290
|
+
SystemGenerated: "true",
|
|
291
|
+
description: "IP address of the client",
|
|
292
|
+
},
|
|
293
|
+
userAgent: {
|
|
294
|
+
type: "String",
|
|
295
|
+
allowNull: true,
|
|
296
|
+
SystemGenerated: "true",
|
|
297
|
+
description: "User agent string of the client",
|
|
298
|
+
},
|
|
299
|
+
type: {
|
|
300
|
+
type: "String",
|
|
301
|
+
allowNull: true,
|
|
302
|
+
defaultValue: "default",
|
|
303
|
+
SystemGenerated: "true",
|
|
304
|
+
},
|
|
305
|
+
user: {
|
|
306
|
+
relType: "BelongsTo",
|
|
307
|
+
target: "baasix_User",
|
|
308
|
+
foreignKey: "user_Id",
|
|
309
|
+
as: "user",
|
|
310
|
+
SystemGenerated: "true",
|
|
311
|
+
description: "M2O",
|
|
312
|
+
onDelete: "CASCADE",
|
|
313
|
+
showAs: ["fullName", " (", "email", ")"],
|
|
314
|
+
},
|
|
315
|
+
tenant: {
|
|
316
|
+
relType: "BelongsTo",
|
|
317
|
+
target: "baasix_Tenant",
|
|
318
|
+
foreignKey: "tenant_Id",
|
|
319
|
+
as: "tenant",
|
|
320
|
+
SystemGenerated: "true",
|
|
321
|
+
description: "M2O",
|
|
322
|
+
showAs: ["name"],
|
|
323
|
+
},
|
|
324
|
+
},
|
|
325
|
+
indexes: [
|
|
326
|
+
{
|
|
327
|
+
fields: ["token"],
|
|
328
|
+
unique: true,
|
|
329
|
+
name: "baasix_Session_token_unique",
|
|
330
|
+
SystemGenerated: "true",
|
|
331
|
+
},
|
|
332
|
+
],
|
|
333
|
+
},
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
collectionName: "baasix_Account",
|
|
337
|
+
schema: {
|
|
338
|
+
name: "Account",
|
|
339
|
+
timestamps: true,
|
|
340
|
+
fields: {
|
|
341
|
+
id: {
|
|
342
|
+
type: "UUID",
|
|
343
|
+
primaryKey: true,
|
|
344
|
+
defaultValue: { type: "UUIDV4" },
|
|
345
|
+
SystemGenerated: "true",
|
|
346
|
+
},
|
|
347
|
+
user_Id: {
|
|
348
|
+
type: "UUID",
|
|
349
|
+
allowNull: false,
|
|
350
|
+
SystemGenerated: "true",
|
|
351
|
+
},
|
|
352
|
+
accountId: {
|
|
353
|
+
type: "String",
|
|
354
|
+
allowNull: false,
|
|
355
|
+
SystemGenerated: "true",
|
|
356
|
+
description: "Account ID from OAuth provider or same as user_Id for credential accounts",
|
|
357
|
+
},
|
|
358
|
+
providerId: {
|
|
359
|
+
type: "String",
|
|
360
|
+
allowNull: false,
|
|
361
|
+
SystemGenerated: "true",
|
|
362
|
+
description: "Provider ID (e.g., 'credential', 'google', 'github')",
|
|
363
|
+
},
|
|
364
|
+
accessToken: {
|
|
365
|
+
type: "Text",
|
|
366
|
+
allowNull: true,
|
|
367
|
+
SystemGenerated: "true",
|
|
368
|
+
description: "OAuth access token",
|
|
369
|
+
hidden: true,
|
|
370
|
+
},
|
|
371
|
+
refreshToken: {
|
|
372
|
+
type: "Text",
|
|
373
|
+
allowNull: true,
|
|
374
|
+
SystemGenerated: "true",
|
|
375
|
+
description: "OAuth refresh token",
|
|
376
|
+
hidden: true,
|
|
377
|
+
},
|
|
378
|
+
accessTokenExpiresAt: {
|
|
379
|
+
type: "DateTime",
|
|
380
|
+
allowNull: true,
|
|
381
|
+
SystemGenerated: "true",
|
|
382
|
+
},
|
|
383
|
+
refreshTokenExpiresAt: {
|
|
384
|
+
type: "DateTime",
|
|
385
|
+
allowNull: true,
|
|
386
|
+
SystemGenerated: "true",
|
|
387
|
+
},
|
|
388
|
+
scope: {
|
|
389
|
+
type: "String",
|
|
390
|
+
allowNull: true,
|
|
391
|
+
SystemGenerated: "true",
|
|
392
|
+
description: "OAuth scope",
|
|
393
|
+
},
|
|
394
|
+
idToken: {
|
|
395
|
+
type: "Text",
|
|
396
|
+
allowNull: true,
|
|
397
|
+
SystemGenerated: "true",
|
|
398
|
+
description: "OAuth ID token",
|
|
399
|
+
hidden: true,
|
|
400
|
+
},
|
|
401
|
+
password: {
|
|
402
|
+
type: "String",
|
|
403
|
+
allowNull: true,
|
|
404
|
+
SystemGenerated: "true",
|
|
405
|
+
description: "Hashed password for credential accounts",
|
|
406
|
+
hidden: true,
|
|
407
|
+
},
|
|
408
|
+
user: {
|
|
409
|
+
relType: "BelongsTo",
|
|
410
|
+
target: "baasix_User",
|
|
411
|
+
foreignKey: "user_Id",
|
|
412
|
+
as: "user",
|
|
413
|
+
SystemGenerated: "true",
|
|
414
|
+
description: "M2O",
|
|
415
|
+
onDelete: "CASCADE",
|
|
416
|
+
showAs: ["fullName", " (", "email", ")"],
|
|
417
|
+
},
|
|
418
|
+
},
|
|
419
|
+
indexes: [
|
|
420
|
+
{
|
|
421
|
+
fields: ["user_Id", "providerId"],
|
|
422
|
+
name: "baasix_Account_user_provider",
|
|
423
|
+
SystemGenerated: "true",
|
|
424
|
+
},
|
|
425
|
+
],
|
|
426
|
+
},
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
collectionName: "baasix_Verification",
|
|
430
|
+
schema: {
|
|
431
|
+
name: "Verification",
|
|
432
|
+
timestamps: true,
|
|
433
|
+
fields: {
|
|
434
|
+
id: {
|
|
435
|
+
type: "UUID",
|
|
436
|
+
primaryKey: true,
|
|
437
|
+
defaultValue: { type: "UUIDV4" },
|
|
438
|
+
SystemGenerated: "true",
|
|
439
|
+
},
|
|
440
|
+
identifier: {
|
|
441
|
+
type: "String",
|
|
442
|
+
allowNull: false,
|
|
443
|
+
SystemGenerated: "true",
|
|
444
|
+
description: "Email or other identifier for verification",
|
|
445
|
+
},
|
|
446
|
+
value: {
|
|
447
|
+
type: "String",
|
|
448
|
+
allowNull: false,
|
|
449
|
+
SystemGenerated: "true",
|
|
450
|
+
description: "Verification token or code",
|
|
451
|
+
hidden: true,
|
|
452
|
+
},
|
|
453
|
+
expiresAt: {
|
|
454
|
+
type: "DateTime",
|
|
455
|
+
allowNull: false,
|
|
456
|
+
SystemGenerated: "true",
|
|
457
|
+
},
|
|
458
|
+
},
|
|
459
|
+
indexes: [
|
|
460
|
+
{
|
|
461
|
+
fields: ["identifier"],
|
|
462
|
+
name: "baasix_Verification_identifier",
|
|
463
|
+
SystemGenerated: "true",
|
|
464
|
+
},
|
|
465
|
+
],
|
|
466
|
+
},
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
collectionName: "baasix_File",
|
|
470
|
+
schema: {
|
|
471
|
+
name: "File",
|
|
472
|
+
timestamps: true,
|
|
473
|
+
fields: {
|
|
474
|
+
id: {
|
|
475
|
+
type: "UUID",
|
|
476
|
+
primaryKey: true,
|
|
477
|
+
defaultValue: { type: "UUIDV4" },
|
|
478
|
+
SystemGenerated: "true",
|
|
479
|
+
},
|
|
480
|
+
title: { type: "String", SystemGenerated: "true" },
|
|
481
|
+
filename: { type: "String", allowNull: false, SystemGenerated: "true" },
|
|
482
|
+
originalFilename: { type: "String", allowNull: false, SystemGenerated: "true" },
|
|
483
|
+
type: { type: "String", allowNull: false, SystemGenerated: "true" },
|
|
484
|
+
folder: { type: "String", allowNull: true, SystemGenerated: "true" },
|
|
485
|
+
size: { type: "Integer", allowNull: false, SystemGenerated: "true" },
|
|
486
|
+
description: { type: "Text", SystemGenerated: "true" },
|
|
487
|
+
storage: { type: "String", allowNull: false, SystemGenerated: "true" },
|
|
488
|
+
width: { type: "Integer", SystemGenerated: "true" },
|
|
489
|
+
height: { type: "Integer", SystemGenerated: "true" },
|
|
490
|
+
metadata: { type: "JSON", SystemGenerated: "true" },
|
|
491
|
+
userCreated_Id: { type: "UUID", SystemGenerated: "true" },
|
|
492
|
+
userCreated: {
|
|
493
|
+
relType: "BelongsTo",
|
|
494
|
+
target: "baasix_User",
|
|
495
|
+
foreignKey: "userCreated_Id",
|
|
496
|
+
as: "userCreated",
|
|
497
|
+
SystemGenerated: "true",
|
|
498
|
+
description: "M2O",
|
|
499
|
+
showAs: ["fullName"],
|
|
500
|
+
},
|
|
501
|
+
userUpdated_Id: { type: "UUID", SystemGenerated: "true" },
|
|
502
|
+
userUpdated: {
|
|
503
|
+
relType: "BelongsTo",
|
|
504
|
+
target: "baasix_User",
|
|
505
|
+
foreignKey: "userUpdated_Id",
|
|
506
|
+
as: "userUpdated",
|
|
507
|
+
SystemGenerated: "true",
|
|
508
|
+
description: "M2O",
|
|
509
|
+
showAs: ["fullName"],
|
|
510
|
+
},
|
|
511
|
+
tenant_Id: { type: "UUID", allowNull: true, SystemGenerated: "true" },
|
|
512
|
+
tenant: {
|
|
513
|
+
relType: "BelongsTo",
|
|
514
|
+
target: "baasix_Tenant",
|
|
515
|
+
foreignKey: "tenant_Id",
|
|
516
|
+
as: "tenant",
|
|
517
|
+
SystemGenerated: "true",
|
|
518
|
+
description: "M2O",
|
|
519
|
+
showAs: ["name"],
|
|
520
|
+
},
|
|
521
|
+
isPublic: {
|
|
522
|
+
type: "Boolean",
|
|
523
|
+
defaultValue: false,
|
|
524
|
+
allowNull: false,
|
|
525
|
+
description: "If true, asset is publicly accessible regardless of tenant",
|
|
526
|
+
},
|
|
527
|
+
},
|
|
528
|
+
},
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
collectionName: "baasix_Tasks",
|
|
532
|
+
schema: {
|
|
533
|
+
name: "Tasks",
|
|
534
|
+
fields: {
|
|
535
|
+
id: {
|
|
536
|
+
type: "Integer",
|
|
537
|
+
primaryKey: true,
|
|
538
|
+
defaultValue: { type: "AUTOINCREMENT" },
|
|
539
|
+
SystemGenerated: "true",
|
|
540
|
+
},
|
|
541
|
+
userCreated_Id: { type: "UUID", SystemGenerated: "true" },
|
|
542
|
+
userCreated: {
|
|
543
|
+
relType: "BelongsTo",
|
|
544
|
+
target: "baasix_User",
|
|
545
|
+
foreignKey: "userCreated_Id",
|
|
546
|
+
as: "userCreated",
|
|
547
|
+
SystemGenerated: "true",
|
|
548
|
+
description: "M2O",
|
|
549
|
+
showAs: ["fullName"],
|
|
550
|
+
},
|
|
551
|
+
userUpdated_Id: { type: "UUID", SystemGenerated: "true" },
|
|
552
|
+
userUpdated: {
|
|
553
|
+
relType: "BelongsTo",
|
|
554
|
+
target: "baasix_User",
|
|
555
|
+
foreignKey: "userUpdated_Id",
|
|
556
|
+
as: "userUpdated",
|
|
557
|
+
SystemGenerated: "true",
|
|
558
|
+
description: "M2O",
|
|
559
|
+
showAs: ["fullName"],
|
|
560
|
+
},
|
|
561
|
+
status: {
|
|
562
|
+
type: "ENUM",
|
|
563
|
+
allowNull: true,
|
|
564
|
+
defaultValue: "draft",
|
|
565
|
+
values: ["published", "draft", "archived"],
|
|
566
|
+
SystemGenerated: "true",
|
|
567
|
+
},
|
|
568
|
+
task_status: {
|
|
569
|
+
type: "ENUM",
|
|
570
|
+
allowNull: false,
|
|
571
|
+
defaultValue: "Not started",
|
|
572
|
+
values: ["Not started", "Running", "Completed", "Error"],
|
|
573
|
+
},
|
|
574
|
+
type: { type: "String", allowNull: false },
|
|
575
|
+
attachment: {
|
|
576
|
+
relType: "BelongsTo",
|
|
577
|
+
target: "baasix_File",
|
|
578
|
+
foreignKey: "attachment_id",
|
|
579
|
+
as: "attachment",
|
|
580
|
+
description: "M2O",
|
|
581
|
+
onDelete: "SET NULL",
|
|
582
|
+
onUpdate: "SET NULL",
|
|
583
|
+
showAs: ["originalFilename"],
|
|
584
|
+
},
|
|
585
|
+
scheduled_time: {
|
|
586
|
+
type: "DateTime",
|
|
587
|
+
allowNull: false,
|
|
588
|
+
SystemGenerated: "true",
|
|
589
|
+
defaultValue: { type: "NOW" },
|
|
590
|
+
},
|
|
591
|
+
attachment_id: { type: "UUID", allowNull: true, SystemGenerated: true },
|
|
592
|
+
task_data: { type: "JSON", allowNull: true },
|
|
593
|
+
result_data: { type: "JSON" },
|
|
594
|
+
error_data: { type: "JSON", allowNull: true },
|
|
595
|
+
tenant_Id: {
|
|
596
|
+
type: "UUID",
|
|
597
|
+
allowNull: true,
|
|
598
|
+
SystemGenerated: "true",
|
|
599
|
+
description: "Tenant identifier for multi-tenant isolation",
|
|
600
|
+
},
|
|
601
|
+
tenant: {
|
|
602
|
+
relType: "BelongsTo",
|
|
603
|
+
target: "baasix_Tenant",
|
|
604
|
+
foreignKey: "tenant_Id",
|
|
605
|
+
as: "tenant",
|
|
606
|
+
SystemGenerated: "true",
|
|
607
|
+
description: "M2O relationship to tenant",
|
|
608
|
+
showAs: ["name"],
|
|
609
|
+
},
|
|
610
|
+
},
|
|
611
|
+
timestamps: true,
|
|
612
|
+
paranoid: false,
|
|
613
|
+
usertrack: true,
|
|
614
|
+
indexes: [],
|
|
615
|
+
},
|
|
616
|
+
},
|
|
617
|
+
{
|
|
618
|
+
collectionName: "baasix_EmailLog",
|
|
619
|
+
schema: {
|
|
620
|
+
name: "EmailLog",
|
|
621
|
+
timestamps: true,
|
|
622
|
+
fields: {
|
|
623
|
+
id: {
|
|
624
|
+
type: "UUID",
|
|
625
|
+
primaryKey: true,
|
|
626
|
+
defaultValue: { type: "UUIDV4" },
|
|
627
|
+
SystemGenerated: "true",
|
|
628
|
+
},
|
|
629
|
+
email: { type: "String", allowNull: false, SystemGenerated: "true" },
|
|
630
|
+
subject: { type: "String", allowNull: false, SystemGenerated: "true" },
|
|
631
|
+
templateName: { type: "String", SystemGenerated: "true" },
|
|
632
|
+
sender: { type: "String", SystemGenerated: "true" },
|
|
633
|
+
status: { type: "String", SystemGenerated: "true" },
|
|
634
|
+
messageId: { type: "String", SystemGenerated: "true" },
|
|
635
|
+
errorMessage: { type: "Text", SystemGenerated: "true" },
|
|
636
|
+
},
|
|
637
|
+
},
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
collectionName: "baasix_AuditLog",
|
|
641
|
+
schema: {
|
|
642
|
+
name: "AuditLog",
|
|
643
|
+
timestamps: true,
|
|
644
|
+
fields: {
|
|
645
|
+
id: {
|
|
646
|
+
type: "UUID",
|
|
647
|
+
primaryKey: true,
|
|
648
|
+
defaultValue: { type: "UUIDV4" },
|
|
649
|
+
SystemGenerated: "true",
|
|
650
|
+
},
|
|
651
|
+
type: { type: "String", allowNull: false, SystemGenerated: "true", defaultValue: "data" },
|
|
652
|
+
entity: { type: "String", allowNull: false, SystemGenerated: "true" },
|
|
653
|
+
entityId: { type: "String", allowNull: true, SystemGenerated: "true" },
|
|
654
|
+
action: { type: "String", allowNull: false, SystemGenerated: "true" },
|
|
655
|
+
changes: { type: "JSON", SystemGenerated: "true" },
|
|
656
|
+
ipaddress: { type: "String", SystemGenerated: "true" },
|
|
657
|
+
userId: { type: "UUID", SystemGenerated: "true" },
|
|
658
|
+
tenant_Id: { type: "UUID", allowNull: true, SystemGenerated: "true" },
|
|
659
|
+
user: {
|
|
660
|
+
relType: "BelongsTo",
|
|
661
|
+
target: "baasix_User",
|
|
662
|
+
foreignKey: "userId",
|
|
663
|
+
as: "user",
|
|
664
|
+
SystemGenerated: "true",
|
|
665
|
+
description: "M2O",
|
|
666
|
+
showAs: ["fullName", " (", "email", ")"],
|
|
667
|
+
},
|
|
668
|
+
tenant: {
|
|
669
|
+
relType: "BelongsTo",
|
|
670
|
+
target: "baasix_Tenant",
|
|
671
|
+
foreignKey: "tenant_Id",
|
|
672
|
+
as: "tenant",
|
|
673
|
+
SystemGenerated: "true",
|
|
674
|
+
description: "M2O",
|
|
675
|
+
showAs: ["name"],
|
|
676
|
+
},
|
|
677
|
+
},
|
|
678
|
+
},
|
|
679
|
+
},
|
|
680
|
+
{
|
|
681
|
+
collectionName: "baasix_Notification",
|
|
682
|
+
schema: {
|
|
683
|
+
name: "Notification",
|
|
684
|
+
timestamps: true,
|
|
685
|
+
realtime: {
|
|
686
|
+
enabled: true,
|
|
687
|
+
actions: ["insert", "update", "delete"]
|
|
688
|
+
},
|
|
689
|
+
fields: {
|
|
690
|
+
id: {
|
|
691
|
+
type: "UUID",
|
|
692
|
+
primaryKey: true,
|
|
693
|
+
defaultValue: { type: "UUIDV4" },
|
|
694
|
+
SystemGenerated: "true",
|
|
695
|
+
},
|
|
696
|
+
type: { type: "String", allowNull: false, SystemGenerated: "true" },
|
|
697
|
+
title: { type: "String", allowNull: false, SystemGenerated: "true" },
|
|
698
|
+
message: { type: "Text", allowNull: true, SystemGenerated: "true" },
|
|
699
|
+
seen: { type: "Boolean", allowNull: true, defaultValue: false, SystemGenerated: "true" },
|
|
700
|
+
data: { type: "JSONB", SystemGenerated: "true" },
|
|
701
|
+
userId: { type: "UUID", allowNull: false, SystemGenerated: "true" },
|
|
702
|
+
user: {
|
|
703
|
+
relType: "BelongsTo",
|
|
704
|
+
target: "baasix_User",
|
|
705
|
+
foreignKey: "userId",
|
|
706
|
+
as: "user",
|
|
707
|
+
SystemGenerated: "true",
|
|
708
|
+
description: "M2O",
|
|
709
|
+
showAs: ["fullName", " (", "email", ")"],
|
|
710
|
+
},
|
|
711
|
+
tenant_Id: { type: "UUID", allowNull: true, SystemGenerated: "true" },
|
|
712
|
+
tenant: {
|
|
713
|
+
relType: "BelongsTo",
|
|
714
|
+
target: "baasix_Tenant",
|
|
715
|
+
foreignKey: "tenant_Id",
|
|
716
|
+
as: "tenant",
|
|
717
|
+
SystemGenerated: "true",
|
|
718
|
+
description: "M2O",
|
|
719
|
+
showAs: ["name"],
|
|
720
|
+
},
|
|
721
|
+
},
|
|
722
|
+
},
|
|
723
|
+
},
|
|
724
|
+
{
|
|
725
|
+
collectionName: "baasix_Settings",
|
|
726
|
+
schema: {
|
|
727
|
+
name: "Settings",
|
|
728
|
+
timestamps: true,
|
|
729
|
+
fields: {
|
|
730
|
+
id: {
|
|
731
|
+
type: "Integer",
|
|
732
|
+
primaryKey: true,
|
|
733
|
+
defaultValue: { type: "AUTOINCREMENT" },
|
|
734
|
+
SystemGenerated: "true",
|
|
735
|
+
},
|
|
736
|
+
tenant_Id: {
|
|
737
|
+
type: "UUID",
|
|
738
|
+
allowNull: true,
|
|
739
|
+
SystemGenerated: "true",
|
|
740
|
+
description: "Tenant ID for tenant-specific settings. NULL for global settings.",
|
|
741
|
+
},
|
|
742
|
+
// Core branding fields
|
|
743
|
+
project_name: {
|
|
744
|
+
type: "String",
|
|
745
|
+
allowNull: false,
|
|
746
|
+
defaultValue: "Baasix Project",
|
|
747
|
+
SystemGenerated: "true",
|
|
748
|
+
},
|
|
749
|
+
title: {
|
|
750
|
+
type: "String",
|
|
751
|
+
allowNull: true,
|
|
752
|
+
defaultValue: "Baasix Project",
|
|
753
|
+
SystemGenerated: "true",
|
|
754
|
+
description: "Application title for display purposes",
|
|
755
|
+
},
|
|
756
|
+
project_url: {
|
|
757
|
+
type: "String",
|
|
758
|
+
allowNull: true,
|
|
759
|
+
SystemGenerated: "true",
|
|
760
|
+
},
|
|
761
|
+
app_url: {
|
|
762
|
+
type: "String",
|
|
763
|
+
allowNull: true,
|
|
764
|
+
SystemGenerated: "true",
|
|
765
|
+
description: "Application URL for frontend access",
|
|
766
|
+
},
|
|
767
|
+
project_color: {
|
|
768
|
+
type: "String",
|
|
769
|
+
allowNull: true,
|
|
770
|
+
SystemGenerated: "true",
|
|
771
|
+
},
|
|
772
|
+
secondary_color: {
|
|
773
|
+
type: "String",
|
|
774
|
+
allowNull: true,
|
|
775
|
+
defaultValue: "#f0f0f0",
|
|
776
|
+
SystemGenerated: "true",
|
|
777
|
+
description: "Secondary brand color",
|
|
778
|
+
},
|
|
779
|
+
description: {
|
|
780
|
+
type: "Text",
|
|
781
|
+
allowNull: true,
|
|
782
|
+
defaultValue: "Powered by Baasix",
|
|
783
|
+
SystemGenerated: "true",
|
|
784
|
+
description: "Application description for SEO and branding",
|
|
785
|
+
},
|
|
786
|
+
keywords: {
|
|
787
|
+
type: "String",
|
|
788
|
+
allowNull: true,
|
|
789
|
+
defaultValue: "cms, headless, api",
|
|
790
|
+
SystemGenerated: "true",
|
|
791
|
+
description: "SEO keywords",
|
|
792
|
+
},
|
|
793
|
+
// Logo and icon fields
|
|
794
|
+
project_logo_light_Id: {
|
|
795
|
+
type: "UUID",
|
|
796
|
+
allowNull: true,
|
|
797
|
+
SystemGenerated: "true",
|
|
798
|
+
},
|
|
799
|
+
project_logo_dark_Id: {
|
|
800
|
+
type: "UUID",
|
|
801
|
+
allowNull: true,
|
|
802
|
+
SystemGenerated: "true",
|
|
803
|
+
},
|
|
804
|
+
project_logo_full_Id: {
|
|
805
|
+
type: "UUID",
|
|
806
|
+
allowNull: true,
|
|
807
|
+
SystemGenerated: "true",
|
|
808
|
+
},
|
|
809
|
+
project_logo_transparent_Id: {
|
|
810
|
+
type: "UUID",
|
|
811
|
+
allowNull: true,
|
|
812
|
+
SystemGenerated: "true",
|
|
813
|
+
},
|
|
814
|
+
project_favicon_Id: {
|
|
815
|
+
type: "UUID",
|
|
816
|
+
allowNull: true,
|
|
817
|
+
SystemGenerated: "true",
|
|
818
|
+
},
|
|
819
|
+
project_icon_Id: {
|
|
820
|
+
type: "UUID",
|
|
821
|
+
allowNull: true,
|
|
822
|
+
SystemGenerated: "true",
|
|
823
|
+
},
|
|
824
|
+
email_icon_Id: {
|
|
825
|
+
type: "UUID",
|
|
826
|
+
allowNull: true,
|
|
827
|
+
SystemGenerated: "true",
|
|
828
|
+
},
|
|
829
|
+
// Email settings
|
|
830
|
+
email_signature: {
|
|
831
|
+
type: "Text",
|
|
832
|
+
allowNull: true,
|
|
833
|
+
SystemGenerated: "true",
|
|
834
|
+
},
|
|
835
|
+
from_email_name: {
|
|
836
|
+
type: "String",
|
|
837
|
+
allowNull: true,
|
|
838
|
+
defaultValue: "Baasix",
|
|
839
|
+
SystemGenerated: "true",
|
|
840
|
+
description: "From name for emails",
|
|
841
|
+
},
|
|
842
|
+
// SMTP Configuration
|
|
843
|
+
smtp_enabled: {
|
|
844
|
+
type: "Boolean",
|
|
845
|
+
allowNull: false,
|
|
846
|
+
defaultValue: false,
|
|
847
|
+
SystemGenerated: "true",
|
|
848
|
+
description: "Enable custom SMTP configuration",
|
|
849
|
+
},
|
|
850
|
+
smtp_host: {
|
|
851
|
+
type: "String",
|
|
852
|
+
allowNull: true,
|
|
853
|
+
SystemGenerated: "true",
|
|
854
|
+
description: "SMTP server host",
|
|
855
|
+
},
|
|
856
|
+
smtp_port: {
|
|
857
|
+
type: "Integer",
|
|
858
|
+
allowNull: true,
|
|
859
|
+
defaultValue: 587,
|
|
860
|
+
SystemGenerated: "true",
|
|
861
|
+
description: "SMTP server port",
|
|
862
|
+
},
|
|
863
|
+
smtp_secure: {
|
|
864
|
+
type: "Boolean",
|
|
865
|
+
allowNull: false,
|
|
866
|
+
defaultValue: false,
|
|
867
|
+
SystemGenerated: "true",
|
|
868
|
+
description: "Use secure SMTP connection",
|
|
869
|
+
},
|
|
870
|
+
smtp_user: {
|
|
871
|
+
type: "String",
|
|
872
|
+
allowNull: true,
|
|
873
|
+
SystemGenerated: "true",
|
|
874
|
+
description: "SMTP username",
|
|
875
|
+
},
|
|
876
|
+
smtp_pass: {
|
|
877
|
+
type: "String",
|
|
878
|
+
allowNull: true,
|
|
879
|
+
SystemGenerated: "true",
|
|
880
|
+
description: "SMTP password",
|
|
881
|
+
},
|
|
882
|
+
smtp_from_address: {
|
|
883
|
+
type: "String",
|
|
884
|
+
allowNull: true,
|
|
885
|
+
SystemGenerated: "true",
|
|
886
|
+
description: "SMTP from email address",
|
|
887
|
+
},
|
|
888
|
+
// Localization settings
|
|
889
|
+
timezone: {
|
|
890
|
+
type: "String",
|
|
891
|
+
allowNull: true,
|
|
892
|
+
defaultValue: "UTC",
|
|
893
|
+
SystemGenerated: "true",
|
|
894
|
+
description: "Default timezone",
|
|
895
|
+
},
|
|
896
|
+
language: {
|
|
897
|
+
type: "String",
|
|
898
|
+
allowNull: true,
|
|
899
|
+
defaultValue: "en",
|
|
900
|
+
SystemGenerated: "true",
|
|
901
|
+
description: "Default language",
|
|
902
|
+
},
|
|
903
|
+
date_format: {
|
|
904
|
+
type: "String",
|
|
905
|
+
allowNull: true,
|
|
906
|
+
defaultValue: "YYYY-MM-DD",
|
|
907
|
+
SystemGenerated: "true",
|
|
908
|
+
description: "Default date format",
|
|
909
|
+
},
|
|
910
|
+
currency: {
|
|
911
|
+
type: "String",
|
|
912
|
+
allowNull: true,
|
|
913
|
+
defaultValue: "USD",
|
|
914
|
+
SystemGenerated: "true",
|
|
915
|
+
description: "Default currency",
|
|
916
|
+
},
|
|
917
|
+
// Session limit settings
|
|
918
|
+
mobile_session_limit: {
|
|
919
|
+
type: "Integer",
|
|
920
|
+
allowNull: true,
|
|
921
|
+
defaultValue: -1,
|
|
922
|
+
SystemGenerated: "true",
|
|
923
|
+
description: "Maximum number of mobile sessions per user. -1 or null for unlimited, 0 to disable mobile sessions.",
|
|
924
|
+
},
|
|
925
|
+
web_session_limit: {
|
|
926
|
+
type: "Integer",
|
|
927
|
+
allowNull: true,
|
|
928
|
+
defaultValue: -1,
|
|
929
|
+
SystemGenerated: "true",
|
|
930
|
+
description: "Maximum number of web sessions per user. -1 or null for unlimited, 0 to disable web sessions.",
|
|
931
|
+
},
|
|
932
|
+
session_limit_roles: {
|
|
933
|
+
type: "JSON",
|
|
934
|
+
allowNull: true,
|
|
935
|
+
SystemGenerated: "true",
|
|
936
|
+
description: "Array of role IDs to which session limits apply. If null or empty, limits apply to all roles except administrator.",
|
|
937
|
+
},
|
|
938
|
+
// Additional configuration fields
|
|
939
|
+
metadata: {
|
|
940
|
+
type: "JSON",
|
|
941
|
+
allowNull: true,
|
|
942
|
+
SystemGenerated: "true",
|
|
943
|
+
description: "Additional metadata configuration",
|
|
944
|
+
},
|
|
945
|
+
modules: {
|
|
946
|
+
type: "JSON",
|
|
947
|
+
allowNull: true,
|
|
948
|
+
SystemGenerated: "true",
|
|
949
|
+
description: "Module configuration and settings",
|
|
950
|
+
},
|
|
951
|
+
// Relations
|
|
952
|
+
tenant: {
|
|
953
|
+
relType: "BelongsTo",
|
|
954
|
+
target: "baasix_Tenant",
|
|
955
|
+
foreignKey: "tenant_Id",
|
|
956
|
+
as: "tenant",
|
|
957
|
+
SystemGenerated: "true",
|
|
958
|
+
onDelete: "CASCADE",
|
|
959
|
+
description: "M2O",
|
|
960
|
+
showAs: ["name"],
|
|
961
|
+
},
|
|
962
|
+
project_logo_light: {
|
|
963
|
+
relType: "BelongsTo",
|
|
964
|
+
target: "baasix_File",
|
|
965
|
+
foreignKey: "project_logo_light_Id",
|
|
966
|
+
as: "project_logo_light",
|
|
967
|
+
SystemGenerated: "true",
|
|
968
|
+
onDelete: "RESTRICT",
|
|
969
|
+
showAs: ["originalFilename"],
|
|
970
|
+
},
|
|
971
|
+
project_logo_dark: {
|
|
972
|
+
relType: "BelongsTo",
|
|
973
|
+
target: "baasix_File",
|
|
974
|
+
foreignKey: "project_logo_dark_Id",
|
|
975
|
+
as: "project_logo_dark",
|
|
976
|
+
SystemGenerated: "true",
|
|
977
|
+
onDelete: "RESTRICT",
|
|
978
|
+
showAs: ["originalFilename"],
|
|
979
|
+
},
|
|
980
|
+
project_logo_full: {
|
|
981
|
+
relType: "BelongsTo",
|
|
982
|
+
target: "baasix_File",
|
|
983
|
+
foreignKey: "project_logo_full_Id",
|
|
984
|
+
as: "project_logo_full",
|
|
985
|
+
SystemGenerated: "true",
|
|
986
|
+
onDelete: "RESTRICT",
|
|
987
|
+
showAs: ["originalFilename"],
|
|
988
|
+
},
|
|
989
|
+
project_logo_transparent: {
|
|
990
|
+
relType: "BelongsTo",
|
|
991
|
+
target: "baasix_File",
|
|
992
|
+
foreignKey: "project_logo_transparent_Id",
|
|
993
|
+
as: "project_logo_transparent",
|
|
994
|
+
SystemGenerated: "true",
|
|
995
|
+
onDelete: "RESTRICT",
|
|
996
|
+
showAs: ["originalFilename"],
|
|
997
|
+
},
|
|
998
|
+
project_favicon: {
|
|
999
|
+
relType: "BelongsTo",
|
|
1000
|
+
target: "baasix_File",
|
|
1001
|
+
foreignKey: "project_favicon_Id",
|
|
1002
|
+
as: "project_favicon",
|
|
1003
|
+
SystemGenerated: "true",
|
|
1004
|
+
onDelete: "RESTRICT",
|
|
1005
|
+
showAs: ["originalFilename"],
|
|
1006
|
+
},
|
|
1007
|
+
project_icon: {
|
|
1008
|
+
relType: "BelongsTo",
|
|
1009
|
+
target: "baasix_File",
|
|
1010
|
+
foreignKey: "project_icon_Id",
|
|
1011
|
+
as: "project_icon",
|
|
1012
|
+
SystemGenerated: "true",
|
|
1013
|
+
onDelete: "RESTRICT",
|
|
1014
|
+
showAs: ["originalFilename"],
|
|
1015
|
+
},
|
|
1016
|
+
email_icon: {
|
|
1017
|
+
relType: "BelongsTo",
|
|
1018
|
+
target: "baasix_File",
|
|
1019
|
+
foreignKey: "email_icon_Id",
|
|
1020
|
+
as: "email_icon",
|
|
1021
|
+
SystemGenerated: "true",
|
|
1022
|
+
onDelete: "RESTRICT",
|
|
1023
|
+
showAs: ["originalFilename"],
|
|
1024
|
+
},
|
|
1025
|
+
},
|
|
1026
|
+
indexes: [
|
|
1027
|
+
{
|
|
1028
|
+
fields: ["tenant_Id"],
|
|
1029
|
+
unique: false,
|
|
1030
|
+
name: "baasix_Settings_tenant_Id",
|
|
1031
|
+
SystemGenerated: "true",
|
|
1032
|
+
},
|
|
1033
|
+
],
|
|
1034
|
+
},
|
|
1035
|
+
},
|
|
1036
|
+
{
|
|
1037
|
+
collectionName: "baasix_Invite",
|
|
1038
|
+
schema: {
|
|
1039
|
+
name: "Invite",
|
|
1040
|
+
timestamps: true,
|
|
1041
|
+
fields: {
|
|
1042
|
+
id: {
|
|
1043
|
+
type: "UUID",
|
|
1044
|
+
primaryKey: true,
|
|
1045
|
+
defaultValue: { type: "UUIDV4" },
|
|
1046
|
+
SystemGenerated: "true",
|
|
1047
|
+
},
|
|
1048
|
+
email: {
|
|
1049
|
+
type: "String",
|
|
1050
|
+
allowNull: false,
|
|
1051
|
+
SystemGenerated: "true",
|
|
1052
|
+
description: "Email address of the invitee",
|
|
1053
|
+
},
|
|
1054
|
+
role_Id: {
|
|
1055
|
+
type: "UUID",
|
|
1056
|
+
allowNull: false,
|
|
1057
|
+
SystemGenerated: "true",
|
|
1058
|
+
description: "Role to assign when invitation is accepted",
|
|
1059
|
+
},
|
|
1060
|
+
tenant_Id: {
|
|
1061
|
+
type: "UUID",
|
|
1062
|
+
allowNull: true,
|
|
1063
|
+
SystemGenerated: "true",
|
|
1064
|
+
description: "Tenant for which the invitation is valid",
|
|
1065
|
+
},
|
|
1066
|
+
token: {
|
|
1067
|
+
type: "String",
|
|
1068
|
+
allowNull: false,
|
|
1069
|
+
SystemGenerated: "true",
|
|
1070
|
+
description: "Unique token for invitation",
|
|
1071
|
+
},
|
|
1072
|
+
status: {
|
|
1073
|
+
type: "ENUM",
|
|
1074
|
+
values: ["pending", "accepted", "expired", "revoked"],
|
|
1075
|
+
defaultValue: "pending",
|
|
1076
|
+
allowNull: false,
|
|
1077
|
+
SystemGenerated: "true",
|
|
1078
|
+
description: "Current status of the invitation",
|
|
1079
|
+
},
|
|
1080
|
+
expiresAt: {
|
|
1081
|
+
type: "DateTime",
|
|
1082
|
+
allowNull: false,
|
|
1083
|
+
SystemGenerated: "true",
|
|
1084
|
+
description: "When the invitation expires",
|
|
1085
|
+
},
|
|
1086
|
+
invitedBy_Id: {
|
|
1087
|
+
type: "UUID",
|
|
1088
|
+
allowNull: false,
|
|
1089
|
+
SystemGenerated: "true",
|
|
1090
|
+
description: "User who created the invitation",
|
|
1091
|
+
},
|
|
1092
|
+
acceptedBy_Id: {
|
|
1093
|
+
type: "UUID",
|
|
1094
|
+
allowNull: true,
|
|
1095
|
+
SystemGenerated: "true",
|
|
1096
|
+
description: "User who accepted the invitation (if applicable)",
|
|
1097
|
+
},
|
|
1098
|
+
acceptedAt: {
|
|
1099
|
+
type: "DateTime",
|
|
1100
|
+
allowNull: true,
|
|
1101
|
+
SystemGenerated: "true",
|
|
1102
|
+
description: "When the invitation was accepted",
|
|
1103
|
+
},
|
|
1104
|
+
inviter: {
|
|
1105
|
+
relType: "BelongsTo",
|
|
1106
|
+
target: "baasix_User",
|
|
1107
|
+
foreignKey: "invitedBy_Id",
|
|
1108
|
+
as: "inviter",
|
|
1109
|
+
SystemGenerated: "true",
|
|
1110
|
+
description: "M2O",
|
|
1111
|
+
showAs: ["fullName", " (", "email", ")"],
|
|
1112
|
+
},
|
|
1113
|
+
user: {
|
|
1114
|
+
relType: "BelongsTo",
|
|
1115
|
+
target: "baasix_User",
|
|
1116
|
+
foreignKey: "acceptedBy_Id",
|
|
1117
|
+
as: "user",
|
|
1118
|
+
SystemGenerated: "true",
|
|
1119
|
+
description: "M2O",
|
|
1120
|
+
showAs: ["fullName", " (", "email", ")"],
|
|
1121
|
+
},
|
|
1122
|
+
role: {
|
|
1123
|
+
relType: "BelongsTo",
|
|
1124
|
+
target: "baasix_Role",
|
|
1125
|
+
foreignKey: "role_Id",
|
|
1126
|
+
as: "role",
|
|
1127
|
+
SystemGenerated: "true",
|
|
1128
|
+
description: "M2O",
|
|
1129
|
+
showAs: ["name"],
|
|
1130
|
+
},
|
|
1131
|
+
tenant: {
|
|
1132
|
+
relType: "BelongsTo",
|
|
1133
|
+
target: "baasix_Tenant",
|
|
1134
|
+
foreignKey: "tenant_Id",
|
|
1135
|
+
as: "tenant",
|
|
1136
|
+
SystemGenerated: "true",
|
|
1137
|
+
description: "M2O",
|
|
1138
|
+
showAs: ["name"],
|
|
1139
|
+
},
|
|
1140
|
+
},
|
|
1141
|
+
indexes: [
|
|
1142
|
+
{
|
|
1143
|
+
fields: ["token"],
|
|
1144
|
+
unique: true,
|
|
1145
|
+
name: "baasix_Invite_token_unique",
|
|
1146
|
+
SystemGenerated: "true",
|
|
1147
|
+
},
|
|
1148
|
+
{
|
|
1149
|
+
fields: ["email", "tenant_Id", "status"],
|
|
1150
|
+
name: "baasix_Invite_email_tenant_status_idx",
|
|
1151
|
+
SystemGenerated: "true",
|
|
1152
|
+
},
|
|
1153
|
+
],
|
|
1154
|
+
},
|
|
1155
|
+
},
|
|
1156
|
+
{
|
|
1157
|
+
collectionName: "baasix_UserPreference",
|
|
1158
|
+
schema: {
|
|
1159
|
+
name: "User Preferences",
|
|
1160
|
+
fields: {
|
|
1161
|
+
id: {
|
|
1162
|
+
type: "UUID",
|
|
1163
|
+
primaryKey: true,
|
|
1164
|
+
defaultValue: { type: "UUIDV4" },
|
|
1165
|
+
allowNull: false,
|
|
1166
|
+
},
|
|
1167
|
+
userId: {
|
|
1168
|
+
type: "UUID",
|
|
1169
|
+
allowNull: true,
|
|
1170
|
+
description: "ID of the user this preference belongs to",
|
|
1171
|
+
},
|
|
1172
|
+
user: {
|
|
1173
|
+
relType: "BelongsTo",
|
|
1174
|
+
target: "baasix_User",
|
|
1175
|
+
foreignKey: "userId",
|
|
1176
|
+
as: "user",
|
|
1177
|
+
SystemGenerated: "true",
|
|
1178
|
+
description: "M2O",
|
|
1179
|
+
showAs: ["fullName", " (", "email", ")"],
|
|
1180
|
+
},
|
|
1181
|
+
collectionName: {
|
|
1182
|
+
type: "String",
|
|
1183
|
+
allowNull: false,
|
|
1184
|
+
maxLength: 255,
|
|
1185
|
+
description: "The collection these preferences apply to",
|
|
1186
|
+
},
|
|
1187
|
+
preferenceType: {
|
|
1188
|
+
type: "ENUM",
|
|
1189
|
+
allowNull: false,
|
|
1190
|
+
values: ["columns", "filters", "sorting", "pagination"],
|
|
1191
|
+
description: "Type of preference stored",
|
|
1192
|
+
},
|
|
1193
|
+
preferenceData: {
|
|
1194
|
+
type: "JSON",
|
|
1195
|
+
allowNull: false,
|
|
1196
|
+
description: "JSON data containing the preference settings",
|
|
1197
|
+
},
|
|
1198
|
+
isDefault: {
|
|
1199
|
+
type: "Boolean",
|
|
1200
|
+
allowNull: false,
|
|
1201
|
+
defaultValue: true,
|
|
1202
|
+
description: "Whether this is the default preference for this user and collection",
|
|
1203
|
+
},
|
|
1204
|
+
name: {
|
|
1205
|
+
type: "String",
|
|
1206
|
+
allowNull: true,
|
|
1207
|
+
maxLength: 100,
|
|
1208
|
+
description: "Optional name for saved preference (for future use with multiple saved views)",
|
|
1209
|
+
},
|
|
1210
|
+
},
|
|
1211
|
+
timestamps: true,
|
|
1212
|
+
usertrack: true,
|
|
1213
|
+
paranoid: false,
|
|
1214
|
+
},
|
|
1215
|
+
},
|
|
1216
|
+
{
|
|
1217
|
+
collectionName: "baasix_Workflow",
|
|
1218
|
+
schema: {
|
|
1219
|
+
name: "Workflow",
|
|
1220
|
+
timestamps: true,
|
|
1221
|
+
paranoid: true,
|
|
1222
|
+
usertrack: true,
|
|
1223
|
+
fields: {
|
|
1224
|
+
id: {
|
|
1225
|
+
type: "String",
|
|
1226
|
+
primaryKey: true,
|
|
1227
|
+
allowNull: false,
|
|
1228
|
+
SystemGenerated: "true",
|
|
1229
|
+
maxLength: 100,
|
|
1230
|
+
description: "Workflow ID (human-readable slug)",
|
|
1231
|
+
},
|
|
1232
|
+
name: {
|
|
1233
|
+
type: "String",
|
|
1234
|
+
allowNull: false,
|
|
1235
|
+
SystemGenerated: "true",
|
|
1236
|
+
description: "Workflow name",
|
|
1237
|
+
},
|
|
1238
|
+
description: {
|
|
1239
|
+
type: "Text",
|
|
1240
|
+
allowNull: true,
|
|
1241
|
+
SystemGenerated: "true",
|
|
1242
|
+
description: "Workflow description",
|
|
1243
|
+
},
|
|
1244
|
+
status: {
|
|
1245
|
+
type: "ENUM",
|
|
1246
|
+
values: ["active", "inactive", "draft"],
|
|
1247
|
+
defaultValue: "draft",
|
|
1248
|
+
SystemGenerated: "true",
|
|
1249
|
+
description: "Workflow status",
|
|
1250
|
+
},
|
|
1251
|
+
trigger_type: {
|
|
1252
|
+
type: "ENUM",
|
|
1253
|
+
values: ["manual", "webhook", "schedule", "hook"],
|
|
1254
|
+
defaultValue: "manual",
|
|
1255
|
+
SystemGenerated: "true",
|
|
1256
|
+
description: "How the workflow is triggered",
|
|
1257
|
+
},
|
|
1258
|
+
trigger_cron: {
|
|
1259
|
+
type: "String",
|
|
1260
|
+
allowNull: true,
|
|
1261
|
+
SystemGenerated: "true",
|
|
1262
|
+
description: "Cron expression for schedule trigger",
|
|
1263
|
+
},
|
|
1264
|
+
trigger_webhook_path: {
|
|
1265
|
+
type: "String",
|
|
1266
|
+
allowNull: true,
|
|
1267
|
+
SystemGenerated: "true",
|
|
1268
|
+
description: "Webhook path for webhook trigger",
|
|
1269
|
+
},
|
|
1270
|
+
trigger_webhook_method: {
|
|
1271
|
+
type: "ENUM",
|
|
1272
|
+
values: ["GET", "POST", "PUT", "PATCH", "DELETE"],
|
|
1273
|
+
allowNull: true,
|
|
1274
|
+
SystemGenerated: "true",
|
|
1275
|
+
description: "HTTP method for webhook trigger",
|
|
1276
|
+
},
|
|
1277
|
+
trigger_hook_collection: {
|
|
1278
|
+
type: "String",
|
|
1279
|
+
allowNull: true,
|
|
1280
|
+
SystemGenerated: "true",
|
|
1281
|
+
description: "Collection name for hook trigger",
|
|
1282
|
+
},
|
|
1283
|
+
trigger_hook_action: {
|
|
1284
|
+
type: "ENUM",
|
|
1285
|
+
values: [
|
|
1286
|
+
"items.read",
|
|
1287
|
+
"items.read.one",
|
|
1288
|
+
"items.create",
|
|
1289
|
+
"items.update",
|
|
1290
|
+
"items.delete",
|
|
1291
|
+
"items.read.after",
|
|
1292
|
+
"items.read.one.after",
|
|
1293
|
+
"items.create.after",
|
|
1294
|
+
"items.update.after",
|
|
1295
|
+
"items.delete.after",
|
|
1296
|
+
],
|
|
1297
|
+
allowNull: true,
|
|
1298
|
+
SystemGenerated: "true",
|
|
1299
|
+
description: "Hook action for hook trigger",
|
|
1300
|
+
},
|
|
1301
|
+
flow_data: {
|
|
1302
|
+
type: "JSONB",
|
|
1303
|
+
defaultValue: { nodes: [], edges: [] },
|
|
1304
|
+
SystemGenerated: "true",
|
|
1305
|
+
description: "React Flow diagram data",
|
|
1306
|
+
},
|
|
1307
|
+
variables: {
|
|
1308
|
+
type: "JSONB",
|
|
1309
|
+
defaultValue: {},
|
|
1310
|
+
SystemGenerated: "true",
|
|
1311
|
+
description: "Global workflow variables",
|
|
1312
|
+
},
|
|
1313
|
+
options: {
|
|
1314
|
+
type: "JSONB",
|
|
1315
|
+
defaultValue: {},
|
|
1316
|
+
SystemGenerated: "true",
|
|
1317
|
+
description: "Additional workflow options",
|
|
1318
|
+
},
|
|
1319
|
+
allowed_roles: {
|
|
1320
|
+
type: "JSON",
|
|
1321
|
+
allowNull: true,
|
|
1322
|
+
defaultValue: [],
|
|
1323
|
+
SystemGenerated: "true",
|
|
1324
|
+
description: "Array of role IDs allowed to execute this workflow (applies to manual and hook triggers only)",
|
|
1325
|
+
},
|
|
1326
|
+
userCreated_Id: { type: "UUID", SystemGenerated: "true" },
|
|
1327
|
+
userCreated: {
|
|
1328
|
+
relType: "BelongsTo",
|
|
1329
|
+
target: "baasix_User",
|
|
1330
|
+
foreignKey: "userCreated_Id",
|
|
1331
|
+
as: "userCreated",
|
|
1332
|
+
SystemGenerated: "true",
|
|
1333
|
+
description: "M2O",
|
|
1334
|
+
showAs: ["fullName"],
|
|
1335
|
+
},
|
|
1336
|
+
userUpdated_Id: { type: "UUID", SystemGenerated: "true" },
|
|
1337
|
+
userUpdated: {
|
|
1338
|
+
relType: "BelongsTo",
|
|
1339
|
+
target: "baasix_User",
|
|
1340
|
+
foreignKey: "userUpdated_Id",
|
|
1341
|
+
as: "userUpdated",
|
|
1342
|
+
SystemGenerated: "true",
|
|
1343
|
+
description: "M2O",
|
|
1344
|
+
showAs: ["fullName"],
|
|
1345
|
+
},
|
|
1346
|
+
executions: {
|
|
1347
|
+
relType: "HasMany",
|
|
1348
|
+
target: "baasix_WorkflowExecution",
|
|
1349
|
+
foreignKey: "workflow_Id",
|
|
1350
|
+
as: "executions",
|
|
1351
|
+
SystemGenerated: "true",
|
|
1352
|
+
description: "M2O Alias",
|
|
1353
|
+
},
|
|
1354
|
+
},
|
|
1355
|
+
indexes: [
|
|
1356
|
+
{
|
|
1357
|
+
fields: ["trigger_webhook_path", "trigger_webhook_method"],
|
|
1358
|
+
name: "baasix_Workflow_webhook_idx",
|
|
1359
|
+
SystemGenerated: "true",
|
|
1360
|
+
},
|
|
1361
|
+
{
|
|
1362
|
+
fields: ["trigger_hook_collection", "trigger_hook_action"],
|
|
1363
|
+
name: "baasix_Workflow_hook_idx",
|
|
1364
|
+
SystemGenerated: "true",
|
|
1365
|
+
},
|
|
1366
|
+
],
|
|
1367
|
+
},
|
|
1368
|
+
},
|
|
1369
|
+
{
|
|
1370
|
+
collectionName: "baasix_WorkflowExecution",
|
|
1371
|
+
schema: {
|
|
1372
|
+
name: "WorkflowExecution",
|
|
1373
|
+
timestamps: true,
|
|
1374
|
+
fields: {
|
|
1375
|
+
id: {
|
|
1376
|
+
type: "UUID",
|
|
1377
|
+
primaryKey: true,
|
|
1378
|
+
defaultValue: { type: "UUIDV4" },
|
|
1379
|
+
SystemGenerated: "true",
|
|
1380
|
+
},
|
|
1381
|
+
workflow_Id: {
|
|
1382
|
+
type: "String",
|
|
1383
|
+
allowNull: false,
|
|
1384
|
+
SystemGenerated: "true",
|
|
1385
|
+
maxLength: 100,
|
|
1386
|
+
},
|
|
1387
|
+
workflow: {
|
|
1388
|
+
relType: "BelongsTo",
|
|
1389
|
+
target: "baasix_Workflow",
|
|
1390
|
+
foreignKey: "workflow_Id",
|
|
1391
|
+
as: "workflow",
|
|
1392
|
+
SystemGenerated: "true",
|
|
1393
|
+
description: "M2O",
|
|
1394
|
+
onDelete: "CASCADE",
|
|
1395
|
+
showAs: ["name"],
|
|
1396
|
+
},
|
|
1397
|
+
status: {
|
|
1398
|
+
type: "ENUM",
|
|
1399
|
+
values: ["queued", "running", "completed", "failed", "cancelled"],
|
|
1400
|
+
defaultValue: "queued",
|
|
1401
|
+
SystemGenerated: "true",
|
|
1402
|
+
},
|
|
1403
|
+
trigger_data: {
|
|
1404
|
+
type: "JSONB",
|
|
1405
|
+
defaultValue: {},
|
|
1406
|
+
SystemGenerated: "true",
|
|
1407
|
+
description: "Data that triggered the workflow",
|
|
1408
|
+
},
|
|
1409
|
+
context_data: {
|
|
1410
|
+
type: "JSONB",
|
|
1411
|
+
defaultValue: {},
|
|
1412
|
+
SystemGenerated: "true",
|
|
1413
|
+
description: "Execution context and variables",
|
|
1414
|
+
},
|
|
1415
|
+
result_data: {
|
|
1416
|
+
type: "JSONB",
|
|
1417
|
+
defaultValue: {},
|
|
1418
|
+
SystemGenerated: "true",
|
|
1419
|
+
description: "Final result of workflow execution",
|
|
1420
|
+
},
|
|
1421
|
+
errorMessage: {
|
|
1422
|
+
type: "Text",
|
|
1423
|
+
allowNull: true,
|
|
1424
|
+
SystemGenerated: "true",
|
|
1425
|
+
},
|
|
1426
|
+
startedAt: {
|
|
1427
|
+
type: "DateTime",
|
|
1428
|
+
allowNull: true,
|
|
1429
|
+
SystemGenerated: "true",
|
|
1430
|
+
},
|
|
1431
|
+
completedAt: {
|
|
1432
|
+
type: "DateTime",
|
|
1433
|
+
allowNull: true,
|
|
1434
|
+
SystemGenerated: "true",
|
|
1435
|
+
},
|
|
1436
|
+
durationMs: {
|
|
1437
|
+
type: "Integer",
|
|
1438
|
+
allowNull: true,
|
|
1439
|
+
SystemGenerated: "true",
|
|
1440
|
+
description: "Execution duration in milliseconds",
|
|
1441
|
+
},
|
|
1442
|
+
tenant_Id: {
|
|
1443
|
+
type: "UUID",
|
|
1444
|
+
allowNull: true,
|
|
1445
|
+
SystemGenerated: "true",
|
|
1446
|
+
},
|
|
1447
|
+
tenant: {
|
|
1448
|
+
relType: "BelongsTo",
|
|
1449
|
+
target: "baasix_Tenant",
|
|
1450
|
+
foreignKey: "tenant_Id",
|
|
1451
|
+
as: "tenant",
|
|
1452
|
+
SystemGenerated: "true",
|
|
1453
|
+
description: "M2O",
|
|
1454
|
+
showAs: ["name"],
|
|
1455
|
+
},
|
|
1456
|
+
triggered_by_Id: {
|
|
1457
|
+
type: "UUID",
|
|
1458
|
+
allowNull: true,
|
|
1459
|
+
SystemGenerated: "true",
|
|
1460
|
+
},
|
|
1461
|
+
triggered_by: {
|
|
1462
|
+
relType: "BelongsTo",
|
|
1463
|
+
target: "baasix_User",
|
|
1464
|
+
foreignKey: "triggered_by_Id",
|
|
1465
|
+
as: "triggered_by",
|
|
1466
|
+
SystemGenerated: "true",
|
|
1467
|
+
description: "M2O",
|
|
1468
|
+
showAs: ["fullName", " (", "email", ")"],
|
|
1469
|
+
},
|
|
1470
|
+
logs: {
|
|
1471
|
+
relType: "HasMany",
|
|
1472
|
+
target: "baasix_WorkflowExecutionLog",
|
|
1473
|
+
foreignKey: "execution_Id",
|
|
1474
|
+
as: "logs",
|
|
1475
|
+
SystemGenerated: "true",
|
|
1476
|
+
description: "M2O Alias",
|
|
1477
|
+
},
|
|
1478
|
+
},
|
|
1479
|
+
indexes: [
|
|
1480
|
+
{
|
|
1481
|
+
fields: ["workflow_Id", "status"],
|
|
1482
|
+
name: "baasix_WorkflowExecution_workflow_status_idx",
|
|
1483
|
+
SystemGenerated: "true",
|
|
1484
|
+
},
|
|
1485
|
+
{
|
|
1486
|
+
fields: ["tenant_Id", "createdAt"],
|
|
1487
|
+
name: "baasix_WorkflowExecution_tenant_created_idx",
|
|
1488
|
+
SystemGenerated: "true",
|
|
1489
|
+
},
|
|
1490
|
+
],
|
|
1491
|
+
},
|
|
1492
|
+
},
|
|
1493
|
+
{
|
|
1494
|
+
collectionName: "baasix_WorkflowExecutionLog",
|
|
1495
|
+
schema: {
|
|
1496
|
+
name: "WorkflowExecutionLog",
|
|
1497
|
+
timestamps: true,
|
|
1498
|
+
fields: {
|
|
1499
|
+
id: {
|
|
1500
|
+
type: "UUID",
|
|
1501
|
+
primaryKey: true,
|
|
1502
|
+
defaultValue: { type: "UUIDV4" },
|
|
1503
|
+
SystemGenerated: "true",
|
|
1504
|
+
},
|
|
1505
|
+
execution_Id: {
|
|
1506
|
+
type: "UUID",
|
|
1507
|
+
allowNull: false,
|
|
1508
|
+
SystemGenerated: "true",
|
|
1509
|
+
},
|
|
1510
|
+
execution: {
|
|
1511
|
+
relType: "BelongsTo",
|
|
1512
|
+
target: "baasix_WorkflowExecution",
|
|
1513
|
+
foreignKey: "execution_Id",
|
|
1514
|
+
as: "execution",
|
|
1515
|
+
SystemGenerated: "true",
|
|
1516
|
+
description: "M2O",
|
|
1517
|
+
onDelete: "CASCADE",
|
|
1518
|
+
},
|
|
1519
|
+
nodeId: {
|
|
1520
|
+
type: "String",
|
|
1521
|
+
allowNull: false,
|
|
1522
|
+
SystemGenerated: "true",
|
|
1523
|
+
description: "React Flow node ID",
|
|
1524
|
+
},
|
|
1525
|
+
nodeType: {
|
|
1526
|
+
type: "String",
|
|
1527
|
+
allowNull: false,
|
|
1528
|
+
SystemGenerated: "true",
|
|
1529
|
+
description: "Node type (http, transform, condition, etc.)",
|
|
1530
|
+
},
|
|
1531
|
+
nodeLabel: {
|
|
1532
|
+
type: "String",
|
|
1533
|
+
allowNull: true,
|
|
1534
|
+
SystemGenerated: "true",
|
|
1535
|
+
description: "User-defined node label",
|
|
1536
|
+
},
|
|
1537
|
+
status: {
|
|
1538
|
+
type: "ENUM",
|
|
1539
|
+
values: ["pending", "running", "success", "failed", "skipped"],
|
|
1540
|
+
defaultValue: "pending",
|
|
1541
|
+
SystemGenerated: "true",
|
|
1542
|
+
},
|
|
1543
|
+
inputData: {
|
|
1544
|
+
type: "JSONB",
|
|
1545
|
+
defaultValue: {},
|
|
1546
|
+
SystemGenerated: "true",
|
|
1547
|
+
},
|
|
1548
|
+
outputData: {
|
|
1549
|
+
type: "JSONB",
|
|
1550
|
+
defaultValue: {},
|
|
1551
|
+
SystemGenerated: "true",
|
|
1552
|
+
},
|
|
1553
|
+
errorMessage: {
|
|
1554
|
+
type: "Text",
|
|
1555
|
+
allowNull: true,
|
|
1556
|
+
SystemGenerated: "true",
|
|
1557
|
+
},
|
|
1558
|
+
durationMs: {
|
|
1559
|
+
type: "Integer",
|
|
1560
|
+
allowNull: true,
|
|
1561
|
+
SystemGenerated: "true",
|
|
1562
|
+
},
|
|
1563
|
+
},
|
|
1564
|
+
indexes: [
|
|
1565
|
+
{
|
|
1566
|
+
fields: ["execution_Id"],
|
|
1567
|
+
name: "baasix_WorkflowExecutionLog_execution_Id_idx",
|
|
1568
|
+
SystemGenerated: "true",
|
|
1569
|
+
},
|
|
1570
|
+
],
|
|
1571
|
+
},
|
|
1572
|
+
},
|
|
1573
|
+
{
|
|
1574
|
+
collectionName: "baasix_Migration",
|
|
1575
|
+
schema: {
|
|
1576
|
+
name: "Migration",
|
|
1577
|
+
timestamps: true,
|
|
1578
|
+
fields: {
|
|
1579
|
+
id: {
|
|
1580
|
+
type: "UUID",
|
|
1581
|
+
primaryKey: true,
|
|
1582
|
+
defaultValue: { type: "UUIDV4" },
|
|
1583
|
+
SystemGenerated: "true",
|
|
1584
|
+
},
|
|
1585
|
+
version: {
|
|
1586
|
+
type: "String",
|
|
1587
|
+
allowNull: false,
|
|
1588
|
+
unique: true,
|
|
1589
|
+
SystemGenerated: "true",
|
|
1590
|
+
description: "Migration version identifier (e.g., '0.1.0-alpha.7', '20240101_001')",
|
|
1591
|
+
},
|
|
1592
|
+
name: {
|
|
1593
|
+
type: "String",
|
|
1594
|
+
allowNull: false,
|
|
1595
|
+
SystemGenerated: "true",
|
|
1596
|
+
description: "Human-readable migration name",
|
|
1597
|
+
},
|
|
1598
|
+
description: {
|
|
1599
|
+
type: "Text",
|
|
1600
|
+
allowNull: true,
|
|
1601
|
+
SystemGenerated: "true",
|
|
1602
|
+
description: "Detailed description of what this migration does",
|
|
1603
|
+
},
|
|
1604
|
+
type: {
|
|
1605
|
+
type: "ENUM",
|
|
1606
|
+
values: ["system", "schema", "data", "custom"],
|
|
1607
|
+
defaultValue: "custom",
|
|
1608
|
+
allowNull: false,
|
|
1609
|
+
SystemGenerated: "true",
|
|
1610
|
+
description: "Type of migration: system (core updates), schema (database structure), data (data transformations), custom (user-defined)",
|
|
1611
|
+
},
|
|
1612
|
+
status: {
|
|
1613
|
+
type: "ENUM",
|
|
1614
|
+
values: ["pending", "running", "completed", "failed", "rolled_back"],
|
|
1615
|
+
defaultValue: "pending",
|
|
1616
|
+
allowNull: false,
|
|
1617
|
+
SystemGenerated: "true",
|
|
1618
|
+
},
|
|
1619
|
+
batch: {
|
|
1620
|
+
type: "Integer",
|
|
1621
|
+
allowNull: true,
|
|
1622
|
+
SystemGenerated: "true",
|
|
1623
|
+
description: "Migration batch number for grouping migrations run together",
|
|
1624
|
+
},
|
|
1625
|
+
executedAt: {
|
|
1626
|
+
type: "DateTime",
|
|
1627
|
+
allowNull: true,
|
|
1628
|
+
SystemGenerated: "true",
|
|
1629
|
+
description: "When the migration was successfully executed",
|
|
1630
|
+
},
|
|
1631
|
+
executionTimeMs: {
|
|
1632
|
+
type: "Integer",
|
|
1633
|
+
allowNull: true,
|
|
1634
|
+
SystemGenerated: "true",
|
|
1635
|
+
description: "Time taken to execute the migration in milliseconds",
|
|
1636
|
+
},
|
|
1637
|
+
errorMessage: {
|
|
1638
|
+
type: "Text",
|
|
1639
|
+
allowNull: true,
|
|
1640
|
+
SystemGenerated: "true",
|
|
1641
|
+
description: "Error message if migration failed",
|
|
1642
|
+
},
|
|
1643
|
+
errorStack: {
|
|
1644
|
+
type: "Text",
|
|
1645
|
+
allowNull: true,
|
|
1646
|
+
SystemGenerated: "true",
|
|
1647
|
+
description: "Error stack trace if migration failed",
|
|
1648
|
+
},
|
|
1649
|
+
metadata: {
|
|
1650
|
+
type: "JSONB",
|
|
1651
|
+
defaultValue: {},
|
|
1652
|
+
SystemGenerated: "true",
|
|
1653
|
+
description: "Additional metadata about the migration (affected tables, records modified, etc.)",
|
|
1654
|
+
},
|
|
1655
|
+
checksum: {
|
|
1656
|
+
type: "String",
|
|
1657
|
+
allowNull: true,
|
|
1658
|
+
SystemGenerated: "true",
|
|
1659
|
+
description: "Checksum of migration script for integrity verification",
|
|
1660
|
+
},
|
|
1661
|
+
canRollback: {
|
|
1662
|
+
type: "Boolean",
|
|
1663
|
+
defaultValue: false,
|
|
1664
|
+
SystemGenerated: "true",
|
|
1665
|
+
description: "Whether this migration can be rolled back",
|
|
1666
|
+
},
|
|
1667
|
+
rolledBackAt: {
|
|
1668
|
+
type: "DateTime",
|
|
1669
|
+
allowNull: true,
|
|
1670
|
+
SystemGenerated: "true",
|
|
1671
|
+
description: "When the migration was rolled back (if applicable)",
|
|
1672
|
+
},
|
|
1673
|
+
},
|
|
1674
|
+
indexes: [
|
|
1675
|
+
{
|
|
1676
|
+
fields: ["version"],
|
|
1677
|
+
unique: true,
|
|
1678
|
+
name: "baasix_Migration_version_unique",
|
|
1679
|
+
SystemGenerated: "true",
|
|
1680
|
+
},
|
|
1681
|
+
{
|
|
1682
|
+
fields: ["status"],
|
|
1683
|
+
name: "baasix_Migration_status_idx",
|
|
1684
|
+
SystemGenerated: "true",
|
|
1685
|
+
},
|
|
1686
|
+
{
|
|
1687
|
+
fields: ["batch"],
|
|
1688
|
+
name: "baasix_Migration_batch_idx",
|
|
1689
|
+
SystemGenerated: "true",
|
|
1690
|
+
},
|
|
1691
|
+
{
|
|
1692
|
+
fields: ["executedAt"],
|
|
1693
|
+
name: "baasix_Migration_executedAt_idx",
|
|
1694
|
+
SystemGenerated: "true",
|
|
1695
|
+
},
|
|
1696
|
+
],
|
|
1697
|
+
},
|
|
1698
|
+
},
|
|
1699
|
+
{
|
|
1700
|
+
collectionName: "baasix_Template",
|
|
1701
|
+
schema: {
|
|
1702
|
+
name: "Template",
|
|
1703
|
+
timestamps: true,
|
|
1704
|
+
fields: {
|
|
1705
|
+
id: {
|
|
1706
|
+
type: "UUID",
|
|
1707
|
+
primaryKey: true,
|
|
1708
|
+
defaultValue: { type: "UUIDV4" },
|
|
1709
|
+
SystemGenerated: "true",
|
|
1710
|
+
},
|
|
1711
|
+
type: {
|
|
1712
|
+
type: "String",
|
|
1713
|
+
allowNull: false,
|
|
1714
|
+
SystemGenerated: "true",
|
|
1715
|
+
description: "The type of email template (e.g., inviteNewUser, passwordReset, or custom types)",
|
|
1716
|
+
},
|
|
1717
|
+
subject: {
|
|
1718
|
+
type: "String",
|
|
1719
|
+
allowNull: false,
|
|
1720
|
+
SystemGenerated: "true",
|
|
1721
|
+
description: "Email subject line (supports Liquid templating)",
|
|
1722
|
+
},
|
|
1723
|
+
body: {
|
|
1724
|
+
type: "HTML",
|
|
1725
|
+
allowNull: false,
|
|
1726
|
+
SystemGenerated: "true",
|
|
1727
|
+
description: "Email body content (supports Liquid templating)",
|
|
1728
|
+
},
|
|
1729
|
+
tenant_Id: {
|
|
1730
|
+
type: "UUID",
|
|
1731
|
+
allowNull: true,
|
|
1732
|
+
SystemGenerated: "true",
|
|
1733
|
+
description: "Tenant ID for tenant-specific templates. NULL means default template.",
|
|
1734
|
+
},
|
|
1735
|
+
tenant: {
|
|
1736
|
+
relType: "BelongsTo",
|
|
1737
|
+
target: "baasix_Tenant",
|
|
1738
|
+
foreignKey: "tenant_Id",
|
|
1739
|
+
as: "tenant",
|
|
1740
|
+
SystemGenerated: "true",
|
|
1741
|
+
description: "M2O",
|
|
1742
|
+
showAs: ["name"],
|
|
1743
|
+
},
|
|
1744
|
+
isActive: {
|
|
1745
|
+
type: "Boolean",
|
|
1746
|
+
defaultValue: true,
|
|
1747
|
+
allowNull: false,
|
|
1748
|
+
SystemGenerated: "true",
|
|
1749
|
+
description: "Whether this template is active",
|
|
1750
|
+
},
|
|
1751
|
+
description: {
|
|
1752
|
+
type: "Text",
|
|
1753
|
+
allowNull: true,
|
|
1754
|
+
SystemGenerated: "true",
|
|
1755
|
+
description: "Description of the template and its purpose",
|
|
1756
|
+
},
|
|
1757
|
+
},
|
|
1758
|
+
indexes: [
|
|
1759
|
+
{
|
|
1760
|
+
fields: ["tenant_Id", "type"],
|
|
1761
|
+
unique: true,
|
|
1762
|
+
nullsNotDistinct: true,
|
|
1763
|
+
name: "baasix_Template_tenant_type_unique",
|
|
1764
|
+
SystemGenerated: "true",
|
|
1765
|
+
},
|
|
1766
|
+
{
|
|
1767
|
+
fields: ["type"],
|
|
1768
|
+
name: "baasix_Template_type_idx",
|
|
1769
|
+
SystemGenerated: "true",
|
|
1770
|
+
},
|
|
1771
|
+
],
|
|
1772
|
+
},
|
|
1773
|
+
},
|
|
1774
|
+
],
|
|
1775
|
+
};
|
|
1776
|
+
export default { schemas: systemSchemas.schemas };
|
|
1777
|
+
//# sourceMappingURL=systemschema.js.map
|