import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient"; import * as core from "../../../../core"; import * as Webflow from "../../../index"; export declare namespace Scripts { interface Options extends BaseClientOptions { } interface RequestOptions extends BaseRequestOptions { } } export declare class Scripts { protected readonly _options: Scripts.Options; constructor(_options: Scripts.Options); /** * Get a list of scripts that have been registered to a site. A site can have a maximum of 800 registered scripts. * * * To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. * * * Required scope | `custom_code:read` * * @param {string} siteId - Unique identifier for a Site * @param {Scripts.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Webflow.BadRequestError} * @throws {@link Webflow.UnauthorizedError} * @throws {@link Webflow.NotFoundError} * @throws {@link Webflow.TooManyRequestsError} * @throws {@link Webflow.InternalServerError} * * @example * await client.scripts.list("580e63e98c9a982ac9b8b741") */ list(siteId: string, requestOptions?: Scripts.RequestOptions): core.HttpResponsePromise; private __list; /** * Register a hosted script to a site. * * * To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. * * * Required scope | `custom_code:write` * * @param {string} siteId - Unique identifier for a Site * @param {Webflow.CustomCodeHostedRequest} request * @param {Scripts.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Webflow.BadRequestError} * @throws {@link Webflow.UnauthorizedError} * @throws {@link Webflow.NotFoundError} * @throws {@link Webflow.TooManyRequestsError} * @throws {@link Webflow.InternalServerError} * * @example * await client.scripts.registerHosted("580e63e98c9a982ac9b8b741", { * hostedLocation: "hostedLocation", * integrityHash: "integrityHash", * version: "version", * displayName: "displayName" * }) */ registerHosted(siteId: string, request: Webflow.CustomCodeHostedRequest, requestOptions?: Scripts.RequestOptions): core.HttpResponsePromise; private __registerHosted; /** * Register an inline script to a site. Inline scripts are limited to 2000 characters. * * * To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. * * * Required scope | `custom_code:write` * * @param {string} siteId - Unique identifier for a Site * @param {Webflow.CustomCodeInlineRequest} request * @param {Scripts.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Webflow.BadRequestError} * @throws {@link Webflow.UnauthorizedError} * @throws {@link Webflow.NotFoundError} * @throws {@link Webflow.TooManyRequestsError} * @throws {@link Webflow.InternalServerError} * * @example * await client.scripts.registerInline("580e63e98c9a982ac9b8b741", { * sourceCode: "alert('hello world');", * version: "0.0.1", * displayName: "Alert" * }) */ registerInline(siteId: string, request: Webflow.CustomCodeInlineRequest, requestOptions?: Scripts.RequestOptions): core.HttpResponsePromise; private __registerInline; protected _getAuthorizationHeader(): Promise; }