@botpress/webchat 2.4.1 → 2.5.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/.storybook/main.ts +6 -1
- package/.turbo/turbo-build.log +12 -9
- package/dist/index.d.ts +14197 -15
- package/dist/index.js +17811 -15101
- package/dist/index.umd.cjs +85 -252
- package/dist/style.css +1 -1
- package/package.json +5 -3
- package/dist/adapters/index.d.ts +0 -2
- package/dist/adapters/target.d.ts +0 -83
- package/dist/adapters/typings.d.ts +0 -7
- package/dist/adapters/webchat-to-target.d.ts +0 -8
- package/dist/adapters/webchat.d.ts +0 -4
- package/dist/client/client.d.ts +0 -37
- package/dist/client/index.d.ts +0 -4
- package/dist/client/legacyClient.d.ts +0 -55
- package/dist/client/state-machine.d.ts +0 -40
- package/dist/client/types.d.ts +0 -35
- package/dist/components/Avatar.d.ts +0 -8
- package/dist/components/Block.d.ts +0 -9
- package/dist/components/Chat.d.ts +0 -30
- package/dist/components/CloseWindowButton.d.ts +0 -7
- package/dist/components/Composer/Composer.d.ts +0 -18
- package/dist/components/Composer/index.d.ts +0 -1
- package/dist/components/Container/Container.d.ts +0 -9
- package/dist/components/Container/index.d.ts +0 -1
- package/dist/components/Fab/Fab.d.ts +0 -1
- package/dist/components/Fab/index.d.ts +0 -1
- package/dist/components/Header/Header.d.ts +0 -12
- package/dist/components/Header/index.d.ts +0 -1
- package/dist/components/Loader/Loader.d.ts +0 -5
- package/dist/components/Loader/index.d.ts +0 -1
- package/dist/components/Marquee/Marquee.d.ts +0 -7
- package/dist/components/Marquee/index.d.ts +0 -1
- package/dist/components/Message/Message.d.ts +0 -12
- package/dist/components/Message/index.d.ts +0 -1
- package/dist/components/MessageList/MessageList.d.ts +0 -16
- package/dist/components/MessageList/index.d.ts +0 -1
- package/dist/components/Modal/Modal.d.ts +0 -17
- package/dist/components/Modal/index.d.ts +0 -1
- package/dist/components/RestartConversationButton.d.ts +0 -7
- package/dist/components/TypingIndicator/TypingIndicator.d.ts +0 -2
- package/dist/components/TypingIndicator/index.d.ts +0 -1
- package/dist/components/Webchat.d.ts +0 -13
- package/dist/components/index.d.ts +0 -14
- package/dist/components/renderers/Audio/Audio.d.ts +0 -6
- package/dist/components/renderers/Audio/index.d.ts +0 -1
- package/dist/components/renderers/Bubble/Bubble.d.ts +0 -5
- package/dist/components/renderers/Bubble/index.d.ts +0 -1
- package/dist/components/renderers/Button/Button.d.ts +0 -4
- package/dist/components/renderers/Button/index.d.ts +0 -1
- package/dist/components/renderers/Carousel/Carousel.d.ts +0 -6
- package/dist/components/renderers/Carousel/index.d.ts +0 -1
- package/dist/components/renderers/Column/Column.d.ts +0 -5
- package/dist/components/renderers/Column/index.d.ts +0 -1
- package/dist/components/renderers/Custom/Custom.d.ts +0 -14
- package/dist/components/renderers/Custom/index.d.ts +0 -1
- package/dist/components/renderers/Dropdown/Dropdown.d.ts +0 -5
- package/dist/components/renderers/Dropdown/index.d.ts +0 -1
- package/dist/components/renderers/File/File.d.ts +0 -6
- package/dist/components/renderers/File/index.d.ts +0 -1
- package/dist/components/renderers/Image/Image.d.ts +0 -6
- package/dist/components/renderers/Image/index.d.ts +0 -1
- package/dist/components/renderers/Location/Location.d.ts +0 -6
- package/dist/components/renderers/Location/index.d.ts +0 -1
- package/dist/components/renderers/Row/Row.d.ts +0 -5
- package/dist/components/renderers/Row/index.d.ts +0 -1
- package/dist/components/renderers/Text/Text.d.ts +0 -4
- package/dist/components/renderers/Text/index.d.ts +0 -1
- package/dist/components/renderers/Video/Video.d.ts +0 -6
- package/dist/components/renderers/Video/index.d.ts +0 -1
- package/dist/components/renderers/index.d.ts +0 -2
- package/dist/contexts/MessageContext.d.ts +0 -8
- package/dist/contexts/ModalContext.d.ts +0 -14
- package/dist/contexts/index.d.ts +0 -2
- package/dist/gen/client/errors.d.ts +0 -211
- package/dist/gen/client/index.d.ts +0 -71
- package/dist/gen/client/models.d.ts +0 -259
- package/dist/gen/client/operations/addParticipant.d.ts +0 -57
- package/dist/gen/client/operations/createConversation.d.ts +0 -39
- package/dist/gen/client/operations/createEvent.d.ts +0 -79
- package/dist/gen/client/operations/createFile.d.ts +0 -65
- package/dist/gen/client/operations/createMessage.d.ts +0 -324
- package/dist/gen/client/operations/createUser.d.ts +0 -66
- package/dist/gen/client/operations/deleteConversation.d.ts +0 -22
- package/dist/gen/client/operations/deleteMessage.d.ts +0 -22
- package/dist/gen/client/operations/deleteUser.d.ts +0 -21
- package/dist/gen/client/operations/getConversation.d.ts +0 -36
- package/dist/gen/client/operations/getEvent.d.ts +0 -58
- package/dist/gen/client/operations/getMessage.d.ts +0 -182
- package/dist/gen/client/operations/getParticipant.d.ts +0 -54
- package/dist/gen/client/operations/getUser.d.ts +0 -52
- package/dist/gen/client/operations/listConversationMessages.d.ts +0 -186
- package/dist/gen/client/operations/listConversations.d.ts +0 -42
- package/dist/gen/client/operations/listParticipants.d.ts +0 -57
- package/dist/gen/client/operations/listenConversation.d.ts +0 -22
- package/dist/gen/client/operations/removeParticipant.d.ts +0 -23
- package/dist/gen/client/operations/updateUser.d.ts +0 -66
- package/dist/gen/client/to-axios.d.ts +0 -16
- package/dist/gen/signals/custom.t.d.ts +0 -8
- package/dist/gen/signals/custom.z.d.ts +0 -22
- package/dist/gen/signals/index.d.ts +0 -1035
- package/dist/gen/signals/messageCreated.t.d.ts +0 -163
- package/dist/gen/signals/messageCreated.z.d.ts +0 -930
- package/dist/gen/signals/typingStarted.t.d.ts +0 -6
- package/dist/gen/signals/typingStarted.z.d.ts +0 -22
- package/dist/gen/signals/typingStopped.t.d.ts +0 -4
- package/dist/gen/signals/typingStopped.z.d.ts +0 -12
- package/dist/gen/signals/webchatConfig.t.d.ts +0 -8
- package/dist/gen/signals/webchatConfig.z.d.ts +0 -22
- package/dist/gen/signals/webchatVisibility.t.d.ts +0 -6
- package/dist/gen/signals/webchatVisibility.z.d.ts +0 -22
- package/dist/get-client.d.ts +0 -7
- package/dist/hooks/index.d.ts +0 -5
- package/dist/hooks/useClient.d.ts +0 -6
- package/dist/hooks/useImageSize.d.ts +0 -2
- package/dist/hooks/useIsTyping.d.ts +0 -4
- package/dist/hooks/useRefresh.d.ts +0 -10
- package/dist/hooks/useWebchatClient.d.ts +0 -50
- package/dist/providers/ModalProvider.d.ts +0 -8
- package/dist/providers/StylesheetProvider.d.ts +0 -4
- package/dist/providers/index.d.ts +0 -2
- package/dist/schemas/configuration.d.ts +0 -157
- package/dist/schemas/index.d.ts +0 -3
- package/dist/schemas/init.d.ts +0 -8487
- package/dist/schemas/theme.d.ts +0 -4358
- package/dist/services/clipboard.d.ts +0 -1
- package/dist/services/images.d.ts +0 -2
- package/dist/services/index.d.ts +0 -3
- package/dist/services/toast.d.ts +0 -17
- package/dist/stores/customComponentsStore.d.ts +0 -9
- package/dist/stores/index.d.ts +0 -4
- package/dist/stores/messageHistoryStore.d.ts +0 -20
- package/dist/stores/messagesStore.d.ts +0 -20
- package/dist/stores/userStore.d.ts +0 -32
- package/dist/stores/webchatStore.d.ts +0 -12
- package/dist/stories/Messages/Audio.stories.d.ts +0 -6
- package/dist/stories/Messages/Bloc.stories.d.ts +0 -6
- package/dist/stories/Messages/Card.stories.d.ts +0 -6
- package/dist/stories/Messages/Carousel.stories.d.ts +0 -6
- package/dist/stories/Messages/Choice.stories.d.ts +0 -6
- package/dist/stories/Messages/Custom.stories.d.ts +0 -12
- package/dist/stories/Messages/Dropdown.stories.d.ts +0 -6
- package/dist/stories/Messages/File.stories.d.ts +0 -6
- package/dist/stories/Messages/Image.stories.d.ts +0 -6
- package/dist/stories/Messages/Location.stories.d.ts +0 -6
- package/dist/stories/Messages/Text.stories.d.ts +0 -6
- package/dist/stories/Messages/Video.stories.d.ts +0 -6
- package/dist/styles/classes.d.ts +0 -360
- package/dist/styles/index.d.ts +0 -1
- package/dist/types/block-type.d.ts +0 -58
- package/dist/types/configuration.d.ts +0 -5
- package/dist/types/image.d.ts +0 -11
- package/dist/types/index.d.ts +0 -5
- package/dist/types/init.d.ts +0 -6
- package/dist/types/theme.d.ts +0 -7
- package/dist/utils/colors.d.ts +0 -21
- package/dist/utils/colors.test.d.ts +0 -1
- package/dist/utils/eventEmitter.d.ts +0 -12
- package/dist/utils/generateCSS.d.ts +0 -1
- package/dist/utils/hashStringToInt.d.ts +0 -1
- package/dist/utils/index.d.ts +0 -6
- package/dist/utils/message.d.ts +0 -8
- package/dist/utils/message.test.d.ts +0 -1
- package/dist/utils/theme.d.ts +0 -2
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Marquee';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
2
|
-
import type { Renderers } from '../../types';
|
|
3
|
-
import type { Message as WebchatMessage } from '../../adapters/webchat';
|
|
4
|
-
export declare const Message: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<{
|
|
5
|
-
children?: ReactNode;
|
|
6
|
-
renderers?: Partial<Renderers>;
|
|
7
|
-
sendMessage?: (payload: WebchatMessage) => void;
|
|
8
|
-
isReadOnly?: boolean;
|
|
9
|
-
} & import("../..").MessageObject<import("../../adapters/target").Message> & {
|
|
10
|
-
direction: import("../..").MessageDirection;
|
|
11
|
-
sender: import("../..").Sender;
|
|
12
|
-
} & import("react").RefAttributes<HTMLDivElement>>>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Message';
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ComponentProps } from 'react';
|
|
2
|
-
import type { Renderers, RichMessageObject } from '../../types';
|
|
3
|
-
import type { Message as WebchatMessage } from '../../adapters/webchat';
|
|
4
|
-
type MessageListProps = {
|
|
5
|
-
messages?: RichMessageObject[];
|
|
6
|
-
isTyping?: boolean;
|
|
7
|
-
headerMessage?: string;
|
|
8
|
-
renderers?: Partial<Renderers>;
|
|
9
|
-
botAvatar?: string;
|
|
10
|
-
botDescription?: string;
|
|
11
|
-
botName?: string;
|
|
12
|
-
sendMessage?: (payload: WebchatMessage) => void;
|
|
13
|
-
showMarquee?: boolean;
|
|
14
|
-
};
|
|
15
|
-
export declare const MessageList: import("react").MemoExoticComponent<({ className, messages, isTyping, headerMessage, renderers, botAvatar, botDescription, botName, sendMessage, showMarquee, ...props }: ComponentProps<"ul"> & MessageListProps) => import("react/jsx-runtime").JSX.Element>;
|
|
16
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './MessageList';
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as Dialog from '@radix-ui/react-dialog';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
export declare function Modal({ open, onOpenChange, children, }: {
|
|
4
|
-
open?: boolean;
|
|
5
|
-
onOpenChange?: (open: boolean) => void;
|
|
6
|
-
children: ReactNode;
|
|
7
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export declare namespace Modal {
|
|
9
|
-
var Button: import("react").ForwardRefExoticComponent<Dialog.DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
10
|
-
var Close: import("react").ForwardRefExoticComponent<Dialog.DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
11
|
-
var Content: typeof ModalContent;
|
|
12
|
-
}
|
|
13
|
-
declare function ModalContent({ title, children }: {
|
|
14
|
-
title: string;
|
|
15
|
-
children: ReactNode;
|
|
16
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
17
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Modal';
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ArrowPathIcon } from '@heroicons/react/20/solid';
|
|
2
|
-
import { ComponentProps } from 'react';
|
|
3
|
-
type Props = {
|
|
4
|
-
onClick?: () => void;
|
|
5
|
-
} & ComponentProps<typeof ArrowPathIcon>;
|
|
6
|
-
export declare const RestartConversationButton: ({ onClick, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './TypingIndicator';
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { type ComponentProps } from 'react';
|
|
2
|
-
import { Chat } from './Chat';
|
|
3
|
-
type configuration = ComponentProps<typeof Chat>['configuration'];
|
|
4
|
-
type Props = {
|
|
5
|
-
clientId: string;
|
|
6
|
-
apiUrl?: string;
|
|
7
|
-
storageKey?: string;
|
|
8
|
-
userKey?: string;
|
|
9
|
-
conversationId?: string;
|
|
10
|
-
configuration?: configuration;
|
|
11
|
-
} & Pick<ComponentProps<typeof Chat>, 'allowFileUpload' | 'renderers'> & ComponentProps<'div'>;
|
|
12
|
-
export declare const Webchat: ({ clientId, storageKey, configuration, allowFileUpload, apiUrl, userKey, conversationId, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export * from './Avatar';
|
|
2
|
-
export * from './Block';
|
|
3
|
-
export * from './Composer';
|
|
4
|
-
export * from './Container';
|
|
5
|
-
export * from './Fab';
|
|
6
|
-
export * from './Header';
|
|
7
|
-
export * from './TypingIndicator';
|
|
8
|
-
export * from './Message';
|
|
9
|
-
export * from './MessageList';
|
|
10
|
-
export * from './Modal';
|
|
11
|
-
export * from './RestartConversationButton';
|
|
12
|
-
export * from './Chat';
|
|
13
|
-
export * from './Webchat';
|
|
14
|
-
export * from './renderers';
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const Audio: import("react").ForwardRefExoticComponent<import("../../../adapters/target").AudioMessage & Pick<import("../../..").RichMessageObject<import("../../../adapters/target").Message>, "direction" | "timestamp" | "sender"> & {
|
|
2
|
-
messageId: string;
|
|
3
|
-
sendMessage?: (payload: import("../../../adapters/webchat").Message) => void;
|
|
4
|
-
metadata?: Record<string, any>;
|
|
5
|
-
isReadOnly?: boolean;
|
|
6
|
-
} & import("react").RefAttributes<HTMLAudioElement>>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Audio';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { ComponentProps } from 'react';
|
|
2
|
-
import { BubbleBlock, type CommonBlockProps } from '../../../types';
|
|
3
|
-
type Props = BubbleBlock & ComponentProps<'div'> & CommonBlockProps;
|
|
4
|
-
export declare const Bubble: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Bubble';
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { ButtonBlock, type CommonBlockProps } from '../../../types';
|
|
2
|
-
type Props = ButtonBlock & CommonBlockProps;
|
|
3
|
-
export declare const Button: ({ text, buttonValue, variant, groupId, reusable, sendMessage, isReadOnly, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Button';
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const Carousel: import("react").ForwardRefExoticComponent<import("../../../adapters/target").CarouselMessage & Pick<import("../../..").RichMessageObject<import("../../../adapters/target").Message>, "direction" | "timestamp" | "sender"> & {
|
|
2
|
-
messageId: string;
|
|
3
|
-
sendMessage?: (payload: import("../../../adapters/webchat").Message) => void;
|
|
4
|
-
metadata?: Record<string, any>;
|
|
5
|
-
isReadOnly?: boolean;
|
|
6
|
-
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Carousel';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { ComponentProps } from 'react';
|
|
2
|
-
import { ColumnBlock, type CommonBlockProps } from '../../../types';
|
|
3
|
-
type Props = ColumnBlock & ComponentProps<'div'> & CommonBlockProps;
|
|
4
|
-
export declare const Column: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Column';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type RemoteComponentProps } from '../../../stores/customComponentsStore';
|
|
3
|
-
declare global {
|
|
4
|
-
interface Window {
|
|
5
|
-
RemoteComponents: Record<string, React.FC<any>>;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
type CustomComponentProps = {
|
|
9
|
-
url: string;
|
|
10
|
-
name: string;
|
|
11
|
-
data?: any;
|
|
12
|
-
};
|
|
13
|
-
export declare const CustomComponent: ({ url, name, data, ...props }: CustomComponentProps & RemoteComponentProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
14
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Custom';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { DropdownBlock, type CommonBlockProps } from '../../../types';
|
|
2
|
-
import { ComponentProps } from 'react';
|
|
3
|
-
type Props = DropdownBlock & ComponentProps<'div'> & CommonBlockProps;
|
|
4
|
-
export declare const Dropdown: ({ options, reusable, sendMessage, isReadOnly }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Dropdown';
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const File: import("react").ForwardRefExoticComponent<import("../../../adapters/target").FileMessage & Pick<import("../../..").RichMessageObject<import("../../../adapters/target").Message>, "direction" | "timestamp" | "sender"> & {
|
|
2
|
-
messageId: string;
|
|
3
|
-
sendMessage?: (payload: import("../../../adapters/webchat").Message) => void;
|
|
4
|
-
metadata?: Record<string, any>;
|
|
5
|
-
isReadOnly?: boolean;
|
|
6
|
-
} & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './File';
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const Image: import("react").ForwardRefExoticComponent<import("../../../adapters/target").ImageMessage & Pick<import("../../..").RichMessageObject<import("../../../adapters/target").Message>, "direction" | "timestamp" | "sender"> & {
|
|
2
|
-
messageId: string;
|
|
3
|
-
sendMessage?: (payload: import("../../../adapters/webchat").Message) => void;
|
|
4
|
-
metadata?: Record<string, any>;
|
|
5
|
-
isReadOnly?: boolean;
|
|
6
|
-
} & import("react").RefAttributes<HTMLImageElement>>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Image';
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const Location: import("react").ForwardRefExoticComponent<import("../../../adapters/target").LocationMessage & Pick<import("../../..").RichMessageObject<import("../../../adapters/target").Message>, "direction" | "timestamp" | "sender"> & {
|
|
2
|
-
messageId: string;
|
|
3
|
-
sendMessage?: (payload: import("../../../adapters/webchat").Message) => void;
|
|
4
|
-
metadata?: Record<string, any>;
|
|
5
|
-
isReadOnly?: boolean;
|
|
6
|
-
} & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Location';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { ComponentProps } from 'react';
|
|
2
|
-
import { RowBlock, type CommonBlockProps } from '../../../types';
|
|
3
|
-
type Props = RowBlock & ComponentProps<'div'> & CommonBlockProps;
|
|
4
|
-
export declare const Row: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Row';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Text';
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const Video: import("react").ForwardRefExoticComponent<import("../../../adapters/target").VideoMessage & Pick<import("../../..").RichMessageObject<import("../../../adapters/target").Message>, "direction" | "timestamp" | "sender"> & {
|
|
2
|
-
messageId: string;
|
|
3
|
-
sendMessage?: (payload: import("../../../adapters/webchat").Message) => void;
|
|
4
|
-
metadata?: Record<string, any>;
|
|
5
|
-
isReadOnly?: boolean;
|
|
6
|
-
} & import("react").RefAttributes<HTMLVideoElement>>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Video';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
-
type MessageContextVaue = {
|
|
3
|
-
isLoading: string[];
|
|
4
|
-
setIsLoading: Dispatch<SetStateAction<string[]>>;
|
|
5
|
-
};
|
|
6
|
-
export declare const MessageContext: import("react").Context<MessageContextVaue | null>;
|
|
7
|
-
export declare function useMessageContext(): MessageContextVaue;
|
|
8
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
type ModalContextVaue = {
|
|
3
|
-
open: boolean;
|
|
4
|
-
showModal: (props: {
|
|
5
|
-
title: string;
|
|
6
|
-
content: ReactNode;
|
|
7
|
-
}) => void;
|
|
8
|
-
hideModal: () => void;
|
|
9
|
-
title: string;
|
|
10
|
-
content: ReactNode | null;
|
|
11
|
-
};
|
|
12
|
-
export declare const ModalContext: import("react").Context<ModalContextVaue | null>;
|
|
13
|
-
export declare function useModalContext(): ModalContextVaue;
|
|
14
|
-
export {};
|
package/dist/contexts/index.d.ts
DELETED
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
declare const codes: {
|
|
2
|
-
readonly HTTP_STATUS_BAD_REQUEST: 400;
|
|
3
|
-
readonly HTTP_STATUS_UNAUTHORIZED: 401;
|
|
4
|
-
readonly HTTP_STATUS_PAYMENT_REQUIRED: 402;
|
|
5
|
-
readonly HTTP_STATUS_FORBIDDEN: 403;
|
|
6
|
-
readonly HTTP_STATUS_NOT_FOUND: 404;
|
|
7
|
-
readonly HTTP_STATUS_METHOD_NOT_ALLOWED: 405;
|
|
8
|
-
readonly HTTP_STATUS_REQUEST_TIMEOUT: 408;
|
|
9
|
-
readonly HTTP_STATUS_CONFLICT: 409;
|
|
10
|
-
readonly HTTP_STATUS_PAYLOAD_TOO_LARGE: 413;
|
|
11
|
-
readonly HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE: 415;
|
|
12
|
-
readonly HTTP_STATUS_TOO_MANY_REQUESTS: 429;
|
|
13
|
-
readonly HTTP_STATUS_INTERNAL_SERVER_ERROR: 500;
|
|
14
|
-
readonly HTTP_STATUS_NOT_IMPLEMENTED: 501;
|
|
15
|
-
readonly HTTP_STATUS_BAD_GATEWAY: 502;
|
|
16
|
-
readonly HTTP_STATUS_SERVICE_UNAVAILABLE: 503;
|
|
17
|
-
readonly HTTP_STATUS_GATEWAY_TIMEOUT: 504;
|
|
18
|
-
};
|
|
19
|
-
type ErrorCode = typeof codes[keyof typeof codes];
|
|
20
|
-
declare abstract class BaseApiError<Code extends ErrorCode, Type extends string, Description extends string> extends Error {
|
|
21
|
-
readonly code: Code;
|
|
22
|
-
readonly description: Description;
|
|
23
|
-
readonly type: Type;
|
|
24
|
-
readonly message: string;
|
|
25
|
-
readonly error?: Error | undefined;
|
|
26
|
-
readonly id?: string | undefined;
|
|
27
|
-
readonly isApiError = true;
|
|
28
|
-
constructor(code: Code, description: Description, type: Type, message: string, error?: Error | undefined, id?: string | undefined);
|
|
29
|
-
format(): string;
|
|
30
|
-
toJSON(): {
|
|
31
|
-
id: string | undefined;
|
|
32
|
-
code: Code;
|
|
33
|
-
type: Type;
|
|
34
|
-
message: string;
|
|
35
|
-
};
|
|
36
|
-
static generateId(): string;
|
|
37
|
-
private static getPrefix;
|
|
38
|
-
}
|
|
39
|
-
export declare const isApiError: (thrown: unknown) => thrown is ApiError;
|
|
40
|
-
type UnknownType = 'Unknown';
|
|
41
|
-
/**
|
|
42
|
-
* An unknown error occurred
|
|
43
|
-
*/
|
|
44
|
-
export declare class UnknownError extends BaseApiError<500, UnknownType, 'An unknown error occurred'> {
|
|
45
|
-
constructor(message: string, error?: Error, id?: string);
|
|
46
|
-
}
|
|
47
|
-
type InternalType = 'Internal';
|
|
48
|
-
/**
|
|
49
|
-
* An internal error occurred
|
|
50
|
-
*/
|
|
51
|
-
export declare class InternalError extends BaseApiError<500, InternalType, 'An internal error occurred'> {
|
|
52
|
-
constructor(message: string, error?: Error, id?: string);
|
|
53
|
-
}
|
|
54
|
-
type UnauthorizedType = 'Unauthorized';
|
|
55
|
-
/**
|
|
56
|
-
* The request requires to be authenticated.
|
|
57
|
-
*/
|
|
58
|
-
export declare class UnauthorizedError extends BaseApiError<401, UnauthorizedType, 'The request requires to be authenticated.'> {
|
|
59
|
-
constructor(message: string, error?: Error, id?: string);
|
|
60
|
-
}
|
|
61
|
-
type ForbiddenType = 'Forbidden';
|
|
62
|
-
/**
|
|
63
|
-
* The requested action can\'t be peform by this resource.
|
|
64
|
-
*/
|
|
65
|
-
export declare class ForbiddenError extends BaseApiError<403, ForbiddenType, 'The requested action can\'t be peform by this resource.'> {
|
|
66
|
-
constructor(message: string, error?: Error, id?: string);
|
|
67
|
-
}
|
|
68
|
-
type PayloadTooLargeType = 'PayloadTooLarge';
|
|
69
|
-
/**
|
|
70
|
-
* The request payload is too large.
|
|
71
|
-
*/
|
|
72
|
-
export declare class PayloadTooLargeError extends BaseApiError<413, PayloadTooLargeType, 'The request payload is too large.'> {
|
|
73
|
-
constructor(message: string, error?: Error, id?: string);
|
|
74
|
-
}
|
|
75
|
-
type InvalidPayloadType = 'InvalidPayload';
|
|
76
|
-
/**
|
|
77
|
-
* The request payload is invalid.
|
|
78
|
-
*/
|
|
79
|
-
export declare class InvalidPayloadError extends BaseApiError<400, InvalidPayloadType, 'The request payload is invalid.'> {
|
|
80
|
-
constructor(message: string, error?: Error, id?: string);
|
|
81
|
-
}
|
|
82
|
-
type UnsupportedMediaTypeType = 'UnsupportedMediaType';
|
|
83
|
-
/**
|
|
84
|
-
* The request is invalid because the content-type is not supported.
|
|
85
|
-
*/
|
|
86
|
-
export declare class UnsupportedMediaTypeError extends BaseApiError<415, UnsupportedMediaTypeType, 'The request is invalid because the content-type is not supported.'> {
|
|
87
|
-
constructor(message: string, error?: Error, id?: string);
|
|
88
|
-
}
|
|
89
|
-
type MethodNotFoundType = 'MethodNotFound';
|
|
90
|
-
/**
|
|
91
|
-
* The requested method does not exist.
|
|
92
|
-
*/
|
|
93
|
-
export declare class MethodNotFoundError extends BaseApiError<405, MethodNotFoundType, 'The requested method does not exist.'> {
|
|
94
|
-
constructor(message: string, error?: Error, id?: string);
|
|
95
|
-
}
|
|
96
|
-
type ResourceNotFoundType = 'ResourceNotFound';
|
|
97
|
-
/**
|
|
98
|
-
* The requested resource does not exist.
|
|
99
|
-
*/
|
|
100
|
-
export declare class ResourceNotFoundError extends BaseApiError<404, ResourceNotFoundType, 'The requested resource does not exist.'> {
|
|
101
|
-
constructor(message: string, error?: Error, id?: string);
|
|
102
|
-
}
|
|
103
|
-
type InvalidJsonSchemaType = 'InvalidJsonSchema';
|
|
104
|
-
/**
|
|
105
|
-
* The provided JSON schema is invalid.
|
|
106
|
-
*/
|
|
107
|
-
export declare class InvalidJsonSchemaError extends BaseApiError<400, InvalidJsonSchemaType, 'The provided JSON schema is invalid.'> {
|
|
108
|
-
constructor(message: string, error?: Error, id?: string);
|
|
109
|
-
}
|
|
110
|
-
type InvalidDataFormatType = 'InvalidDataFormat';
|
|
111
|
-
/**
|
|
112
|
-
* The provided data doesn\'t respect the provided JSON schema.
|
|
113
|
-
*/
|
|
114
|
-
export declare class InvalidDataFormatError extends BaseApiError<400, InvalidDataFormatType, 'The provided data doesn\'t respect the provided JSON schema.'> {
|
|
115
|
-
constructor(message: string, error?: Error, id?: string);
|
|
116
|
-
}
|
|
117
|
-
type InvalidIdentifierType = 'InvalidIdentifier';
|
|
118
|
-
/**
|
|
119
|
-
* The provided identifier is not valid. An identifier must start with a lowercase letter, be between 2 and 100 characters long and use only alphanumeric characters.
|
|
120
|
-
*/
|
|
121
|
-
export declare class InvalidIdentifierError extends BaseApiError<400, InvalidIdentifierType, 'The provided identifier is not valid. An identifier must start with a lowercase letter, be between 2 and 100 characters long and use only alphanumeric characters.'> {
|
|
122
|
-
constructor(message: string, error?: Error, id?: string);
|
|
123
|
-
}
|
|
124
|
-
type RelationConflictType = 'RelationConflict';
|
|
125
|
-
/**
|
|
126
|
-
* The resource is related with a different resource that the one referenced in the request. This is usually caused when providing two resource identifiers that aren\'t linked together.
|
|
127
|
-
*/
|
|
128
|
-
export declare class RelationConflictError extends BaseApiError<409, RelationConflictType, 'The resource is related with a different resource that the one referenced in the request. This is usually caused when providing two resource identifiers that aren\'t linked together.'> {
|
|
129
|
-
constructor(message: string, error?: Error, id?: string);
|
|
130
|
-
}
|
|
131
|
-
type ReferenceConstraintType = 'ReferenceConstraint';
|
|
132
|
-
/**
|
|
133
|
-
* The resource cannot be deleted because it\'s referenced by another resource
|
|
134
|
-
*/
|
|
135
|
-
export declare class ReferenceConstraintError extends BaseApiError<409, ReferenceConstraintType, 'The resource cannot be deleted because it\'s referenced by another resource'> {
|
|
136
|
-
constructor(message: string, error?: Error, id?: string);
|
|
137
|
-
}
|
|
138
|
-
type ResourceLockedConflictType = 'ResourceLockedConflict';
|
|
139
|
-
/**
|
|
140
|
-
* The resource is current locked and cannot be operated on until the lock is released.
|
|
141
|
-
*/
|
|
142
|
-
export declare class ResourceLockedConflictError extends BaseApiError<409, ResourceLockedConflictType, 'The resource is current locked and cannot be operated on until the lock is released.'> {
|
|
143
|
-
constructor(message: string, error?: Error, id?: string);
|
|
144
|
-
}
|
|
145
|
-
type ReferenceNotFoundType = 'ReferenceNotFound';
|
|
146
|
-
/**
|
|
147
|
-
* The provided resource reference is missing. This is usually caused when providing an invalid id inside the payload of a request.
|
|
148
|
-
*/
|
|
149
|
-
export declare class ReferenceNotFoundError extends BaseApiError<400, ReferenceNotFoundType, 'The provided resource reference is missing. This is usually caused when providing an invalid id inside the payload of a request.'> {
|
|
150
|
-
constructor(message: string, error?: Error, id?: string);
|
|
151
|
-
}
|
|
152
|
-
type InvalidQueryType = 'InvalidQuery';
|
|
153
|
-
/**
|
|
154
|
-
* The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource.
|
|
155
|
-
*/
|
|
156
|
-
export declare class InvalidQueryError extends BaseApiError<400, InvalidQueryType, 'The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource.'> {
|
|
157
|
-
constructor(message: string, error?: Error, id?: string);
|
|
158
|
-
}
|
|
159
|
-
type RuntimeType = 'Runtime';
|
|
160
|
-
/**
|
|
161
|
-
* An error happened during the execution of a runtime (bot or integration).
|
|
162
|
-
*/
|
|
163
|
-
export declare class RuntimeError extends BaseApiError<400, RuntimeType, 'An error happened during the execution of a runtime (bot or integration).'> {
|
|
164
|
-
constructor(message: string, error?: Error, id?: string);
|
|
165
|
-
}
|
|
166
|
-
type AlreadyExistsType = 'AlreadyExists';
|
|
167
|
-
/**
|
|
168
|
-
* The record attempted to be created already exists.
|
|
169
|
-
*/
|
|
170
|
-
export declare class AlreadyExistsError extends BaseApiError<409, AlreadyExistsType, 'The record attempted to be created already exists.'> {
|
|
171
|
-
constructor(message: string, error?: Error, id?: string);
|
|
172
|
-
}
|
|
173
|
-
type RateLimitedType = 'RateLimited';
|
|
174
|
-
/**
|
|
175
|
-
* The request has been rate limited.
|
|
176
|
-
*/
|
|
177
|
-
export declare class RateLimitedError extends BaseApiError<429, RateLimitedType, 'The request has been rate limited.'> {
|
|
178
|
-
constructor(message: string, error?: Error, id?: string);
|
|
179
|
-
}
|
|
180
|
-
type PaymentRequiredType = 'PaymentRequired';
|
|
181
|
-
/**
|
|
182
|
-
* A payment is required to perform this request.
|
|
183
|
-
*/
|
|
184
|
-
export declare class PaymentRequiredError extends BaseApiError<402, PaymentRequiredType, 'A payment is required to perform this request.'> {
|
|
185
|
-
constructor(message: string, error?: Error, id?: string);
|
|
186
|
-
}
|
|
187
|
-
type QuotaExceededType = 'QuotaExceeded';
|
|
188
|
-
/**
|
|
189
|
-
* The request exceeds the allowed quota. Quotas are a soft limit that can be increased.
|
|
190
|
-
*/
|
|
191
|
-
export declare class QuotaExceededError extends BaseApiError<403, QuotaExceededType, 'The request exceeds the allowed quota. Quotas are a soft limit that can be increased.'> {
|
|
192
|
-
constructor(message: string, error?: Error, id?: string);
|
|
193
|
-
}
|
|
194
|
-
type LimitExceededType = 'LimitExceeded';
|
|
195
|
-
/**
|
|
196
|
-
* The request exceeds the allowed limit. Limits are a hard limit that cannot be increased.
|
|
197
|
-
*/
|
|
198
|
-
export declare class LimitExceededError extends BaseApiError<413, LimitExceededType, 'The request exceeds the allowed limit. Limits are a hard limit that cannot be increased.'> {
|
|
199
|
-
constructor(message: string, error?: Error, id?: string);
|
|
200
|
-
}
|
|
201
|
-
type BreakingChangesType = 'BreakingChanges';
|
|
202
|
-
/**
|
|
203
|
-
* Request payload contains breaking changes which is not allowed for this resource without a version increment.
|
|
204
|
-
*/
|
|
205
|
-
export declare class BreakingChangesError extends BaseApiError<400, BreakingChangesType, 'Request payload contains breaking changes which is not allowed for this resource without a version increment.'> {
|
|
206
|
-
constructor(message: string, error?: Error, id?: string);
|
|
207
|
-
}
|
|
208
|
-
export type ErrorType = 'Unknown' | 'Internal' | 'Unauthorized' | 'Forbidden' | 'PayloadTooLarge' | 'InvalidPayload' | 'UnsupportedMediaType' | 'MethodNotFound' | 'ResourceNotFound' | 'InvalidJsonSchema' | 'InvalidDataFormat' | 'InvalidIdentifier' | 'RelationConflict' | 'ReferenceConstraint' | 'ResourceLockedConflict' | 'ReferenceNotFound' | 'InvalidQuery' | 'Runtime' | 'AlreadyExists' | 'RateLimited' | 'PaymentRequired' | 'QuotaExceeded' | 'LimitExceeded' | 'BreakingChanges';
|
|
209
|
-
export type ApiError = UnknownError | InternalError | UnauthorizedError | ForbiddenError | PayloadTooLargeError | InvalidPayloadError | UnsupportedMediaTypeError | MethodNotFoundError | ResourceNotFoundError | InvalidJsonSchemaError | InvalidDataFormatError | InvalidIdentifierError | RelationConflictError | ReferenceConstraintError | ResourceLockedConflictError | ReferenceNotFoundError | InvalidQueryError | RuntimeError | AlreadyExistsError | RateLimitedError | PaymentRequiredError | QuotaExceededError | LimitExceededError | BreakingChangesError;
|
|
210
|
-
export declare const errorFrom: (err: unknown) => ApiError;
|
|
211
|
-
export {};
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { AxiosInstance } from 'axios';
|
|
2
|
-
import { toAxiosRequest } from './to-axios';
|
|
3
|
-
import * as addParticipant from './operations/addParticipant';
|
|
4
|
-
import * as createConversation from './operations/createConversation';
|
|
5
|
-
import * as deleteConversation from './operations/deleteConversation';
|
|
6
|
-
import * as getConversation from './operations/getConversation';
|
|
7
|
-
import * as getParticipant from './operations/getParticipant';
|
|
8
|
-
import * as listConversationMessages from './operations/listConversationMessages';
|
|
9
|
-
import * as listConversations from './operations/listConversations';
|
|
10
|
-
import * as listParticipants from './operations/listParticipants';
|
|
11
|
-
import * as listenConversation from './operations/listenConversation';
|
|
12
|
-
import * as removeParticipant from './operations/removeParticipant';
|
|
13
|
-
import * as createMessage from './operations/createMessage';
|
|
14
|
-
import * as deleteMessage from './operations/deleteMessage';
|
|
15
|
-
import * as getMessage from './operations/getMessage';
|
|
16
|
-
import * as createUser from './operations/createUser';
|
|
17
|
-
import * as deleteUser from './operations/deleteUser';
|
|
18
|
-
import * as getUser from './operations/getUser';
|
|
19
|
-
import * as updateUser from './operations/updateUser';
|
|
20
|
-
import * as createEvent from './operations/createEvent';
|
|
21
|
-
import * as getEvent from './operations/getEvent';
|
|
22
|
-
import * as createFile from './operations/createFile';
|
|
23
|
-
export * from './models';
|
|
24
|
-
export * as addParticipant from './operations/addParticipant';
|
|
25
|
-
export * as createConversation from './operations/createConversation';
|
|
26
|
-
export * as deleteConversation from './operations/deleteConversation';
|
|
27
|
-
export * as getConversation from './operations/getConversation';
|
|
28
|
-
export * as getParticipant from './operations/getParticipant';
|
|
29
|
-
export * as listConversationMessages from './operations/listConversationMessages';
|
|
30
|
-
export * as listConversations from './operations/listConversations';
|
|
31
|
-
export * as listParticipants from './operations/listParticipants';
|
|
32
|
-
export * as listenConversation from './operations/listenConversation';
|
|
33
|
-
export * as removeParticipant from './operations/removeParticipant';
|
|
34
|
-
export * as createMessage from './operations/createMessage';
|
|
35
|
-
export * as deleteMessage from './operations/deleteMessage';
|
|
36
|
-
export * as getMessage from './operations/getMessage';
|
|
37
|
-
export * as createUser from './operations/createUser';
|
|
38
|
-
export * as deleteUser from './operations/deleteUser';
|
|
39
|
-
export * as getUser from './operations/getUser';
|
|
40
|
-
export * as updateUser from './operations/updateUser';
|
|
41
|
-
export * as createEvent from './operations/createEvent';
|
|
42
|
-
export * as getEvent from './operations/getEvent';
|
|
43
|
-
export * as createFile from './operations/createFile';
|
|
44
|
-
export type ClientProps = {
|
|
45
|
-
toAxiosRequest: typeof toAxiosRequest;
|
|
46
|
-
};
|
|
47
|
-
export declare class Client {
|
|
48
|
-
private axiosInstance;
|
|
49
|
-
private props;
|
|
50
|
-
constructor(axiosInstance: AxiosInstance, props?: Partial<ClientProps>);
|
|
51
|
-
readonly addParticipant: (input: addParticipant.AddParticipantInput) => Promise<addParticipant.AddParticipantResponse>;
|
|
52
|
-
readonly createConversation: (input: createConversation.CreateConversationInput) => Promise<createConversation.CreateConversationResponse>;
|
|
53
|
-
readonly deleteConversation: (input: deleteConversation.DeleteConversationInput) => Promise<deleteConversation.DeleteConversationResponse>;
|
|
54
|
-
readonly getConversation: (input: getConversation.GetConversationInput) => Promise<getConversation.GetConversationResponse>;
|
|
55
|
-
readonly getParticipant: (input: getParticipant.GetParticipantInput) => Promise<getParticipant.GetParticipantResponse>;
|
|
56
|
-
readonly listConversationMessages: (input: listConversationMessages.ListConversationMessagesInput) => Promise<listConversationMessages.ListConversationMessagesResponse>;
|
|
57
|
-
readonly listConversations: (input: listConversations.ListConversationsInput) => Promise<listConversations.ListConversationsResponse>;
|
|
58
|
-
readonly listParticipants: (input: listParticipants.ListParticipantsInput) => Promise<listParticipants.ListParticipantsResponse>;
|
|
59
|
-
readonly listenConversation: (input: listenConversation.ListenConversationInput) => Promise<listenConversation.ListenConversationResponse>;
|
|
60
|
-
readonly removeParticipant: (input: removeParticipant.RemoveParticipantInput) => Promise<removeParticipant.RemoveParticipantResponse>;
|
|
61
|
-
readonly createMessage: (input: createMessage.CreateMessageInput) => Promise<createMessage.CreateMessageResponse>;
|
|
62
|
-
readonly deleteMessage: (input: deleteMessage.DeleteMessageInput) => Promise<deleteMessage.DeleteMessageResponse>;
|
|
63
|
-
readonly getMessage: (input: getMessage.GetMessageInput) => Promise<getMessage.GetMessageResponse>;
|
|
64
|
-
readonly createUser: (input: createUser.CreateUserInput) => Promise<createUser.CreateUserResponse>;
|
|
65
|
-
readonly deleteUser: (input: deleteUser.DeleteUserInput) => Promise<deleteUser.DeleteUserResponse>;
|
|
66
|
-
readonly getUser: (input: getUser.GetUserInput) => Promise<getUser.GetUserResponse>;
|
|
67
|
-
readonly updateUser: (input: updateUser.UpdateUserInput) => Promise<updateUser.UpdateUserResponse>;
|
|
68
|
-
readonly createEvent: (input: createEvent.CreateEventInput) => Promise<createEvent.CreateEventResponse>;
|
|
69
|
-
readonly getEvent: (input: getEvent.GetEventInput) => Promise<getEvent.GetEventResponse>;
|
|
70
|
-
readonly createFile: (input: createFile.CreateFileInput) => Promise<createFile.CreateFileResponse>;
|
|
71
|
-
}
|