@7365admin1/core 3.32.2-staging.79 → 3.32.2-staging.80
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 +27 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3571 -3445
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3587 -3461
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/test/service-provider-invite.test.mjs +198 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @iservice365/core
|
|
2
2
|
|
|
3
|
+
## 3.41.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 8eb6601: Stop rejecting site names that only differ by their building number
|
|
8
|
+
|
|
9
|
+
Adding a site refused any name within a Levenshtein distance of 2 of an
|
|
10
|
+
existing site in the same organisation, and told the user to contact support.
|
|
11
|
+
That is exactly one character, so "Winsland House II" could not be added next
|
|
12
|
+
to "Winsland House I". The same rule blocked "Tower A" beside "Tower B",
|
|
13
|
+
"Phase 2" beside "Phase 1" and "Block 15" beside "Block 5" — the standard way
|
|
14
|
+
buildings are named here.
|
|
15
|
+
|
|
16
|
+
The check now treats trailing numbers, Roman numerals and single letters as the
|
|
17
|
+
part that tells two buildings apart: if they differ, the names are different
|
|
18
|
+
sites and the distance is never measured. Real duplicates are still refused —
|
|
19
|
+
an exact repeat, a different capitalisation, stray or doubled whitespace,
|
|
20
|
+
punctuation-only differences, and a one or two character typo within the same
|
|
21
|
+
building. "House 1" and "House I" are still read as the same building.
|
|
22
|
+
|
|
23
|
+
The refusal now names the site it matched and says what to do about it instead
|
|
24
|
+
of pointing the user at support.
|
|
25
|
+
|
|
26
|
+
`site.repo.getByExactName` also built its case-insensitive regex from the raw
|
|
27
|
+
name; a name containing regex characters either threw or matched a site it is
|
|
28
|
+
not. It is escaped.
|
|
29
|
+
|
|
3
30
|
## 3.41.0
|
|
4
31
|
|
|
5
32
|
### Minor Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -3625,6 +3625,7 @@ declare function useCustomerSiteRepo(): {
|
|
|
3625
3625
|
name: string;
|
|
3626
3626
|
org: string | ObjectId;
|
|
3627
3627
|
}) => Promise<TCustomerSite[]>;
|
|
3628
|
+
countActiveByOrgAndSite: (org: string | ObjectId, site: string | ObjectId) => Promise<number>;
|
|
3628
3629
|
getBySiteAsServiceProvider: (site: string | ObjectId) => Promise<{} | undefined>;
|
|
3629
3630
|
getById: (id: string | ObjectId) => Promise<mongodb.WithId<bson.Document>>;
|
|
3630
3631
|
updateCustomerSiteById: (id: string | ObjectId, payload: Partial<TCustomerSite>, session?: ClientSession) => Promise<mongodb.WithId<bson.Document>>;
|
|
@@ -3633,7 +3634,7 @@ declare function useCustomerSiteRepo(): {
|
|
|
3633
3634
|
|
|
3634
3635
|
declare function useCustomerSiteService(): {
|
|
3635
3636
|
add: (value: TCustomerSite) => Promise<string>;
|
|
3636
|
-
addViaInvite: (invite: string) => Promise<
|
|
3637
|
+
addViaInvite: (invite: string) => Promise<"This site is already on your list." | "Invite accepted, successfully added site.">;
|
|
3637
3638
|
updateCusSiteById: (customerSiteId: string, payload: Partial<TCustomerSite>) => Promise<mongodb.WithId<bson.Document>>;
|
|
3638
3639
|
};
|
|
3639
3640
|
|
|
@@ -8100,6 +8101,7 @@ declare function useVerificationRepoV2(): {
|
|
|
8100
8101
|
updateStatusById: (_id: string | ObjectId, status: string, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
8101
8102
|
countPendingOrgInvites: (orgId: string | ObjectId) => Promise<number>;
|
|
8102
8103
|
getPendingVerificationByEmail: (email: string) => Promise<TVerificationV2 | null>;
|
|
8104
|
+
getPendingServiceProviderInvite: (email: string, siteId: string) => Promise<TVerificationV2 | null>;
|
|
8103
8105
|
updateVerificationCodeById: (_id: string | ObjectId, verificationCode: string, expireAt: string, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
8104
8106
|
completePendingInvites: ({ email, orgId, siteId, app, session, }: {
|
|
8105
8107
|
email: string;
|