import { Caption, CommonJsonTemplate, IdemooSceneInterface, IFontValidationResult, LottieSceneInterface, InjectionRule, Media, MediaRule, InjectedData } from '@minta/template-utils'; import { VideoRenderingError, Error } from 'types/common.types'; import { CommentsForDesignTemplate, TemplateApiRes } from 'redux/actions/template.actions'; import { FeatureId } from 'redux/selectors/payment.selectors'; import { CaptionsFormErrors } from 'components/studio/text/edit-text'; import { ImagesToInject } from 'components/studio/media/edit-media'; export declare enum UseCaseBehaviorEnum { NEW_ARRIVAL = "NEW_ARRIVAL", SALE = "SALE", SALE_WITH_ONLINE_PRODUCTS_WITH_FALLBACK_NEW_ARRIVAL = "SALE_WITH_ONLINE_PRODUCTS_WITH_FALLBACK_NEW_ARRIVAL", BEST_SELLERS = "BEST_SELLERS", BEST_SELLERS_WITH_ONLINE_PRODUCTS_WITH_FALLBACK_NEW_ARRIVAL = "BEST_SELLERS_WITH_ONLINE_PRODUCTS_WITH_FALLBACK_NEW_ARRIVAL", POPULAR = "POPULAR", POPULAR_WITH_ONLINE_PRODUCTS_WITH_FALLBACK_NEW_ARRIVAL = "POPULAR_WITH_ONLINE_PRODUCTS_WITH_FALLBACK_NEW_ARRIVAL", LEAST_SOLD = "LEAST_SOLD", LEAST_SOLD_WITH_ONLINE_PRODUCTS_WITH_FALLBACK_NEW_ARRIVAL = "LEAST_SOLD_WITH_ONLINE_PRODUCTS_WITH_FALLBACK_NEW_ARRIVAL", ONLINE = "ONLINE", GENERAL = "GENERAL", ONLINE_WITH_FALLBACK_NEW_ARRIVAL = "ONLINE_WITH_FALLBACK_NEW_ARRIVAL", FEEDBACK = "FEEDBACK" } export declare enum UseCaseProductBehaviorEnum { PRODUCT_FEEDBACK = "PRODUCT_FEEDBACK" } export declare enum EcommCampaignEnum { ALL_TEMPLATES = "allTemplates", GIVEN_TEMPLATES = "given_templates", NORMAL = "normal" } export declare enum EcommCampaignSourceEnum { BEST_FOR_YOU = "bestForYou", EXPLORE = "explore", SEARCH = "search", TEMPLATE_PREVIEW = "templatePreview", AUTOPOST_PREVIEW = "autopostPreview", EDITOR = "editor" } export interface UseCase { id: string; name: string; slug: string; behavior: UseCaseBehaviorEnum; productBehavior: UseCaseBehaviorEnum; hasNewVideos?: boolean; hasNoVideos: boolean; recentCampaignId?: string; error?: Error; order: number; isEnabled: boolean; description: string; errorIcon: string; icon: string; missingStoreDataError?: { title: string; subTitle: string; actionLink: [{ url: string; label: string; businessAuthType: string; }]; }; assistantTitle: string; assistantDescription: string; videoInfo: string; businessAuthTypes: string[]; disabledSearch?: boolean; neededPermissions?: [{ scope: string; iconUrl: string; title: string; subTitle: string; actionLabel: string; businessAuthType: string; }]; neededBulkApi: boolean; color: string; onlyWithProduct?: boolean; renderDelay?: number; isSupportMulti?: boolean; previewTemplatesIds: Array; } export declare type ThemeColors = [string, string, string, string] | []; export declare type ThemeFonts = [string, string]; export declare type LogoPalette = [string, string, string, string, string, string, string, string, string, string, string, string]; export interface Template { id: string; name: string; label: string; videoType: VideoType; thumbnail: string; isSupportMultiProducts: boolean; idomooJson: CommonJsonTemplate; format: VideoFormat; } export interface VideoSignature { isEnabled: boolean; templateId: string; templateName: string; scene?: IdemooSceneInterface | LottieSceneInterface; captions: { [specialStringRuleName: string]: { name: string; value: Caption; placeholder: string; label: string; order: number; }; }; brandingColorsPlaceholders?: InjectionRule & any; } export interface Logo { url: string; colors: LogoPalette; } export interface Brand { intro?: VideoSignature; outro?: VideoSignature; themeColors?: { colors: ThemeColors | null; }; themeLogos?: { logos: Logo[]; }; fonts: { userFonts: ThemeFonts | null; }; audio: { isUserWantsAudio: boolean; }; } export interface BusinessAuth { mintaCategories?: string[]; id: string; user: string; type: BusinessAuthTypes; scope: string; shopName: string; business: string; createdAt: string; updatedAt: string; country: string; currencyCode: string; domain: string; email: string; shop_owner: string; subscription: string; subscriptionPlanName: string; subscriptionStatus: string; subscriptionExpirationDate: string; brand: Brand; opportunitySFId?: string; deletedCount: number; primaryDomain: { host: string; }; isPay: boolean; features: { FBPage: boolean; assistant: boolean; }; signIn: boolean; totalCreditsLeft?: number; totalCreditsFreePlan?: number; ianaTimezone: string; totalProducts?: { active?: string; draft?: string; }; bulkApi?: boolean; shopId?: string; } export interface Industry { mintaCategories: string[]; id: string; name: string; defaultMintaCategory: string; last?: boolean; } export interface MintaCategory { id: string; name: string; } export interface Collection { id: string; title: string; image: string; productsCount: string; products?: Product[]; productsIds?: string[]; } export declare enum ProductStatus { DRAFT = "DRAFT", ACTIVE = "ACTIVE" } export interface Product { id: string; title: string; description: string; images: string[]; currency: string; currencySymbol: string; collectionNames: Array; createdAt: string; daysAgo?: string; price: string; priceWithCurrency: string; compareAtPrice: string; compareAtPriceWithCurrency: string; totalSale: number; productUrl: string; status: ProductStatus; minimumPriceWithCurrency?: string; shopUrl?: string; } export interface Review { review: string; reviewId: number | string; reviewer: string; products: Product[]; } export declare enum VideoFormat { WIDE = "wide", SQUARE = "square", VERTICAL = "vertical", PORTRAIT = "portrait" } export declare enum VideoType { PRODUCT = "5da5c9fae7179a02244cd650", INTRO = "5f46414cf3d6ff2ffa2d7fcc", OUTRO = "5f46415bf3d6ff2ffa2d7fcd" } export declare type VideoStatus = 'VIDEO_AVAILABLE' | 'ERROR' | 'RENDERING' | undefined; export declare enum VideoShareActionsEnum { DOWNLOAD = "video_download", SEND_TO_MESSENGER_OPT_IN = "video_send_to_messenger_optIn", POST_TO_FACEBOOK_PAGE = "video_post_to_facebook_page", POST_TO_SHOPIFY_PRODUCT_PAGE = "video_post_to_shopify_product_page", POST_TO_SHOPIFY_PRODUCT_PAGE_DESCRIPTION = "video_post_to_shopify_product_page_description", POST_TO_INSTAGRAM_ACCOUNT = "video_post_to_instagram_account", EMBEDDED_CODE_COPIED = "video_embedded_code_copied", POST_TO_PINTEREST_BOARD = "video_post_to_pinterest_board", POST_TO_TIKTOK = "video_post_to_tiktok", POST_TO_TIKTOK_ADS = "video_post_to_tiktok_ads", NAVIGATOR_NATIVE_SHARE = "navigator_native_share" } export interface Video { url: string; urlStatus: string; previewImage: string; previewImages: ShareImage[]; previewImageStatus: string; format: VideoFormat; error?: VideoRenderingError; status?: VideoStatus; } export interface ShareImage { url: string; urlStatus?: string; suffix?: string; time?: number; id?: string; metaData?: UserImageMetadata; dimensions?: UserImageDimensions; } export interface Videos { [key: string]: Video; } export interface LottieAnimationData { output: { jpg: [{ time: number; }]; }; timeline: { soundtrack: { val: string; }; scenes: LottieSceneInterface[]; }; } export interface BrandingColors { isEditable: boolean; shouldInjectColors: boolean; colors: [{ placeholders: string[]; }]; } export interface CustomizeMintaVideo { music?: { track: AudioTrack; }; colors?: { colorsToInject: string[]; suggestionId: string; }; captions?: { captionFields: CaptionField[]; captionsFormErrors: CaptionsFormErrors; }; fonts?: { fontsIds: string[]; }; media?: { imagesToInject: ImagesToInject[]; }; products?: { sortedProducts: Product[]; }; visibility?: { isHidden: boolean; }; validationResult?: IFontValidationResult[]; injecting?: boolean; logo?: File; intro?: VideoSignature; outro?: VideoSignature; format?: IVideoFormat; } export interface IVideoFormat { formatName: string; templateId: string; } export interface MintaVideo { imagesDimensions?: VideoImageDimension[]; logo?: string; id: string; type: string; videos: Videos; user: string; business: string; campaign: string; useCaseId: string; productsIds: string[]; isPurchased: boolean; products: Product[]; error?: boolean; template: string; templateName: string; introName: string; outroName: string; captionFields: CaptionField[]; productsImages: MediaRule[]; creativeImages: MediaRule[]; captionsUpdateCount: number; productsUpdateCount: number; customizeAudioCount: number; customizeColorsCount: number; customizeFontsCount: number; audio?: string; isAudioPro?: boolean; mtmSource?: EcommCampaignSourceEnum; imageCoverTimeOffset: number; downloadedCount: number; imageDownloadedCount: number; colour?: string[]; brandingColors: BrandingColors; scenes?: IdemooSceneInterface[] | LottieSceneInterface[]; templates: TemplateApiRes['template'][]; fonts: MintaVideoFonts; fontValidationResults?: IFontValidationResult[]; validationGeneralError?: string; isFavorite?: boolean; isProTemplate?: boolean; featureId?: FeatureId; customizeMintaVideo?: CustomizeMintaVideo; customizeMintaVideoByScene?: { [key: string]: CustomizeMintaVideo; }; autoPlay?: boolean; renderType?: RENDER_TYPE; format?: VideoFormat; createdAt: Date; alreadyInjected?: boolean; lottieData: LottieAnimationData; } export interface MintaVideoFonts { usedFonts: MintaVideoUsedFonts[]; isBrandedFontsUsed: boolean; isDefaultFonts: boolean; isFallbackFonts: boolean; } export interface MintaVideoUsedFonts { name: string; url: string; font: string; } export interface MintaVideos { [id: string]: MintaVideo; } export interface Campaign { id: string; videoIds?: string[] | null; totalVideoCount: number; createdAt: string; updatedAt: string; useCaseId: string; productsIds: string[]; templatesIds?: string[]; businessAuth: string; type: string; user: string; ecommCampaignType?: EcommCampaignEnum; fromCache?: boolean; } export declare type Currency = string; export declare enum BillingCycleUnits { MONTHLY = "EVERY_30_DAYS", YEARLY = "ANNUAL", ONCE = "ONCE" } export interface PlannerPost { id: string; time: string | Date; socialType: string; platform: string; previewImgUrl: string; status?: string; isAutoPost?: boolean; isAllowToPost?: boolean; imageUrl?: any; } export declare type BillingCycle = number; export declare type ProductGroups = 'Ecommerece Pro' | string; export interface PricingConfiguration { Name: string; DefaultCurrency: string; Prices: { Regular: [{ Amount: number; Currency: Currency; }]; }; } export interface PaymentPlanPricing { amount: number; billingCycle: BillingCycle; billingCycleName: BillingCycleUnits; } export interface PaymentPlan { id: string; name: string; billingCycle: number; billingCycleName: BillingCycleUnits; status: string; priceDescription: string; bestValue: boolean; promotionTitle: string; price: { amount: number; currency: string; discountAmount?: number; }; businessAuthTypes: string[]; isHidden?: boolean; paddlePlanId?: number; level: number; limits: { monthly: number; }; featureList: Array; displayName: string; description: string; } export declare enum BillingCycleActiveUnits { MONTHLY = "EVERY_30_DAYS", YEARLY = "ANNUAL" } export interface PaymentPlanDictionaryByCycle { [BillingCycleActiveUnits.YEARLY]: { [key: string]: PaymentPlan; }; [BillingCycleActiveUnits.MONTHLY]: { [key: string]: PaymentPlan; }; } export declare enum SubscriptionStatus { ACTIVE = "ACTIVE", PENDING = "PENDING", CANCELLED = "CANCELLED", FROZEN = "FROZEN", EXPIRED = "EXPIRED", FREE = "FREE" } export declare enum SubscriptionAction { TRIAL_ACTIVATE = "trial_activated" } export declare enum MintaPaymentProvider { PADDLE = "paddle", STORE = "STORE", WIX = "WIX" } export interface Subscription { id: string; user: string; plan: string; status: SubscriptionStatus; TCOProductId: string; createdAt: string; updatedAt: string; buyLink: string; recurring: boolean; nextRenewalCardExpirationDate?: string; nextRenewalCardType?: string; nextRenewalLastDigits?: string; nextRenewalDate: string; usageResetDate: Date; nextRenewalPrice: string; nextRenewalCurrency: string; purchaseDate?: string; subscriptionExpirationDate?: string; name: string; externalId?: string; checkoutId?: string; renewalInterval?: BillingCycleUnits; trialDays?: number; cancelURL?: string; updateURL?: string; mintaPaymentProvider?: MintaPaymentProvider; externalSubscriptionId?: string; externalPlanId?: string; externalStatus?: string; action?: SubscriptionAction; } export interface Invoice { id: string; date: string; amount: string; currency: string; referenceNumber: string; } export interface CaptionField { name?: string; injectedValue: Caption; initialInjectedValue: Caption; isEditable?: boolean; maxLength?: number; breakLine?: boolean; } export interface VideoCaptionsSuggestion { id: string; useCase: string; captions: Caption[]; captionsLengths: number[]; } export interface Colors { id: string; order: number; colors: [string, string, string, string]; } export interface ScheduledPost { postContent: { title?: string; caption?: string; sourceUrl?: string; }; businessAuth: string; id: string; socialType: 'facebook' | 'instagram' | 'pinterest' | 'tiktok'; time: string; mintaVideo: string; accountId: string; status: any; previewImgUrl?: string; mediaType: MediaType; mediaUrl?: string; userAutoPost?: string; isAllowToPost?: boolean; } export interface AudioTrack { id: string; url: string; name: string; cover: string; artist: string; isPro: boolean; trackLink: string; } export interface UserAudioTrack { id: string; businessAuth: string; trackId: string; } export interface Message { id: string; deliveryId: string; useCase: string; topic: string; products: Product[]; productsIds: string[]; hasNoVideos: boolean; recentCampaignId?: string; error?: Error; subject: string; description: string; createdAt: string; calenderDay: string; isToday: boolean; color: string; } export declare enum PowerUpTypes { BRAND_KIT = "brand-kit" } export declare enum PowerUpAutoPostTypes { FACEBOOK = "facebookAutoPost", INSTAGRAM = "instagramAutoPost", PINTEREST = "pinterestAutoPost", TIKTOK = "tiktokAutoPost" } export declare type AllPowerUpTypes = PowerUpTypes | PowerUpAutoPostTypes; export interface PowerUp { id: string; type: AllPowerUpTypes; iconUrl: string; title: string; subTitle: string; description: string; plans?: string[]; useCase?: string; isEnabled: boolean; order: number; status?: string; socialType: SocialTypes; suspendedBy?: string[]; suspendedInfo?: string; expireInfo?: string; } export interface ScheduleResponse { day: string; hour: string; } export interface Schedule { day: string; hours: string[]; } export interface PowerUpAutoPost extends PowerUp { autoPostCaptions: object[]; collectionIds: string[]; postCaptions: AutoPostCaption[]; businessAuth: string; autoPostType: PowerUpAutoPostTypes; autoPost: string; schedule: Schedule[]; accountId: string; } export interface PowerUpAutoPostResponse extends PowerUpAutoPost { _id: string; } export interface AutoPostCaption { id: string; autoPost?: string; content: string; isEnabled: boolean; isCustom: boolean; } export interface PowerUpUserAutoPostTemplate { id?: string; template: string; userAutoPost: string; useCase: string; } export declare enum BusinessAuthTypes { SHOPIFY = "5e0847eb6b8f05a181d250f6", ETSY = "5e551f1e7c213e67373ef685", BIGCOMMERCE = "6124a824446041ecbb97e2be", WIX = "6153f9e17b86cf4520ecba52", WOO = "61e03e83632dfe31dcf3f8b3", CUSTOM = "6379d7097818531c35e491f7" } export declare enum BusinessAuthTypesNames { '5e0847eb6b8f05a181d250f6' = "shopify", '5e551f1e7c213e67373ef685' = "etsy", '6153f9e17b86cf4520ecba52' = "wix", '6124a824446041ecbb97e2be' = "bigcommerce", '61e03e83632dfe31dcf3f8b3' = "woo", '6379d7097818531c35e491f7' = "custom" } export declare enum SocialTypes { FACEBOOK = "facebook", FACEBOOK_ADS = "facebookAds", INSTAGRAM = "instagram", PINTEREST = "pinterest", TIKTOK = "tiktok", TIKTOK_ADS = "tiktok ads" } export interface Font { id: string; url: string; name: string; fontPreviewImage: string; groups: string[]; isFallbackFont: boolean; order: number; isEnabled: boolean; glyphsUnicode?: { [key: number]: number; }; } export interface SocialPost { id: string; socialType: string; postId: string; socialPostUrl: string; mintaVideo: string; format?: VideoFormat; products: Array; postMethod: string; mediaType?: string; userImage?: string; socialRefId?: string; mediaSrcType?: MediaSrcType; isPosted?: boolean; userSchedulePost: string; postType?: string; events?: [{ eventName: string; eventDate: Date; }]; createdAt: string; } export interface FontGroup { name: string; fonts: string[]; } export declare enum VerifyPaymentMethod { CREATED = "created", CANCELLED = "CANCELLED", FREE = "FREE", UPDATED = "updated", TRIAL = "trial" } export declare enum MediaType { VIDEO = "video", IMAGE = "image" } export declare enum MediaSrcType { video = "video", videoImage = "videoImage", userImage = "userImage", userVideo = "userVideo" } export declare type UserImageMetadata = { description?: string; type: string; name: string; }; export declare type UserImage = { name: string; provider: string; url: string; businessAuth: string; businessAuthType: string; size: number; source: string; metaData?: UserImageMetadata; isDuplicated?: boolean; dimensions?: { width: number; height: number; }; id?: string; } & { _id?: string; createdAt?: string; updatedAt?: string; }; export declare enum UserImageComponentActions { SHARE = "share", DELETE = "delete", UPDATE_NAME = "updateName" } export declare type UserImageDimensions = { width: number; height: number; }; export interface UserImageResponse { data: UserImage[]; totalUserImages: number; } export declare type UserImageMap = { [id: string]: UserImage; }; export interface FetchImagesByBusinessAuthId { businessAuthId: string; offset?: number; limit?: number; } export interface FetchImagesByImagesIds { imagesIds: string[]; offset?: number; limit?: number; } export declare type UpdateUserImage = { [K in keyof UserImage]?: any; }; export interface ITimezone { display: string; searchValue: string; value: string; } export interface CreativeImage { id: string; url: string; thumbnailUrl: string; group: string; order: number; } export interface ImageUrls { url: string; thumbnailUrl: string; } export interface ExtendSocialPostData { postId?: string; socialPostUrl?: string; mediaUrl?: string; previewImgUrl?: string; accountId?: string; accountName?: string; socialRefId?: string; } export interface VideoPreviewData { videoUrl: string; imageUrl: string; _id?: string; } export interface VideoScene { unique_scene_id: string; scene_id: number; start_time_offset_in_seconds: number; start_time_offset_seconds: number; start_time_offset_unique_scene_id: string; start_time_in_seconds: number; scene_start_in_seconds: number; z_index: number; duration_in_seconds: number; text: Text[]; media: Media[]; isHidden: boolean; } export interface EditorSceneData { id: number; isHidden: boolean; originalStartTime: number; startTime: number; endTime: number; offsetTime: number; duration: number; previewImg: string; comment: any; } export declare type UseCaseTemplatesData = { _id: string; useCases: Array; name: string; previewImageUrl?: string; previewVideoUrl?: string; videoId?: string; template?: CommentsForDesignTemplate; isSupportMultiProducts: boolean; }; export interface ITikTokUserInfo { accountId: string; display_name: string; profile_image: string; } export interface ITikTokAccountData { accessToken: string; isBusinessAccount: boolean; userInfo: ITikTokUserInfo; } export declare enum RENDER_TYPE { LOTTIE = "lottie", IDEMOO = "idemoo" } export interface VideoImageDimension { url: string; width: number; height: number; id?: string; } export interface ITemplateGroupData { _id: string; name: string; templates: Array; } export interface ITemplateGroupMetaData { [templateId: string]: string; } export interface LottieInjectedData extends InjectedData { formats: { format: VideoFormat; templateId: string; originalTemplateId: string; }; designs: { templateId: string; originalTemplateId: string; }; }