@antelopejs/dms 0.21.4-next.999.g264d3a3 → 0.22.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/CHANGELOG.md +114 -0
- package/README.md +2 -2
- package/dist/e2e/mongo.d.mts +5 -5
- package/dist/e2e/processes.d.mts +18 -4
- package/dist/implementations/dms/page/preview-models.d.ts +0 -2
- package/dist/implementations/dms-base/phone-number.d.ts +1 -0
- package/dist/implementations/dms-base/phone-number.js +17 -0
- package/dist/implementations/dms-base/phone-number.js.map +1 -0
- package/dist/implementations/dms-notifications/index.d.ts +5 -1
- package/dist/implementations/dms-notifications/index.js +39 -11
- package/dist/implementations/dms-notifications/index.js.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/mcp/page-verify/accounts.d.ts +2 -2
- package/dist/mcp/page-verify/accounts.js +21 -13
- package/dist/mcp/page-verify/accounts.js.map +1 -1
- package/dist/pages/settings/users/invite-resend.d.ts +4 -0
- package/dist/pages/settings/users/invite-resend.js +27 -19
- package/dist/pages/settings/users/invite-resend.js.map +1 -1
- package/dist/pages/settings/users/invites.d.ts +2 -4
- package/dist/pages/settings/users/invites.js +4 -17
- package/dist/pages/settings/users/invites.js.map +1 -1
- package/dist/pages/settings/users/notifications.d.ts +4 -1
- package/dist/pages/settings/users/notifications.js +12 -4
- package/dist/pages/settings/users/notifications.js.map +1 -1
- package/dist/store/internal/frontend/dev-reload.d.ts +7 -4
- package/dist/store/internal/frontend/dev-reload.js +16 -17
- package/dist/store/internal/frontend/dev-reload.js.map +1 -1
- package/dist/utils/notification-email.d.ts +13 -0
- package/dist/utils/notification-email.js +37 -0
- package/dist/utils/notification-email.js.map +1 -0
- package/dist/utils/notification-registry/index.d.ts +1 -0
- package/dist/utils/notification-registry/index.js +1 -0
- package/dist/utils/notification-registry/index.js.map +1 -1
- package/e2e/database.mjs +9 -3
- package/e2e/mongo.mjs +5 -5
- package/e2e/processes.mjs +32 -9
- package/e2e/run-state.mjs +40 -2
- package/frontend-vue/eslint-globals.generated.mjs +17 -17
- package/frontend-vue/layers/dms-core/app/composables/page/useSiteLayout.ts +20 -14
- package/frontend-vue/layers/dms-core/app/types/row-action.ts +2 -0
- package/frontend-vue/layers/dms-core/i18n/locales/core-en-GB.json +1 -0
- package/frontend-vue/layers/dms-core/i18n/locales/core-fr-FR.json +1 -0
- package/frontend-vue/layers/dms-layout/app/build/components/layout/PageHeaderActionBar.vue +4 -8
- package/frontend-vue/layers/dms-layout/app/build/components/notification/NotificationPopover.vue +10 -2
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/NotificationInboxItem.vue +8 -2
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/NotificationMatrixSubject.vue +32 -1
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/NotificationPreferencesForm.vue +11 -1
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/notificationDisplay.ts +13 -0
- package/frontend-vue/layers/dms-layout/app/build/composables/notification/useNotificationCatalog.ts +16 -0
- package/frontend-vue/layers/dms-layout/app/build/composables/notification/useNotificationPreferences.ts +38 -3
- package/frontend-vue/layers/dms-layout/app/components/layout/DashboardSearch.vue +10 -0
- package/frontend-vue/layers/dms-layout/i18n/locales/layout-en-GB.json +4 -1
- package/frontend-vue/layers/dms-layout/i18n/locales/layout-fr-FR.json +4 -1
- package/frontend-vue/layers/dms-ui/app/build/components/button/DisabledReason.vue +27 -0
- package/frontend-vue/layers/dms-ui/app/build/components/containers/TargetComponentTree.vue +2 -0
- package/frontend-vue/layers/dms-ui/app/build/components/period/PeriodRangeCalendar.vue +1 -0
- package/frontend-vue/layers/dms-ui/app/build/components/stat/StatCell.vue +2 -11
- package/frontend-vue/layers/dms-ui/app/build/components/table/TableActions.vue +17 -17
- package/frontend-vue/layers/dms-ui/app/build/components/table/TablePagination.vue +1 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/actions/actionTargetHandlers.ts +1 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/actions/actionTargetRows.ts +5 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupViewerShortcuts.ts +19 -9
- package/frontend-vue/layers/dms-ui/app/build/composables/confirm/fetchedConfirmDialog.ts +1 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/defaultPrimitiveTypes.ts +12 -3
- package/frontend-vue/layers/dms-ui/app/build/composables/global/shortcuts.ts +14 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/page/pageUrlValues.ts +1 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/table/tableColumnActionDescriptors.ts +47 -31
- package/frontend-vue/layers/dms-ui/app/build/composables/table/tableColumnActionRendering.ts +19 -3
- package/frontend-vue/layers/dms-ui/app/build/composables/table/tableColumnActionSizing.ts +2 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/table/tableColumnTypes.ts +2 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/phoneNumber.ts +143 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/DatePicker.vue +1 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/InputCalendar.vue +1 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/InputPhone.vue +165 -13
- package/frontend-vue/layers/dms-ui/app/components/form/components/InputRelation.vue +3 -2
- package/frontend-vue/layers/dms-ui/app/components/form/components/InputRepeater.vue +32 -1
- package/frontend-vue/layers/dms-ui/app/components/kpi/KpiCard.vue +1 -6
- package/frontend-vue/layers/dms-ui/app/entries/components/button/DisabledReason.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/components/stat/StatCell.ts +2 -0
- package/frontend-vue/layers/dms-ui/app/entries/composables/global/shortcuts.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/phoneNumber.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/types/row-action.ts +2 -0
- package/frontend-vue/layers/dms-ui/i18n/locales/ui-en-GB.json +10 -1
- package/frontend-vue/layers/dms-ui/i18n/locales/ui-fr-FR.json +10 -1
- package/frontend-vue/package.json +1 -0
- package/package.json +6 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,119 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v0.22.0
|
|
4
|
+
|
|
5
|
+
[compare changes](https://github.com/AntelopeJS/dms/compare/v0.21.3...v0.22.0)
|
|
6
|
+
|
|
7
|
+
### 🚀 Enhancements
|
|
8
|
+
|
|
9
|
+
- **dms:** Make the e2e kit a standalone Playwright setup ([#1162](https://github.com/AntelopeJS/dms/pull/1162))
|
|
10
|
+
- **dms:** Export run-state, backend and mail helpers from e2e/run ([#1164](https://github.com/AntelopeJS/dms/pull/1164))
|
|
11
|
+
- **dms:** Read the e2e kit's journeys from e2e/journeys.config.ts ([#1166](https://github.com/AntelopeJS/dms/pull/1166))
|
|
12
|
+
- **dms:** Add a config option to e2eConfig and startRun ([#1170](https://github.com/AntelopeJS/dms/pull/1170))
|
|
13
|
+
- **dms:** List the DMS modules a mockup needs in its spec ([#1198](https://github.com/AntelopeJS/dms/pull/1198))
|
|
14
|
+
- **dms:** Group the tables of a large database in the analysis answer ([#1200](https://github.com/AntelopeJS/dms/pull/1200))
|
|
15
|
+
- **dms:** Add a ratio query template and compare for scalar queries ([#1201](https://github.com/AntelopeJS/dms/pull/1201))
|
|
16
|
+
- **dms:** Let several people edit a mockup with live refresh and per-block locks ([#1207](https://github.com/AntelopeJS/dms/pull/1207))
|
|
17
|
+
- **dms:** Tone a status pill by its select item when tones has no entry ([#1222](https://github.com/AntelopeJS/dms/pull/1222))
|
|
18
|
+
- **dms:** Open a dashboard page after an api action target succeeds with redirect ([#1210](https://github.com/AntelopeJS/dms/pull/1210))
|
|
19
|
+
- **dms:** Draw an identity cell's avatar as a square logo with avatarFrame ([#1209](https://github.com/AntelopeJS/dms/pull/1209))
|
|
20
|
+
- **dms:** Pass the written row to a guard's AfterWrite ([#1219](https://github.com/AntelopeJS/dms/pull/1219))
|
|
21
|
+
- **interface-dms:** Add a fixed filter to RelationType pickers ([#1223](https://github.com/AntelopeJS/dms/pull/1223))
|
|
22
|
+
- **dms:** Pin a first-level menu entry to the sidebar footer ([#1125](https://github.com/AntelopeJS/dms/pull/1125))
|
|
23
|
+
- **dms:** Let a subject offer e-mail and a mail module deliver it ([#1126](https://github.com/AntelopeJS/dms/pull/1126))
|
|
24
|
+
- **dms:** Give repeater columns a new-row value and fill rows up to min ([#1127](https://github.com/AntelopeJS/dms/pull/1127))
|
|
25
|
+
- **dms:** Store phone numbers in E.164 and pick their country in the input ([#1212](https://github.com/AntelopeJS/dms/pull/1212))
|
|
26
|
+
- **layout:** Show a notification's exact date and time on hover ([#1154](https://github.com/AntelopeJS/dms/pull/1154))
|
|
27
|
+
- **dms:** Hand a header button's modal, drawer or side panel the page's record and route params ([#1226](https://github.com/AntelopeJS/dms/pull/1226))
|
|
28
|
+
- **layout:** Press ? to open the keyboard shortcuts page ([#1155](https://github.com/AntelopeJS/dms/pull/1155))
|
|
29
|
+
|
|
30
|
+
### 🔥 Performance
|
|
31
|
+
|
|
32
|
+
- **dms:** Halve the builder suite and fix the e2e run-state race ([#1165](https://github.com/AntelopeJS/dms/pull/1165))
|
|
33
|
+
- **dms:** Key the e2e build cache on pnpm 12's JSON .modules.yaml ([#1169](https://github.com/AntelopeJS/dms/pull/1169))
|
|
34
|
+
- **dms:** Keep the parsed declarations of the builder's index across operations ([#1183](https://github.com/AntelopeJS/dms/pull/1183))
|
|
35
|
+
- **dms:** Typecheck only the files a builder save can break ([#1191](https://github.com/AntelopeJS/dms/pull/1191))
|
|
36
|
+
|
|
37
|
+
### 🩹 Fixes
|
|
38
|
+
|
|
39
|
+
- Repair the main checks broken by the #1158 dependency bumps ([#1161](https://github.com/AntelopeJS/dms/pull/1161))
|
|
40
|
+
- **dms:** Retry the e2e kit's dashboard install while the registry answers 404 on a new tarball ([#1173](https://github.com/AntelopeJS/dms/pull/1173))
|
|
41
|
+
- **dms:** Stop the run when a SIGINT or SIGTERM reaches the process that started it ([#1182](https://github.com/AntelopeJS/dms/pull/1182))
|
|
42
|
+
- **dms:** Hold a live table and say why while a drawer has its row open ([#1181](https://github.com/AntelopeJS/dms/pull/1181))
|
|
43
|
+
- **dms:** Keep a moved page's planned path in ts-morph's form on Windows ([#1180](https://github.com/AntelopeJS/dms/pull/1180))
|
|
44
|
+
- **dms:** Find a deleted resource's barrel export on Windows paths ([#1185](https://github.com/AntelopeJS/dms/pull/1185))
|
|
45
|
+
- **dms:** Rebuild the builder's projects when the install state or the tsconfig changes ([#1188](https://github.com/AntelopeJS/dms/pull/1188))
|
|
46
|
+
- **dms:** Answer 503 within 5 s when the database cannot verify a session ([#1189](https://github.com/AntelopeJS/dms/pull/1189))
|
|
47
|
+
- **dms:** Name the product AntelopeJS DMS in onboarding, logo and settings ([#1192](https://github.com/AntelopeJS/dms/pull/1192))
|
|
48
|
+
- **dms:** Name the relations already mapped in the database analysis ([#1194](https://github.com/AntelopeJS/dms/pull/1194))
|
|
49
|
+
- **dms:** Show a relation's label in a monospace cell ([#1193](https://github.com/AntelopeJS/dms/pull/1193))
|
|
50
|
+
- **dms:** Open no long-lived connection from a mockup preview frame ([#1196](https://github.com/AntelopeJS/dms/pull/1196))
|
|
51
|
+
- **dms:** Format a horizontal bar's categories as dates, not as the value format ([#1195](https://github.com/AntelopeJS/dms/pull/1195))
|
|
52
|
+
- **dms:** Skip the comparison query when a stats route gets no comparison bounds ([#1199](https://github.com/AntelopeJS/dms/pull/1199))
|
|
53
|
+
- **dms:** Show a reconnecting state on the mockup canvas while its stream is down ([#1203](https://github.com/AntelopeJS/dms/pull/1203))
|
|
54
|
+
- **dms:** Draw every page thumbnail of a large mockup Overview, past the live cap as a snapshot ([#1205](https://github.com/AntelopeJS/dms/pull/1205))
|
|
55
|
+
- **dms:** Keep mockup Overview section headings clear of thumbnails at low zoom ([#1206](https://github.com/AntelopeJS/dms/pull/1206))
|
|
56
|
+
- **dms:** Accept xAxis options on a mockup ChartBar ([#1208](https://github.com/AntelopeJS/dms/pull/1208))
|
|
57
|
+
- **dms:** Enforce mockup block locks on MCP writes, deselects and lock takes ([#1211](https://github.com/AntelopeJS/dms/pull/1211))
|
|
58
|
+
- **dms:** Answer a period-bound stats route for the All period over PostgreSQL ([#1214](https://github.com/AntelopeJS/dms/pull/1214))
|
|
59
|
+
- **period-selector:** Keep the other bound while a date is typed ([#1150](https://github.com/AntelopeJS/dms/pull/1150))
|
|
60
|
+
- **dms:** Draw two initials for a one-word identity or card name ([#1213](https://github.com/AntelopeJS/dms/pull/1213))
|
|
61
|
+
- **dms:** Time out a GenerateHtml render that hangs ([#1216](https://github.com/AntelopeJS/dms/pull/1216))
|
|
62
|
+
- **dms:** Rotate the refresh token on every refresh and revoke a replayed session ([#1215](https://github.com/AntelopeJS/dms/pull/1215))
|
|
63
|
+
- **dms:** Validate only the edited row of a repeater ([#1217](https://github.com/AntelopeJS/dms/pull/1217))
|
|
64
|
+
- **dms:** Log the first-owner setup token only in development ([#1221](https://github.com/AntelopeJS/dms/pull/1221))
|
|
65
|
+
- **dms:** Fix the Altab QA defects in counts, dates, addresses, KPI titles, row actions and page links ([#1224](https://github.com/AntelopeJS/dms/pull/1224))
|
|
66
|
+
- **dms:** Mount GET /dms/dev/reload only in development ([#1225](https://github.com/AntelopeJS/dms/pull/1225))
|
|
67
|
+
- **dms:** Store invitation tokens as digests and mint a new one to copy a link ([#1218](https://github.com/AntelopeJS/dms/pull/1218))
|
|
68
|
+
- **interface-dms:** Refuse a table action no table view declares to everyone but a platform owner ([#1220](https://github.com/AntelopeJS/dms/pull/1220))
|
|
69
|
+
- **dms:** Pass the nightly's Windows legs and its Stress mongod check ([#1227](https://github.com/AntelopeJS/dms/pull/1227))
|
|
70
|
+
|
|
71
|
+
### 💅 Refactors
|
|
72
|
+
|
|
73
|
+
- **dms:** Delete dms-control and the verify-dms harness ([#1172](https://github.com/AntelopeJS/dms/pull/1172))
|
|
74
|
+
- **dms:** Name the e2e kit's environment variables after the kit ([#1184](https://github.com/AntelopeJS/dms/pull/1184))
|
|
75
|
+
- **dms:** Remove the preview_blocks MCP tool ([#1204](https://github.com/AntelopeJS/dms/pull/1204))
|
|
76
|
+
- **interface-dms:** Remove TenantMemberModel.listAll() ([#1228](https://github.com/AntelopeJS/dms/pull/1228))
|
|
77
|
+
|
|
78
|
+
### 📖 Documentation
|
|
79
|
+
|
|
80
|
+
- **readme:** Show the mockup run and its new numbers ([#1176](https://github.com/AntelopeJS/dms/pull/1176))
|
|
81
|
+
- **ai:** Group the AI & coding agents pages and rewrite them ([#1190](https://github.com/AntelopeJS/dms/pull/1190))
|
|
82
|
+
|
|
83
|
+
### 📦 Build
|
|
84
|
+
|
|
85
|
+
- Move pnpm to 10.34.9 ([#1179](https://github.com/AntelopeJS/dms/pull/1179))
|
|
86
|
+
|
|
87
|
+
### ✅ Tests
|
|
88
|
+
|
|
89
|
+
- **dms:** Port the dms HTTP and command-line journeys to integration tests ([#1167](https://github.com/AntelopeJS/dms/pull/1167))
|
|
90
|
+
- **dms:** Run the run-exports kit test and name the journeys config's renderer ([#1174](https://github.com/AntelopeJS/dms/pull/1174))
|
|
91
|
+
- **dms:** Count only the bridge publication's own warnings ([#1187](https://github.com/AntelopeJS/dms/pull/1187))
|
|
92
|
+
- **dms:** Import the relation input before its test starts its timer ([#1186](https://github.com/AntelopeJS/dms/pull/1186))
|
|
93
|
+
- **dms:** Read the API's module set on a connection of its own in the dashboard wait ([#1197](https://github.com/AntelopeJS/dms/pull/1197))
|
|
94
|
+
- **dms:** Serve the dev-frontend test's fake dashboard on a restartable port ([#1229](https://github.com/AntelopeJS/dms/pull/1229))
|
|
95
|
+
- **dms:** Take the e2e mongod's port from restartablePort and refuse a freePort port where a server restarts ([#1230](https://github.com/AntelopeJS/dms/pull/1230))
|
|
96
|
+
|
|
97
|
+
### 🤖 CI
|
|
98
|
+
|
|
99
|
+
- **dms:** Run the merge queue tier and plan every job from one selector ([#1159](https://github.com/AntelopeJS/dms/pull/1159))
|
|
100
|
+
- **dms:** Shard the e2e queue suite by measured seconds ([#1163](https://github.com/AntelopeJS/dms/pull/1163))
|
|
101
|
+
- **dms:** Run the builder suite on 5 shards and refresh its weights ([#1171](https://github.com/AntelopeJS/dms/pull/1171))
|
|
102
|
+
|
|
103
|
+
#### ⚠️ Breaking Changes
|
|
104
|
+
|
|
105
|
+
- **dms:** Remove the preview_blocks MCP tool ([#1204](https://github.com/AntelopeJS/dms/pull/1204))
|
|
106
|
+
- **dms:** Store invitation tokens as digests and mint a new one to copy a link ([#1218](https://github.com/AntelopeJS/dms/pull/1218))
|
|
107
|
+
- **interface-dms:** Refuse a table action no table view declares to everyone but a platform owner ([#1220](https://github.com/AntelopeJS/dms/pull/1220))
|
|
108
|
+
- **dms:** Store phone numbers in E.164 and pick their country in the input ([#1212](https://github.com/AntelopeJS/dms/pull/1212))
|
|
109
|
+
- **interface-dms:** Remove TenantMemberModel.listAll() ([#1228](https://github.com/AntelopeJS/dms/pull/1228))
|
|
110
|
+
|
|
111
|
+
### ❤️ Contributors
|
|
112
|
+
|
|
113
|
+
- Antony Rizzitelli
|
|
114
|
+
- Maxime Westhoven
|
|
115
|
+
- Emre Öcel
|
|
116
|
+
|
|
3
117
|
## v0.21.3
|
|
4
118
|
|
|
5
119
|
[compare changes](https://github.com/AntelopeJS/dms/compare/v0.21.2...v0.21.3)
|
package/README.md
CHANGED
|
@@ -87,9 +87,9 @@ export class SalesPage extends PageController("sales", {
|
|
|
87
87
|
| `@antelopejs/interface-database` | `>=0.4.0 <0.5.0` | `0.4.3` |
|
|
88
88
|
| `@antelopejs/interface-database-catalog` | `>=0.1.0 <0.2.0` | `0.1.0` |
|
|
89
89
|
| `@antelopejs/interface-database-decorators` | `>=0.5.2 <0.6.0` | `0.5.4` |
|
|
90
|
-
| `@antelopejs/interface-dms` | `^0.
|
|
90
|
+
| `@antelopejs/interface-dms` | `^0.15.0` | `0.15.0` |
|
|
91
91
|
| `@antelopejs/interface-dms-automation` | `>=0.7.0 <0.8.0` | `0.7.2` |
|
|
92
|
-
| `@antelopejs/interface-dms-builder` | `^0.6.
|
|
92
|
+
| `@antelopejs/interface-dms-builder` | `^0.6.2` | `0.6.2` |
|
|
93
93
|
| `@antelopejs/interface-email` | `>=0.2.1 <0.3.0` | `0.2.1` |
|
|
94
94
|
| `@antelopejs/interface-file-storage` | `>=0.1.4 <0.2.0` | `0.1.9` |
|
|
95
95
|
| `@antelopejs/interface-redis` | `>=0.0.9 <0.1.0` | `0.0.11` |
|
package/dist/e2e/mongo.d.mts
CHANGED
|
@@ -20,7 +20,7 @@ export function importFrom(name: string, from: string[]): Promise<any>;
|
|
|
20
20
|
*/
|
|
21
21
|
export function mongodBinary(from: string[]): Promise<string>;
|
|
22
22
|
/**
|
|
23
|
-
* Starts a mongod owned by the run, on `port` or a
|
|
23
|
+
* Starts a mongod owned by the run, on `port` or a restartable one, with its data
|
|
24
24
|
* under the run folder, as the only member of a replica set, so change
|
|
25
25
|
* streams work. A mongod that does not become primary is stopped before the
|
|
26
26
|
* error is thrown. A binary that is a JavaScript file runs on this Node, as
|
|
@@ -29,16 +29,16 @@ export function mongodBinary(from: string[]): Promise<string>;
|
|
|
29
29
|
*
|
|
30
30
|
* @param {{ mongo: string, logs: string }} paths The run's folders
|
|
31
31
|
* @param {string[]} from Folders to resolve mongodb-memory-server-core from
|
|
32
|
-
* @param {
|
|
33
|
-
* @returns {Promise<{ url: string, record: ReturnType<typeof startDetached> & { port:
|
|
32
|
+
* @param {import("./processes.mjs").RestartablePort} [port] The port, which a restart keeps so the backend's URL still reaches it, so it must be one {@link restartablePort} gave
|
|
33
|
+
* @returns {Promise<{ url: string, record: ReturnType<typeof startDetached> & { port: import("./processes.mjs").RestartablePort } }>} Its URL and process record
|
|
34
34
|
*/
|
|
35
35
|
export function startMongod(paths: {
|
|
36
36
|
mongo: string;
|
|
37
37
|
logs: string;
|
|
38
|
-
}, from: string[], port?:
|
|
38
|
+
}, from: string[], port?: import("./processes.mjs").RestartablePort): Promise<{
|
|
39
39
|
url: string;
|
|
40
40
|
record: ReturnType<typeof startDetached> & {
|
|
41
|
-
port:
|
|
41
|
+
port: import("./processes.mjs").RestartablePort;
|
|
42
42
|
};
|
|
43
43
|
}>;
|
|
44
44
|
/**
|
package/dist/e2e/processes.d.mts
CHANGED
|
@@ -4,17 +4,25 @@
|
|
|
4
4
|
* @returns {Promise<number>} The port
|
|
5
5
|
*/
|
|
6
6
|
export function freePort(): Promise<number>;
|
|
7
|
+
/**
|
|
8
|
+
* @typedef {number & { readonly restartable: true }} RestartablePort A loopback port outside the kernel's ephemeral range, or any port where /proc does not tell the range. A function that takes one refuses a port from {@link freePort}, which a restart can fail to listen on again.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* @param {number} port A loopback port
|
|
12
|
+
* @returns {port is RestartablePort} Whether it lies outside the kernel's ephemeral range, or the range is unknown
|
|
13
|
+
*/
|
|
14
|
+
export function isRestartablePort(port: number): port is RestartablePort;
|
|
7
15
|
/**
|
|
8
16
|
* A free loopback port outside the kernel's ephemeral range, for a server
|
|
9
17
|
* that must listen on the same port again after it restarts. No outgoing
|
|
10
18
|
* connection takes such a port as its source port, so none can hold it in
|
|
11
19
|
* TIME_WAIT and make that listen fail with `EADDRINUSE`, as a port from
|
|
12
|
-
* {@link freePort} can be held.
|
|
13
|
-
* unprivileged port outside it is free, it is a port from {@link freePort}.
|
|
20
|
+
* {@link freePort} can be held.
|
|
14
21
|
*
|
|
15
|
-
* @returns {Promise<
|
|
22
|
+
* @returns {Promise<RestartablePort>} The port
|
|
23
|
+
* @throws When no unprivileged port outside the range is free
|
|
16
24
|
*/
|
|
17
|
-
export function restartablePort(): Promise<
|
|
25
|
+
export function restartablePort(): Promise<RestartablePort>;
|
|
18
26
|
/**
|
|
19
27
|
* Starts a long-running program in its own process group, its output going
|
|
20
28
|
* straight to `<logs>/<name>.log` so it survives the caller. The record
|
|
@@ -160,6 +168,12 @@ export class ExitError extends Error {
|
|
|
160
168
|
/** Its exit code, or null when a signal ended it. */
|
|
161
169
|
exitCode: number | null;
|
|
162
170
|
}
|
|
171
|
+
/**
|
|
172
|
+
* A loopback port outside the kernel's ephemeral range, or any port where /proc does not tell the range. A function that takes one refuses a port from {@link freePort}, which a restart can fail to listen on again.
|
|
173
|
+
*/
|
|
174
|
+
export type RestartablePort = number & {
|
|
175
|
+
readonly restartable: true;
|
|
176
|
+
};
|
|
163
177
|
/**
|
|
164
178
|
* Each process /proc lists, with its parent and start time from one read of its stat
|
|
165
179
|
*/
|
|
@@ -15,7 +15,6 @@ export declare function previewMemberModels(database: TenantMemberModel["databas
|
|
|
15
15
|
}, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
|
|
16
16
|
delete(id: string): Promise<number>;
|
|
17
17
|
existsByUser(userId: string): Promise<boolean>;
|
|
18
|
-
listAll(): Promise<TenantMember[]>;
|
|
19
18
|
listOwners(): Promise<TenantMember[]>;
|
|
20
19
|
listByUserWithTenantIds(userId: string): Promise<Array<{
|
|
21
20
|
tenantId: string;
|
|
@@ -57,7 +56,6 @@ export declare function memoizeViewerModels(memberModel: TenantMemberModel, role
|
|
|
57
56
|
}, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
|
|
58
57
|
delete(id: string): Promise<number>;
|
|
59
58
|
existsByUser(userId: string): Promise<boolean>;
|
|
60
|
-
listAll(): Promise<TenantMember[]>;
|
|
61
59
|
listOwners(): Promise<TenantMember[]>;
|
|
62
60
|
listByUserWithTenantIds(userId: string): Promise<Array<{
|
|
63
61
|
tenantId: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function ToE164(text: string, defaultCountry?: string): string | undefined;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ToE164 = ToE164;
|
|
4
|
+
const min_1 = require("libphonenumber-js/min");
|
|
5
|
+
const PHONE_CHARACTERS = /^[+\d\s().\-/]+$/;
|
|
6
|
+
const INTERNATIONAL_CALL_PREFIX = /^00/;
|
|
7
|
+
function ToE164(text, defaultCountry) {
|
|
8
|
+
const trimmed = text.trim();
|
|
9
|
+
if (!PHONE_CHARACTERS.test(trimmed))
|
|
10
|
+
return undefined;
|
|
11
|
+
const country = defaultCountry?.trim().toUpperCase();
|
|
12
|
+
const parsed = (0, min_1.parsePhoneNumberFromString)(trimmed.replace(INTERNATIONAL_CALL_PREFIX, "+"), country && (0, min_1.isSupportedCountry)(country)
|
|
13
|
+
? { defaultCountry: country }
|
|
14
|
+
: undefined);
|
|
15
|
+
return parsed?.isPossible() ? parsed.number : undefined;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=phone-number.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phone-number.js","sourceRoot":"","sources":["../../../src/implementations/dms-base/phone-number.ts"],"names":[],"mappings":";;;AAAA,+CAG+B;AAE/B,MAAM,gBAAgB,GAAG,kBAAkB,CAAC;AAE5C,MAAM,yBAAyB,GAAG,KAAK,CAAC;AAExC,gBACE,IAAY,EACZ,cAAuB;IAEvB,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;IAC5B,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC;QAAE,OAAO,SAAS,CAAC;IACtD,MAAM,OAAO,GAAG,cAAc,EAAE,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IACrD,MAAM,MAAM,GAAG,IAAA,gCAA0B,EACvC,OAAO,CAAC,OAAO,CAAC,yBAAyB,EAAE,GAAG,CAAC,EAC/C,OAAO,IAAI,IAAA,wBAAkB,EAAC,OAAO,CAAC;QACpC,CAAC,CAAC,EAAE,cAAc,EAAE,OAAO,EAAE;QAC7B,CAAC,CAAC,SAAS,CACd,CAAC;IACF,OAAO,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;AAC1D,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DeliveryOptions, NotificationCategoryInfo, NotificationData, NotificationSubjectInfo, ReadScope, RoleSendOptions } from "@antelopejs/interface-dms/notifications/types";
|
|
1
|
+
import type { DeliveryOptions, NotificationCategoryInfo, NotificationEmailChannelInfo, NotificationData, NotificationSubjectInfo, ReadScope, RoleSendOptions } from "@antelopejs/interface-dms/notifications/types";
|
|
2
2
|
import { type UserNotificationCounts } from "../../db/models";
|
|
3
3
|
export * from "../../utils/notification-registry/index";
|
|
4
4
|
export declare function publishNotificationsRead(userId: string, ids: string[], counts: UserNotificationCounts): Promise<void>;
|
|
@@ -9,6 +9,10 @@ export declare namespace internal {
|
|
|
9
9
|
register: (info: NotificationCategoryInfo) => void;
|
|
10
10
|
unregister: (info: NotificationCategoryInfo) => void;
|
|
11
11
|
};
|
|
12
|
+
const RegisterNotificationEmailChannel: {
|
|
13
|
+
register: (channel: NotificationEmailChannelInfo) => void;
|
|
14
|
+
unregister: (channel: NotificationEmailChannelInfo) => void;
|
|
15
|
+
};
|
|
12
16
|
const RegisterNotificationSubject: {
|
|
13
17
|
register: (info: NotificationSubjectInfo) => void;
|
|
14
18
|
unregister: (info: NotificationSubjectInfo) => void;
|
|
@@ -24,6 +24,7 @@ const interface_database_1 = require("@antelopejs/interface-database");
|
|
|
24
24
|
const interface_database_decorators_1 = require("@antelopejs/interface-database-decorators");
|
|
25
25
|
const db_1 = require("@antelopejs/interface-dms/db");
|
|
26
26
|
const db_2 = require("@antelopejs/interface-dms/auth/db");
|
|
27
|
+
const internal_1 = require("@antelopejs/interface-dms/notifications/internal");
|
|
27
28
|
const models_1 = require("../../db/models");
|
|
28
29
|
const db_3 = require("../../db");
|
|
29
30
|
const realtime_1 = require("../../realtime");
|
|
@@ -98,6 +99,19 @@ async function store(userId, data, { groupId, idempotencyKey, dedupe }) {
|
|
|
98
99
|
return storeUnlessDuplicate(userId, data, groupId);
|
|
99
100
|
return notificationsModel.create((0, models_1.buildNewUserNotification)(userId, data, groupId));
|
|
100
101
|
}
|
|
102
|
+
async function deliverByEmail(userId, data, notification, preferences) {
|
|
103
|
+
const channel = index_2.emailChannelSlot.channel;
|
|
104
|
+
const subject = index_2.subjectRegistry.get(`${data.subject.category.id}:${data.subject.id}`);
|
|
105
|
+
if (!channel || !subject || !(0, index_2.isEmailOn)(subject, await preferences())) {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
try {
|
|
109
|
+
await channel.deliver(userId, data, notification._id);
|
|
110
|
+
}
|
|
111
|
+
catch (error) {
|
|
112
|
+
logging_1.Logging.Error(`[DMS] Notification e-mail channel failed to deliver "${data.title}" to "${userId}"`, error);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
101
115
|
async function publishAllNotificationsRead(userId, counts) {
|
|
102
116
|
await publishNotificationEvent(userId, NOTIFICATION_ALL_READ_EVENT, {
|
|
103
117
|
counts,
|
|
@@ -117,6 +131,16 @@ var internal;
|
|
|
117
131
|
index_2.categoryRegistry.delete(info.id);
|
|
118
132
|
},
|
|
119
133
|
};
|
|
134
|
+
internal.RegisterNotificationEmailChannel = {
|
|
135
|
+
register: (channel) => {
|
|
136
|
+
index_2.emailChannelSlot.channel = channel;
|
|
137
|
+
},
|
|
138
|
+
unregister: (channel) => {
|
|
139
|
+
if (internal_1.internal.emailChannelIdentity.isSame(index_2.emailChannelSlot.channel, channel)) {
|
|
140
|
+
index_2.emailChannelSlot.channel = undefined;
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
};
|
|
120
144
|
internal.RegisterNotificationSubject = {
|
|
121
145
|
register: (info) => {
|
|
122
146
|
if (!index_2.categoryRegistry.has(info.category.id)) {
|
|
@@ -133,27 +157,30 @@ var internal;
|
|
|
133
157
|
index_2.subjectRegistry.delete(`${info.category.id}:${info.id}`);
|
|
134
158
|
},
|
|
135
159
|
};
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
160
|
+
function preferencesReader(userId) {
|
|
161
|
+
let read;
|
|
162
|
+
return () => {
|
|
163
|
+
read ??= (0, interface_database_decorators_1.GetModel)(models_1.UserNotificationPreferencesModel)
|
|
164
|
+
.getOrCreatePreferences(userId)
|
|
165
|
+
.then((stored) => stored.preferences ?? {});
|
|
166
|
+
return read;
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
async function canSendNotification(data, preferences) {
|
|
170
|
+
const preferenceKey = `${data.subject.category.id}:${data.subject.id}`;
|
|
141
171
|
const subject = index_2.subjectRegistry.get(preferenceKey);
|
|
142
172
|
if (!subject)
|
|
143
173
|
return false;
|
|
144
174
|
if ((0, index_2.isSubjectLocked)(subject))
|
|
145
175
|
return true;
|
|
146
|
-
|
|
147
|
-
const preferences = await preferencesModel.getOrCreatePreferences(userId);
|
|
148
|
-
return preferences.preferences?.[preferenceKey] ?? true;
|
|
176
|
+
return (await preferences())[preferenceKey] ?? true;
|
|
149
177
|
}
|
|
150
178
|
async function SendToUser(userId, data, groupId, idempotencyKey, delivery = {}) {
|
|
151
179
|
if (!isDeliverable(data, `"${userId}"`))
|
|
152
180
|
return;
|
|
153
|
-
const
|
|
154
|
-
if (!
|
|
181
|
+
const preferences = preferencesReader(userId);
|
|
182
|
+
if (!(await canSendNotification(data, preferences)))
|
|
155
183
|
return;
|
|
156
|
-
}
|
|
157
184
|
const created = await store(userId, data, {
|
|
158
185
|
groupId,
|
|
159
186
|
idempotencyKey,
|
|
@@ -164,6 +191,7 @@ var internal;
|
|
|
164
191
|
await publishNotificationEvent(userId, NOTIFICATION_NEW_EVENT, {
|
|
165
192
|
notification: created,
|
|
166
193
|
});
|
|
194
|
+
await deliverByEmail(userId, data, created, preferences);
|
|
167
195
|
}
|
|
168
196
|
internal.SendToUser = SendToUser;
|
|
169
197
|
async function SendToUsers(userIds, data, readScope = "individual", idempotencyKey, delivery = {}) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/implementations/dms-notifications/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,6CAAqD;AACrD,gEAA6D;AAC7D,uEAAgE;AAChE,6FAAqE;AACrE,qDAAiE;AACjE,0DAA8D;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/implementations/dms-notifications/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,6CAAqD;AACrD,gEAA6D;AAC7D,uEAAgE;AAChE,6FAAqE;AACrE,qDAAiE;AACjE,0DAA8D;AAU9D,+EAAiG;AACjG,4CAKyB;AACzB,iCAAiD;AAEjD,6CAA+E;AAC/E,4DAAgE;AAChE,mEAMiD;AACjD,uDAI2B;AAC3B,qDAAwD;AAExD,0EAAwD;AAExD,MAAM,sBAAsB,GAAG,kBAAkB,CAAC;AAClD,MAAM,uBAAuB,GAAG,mBAAmB,CAAC;AACpD,MAAM,2BAA2B,GAAG,uBAAuB,CAAC;AAC5D,MAAM,yBAAyB,GAAG,qBAAqB,CAAC;AACxD,MAAM,4BAA4B,GAAG,EAAE,CAAC;AACxC,MAAM,gCAAgC,GAAG,GAAG,CAAC;AAE7C,SAAS,YAAY,CAAC,SAAoB,EAAE,GAAY;IACtD,IAAI,SAAS,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAC;IAC7C,OAAO,GAAG,KAAK,SAAS;QACtB,CAAC,CAAC,IAAA,wBAAU,GAAE;QACd,CAAC,CAAC,sBAAsB,IAAA,wBAAU,EAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;AAC7E,CAAC;AAOD,KAAK,UAAU,wBAAwB,CACrC,MAAc,EACd,IAAY,EACZ,OAAkC;IAElC,IAAI,CAAC;QACH,MAAM,IAAA,4BAAiB,GAAE,CAAC,OAAO,CAAC;YAChC,KAAK,EAAE,IAAA,qCAA0B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E,CAC3B,CAAC;IACJ,CAAC;IAzBqB,SAAA,WAAW,cAyBhC,CAAA;IAEM,KAAK,UAAU,SAAS,CAC7B,IAAsB,EACtB,SAAS,GAAc,YAAY,EACnC,cAAuB,EACvB,QAAQ,GAAoB,EAAE;QAE9B,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,UAAU,CAAC;YAAE,OAAO;QAC7C,MAAM,SAAS,GAAG,IAAA,wCAAQ,EAAC,cAAS,CAAC,CAAC;QACtC,MAAM,OAAO,GAAG,YAAY,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;QACxD,IAAI,MAAM,GAAG,CAAC,CAAC;QACf,OAAO,IAAI,EAAE,CAAC;YACZ,MAAM,KAAK,GAAG,MAAM,SAAS,CAAC,KAAK;iBAChC,OAAO,CAAC,KAAK,CAAC;iBACd,KAAK,CAAC,MAAM,EAAE,gCAAgC,CAAC;iBAC/C,KAAK,CAAC,KAAK,CAAC;iBACZ,GAAG,EAAE,CAAC;YACT,MAAM,sBAAsB,CAC1B,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,EAC7B,IAAI,EACJ,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,KAAK,KAAK,EAAE,CAC/D,CAAC;YACF,IAAI,KAAK,CAAC,MAAM,GAAG,gCAAgC;gBAAE,MAAM;YAC3D,MAAM,IAAI,gCAAgC,CAAC;QAC7C,CAAC;IACH,CAAC;IAxBqB,SAAA,SAAS,YAwB9B,CAAA;AACH,CAAC,EAvLgB,QAAQ,aAAR,QAAQ,GAAR,QAAQ,QAuLxB"}
|
package/dist/index.js
CHANGED
|
@@ -96,6 +96,7 @@ async function construct(config) {
|
|
|
96
96
|
(0, preview_1.registerDocsPreviewPage)();
|
|
97
97
|
}
|
|
98
98
|
if (dev) {
|
|
99
|
+
(0, frontend_1.registerDevReloadRoute)();
|
|
99
100
|
(0, mockup_1.startMockupEngine)(undefined, (0, config_1.isBuilderEnabled)(dev) ? mockup_1.BUILDER_PAGES : undefined);
|
|
100
101
|
}
|
|
101
102
|
await (await Promise.resolve().then(() => __importStar(require("./mcp")))).startMcp(dev);
|
|
@@ -129,6 +130,7 @@ async function implementInterfaces() {
|
|
|
129
130
|
void (0, interface_core_1.ImplementInterface)(await Promise.resolve().then(() => __importStar(require("@antelopejs/interface-dms/guards"))), await Promise.resolve().then(() => __importStar(require("./implementations/dms/guards"))));
|
|
130
131
|
void (0, interface_core_1.ImplementInterface)(await Promise.resolve().then(() => __importStar(require("@antelopejs/interface-dms/base/table-view"))), await Promise.resolve().then(() => __importStar(require("./implementations/dms-base/table-view"))));
|
|
131
132
|
void (0, interface_core_1.ImplementInterface)(await Promise.resolve().then(() => __importStar(require("@antelopejs/interface-dms/base/table-view/internal/distinct-values"))), await Promise.resolve().then(() => __importStar(require("./implementations/dms-base/distinct-values"))));
|
|
133
|
+
void (0, interface_core_1.ImplementInterface)(await Promise.resolve().then(() => __importStar(require("@antelopejs/interface-dms/base/data-types/internal/phone-number"))), await Promise.resolve().then(() => __importStar(require("./implementations/dms-base/phone-number"))));
|
|
132
134
|
void (0, interface_core_1.ImplementInterface)(await Promise.resolve().then(() => __importStar(require("@antelopejs/interface-dms/base/export-jobs"))), await Promise.resolve().then(() => __importStar(require("./implementations/dms-base/export-jobs"))));
|
|
133
135
|
void (0, interface_core_1.ImplementInterface)(await Promise.resolve().then(() => __importStar(require("@antelopejs/interface-dms/base/tenant-export-archive"))), await Promise.resolve().then(() => __importStar(require("./implementations/dms-base/tenant-export-archive"))));
|
|
134
136
|
void (0, interface_core_1.ImplementInterface)(await Promise.resolve().then(() => __importStar(require("@antelopejs/interface-dms/client-base-url"))), await Promise.resolve().then(() => __importStar(require("./implementations/dms/client-base-url"))));
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":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AC;gBACnC,iBAAO,CAAC,KAAK,CAAC,4BAA4B,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;YAC/D,CAAC;QACH,CAAC;IACH,CAAC;YAAS,CAAC;QACT,SAAS,GAAG,EAAE,CAAC;QACf,MAAM,IAAA,uBAAY,GAAE,CAAC;QACrB,2BAA2B,EAAE,CAAC;QAC9B,IAAA,gCAAqB,GAAE,CAAC;QACxB,IAAA,yBAAgB,GAAE,CAAC;IACrB,CAAC;AACH,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type User } from "@antelopejs/interface-dms/auth/db";
|
|
2
|
-
import { type Role, type TenantMember } from "@antelopejs/interface-dms/db";
|
|
2
|
+
import { type Role, type TenantMember, TenantMemberModel } from "@antelopejs/interface-dms/db";
|
|
3
3
|
import type { PageInfo } from "@antelopejs/interface-dms/page";
|
|
4
4
|
import type { VerifyAccountSummary } from "./report";
|
|
5
5
|
export type MemberRoles = Pick<TenantMember, "userId" | "roleIds" | "isTenantOwner">;
|
|
@@ -24,7 +24,7 @@ export interface OpenedSession {
|
|
|
24
24
|
sessionId: string;
|
|
25
25
|
ticket: SessionTicket;
|
|
26
26
|
}
|
|
27
|
-
export declare function pickMember(
|
|
27
|
+
export declare function pickMember(model: TenantMemberModel, roleId: string, ownerIds: ReadonlySet<string>): Promise<MemberRoles | undefined>;
|
|
28
28
|
export declare function loadWorkspace(): Promise<Workspace>;
|
|
29
29
|
export declare function findRole(workspace: Workspace, name: string): Role | undefined;
|
|
30
30
|
export declare function isOwnerRole(role: string | undefined): boolean;
|
|
@@ -35,27 +35,35 @@ async function ownerTenantId(owner) {
|
|
|
35
35
|
}
|
|
36
36
|
return oldest.tenantId;
|
|
37
37
|
}
|
|
38
|
-
function pickMember(
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
async function pickMember(model, roleId, ownerIds) {
|
|
39
|
+
const member = await model.table
|
|
40
|
+
.filter((row) => row
|
|
41
|
+
.key("roleIds", [])
|
|
42
|
+
.eq([roleId])
|
|
43
|
+
.and(row.key("isTenantOwner").eq(true).not())
|
|
44
|
+
.and(interface_database_1.ValueProxy.constant([...ownerIds])
|
|
45
|
+
.includes(row.key("userId"))
|
|
46
|
+
.not()))
|
|
47
|
+
.pluck("userId", "roleIds", "isTenantOwner")
|
|
48
|
+
.nth(0)
|
|
49
|
+
.default(null)
|
|
50
|
+
.run();
|
|
51
|
+
return member ?? undefined;
|
|
43
52
|
}
|
|
44
53
|
async function loadWorkspace() {
|
|
45
54
|
const owner = await findOwner();
|
|
46
55
|
const tenantId = await ownerTenantId(owner);
|
|
47
|
-
const [roles,
|
|
56
|
+
const [roles, owners] = await Promise.all([
|
|
48
57
|
(0, interface_database_decorators_1.GetModel)(db_2.RoleModel, tenantId).getAll(),
|
|
49
|
-
(0, interface_database_decorators_1.GetModel)(db_2.TenantMemberModel, tenantId).listAll(),
|
|
50
58
|
(0, interface_database_decorators_1.GetModel)(db_1.UserModel).getOwners(),
|
|
51
59
|
]);
|
|
52
60
|
const ownerIds = new Set(owners.map((user) => user._id));
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
const member = pickMember(members, role._id, ownerIds);
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
61
|
+
const members = (0, interface_database_decorators_1.GetModel)(db_2.TenantMemberModel, tenantId);
|
|
62
|
+
const picked = await Promise.all(roles.map(async (role) => {
|
|
63
|
+
const member = await pickMember(members, role._id, ownerIds);
|
|
64
|
+
return member === undefined ? [] : [[role._id, member]];
|
|
65
|
+
}));
|
|
66
|
+
const memberByRole = new Map(picked.flat());
|
|
59
67
|
return { tenantId, owner, roles, memberByRole };
|
|
60
68
|
}
|
|
61
69
|
function findRole(workspace, name) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accounts.js","sourceRoot":"","sources":["../../../src/mcp/page-verify/accounts.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,
|
|
1
|
+
{"version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AuB,OAAsB;IACvD,MAAM,IAAA,wCAAQ,EAAC,iBAAY,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AACzD,CAAC"}
|
|
@@ -4,4 +4,8 @@ export interface InviteResender {
|
|
|
4
4
|
name?: string;
|
|
5
5
|
userId?: string;
|
|
6
6
|
}
|
|
7
|
+
export interface InviteLinkResponse {
|
|
8
|
+
url: string;
|
|
9
|
+
}
|
|
7
10
|
export declare function resendPendingInvite(tenantId: string, inviteId: string, inviter?: InviteResender): Promise<InviteEmailOutcome>;
|
|
11
|
+
export declare function copyInviteLink(tenantId: string, inviteId: string, invitedBy?: string): Promise<InviteLinkResponse>;
|