@wacht/jsx 0.0.1-alpha.1
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/agent/agent-conversation-history.d.ts +5 -0
- package/dist/components/agent/agent-conversation-hub.d.ts +1 -0
- package/dist/components/agent/agent-conversation.d.ts +5 -0
- package/dist/components/agent/index.d.ts +3 -0
- package/dist/components/agent/user-input-request.d.ts +7 -0
- package/dist/components/auth/accept-invite.d.ts +7 -0
- package/dist/components/auth/auth-image.d.ts +1 -0
- package/dist/components/auth/forgot-password.d.ts +5 -0
- package/dist/components/auth/index.d.ts +13 -0
- package/dist/components/auth/magic-link-verification.d.ts +6 -0
- package/dist/components/auth/other-auth-options.d.ts +1 -0
- package/dist/components/auth/other-signin-options.d.ts +5 -0
- package/dist/components/auth/phone-verification.d.ts +7 -0
- package/dist/components/auth/profile-completion.d.ts +2 -0
- package/dist/components/auth/signin-form.d.ts +1 -0
- package/dist/components/auth/signup-form.d.ts +1 -0
- package/dist/components/auth/social-buttons.d.ts +7 -0
- package/dist/components/auth/sso-callback.d.ts +2 -0
- package/dist/components/auth/two-factor-method-selector.d.ts +15 -0
- package/dist/components/auth/two-factor-verification.d.ts +2 -0
- package/dist/components/auth/waitlist-form.d.ts +1 -0
- package/dist/components/control/index.d.ts +4 -0
- package/dist/components/control/navigation.d.ts +2 -0
- package/dist/components/control/signed-in-accounts.d.ts +6 -0
- package/dist/components/control/signed-in.d.ts +5 -0
- package/dist/components/control/signed-out.d.ts +5 -0
- package/dist/components/control/user-selection.d.ts +0 -0
- package/dist/components/deployment-instance.d.ts +7 -0
- package/dist/components/icons/apple.d.ts +1 -0
- package/dist/components/icons/brave.d.ts +1 -0
- package/dist/components/icons/chevron-right.d.ts +1 -0
- package/dist/components/icons/chrome.d.ts +2 -0
- package/dist/components/icons/discord.d.ts +1 -0
- package/dist/components/icons/edge.d.ts +2 -0
- package/dist/components/icons/facebook.d.ts +1 -0
- package/dist/components/icons/firefox.d.ts +2 -0
- package/dist/components/icons/github.d.ts +1 -0
- package/dist/components/icons/gitlab.d.ts +1 -0
- package/dist/components/icons/google.d.ts +1 -0
- package/dist/components/icons/key.d.ts +1 -0
- package/dist/components/icons/linkedin.d.ts +1 -0
- package/dist/components/icons/microsoft.d.ts +1 -0
- package/dist/components/icons/opera.d.ts +1 -0
- package/dist/components/icons/safari.d.ts +2 -0
- package/dist/components/icons/shield.d.ts +1 -0
- package/dist/components/icons/smartphone.d.ts +1 -0
- package/dist/components/icons/x.d.ts +1 -0
- package/dist/components/index.d.ts +17 -0
- package/dist/components/notifications/channel-selector.d.ts +8 -0
- package/dist/components/notifications/index.d.ts +4 -0
- package/dist/components/notifications/notification-bell.d.ts +9 -0
- package/dist/components/notifications/notification-item.d.ts +8 -0
- package/dist/components/notifications/notification-popover.d.ts +16 -0
- package/dist/components/organization/add-domain-popover.d.ts +8 -0
- package/dist/components/organization/add-role-popover.d.ts +14 -0
- package/dist/components/organization/context.d.ts +9 -0
- package/dist/components/organization/create-organization-dialog.d.ts +8 -0
- package/dist/components/organization/create-organization-form.d.ts +6 -0
- package/dist/components/organization/index.d.ts +3 -0
- package/dist/components/organization/invite-member-popover.d.ts +9 -0
- package/dist/components/organization/manage-organization-dialog.d.ts +14 -0
- package/dist/components/organization/manage-organization.d.ts +1 -0
- package/dist/components/organization/organization-switcher.d.ts +2 -0
- package/dist/components/user/2fa-styles.d.ts +56 -0
- package/dist/components/user/2fa.d.ts +20 -0
- package/dist/components/user/add-email-popover.d.ts +10 -0
- package/dist/components/user/add-phone-popover.d.ts +10 -0
- package/dist/components/user/backup-codes-popover.d.ts +9 -0
- package/dist/components/user/change-password-popover.d.ts +8 -0
- package/dist/components/user/context.d.ts +9 -0
- package/dist/components/user/index.d.ts +4 -0
- package/dist/components/user/manage-account-dialog.d.ts +14 -0
- package/dist/components/user/manage-account.d.ts +2 -0
- package/dist/components/user/remove-password-popover.d.ts +7 -0
- package/dist/components/user/setup-totp-popover.d.ts +12 -0
- package/dist/components/user/user-button.d.ts +6 -0
- package/dist/components/user/user-controls.d.ts +7 -0
- package/dist/components/utility/button.d.ts +7 -0
- package/dist/components/utility/combo-box.d.ts +39 -0
- package/dist/components/utility/confirmation-popover.d.ts +7 -0
- package/dist/components/utility/dialog.d.ts +49 -0
- package/dist/components/utility/dropdown.d.ts +20 -0
- package/dist/components/utility/empty-state.d.ts +8 -0
- package/dist/components/utility/form.d.ts +3 -0
- package/dist/components/utility/index.d.ts +14 -0
- package/dist/components/utility/input.d.ts +1 -0
- package/dist/components/utility/loader.d.ts +7 -0
- package/dist/components/utility/navigation.d.ts +8 -0
- package/dist/components/utility/otp-input.d.ts +9 -0
- package/dist/components/utility/phone.d.ts +7 -0
- package/dist/components/utility/root.d.ts +1 -0
- package/dist/components/utility/search.d.ts +7 -0
- package/dist/components/utility/spinner.d.ts +6 -0
- package/dist/components/utility/switch.d.ts +7 -0
- package/dist/components/utility/table.d.ts +8 -0
- package/dist/components/utility/tabs.d.ts +34 -0
- package/dist/components/utility/use-dialog.d.ts +12 -0
- package/dist/components/workspace/add-role-popover.d.ts +13 -0
- package/dist/components/workspace/create-workspace-dialog.d.ts +9 -0
- package/dist/components/workspace/create-workspace-form.d.ts +9 -0
- package/dist/components/workspace/index.d.ts +4 -0
- package/dist/components/workspace/invite-member-popover.d.ts +10 -0
- package/dist/components/workspace/manage-workspace-dialog.d.ts +14 -0
- package/dist/components/workspace/manage-workspace.d.ts +1 -0
- package/dist/constants/ai-agent.d.ts +43 -0
- package/dist/constants/execution-status.d.ts +38 -0
- package/dist/constants/geo.d.ts +8 -0
- package/dist/context/agent-conversation-provider.d.ts +37 -0
- package/dist/context/deployment-provider.d.ts +10 -0
- package/dist/context/index.d.ts +2 -0
- package/dist/context/signin-provider.d.ts +21 -0
- package/dist/hooks/index.d.ts +22 -0
- package/dist/hooks/use-agent-conversation.d.ts +61 -0
- package/dist/hooks/use-channel-counts.d.ts +14 -0
- package/dist/hooks/use-client.d.ts +7 -0
- package/dist/hooks/use-context-manager.d.ts +30 -0
- package/dist/hooks/use-conversation-sessions.d.ts +32 -0
- package/dist/hooks/use-deployment.d.ts +1 -0
- package/dist/hooks/use-forgot-password.d.ts +11 -0
- package/dist/hooks/use-invitation.d.ts +23 -0
- package/dist/hooks/use-magic-link.d.ts +14 -0
- package/dist/hooks/use-navigation.d.ts +6 -0
- package/dist/hooks/use-notification-stream.d.ts +27 -0
- package/dist/hooks/use-notifications.d.ts +30 -0
- package/dist/hooks/use-organization.d.ts +81 -0
- package/dist/hooks/use-session.d.ts +26 -0
- package/dist/hooks/use-signin.d.ts +140 -0
- package/dist/hooks/use-signup.d.ts +46 -0
- package/dist/hooks/use-sso-callback.d.ts +15 -0
- package/dist/hooks/use-user.d.ts +78 -0
- package/dist/hooks/use-waitlist.d.ts +24 -0
- package/dist/hooks/use-workspace.d.ts +50 -0
- package/dist/index.cjs.js +5633 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.es.js +24457 -0
- package/dist/index.es.js.map +1 -0
- package/dist/models/websocket.d.ts +25 -0
- package/dist/services/websocket-manager.d.ts +46 -0
- package/dist/types/deployment-context.d.ts +7 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/notification.d.ts +51 -0
- package/dist/types/platform-adapter.d.ts +10 -0
- package/dist/utils/event-emitter.d.ts +9 -0
- package/dist/utils/navigation.d.ts +2 -0
- package/dist/utils/profile-completion.d.ts +3 -0
- package/dist/utils/response-mapper.d.ts +2 -0
- package/package.json +37 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { CONNECTION_STATES } from '../constants/ai-agent';
|
|
2
|
+
import { FrontendStatus } from '../constants/execution-status';
|
|
3
|
+
export interface UserInputRequest {
|
|
4
|
+
question: string;
|
|
5
|
+
context: string;
|
|
6
|
+
input_type: "text" | "number" | "select" | "multiselect" | "boolean" | "date";
|
|
7
|
+
options?: string[];
|
|
8
|
+
default_value?: string;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface ImageData {
|
|
12
|
+
mime_type: string;
|
|
13
|
+
data?: string;
|
|
14
|
+
url?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface ConversationMessage {
|
|
17
|
+
id: string | number;
|
|
18
|
+
role: "user" | "assistant" | "system";
|
|
19
|
+
content: string;
|
|
20
|
+
timestamp: Date;
|
|
21
|
+
isStreaming?: boolean;
|
|
22
|
+
images?: ImageData[];
|
|
23
|
+
metadata?: {
|
|
24
|
+
type?: "user_input_request" | "log";
|
|
25
|
+
userInputRequest?: UserInputRequest;
|
|
26
|
+
messageType?: string;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
interface UseAgentConversationProps {
|
|
30
|
+
contextId: string;
|
|
31
|
+
agentName: string;
|
|
32
|
+
token: string;
|
|
33
|
+
platformAdapter?: {
|
|
34
|
+
onPlatformEvent?: (eventName: string, eventData: unknown) => void;
|
|
35
|
+
onPlatformFunction?: (functionName: string, parameters: unknown, executionId: string) => Promise<unknown>;
|
|
36
|
+
};
|
|
37
|
+
onUserInputRequest?: (request: UserInputRequest) => Promise<string>;
|
|
38
|
+
autoConnect?: boolean;
|
|
39
|
+
}
|
|
40
|
+
export declare function useAgentConversation({ contextId, agentName, token, platformAdapter, autoConnect, }: UseAgentConversationProps): {
|
|
41
|
+
messages: ConversationMessage[];
|
|
42
|
+
pendingMessage: string | null;
|
|
43
|
+
pendingImages: ImageData[] | null;
|
|
44
|
+
connectionState: {
|
|
45
|
+
status: (typeof CONNECTION_STATES)[keyof typeof CONNECTION_STATES];
|
|
46
|
+
};
|
|
47
|
+
isConnected: boolean;
|
|
48
|
+
isExecuting: boolean;
|
|
49
|
+
executionStatus: FrontendStatus;
|
|
50
|
+
isWaitingForInput: boolean;
|
|
51
|
+
hasMoreMessages: boolean;
|
|
52
|
+
isLoadingMore: boolean;
|
|
53
|
+
sendMessage: (content: string, images?: ImageData[]) => void;
|
|
54
|
+
submitUserInput: (value: string) => void;
|
|
55
|
+
clearMessages: () => void;
|
|
56
|
+
loadMoreMessages: () => Promise<void>;
|
|
57
|
+
cancelExecution: () => void;
|
|
58
|
+
connect: () => Promise<() => void>;
|
|
59
|
+
disconnect: () => void;
|
|
60
|
+
};
|
|
61
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ChannelCounts } from '../../../../../../../../lib/types/notification';
|
|
2
|
+
type UseChannelCountsReturnType = {
|
|
3
|
+
loading: true;
|
|
4
|
+
counts: never;
|
|
5
|
+
error: Error | null;
|
|
6
|
+
refetch: () => Promise<void>;
|
|
7
|
+
} | {
|
|
8
|
+
loading: false;
|
|
9
|
+
counts: ChannelCounts;
|
|
10
|
+
error: Error | null;
|
|
11
|
+
refetch: () => Promise<void>;
|
|
12
|
+
};
|
|
13
|
+
export declare function useChannelCounts(): UseChannelCountsReturnType;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export interface ExecutionContext {
|
|
2
|
+
id: string;
|
|
3
|
+
title: string;
|
|
4
|
+
status: 'idle' | 'running' | 'waiting_for_input' | 'interrupted' | 'completed' | 'failed';
|
|
5
|
+
last_activity_at: string;
|
|
6
|
+
context_group?: string;
|
|
7
|
+
created_at: string;
|
|
8
|
+
}
|
|
9
|
+
export interface CreateContextRequest {
|
|
10
|
+
title: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ListContextsOptions {
|
|
13
|
+
limit?: number;
|
|
14
|
+
offset?: number;
|
|
15
|
+
status?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface ListContextsResponse {
|
|
18
|
+
data: ExecutionContext[];
|
|
19
|
+
has_more: boolean;
|
|
20
|
+
}
|
|
21
|
+
type UseContextManagerReturnType = {
|
|
22
|
+
contexts: ExecutionContext[];
|
|
23
|
+
loading: boolean;
|
|
24
|
+
error: Error | null;
|
|
25
|
+
createContext: (request: CreateContextRequest) => Promise<ExecutionContext>;
|
|
26
|
+
deleteContext: (id: string) => Promise<void>;
|
|
27
|
+
refetch: () => Promise<void>;
|
|
28
|
+
};
|
|
29
|
+
export declare function useContextManager(token: string): UseContextManagerReturnType;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface ConversationSession {
|
|
2
|
+
id: string;
|
|
3
|
+
title: string;
|
|
4
|
+
status: 'idle' | 'running' | 'waiting_for_input' | 'interrupted' | 'completed' | 'failed';
|
|
5
|
+
last_activity_at: string;
|
|
6
|
+
context_group?: string;
|
|
7
|
+
created_at: string;
|
|
8
|
+
}
|
|
9
|
+
export interface CreateSessionRequest {
|
|
10
|
+
title: string;
|
|
11
|
+
system_instructions?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface ListSessionsOptions {
|
|
14
|
+
limit?: number;
|
|
15
|
+
offset?: number;
|
|
16
|
+
status?: string;
|
|
17
|
+
search?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface ListSessionsResponse {
|
|
20
|
+
data: ConversationSession[];
|
|
21
|
+
has_more: boolean;
|
|
22
|
+
}
|
|
23
|
+
type UseConversationSessionsReturnType = {
|
|
24
|
+
sessions: ConversationSession[];
|
|
25
|
+
loading: boolean;
|
|
26
|
+
error: Error | null;
|
|
27
|
+
createSession: (request: CreateSessionRequest) => Promise<ConversationSession>;
|
|
28
|
+
deleteSession: (id: string) => Promise<void>;
|
|
29
|
+
refetch: () => Promise<void>;
|
|
30
|
+
};
|
|
31
|
+
export declare function useConversationSessions(token: string): UseConversationSessionsReturnType;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useDeployment(): import('..').DeploymentContextType;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ApiResult, ErrorInterface } from '../../../../../../../../lib/types';
|
|
2
|
+
export declare function useForgotPassword(): {
|
|
3
|
+
loading: boolean;
|
|
4
|
+
forgotPassword: (email: string) => Promise<ApiResult<{}, ErrorInterface>>;
|
|
5
|
+
error: Error | null;
|
|
6
|
+
};
|
|
7
|
+
export declare function useResetPassword(): {
|
|
8
|
+
loading: boolean;
|
|
9
|
+
resetPassword: (email: string, otp: string, password: string) => Promise<ApiResult<{}, ErrorInterface>>;
|
|
10
|
+
error: Error | null;
|
|
11
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface AcceptInvitationResponse {
|
|
2
|
+
organization?: {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
};
|
|
6
|
+
workspace?: {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
};
|
|
10
|
+
signin_id?: string;
|
|
11
|
+
already_member?: boolean;
|
|
12
|
+
message?: string;
|
|
13
|
+
requires_signin?: boolean;
|
|
14
|
+
invited_email?: string;
|
|
15
|
+
error_code?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const useInvitation: () => {
|
|
18
|
+
acceptInvitation: (token: string) => Promise<AcceptInvitationResponse>;
|
|
19
|
+
invitationData: AcceptInvitationResponse | null;
|
|
20
|
+
loading: boolean;
|
|
21
|
+
error: string | null;
|
|
22
|
+
reset: () => void;
|
|
23
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ApiResult, ErrorInterface } from '../../../../../../../../lib/types';
|
|
2
|
+
export interface MagicLinkParams {
|
|
3
|
+
token?: string;
|
|
4
|
+
attempt?: string;
|
|
5
|
+
redirectUri?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface UseMagicLinkVerificationReturnType {
|
|
8
|
+
loading: boolean;
|
|
9
|
+
verifyMagicLink: (params: MagicLinkParams) => Promise<ApiResult<{}, ErrorInterface>>;
|
|
10
|
+
error: Error | null;
|
|
11
|
+
success: boolean | null;
|
|
12
|
+
}
|
|
13
|
+
export declare function useMagicLinkVerification(): UseMagicLinkVerificationReturnType;
|
|
14
|
+
export declare function useMagicLinkParams(): MagicLinkParams;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { NavigateOptions } from '../../../../../../../../lib/types/platform-adapter';
|
|
2
|
+
export declare const useNavigation: () => {
|
|
3
|
+
navigate: (to: string, options?: NavigateOptions) => void;
|
|
4
|
+
navigateToSignIn: (redirectUri?: string) => void;
|
|
5
|
+
navigateToSignUp: (redirectUri?: string) => void;
|
|
6
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface NotificationMessage {
|
|
2
|
+
id: number;
|
|
3
|
+
user_id: number;
|
|
4
|
+
deployment_id: number;
|
|
5
|
+
title: string;
|
|
6
|
+
body: string;
|
|
7
|
+
severity: string;
|
|
8
|
+
action_url?: string;
|
|
9
|
+
action_label?: string;
|
|
10
|
+
created_at: string;
|
|
11
|
+
}
|
|
12
|
+
export interface UseNotificationStreamOptions {
|
|
13
|
+
enabled?: boolean;
|
|
14
|
+
channels?: string[];
|
|
15
|
+
organizationIds?: number[];
|
|
16
|
+
workspaceIds?: number[];
|
|
17
|
+
onNotification?: (notification: NotificationMessage) => void;
|
|
18
|
+
onError?: (error: string) => void;
|
|
19
|
+
reconnectDelay?: number;
|
|
20
|
+
maxReconnectAttempts?: number;
|
|
21
|
+
}
|
|
22
|
+
export declare function useNotificationStream({ enabled, channels, organizationIds, workspaceIds, onNotification, onError, reconnectDelay, maxReconnectAttempts, }?: UseNotificationStreamOptions): {
|
|
23
|
+
isConnected: boolean;
|
|
24
|
+
connectionError: string | null;
|
|
25
|
+
disconnect: () => void;
|
|
26
|
+
reconnect: () => void;
|
|
27
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Notification, NotificationListParams, ChannelCounts } from '../../../../../../../../lib/types/notification';
|
|
2
|
+
import { Client } from '../../../../../../../../lib/types';
|
|
3
|
+
type UseNotificationsReturnType = {
|
|
4
|
+
loading: true;
|
|
5
|
+
notifications: never;
|
|
6
|
+
unreadCount: never;
|
|
7
|
+
unreadCounts: never;
|
|
8
|
+
channels: never;
|
|
9
|
+
hasMore: never;
|
|
10
|
+
markAsRead: never;
|
|
11
|
+
markAllAsRead: never;
|
|
12
|
+
deleteNotification: never;
|
|
13
|
+
error: Error | null;
|
|
14
|
+
refetch: () => Promise<void>;
|
|
15
|
+
} | {
|
|
16
|
+
loading: false;
|
|
17
|
+
error: Error | null;
|
|
18
|
+
notifications: Notification[];
|
|
19
|
+
unreadCount: number;
|
|
20
|
+
unreadCounts: ChannelCounts;
|
|
21
|
+
channels: string[];
|
|
22
|
+
hasMore: boolean;
|
|
23
|
+
markAsRead: (notificationId: string) => Promise<void>;
|
|
24
|
+
markAllAsRead: () => Promise<void>;
|
|
25
|
+
deleteNotification: (notificationId: string) => Promise<void>;
|
|
26
|
+
refetch: () => Promise<void>;
|
|
27
|
+
};
|
|
28
|
+
export declare function fetchChannelCounts(client: Client): Promise<ChannelCounts>;
|
|
29
|
+
export declare function useNotifications(params?: NotificationListParams): UseNotificationsReturnType;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { NewDomain, NewOrgnization, Organization, OrganizationDomain, OrganizationInvitation, OrganizationInvitationPayload, OrganizationMembership, OrganizationMembershipWithOrganization, OrganizationRole, OrganizationUpdate, RoleCreate } from '../../../../../../../../lib/types';
|
|
2
|
+
export declare const useOrganizationList: () => {
|
|
3
|
+
organizations: Organization[] | undefined;
|
|
4
|
+
loading: boolean;
|
|
5
|
+
error: null;
|
|
6
|
+
refetch: import('swr').KeyedMutator<OrganizationMembershipWithOrganization[]>;
|
|
7
|
+
leaveOrganization: (organization: Organization) => Promise<void>;
|
|
8
|
+
getOrganizationRoles: (organization: Organization) => Promise<OrganizationRole[]>;
|
|
9
|
+
getOrganizationMembers: (organization: Organization) => Promise<OrganizationMembership[]>;
|
|
10
|
+
removeOrganizationMember: (organization: Organization, member: OrganizationMembership) => Promise<void>;
|
|
11
|
+
createOrganization: (organization: NewOrgnization) => Promise<import('@snipextt/wacht-types').ApiResult<Organization>>;
|
|
12
|
+
getOrganizationInvitations: (organization: Organization) => Promise<OrganizationInvitation[]>;
|
|
13
|
+
getOrganizationDomains: (organization: Organization) => Promise<OrganizationDomain[]>;
|
|
14
|
+
addOrganizationDomain: (organization: Organization, domain: NewDomain) => Promise<import('@snipextt/wacht-types').ApiResult<OrganizationDomain>>;
|
|
15
|
+
verifyOrganizationDomain: (organization: Organization, domain: OrganizationDomain) => Promise<import('@snipextt/wacht-types').ApiResult<OrganizationDomain>>;
|
|
16
|
+
removeOrganizationDomain: (organization: Organization, domain: OrganizationDomain) => Promise<import('@snipextt/wacht-types').ApiResult<OrganizationDomain>>;
|
|
17
|
+
addRoleToOrganizationMember: (organization: Organization, member: OrganizationMembership, role: OrganizationRole) => Promise<OrganizationMembership>;
|
|
18
|
+
removeRoleFromOrganizationMember: (organization: Organization, member: OrganizationMembership, role: OrganizationRole) => Promise<OrganizationMembership>;
|
|
19
|
+
inviteOrganizationMember: (organization: Organization, invitation: OrganizationInvitationPayload) => Promise<OrganizationInvitation>;
|
|
20
|
+
discardOrganizationInvitation: (organization: Organization, invitation: OrganizationInvitation) => Promise<OrganizationInvitation>;
|
|
21
|
+
resendOrganizationInvitation: (organization: Organization, invitation: OrganizationInvitation) => Promise<OrganizationInvitation>;
|
|
22
|
+
updateOrganization: (organization: Organization, update: OrganizationUpdate) => Promise<import('@snipextt/wacht-types').ApiResult<Organization>>;
|
|
23
|
+
addRole: (organization: Organization, newRole: RoleCreate) => Promise<import('@snipextt/wacht-types').ApiResult<OrganizationRole>>;
|
|
24
|
+
removeOrganizationRoles: (organization: Organization, role: OrganizationRole) => Promise<void>;
|
|
25
|
+
deleteOrganization: (organization: Organization) => Promise<void>;
|
|
26
|
+
};
|
|
27
|
+
export declare const useActiveOrganization: () => {
|
|
28
|
+
activeOrganization: null;
|
|
29
|
+
loading: boolean;
|
|
30
|
+
error: Error | null;
|
|
31
|
+
updateOrganization: never;
|
|
32
|
+
getRoles: never;
|
|
33
|
+
getMembers: never;
|
|
34
|
+
getDomains: never;
|
|
35
|
+
addDomain: never;
|
|
36
|
+
verifyDomain: never;
|
|
37
|
+
removeDomain: never;
|
|
38
|
+
removeRole: never;
|
|
39
|
+
getInvitations: never;
|
|
40
|
+
removeMember: never;
|
|
41
|
+
addMemberRole: never;
|
|
42
|
+
removeMemberRole: never;
|
|
43
|
+
inviteMember: never;
|
|
44
|
+
discardInvitation: never;
|
|
45
|
+
resendInvitation: never;
|
|
46
|
+
leave: never;
|
|
47
|
+
refetch?: undefined;
|
|
48
|
+
} | {
|
|
49
|
+
activeOrganization: Organization | null;
|
|
50
|
+
loading: boolean;
|
|
51
|
+
refetch: import('swr').KeyedMutator<OrganizationMembershipWithOrganization[]>;
|
|
52
|
+
getRoles: () => Promise<OrganizationRole[]>;
|
|
53
|
+
updateOrganization: (update: OrganizationUpdate) => Promise<{
|
|
54
|
+
data: never;
|
|
55
|
+
errors: import('@snipextt/wacht-types').ErrorInterface[];
|
|
56
|
+
} | never[] | {
|
|
57
|
+
data: Organization;
|
|
58
|
+
errors: never;
|
|
59
|
+
}>;
|
|
60
|
+
getMembers: () => Promise<OrganizationMembership[]>;
|
|
61
|
+
getDomains: () => Promise<OrganizationDomain[]>;
|
|
62
|
+
addDomain: (domain: NewDomain) => Promise<import('@snipextt/wacht-types').ApiResult<OrganizationDomain> | undefined>;
|
|
63
|
+
verifyDomain: (domain: OrganizationDomain) => Promise<import('@snipextt/wacht-types').ApiResult<OrganizationDomain> | undefined>;
|
|
64
|
+
removeDomain: (domain: OrganizationDomain) => Promise<import('@snipextt/wacht-types').ApiResult<OrganizationDomain> | undefined>;
|
|
65
|
+
getInvitations: () => Promise<OrganizationInvitation[]>;
|
|
66
|
+
removeMember: (member: OrganizationMembership) => Promise<void | never[]>;
|
|
67
|
+
leave: () => Promise<void>;
|
|
68
|
+
removeRole: (role: OrganizationRole) => Promise<void>;
|
|
69
|
+
addMemberRole: (member: OrganizationMembership, role: OrganizationRole) => Promise<OrganizationMembership | undefined>;
|
|
70
|
+
removeMemberRole: (member: OrganizationMembership, role: OrganizationRole) => Promise<OrganizationMembership | undefined>;
|
|
71
|
+
inviteMember: (invitationPayload: OrganizationInvitationPayload) => Promise<OrganizationInvitation | undefined>;
|
|
72
|
+
discardInvitation: (invitation: OrganizationInvitation) => Promise<OrganizationInvitation | undefined>;
|
|
73
|
+
resendInvitation: (invitation: OrganizationInvitation) => Promise<OrganizationInvitation | undefined>;
|
|
74
|
+
error: null;
|
|
75
|
+
};
|
|
76
|
+
export declare const useOrganizationMemberships: () => {
|
|
77
|
+
organizationMemberships: OrganizationMembershipWithOrganization[] | undefined;
|
|
78
|
+
loading: boolean;
|
|
79
|
+
error: any;
|
|
80
|
+
refetch: import('swr').KeyedMutator<OrganizationMembershipWithOrganization[]>;
|
|
81
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Session } from '../../../../../../../../lib/types';
|
|
2
|
+
type UseSessionReturnType = {
|
|
3
|
+
loading: true;
|
|
4
|
+
session: never;
|
|
5
|
+
switchSignIn: never;
|
|
6
|
+
switchOrganization: never;
|
|
7
|
+
switchWorkspace: never;
|
|
8
|
+
signOut: never;
|
|
9
|
+
getToken: never;
|
|
10
|
+
addNewAccount: never;
|
|
11
|
+
error: Error | null;
|
|
12
|
+
refetch: () => Promise<void>;
|
|
13
|
+
} | {
|
|
14
|
+
loading: false;
|
|
15
|
+
error: Error | null;
|
|
16
|
+
session: Session;
|
|
17
|
+
switchSignIn: (signInId: string) => Promise<void>;
|
|
18
|
+
signOut: (signInId?: string) => Promise<void>;
|
|
19
|
+
getToken: (template?: string) => Promise<string>;
|
|
20
|
+
switchOrganization: (organizationId?: string) => Promise<void>;
|
|
21
|
+
switchWorkspace: (workspaceId: string) => Promise<void>;
|
|
22
|
+
addNewAccount: () => void;
|
|
23
|
+
refetch: () => Promise<void>;
|
|
24
|
+
};
|
|
25
|
+
export declare function useSession(): UseSessionReturnType;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { ApiResult, ErrorInterface, Session, SigninAttempt, ProfileCompletionData } from '../../../../../../../../lib/types';
|
|
2
|
+
type UsernameSignInParams = {
|
|
3
|
+
username: string;
|
|
4
|
+
password: string;
|
|
5
|
+
};
|
|
6
|
+
type SignInPlainUsername = ({ username, password, }: UsernameSignInParams) => Promise<ApiResult<Session>>;
|
|
7
|
+
type EmailSignInParams = {
|
|
8
|
+
email: string;
|
|
9
|
+
password: string;
|
|
10
|
+
};
|
|
11
|
+
type SignInPlainEmail = ({ email, password, }: EmailSignInParams) => Promise<ApiResult<Session>>;
|
|
12
|
+
type GenericSignInParams = {
|
|
13
|
+
email?: string;
|
|
14
|
+
username?: string;
|
|
15
|
+
password?: string;
|
|
16
|
+
phone?: string;
|
|
17
|
+
strategy?: string;
|
|
18
|
+
};
|
|
19
|
+
type SignInGeneric = ({ email, username, password, phone, strategy, }: GenericSignInParams) => Promise<ApiResult<Session>>;
|
|
20
|
+
type PhoneSignInParams = {
|
|
21
|
+
phone: string;
|
|
22
|
+
};
|
|
23
|
+
type SignInPhone = ({ phone, }: PhoneSignInParams) => Promise<ApiResult<Session>>;
|
|
24
|
+
type EmailOTPSignInParams = {
|
|
25
|
+
email: string;
|
|
26
|
+
};
|
|
27
|
+
type SignInEmailOTP = ({ email, }: EmailOTPSignInParams) => Promise<ApiResult<Session>>;
|
|
28
|
+
type MagicLinkSignInParams = {
|
|
29
|
+
email: string;
|
|
30
|
+
};
|
|
31
|
+
type SignInMagicLink = ({ email, }: MagicLinkSignInParams) => Promise<ApiResult<Session>>;
|
|
32
|
+
export declare enum OAuthProvider {
|
|
33
|
+
XOauth = "x_oauth",
|
|
34
|
+
GithubOauth = "github_oauth",
|
|
35
|
+
GitlabOauth = "gitlab_oauth",
|
|
36
|
+
GoogleOauth = "google_oauth",
|
|
37
|
+
FacebookOauth = "facebook_oauth",
|
|
38
|
+
MicrosoftOauth = "microsoft_oauth",
|
|
39
|
+
LinkedinOauth = "linkedin_oauth",
|
|
40
|
+
DiscordOauth = "discord_oauth",
|
|
41
|
+
AppleOauth = "apple_oauth"
|
|
42
|
+
}
|
|
43
|
+
type SignInOauth = ({ provider, redirectUri, }: {
|
|
44
|
+
provider: OAuthProvider;
|
|
45
|
+
redirectUri?: string;
|
|
46
|
+
}) => Promise<ApiResult<InitSSOResponseType>>;
|
|
47
|
+
export declare enum SignInStrategy {
|
|
48
|
+
Username = "username",
|
|
49
|
+
Email = "email",
|
|
50
|
+
Phone = "phone",
|
|
51
|
+
EmailOTP = "email_otp",
|
|
52
|
+
MagicLink = "magic_link",
|
|
53
|
+
Oauth = "oauth",
|
|
54
|
+
Generic = "generic"
|
|
55
|
+
}
|
|
56
|
+
type EmailOTPVerificationParams = {
|
|
57
|
+
strategy: "email_otp";
|
|
58
|
+
redirectUri?: string;
|
|
59
|
+
};
|
|
60
|
+
type PhoneOTPVerificationParams = {
|
|
61
|
+
strategy: "phone_otp";
|
|
62
|
+
lastDigits?: string;
|
|
63
|
+
};
|
|
64
|
+
type MagicLinkVerificationParams = {
|
|
65
|
+
strategy: "magic_link";
|
|
66
|
+
redirectUri?: string;
|
|
67
|
+
};
|
|
68
|
+
type VerificationParams = EmailOTPVerificationParams | PhoneOTPVerificationParams | MagicLinkVerificationParams;
|
|
69
|
+
type PrepareVerificationResponse = {
|
|
70
|
+
otp_sent?: boolean;
|
|
71
|
+
masked_phone?: string;
|
|
72
|
+
masked_email?: string;
|
|
73
|
+
verification_method?: string;
|
|
74
|
+
};
|
|
75
|
+
type CreateSignInStrategyResult = {
|
|
76
|
+
(strategy: SignInStrategy.Username): SignInPlainUsername;
|
|
77
|
+
(strategy: SignInStrategy.Email): SignInPlainEmail;
|
|
78
|
+
(strategy: SignInStrategy.Phone): SignInPhone;
|
|
79
|
+
(strategy: SignInStrategy.EmailOTP): SignInEmailOTP;
|
|
80
|
+
(strategy: SignInStrategy.MagicLink): SignInMagicLink;
|
|
81
|
+
(strategy: SignInStrategy.Oauth): SignInOauth;
|
|
82
|
+
(strategy: SignInStrategy.Generic): SignInGeneric;
|
|
83
|
+
};
|
|
84
|
+
type SignIn = {
|
|
85
|
+
createStrategy: CreateSignInStrategyResult;
|
|
86
|
+
prepareVerification: (params: VerificationParams) => Promise<ApiResult<PrepareVerificationResponse>>;
|
|
87
|
+
completeVerification: (verificationCode: string) => Promise<Session>;
|
|
88
|
+
completeProfile: (data: ProfileCompletionData) => Promise<Session>;
|
|
89
|
+
};
|
|
90
|
+
type UseSignInReturnType = {
|
|
91
|
+
loading: false;
|
|
92
|
+
signIn: SignIn;
|
|
93
|
+
signinAttempt: SigninAttempt | null;
|
|
94
|
+
discardSignInAttempt: () => void;
|
|
95
|
+
setSignInAttempt: (attempt: SigninAttempt | null) => void;
|
|
96
|
+
error: ApiResult<unknown, ErrorInterface> | null;
|
|
97
|
+
} | {
|
|
98
|
+
loading: true;
|
|
99
|
+
signIn: never;
|
|
100
|
+
signinAttempt: null;
|
|
101
|
+
discardSignInAttempt: () => void;
|
|
102
|
+
setSignInAttempt: (attempt: SigninAttempt | null) => void;
|
|
103
|
+
error: null;
|
|
104
|
+
};
|
|
105
|
+
type InitSSOResponseType = {
|
|
106
|
+
oauth_url: string;
|
|
107
|
+
session: Session;
|
|
108
|
+
};
|
|
109
|
+
export declare function useSignIn(): UseSignInReturnType;
|
|
110
|
+
type SignInFunction<T extends SignInStrategy> = {
|
|
111
|
+
[SignInStrategy.Username]: SignInPlainUsername;
|
|
112
|
+
[SignInStrategy.Email]: SignInPlainEmail;
|
|
113
|
+
[SignInStrategy.Phone]: SignInPhone;
|
|
114
|
+
[SignInStrategy.EmailOTP]: SignInEmailOTP;
|
|
115
|
+
[SignInStrategy.MagicLink]: SignInMagicLink;
|
|
116
|
+
[SignInStrategy.Oauth]: SignInOauth;
|
|
117
|
+
[SignInStrategy.Generic]: SignInGeneric;
|
|
118
|
+
}[T];
|
|
119
|
+
export type UseSignInWithStrategyReturnType<T extends SignInStrategy> = {
|
|
120
|
+
loading: true;
|
|
121
|
+
signIn: never;
|
|
122
|
+
signinAttempt: null;
|
|
123
|
+
discardSignInAttempt: () => void;
|
|
124
|
+
setSignInAttempt: (attempt: SigninAttempt | null) => void;
|
|
125
|
+
error: null;
|
|
126
|
+
} | {
|
|
127
|
+
loading: false;
|
|
128
|
+
signIn: {
|
|
129
|
+
create: SignInFunction<T>;
|
|
130
|
+
completeVerification: (verificationCode: string) => Promise<Session>;
|
|
131
|
+
prepareVerification: (params: VerificationParams) => Promise<ApiResult<PrepareVerificationResponse>>;
|
|
132
|
+
completeProfile: (data: ProfileCompletionData) => Promise<Session>;
|
|
133
|
+
};
|
|
134
|
+
signinAttempt: SigninAttempt | null;
|
|
135
|
+
discardSignInAttempt: () => void;
|
|
136
|
+
setSignInAttempt: (attempt: SigninAttempt | null) => void;
|
|
137
|
+
error: ApiResult<unknown, ErrorInterface> | null;
|
|
138
|
+
};
|
|
139
|
+
export declare function useSignInWithStrategy<T extends SignInStrategy>(strategy: T): UseSignInWithStrategyReturnType<T>;
|
|
140
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ApiResult, ErrorInterface, Session, SignupAttempt, SignUpParams } from '../../../../../../../../lib/types';
|
|
2
|
+
export interface DeploymentInvitationData {
|
|
3
|
+
valid: boolean;
|
|
4
|
+
first_name?: string;
|
|
5
|
+
last_name?: string;
|
|
6
|
+
email?: string;
|
|
7
|
+
message?: string;
|
|
8
|
+
error_code?: string;
|
|
9
|
+
}
|
|
10
|
+
export type SignUpFunction = {
|
|
11
|
+
create: (params: SignUpParams) => Promise<ApiResult<unknown, ErrorInterface>>;
|
|
12
|
+
prepareVerification: (params: SignupVerificationParams) => Promise<ApiResult<PrepareVerificationResponse>>;
|
|
13
|
+
completeVerification: (verificationCode: string) => Promise<ApiResult<Session>>;
|
|
14
|
+
validateDeploymentInvitation: (token: string) => Promise<DeploymentInvitationData>;
|
|
15
|
+
};
|
|
16
|
+
export type SignupVerificationStrategy = "email_otp" | "phone_otp";
|
|
17
|
+
type SignupEmailOTPVerificationParams = {
|
|
18
|
+
strategy: "email_otp";
|
|
19
|
+
redirectUri?: string;
|
|
20
|
+
};
|
|
21
|
+
type SignupPhoneOTPVerificationParams = {
|
|
22
|
+
strategy: "phone_otp";
|
|
23
|
+
lastDigits?: string;
|
|
24
|
+
};
|
|
25
|
+
type SignupVerificationParams = SignupEmailOTPVerificationParams | SignupPhoneOTPVerificationParams;
|
|
26
|
+
type PrepareVerificationResponse = {
|
|
27
|
+
otp_sent?: boolean;
|
|
28
|
+
masked_phone?: string;
|
|
29
|
+
masked_email?: string;
|
|
30
|
+
verification_method?: string;
|
|
31
|
+
};
|
|
32
|
+
export type UseSignUpReturnType = {
|
|
33
|
+
loading: true;
|
|
34
|
+
signUp: never;
|
|
35
|
+
signupAttempt: null;
|
|
36
|
+
discardSignupAttempt: () => void;
|
|
37
|
+
errors: null;
|
|
38
|
+
} | {
|
|
39
|
+
loading: false;
|
|
40
|
+
signUp: SignUpFunction;
|
|
41
|
+
signupAttempt: SignupAttempt | null;
|
|
42
|
+
discardSignupAttempt: () => void;
|
|
43
|
+
errors: ApiResult<unknown, ErrorInterface> | null;
|
|
44
|
+
};
|
|
45
|
+
export declare function useSignUp(): UseSignUpReturnType;
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Session, SigninAttempt } from '../../../../../../../../lib/types';
|
|
2
|
+
interface SSOCallbackState {
|
|
3
|
+
loading: boolean;
|
|
4
|
+
error: Error | null;
|
|
5
|
+
session: Session | null;
|
|
6
|
+
redirectUri: string | null;
|
|
7
|
+
processed: boolean;
|
|
8
|
+
signinAttempt: SigninAttempt | null;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Headless hook for handling SSO OAuth callback
|
|
12
|
+
* Automatically processes URL parameters and handles the callback flow
|
|
13
|
+
*/
|
|
14
|
+
export declare function useSSOCallback(): SSOCallbackState;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { CurrentUser, UserAuthenticator, UserEmailAddress, UserPhoneNumber, SignIn } from '../../../../../../../../lib/types';
|
|
2
|
+
type SecondFactorPolicy = "none" | "optional" | "enforced";
|
|
3
|
+
interface ProfileUpdateData {
|
|
4
|
+
first_name?: string;
|
|
5
|
+
last_name?: string;
|
|
6
|
+
username?: string;
|
|
7
|
+
primary_email_address_id?: string;
|
|
8
|
+
primary_phone_number_id?: string;
|
|
9
|
+
second_factor_policy?: SecondFactorPolicy;
|
|
10
|
+
remove_profile_picture?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function useUser(): {
|
|
13
|
+
user: {
|
|
14
|
+
refetch: import('swr').KeyedMutator<CurrentUser>;
|
|
15
|
+
id?: string | undefined;
|
|
16
|
+
first_name?: string | undefined;
|
|
17
|
+
last_name?: string | undefined;
|
|
18
|
+
username?: string | undefined;
|
|
19
|
+
availability?: "available" | "busy" | "away" | undefined;
|
|
20
|
+
has_profile_picture?: string | undefined;
|
|
21
|
+
profile_picture_url?: string | undefined;
|
|
22
|
+
primary_email_address_id?: string | undefined;
|
|
23
|
+
primary_phone_number_id?: string | undefined;
|
|
24
|
+
primary_email_address?: UserEmailAddress | undefined;
|
|
25
|
+
primary_phone_number?: UserPhoneNumber;
|
|
26
|
+
second_factor_policy?: import('@snipextt/wacht-types').SecondFactorPolicy | undefined;
|
|
27
|
+
user_email_addresses?: UserEmailAddress[] | undefined;
|
|
28
|
+
user_phone_numbers?: UserPhoneNumber[] | undefined;
|
|
29
|
+
email_addresses?: UserEmailAddress[];
|
|
30
|
+
phone_numbers?: UserPhoneNumber[];
|
|
31
|
+
social_connections?: import('@snipextt/wacht-types').SocialConnection[] | undefined;
|
|
32
|
+
user_authenticator?: UserAuthenticator;
|
|
33
|
+
authenticators?: UserAuthenticator[];
|
|
34
|
+
backup_codes_generated?: boolean;
|
|
35
|
+
backup_codes?: string[];
|
|
36
|
+
has_password?: boolean | undefined;
|
|
37
|
+
public_metadata?: Record<string, unknown> | undefined;
|
|
38
|
+
};
|
|
39
|
+
loading: boolean;
|
|
40
|
+
error: any;
|
|
41
|
+
updateProfile: (data: ProfileUpdateData) => Promise<import('@snipextt/wacht-types').ApiResult<unknown>>;
|
|
42
|
+
getEmailAddresses: () => Promise<import('@snipextt/wacht-types').ApiResult<unknown>>;
|
|
43
|
+
getEmailAddress: (id: string) => Promise<import('@snipextt/wacht-types').ApiResult<unknown>>;
|
|
44
|
+
createEmailAddress: (email: string) => Promise<import('@snipextt/wacht-types').ApiResult<UserEmailAddress>>;
|
|
45
|
+
deleteEmailAddress: (id: string) => Promise<import('@snipextt/wacht-types').ApiResult<unknown>>;
|
|
46
|
+
prepareEmailVerification: (id: string) => Promise<import('@snipextt/wacht-types').ApiResult<unknown>>;
|
|
47
|
+
attemptEmailVerification: (id: string, otp: string) => Promise<import('@snipextt/wacht-types').ApiResult<unknown>>;
|
|
48
|
+
makeEmailPrimary: (id: string) => Promise<import('@snipextt/wacht-types').ApiResult<unknown>>;
|
|
49
|
+
createPhoneNumber: (phone_number: string, country_code: string) => Promise<import('@snipextt/wacht-types').ApiResult<UserPhoneNumber>>;
|
|
50
|
+
deletePhoneNumber: (id: string) => Promise<import('@snipextt/wacht-types').ApiResult<unknown>>;
|
|
51
|
+
preparePhoneVerification: (id: string) => Promise<import('@snipextt/wacht-types').ApiResult<unknown>>;
|
|
52
|
+
attemptPhoneVerification: (id: string, otp: string) => Promise<import('@snipextt/wacht-types').ApiResult<unknown>>;
|
|
53
|
+
makePhonePrimary: (id: string) => Promise<import('@snipextt/wacht-types').ApiResult<unknown>>;
|
|
54
|
+
setupAuthenticator: () => Promise<UserAuthenticator>;
|
|
55
|
+
verifyAuthenticator: (id: string, codes: string[]) => Promise<import('@snipextt/wacht-types').ApiResult<unknown>>;
|
|
56
|
+
deleteAuthenticator: (id: string) => Promise<import('@snipextt/wacht-types').ApiResult<unknown>>;
|
|
57
|
+
generateBackupCodes: () => Promise<string[]>;
|
|
58
|
+
regenerateBackupCodes: () => Promise<string[]>;
|
|
59
|
+
updateProfilePicture: (file: File) => Promise<import('@snipextt/wacht-types').ApiResult<unknown>>;
|
|
60
|
+
disconnectSocialConnection: (id: string) => Promise<import('@snipextt/wacht-types').ApiResult<unknown>>;
|
|
61
|
+
connectSocialAccount: ({ provider, redirectUri }: {
|
|
62
|
+
provider: string;
|
|
63
|
+
redirectUri?: string;
|
|
64
|
+
}) => Promise<import('@snipextt/wacht-types').ApiResult<{
|
|
65
|
+
oauth_url: string;
|
|
66
|
+
}>>;
|
|
67
|
+
updatePassword: (currentPassword: string, newPassword: string) => Promise<import('@snipextt/wacht-types').ApiResult<unknown>>;
|
|
68
|
+
removePassword: (currentPassword: string) => Promise<import('@snipextt/wacht-types').ApiResult<unknown>>;
|
|
69
|
+
deleteAccount: (password: string) => Promise<import('@snipextt/wacht-types').ApiResult<unknown>>;
|
|
70
|
+
};
|
|
71
|
+
export declare function useUserSignins(): {
|
|
72
|
+
signins: SignIn[] | undefined;
|
|
73
|
+
error: any;
|
|
74
|
+
removeSignin: (id: string) => Promise<import('@snipextt/wacht-types').ApiResult<unknown>>;
|
|
75
|
+
refetch: import('swr').KeyedMutator<SignIn[]>;
|
|
76
|
+
loading: boolean;
|
|
77
|
+
};
|
|
78
|
+
export {};
|