import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types'; import { ManagementGetOrderOptions, GetOrderResponse, ManagementListOrdersOptions, ListOrdersResponse, CancellationEffectiveAtWithLiterals, CreateOnlineOrderOptions, CreateOnlineOrderResponse, CreateOnlineOrderApplicationErrors, CreateOnlineOrderValidationErrors, CreateOfflineOrderOptions, CreateOfflineOrderResponse, CreateOfflineOrderApplicationErrors, CreateOfflineOrderValidationErrors, GetOnlineOrderPreviewOptions, GetOnlineOrderPreviewResponse, GetOnlineOrderPreviewApplicationErrors, GetOnlineOrderPreviewValidationErrors, GetOfflineOrderPreviewOptions, GetOfflineOrderPreviewResponse, GetOfflineOrderPreviewApplicationErrors, GetOfflineOrderPreviewValidationErrors, GetPricePreviewOptions, GetPricePreviewResponse, GetPricePreviewApplicationErrors, MemberGetOrderOptions, Order, MemberListOrdersOptions, MemberListOrdersResponse, OrderAutoRenewCanceledEnvelope, OrderCanceledEnvelope, OrderCycleStartedEnvelope, OrderEndDatePostponedEnvelope, OrderEndedEnvelope, OrderMarkedAsPaidEnvelope, OrderPausedEnvelope, OrderPurchasedEnvelope, OrderResumedEnvelope, OrderStartedEnvelope, OrderUpdatedEnvelope, OrderCreatedEnvelope, OrderStartDateChangedEnvelope } from './index.typings.js'; export { AccountInfo, AccountInfoMetadata, ActionEvent, ApplicationError, ApplyCouponRequest, ApplyCouponResponse, BaseEventMetadata, BulkActionMetadata, BulkOrderResult, BulkPauseOrderRequest, BulkPauseOrderResponse, BulkResumeOrderRequest, BulkResumeOrderResponse, Buyer, CancelOrderRequest, CancelOrderResponse, Cancellation, CancellationCause, CancellationCauseWithLiterals, CancellationEffectiveAt, Captcha, ChangeStartDateRequest, ChangeStartDateResponse, Coupon, CouponsError, CreateExternalOrderRequest, CreateExternalOrderResponse, CreateGuestOnlineOrderRequest, CreateGuestOnlineOrderResponse, CreateOfflineOrderRequest, CreateOnlineOrderRequest, CurrentCycle, CursorPaging, Cursors, DomainEvent, DomainEventBodyOneOf, Duration, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, Fee, FormData, GetAvailableOrderActionsRequest, GetAvailableOrderActionsResponse, GetGuestOnlineOrderPreviewRequest, GetGuestOnlineOrderPreviewResponse, GetOfflineOrderPreviewRequest, GetOnlineOrderPreviewRequest, GetOrderRequest, GetOrdersStatsRequest, GetOrdersStatsResponse, GetPricePreviewRequest, Guest, IdentificationData, IdentificationDataIdOneOf, ItemMetadata, ListOrdersRequest, MarkAsPaidRequest, MarkAsPaidResponse, MemberGetOrderRequest, MemberGetOrderResponse, MemberListOrdersRequest, MessageEnvelope, OnBehalf, OrderAutoRenewCanceled, OrderCanceled, OrderCycle, OrderCycleStarted, OrderEndDatePostponed, OrderEnded, OrderMarkedAsPaid, OrderMethod, OrderMethodWithLiterals, OrderPaused, OrderPurchased, OrderResumed, OrderStartDateChanged, OrderStarted, OrderStatus, OrderStatusWithLiterals, OrderType, OrderTypeWithLiterals, OrdersQueryOrdersRequest, OrdersQueryOrdersResponse, Paging, PagingMetadataV2, PauseOrderRequest, PauseOrderResponse, PausePeriod, PaymentStatus, PaymentStatusWithLiterals, PeriodUnit, PeriodUnitWithLiterals, PostponeEndDateRequest, PostponeEndDateResponse, Price, PriceDetails, PriceDetailsPricingModelOneOf, PriceDuration, PricingDetails, PricingDetailsPricingModelOneOf, QueryOrdersRequest, QueryOrdersResponse, QueryV2, QueryV2PagingMethodOneOf, ReasonNotSuspendable, ReasonNotSuspendableWithLiterals, Recurrence, RequestCancellationRequest, RequestCancellationResponse, RestoreInfo, ResumeOrderRequest, ResumeOrderResponse, Set, SetSubmissionRequest, SetSubmissionResponse, SetWithLiterals, SortOrder, SortOrderWithLiterals, Sorting, SpannedPrice, Status, StatusWithLiterals, Tax, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.js'; declare function managementGetOrder$1(httpClient: HttpClient): ManagementGetOrderSignature; interface ManagementGetOrderSignature { /** * Retrieves an order by ID. * @param - Order ID. * @param - Options to use when getting an order. */ (_id: string, options?: ManagementGetOrderOptions): Promise>; } declare function managementListOrders$1(httpClient: HttpClient): ManagementListOrdersSignature; interface ManagementListOrdersSignature { /** * Retrieves a list of up to 50 pricing plan orders and details, given the specified sorting and filtering. * * By default, this endpoint will retrieve all orders and return them sorted by `createdDate` in `DESC`, descending order. * `sort.fieldName` supports `endDate` and `createdDate` fields and defaults to `ASC`, ascending order. * @param - Filtering, sorting, and pagination options. */ (options?: ManagementListOrdersOptions): Promise>; } declare function postponeEndDate$1(httpClient: HttpClient): PostponeEndDateSignature; interface PostponeEndDateSignature { /** * Extends the duration of a pricing plan order by postponing the order's `endDate`. Postponing the end date of an order does not impact payments. * * New `endDate` must be later than the order's current `endDate`. Can't postpone orders that are unlimited. * Can't postpone an order with `status`: `PAUSED`. * @param - Order ID. * @param - New end date and time. * * Must be later than the current end date and time. * @param - Options for postponing the end date of an order. */ (_id: string, endDate: Date): Promise; } declare function cancelOrder$1(httpClient: HttpClient): CancelOrderSignature; interface CancelOrderSignature { /** * Cancels an existing order. * * For orders with recurring payments, a cancellation can be set to occur either `IMMEDIATELY` or at the `NEXT_PAYMENT_DATE`. * For orders with one-time payments, a cancellation can only be set for `IMMEDIATELY`. * * #### Canceling during the free trial period. * * When a buyer cancels their order during the free trial period, the buyer's subscription expires at the end * of the free trial period and they will not be billed. The buyer may continue using the benefits until the end * of the free trial period. * * When a Wix user cancels an ordered plan during the free trial period, they choose whether to apply the cancellation * `IMMEDIATELY` or at the `NEXT_PAYMENT_DATE`. Canceling `IMMEDIATELY` will end the subscription for the buyer * immediately, even during the free trial period and the buyer won't be billed. Canceling at the * `NEXT_PAYMENT_DATE` allows the buyer to continue using the benefits of the subscription until the end of the free trial period. * Then, the subscription ends and the buyer is not billed. * @param - Order ID. * @param - __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`. * @param - Options for canceling orders. */ (_id: string, effectiveAt: CancellationEffectiveAtWithLiterals): Promise; } declare function markAsPaid$1(httpClient: HttpClient): MarkAsPaidSignature; interface MarkAsPaidSignature { /** * Marks an offline order as paid. * > __Note__: Marking separate payment cycles as paid is not yet supported. The entire order will be marked as paid. Subsequent offline payments do trigger events and emails, but are not registered as additional offline payments. * * Marking an offline order as paid causes the following changes: * - The order's `lastPaymentStatus` changes to `"PAID"`. * - The order's status changes to either `"PENDING"` or `"ACTIVE"`, depending on the order's `startDate`. * * An error occurs if you attempt to: * - Mark an already-paid, offline order as paid. You cannot mark an offline order as paid twice. * - Mark an online order as paid. The Mark as Paid method is supported for offline orders only. * @param - Order ID. */ (_id: string): Promise; } declare function pauseOrder$1(httpClient: HttpClient): PauseOrderSignature; interface PauseOrderSignature { /** * Pauses an order. Calling this method changes the order status to `"PAUSED"` and updates the `pausePeriods` array. * * Only orders with `status`: `ACTIVE` can be paused. * For orders with recurring payments, it also pauses the payment schedule. Buyers are not charged when an order is paused. * Pausing an order affects the end date of the order by adding the time the order is paused to the `endDate`. * The `endDate` and the `earliestEndDate` for the order are adjusted to include the pause period when the order is resumed. * * To resume a paused order, call Resume Order. * @param - Order ID. */ (_id: string): Promise; } declare function resumeOrder$1(httpClient: HttpClient): ResumeOrderSignature; interface ResumeOrderSignature { /** * Resumes a paused order. For orders with recurring payments, it also restarts the payment schedule. * * Resuming an order causes the following changes: * - The order status changes to `"ACTIVE"`. * - The `pausePeriods` array is updated. * - The `endDate` for the order is adjusted to include the pause period. * - For orders with recurring payments, the payment schedule is restarted. * - The `earliestEndDate` is adjusted to include the pause period. (This property is reserved for future use). * * To pause an order, call Pause Order. * @param - Order ID. */ (_id: string): Promise; } declare function createOnlineOrder$1(httpClient: HttpClient): CreateOnlineOrderSignature; interface CreateOnlineOrderSignature { /** * Creates an online order for a site member. * * If this method is called by a [site member](https://dev.wix.com/docs/rest/articles/getting-started/about-identities#site-member), the plan is automatically ordered on behalf of that site member. Otherwise, you must specify `onBehalf.memberId` in your call. * * When an online order is created, but payment hasn't been processed, its status is set to `DRAFT`. After the payment has been processed, if the start date is in the future the order's status is set to `PENDING`. Otherwise, it's set to `ACTIVE`. * @param - Plan ID. */ (planId: string, options?: NonNullablePaths): Promise & { __applicationErrorsType?: CreateOnlineOrderApplicationErrors; __validationErrorsType?: CreateOnlineOrderValidationErrors; }>; } declare function createOfflineOrder$1(httpClient: HttpClient): CreateOfflineOrderSignature; interface CreateOfflineOrderSignature { /** * Creates an order for a buyer who purchased the plan with an offline transaction. * * An offline order is handled off of the Wix site and is marked as `type`: `offline`. If a pricing plan * has a limit on the amount of purchases per buyer, that limit is ignored for offline orders. * Tax is only applied if the site [has it configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection). * * When creating a free offline order: * The order's status is set to `"PENDING"` if the start date is in the future. Otherwise, the status is set to `"ACTIVE"`. * The order's last payment status is set to `"NOT_APPLICABLE"`. " * * When creating a non-free offline order: * The order's status is set to `"PENDING"` if the start date is in the future. Otherwise, the status is set to `"ACTIVE"`. * The order's last payment status is set to `"UNPAID"` or `"PAID"` based on the data passed in the `paid` boolean in the request. * * Payment for an offline order can be set in 1 of 2 ways: * + During order creation, set `paid`: `true`. * + After creation, call Mark As Paid. * @param - ID of the plan being ordered, from the Plans API. * @param - ID of the member ordering the plan, from the Members API. * @param - Options for creating an offline order. */ (planId: string, memberId: string, options?: CreateOfflineOrderOptions): Promise & { __applicationErrorsType?: CreateOfflineOrderApplicationErrors; __validationErrorsType?: CreateOfflineOrderValidationErrors; }>; } declare function getOnlineOrderPreview$1(httpClient: HttpClient): GetOnlineOrderPreviewSignature; interface GetOnlineOrderPreviewSignature { /** * Returns an `order` object that represents a potential online order for a site member. * * You can use this method to show a site member a preview of an online order before [creating](https://dev.wix.com/docs/rest/business-solutions/pricing-plans/pricing-plans/orders/create-online-order) it. * * This method must be called using the [site member identity](https://dev.wix.com/docs/rest/articles/getting-started/about-identities#site-member). Therefore, [Wix apps](https://dev.wix.com/docs/build-apps) can't currently call this method using REST. * @param - Plan ID. */ (planId: string, options?: GetOnlineOrderPreviewOptions): Promise & { __applicationErrorsType?: GetOnlineOrderPreviewApplicationErrors; __validationErrorsType?: GetOnlineOrderPreviewValidationErrors; }>; } declare function getOfflineOrderPreview$1(httpClient: HttpClient): GetOfflineOrderPreviewSignature; interface GetOfflineOrderPreviewSignature { /** * Performs a dry run of a purchase and provides an order preview. * * The preview uses the same logic as purchasing a plan, but the preview is not saved. Because an order is not actually * created, the preview order's `orderId` and `subscriptionId` are displayed as a string of multiple zero characters * (`000000-0000`). Tax is only calculated if the site [has it configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection). *
* If a pricing plan has a limit on the amount of purchases per buyer, that limit is not considered for generating the preview. * But, if that limit has been reached and this order would then exceed the amount of purchases permitted for this buyer, then * `purchaseLimitExceeded` will return as `true`. * * To get a general price preview for a plan that's not buyer-specific, call Get Price Preview. * @param - Member ID of the buyer the previewed order is for, from the Members API. * @param - Options for previewing the offline order. * @param - ID of the plan of the previewed order. */ (planId: string, memberId: string, options?: GetOfflineOrderPreviewOptions): Promise & { __applicationErrorsType?: GetOfflineOrderPreviewApplicationErrors; __validationErrorsType?: GetOfflineOrderPreviewValidationErrors; }>; } declare function getPricePreview$1(httpClient: HttpClient): GetPricePreviewSignature; interface GetPricePreviewSignature { /** * Retrieves a plan's pricing. * * The price preview uses the same logic as purchasing a plan, but the preview is not saved. Tax is only applied if * the site [has it configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection). The price is returned * in the pricing model format used for orders. Learn more about [pricing models](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/introduction#wix-pricing-plans_pricing-plans_introduction_pricing-models). * * Buyers do not have to be logged in to preview the price, and as such, the details returned are not buyer-specific. To * generate a preview of a purchase for a specific buyer, call Get Offline Order Preview. * @param - ID of plan to preview. * @param - Options for getting a price preview. */ (planId: string, options?: GetPricePreviewOptions): Promise & { __applicationErrorsType?: GetPricePreviewApplicationErrors; }>; } declare function memberGetOrder$1(httpClient: HttpClient): MemberGetOrderSignature; interface MemberGetOrderSignature { /** * Retrieves an order for the currently logged-in member by ID. * @param - Order ID. * @param - Options for getting a logged-in member's order. * @returns Requested order. */ (_id: string, options?: MemberGetOrderOptions): Promise>; } declare function memberListOrders$1(httpClient: HttpClient): MemberListOrdersSignature; interface MemberListOrdersSignature { /** * Retrieves a list of up to 100 pricing plan orders for currently logged-in member. * @param - Filtering, sorting, and pagination options. */ (options?: MemberListOrdersOptions): Promise>; } declare function requestCancellation$1(httpClient: HttpClient): RequestCancellationSignature; interface RequestCancellationSignature { /** * Cancels an order. Recurring orders can be canceled either immediately or at the next payment date. One time orders can only be canceled immediately. * * There may be some operations that continue to be processed before the status of the order is changed to `"CANCELED"`. For example, payments might need to be refunded before the order is fully canceled. * * Canceling during the free trial period: When a buyer cancels their order during the free trial period, the buyer's subscription expires at the end of the free trial period and they won't be billed. The buyer may continue using the benefits until the end of the free trial period. * * >**Note:** * >This method requires [visitor or member authentication](https://dev.wix.com/docs/rest/articles/getting-started/access-types-and-permissions). * @param - Order ID. * @param - Required. Whether to cancel the order effective immediately or at the next payment date. One-time orders can only be canceled immediately. * @param - Options for requesting a cancellation. */ (_id: string, effectiveAt: CancellationEffectiveAtWithLiterals): Promise; } declare const onOrderAutoRenewCanceled$1: EventDefinition; declare const onOrderCanceled$1: EventDefinition; declare const onOrderCycleStarted$1: EventDefinition; declare const onOrderEndDatePostponed$1: EventDefinition; declare const onOrderEnded$1: EventDefinition; declare const onOrderMarkedAsPaid$1: EventDefinition; declare const onOrderPaused$1: EventDefinition; declare const onOrderPurchased$1: EventDefinition; declare const onOrderResumed$1: EventDefinition; declare const onOrderStarted$1: EventDefinition; declare const onOrderUpdated$1: EventDefinition; declare const onOrderCreated$1: EventDefinition; declare const onOrderStartDateChanged$1: EventDefinition; declare const managementGetOrder: MaybeContext & typeof managementGetOrder$1>; declare const managementListOrders: MaybeContext & typeof managementListOrders$1>; declare const postponeEndDate: MaybeContext & typeof postponeEndDate$1>; declare const cancelOrder: MaybeContext & typeof cancelOrder$1>; declare const markAsPaid: MaybeContext & typeof markAsPaid$1>; declare const pauseOrder: MaybeContext & typeof pauseOrder$1>; declare const resumeOrder: MaybeContext & typeof resumeOrder$1>; declare const createOnlineOrder: MaybeContext & typeof createOnlineOrder$1>; declare const createOfflineOrder: MaybeContext & typeof createOfflineOrder$1>; declare const getOnlineOrderPreview: MaybeContext & typeof getOnlineOrderPreview$1>; declare const getOfflineOrderPreview: MaybeContext & typeof getOfflineOrderPreview$1>; declare const getPricePreview: MaybeContext & typeof getPricePreview$1>; declare const memberGetOrder: MaybeContext & typeof memberGetOrder$1>; declare const memberListOrders: MaybeContext & typeof memberListOrders$1>; declare const requestCancellation: MaybeContext & typeof requestCancellation$1>; /** * Triggered when an order is canceled and `effectiveAt` is set to `NEXT_PAYMENT_DATE`. * * This webhook is *not* triggered in the following scenarios: * + When an order is canceled and `effectiveAt` is set to `IMMEDIATELY`. Instead, at the time of cancellation, Order Canceled is triggered. * + When an order expires at the end of the current payment cycle because it was canceled and `effectiveAt` was set to `NEXT_PAYMENT_DATE`. Instead, at the time of expiration, Order Canceled and Order Ended are triggered. */ declare const onOrderAutoRenewCanceled: BuildEventDefinition & typeof onOrderAutoRenewCanceled$1; /** * Triggered when an order is canceled. * * This webhook is triggered either immediately or at the end of the current payment cycle, as follows: * + If the order is canceled and `effectiveAt` is set to `IMMEDIATELY`, the webhook is triggered immediately when canceled. * + If the order is canceled and `effectiveAt` is set to `NEXT_PAYMENT_DATE`, the webhook is triggered at the end of the current payment cycle. In this case, the Order Auto Renew Canceled Webhook is triggered immediately. */ declare const onOrderCanceled: BuildEventDefinition & typeof onOrderCanceled$1; /** * Triggered at the start of a new payment cycle for an existing order. * * Not triggered at the initial start of an offline order. */ declare const onOrderCycleStarted: BuildEventDefinition & typeof onOrderCycleStarted$1; /** * Triggered when an order's `endDate` is postponed. */ declare const onOrderEndDatePostponed: BuildEventDefinition & typeof onOrderEndDatePostponed$1; /** * Triggered when an order ends. * * This webhook is triggered: * + When an order expires at the end of the current payment cycle. * + When an order is canceled and `effectiveAt` is set to `IMMEDIATELY`. */ declare const onOrderEnded: BuildEventDefinition & typeof onOrderEnded$1; /** * Triggered when an offline order is marked as paid. */ declare const onOrderMarkedAsPaid: BuildEventDefinition & typeof onOrderMarkedAsPaid$1; /** * Triggered when an order is paused. */ declare const onOrderPaused: BuildEventDefinition & typeof onOrderPaused$1; /** * Triggered for any of the following purchase events: * + Order is paid in full. * + At least 1 order cycle payment is paid for. * + Offline order is created, even if not yet marked as paid. * + Free order is created. */ declare const onOrderPurchased: BuildEventDefinition & typeof onOrderPurchased$1; /** * Triggered when a paused order is resumed. */ declare const onOrderResumed: BuildEventDefinition & typeof onOrderResumed$1; /** * Triggered when an order reaches its `startDate`. Applies to both purchased and free orders. */ declare const onOrderStarted: BuildEventDefinition & typeof onOrderStarted$1; /** * Triggered for any of the following update events: * * + Order is paid for. Order Purchased is also triggered. * + Order reaches its start date or end date. Order Started and Order Ended, respectively, are also triggered. * + New payment cycle of an order starts. Order Cycle Started is also triggered. * + Offline order is marked as paid. Order Marked As Paid is also triggered. * + End date of the order is postponed. Order End Date Postponed is also triggered * + Order is paused, or a paused order is resumed. Order Paused and Order Resumed, respectively, are also triggered. * + Order is canceled, either immediately or at the end of the payment cycle. Order Canceled and Order Auto Renew Canceled, respectively, are also triggered. */ declare const onOrderUpdated: BuildEventDefinition & typeof onOrderUpdated$1; /** * Triggered when an order is created. */ declare const onOrderCreated: BuildEventDefinition & typeof onOrderCreated$1; /** * Triggered when an order's `startDate` is changed. */ declare const onOrderStartDateChanged: BuildEventDefinition & typeof onOrderStartDateChanged$1; export { CancellationEffectiveAtWithLiterals, CreateOfflineOrderApplicationErrors, CreateOfflineOrderOptions, CreateOfflineOrderResponse, CreateOfflineOrderValidationErrors, CreateOnlineOrderApplicationErrors, CreateOnlineOrderOptions, CreateOnlineOrderResponse, CreateOnlineOrderValidationErrors, GetOfflineOrderPreviewApplicationErrors, GetOfflineOrderPreviewOptions, GetOfflineOrderPreviewResponse, GetOfflineOrderPreviewValidationErrors, GetOnlineOrderPreviewApplicationErrors, GetOnlineOrderPreviewOptions, GetOnlineOrderPreviewResponse, GetOnlineOrderPreviewValidationErrors, GetOrderResponse, GetPricePreviewApplicationErrors, GetPricePreviewOptions, GetPricePreviewResponse, ListOrdersResponse, ManagementGetOrderOptions, ManagementListOrdersOptions, MemberGetOrderOptions, MemberListOrdersOptions, MemberListOrdersResponse, Order, OrderAutoRenewCanceledEnvelope, OrderCanceledEnvelope, OrderCreatedEnvelope, OrderCycleStartedEnvelope, OrderEndDatePostponedEnvelope, OrderEndedEnvelope, OrderMarkedAsPaidEnvelope, OrderPausedEnvelope, OrderPurchasedEnvelope, OrderResumedEnvelope, OrderStartDateChangedEnvelope, OrderStartedEnvelope, OrderUpdatedEnvelope, cancelOrder, createOfflineOrder, createOnlineOrder, getOfflineOrderPreview, getOnlineOrderPreview, getPricePreview, managementGetOrder, managementListOrders, markAsPaid, memberGetOrder, memberListOrders, onOrderAutoRenewCanceled, onOrderCanceled, onOrderCreated, onOrderCycleStarted, onOrderEndDatePostponed, onOrderEnded, onOrderMarkedAsPaid, onOrderPaused, onOrderPurchased, onOrderResumed, onOrderStartDateChanged, onOrderStarted, onOrderUpdated, pauseOrder, postponeEndDate, requestCancellation, resumeOrder };