app-v3-scripts-editor 1.37.1 → 1.37.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,6 @@
1
1
  import { default as React } from 'react';
2
- import { IUploadAudioResponse } from '../../../../../services/types';
3
2
  interface UploadAudioButtonProps {
4
- onUploadSuccess?: (response: IUploadAudioResponse) => void;
3
+ onUpload?: (file: File) => Promise<void>;
5
4
  fieldName?: string;
6
5
  disabled?: boolean;
7
6
  beforeUpload?: () => void;
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ type AudioConnectorContainerProps = {};
3
+ declare const AudioConnectorContainer: React.FC<AudioConnectorContainerProps>;
4
+ export default AudioConnectorContainer;
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ type CreateConnectorContainerProps = {};
3
+ declare const CreateConnectorContainer: React.FC<CreateConnectorContainerProps>;
4
+ export default CreateConnectorContainer;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ type DeleteConnectorContainerProps = {
3
+ id: number;
4
+ };
5
+ declare const DeleteConnectorContainer: React.FC<DeleteConnectorContainerProps>;
6
+ export default DeleteConnectorContainer;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ type UpdateConnectorContainerProps = {
3
+ CONNECTOR_ID: number;
4
+ };
5
+ declare const UpdateConnectorContainer: React.FC<UpdateConnectorContainerProps>;
6
+ export default UpdateConnectorContainer;
@@ -0,0 +1,12 @@
1
+ import { FormInstance } from 'antd';
2
+ import { VOICE_TYPE } from '../../../../../../constants/common';
3
+ type ConnectorFormValues = {
4
+ title: string;
5
+ voice_type: VOICE_TYPE;
6
+ raw_file?: File;
7
+ };
8
+ type ConnectorFormProps = {
9
+ form: FormInstance<ConnectorFormValues>;
10
+ };
11
+ export declare const ConnectorForm: React.FC<ConnectorFormProps>;
12
+ export {};
@@ -1,7 +1,6 @@
1
1
  import { default as React } from 'react';
2
- import { IUploadAudioResponse } from '../../../../services';
3
2
  interface AudioRecorderProps {
4
- onFinishRecord?: (response: IUploadAudioResponse) => void;
3
+ onFinishRecord?: (file: File) => Promise<void> | void;
5
4
  onStartRecord?: () => void;
6
5
  disabled?: boolean;
7
6
  }
@@ -184,3 +184,7 @@ export declare const CALLBOT_STATUS: {
184
184
  RUN: string;
185
185
  DONE: string;
186
186
  };
187
+ export declare enum VOICE_TYPE {
188
+ VOICE_AI = "voice_ai",
189
+ VOICE_RECORD = "voice_record"
190
+ }
@@ -0,0 +1,9 @@
1
+ import { AxiosError } from 'axios';
2
+ import { IConnector } from '../types';
3
+ interface CreateConnectorParams {
4
+ title: string;
5
+ voice_type: string;
6
+ raw_file?: File;
7
+ }
8
+ declare const useCreateConnector: () => import('@tanstack/react-query').UseMutationResult<IConnector, AxiosError<unknown, any>, CreateConnectorParams, unknown>;
9
+ export default useCreateConnector;
@@ -0,0 +1,7 @@
1
+ import { AxiosError, AxiosResponse } from 'axios';
2
+ import { IConnector } from '../types';
3
+ type Variables = {
4
+ CONNECTOR_ID: number;
5
+ };
6
+ declare function useDeleteConnector(): import('@tanstack/react-query').UseMutationResult<AxiosResponse<IConnector, any>, AxiosError<unknown, any>, Variables, unknown>;
7
+ export default useDeleteConnector;
@@ -0,0 +1,8 @@
1
+ import { AxiosError, AxiosResponse } from 'axios';
2
+ import { IConnector, IPaginationInputs } from '../../lib';
3
+ export declare const getConnectorDetailQueryKeyPrefix = "get_connector_detail_key";
4
+ declare function useGetConnectorDetail({ CONNECTOR_ID, enabled, }: IPaginationInputs & {
5
+ CONNECTOR_ID: number;
6
+ enabled?: boolean;
7
+ }): import('@tanstack/react-query').UseQueryResult<AxiosResponse<IConnector, any>, AxiosError<unknown, any>>;
8
+ export default useGetConnectorDetail;
@@ -0,0 +1,8 @@
1
+ import { AxiosError, AxiosResponse } from 'axios';
2
+ import { IConnector, IPagination, IPaginationInputs } from '../../lib';
3
+ export declare const getConnectorQueryKeyPrefix = "get_list_connector_key";
4
+ export declare const getConnectorQueryKey: (COMPANY_ID?: string, SCENARIO_ID?: string, options?: Pick<IPaginationInputs, "pagination" | "currentFilters">) => readonly unknown[];
5
+ declare function useGetListConnector({ currentFilters, pagination, enabled, }: IPaginationInputs & {
6
+ enabled?: boolean;
7
+ }): import('@tanstack/react-query').UseQueryResult<AxiosResponse<IPagination<IConnector>, any>, AxiosError<unknown, any>>;
8
+ export default useGetListConnector;
@@ -0,0 +1,10 @@
1
+ import { AxiosError } from 'axios';
2
+ import { IConnector } from '../types';
3
+ interface UpdateConnectorParams {
4
+ CONNECTOR_ID: number;
5
+ title: string;
6
+ voice_type: string;
7
+ raw_file?: File;
8
+ }
9
+ declare const useUpdateConnector: () => import('@tanstack/react-query').UseMutationResult<IConnector, AxiosError<unknown, any>, UpdateConnectorParams, unknown>;
10
+ export default useUpdateConnector;
@@ -1,8 +1,8 @@
1
1
  import { Dayjs } from 'dayjs';
2
2
  import { BlockType } from '../lib';
3
3
  import { AI_MODEL } from '../lib/constants/ai-model';
4
- import { NODE_STATUS } from './../lib/constants/common';
5
4
  import { DATA_TYPE_PROPERTY, DATA_TYPE_PROPERTY_V2 } from '../lib/constants/common';
5
+ import { NODE_STATUS, VOICE_TYPE } from './../lib/constants/common';
6
6
  export interface INodeBaseType {
7
7
  output?: IOutput["outputs"];
8
8
  variables?: {
@@ -443,3 +443,18 @@ export type IPropertyCallCampaignCustomer = {
443
443
  slug?: string;
444
444
  type?: DATA_TYPE_PROPERTY;
445
445
  };
446
+ export interface IConnector {
447
+ id?: number;
448
+ scenario?: string;
449
+ title?: string;
450
+ voice_type?: VOICE_TYPE;
451
+ voice_ai?: string;
452
+ file?: {
453
+ id?: number;
454
+ file_name?: string;
455
+ raw_file?: string;
456
+ file?: string;
457
+ transcript?: string;
458
+ transcript_text?: string;
459
+ };
460
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "app-v3-scripts-editor",
3
3
  "private": false,
4
- "version": "1.37.1",
4
+ "version": "1.37.2",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/ucall-asia/app-v3-scripts-editor.git"
@@ -1,4 +0,0 @@
1
- import { default as React } from 'react';
2
- type AudioConjunctionContainerProps = {};
3
- declare const AudioConjunctionContainer: React.FC<AudioConjunctionContainerProps>;
4
- export default AudioConjunctionContainer;
@@ -1,4 +0,0 @@
1
- import { default as React } from 'react';
2
- type CreateConjunctionContainerProps = {};
3
- declare const CreateConjunctionContainer: React.FC<CreateConjunctionContainerProps>;
4
- export default CreateConjunctionContainer;