import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types'; import { Policy, CreatePolicyApplicationErrors, UpdatePolicy, ReorderEventPoliciesOptions, ReorderEventPoliciesResponse, ReorderEventPoliciesApplicationErrors, PolicyCreatedEnvelope, PolicyDeletedEnvelope, PolicyUpdatedEnvelope, PoliciesQueryBuilder, PolicyQuery, typedQueryPolicies } from './index.typings.js'; export { AccountInfo, AccountInfoMetadata, ActionEvent, Address, AddressLocation, AddressStreetOneOf, BaseEventMetadata, CommonQueryWithEntityContext, CreatePolicyRequest, CreatePolicyResponse, CursorPaging, Cursors, DeletePolicyRequest, DeletePolicyResponse, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventCopied, EventMetadata, EventStatus, EventStatusWithLiterals, GetPolicyRequest, GetPolicyResponse, IdentificationData, IdentificationDataIdOneOf, Location, LocationType, LocationTypeWithLiterals, MapCoordinates, MessageEnvelope, Occurrence, Paging, PagingMetadataV2, PoliciesQueryResult, PolicyQuerySpec, QueryPoliciesRequest, QueryPoliciesResponse, QueryV2, QueryV2PagingMethodOneOf, Recurrences, ReorderEventPoliciesOptionsReferencePolicyOneOf, ReorderEventPoliciesRequest, ReorderEventPoliciesRequestReferencePolicyOneOf, RestoreInfo, ScheduleConfig, SortOrder, SortOrderWithLiterals, Sorting, Status, StatusWithLiterals, StreetAddress, Subdivision, SubdivisionType, SubdivisionTypeWithLiterals, UpdatePolicyRequest, UpdatePolicyResponse, UpdatePolicySortIndexRequest, UpdatePolicySortIndexResponse, WebhookIdentityType, WebhookIdentityTypeWithLiterals, utils } from './index.typings.js'; declare function createPolicy$1(httpClient: HttpClient): CreatePolicySignature; interface CreatePolicySignature { /** * 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. * @param - Policy info. * @returns Created policy. */ (policy: NonNullablePaths): Promise & { __applicationErrorsType?: CreatePolicyApplicationErrors; }>; } declare function updatePolicy$1(httpClient: HttpClient): UpdatePolicySignature; interface UpdatePolicySignature { /** * 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. * @param - Policy to update. * @param - Policy ID. * @returns The updated policy. */ (_id: string, policy: NonNullablePaths): Promise>; } declare function deletePolicy$1(httpClient: HttpClient): DeletePolicySignature; interface DeletePolicySignature { /** * 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. * @param - Options for Delete Policy function. * @param - ID of the policy to delete. */ (policyId: string): Promise; } declare function reorderEventPolicies$1(httpClient: HttpClient): ReorderEventPoliciesSignature; interface ReorderEventPoliciesSignature { /** * 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. * @param - Event policy ID. * @param - Event ID. * @param - Options for Reorder Event Policies function. */ (policyId: string, eventId: string, options?: ReorderEventPoliciesOptions): Promise & { __applicationErrorsType?: ReorderEventPoliciesApplicationErrors; }>; } declare function getPolicy$1(httpClient: HttpClient): GetPolicySignature; interface GetPolicySignature { /** * Retrieves a policy by ID. * * * The `getPolicy()` function returns a Promise that resolves to a policy whose ID matches the given ID. * @param - Policy ID. * @returns The requested policy. */ (policyId: string): Promise>; } declare const onPolicyCreated$1: EventDefinition; declare const onPolicyDeleted$1: EventDefinition; declare const onPolicyUpdated$1: EventDefinition; declare function customQueryPolicies(httpClient: HttpClient): { (): PoliciesQueryBuilder; (query: PolicyQuery): ReturnType; }; declare const createPolicy: MaybeContext & typeof createPolicy$1>; declare const updatePolicy: MaybeContext & typeof updatePolicy$1>; declare const deletePolicy: MaybeContext & typeof deletePolicy$1>; declare const reorderEventPolicies: MaybeContext & typeof reorderEventPolicies$1>; declare const getPolicy: MaybeContext & typeof getPolicy$1>; declare const queryPolicies: MaybeContext & typeof customQueryPolicies>; /** * Triggered when a policy is created. */ declare const onPolicyCreated: BuildEventDefinition & typeof onPolicyCreated$1; /** * Triggered when a policy is deleted. */ declare const onPolicyDeleted: BuildEventDefinition & typeof onPolicyDeleted$1; /** * Triggered when a policy is updated. */ declare const onPolicyUpdated: BuildEventDefinition & typeof onPolicyUpdated$1; export { CreatePolicyApplicationErrors, PoliciesQueryBuilder, Policy, PolicyCreatedEnvelope, PolicyDeletedEnvelope, PolicyQuery, PolicyUpdatedEnvelope, ReorderEventPoliciesApplicationErrors, ReorderEventPoliciesOptions, ReorderEventPoliciesResponse, UpdatePolicy, createPolicy, deletePolicy, getPolicy, onPolicyCreated, onPolicyDeleted, onPolicyUpdated, queryPolicies, reorderEventPolicies, updatePolicy };