@streamoid/settings 0.4.2 → 0.4.3
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 +90 -39
- package/dist/index.d.ts +90 -39
- package/dist/index.js +387 -332
- package/dist/index.mjs +387 -332
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -779,6 +779,49 @@ interface SettingsAdapters {
|
|
|
779
779
|
imageUpload: SettingsImageUploadAdapter;
|
|
780
780
|
}
|
|
781
781
|
|
|
782
|
+
/**
|
|
783
|
+
* The apps the invite / update dialog can offer a toggle for.
|
|
784
|
+
*
|
|
785
|
+
* Ordered as the dialog renders them. Exported because a host has to be able to
|
|
786
|
+
* name them in `hiddenApps` — see InviteUpdateModal.
|
|
787
|
+
*/
|
|
788
|
+
declare const APP_KEYS: readonly ["artifax", "photogenix", "returns", "catalogix"];
|
|
789
|
+
type AppKey = (typeof APP_KEYS)[number];
|
|
790
|
+
interface UserPermissions {
|
|
791
|
+
artifax: boolean;
|
|
792
|
+
photogenix: boolean;
|
|
793
|
+
catalogix: boolean;
|
|
794
|
+
/**
|
|
795
|
+
* SPF Returns.
|
|
796
|
+
*
|
|
797
|
+
* Its services identify themselves by group: the provider carries five of
|
|
798
|
+
* them — the dashboard, Claims, Capture and two settings pages — all named
|
|
799
|
+
* "returns" and all in a "Returns" group. Granting the app means granting the
|
|
800
|
+
* group, which is what `permissionServiceIds` does.
|
|
801
|
+
*/
|
|
802
|
+
returns: boolean;
|
|
803
|
+
canUseCredits: boolean;
|
|
804
|
+
canInviteUser: boolean;
|
|
805
|
+
role: "admin" | "member";
|
|
806
|
+
catalogixStores: string[];
|
|
807
|
+
}
|
|
808
|
+
interface TeamMember {
|
|
809
|
+
id: string;
|
|
810
|
+
kind: "member" | "invite";
|
|
811
|
+
/** Unified user id (for change-role and remove-users userIds). */
|
|
812
|
+
userId?: string;
|
|
813
|
+
/** Invitation id (for remove-users invitationIds). */
|
|
814
|
+
invitationId?: string;
|
|
815
|
+
/** Invitation token (for invite-cancel flow, if needed). */
|
|
816
|
+
inviteToken?: string;
|
|
817
|
+
name?: string;
|
|
818
|
+
userEmail: string;
|
|
819
|
+
invitedBy: string;
|
|
820
|
+
signedOn?: string;
|
|
821
|
+
permissions: UserPermissions;
|
|
822
|
+
}
|
|
823
|
+
declare const DEFAULT_PERMISSIONS: UserPermissions;
|
|
824
|
+
|
|
782
825
|
type WorkspaceInfo = SettingsWorkspaceListItem & {
|
|
783
826
|
initials?: string;
|
|
784
827
|
plan?: string;
|
|
@@ -812,6 +855,14 @@ declare const WorkspaceTab: typeof WorkspaceListTab;
|
|
|
812
855
|
declare function ReferralTab(): react.JSX.Element;
|
|
813
856
|
interface SettingsContentProps {
|
|
814
857
|
adapters: SettingsAdapters;
|
|
858
|
+
/**
|
|
859
|
+
* App rows the Members tab's invite / update dialog leaves out.
|
|
860
|
+
*
|
|
861
|
+
* Omit it and nothing is hidden, which is what every host got before this
|
|
862
|
+
* existed. A console that administers one product hides the others, so it
|
|
863
|
+
* stops inviting people to products it cannot administer.
|
|
864
|
+
*/
|
|
865
|
+
hiddenApps?: readonly AppKey[];
|
|
815
866
|
/** Currently active tab. The host owns routing and resolves this from the URL. */
|
|
816
867
|
activeTab?: SettingsTab;
|
|
817
868
|
/**
|
|
@@ -825,7 +876,7 @@ interface SettingsContentProps {
|
|
|
825
876
|
*/
|
|
826
877
|
onClose?: () => void;
|
|
827
878
|
}
|
|
828
|
-
declare function SettingsContent({ adapters, activeTab, onClose, }: SettingsContentProps): react.JSX.Element;
|
|
879
|
+
declare function SettingsContent({ adapters, activeTab, onClose, hiddenApps, }: SettingsContentProps): react.JSX.Element;
|
|
829
880
|
|
|
830
881
|
interface WorkspaceData {
|
|
831
882
|
id: string;
|
|
@@ -880,7 +931,7 @@ declare function BillingContent({ embedded, showPlans: showPlansProp, onShowPlan
|
|
|
880
931
|
onShowPlansChange?: (open: boolean) => void;
|
|
881
932
|
}): react__default.JSX.Element;
|
|
882
933
|
|
|
883
|
-
declare function TeamsContent({ embedded, onInviteOpen, onInviteOpenChange, workspaceName, workspaceImageUrl, organizationName, }?: {
|
|
934
|
+
declare function TeamsContent({ embedded, onInviteOpen, onInviteOpenChange, workspaceName, workspaceImageUrl, organizationName, hiddenApps, }?: {
|
|
884
935
|
embedded?: boolean;
|
|
885
936
|
onInviteOpen?: boolean;
|
|
886
937
|
onInviteOpenChange?: (open: boolean) => void;
|
|
@@ -894,6 +945,11 @@ declare function TeamsContent({ embedded, onInviteOpen, onInviteOpenChange, work
|
|
|
894
945
|
workspaceImageUrl?: string;
|
|
895
946
|
/** Parent organization, when the workspace has joined one. */
|
|
896
947
|
organizationName?: string | null;
|
|
948
|
+
/**
|
|
949
|
+
* App rows the invite / update dialog leaves out. Omitted, nothing is hidden
|
|
950
|
+
* — see InviteUpdateModal for what hiding one does and does not change.
|
|
951
|
+
*/
|
|
952
|
+
hiddenApps?: readonly AppKey[];
|
|
897
953
|
}): react.JSX.Element;
|
|
898
954
|
|
|
899
955
|
/**
|
|
@@ -1108,41 +1164,6 @@ interface BuyCreditsModalProps {
|
|
|
1108
1164
|
}
|
|
1109
1165
|
declare function BuyCreditsModal({ currencySymbol, country, onClose, onBuy, }: BuyCreditsModalProps): react.JSX.Element;
|
|
1110
1166
|
|
|
1111
|
-
interface UserPermissions {
|
|
1112
|
-
artifax: boolean;
|
|
1113
|
-
photogenix: boolean;
|
|
1114
|
-
catalogix: boolean;
|
|
1115
|
-
/**
|
|
1116
|
-
* SPF Returns.
|
|
1117
|
-
*
|
|
1118
|
-
* Its services identify themselves by group: the provider carries five of
|
|
1119
|
-
* them — the dashboard, Claims, Capture and two settings pages — all named
|
|
1120
|
-
* "returns" and all in a "Returns" group. Granting the app means granting the
|
|
1121
|
-
* group, which is what `permissionServiceIds` does.
|
|
1122
|
-
*/
|
|
1123
|
-
returns: boolean;
|
|
1124
|
-
canUseCredits: boolean;
|
|
1125
|
-
canInviteUser: boolean;
|
|
1126
|
-
role: "admin" | "member";
|
|
1127
|
-
catalogixStores: string[];
|
|
1128
|
-
}
|
|
1129
|
-
interface TeamMember {
|
|
1130
|
-
id: string;
|
|
1131
|
-
kind: "member" | "invite";
|
|
1132
|
-
/** Unified user id (for change-role and remove-users userIds). */
|
|
1133
|
-
userId?: string;
|
|
1134
|
-
/** Invitation id (for remove-users invitationIds). */
|
|
1135
|
-
invitationId?: string;
|
|
1136
|
-
/** Invitation token (for invite-cancel flow, if needed). */
|
|
1137
|
-
inviteToken?: string;
|
|
1138
|
-
name?: string;
|
|
1139
|
-
userEmail: string;
|
|
1140
|
-
invitedBy: string;
|
|
1141
|
-
signedOn?: string;
|
|
1142
|
-
permissions: UserPermissions;
|
|
1143
|
-
}
|
|
1144
|
-
declare const DEFAULT_PERMISSIONS: UserPermissions;
|
|
1145
|
-
|
|
1146
1167
|
type ModalMode = "invite" | "update";
|
|
1147
1168
|
interface StoreOption {
|
|
1148
1169
|
_id: string;
|
|
@@ -1153,6 +1174,36 @@ interface InviteUpdateModalProps {
|
|
|
1153
1174
|
mode: ModalMode;
|
|
1154
1175
|
userEmail?: string;
|
|
1155
1176
|
stores?: StoreOption[];
|
|
1177
|
+
/**
|
|
1178
|
+
* App rows to leave out.
|
|
1179
|
+
*
|
|
1180
|
+
* A denylist, deliberately, because this modal is shared: every other console
|
|
1181
|
+
* renders it too, and none of them should have to name the apps it already
|
|
1182
|
+
* shows in order to keep showing them. Omit this and nothing is hidden, which
|
|
1183
|
+
* is what every existing host gets without touching a line.
|
|
1184
|
+
*
|
|
1185
|
+
* A single-product console passes the ones it cannot administer. A toggle for
|
|
1186
|
+
* an app this host has no way to grant is worse than clutter — it invites
|
|
1187
|
+
* somebody to a product on a screen that cannot follow through.
|
|
1188
|
+
*
|
|
1189
|
+
* A hidden row is granted nothing — on an invite AND on an update. Hiding an
|
|
1190
|
+
* app in a host that cannot administer it is a statement that nobody it
|
|
1191
|
+
* manages should hold it, so a save takes it away rather than carrying it
|
|
1192
|
+
* along invisibly. This did once preserve an existing grant on update, on the
|
|
1193
|
+
* grounds that hiding a toggle should not revoke access an admin cannot see
|
|
1194
|
+
* to restore; that left a member who was granted an app before it was hidden
|
|
1195
|
+
* holding it forever, with every save putting its service ids back on the
|
|
1196
|
+
* wire, and no screen in the host able to show it or take it off.
|
|
1197
|
+
*
|
|
1198
|
+
* Hide every app and the "App permission" section goes with them, rather than
|
|
1199
|
+
* leaving a heading over an empty box.
|
|
1200
|
+
*
|
|
1201
|
+
* The trade against an allowlist, taken on purpose: an app added to this
|
|
1202
|
+
* modal later shows up in hosts that never asked for it, until they hide it.
|
|
1203
|
+
* That is the right way round for a shared component — a new app should have
|
|
1204
|
+
* to be hidden deliberately, not shown deliberately by every console at once.
|
|
1205
|
+
*/
|
|
1206
|
+
hiddenApps?: readonly AppKey[];
|
|
1156
1207
|
allowSubmitWithoutChanges?: boolean;
|
|
1157
1208
|
initialPermissions?: UserPermissions;
|
|
1158
1209
|
onClose: () => void;
|
|
@@ -1163,7 +1214,7 @@ interface InviteUpdateModalProps {
|
|
|
1163
1214
|
/** Called only in invite mode; receives (permissions, email) */
|
|
1164
1215
|
onInvite?: (permissions: UserPermissions, email: string) => void;
|
|
1165
1216
|
}
|
|
1166
|
-
declare function InviteUpdateModal({ open, mode, userEmail, stores, allowSubmitWithoutChanges, initialPermissions, onClose, onSave, onRemove, canRemove, onInvite, }: InviteUpdateModalProps): react.JSX.Element | null;
|
|
1217
|
+
declare function InviteUpdateModal({ open, mode, userEmail, stores, hiddenApps, allowSubmitWithoutChanges, initialPermissions, onClose, onSave, onRemove, canRemove, onInvite, }: InviteUpdateModalProps): react.JSX.Element | null;
|
|
1167
1218
|
|
|
1168
1219
|
interface ExportDateModalProps {
|
|
1169
1220
|
title: string;
|
|
@@ -1183,4 +1234,4 @@ declare function SettingsAdaptersProvider({ adapters, children, }: {
|
|
|
1183
1234
|
*/
|
|
1184
1235
|
declare function useSettingsAdapters(): SettingsAdapters;
|
|
1185
1236
|
|
|
1186
|
-
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, MemberListFrame, type MemberListFrameProps, type MemberListTab, MemberListToolbar, type MemberListToolbarProps, type MemberPermissionsPayload, OrgMembershipTag, OrganizationContent, type OrganizationData, type OrganizationInvite, OrganizationInviteModal, type OrganizationInviteModalProps, type OrganizationJoinRequest, type OrganizationMember, OrganizationModal, type OrganizationView, type OrganizationWorkspaceItem, type Price, type PriceMetadata, type ProductsResponse, ProfileAvatar, ProfileTab, ReferralTab, SCOPE_LABELS, ScopeHeader, type ScopeHeaderProps, 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 SettingsScope, type SettingsTab, type SettingsToastAdapter, SettingsTooltip, type SettingsTooltipPlacement, type SettingsTooltipProps, type SettingsWorkspaceAdapter, type SettingsWorkspaceCurrent, type SettingsWorkspaceListItem, SiconKey, type StoreItem, type SubscriptionPlan, type SubscriptionResponse, TAB_DESCRIPTIONS, TAB_LABELS, TAB_SCOPE, TAB_TO_URL, type TeamMember, TeamsContent, type TokenExpiry, TokensContent, URL_TO_TAB, type UpdateSubscriptionPayload, type UpdateSubscriptionResponse, type UsageHistoryItem, type UsageHistoryResponse, type UserPermissions, type WorkspaceData, WorkspaceGeneralTab, type WorkspaceGeneralTabProps, type WorkspaceInvite, WorkspaceListTab, type WorkspaceMember, WorkspaceModal, WorkspaceTab, countLabel, resolveSettingsTabFromPath, useSettingsAdapters };
|
|
1237
|
+
export { APP_KEYS, type ApiToken, type AppKey, 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, MemberListFrame, type MemberListFrameProps, type MemberListTab, MemberListToolbar, type MemberListToolbarProps, type MemberPermissionsPayload, OrgMembershipTag, OrganizationContent, type OrganizationData, type OrganizationInvite, OrganizationInviteModal, type OrganizationInviteModalProps, type OrganizationJoinRequest, type OrganizationMember, OrganizationModal, type OrganizationView, type OrganizationWorkspaceItem, type Price, type PriceMetadata, type ProductsResponse, ProfileAvatar, ProfileTab, ReferralTab, SCOPE_LABELS, ScopeHeader, type ScopeHeaderProps, 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 SettingsScope, type SettingsTab, type SettingsToastAdapter, SettingsTooltip, type SettingsTooltipPlacement, type SettingsTooltipProps, type SettingsWorkspaceAdapter, type SettingsWorkspaceCurrent, type SettingsWorkspaceListItem, SiconKey, type StoreItem, type SubscriptionPlan, type SubscriptionResponse, TAB_DESCRIPTIONS, TAB_LABELS, TAB_SCOPE, TAB_TO_URL, type TeamMember, TeamsContent, type TokenExpiry, TokensContent, URL_TO_TAB, type UpdateSubscriptionPayload, type UpdateSubscriptionResponse, type UsageHistoryItem, type UsageHistoryResponse, type UserPermissions, type WorkspaceData, WorkspaceGeneralTab, type WorkspaceGeneralTabProps, type WorkspaceInvite, WorkspaceListTab, type WorkspaceMember, WorkspaceModal, WorkspaceTab, countLabel, resolveSettingsTabFromPath, useSettingsAdapters };
|
package/dist/index.d.ts
CHANGED
|
@@ -779,6 +779,49 @@ interface SettingsAdapters {
|
|
|
779
779
|
imageUpload: SettingsImageUploadAdapter;
|
|
780
780
|
}
|
|
781
781
|
|
|
782
|
+
/**
|
|
783
|
+
* The apps the invite / update dialog can offer a toggle for.
|
|
784
|
+
*
|
|
785
|
+
* Ordered as the dialog renders them. Exported because a host has to be able to
|
|
786
|
+
* name them in `hiddenApps` — see InviteUpdateModal.
|
|
787
|
+
*/
|
|
788
|
+
declare const APP_KEYS: readonly ["artifax", "photogenix", "returns", "catalogix"];
|
|
789
|
+
type AppKey = (typeof APP_KEYS)[number];
|
|
790
|
+
interface UserPermissions {
|
|
791
|
+
artifax: boolean;
|
|
792
|
+
photogenix: boolean;
|
|
793
|
+
catalogix: boolean;
|
|
794
|
+
/**
|
|
795
|
+
* SPF Returns.
|
|
796
|
+
*
|
|
797
|
+
* Its services identify themselves by group: the provider carries five of
|
|
798
|
+
* them — the dashboard, Claims, Capture and two settings pages — all named
|
|
799
|
+
* "returns" and all in a "Returns" group. Granting the app means granting the
|
|
800
|
+
* group, which is what `permissionServiceIds` does.
|
|
801
|
+
*/
|
|
802
|
+
returns: boolean;
|
|
803
|
+
canUseCredits: boolean;
|
|
804
|
+
canInviteUser: boolean;
|
|
805
|
+
role: "admin" | "member";
|
|
806
|
+
catalogixStores: string[];
|
|
807
|
+
}
|
|
808
|
+
interface TeamMember {
|
|
809
|
+
id: string;
|
|
810
|
+
kind: "member" | "invite";
|
|
811
|
+
/** Unified user id (for change-role and remove-users userIds). */
|
|
812
|
+
userId?: string;
|
|
813
|
+
/** Invitation id (for remove-users invitationIds). */
|
|
814
|
+
invitationId?: string;
|
|
815
|
+
/** Invitation token (for invite-cancel flow, if needed). */
|
|
816
|
+
inviteToken?: string;
|
|
817
|
+
name?: string;
|
|
818
|
+
userEmail: string;
|
|
819
|
+
invitedBy: string;
|
|
820
|
+
signedOn?: string;
|
|
821
|
+
permissions: UserPermissions;
|
|
822
|
+
}
|
|
823
|
+
declare const DEFAULT_PERMISSIONS: UserPermissions;
|
|
824
|
+
|
|
782
825
|
type WorkspaceInfo = SettingsWorkspaceListItem & {
|
|
783
826
|
initials?: string;
|
|
784
827
|
plan?: string;
|
|
@@ -812,6 +855,14 @@ declare const WorkspaceTab: typeof WorkspaceListTab;
|
|
|
812
855
|
declare function ReferralTab(): react.JSX.Element;
|
|
813
856
|
interface SettingsContentProps {
|
|
814
857
|
adapters: SettingsAdapters;
|
|
858
|
+
/**
|
|
859
|
+
* App rows the Members tab's invite / update dialog leaves out.
|
|
860
|
+
*
|
|
861
|
+
* Omit it and nothing is hidden, which is what every host got before this
|
|
862
|
+
* existed. A console that administers one product hides the others, so it
|
|
863
|
+
* stops inviting people to products it cannot administer.
|
|
864
|
+
*/
|
|
865
|
+
hiddenApps?: readonly AppKey[];
|
|
815
866
|
/** Currently active tab. The host owns routing and resolves this from the URL. */
|
|
816
867
|
activeTab?: SettingsTab;
|
|
817
868
|
/**
|
|
@@ -825,7 +876,7 @@ interface SettingsContentProps {
|
|
|
825
876
|
*/
|
|
826
877
|
onClose?: () => void;
|
|
827
878
|
}
|
|
828
|
-
declare function SettingsContent({ adapters, activeTab, onClose, }: SettingsContentProps): react.JSX.Element;
|
|
879
|
+
declare function SettingsContent({ adapters, activeTab, onClose, hiddenApps, }: SettingsContentProps): react.JSX.Element;
|
|
829
880
|
|
|
830
881
|
interface WorkspaceData {
|
|
831
882
|
id: string;
|
|
@@ -880,7 +931,7 @@ declare function BillingContent({ embedded, showPlans: showPlansProp, onShowPlan
|
|
|
880
931
|
onShowPlansChange?: (open: boolean) => void;
|
|
881
932
|
}): react__default.JSX.Element;
|
|
882
933
|
|
|
883
|
-
declare function TeamsContent({ embedded, onInviteOpen, onInviteOpenChange, workspaceName, workspaceImageUrl, organizationName, }?: {
|
|
934
|
+
declare function TeamsContent({ embedded, onInviteOpen, onInviteOpenChange, workspaceName, workspaceImageUrl, organizationName, hiddenApps, }?: {
|
|
884
935
|
embedded?: boolean;
|
|
885
936
|
onInviteOpen?: boolean;
|
|
886
937
|
onInviteOpenChange?: (open: boolean) => void;
|
|
@@ -894,6 +945,11 @@ declare function TeamsContent({ embedded, onInviteOpen, onInviteOpenChange, work
|
|
|
894
945
|
workspaceImageUrl?: string;
|
|
895
946
|
/** Parent organization, when the workspace has joined one. */
|
|
896
947
|
organizationName?: string | null;
|
|
948
|
+
/**
|
|
949
|
+
* App rows the invite / update dialog leaves out. Omitted, nothing is hidden
|
|
950
|
+
* — see InviteUpdateModal for what hiding one does and does not change.
|
|
951
|
+
*/
|
|
952
|
+
hiddenApps?: readonly AppKey[];
|
|
897
953
|
}): react.JSX.Element;
|
|
898
954
|
|
|
899
955
|
/**
|
|
@@ -1108,41 +1164,6 @@ interface BuyCreditsModalProps {
|
|
|
1108
1164
|
}
|
|
1109
1165
|
declare function BuyCreditsModal({ currencySymbol, country, onClose, onBuy, }: BuyCreditsModalProps): react.JSX.Element;
|
|
1110
1166
|
|
|
1111
|
-
interface UserPermissions {
|
|
1112
|
-
artifax: boolean;
|
|
1113
|
-
photogenix: boolean;
|
|
1114
|
-
catalogix: boolean;
|
|
1115
|
-
/**
|
|
1116
|
-
* SPF Returns.
|
|
1117
|
-
*
|
|
1118
|
-
* Its services identify themselves by group: the provider carries five of
|
|
1119
|
-
* them — the dashboard, Claims, Capture and two settings pages — all named
|
|
1120
|
-
* "returns" and all in a "Returns" group. Granting the app means granting the
|
|
1121
|
-
* group, which is what `permissionServiceIds` does.
|
|
1122
|
-
*/
|
|
1123
|
-
returns: boolean;
|
|
1124
|
-
canUseCredits: boolean;
|
|
1125
|
-
canInviteUser: boolean;
|
|
1126
|
-
role: "admin" | "member";
|
|
1127
|
-
catalogixStores: string[];
|
|
1128
|
-
}
|
|
1129
|
-
interface TeamMember {
|
|
1130
|
-
id: string;
|
|
1131
|
-
kind: "member" | "invite";
|
|
1132
|
-
/** Unified user id (for change-role and remove-users userIds). */
|
|
1133
|
-
userId?: string;
|
|
1134
|
-
/** Invitation id (for remove-users invitationIds). */
|
|
1135
|
-
invitationId?: string;
|
|
1136
|
-
/** Invitation token (for invite-cancel flow, if needed). */
|
|
1137
|
-
inviteToken?: string;
|
|
1138
|
-
name?: string;
|
|
1139
|
-
userEmail: string;
|
|
1140
|
-
invitedBy: string;
|
|
1141
|
-
signedOn?: string;
|
|
1142
|
-
permissions: UserPermissions;
|
|
1143
|
-
}
|
|
1144
|
-
declare const DEFAULT_PERMISSIONS: UserPermissions;
|
|
1145
|
-
|
|
1146
1167
|
type ModalMode = "invite" | "update";
|
|
1147
1168
|
interface StoreOption {
|
|
1148
1169
|
_id: string;
|
|
@@ -1153,6 +1174,36 @@ interface InviteUpdateModalProps {
|
|
|
1153
1174
|
mode: ModalMode;
|
|
1154
1175
|
userEmail?: string;
|
|
1155
1176
|
stores?: StoreOption[];
|
|
1177
|
+
/**
|
|
1178
|
+
* App rows to leave out.
|
|
1179
|
+
*
|
|
1180
|
+
* A denylist, deliberately, because this modal is shared: every other console
|
|
1181
|
+
* renders it too, and none of them should have to name the apps it already
|
|
1182
|
+
* shows in order to keep showing them. Omit this and nothing is hidden, which
|
|
1183
|
+
* is what every existing host gets without touching a line.
|
|
1184
|
+
*
|
|
1185
|
+
* A single-product console passes the ones it cannot administer. A toggle for
|
|
1186
|
+
* an app this host has no way to grant is worse than clutter — it invites
|
|
1187
|
+
* somebody to a product on a screen that cannot follow through.
|
|
1188
|
+
*
|
|
1189
|
+
* A hidden row is granted nothing — on an invite AND on an update. Hiding an
|
|
1190
|
+
* app in a host that cannot administer it is a statement that nobody it
|
|
1191
|
+
* manages should hold it, so a save takes it away rather than carrying it
|
|
1192
|
+
* along invisibly. This did once preserve an existing grant on update, on the
|
|
1193
|
+
* grounds that hiding a toggle should not revoke access an admin cannot see
|
|
1194
|
+
* to restore; that left a member who was granted an app before it was hidden
|
|
1195
|
+
* holding it forever, with every save putting its service ids back on the
|
|
1196
|
+
* wire, and no screen in the host able to show it or take it off.
|
|
1197
|
+
*
|
|
1198
|
+
* Hide every app and the "App permission" section goes with them, rather than
|
|
1199
|
+
* leaving a heading over an empty box.
|
|
1200
|
+
*
|
|
1201
|
+
* The trade against an allowlist, taken on purpose: an app added to this
|
|
1202
|
+
* modal later shows up in hosts that never asked for it, until they hide it.
|
|
1203
|
+
* That is the right way round for a shared component — a new app should have
|
|
1204
|
+
* to be hidden deliberately, not shown deliberately by every console at once.
|
|
1205
|
+
*/
|
|
1206
|
+
hiddenApps?: readonly AppKey[];
|
|
1156
1207
|
allowSubmitWithoutChanges?: boolean;
|
|
1157
1208
|
initialPermissions?: UserPermissions;
|
|
1158
1209
|
onClose: () => void;
|
|
@@ -1163,7 +1214,7 @@ interface InviteUpdateModalProps {
|
|
|
1163
1214
|
/** Called only in invite mode; receives (permissions, email) */
|
|
1164
1215
|
onInvite?: (permissions: UserPermissions, email: string) => void;
|
|
1165
1216
|
}
|
|
1166
|
-
declare function InviteUpdateModal({ open, mode, userEmail, stores, allowSubmitWithoutChanges, initialPermissions, onClose, onSave, onRemove, canRemove, onInvite, }: InviteUpdateModalProps): react.JSX.Element | null;
|
|
1217
|
+
declare function InviteUpdateModal({ open, mode, userEmail, stores, hiddenApps, allowSubmitWithoutChanges, initialPermissions, onClose, onSave, onRemove, canRemove, onInvite, }: InviteUpdateModalProps): react.JSX.Element | null;
|
|
1167
1218
|
|
|
1168
1219
|
interface ExportDateModalProps {
|
|
1169
1220
|
title: string;
|
|
@@ -1183,4 +1234,4 @@ declare function SettingsAdaptersProvider({ adapters, children, }: {
|
|
|
1183
1234
|
*/
|
|
1184
1235
|
declare function useSettingsAdapters(): SettingsAdapters;
|
|
1185
1236
|
|
|
1186
|
-
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, MemberListFrame, type MemberListFrameProps, type MemberListTab, MemberListToolbar, type MemberListToolbarProps, type MemberPermissionsPayload, OrgMembershipTag, OrganizationContent, type OrganizationData, type OrganizationInvite, OrganizationInviteModal, type OrganizationInviteModalProps, type OrganizationJoinRequest, type OrganizationMember, OrganizationModal, type OrganizationView, type OrganizationWorkspaceItem, type Price, type PriceMetadata, type ProductsResponse, ProfileAvatar, ProfileTab, ReferralTab, SCOPE_LABELS, ScopeHeader, type ScopeHeaderProps, 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 SettingsScope, type SettingsTab, type SettingsToastAdapter, SettingsTooltip, type SettingsTooltipPlacement, type SettingsTooltipProps, type SettingsWorkspaceAdapter, type SettingsWorkspaceCurrent, type SettingsWorkspaceListItem, SiconKey, type StoreItem, type SubscriptionPlan, type SubscriptionResponse, TAB_DESCRIPTIONS, TAB_LABELS, TAB_SCOPE, TAB_TO_URL, type TeamMember, TeamsContent, type TokenExpiry, TokensContent, URL_TO_TAB, type UpdateSubscriptionPayload, type UpdateSubscriptionResponse, type UsageHistoryItem, type UsageHistoryResponse, type UserPermissions, type WorkspaceData, WorkspaceGeneralTab, type WorkspaceGeneralTabProps, type WorkspaceInvite, WorkspaceListTab, type WorkspaceMember, WorkspaceModal, WorkspaceTab, countLabel, resolveSettingsTabFromPath, useSettingsAdapters };
|
|
1237
|
+
export { APP_KEYS, type ApiToken, type AppKey, 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, MemberListFrame, type MemberListFrameProps, type MemberListTab, MemberListToolbar, type MemberListToolbarProps, type MemberPermissionsPayload, OrgMembershipTag, OrganizationContent, type OrganizationData, type OrganizationInvite, OrganizationInviteModal, type OrganizationInviteModalProps, type OrganizationJoinRequest, type OrganizationMember, OrganizationModal, type OrganizationView, type OrganizationWorkspaceItem, type Price, type PriceMetadata, type ProductsResponse, ProfileAvatar, ProfileTab, ReferralTab, SCOPE_LABELS, ScopeHeader, type ScopeHeaderProps, 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 SettingsScope, type SettingsTab, type SettingsToastAdapter, SettingsTooltip, type SettingsTooltipPlacement, type SettingsTooltipProps, type SettingsWorkspaceAdapter, type SettingsWorkspaceCurrent, type SettingsWorkspaceListItem, SiconKey, type StoreItem, type SubscriptionPlan, type SubscriptionResponse, TAB_DESCRIPTIONS, TAB_LABELS, TAB_SCOPE, TAB_TO_URL, type TeamMember, TeamsContent, type TokenExpiry, TokensContent, URL_TO_TAB, type UpdateSubscriptionPayload, type UpdateSubscriptionResponse, type UsageHistoryItem, type UsageHistoryResponse, type UserPermissions, type WorkspaceData, WorkspaceGeneralTab, type WorkspaceGeneralTabProps, type WorkspaceInvite, WorkspaceListTab, type WorkspaceMember, WorkspaceModal, WorkspaceTab, countLabel, resolveSettingsTabFromPath, useSettingsAdapters };
|