@streamoid/settings 0.3.5 → 0.3.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.d.mts CHANGED
@@ -9,7 +9,7 @@ import { SVGProps, ReactNode } from 'react';
9
9
  * so consumers don't have to re-implement tab/URL conversion if they don't
10
10
  * want to.
11
11
  */
12
- type SettingsTab = "profile" | "workspace" | "referral" | "team" | "billing" | "apikey";
12
+ type SettingsTab = "profile" | "workspace" | "referral" | "team" | "organization" | "billing" | "apikey";
13
13
  /** Internal tab id → URL slug. */
14
14
  declare const TAB_TO_URL: Record<SettingsTab, string>;
15
15
  /** URL slug → internal tab id. */
@@ -90,6 +90,20 @@ interface SettingsWorkspaceCurrent {
90
90
  totalCredits?: number | null;
91
91
  /** ISO country code for the workspace; drives plan currency selection. */
92
92
  country?: string;
93
+ /**
94
+ * Organization multi-tenancy — present when the workspace has joined (or is
95
+ * pending to join) an org. `undefined`/absent means the workspace has no
96
+ * org affiliation, in which case the Workspace modal offers "Request to
97
+ * join organization" instead of the visibility toggle / leave action.
98
+ */
99
+ organizationId?: string;
100
+ /**
101
+ * "private" = only members of this workspace can see it; "shared" = every
102
+ * member of the parent org gets implicit view-only access. Toggled from
103
+ * the Workspace tab; org admins always have full implicit access
104
+ * regardless of this flag (host-side rule, not enforced by this package).
105
+ */
106
+ orgVisibility?: "private" | "shared";
93
107
  }
94
108
  interface SettingsWorkspaceListItem {
95
109
  _id: string;
@@ -155,6 +169,156 @@ interface SettingsWorkspaceAdapter {
155
169
  * to) re-running `list()`. Lets the host re-sync its own context state.
156
170
  */
157
171
  refresh?: () => Promise<void>;
172
+ /**
173
+ * Request to join an org from the workspace side. Creates a pending
174
+ * workspace-join-request that an org admin later approves/rejects via
175
+ * `SettingsOrganizationAdapter.approveJoinRequest`.
176
+ */
177
+ requestJoinOrganization?: (organizationId: string) => Promise<void>;
178
+ /** Leave the org this workspace currently belongs to. */
179
+ leaveOrganization?: () => Promise<void>;
180
+ /** Toggle this workspace's `orgVisibility` within its parent org. */
181
+ setOrgVisibility?: (visibility: "private" | "shared") => Promise<void>;
182
+ }
183
+ interface SettingsOrganizationListItem {
184
+ _id: string;
185
+ name: string;
186
+ imageUrl?: string;
187
+ role?: "admin" | "member";
188
+ }
189
+ interface SettingsOrganizationCurrent {
190
+ id: string;
191
+ name?: string;
192
+ imageUrl?: string;
193
+ role?: "admin" | "member" | string;
194
+ }
195
+ interface OrganizationMember {
196
+ _id: string;
197
+ role: "admin" | "member";
198
+ inviteAccess: boolean;
199
+ /** Populated user. Rows whose user document was deleted come back from the
200
+ * API with a null `user` — OrganizationContent drops those on fetch, so
201
+ * every render site can treat this as present. */
202
+ user: {
203
+ _id: string;
204
+ email: string;
205
+ name: string;
206
+ createdAt?: string;
207
+ };
208
+ createdAt?: string;
209
+ invitedBy?: string | {
210
+ email?: string;
211
+ name?: string;
212
+ };
213
+ }
214
+ /** A single row in the combined Organization invites table. */
215
+ interface OrganizationInvite {
216
+ _id: string;
217
+ kind: "email" | "domain";
218
+ email?: string;
219
+ domain?: string;
220
+ status: "active" | "revoked" | "cancelled" | "rejected" | "expired" | "completed";
221
+ token?: string;
222
+ role?: "admin" | "member";
223
+ autoJoinRole?: "admin" | "member";
224
+ invitedBy?: string | {
225
+ email?: string;
226
+ name?: string;
227
+ };
228
+ createdAt?: string;
229
+ }
230
+ interface OrganizationWorkspaceItem {
231
+ _id: string;
232
+ name: string;
233
+ imageUrl?: string;
234
+ orgVisibility: "private" | "shared";
235
+ }
236
+ interface OrganizationJoinRequest {
237
+ _id: string;
238
+ workspace: {
239
+ _id: string;
240
+ name: string;
241
+ imageUrl?: string;
242
+ };
243
+ requester: {
244
+ _id: string;
245
+ name?: string;
246
+ email: string;
247
+ };
248
+ createdAt?: string;
249
+ }
250
+ /** Result of checking whether the current user's email domain already has
251
+ * an org claiming it via a domain invite — drives the "an organization
252
+ * already exists for your company" prompt in the create-organization
253
+ * empty state, so people don't fragment a company across duplicate orgs. */
254
+ interface OrganizationDomainMatch {
255
+ organizationId: string;
256
+ organizationName: string;
257
+ domain: string;
258
+ }
259
+ /**
260
+ * Mirrors `SettingsWorkspaceAdapter` conventions: `current` is embedded
261
+ * reactive state the host re-creates on change; lists are fetched on demand;
262
+ * mutations are fire-then-refetch and throw on failure.
263
+ */
264
+ interface SettingsOrganizationAdapter {
265
+ current: SettingsOrganizationCurrent | null;
266
+ list: () => Promise<SettingsOrganizationListItem[]>;
267
+ create: (input: {
268
+ name: string;
269
+ imageFile?: File | null;
270
+ }) => Promise<{
271
+ id: string;
272
+ } | void>;
273
+ update: (id: string, patch: {
274
+ name?: string;
275
+ imageFile?: File | null;
276
+ imageUrl?: string | null;
277
+ }) => Promise<void>;
278
+ switch: (id: string) => Promise<void>;
279
+ delete: (id: string) => Promise<void>;
280
+ fetchMembers: () => Promise<OrganizationMember[]>;
281
+ /** Merged email + domain invites, tagged by `kind`. Drives a single
282
+ * combined pending-invites table (not two separate lists). */
283
+ fetchInvites: () => Promise<OrganizationInvite[]>;
284
+ inviteMemberByEmail: (input: {
285
+ email: string;
286
+ role: "admin" | "member";
287
+ inviteAccess: boolean;
288
+ }) => Promise<void>;
289
+ inviteDomain: (input: {
290
+ domain: string;
291
+ autoJoinRole: "admin" | "member";
292
+ }) => Promise<void>;
293
+ /** Revoke a domain invite. Only stops *future* auto-joins — does not
294
+ * remove members who already joined via that domain. */
295
+ revokeDomainInvite: (id: string) => Promise<void>;
296
+ cancelInvite: (token: string) => Promise<void>;
297
+ resendInvite: (invitationId: string) => Promise<void>;
298
+ removeMember: (input: {
299
+ userIds?: string[];
300
+ invitationIds?: string[];
301
+ }) => Promise<void>;
302
+ updateMemberRole: (input: {
303
+ userId: string;
304
+ role: "admin" | "member";
305
+ inviteAccess?: boolean;
306
+ }) => Promise<void>;
307
+ /** Optional: gates write affordances inside the Organization tab. */
308
+ getHighestRole?: () => Promise<{
309
+ role: "admin" | "member";
310
+ }>;
311
+ fetchWorkspaces: () => Promise<OrganizationWorkspaceItem[]>;
312
+ fetchJoinRequests: () => Promise<OrganizationJoinRequest[]>;
313
+ approveJoinRequest: (requestId: string) => Promise<void>;
314
+ rejectJoinRequest: (requestId: string) => Promise<void>;
315
+ /** Checks whether the current user's email domain already has an org
316
+ * claiming it. Called when `current` is null, before showing the
317
+ * "create organization" empty state. */
318
+ checkDomainMatch: () => Promise<OrganizationDomainMatch | null>;
319
+ /** Self-service join for the domain-match prompt — domain invites are
320
+ * auto-join by design, so this doesn't need admin approval. */
321
+ joinByDomain: () => Promise<void>;
158
322
  }
159
323
  type TokenExpiry = "30d" | "60d" | "90d" | "1y" | "never";
160
324
  interface ApiToken {
@@ -553,6 +717,7 @@ interface SettingsImageUploadAdapter {
553
717
  interface SettingsAdapters {
554
718
  auth: SettingsAuthAdapter;
555
719
  workspace: SettingsWorkspaceAdapter;
720
+ organization: SettingsOrganizationAdapter;
556
721
  api: SettingsApiAdapter;
557
722
  navigation: SettingsNavigationAdapter;
558
723
  toast: SettingsToastAdapter;
@@ -602,6 +767,12 @@ declare function TeamsContent({ embedded, onInviteOpen, onInviteOpenChange, }?:
602
767
  onInviteOpenChange?: (open: boolean) => void;
603
768
  }): react_jsx_runtime.JSX.Element;
604
769
 
770
+ declare function OrganizationContent({ embedded, onInviteOpen, onInviteOpenChange, }?: {
771
+ embedded?: boolean;
772
+ onInviteOpen?: boolean;
773
+ onInviteOpenChange?: (open: boolean) => void;
774
+ }): react_jsx_runtime.JSX.Element;
775
+
605
776
  declare function TokensContent({ embedded, showRevokedOverride, onShowRevokedChange: _onShowRevokedChange, createOpenOverride, onCreateOpenChange, }?: {
606
777
  embedded?: boolean;
607
778
  showRevokedOverride?: boolean;
@@ -646,6 +817,55 @@ interface WorkspaceModalProps {
646
817
  }
647
818
  declare function WorkspaceModal({ open, mode, workspace, onClose, onCreate, onUpdate, onLeave, onDelete, }: WorkspaceModalProps): react_jsx_runtime.JSX.Element | null;
648
819
 
820
+ interface OrganizationData {
821
+ id: string;
822
+ name: string;
823
+ initials: string;
824
+ role: string;
825
+ isCurrent: boolean;
826
+ imageUrl?: string;
827
+ imageName?: string;
828
+ }
829
+ interface OrganizationModalProps {
830
+ open: boolean;
831
+ mode: "create" | "update";
832
+ organization?: OrganizationData | null;
833
+ onClose: () => void;
834
+ onCreate?: (name: string, imageFile: File | null) => void | boolean | Promise<void | boolean>;
835
+ onUpdate?: (name: string, imageFile: File | null, imageRemoved: boolean) => void | boolean | Promise<void | boolean>;
836
+ onDelete?: () => void | boolean | Promise<void | boolean>;
837
+ }
838
+ declare function OrganizationModal({ open, mode, organization, onClose, onCreate, onUpdate, onDelete, }: OrganizationModalProps): react_jsx_runtime.JSX.Element | null;
839
+
840
+ type ModalMode$1 = "invite" | "update";
841
+ interface OrganizationInviteModalProps {
842
+ open: boolean;
843
+ mode: ModalMode$1;
844
+ /** Update mode: the target member's email (read-only display). */
845
+ userEmail?: string;
846
+ initialRole?: "admin" | "member";
847
+ initialInviteAccess?: boolean;
848
+ /** Lets a pending-invite row reopen this modal to resend without edits. */
849
+ allowSubmitWithoutChanges?: boolean;
850
+ canRemove?: boolean;
851
+ onClose: () => void;
852
+ onInviteEmail?: (input: {
853
+ email: string;
854
+ role: "admin" | "member";
855
+ inviteAccess: boolean;
856
+ }) => void;
857
+ onInviteDomain?: (input: {
858
+ domain: string;
859
+ autoJoinRole: "admin" | "member";
860
+ }) => void;
861
+ onUpdate?: (input: {
862
+ role: "admin" | "member";
863
+ inviteAccess: boolean;
864
+ }) => void;
865
+ onRemove?: () => void;
866
+ }
867
+ declare function OrganizationInviteModal({ open, mode, userEmail, initialRole, initialInviteAccess, allowSubmitWithoutChanges, canRemove, onClose, onInviteEmail, onInviteDomain, onUpdate, onRemove, }: OrganizationInviteModalProps): react_jsx_runtime.JSX.Element | null;
868
+
649
869
  interface ConfirmLeaveModalProps {
650
870
  open: boolean;
651
871
  workspaceName: string;
@@ -740,4 +960,4 @@ declare function SettingsAdaptersProvider({ adapters, children, }: {
740
960
  */
741
961
  declare function useSettingsAdapters(): SettingsAdapters;
742
962
 
743
- export { type ApiToken, type AvailableCreditsResponse, BillingContent, type BillingEventPayload, type BillingProduct, type BillingSubscription, BuyCreditsModal, type BuyCreditsPayload, type BuyCreditsResponse, ConfirmDeleteModal, ConfirmLeaveModal, type CreatedToken, type CustomCreditInfo, type CustomCreditResponse, DEFAULT_PERMISSIONS, ExportDateModal, InviteUpdateModal, type InvoicePdfResponse, type MemberPermissionsPayload, type Price, type PriceMetadata, type ProductsResponse, ProfileAvatar, ProfileTab, ReferralTab, type ServiceItem, type SettingsAdapters, SettingsAdaptersProvider, type SettingsApiAdapter, type SettingsAuthAdapter, type SettingsAuthUser, SettingsContent, type SettingsContentProps, type SettingsImageUploadAdapter, type SettingsNavigationAdapter, type SettingsTab, type SettingsToastAdapter, type SettingsWorkspaceAdapter, type SettingsWorkspaceCurrent, type SettingsWorkspaceListItem, SiconKey, type StoreItem, type SubscriptionPlan, type SubscriptionResponse, TAB_LABELS, TAB_TO_URL, type TeamMember, TeamsContent, type TokenExpiry, TokensContent, URL_TO_TAB, type UpdateSubscriptionPayload, type UpdateSubscriptionResponse, type UsageHistoryItem, type UsageHistoryResponse, type UserPermissions, type WorkspaceData, type WorkspaceInvite, type WorkspaceMember, WorkspaceModal, WorkspaceTab, resolveSettingsTabFromPath, useSettingsAdapters };
963
+ export { type ApiToken, type AvailableCreditsResponse, BillingContent, type BillingEventPayload, type BillingProduct, type BillingSubscription, BuyCreditsModal, type BuyCreditsPayload, type BuyCreditsResponse, ConfirmDeleteModal, ConfirmLeaveModal, type CreatedToken, type CustomCreditInfo, type CustomCreditResponse, DEFAULT_PERMISSIONS, ExportDateModal, InviteUpdateModal, type InvoicePdfResponse, type MemberPermissionsPayload, OrganizationContent, type OrganizationData, type OrganizationInvite, OrganizationInviteModal, type OrganizationInviteModalProps, type OrganizationJoinRequest, type OrganizationMember, OrganizationModal, type OrganizationWorkspaceItem, type Price, type PriceMetadata, type ProductsResponse, ProfileAvatar, ProfileTab, ReferralTab, type ServiceItem, type SettingsAdapters, SettingsAdaptersProvider, type SettingsApiAdapter, type SettingsAuthAdapter, type SettingsAuthUser, SettingsContent, type SettingsContentProps, type SettingsImageUploadAdapter, type SettingsNavigationAdapter, type SettingsOrganizationAdapter, type SettingsOrganizationCurrent, type SettingsOrganizationListItem, type SettingsTab, type SettingsToastAdapter, type SettingsWorkspaceAdapter, type SettingsWorkspaceCurrent, type SettingsWorkspaceListItem, SiconKey, type StoreItem, type SubscriptionPlan, type SubscriptionResponse, TAB_LABELS, TAB_TO_URL, type TeamMember, TeamsContent, type TokenExpiry, TokensContent, URL_TO_TAB, type UpdateSubscriptionPayload, type UpdateSubscriptionResponse, type UsageHistoryItem, type UsageHistoryResponse, type UserPermissions, type WorkspaceData, type WorkspaceInvite, type WorkspaceMember, WorkspaceModal, WorkspaceTab, resolveSettingsTabFromPath, useSettingsAdapters };
package/dist/index.d.ts CHANGED
@@ -9,7 +9,7 @@ import { SVGProps, ReactNode } from 'react';
9
9
  * so consumers don't have to re-implement tab/URL conversion if they don't
10
10
  * want to.
11
11
  */
12
- type SettingsTab = "profile" | "workspace" | "referral" | "team" | "billing" | "apikey";
12
+ type SettingsTab = "profile" | "workspace" | "referral" | "team" | "organization" | "billing" | "apikey";
13
13
  /** Internal tab id → URL slug. */
14
14
  declare const TAB_TO_URL: Record<SettingsTab, string>;
15
15
  /** URL slug → internal tab id. */
@@ -90,6 +90,20 @@ interface SettingsWorkspaceCurrent {
90
90
  totalCredits?: number | null;
91
91
  /** ISO country code for the workspace; drives plan currency selection. */
92
92
  country?: string;
93
+ /**
94
+ * Organization multi-tenancy — present when the workspace has joined (or is
95
+ * pending to join) an org. `undefined`/absent means the workspace has no
96
+ * org affiliation, in which case the Workspace modal offers "Request to
97
+ * join organization" instead of the visibility toggle / leave action.
98
+ */
99
+ organizationId?: string;
100
+ /**
101
+ * "private" = only members of this workspace can see it; "shared" = every
102
+ * member of the parent org gets implicit view-only access. Toggled from
103
+ * the Workspace tab; org admins always have full implicit access
104
+ * regardless of this flag (host-side rule, not enforced by this package).
105
+ */
106
+ orgVisibility?: "private" | "shared";
93
107
  }
94
108
  interface SettingsWorkspaceListItem {
95
109
  _id: string;
@@ -155,6 +169,156 @@ interface SettingsWorkspaceAdapter {
155
169
  * to) re-running `list()`. Lets the host re-sync its own context state.
156
170
  */
157
171
  refresh?: () => Promise<void>;
172
+ /**
173
+ * Request to join an org from the workspace side. Creates a pending
174
+ * workspace-join-request that an org admin later approves/rejects via
175
+ * `SettingsOrganizationAdapter.approveJoinRequest`.
176
+ */
177
+ requestJoinOrganization?: (organizationId: string) => Promise<void>;
178
+ /** Leave the org this workspace currently belongs to. */
179
+ leaveOrganization?: () => Promise<void>;
180
+ /** Toggle this workspace's `orgVisibility` within its parent org. */
181
+ setOrgVisibility?: (visibility: "private" | "shared") => Promise<void>;
182
+ }
183
+ interface SettingsOrganizationListItem {
184
+ _id: string;
185
+ name: string;
186
+ imageUrl?: string;
187
+ role?: "admin" | "member";
188
+ }
189
+ interface SettingsOrganizationCurrent {
190
+ id: string;
191
+ name?: string;
192
+ imageUrl?: string;
193
+ role?: "admin" | "member" | string;
194
+ }
195
+ interface OrganizationMember {
196
+ _id: string;
197
+ role: "admin" | "member";
198
+ inviteAccess: boolean;
199
+ /** Populated user. Rows whose user document was deleted come back from the
200
+ * API with a null `user` — OrganizationContent drops those on fetch, so
201
+ * every render site can treat this as present. */
202
+ user: {
203
+ _id: string;
204
+ email: string;
205
+ name: string;
206
+ createdAt?: string;
207
+ };
208
+ createdAt?: string;
209
+ invitedBy?: string | {
210
+ email?: string;
211
+ name?: string;
212
+ };
213
+ }
214
+ /** A single row in the combined Organization invites table. */
215
+ interface OrganizationInvite {
216
+ _id: string;
217
+ kind: "email" | "domain";
218
+ email?: string;
219
+ domain?: string;
220
+ status: "active" | "revoked" | "cancelled" | "rejected" | "expired" | "completed";
221
+ token?: string;
222
+ role?: "admin" | "member";
223
+ autoJoinRole?: "admin" | "member";
224
+ invitedBy?: string | {
225
+ email?: string;
226
+ name?: string;
227
+ };
228
+ createdAt?: string;
229
+ }
230
+ interface OrganizationWorkspaceItem {
231
+ _id: string;
232
+ name: string;
233
+ imageUrl?: string;
234
+ orgVisibility: "private" | "shared";
235
+ }
236
+ interface OrganizationJoinRequest {
237
+ _id: string;
238
+ workspace: {
239
+ _id: string;
240
+ name: string;
241
+ imageUrl?: string;
242
+ };
243
+ requester: {
244
+ _id: string;
245
+ name?: string;
246
+ email: string;
247
+ };
248
+ createdAt?: string;
249
+ }
250
+ /** Result of checking whether the current user's email domain already has
251
+ * an org claiming it via a domain invite — drives the "an organization
252
+ * already exists for your company" prompt in the create-organization
253
+ * empty state, so people don't fragment a company across duplicate orgs. */
254
+ interface OrganizationDomainMatch {
255
+ organizationId: string;
256
+ organizationName: string;
257
+ domain: string;
258
+ }
259
+ /**
260
+ * Mirrors `SettingsWorkspaceAdapter` conventions: `current` is embedded
261
+ * reactive state the host re-creates on change; lists are fetched on demand;
262
+ * mutations are fire-then-refetch and throw on failure.
263
+ */
264
+ interface SettingsOrganizationAdapter {
265
+ current: SettingsOrganizationCurrent | null;
266
+ list: () => Promise<SettingsOrganizationListItem[]>;
267
+ create: (input: {
268
+ name: string;
269
+ imageFile?: File | null;
270
+ }) => Promise<{
271
+ id: string;
272
+ } | void>;
273
+ update: (id: string, patch: {
274
+ name?: string;
275
+ imageFile?: File | null;
276
+ imageUrl?: string | null;
277
+ }) => Promise<void>;
278
+ switch: (id: string) => Promise<void>;
279
+ delete: (id: string) => Promise<void>;
280
+ fetchMembers: () => Promise<OrganizationMember[]>;
281
+ /** Merged email + domain invites, tagged by `kind`. Drives a single
282
+ * combined pending-invites table (not two separate lists). */
283
+ fetchInvites: () => Promise<OrganizationInvite[]>;
284
+ inviteMemberByEmail: (input: {
285
+ email: string;
286
+ role: "admin" | "member";
287
+ inviteAccess: boolean;
288
+ }) => Promise<void>;
289
+ inviteDomain: (input: {
290
+ domain: string;
291
+ autoJoinRole: "admin" | "member";
292
+ }) => Promise<void>;
293
+ /** Revoke a domain invite. Only stops *future* auto-joins — does not
294
+ * remove members who already joined via that domain. */
295
+ revokeDomainInvite: (id: string) => Promise<void>;
296
+ cancelInvite: (token: string) => Promise<void>;
297
+ resendInvite: (invitationId: string) => Promise<void>;
298
+ removeMember: (input: {
299
+ userIds?: string[];
300
+ invitationIds?: string[];
301
+ }) => Promise<void>;
302
+ updateMemberRole: (input: {
303
+ userId: string;
304
+ role: "admin" | "member";
305
+ inviteAccess?: boolean;
306
+ }) => Promise<void>;
307
+ /** Optional: gates write affordances inside the Organization tab. */
308
+ getHighestRole?: () => Promise<{
309
+ role: "admin" | "member";
310
+ }>;
311
+ fetchWorkspaces: () => Promise<OrganizationWorkspaceItem[]>;
312
+ fetchJoinRequests: () => Promise<OrganizationJoinRequest[]>;
313
+ approveJoinRequest: (requestId: string) => Promise<void>;
314
+ rejectJoinRequest: (requestId: string) => Promise<void>;
315
+ /** Checks whether the current user's email domain already has an org
316
+ * claiming it. Called when `current` is null, before showing the
317
+ * "create organization" empty state. */
318
+ checkDomainMatch: () => Promise<OrganizationDomainMatch | null>;
319
+ /** Self-service join for the domain-match prompt — domain invites are
320
+ * auto-join by design, so this doesn't need admin approval. */
321
+ joinByDomain: () => Promise<void>;
158
322
  }
159
323
  type TokenExpiry = "30d" | "60d" | "90d" | "1y" | "never";
160
324
  interface ApiToken {
@@ -553,6 +717,7 @@ interface SettingsImageUploadAdapter {
553
717
  interface SettingsAdapters {
554
718
  auth: SettingsAuthAdapter;
555
719
  workspace: SettingsWorkspaceAdapter;
720
+ organization: SettingsOrganizationAdapter;
556
721
  api: SettingsApiAdapter;
557
722
  navigation: SettingsNavigationAdapter;
558
723
  toast: SettingsToastAdapter;
@@ -602,6 +767,12 @@ declare function TeamsContent({ embedded, onInviteOpen, onInviteOpenChange, }?:
602
767
  onInviteOpenChange?: (open: boolean) => void;
603
768
  }): react_jsx_runtime.JSX.Element;
604
769
 
770
+ declare function OrganizationContent({ embedded, onInviteOpen, onInviteOpenChange, }?: {
771
+ embedded?: boolean;
772
+ onInviteOpen?: boolean;
773
+ onInviteOpenChange?: (open: boolean) => void;
774
+ }): react_jsx_runtime.JSX.Element;
775
+
605
776
  declare function TokensContent({ embedded, showRevokedOverride, onShowRevokedChange: _onShowRevokedChange, createOpenOverride, onCreateOpenChange, }?: {
606
777
  embedded?: boolean;
607
778
  showRevokedOverride?: boolean;
@@ -646,6 +817,55 @@ interface WorkspaceModalProps {
646
817
  }
647
818
  declare function WorkspaceModal({ open, mode, workspace, onClose, onCreate, onUpdate, onLeave, onDelete, }: WorkspaceModalProps): react_jsx_runtime.JSX.Element | null;
648
819
 
820
+ interface OrganizationData {
821
+ id: string;
822
+ name: string;
823
+ initials: string;
824
+ role: string;
825
+ isCurrent: boolean;
826
+ imageUrl?: string;
827
+ imageName?: string;
828
+ }
829
+ interface OrganizationModalProps {
830
+ open: boolean;
831
+ mode: "create" | "update";
832
+ organization?: OrganizationData | null;
833
+ onClose: () => void;
834
+ onCreate?: (name: string, imageFile: File | null) => void | boolean | Promise<void | boolean>;
835
+ onUpdate?: (name: string, imageFile: File | null, imageRemoved: boolean) => void | boolean | Promise<void | boolean>;
836
+ onDelete?: () => void | boolean | Promise<void | boolean>;
837
+ }
838
+ declare function OrganizationModal({ open, mode, organization, onClose, onCreate, onUpdate, onDelete, }: OrganizationModalProps): react_jsx_runtime.JSX.Element | null;
839
+
840
+ type ModalMode$1 = "invite" | "update";
841
+ interface OrganizationInviteModalProps {
842
+ open: boolean;
843
+ mode: ModalMode$1;
844
+ /** Update mode: the target member's email (read-only display). */
845
+ userEmail?: string;
846
+ initialRole?: "admin" | "member";
847
+ initialInviteAccess?: boolean;
848
+ /** Lets a pending-invite row reopen this modal to resend without edits. */
849
+ allowSubmitWithoutChanges?: boolean;
850
+ canRemove?: boolean;
851
+ onClose: () => void;
852
+ onInviteEmail?: (input: {
853
+ email: string;
854
+ role: "admin" | "member";
855
+ inviteAccess: boolean;
856
+ }) => void;
857
+ onInviteDomain?: (input: {
858
+ domain: string;
859
+ autoJoinRole: "admin" | "member";
860
+ }) => void;
861
+ onUpdate?: (input: {
862
+ role: "admin" | "member";
863
+ inviteAccess: boolean;
864
+ }) => void;
865
+ onRemove?: () => void;
866
+ }
867
+ declare function OrganizationInviteModal({ open, mode, userEmail, initialRole, initialInviteAccess, allowSubmitWithoutChanges, canRemove, onClose, onInviteEmail, onInviteDomain, onUpdate, onRemove, }: OrganizationInviteModalProps): react_jsx_runtime.JSX.Element | null;
868
+
649
869
  interface ConfirmLeaveModalProps {
650
870
  open: boolean;
651
871
  workspaceName: string;
@@ -740,4 +960,4 @@ declare function SettingsAdaptersProvider({ adapters, children, }: {
740
960
  */
741
961
  declare function useSettingsAdapters(): SettingsAdapters;
742
962
 
743
- export { type ApiToken, type AvailableCreditsResponse, BillingContent, type BillingEventPayload, type BillingProduct, type BillingSubscription, BuyCreditsModal, type BuyCreditsPayload, type BuyCreditsResponse, ConfirmDeleteModal, ConfirmLeaveModal, type CreatedToken, type CustomCreditInfo, type CustomCreditResponse, DEFAULT_PERMISSIONS, ExportDateModal, InviteUpdateModal, type InvoicePdfResponse, type MemberPermissionsPayload, type Price, type PriceMetadata, type ProductsResponse, ProfileAvatar, ProfileTab, ReferralTab, type ServiceItem, type SettingsAdapters, SettingsAdaptersProvider, type SettingsApiAdapter, type SettingsAuthAdapter, type SettingsAuthUser, SettingsContent, type SettingsContentProps, type SettingsImageUploadAdapter, type SettingsNavigationAdapter, type SettingsTab, type SettingsToastAdapter, type SettingsWorkspaceAdapter, type SettingsWorkspaceCurrent, type SettingsWorkspaceListItem, SiconKey, type StoreItem, type SubscriptionPlan, type SubscriptionResponse, TAB_LABELS, TAB_TO_URL, type TeamMember, TeamsContent, type TokenExpiry, TokensContent, URL_TO_TAB, type UpdateSubscriptionPayload, type UpdateSubscriptionResponse, type UsageHistoryItem, type UsageHistoryResponse, type UserPermissions, type WorkspaceData, type WorkspaceInvite, type WorkspaceMember, WorkspaceModal, WorkspaceTab, resolveSettingsTabFromPath, useSettingsAdapters };
963
+ export { type ApiToken, type AvailableCreditsResponse, BillingContent, type BillingEventPayload, type BillingProduct, type BillingSubscription, BuyCreditsModal, type BuyCreditsPayload, type BuyCreditsResponse, ConfirmDeleteModal, ConfirmLeaveModal, type CreatedToken, type CustomCreditInfo, type CustomCreditResponse, DEFAULT_PERMISSIONS, ExportDateModal, InviteUpdateModal, type InvoicePdfResponse, type MemberPermissionsPayload, OrganizationContent, type OrganizationData, type OrganizationInvite, OrganizationInviteModal, type OrganizationInviteModalProps, type OrganizationJoinRequest, type OrganizationMember, OrganizationModal, type OrganizationWorkspaceItem, type Price, type PriceMetadata, type ProductsResponse, ProfileAvatar, ProfileTab, ReferralTab, type ServiceItem, type SettingsAdapters, SettingsAdaptersProvider, type SettingsApiAdapter, type SettingsAuthAdapter, type SettingsAuthUser, SettingsContent, type SettingsContentProps, type SettingsImageUploadAdapter, type SettingsNavigationAdapter, type SettingsOrganizationAdapter, type SettingsOrganizationCurrent, type SettingsOrganizationListItem, type SettingsTab, type SettingsToastAdapter, type SettingsWorkspaceAdapter, type SettingsWorkspaceCurrent, type SettingsWorkspaceListItem, SiconKey, type StoreItem, type SubscriptionPlan, type SubscriptionResponse, TAB_LABELS, TAB_TO_URL, type TeamMember, TeamsContent, type TokenExpiry, TokensContent, URL_TO_TAB, type UpdateSubscriptionPayload, type UpdateSubscriptionResponse, type UsageHistoryItem, type UsageHistoryResponse, type UserPermissions, type WorkspaceData, type WorkspaceInvite, type WorkspaceMember, WorkspaceModal, WorkspaceTab, resolveSettingsTabFromPath, useSettingsAdapters };