@7365admin1/core 3.101.0 → 3.102.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 +7 -0
- package/dist/index.d.ts +32 -4
- package/dist/index.js +469 -46
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +577 -153
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/test/customer-site-list.test.mjs +106 -0
- package/test/customer-sites-one-row-per-site.test.mjs +7 -2
- package/test/e2e/customer-site-list.e2e.test.mjs +241 -0
- package/test/e2e/harness.mjs +2 -0
- package/test/e2e/service-provider-invite-approval.e2e.test.mjs +170 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @iservice365/core
|
|
2
2
|
|
|
3
|
+
## 3.102.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 14b2b18: Sites list (`GET /api/customer-sites`): optional `relationship` (own|served), `client` and `category` filters, search across site name, client name and address (literal, no regex), sort by `siteOrgName`. Each row now also carries `relationship`, `siteAddress`, `siteCategory` and, on a served site, `invitation` (who invited this company and when, only when an accepted invitation records this company). The response adds `clients` for the Client filter. Callers that send none of the new params get the same rows as before.
|
|
8
|
+
- f9e2923: Service providers, inviter's view: `GET /service-providers?siteId=&include=engagements` also lists providers on the site through an accepted invitation (read from `customer.sites`, nothing written), and now requires the caller to reach the site. Staff counts are the provider's people assigned to that site. `GET /service-provider-invitations` takes `siteId` and returns each row with the accepting company, who invited and when, when it was answered, contact details once accepted, and whether the provider is still on the site.
|
|
9
|
+
|
|
3
10
|
## 3.101.0
|
|
4
11
|
|
|
5
12
|
### Minor Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -2805,6 +2805,11 @@ declare function useServiceProviderRepo(): {
|
|
|
2805
2805
|
serviceProviderOrgId?: string | ObjectId | undefined;
|
|
2806
2806
|
}) => Promise<{}>;
|
|
2807
2807
|
updateStatusById: (_id: string | ObjectId, status: string) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
2808
|
+
getEngagedProvidersBySite: (site: string | ObjectId) => Promise<bson.Document[]>;
|
|
2809
|
+
getSiteProviderKeys: (site: string | ObjectId) => Promise<{
|
|
2810
|
+
orgIds: Set<any>;
|
|
2811
|
+
emails: Set<string>;
|
|
2812
|
+
}>;
|
|
2808
2813
|
};
|
|
2809
2814
|
|
|
2810
2815
|
declare function useServiceProviderController(): {
|
|
@@ -5938,7 +5943,7 @@ declare function MCustomerSite(value: TCustomerSite): {
|
|
|
5938
5943
|
declare function useCustomerSiteRepo(): {
|
|
5939
5944
|
createIndexes: () => Promise<void>;
|
|
5940
5945
|
add: (value: TCustomerSite, session?: ClientSession) => Promise<ObjectId>;
|
|
5941
|
-
getAll: ({ search, page, limit, sort, org, status, siteScope, }: {
|
|
5946
|
+
getAll: ({ search, page, limit, sort, org, status, siteScope, relationship, client, category, }: {
|
|
5942
5947
|
search?: string | undefined;
|
|
5943
5948
|
page?: number | undefined;
|
|
5944
5949
|
limit?: number | undefined;
|
|
@@ -5952,6 +5957,12 @@ declare function useCustomerSiteRepo(): {
|
|
|
5952
5957
|
* counts and `pageRange` describe what the caller can actually see.
|
|
5953
5958
|
*/
|
|
5954
5959
|
siteScope?: string[] | null | undefined;
|
|
5960
|
+
/** "own" | "served" | "" (all). See customer-site-list.util. */
|
|
5961
|
+
relationship?: string | undefined;
|
|
5962
|
+
/** Only the sites this client organisation owns. */
|
|
5963
|
+
client?: string | undefined;
|
|
5964
|
+
/** The site's category (live from the site, the row as a fallback). */
|
|
5965
|
+
category?: string | undefined;
|
|
5955
5966
|
}, session?: ClientSession) => Promise<{}>;
|
|
5956
5967
|
getByName: (value: {
|
|
5957
5968
|
name: string;
|
|
@@ -14805,10 +14816,12 @@ declare function useVerificationRepoV2(): {
|
|
|
14805
14816
|
where?: Record<string, any> | undefined;
|
|
14806
14817
|
session?: ClientSession | undefined;
|
|
14807
14818
|
}) => Promise<any>;
|
|
14808
|
-
getServiceProviderInvites: ({ statuses, orgIds, email, search, includeDeleted, page, limit, }: {
|
|
14819
|
+
getServiceProviderInvites: ({ statuses, orgIds, email, siteId, search, includeDeleted, page, limit, }: {
|
|
14809
14820
|
statuses?: string[] | undefined;
|
|
14810
14821
|
orgIds?: string[] | undefined;
|
|
14811
14822
|
email?: string | undefined;
|
|
14823
|
+
/** One site's invitations; the id is matched in both stored forms. */
|
|
14824
|
+
siteId?: string | undefined;
|
|
14812
14825
|
search?: string | undefined;
|
|
14813
14826
|
includeDeleted?: boolean | undefined;
|
|
14814
14827
|
page?: number | undefined;
|
|
@@ -15092,20 +15105,35 @@ declare function useServiceProviderInviteController(): {
|
|
|
15092
15105
|
};
|
|
15093
15106
|
|
|
15094
15107
|
declare function useServiceProviderInviteService(): {
|
|
15095
|
-
listForCaller: ({ userId, orgId, statuses, search, page, limit, }: {
|
|
15108
|
+
listForCaller: ({ userId, orgId, siteId, statuses, search, page, limit, }: {
|
|
15096
15109
|
userId?: string | undefined;
|
|
15097
15110
|
orgId?: string | undefined;
|
|
15111
|
+
/** The site on screen: only its invitations. */
|
|
15112
|
+
siteId?: string | undefined;
|
|
15098
15113
|
statuses?: string[] | undefined;
|
|
15099
15114
|
search?: string | undefined;
|
|
15100
15115
|
page?: number | undefined;
|
|
15101
15116
|
limit?: number | undefined;
|
|
15102
15117
|
}) => Promise<{
|
|
15103
15118
|
items: {
|
|
15119
|
+
metadata: {
|
|
15120
|
+
name: string;
|
|
15121
|
+
};
|
|
15122
|
+
viewStatus: string;
|
|
15104
15123
|
statusLabel: string;
|
|
15124
|
+
companyName: string;
|
|
15125
|
+
providerOrgId: any;
|
|
15126
|
+
service: string;
|
|
15127
|
+
siteName: string;
|
|
15128
|
+
invitedByName: string;
|
|
15129
|
+
invitedAt: string;
|
|
15130
|
+
answeredAt: any;
|
|
15131
|
+
contactEmail: string;
|
|
15132
|
+
contactPhone: string;
|
|
15133
|
+
onSite: boolean;
|
|
15105
15134
|
_id?: ObjectId | undefined;
|
|
15106
15135
|
type: string;
|
|
15107
15136
|
email: string;
|
|
15108
|
-
metadata?: TVerificationMetadataV2 | undefined;
|
|
15109
15137
|
status?: string | undefined;
|
|
15110
15138
|
createdAt: string;
|
|
15111
15139
|
updatedAt?: string | null | undefined;
|