zakeke-configurator-react 0.1.363 → 0.1.364
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/dist/declarations/composer/Module/src/environment.d.ts +98 -17
- package/dist/declarations/composer/Module/src/helpers.d.ts +0 -9
- package/dist/declarations/composer/Module/src/imageUploadTask.d.ts +2 -1
- package/dist/declarations/composer/Module/src/index.d.ts +1 -0
- package/dist/declarations/composer/Module/src/integrations/Integration.d.ts +2 -2
- package/dist/declarations/composer/Module/src/integrations/generic.d.ts +1 -1
- package/dist/declarations/composer/Module/src/models.d.ts +210 -3
- package/dist/declarations/composer/Module/src/state/provider.d.ts +3 -1
- package/dist/declarations/composer/Module/src/state/providerValue.d.ts +72 -11
- package/dist/declarations/composer/Module/src/state/state.d.ts +1 -0
- package/dist/declarations/libs/pricingRuleBase/DesignPriceCalculatorRuleBased.d.ts +3 -0
- package/dist/globals1.js +1 -1
- package/dist/index.js +96087 -90884
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
/// <reference path="../../../../../../../typescript_definitions/declarations/All.d.ts" />
|
|
1
2
|
import { FocusAttributesEventListener } from '@zakeke/zakeke-3d-core';
|
|
2
|
-
import { EventMessage, ExtensionFields, OnBeforeSendDataToParent, TryOnMode, TryOnProvidersTypesMapping, VisibleEventMessage } from '.';
|
|
3
|
+
import { EventMessage, ExtensionFields, NftForm, NftSettings, OnBeforeSendDataToParent, SceneAnimationsConfig, TryOnMode, TryOnProvidersTypesMapping, VisibleEventMessage } from '.';
|
|
3
4
|
import { PlatformAttributeSelection } from './integrations/Integration';
|
|
4
|
-
import { BootParameters, Camera, Composition, FontFamily, Group, ImageMacroCategory, Item, Product, ProductQuantityRule, SellerSettings, Template, TemplateMacroCategory,
|
|
5
|
+
import { BootParameters, Camera, Composition, FontFamily, Group, ImageMacroCategory, Item, Product, ProductQuantityRule, SellerSettings, Settings, Template, TemplateMacroCategory, TryOnGenericFineTuningSettings, TryOnProduct, TryOnSeller, AIPresetCategory, AIPreset, AIProductStagingRule, AIProductStagingOptions, AIProductStagingResult, AIVirtualTryOnOptions, AIVirtualTryOnResult, AIVirtualModelRule } from './models';
|
|
6
|
+
import { AxiosResponse } from 'axios';
|
|
5
7
|
import { DAMViewerAnalyticsEventType, PrintingMethodsRestrictions, TextSanitationResult, UIConfig, ZakekeImage } from './models';
|
|
6
8
|
declare global {
|
|
7
9
|
interface Window {
|
|
@@ -64,7 +66,8 @@ export declare class ZakekeEnvironment {
|
|
|
64
66
|
private isDraftEditor;
|
|
65
67
|
private isViewerMode;
|
|
66
68
|
private isDAMViewer;
|
|
67
|
-
private
|
|
69
|
+
private isPresetConfigurationEditor;
|
|
70
|
+
shouldLoadDesign: boolean | null;
|
|
68
71
|
private debugMode;
|
|
69
72
|
private draftCompositionDocId;
|
|
70
73
|
private initialSelection;
|
|
@@ -76,6 +79,15 @@ export declare class ZakekeEnvironment {
|
|
|
76
79
|
private copyrightMessageLocalStorageKey;
|
|
77
80
|
private isPupillaryDistanceMandatory;
|
|
78
81
|
isAIEnabled: boolean;
|
|
82
|
+
isAIStudioShoppingPreviewEnabled: boolean;
|
|
83
|
+
isAIStudioEditorEnabled: boolean;
|
|
84
|
+
isAIStudioEnabled: boolean;
|
|
85
|
+
isAiProductStagingEnabled: boolean;
|
|
86
|
+
isAiVtoEnabled: boolean;
|
|
87
|
+
private lastProductStagingGenerationTime;
|
|
88
|
+
private lastVirtualTryonGenerationTime;
|
|
89
|
+
/** Session ID (GUID) persisted for the lifetime of this environment instance, sent as ZKK-Session-ID header */
|
|
90
|
+
private readonly aiSessionId;
|
|
79
91
|
sellerSettings: SellerSettings | null;
|
|
80
92
|
get internalProduct(): MPlaza.Model | null;
|
|
81
93
|
get internalScene(): Zakeke.Scene | null;
|
|
@@ -84,6 +96,7 @@ export declare class ZakekeEnvironment {
|
|
|
84
96
|
currency: string;
|
|
85
97
|
groups: Group[];
|
|
86
98
|
fonts: FontFamily[];
|
|
99
|
+
defaultFontID: number | null;
|
|
87
100
|
disableTextColors: boolean;
|
|
88
101
|
textColors: RestrictionColor[];
|
|
89
102
|
/**
|
|
@@ -108,6 +121,7 @@ export declare class ZakekeEnvironment {
|
|
|
108
121
|
isExplodedMode: boolean;
|
|
109
122
|
isAssetsLoading: boolean;
|
|
110
123
|
additionalCustomProperties: ExtensionFields[];
|
|
124
|
+
nftSettings: NftSettings | null;
|
|
111
125
|
eventMessages: EventMessage[] | null;
|
|
112
126
|
personalizedMessages: EventMessage[] | null;
|
|
113
127
|
visibleEventMessages: VisibleEventMessage[];
|
|
@@ -116,23 +130,45 @@ export declare class ZakekeEnvironment {
|
|
|
116
130
|
tryOnSellerSettings: TryOnSeller | null;
|
|
117
131
|
pdSettings: number;
|
|
118
132
|
isInfoPointContentVisible: boolean;
|
|
133
|
+
imagesMacroCategories: ImageMacroCategory[];
|
|
134
|
+
isCompositionSaving: boolean;
|
|
119
135
|
private internalTranslations;
|
|
136
|
+
areTranslationsLoaded: boolean;
|
|
120
137
|
private integrationVersion;
|
|
121
|
-
translations: Translations | null;
|
|
122
138
|
useLegacyScreenshot: boolean;
|
|
139
|
+
visibleCustomizer: MPlaza.Customizer | null;
|
|
123
140
|
get isFullscreenMode(): boolean;
|
|
141
|
+
get userSettings(): Settings;
|
|
124
142
|
get isViewerReady(): boolean;
|
|
125
143
|
get isShoppingPreview(): boolean;
|
|
126
144
|
uiConfig: UIConfig | null;
|
|
145
|
+
animationsConfig: SceneAnimationsConfig | null;
|
|
127
146
|
backgroundColor: string | null;
|
|
128
147
|
removeBackground: boolean;
|
|
129
148
|
constructor();
|
|
149
|
+
private fetchVisitorToken;
|
|
130
150
|
private parseParameters;
|
|
131
|
-
makeDAMAnalyticsView(type: DAMViewerAnalyticsEventType): Promise<
|
|
151
|
+
makeDAMAnalyticsView(type: DAMViewerAnalyticsEventType): Promise<AxiosResponse<any, any, {}>>;
|
|
132
152
|
private getProduct;
|
|
133
153
|
private getScene;
|
|
134
154
|
private getComposerModels;
|
|
135
155
|
private getFonts;
|
|
156
|
+
getFontWeights: (font: FontFamily) => {
|
|
157
|
+
normal: boolean;
|
|
158
|
+
bold: boolean;
|
|
159
|
+
italic: boolean;
|
|
160
|
+
italicBold: boolean;
|
|
161
|
+
normalWeight: number;
|
|
162
|
+
boldWeight: number;
|
|
163
|
+
italicWeight: number;
|
|
164
|
+
italicBoldWeight: number;
|
|
165
|
+
};
|
|
166
|
+
private updateFontWeightForTextItem;
|
|
167
|
+
checkFontSupports: (fontName: string, needsBold: boolean, needsItalic: boolean) => {
|
|
168
|
+
canKeepStyles: boolean;
|
|
169
|
+
supportsBold: boolean;
|
|
170
|
+
supportsItalic: boolean;
|
|
171
|
+
};
|
|
136
172
|
private getSettings;
|
|
137
173
|
private getSellerSetting;
|
|
138
174
|
createQuote: (formData: any) => Promise<any>;
|
|
@@ -141,6 +177,9 @@ export declare class ZakekeEnvironment {
|
|
|
141
177
|
private loadLocalization;
|
|
142
178
|
getTemplateMacroCategories: () => Promise<TemplateMacroCategory[]>;
|
|
143
179
|
private loadScript;
|
|
180
|
+
validationNFTEmail: (email: string) => boolean;
|
|
181
|
+
validationNFTWalletAddress: (address: string) => boolean;
|
|
182
|
+
private saveCustomerWalletInfo;
|
|
144
183
|
setCopyrightMessageAccepted: (copyrightMandatoryCheckbox: boolean) => void;
|
|
145
184
|
getCopyrightMessageAccepted: () => boolean;
|
|
146
185
|
/**
|
|
@@ -148,6 +187,9 @@ export declare class ZakekeEnvironment {
|
|
|
148
187
|
*/
|
|
149
188
|
boot: (parameters: BootParameters | null) => Promise<void>;
|
|
150
189
|
private buildDeepARSceneGLBUrl;
|
|
190
|
+
stopAllAnimations: () => void;
|
|
191
|
+
hasAnimations: () => boolean;
|
|
192
|
+
playAnimations: () => void;
|
|
151
193
|
loadSceneFromGlbUrl: (glbUrl: string, sceneConfig: Zakeke.SceneConfig) => Promise<void>;
|
|
152
194
|
appendViewer: (container: HTMLElement) => void;
|
|
153
195
|
setHighlightSettings: (settings: {
|
|
@@ -201,7 +243,7 @@ export declare class ZakekeEnvironment {
|
|
|
201
243
|
on: (event: string, callback: any) => void;
|
|
202
244
|
off: (event: string, callback: any) => void;
|
|
203
245
|
setTemplate: (templateId: number) => Promise<void>;
|
|
204
|
-
|
|
246
|
+
getTemplateUploadRestrictions: (areaId: number) => {
|
|
205
247
|
isUserImageAllowed: boolean;
|
|
206
248
|
isJpgAllowed: boolean;
|
|
207
249
|
isPngAllowed: boolean;
|
|
@@ -222,8 +264,8 @@ export declare class ZakekeEnvironment {
|
|
|
222
264
|
getCameraByName(name: string): Zakeke.SceneCameraLocation | undefined;
|
|
223
265
|
setCameraLocation(name: string, animate?: boolean): void;
|
|
224
266
|
private base64StringToFile;
|
|
225
|
-
saveTemplate: (templateName: string, selectedCategoryID: number | null, attributeOptions: Map<number, number
|
|
226
|
-
addToCart: (additionalProperties: Record<string, any>, onBeforeSendDataToParent?: (data: OnBeforeSendDataToParent) => Promise<Record<string, any
|
|
267
|
+
saveTemplate: (templateName: string, selectedCategoryID: number | null, attributeOptions: Map<number, number>, save2dDesign?: boolean) => Promise<void>;
|
|
268
|
+
addToCart: (additionalProperties: Record<string, any>, onBeforeSendDataToParent?: ((data: OnBeforeSendDataToParent) => Promise<Record<string, any>>) | undefined, legacyScreenshot?: boolean, nftForm?: NftForm, saveDesignFromTemplateEditor?: boolean) => Promise<void>;
|
|
227
269
|
zoomIn: () => void;
|
|
228
270
|
zoomOut: () => void;
|
|
229
271
|
isFullscreenEnabled: () => boolean;
|
|
@@ -245,21 +287,37 @@ export declare class ZakekeEnvironment {
|
|
|
245
287
|
text: string;
|
|
246
288
|
fontFamily: string;
|
|
247
289
|
}, areaId: number): Promise<void>;
|
|
290
|
+
setPrintingMethod(printingMethodId: number, areaId: number): Promise<void>;
|
|
291
|
+
getPrintingMethods(): Array<{
|
|
292
|
+
printMethodId: number;
|
|
293
|
+
name: string;
|
|
294
|
+
}>;
|
|
295
|
+
moveItemUp: (guid: string) => void;
|
|
296
|
+
moveItemDown: (guid: string) => void;
|
|
248
297
|
setItemText: (guid: string, text: string) => string;
|
|
249
|
-
setItemItalic: (guid: string, italic: boolean) => void;
|
|
250
|
-
setItemBold: (guid: string, bold: boolean) => void;
|
|
298
|
+
setItemItalic: (guid: string, italic: boolean, font?: FontFamily) => void;
|
|
299
|
+
setItemBold: (guid: string, bold: boolean, font?: FontFamily) => void;
|
|
251
300
|
setItemColor: (guid: string, color: string) => void;
|
|
252
301
|
setItemFontFamily: (guid: string, fontFamily: string) => Promise<void>;
|
|
253
302
|
setItemTextOnPath: (guid: string, areaId: number, value: boolean) => void;
|
|
254
303
|
fullyLoadFont(font: string | FontFamily): Promise<FontFamily>;
|
|
255
304
|
sanitizeString: (family: FontFamily, text: string) => string;
|
|
256
305
|
getSanitationText: (family: FontFamily, text: string) => TextSanitationResult;
|
|
257
|
-
createImage: (file: File, progress?: (percentage: number) => void) => Promise<ZakekeImage>;
|
|
306
|
+
createImage: (file: File, progress?: ((percentage: number) => void) | undefined) => Promise<ZakekeImage>;
|
|
258
307
|
createImageFromUrl: (url: string) => Promise<ZakekeImage>;
|
|
259
|
-
addItemImage: (id: number, areaId: number) => Promise<
|
|
260
|
-
setItemImageFromFile: (guid: string, file: File, progress?: (percentage: number) => void) => Promise<void>;
|
|
308
|
+
addItemImage: (id: number, areaId: number) => Promise<string | null | undefined>;
|
|
309
|
+
setItemImageFromFile: (guid: string, file: File, progress?: ((percentage: number) => void) | undefined) => Promise<void>;
|
|
261
310
|
setItemImageFromBase64: (guid: string, base64: string) => Promise<void>;
|
|
262
311
|
setItemImage: (guid: string, id: number) => Promise<void>;
|
|
312
|
+
setItemSize: (guid: string, width: number, height: number) => Promise<void>;
|
|
313
|
+
setItemConstraints: (guid: string, constraints: {
|
|
314
|
+
canMove?: boolean;
|
|
315
|
+
canResize?: boolean;
|
|
316
|
+
canRotate?: boolean;
|
|
317
|
+
canDelete?: boolean;
|
|
318
|
+
}) => Promise<void>;
|
|
319
|
+
T_static: (str: string) => any;
|
|
320
|
+
T_dynamic: (str: string) => string;
|
|
263
321
|
getMacroCategories: () => Promise<ImageMacroCategory[]>;
|
|
264
322
|
getImages: (categoryId: number) => Promise<ZakekeImage[]>;
|
|
265
323
|
setCameraPivot(meshID: string): void;
|
|
@@ -283,7 +341,7 @@ export declare class ZakekeEnvironment {
|
|
|
283
341
|
private buildModelViewerUrl;
|
|
284
342
|
isSceneArEnabled: () => boolean;
|
|
285
343
|
private getPregeneratedARUrl;
|
|
286
|
-
getQrCodeArUrl: (device:
|
|
344
|
+
getQrCodeArUrl: (device: 'iOS' | 'Android') => Promise<string>;
|
|
287
345
|
getMobileArUrl: () => Promise<string | null>;
|
|
288
346
|
getMobileLocalArUrl: () => Promise<string>;
|
|
289
347
|
openArMobile: (url: string) => void;
|
|
@@ -312,7 +370,7 @@ export declare class ZakekeEnvironment {
|
|
|
312
370
|
setCameraLocked: (isBlocked?: boolean) => void;
|
|
313
371
|
isSceneTryOnEnabled: () => boolean;
|
|
314
372
|
getTryOnUrl: (tryOnUrl?: string) => Promise<string>;
|
|
315
|
-
saveComposition: (customPreviewSize?: CustomPreviewSize, legacyScreenshot?: boolean, isSharing?: boolean) => Promise<void>;
|
|
373
|
+
saveComposition: (customPreviewSize?: CustomPreviewSize, legacyScreenshot?: boolean, isSharing?: boolean, saveDesignFromTemplateEditor?: boolean) => Promise<void>;
|
|
316
374
|
private bootstrapComposition;
|
|
317
375
|
loadSavedComposition: (docID: string) => Promise<void>;
|
|
318
376
|
private updateSavedCompositions;
|
|
@@ -326,10 +384,10 @@ export declare class ZakekeEnvironment {
|
|
|
326
384
|
deleteSavedComposition: (docId: string) => Promise<void>;
|
|
327
385
|
applyTemplate: (templateGroupCompositionId: number) => Promise<void>;
|
|
328
386
|
configureByAI: (text: string) => Promise<void>;
|
|
329
|
-
getTryOnProvidersList: () => Promise<TryOnProvidersTypesMapping>;
|
|
387
|
+
getTryOnProvidersList: () => Promise<TryOnProvidersTypesMapping | null>;
|
|
330
388
|
getTryOnProductInfo: () => Promise<TryOnProduct | null>;
|
|
331
|
-
private getMessagesByProductCode;
|
|
332
389
|
getTryOnSellerInfo: (typeID: number, providerID: number) => Promise<TryOnSeller | null>;
|
|
390
|
+
private getMessagesByProductCode;
|
|
333
391
|
get hasVTryOnEnabled(): boolean;
|
|
334
392
|
get canUseTryOn(): boolean;
|
|
335
393
|
get canUsePD(): boolean;
|
|
@@ -353,5 +411,28 @@ export declare class ZakekeEnvironment {
|
|
|
353
411
|
getPrintingMethodsRestrictions: () => PrintingMethodsRestrictions;
|
|
354
412
|
setMouseWheelZoomEnabled: (enabled: boolean) => void;
|
|
355
413
|
setCameraPinchingZoom: (toggle: boolean) => void;
|
|
414
|
+
get isAiEditorEnabled(): boolean;
|
|
415
|
+
startAIStudio: () => Promise<void>;
|
|
416
|
+
private _aiPresetCategoriesPromise;
|
|
417
|
+
private _aiPresetPresetsPromise;
|
|
418
|
+
private fetchAllAIPresetCategories;
|
|
419
|
+
private fetchAllAIPresetPresets;
|
|
420
|
+
getAIPresetCategories: (presetType: string) => Promise<AIPresetCategory[]>;
|
|
421
|
+
getAIPresetPresets: (presetType: string) => Promise<AIPreset[]>;
|
|
422
|
+
getApplicableAIStagingRules: (options: {
|
|
423
|
+
productID?: number;
|
|
424
|
+
printTypeID?: number;
|
|
425
|
+
}) => Promise<AIProductStagingRule | null>;
|
|
426
|
+
getApplicableAIVirtualModelRules: (options: {
|
|
427
|
+
productID?: number;
|
|
428
|
+
printTypeID?: number;
|
|
429
|
+
}) => Promise<AIVirtualModelRule | null>;
|
|
430
|
+
private fetchServicesAvailability;
|
|
431
|
+
private createAIProductStagingTask;
|
|
432
|
+
private pollAIProductStagingTask;
|
|
433
|
+
generateAIProductStaging: (options: AIProductStagingOptions) => Promise<AIProductStagingResult>;
|
|
434
|
+
private createAIVirtualTryonTask;
|
|
435
|
+
private pollAIVirtualTryonTask;
|
|
436
|
+
generateAIVirtualTryon: (options: AIVirtualTryOnOptions) => Promise<AIVirtualTryOnResult>;
|
|
356
437
|
}
|
|
357
438
|
export {};
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
import { FontFamily, PlatformSettings, TextItem } from './models';
|
|
2
|
-
export interface PublicTranslations {
|
|
3
|
-
statics: Map<string, string>;
|
|
4
|
-
dynamics: Map<string, string>;
|
|
5
|
-
}
|
|
6
|
-
export declare class T {
|
|
7
|
-
static translations: PublicTranslations | null;
|
|
8
|
-
static _(str: string, domain: string): any;
|
|
9
|
-
static _d(str: string): string;
|
|
10
|
-
}
|
|
11
2
|
export declare function dataURLtoFile(dataurl: any, filename: any): File;
|
|
12
3
|
export declare class StringHelper {
|
|
13
4
|
static padLeft(str: string | number, width: number, char: string): string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
declare const MPlaza: any;
|
|
1
2
|
interface ImageTaskOptions {
|
|
2
3
|
convertEpsToSvg: boolean;
|
|
3
4
|
convertPdfToSvg: boolean;
|
|
@@ -9,7 +10,7 @@ export default class ImageUploadTask {
|
|
|
9
10
|
token: string;
|
|
10
11
|
options: ImageTaskOptions;
|
|
11
12
|
constructor(culture: string, token: string, options?: ImageTaskOptions);
|
|
12
|
-
upload: (file: File, onProgress?: (progress: number) => void) => Promise<any[] | null | undefined>;
|
|
13
|
+
upload: (file: File, onProgress?: ((progress: number) => void) | undefined) => Promise<any[] | null | undefined>;
|
|
13
14
|
addPrintingOptions: (printingOptions: MPlaza.PrintTypes | undefined) => void;
|
|
14
15
|
private uploadFileChunked;
|
|
15
16
|
private resumableUpload;
|
|
@@ -4,6 +4,7 @@ export * from './components/tryon/tryOnModels';
|
|
|
4
4
|
export * from './components/tryon/tryOnViewer';
|
|
5
5
|
export * from './components/tryon/tryOnModels';
|
|
6
6
|
export * from './environment';
|
|
7
|
+
export * from './helpers';
|
|
7
8
|
export * from './hooks/useZakeke';
|
|
8
9
|
export * from './hooks/tryonContext';
|
|
9
10
|
export * from './models';
|
|
@@ -10,8 +10,8 @@ export declare class PlatformAttributeSelection {
|
|
|
10
10
|
constructor(attributeCode: string, optionCode: string, attributeLabel: string, optionLabel: string, attributeIsEnabled: boolean, optionIsEnabled: boolean);
|
|
11
11
|
}
|
|
12
12
|
export interface Integration {
|
|
13
|
-
addToCart(composition: any, design: any, model: any, attributes: PlatformAttributeSelection[], designItems: Item[], quantity: number, additionalProperties: Record<string, any
|
|
14
|
-
getPrice(composition: any, design: any, model: any, attributes: PlatformAttributeSelection[], compositionPrice: number, isCustomPricingConfiguratorEnabled: boolean, isCustomPricingRuleBasedEnabled: boolean, quantity: number): Promise<number | {
|
|
13
|
+
addToCart(composition: any, design: any, model: any, attributes: PlatformAttributeSelection[], designItems: Item[], quantity: number, additionalProperties: Record<string, any>, shopifyNFTPrice: number): void;
|
|
14
|
+
getPrice(composition: any, design: any, model: any, attributes: PlatformAttributeSelection[], compositionPrice: number, isCustomPricingConfiguratorEnabled: boolean, isCustomPricingRuleBasedEnabled: boolean, quantity: number, shopifyNFTPrice: number): Promise<number | {
|
|
15
15
|
price: number;
|
|
16
16
|
isOutOfStock: boolean;
|
|
17
17
|
}>;
|
|
@@ -6,7 +6,7 @@ export default class MerchantIntegrationGeneric implements Integration {
|
|
|
6
6
|
private messageIds;
|
|
7
7
|
private pricingCalculator;
|
|
8
8
|
constructor();
|
|
9
|
-
addToCart(composition: any, design: any, model: any, attributes: PlatformAttributeSelection[], designItems: Item[], quantity: number, additionalProperties: any): void;
|
|
9
|
+
addToCart(composition: any, design: any, model: any, attributes: PlatformAttributeSelection[], designItems: Item[], quantity: number, additionalProperties: any, shopifyNFTPrice: number): void;
|
|
10
10
|
getPrice(composition: any, design: any, model: any, attributes: any, compositionPrice: any, isCustomPricingConfiguratorEnabled: any, isCustomPricingRuleBasedEnabled: any, quantity: number): Promise<number>;
|
|
11
11
|
getSharedCompositionUrl(compositionDocID: string): Promise<{
|
|
12
12
|
url: string;
|
|
@@ -198,8 +198,8 @@ export declare class Variant {
|
|
|
198
198
|
sku: string | undefined;
|
|
199
199
|
name: string | undefined;
|
|
200
200
|
price: number | undefined;
|
|
201
|
-
metadata?: any
|
|
202
|
-
constructor(id: number | undefined, sku: string | undefined, name: string | undefined, price: number | undefined, metadata?: any
|
|
201
|
+
metadata?: any;
|
|
202
|
+
constructor(id: number | undefined, sku: string | undefined, name: string | undefined, price: number | undefined, metadata?: any);
|
|
203
203
|
}
|
|
204
204
|
export declare class ZakekeEvent {
|
|
205
205
|
event: string;
|
|
@@ -437,6 +437,7 @@ export interface Settings {
|
|
|
437
437
|
ecommerceID: number | null;
|
|
438
438
|
addons: Addon[];
|
|
439
439
|
eventMessages: EventMessage[];
|
|
440
|
+
nftSettings: NftSettings;
|
|
440
441
|
brand: boolean;
|
|
441
442
|
isPdfEpsEnabled: boolean;
|
|
442
443
|
}
|
|
@@ -598,7 +599,7 @@ export interface OnBeforeSendDataToParent {
|
|
|
598
599
|
previewFiles: PreviewFile[];
|
|
599
600
|
additionalProperties: any;
|
|
600
601
|
}
|
|
601
|
-
export interface
|
|
602
|
+
export interface TemplateUploadRestrictions {
|
|
602
603
|
isUserImageAllowed: boolean;
|
|
603
604
|
isJpgAllowed: boolean;
|
|
604
605
|
isPngAllowed: boolean;
|
|
@@ -640,6 +641,14 @@ export interface CompositionClientPreview {
|
|
|
640
641
|
cameraName: string;
|
|
641
642
|
url: string;
|
|
642
643
|
}
|
|
644
|
+
export interface NftSettings {
|
|
645
|
+
isNFTEnabled: boolean;
|
|
646
|
+
priceToAdd: number;
|
|
647
|
+
}
|
|
648
|
+
export interface NftForm {
|
|
649
|
+
email: string;
|
|
650
|
+
walletAddress: string;
|
|
651
|
+
}
|
|
643
652
|
export interface SelectedCategory {
|
|
644
653
|
categoryID: number;
|
|
645
654
|
name: string;
|
|
@@ -993,6 +1002,11 @@ export interface UIConfig {
|
|
|
993
1002
|
urlLoader: string;
|
|
994
1003
|
urlARIcon: string;
|
|
995
1004
|
}
|
|
1005
|
+
export interface SceneAnimationsConfig {
|
|
1006
|
+
runAtStart?: boolean | null;
|
|
1007
|
+
loop?: boolean | null;
|
|
1008
|
+
speed?: number | null;
|
|
1009
|
+
}
|
|
996
1010
|
export interface DAMViewerAnalyticsType {
|
|
997
1011
|
modelCode: string;
|
|
998
1012
|
userId: number;
|
|
@@ -1002,4 +1016,197 @@ export declare enum DAMViewerAnalyticsEventType {
|
|
|
1002
1016
|
ViewProduct = "VIEW_PRODUCT",
|
|
1003
1017
|
ViewArProdutc = "VIEW_AR_PRODUCT"
|
|
1004
1018
|
}
|
|
1019
|
+
export interface GraphQLWelcomeMessageResponse {
|
|
1020
|
+
data: {
|
|
1021
|
+
messagesByProduct: null | GraphQLWelcomeMessageData[];
|
|
1022
|
+
};
|
|
1023
|
+
}
|
|
1024
|
+
export interface GraphQLWelcomeMessageData {
|
|
1025
|
+
id: string;
|
|
1026
|
+
eventGlobalID: string;
|
|
1027
|
+
messageId: number;
|
|
1028
|
+
messageText: string;
|
|
1029
|
+
eventName: string;
|
|
1030
|
+
eventId: number;
|
|
1031
|
+
closeable: boolean;
|
|
1032
|
+
visible: boolean;
|
|
1033
|
+
addToCartDisabledValue: boolean;
|
|
1034
|
+
enableCheckForSellerImagesValue: boolean;
|
|
1035
|
+
enableAdditionalMessage: boolean;
|
|
1036
|
+
additionalMessage: string | null;
|
|
1037
|
+
eventMessageId: number;
|
|
1038
|
+
title: string | null;
|
|
1039
|
+
titleSingleMessage: string | null;
|
|
1040
|
+
infoLink: string | null;
|
|
1041
|
+
defaultMessage: string | null;
|
|
1042
|
+
visibleOnlyOnApi: boolean | null;
|
|
1043
|
+
addToCartLabel: string | null;
|
|
1044
|
+
visibleLowQualityInfoText: boolean | null;
|
|
1045
|
+
defaultAdditionalMessageText: string | null;
|
|
1046
|
+
warningText: string | null;
|
|
1047
|
+
onDeleteWarningText: string | null;
|
|
1048
|
+
isDefault?: boolean | null;
|
|
1049
|
+
}
|
|
1050
|
+
/**
|
|
1051
|
+
* AI Studio Types
|
|
1052
|
+
* These interfaces are used for AI-powered product staging and virtual try-on features
|
|
1053
|
+
*/
|
|
1054
|
+
/**
|
|
1055
|
+
* Represents a category for AI presets
|
|
1056
|
+
*/
|
|
1057
|
+
export interface AIPresetCategory {
|
|
1058
|
+
id: number;
|
|
1059
|
+
name: string;
|
|
1060
|
+
toolId: string;
|
|
1061
|
+
presetType: string;
|
|
1062
|
+
sellerID: number | null;
|
|
1063
|
+
isActive: boolean;
|
|
1064
|
+
createdDate: string;
|
|
1065
|
+
modifiedDate: string;
|
|
1066
|
+
}
|
|
1067
|
+
/**
|
|
1068
|
+
* Represents an AI preset configuration
|
|
1069
|
+
*/
|
|
1070
|
+
export interface AIPreset {
|
|
1071
|
+
id: number;
|
|
1072
|
+
name: string;
|
|
1073
|
+
toolId: string;
|
|
1074
|
+
presetType: string;
|
|
1075
|
+
categoryId: number | null;
|
|
1076
|
+
prompt: string | null;
|
|
1077
|
+
negativePrompt: string | null;
|
|
1078
|
+
imageUrl: string | null;
|
|
1079
|
+
previewUrl: string | null;
|
|
1080
|
+
factor: number | null;
|
|
1081
|
+
description: string | null;
|
|
1082
|
+
sellerID: number | null;
|
|
1083
|
+
isActive: boolean;
|
|
1084
|
+
sortOrder: number;
|
|
1085
|
+
createdDate: string;
|
|
1086
|
+
modifiedDate: string;
|
|
1087
|
+
categoryName: string | null;
|
|
1088
|
+
}
|
|
1089
|
+
/**
|
|
1090
|
+
* Represents rules for AI product staging
|
|
1091
|
+
*/
|
|
1092
|
+
export interface AIProductStagingRule {
|
|
1093
|
+
ruleID: number;
|
|
1094
|
+
name: string;
|
|
1095
|
+
sellerID: number;
|
|
1096
|
+
allowCustomBackground: boolean;
|
|
1097
|
+
numberOfImages: number;
|
|
1098
|
+
createdDate: string;
|
|
1099
|
+
productIDs: number[];
|
|
1100
|
+
printTypeIDs: number[];
|
|
1101
|
+
backgroundCategoryIDs: number[];
|
|
1102
|
+
surfacePresetIDs: number[];
|
|
1103
|
+
moodPresetIDs: number[];
|
|
1104
|
+
effectPresetIDs: number[];
|
|
1105
|
+
}
|
|
1106
|
+
/**
|
|
1107
|
+
* Options for AI product staging generation
|
|
1108
|
+
*/
|
|
1109
|
+
export interface AIProductStagingOptions {
|
|
1110
|
+
productImageUrl: string;
|
|
1111
|
+
backgroundType?: string;
|
|
1112
|
+
backgroundPreset?: number;
|
|
1113
|
+
backgroundImageUrl?: string;
|
|
1114
|
+
surfacePreset?: number;
|
|
1115
|
+
moodPreset?: number;
|
|
1116
|
+
customPrompt?: string;
|
|
1117
|
+
effectPreset?: number;
|
|
1118
|
+
progress?: (progress: number) => void;
|
|
1119
|
+
}
|
|
1120
|
+
/**
|
|
1121
|
+
* Result from AI product staging generation
|
|
1122
|
+
*/
|
|
1123
|
+
export interface AIProductStagingResult {
|
|
1124
|
+
imageUrl: string;
|
|
1125
|
+
taskId: string;
|
|
1126
|
+
}
|
|
1127
|
+
/**
|
|
1128
|
+
* Options for AI virtual try-on generation
|
|
1129
|
+
*/
|
|
1130
|
+
export interface AIVirtualTryOnOptions {
|
|
1131
|
+
personImageUrl?: string;
|
|
1132
|
+
personPreset?: number;
|
|
1133
|
+
clothingImageUrl?: string;
|
|
1134
|
+
clothingPreset?: number;
|
|
1135
|
+
backgroundImageUrl?: string;
|
|
1136
|
+
backgroundPreset?: number;
|
|
1137
|
+
customPrompt?: string;
|
|
1138
|
+
effectPreset?: number;
|
|
1139
|
+
posePreset?: number;
|
|
1140
|
+
progress?: (progress: number) => void;
|
|
1141
|
+
}
|
|
1142
|
+
/**
|
|
1143
|
+
* Result from AI virtual try-on generation
|
|
1144
|
+
*/
|
|
1145
|
+
export interface AIVirtualTryOnResult {
|
|
1146
|
+
imageUrl: string;
|
|
1147
|
+
taskId: string;
|
|
1148
|
+
}
|
|
1149
|
+
/**
|
|
1150
|
+
* Service availability flags from subscription API
|
|
1151
|
+
*/
|
|
1152
|
+
export interface AIServicesAvailability {
|
|
1153
|
+
GENERATIVE_AI_DESIGN: boolean;
|
|
1154
|
+
GENERATIVE_AI_IMAGE_GENERATOR: boolean;
|
|
1155
|
+
GENERATIVE_AI_PRODUCT_STAGING: boolean;
|
|
1156
|
+
GENERATIVE_AI_VTO: boolean;
|
|
1157
|
+
VECTORIZE: boolean;
|
|
1158
|
+
}
|
|
1159
|
+
/**
|
|
1160
|
+
* VTO filtering rules (from /api/v1/AIVirtualModelRule/applicable)
|
|
1161
|
+
*/
|
|
1162
|
+
export interface AIVirtualModelRule {
|
|
1163
|
+
ruleID: number;
|
|
1164
|
+
name: string;
|
|
1165
|
+
sellerID: number;
|
|
1166
|
+
numberOfImages: number;
|
|
1167
|
+
allowCustomBackground: boolean;
|
|
1168
|
+
createdDate: string;
|
|
1169
|
+
productIDs: number[];
|
|
1170
|
+
printTypeIDs: number[];
|
|
1171
|
+
backgroundCategoryIDs: number[];
|
|
1172
|
+
effectPresetIDs: number[];
|
|
1173
|
+
modelPresetIDs: number[];
|
|
1174
|
+
poseCategoryIDs: number[];
|
|
1175
|
+
}
|
|
1176
|
+
/**
|
|
1177
|
+
* Tool types for AI rate limiting
|
|
1178
|
+
*/
|
|
1179
|
+
export type AIToolType = 'AIStudio' | 'CustomizerAIImageGenerator' | 'CustomizerProductStaging' | 'CustomizerVirtualTryOn' | 'CustomizerDesignGenerator';
|
|
1180
|
+
/**
|
|
1181
|
+
* Rule level for tool usage
|
|
1182
|
+
*/
|
|
1183
|
+
export type AIRuleLevel = 'Seller' | 'Global';
|
|
1184
|
+
/**
|
|
1185
|
+
* Limit period type for tool usage
|
|
1186
|
+
*/
|
|
1187
|
+
export type AILimitPeriodType = 'Session' | 'Minutes';
|
|
1188
|
+
/**
|
|
1189
|
+
* Tool usage rule for AI rate limiting
|
|
1190
|
+
*/
|
|
1191
|
+
export interface AIToolUsageRule {
|
|
1192
|
+
toolType: AIToolType;
|
|
1193
|
+
hasRule: boolean;
|
|
1194
|
+
toolUsageRuleID: number | null;
|
|
1195
|
+
ruleLevel: AIRuleLevel | null;
|
|
1196
|
+
allowLoggedUsers: boolean | null;
|
|
1197
|
+
allowNonLoggedUsers: boolean | null;
|
|
1198
|
+
limitEnabled: boolean | null;
|
|
1199
|
+
limitPeriodType: AILimitPeriodType | null;
|
|
1200
|
+
maxOperations: number | null;
|
|
1201
|
+
limitPeriodMinutes: number | null;
|
|
1202
|
+
}
|
|
1203
|
+
/**
|
|
1204
|
+
* Error thrown when AI generation rate limit is reached.
|
|
1205
|
+
* Contains the tool usage rule and last generation timestamp for calculating remaining cooldown.
|
|
1206
|
+
*/
|
|
1207
|
+
export declare class AIRateLimitError extends Error {
|
|
1208
|
+
readonly toolUsageRule: AIToolUsageRule;
|
|
1209
|
+
readonly lastGenerationTime?: number;
|
|
1210
|
+
constructor(message: string, toolUsageRule: AIToolUsageRule, lastGenerationTime?: number);
|
|
1211
|
+
}
|
|
1005
1212
|
export {};
|
|
@@ -11,6 +11,8 @@ declare const useInternalState: () => {
|
|
|
11
11
|
declare const ZakekeProvider: FunctionComponent<{
|
|
12
12
|
parameters?: BootParameters | null;
|
|
13
13
|
environment: ZakekeEnvironment;
|
|
14
|
-
children?: React.ReactNode;
|
|
14
|
+
children?: React.ReactNode | React.ReactElement;
|
|
15
15
|
}>;
|
|
16
16
|
export { ZakekeProvider, useInternalState };
|
|
17
|
+
export type { AIPreset, AIPresetCategory, AIProductStagingRule, AIProductStagingOptions, AIProductStagingResult, AIVirtualTryOnOptions, AIVirtualTryOnResult, AIServicesAvailability, AIVirtualModelRule, AIToolUsageRule, AILimitPeriodType, } from '../models';
|
|
18
|
+
export { AIRateLimitError } from '../models';
|