@ai-matrx/meet 0.10.5 → 0.10.7

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/index.cjs CHANGED
@@ -47,6 +47,7 @@ __export(src_exports, {
47
47
  GUEST_RECORD_NOT_SHARED: () => GUEST_RECORD_NOT_SHARED,
48
48
  IDLE_MEDIA: () => IDLE_MEDIA,
49
49
  IDLE_TRACK: () => IDLE_TRACK,
50
+ JOIN_REFUSAL_REASONS: () => JOIN_REFUSAL_REASONS,
50
51
  LISTEN_ONLY_NOTICE: () => LISTEN_ONLY_NOTICE,
51
52
  MEETING_INVITE_KIND: () => MEETING_INVITE_KIND,
52
53
  MEETING_INVITE_VERSION: () => MEETING_INVITE_VERSION,
@@ -105,6 +106,7 @@ __export(src_exports, {
105
106
  canModerateParticipant: () => canModerateParticipant,
106
107
  canTransition: () => canTransition,
107
108
  captionSegment: () => captionSegment,
109
+ captureHeldOf: () => captureHeldOf,
108
110
  changesPatch: () => changesPatch,
109
111
  clockPosition: () => clockPosition,
110
112
  collabFromState: () => collabFromState,
@@ -144,6 +146,7 @@ __export(src_exports, {
144
146
  isGuest: () => isGuest,
145
147
  isGuestIdentity: () => isGuestIdentity,
146
148
  isHostRole: () => isHostRole,
149
+ isJoinRefusalReason: () => isJoinRefusalReason,
147
150
  isLinkFollower: () => isLinkFollower,
148
151
  isListenOnly: () => isListenOnly,
149
152
  isNoteTaker: () => isNoteTaker,
@@ -282,7 +285,7 @@ function humanDatabaseSentence(message) {
282
285
  return text3;
283
286
  }
284
287
  var FORBIDDEN_CODES = /* @__PURE__ */ new Set(["42501", "PGRST301", "PGRST302"]);
285
- var NOT_FOUND_CODES = /* @__PURE__ */ new Set(["PGRST116", "PGRST205"]);
288
+ var NOT_FOUND_CODES = /* @__PURE__ */ new Set(["PGRST116", "PGRST205", "P0002"]);
286
289
  var CONFLICT_CODES = /* @__PURE__ */ new Set(["23505", "40001", "55000"]);
287
290
  var SESSION_MARKERS = [
288
291
  "auth session missing",
@@ -318,7 +321,8 @@ function normalizeMeetError(error, operation) {
318
321
  "not-found",
319
322
  `${operation}: not found (${code}: ${message})`,
320
323
  "The row is gone, or RLS hides it. If this is PGRST205 the communication.meet_* tables are not deployed yet \u2014 see MEET_SCHEMA in repository.ts for the exact contract.",
321
- error
324
+ error,
325
+ "not_found"
322
326
  );
323
327
  }
324
328
  if (code !== void 0 && CONFLICT_CODES.has(code)) {
@@ -2451,6 +2455,10 @@ function appPanelOf(meeting) {
2451
2455
  if (typeof recordId !== "string" || recordId.length === 0) return null;
2452
2456
  return { key, recordId };
2453
2457
  }
2458
+ function captureHeldOf(meeting) {
2459
+ if (!meeting) return false;
2460
+ return meeting.metadata?.["capture_hold"] === "confidential_record" && !meeting.aiEnabled && meeting.recordingPolicy === "disabled";
2461
+ }
2454
2462
  function scheduleSettingsPatch(settings, appPanel, observers) {
2455
2463
  const patch = settingsPatch(settings);
2456
2464
  if (appPanel !== void 0) patch["app_panel"] = { key: appPanel.key, record_id: appPanel.recordId };
@@ -6845,6 +6853,28 @@ function createMeetingRecordCache(options = {}) {
6845
6853
  };
6846
6854
  }
6847
6855
 
6856
+ // src/core/reasons.ts
6857
+ var JOIN_REFUSAL_REASONS = [
6858
+ "not_found",
6859
+ "cancelled",
6860
+ "ended",
6861
+ "expired",
6862
+ "too_early",
6863
+ "sign_in_required",
6864
+ "wrong_account",
6865
+ "not_invited",
6866
+ "locked",
6867
+ "removed",
6868
+ "lobby_rejects",
6869
+ "meeting_full",
6870
+ "platform_capacity",
6871
+ "verification_required",
6872
+ "registration_required"
6873
+ ];
6874
+ function isJoinRefusalReason(value) {
6875
+ return typeof value === "string" && JOIN_REFUSAL_REASONS.includes(value);
6876
+ }
6877
+
6848
6878
  // src/core/reactions.ts
6849
6879
  var MEET_REACTIONS = ["\u{1F496}", "\u{1F44D}", "\u{1F389}", "\u{1F44F}", "\u{1F602}", "\u{1F62E}", "\u{1F622}", "\u{1F914}", "\u{1F44E}"];
6850
6880