import { Caption, CommonJsonTemplate } from '@minta/template-utils'; import { Brand, CaptionField, CustomizeMintaVideo, ExtendSocialPostData, MediaSrcType, MediaType, MintaVideo, MintaVideoFonts, Product, Video, VideoFormat, VideoShareActionsEnum, VideoStatus } from 'types/entities.types'; import { TemplateApiRes } from 'redux/actions/template.actions'; import { ProductMintaVideoSearchResultsState } from 'redux/reducers/product-minta-video-search-results.reducer'; import { CombinedState, Dispatch } from 'redux'; export declare const FETCH_VIDEOS = "[VIDEOS] Fetch Videos"; export declare const SET_VIDEO = "[VIDEOS] Set Video"; export declare const SET_VIDEOS = "[VIDEOS] Set Videos"; export declare const GENERATE_VIDEO = "[VIDEOS] Generate Video"; export declare const UPDATE_VIDEO = "[VIDEOS] Update Video"; export declare const UPDATE_VIDEO_TEMPLATE = "[VIDEOS] Update Video template"; export declare const CHECK_VIDEO_STATUS = "[VIDEOS] Check Video Status"; export declare const SET_VIDEO_STATUS = "[VIDEOS] Set Video Status"; export declare const SET_MINTA_VIDEO_ERROR = "[VIDEOS] Set Minta Video Error"; export declare const SET_MINTA_VIDEO_VALIDATION_ERROR = "[VIDEOS] Set Minta Video Validation Error"; export declare const SET_MINTA_VIDEO_DOWNLOADED_COUNT = "[VIDEOS] Set Minta Video Downloaded Count"; export declare const SET_MINTA_IMAGE_DOWNLOADED_COUNT = "[VIDEOS] Set Minta Image Downloaded Count"; export declare const CHECK_VIDEO_FILE = "[VIDEOS] Check Video file"; export declare const FETCH_PRODUCT_MINTA_VIDEOS = "[VIDEOS] Fetch Product Minta Videos"; export declare const UPDATE_PRODUCT_MINTA_VIDEO_SEARCH_RESULTS = "[VIDEOS] Update Product Minta Video Search Results"; export declare const INCREASE_PRODUCT_MINTA_VIDEO_SEARCH_RESULTS_TOTAL_COUNT = "[VIDEOS] Increase Product Minta Video Search Results Total Count"; export declare const RESET_PRODUCT_MINTA_VIDEO_SEARCH_RESULTS = "[VIDEOS] Reset Product Minta Video Search Results"; export declare const FETCH_VIDEO_BY_ID = "[VIDEOS] Fetch Video By Id"; export declare const FETCH_VIDEO_BY_IDS = "[VIDEOS] Fetch Video By Ids"; export declare const SHARE_VIDEO_MODAL_SHOWN = "[VIDEOS] Share Video Modal Shown"; export declare const DOWNLOAD_SHARE_VIDEO = "[VIDEOS] Download or Share Video"; export declare const INCREMENT_VIDEO_ENGAGEMENT = "[VIDEOS] Increment Video Engagement"; export declare const INCREMENT_VIDEO_ENGAGEMENT_SHOP_EVENT = "[VIDEOS] Increment Video Engagement Shop Event"; export declare const FETCH_MINTA_VIDEO_CAPTION_FIELDS = "[Videos] Fetch Minta Video Caption Fields"; export declare const SET_MINTA_VIDEO_CAPTION_FIELDS = "[Videos] Set Minta Video Caption Fields"; export declare const CUSTOMIZE_MINTA_VIDEO = "[Videos] Customize Minta Video Captions"; export declare const UPDATE_MINTA_VIDEO = "[Videos] Update Minta Video"; export declare const RECOVERY_MINTA_VIDEO = "[Videos] Recovery Minta Video"; export declare const UPDATE_MINTA_VIDEO_IS_FAVORITE = "[Videos] Update Minta Video IsFavorite"; export declare const FETCH_ALL_FAVORITE_VIDEOS = "[Videos] Fetch all favorite videos"; export declare const SET_CUSTOMIZE_MINTA_VIDEO_BY_KEY = "[Videos] Set Customize Minta Video By Key"; export declare const CLEAR_CUSTOMIZE_MINTA_VIDEO_BY_KEY = "[Videos] Clear Customize Minta Video By Key"; export declare const CLEAR_CUSTOMIZE_MINTA_VIDEO = "[Videos] Clear Customize Minta Video"; export declare const SET_MINTA_VIDEO_AUTO_PLAY = "[Videos] Set Minta Video Auto Play"; export declare const UPDATE_LOTTIE_VIDEO = "[Videos] Update Lottie Video"; export declare const GENERATE_VIDEO_BY_TEMPLATE = "[Videos] Generate minta video by template"; export declare const COPY_MINTA_VIDEO_FOR_EDITOR = "[Videos] Copy minta video for editor"; export declare const REMOVE_VIDEO_FROM_THE_STATE = "[Videos] Remove video from the state"; export declare type MintaVideosApiResponse = { docs: MintaVideoRes[]; totalDocs: number; }; export interface UpdateVideoPayload { videoId: string; data: MintaVideoRes; } export interface SetVideoStatusPayload { format: VideoFormat; videoId: string; status: VideoStatus; } export interface SetMintaVideoErrorPayload { id: string; error: boolean; } export interface SetMintaVideoOrImageDownloadedCountPayload { id: string; downloadedCount: number; } export interface UpdateProductMintaVideoSearchResultsPayload extends ProductMintaVideoSearchResultsState { offset: number; } export interface VideoRes extends Omit { error?: {}; } export interface MintaVideoRes extends Omit { _id: string; videos: VideoRes[]; hasError: boolean; useCase: string; productsIds: string[]; templates: TemplateApiRes['template'][]; customizeMintaVideo: CustomizeMintaVideo; customizeMintaVideoByScene: { [key: string]: CustomizeMintaVideo; }; } export interface DownloadSharePayload { eventAction: VideoShareActionsEnum; videoId: string; format: VideoFormat; mintaVideo?: MintaVideo; hasActiveSubscription: boolean; businessAuthId: string; businessAuthType: string; extend?: ExtendSocialPostData; shouldReduceCredit: boolean; creditsLeft: number; mediaType: MediaType; imageSuffix?: string; userImageId?: string; mediaSrcType?: MediaSrcType; metaData?: any; } export interface SetMintaVideoCaptionFieldsPayload { id: string; captionFields: CaptionField[]; } export interface CreateVideoEngagementShopEvent { businessAuthId: string; topic: string; videoId?: string; mediaType: MediaType; mediaSrcType?: MediaSrcType; metaData?: any; action: VideoShareActionsEnum; socialPost?: string; businessAuthType: string; productIds?: string[]; userImageId?: string; format: string; } export interface SetMintaVideoAutoPlayPayload { id: string; value: boolean; } export declare enum CustomizeKey { MUSIC = "music", COLORS = "colors", CAPTIONS = "captions", FONTS = "fonts", MEDIA = "media", PRODUCTS = "products", VALIDATION_RESULT = "validationResult", INJECTING = "injecting", VISIBILITY = "visibility", LOGO = "logo", INTRO = "intro", OUTRO = "outro", FORMAT = "format" } export interface CustomizeMintaVideoPayload extends CustomizeMintaVideo { id: string; key: CustomizeKey; sceneId?: number; } export interface ClearCustomizeMintaVideoByKeyPayload extends CustomizeMintaVideo { id: string; key: CustomizeKey; sceneId?: number; } export interface ClearCustomizeMintaVideoPayload { id: string; } export interface RemoveVideoByIdPayload { videoId: string; } export declare const setVideo: (payload: MintaVideoRes) => { type: string; payload: MintaVideoRes; }; export declare const setVideos: (payload: MintaVideoRes[]) => { type: string; payload: MintaVideoRes[]; }; export declare const updateVideo: (payload: UpdateVideoPayload) => { type: string; payload: UpdateVideoPayload; }; export declare const updateVideoTemplate: (payload: UpdateVideoPayload) => { type: string; payload: UpdateVideoPayload; }; export declare const setVideoStatus: (payload: unknown) => { type: string; payload: unknown; }; export declare const setMintaVideoError: (payload: SetMintaVideoErrorPayload) => { type: string; payload: SetMintaVideoErrorPayload; }; export declare const setMintaVideoValidationError: (payload: SetMintaVideoErrorPayload) => { type: string; payload: SetMintaVideoErrorPayload; }; export declare const setMintaVideoDownloadedCount: (payload: SetMintaVideoOrImageDownloadedCountPayload) => { type: string; payload: SetMintaVideoOrImageDownloadedCountPayload; }; export declare const setMintaImageDownloadedCount: (payload: SetMintaVideoOrImageDownloadedCountPayload) => { type: string; payload: SetMintaVideoOrImageDownloadedCountPayload; }; export declare const updateProductMintaVideoSearchResults: (payload: UpdateProductMintaVideoSearchResultsPayload) => { type: string; payload: UpdateProductMintaVideoSearchResultsPayload; }; export declare const increaseProductMintaVideoSearchResultsTotalCount: (payload: any) => { type: string; payload: any; }; export declare const resetProductMintaVideoSearchResults: (payload: void) => { type: string; payload: void; }; export declare const setMintaVideoCaptionFields: (payload: SetMintaVideoCaptionFieldsPayload) => { type: string; payload: SetMintaVideoCaptionFieldsPayload; }; export declare const downloadShareVideo: (payload: DownloadSharePayload) => { type: string; payload: DownloadSharePayload; }; export declare const ShareVideoModalShown: (payload: void) => { type: string; payload: void; }; export declare const updateMintaVideoNetworkLabel: (id: string) => string; export declare const updateMintaVideoNetworkLabelNotCustomize: (id: string) => string; export declare const fetchMintaVideoCaptionFieldsNetworkLabel: (id: string) => string; export declare const setCustomizeVideoByKey: (payload: CustomizeMintaVideoPayload) => { type: string; payload: CustomizeMintaVideoPayload; }; export declare const clearCustomizeVideoByKey: (payload: ClearCustomizeMintaVideoByKeyPayload) => { type: string; payload: ClearCustomizeMintaVideoByKeyPayload; }; export declare const clearCustomizeVideo: (payload: ClearCustomizeMintaVideoPayload) => { type: string; payload: ClearCustomizeMintaVideoPayload; }; export declare const setMintaVideoAutoPlay: (payload: SetMintaVideoAutoPlayPayload) => { type: string; payload: SetMintaVideoAutoPlayPayload; }; export declare const removeVideoFromTheStateById: (payload: RemoveVideoByIdPayload) => { type: string; payload: RemoveVideoByIdPayload; }; export declare const generateMintaVideoFormats: (videoId: string, retry?: number) => any; export declare const checkVideoStatus: (video: any, videoId: string) => any; export declare const checkVideoFile: (video: any, videoId: string, retry?: number) => any; export declare const recoveryMintaVideo: (videoId: string, templates: TemplateApiRes['template'][], videos: Video[]) => any; export interface CustomizeMintaVideoAnalyticsData { videoId: string; templateName: string; isCustomizedColors: boolean; isCustomizedCaptions: boolean; isCustomizedFonts: boolean; isCustomizedAudio: boolean; isCustomizedMedia: boolean; isCustomizedTemplate?: boolean; isCustomizedIntro?: boolean; isCustomizedOutro?: boolean; isCustomizedLogo?: boolean; customizedTemplateId?: string; colorsInputMethod?: 'suggested' | 'custom'; colors?: string[]; captions?: Caption[]; fontsIds?: string[]; fontsName?: string[]; numOfProducts?: number; numberOfMyUploadImages?: number; numberOfCreativeImages?: number; numberOfProductImages?: number; numberOfUnshplashImages?: number; audio?: string | undefined; audioName?: string | undefined; isAudioPro?: boolean | undefined; } export interface CustomizeMintaVideoUpdateData { colors?: string[]; captions?: Caption[]; fonts?: MintaVideoFonts; products?: Product[]; images?: string[]; productsIds?: string[]; audio?: string | undefined; isAudioPro?: boolean | undefined; fontValidationResults?: any; isCustomTemplate?: boolean; templateName?: string; templateId?: string; logo?: string; format?: string; } export declare const applyVideoCustomizationPerScene: (mintaVideo: any, chosenScene: any) => Promise<{ validationFailed: boolean; newTemplates: CommonJsonTemplate[]; finalVideo: any; customizeMintaVideoUpdateData: CustomizeMintaVideoUpdateData; customizeMintaVideoAnalyticsData: CustomizeMintaVideoAnalyticsData; } | undefined>; export declare const applyVideoCustomization: (mintaVideoId: string, requireValidation?: boolean) => (dispatch: Dispatch, getState: CombinedState) => Promise; export declare const updateCustomizeMintaVideo: (videoId: string, templates: TemplateApiRes['template'][], mintaVideo: any, customizeMintaVideoUpdateData: CustomizeMintaVideoUpdateData, customizeMintaVideoAnalyticsData?: CustomizeMintaVideoAnalyticsData | undefined) => any; export declare const updateMintaVideo: (videoId: string, data: any) => any; export declare const customizeVideoWhenChosenDesignTemplate: (businessAuthData: any, mintaVideo: any, audioToInject: any, newFontsGlyphs: any, newChosenTemplate: any, dependentUseCastToChangeTemplate: string | undefined, relevantProducts: Product[] | undefined) => { newTemplatesToCustomize: any[]; customizeMintaVideoUpdateData: { templateName: any; templateId: any; isCustomTemplate: boolean; }; customizeMintaVideoAnalyticsData: CustomizeMintaVideoAnalyticsData; }; export declare const customizeVideoMintaVideosByTemplate: (videoData: any, customizeMintaVideoAnalyticsData: CustomizeMintaVideoAnalyticsData, callback: (videoId: string) => void) => any; export declare const uploadLogoToS3: any; export declare const updateCustomizeVideoWithLogo: (businessId: string, brand: Brand | undefined, logoFile: File, logoPalette: any, mintaVideoId: string) => (dispatch: Dispatch) => Promise; export declare const duplicateVideoForEditVideo: (mintaVideoId: string, callback?: ((videoId: string) => void) | undefined, customizeMintaVideo?: any, customizeMintaVideoByScene?: { [key: string]: any; } | undefined, templates?: CommonJsonTemplate[] | undefined) => any;