export interface ScriptProperties { /** Script parameters. */ parameters?: Record; /** Whether script is disabled or not. Default: `false` (not disabled). */ disabled?: boolean; } export interface EmbedScriptRequest { /** Details of the script to embed. */ properties: ScriptProperties; /** Component ID of the embedded script. Available as a query parameter in the embedded script's extension page in the app dashboard. */ componentId?: string | null; } export interface EmbedScriptResponse { /** Details of the embedded script. */ properties?: ScriptProperties; } export interface GetEmbeddedScriptRequest { /** Component ID of the embedded script to retrieve. Available as a query parameter in the embedded script's extension page in the app dashboard. */ componentId?: string | null; } export interface GetEmbeddedScriptResponse { /** Details of the retrieved embedded script. */ properties?: ScriptProperties; } export interface EmbedScriptByInstanceIdRequest { instanceId?: string; /** Parameters to embed */ properties?: ScriptProperties; componentId?: string | null; } export interface GetEmbeddedScriptByInstanceIdRequest { instanceId?: string; componentId?: string | null; } export interface ScriptPropertiesNonNullableFields { disabled: boolean; } export interface EmbedScriptResponseNonNullableFields { properties?: ScriptPropertiesNonNullableFields; } export interface GetEmbeddedScriptResponseNonNullableFields { properties?: ScriptPropertiesNonNullableFields; } /** * Inserts custom script tags into a site, with the specified values for any dynamic parameters. Call this method when your app is installed on a site. * * Your app must have an existing * [embedded script component](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/site-extensions/embedded-scripts/about-embedded-scripts), * with exactly matching parameter names. * @param properties - Details of the script to embed. * @public * @requiredField properties * @permissionId APPS.MANAGE_EMBEDDED_SCRIPT * @permissionScope Manage Embedded Scripts * @permissionScopeId SCOPE.DC-APPS.MANAGE-EMBEDDED-SCRIPTS * @applicableIdentity APP * @fqn com.wixpress.market.aim.api.EmbeddedScriptsService.EmbedScript */ export declare function embedScript(properties: ScriptProperties, options?: EmbedScriptOptions): Promise; export interface EmbedScriptOptions { /** Component ID of the embedded script. Available as a query parameter in the embedded script's extension page in the app dashboard. */ componentId?: string | null; } /** * Retrieves information about your app's existing embedded script. * * If your app doesn't have an embedded script on the relevant site, a `404` error is returned. * @public * @permissionId APPS.MANAGE_EMBEDDED_SCRIPT * @permissionScope Manage Embedded Scripts * @permissionScopeId SCOPE.DC-APPS.MANAGE-EMBEDDED-SCRIPTS * @applicableIdentity APP * @returns Details of the retrieved embedded script. * @fqn com.wixpress.market.aim.api.EmbeddedScriptsService.GetEmbeddedScript */ export declare function getEmbeddedScript(options?: GetEmbeddedScriptOptions): Promise; export interface GetEmbeddedScriptOptions { /** Component ID of the embedded script to retrieve. Available as a query parameter in the embedded script's extension page in the app dashboard. */ componentId?: string | null; }