import { Nullable } from '@zakeke/zakeke-3d-core'; import { PlatformAttributeSelection } from './integrations/Integration'; export declare enum Platform { Magento1 = 5, Magento2 = 1, Shopify = 3, WooCommerce = 2 } export declare enum PlatformPriceType { Standard = 0, Inline = 1 } export declare class User { id: number; username: string; name: string; constructor(id: number, username: string, name: string); } declare enum ZakekeEnvironment { Customizer = 1, Composer = 2, Viewer = 3 } export declare enum TryOnType { NotSelected = 0, Eyewear = 1, Scarves = 2, Earrings = 3, Headwear = 4, Necklace = 5, Shoes = 6, Watches = 7, Bracelet = 8 } export type TryOnProvidersTypesMapping = { list: Record | {}; }; export interface TryOnProduct { productID: number; typeID: number; providerID: number; settings: string; } export interface TryOnSeller { sellerID: number; typeID: number; providerID: number; settings: string; vtoState: SellerTryOnState; } export declare enum SellerTryOnState { NotActive = 0, Active = 1 } export declare enum TryOnProvider { NotSelected = 0, Mazing = 1, Banuba = 2, DeepAR = 3 } export interface TryOnTypeSettings { try_on: boolean; pd?: boolean; active: boolean; } export declare enum TryOnSettingsType { VirtualTryOn = "try_on", GlassPupillaryDistanceTool = "pd", StyleButton = "styleButton" } export interface TryOnButtonCustomization { image: Nullable; textLabel: Nullable; textColor: Nullable; backgroundColor: Nullable; borderColor: Nullable; borderWidth: number; borderRadius: number; } export interface TryOnSettings { type: TryOnType; styleButton: 'single' | 'multiple'; buttonCustomizations: TryOnButtonCustomization[]; typeSettings: TryOnTypeSettings; } export declare enum TryOnFineTuningMazingEnvironment { Neutral = "neutral.hdr", Light = "light.hdr", Bright = "bright.hdr", Studio = "studio.hdr", Court = "court.hdr", Blurred_Studio = "startup.hdr" } export interface TryOnFineTuningSettings { scale: number; position: { x: number; y: number; z: number; }; rotation?: { x: number; y: number; z: number; }; environment?: string; } export interface TryOnFineTuningMazingSettings extends TryOnFineTuningSettings { temple: boolean; environment: TryOnFineTuningMazingEnvironment; } export interface TryOnFineTuningBanubaSettings extends TryOnFineTuningSettings { rotation: { x: number; y: number; z: number; }; } export interface TryOnFineTuningDeepARSettings extends TryOnFineTuningSettings { position: { x: number; y: number; z: number; }; rotation: { x: number; y: number; z: number; }; scale: number; environment: string; } export type TryOnGenericFineTuningSettings = TryOnFineTuningSettings | TryOnFineTuningMazingSettings; export declare const DefaultMazingFineTuningSettings: TryOnFineTuningMazingSettings; export declare const DefaultBanubaFineTuningSettings: TryOnFineTuningBanubaSettings; export declare const DefaultDeepARFineTuningSettings: TryOnFineTuningDeepARSettings; export declare class Product { id: number; sku: string; name: string; previewUrl: string; metadata?: any; areas: ProductArea[]; quantityRule: ProductQuantityRule | null; quoteRule: QuoteRule | null; environment: ZakekeEnvironment | null; isShowSecondScreenEnabled: boolean; isAiConfigurationEnabled: boolean; isOldViewer: boolean; static fromProduct(zkProduct: any): Product; } export declare class QuoteRule { quoteRuleID: number; name: string; sellerID: number; formControlsData: string; isValidForAllProducts: boolean; allowAddToCart: boolean; products: number[]; constructor(quoteRule: any); } export declare class Quote { quoteID: number | undefined; sellerID: number | undefined; subject: string | undefined; statusID: number; designDocID: string | undefined; compositionDocID: string | undefined | null; orderDocID: string | undefined; formData: string | undefined; amount: number | undefined; quantity: number; shippingAmount: number | undefined; additionalAmountLabel: string | undefined; additionalAmount: number | undefined; visitorID: number | undefined; visitorCode: string | undefined; customerID: number | undefined; customerCode: string | undefined; createdOn: Date | undefined; modelPrice: number; variantName: string | undefined; } export declare class ProductArea { id: number; name: string; cameraLocationID?: string; static fromSide(modelSide: any): ProductArea; } export declare class ProductQuantityRule { minQuantity: number | null; maxQuantity: number | null; step: number | null; static fromQuantityRule(quantityRule: any): ProductQuantityRule; } export declare class Variant { id: number | undefined; sku: string | undefined; name: string | undefined; price: number | undefined; metadata?: any; constructor(id: number | undefined, sku: string | undefined, name: string | undefined, price: number | undefined, metadata?: any); } export declare class ZakekeEvent { event: string; callback: any; constructor(event: string, callback: any); } export declare class TemplateConstraints { isUserImageAllowed: boolean; } export declare class TemplateArea { id: number; uploadRestrictions: TemplateConstraints; disableSellerImages: boolean; canAddImage: boolean; canAddText: boolean; static fromTemplateArea(zkSide: any): TemplateArea; } export declare class Template { id: number; name: string; areas: TemplateArea[]; static fromTemplate(zkTemplate: any): Template; } export declare enum ItemType { Text = 0, Image = 1 } export interface Item { type: ItemType; guid: string; name: string; areaId: number; index: number; constraints: { [key: string]: any; } | null; } export declare class TextItem implements Item { type: ItemType; areaId: number; guid: string; name: string; text: string; strokeColor: string; strokeWidth: number; fillColor: string; fontFamily: string; fontSize: number; fontWeight: string; fontStyle: string; fontStretch: string; justification: string; isTextOnPath: boolean; isTemplateElement: boolean; constraints: { [key: string]: any; } | null; index: number; constructor(item: any); } export declare class ImageItem implements Item { type: ItemType; imageID: number; areaId: number; guid: string; name: string; url: string; deleted: boolean; constraints: { [key: string]: any; } | null; index: number; constructor(item: any); } export declare class PlatformSettings { static Empty: PlatformSettings; accessKey: string; accessSecret: string; adminPath: string; apiKey: string; apiSecret: string; currencyCode: string; currencyID: number | undefined; definitiveUrl: string; currencySymbol: string; ecommerceID: number; ecommerceName: number; hasProductsApi: boolean; isMarketplace: boolean; remoteUrl: string; username: string; password: string; canCheckIsIntegrated: boolean; productsApi: string; salesChannelID: number; get platform(): Platform; constructor(); static fromData(response: PlatformSettingsDto): PlatformSettings; } export interface TextSanitationResult { sanitizedText: string; dirtyChars: string[]; } export interface MerchantImageResultDto { fileNameSmall: string; fileNameBig: string; imageUrlSmall: string; imageUrlBig: string; } export interface PlatformSettingsDto { ecommerceID: number; currencyID: number | undefined; currencyCode: string; apiKey: string; apiSecret: string; accessKey: string; accessSecret: string; remoteUrl: string; username: string; password: string; adminPath: string; canCheckIsIntegrated: boolean; productsApi: string; definitiveUrl: string; currencySymbol: string; ecommerceName: number; hasProductsApi: boolean; isMarketplace: boolean; salesChannelID: number; } export interface SubscriptionInfo { planId: number; planName: string; startDate: string; showBrand: boolean; } export interface FontFamily { fontFamilyID: number; fontFamilyGuid: number; faces: FontFamilyFace[]; name: string; imageUrl: string; cssUrl: string; isSystemFont: boolean; stretches: string; variations: string; fullLoaded?: boolean; } export interface FontFamilyFace { filesUrls: string[]; parsedFiles: FontFamilyFaceFiles[]; fontFaceGuid: string; fontFaceID: number; name: string; openTypeStretch: string; openTypeWeight: string; stretch: string; style: string; variation: string; version: string; weight: string; } export interface FontFamilyFaceFiles { url: string; file: any; } /** * Represents an image. */ export interface ZakekeImage { /** * The ID of the image. */ imageID: number; /** * The name of the image. */ name: string; /** * The URL of the image's choice. */ choiceUrl: string; /** * The preferred width of the image, if specified. * Set to null if no preferred width is specified. */ preferredWidth: number | null; /** * The preferred height of the image, if specified. * Set to null if no preferred height is specified. */ preferredHeight: number | null; } export interface ImageCategory { categoryID: number | null; name: string; isSystemwide: boolean; hasImages: boolean; } export interface ImageMacroCategory { macroCategoryID: number | null; name: string; isSystemwide: boolean; hasImages: boolean; categories: ImageCategory[]; } interface Addon { addonName: string; subscriptionAddonID: string; } export interface AdditionalFeatures { editPDFPreview: boolean; editSummary: boolean; integrations: boolean; bulkVariationForm: boolean; pricePerImage: boolean; engraving: boolean; editPrintfiles: boolean; printReadyFilesPlus: boolean; textplus: boolean; prices3dConfigurator: boolean; customEnvironmentTexture: boolean; dynamicProperties: boolean; materialLibrary: boolean; multiareaConfiguratorDesigner: boolean; aiPoweredTools: boolean; } export interface Settings { additionalFeatures: AdditionalFeatures; isPricingAdvancedEnabled: boolean; userID: number; username: string; referrerID: number; ecommerceUrl: string; ecommerceID: number | null; addons: Addon[]; eventMessages: EventMessage[]; nftSettings: NftSettings; brand: boolean; isPdfEpsEnabled: boolean; } export declare class EventMessage { eventID: EventMessageType; description: string; closeable: boolean; visible: boolean; addToCartDisabledIfVisible: boolean; additionalData: any; enableCheckForSellerImages: boolean; isDefault: boolean; static fromMessage(message: any): EventMessage; } export declare enum EventMessageType { Undefined = -1, ImageQualityWarning = 1, Welcome = 3, AddToCart = 4, Copyright = 8 } export declare class Camera { id: string; name: string; static fromZkCamera(zkCamera: Zakeke.SceneCameraLocation): Camera; } export declare class Group { id: number; guid: string; name: string; enabled: boolean; imageUrl?: string | null; icon?: string | null; attributes: Attribute[]; steps: Step[]; templateGroups: ThemeTemplateGroup[]; cameraLocationId: string | null; displayOrder: number; direction: number; attributesAlwaysOpened: boolean; } export declare class Step { id: number; guid: string; name: string; cameraLocationID: string | null; displayOrder: number; attributes: Attribute[]; templateGroups: ThemeTemplateGroup[]; } export declare enum AttributeType { Select = 0, Input = 1, Colorpicker = 2 } export declare enum AttributeOptionShapeType { Round = 1, Square = 2 } export declare class Attribute { id: number; guid: string; code: string; name: string; description: string; enabled: boolean; imageUrl: string | null; groupId: number; stepId: number; options: Option[]; value: any; numberFormat: string; type: AttributeType; optionShapeType: AttributeOptionShapeType; displayOrder: number; hideOptionsLabel: boolean; cameraLocationId: string | null; } interface Pricing { fromQuantity: number; price: number; } export declare class Option { id: number; attribute: Attribute; guid: string; code: string; name: string; description: string; enabled: boolean; selected: boolean; imageUrl: string | null | undefined; displayOrder: number; pricings: Pricing[]; } export declare class TemplateComposition { compositionID: number; name: string; previewImageUrl: string; } export declare class ThemeCategory { id: number; name: string; composition: TemplateComposition[]; } export declare class ThemeMacroCategory { id: number; name: string; category: ThemeCategory[]; } export declare class ThemeTemplateGroup { templateGroupID: number; name: string; groupID: number; stepID: number; displayOrder: number; macroCategory: ThemeMacroCategory[]; } export declare class SellerSettings { customizeButtonLabel: string; customizeButtonIconUrl: string | null; isCompositionRecapEnabled: boolean; isCompositionRecapVisibleFromStart: boolean; canUserCloseCompositionRecap: boolean; minimumFractionDigits: number; priceInfoText: string; hidePrice: boolean; hotjarSiteID: string | null; googleTagManagerID: string | null; canSaveDraftComposition: boolean; canUndoRedo: boolean; shareType: number | null; static fromSellerSettings(zkSellerSettings: any): SellerSettings; } export declare class CompositionItem { attributeID: number; attributeName: string; attributeCode: string; selectedOptionName: string; selectedOptionCode: string; } export declare class Composition { name: string; docID: string; compositionID: number; compositionItems: CompositionItem[]; previewImageUrl: string; designID: number | null; pdSettings: number | null; tags: string[]; static fromJSON(json: any): Composition; } export interface OnBeforeSendDataToParent { composition: number; preview: string; attributes: PlatformAttributeSelection[]; designItems: Item[]; quantity: number; previewFiles: PreviewFile[]; additionalProperties: any; } export interface TemplateUploadRestrictions { isUserImageAllowed: boolean; isJpgAllowed: boolean; isPngAllowed: boolean; isSvgAllowed: boolean; isPdfAllowed: boolean; isEpsAllowed: boolean; isPdfWithRasterAllowed: boolean; } export interface PrintingMethodsRestrictions { allowedBold: boolean; allowedItalic: boolean; allowedCurved: boolean; disableTextColors: boolean; textColors: Array; defaultColor: string; isPDFPreviewEnabled: boolean; } export declare class SelectedOption { attributeID: number; optionID: number; } export declare enum ExtensionFieldDataType { Money = 1, Integer = 2, Decimal = 3 } export interface ExtensionFields { name: string; value: number; label: string; formatString: string; } export interface PreviewCameraImage { id: number; url: string; } export interface CompositionClientPreview { fileObjectID: number; cameraName: string; url: string; } export interface NftSettings { isNFTEnabled: boolean; priceToAdd: number; } export interface NftForm { email: string; walletAddress: string; } export interface SelectedCategory { categoryID: number; name: string; } export interface VisibleEventMessage { areaID: number; itemGuid: string; type: number; title: string; message: string; closabled: boolean; requiredWidth: number | null; requiredHeight: number | null; addToCartDisabledIfVisible: boolean; } export interface PreviewFile { url: string; cameraName: string; } /** * Represents internal translations. */ export interface InternalTranslations { /** * An array of static translations. */ statics: StaticTranslation[]; /** * An array of dynamic translations. */ dynamics: DynamicTranslation[]; } /** * Represents translations. */ export interface Translations { /** * A map of static translations where the original string is the key and the localized string is the value. */ statics: Map; /** * A map of dynamic translations where the original string is the key and the localized string is the value. */ dynamics: Map; } /** * Represents a static translation. */ interface StaticTranslation { /** * The original string to be translated. */ original: string; /** * The localized string representing the translation. */ localization: string; /** * The language identifier (LCID) associated with the translation. */ lcid: number; } /** * Represents a dynamic translation. */ interface DynamicTranslation { /** * The original string to be translated. */ original: string; /** * The localized string representing the translation. */ localization: string; /** * The language identifier (LCID) associated with the translation. */ lcid: number; } /** * Represents a color restriction. */ export interface RestrictionColor { /** * The color code. */ colorCode: string; /** * Indicates if it is the default color. */ isDefault: boolean; } /** * Represents custom preview size. */ export interface CustomPreviewSize { /** * The width of the custom cart preview. */ customCartPreviewWidth: number; /** * The height of the custom cart preview. */ customCartPreviewHeight: number; } /** * Represents draft compositions. */ export interface DraftCompositions { /** * The name of the composition. */ name: string; /** * The document ID of the composition. */ docID: string; /** * The URL of the preview image. */ previewImageUrl: string; /** * The tags associated with the composition. */ tags: string[]; } /** @internal */ export interface ThemeCompositions { /** * The name of the composition. */ name: string; /** * The document ID of the composition. */ docID: string; /** * The URL of the preview image. */ previewImageUrl: string; /** * The tags associated with the composition. */ tags: string[]; } /** * Represents information about the current composition. */ export interface CurrentCompositionInfo { /** * The ID of the composition. It can be null. */ compositionId: string | null; /** * The name of the composition. It can be null. */ compositionName: string | null; /** * The tags associated with the composition. It can be null. */ compositionTags: string[] | null; } /** * Represents a template category. */ export interface TemplateCategory { /** * The name of the category. */ categoryName: string; /** * The ID of the category. */ categoryID: number; } /** * Represents a template macro category. */ export interface TemplateMacroCategory { /** * The name of the macro category. */ macroCategoryName: string; /** * The ID of the macro category. */ macroCategoryID: number; /** * The categories under this macro category. */ categories: TemplateCategory[]; } /** @internal */ export interface Category { /** * The ID of the category. */ categoryID: number; /** * The ID of the macro category to which this category belongs. */ macroCategoryID: number; /** * The name of the category. */ name: string; /** * The description of the category. */ description: string; /** * The ID of the seller associated with the category. */ sellerID: number; /** * The display order of the category. */ displayOrder: number; /** * Indicates if the category is a draft. */ isDraft: boolean; /** * The composition of the category. */ composition: any; /** * The template of the category. */ template: any; } /** @internal */ export interface MacroCategory { /** * The ID of the macro category. */ macroCategoryID: number; /** * The name of the macro category. */ name: string; /** * The ID of the seller associated with the macro category. */ sellerID: number; /** * The display order of the macro category. */ displayOrder: number; /** * Indicates if the macro category is a draft. */ isDraft: boolean; /** * The categories under this macro category. */ category: Category[]; } /** * Represents the boot parameters for the Zakeke Configurator. */ export interface BootParameters { /** * The name of the product. */ productName?: string; /** * The platform on which the Composer is running. */ platform?: string; /** * The quantity of the product. */ quantity?: number; /** * The culture of the product. */ culture?: string; /** * The currency of the product. */ currency?: string; /** * The token for the product. */ token?: string; /** * The ID of the composition. */ compositionId?: string; /** * The code of the product. */ productCode?: string; /** * The width of the preview. */ previewWidth?: number; /** * The height of the preview. */ previewHeight?: number; /** * The prefix for the share URL. */ shareUrlPrefix?: string; /** * The ID of the shared composition document. */ sharedCompositionDocId?: string; /** * The ID of the template. */ templateId?: string; /** * Indicates if the editor is in draft mode. */ isDraftEditor?: boolean; /** * Indicates if the share composition URL is enabled. */ enableShareCompositionUrl?: boolean; /** * The ID of the draft composition document. */ draftCompositionDocId?: any; /** * Indicates if the editor is in viewer mode. */ isViewerMode?: boolean; /** * Indicates if the editor is in template mode. */ isTemplateEditor?: boolean; /** * Indicates if the legacy screenshot is used. */ useLegacyScreenshot?: boolean; /** * The version of the integration. */ integrationVersion?: number; } export interface UIConfig { urlLoader: string; urlARIcon: string; } export interface SceneAnimationsConfig { runAtStart?: boolean | null; loop?: boolean | null; speed?: number | null; } export interface DAMViewerAnalyticsType { modelCode: string; userId: number; eventType: DAMViewerAnalyticsEventType; } export declare enum DAMViewerAnalyticsEventType { ViewProduct = "VIEW_PRODUCT", ViewArProdutc = "VIEW_AR_PRODUCT" } export interface GraphQLWelcomeMessageResponse { data: { messagesByProduct: null | GraphQLWelcomeMessageData[]; }; } export interface GraphQLWelcomeMessageData { id: string; eventGlobalID: string; messageId: number; messageText: string; eventName: string; eventId: number; closeable: boolean; visible: boolean; addToCartDisabledValue: boolean; enableCheckForSellerImagesValue: boolean; enableAdditionalMessage: boolean; additionalMessage: string | null; eventMessageId: number; title: string | null; titleSingleMessage: string | null; infoLink: string | null; defaultMessage: string | null; visibleOnlyOnApi: boolean | null; addToCartLabel: string | null; visibleLowQualityInfoText: boolean | null; defaultAdditionalMessageText: string | null; warningText: string | null; onDeleteWarningText: string | null; isDefault?: boolean | null; } /** * AI Studio Types * These interfaces are used for AI-powered product staging and virtual try-on features */ /** * Represents a category for AI presets */ export interface AIPresetCategory { id: number; name: string; toolId: string; presetType: string; sellerID: number | null; isActive: boolean; createdDate: string; modifiedDate: string; } /** * Represents an AI preset configuration */ export interface AIPreset { id: number; name: string; toolId: string; presetType: string; categoryId: number | null; prompt: string | null; negativePrompt: string | null; imageUrl: string | null; previewUrl: string | null; factor: number | null; description: string | null; sellerID: number | null; isActive: boolean; sortOrder: number; createdDate: string; modifiedDate: string; categoryName: string | null; } /** * Represents rules for AI product staging */ export interface AIProductStagingRule { ruleID: number; name: string; sellerID: number; allowCustomBackground: boolean; numberOfImages: number; createdDate: string; productIDs: number[]; printTypeIDs: number[]; backgroundCategoryIDs: number[]; surfacePresetIDs: number[]; moodPresetIDs: number[]; effectPresetIDs: number[]; } /** * Options for AI product staging generation */ export interface AIProductStagingOptions { productImageUrl: string; backgroundType?: string; backgroundPreset?: number; backgroundImageUrl?: string; surfacePreset?: number; moodPreset?: number; customPrompt?: string; effectPreset?: number; progress?: (progress: number) => void; } /** * Result from AI product staging generation */ export interface AIProductStagingResult { imageUrl: string; taskId: string; } /** * Options for AI virtual try-on generation */ export interface AIVirtualTryOnOptions { personImageUrl?: string; personPreset?: number; clothingImageUrl?: string; clothingPreset?: number; backgroundImageUrl?: string; backgroundPreset?: number; customPrompt?: string; effectPreset?: number; posePreset?: number; progress?: (progress: number) => void; } /** * Result from AI virtual try-on generation */ export interface AIVirtualTryOnResult { imageUrl: string; taskId: string; } /** * Service availability flags from subscription API */ export interface AIServicesAvailability { GENERATIVE_AI_DESIGN: boolean; GENERATIVE_AI_IMAGE_GENERATOR: boolean; GENERATIVE_AI_PRODUCT_STAGING: boolean; GENERATIVE_AI_VTO: boolean; VECTORIZE: boolean; } /** * VTO filtering rules (from /api/v1/AIVirtualModelRule/applicable) */ export interface AIVirtualModelRule { ruleID: number; name: string; sellerID: number; numberOfImages: number; allowCustomBackground: boolean; createdDate: string; productIDs: number[]; printTypeIDs: number[]; backgroundCategoryIDs: number[]; effectPresetIDs: number[]; modelPresetIDs: number[]; poseCategoryIDs: number[]; } /** * Tool types for AI rate limiting */ export type AIToolType = 'AIStudio' | 'CustomizerAIImageGenerator' | 'CustomizerProductStaging' | 'CustomizerVirtualTryOn' | 'CustomizerDesignGenerator'; /** * Rule level for tool usage */ export type AIRuleLevel = 'Seller' | 'Global'; /** * Limit period type for tool usage */ export type AILimitPeriodType = 'Session' | 'Minutes'; /** * Tool usage rule for AI rate limiting */ export interface AIToolUsageRule { toolType: AIToolType; hasRule: boolean; toolUsageRuleID: number | null; ruleLevel: AIRuleLevel | null; allowLoggedUsers: boolean | null; allowNonLoggedUsers: boolean | null; limitEnabled: boolean | null; limitPeriodType: AILimitPeriodType | null; maxOperations: number | null; limitPeriodMinutes: number | null; } /** * Error thrown when AI generation rate limit is reached. * Contains the tool usage rule and last generation timestamp for calculating remaining cooldown. */ export declare class AIRateLimitError extends Error { readonly toolUsageRule: AIToolUsageRule; readonly lastGenerationTime?: number; constructor(message: string, toolUsageRule: AIToolUsageRule, lastGenerationTime?: number); } export {};