@hanzo/rooms 0.1.1 → 0.1.2

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/dist/lib/tiers.js CHANGED
@@ -33,7 +33,7 @@
33
33
  import { useEffect, useState } from 'react';
34
34
  import { useIam, useOrganizations } from '@hanzo/iam/react';
35
35
  import { api } from './api.js';
36
- import { superAdmin as isSuperAdmin } from './session.js';
36
+ import { scope, superAdmin as isSuperAdmin } from './session.js';
37
37
  /** Every tier, for the callers that are entitled to all of them. */
38
38
  const ALL = ['alpha', 'beta'];
39
39
  /**
@@ -81,13 +81,13 @@ export function useTiers() {
81
81
  }
82
82
  const ac = new AbortController();
83
83
  // The PostHog-shaped evaluate: a distinct_id and the person's org, answered
84
- // with `{ featureFlags: { … } }`. The session cookie carries the principal;
85
- // with none the cloud answers 403 and this falls to the empty set, which is
86
- // the signed-out room — the safe direction.
84
+ // with `{ featureFlags: { … } }`. The bearer carries the principal, as on
85
+ // every other read: no host the rooms are drawn on holds a session cookie
86
+ // for the API, so a cookie alone was answered 403 on every page. A refusal
87
+ // still falls to the empty set, the signed-out room — the safe direction.
87
88
  fetch(`${api()}/v1/flags`, {
88
89
  method: 'POST',
89
- credentials: 'include',
90
- headers: { 'content-type': 'application/json' },
90
+ headers: { 'content-type': 'application/json', ...scope() },
91
91
  body: JSON.stringify({ distinct_id: id, person_properties: { org: organizations[0]?.name } }),
92
92
  signal: ac.signal,
93
93
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzo/rooms",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "The workspace rooms — Home, Chat, Inbox, Contacts, Meet, Cal, Drive, Board, Work, Bots — and the frame that holds them, once, for every Hanzo surface.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",