@7365admin1/core 3.99.1-staging.372 → 3.99.1-staging.374

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.
@@ -0,0 +1,5 @@
1
+ ---
2
+ "@7365admin1/core": minor
3
+ ---
4
+
5
+ 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.
@@ -0,0 +1,5 @@
1
+ ---
2
+ "@7365admin1/core": minor
3
+ ---
4
+
5
+ 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.
package/dist/index.d.ts CHANGED
@@ -2821,6 +2821,11 @@ declare function useServiceProviderRepo(): {
2821
2821
  serviceProviderOrgId?: string | ObjectId | undefined;
2822
2822
  }) => Promise<{}>;
2823
2823
  updateStatusById: (_id: string | ObjectId, status: string) => Promise<mongodb.UpdateResult<bson.Document>>;
2824
+ getEngagedProvidersBySite: (site: string | ObjectId) => Promise<bson.Document[]>;
2825
+ getSiteProviderKeys: (site: string | ObjectId) => Promise<{
2826
+ orgIds: Set<any>;
2827
+ emails: Set<string>;
2828
+ }>;
2824
2829
  };
2825
2830
 
2826
2831
  declare function useServiceProviderController(): {
@@ -5953,7 +5958,7 @@ declare function MCustomerSite(value: TCustomerSite): {
5953
5958
  declare function useCustomerSiteRepo(): {
5954
5959
  createIndexes: () => Promise<void>;
5955
5960
  add: (value: TCustomerSite, session?: ClientSession) => Promise<ObjectId>;
5956
- getAll: ({ search, page, limit, sort, org, status, siteScope, }: {
5961
+ getAll: ({ search, page, limit, sort, org, status, siteScope, relationship, client, category, }: {
5957
5962
  search?: string | undefined;
5958
5963
  page?: number | undefined;
5959
5964
  limit?: number | undefined;
@@ -5967,6 +5972,12 @@ declare function useCustomerSiteRepo(): {
5967
5972
  * counts and `pageRange` describe what the caller can actually see.
5968
5973
  */
5969
5974
  siteScope?: string[] | null | undefined;
5975
+ /** "own" | "served" | "" (all). See customer-site-list.util. */
5976
+ relationship?: string | undefined;
5977
+ /** Only the sites this client organisation owns. */
5978
+ client?: string | undefined;
5979
+ /** The site's category (live from the site, the row as a fallback). */
5980
+ category?: string | undefined;
5970
5981
  }, session?: ClientSession) => Promise<{}>;
5971
5982
  getByName: (value: {
5972
5983
  name: string;
@@ -14982,10 +14993,12 @@ declare function useVerificationRepoV2(): {
14982
14993
  where?: Record<string, any> | undefined;
14983
14994
  session?: ClientSession | undefined;
14984
14995
  }) => Promise<any>;
14985
- getServiceProviderInvites: ({ statuses, orgIds, email, search, includeDeleted, page, limit, }: {
14996
+ getServiceProviderInvites: ({ statuses, orgIds, email, siteId, search, includeDeleted, page, limit, }: {
14986
14997
  statuses?: string[] | undefined;
14987
14998
  orgIds?: string[] | undefined;
14988
14999
  email?: string | undefined;
15000
+ /** One site's invitations; the id is matched in both stored forms. */
15001
+ siteId?: string | undefined;
14989
15002
  search?: string | undefined;
14990
15003
  includeDeleted?: boolean | undefined;
14991
15004
  page?: number | undefined;
@@ -15269,20 +15282,35 @@ declare function useServiceProviderInviteController(): {
15269
15282
  };
15270
15283
 
15271
15284
  declare function useServiceProviderInviteService(): {
15272
- listForCaller: ({ userId, orgId, statuses, search, page, limit, }: {
15285
+ listForCaller: ({ userId, orgId, siteId, statuses, search, page, limit, }: {
15273
15286
  userId?: string | undefined;
15274
15287
  orgId?: string | undefined;
15288
+ /** The site on screen: only its invitations. */
15289
+ siteId?: string | undefined;
15275
15290
  statuses?: string[] | undefined;
15276
15291
  search?: string | undefined;
15277
15292
  page?: number | undefined;
15278
15293
  limit?: number | undefined;
15279
15294
  }) => Promise<{
15280
15295
  items: {
15296
+ metadata: {
15297
+ name: string;
15298
+ };
15299
+ viewStatus: string;
15281
15300
  statusLabel: string;
15301
+ companyName: string;
15302
+ providerOrgId: any;
15303
+ service: string;
15304
+ siteName: string;
15305
+ invitedByName: string;
15306
+ invitedAt: string;
15307
+ answeredAt: any;
15308
+ contactEmail: string;
15309
+ contactPhone: string;
15310
+ onSite: boolean;
15282
15311
  _id?: ObjectId | undefined;
15283
15312
  type: string;
15284
15313
  email: string;
15285
- metadata?: TVerificationMetadataV2 | undefined;
15286
15314
  status?: string | undefined;
15287
15315
  createdAt: string;
15288
15316
  updatedAt?: string | null | undefined;