@wacht/jsx 0.0.1-alpha.1 → 0.0.1-alpha.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/components/auth/index.d.ts +1 -1
- package/dist/components/auth/profile-completion.d.ts +1 -1
- package/dist/components/auth/two-factor-verification.d.ts +1 -1
- package/dist/components/control/index.d.ts +1 -0
- package/dist/components/control/require-active-tenancy.d.ts +5 -0
- package/dist/components/organization/create-organization-dialog.d.ts +2 -2
- package/dist/components/organization/create-organization-form.d.ts +1 -1
- package/dist/components/organization/organization-selector-menu.d.ts +7 -0
- package/dist/components/organization/organization-switcher.d.ts +4 -1
- package/dist/components/utility/dialog.d.ts +1 -1
- package/dist/components/workspace/create-workspace-dialog.d.ts +2 -2
- package/dist/hooks/use-organization.d.ts +10 -10
- package/dist/hooks/use-user.d.ts +24 -24
- package/dist/index.cjs.js +782 -636
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +5860 -5430
- package/dist/index.es.js.map +1 -1
- package/dist/types/deployment-context.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -9,5 +9,5 @@ export { TwoFactorMethodSelector, type TwoFactorMethod, } from './two-factor-met
|
|
|
9
9
|
export { PhoneVerification } from './phone-verification';
|
|
10
10
|
export { ProfileCompletion } from './profile-completion';
|
|
11
11
|
export { hasIncompleteProfile, redirectToProfileCompletion, } from '../../utils/profile-completion';
|
|
12
|
-
export type { ProfileCompletionData, ProfileCompletionProps, } from '@
|
|
12
|
+
export type { ProfileCompletionData, ProfileCompletionProps, } from '@wacht/types';
|
|
13
13
|
export { AcceptInvite } from './accept-invite';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ProfileCompletionProps } from '@
|
|
1
|
+
import { ProfileCompletionProps } from '@wacht/types';
|
|
2
2
|
export declare function ProfileCompletion({ attempt, onBack, completeProfile, completeVerification, prepareVerification, }: ProfileCompletionProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ProfileCompletionProps } from '@
|
|
1
|
+
import { ProfileCompletionProps } from '@wacht/types';
|
|
2
2
|
export declare function TwoFactorVerification({ onBack, attempt, completeVerification, prepareVerification, }: Omit<ProfileCompletionProps, "completeProfile">): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
interface CreateOrganizationDialogProps {
|
|
3
3
|
isOpen: boolean;
|
|
4
|
-
onClose
|
|
4
|
+
onClose?: () => void;
|
|
5
5
|
onCreated?: () => void;
|
|
6
6
|
}
|
|
7
7
|
export declare const CreateOrganizationDialog: React.FC<CreateOrganizationDialogProps>;
|
|
8
|
-
export
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface OrganizationSelectorMenuProps {
|
|
2
|
+
onSelect: (organizationId: string, workspaceId?: string) => void;
|
|
3
|
+
onCreateOrganization?: () => void;
|
|
4
|
+
onCreateWorkspace?: (organizationId: string) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const OrganizationSelectorMenu: ({ onSelect, onCreateOrganization, onCreateWorkspace, }: OrganizationSelectorMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
interface OrganizationSwitcherProps {
|
|
2
|
+
showPersonal?: boolean;
|
|
3
|
+
}
|
|
4
|
+
export declare const OrganizationSwitcher: ({ showPersonal, }: OrganizationSwitcherProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
2
5
|
export default OrganizationSwitcher;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
interface CreateWorkspaceDialogProps {
|
|
3
3
|
isOpen: boolean;
|
|
4
|
-
onClose
|
|
4
|
+
onClose?: () => void;
|
|
5
5
|
onCreated?: () => void;
|
|
6
6
|
organizationId: string;
|
|
7
7
|
}
|
|
8
8
|
export declare const CreateWorkspaceDialog: React.FC<CreateWorkspaceDialogProps>;
|
|
9
|
-
export
|
|
9
|
+
export {};
|
|
@@ -8,19 +8,19 @@ export declare const useOrganizationList: () => {
|
|
|
8
8
|
getOrganizationRoles: (organization: Organization) => Promise<OrganizationRole[]>;
|
|
9
9
|
getOrganizationMembers: (organization: Organization) => Promise<OrganizationMembership[]>;
|
|
10
10
|
removeOrganizationMember: (organization: Organization, member: OrganizationMembership) => Promise<void>;
|
|
11
|
-
createOrganization: (organization: NewOrgnization) => Promise<import('@
|
|
11
|
+
createOrganization: (organization: NewOrgnization) => Promise<import('@wacht/types').ApiResult<Organization>>;
|
|
12
12
|
getOrganizationInvitations: (organization: Organization) => Promise<OrganizationInvitation[]>;
|
|
13
13
|
getOrganizationDomains: (organization: Organization) => Promise<OrganizationDomain[]>;
|
|
14
|
-
addOrganizationDomain: (organization: Organization, domain: NewDomain) => Promise<import('@
|
|
15
|
-
verifyOrganizationDomain: (organization: Organization, domain: OrganizationDomain) => Promise<import('@
|
|
16
|
-
removeOrganizationDomain: (organization: Organization, domain: OrganizationDomain) => Promise<import('@
|
|
14
|
+
addOrganizationDomain: (organization: Organization, domain: NewDomain) => Promise<import('@wacht/types').ApiResult<OrganizationDomain>>;
|
|
15
|
+
verifyOrganizationDomain: (organization: Organization, domain: OrganizationDomain) => Promise<import('@wacht/types').ApiResult<OrganizationDomain>>;
|
|
16
|
+
removeOrganizationDomain: (organization: Organization, domain: OrganizationDomain) => Promise<import('@wacht/types').ApiResult<OrganizationDomain>>;
|
|
17
17
|
addRoleToOrganizationMember: (organization: Organization, member: OrganizationMembership, role: OrganizationRole) => Promise<OrganizationMembership>;
|
|
18
18
|
removeRoleFromOrganizationMember: (organization: Organization, member: OrganizationMembership, role: OrganizationRole) => Promise<OrganizationMembership>;
|
|
19
19
|
inviteOrganizationMember: (organization: Organization, invitation: OrganizationInvitationPayload) => Promise<OrganizationInvitation>;
|
|
20
20
|
discardOrganizationInvitation: (organization: Organization, invitation: OrganizationInvitation) => Promise<OrganizationInvitation>;
|
|
21
21
|
resendOrganizationInvitation: (organization: Organization, invitation: OrganizationInvitation) => Promise<OrganizationInvitation>;
|
|
22
|
-
updateOrganization: (organization: Organization, update: OrganizationUpdate) => Promise<import('@
|
|
23
|
-
addRole: (organization: Organization, newRole: RoleCreate) => Promise<import('@
|
|
22
|
+
updateOrganization: (organization: Organization, update: OrganizationUpdate) => Promise<import('@wacht/types').ApiResult<Organization>>;
|
|
23
|
+
addRole: (organization: Organization, newRole: RoleCreate) => Promise<import('@wacht/types').ApiResult<OrganizationRole>>;
|
|
24
24
|
removeOrganizationRoles: (organization: Organization, role: OrganizationRole) => Promise<void>;
|
|
25
25
|
deleteOrganization: (organization: Organization) => Promise<void>;
|
|
26
26
|
};
|
|
@@ -52,16 +52,16 @@ export declare const useActiveOrganization: () => {
|
|
|
52
52
|
getRoles: () => Promise<OrganizationRole[]>;
|
|
53
53
|
updateOrganization: (update: OrganizationUpdate) => Promise<{
|
|
54
54
|
data: never;
|
|
55
|
-
errors: import('@
|
|
55
|
+
errors: import('@wacht/types').ErrorInterface[];
|
|
56
56
|
} | never[] | {
|
|
57
57
|
data: Organization;
|
|
58
58
|
errors: never;
|
|
59
59
|
}>;
|
|
60
60
|
getMembers: () => Promise<OrganizationMembership[]>;
|
|
61
61
|
getDomains: () => Promise<OrganizationDomain[]>;
|
|
62
|
-
addDomain: (domain: NewDomain) => Promise<import('@
|
|
63
|
-
verifyDomain: (domain: OrganizationDomain) => Promise<import('@
|
|
64
|
-
removeDomain: (domain: OrganizationDomain) => Promise<import('@
|
|
62
|
+
addDomain: (domain: NewDomain) => Promise<import('@wacht/types').ApiResult<OrganizationDomain> | undefined>;
|
|
63
|
+
verifyDomain: (domain: OrganizationDomain) => Promise<import('@wacht/types').ApiResult<OrganizationDomain> | undefined>;
|
|
64
|
+
removeDomain: (domain: OrganizationDomain) => Promise<import('@wacht/types').ApiResult<OrganizationDomain> | undefined>;
|
|
65
65
|
getInvitations: () => Promise<OrganizationInvitation[]>;
|
|
66
66
|
removeMember: (member: OrganizationMembership) => Promise<void | never[]>;
|
|
67
67
|
leave: () => Promise<void>;
|
package/dist/hooks/use-user.d.ts
CHANGED
|
@@ -23,12 +23,12 @@ export declare function useUser(): {
|
|
|
23
23
|
primary_phone_number_id?: string | undefined;
|
|
24
24
|
primary_email_address?: UserEmailAddress | undefined;
|
|
25
25
|
primary_phone_number?: UserPhoneNumber;
|
|
26
|
-
second_factor_policy?: import('@
|
|
26
|
+
second_factor_policy?: import('@wacht/types').SecondFactorPolicy | undefined;
|
|
27
27
|
user_email_addresses?: UserEmailAddress[] | undefined;
|
|
28
28
|
user_phone_numbers?: UserPhoneNumber[] | undefined;
|
|
29
29
|
email_addresses?: UserEmailAddress[];
|
|
30
30
|
phone_numbers?: UserPhoneNumber[];
|
|
31
|
-
social_connections?: import('@
|
|
31
|
+
social_connections?: import('@wacht/types').SocialConnection[] | undefined;
|
|
32
32
|
user_authenticator?: UserAuthenticator;
|
|
33
33
|
authenticators?: UserAuthenticator[];
|
|
34
34
|
backup_codes_generated?: boolean;
|
|
@@ -38,40 +38,40 @@ export declare function useUser(): {
|
|
|
38
38
|
};
|
|
39
39
|
loading: boolean;
|
|
40
40
|
error: any;
|
|
41
|
-
updateProfile: (data: ProfileUpdateData) => Promise<import('@
|
|
42
|
-
getEmailAddresses: () => Promise<import('@
|
|
43
|
-
getEmailAddress: (id: string) => Promise<import('@
|
|
44
|
-
createEmailAddress: (email: string) => Promise<import('@
|
|
45
|
-
deleteEmailAddress: (id: string) => Promise<import('@
|
|
46
|
-
prepareEmailVerification: (id: string) => Promise<import('@
|
|
47
|
-
attemptEmailVerification: (id: string, otp: string) => Promise<import('@
|
|
48
|
-
makeEmailPrimary: (id: string) => Promise<import('@
|
|
49
|
-
createPhoneNumber: (phone_number: string, country_code: string) => Promise<import('@
|
|
50
|
-
deletePhoneNumber: (id: string) => Promise<import('@
|
|
51
|
-
preparePhoneVerification: (id: string) => Promise<import('@
|
|
52
|
-
attemptPhoneVerification: (id: string, otp: string) => Promise<import('@
|
|
53
|
-
makePhonePrimary: (id: string) => Promise<import('@
|
|
41
|
+
updateProfile: (data: ProfileUpdateData) => Promise<import('@wacht/types').ApiResult<unknown>>;
|
|
42
|
+
getEmailAddresses: () => Promise<import('@wacht/types').ApiResult<unknown>>;
|
|
43
|
+
getEmailAddress: (id: string) => Promise<import('@wacht/types').ApiResult<unknown>>;
|
|
44
|
+
createEmailAddress: (email: string) => Promise<import('@wacht/types').ApiResult<UserEmailAddress>>;
|
|
45
|
+
deleteEmailAddress: (id: string) => Promise<import('@wacht/types').ApiResult<unknown>>;
|
|
46
|
+
prepareEmailVerification: (id: string) => Promise<import('@wacht/types').ApiResult<unknown>>;
|
|
47
|
+
attemptEmailVerification: (id: string, otp: string) => Promise<import('@wacht/types').ApiResult<unknown>>;
|
|
48
|
+
makeEmailPrimary: (id: string) => Promise<import('@wacht/types').ApiResult<unknown>>;
|
|
49
|
+
createPhoneNumber: (phone_number: string, country_code: string) => Promise<import('@wacht/types').ApiResult<UserPhoneNumber>>;
|
|
50
|
+
deletePhoneNumber: (id: string) => Promise<import('@wacht/types').ApiResult<unknown>>;
|
|
51
|
+
preparePhoneVerification: (id: string) => Promise<import('@wacht/types').ApiResult<unknown>>;
|
|
52
|
+
attemptPhoneVerification: (id: string, otp: string) => Promise<import('@wacht/types').ApiResult<unknown>>;
|
|
53
|
+
makePhonePrimary: (id: string) => Promise<import('@wacht/types').ApiResult<unknown>>;
|
|
54
54
|
setupAuthenticator: () => Promise<UserAuthenticator>;
|
|
55
|
-
verifyAuthenticator: (id: string, codes: string[]) => Promise<import('@
|
|
56
|
-
deleteAuthenticator: (id: string) => Promise<import('@
|
|
55
|
+
verifyAuthenticator: (id: string, codes: string[]) => Promise<import('@wacht/types').ApiResult<unknown>>;
|
|
56
|
+
deleteAuthenticator: (id: string) => Promise<import('@wacht/types').ApiResult<unknown>>;
|
|
57
57
|
generateBackupCodes: () => Promise<string[]>;
|
|
58
58
|
regenerateBackupCodes: () => Promise<string[]>;
|
|
59
|
-
updateProfilePicture: (file: File) => Promise<import('@
|
|
60
|
-
disconnectSocialConnection: (id: string) => Promise<import('@
|
|
59
|
+
updateProfilePicture: (file: File) => Promise<import('@wacht/types').ApiResult<unknown>>;
|
|
60
|
+
disconnectSocialConnection: (id: string) => Promise<import('@wacht/types').ApiResult<unknown>>;
|
|
61
61
|
connectSocialAccount: ({ provider, redirectUri }: {
|
|
62
62
|
provider: string;
|
|
63
63
|
redirectUri?: string;
|
|
64
|
-
}) => Promise<import('@
|
|
64
|
+
}) => Promise<import('@wacht/types').ApiResult<{
|
|
65
65
|
oauth_url: string;
|
|
66
66
|
}>>;
|
|
67
|
-
updatePassword: (currentPassword: string, newPassword: string) => Promise<import('@
|
|
68
|
-
removePassword: (currentPassword: string) => Promise<import('@
|
|
69
|
-
deleteAccount: (password: string) => Promise<import('@
|
|
67
|
+
updatePassword: (currentPassword: string, newPassword: string) => Promise<import('@wacht/types').ApiResult<unknown>>;
|
|
68
|
+
removePassword: (currentPassword: string) => Promise<import('@wacht/types').ApiResult<unknown>>;
|
|
69
|
+
deleteAccount: (password: string) => Promise<import('@wacht/types').ApiResult<unknown>>;
|
|
70
70
|
};
|
|
71
71
|
export declare function useUserSignins(): {
|
|
72
72
|
signins: SignIn[] | undefined;
|
|
73
73
|
error: any;
|
|
74
|
-
removeSignin: (id: string) => Promise<import('@
|
|
74
|
+
removeSignin: (id: string) => Promise<import('@wacht/types').ApiResult<unknown>>;
|
|
75
75
|
refetch: import('swr').KeyedMutator<SignIn[]>;
|
|
76
76
|
loading: boolean;
|
|
77
77
|
};
|