@7365admin1/layer-common 4.35.1-staging.389 → 4.35.1-staging.391

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.
@@ -636,6 +636,8 @@ async function fetchPending() {
636
636
  const res = await getVerifications({
637
637
  status: 'pending',
638
638
  type: 'user-invite',
639
+ // Only what Seven365 sent - never a client's own invitations (owner, 2026-09-25).
640
+ origin: 'seven365',
639
641
  page: page.value,
640
642
  search: search.value,
641
643
  email: search.value,
@@ -1482,12 +1482,15 @@ async function loadSipAccount() {
1482
1482
  }
1483
1483
 
1484
1484
  async function loadSipAccounts() {
1485
- if (!props.org || !props.site) return;
1485
+ // Site only. The contact list belongs to the door, not to an organization,
1486
+ // so the picker loads wherever a site is known - including the screens that
1487
+ // are opened without an `org` prop.
1488
+ if (!props.site) return;
1486
1489
 
1487
1490
  sipAccountsLoading.value = true;
1488
1491
  sipAccountsError.value = "";
1489
1492
  try {
1490
- const response = await getSipAccounts(props.site, props.org);
1493
+ const response = await getSipAccounts(props.site);
1491
1494
  const rows = toRecord(response).data;
1492
1495
  sipAccounts.value = Array.isArray(rows) ? rows as HidSipAccountListItem[] : [];
1493
1496
  // An existing contact opened before the list arrived: once its name is
@@ -593,10 +593,16 @@ export default function useHidAmico() {
593
593
  );
594
594
  }
595
595
 
596
- function getSipAccounts(siteId: string, orgId: string) {
596
+ /**
597
+ * The site's SIP accounts for the intercom contact picker. Site-scoped only:
598
+ * the organisation never decided who may read this — the site guard does —
599
+ * and sending one narrowed the list on a customer site whose accounts were
600
+ * provisioned by a managing agent.
601
+ */
602
+ function getSipAccounts(siteId: string) {
597
603
  return useNuxtApp().$api<{ data: HidSipAccountListItem[] }>(
598
604
  `${basePath}/sites/${siteId}/intercom/sip-accounts`,
599
- { method: "GET", query: { orgId } },
605
+ { method: "GET" },
600
606
  );
601
607
  }
602
608
 
@@ -9,6 +9,8 @@ export default function useVerification() {
9
9
  siteId = "",
10
10
  orgId = "",
11
11
  limit = 20,
12
+ // "seven365": only the invitations Seven365 sent (the console's lists).
13
+ origin = "",
12
14
  } = {}): Promise<{
13
15
  items: TMiniVerification[];
14
16
  pages: number;
@@ -16,7 +18,11 @@ export default function useVerification() {
16
18
  }> {
17
19
  return useNuxtApp().$api("/api/verifications", {
18
20
  method: "GET",
19
- query: { status, search, page, type, email, app, siteId, orgId, limit },
21
+ query: {
22
+ status, search, page, type, email, app, siteId, orgId, limit,
23
+ // Sent only when asked for: an older API refuses a key it does not know.
24
+ ...(origin && { origin }),
25
+ },
20
26
  });
21
27
  }
22
28
 
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@7365admin1/layer-common",
3
3
  "license": "MIT",
4
4
  "type": "module",
5
- "version": "4.35.1-staging.389",
5
+ "version": "4.35.1-staging.391",
6
6
  "author": "7365admin1",
7
7
  "main": "./nuxt.config.ts",
8
8
  "//files": "What a consumer extending this layer actually loads. Without this npm ships the whole working tree - the changesets, the CI workflows, the render harness in tools/ and any scratch directory that happened to exist at publish time. Nuxt resolves a layer by directory, so every runtime directory below has to stay listed; adding a new top-level runtime directory means adding it here too.",