import { ServicePluginDefinition } from '@wix/sdk-types'; import { Context, ValidateConfigurationRequest, ValidateConfigurationResponse, GetQuotaInfoRequest, GetQuotaInfoResponse, InvokeRequest, InvokeResponse } from './service-plugins-types.js'; export interface ValidateConfigurationEnvelope { request: ValidateConfigurationRequest; metadata: Context; } export interface GetQuotaInfoEnvelope { request: GetQuotaInfoRequest; metadata: Context; } export interface InvokeEnvelope { request: InvokeRequest; metadata: Context; } export declare const provideHandlers: ServicePluginDefinition<{ /** * * This endpoint is used to validate the user's action configuration. * * Wix calls this endpoint when a site contributor configures an automation with your action, * and when they select the automation from the **Your automations** list in the **Automations** dashboard. * Wix uses the returned response to display an error message to a site contributor if the action is invalid. * * Implementing this endpoint is optional. To implement it, select the endpoint under **Action's service plugin Endpoints** when editing your * action in the app dashboard. If you don't implement this endpoint, Wix assumes that the action is always valid. * * As an example, a user configures an action called “Send gift card”, where a gift card is identified by a unique UUID. * After some period of time the user deletes the gift card, making the action’s mapping with the current * UUID invalid. Validate Configuration checks the validity of the action’s input values, and returns an error to the user * if one or more of the values is not valid. */ validateConfiguration(payload: ValidateConfigurationEnvelope): ValidateConfigurationResponse | Promise; /** * * This endpoint retrieves quota information for an action. * * Wix calls this endpoint when a site contributor opens the **Manage your automations quotas** modal * in the **Automations** dashboard. The response from this endpoint is displayed in the modal. * The data is displayed based on the response body format. Learn more about [quota display options](https://dev.wix.com/docs/rest/api-reference/wix-automations/action-provider-v1/displaying-action-quotas). * * Implementing this endpoint is optional. To implement it, select the endpoint under **Action's service plugin Endpoints** when editing your * action in the app dashboard. * * > **Notes:** * > * Wix doesn't enforce action quota limits, it only displays them to the user. * > Enforcing quota limits is the action provider's responsibility. */ getQuotaInfo(payload: GetQuotaInfoEnvelope): GetQuotaInfoResponse | Promise; /** * * This endpoint is used to invoke an action provider's action. * * Wix calls this endpoint when an automation using the provider's action is triggered. The request body includes * all the data needed to execute the action including the final values of any dynamic parameters. * * There is no need to validate the data in the request body against the JSON schema defined when the action was configured. * Wix validates the data before calling this endpoint. */ invoke(payload: InvokeEnvelope): InvokeResponse | Promise; }>;