@7365admin1/core 3.107.0 → 3.110.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 CHANGED
@@ -1,5 +1,23 @@
1
1
  # @iservice365/core
2
2
 
3
+ ## 3.110.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 795458a: Assign Role works for every organisation: the "last owner" check runs only when demoting a member who holds an owner ("_") role, instead of refusing every change with "No owner role found." when the organisation stores no owner role of that app. The assigned role must be the organisation's own active role for the member's site (or org-wide); the caller needs `members:assign-member-role` (or "_", or is the org owner / Seven365 staff). Member list rows carry `roleState` (ok / template / deleted / other-org / missing).
8
+
9
+ ## 3.109.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 2724925: Invitations record who sent them: the Seven365 console lists only its own (`GET /verifications?origin=seven365`), a client's invitation stays in that client's list, only Seven365 staff may send an invitation naming no organisation, and an organisation invitation must name a role.
14
+
15
+ ## 3.108.0
16
+
17
+ ### Minor Changes
18
+
19
+ - a96a08f: Only the owning organisation (a member whose role holds `*` or `sites:delete-site`) or Seven365 Super Admin may delete a site through `DELETE /api/sites/:id`. A service provider that serves the site is refused with a message pointing at Remove from your Sites.
20
+
3
21
  ## 3.107.0
4
22
 
5
23
  ### Minor Changes
package/dist/index.d.ts CHANGED
@@ -1057,6 +1057,8 @@ type TVerificationMetadata = {
1057
1057
  siteId?: string | ObjectId;
1058
1058
  siteName?: string;
1059
1059
  serviceProviderOrgId?: string | ObjectId;
1060
+ /** "seven365" when Seven365 sent it - see `invite-origin.util.ts`. */
1061
+ origin?: string;
1060
1062
  };
1061
1063
  type TVerification = {
1062
1064
  _id?: ObjectId;
@@ -1091,7 +1093,7 @@ declare function useVerificationRepo(): {
1091
1093
  createTextIndex: () => Promise<void>;
1092
1094
  add: (value: TVerification, session?: ClientSession) => Promise<ObjectId>;
1093
1095
  getById: (_id: string | ObjectId) => Promise<TVerification | null>;
1094
- getVerifications: ({ search, page, limit, sort, status, app, type, email, siteId, orgId, }: {
1096
+ getVerifications: ({ search, page, limit, sort, status, app, type, email, siteId, orgId, origin, }: {
1095
1097
  search?: string | undefined;
1096
1098
  page?: number | undefined;
1097
1099
  limit?: number | undefined;
@@ -1102,6 +1104,7 @@ declare function useVerificationRepo(): {
1102
1104
  email?: string | undefined;
1103
1105
  siteId?: string | undefined;
1104
1106
  orgId?: string | undefined;
1107
+ origin?: string | undefined;
1105
1108
  }) => Promise<{}>;
1106
1109
  getByIdByType: (type: string) => Promise<TVerification[]>;
1107
1110
  updateStatusById: (_id: string | ObjectId, status: string, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
@@ -14931,6 +14934,8 @@ type TVerificationMetadataV2 = {
14931
14934
  siteId?: string | ObjectId;
14932
14935
  siteName?: string;
14933
14936
  serviceProviderOrgId?: string | ObjectId;
14937
+ /** "seven365" when Seven365 sent it - see `invite-origin.util.ts`. */
14938
+ origin?: string;
14934
14939
  verificationCode?: string;
14935
14940
  /** Who sent the invitation. Taken from the session, never from the body. */
14936
14941
  invitedBy?: string | ObjectId;