import { RequestOptionsFactory } from '@wix/sdk-types'; /** * Creates a policy. * * * * * The `createPolicy()` function returns a Promise that resolves to the newly-created policy. * * You can create up to 3 policies per event. If you try to create more than 3, you'll get the "Maximum number of policies for the event has been reached" error. */ export declare function createPolicy(payload: object): RequestOptionsFactory; /** * Updates a policy. * * * * The `updatePolicy()` function returns a Promise that resolves to the newly-updated policy. * * Each time the policy is updated, `revision` increments by 1. The existing `revision` must be included when updating the policy. This ensures you're working with the latest policy and prevents unintended overwrites. */ export declare function updatePolicy(payload: object): RequestOptionsFactory; /** * Permanently deletes a policy. * * * * * The `deletePolicy()` function returns a Promise that resolves when the specified policy is deleted. * * Deleted policies are not returned by the `getPolicy()` or `queryPolicies()` functions. */ export declare function deletePolicy(payload: object): RequestOptionsFactory; /** * Creates a query to retrieve a list of policies, given the provided paging and filter. * * * The `queryPolicies()` function builds a query to retrieve a list of policies and returns a [PoliciesQueryBuilder](https://www.wix.com/velo/reference/wix-events-v2/policies/policiesquerybuilder) object. * * The returned object contains the query definition which is typically used to run the query using the [`find()`](https://www.wix.com/velo/reference/wix-events-v2/policies/policiesquerybuilder/find) function. * * You can refine the query by chaining `PoliciesQueryBuilder` functions onto the query. `PoliciesQueryBuilder` functions enable you to sort, filter and control the results that `PoliciesQueryBuilder.find()` returns. * * The query runs with the following `PoliciesQueryBuilder` defaults that you can override: * * [`limit`](https://www.wix.com/velo/reference/wix-events-v2/policies/policiesquerybuilder/limit): `50` * [`descending`](https://www.wix.com/velo/reference/wix-events-v2/policies/policiesquerybuilder/descending): `_createdDate` * * The functions that are chained to `queryPolicies()` are applied in the order they are called. For example, if you sort on the `_createdDate` property in ascending order and then on the id property in descending order, the results are sorted by the created date and then, if there are multiple results with the same date, the items are sorted by the id. * * The table below shows which `PoliciesQueryBuilder` functions are supported for `queryPoliciesGuests()`. You can only use one filter function for each property. If a property is used in more than one filter, only the first filter will work. */ export declare function queryPolicies(payload: object): RequestOptionsFactory; /** * Changes policy order in an event dashboard and agreement checkbox on the checkout form. * For example, if we have 3 policies in the list, after using this function the 3rd policy will become the 1st, and other policies will move by 1 position. By default, the policies are arranged by the created date in descending order. * * > **Note**: it is possible to use both `beforePolicyId` and `afterPolicyId` at the same time but only the last one defined will be executed. * * * * The `reorderEventPolicies()` function returns a Promise that resolves to the newly-reordered policy. */ export declare function reorderEventPolicies(payload: object): RequestOptionsFactory; /** * Retrieves a policy by ID. * * * The `getPolicy()` function returns a Promise that resolves to a policy whose ID matches the given ID. */ export declare function getPolicy(payload: object): RequestOptionsFactory;