@wacht/jsx 0.0.1-alpha.5 → 0.0.1-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +540 -552
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1311 -5
- package/dist/index.es.js +4337 -4318
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/agent/agent-conversation-history.d.ts +0 -5
- package/dist/components/agent/agent-conversation-hub.d.ts +0 -1
- package/dist/components/agent/agent-conversation.d.ts +0 -5
- package/dist/components/agent/index.d.ts +0 -3
- package/dist/components/agent/user-input-request.d.ts +0 -7
- package/dist/components/auth/accept-invite.d.ts +0 -7
- package/dist/components/auth/auth-image.d.ts +0 -1
- package/dist/components/auth/forgot-password.d.ts +0 -5
- package/dist/components/auth/index.d.ts +0 -13
- package/dist/components/auth/magic-link-verification.d.ts +0 -6
- package/dist/components/auth/other-auth-options.d.ts +0 -1
- package/dist/components/auth/other-signin-options.d.ts +0 -5
- package/dist/components/auth/phone-verification.d.ts +0 -7
- package/dist/components/auth/profile-completion.d.ts +0 -2
- package/dist/components/auth/signin-form.d.ts +0 -1
- package/dist/components/auth/signup-form.d.ts +0 -1
- package/dist/components/auth/social-buttons.d.ts +0 -7
- package/dist/components/auth/sso-callback.d.ts +0 -2
- package/dist/components/auth/two-factor-method-selector.d.ts +0 -15
- package/dist/components/auth/two-factor-verification.d.ts +0 -2
- package/dist/components/auth/waitlist-form.d.ts +0 -1
- package/dist/components/control/index.d.ts +0 -5
- package/dist/components/control/navigation.d.ts +0 -2
- package/dist/components/control/require-active-tenancy.d.ts +0 -5
- package/dist/components/control/signed-in-accounts.d.ts +0 -6
- package/dist/components/control/signed-in.d.ts +0 -5
- package/dist/components/control/signed-out.d.ts +0 -5
- package/dist/components/control/user-selection.d.ts +0 -0
- package/dist/components/deployment-instance.d.ts +0 -7
- package/dist/components/icons/apple.d.ts +0 -1
- package/dist/components/icons/brave.d.ts +0 -1
- package/dist/components/icons/chevron-right.d.ts +0 -1
- package/dist/components/icons/chrome.d.ts +0 -2
- package/dist/components/icons/discord.d.ts +0 -1
- package/dist/components/icons/edge.d.ts +0 -2
- package/dist/components/icons/facebook.d.ts +0 -1
- package/dist/components/icons/firefox.d.ts +0 -2
- package/dist/components/icons/github.d.ts +0 -1
- package/dist/components/icons/gitlab.d.ts +0 -1
- package/dist/components/icons/google.d.ts +0 -1
- package/dist/components/icons/key.d.ts +0 -1
- package/dist/components/icons/linkedin.d.ts +0 -1
- package/dist/components/icons/microsoft.d.ts +0 -1
- package/dist/components/icons/opera.d.ts +0 -1
- package/dist/components/icons/safari.d.ts +0 -2
- package/dist/components/icons/shield.d.ts +0 -1
- package/dist/components/icons/smartphone.d.ts +0 -1
- package/dist/components/icons/x.d.ts +0 -1
- package/dist/components/index.d.ts +0 -17
- package/dist/components/notifications/channel-selector.d.ts +0 -8
- package/dist/components/notifications/index.d.ts +0 -4
- package/dist/components/notifications/notification-bell.d.ts +0 -9
- package/dist/components/notifications/notification-item.d.ts +0 -8
- package/dist/components/notifications/notification-popover.d.ts +0 -16
- package/dist/components/organization/add-domain-popover.d.ts +0 -8
- package/dist/components/organization/add-role-popover.d.ts +0 -14
- package/dist/components/organization/context.d.ts +0 -9
- package/dist/components/organization/create-organization-dialog.d.ts +0 -8
- package/dist/components/organization/create-organization-form.d.ts +0 -6
- package/dist/components/organization/index.d.ts +0 -3
- package/dist/components/organization/invite-member-popover.d.ts +0 -9
- package/dist/components/organization/manage-organization-dialog.d.ts +0 -14
- package/dist/components/organization/manage-organization.d.ts +0 -1
- package/dist/components/organization/organization-selector-menu.d.ts +0 -7
- package/dist/components/organization/organization-switcher.d.ts +0 -5
- package/dist/components/user/2fa-styles.d.ts +0 -56
- package/dist/components/user/2fa.d.ts +0 -20
- package/dist/components/user/add-email-popover.d.ts +0 -10
- package/dist/components/user/add-phone-popover.d.ts +0 -10
- package/dist/components/user/backup-codes-popover.d.ts +0 -9
- package/dist/components/user/change-password-popover.d.ts +0 -8
- package/dist/components/user/context.d.ts +0 -9
- package/dist/components/user/index.d.ts +0 -4
- package/dist/components/user/manage-account-dialog.d.ts +0 -14
- package/dist/components/user/manage-account.d.ts +0 -2
- package/dist/components/user/remove-password-popover.d.ts +0 -7
- package/dist/components/user/setup-totp-popover.d.ts +0 -12
- package/dist/components/user/user-button.d.ts +0 -6
- package/dist/components/user/user-controls.d.ts +0 -7
- package/dist/components/utility/button.d.ts +0 -7
- package/dist/components/utility/combo-box.d.ts +0 -39
- package/dist/components/utility/confirmation-popover.d.ts +0 -7
- package/dist/components/utility/dialog.d.ts +0 -49
- package/dist/components/utility/dropdown.d.ts +0 -20
- package/dist/components/utility/empty-state.d.ts +0 -8
- package/dist/components/utility/form.d.ts +0 -3
- package/dist/components/utility/index.d.ts +0 -14
- package/dist/components/utility/input.d.ts +0 -1
- package/dist/components/utility/loader.d.ts +0 -7
- package/dist/components/utility/navigation.d.ts +0 -8
- package/dist/components/utility/otp-input.d.ts +0 -9
- package/dist/components/utility/phone.d.ts +0 -7
- package/dist/components/utility/root.d.ts +0 -1
- package/dist/components/utility/search.d.ts +0 -7
- package/dist/components/utility/spinner.d.ts +0 -6
- package/dist/components/utility/switch.d.ts +0 -7
- package/dist/components/utility/table.d.ts +0 -8
- package/dist/components/utility/tabs.d.ts +0 -34
- package/dist/components/utility/use-dialog.d.ts +0 -12
- package/dist/components/workspace/add-role-popover.d.ts +0 -13
- package/dist/components/workspace/create-workspace-dialog.d.ts +0 -9
- package/dist/components/workspace/create-workspace-form.d.ts +0 -9
- package/dist/components/workspace/index.d.ts +0 -4
- package/dist/components/workspace/invite-member-popover.d.ts +0 -10
- package/dist/components/workspace/manage-workspace-dialog.d.ts +0 -14
- package/dist/components/workspace/manage-workspace.d.ts +0 -1
- package/dist/constants/ai-agent.d.ts +0 -43
- package/dist/constants/execution-status.d.ts +0 -38
- package/dist/constants/geo.d.ts +0 -8
- package/dist/context/agent-conversation-provider.d.ts +0 -37
- package/dist/context/deployment-provider.d.ts +0 -10
- package/dist/context/index.d.ts +0 -2
- package/dist/context/signin-provider.d.ts +0 -21
- package/dist/hooks/index.d.ts +0 -22
- package/dist/hooks/use-agent-conversation.d.ts +0 -61
- package/dist/hooks/use-channel-counts.d.ts +0 -14
- package/dist/hooks/use-client.d.ts +0 -7
- package/dist/hooks/use-context-manager.d.ts +0 -30
- package/dist/hooks/use-conversation-sessions.d.ts +0 -32
- package/dist/hooks/use-deployment.d.ts +0 -1
- package/dist/hooks/use-forgot-password.d.ts +0 -11
- package/dist/hooks/use-invitation.d.ts +0 -23
- package/dist/hooks/use-magic-link.d.ts +0 -14
- package/dist/hooks/use-navigation.d.ts +0 -6
- package/dist/hooks/use-notification-stream.d.ts +0 -27
- package/dist/hooks/use-notifications.d.ts +0 -30
- package/dist/hooks/use-organization.d.ts +0 -81
- package/dist/hooks/use-session.d.ts +0 -27
- package/dist/hooks/use-signin.d.ts +0 -140
- package/dist/hooks/use-signup.d.ts +0 -46
- package/dist/hooks/use-sso-callback.d.ts +0 -15
- package/dist/hooks/use-user.d.ts +0 -78
- package/dist/hooks/use-waitlist.d.ts +0 -24
- package/dist/hooks/use-workspace.d.ts +0 -50
- package/dist/models/websocket.d.ts +0 -25
- package/dist/services/websocket-manager.d.ts +0 -46
- package/dist/types/deployment-context.d.ts +0 -7
- package/dist/types/index.d.ts +0 -4
- package/dist/types/notification.d.ts +0 -51
- package/dist/types/platform-adapter.d.ts +0 -10
- package/dist/utils/event-emitter.d.ts +0 -9
- package/dist/utils/navigation.d.ts +0 -2
- package/dist/utils/profile-completion.d.ts +0 -3
- package/dist/utils/response-mapper.d.ts +0 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,1311 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { ApiResult } from '@wacht/types';
|
|
2
|
+
import { ButtonHTMLAttributes } from 'react';
|
|
3
|
+
import { Client } from '@wacht/types';
|
|
4
|
+
import { CSSProperties } from 'react';
|
|
5
|
+
import { CurrentUser } from '@wacht/types';
|
|
6
|
+
import { default as default_2 } from 'react';
|
|
7
|
+
import { Deployment } from '@wacht/types';
|
|
8
|
+
import { DeploymentContextType as DeploymentContextType_2 } from '..';
|
|
9
|
+
import { DetailedHTMLProps } from 'react';
|
|
10
|
+
import { ErrorInterface } from '@wacht/types';
|
|
11
|
+
import { FastOmit } from 'styled-components';
|
|
12
|
+
import { FC } from 'react';
|
|
13
|
+
import { FormHTMLAttributes } from 'react';
|
|
14
|
+
import { ForwardRefExoticComponent } from 'react';
|
|
15
|
+
import { HTMLAttributes } from 'react';
|
|
16
|
+
import { InputHTMLAttributes } from 'react';
|
|
17
|
+
import { IStyledComponentBase } from 'styled-components/dist/types';
|
|
18
|
+
import { JSX } from 'react/jsx-runtime';
|
|
19
|
+
import { KeyedMutator } from 'swr';
|
|
20
|
+
import { LabelHTMLAttributes } from 'react';
|
|
21
|
+
import { NewDomain } from '@wacht/types';
|
|
22
|
+
import { NewOrgnization } from '@wacht/types';
|
|
23
|
+
import { Organization } from '@wacht/types';
|
|
24
|
+
import { OrganizationDomain } from '@wacht/types';
|
|
25
|
+
import { OrganizationInvitation } from '@wacht/types';
|
|
26
|
+
import { OrganizationInvitationPayload } from '@wacht/types';
|
|
27
|
+
import { OrganizationMembership } from '@wacht/types';
|
|
28
|
+
import { OrganizationMembershipWithOrganization } from '@wacht/types';
|
|
29
|
+
import { OrganizationRole } from '@wacht/types';
|
|
30
|
+
import { OrganizationUpdate } from '@wacht/types';
|
|
31
|
+
import { ProfileCompletionData } from '@wacht/types';
|
|
32
|
+
import { ProfileCompletionProps } from '@wacht/types';
|
|
33
|
+
import { ReactNode } from 'react';
|
|
34
|
+
import { RefAttributes } from 'react';
|
|
35
|
+
import { RoleCreate } from '@wacht/types';
|
|
36
|
+
import { SecondFactorPolicy } from '@wacht/types';
|
|
37
|
+
import { Session } from '@wacht/types';
|
|
38
|
+
import { SignIn as SignIn_2 } from '@wacht/types';
|
|
39
|
+
import { SigninAttempt } from '@wacht/types';
|
|
40
|
+
import { SignupAttempt } from '@wacht/types';
|
|
41
|
+
import { SignUpParams } from '@wacht/types';
|
|
42
|
+
import { SocialConnection } from '@wacht/types';
|
|
43
|
+
import { Substitute } from 'styled-components/dist/types';
|
|
44
|
+
import { UserAuthenticator } from '@wacht/types';
|
|
45
|
+
import { UserEmailAddress } from '@wacht/types';
|
|
46
|
+
import { UserPhoneNumber } from '@wacht/types';
|
|
47
|
+
import { Workspace } from '@wacht/types';
|
|
48
|
+
import { WorkspaceMembership } from '@wacht/types';
|
|
49
|
+
import { WorkspaceRole } from '@wacht/types';
|
|
50
|
+
import { WorkspaceWithOrganization } from '@wacht/types';
|
|
51
|
+
|
|
52
|
+
export declare interface AcceptInvitationResponse {
|
|
53
|
+
organization?: {
|
|
54
|
+
id: string;
|
|
55
|
+
name: string;
|
|
56
|
+
};
|
|
57
|
+
workspace?: {
|
|
58
|
+
id: string;
|
|
59
|
+
name: string;
|
|
60
|
+
};
|
|
61
|
+
signin_id?: string;
|
|
62
|
+
already_member?: boolean;
|
|
63
|
+
message?: string;
|
|
64
|
+
requires_signin?: boolean;
|
|
65
|
+
invited_email?: string;
|
|
66
|
+
error_code?: string;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export declare function AcceptInvite({ token: propToken, onSuccess, onError, }: AcceptInviteProps): JSX.Element | null;
|
|
70
|
+
|
|
71
|
+
declare interface AcceptInviteProps {
|
|
72
|
+
token?: string;
|
|
73
|
+
onSuccess?: (organizationId?: string, workspaceId?: string) => void;
|
|
74
|
+
onError?: (error: string) => void;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export declare function AgentConversation({ showBackButton, onBack, }: AgentConversationProps): JSX.Element;
|
|
78
|
+
|
|
79
|
+
declare interface AgentConversationContextValue {
|
|
80
|
+
agentName: string;
|
|
81
|
+
token: string;
|
|
82
|
+
platformAdapter?: PlatformAdapter_2;
|
|
83
|
+
sessions: ConversationSession[];
|
|
84
|
+
selectedSession: ConversationSession | null;
|
|
85
|
+
loadingSessions: boolean;
|
|
86
|
+
sessionError: Error | null;
|
|
87
|
+
selectSession: (session: ConversationSession | null) => void;
|
|
88
|
+
createSession: (title?: string) => Promise<ConversationSession>;
|
|
89
|
+
deleteSession: (sessionId: string) => Promise<void>;
|
|
90
|
+
refreshSessions: () => Promise<void>;
|
|
91
|
+
showHistory: boolean;
|
|
92
|
+
setShowHistory: (show: boolean) => void;
|
|
93
|
+
onSessionCreated?: (session: ConversationSession) => void;
|
|
94
|
+
onSessionDeleted?: (sessionId: string) => void;
|
|
95
|
+
onError?: (error: string) => void;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export declare function AgentConversationHistory({ showBackButton, }: AgentConversationHistoryProps): JSX.Element;
|
|
99
|
+
|
|
100
|
+
declare interface AgentConversationHistoryProps {
|
|
101
|
+
showBackButton?: boolean;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export declare function AgentConversationHub(): JSX.Element;
|
|
105
|
+
|
|
106
|
+
declare interface AgentConversationProps {
|
|
107
|
+
showBackButton?: boolean;
|
|
108
|
+
onBack?: () => void;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export declare function AgentConversationProvider({ children, agentName, token, platformAdapter, defaultSessionId, onSessionCreated, onSessionDeleted, onError, }: AgentConversationProviderProps): JSX.Element;
|
|
112
|
+
|
|
113
|
+
declare interface AgentConversationProviderProps {
|
|
114
|
+
children: ReactNode;
|
|
115
|
+
agentName: string;
|
|
116
|
+
token: string;
|
|
117
|
+
platformAdapter?: PlatformAdapter_2;
|
|
118
|
+
defaultSessionId?: string;
|
|
119
|
+
onSessionCreated?: (session: ConversationSession) => void;
|
|
120
|
+
onSessionDeleted?: (sessionId: string) => void;
|
|
121
|
+
onError?: (error: string) => void;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export declare function AuthFormImage(): JSX.Element;
|
|
125
|
+
|
|
126
|
+
export declare interface BulkUpdateResponse {
|
|
127
|
+
affected: number;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export declare interface ChannelCounts {
|
|
131
|
+
user: number;
|
|
132
|
+
organization: number;
|
|
133
|
+
workspace: number;
|
|
134
|
+
current: number;
|
|
135
|
+
total: number;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export declare function ChannelSelector({ selectedChannels, channelCounts, onChannelsChange }: ChannelSelectorProps): JSX.Element;
|
|
139
|
+
|
|
140
|
+
declare interface ChannelSelectorProps {
|
|
141
|
+
selectedChannels: string[];
|
|
142
|
+
channelCounts?: ChannelCounts;
|
|
143
|
+
onChannelsChange: (channels: string[]) => void;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export declare function clearTokenCache(): void;
|
|
147
|
+
|
|
148
|
+
declare const CONNECTION_STATES: {
|
|
149
|
+
readonly DISCONNECTED: "disconnected";
|
|
150
|
+
readonly CONNECTING: "connecting";
|
|
151
|
+
readonly CONNECTED: "connected";
|
|
152
|
+
readonly ERROR: "error";
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
export declare interface ConversationMessage {
|
|
156
|
+
id: string | number;
|
|
157
|
+
role: "user" | "assistant" | "system";
|
|
158
|
+
content: string;
|
|
159
|
+
timestamp: Date;
|
|
160
|
+
isStreaming?: boolean;
|
|
161
|
+
images?: ImageData_2[];
|
|
162
|
+
metadata?: {
|
|
163
|
+
type?: "user_input_request" | "log";
|
|
164
|
+
userInputRequest?: UserInputRequest;
|
|
165
|
+
messageType?: string;
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export declare interface ConversationSession {
|
|
170
|
+
id: string;
|
|
171
|
+
title: string;
|
|
172
|
+
status: 'idle' | 'running' | 'waiting_for_input' | 'interrupted' | 'completed' | 'failed';
|
|
173
|
+
last_activity_at: string;
|
|
174
|
+
context_group?: string;
|
|
175
|
+
created_at: string;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export declare const CreateOrganizationForm: React.FC<CreateOrganizationFormProps>;
|
|
179
|
+
|
|
180
|
+
declare interface CreateOrganizationFormProps {
|
|
181
|
+
onSuccess?: () => void;
|
|
182
|
+
onCancel?: () => void;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export declare interface CreateSessionRequest {
|
|
186
|
+
title: string;
|
|
187
|
+
system_instructions?: string;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
declare type CreateSignInStrategyResult = {
|
|
191
|
+
(strategy: "username"): SignInPlainUsername;
|
|
192
|
+
(strategy: "email"): SignInPlainEmail;
|
|
193
|
+
(strategy: "phone"): SignInPhone;
|
|
194
|
+
(strategy: "email_otp"): SignInEmailOTP;
|
|
195
|
+
(strategy: "magic_link"): SignInMagicLink;
|
|
196
|
+
(strategy: "oauth"): SignInOauth;
|
|
197
|
+
(strategy: "generic"): SignInGeneric;
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
export declare const CreateWorkspaceDialog: default_2.FC<CreateWorkspaceDialogProps>;
|
|
201
|
+
|
|
202
|
+
declare interface CreateWorkspaceDialogProps {
|
|
203
|
+
isOpen: boolean;
|
|
204
|
+
onClose?: () => void;
|
|
205
|
+
onCreated?: () => void;
|
|
206
|
+
organizationId: string;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export declare const CreateWorkspaceForm: default_2.FC<CreateWorkspaceFormProps>;
|
|
210
|
+
|
|
211
|
+
declare interface CreateWorkspaceFormProps {
|
|
212
|
+
organizationId: string;
|
|
213
|
+
onSuccess?: () => void;
|
|
214
|
+
onCancel?: () => void;
|
|
215
|
+
onCreateOrganization?: () => void;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export declare interface DeploymentContextType {
|
|
219
|
+
loading: boolean;
|
|
220
|
+
deployment: Deployment | null;
|
|
221
|
+
adapter: PlatformAdapter;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export declare const DeploymentInitialized: React.FC<DeploymentInstanceProps>;
|
|
225
|
+
|
|
226
|
+
export declare const DeploymentInitializing: React.FC<DeploymentInstanceProps>;
|
|
227
|
+
|
|
228
|
+
declare interface DeploymentInstanceProps {
|
|
229
|
+
children: ReactNode;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export declare interface DeploymentInvitationData {
|
|
233
|
+
valid: boolean;
|
|
234
|
+
first_name?: string;
|
|
235
|
+
last_name?: string;
|
|
236
|
+
email?: string;
|
|
237
|
+
message?: string;
|
|
238
|
+
error_code?: string;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
export declare function DeploymentProvider({ children, publicKey, adapter, }: DeploymentProviderProps): JSX.Element;
|
|
242
|
+
|
|
243
|
+
declare interface DeploymentProviderProps {
|
|
244
|
+
children: ReactNode;
|
|
245
|
+
publicKey: string;
|
|
246
|
+
adapter: PlatformAdapter;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
export declare const Dialog: FC<DialogProps> & {
|
|
250
|
+
Overlay: FC<{
|
|
251
|
+
children?: ReactNode;
|
|
252
|
+
}>;
|
|
253
|
+
Content: FC<DialogContentProps>;
|
|
254
|
+
Header: FC<DialogHeaderProps>;
|
|
255
|
+
Body: FC<DialogBodyProps>;
|
|
256
|
+
Footer: FC<DialogFooterProps>;
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
declare interface DialogBodyProps {
|
|
260
|
+
children: ReactNode;
|
|
261
|
+
style?: React.CSSProperties;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
declare interface DialogContentProps {
|
|
265
|
+
children: ReactNode;
|
|
266
|
+
style?: React.CSSProperties;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
declare interface DialogFooterProps {
|
|
270
|
+
children: ReactNode;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
declare interface DialogHeaderProps {
|
|
274
|
+
children?: ReactNode;
|
|
275
|
+
showCloseButton?: boolean;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
declare interface DialogProps {
|
|
279
|
+
isOpen: boolean;
|
|
280
|
+
onClose?: () => void;
|
|
281
|
+
children: ReactNode;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
export declare const DialogTrigger: FC<DialogTriggerProps>;
|
|
285
|
+
|
|
286
|
+
declare interface DialogTriggerProps {
|
|
287
|
+
trigger: (props: {
|
|
288
|
+
onClick: () => void;
|
|
289
|
+
}) => ReactNode;
|
|
290
|
+
renderDialog: (props: {
|
|
291
|
+
isOpen: boolean;
|
|
292
|
+
onClose: () => void;
|
|
293
|
+
}) => ReactNode;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
export declare const Dropdown: ({ children, open, openChange, style, }: DropdownProps) => JSX.Element;
|
|
297
|
+
|
|
298
|
+
export declare const DropdownDivider: IStyledComponentBase<"web", FastOmit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
299
|
+
|
|
300
|
+
export declare const DropdownItem: IStyledComponentBase<"web", Substitute<DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
|
|
301
|
+
$destructive?: boolean;
|
|
302
|
+
}>> & string;
|
|
303
|
+
|
|
304
|
+
export declare const DropdownItems: ({ children, style, }: {
|
|
305
|
+
children: ReactNode;
|
|
306
|
+
style?: React.CSSProperties;
|
|
307
|
+
}) => JSX.Element | null;
|
|
308
|
+
|
|
309
|
+
declare interface DropdownProps {
|
|
310
|
+
children: ReactNode;
|
|
311
|
+
open?: boolean;
|
|
312
|
+
openChange?: (open: boolean) => void;
|
|
313
|
+
style?: CSSProperties;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
export declare const DropdownTrigger: ({ children }: {
|
|
317
|
+
children: ReactNode;
|
|
318
|
+
}) => JSX.Element;
|
|
319
|
+
|
|
320
|
+
declare type EmailOTPSignInParams = {
|
|
321
|
+
email: string;
|
|
322
|
+
};
|
|
323
|
+
|
|
324
|
+
declare type EmailOTPVerificationParams = {
|
|
325
|
+
strategy: "email_otp";
|
|
326
|
+
redirectUri?: string;
|
|
327
|
+
};
|
|
328
|
+
|
|
329
|
+
declare type EmailSignInParams = {
|
|
330
|
+
email: string;
|
|
331
|
+
password: string;
|
|
332
|
+
};
|
|
333
|
+
|
|
334
|
+
export declare function fetchChannelCounts(client: Client): Promise<ChannelCounts>;
|
|
335
|
+
|
|
336
|
+
export declare const Form: IStyledComponentBase<"web", FastOmit<DetailedHTMLProps<FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, never>> & string;
|
|
337
|
+
|
|
338
|
+
export declare const FormGroup: IStyledComponentBase<"web", FastOmit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Unified execution status mapping between frontend and backend
|
|
342
|
+
*/
|
|
343
|
+
declare const FRONTEND_STATUS: {
|
|
344
|
+
readonly IDLE: "idle";
|
|
345
|
+
readonly STARTING: "starting";
|
|
346
|
+
readonly RUNNING: "running";
|
|
347
|
+
readonly WAITING_FOR_INPUT: "waiting_for_input";
|
|
348
|
+
readonly COMPLETED: "completed";
|
|
349
|
+
readonly FAILED: "failed";
|
|
350
|
+
};
|
|
351
|
+
|
|
352
|
+
declare type FrontendStatus = typeof FRONTEND_STATUS[keyof typeof FRONTEND_STATUS];
|
|
353
|
+
|
|
354
|
+
declare type GenericSignInParams = {
|
|
355
|
+
email?: string;
|
|
356
|
+
username?: string;
|
|
357
|
+
password?: string;
|
|
358
|
+
phone?: string;
|
|
359
|
+
strategy?: string;
|
|
360
|
+
};
|
|
361
|
+
|
|
362
|
+
export declare function hasIncompleteProfile(session: Session): boolean;
|
|
363
|
+
|
|
364
|
+
declare interface ImageData_2 {
|
|
365
|
+
mime_type: string;
|
|
366
|
+
data?: string;
|
|
367
|
+
url?: string;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
declare type InitSSOResponseType = {
|
|
371
|
+
oauth_url: string;
|
|
372
|
+
session: Session;
|
|
373
|
+
};
|
|
374
|
+
|
|
375
|
+
export declare const Input: IStyledComponentBase<"web", FastOmit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>> & string;
|
|
376
|
+
|
|
377
|
+
export declare const isExternalUrl: (url: string) => boolean;
|
|
378
|
+
|
|
379
|
+
export declare const isSafeUrl: (url: string) => boolean;
|
|
380
|
+
|
|
381
|
+
export declare const Label: IStyledComponentBase<"web", FastOmit<DetailedHTMLProps<LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never>> & string;
|
|
382
|
+
|
|
383
|
+
export declare interface ListSessionsOptions {
|
|
384
|
+
limit?: number;
|
|
385
|
+
offset?: number;
|
|
386
|
+
status?: string;
|
|
387
|
+
search?: string;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
export declare interface ListSessionsResponse {
|
|
391
|
+
data: ConversationSession[];
|
|
392
|
+
has_more: boolean;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
export declare interface MagicLinkParams {
|
|
396
|
+
token?: string;
|
|
397
|
+
attempt?: string;
|
|
398
|
+
redirectUri?: string;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
declare type MagicLinkSignInParams = {
|
|
402
|
+
email: string;
|
|
403
|
+
};
|
|
404
|
+
|
|
405
|
+
export declare function MagicLinkVerification({ onSuccess, onError, }?: MagicLinkVerificationProps): JSX.Element;
|
|
406
|
+
|
|
407
|
+
declare type MagicLinkVerificationParams = {
|
|
408
|
+
strategy: "magic_link";
|
|
409
|
+
redirectUri?: string;
|
|
410
|
+
};
|
|
411
|
+
|
|
412
|
+
declare interface MagicLinkVerificationProps {
|
|
413
|
+
onSuccess?: () => void;
|
|
414
|
+
onError?: (error: string) => void;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
export declare const ManageAccount: () => JSX.Element;
|
|
418
|
+
|
|
419
|
+
export declare const ManageAccountDialog: FC<ManageAccountDialogProps>;
|
|
420
|
+
|
|
421
|
+
declare interface ManageAccountDialogProps {
|
|
422
|
+
isOpen: boolean;
|
|
423
|
+
onClose: () => void;
|
|
424
|
+
title?: string;
|
|
425
|
+
showHeader?: boolean;
|
|
426
|
+
headerContent?: ReactNode;
|
|
427
|
+
footerContent?: ReactNode;
|
|
428
|
+
customContent?: ReactNode;
|
|
429
|
+
children?: ReactNode;
|
|
430
|
+
showCloseButton?: boolean;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
export declare const ManageOrganization: () => JSX.Element;
|
|
434
|
+
|
|
435
|
+
export declare const ManageWorkspace: () => JSX.Element | null;
|
|
436
|
+
|
|
437
|
+
export declare const ManageWorkspaceDialog: FC<ManageWorkspaceDialogProps>;
|
|
438
|
+
|
|
439
|
+
declare interface ManageWorkspaceDialogProps {
|
|
440
|
+
isOpen: boolean;
|
|
441
|
+
onClose: () => void;
|
|
442
|
+
title?: string;
|
|
443
|
+
showHeader?: boolean;
|
|
444
|
+
headerContent?: ReactNode;
|
|
445
|
+
footerContent?: ReactNode;
|
|
446
|
+
customContent?: ReactNode;
|
|
447
|
+
children?: ReactNode;
|
|
448
|
+
showCloseButton?: boolean;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
export declare interface NavigateOptions {
|
|
452
|
+
replace?: boolean;
|
|
453
|
+
state?: any;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
export declare const NavigateToSignIn: () => null;
|
|
457
|
+
|
|
458
|
+
export declare const NavigateToSignUp: () => null;
|
|
459
|
+
|
|
460
|
+
export declare const NavigationLink: default_2.FC<NavigationProps>;
|
|
461
|
+
|
|
462
|
+
export declare interface NavigationProps {
|
|
463
|
+
to: string;
|
|
464
|
+
replace?: boolean;
|
|
465
|
+
children?: default_2.ReactNode;
|
|
466
|
+
[key: string]: any;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
declare interface Notification_2 {
|
|
470
|
+
id: string;
|
|
471
|
+
deployment_id: string;
|
|
472
|
+
user_id: string;
|
|
473
|
+
organization_id?: string;
|
|
474
|
+
workspace_id?: string;
|
|
475
|
+
title: string;
|
|
476
|
+
body: string;
|
|
477
|
+
action_url?: string;
|
|
478
|
+
action_label?: string;
|
|
479
|
+
severity: "info" | "success" | "warning" | "error";
|
|
480
|
+
is_read: boolean;
|
|
481
|
+
read_at?: string;
|
|
482
|
+
is_archived: boolean;
|
|
483
|
+
archived_at?: string;
|
|
484
|
+
metadata?: Record<string, any>;
|
|
485
|
+
created_at: string;
|
|
486
|
+
updated_at: string;
|
|
487
|
+
expires_at?: string;
|
|
488
|
+
}
|
|
489
|
+
export { Notification_2 as Notification }
|
|
490
|
+
|
|
491
|
+
export declare function NotificationBell({ className, showBadge, channels, organizationIds, workspaceIds, }: NotificationBellProps): JSX.Element;
|
|
492
|
+
|
|
493
|
+
declare interface NotificationBellProps {
|
|
494
|
+
className?: string;
|
|
495
|
+
showBadge?: boolean;
|
|
496
|
+
channels?: string[];
|
|
497
|
+
organizationIds?: number[];
|
|
498
|
+
workspaceIds?: number[];
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
export declare function NotificationItem({ notification, onMarkAsRead, onDelete }: NotificationItemProps): JSX.Element;
|
|
502
|
+
|
|
503
|
+
declare interface NotificationItemProps {
|
|
504
|
+
notification: Notification_2;
|
|
505
|
+
onMarkAsRead: (id: string) => void;
|
|
506
|
+
onDelete: (id: string) => void;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
export declare interface NotificationListParams {
|
|
510
|
+
limit?: number;
|
|
511
|
+
offset?: number;
|
|
512
|
+
channels?: string[];
|
|
513
|
+
organization_ids?: number[];
|
|
514
|
+
workspace_ids?: number[];
|
|
515
|
+
is_read?: boolean;
|
|
516
|
+
is_archived?: boolean;
|
|
517
|
+
severity?: "info" | "success" | "warning" | "error";
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
export declare interface NotificationListResponse {
|
|
521
|
+
notifications: Notification_2[];
|
|
522
|
+
total: number;
|
|
523
|
+
unread_count: number;
|
|
524
|
+
has_more: boolean;
|
|
525
|
+
channels: string[];
|
|
526
|
+
unread_counts: ChannelCounts;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
export declare interface NotificationMessage {
|
|
530
|
+
id: number;
|
|
531
|
+
user_id: number;
|
|
532
|
+
deployment_id: number;
|
|
533
|
+
title: string;
|
|
534
|
+
body: string;
|
|
535
|
+
severity: string;
|
|
536
|
+
action_url?: string;
|
|
537
|
+
action_label?: string;
|
|
538
|
+
created_at: string;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
export declare const NotificationPopover: ForwardRefExoticComponent<NotificationPopoverProps & RefAttributes<HTMLDivElement>>;
|
|
542
|
+
|
|
543
|
+
declare interface NotificationPopoverProps {
|
|
544
|
+
position?: {
|
|
545
|
+
top?: number;
|
|
546
|
+
bottom?: number;
|
|
547
|
+
left?: number;
|
|
548
|
+
right?: number;
|
|
549
|
+
};
|
|
550
|
+
notifications: Notification_2[];
|
|
551
|
+
loading: boolean;
|
|
552
|
+
onMarkAsRead: (id: string) => void;
|
|
553
|
+
onMarkAllAsRead: () => void;
|
|
554
|
+
onDelete: (id: string) => void;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
export declare enum OAuthProvider {
|
|
558
|
+
XOauth = "x_oauth",
|
|
559
|
+
GithubOauth = "github_oauth",
|
|
560
|
+
GitlabOauth = "gitlab_oauth",
|
|
561
|
+
GoogleOauth = "google_oauth",
|
|
562
|
+
FacebookOauth = "facebook_oauth",
|
|
563
|
+
MicrosoftOauth = "microsoft_oauth",
|
|
564
|
+
LinkedinOauth = "linkedin_oauth",
|
|
565
|
+
DiscordOauth = "discord_oauth",
|
|
566
|
+
AppleOauth = "apple_oauth"
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
export declare const OrganizationSwitcher: ({ showPersonal, }: OrganizationSwitcherProps) => JSX.Element | null;
|
|
570
|
+
|
|
571
|
+
declare interface OrganizationSwitcherProps {
|
|
572
|
+
showPersonal?: boolean;
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
export declare function OTPInput({ length, onComplete, onResend, error, isSubmitting, }: OTPInputProps): JSX.Element;
|
|
576
|
+
|
|
577
|
+
declare interface OTPInputProps {
|
|
578
|
+
length?: number;
|
|
579
|
+
onComplete: ((code: string) => Promise<void>) | ((code: string) => void);
|
|
580
|
+
onResend?: () => Promise<void>;
|
|
581
|
+
error?: string;
|
|
582
|
+
isSubmitting?: boolean;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
export declare const PhoneNumberInput: ({ value, onChange, error, countryCode, setCountryCode, }: {
|
|
586
|
+
value: string | number | readonly string[] | undefined;
|
|
587
|
+
onChange: React.ChangeEventHandler<HTMLInputElement>;
|
|
588
|
+
error: string | undefined;
|
|
589
|
+
countryCode: string | undefined;
|
|
590
|
+
setCountryCode: React.Dispatch<React.SetStateAction<string | undefined>>;
|
|
591
|
+
}) => JSX.Element;
|
|
592
|
+
|
|
593
|
+
declare type PhoneOTPVerificationParams = {
|
|
594
|
+
strategy: "phone_otp";
|
|
595
|
+
lastDigits?: string;
|
|
596
|
+
};
|
|
597
|
+
|
|
598
|
+
declare type PhoneSignInParams = {
|
|
599
|
+
phone: string;
|
|
600
|
+
};
|
|
601
|
+
|
|
602
|
+
export declare function PhoneVerification({ onVerify, onBack, loading, }: PhoneVerificationProps): JSX.Element;
|
|
603
|
+
|
|
604
|
+
declare interface PhoneVerificationProps {
|
|
605
|
+
onVerify: (lastFourDigits: string) => void;
|
|
606
|
+
onBack: () => void;
|
|
607
|
+
loading?: boolean;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
export declare interface PlatformAdapter {
|
|
611
|
+
useNavigate(): ((to: string, options?: NavigateOptions) => void) | null;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
declare interface PlatformAdapter_2 {
|
|
615
|
+
onPlatformEvent?: (eventName: string, eventData: unknown) => void;
|
|
616
|
+
onPlatformFunction?: (functionName: string, parameters: unknown, executionId: string) => Promise<unknown>;
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
export declare interface PlatformAdapterContextType {
|
|
620
|
+
adapter: PlatformAdapter | null;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
declare type PrepareVerificationResponse = {
|
|
624
|
+
otp_sent?: boolean;
|
|
625
|
+
masked_phone?: string;
|
|
626
|
+
masked_email?: string;
|
|
627
|
+
verification_method?: string;
|
|
628
|
+
};
|
|
629
|
+
|
|
630
|
+
declare type PrepareVerificationResponse_2 = {
|
|
631
|
+
otp_sent?: boolean;
|
|
632
|
+
masked_phone?: string;
|
|
633
|
+
masked_email?: string;
|
|
634
|
+
verification_method?: string;
|
|
635
|
+
};
|
|
636
|
+
|
|
637
|
+
export declare function ProfileCompletion({ attempt, onBack, completeProfile, completeVerification, prepareVerification, }: ProfileCompletionProps): JSX.Element;
|
|
638
|
+
|
|
639
|
+
export { ProfileCompletionData }
|
|
640
|
+
|
|
641
|
+
export { ProfileCompletionProps }
|
|
642
|
+
|
|
643
|
+
declare interface ProfileUpdateData {
|
|
644
|
+
first_name?: string;
|
|
645
|
+
last_name?: string;
|
|
646
|
+
username?: string;
|
|
647
|
+
primary_email_address_id?: string;
|
|
648
|
+
primary_phone_number_id?: string;
|
|
649
|
+
second_factor_policy?: SecondFactorPolicy_2;
|
|
650
|
+
remove_profile_picture?: boolean;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
export declare function redirectToProfileCompletion(returnUrl?: string): void;
|
|
654
|
+
|
|
655
|
+
export declare const RequireActiveTenancy: ({ children, }: RequireActiveTenancyProps) => JSX.Element | null;
|
|
656
|
+
|
|
657
|
+
declare interface RequireActiveTenancyProps {
|
|
658
|
+
children: React.ReactNode;
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
declare type SecondFactorPolicy_2 = "none" | "optional" | "enforced";
|
|
662
|
+
|
|
663
|
+
export declare const SignedIn: ({ children }: SignedInProps) => JSX.Element | null;
|
|
664
|
+
|
|
665
|
+
export declare const SignedInAccounts: React.FC<SignedInAccountsProps>;
|
|
666
|
+
|
|
667
|
+
declare interface SignedInAccountsProps {
|
|
668
|
+
onAccountSelect?: (signInId: string) => void;
|
|
669
|
+
showAddAccount?: boolean;
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
declare interface SignedInProps {
|
|
673
|
+
children: React.ReactNode;
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
export declare const SignedOut: ({ children }: SignedOutProps) => JSX.Element | null;
|
|
677
|
+
|
|
678
|
+
declare interface SignedOutProps {
|
|
679
|
+
children: React.ReactNode;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
declare type SignIn = {
|
|
683
|
+
createStrategy: CreateSignInStrategyResult;
|
|
684
|
+
prepareVerification: (params: VerificationParams) => Promise<ApiResult<PrepareVerificationResponse>>;
|
|
685
|
+
completeVerification: (verificationCode: string) => Promise<Session>;
|
|
686
|
+
completeProfile: (data: ProfileCompletionData) => Promise<Session>;
|
|
687
|
+
};
|
|
688
|
+
|
|
689
|
+
declare type SignInEmailOTP = ({ email, }: EmailOTPSignInParams) => Promise<ApiResult<Session>>;
|
|
690
|
+
|
|
691
|
+
export declare function SignInForm(): JSX.Element;
|
|
692
|
+
|
|
693
|
+
declare type SignInFunction<T extends SignInStrategy> = {
|
|
694
|
+
["username"]: SignInPlainUsername;
|
|
695
|
+
["email"]: SignInPlainEmail;
|
|
696
|
+
["phone"]: SignInPhone;
|
|
697
|
+
["email_otp"]: SignInEmailOTP;
|
|
698
|
+
["magic_link"]: SignInMagicLink;
|
|
699
|
+
["oauth"]: SignInOauth;
|
|
700
|
+
["generic"]: SignInGeneric;
|
|
701
|
+
}[T];
|
|
702
|
+
|
|
703
|
+
declare type SignInGeneric = ({ email, username, password, phone, strategy, }: GenericSignInParams) => Promise<ApiResult<Session>>;
|
|
704
|
+
|
|
705
|
+
declare type SignInMagicLink = ({ email, }: MagicLinkSignInParams) => Promise<ApiResult<Session>>;
|
|
706
|
+
|
|
707
|
+
declare type SignInOauth = ({ provider, redirectUri, }: {
|
|
708
|
+
provider: OAuthProvider;
|
|
709
|
+
redirectUri?: string;
|
|
710
|
+
}) => Promise<ApiResult<InitSSOResponseType>>;
|
|
711
|
+
|
|
712
|
+
declare type SignInPhone = ({ phone, }: PhoneSignInParams) => Promise<ApiResult<Session>>;
|
|
713
|
+
|
|
714
|
+
declare type SignInPlainEmail = ({ email, password, }: EmailSignInParams) => Promise<ApiResult<Session>>;
|
|
715
|
+
|
|
716
|
+
declare type SignInPlainUsername = ({ username, password, }: UsernameSignInParams) => Promise<ApiResult<Session>>;
|
|
717
|
+
|
|
718
|
+
declare type SignInStrategy = "username" | "email" | "phone" | "email_otp" | "magic_link" | "oauth" | "generic";
|
|
719
|
+
|
|
720
|
+
declare type SignupEmailOTPVerificationParams = {
|
|
721
|
+
strategy: "email_otp";
|
|
722
|
+
redirectUri?: string;
|
|
723
|
+
};
|
|
724
|
+
|
|
725
|
+
export declare function SignUpForm(): JSX.Element;
|
|
726
|
+
|
|
727
|
+
export declare type SignUpFunction = {
|
|
728
|
+
create: (params: SignUpParams) => Promise<ApiResult<unknown, ErrorInterface>>;
|
|
729
|
+
prepareVerification: (params: SignupVerificationParams) => Promise<ApiResult<PrepareVerificationResponse_2>>;
|
|
730
|
+
completeVerification: (verificationCode: string) => Promise<ApiResult<Session>>;
|
|
731
|
+
validateDeploymentInvitation: (token: string) => Promise<DeploymentInvitationData>;
|
|
732
|
+
};
|
|
733
|
+
|
|
734
|
+
declare type SignupPhoneOTPVerificationParams = {
|
|
735
|
+
strategy: "phone_otp";
|
|
736
|
+
lastDigits?: string;
|
|
737
|
+
};
|
|
738
|
+
|
|
739
|
+
declare type SignupVerificationParams = SignupEmailOTPVerificationParams | SignupPhoneOTPVerificationParams;
|
|
740
|
+
|
|
741
|
+
export declare type SignupVerificationStrategy = "email_otp" | "phone_otp";
|
|
742
|
+
|
|
743
|
+
export declare const SimpleDialog: FC<SimpleDialogProps>;
|
|
744
|
+
|
|
745
|
+
declare interface SimpleDialogProps {
|
|
746
|
+
isOpen: boolean;
|
|
747
|
+
onClose: () => void;
|
|
748
|
+
title?: string;
|
|
749
|
+
children: ReactNode;
|
|
750
|
+
showCloseButton?: boolean;
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
export declare const Spinner: ({ size, className }: SpinnerProps) => JSX.Element;
|
|
754
|
+
|
|
755
|
+
declare interface SpinnerProps {
|
|
756
|
+
size?: number;
|
|
757
|
+
className?: string;
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
export declare function SSOCallback(): JSX.Element;
|
|
761
|
+
|
|
762
|
+
declare interface SSOCallbackState {
|
|
763
|
+
loading: boolean;
|
|
764
|
+
error: Error | null;
|
|
765
|
+
session: Session | null;
|
|
766
|
+
redirectUri: string | null;
|
|
767
|
+
processed: boolean;
|
|
768
|
+
signinAttempt: SigninAttempt | null;
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
export declare const Switch: default_2.FC<SwitchProps>;
|
|
772
|
+
|
|
773
|
+
declare interface SwitchProps {
|
|
774
|
+
checked: boolean;
|
|
775
|
+
onChange: (checked: boolean) => void;
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
export declare interface TwoFactorMethod {
|
|
779
|
+
id: string;
|
|
780
|
+
name: string;
|
|
781
|
+
description: string;
|
|
782
|
+
icon: React.ReactNode;
|
|
783
|
+
available: boolean;
|
|
784
|
+
phoneNumber?: string;
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
export declare function TwoFactorMethodSelector({ methods, onSelectMethod, onBack, }: TwoFactorMethodSelectorProps): JSX.Element;
|
|
788
|
+
|
|
789
|
+
declare interface TwoFactorMethodSelectorProps {
|
|
790
|
+
methods: TwoFactorMethod[];
|
|
791
|
+
onSelectMethod: (methodId: string) => void;
|
|
792
|
+
onBack?: () => void;
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
export declare function TwoFactorVerification({ onBack, attempt, completeVerification, prepareVerification, }: Omit<ProfileCompletionProps, "completeProfile">): JSX.Element;
|
|
796
|
+
|
|
797
|
+
export declare interface UnreadCountResponse {
|
|
798
|
+
count: number;
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
export declare const useActiveOrganization: () => {
|
|
802
|
+
activeOrganization: null;
|
|
803
|
+
loading: boolean;
|
|
804
|
+
error: Error | null;
|
|
805
|
+
updateOrganization: never;
|
|
806
|
+
getRoles: never;
|
|
807
|
+
getMembers: never;
|
|
808
|
+
getDomains: never;
|
|
809
|
+
addDomain: never;
|
|
810
|
+
verifyDomain: never;
|
|
811
|
+
removeDomain: never;
|
|
812
|
+
removeRole: never;
|
|
813
|
+
getInvitations: never;
|
|
814
|
+
removeMember: never;
|
|
815
|
+
addMemberRole: never;
|
|
816
|
+
removeMemberRole: never;
|
|
817
|
+
inviteMember: never;
|
|
818
|
+
discardInvitation: never;
|
|
819
|
+
resendInvitation: never;
|
|
820
|
+
leave: never;
|
|
821
|
+
refetch?: undefined;
|
|
822
|
+
} | {
|
|
823
|
+
activeOrganization: Organization | null;
|
|
824
|
+
loading: boolean;
|
|
825
|
+
refetch: () => Promise<void>;
|
|
826
|
+
getRoles: () => Promise<OrganizationRole[]>;
|
|
827
|
+
updateOrganization: (update: OrganizationUpdate) => Promise<{
|
|
828
|
+
data: never;
|
|
829
|
+
errors: ErrorInterface[];
|
|
830
|
+
} | never[] | {
|
|
831
|
+
data: Organization;
|
|
832
|
+
errors: never;
|
|
833
|
+
}>;
|
|
834
|
+
getMembers: () => Promise<OrganizationMembership[]>;
|
|
835
|
+
getDomains: () => Promise<OrganizationDomain[]>;
|
|
836
|
+
addDomain: (domain: NewDomain) => Promise<ApiResult<OrganizationDomain> | undefined>;
|
|
837
|
+
verifyDomain: (domain: OrganizationDomain) => Promise<ApiResult<OrganizationDomain> | undefined>;
|
|
838
|
+
removeDomain: (domain: OrganizationDomain) => Promise<ApiResult<OrganizationDomain> | undefined>;
|
|
839
|
+
getInvitations: () => Promise<OrganizationInvitation[]>;
|
|
840
|
+
removeMember: (member: OrganizationMembership) => Promise<void | never[]>;
|
|
841
|
+
leave: () => Promise<void>;
|
|
842
|
+
removeRole: (role: OrganizationRole) => Promise<void>;
|
|
843
|
+
addMemberRole: (member: OrganizationMembership, role: OrganizationRole) => Promise<OrganizationMembership | undefined>;
|
|
844
|
+
removeMemberRole: (member: OrganizationMembership, role: OrganizationRole) => Promise<OrganizationMembership | undefined>;
|
|
845
|
+
inviteMember: (invitationPayload: OrganizationInvitationPayload) => Promise<OrganizationInvitation | undefined>;
|
|
846
|
+
discardInvitation: (invitation: OrganizationInvitation) => Promise<OrganizationInvitation | undefined>;
|
|
847
|
+
resendInvitation: (invitation: OrganizationInvitation) => Promise<OrganizationInvitation | undefined>;
|
|
848
|
+
error: null;
|
|
849
|
+
};
|
|
850
|
+
|
|
851
|
+
export declare function useActiveTenancy(): {
|
|
852
|
+
loading: boolean;
|
|
853
|
+
orgMembership: OrganizationMembershipWithOrganization | null | undefined;
|
|
854
|
+
workspaceMembership: WorkspaceMembership | null | undefined;
|
|
855
|
+
};
|
|
856
|
+
|
|
857
|
+
export declare const useActiveWorkspace: () => {
|
|
858
|
+
activeWorkspace: Workspace | null;
|
|
859
|
+
loading: boolean;
|
|
860
|
+
error: any;
|
|
861
|
+
refetch: () => Promise<void>;
|
|
862
|
+
leave: () => Promise<void>;
|
|
863
|
+
updateWorkspace: (data: {
|
|
864
|
+
name?: string;
|
|
865
|
+
description?: string;
|
|
866
|
+
image?: File;
|
|
867
|
+
}) => Promise<unknown>;
|
|
868
|
+
deleteWorkspace: () => Promise<unknown>;
|
|
869
|
+
getMembers: () => Promise<WorkspaceMembership[]>;
|
|
870
|
+
getRoles: () => Promise<WorkspaceRole[]>;
|
|
871
|
+
createRole: (name: string, permissions: string[]) => Promise<WorkspaceRole | undefined>;
|
|
872
|
+
deleteRole: (role: WorkspaceRole) => Promise<unknown>;
|
|
873
|
+
inviteMember: (email: string, roleId?: string) => Promise<unknown>;
|
|
874
|
+
removeMember: (memberId: string) => Promise<unknown>;
|
|
875
|
+
addMemberRole: (membershipId: string, roleId: string) => Promise<unknown>;
|
|
876
|
+
removeMemberRole: (membershipId: string, roleId: string) => Promise<unknown>;
|
|
877
|
+
};
|
|
878
|
+
|
|
879
|
+
export declare function useAgentConversation({ contextId, agentName, token, platformAdapter, autoConnect, }: UseAgentConversationProps): {
|
|
880
|
+
messages: ConversationMessage[];
|
|
881
|
+
pendingMessage: string | null;
|
|
882
|
+
pendingImages: ImageData_2[] | null;
|
|
883
|
+
connectionState: {
|
|
884
|
+
status: (typeof CONNECTION_STATES)[keyof typeof CONNECTION_STATES];
|
|
885
|
+
};
|
|
886
|
+
isConnected: boolean;
|
|
887
|
+
isExecuting: boolean;
|
|
888
|
+
executionStatus: FrontendStatus;
|
|
889
|
+
isWaitingForInput: boolean;
|
|
890
|
+
hasMoreMessages: boolean;
|
|
891
|
+
isLoadingMore: boolean;
|
|
892
|
+
sendMessage: (content: string, images?: ImageData_2[]) => void;
|
|
893
|
+
submitUserInput: (value: string) => void;
|
|
894
|
+
clearMessages: () => void;
|
|
895
|
+
loadMoreMessages: () => Promise<void>;
|
|
896
|
+
cancelExecution: () => void;
|
|
897
|
+
connect: () => Promise<() => void>;
|
|
898
|
+
disconnect: () => void;
|
|
899
|
+
};
|
|
900
|
+
|
|
901
|
+
export declare function useAgentConversationContext(): AgentConversationContextValue;
|
|
902
|
+
|
|
903
|
+
declare interface UseAgentConversationProps {
|
|
904
|
+
contextId: string;
|
|
905
|
+
agentName: string;
|
|
906
|
+
token: string;
|
|
907
|
+
platformAdapter?: {
|
|
908
|
+
onPlatformEvent?: (eventName: string, eventData: unknown) => void;
|
|
909
|
+
onPlatformFunction?: (functionName: string, parameters: unknown, executionId: string) => Promise<unknown>;
|
|
910
|
+
};
|
|
911
|
+
onUserInputRequest?: (request: UserInputRequest) => Promise<string>;
|
|
912
|
+
autoConnect?: boolean;
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
export declare function useChannelCounts(): UseChannelCountsReturnType;
|
|
916
|
+
|
|
917
|
+
declare type UseChannelCountsReturnType = {
|
|
918
|
+
loading: true;
|
|
919
|
+
counts: never;
|
|
920
|
+
error: Error | null;
|
|
921
|
+
refetch: () => Promise<void>;
|
|
922
|
+
} | {
|
|
923
|
+
loading: false;
|
|
924
|
+
counts: ChannelCounts;
|
|
925
|
+
error: Error | null;
|
|
926
|
+
refetch: () => Promise<void>;
|
|
927
|
+
};
|
|
928
|
+
|
|
929
|
+
export declare function useClient(): UseClientReturnType;
|
|
930
|
+
|
|
931
|
+
declare type UseClientReturnType = {
|
|
932
|
+
client: Client;
|
|
933
|
+
loading: boolean;
|
|
934
|
+
};
|
|
935
|
+
|
|
936
|
+
export declare function useConversationSessions(token: string): UseConversationSessionsReturnType;
|
|
937
|
+
|
|
938
|
+
declare type UseConversationSessionsReturnType = {
|
|
939
|
+
sessions: ConversationSession[];
|
|
940
|
+
loading: boolean;
|
|
941
|
+
error: Error | null;
|
|
942
|
+
createSession: (request: CreateSessionRequest) => Promise<ConversationSession>;
|
|
943
|
+
deleteSession: (id: string) => Promise<void>;
|
|
944
|
+
refetch: () => Promise<void>;
|
|
945
|
+
};
|
|
946
|
+
|
|
947
|
+
export declare function useDeployment(): DeploymentContextType_2;
|
|
948
|
+
|
|
949
|
+
export declare function useForgotPassword(): {
|
|
950
|
+
error: Error | null;
|
|
951
|
+
loading: boolean;
|
|
952
|
+
forgotPassword: (email: string) => Promise<ApiResult<{}, ErrorInterface>>;
|
|
953
|
+
verifyOtp: (email: string, otp: string) => Promise<ApiResult<{
|
|
954
|
+
token: string;
|
|
955
|
+
}, ErrorInterface>>;
|
|
956
|
+
resetPassword: (token: string, password: string) => Promise<ApiResult<Session, ErrorInterface>>;
|
|
957
|
+
};
|
|
958
|
+
|
|
959
|
+
export declare const useInvitation: () => {
|
|
960
|
+
acceptInvitation: (token: string) => Promise<AcceptInvitationResponse>;
|
|
961
|
+
invitationData: AcceptInvitationResponse | null;
|
|
962
|
+
loading: boolean;
|
|
963
|
+
error: string | null;
|
|
964
|
+
reset: () => void;
|
|
965
|
+
};
|
|
966
|
+
|
|
967
|
+
export declare function useMagicLinkParams(): MagicLinkParams;
|
|
968
|
+
|
|
969
|
+
export declare function useMagicLinkVerification(): UseMagicLinkVerificationReturnType;
|
|
970
|
+
|
|
971
|
+
export declare interface UseMagicLinkVerificationReturnType {
|
|
972
|
+
loading: boolean;
|
|
973
|
+
verifyMagicLink: (params: MagicLinkParams) => Promise<ApiResult<{}, ErrorInterface>>;
|
|
974
|
+
error: Error | null;
|
|
975
|
+
success: boolean | null;
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
export declare const useNavigation: () => {
|
|
979
|
+
navigate: (to: string, options?: NavigateOptions) => void;
|
|
980
|
+
navigateToSignIn: (redirectUri?: string) => void;
|
|
981
|
+
navigateToSignUp: (redirectUri?: string) => void;
|
|
982
|
+
};
|
|
983
|
+
|
|
984
|
+
export declare function useNotifications(params?: NotificationListParams): UseNotificationsReturnType;
|
|
985
|
+
|
|
986
|
+
declare type UseNotificationsReturnType = {
|
|
987
|
+
loading: true;
|
|
988
|
+
notifications: never;
|
|
989
|
+
unreadCount: never;
|
|
990
|
+
unreadCounts: never;
|
|
991
|
+
channels: never;
|
|
992
|
+
hasMore: never;
|
|
993
|
+
markAsRead: never;
|
|
994
|
+
markAllAsRead: never;
|
|
995
|
+
deleteNotification: never;
|
|
996
|
+
error: Error | null;
|
|
997
|
+
refetch: () => Promise<void>;
|
|
998
|
+
} | {
|
|
999
|
+
loading: false;
|
|
1000
|
+
error: Error | null;
|
|
1001
|
+
notifications: Notification_2[];
|
|
1002
|
+
unreadCount: number;
|
|
1003
|
+
unreadCounts: ChannelCounts;
|
|
1004
|
+
channels: string[];
|
|
1005
|
+
hasMore: boolean;
|
|
1006
|
+
markAsRead: (notificationId: string) => Promise<void>;
|
|
1007
|
+
markAllAsRead: () => Promise<void>;
|
|
1008
|
+
deleteNotification: (notificationId: string) => Promise<void>;
|
|
1009
|
+
refetch: () => Promise<void>;
|
|
1010
|
+
};
|
|
1011
|
+
|
|
1012
|
+
export declare function useNotificationStream({ enabled, channels, organizationIds, workspaceIds, onNotification, onError, reconnectDelay, maxReconnectAttempts, }?: UseNotificationStreamOptions): {
|
|
1013
|
+
isConnected: boolean;
|
|
1014
|
+
connectionError: string | null;
|
|
1015
|
+
disconnect: () => void;
|
|
1016
|
+
reconnect: () => void;
|
|
1017
|
+
};
|
|
1018
|
+
|
|
1019
|
+
export declare interface UseNotificationStreamOptions {
|
|
1020
|
+
enabled?: boolean;
|
|
1021
|
+
channels?: string[];
|
|
1022
|
+
organizationIds?: number[];
|
|
1023
|
+
workspaceIds?: number[];
|
|
1024
|
+
onNotification?: (notification: NotificationMessage) => void;
|
|
1025
|
+
onError?: (error: string) => void;
|
|
1026
|
+
reconnectDelay?: number;
|
|
1027
|
+
maxReconnectAttempts?: number;
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
export declare const useOrganizationList: () => {
|
|
1031
|
+
organizations: Organization[] | undefined;
|
|
1032
|
+
loading: boolean;
|
|
1033
|
+
error: null;
|
|
1034
|
+
refetch: () => Promise<void>;
|
|
1035
|
+
leaveOrganization: (organization: Organization) => Promise<void>;
|
|
1036
|
+
getOrganizationRoles: (organization: Organization) => Promise<OrganizationRole[]>;
|
|
1037
|
+
getOrganizationMembers: (organization: Organization) => Promise<OrganizationMembership[]>;
|
|
1038
|
+
removeOrganizationMember: (organization: Organization, member: OrganizationMembership) => Promise<void>;
|
|
1039
|
+
createOrganization: (organization: NewOrgnization) => Promise<ApiResult<Organization>>;
|
|
1040
|
+
getOrganizationInvitations: (organization: Organization) => Promise<OrganizationInvitation[]>;
|
|
1041
|
+
getOrganizationDomains: (organization: Organization) => Promise<OrganizationDomain[]>;
|
|
1042
|
+
addOrganizationDomain: (organization: Organization, domain: NewDomain) => Promise<ApiResult<OrganizationDomain>>;
|
|
1043
|
+
verifyOrganizationDomain: (organization: Organization, domain: OrganizationDomain) => Promise<ApiResult<OrganizationDomain>>;
|
|
1044
|
+
removeOrganizationDomain: (organization: Organization, domain: OrganizationDomain) => Promise<ApiResult<OrganizationDomain>>;
|
|
1045
|
+
addRoleToOrganizationMember: (organization: Organization, member: OrganizationMembership, role: OrganizationRole) => Promise<OrganizationMembership>;
|
|
1046
|
+
removeRoleFromOrganizationMember: (organization: Organization, member: OrganizationMembership, role: OrganizationRole) => Promise<OrganizationMembership>;
|
|
1047
|
+
inviteOrganizationMember: (organization: Organization, invitation: OrganizationInvitationPayload) => Promise<OrganizationInvitation>;
|
|
1048
|
+
discardOrganizationInvitation: (organization: Organization, invitation: OrganizationInvitation) => Promise<OrganizationInvitation>;
|
|
1049
|
+
resendOrganizationInvitation: (organization: Organization, invitation: OrganizationInvitation) => Promise<OrganizationInvitation>;
|
|
1050
|
+
updateOrganization: (organization: Organization, update: OrganizationUpdate) => Promise<ApiResult<Organization>>;
|
|
1051
|
+
addRole: (organization: Organization, newRole: RoleCreate) => Promise<ApiResult<OrganizationRole>>;
|
|
1052
|
+
removeOrganizationRoles: (organization: Organization, role: OrganizationRole) => Promise<void>;
|
|
1053
|
+
deleteOrganization: (organization: Organization) => Promise<void>;
|
|
1054
|
+
};
|
|
1055
|
+
|
|
1056
|
+
export declare const useOrganizationMemberships: () => {
|
|
1057
|
+
organizationMemberships: OrganizationMembershipWithOrganization[] | undefined;
|
|
1058
|
+
loading: boolean;
|
|
1059
|
+
error: any;
|
|
1060
|
+
refetch: () => Promise<void>;
|
|
1061
|
+
};
|
|
1062
|
+
|
|
1063
|
+
export declare const UserButton: default_2.FC<UserButtonProps>;
|
|
1064
|
+
|
|
1065
|
+
declare interface UserButtonProps {
|
|
1066
|
+
showName?: boolean;
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
export declare const UserControls: default_2.FC<UserControlsProps>;
|
|
1070
|
+
|
|
1071
|
+
declare interface UserControlsProps {
|
|
1072
|
+
showName?: boolean;
|
|
1073
|
+
showNotifications?: boolean;
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
export declare interface UserInputRequest {
|
|
1077
|
+
question: string;
|
|
1078
|
+
context: string;
|
|
1079
|
+
input_type: "text" | "number" | "select" | "multiselect" | "boolean" | "date";
|
|
1080
|
+
options?: string[];
|
|
1081
|
+
default_value?: string;
|
|
1082
|
+
placeholder?: string;
|
|
1083
|
+
}
|
|
1084
|
+
|
|
1085
|
+
declare type UsernameSignInParams = {
|
|
1086
|
+
username: string;
|
|
1087
|
+
password: string;
|
|
1088
|
+
};
|
|
1089
|
+
|
|
1090
|
+
export declare function useSession(): UseSessionReturnType;
|
|
1091
|
+
|
|
1092
|
+
declare type UseSessionReturnType = {
|
|
1093
|
+
loading: true;
|
|
1094
|
+
session: never;
|
|
1095
|
+
switchSignIn: never;
|
|
1096
|
+
switchOrganization: never;
|
|
1097
|
+
switchWorkspace: never;
|
|
1098
|
+
signOut: never;
|
|
1099
|
+
getToken: never;
|
|
1100
|
+
addNewAccount: never;
|
|
1101
|
+
error: Error | null;
|
|
1102
|
+
refetch: () => Promise<void>;
|
|
1103
|
+
} | {
|
|
1104
|
+
loading: false;
|
|
1105
|
+
error: Error | null;
|
|
1106
|
+
session: Session;
|
|
1107
|
+
switchSignIn: (signInId: string) => Promise<void>;
|
|
1108
|
+
signOut: (signInId?: string) => Promise<void>;
|
|
1109
|
+
getToken: (template?: string) => Promise<string>;
|
|
1110
|
+
switchOrganization: (organizationId?: string) => Promise<void>;
|
|
1111
|
+
switchWorkspace: (workspaceId: string) => Promise<void>;
|
|
1112
|
+
addNewAccount: () => void;
|
|
1113
|
+
refetch: () => Promise<void>;
|
|
1114
|
+
};
|
|
1115
|
+
|
|
1116
|
+
export declare function useSignIn(): UseSignInReturnType;
|
|
1117
|
+
|
|
1118
|
+
declare type UseSignInReturnType = {
|
|
1119
|
+
loading: false;
|
|
1120
|
+
signIn: SignIn;
|
|
1121
|
+
signinAttempt: SigninAttempt | null;
|
|
1122
|
+
discardSignInAttempt: () => void;
|
|
1123
|
+
setSignInAttempt: (attempt: SigninAttempt | null) => void;
|
|
1124
|
+
error: ApiResult<unknown, ErrorInterface> | null;
|
|
1125
|
+
} | {
|
|
1126
|
+
loading: true;
|
|
1127
|
+
signIn: never;
|
|
1128
|
+
signinAttempt: null;
|
|
1129
|
+
discardSignInAttempt: () => void;
|
|
1130
|
+
setSignInAttempt: (attempt: SigninAttempt | null) => void;
|
|
1131
|
+
error: null;
|
|
1132
|
+
};
|
|
1133
|
+
|
|
1134
|
+
export declare function useSignInWithStrategy<T extends SignInStrategy>(strategy: T): UseSignInWithStrategyReturnType<T>;
|
|
1135
|
+
|
|
1136
|
+
export declare type UseSignInWithStrategyReturnType<T extends SignInStrategy> = {
|
|
1137
|
+
loading: true;
|
|
1138
|
+
signIn: never;
|
|
1139
|
+
signinAttempt: null;
|
|
1140
|
+
discardSignInAttempt: () => void;
|
|
1141
|
+
setSignInAttempt: (attempt: SigninAttempt | null) => void;
|
|
1142
|
+
error: null;
|
|
1143
|
+
} | {
|
|
1144
|
+
loading: false;
|
|
1145
|
+
signIn: {
|
|
1146
|
+
create: SignInFunction<T>;
|
|
1147
|
+
completeVerification: (verificationCode: string) => Promise<Session>;
|
|
1148
|
+
prepareVerification: (params: VerificationParams) => Promise<ApiResult<PrepareVerificationResponse>>;
|
|
1149
|
+
completeProfile: (data: ProfileCompletionData) => Promise<Session>;
|
|
1150
|
+
};
|
|
1151
|
+
signinAttempt: SigninAttempt | null;
|
|
1152
|
+
discardSignInAttempt: () => void;
|
|
1153
|
+
setSignInAttempt: (attempt: SigninAttempt | null) => void;
|
|
1154
|
+
error: ApiResult<unknown, ErrorInterface> | null;
|
|
1155
|
+
};
|
|
1156
|
+
|
|
1157
|
+
export declare function useSignUp(): UseSignUpReturnType;
|
|
1158
|
+
|
|
1159
|
+
export declare type UseSignUpReturnType = {
|
|
1160
|
+
loading: true;
|
|
1161
|
+
signUp: never;
|
|
1162
|
+
signupAttempt: null;
|
|
1163
|
+
discardSignupAttempt: () => void;
|
|
1164
|
+
errors: null;
|
|
1165
|
+
} | {
|
|
1166
|
+
loading: false;
|
|
1167
|
+
signUp: SignUpFunction;
|
|
1168
|
+
signupAttempt: SignupAttempt | null;
|
|
1169
|
+
discardSignupAttempt: () => void;
|
|
1170
|
+
errors: ApiResult<unknown, ErrorInterface> | null;
|
|
1171
|
+
};
|
|
1172
|
+
|
|
1173
|
+
/**
|
|
1174
|
+
* Headless hook for handling SSO OAuth callback
|
|
1175
|
+
* Automatically processes URL parameters and handles the callback flow
|
|
1176
|
+
*/
|
|
1177
|
+
export declare function useSSOCallback(): SSOCallbackState;
|
|
1178
|
+
|
|
1179
|
+
export declare function useUser(): {
|
|
1180
|
+
user: {
|
|
1181
|
+
refetch: KeyedMutator<CurrentUser>;
|
|
1182
|
+
id?: string | undefined;
|
|
1183
|
+
first_name?: string | undefined;
|
|
1184
|
+
last_name?: string | undefined;
|
|
1185
|
+
username?: string | undefined;
|
|
1186
|
+
availability?: "available" | "busy" | "away" | undefined;
|
|
1187
|
+
has_profile_picture?: string | undefined;
|
|
1188
|
+
profile_picture_url?: string | undefined;
|
|
1189
|
+
primary_email_address_id?: string | undefined;
|
|
1190
|
+
primary_phone_number_id?: string | undefined;
|
|
1191
|
+
primary_email_address?: UserEmailAddress | undefined;
|
|
1192
|
+
primary_phone_number?: UserPhoneNumber;
|
|
1193
|
+
second_factor_policy?: SecondFactorPolicy | undefined;
|
|
1194
|
+
user_email_addresses?: UserEmailAddress[] | undefined;
|
|
1195
|
+
user_phone_numbers?: UserPhoneNumber[] | undefined;
|
|
1196
|
+
email_addresses?: UserEmailAddress[];
|
|
1197
|
+
phone_numbers?: UserPhoneNumber[];
|
|
1198
|
+
social_connections?: SocialConnection[] | undefined;
|
|
1199
|
+
user_authenticator?: UserAuthenticator;
|
|
1200
|
+
authenticators?: UserAuthenticator[];
|
|
1201
|
+
backup_codes_generated?: boolean;
|
|
1202
|
+
backup_codes?: string[];
|
|
1203
|
+
has_password?: boolean | undefined;
|
|
1204
|
+
public_metadata?: Record<string, unknown> | undefined;
|
|
1205
|
+
};
|
|
1206
|
+
loading: boolean;
|
|
1207
|
+
error: any;
|
|
1208
|
+
updateProfile: (data: ProfileUpdateData) => Promise<ApiResult<unknown>>;
|
|
1209
|
+
getEmailAddresses: () => Promise<ApiResult<unknown>>;
|
|
1210
|
+
getEmailAddress: (id: string) => Promise<ApiResult<unknown>>;
|
|
1211
|
+
createEmailAddress: (email: string) => Promise<ApiResult<UserEmailAddress>>;
|
|
1212
|
+
deleteEmailAddress: (id: string) => Promise<ApiResult<unknown>>;
|
|
1213
|
+
prepareEmailVerification: (id: string) => Promise<ApiResult<unknown>>;
|
|
1214
|
+
attemptEmailVerification: (id: string, otp: string) => Promise<ApiResult<unknown>>;
|
|
1215
|
+
makeEmailPrimary: (id: string) => Promise<ApiResult<unknown>>;
|
|
1216
|
+
createPhoneNumber: (phone_number: string, country_code: string) => Promise<ApiResult<UserPhoneNumber>>;
|
|
1217
|
+
deletePhoneNumber: (id: string) => Promise<ApiResult<unknown>>;
|
|
1218
|
+
preparePhoneVerification: (id: string) => Promise<ApiResult<unknown>>;
|
|
1219
|
+
attemptPhoneVerification: (id: string, otp: string) => Promise<ApiResult<unknown>>;
|
|
1220
|
+
makePhonePrimary: (id: string) => Promise<ApiResult<unknown>>;
|
|
1221
|
+
setupAuthenticator: () => Promise<UserAuthenticator>;
|
|
1222
|
+
verifyAuthenticator: (id: string, codes: string[]) => Promise<ApiResult<unknown>>;
|
|
1223
|
+
deleteAuthenticator: (id: string) => Promise<ApiResult<unknown>>;
|
|
1224
|
+
generateBackupCodes: () => Promise<string[]>;
|
|
1225
|
+
regenerateBackupCodes: () => Promise<string[]>;
|
|
1226
|
+
updateProfilePicture: (file: File) => Promise<ApiResult<unknown>>;
|
|
1227
|
+
disconnectSocialConnection: (id: string) => Promise<ApiResult<unknown>>;
|
|
1228
|
+
connectSocialAccount: ({ provider, redirectUri, }: {
|
|
1229
|
+
provider: string;
|
|
1230
|
+
redirectUri?: string;
|
|
1231
|
+
}) => Promise<ApiResult< {
|
|
1232
|
+
oauth_url: string;
|
|
1233
|
+
}>>;
|
|
1234
|
+
updatePassword: (currentPassword: string, newPassword: string) => Promise<ApiResult<unknown>>;
|
|
1235
|
+
removePassword: (currentPassword: string) => Promise<ApiResult<unknown>>;
|
|
1236
|
+
deleteAccount: (password: string) => Promise<ApiResult<unknown>>;
|
|
1237
|
+
};
|
|
1238
|
+
|
|
1239
|
+
export declare function useUserSignins(): {
|
|
1240
|
+
signins: SignIn_2[] | undefined;
|
|
1241
|
+
error: any;
|
|
1242
|
+
removeSignin: (id: string) => Promise<ApiResult<unknown>>;
|
|
1243
|
+
refetch: KeyedMutator<SignIn_2[]>;
|
|
1244
|
+
loading: boolean;
|
|
1245
|
+
};
|
|
1246
|
+
|
|
1247
|
+
export declare function useWaitlist(): {
|
|
1248
|
+
loading: boolean;
|
|
1249
|
+
error: ApiResult<unknown, ErrorInterface> | null;
|
|
1250
|
+
joinWaitlist: (params: WaitlistParams) => Promise<ApiResult<WaitlistResponse, ErrorInterface>>;
|
|
1251
|
+
};
|
|
1252
|
+
|
|
1253
|
+
export declare const useWorkspaceList: () => {
|
|
1254
|
+
workspaces: WorkspaceWithOrganization[];
|
|
1255
|
+
loading: boolean;
|
|
1256
|
+
error: any;
|
|
1257
|
+
refetch: () => Promise<void>;
|
|
1258
|
+
leaveWorkspace: (id: string, userId: string) => Promise<void>;
|
|
1259
|
+
createWorkspace: (organizationId: string, name: string, image?: File, description?: string) => Promise<Response>;
|
|
1260
|
+
updateWorkspace: (workspace: Workspace, data: {
|
|
1261
|
+
name?: string;
|
|
1262
|
+
description?: string;
|
|
1263
|
+
image?: File;
|
|
1264
|
+
}) => Promise<unknown>;
|
|
1265
|
+
deleteWorkspace: (workspace: Workspace) => Promise<unknown>;
|
|
1266
|
+
getWorkspaceMembers: (workspace: Workspace) => Promise<WorkspaceMembership[]>;
|
|
1267
|
+
getWorkspaceRoles: (workspace: Workspace) => Promise<WorkspaceRole[]>;
|
|
1268
|
+
createWorkspaceRole: (workspace: Workspace, name: string, permissions: string[]) => Promise<WorkspaceRole>;
|
|
1269
|
+
deleteWorkspaceRole: (workspace: Workspace, role: WorkspaceRole) => Promise<unknown>;
|
|
1270
|
+
inviteWorkspaceMember: (workspace: Workspace, email: string, roleId?: string) => Promise<unknown>;
|
|
1271
|
+
removeWorkspaceMember: (workspace: Workspace, memberId: string) => Promise<unknown>;
|
|
1272
|
+
addWorkspaceMemberRole: (workspace: Workspace, membershipId: string, roleId: string) => Promise<unknown>;
|
|
1273
|
+
removeWorkspaceMemberRole: (workspace: Workspace, membershipId: string, roleId: string) => Promise<unknown>;
|
|
1274
|
+
};
|
|
1275
|
+
|
|
1276
|
+
export declare const useWorkspaceMemberships: () => {
|
|
1277
|
+
workspaceMemberships: WorkspaceMembership[] | undefined;
|
|
1278
|
+
loading: boolean;
|
|
1279
|
+
error: any;
|
|
1280
|
+
refetch: () => Promise<void>;
|
|
1281
|
+
};
|
|
1282
|
+
|
|
1283
|
+
declare type VerificationParams = EmailOTPVerificationParams | PhoneOTPVerificationParams | MagicLinkVerificationParams;
|
|
1284
|
+
|
|
1285
|
+
export declare interface WaitlistEntry {
|
|
1286
|
+
id: string;
|
|
1287
|
+
deployment_id: number;
|
|
1288
|
+
email_address: string;
|
|
1289
|
+
first_name: string;
|
|
1290
|
+
last_name: string;
|
|
1291
|
+
created_at: string;
|
|
1292
|
+
updated_at: string;
|
|
1293
|
+
}
|
|
1294
|
+
|
|
1295
|
+
export declare function WaitlistForm(): JSX.Element;
|
|
1296
|
+
|
|
1297
|
+
export declare interface WaitlistParams {
|
|
1298
|
+
first_name: string;
|
|
1299
|
+
last_name: string;
|
|
1300
|
+
email: string;
|
|
1301
|
+
}
|
|
1302
|
+
|
|
1303
|
+
export declare interface WaitlistResponse {
|
|
1304
|
+
message: string;
|
|
1305
|
+
entry: WaitlistEntry;
|
|
1306
|
+
}
|
|
1307
|
+
|
|
1308
|
+
|
|
1309
|
+
export * from "@wacht/types";
|
|
1310
|
+
|
|
1311
|
+
export { }
|