/** * The wix-location module contains functionality for getting information * about the URL of the current page and for navigating to other pages. * [Read more](https://www.wix.com/corvid/reference/wix-location.html#) */ declare module 'wix-location' { /** * Gets the base URL of the current page. * [Read more](https://www.wix.com/corvid/reference/wix-location.html#baseUrl) */ const baseUrl: string; /** * Gets the path of the current page's URL. * [Read more](https://www.wix.com/corvid/reference/wix-location.html#path) */ const path: string[]; /** * Gets the prefix of a dynamic page's or router page's URL. * [Read more](https://www.wix.com/corvid/reference/wix-location.html#prefix) */ const prefix: string; /** * Gets the protocol of the current page's URL. * [Read more](https://www.wix.com/corvid/reference/wix-location.html#protocol) */ const protocol: string; /** * Gets an object that represents the query segment of the current page's URL. * [Read more](https://www.wix.com/corvid/reference/wix-location.html#query) */ const query: any; /** * Gets an object used to manage the query segment of the current page's URL. * [Read more](https://www.wix.com/corvid/reference/wix-location.html#queryParams) */ const queryParams: wix_location.QueryParams; /** * Gets the full URL of the current page. * [Read more](https://www.wix.com/corvid/reference/wix-location.html#url) */ const url: string; /** * Adds an event handler that runs when an application page's URL changes. * [Read more](https://www.wix.com/corvid/reference/wix-location.html#onChange) */ function onChange(handler: wix_location.LocationChangeHandler): void; /** * Directs the browser to navigate to the specified URL. * [Read more](https://www.wix.com/corvid/reference/wix-location.html#to) */ function to(url: string, options?: wix_location.NavOptions): void; } /** * The wix-site module contains functionality for obtaining information about your site and its pages. * [Read more](https://www.wix.com/corvid/reference/wix-site.html#) */ declare module 'wix-site' { /** * Gets a code representing the site's currency. * [Read more](https://www.wix.com/corvid/reference/wix-site.html#currency) */ const currency: string; /** * Gets information about the current page or lightbox. * [Read more](https://www.wix.com/corvid/reference/wix-site.html#currentPage) */ const currentPage: wix_site.StructurePage | wix_site.StructureLightbox; /** * Gets a code representing the site's language. * [Read more](https://www.wix.com/corvid/reference/wix-site.html#language) */ const language: string; /** * Gets the site's regional settings. * [Read more](https://www.wix.com/corvid/reference/wix-site.html#regionalSettings) */ const regionalSettings: string; /** * Gets the site revision ID. * [Read more](https://www.wix.com/corvid/reference/wix-site.html#revision) */ const revision: string; /** * Gets the site's timezone. * [Read more](https://www.wix.com/corvid/reference/wix-site.html#timezone) */ const timezone: string; /** * [Read more](https://www.wix.com/corvid/reference/wix-site.html#wixRouterSitemapEntry) */ const wixRouterSitemapEntry: wix_site.WixRouterSitemapEntry; /** * Gets the site display name. * [Read more](https://www.wix.com/corvid/reference/wix-site.html#getSiteDisplayName) */ function getSiteDisplayName(): string; /** * Returns information about the site's pages, prefixes, and lightboxes. * [Read more](https://www.wix.com/corvid/reference/wix-site.html#getSiteStructure) */ function getSiteStructure(): wix_site.SiteStructure; /** * Optimizes resource fetching of pages and lightboxes in the site so they will load faster. * [Read more](https://www.wix.com/corvid/reference/wix-site.html#prefetchPageResources) */ function prefetchPageResources(prefetchItems: wix_site.PrefetchItems): wix_site.PrefetchResult; /** * Returns the sitemap for a router or dynamic page prefix. * [Read more](https://www.wix.com/corvid/reference/wix-site.html#routerSitemap) */ function routerSitemap(routerPrefix: string): Promise; } /** * The wix-storage module contains functionality for the persistent * storage of key/value data in the site visitor's browser. * [Read more](https://www.wix.com/corvid/reference/wix-storage.html#) */ declare module 'wix-storage' { /** * Used for local storage of data. * [Read more](https://www.wix.com/corvid/reference/wix-storage.html#local) */ const local: wix_storage.Storage; /** * Used for memory storage of data. * [Read more](https://www.wix.com/corvid/reference/wix-storage.html#memory) */ const memory: wix_storage.Storage; /** * Used for session storage of data. * [Read more](https://www.wix.com/corvid/reference/wix-storage.html#session) */ const session: wix_storage.Storage; } /** * The wix-window module contains functionality that pertains to the * current browser window. * [Read more](https://www.wix.com/corvid/reference/wix-window.html#) */ declare module 'wix-window' { /** * Gets the locale of the site visitor's browser. * [Read more](https://www.wix.com/corvid/reference/wix-window.html#browserLocale) */ const browserLocale: string; /** * The ConsentPolicy API is used to perform actions related to the user's allowed cookies and 3rd-party data transfer, such as for GDPR or CCPA purposes. * [Read more](https://www.wix.com/corvid/reference/wix-window.html#consentPolicy) */ const consentPolicy: wix_window.ConsentPolicy; /** * Gets what kind of device is being used to view the page. * [Read more](https://www.wix.com/corvid/reference/wix-window.html#formFactor) */ const formFactor: string; /** * A [lightbox](https://support.wix.com/en/article/about-lightboxes) pops up on your site to grab your visitor's attention. * [Read more](https://www.wix.com/corvid/reference/wix-window.html#lightbox) */ const lightbox: wix_window.Lightbox; /** * **Deprecated.** The `locale` property is being deprecated. Use the * [`browserLocale`](https://www.wix.com/velo/reference/wix-window/browserlocale) property instead. * [Read more](https://www.wix.com/corvid/reference/wix-window.html#locale) */ const locale: string; /** * The Multilingual API is used when working with the languages in a multilingual site. * [Read more](https://www.wix.com/corvid/reference/wix-window.html#multilingual) */ const multilingual: wix_window.Multilingual; /** * Gets the HTTP referrer header field. * [Read more](https://www.wix.com/corvid/reference/wix-window.html#referrer) */ const referrer: string; /** * The [Rendering API](wix-window.html#rendering) is used to control when code is run as a page is being loaded. * [Read more](https://www.wix.com/corvid/reference/wix-window.html#rendering) */ const rendering: wix_window.Rendering; /** * Gets which mode the site is currently being viewed in. * [Read more](https://www.wix.com/corvid/reference/wix-window.html#viewMode) */ const viewMode: string; /** * The Warmup Data API is used to optimize data loading for sites that render both on the server and in the browser, * allowing costly data fetching operations to be done only once. * [Read more](https://www.wix.com/corvid/reference/wix-window.html#warmupData) */ const warmupData: wix_window.WarmupData; /** * Copies text to the site visitor's clipboard. * [Read more](https://www.wix.com/corvid/reference/wix-window.html#copyToClipboard) */ function copyToClipboard(text: string): Promise; /** * Returns information about the window. * [Read more](https://www.wix.com/corvid/reference/wix-window.html#getBoundingRect) */ function getBoundingRect(): Promise; /** * Returns the current geolocation of the user. * [Read more](https://www.wix.com/corvid/reference/wix-window.html#getCurrentGeolocation) */ function getCurrentGeolocation(): Promise; /** * Returns the data that a router passed to the page in its response. * [Read more](https://www.wix.com/corvid/reference/wix-window.html#getRouterData) */ function getRouterData(): any; /** * Opens a lightbox and optionally passes it the given data. * [Read more](https://www.wix.com/corvid/reference/wix-window.html#openLightbox) */ function openLightbox(name: string, data?: any): Promise; /** * Opens a modal window that displays the specified web page. * [Read more](https://www.wix.com/corvid/reference/wix-window.html#openModal) */ function openModal(url: string, options: wix_window.OpenModalOptions): Promise; /** * Sends a message to the page's parent. * [Read more](https://www.wix.com/corvid/reference/wix-window.html#postMessage) */ function postMessage(message: any, target?: string): Promise; /** * Scrolls the page by a given number of pixels. * [Read more](https://www.wix.com/corvid/reference/wix-window.html#scrollBy) */ function scrollBy(x: number, y: number): Promise; /** * Scrolls the page to a specific location on the page. * [Read more](https://www.wix.com/corvid/reference/wix-window.html#scrollTo) */ function scrollTo(x: number, y: number, options?: wix_window.ScrollToOptions): Promise; /** * Sends a tracking event to external analytics tools. * [Read more](https://www.wix.com/corvid/reference/wix-window.html#trackEvent) */ function trackEvent(eventName: string, parameters: wix_window.trackingParametersCustomEvent | wix_window.trackingParametersAddPaymentInfoEvent | wix_window.trackingParametersAddProductImpressionEvent | wix_window.trackingParametersAddToCartEvent | wix_window.trackingParametersCheckoutStepEvent | wix_window.trackingParametersClickProductEvent | wix_window.trackingParametersInitiateCheckoutEvent | wix_window.trackingParametersLeadEvent | wix_window.trackingParametersPurchaseEvent | wix_window.trackingParametersRemoveFromCartEvent | wix_window.trackingParametersStartPaymentEvent | wix_window.trackingParametersViewContentEvent): void; } /** * The wix-animations module contains functionality for working with * animations. * [Read more](https://www.wix.com/corvid/reference/wix-animations.html#) */ declare module 'wix-animations' { /** * Creates a new animation timeline. * [Read more](https://www.wix.com/corvid/reference/wix-animations.html#timeline) */ function timeline(timelineOptions?: wix_animations.TimeLineOptions): wix_animations.TimeLine; } /** * The wix-auth module contains functionality for working with permissions. * [Read more](https://www.wix.com/corvid/reference/wix-auth.html#) */ declare module 'wix-auth' { /** * Allows a site visitor to call a function without the required permissions. * [Read more](https://www.wix.com/corvid/reference/wix-auth.html#elevate) */ function elevate any>(func: T): (...param: Parameters) => ReturnType; } /** * The wix-billing-backend module contains functionality for working with * billing features, such as [price quotes](https://support.wix.com/en/article/wix-price-quotes-creating-and-sending-price-quotes-to-clients) and * [invoices](https://support.wix.com/en/article/about-wix-invoices). * [Read more](https://www.wix.com/corvid/reference/wix-billing-backend.html#) */ declare module 'wix-billing-backend' { /** * The wix-billing-backend module contains functionality for working with * [your site's invoices](https://support.wix.com/en/article/about-wix-invoices) * from backend code. * [Read more](https://www.wix.com/corvid/reference/wix-billing-backend.html#invoices) */ const invoices: wix_billing_backend.Invoices; /** * The wix-billing-backend module contains functionality for working with * your site's [price quotes](https://support.wix.com/en/article/wix-price-quotes-creating-and-sending-price-quotes-to-clients) * from backend code. * [Read more](https://www.wix.com/corvid/reference/wix-billing-backend.html#priceQuotes) */ const priceQuotes: wix_billing_backend.PriceQuotes; } /** * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.html#) */ declare module 'wix-blog-backend' { /** * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.html#categories) */ const categories: wix_blog_backend.Categories; /** * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.html#posts) */ const posts: wix_blog_backend.Posts; /** * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.html#tags) */ const tags: wix_blog_backend.Tags; } /** * The wix-bookings-backend module contains functionality for working with bookings from backend code. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.html#) */ declare module 'wix-bookings-backend' { /** * The Bookings API provides functionality for updating and managing bookings created in the Wix Bookings app. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.html#bookings) */ const bookings: wix_bookings_backend.Bookings; /** * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.html#events) */ const events: wix_bookings_backend.Events; /** * The Resources API provides functionality for creating and managing wix-bookings resources. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.html#resources) */ const resources: wix_bookings_backend.Resources; /** * The Bookings API provides functionality for creating and managing wix-bookings sessions. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.html#sessions) */ const sessions: wix_bookings_backend.Sessions; } /** * The wix-captcha-backend module contains functionality for working with the reCAPTCHA element from backend code. * [Read more](https://www.wix.com/corvid/reference/wix-captcha-backend.html#) */ declare module 'wix-captcha-backend' { /** * Authorizes the CAPTCHA token. * [Read more](https://www.wix.com/corvid/reference/wix-captcha-backend.html#authorize) */ function authorize(token: string): Promise; } /** * The wix-chat-backend module contains functionality for working with the [Wix Chat](https://support.wix.com/en/article/about-wix-chat) application from backend code. * [Read more](https://www.wix.com/corvid/reference/wix-chat-backend.html#) */ declare module 'wix-chat-backend' { /** * Sends a chat message from the backend. * [Read more](https://www.wix.com/corvid/reference/wix-chat-backend.html#sendMessage) */ function sendMessage(messageInfo: wix_chat_backend.MessageInfo): Promise; } /** * The wix-configs-backend module contains functionality for working with user-configured data in Velo package code. * [Read more](https://www.wix.com/corvid/reference/wix-configs-backend.html#) */ declare module 'wix-configs-backend' { /** * Retrieves the value of a specific key in a package's `config.json` file. * [Read more](https://www.wix.com/corvid/reference/wix-configs-backend.html#getPackageConfig) */ function getPackageConfig(key: string): Promise; } /** * The wix-crm-backend module contains functionality for working with * [your site's contacts](https://support.wix.com/en/article/about-your-contact-list) * from backend code. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.html#) */ declare module 'wix-crm-backend' { /** * The Contacts API is used to manage a site's contacts. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.html#contacts) */ const contacts: wix_crm_backend.Contacts; /** * The Notifications API is used to send notifications to the site owner and contributors. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.html#notifications) */ const notifications: wix_crm_backend.Notifications; /** * The Tasks API is used to manage a site's tasks. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.html#tasks) */ const tasks: wix_crm_backend.Tasks; /** * The Triggered Emails API is used to send triggered emails to your site's contacts and members. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.html#triggeredEmails) */ const triggeredEmails: wix_crm_backend.TriggeredEmails; /** * The Workflows API is used to manage your site's * [workflows](https://support.wix.com/en/article/about-workflows). * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.html#workflows) */ const workflows: wix_crm_backend.Workflows; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-crm-backend.contacts.createContact()](https://www.wix.com/velo/reference/wix-crm-backend/contacts/createcontact). * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.html#createContact) */ function createContact(contactInfo: wix_crm_backend.ContactInfo): Promise; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-crm-backend.contacts.deleteContact()](https://www.wix.com/velo/reference/wix-crm-backend/contacts/deletecontact). * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.html#deleteContact) */ function deleteContact(contactId: string, options: wix_crm_backend.DeleteOptions): Promise; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-crm-backend.triggeredEmails.emailContact()](https://www.wix.com/velo/reference/wix-crm-backend/triggeredemails/emailcontact). * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.html#emailContact) */ function emailContact(emailId: string, toContact: string, options?: wix_crm_backend.TriggeredEmails.TriggeredEmailOptions): Promise; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-crm-backend.contacts.getContact()](https://www.wix.com/velo/reference/wix-crm-backend/contacts/getcontact). * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.html#getContactById) */ function getContactById(contactId: string): Promise; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-crm-backend.contacts.updateContact()](https://www.wix.com/velo/reference/wix-crm-backend/contacts/updatecontact). * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.html#updateContact) */ function updateContact(contactId: string, contactInfo: wix_crm_backend.ContactInfo): Promise; } /** * The wix-data module contains functionality for working with data in collections. * [Read more](https://www.wix.com/corvid/reference/wix-data.html#) */ declare module 'wix-data' { /** * Creates an aggregation. * [Read more](https://www.wix.com/corvid/reference/wix-data.html#aggregate) */ function aggregate(collectionId: string): wix_data.WixDataAggregate; /** * Adds a number of items to a collection. * [Read more](https://www.wix.com/corvid/reference/wix-data.html#bulkInsert) */ function bulkInsert(collectionId: string, items: any[], options?: wix_data.WixDataOptions): Promise; /** * Removes a number of items from a collection. * [Read more](https://www.wix.com/corvid/reference/wix-data.html#bulkRemove) */ function bulkRemove(collectionId: string, itemIds: string[], options?: wix_data.WixDataOptions): Promise; /** * Inserts or updates a number of items in a collection. * [Read more](https://www.wix.com/corvid/reference/wix-data.html#bulkSave) */ function bulkSave(collectionId: string, items: any[], options?: wix_data.WixDataOptions): Promise; /** * Updates a number of items in a collection. * [Read more](https://www.wix.com/corvid/reference/wix-data.html#bulkUpdate) */ function bulkUpdate(collectionId: string, items: any[], options?: wix_data.WixDataOptions): Promise; /** * Creates a filter to be used with datasets and aggregations. * [Read more](https://www.wix.com/corvid/reference/wix-data.html#filter) */ function filter(): wix_data.WixDataFilter; /** * Retrieves an item from a collection. * [Read more](https://www.wix.com/corvid/reference/wix-data.html#get) */ function get(collectionId: string, itemId: string, options?: wix_data.WixDataOptions): Promise; /** * Adds an item to a collection. * [Read more](https://www.wix.com/corvid/reference/wix-data.html#insert) */ function insert(collectionId: string, item: any, options?: wix_data.WixDataOptions): Promise; /** * Inserts a reference in the specified property. * [Read more](https://www.wix.com/corvid/reference/wix-data.html#insertReference) */ function insertReference(collectionId: string, propertyName: string, referringItem: any | string, referencedItem: any | string | any[] | string[], options?: wix_data.WixDataOptions): Promise; /** * Checks if a reference to the referenced item exists in the specified * property of the referring item. * [Read more](https://www.wix.com/corvid/reference/wix-data.html#isReferenced) */ function isReferenced(collectionId: string, propertyName: string, referringItem: any | string, referencedItem: any | string, options?: wix_data.WixDataOptions): Promise; /** * Creates a query for retrieving items from a database collection. * [Read more](https://www.wix.com/corvid/reference/wix-data.html#query) */ function query(collectionId: string): wix_data.WixDataQuery; /** * Gets the full items referenced in the specified property. * [Read more](https://www.wix.com/corvid/reference/wix-data.html#queryReferenced) */ function queryReferenced(collectionId: string, item: any | string, propertyName: string, options?: wix_data.WixDataQueryReferencedOptions): Promise; /** * Removes an item from a collection. * [Read more](https://www.wix.com/corvid/reference/wix-data.html#remove) */ function remove(collectionId: string, itemId: string, options?: wix_data.WixDataOptions): Promise; /** * Removes a reference from the specified property. * [Read more](https://www.wix.com/corvid/reference/wix-data.html#removeReference) */ function removeReference(collectionId: string, propertyName: string, referringItem: any | string, referencedItem: any | string | any[] | string[], options?: wix_data.WixDataOptions): Promise; /** * Replaces current references with references in the specified property. * [Read more](https://www.wix.com/corvid/reference/wix-data.html#replaceReferences) */ function replaceReferences(collectionId: string, propertyName: string, referringItem: any | string, referencedItem: any | string | any[] | string[], options?: wix_data.WixDataOptions): Promise; /** * Inserts or updates an item in a collection. * [Read more](https://www.wix.com/corvid/reference/wix-data.html#save) */ function save(collectionId: string, item: any, options?: wix_data.WixDataOptions): Promise; /** * Creates a sort to be used with the dataset `setSort()` function. * [Read more](https://www.wix.com/corvid/reference/wix-data.html#sort) */ function sort(): wix_data.WixDataSort; /** * Removes all items from a collection. * [Read more](https://www.wix.com/corvid/reference/wix-data.html#truncate) */ function truncate(collectionId: string, options?: wix_data.WixDataOptions): Promise; /** * Updates an item in a collection. * [Read more](https://www.wix.com/corvid/reference/wix-data.html#update) */ function update(collectionId: string, item: any, options?: wix_data.WixDataOptions): Promise; } /** * [Read more](https://www.wix.com/corvid/reference/wix-ecom-backend.html#) */ declare module 'wix-ecom-backend' { /** * [Read more](https://www.wix.com/corvid/reference/wix-ecom-backend.html#cart) */ const cart: wix_ecom_backend.Cart; /** * [Read more](https://www.wix.com/corvid/reference/wix-ecom-backend.html#checkout) */ const checkout: wix_ecom_backend.Checkout; /** * [Read more](https://www.wix.com/corvid/reference/wix-ecom-backend.html#currentCart) */ const currentCart: wix_ecom_backend.CurrentCart; /** * [Read more](https://www.wix.com/corvid/reference/wix-ecom-backend.html#orders) */ const orders: wix_ecom_backend.Orders; } /** * The wix-events module contains functionality for working with * Wix Events from client-side code. * [Read more](https://www.wix.com/corvid/reference/wix-events.html#) */ declare module 'wix-events' { /** * Gets an object containing RSVP functionality. * [Read more](https://www.wix.com/corvid/reference/wix-events.html#rsvp) */ const rsvp: wix_events.Rsvp; /** * Gets an object containing ticketing functionality. * [Read more](https://www.wix.com/corvid/reference/wix-events.html#tickets) */ const tickets: wix_events.Tickets; /** * **Deprecated:** Creates a new RSVP form for the specified event. * [Read more](https://www.wix.com/corvid/reference/wix-events.html#createEventRsvpForm) */ function createEventRsvpForm(eventId: string): wix_events.RsvpForm; /** * Gets a new registration form for the specified event. * [Read more](https://www.wix.com/corvid/reference/wix-events.html#getForm) */ function getForm(eventId: string): Promise; } /** * The wix-events-backend module contains functionality for working with * your site's [Wix events](https://support.wix.com/en/article/about-wix-events). * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.html#) */ declare module 'wix-events-backend' { /** * The Events API provides functionality for updating and managing events created in the Wix Events app or using this Wix Events API. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.html#wixEvents) */ const wixEvents: wix_events_backend.WixEvents; } /** * The wix-fetch module contains functionality for sending HTTPS requests to a server. * [Read more](https://www.wix.com/corvid/reference/wix-fetch.html#) */ declare module 'wix-fetch' { /** * Retrieves the specified resource from the network using HTTPS. * [Read more](https://www.wix.com/corvid/reference/wix-fetch.html#fetch) */ function fetch(url: string, options?: wix_fetch.WixFetchRequest): Promise; /** * Retrieves the specified JSON resource from the network using HTTPS. * [Read more](https://www.wix.com/corvid/reference/wix-fetch.html#getJSON) */ function getJSON(url: string, options?: wix_fetch.WixFetchRequest): Promise; } /** * The wix-groups-backend module contains functionality for managing groups on your site from backend code. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.html#) */ declare module 'wix-groups-backend' { /** * The CreateRequests API provides functionality for managing requests to create a group. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.html#createRequests) */ const createRequests: wix_groups_backend.CreateRequests; /** * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.html#groups) */ const groups: wix_groups_backend.Groups; /** * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.html#joinRequests) */ const joinRequests: wix_groups_backend.JoinRequests; /** * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.html#members) */ const members: wix_groups_backend.Members; /** * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.html#roles) */ const roles: wix_groups_backend.Roles; } /** * HTTP functions are used to expose an API of your site's functionality. * [Read more](https://www.wix.com/corvid/reference/wix-http-functions.html#) */ declare module 'wix-http-functions' { /** * An object representing an incoming request received by a call to an HTTP function. * [Read more](https://www.wix.com/corvid/reference/wix-http-functions.html#wixHttpFunctionRequest) */ const wixHttpFunctionRequest: wix_http_functions.WixHttpFunctionRequest; /** * Returns a response with status code 400 (Bad Request) and the information from the options parameter. * [Read more](https://www.wix.com/corvid/reference/wix-http-functions.html#badRequest) */ function badRequest(options: wix_http_functions.WixHttpFunctionResponseOptions): wix_http_functions.WixHttpFunctionResponse; /** * Returns a response with status code 201 (Created) and the information from the options parameter. * [Read more](https://www.wix.com/corvid/reference/wix-http-functions.html#created) */ function created(options: wix_http_functions.WixHttpFunctionResponseOptions): wix_http_functions.WixHttpFunctionResponse; /** * A function that responds to requests made with the HTTP DELETE method. * [Read more](https://www.wix.com/corvid/reference/wix-http-functions.html#delete) */ /* Illegal function name 'delete' can't be used here function delete(request: wix_http_functions.WixHttpFunctionRequest): wix_http_functions.WixHttpFunctionResponse; */ /** * Returns a response with status code 403 (Forbidden) and the information from the options parameter. * [Read more](https://www.wix.com/corvid/reference/wix-http-functions.html#forbidden) */ function forbidden(options?: wix_http_functions.WixHttpFunctionResponseOptions): wix_http_functions.WixHttpFunctionResponse; /** * A function that responds to requests made with the HTTP GET method. * [Read more](https://www.wix.com/corvid/reference/wix-http-functions.html#get) */ function get(request: wix_http_functions.WixHttpFunctionRequest): wix_http_functions.WixHttpFunctionResponse; /** * Returns a response with status code 404 (Not Found) and the information from the options parameter. * [Read more](https://www.wix.com/corvid/reference/wix-http-functions.html#notFound) */ function notFound(options: wix_http_functions.WixHttpFunctionResponseOptions): wix_http_functions.WixHttpFunctionResponse; /** * Returns a response with status code 200 (OK) and the information from the options parameter. * [Read more](https://www.wix.com/corvid/reference/wix-http-functions.html#ok) */ function ok(options?: wix_http_functions.WixHttpFunctionResponseOptions): wix_http_functions.WixHttpFunctionResponse; /** * A function that responds to requests made with the HTTP OPTIONS method. * [Read more](https://www.wix.com/corvid/reference/wix-http-functions.html#options) */ function options(request: wix_http_functions.WixHttpFunctionRequest): wix_http_functions.WixHttpFunctionResponse; /** * A function that responds to requests made with the HTTP POST method. * [Read more](https://www.wix.com/corvid/reference/wix-http-functions.html#post) */ function post(request: wix_http_functions.WixHttpFunctionRequest): wix_http_functions.WixHttpFunctionResponse; /** * A function that responds to requests made with the HTTP PUT method. * [Read more](https://www.wix.com/corvid/reference/wix-http-functions.html#put) */ function put(request: wix_http_functions.WixHttpFunctionRequest): wix_http_functions.WixHttpFunctionResponse; /** * Returns a response populated with the information from the options parameter. * The `response()` function creates a custom response built with the * information passed to the `options` parameter in a `WixHttpFunctionCustomResponseOptions` * object. * * Use the `response()` function to create a response to return from an HTTP * function. * [Read more](https://www.wix.com/corvid/reference/wix-http-functions.html#response) */ function response(options: wix_http_functions.WixHttpFunctionCustomResponseOptions): wix_http_functions.WixHttpFunctionResponse; /** * Returns a response with status code 500 (Internal Server Error) and the information from the options parameter. * [Read more](https://www.wix.com/corvid/reference/wix-http-functions.html#serverError) */ function serverError(options: wix_http_functions.WixHttpFunctionResponseOptions): wix_http_functions.WixHttpFunctionResponse; /** * A function that responds to requests made with any HTTP method. * [Read more](https://www.wix.com/corvid/reference/wix-http-functions.html#use) */ function use(request: wix_http_functions.WixHttpFunctionRequest): wix_http_functions.WixHttpFunctionResponse; } /** * The wix-marketing-backend module contains functionality for working with your * site's marketing tools from backend code. * [Read more](https://www.wix.com/corvid/reference/wix-marketing-backend.html#) */ declare module 'wix-marketing-backend' { /** * The Coupons API is used to manage your site's coupons. * [Read more](https://www.wix.com/corvid/reference/wix-marketing-backend.html#coupons) */ const coupons: wix_marketing_backend.Coupons; } /** * The `wix-media-backend` module contains functionality for working with * media from backend code. * [Read more](https://www.wix.com/corvid/reference/wix-media-backend.html#) */ declare module 'wix-media-backend' { /** * The `mediaManager` module contains functionality for working with * the media that is stored in your site's [Media Manager](https://support.wix.com/en/article/about-the-media-manager-568956). * [Read more](https://www.wix.com/corvid/reference/wix-media-backend.html#mediaManager) */ const mediaManager: wix_media_backend.MediaManager; } /** * The wix-members module contains functionality * for working with your site members from frontend page code. * [Read more](https://www.wix.com/corvid/reference/wix-members.html#) */ declare module 'wix-members' { /** * The Authentication API contains functionality for authenticating members from frontend code. * [Read more](https://www.wix.com/corvid/reference/wix-members.html#authentication) */ const authentication: wix_members.Authentication; /** * The CurrentMember API contains functionality for viewing and managing site members from frontend code. * [Read more](https://www.wix.com/corvid/reference/wix-members.html#currentMember) */ const currentMember: wix_members.CurrentMember; } /** * The wix-members-backend module contains functionality * for working with your site members from backend code. * [Read more](https://www.wix.com/corvid/reference/wix-members-backend.html#) */ declare module 'wix-members-backend' { /** * The Authentication API contains functionality for authenticating users from backend code. * [Read more](https://www.wix.com/corvid/reference/wix-members-backend.html#authentication) */ const authentication: wix_members_backend.Authentication; /** * The Authorization API contains functionality for working with * [member roles](https://support.wix.com/en/site-members/setting-your-members-permissions) * from backend code. * [Read more](https://www.wix.com/corvid/reference/wix-members-backend.html#authorization) */ const authorization: wix_members_backend.Authorization; /** * The Badges API contains functionality for working with [member badges](https://support.wix.com/en/article/about-member-badges) from backend code. * [Read more](https://www.wix.com/corvid/reference/wix-members-backend.html#badges) */ const badges: wix_members_backend.Badges; /** * The CurrentMember API contains functionality for viewing and managing site members from backend code. * [Read more](https://www.wix.com/corvid/reference/wix-members-backend.html#currentMember) */ const currentMember: wix_members_backend.CurrentMember; /** * The Members API contains functionality for viewing and managing site members from backend code. * [Read more](https://www.wix.com/corvid/reference/wix-members-backend.html#members) */ const members: wix_members_backend.Members; } /** * **Deprecated.** * The wix-paid-plans module will continue to work, but a newer version is available at [wix-pricing-plans](https://www.wix.com/velo/reference/wix-pricing-plans). * [Read more](https://www.wix.com/corvid/reference/wix-paid-plans.html#) */ declare module 'wix-paid-plans' { /** * **Deprecated.** * This function will continue to work, but a newer version is available at [`wix-pricing-plans.orders.requestCurrentMemberOrderCancellation()`](https://www.wix.com/velo/reference/wix-pricing-plans/orders/requestcurrentmemberordercancellation) and [`wix-pricing-plans-backend.orders.cancelOrder()`](wix-pricing-plans-backend/orders/cancelorder). * [Read more](https://www.wix.com/corvid/reference/wix-paid-plans.html#cancelOrder) */ function cancelOrder(orderId: string): Promise; /** * **Deprecated.** * This function will continue to work, but a newer version is available at [`wix-pricing-plans.orders.listCurrentMemberOrders()`](https://www.wix.com/velo/reference/wix-pricing-plans/orders/listcurrentmemberorders). * [Read more](https://www.wix.com/corvid/reference/wix-paid-plans.html#getCurrentMemberOrders) */ function getCurrentMemberOrders(limit?: number, offset?: number): Promise; /** * **Deprecated**. * This function will continue to work, but newer versions are available * at [`wix-pricing-plans.checkout.createOnlineOrder()`](https://www.wix.com/velo/reference/wix-pricing-plans/checkout/createonlineorder) * and * at [`wix-pricing-plans-backend.checkout.createOfflineOrder()`](https://www.wix.com/velo/reference/wix-pricing-plans-backend/checkout/createofflineorder). * [Read more](https://www.wix.com/corvid/reference/wix-paid-plans.html#orderPlan) */ function orderPlan(planId: string): Promise; /** * **Deprecated.** * This function will continue to work, but a newer version is available * at [`wix-pricing-plans.startOnlinePurchase()`](https://www.wix.com/velo/reference/wix-pricing-plans/checkout/startonlinepurchase). * [Read more](https://www.wix.com/corvid/reference/wix-paid-plans.html#purchasePlan) */ function purchasePlan(planId: string): Promise; } /** * The wix-pay module contains functionality for working with * payments from client-side code. * [Read more](https://www.wix.com/corvid/reference/wix-pay.html#) */ declare module 'wix-pay' { /** * Contains functionality for displaying prices in your store in different currencies, getting exchange rates, and converting between currencies. * [Read more](https://www.wix.com/corvid/reference/wix-pay.html#currencies) */ const currencies: wix_pay.Currencies; /** * Starts a payment. * [Read more](https://www.wix.com/corvid/reference/wix-pay.html#startPayment) */ function startPayment(paymentId: string, options?: wix_pay.PaymentOptions): Promise; } /** * The wix-pay-backend module contains functionality for working with * payments from backend code. * [Read more](https://www.wix.com/corvid/reference/wix-pay-backend.html#) */ declare module 'wix-pay-backend' { /** * Contains functionality for displaying prices in your store in different currencies, getting exchange rates, and converting between currencies. * [Read more](https://www.wix.com/corvid/reference/wix-pay-backend.html#currencies) */ const currencies: wix_pay_backend.Currencies; /** * Creates a new payment. * [Read more](https://www.wix.com/corvid/reference/wix-pay-backend.html#createPayment) */ function createPayment(paymentInfo: wix_pay_backend.PaymentInfo): Promise; } /** * The wix-pricing-plans module contains functionality for working with * pricing plans from client-side code. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans.html#) */ declare module 'wix-pricing-plans' { /** * The Pricing Plans Checkout API contains functionality for ordering, checking out, and purchasing * your site's pricing plan [orders](https://support.wix.com/en/article/pricing-plans-an-overview). * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans.html#checkout) */ const checkout: wix_pricing_plans.Checkout; /** * The Pricing Plan Orders API provides functionality for managing pricing plan orders created in the Wix Pricing Plans app or using the Wix Pricing Plans API. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans.html#orders) */ const orders: wix_pricing_plans.Orders; } /** * The wix-pricing-plans-backend module contains functionality for managing your * site's pricing plans from backend code. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.html#) */ declare module 'wix-pricing-plans-backend' { /** * The Pricing Plans Checkout API provides functionality for ordering and checking out pricing plan orders created in the Wix Pricing Plans app or using this Wix Pricing Plans API. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.html#checkout) */ const checkout: wix_pricing_plans_backend.Checkout; /** * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.html#events) */ const events: wix_pricing_plans_backend.Events; /** * The Pricing Plan Orders API provides functionality for managing pricing plan orders created in the Wix Pricing Plans app or using this Wix Pricing Plans API. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.html#orders) */ const orders: wix_pricing_plans_backend.Orders; /** * Archives a single pricing plan. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.html#archivePlan) */ function archivePlan(id: string): Promise; /** * Changes the display order of the pricing plans on the site page and in the Dashboard. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.html#arrangePlans) */ function arrangePlans(ids: string[]): Promise; /** * Sets all pricing plans as not primary. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.html#clearPrimary) */ function clearPrimary(): Promise; /** * Creates a pricing plan. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.html#createPlan) */ function createPlan(planInfo: wix_pricing_plans_backend.CreatePlanInfo): Promise; /** * Gets an existing pricing plan by ID. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.html#getPlan) */ function getPlan(id: string): Promise; /** * Gets statistics about the pricing plans. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.html#getPlanStats) */ function getPlanStats(): Promise; /** * Lists pricing plans. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.html#listPlans) */ function listPlans(planIds?: string[], options?: wix_pricing_plans_backend.ListPlanInfo): Promise; /** * Lists public pricing plans. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.html#listPublicPlans) */ function listPublicPlans(planIds?: string[], options?: wix_pricing_plans_backend.ListPublicPlanOptions): Promise; /** * Marks a pricing plan as the primary pricing plan. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.html#makePlanPrimary) */ function makePlanPrimary(id: string): Promise; /** * Creates a query to retrieve a list of public pricing plans. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.html#queryPublicPlans) */ function queryPublicPlans(): Promise; /** * Sets visibility for non-archived pricing plans. Public plans are plans that are set to visible. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.html#setPlanVisibility) */ function setPlanVisibility(id: string, visible: boolean): Promise; /** * Updates a pricing plan. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.html#updatePlan) */ function updatePlan(planInfo: wix_pricing_plans_backend.UpdatePlanInfo): Promise; } /** * The wix-realtime module contains functionality for publishing messages * on channels that site visitors can subscribe to. * [Read more](https://www.wix.com/corvid/reference/wix-realtime.html#) */ declare module 'wix-realtime' { /** * Adds an event handler that runs when a connection or reconnection * occurs. * [Read more](https://www.wix.com/corvid/reference/wix-realtime.html#onConnected) */ function onConnected(handler: wix_realtime.ConnectionHandler): void; /** * Adds an event handler that runs when a disconnection occurs. * [Read more](https://www.wix.com/corvid/reference/wix-realtime.html#onDisconnected) */ function onDisconnected(handler: wix_realtime.DisconnectionHandler): void; /** * Adds an event handler that runs when an error occurs. * [Read more](https://www.wix.com/corvid/reference/wix-realtime.html#onError) */ function onError(handler: wix_realtime.ErrorHandler): void; /** * Subscribes to a channel or channel resource. * [Read more](https://www.wix.com/corvid/reference/wix-realtime.html#subscribe) */ function subscribe(channel: wix_realtime.Channel, handler: wix_realtime.MessageHandler): Promise; /** * Unsubscribes from a channel or channel resource. * [Read more](https://www.wix.com/corvid/reference/wix-realtime.html#unsubscribe) */ function unsubscribe(options: wix_realtime.UnsubscribeOptions): Promise; } /** * The wix-realtime module contains functionality for publishing messages * on channels that site visitors can subscribe to and for managing channel permissions. * [Read more](https://www.wix.com/corvid/reference/wix-realtime-backend.html#) */ declare module 'wix-realtime-backend' { /** * Returns the realtime permissions router. * [Read more](https://www.wix.com/corvid/reference/wix-realtime-backend.html#permissionsRouter) */ const permissionsRouter: wix_realtime_backend.PermissionsRouter; /** * Publishes a message to a channel or channel resource. * [Read more](https://www.wix.com/corvid/reference/wix-realtime-backend.html#publish) */ function publish(channel: wix_realtime_backend.Channel, payload: any, options?: wix_realtime_backend.PublishOptions): Promise & void; /** * Checks permissions for a subscriber on a channel or channel resource. * [Read more](https://www.wix.com/corvid/reference/wix-realtime-backend.html#realtime_check_permission) */ function realtime_check_permission(channel: wix_realtime_backend.Channel, subscriber: wix_realtime_backend.Subscriber): Promise & wix_realtime_backend.ChannelPermissions; } /** * This module contains the APIs for code routers and data binding router hooks. * [Read more](https://www.wix.com/corvid/reference/wix-router.html#) */ declare module 'wix-router' { /** * [Read more](https://www.wix.com/corvid/reference/wix-router.html#wixRouterSitemapEntry) */ const wixRouterSitemapEntry: wix_router.WixRouterSitemapEntry; /** * Registers a hook that is called after a router. * [Read more](https://www.wix.com/corvid/reference/wix-router.html#afterRouter) */ function afterRouter(request: wix_router.WixRouterRequest, response: wix_router.WixRouterResponse): Promise; /** * Registers a hook that is called after a sitemap is created. * [Read more](https://www.wix.com/corvid/reference/wix-router.html#afterSitemap) */ function afterSitemap(request: wix_router.WixRouterSitemapRequest, sitemapEntries: wix_router.WixRouterSitemapEntry[]): Promise; /** * Registers a hook that is called before a router. * [Read more](https://www.wix.com/corvid/reference/wix-router.html#beforeRouter) */ function beforeRouter(request: wix_router.WixRouterRequest): Promise; /** * Registers a hook that is called after a route is resolved by the data binding router, but before the wix-data query is executed. * [Read more](https://www.wix.com/corvid/reference/wix-router.html#customizeQuery) */ function customizeQuery(request: wix_router.WixRouterRequest, route: string, query: wix_data.WixDataQuery): wix_data.WixDataQuery; /** * Returns a response with a status code 403 (Forbidden) and instructs the router to show a 403 page. * [Read more](https://www.wix.com/corvid/reference/wix-router.html#forbidden) */ function forbidden(message?: string): Promise; /** * Returns a response that instructs the router to continue. * [Read more](https://www.wix.com/corvid/reference/wix-router.html#next) */ function next(): Promise; /** * Returns a response with a status code 404 (Not Found) and instructs the router to show a 404 page. * [Read more](https://www.wix.com/corvid/reference/wix-router.html#notFound) */ function notFound(message?: string): Promise; /** * Returns a response with a status code 200 (OK) and instructs the router to show the selected page. * [Read more](https://www.wix.com/corvid/reference/wix-router.html#ok) */ function ok(Page: string | string[], routerReturnedData?: any, head?: wix_router.WixRouterResponse.HeadOptions): Promise; /** * Returns a response with a status code of 301 (Moved Permanently) or 302 (Found) and instructs the router to redirect to the given URL. * [Read more](https://www.wix.com/corvid/reference/wix-router.html#redirect) */ function redirect(url: string, statusCode?: string): Promise; /** * Function containing routing logic for a given URL prefix. * [Read more](https://www.wix.com/corvid/reference/wix-router.html#router) */ function router(request: wix_router.WixRouterRequest): Promise; /** * Returns a response with the specified HTTP status code with an optional message. * [Read more](https://www.wix.com/corvid/reference/wix-router.html#sendStatus) */ function sendStatus(statusCode: string, message?: string): Promise; /** * Function containing sitemap logic for a given URL prefix. * [Read more](https://www.wix.com/corvid/reference/wix-router.html#sitemap) */ function sitemap(request: wix_router.WixRouterSitemapRequest): Promise; } /** * The wix-search module contains functionality for searching a site. * [Read more](https://www.wix.com/corvid/reference/wix-search.html#) */ declare module 'wix-search' { /** * Creates a filter builder for building search filters. * [Read more](https://www.wix.com/corvid/reference/wix-search.html#filter) */ function filter(): wix_search.WixSearchFilterBuilder; /** * Creates a search builder. * [Read more](https://www.wix.com/corvid/reference/wix-search.html#search) */ function search(phrase?: string): wix_search.WixSearchBuilder; } /** * The wix-secrets-backend module contains functionality for * managing secrets you safely store in your site's [Secrets Manager](https://support.wix.com/en/article/velo-about-the-secrets-manager). * [Read more](https://www.wix.com/corvid/reference/wix-secrets-backend.html#) */ declare module 'wix-secrets-backend' { /** * Creates a new secret. * [Read more](https://www.wix.com/corvid/reference/wix-secrets-backend.html#createSecret) */ function createSecret(secret: wix_secrets_backend.Secret): Promise; /** * Deletes an existing secret by ID. * [Read more](https://www.wix.com/corvid/reference/wix-secrets-backend.html#deleteSecret) */ function deleteSecret(id: string): Promise; /** * Gets a secret by name. * [Read more](https://www.wix.com/corvid/reference/wix-secrets-backend.html#getSecret) */ function getSecret(name: string): Promise; /** * Gets a list of objects containing information about all secrets stored in the Secrets Manager. * [Read more](https://www.wix.com/corvid/reference/wix-secrets-backend.html#listSecretInfo) */ function listSecretInfo(): Promise; /** * Updates the specified fields of an existing secret by ID. * [Read more](https://www.wix.com/corvid/reference/wix-secrets-backend.html#updateSecret) */ function updateSecret(id: string, secret: wix_secrets_backend.SecretUpdateInfo): Promise; } /** * The wix-seo module contains functionality for working with * [your site's SEO](https://support.wix.com/en/article/search-engine-optimization-seo) from * client-side code. * [Read more](https://www.wix.com/corvid/reference/wix-seo.html#) */ declare module 'wix-seo' { /** * Gets the page's SEO-related link tags. * [Read more](https://www.wix.com/corvid/reference/wix-seo.html#links) */ const links: wix_seo.Link[]; /** * Gets the page's SEO-related meta tags. * [Read more](https://www.wix.com/corvid/reference/wix-seo.html#metaTags) */ const metaTags: wix_seo.MetaTag[]; /** * Gets the page's structured data. * [Read more](https://www.wix.com/corvid/reference/wix-seo.html#structuredData) */ const structuredData: any[]; /** * Gets the page's title. * [Read more](https://www.wix.com/corvid/reference/wix-seo.html#title) */ const title: string; /** * Sets the page's SEO-related link tags. * [Read more](https://www.wix.com/corvid/reference/wix-seo.html#setLinks) */ function setLinks(links: wix_seo.Link[]): Promise; /** * Sets the page's SEO-related meta tags. * [Read more](https://www.wix.com/corvid/reference/wix-seo.html#setMetaTags) */ function setMetaTags(metaTags: wix_seo.MetaTag[]): Promise; /** * Sets the page's structured data. * [Read more](https://www.wix.com/corvid/reference/wix-seo.html#setStructuredData) */ function setStructuredData(structuredData: any[]): Promise; /** * Sets the page's title. * [Read more](https://www.wix.com/corvid/reference/wix-seo.html#setTitle) */ function setTitle(title: string): Promise; } /** * The wix-site-backend module contains functionality for working with * your site and its pages from backend code. * [Read more](https://www.wix.com/corvid/reference/wix-site-backend.html#) */ declare module 'wix-site-backend' { /** * The generalInfo API contains functionality for getting * [the information about your business](https://support.wix.com/en/article/adding-your-sites-business-info) that * has been entered in the **General Info** section of your site's [**Dashboard**](https://support.wix.com/en/article/wix-dashboard-overview). * [Read more](https://www.wix.com/corvid/reference/wix-site-backend.html#generalInfo) */ const generalInfo: wix_site_backend.GeneralInfo; /** * Invalidates the cache for a site. * [Read more](https://www.wix.com/corvid/reference/wix-site-backend.html#invalidateCache) */ function invalidateCache(): Promise; } /** * The wix-stores-backend module contains functionality for working with your * site's store from backend code. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.html#) */ declare module 'wix-stores-backend' { /** * Adds media items by ID to a product. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.html#addProductMedia) */ function addProductMedia(productId: string, media: wix_stores_backend.Media[]): Promise; /** * Adds media items by ID to product options. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.html#addProductMediaToChoices) */ function addProductMediaToChoices(productId: string, mediaChoices: wix_stores_backend.MediaChoice[]): Promise; /** * Adds products by ID to a product collection. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.html#addProductsToCollection) */ function addProductsToCollection(collectionId: string, productIds: string[]): Promise; /** * Adjusts a numeric property for up to 100 products at a time. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.html#bulkAdjustProductProperty) */ function bulkAdjustProductProperty(ids: string[], adjust: wix_stores_backend.BulkAdjustProperties): Promise; /** * Updates a property for up to 100 products at a time. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.html#bulkUpdateProductProperty) */ function bulkUpdateProductProperty(ids: string[], set: wix_stores_backend.BulkUpdateProperties): Promise; /** * Creates a new fulfillment in an order. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.html#createFulfillment) */ function createFulfillment(orderId: string, fulfillment: wix_stores_backend.FulfillmentInfo): Promise; /** * Creates a new order. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.html#createOrder) */ function createOrder(orderInfo: wix_stores_backend.OrderInfo): Promise; /** * Creates a new product. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.html#createProduct) */ function createProduct(productInfo: wix_stores_backend.ProductInfo): Promise; /** * Subtracts a set number of items from inventory. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.html#decrementInventory) */ function decrementInventory(items: wix_stores_backend.DecrementInfo[]): Promise; /** * Deletes a fulfillment from an order. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.html#deleteFulfillment) */ function deleteFulfillment(orderId: string, fulfillmentId: string): Promise; /** * Deletes an existing product. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.html#deleteProduct) */ function deleteProduct(productId: string): Promise; /** * Deletes all options for an existing product. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.html#deleteProductOptions) */ function deleteProductOptions(productId: string): Promise; /** * Gets the specified abandoned shopping cart. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.html#getAbandonedCart) */ function getAbandonedCart(cartId: string): Promise; /** * Gets the current site visitor's shopping cart. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.html#getCurrentCart) */ function getCurrentCart(): Promise; /** * Generates a link to a PDF file containing information about one or more specified orders, up to 1000 orders. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.html#getOrdersLink) */ function getOrdersLink(orderIds: string[]): Promise; /** * Generates a link to a PDF file containing an order's packing slip. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.html#getPackingSlipLink) */ function getPackingSlipLink(orderId: string): Promise; /** * Gets the availability of a product based on the specified option choices. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.html#getProductOptionsAvailability) */ function getProductOptionsAvailability(productId: string, choices: wix_stores_backend.ProductChoices): Promise; /** * Gets a product's available variants based on the specified product ID and either option choices or variant IDs. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.html#getProductVariants) */ function getProductVariants(productId: string, options?: wix_stores_backend.ProductVariantOptions): Promise; /** * Adds a set number of items from inventory. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.html#incrementInventory) */ function incrementInventory(items: wix_stores_backend.IncrementInfo[]): Promise; /** * Removes media items by ID from a product. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.html#removeProductMedia) */ function removeProductMedia(productId: string, media: wix_stores_backend.Media[]): Promise; /** * Removes media items by ID from a product's options. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.html#removeProductMediaFromChoices) */ function removeProductMediaFromChoices(productId: string, mediaChoices: wix_stores_backend.MediaChoice[]): Promise; /** * Removes products by ID from a collection. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.html#removeProductsFromCollection) */ function removeProductsFromCollection(collectionId: string, productIds: string[]): Promise; /** * Resets the data (such as the price and the weight) of all variants for a given product to their default values. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.html#resetVariantData) */ function resetVariantData(productId: string): Promise; /** * Sends a fulfillment email to a specified custom fulfiller of a line item in a given order. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.html#sendFulfillmentEmail) */ function sendFulfillmentEmail(orderId: string, fulfillerId: string): Promise; /** * Updates an existing fulfillment in an order. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.html#updateFulfillment) */ function updateFulfillment(orderId: string, fulfillmentId: string, trackingInfo: wix_stores_backend.TrackingInfo): Promise; /** * Updates an existing inventory item's variants by inventory ID. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.html#updateInventoryVariantFields) */ function updateInventoryVariantFields(inventoryId: string, inventoryInfo: wix_stores_backend.InventoryItemVariantInfo): Promise; /** * Updates an existing inventory item's variants by product ID. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.html#updateInventoryVariantFieldsByProductId) */ function updateInventoryVariantFieldsByProductId(productId: string, inventoryInfo: wix_stores_backend.InventoryItemVariantInfo): Promise; /** * Updates an existing product by ID. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.html#updateProductFields) */ function updateProductFields(productId: string, productInfo: wix_stores_backend.UpdateProductInfo): Promise; /** * Updates the data (such as the price and the weight) of an existing product variant in the store. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.html#updateVariantData) */ function updateVariantData(productId: string, variantInfo: wix_stores_backend.VariantInfo[]): Promise; } /** * **Deprecated.** * The wix-users-backend module will continue to work, but a newer version is available at * [wix-members-backend](https://www.wix.com/velo/reference/wix-members-backend). * [Read more](https://www.wix.com/corvid/reference/wix-users-backend.html#) */ declare module 'wix-users-backend' { /** * **Deprecated.** * This code will continue to work, but a newer version is available at * [wix-members-backend.badges](https://www.wix.com/velo/reference/wix-members-backend/badges). * [Read more](https://www.wix.com/corvid/reference/wix-users-backend.html#badges) */ const badges: wix_users_backend.Badges; /** * **Deprecated.** * This object will continue to work, but a newer version is available at * [wix-members-backend.currentMember.getMember()](https://www.wix.com/velo/reference/wix-members-backend/currentmember/getmember). * [Read more](https://www.wix.com/corvid/reference/wix-users-backend.html#currentUser) */ const currentUser: wix_users_backend.User; /** * **Deprecated.** * This code will continue to work, but a newer version is available at * [wix-members-backend.authorization](https://www.wix.com/velo/reference/wix-members-backend/authorization). * [Read more](https://www.wix.com/corvid/reference/wix-users-backend.html#roles) */ const roles: wix_users_backend.Roles; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-members-backend.authentication.approveByEmail()](https://www.wix.com/velo/reference/wix-members-backend/authentication/approvebyemail). * [Read more](https://www.wix.com/corvid/reference/wix-users-backend.html#approveByEmail) */ function approveByEmail(email: string): Promise; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-members-backend.authentication.approveByToken()](https://www.wix.com/velo/reference/wix-members-backend/authentication/approvebytoken). * [Read more](https://www.wix.com/corvid/reference/wix-users-backend.html#approveByToken) */ function approveByToken(token: string): Promise; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-members-backend.authentication.blockByEmail()](https://www.wix.com/velo/reference/wix-members-backend/authentication/blockbyemail). * [Read more](https://www.wix.com/corvid/reference/wix-users-backend.html#blockByEmail) */ function blockByEmail(email: string): Promise; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-members-backend.members.deleteMember()](https://www.wix.com/velo/reference/wix-members-backend/members/deletemember). * [Read more](https://www.wix.com/corvid/reference/wix-users-backend.html#deleteUser) */ function deleteUser(userId: string): Promise; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-crm-backend.triggeredEmails.emailMember()](https://www.wix.com/velo/reference/wix-crm-backend/triggeredemails/emailmember). * [Read more](https://www.wix.com/corvid/reference/wix-users-backend.html#emailUser) */ function emailUser(emailId: string, toUser: string, options?: wix_users_backend.TriggeredEmailOptions): Promise; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-members-backend.authentication.generateSessionToken()](https://www.wix.com/velo/reference/wix-members-backend/authentication/generatesessiontoken). * [Read more](https://www.wix.com/corvid/reference/wix-users-backend.html#generateSessionToken) */ function generateSessionToken(email: string): Promise; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-members-backend.members.getMember()](https://www.wix.com/velo/reference/wix-members-backend/members/getmember). * [Read more](https://www.wix.com/corvid/reference/wix-users-backend.html#getUser) */ function getUser(userId: string): Promise; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-members-backend.authentication.login()](https://www.wix.com/velo/reference/wix-members-backend/authentication/login). * [Read more](https://www.wix.com/corvid/reference/wix-users-backend.html#login) */ function login(email: string, password: string): Promise; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-members-backend.authentication.register()](https://www.wix.com/velo/reference/wix-members-backend/authentication/register). * [Read more](https://www.wix.com/corvid/reference/wix-users-backend.html#register) */ function register(email: string, password: string, options?: wix_users_backend.RegistrationOptions): Promise; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-members-backend.members.updateMember()](https://www.wix.com/velo/reference/wix-members-backend/members/updatemember). * [Read more](https://www.wix.com/corvid/reference/wix-users-backend.html#updateUserFields) */ function updateUserFields(userId: string, userInfo: wix_users_backend.UserInfo): Promise; } /** * The wix-bookings module contains functionality for working with * bookings from client-side code. * [Read more](https://www.wix.com/corvid/reference/wix-bookings.html#) */ declare module 'wix-bookings' { /** * Books a service and processes payment for the service. * [Read more](https://www.wix.com/corvid/reference/wix-bookings.html#checkoutBooking) */ function checkoutBooking(bookingInfo: wix_bookings.BookingInfo, options?: wix_bookings.PaymentOptions): Promise; /** * Gets the valid checkout options for a service's slot. * [Read more](https://www.wix.com/corvid/reference/wix-bookings.html#getCheckoutOptions) */ function getCheckoutOptions(checkoutOptionOptions: wix_bookings.CheckoutOptionOptions): Promise; /** * Gets the available slots for a specific service. * [Read more](https://www.wix.com/corvid/reference/wix-bookings.html#getServiceAvailability) */ function getServiceAvailability(serviceId: string, options?: wix_bookings.AvailabilityOptions): Promise; } /** * The wix-crm module contains functionality for working with * [your site's contacts](https://support.wix.com/en/article/about-your-contact-list) * from client-side code. * [Read more](https://www.wix.com/corvid/reference/wix-crm.html#) */ declare module 'wix-crm' { /** * The Contacts API is used to manage a site's contacts. * [Read more](https://www.wix.com/corvid/reference/wix-crm.html#contacts) */ const contacts: wix_crm.Contacts; /** * The Triggered Emails API is used to send triggered emails to your site's contacts and members. * [Read more](https://www.wix.com/corvid/reference/wix-crm.html#triggeredEmails) */ const triggeredEmails: wix_crm.TriggeredEmails; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [`wix-crm.contacts.appendOrCreateContact()`](https://www.wix.com/velo/reference/wix-crm/contacts/appendorcreatecontact). * [Read more](https://www.wix.com/corvid/reference/wix-crm.html#createContact) */ function createContact(contactInfo: wix_crm.ContactInfo): Promise; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-crm.triggeredEmails.emailContact()](https://www.wix.com/velo/reference/wix-crm/triggeredemails/emailcontact). * [Read more](https://www.wix.com/corvid/reference/wix-crm.html#emailContact) */ function emailContact(emailId: string, toContact: string, options?: wix_crm.TriggeredEmails.TriggeredEmailOptions): Promise; } /** * The wix-stores module contains functionality for working with your * site's store from client-side code. * [Read more](https://www.wix.com/corvid/reference/wix-stores.html#) */ declare module 'wix-stores' { /** * The wix-stores.cart module provides functionality for working with your site's cart from client-side code. * [Read more](https://www.wix.com/corvid/reference/wix-stores.html#cart) */ const cart: wix_stores.Cart; /** * The wix-stores.navigate module provides functionality for navigating your store from client-side code. * [Read more](https://www.wix.com/corvid/reference/wix-stores.html#navigate) */ const navigate: wix_stores.Navigate; /** * The wix-stores.product module provides functionality for working with your store's products from client-side code. * [Read more](https://www.wix.com/corvid/reference/wix-stores.html#product) */ const product: wix_stores.Product; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-stores.cart.getCurrentCart()](https://www.wix.com/velo/reference/wix-stores/cart/getcurrentcart). * [Read more](https://www.wix.com/corvid/reference/wix-stores.html#getCurrentCart) */ function getCurrentCart(): Promise; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-stores.product.getOptionsAvailability()](https://www.wix.com/velo/reference/wix-stores/product/getoptionsavailability). * [Read more](https://www.wix.com/corvid/reference/wix-stores.html#getProductOptionsAvailability) */ function getProductOptionsAvailability(productId: string, choices: any): Promise; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-stores.product.getVariants()](https://www.wix.com/velo/reference/wix-stores/product/getvariants). * [Read more](https://www.wix.com/corvid/reference/wix-stores.html#getProductVariants) */ function getProductVariants(productId: string, options?: wix_stores.ProductVariantOptions): Promise; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-stores.cart.onChange()](https://www.wix.com/velo/reference/wix-stores/cart/onchange). * [Read more](https://www.wix.com/corvid/reference/wix-stores.html#onCartChanged) */ function onCartChanged(handler: wix_stores.CartChangedHandler): void; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-stores.cart.removeProduct()](https://www.wix.com/velo/reference/wix-stores/cart/removeproduct). * [Read more](https://www.wix.com/corvid/reference/wix-stores.html#removeProductFromCart) */ function removeProductFromCart(cartLineItemId: number): Promise; } /** * **Deprecated.** * The wix-users module will continue to work, but a newer version is available at * [wix-members](https://www.wix.com/velo/reference/wix-members). * [Read more](https://www.wix.com/corvid/reference/wix-users.html#) */ declare module 'wix-users' { /** * **Deprecated.** * This object will continue to work, but a newer version is available at * [wix-members.currentMember.getMember()](https://www.wix.com/velo/reference/wix-members/currentmember/getmember). * [Read more](https://www.wix.com/corvid/reference/wix-users.html#currentUser) */ const currentUser: wix_users.User; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-members.authentication.applySessionToken()](https://www.wix.com/velo/reference/wix-members/authentication/applysessiontoken). * [Read more](https://www.wix.com/corvid/reference/wix-users.html#applySessionToken) */ function applySessionToken(sessionToken: string): Promise; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-crm.triggeredEmails.emailMember()](https://www.wix.com/velo/reference/wix-crm/triggeredemails/emailmember). * [Read more](https://www.wix.com/corvid/reference/wix-users.html#emailUser) */ function emailUser(emailId: string, toUser: string, options?: wix_users.TriggeredEmailOptions): Promise; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-window.consentPolicy.getCurrentConsentPolicy()](https://www.wix.com/velo/reference/wix-window/consentpolicy/getcurrentconsentpolicy). * [Read more](https://www.wix.com/corvid/reference/wix-users.html#getCurrentConsentPolicy) */ function getCurrentConsentPolicy(): wix_users.PolicyDetails; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-members.authentication.login()](https://www.wix.com/velo/reference/wix-members/authentication/login). * [Read more](https://www.wix.com/corvid/reference/wix-users.html#login) */ function login(email: string, password: string): Promise; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-members.authentication.logout()](https://www.wix.com/velo/reference/wix-members/authentication/logout). * [Read more](https://www.wix.com/corvid/reference/wix-users.html#logout) */ function logout(): void; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-window.consentPolicy.onConsentPolicyChanged()](https://www.wix.com/velo/reference/wix-window/consentpolicy/onconsentpolicychanged). * [Read more](https://www.wix.com/corvid/reference/wix-users.html#onConsentPolicyChanged) */ function onConsentPolicyChanged(handler: wix_users.ConsentPolicyChangedHandler): void; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-members.authentication.onLogin()](https://www.wix.com/velo/reference/wix-members/authentication/onlogin). * [Read more](https://www.wix.com/corvid/reference/wix-users.html#onLogin) */ function onLogin(handler: wix_users.LoginHandler): void; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-members.authentication.promptForgotPassword()](https://www.wix.com/velo/reference/wix-members/authentication/promptforgotpassword). * [Read more](https://www.wix.com/corvid/reference/wix-users.html#promptForgotPassword) */ function promptForgotPassword(language?: string): Promise; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-members.authentication.promptLogin()](https://www.wix.com/velo/reference/wix-members/authentication/promptlogin). * [Read more](https://www.wix.com/corvid/reference/wix-users.html#promptLogin) */ function promptLogin(options?: wix_users.LoginOptions): Promise; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-members.authentication.register()](https://www.wix.com/velo/reference/wix-members/authentication/register). * [Read more](https://www.wix.com/corvid/reference/wix-users.html#register) */ function register(email: string, password: string, options?: wix_users.RegistrationOptions): Promise; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-window.consentPolicy.resetConsentPolicy()](https://www.wix.com/velo/reference/wix-window/consentpolicy/resetconsentpolicy). * [Read more](https://www.wix.com/corvid/reference/wix-users.html#resetConsentPolicy) */ function resetConsentPolicy(): Promise; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-window.consentPolicy.setConsentPolicy()](https://www.wix.com/velo/reference/wix-window/consentpolicy/setconsentpolicy). * [Read more](https://www.wix.com/corvid/reference/wix-users.html#setConsentPolicy) */ function setConsentPolicy(policy: wix_users.Policy): Promise; } declare namespace $w { /** * A post page for a specific blog post. * [Read more](https://www.wix.com/corvid/reference/$w.PostPage.html#) */ interface PostPage extends $w.Element, $w.HiddenCollapsedMixin { /** * Gets the all the information associated with the current blog post. * [Read more](https://www.wix.com/corvid/reference/$w.PostPage.html#getPost) */ getPost(): Promise<$w.PostPage.BlogPost>; } namespace PostPage { /** * An object representing a blog post on a post page. * > **Note:** * `viewCount` and `likeCount` data used on your site pages is eventually consistent and may require up * to 24 hours to update. To make sure new post views and likes are included on your site in real time, * [disable caching](https://support.wix.com/en/article/caching-your-sites-pages) for * any page that uses `viewCount` or `likeCount` data. Note that disabling caching may increase your page loading time. */ type BlogPost = { /** * Post ID. */ _id: string; /** * Post title. */ title: string; /** * Text of the post. */ plainContent: string; /** * Date the post was originally published. */ publishedDate: Date; /** * Number of times the post was viewed. */ viewCount: number; /** * Number of likes the post received. */ likeCount: number; /** * Number of comments the post received. */ commentCount: number; /** * Date the post was most recently published. */ lastPublishedDate: Date; /** * Indicates whether the cover image is displayed in the post. */ coverImageDisplayed: boolean; /** * Estimated time in minutes required to read the post. */ timeToRead: number; /** * Indicates whether the post was pinned to the top of the blog feed. */ pinned: boolean; /** * Indicates whether the post is set as featured in the post settings. Featured posts appear in custom blog feeds. */ featured: boolean; /** * List of all hashtags in the post. */ hashtags: string[]; /** * The post's cover [image]($w.Image.html#src). */ coverImage: string; /** * Relative URL of the post page on your published site. */ postPageUrl: string; /** * A few lines of text that appear in the blog feed. Defined * in [Post Settings](https://support.wix.com/en/article/editing-excerpts-in-the-new-wix-blog) or default of first 160 characters of the post. */ excerpt: string; }; } /** * Breadcrumbs are used for navigating between site pages. * [Read more](https://www.wix.com/corvid/reference/$w.Breadcrumbs.html#) */ interface Breadcrumbs extends $w.HiddenCollapsedMixin, $w.ViewportMixin { /** * Indicates if an ellipsis is displayed in the breadcrumbs trail. * [Read more](https://www.wix.com/corvid/reference/$w.Breadcrumbs.html#isEllipsisVisible) */ readonly isEllipsisVisible: boolean; /** * Sets or gets breadcrumbs items. * [Read more](https://www.wix.com/corvid/reference/$w.Breadcrumbs.html#items) */ items: $w.Breadcrumbs.Item[]; /** * Sets or gets the number of items that appear in the breadcrumbs trail after an ellipsis. * [Read more](https://www.wix.com/corvid/reference/$w.Breadcrumbs.html#itemsAfterEllipsis) */ itemsAfterEllipsis: number; /** * Sets or gets the number of items that appear in the breadcrumbs trail before an ellipsis. * [Read more](https://www.wix.com/corvid/reference/$w.Breadcrumbs.html#itemsBeforeEllipsis) */ itemsBeforeEllipsis: number; /** * Hides an ellipsis displayed in a breadcrumbs element and displays the middle items of the breadcrumbs trail instead. * [Read more](https://www.wix.com/corvid/reference/$w.Breadcrumbs.html#hideEllipsis) */ hideEllipsis(): void; /** * Displays an ellipsis in a breadcrumbs element instead of the middle items of the breadcrumbs trail. * [Read more](https://www.wix.com/corvid/reference/$w.Breadcrumbs.html#showEllipsis) */ showEllipsis(): void; } namespace Breadcrumbs { /** * An object that contains the attributes of a breadcrumbs item. */ type Item = { /** * The label of the breadcrumbs item. This is text that the site visitor sees and can click to navigate. Required if `icon` isn't specified. If not specified, `label` is omitted from the returned array. */ label?: string; /** * The icon of the breadcrumbs item. This is a vector image that the site visitor sees and can click to navigate. Required if `label` isn't specified. If not specified, the `icon` key is omitted from the returned array. * * The vector image file can be an image file from the Media Manager, an external SVG image from any web location, or a literal SVG XML string. * * The formats supported are: * + Vector images from the Media Manager: `wix:vector://v1//` * + Vector images from the web: `http(s)://` * + Vector XML string: `...` */ icon?: string; /** * Optional link for the breadcrumbs item as a URL relative to your site's home page. This is the link the site visitor navigates to when they click on a breadcrumbs item. The page opens in the same window/tab. * * If a link isn't specified, it's `undefined` in the breadcrumbs object. The corresponding label or icon isn't clickable. * * >**Note:** * > In the default breadcrumbs `items` array generated for a page, any `link` properties contain absolute URLs, not relative ones. */ link?: string; /** * Setting `isCurrent` to `true` for a breadcrumbs item causes the item to appear highlighted in the breadcrumbs element. * You can use this property to indicate which page in a breadcrumbs trail is currently displayed. In a default `items` array, the last item's `isCurrent` value is `true`. * >**Note:** The value of `isCurrent` isn't validated against which page is actually displayed. It can also be set to `true` for multiple breadcrumbs items. */ isCurrent?: boolean; }; } /** * An element for sending and receiving chat messages. * [Read more](https://www.wix.com/corvid/reference/$w.Chatbox.html#) */ interface Chatbox extends $w.Element, $w.HiddenMixin { /** * Indicates if an element appears on all pages or only on the current page. * [Read more](https://www.wix.com/corvid/reference/$w.Chatbox.html#global) */ readonly global: boolean; /** * Indicates if the chatbox is visible or hidden. * [Read more](https://www.wix.com/corvid/reference/$w.Chatbox.html#hidden) */ readonly hidden: boolean; /** * Indicates if the element is actually visible. * [Read more](https://www.wix.com/corvid/reference/$w.Chatbox.html#isVisible) */ readonly isVisible: boolean; /** * Indicates if the chatbox is maximized. * [Read more](https://www.wix.com/corvid/reference/$w.Chatbox.html#maximized) */ readonly maximized: boolean; /** * Note: This standard element property is not relevant for Chatbox. * [Read more](https://www.wix.com/corvid/reference/$w.Chatbox.html#parent) */ readonly parent: $w.Node; /** * Expands the chatbox and focuses it on the specified chat channel. * [Read more](https://www.wix.com/corvid/reference/$w.Chatbox.html#focusChannel) */ focusChannel(channelInfo: $w.Chatbox.ChannelInfo): Promise; /** * Gets a chatbox channel. * [Read more](https://www.wix.com/corvid/reference/$w.Chatbox.html#getChannel) */ getChannel(channelInfo: $w.Chatbox.ChannelInfo): Promise<$w.Chatbox.Channel>; /** * Gets a list of available chat channels for a site visitor. * [Read more](https://www.wix.com/corvid/reference/$w.Chatbox.html#getChannelList) */ getChannelList(): Promise<$w.Chatbox.Channel[]>; /** * Expands the chatbox and sets its [`maximized`](#maximized) property to `true`. * [Read more](https://www.wix.com/corvid/reference/$w.Chatbox.html#maximize) */ maximize(): Promise; /** * Collapses the chatbox and sets its [`maximized`](#maximized) property to `false`. * [Read more](https://www.wix.com/corvid/reference/$w.Chatbox.html#minimize) */ minimize(): Promise; /** * An event that fires when the chatbox is maximized. * [Read more](https://www.wix.com/corvid/reference/$w.Chatbox.html#onMaximize) */ onMaximize(handler: $w.BasicEventHandler): void; /** * An event that fires when a site visitor receives a chat message. * [Read more](https://www.wix.com/corvid/reference/$w.Chatbox.html#onMessageReceived) */ onMessageReceived(message: $w.Chatbox.Message): void; /** * An event that fires when a site visitor sends a chat message. * [Read more](https://www.wix.com/corvid/reference/$w.Chatbox.html#onMessageSent) */ onMessageSent(message: $w.Chatbox.Message): void; /** * An event that fires when the chatbox is minimized. * [Read more](https://www.wix.com/corvid/reference/$w.Chatbox.html#onMinimize) */ onMinimize(handler: $w.BasicEventHandler): void; /** * Note: This standard element event is not relevant for Chatbox. * [Read more](https://www.wix.com/corvid/reference/$w.Chatbox.html#onViewportEnter) * @eventType viewportEnter */ onViewportEnter(handler: $w.EventHandler): $w.Element; /** * Note: This standard element event is not relevant for Chatbox. * [Read more](https://www.wix.com/corvid/reference/$w.Chatbox.html#onViewportLeave) * @eventType viewportLeave */ onViewportLeave(handler: $w.EventHandler): $w.Element; /** * Note: This standard element function is not relevant for Chatbox. * [Read more](https://www.wix.com/corvid/reference/$w.Chatbox.html#scrollTo) */ scrollTo(): Promise; /** * Sends a chat message from a site visitor. * [Read more](https://www.wix.com/corvid/reference/$w.Chatbox.html#sendMessage) */ sendMessage(messageInfo: $w.Chatbox.MessageInfo): Promise; } namespace Chatbox { /** * An object representing a chat channel. */ type Channel = { /** * ID of the channel. */ id: string; /** * Display information associated with the channel. */ displayData: $w.Chatbox.DisplayData; /** * An array of messages sent over the channel. Currently only the last message is included. */ messages: $w.Chatbox.Message[]; }; /** * An object containing information about a chat channel. */ type ChannelInfo = { /** * ID of a chat channel. */ channelId?: string; /** * Type of chat channel. * One of the following: * * + `"Focused"`: Currently focused channel. * + `"Business"`: Business channel. */ type?: string; }; /** * An object representing display information associated with a [`Channel`](#channel). */ type DisplayData = { /** * The image associated with the channel. * One of the following: * * + For private social channels, the image associated with the site member's account. If there is no image associated with the account, defaults to the avatar image. * + For group social channels, the image associated with the chat group. * + For business channels, `image` is not currently supported. */ image: string; /** * For social channels, the member's name or chat group name. For business channels, the site's [display name](wix-site-backend.generalInfo.html#getSiteDisplayName). */ name: string; /** * Only supported for business channels. Initials of the site's business. */ initials: string; }; /** * An object that contains information about a chat message. */ type Message = { /** * ID of the channel on which the message was sent. */ channelId: string; /** * Type of message. Currently only `TEXT` is supported. */ type: string; /** * First 250 characters of the chat message. Currently only text is included in the summary. */ summary: string; /** * The sender's member ID. For a message sent from the site's business, the site owner's member ID. */ participantId: string; /** * Date and time the message was sent. */ createdAt: Date; /** * Content of the message. */ payload: $w.Chatbox.MessagePayload; /** * An object representing additional contextual message information included in a chat message. Only relevant for messages sent using the backend [`sendMessage()`](wix-chat-backend.html#sendMessage) function. Site visitors do not see metadata. */ metadata?: any; }; /** * An object representing a chat message to be sent. */ type MessageInfo = { /** * The text to be sent in the message. */ messageText: string; /** * The ID of the channel over which the message is sent. If empty, message is sent to the site's business. */ channelId?: string; }; /** * The content of a chat message. */ type MessagePayload = { /** * Text of the chat message. */ text: string; }; } /** * A text element for managing large amounts of text. * [Read more](https://www.wix.com/corvid/reference/$w.CollapsibleText.html#) */ interface CollapsibleText extends $w.Element, $w.HiddenCollapsedMixin, $w.ClickableMixin { /** * Indicates whether the ellipsis functionality is turned on. * [Read more](https://www.wix.com/corvid/reference/$w.CollapsibleText.html#ellipsisEnabled) */ readonly ellipsisEnabled: boolean; /** * Sets or gets the maximum number of lines of introductory text in the collapsible text. * [Read more](https://www.wix.com/corvid/reference/$w.CollapsibleText.html#maxLines) */ maxLines: number; /** * Sets or gets the data object of the read more action for the collapsible text. * [Read more](https://www.wix.com/corvid/reference/$w.CollapsibleText.html#readMoreActionData) */ readMoreActionData: $w.CollapsibleText.ExpandOnCurrentPage | $w.CollapsibleText.LinkToContent; /** * Sets or gets the type of read more action for the collapsible text. * [Read more](https://www.wix.com/corvid/reference/$w.CollapsibleText.html#readMoreActionType) */ readMoreActionType: string; /** * Sets or gets the plain-text content of a collapsible text element. * [Read more](https://www.wix.com/corvid/reference/$w.CollapsibleText.html#text) */ text: string; /** * Adds a read more button that links to the remaining text when clicked. * [Read more](https://www.wix.com/corvid/reference/$w.CollapsibleText.html#addReadMoreButton) */ addReadMoreButton(buttonText?: string): void; /** * Collapses the collapsible text and displays the introductory text with an ellipsis. * [Read more](https://www.wix.com/corvid/reference/$w.CollapsibleText.html#collapseText) */ collapseText(): void; /** * Turns off the ellipsis functionality. * [Read more](https://www.wix.com/corvid/reference/$w.CollapsibleText.html#disableEllipsis) */ disableEllipsis(): void; /** * Turns on the ellipsis functionality. * [Read more](https://www.wix.com/corvid/reference/$w.CollapsibleText.html#enableEllipsis) */ enableEllipsis(): void; /** * Expands the collapsible text, displays the full text, and hides the ellipsis. * [Read more](https://www.wix.com/corvid/reference/$w.CollapsibleText.html#expandText) */ expandText(): void; /** * Removes the read more button that links to the remaining text when clicked. * [Read more](https://www.wix.com/corvid/reference/$w.CollapsibleText.html#removeReadMoreButton) */ removeReadMoreButton(): void; } namespace CollapsibleText { /** * Expands content overflow on current page. */ type ExpandOnCurrentPage = { /** * Text of the read more button. Defaults to `Read more`. */ readMoreButtonText?: string; /** * Text of the read less button. Defaults to `Read less`. */ readLessButtonText?: string; /** * Whether the collapsible text is currently collapsed. Defaults to `true`. */ collapsed?: boolean; }; /** * Links to the content overflow. */ type LinkToContent = { /** * Link for the remaining text. Supports all [link types](https://www.wix.com/velo/reference/$w/linkablemixin/link). */ link: string; /** * Determines where the link opens, either in the current page or in a new page. * One of: * `"_blank"`: The link opens in a new tab or window. * `"_self"`: The link opens in the tab or window. * * Defaults to `"_blank"`. * * Note: Link targets are only supported for external web links, for example, `https://www.wix.com`. */ target?: string; /** * Whether the read more button is visible. Defaults to `false`. */ readMoreButtonVisible?: boolean; /** * Text of the read more button. Defaults to 'Link to full article'. */ readMoreButtonText?: string; }; } /** * The Lottie element is used for adding and customizing a Lottie animation. * [Read more](https://www.wix.com/corvid/reference/$w.Lottie.html#) */ interface Lottie extends $w.Element, $w.FocusMixin, $w.HiddenCollapsedMixin, $w.ClickableMixin { /** * Sets or gets a Lottie animation's alt text. * [Read more](https://www.wix.com/corvid/reference/$w.Lottie.html#alt) */ alt: string; /** * Sets or gets whether the Lottie animation plays in a loop. * [Read more](https://www.wix.com/corvid/reference/$w.Lottie.html#loop) */ loop: boolean; /** * Sets or gets the Lottie animation's playback speed. * [Read more](https://www.wix.com/corvid/reference/$w.Lottie.html#speed) */ speed: number; /** * Sets or gets the source of the Lottie animation. * [Read more](https://www.wix.com/corvid/reference/$w.Lottie.html#src) */ src: string; /** * Pauses playback. * [Read more](https://www.wix.com/corvid/reference/$w.Lottie.html#pause) */ pause(): void; /** * Begins or resumes playback. * [Read more](https://www.wix.com/corvid/reference/$w.Lottie.html#play) */ play(): void; /** * Stops the playback. * [Read more](https://www.wix.com/corvid/reference/$w.Lottie.html#stop) */ stop(): void; } /** * A container component used to divide your page into meaningful segments. * [Read more](https://www.wix.com/corvid/reference/$w.Section.html#) */ interface Section extends $w.Element, $w.Background, $w.HiddenCollapsedMixin, $w.ClickableMixin, $w.ContainableMixin { } /** * An element that displays your site's events. * [Read more](https://www.wix.com/corvid/reference/$w.WixEvents.html#) */ interface WixEvents extends $w.Element, $w.HiddenCollapsedMixin { /** * Sets or gets the event category displayed in a Wix Events element. * [Read more](https://www.wix.com/corvid/reference/$w.WixEvents.html#categoryId) */ categoryId: string; } /** * The menu in a user profile. * [Read more](https://www.wix.com/corvid/reference/$w.AccountNavBar.html#) */ interface AccountNavBar extends $w.Element, $w.HiddenCollapsedMixin { } /** * [Anchors](https://www.wix.com/support/html5/article/about-anchors) * are invisible position markers which you can place anywhere on your site. * [Read more](https://www.wix.com/corvid/reference/$w.Anchor.html#) */ interface Anchor extends $w.Node, $w.ViewportMixin { /** * Gets the name of an anchor. * [Read more](https://www.wix.com/corvid/reference/$w.Anchor.html#name) */ readonly name: string; } /** * Use an `AppointmentField` to select dates, times, and timezones for scheduling appointments. * [Read more](https://www.wix.com/corvid/reference/$w.AppointmentField.html#) */ interface AppointmentField extends $w.FormElement, $w.HiddenCollapsedMixin, $w.DisabledMixin, $w.FocusMixin, $w.ClickableMixin, $w.RequiredMixin { /** * Sets or gets a list of dates and times that a site visitor can select. * [Read more](https://www.wix.com/corvid/reference/$w.AppointmentField.html#dateTimeRanges) */ dateTimeRanges: $w.AppointmentField.dateTimeRangeInfo; /** * Sets or gets a list of days in the week that are not selectable. * [Read more](https://www.wix.com/corvid/reference/$w.AppointmentField.html#disabledDaysOfWeek) */ disabledDaysOfWeek: number[]; /** * Sets or gets the latest date that a site visitor can select. * [Read more](https://www.wix.com/corvid/reference/$w.AppointmentField.html#maxDate) */ maxDate: Date; /** * Sets or gets the earliest date that a site visitor can select. * [Read more](https://www.wix.com/corvid/reference/$w.AppointmentField.html#minDate) */ minDate: Date; /** * Sets or gets the minimum amount of time before an appointment starts that a time slot is displayed. * [Read more](https://www.wix.com/corvid/reference/$w.AppointmentField.html#schedulingNotice) */ schedulingNotice: number; /** * Sets or gets the interval between the times displayed in the time picker. * [Read more](https://www.wix.com/corvid/reference/$w.AppointmentField.html#timeIncrements) */ timeIncrements: number; /** * Sets or gets the title of an appointment field. * [Read more](https://www.wix.com/corvid/reference/$w.AppointmentField.html#title) */ title: string; /** * Sets or gets the time format. * [Read more](https://www.wix.com/corvid/reference/$w.AppointmentField.html#useAmPmFormat) */ useAmPmFormat: boolean; /** * Sets or gets the date and time value of the appointment field. * [Read more](https://www.wix.com/corvid/reference/$w.AppointmentField.html#value) */ value: Date; /** * Sets or gets the timezone dropdown value. * [Read more](https://www.wix.com/corvid/reference/$w.AppointmentField.html#visitorTimeZone) */ visitorTimeZone: string; /** * Adds an event handler that triggers when the appointment field's year or month changes. * [Read more](https://www.wix.com/corvid/reference/$w.AppointmentField.html#onViewChange) * @eventType onViewChange */ onViewChange(handler: $w.ViewChangeEventHandler, operation?: $w.ViewChangeOperation, timeout?: number): void; /** * Resets the appointment field to its original values. * [Read more](https://www.wix.com/corvid/reference/$w.AppointmentField.html#reset) */ reset(): void; } namespace AppointmentField { type OperationOptions = { /** * Start date of the currently displayed month. */ startDate: Date; /** * End date of the currently displayed month. */ endDate: Date; }; type dateTimeRange = { /** * Date and time of the start of the range. */ startDateTime: Date; /** * Date and time of the end of the range. */ endDateTime: Date; }; type dateTimeRangeInfo = { /** * Date range type. Valid values: `'enabledRanges'` */ type: string; /** * Array of dateTimeRange objects. */ payload: $w.AppointmentField.dateTimeRange[]; }; } /** * Provides functionality for background images in certain elements. * [Read more](https://www.wix.com/corvid/reference/$w.Background.html#) */ interface Background { /** * Sets or gets an object containing information about the element's background. * [Read more](https://www.wix.com/corvid/reference/$w.Background.html#background) */ background: $w.Background.BackgroundOptions; } namespace Background { /** * An object used by the `background` property that contains the background options. */ type BackgroundOptions = { /** * The file location of the background image or video. * Setting the `src` property changes the * displayed image or video to the image or video found at the new `src` value. * * Getting the `src` property returns the * location of the current image or video file. * * Images can either be from the [Media Manager](https://support.wix.com/en/article/about-the-media-manager) * or an external image from any web location. Videos must come from the * [Media Manager](https://support.wix.com/en/article/about-the-media-manager). * * The URL formats supported are: * * + Images from the Media Manager: * `wix:image://v1//#originWidth=&originHeight=[&watermark=]` * + Videos from the Media Manager: * `wix:video://v1//#posterUri=&posterWidth=&posterHeight=` * + Images from the web: * `http(s)://` */ src: string; }; } /** * Container [boxes](https://support.wix.com/en/article/container-boxes) * are used to structure your site. * [Read more](https://www.wix.com/corvid/reference/$w.Box.html#) */ interface Box extends $w.Element, $w.HiddenCollapsedMixin, $w.ClickableMixin, $w.ContainableMixin, $w.StyleMixin { /** * Gets an object containing information about the box's styles. * [Read more](https://www.wix.com/corvid/reference/$w.Box.html#style) */ readonly style: $w.Style; } /** * A button on your site. * [Read more](https://www.wix.com/corvid/reference/$w.Button.html#) */ interface Button extends $w.Element, $w.HiddenCollapsedMixin, $w.DisabledMixin, $w.LinkableMixin, $w.ClickableMixin, $w.StyleMixin, $w.LabelMixin { /** * Sets or gets the icon image displayed on the button. * [Read more](https://www.wix.com/corvid/reference/$w.Button.html#icon) */ icon: string; /** * Indicates if the button’s icon is collapsed or expanded. * [Read more](https://www.wix.com/corvid/reference/$w.Button.html#iconCollapsed) */ readonly iconCollapsed: boolean; /** * Sets or gets a button's label. * [Read more](https://www.wix.com/corvid/reference/$w.Button.html#label) */ label: string; /** * Sets or gets the button's link. * [Read more](https://www.wix.com/corvid/reference/$w.Button.html#link) */ link: string; /** * Gets an object containing information about the button's styles. * [Read more](https://www.wix.com/corvid/reference/$w.Button.html#style) */ readonly style: $w.Style; /** * Collapses the button’s icon and sets its `iconCollapsed` property to `true`. * [Read more](https://www.wix.com/corvid/reference/$w.Button.html#collapseIcon) */ collapseIcon(): Promise; /** * Expands the button’s icon and sets its `iconCollapsed` property to `false`. * [Read more](https://www.wix.com/corvid/reference/$w.Button.html#expandIcon) */ expandIcon(): Promise; /** * Adds an event handler that runs when the mouse pointer is moved * onto the element. * * You can also [define an event handler using the Properties and Events panel](https://support.wix.com/en/article/velo-reacting-to-user-actions-using-events). * [Read more](https://www.wix.com/corvid/reference/$w.Button.html#onMouseIn) */ onMouseIn(handler: $w.MouseEventHandler): $w.Button; /** * Adds an event handler that runs when the mouse pointer is moved * off of the element. * * You can also [define an event handler using the Properties and Events panel](https://support.wix.com/en/article/velo-reacting-to-user-actions-using-events). * [Read more](https://www.wix.com/corvid/reference/$w.Button.html#onMouseOut) */ onMouseOut(handler: $w.MouseEventHandler): $w.Button; } /** * Checkboxes are used for a single binary choice. * [Read more](https://www.wix.com/corvid/reference/$w.Checkbox.html#) */ interface Checkbox extends $w.LabelMixin, $w.FormElement, $w.DisabledMixin, $w.HiddenCollapsedMixin, $w.FocusMixin, $w.ClickableMixin, $w.StyleMixin, $w.RequiredMixin, $w.CheckedMixin { /** * Sets or gets whether a checkbox is checked. * [Read more](https://www.wix.com/corvid/reference/$w.Checkbox.html#checked) */ checked: boolean; /** * Gets or sets if a checkbox is required to be checked. * [Read more](https://www.wix.com/corvid/reference/$w.Checkbox.html#required) */ required: boolean; /** * Gets an object containing information about the checkbox's styles. * [Read more](https://www.wix.com/corvid/reference/$w.Checkbox.html#style) */ readonly style: $w.Style; /** * Sets or gets a checkbox's value. * [Read more](https://www.wix.com/corvid/reference/$w.Checkbox.html#value) */ value: string; } /** * Checkbox groups are used for selecting any number of the given * options. * [Read more](https://www.wix.com/corvid/reference/$w.CheckboxGroup.html#) */ interface CheckboxGroup extends $w.LabelMixin, $w.FormElement, $w.HiddenCollapsedMixin, $w.DisabledMixin, $w.FocusMixin, $w.ClickableMixin, $w.StyleMixin, $w.RequiredMixin { /** * Sets or gets the options of a checkbox group. * [Read more](https://www.wix.com/corvid/reference/$w.CheckboxGroup.html#options) */ options: $w.CheckboxGroup.Option[]; /** * Sets or gets the indices of the selected options. * [Read more](https://www.wix.com/corvid/reference/$w.CheckboxGroup.html#selectedIndices) */ selectedIndices: number[]; /** * Gets an object containing information about the checkbox group's styles. * [Read more](https://www.wix.com/corvid/reference/$w.CheckboxGroup.html#style) */ readonly style: $w.Style; /** * Sets or gets the value of the selected options. * [Read more](https://www.wix.com/corvid/reference/$w.CheckboxGroup.html#value) */ value: string[]; } namespace CheckboxGroup { /** * An object used by the `options` property that contains the attributes of a checkbox item. */ type Option = { /** * The value of the checkbox option. This is what you use in code and is what is stored in your collections. Mandatory if `label` is not specified. */ value?: string; /** * The label of the checkbox option. This is what a user sees. Mandatory if `value` is not specified. */ label?: string; }; } /** * Provides functionality for elements that can be checked. * [Read more](https://www.wix.com/corvid/reference/$w.CheckedMixin.html#) */ interface CheckedMixin { /** * Sets or gets whether the element is checked or not. * [Read more](https://www.wix.com/corvid/reference/$w.CheckedMixin.html#checked) */ checked: boolean; } /** * Provides functionality for elements that can be clicked. * [Read more](https://www.wix.com/corvid/reference/$w.ClickableMixin.html#) */ interface ClickableMixin { /** * Adds an event handler that runs when the element is clicked. * [Read more](https://www.wix.com/corvid/reference/$w.ClickableMixin.html#onClick) * @eventType click */ onClick(handler: $w.MouseEventHandler): $w.Element; /** * Adds an event handler that runs when the element is double-clicked. * [Read more](https://www.wix.com/corvid/reference/$w.ClickableMixin.html#onDblClick) * @eventType dblClick */ onDblClick(handler: $w.MouseEventHandler): $w.Element; } /** * Provides functionality for elements that can be collapsed. * [Read more](https://www.wix.com/corvid/reference/$w.CollapsedMixin.html#) */ interface CollapsedMixin { /** * Indicates if the element is collapsed or expanded. * [Read more](https://www.wix.com/corvid/reference/$w.CollapsedMixin.html#collapsed) */ readonly collapsed: boolean; /** * Collapses the element and sets its `collapsed` property to `true`. * [Read more](https://www.wix.com/corvid/reference/$w.CollapsedMixin.html#collapse) */ collapse(): Promise; /** * Expands the element and sets its `collapsed` property to `false`. * [Read more](https://www.wix.com/corvid/reference/$w.CollapsedMixin.html#expand) */ expand(): Promise; } /** * A `Column` is a component part of a `ColumnStrip`. * [Read more](https://www.wix.com/corvid/reference/$w.Column.html#) */ interface Column extends $w.Element, $w.HiddenCollapsedMixin, $w.Background, $w.ClickableMixin, $w.ContainableMixin { } /** * A `ColumnStrip` is a strip of `Column` elements. * [Read more](https://www.wix.com/corvid/reference/$w.ColumnStrip.html#) */ interface ColumnStrip extends $w.Element, $w.Background, $w.HiddenCollapsedMixin, $w.ClickableMixin, $w.ContainableMixin { /** * Gets an object containing information about the column strip's background, such as its image or video source. * [Read more](https://www.wix.com/corvid/reference/$w.ColumnStrip.html#background) */ readonly background: $w.Document.BackgroundOptions; /** * Gets a list of all the columns contained in the column strip. * [Read more](https://www.wix.com/corvid/reference/$w.ColumnStrip.html#columns) */ readonly columns: $w.Column[]; } /** * Provides functionality for elements that can contain other elements. * [Read more](https://www.wix.com/corvid/reference/$w.ContainableMixin.html#) */ interface ContainableMixin { /** * Gets an array of the elements that are contained within the element. * [Read more](https://www.wix.com/corvid/reference/$w.ContainableMixin.html#children) */ readonly children: ($w.Element & AnyProperties)[]; } /** * A container for Repeater items. * [Read more](https://www.wix.com/corvid/reference/$w.Container.html#) */ interface Container extends $w.Element, $w.HiddenCollapsedMixin, $w.Background, $w.ClickableMixin, $w.ContainableMixin { } /** * A `DatePicker` is used for entering dates. It lets site visitors populate a * date field by picking a date using a calendar popup. * You can enable and disable dates, date ranges, and days of the week on your date picker. * [Read more](https://www.wix.com/corvid/reference/$w.DatePicker.html#) */ interface DatePicker extends $w.LabelMixin, $w.FormElement, $w.HiddenCollapsedMixin, $w.DisabledMixin, $w.FocusMixin, $w.ReadOnlyMixin, $w.ClickableMixin, $w.RequiredMixin { /** * Sets or gets the format of the date displayed in the date picker. * [Read more](https://www.wix.com/corvid/reference/$w.DatePicker.html#dateFormat) */ dateFormat: string; /** * Sets or gets ranges of dates that a site visitor can't select. * [Read more](https://www.wix.com/corvid/reference/$w.DatePicker.html#disabledDateRanges) */ disabledDateRanges: $w.DatePicker.DateRange[]; /** * **Deprecated.** This property will continue to work, but a newer version is available at [`disabledDateRanges`](https://www.wix.com/velo/reference/$w/datepicker/disableddateranges). * [Read more](https://www.wix.com/corvid/reference/$w.DatePicker.html#disabledDates) */ disabledDates: Date[]; /** * Sets or gets the days of the week that a site visitor can't select. * [Read more](https://www.wix.com/corvid/reference/$w.DatePicker.html#disabledDaysOfWeek) */ disabledDaysOfWeek: number[]; /** * Sets or gets ranges of dates that a site visitor can select. * [Read more](https://www.wix.com/corvid/reference/$w.DatePicker.html#enabledDateRanges) */ enabledDateRanges: $w.DatePicker.DateRange[]; /** * Sets or gets the latest date that a site visitor can select. * [Read more](https://www.wix.com/corvid/reference/$w.DatePicker.html#maxDate) */ maxDate: Date; /** * Sets or gets the earliest date that a site visitor can select. * [Read more](https://www.wix.com/corvid/reference/$w.DatePicker.html#minDate) */ minDate: Date; /** * Sets or gets the date picker's timezone. * [Read more](https://www.wix.com/corvid/reference/$w.DatePicker.html#timeZone) */ timeZone: string; /** * Sets or gets the value of the date picker. * [Read more](https://www.wix.com/corvid/reference/$w.DatePicker.html#value) */ value: Date; /** * Adds an event handler that triggers when the date picker's view changes. * [Read more](https://www.wix.com/corvid/reference/$w.DatePicker.html#onViewChange) * @eventType onViewChange */ onViewChange(handler: $w.ViewChangeEventHandler, operation?: $w.ViewChangeOperation, timeout?: number): void; } namespace DatePicker { /** * An object containing the start and end dates of a range of dates. */ type DateRange = { /** * Start date for the range. The `startDate` is inclusive, * meaning it's included in the range. The start date must be earlier than or the same as the * end date of the range. */ startDate: Date; /** * End date for the range. The `endDate` is inclusive, * meaning it's included in the range. The end date must be later than or the same as the * start date of the range. */ endDate: Date; }; } /** * Provides functionality for elements that can be disabled. * [Read more](https://www.wix.com/corvid/reference/$w.DisabledMixin.html#) */ interface DisabledMixin { /** * Indicates if the element is enabled or disabled. * [Read more](https://www.wix.com/corvid/reference/$w.DisabledMixin.html#enabled) */ readonly enabled: boolean; /** * Disables the element and sets its `enabled` property to `false`. * [Read more](https://www.wix.com/corvid/reference/$w.DisabledMixin.html#disable) */ disable(): Promise; /** * Enables the element and sets its `enabled` property to `true`. * [Read more](https://www.wix.com/corvid/reference/$w.DisabledMixin.html#enable) */ enable(): Promise; } /** * A complete web page, which consists of a Header, Page, and Footer. * [Read more](https://www.wix.com/corvid/reference/$w.Document.html#) */ interface Document { /** * Gets an object containing information about the document's background, such as its image or video source. * [Read more](https://www.wix.com/corvid/reference/$w.Document.html#background) */ readonly background: $w.Document.BackgroundOptions; /** * Gets the document's Header, Page, and Footer. * [Read more](https://www.wix.com/corvid/reference/$w.Document.html#children) */ readonly children: $w.Node[]; /** * Gets the document's type. * [Read more](https://www.wix.com/corvid/reference/$w.Document.html#type) */ readonly type: string; } namespace Document { /** * An object used by the `background` property that contains the background options. */ type BackgroundOptions = { /** * The file location of the background image. * * Setting the `src` property changes the * displayed image or video to the image or video found at the new `src` value. * * Getting the `src` property returns the * location of the current image or video file. * * Images can either be from the [Media Manager](https://support.wix.com/en/article/about-the-media-manager) * or an external image from any web location. Videos must come from the * [Media Manager](https://support.wix.com/en/article/about-the-media-manager). * * The URL formats supported are: * * + Images from the Media Manager: * `wix:image://v1//#originWidth=&originHeight=[&watermark=]` * + Videos from the Media Manager: * `wix:video://v1//#posterUri=&posterWidth=&posterHeight=` * + Images from the web: * `http(s)://` */ src: string; }; } /** * Dropdowns are used for selecting one of a number of options. * [Read more](https://www.wix.com/corvid/reference/$w.Dropdown.html#) */ interface Dropdown extends $w.LabelMixin, $w.FormElement, $w.HiddenCollapsedMixin, $w.DisabledMixin, $w.FocusMixin, $w.ClickableMixin, $w.StyleMixin, $w.RequiredMixin { /** * Sets or gets a dropdown's label. * [Read more](https://www.wix.com/corvid/reference/$w.Dropdown.html#label) */ label: string; /** * Sets or gets the options in a dropdown. * [Read more](https://www.wix.com/corvid/reference/$w.Dropdown.html#options) */ options: $w.Dropdown.Option[]; /** * Sets or gets the dropdown's placeholder text. * [Read more](https://www.wix.com/corvid/reference/$w.Dropdown.html#placeholder) */ placeholder: string; /** * Sets or gets the index of the selected option. * [Read more](https://www.wix.com/corvid/reference/$w.Dropdown.html#selectedIndex) */ selectedIndex: number; /** * Gets an object containing information about the dropdown's styles. * [Read more](https://www.wix.com/corvid/reference/$w.Dropdown.html#style) */ readonly style: $w.Style; /** * Sets or gets an element's value. * [Read more](https://www.wix.com/corvid/reference/$w.Dropdown.html#value) */ value: string; /** * Adds an event handler that runs when an input element's value * is changed. * [Read more](https://www.wix.com/corvid/reference/$w.Dropdown.html#onChange) */ onChange(handler: $w.EventHandler): $w.Dropdown; } namespace Dropdown { /** * An object used by the `options` property that contains the attributes of a dropdown list item. */ type Option = { /** * The value of the dropdown option. This is what you use in code and is what is stored in your collections. Mandatory if `label` is not specified. */ value?: string; /** * The label of the dropdown option. This is what a user sees. Mandatory if `value` is not specified. */ label?: string; }; } /** * Use effect options to customize an effect when [showing]($w.HiddenMixin.html#show) or [hiding]($w.HiddenMixin.html#hide) an element. * Effect options include arcs, bouncing, fading, flipping, floating, flying in/out, folding, gliding and more. * [Read more](https://www.wix.com/corvid/reference/$w.EffectOptions.html#) */ interface EffectOptions { } namespace EffectOptions { /** * An object used to customize the `"arc"` effect. */ type ArcEffectOptions = { /** * Valid values: `0`-`4000` milliseconds. Defaults to `1200`. */ duration?: number; /** * Valid values: `0`-`8000` milliseconds. Defaults to `0`. */ delay?: number; /** * Valid values: `"left"`, `"right"`. Defaults to `"left"`. */ direction?: string; }; /** * An object used to customize the `"bounce"` effect. */ type BounceEffectOptions = { /** * Valid values: `0`-`4000` milliseconds. Defaults to `1200`. */ duration?: number; /** * Valid values: `0`-`8000` milliseconds. Defaults to `0`. */ delay?: number; /** * Valid values: `"topLeft"`, `"topRight"`, `"bottomRight"`, * `"bottomLeft"`, `"center"`. Defaults to `"topLeft"`. */ direction?: string; /** * Valid values: `"soft"`, `"medium"`, `"hard"`. Defaults to `"medium"`. */ intensity?: string; }; /** * An object used to customize the `"fade"` effect. */ type FadeEffectOptions = { /** * Valid values: `0`-`4000` milliseconds. Defaults to `1200`. */ duration?: number; /** * Valid values: `0`-`8000` milliseconds. Defaults to `0`. */ delay?: number; }; /** * An object used to customize the `"flip"` effect. */ type FlipEffectOptions = { /** * Valid values: `0`-`4000` milliseconds. Defaults to `1200`. */ duration?: number; /** * Valid values: `0`-`8000` milliseconds. Defaults to `0`. */ delay?: number; /** * Valid values: `"top"`, `"right"`, `"bottom"`, `"left"`. Defaults to `"right"`. */ direction?: string; }; /** * An object used to customize the `"float"` effect. */ type FloatEffectOptions = { /** * Valid values: `0`-`4000` milliseconds. Defaults to `1200`. */ duration?: number; /** * Valid values: `0`-`8000` milliseconds. Defaults to `0`. */ delay?: number; /** * Valid values: `"top"`, `"right"`, `"bottom"`, `"left"`. Defaults to `"right"`. */ direction?: string; }; /** * An object used to customize the `"fly"` effect. */ type FlyEffectOptions = { /** * Valid values: `0`-`4000` milliseconds. Defaults to `1200`. */ duration?: number; /** * Valid values: `0`-`8000` milliseconds. Defaults to `0`. */ delay?: number; /** * Valid values: `"top"`, `"right"`, `"bottom"`, `"left"`. Defaults to `"right"`. */ direction?: string; }; /** * An object used to customize the `"fold"` effect. */ type FoldEffectOptions = { /** * Valid values: `0`-`4000` milliseconds. Defaults to `1200`. */ duration?: number; /** * Valid values: `0`-`8000` milliseconds. Defaults to `0`. */ delay?: number; /** * Valid values: `"top"`, `"right"`, `"bottom"`, `"left"`. Defaults to `"left"`. */ direction?: string; }; /** * An object used to customize the `"glide"` effect. */ type GlideEffectOptions = { /** * Valid values: `0`-`4000` milliseconds. Defaults to `1200`. */ duration?: number; /** * Valid values: `0`-`8000` milliseconds. Defaults to `0`. */ delay?: number; /** * Valid values: `0`-`360` degrees. Defaults to `0`. */ angle?: number; /** * Valid values: `0`-`300` pixels. Defaults to `0`. */ distance?: number; }; /** * An object used to customize the `"puff"` effect. */ type PuffEffectOptions = { /** * Valid values: `0`-`4000` milliseconds. Defaults to `1200`. */ duration?: number; /** * Valid values: `0`-`8000` milliseconds. Defaults to `0`. */ delay?: number; }; /** * An object used to customize the `"roll"` effect. */ type RollEffectOptions = { /** * Valid values: `0`-`4000` milliseconds. Defaults to `1200`. */ duration?: number; /** * Valid values: `0`-`8000` milliseconds. Defaults to `0`. */ delay?: number; /** * Valid values: `"top"`, `"right"`, `"bottom"`, `"left"`. Defaults to `"left"`. */ direction?: string; }; /** * An object used to customize the `"slide"` effect. */ type SlideEffectOptions = { /** * Valid values: `0`-`4000` milliseconds. Defaults to `1200`. */ duration?: number; /** * Valid values: `0`-`8000` milliseconds. Defaults to `0`. */ delay?: number; /** * Valid values: `"top"`, `"right"`, `"bottom"`, `"left"`. Defaults to `"left"`. */ direction?: string; }; /** * An object used to customize the `"spin"` effect. */ type SpinEffectOptions = { /** * Valid values: `0`-`4000` milliseconds. Defaults to `1200`. */ duration?: number; /** * Valid values: `0`-`8000` milliseconds. Defaults to `0`. */ delay?: number; /** * Valid values: `cw`, `ccw`. Defaults to `cw`. */ direction?: string; /** * Valid values: `1`-`15`. Defaults to `5`. */ cycles?: number; }; /** * An object used to customize the `"turn"` effect. */ type TurnEffectOptions = { /** * Valid values: `0`-`4000` milliseconds. Defaults to `1200`. */ duration?: number; /** * Valid values: `0`-`8000` milliseconds. Defaults to `0`. */ delay?: number; /** * Valid values: `"right"`, `"left"`. Defaults to `"right"`. */ direction?: string; }; /** * An object used to customize the `"zoom"` effect. */ type ZoomEffectOptions = { /** * Valid values: `0`-`4000` milliseconds. Defaults to `1200`. */ duration?: number; /** * Valid values: `0`-`8000` milliseconds. Defaults to `0`. */ delay?: number; }; } /** * Provides basic functionality for elements. * [Read more](https://www.wix.com/corvid/reference/$w.Element.html#) */ interface Element extends $w.Node, $w.ViewportMixin { /** * Indicates if an element is currently in the [DOM structure](https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model/Introduction). * [Read more](https://www.wix.com/corvid/reference/$w.Element.html#rendered) */ readonly rendered: boolean; /** * Adds an event handler that runs when the mouse pointer is moved * onto the element. * * You can also [define an event handler using the Properties and Events panel](https://support.wix.com/en/article/velo-reacting-to-user-actions-using-events). * [Read more](https://www.wix.com/corvid/reference/$w.Element.html#onMouseIn) * @eventType mouseenter */ onMouseIn(handler: $w.MouseEventHandler): $w.Element; /** * Adds an event handler that runs when the mouse pointer is moved * off of the element. * * You can also [define an event handler using the Properties and Events panel](https://support.wix.com/en/article/velo-reacting-to-user-actions-using-events). * [Read more](https://www.wix.com/corvid/reference/$w.Element.html#onMouseOut) * @eventType mouseleave */ onMouseOut(handler: $w.MouseEventHandler): $w.Element; } /** * Events are fired when certain actions occur to elements. * [Read more](https://www.wix.com/corvid/reference/$w.Event.html#) */ interface Event { /** * Gets the context in which an event was fired. * [Read more](https://www.wix.com/corvid/reference/$w.Event.html#context) */ readonly context: $w.Event.EventContext; /** * Gets the element that the event was fired on. * [Read more](https://www.wix.com/corvid/reference/$w.Event.html#target) */ readonly target: $w.Element & AnyProperties; /** * Gets the type of event that was fired. * [Read more](https://www.wix.com/corvid/reference/$w.Event.html#type) */ readonly type: string; } namespace Event { /** * An object that contains information about the context in which an event was fired. */ type EventContext = { /** * `"GLOBAL_SCOPE"` for events fired outside * of repeaters, or `"COMPONENT_SCOPE"` for events fired from repeaters. */ type: string; /** * ID of the repeater item where the * event was fired from. */ itemId: string; }; } /** * Provides functionality for elements that can set and lose focus. * [Read more](https://www.wix.com/corvid/reference/$w.FocusMixin.html#) */ interface FocusMixin { /** * Removes focus from the element. * [Read more](https://www.wix.com/corvid/reference/$w.FocusMixin.html#blur) */ blur(): void; /** * Places focus on the element. * [Read more](https://www.wix.com/corvid/reference/$w.FocusMixin.html#focus) */ focus(): void; /** * Adds an event handler that runs when the element loses focus. * [Read more](https://www.wix.com/corvid/reference/$w.FocusMixin.html#onBlur) * @eventType blur */ onBlur(handler: $w.EventHandler): $w.Element; /** * Adds an event handler that runs when the element receives focus. * [Read more](https://www.wix.com/corvid/reference/$w.FocusMixin.html#onFocus) * @eventType focus */ onFocus(handler: $w.EventHandler): $w.Element; } /** * The footer is the area of your site that appears at the bottom and * throughout all of your pages. * [Read more](https://www.wix.com/corvid/reference/$w.Footer.html#) */ interface Footer extends $w.Element, $w.ClickableMixin, $w.ContainableMixin, $w.StyleMixin { /** * Gets an object containing information about the footer's styles. * [Read more](https://www.wix.com/corvid/reference/$w.Footer.html#style) */ readonly style: $w.Style; } /** * A container for the input elements and buttons in a `WixForms` `$w` element. * [Read more](https://www.wix.com/corvid/reference/$w.Form.html#) */ interface Form extends $w.Element, $w.ClickableMixin, $w.ContainableMixin, $w.HiddenCollapsedMixin, $w.StyleMixin { /** * Gets an object containing information about the styles of the form. * [Read more](https://www.wix.com/corvid/reference/$w.Form.html#style) */ readonly style: $w.Style; } /** * Provides functionality related to user input elements. * [Read more](https://www.wix.com/corvid/reference/$w.FormElement.html#) */ interface FormElement extends $w.Element, $w.ValidatableMixin, $w.ValueMixin { } /** * A gallery for displaying multiple items. * [Read more](https://www.wix.com/corvid/reference/$w.Gallery.html#) */ interface Gallery extends $w.Element, $w.HiddenCollapsedMixin, $w.PlayableMixin { /** * Sets or gets the action that occurs when an item in the gallery is clicked. * [Read more](https://www.wix.com/corvid/reference/$w.Gallery.html#clickAction) */ clickAction: string; /** * Gets the index of the gallery's current item. * [Read more](https://www.wix.com/corvid/reference/$w.Gallery.html#currentIndex) */ readonly currentIndex: number; /** * Gets an object containing information about the current item. * [Read more](https://www.wix.com/corvid/reference/$w.Gallery.html#currentItem) */ readonly currentItem: $w.Gallery.ImageItem | $w.Gallery.VideoItem; /** * Gets an object containing information about the gallery's capabilities. * [Read more](https://www.wix.com/corvid/reference/$w.Gallery.html#galleryCapabilities) */ readonly galleryCapabilities: $w.Gallery.GalleryCapabilities; /** * Sets or gets the items in a gallery. * [Read more](https://www.wix.com/corvid/reference/$w.Gallery.html#items) */ items: $w.Gallery.ImageItem[] | $w.Gallery.VideoItem[]; /** * Determines if a gallery's navigation arrows are shown. * [Read more](https://www.wix.com/corvid/reference/$w.Gallery.html#showNavigationButtons) */ showNavigationButtons: boolean; /** * Adds an event handler that runs when a gallery's current item changes. * [Read more](https://www.wix.com/corvid/reference/$w.Gallery.html#onCurrentItemChanged) * @eventType imageChanged */ onCurrentItemChanged(handler: $w.GalleryItemChangedEventHandler): $w.Gallery; /** * Adds an event handler that runs when an item in a gallery is * clicked. * [Read more](https://www.wix.com/corvid/reference/$w.Gallery.html#onItemClicked) * @eventType itemClicked */ onItemClicked(handler: $w.GalleryItemClickedEventHandler): $w.Gallery; } namespace Gallery { /** * An object used by the `galleryCapabilities` property that contains the capabilities of a gallery. */ type GalleryCapabilities = { /** * Indicates if the gallery supports play operations. */ isPlayable: boolean; /** * Indicates if the gallery supports the notion of a current item. */ hasCurrentItem: boolean; /** * Indicates if the gallery supports navigation buttons. */ hasNavigationButtons: boolean; }; /** * An object used by the Gallery properties `items` and `currentItem` to represent a single gallery image. */ type ImageItem = { /** * Item type. Value is `"image"`. */ type: string; /** * Item slug. */ slug?: string; /** * Image source URL. */ src: string; /** * Image description. Descriptions over 100 characters are truncated. */ description?: string; /** * Image title. */ title?: string; /** * URL of the image's clickable link. See [here]($w.LinkableMixin.html#link) for more information about links. */ link?: string; }; /** * An object used by the Gallery properties `items` and `currentItem` to represent a single gallery video. */ type VideoItem = { /** * Item type. Value is `"video"`. */ type: string; /** * Item slug. */ slug?: string; /** * Video source URL. */ src: string; /** * Video description. Descriptions over 100 characters are truncated. */ description?: string; /** * Video title. */ title?: string; /** * URL of the video's clickable link. See [here]($w.LinkableMixin.html#link) for more information about links. */ link?: string; /** * Video thumbnail URL. */ thumbnail?: string; }; } /** * Event that is fired when a gallery moves to a new image. * [Read more](https://www.wix.com/corvid/reference/$w.GalleryItemChangedEvent.html#) */ interface GalleryItemChangedEvent extends $w.Event { /** * Gets the gallery item. * [Read more](https://www.wix.com/corvid/reference/$w.GalleryItemChangedEvent.html#item) */ readonly item: $w.Gallery.ImageItem | $w.Gallery.VideoItem; /** * Gets the gallery item's index. * [Read more](https://www.wix.com/corvid/reference/$w.GalleryItemChangedEvent.html#itemIndex) */ readonly itemIndex: number; } /** * Event that is fired when an image in a gallery is clicked. * [Read more](https://www.wix.com/corvid/reference/$w.GalleryItemClickedEvent.html#) */ interface GalleryItemClickedEvent extends $w.GalleryItemChangedEvent, $w.Event { } /** * A [Google Map element](https://www.wix.com/support/html5/article/adding-google-maps) * that allows you to display a given location. * [Read more](https://www.wix.com/corvid/reference/$w.GoogleMap.html#) */ interface GoogleMap extends $w.Element, $w.HiddenCollapsedMixin { /** * Sets or gets the location information of a map's marked location. * [Read more](https://www.wix.com/corvid/reference/$w.GoogleMap.html#location) */ location: $w.GoogleMap.MapLocation; } namespace GoogleMap { /** * An object used by the `location` property that * contains the attributes of a marked map location. */ type MapLocation = { /** * The latitude of the location. Must be between -90 and 90. */ latitude: number; /** * The longitude of the location. Must be between -180 and 180. */ longitude: number; /** * The description of the location. */ description?: string; }; } /** * The header is the area of your site that appears at the top and * throughout all of your pages. * [Read more](https://www.wix.com/corvid/reference/$w.Header.html#) */ interface Header extends $w.Element, $w.ClickableMixin, $w.ContainableMixin, $w.StyleMixin { /** * Gets an object containing information about the header's styles. * [Read more](https://www.wix.com/corvid/reference/$w.Header.html#style) */ readonly style: $w.Style; } /** * Provides functionality for all elements that can be hidden or collapsed. * [Read more](https://www.wix.com/corvid/reference/$w.HiddenCollapsedElement.html#) */ interface HiddenCollapsedElement extends $w.Element, $w.HiddenCollapsedMixin { } /** * Provides functionality for all elements that can be hidden or collapsed. * [Read more](https://www.wix.com/corvid/reference/$w.HiddenCollapsedMixin.html#) */ interface HiddenCollapsedMixin extends $w.HiddenMixin, $w.CollapsedMixin { } /** * Provides functionality for elements that can be hidden. * [Read more](https://www.wix.com/corvid/reference/$w.HiddenMixin.html#) */ interface HiddenMixin { /** * Indicates if the element is visible or hidden. * [Read more](https://www.wix.com/corvid/reference/$w.HiddenMixin.html#hidden) */ readonly hidden: boolean; /** * Indicates if the element is actually visible. * [Read more](https://www.wix.com/corvid/reference/$w.HiddenMixin.html#isVisible) */ readonly isVisible: boolean; /** * Hides the element and sets its `hidden` property * to `true`, using an effect if specified. * [Read more](https://www.wix.com/corvid/reference/$w.HiddenMixin.html#hide) */ hide(effectName?: string, effectOptions?: $w.EffectOptions.ArcEffectOptions | $w.EffectOptions.BounceEffectOptions | $w.EffectOptions.FadeEffectOptions | $w.EffectOptions.FlipEffectOptions | $w.EffectOptions.FloatEffectOptions | $w.EffectOptions.FlyEffectOptions | $w.EffectOptions.FoldEffectOptions | $w.EffectOptions.GlideEffectOptions | $w.EffectOptions.PuffEffectOptions | $w.EffectOptions.RollEffectOptions | $w.EffectOptions.SlideEffectOptions | $w.EffectOptions.SpinEffectOptions | $w.EffectOptions.TurnEffectOptions | $w.EffectOptions.ZoomEffectOptions): Promise; /** * Shows the element and sets its `hidden` property * to `false`, using an effect if specified. * [Read more](https://www.wix.com/corvid/reference/$w.HiddenMixin.html#show) */ show(effectName?: string, effectOptions?: $w.EffectOptions.ArcEffectOptions | $w.EffectOptions.BounceEffectOptions | $w.EffectOptions.FadeEffectOptions | $w.EffectOptions.FlipEffectOptions | $w.EffectOptions.FloatEffectOptions | $w.EffectOptions.FlyEffectOptions | $w.EffectOptions.FoldEffectOptions | $w.EffectOptions.GlideEffectOptions | $w.EffectOptions.PuffEffectOptions | $w.EffectOptions.RollEffectOptions | $w.EffectOptions.SlideEffectOptions | $w.EffectOptions.SpinEffectOptions | $w.EffectOptions.TurnEffectOptions | $w.EffectOptions.ZoomEffectOptions): Promise; } /** * A container for internal or external HTML code. * [Read more](https://www.wix.com/corvid/reference/$w.HtmlComponent.html#) */ interface HtmlComponent extends $w.IFrame { /** * Sets or gets whether the HTML Component displays scrollbars. * [Read more](https://www.wix.com/corvid/reference/$w.HtmlComponent.html#scrolling) */ scrolling: string; /** * Sets or gets the URL of the HTML Component's code. * [Read more](https://www.wix.com/corvid/reference/$w.HtmlComponent.html#src) */ src: string; /** * Allows the HTML Component to be put into full screen mode. * [Read more](https://www.wix.com/corvid/reference/$w.HtmlComponent.html#allowFullScreen) */ allowFullScreen(): $w.HtmlComponent; /** * Adds an event handler that runs when the HTML Component * sends a message. * [Read more](https://www.wix.com/corvid/reference/$w.HtmlComponent.html#onMessage) * @eventType message */ onMessage(handler: $w.HtmlComponentMessageEventHandler): $w.HtmlComponent; /** * Sends a message to the HTML Component. * [Read more](https://www.wix.com/corvid/reference/$w.HtmlComponent.html#postMessage) */ postMessage(message: string | number | boolean | any | any[]): void; } /** * Event that is fired when the code in an HtmlComponent sends a message. * [Read more](https://www.wix.com/corvid/reference/$w.HtmlComponentMessageEvent.html#) */ interface HtmlComponentMessageEvent extends $w.Event { /** * Gets the event data. * [Read more](https://www.wix.com/corvid/reference/$w.HtmlComponentMessageEvent.html#data) */ readonly data: any; } /** * Provides functionality for iframe-based elements, such as `HtmlComponent`. * [Read more](https://www.wix.com/corvid/reference/$w.IFrame.html#) */ interface IFrame extends $w.Element, $w.HiddenCollapsedMixin { } /** * Event that is fired when a user hovers over a star on a ratings input component. * [Read more](https://www.wix.com/corvid/reference/$w.IconMouseInEvent.html#) */ interface IconMouseInEvent extends $w.Event { /** * Gets the display label that corresponds to the icon that the mouse entered. * [Read more](https://www.wix.com/corvid/reference/$w.IconMouseInEvent.html#label) */ readonly label: string; /** * Gets the value (1-5) that corresponds to the icon that the mouse entered. * [Read more](https://www.wix.com/corvid/reference/$w.IconMouseInEvent.html#value) */ readonly value: number; } /** * Images are images stored in the [Media Manager](https://support.wix.com/en/article/about-the-media-manager) * or retrieved from an external web location. * [Read more](https://www.wix.com/corvid/reference/$w.Image.html#) */ interface Image extends $w.Element, $w.HiddenCollapsedMixin, $w.LinkableMixin, $w.ClickableMixin { /** * Sets or gets an image's alt text. * [Read more](https://www.wix.com/corvid/reference/$w.Image.html#alt) */ alt: string; /** * Sets or gets the action that occurs when an image is clicked. * [Read more](https://www.wix.com/corvid/reference/$w.Image.html#clickAction) */ clickAction: string; /** * Sets or gets how an image is placed inside an image element. * [Read more](https://www.wix.com/corvid/reference/$w.Image.html#fitMode) */ fitMode: string; /** * Sets or gets the file location of the image. * [Read more](https://www.wix.com/corvid/reference/$w.Image.html#src) */ src: string; /** * Sets or gets an image's tooltip. * [Read more](https://www.wix.com/corvid/reference/$w.Image.html#tooltip) */ tooltip: string; } /** * Event that is fired when the keyboard is pressed. * [Read more](https://www.wix.com/corvid/reference/$w.KeyboardEvent.html#) */ interface KeyboardEvent extends $w.Event { /** * Indicates if the Option key on a Mac or Alt key on a PC was pressed. * [Read more](https://www.wix.com/corvid/reference/$w.KeyboardEvent.html#altKey) */ readonly altKey: boolean; /** * Indicates if the Control (Ctrl) key was pressed. * [Read more](https://www.wix.com/corvid/reference/$w.KeyboardEvent.html#ctrlKey) */ readonly ctrlKey: boolean; /** * Gets a string representation of the key that was pressed. * [Read more](https://www.wix.com/corvid/reference/$w.KeyboardEvent.html#key) */ readonly key: string; /** * Indicates if the ⌘ Command key on a Mac or ⊞ Windows key on a PC was pressed. * [Read more](https://www.wix.com/corvid/reference/$w.KeyboardEvent.html#metaKey) */ readonly metaKey: boolean; /** * Indicates if the Shift key was pressed. * [Read more](https://www.wix.com/corvid/reference/$w.KeyboardEvent.html#shiftKey) */ readonly shiftKey: boolean; } /** * Provides functionality for elements that have a label. * [Read more](https://www.wix.com/corvid/reference/$w.LabelMixin.html#) */ interface LabelMixin { /** * Sets or gets the label of an element. * [Read more](https://www.wix.com/corvid/reference/$w.LabelMixin.html#label) */ label: string; } /** * Provides functionality for elements that can act as links. * [Read more](https://www.wix.com/corvid/reference/$w.LinkableMixin.html#) */ interface LinkableMixin { /** * Sets or gets the element's link. * [Read more](https://www.wix.com/corvid/reference/$w.LinkableMixin.html#link) */ link: string; /** * Sets or gets the target of the element's link. * [Read more](https://www.wix.com/corvid/reference/$w.LinkableMixin.html#target) */ target: string; } /** * A container for media items. * [Read more](https://www.wix.com/corvid/reference/$w.MediaBox.html#) */ interface MediaBox extends $w.Element, $w.HiddenCollapsedMixin, $w.Background { } /** * Menus are used for navigating between site pages. * [Read more](https://www.wix.com/corvid/reference/$w.Menu.html#) */ interface Menu extends $w.Element, $w.HiddenCollapsedMixin { /** * Sets or gets menu items. * [Read more](https://www.wix.com/corvid/reference/$w.Menu.html#menuItems) */ menuItems: $w.Menu.MenuItem[]; /** * Adds an event handler that runs when a user clicks a menu item. * [Read more](https://www.wix.com/corvid/reference/$w.Menu.html#onItemClick) * @eventType ItemMouseClick */ onItemClick(handler: $w.MenuItemMouseEventHandler): $w.Menu.MenuItem; /** * Adds an event handler that runs when a user double clicks a menu item. * [Read more](https://www.wix.com/corvid/reference/$w.Menu.html#onItemDblClick) * @eventType ItemMouseDblClick */ onItemDblClick(handler: $w.MenuItemMouseEventHandler): $w.Menu.MenuItem; /** * Adds an event handler that runs when a user hovers over a menu item. * [Read more](https://www.wix.com/corvid/reference/$w.Menu.html#onItemMouseIn) * @eventType ItemMouseIn */ onItemMouseIn(handler: $w.MenuItemMouseEventHandler): $w.Menu.MenuItem; /** * Adds an event handler that runs when a user stops hovering over a menu item. * [Read more](https://www.wix.com/corvid/reference/$w.Menu.html#onItemMouseOut) * @eventType ItemMouseOut */ onItemMouseOut(handler: $w.MenuItemMouseEventHandler): $w.Menu.MenuItem; } namespace Menu { /** * An object that contains the attributes of a menu item. */ type MenuItem = { /** * The label of the menu item. This is text that the site visitor sees in the menu and can click to navigate. * * If not specified, and the page that the link property references is: * + An external page or an empty string: The menu defaults to the menu items based on site pages only, as defined in the Editor, and an error is logged to the console. * + A page nested under a folder: The specific menu item label defaults to the name of the corresponding page as defined in the Editor. * + A regular, non-nested, site page: The `label` for the menu item gets its value from the name of the page that the `link` property references. * * Min: 1 character * * Max: 40 characters */ label?: string; /** * Setting `selected` to `true` for a menu item causes the item to appear highlighted in the menu element. * You can use this property to indicate which page is currently being displayed. * * >**Note:** The value of `selected` isn't validated against which page is actually displayed. For example, you can write code that misleadingly sets `selected` to `true` for multiple menu items. * * When not defined explicitly using the `selected` property, the `selected` value is derived from the currently-active page in the site's _main_ menu * (as defined when managing the menu in the Editor) and not derived from a currently-active page in a _custom_ menu. * * Default: `false` */ selected?: boolean; /** * Optional link for the menu item. This is the link the site visitor navigates to when they click on a menu item. * The different types of links you can use are: * * + `/localPageURL`: Another page on your site, such as `/about` or `/rentals/shortterm`. * + `/`: Your site's home page. * + `http(s)://`: An external web address, such as `https://www.mortgagecalculator.org/`. * + `wix:document://`: A document stored in the Media Manager, such as `wix:document://v1/9bec_52fb06ea/filename.xls`. * + `mailto:?subject=`: An email, such as `mailto:michael@example.com?subject=Coming%20Soon`. * + `tel:`: A phone number, such as `tel:+1-555-555-5555`. * * If `link` isn't specified, the corresponding label isn't clickable. * * Specifying an empty string is not supported. The menu defaults to the menu items as defined in the Editor and an error is logged to the console. * * Min: 1 character * * Max: 40 characters */ link?: string; /** * Whether the link opens in the same window/tab or in a new window/tab. * + `_self`. The page opens in the same window/tab. * + `_blank`. The page opens in a new window/tab. * * > **Note:** `target` doesn't work when previewing your site. * * * Default: `_self` */ target?: string; /** * Menus can have additional levels of submenus. Vertical menus can have * 1 level of submenus. Horizontal menus can have 2 additional levels of submenus. */ menuItems?: $w.Menu.MenuItem[]; }; } /** * A menu container holds the elements in a * mobile menu that are used for navigating between mobile site pages. * [Read more](https://www.wix.com/corvid/reference/$w.MenuContainer.html#) */ interface MenuContainer extends $w.Element { /** * Sets or gets mobile menu items. * [Read more](https://www.wix.com/corvid/reference/$w.MenuContainer.html#menuItems) */ menuItems: $w.MenuContainer.MenuItem[]; /** * Closes a mobile menu. * [Read more](https://www.wix.com/corvid/reference/$w.MenuContainer.html#close) */ close(): Promise; /** * Adds an event handler that runs when a user clicks a mobile menu item. * [Read more](https://www.wix.com/corvid/reference/$w.MenuContainer.html#onItemClick) * @eventType ItemMouseClick */ onItemClick(handler: $w.MenuItemMouseEventHandler): $w.Menu.MenuItem; /** * Adds an event handler that runs when a user double clicks a mobile menu item. * [Read more](https://www.wix.com/corvid/reference/$w.MenuContainer.html#onItemDblClick) * @eventType ItemMouseDblClick */ onItemDblClick(handler: $w.MenuItemMouseEventHandler): $w.Menu.MenuItem; /** * Adds an event handler that runs when a user hovers over a mobile menu item. * [Read more](https://www.wix.com/corvid/reference/$w.MenuContainer.html#onItemMouseIn) * @eventType ItemMouseIn */ onItemMouseIn(handler: $w.MenuItemMouseEventHandler): $w.MenuContainer.MenuItem; /** * Adds an event handler that runs when a user stops hovering over a mobile menu item. * [Read more](https://www.wix.com/corvid/reference/$w.MenuContainer.html#onItemMouseOut) * @eventType ItemMouseOut */ onItemMouseOut(handler: $w.MenuItemMouseEventHandler): $w.MenuContainer.MenuItem; /** * Opens a mobile menu. * [Read more](https://www.wix.com/corvid/reference/$w.MenuContainer.html#open) */ open(): Promise; } namespace MenuContainer { /** * An object that contains the attributes of a mobile menu item. */ type MenuItem = { /** * The label of the mobile menu item. This is text that the site visitor sees in the mobile menu and can click to navigate. * * If not specified, and the page that the link property references is: * + An external page or an empty string: The mobile menu defaults to the mobile menu items based on site pages only, as defined in the Editor, and an error is logged to the console. * + A page nested under a folder: The specific mobile menu item label defaults to the name of the corresponding page as defined in the Editor. * + A regular, non-nested, site page: The `label` for the mobile menu item gets its value from the name of the page that the `link` property references. * * Min: 1 character * * Max: 40 characters */ label?: string; /** * Setting `selected` to `true` for a mobile menu item causes the item to appear highlighted and to expand any of its sub-items in the menu container. * You can use this property to indicate which page is currently being displayed. * * >**Note:** The value of `selected` isn't validated against which page is actually displayed. For example, you can write code that misleadingly sets `selected` to `true` for multiple menu items. * * When not defined explicitly using the `selected` property, the `selected` value is derived from the currently-active page in the site's _main_ mobile menu * (as defined when managing the mobile menu in the Editor) and not derived from a currently-active page in a _custom_ mobile menu. * * Default: `false` */ selected?: boolean; /** * Optional link for the mobile menu item. The different types of links you can use are: * * + `/localPageURL`: Another page on your site, such as `/about` or `/rentals/shortterm`. * + `/`: Your site's home page. * + `http(s)://`: An external web address, such as `https://www.mortgagecalculator.org/`. * + `wix:document://`: A document stored in the Media Manager, such as `wix:document://v1/9bec_52fb06ea/filename.xls`. * + `mailto:?subject=`: An email, such as `mailto:michael@example.com?subject=Coming%20Soon`. * + `tel:`: A phone number, such as `tel:+1-555-555-5555`. * * If `link` isn't specified, the corresponding label isn't clickable. * * Specifying an empty string is not supported. The mobile menu defaults to the mobile menu items as defined in the Editor and an error is logged to the console. * * Min: 1 character * * Max: 40 characters */ link?: string; /** * Whether the link opens in the same window/tab or in a new window/tab. * + `_self`. The page opens in the same window/tab. * + `_blank`. The page opens in a new window/tab. * * > **Note:** `target` doesn't work when previewing your site. * * * Default: `_self` */ target?: string; /** * Menus can have 1 additional level of submenus. */ menuItems?: $w.MenuContainer.MenuItem[]; }; } /** * Event that is fired when the mouse is used on a menu item. * [Read more](https://www.wix.com/corvid/reference/$w.MenuItemMouseEvent.html#) */ interface MenuItemMouseEvent extends $w.Event { /** * Gets the distance in pixels between the mouse pointer and the * left edge of the browser's viewable area. * [Read more](https://www.wix.com/corvid/reference/$w.MenuItemMouseEvent.html#clientX) */ readonly clientX: number; /** * Gets the distance in pixels between the mouse pointer and the * top edge of the browser's viewable area. * [Read more](https://www.wix.com/corvid/reference/$w.MenuItemMouseEvent.html#clientY) */ readonly clientY: number; /** * The menu item on which the event occurred. * [Read more](https://www.wix.com/corvid/reference/$w.MenuItemMouseEvent.html#item) */ readonly item: $w.Menu.MenuItem; /** * Gets the distance in pixels between the mouse pointer and the * left edge of the element that triggered this event. * [Read more](https://www.wix.com/corvid/reference/$w.MenuItemMouseEvent.html#offsetX) */ readonly offsetX: number; /** * Gets the distance in pixels between the mouse pointer and the * top edge of the element that triggered this event. * [Read more](https://www.wix.com/corvid/reference/$w.MenuItemMouseEvent.html#offsetY) */ readonly offsetY: number; /** * Gets the distance in pixels between the mouse pointer and the * left edge of the page. * [Read more](https://www.wix.com/corvid/reference/$w.MenuItemMouseEvent.html#pageX) */ readonly pageX: number; /** * Gets the distance in pixels between the mouse pointer and the * top edge of the page. * [Read more](https://www.wix.com/corvid/reference/$w.MenuItemMouseEvent.html#pageY) */ readonly pageY: number; /** * Gets the distance in pixels between the mouse pointer and the * left edge of the screen or screens. * [Read more](https://www.wix.com/corvid/reference/$w.MenuItemMouseEvent.html#screenX) */ readonly screenX: number; /** * Gets the distance in pixels between the mouse pointer and the * top edge of the screen or screens. * [Read more](https://www.wix.com/corvid/reference/$w.MenuItemMouseEvent.html#screenY) */ readonly screenY: number; } /** * Event that is fired when the mouse is clicked. * [Read more](https://www.wix.com/corvid/reference/$w.MouseEvent.html#) */ interface MouseEvent extends $w.Event { /** * Gets the distance in pixels between the mouse pointer and the * left edge of the browser's viewable area. * [Read more](https://www.wix.com/corvid/reference/$w.MouseEvent.html#clientX) */ readonly clientX: number; /** * Gets the distance in pixels between the mouse pointer and the * top edge of the browser's viewable area. * [Read more](https://www.wix.com/corvid/reference/$w.MouseEvent.html#clientY) */ readonly clientY: number; /** * Gets the distance in pixels between the mouse pointer and the * left edge of the element that triggered this event. * [Read more](https://www.wix.com/corvid/reference/$w.MouseEvent.html#offsetX) */ readonly offsetX: number; /** * Gets the distance in pixels between the mouse pointer and the * top edge of the element that triggered this event. * [Read more](https://www.wix.com/corvid/reference/$w.MouseEvent.html#offsetY) */ readonly offsetY: number; /** * Gets the distance in pixels between the mouse pointer and the * left edge of the page. * [Read more](https://www.wix.com/corvid/reference/$w.MouseEvent.html#pageX) */ readonly pageX: number; /** * Gets the distance in pixels between the mouse pointer and the * top edge of the page. * [Read more](https://www.wix.com/corvid/reference/$w.MouseEvent.html#pageY) */ readonly pageY: number; /** * Gets the distance in pixels between the mouse pointer and the * left edge of the screen or screens. * [Read more](https://www.wix.com/corvid/reference/$w.MouseEvent.html#screenX) */ readonly screenX: number; /** * Gets the distance in pixels between the mouse pointer and the * top edge of the screen or screens. * [Read more](https://www.wix.com/corvid/reference/$w.MouseEvent.html#screenY) */ readonly screenY: number; } /** * Multi-state boxes are containers for states. * [Read more](https://www.wix.com/corvid/reference/$w.MultiStateBox.html#) */ interface MultiStateBox extends $w.Element, $w.HiddenCollapsedMixin, $w.ClickableMixin, $w.ContainableMixin { /** * Gets the multi-state box's current state. * [Read more](https://www.wix.com/corvid/reference/$w.MultiStateBox.html#currentState) */ readonly currentState: $w.State; /** * Gets a list of all the states contained in the multi-state box. * [Read more](https://www.wix.com/corvid/reference/$w.MultiStateBox.html#states) */ readonly states: $w.State[]; /** * Change the multi-state box's current state to a specific state. * [Read more](https://www.wix.com/corvid/reference/$w.MultiStateBox.html#changeState) */ changeState(stateReference: string | $w.State): Promise<$w.State>; /** * Adds an event handler that runs when the multi-state box moves to a new state. * [Read more](https://www.wix.com/corvid/reference/$w.MultiStateBox.html#onChange) * @eventType change */ onChange(eventHandler: $w.EventHandler): $w.MultiStateBox; } /** * Provides basic functionality for all Wix objects, including objects * that are not [elements]($w.Element.html). * [Read more](https://www.wix.com/corvid/reference/$w.Node.html#) */ interface Node { /** * Indicates if an element appears on all pages or only on the current page. * [Read more](https://www.wix.com/corvid/reference/$w.Node.html#global) */ readonly global: boolean; /** * Gets the element's ID. * [Read more](https://www.wix.com/corvid/reference/$w.Node.html#id) */ readonly id: string; /** * Gets the element's parent element. * [Read more](https://www.wix.com/corvid/reference/$w.Node.html#parent) */ readonly parent: $w.Node; /** * Gets the element's type. * [Read more](https://www.wix.com/corvid/reference/$w.Node.html#type) */ readonly type: string; /** * Scrolls the page to the top of the element using an animation. * [Read more](https://www.wix.com/corvid/reference/$w.Node.html#scrollTo) */ scrollTo(): Promise; } /** * A page is a web page that can contain other elements. * [Read more](https://www.wix.com/corvid/reference/$w.Page.html#) */ interface Page extends $w.Element, $w.ClickableMixin, $w.ContainableMixin { /** * Gets the page's [SEO description](https://support.wix.com/en/article/adding-seo-page-titles-and-descriptions-meta-tags). * [Read more](https://www.wix.com/corvid/reference/$w.Page.html#description) */ readonly description: string; /** * Gets the page's keywords. * [Read more](https://www.wix.com/corvid/reference/$w.Page.html#keywords) */ readonly keywords: string[]; /** * Gets the page's title. * [Read more](https://www.wix.com/corvid/reference/$w.Page.html#title) */ readonly title: string; /** * Indicates if the page is included in the site's menu. * [Read more](https://www.wix.com/corvid/reference/$w.Page.html#visibleInMenu) */ readonly visibleInMenu: boolean; } /** * Provides functionality for elements that can be played. * [Read more](https://www.wix.com/corvid/reference/$w.PlayableMixin.html#) */ interface PlayableMixin { /** * Indicates if the element is currently playing. * [Read more](https://www.wix.com/corvid/reference/$w.PlayableMixin.html#isPlaying) */ readonly isPlaying: boolean; /** * Moves to the next item. * [Read more](https://www.wix.com/corvid/reference/$w.PlayableMixin.html#next) */ next(): Promise<$w.Element & AnyProperties>; /** * Adds an event handler that runs when playback is paused. * [Read more](https://www.wix.com/corvid/reference/$w.PlayableMixin.html#onPause) * @eventType autoplayOff */ onPause(handler: $w.EventHandler): $w.Gallery & $w.Slideshow; /** * Adds an event handler that runs when playback is started or restarted. * [Read more](https://www.wix.com/corvid/reference/$w.PlayableMixin.html#onPlay) * @eventType autoplayOn */ onPlay(handler: $w.EventHandler): $w.Gallery & $w.Slideshow; /** * Pauses playback. * [Read more](https://www.wix.com/corvid/reference/$w.PlayableMixin.html#pause) */ pause(): void; /** * Begins or resumes playback. * [Read more](https://www.wix.com/corvid/reference/$w.PlayableMixin.html#play) */ play(): void; /** * Moves to the previous image or slide. * [Read more](https://www.wix.com/corvid/reference/$w.PlayableMixin.html#previous) */ previous(): Promise<$w.Element & AnyProperties>; } /** * A [quick action bar](https://support.wix.com/en/article/adding-and-setting-up-the-quick-action-bar-on-your-mobile-site) * helps your visitors contact you instantly from their mobile devices. * [Read more](https://www.wix.com/corvid/reference/$w.QuickActionBar.html#) */ interface QuickActionBar extends $w.HiddenCollapsedMixin, $w.StyleMixin { /** * Sets or gets a quick action bar's alignment. * [Read more](https://www.wix.com/corvid/reference/$w.QuickActionBar.html#alignment) */ alignment: boolean; /** * Sets or gets a quick action bar's color scheme. * [Read more](https://www.wix.com/corvid/reference/$w.QuickActionBar.html#colorScheme) */ colorScheme: string; /** * Sets or gets whether a quick action bar's color scheme is inverted. * [Read more](https://www.wix.com/corvid/reference/$w.QuickActionBar.html#invertColorScheme) */ invertColorScheme: boolean; /** * Sets or gets whether a quick action bar's labels are shown. * [Read more](https://www.wix.com/corvid/reference/$w.QuickActionBar.html#showLabels) */ showLabels: boolean; /** * Adds an event handler that runs when an item in a quick action bar is * clicked. * [Read more](https://www.wix.com/corvid/reference/$w.QuickActionBar.html#onItemClicked) * @eventType itemClicked */ onItemClicked(handler: $w.QuickActionBarItemClickedEventHandler): $w.QuickActionBar; } /** * Event that is fired when a quick action bar item is clicked. * [Read more](https://www.wix.com/corvid/reference/$w.QuickActionBarItemClickedEvent.html#) */ interface QuickActionBarItemClickedEvent extends $w.Event { /** * Gets the gallery item. * [Read more](https://www.wix.com/corvid/reference/$w.QuickActionBarItemClickedEvent.html#item) */ readonly item: $w.QuickActionBarItemClickedEvent.QuickActionBarItem; /** * Gets the quick action bar item's index. * [Read more](https://www.wix.com/corvid/reference/$w.QuickActionBarItemClickedEvent.html#itemIndex) */ readonly itemIndex: number; } namespace QuickActionBarItemClickedEvent { /** * An object representing a quick action bar item. */ type QuickActionBarItem = { /** * The quick action bar item type. * * One of: * * + `"3dots"` * + `"3dotsvertical"` * + `"about"` * + `"add"` * + `"address"` * + `"arrowdown"` * + `"arrowup"` * + `"blog"` * + `"booking"` * + `"briefcase"` * + `"clock"` * + `"clothes"` * + `"cloud"` * + `"contactform"` * + `"creditcard"` * + `"crown"` * + `"currency"` * + `"earth"` * + `"ecom"` * + `"email"` * + `"facebook"` * + `"flag"` * + `"flickr"` * + `"freebutton"` * + `"gallery"` * + `"googleplus"` * + `"hamburgermenu"` * + `"heart"` * + `"home"` * + `"hot"` * + `"hotel"` * + `"hotsale"` * + `"icecream"` * + `"instagram"` * + `"lightning"` * + `"link"` * + `"linkedin"` * + `"music"` * + `"new"` * + `"page"` * + `"phone"` * + `"pinterest"` * + `"present"` * + `"register"` * + `"restaurant"` * + `"rocket"` * + `"sale"` * + `"search"` * + `"shoppingcart"` * + `"signup"` * + `"smile"` * + `"social"` * + `"speaker"` * + `"star"` * + `"ticket"` * + `"twitter"` * + `"vimeo"` * + `"vk"` * + `"yelp"` * + `"youtube"` */ itemType: string; /** * The quick action bar item label. */ label: string; /** * The quick action bar item link. */ link: string; }; } /** * Radio button groups are used for selecting one of a number of * options. * [Read more](https://www.wix.com/corvid/reference/$w.RadioButtonGroup.html#) */ interface RadioButtonGroup extends $w.LabelMixin, $w.FormElement, $w.HiddenCollapsedMixin, $w.DisabledMixin, $w.FocusMixin, $w.ClickableMixin, $w.StyleMixin, $w.RequiredMixin { /** * Sets or gets the options in a radio button group. * [Read more](https://www.wix.com/corvid/reference/$w.RadioButtonGroup.html#options) */ options: $w.RadioButtonGroup.Option[]; /** * Sets or gets the index of the selected option. * [Read more](https://www.wix.com/corvid/reference/$w.RadioButtonGroup.html#selectedIndex) */ selectedIndex: number; /** * Gets an object containing information about the radio button group's styles. * [Read more](https://www.wix.com/corvid/reference/$w.RadioButtonGroup.html#style) */ readonly style: $w.Style; /** * Sets or gets the value of the selected option. * [Read more](https://www.wix.com/corvid/reference/$w.RadioButtonGroup.html#value) */ value: string; } namespace RadioButtonGroup { /** * An object used by the `options` property that contains the attributes of a radio button item. */ type Option = { /** * The value of the radio button option. This is what you use in code and is what is stored in your collections. Mandatory if `label` is not specified. */ value?: string; /** * The label of the radio button option. This is what a user sees. Mandatory if `value` is not specified. */ label?: string; }; } /** * Provides functionality for input elements that support readonly mode. * [Read more](https://www.wix.com/corvid/reference/$w.ReadOnlyMixin.html#) */ interface ReadOnlyMixin { /** * Sets or gets if a user can modify the value of the input element. * [Read more](https://www.wix.com/corvid/reference/$w.ReadOnlyMixin.html#readOnly) */ readOnly: boolean; } /** * A repeating layout. * [Read more](https://www.wix.com/corvid/reference/$w.Repeater.html#) */ interface Repeater extends $w.Element, $w.HiddenCollapsedMixin { /** * Sets or gets the repeater data. * [Read more](https://www.wix.com/corvid/reference/$w.Repeater.html#data) */ data: any[]; /** * Runs a function for each repeated item. * [Read more](https://www.wix.com/corvid/reference/$w.Repeater.html#forEachItem) */ forEachItem(callback: $w.ForItemCallback): void; /** * Runs a function for each repeated item with the given IDs. * [Read more](https://www.wix.com/corvid/reference/$w.Repeater.html#forItems) */ forItems(itemIds: string[], callback: $w.ForItemCallback): void; /** * Sets the function that runs when a new repeated item is created. * [Read more](https://www.wix.com/corvid/reference/$w.Repeater.html#onItemReady) * @eventType itemReady */ onItemReady(handler: $w.ItemReadyEventHandler): $w.Repeater; /** * Sets the function that runs when a repeated item is removed. * [Read more](https://www.wix.com/corvid/reference/$w.Repeater.html#onItemRemoved) * @eventType itemRemoved */ onItemRemoved(handler: $w.ItemRemovedEventHandler): $w.Repeater; } /** * Provides functionality for input elements that can be required to have a value. * [Read more](https://www.wix.com/corvid/reference/$w.RequiredMixin.html#) */ interface RequiredMixin { /** * Sets or gets whether an input element is required to have a value. * [Read more](https://www.wix.com/corvid/reference/$w.RequiredMixin.html#required) */ required: boolean; } /** * A `Slide` from a `Slideshow` that can contain other elements. * [Read more](https://www.wix.com/corvid/reference/$w.Slide.html#) */ interface Slide extends $w.Element, $w.Background, $w.ContainableMixin { /** * Gets the slide's ID. * [Read more](https://www.wix.com/corvid/reference/$w.Slide.html#id) */ readonly id: string; /** * Gets the name of the slide. * [Read more](https://www.wix.com/corvid/reference/$w.Slide.html#name) */ readonly name: string; } /** * Slideshows are playable containers for slides. * [Read more](https://www.wix.com/corvid/reference/$w.Slideshow.html#) */ interface Slideshow extends $w.Element, $w.HiddenCollapsedMixin, $w.PlayableMixin, $w.ClickableMixin, $w.ContainableMixin { /** * Gets the index of the slideshow's current slide. * [Read more](https://www.wix.com/corvid/reference/$w.Slideshow.html#currentIndex) */ readonly currentIndex: number; /** * Gets the slideshow's current slide. * [Read more](https://www.wix.com/corvid/reference/$w.Slideshow.html#currentSlide) */ readonly currentSlide: $w.Slide; /** * Sets or gets whether a slideshow's navigation buttons are shown. * [Read more](https://www.wix.com/corvid/reference/$w.Slideshow.html#showNavigationButtons) */ showNavigationButtons: boolean; /** * Set or returns whether a slideshow's slide buttons are shown. * [Read more](https://www.wix.com/corvid/reference/$w.Slideshow.html#showSlideButtons) */ showSlideButtons: boolean; /** * Gets a list of all the slides contained in the slideshow. * [Read more](https://www.wix.com/corvid/reference/$w.Slideshow.html#slides) */ readonly slides: $w.Slide[]; /** * Change the slideshow's current slide to a specific slide or index. * [Read more](https://www.wix.com/corvid/reference/$w.Slideshow.html#changeSlide) */ changeSlide(slideReference: number | $w.Slide): Promise<$w.Slide>; /** * Adds an event handler that runs when the slideshow moves to a new slide. * [Read more](https://www.wix.com/corvid/reference/$w.Slideshow.html#onChange) * @eventType change */ onChange(eventHandler: $w.EventHandler): $w.Slideshow; } /** * A `State` from a [`MultiStateBox`]($w.MultiStateBox.html) that can contain other elements. * [Read more](https://www.wix.com/corvid/reference/$w.State.html#) */ interface State extends $w.Element, $w.Background, $w.ContainableMixin { /** * Gets the state's ID. * [Read more](https://www.wix.com/corvid/reference/$w.State.html#id) */ readonly id: string; } /** * An object representing an element's styles. * [Read more](https://www.wix.com/corvid/reference/$w.Style.html#) */ interface Style { /** * Sets or gets the background color of an element. * [Read more](https://www.wix.com/corvid/reference/$w.Style.html#backgroundColor) */ backgroundColor: string; /** * Sets or gets the border color of an element. * [Read more](https://www.wix.com/corvid/reference/$w.Style.html#borderColor) */ borderColor: string; /** * Sets or gets the border radius of an element. * [Read more](https://www.wix.com/corvid/reference/$w.Style.html#borderRadius) */ borderRadius: string; /** * Sets or gets the border width of an element. * [Read more](https://www.wix.com/corvid/reference/$w.Style.html#borderWidth) */ borderWidth: string; /** * Sets or gets the text color of an element. * [Read more](https://www.wix.com/corvid/reference/$w.Style.html#color) */ color: string; /** * Sets or gets the foreground color of an element. * [Read more](https://www.wix.com/corvid/reference/$w.Style.html#foregroundColor) */ foregroundColor: string; } /** * Provides functionality for elements that can be styled. * [Read more](https://www.wix.com/corvid/reference/$w.StyleMixin.html#) */ interface StyleMixin { /** * Gets an object containing information about the element's styles. * [Read more](https://www.wix.com/corvid/reference/$w.StyleMixin.html#style) */ readonly style: $w.Style; } /** * A tab within a [tabs]($w.Tabs.html) element. * [Read more](https://www.wix.com/corvid/reference/$w.Tab.html#) */ interface Tab extends $w.Element, $w.Background, $w.ContainableMixin { /** * Gets the tab's ID. * [Read more](https://www.wix.com/corvid/reference/$w.Tab.html#id) */ readonly id: string; /** * Sets or gets the tab's label. * [Read more](https://www.wix.com/corvid/reference/$w.Tab.html#label) */ label: string; /** * Gets the element's type. * [Read more](https://www.wix.com/corvid/reference/$w.Tab.html#type) */ readonly type: string; } /** * A table for displaying data. * [Read more](https://www.wix.com/corvid/reference/$w.Table.html#) */ interface Table extends $w.Element, $w.HiddenCollapsedMixin, $w.ClickableMixin { /** * Sets or gets the defining properties of the columns in a table. * [Read more](https://www.wix.com/corvid/reference/$w.Table.html#columns) */ columns: $w.Table.Column[]; /** * Sets the function that is called when a new page of table data is to be displayed. * [Read more](https://www.wix.com/corvid/reference/$w.Table.html#dataFetcher) */ dataFetcher: Function; /** * Sets or gets the table's pagination options. * [Read more](https://www.wix.com/corvid/reference/$w.Table.html#pagination) */ pagination: $w.Table.PaginationOptions; /** * Sets or gets the table's row data. * [Read more](https://www.wix.com/corvid/reference/$w.Table.html#rows) */ rows: any[]; /** * Adds an event handler that runs when a table cell is selected. * [Read more](https://www.wix.com/corvid/reference/$w.Table.html#onCellSelect) * @eventType cellSelect */ onCellSelect(eventHandler: $w.TableCellEventHandler): $w.Table; /** * Adds an event handler that runs when the table's data is changed. * [Read more](https://www.wix.com/corvid/reference/$w.Table.html#onDataChange) * @eventType dataChange */ onDataChange(eventHandler: $w.EventHandler): void; /** * Adds an event handler that runs when a table row is selected. * [Read more](https://www.wix.com/corvid/reference/$w.Table.html#onRowSelect) * @eventType rowSelect */ onRowSelect(eventHandler: $w.TableRowEventHandler): $w.Table; /** * Fetches the most current data and updates the table. * [Read more](https://www.wix.com/corvid/reference/$w.Table.html#refresh) */ refresh(): void; /** * Selects a table row by index. * [Read more](https://www.wix.com/corvid/reference/$w.Table.html#selectRow) */ selectRow(index: number): void; /** * Updates the row data of a single row at the specified index. * [Read more](https://www.wix.com/corvid/reference/$w.Table.html#updateRow) */ updateRow(index: number, rowData: any): void; } namespace Table { /** * An object used by the `columns` property that * contains the properties that define a table column. Table columns do not * store any data. */ type Column = { /** * The column ID. */ id: string; /** * The location of the data displayed * in the column. * * When the table is populated by a connection to a dataset, the `dataPath` * value is a field key from the collection that the dataset is connected to. The * `dataPath` can contain a [reference field](https://support.wix.com/en/article/about-reference-fields-in-database-collections) * by prefixing the field with the referenced collection name and a period. For example, * `"dataPath": "writer.name"`. * * When the table is populated by using the [`rows`](#rows) or * [`dataFetcher`](#dataFetcher) properties, the `dataPath` value is one of the * property keys from the table's row objects. */ dataPath: string; /** * The column header label. */ label: string; /** * The type of data in this column: `"number"`, `"string"`, `"date"`, `"image"`, `"bool"`, or `"richText"`. */ type: string; /** * The pixel width of the column. */ width?: number; /** * Whether the column is visible. */ visible?: boolean; /** * The location of the links used when * the items in the column are clicked. * * When the table is populated by a connection to a dataset, the `linkPath` * value is a field key from the collection that the dataset is connected to. * The collection field can be a [regular field](https://support.wix.com/en/article/about-database-collections#regular-fields) * that contains URLs, a [calculated field](https://support.wix.com/en/article/about-database-collections#calculated-fields), or a [reference field](https://support.wix.com/en/article/about-reference-fields-in-database-collections) * that contains relative links to dynamic pages. * * When the table is populated by using the [`rows`](#rows) or * [`dataFetcher`](#dataFetcher) properties, the `linkPath` value is one of the * property keys from the table's rows objects. * The property values associated with that key contain URLs or relative links. */ linkPath?: string; }; /** * An object used by the `pagination` property that * contains the pagination options which determine if and how the table * is paginated. */ type PaginationOptions = { /** * The type of pagination. * One of: * * + `"normal"`: No pagination. The table is scrollable if there are more * rows than can be displayed at once. All data is fetched at once. * + `"pagination"`: The data is separated into pages which are navigatable * using paging buttons. New data is fetched when a user clicks on a * paging button. * + `"virtual"`: The data is separated into pages which are navigated by * scrolling. New data is fetched when user a user scrolls below the * displayed rows. */ type: string; /** * The number of rows per page. */ rowsPerPage: number; }; } /** * Event that is fired when a table cell is selected. * [Read more](https://www.wix.com/corvid/reference/$w.TableCellEvent.html#) */ interface TableCellEvent extends $w.Event { /** * Gets the column ID of the selected cell. * [Read more](https://www.wix.com/corvid/reference/$w.TableCellEvent.html#cellColumnId) */ readonly cellColumnId: string; /** * Gets the data from the selected cell. * [Read more](https://www.wix.com/corvid/reference/$w.TableCellEvent.html#cellData) */ readonly cellData: string; /** * Gets the row index of the selected cell. * [Read more](https://www.wix.com/corvid/reference/$w.TableCellEvent.html#cellRowIndex) */ readonly cellRowIndex: number; } /** * Event that is fired when a table row is selected. * [Read more](https://www.wix.com/corvid/reference/$w.TableRowEvent.html#) */ interface TableRowEvent extends $w.Event { /** * Gets the data for the selected row. * [Read more](https://www.wix.com/corvid/reference/$w.TableRowEvent.html#rowData) */ readonly rowData: any; /** * Gets the index of the selected row. * [Read more](https://www.wix.com/corvid/reference/$w.TableRowEvent.html#rowIndex) */ readonly rowIndex: number; } /** * A container that holds multiple [tab]($w.Tab.html) elements, displaying one at a time. * [Read more](https://www.wix.com/corvid/reference/$w.Tabs.html#) */ interface Tabs extends $w.Element, $w.HiddenCollapsedMixin, $w.ClickableMixin, $w.ContainableMixin { /** * Gets the tab currently displayed in the tabs element. * [Read more](https://www.wix.com/corvid/reference/$w.Tabs.html#currentTab) */ readonly currentTab: $w.Tab; /** * Gets the tabs element's default tab. * [Read more](https://www.wix.com/corvid/reference/$w.Tabs.html#defaultTab) */ readonly defaultTab: $w.Tab; /** * Gets a list of all the tabs contained in the tabs element. * [Read more](https://www.wix.com/corvid/reference/$w.Tabs.html#tabs) */ readonly tabs: $w.Tab[]; /** * Gets the element's type. * [Read more](https://www.wix.com/corvid/reference/$w.Tabs.html#type) */ readonly type: string; /** * Changes the tabs element's current tab. * [Read more](https://www.wix.com/corvid/reference/$w.Tabs.html#changeTab) */ changeTab(tabReference: string | $w.Tab): Promise<$w.Tab>; /** * Adds an event handler that runs when the tabs element moves to a different tab. * [Read more](https://www.wix.com/corvid/reference/$w.Tabs.html#onChange) * @eventType change */ onChange(eventHandler: $w.EventHandler): void; /** * Adds an event handler that runs when any tab menu item is clicked. * [Read more](https://www.wix.com/corvid/reference/$w.Tabs.html#onTabItemClicked) * @eventType click */ onTabItemClicked(eventHandler: $w.EventHandler): $w.Tabs; /** * Changes the order of the tabs in a tabs element. * [Read more](https://www.wix.com/corvid/reference/$w.Tabs.html#orderTabs) */ orderTabs(orderedTabIds: string[] | $w.Tab[]): Promise; } /** * Provides functionality for text elements. * [Read more](https://www.wix.com/corvid/reference/$w.Text.html#) */ interface Text extends $w.Element, $w.HiddenCollapsedMixin, $w.ClickableMixin { /** * Sets or gets the contents of a text element using standard HTML. * [Read more](https://www.wix.com/corvid/reference/$w.Text.html#html) */ html: string; /** * Sets or gets the plain-text contents of a text element. * [Read more](https://www.wix.com/corvid/reference/$w.Text.html#text) */ text: string; } /** * An input element for capturing large amounts of text. * [Read more](https://www.wix.com/corvid/reference/$w.TextBox.html#) */ interface TextBox extends $w.LabelMixin, $w.FormElement, $w.DisabledMixin, $w.TextInputMixin, $w.HiddenCollapsedMixin, $w.FocusMixin, $w.ReadOnlyMixin, $w.ClickableMixin, $w.StyleMixin, $w.RequiredMixin { /** * Gets an object containing information about the text box's styles. * [Read more](https://www.wix.com/corvid/reference/$w.TextBox.html#style) */ readonly style: $w.Style; /** * Sets or gets a text input's value. * [Read more](https://www.wix.com/corvid/reference/$w.TextBox.html#value) */ value: string; /** * Determines if the text contains line breaks when its value is read. * [Read more](https://www.wix.com/corvid/reference/$w.TextBox.html#wrap) */ wrap: string; } /** * An input element for capturing small amounts of text. * [Read more](https://www.wix.com/corvid/reference/$w.TextInput.html#) */ interface TextInput extends $w.LabelMixin, $w.FormElement, $w.HiddenCollapsedMixin, $w.DisabledMixin, $w.TextInputMixin, $w.FocusMixin, $w.ReadOnlyMixin, $w.ClickableMixin, $w.StyleMixin, $w.RequiredMixin { /** * Sets or gets the input type of an Input element. * [Read more](https://www.wix.com/corvid/reference/$w.TextInput.html#inputType) */ inputType: string; /** * Sets or gets the maximum value for a text input element whose * type is set to **Number**. * [Read more](https://www.wix.com/corvid/reference/$w.TextInput.html#max) */ max: number; /** * Sets or gets the minimum value for a text input element whose * type is set to **Number**. * [Read more](https://www.wix.com/corvid/reference/$w.TextInput.html#min) */ min: number; /** * Indicates if the number spinner is hidden or visible for a numeric text input element. * [Read more](https://www.wix.com/corvid/reference/$w.TextInput.html#numberSpinnerHidden) */ readonly numberSpinnerHidden: boolean; /** * Gets an object containing information about the text input's styles. * [Read more](https://www.wix.com/corvid/reference/$w.TextInput.html#style) */ readonly style: $w.Style; /** * Gets a ValidityState object that contains * detailed information about the validity states of the element. * [Read more](https://www.wix.com/corvid/reference/$w.TextInput.html#validity) */ readonly validity: $w.ValidatableMixin.ValidityState; /** * Sets or gets a text input's value. * [Read more](https://www.wix.com/corvid/reference/$w.TextInput.html#value) */ value: string; /** * Hides the number spinner for a numeric text input. * [Read more](https://www.wix.com/corvid/reference/$w.TextInput.html#hideNumberSpinner) */ hideNumberSpinner(): void; /** * Shows the number spinner for a numeric text input. * [Read more](https://www.wix.com/corvid/reference/$w.TextInput.html#showNumberSpinner) */ showNumberSpinner(): void; } /** * Provides functionality for elements that accept text as input. * [Read more](https://www.wix.com/corvid/reference/$w.TextInputMixin.html#) */ interface TextInputMixin { /** * Sets or gets the maximum number of characters that can be entered. * [Read more](https://www.wix.com/corvid/reference/$w.TextInputMixin.html#maxLength) */ maxLength: number; /** * Sets or gets the element's placeholder text. * [Read more](https://www.wix.com/corvid/reference/$w.TextInputMixin.html#placeholder) */ placeholder: string; /** * Adds an event handler that runs when the input element receives * input. * [Read more](https://www.wix.com/corvid/reference/$w.TextInputMixin.html#onInput) * @eventType onInput */ onInput(eventHandler: $w.EventHandler): $w.Element; /** * Adds an event handler that runs when the cursor is inside the * input element and a key is pressed. * [Read more](https://www.wix.com/corvid/reference/$w.TextInputMixin.html#onKeyPress) * @eventType keyPress */ onKeyPress(eventHandler: $w.KeyboardEventHandler): $w.Element; } /** * An upload button enables site visitors to upload files to your site. * [Read more](https://www.wix.com/corvid/reference/$w.UploadButton.html#) */ interface UploadButton extends $w.LabelMixin, $w.FormElement, $w.HiddenCollapsedMixin, $w.DisabledMixin, $w.FocusMixin, $w.StyleMixin, $w.RequiredMixin { /** * Sets or gets the label on the upload button. * [Read more](https://www.wix.com/corvid/reference/$w.UploadButton.html#buttonLabel) */ buttonLabel: string; /** * Sets or gets the maximum amount of files a site visitor can upload at a time. * [Read more](https://www.wix.com/corvid/reference/$w.UploadButton.html#fileLimit) */ fileLimit: number; /** * Sets or gets the type of file a site visitor can upload. * [Read more](https://www.wix.com/corvid/reference/$w.UploadButton.html#fileType) */ fileType: string; /** * Gets an object containing information about the upload button's styles. * [Read more](https://www.wix.com/corvid/reference/$w.UploadButton.html#style) */ readonly style: $w.Style; /** * Indicates if a required file was selected, and if the file is valid for upload to the Media Manager. * [Read more](https://www.wix.com/corvid/reference/$w.UploadButton.html#valid) */ readonly valid: boolean; /** * Gets a message indicating why the file is invalid or could not be uploaded. Contains * empty string if the file is valid and successfully uploaded. * [Read more](https://www.wix.com/corvid/reference/$w.UploadButton.html#validationMessage) */ readonly validationMessage: string; /** * Gets a ValidityState object that contains * detailed information about the validity states of the file to upload. * [Read more](https://www.wix.com/corvid/reference/$w.UploadButton.html#validity) */ readonly validity: $w.UploadButton.ValidityState; /** * Returns a list of files that are pending upload. * [Read more](https://www.wix.com/corvid/reference/$w.UploadButton.html#value) */ readonly value: $w.UploadButton.File[]; /** * Clears the files that are pending upload. * [Read more](https://www.wix.com/corvid/reference/$w.UploadButton.html#reset) */ reset(): void; /** * **Deprecated.** This function will continue to work, but a newer version is available. Use the * [`uploadFiles()`](#uploadFiles) function instead. * [Read more](https://www.wix.com/corvid/reference/$w.UploadButton.html#startUpload) */ startUpload(): Promise<$w.UploadButton.UploadFile>; /** * Uploads the files that the site visitor has chosen. * [Read more](https://www.wix.com/corvid/reference/$w.UploadButton.html#uploadFiles) */ uploadFiles(): Promise<$w.UploadButton.UploadedFile[]>; } namespace UploadButton { /** * The object used by the [`value`](#value) property that represents files ready for upload. */ type File = { /** * File name. */ name: string; /** * File size in bytes. */ size: number; /** * `true` if the file is valid for upload to the Media Manager. */ valid: boolean; /** * Message indicating why the file is invalid. Empty if the file is valid. */ validationMessage: string; }; /** * The error message object returned when the `uploadFiles()`'s Promise is rejected. */ type UploadError = { /** * The error's code. */ errorCode: string; /** * The error's description. */ errorDescription: string; }; /** * Object returned by the `startUpload()`'s Promise. */ type UploadFile = { /** * Wix URL of the successfully uploaded file. */ url: string; /** * Wix media ID of the uploaded file. */ mediaId: string; /** * Title of the uploaded file. */ title: string; /** * Width of an uploaded image or video file. */ width: number; /** * Height of an uploaded image or video file. */ height: number; /** * Duration (in milliseconds) of an uploaded audio file. */ duration: number; }; /** * An array of objects returned by the `uploadFiles()`'s Promise. */ type UploadedFile = { /** * Width of an uploaded image or video file. */ width: number; /** * Height of an uploaded image or video file. */ height: number; /** * Duration (in milliseconds) of an uploaded audio file. */ duration: number; /** * Wix media URL of the successfully uploaded file in the following format: `'wix:image://v1//#originWidth=&originHeight=[&watermark=]'`. * * **Note:** This replaces the old `fileName` parameter. `fileName` will continue to work, but we recommend that you use the updated `fileUrl` parameter instead. */ fileUrl: string; /** * **Deprecated**. Use the `fileUrl` property instead. * * Internal file name of the uploaded file, generated by the Media Manager. The name is the string located in the file's URL. Click [here](https://www.wix.com/velo/forum/tips-tutorials-examples/creating-a-url-for-a-media-file-or-the-truth-about-getfileurl) to learn more. */ fileName: string; /** * Original name of the uploaded file. */ originalFileName: string; }; /** * Contains detailed information about the validity states of a file to upload. */ type ValidityState = { /** * `true` if the file's custom validity message has been set to a non-empty string. */ customError: boolean; /** * `true` if the file to upload meets all validations. */ valid: boolean; /** * `true` if a file is required, and either no file has been selected, or a file has been selected but not uploaded. */ fileNotUploaded: boolean; /** * `true` if a file has been selected but it is too large. Maximum allowed file sizes are listed [here](https://support.wix.com/en/article/supported-media-file-types-and-file-sizes). */ fileSizeExceedsLimit: boolean; /** * `true` if a file has been selected but the file's type is not supported. Supported file types are listed [here](https://support.wix.com/en/article/supported-media-file-types-and-file-sizes). */ fileTypeNotAllowed: boolean; /** * `true` if a file is required but no file has been selected. */ valueMissing: boolean; /** * `true` if the text input element's value does not match its type when the type is email or url. */ typeMismatch: boolean; /** * `true` if the element's value does not match its pattern validation. */ patternMismatch: boolean; /** * `true` if the length of the element's value exceeds its [`maxLength`]($w.TextInputMixin.html#maxLength) property. */ tooLong: boolean; /** * `true` if the length of the element's value is smaller than its `minlength` property. */ tooShort: boolean; /** * `true` if the element's value is less than the its [`min`]($w.TextInput.html#min) property. */ rangeUnderflow: boolean; /** * `true` if the element's value is more than the its [`max`]($w.TextInput.html#max) property. */ rangeOverflow: boolean; /** * `true` if a text input element's numeric value is defined as a whole number but a decimal number is entered. */ stepMismatch: boolean; /** * `true` if the element's value cannot be converted to a value. */ badInput: boolean; /** * `true` if the number of files selected exceeds the limit defined in the `fileLimit` property. */ exceedsFileLimit: boolean; /** * `true` if the element's time value is not a valid time. */ invalidTime: boolean; /** * `true` if the element's date value is not a valid date. */ invalidDate: boolean; }; } /** * Provides functionality for elements that can be validated. * [Read more](https://www.wix.com/corvid/reference/$w.ValidatableMixin.html#) */ interface ValidatableMixin { /** * Indicates if an input element's value is valid. * [Read more](https://www.wix.com/corvid/reference/$w.ValidatableMixin.html#valid) */ readonly valid: boolean; /** * Gets a message indicating why the element is invalid, or an * empty string if the message is valid. * [Read more](https://www.wix.com/corvid/reference/$w.ValidatableMixin.html#validationMessage) */ readonly validationMessage: string; /** * Gets a ValidityState object that contains * detailed information about the validity states of the element. * [Read more](https://www.wix.com/corvid/reference/$w.ValidatableMixin.html#validity) */ readonly validity: $w.ValidatableMixin.ValidityState; /** * Adds an event handler that runs when the element's validation is checked. * [Read more](https://www.wix.com/corvid/reference/$w.ValidatableMixin.html#onCustomValidation) */ onCustomValidation(validator: $w.Validator, override?: boolean): void; /** * Resets the element's visual validity indication. * [Read more](https://www.wix.com/corvid/reference/$w.ValidatableMixin.html#resetValidityIndication) */ resetValidityIndication(): void; /** * Updates the element's visual validity indication based on its current validity state. * [Read more](https://www.wix.com/corvid/reference/$w.ValidatableMixin.html#updateValidityIndication) */ updateValidityIndication(): void; } namespace ValidatableMixin { /** * Contains detailed information about the validity states of an element. */ type ValidityState = { /** * `true` if the element's custom * validity message has been set to a non-empty string. */ customError: boolean; /** * `true` if the element meets all * constraint validations. */ valid: boolean; /** * `true` if the element's * [`required`]($w.RequiredMixin.html#required) property is `true`, but * it does not contain a value. */ valueMissing: boolean; /** * `true` if the text input element's value * does not match its type when the type is email or url. */ typeMismatch: boolean; /** * `true` if the element's * value does not match its pattern validation. */ patternMismatch: boolean; /** * `true` if the length of the * element's value exceeds its [`maxLength`]($w.TextInputMixin.html#maxLength) * property. */ tooLong: boolean; /** * `true` if the length of the * element's value is smaller than its `minlength` property. */ tooShort: boolean; /** * `true` if the element's * value is less than its [`min`]($w.TextInput.html#min) property. */ rangeUnderflow: boolean; /** * `true` if the element's * value is more than its [`max`]($w.TextInput.html#max) property. */ rangeOverflow: boolean; /** * `true` if the element is * an upload button that is required and a file has been selected but not * uploaded. */ fileNotUploaded: boolean; /** * `true` if a text input * element's numeric value is defined as a whole number but a decimal * number is entered. */ stepMismatch: boolean; /** * `true` if the element's value * cannot be converted to a value. */ badInput: boolean; /** * `true` if the element's time value * is not a valid time. */ invalidTime: boolean; /** * `true` if the element's date value * is not a valid date. */ invalidDate: boolean; }; } /** * Adds the value property to elements. * [Read more](https://www.wix.com/corvid/reference/$w.ValueMixin.html#) */ interface ValueMixin { /** * Sets or gets an element's value. * [Read more](https://www.wix.com/corvid/reference/$w.ValueMixin.html#value) */ value: any; /** * Adds an event handler that runs when an input element's value * is changed. * [Read more](https://www.wix.com/corvid/reference/$w.ValueMixin.html#onChange) * @eventType change */ onChange(handler: $w.EventHandler): $w.Element; } /** * Vector images are digital illustrations based on geometric shapes. * They maintain their high quality when resized. * [Read more](https://www.wix.com/corvid/reference/$w.VectorImage.html#) */ interface VectorImage extends $w.Element, $w.HiddenCollapsedMixin, $w.LinkableMixin, $w.ClickableMixin { /** * Sets or gets the file location of the vector image. * [Read more](https://www.wix.com/corvid/reference/$w.VectorImage.html#src) */ src: string; } /** * **Deprecated.** * This API will continue to work, but a newer version is available at * [Video Player]($w/videoplayer). * [Read more](https://www.wix.com/corvid/reference/$w.Video.html#) */ interface Video extends $w.Element, $w.HiddenCollapsedMixin { /** * Sets or gets the URL of the video. * [Read more](https://www.wix.com/corvid/reference/$w.Video.html#videoUrl) */ videoUrl: string; } /** * An element for displaying videos in customizable video containers. * [Read more](https://www.wix.com/corvid/reference/$w.VideoBox.html#) */ interface VideoBox extends $w.Element, $w.HiddenCollapsedMixin { /** * Gets the current play time from the beginning of the current video, in seconds. * [Read more](https://www.wix.com/corvid/reference/$w.VideoBox.html#currentTime) */ readonly currentTime: number; /** * Gets the total play time of the current video, in seconds. * [Read more](https://www.wix.com/corvid/reference/$w.VideoBox.html#duration) */ readonly duration: number; /** * Indicates if the volume is currently muted. * [Read more](https://www.wix.com/corvid/reference/$w.VideoBox.html#isMuted) */ readonly isMuted: boolean; /** * Indicates if a video is currently playing. * [Read more](https://www.wix.com/corvid/reference/$w.VideoBox.html#isPlaying) */ readonly isPlaying: boolean; /** * Sets or gets the file location of the current video. * [Read more](https://www.wix.com/corvid/reference/$w.VideoBox.html#src) */ src: string; /** * Sets or gets the video box volume. * [Read more](https://www.wix.com/corvid/reference/$w.VideoBox.html#volume) */ readonly volume: number; /** * Mutes video box volume. * [Read more](https://www.wix.com/corvid/reference/$w.VideoBox.html#mute) */ mute(): Promise; /** * Adds an event handler that runs when the playback has ended. * [Read more](https://www.wix.com/corvid/reference/$w.VideoBox.html#onEnded) * @eventType onEnded */ onEnded(handler: $w.EventHandler): $w.VideoBox; /** * **Note: This standard element property is not relevant for VideoBox.** * [Read more](https://www.wix.com/corvid/reference/$w.VideoBox.html#onMouseIn) * @eventType mouseenter */ onMouseIn(handler: $w.MouseEventHandler): $w.Element; /** * **Note: This standard element property is not relevant for VideoBox.** * [Read more](https://www.wix.com/corvid/reference/$w.VideoBox.html#onMouseOut) * @eventType mouseleave */ onMouseOut(handler: $w.MouseEventHandler): $w.Element; /** * Adds an event handler that runs when the playback is paused. * [Read more](https://www.wix.com/corvid/reference/$w.VideoBox.html#onPause) * @eventType onPause */ onPause(handler: $w.EventHandler): $w.VideoBox; /** * Adds an event handler that runs when the playback is started or restarted. * [Read more](https://www.wix.com/corvid/reference/$w.VideoBox.html#onPlay) * @eventType onPlay */ onPlay(handler: $w.EventHandler): $w.VideoBox; /** * Adds an event handler that runs when the playback progresses. * [Read more](https://www.wix.com/corvid/reference/$w.VideoBox.html#onProgress) * @eventType onProgress */ onProgress(handler: $w.EventHandler): $w.VideoBox; /** * Pauses playback. * [Read more](https://www.wix.com/corvid/reference/$w.VideoBox.html#pause) */ pause(): Promise; /** * Begins or resumes playback. * [Read more](https://www.wix.com/corvid/reference/$w.VideoBox.html#play) */ play(): Promise; /** * Stops the playback. * [Read more](https://www.wix.com/corvid/reference/$w.VideoBox.html#stop) */ stop(): Promise; /** * Toggles playback. * [Read more](https://www.wix.com/corvid/reference/$w.VideoBox.html#togglePlay) */ togglePlay(): Promise; /** * Unmutes video volume. * [Read more](https://www.wix.com/corvid/reference/$w.VideoBox.html#unmute) */ unmute(): Promise; } /** * The ViewChangeEvent is triggered when the month or year changes on a date picker or appointment field element. * [Read more](https://www.wix.com/corvid/reference/$w.ViewChangeEvent.html#) */ interface ViewChangeEvent { /** * Gets the context in which an event was triggered. * [Read more](https://www.wix.com/corvid/reference/$w.ViewChangeEvent.html#context) */ readonly context: $w.Event.EventContext; /** * Gets the options that relate to the date picker or appointment field view change event. * [Read more](https://www.wix.com/corvid/reference/$w.ViewChangeEvent.html#options) */ readonly options: $w.ViewChangeEvent.ViewChangeEventOptions; /** * Gets the type of event that was triggered. * [Read more](https://www.wix.com/corvid/reference/$w.ViewChangeEvent.html#type) */ readonly type: string; } namespace ViewChangeEvent { /** * An object that contains information about the date picker or appointment field for which an event was triggered. */ type ViewChangeEventOptions = { /** * Start date of the currently displayed month. */ startDate: Date; /** * End date of the currently displayed month. */ endDate: Date; /** * Result returned by the operation. */ operationResult: any; }; } /** * Provides functionality for elements that can be scrolled into and out * of view. * [Read more](https://www.wix.com/corvid/reference/$w.ViewportMixin.html#) */ interface ViewportMixin { /** * Adds an event handler that runs when an element is displayed * in the viewable part of the current window. * [Read more](https://www.wix.com/corvid/reference/$w.ViewportMixin.html#onViewportEnter) * @eventType viewportEnter */ onViewportEnter(handler: $w.EventHandler): $w.Element; /** * Adds an event handler that runs when an element is no longer * displayed in the viewable part of the current window. * [Read more](https://www.wix.com/corvid/reference/$w.ViewportMixin.html#onViewportLeave) * @eventType viewportLeave */ onViewportLeave(handler: $w.EventHandler): $w.Element; } type BasicEventHandler = () => void; type EventHandler = (event: $w.Event) => void; type ForItemCallback = ($item: $w.$w, itemData: any, index: number) => void; /** * Handles events fired when a gallery moves to a new image. */ type GalleryItemChangedEventHandler = (event: $w.GalleryItemChangedEvent) => void; /** * Handles events fired when an image in a gallery is clicked. */ type GalleryItemClickedEventHandler = (event: $w.GalleryItemClickedEvent) => void; /** * Handles events fired when google map / marker is clicked. */ type GoogleMapClickEvent = (event: $w.GoogleMapClickEvent) => void; /** * Handles events fired when the code in an HtmlComponent sends a message. */ type HtmlComponentMessageEventHandler = (event: $w.HtmlComponentMessageEvent) => void; type HtmlElementEventHandler = (event: $w.HtmlComponentMessageEvent) => void; /** * Handles events fired when a user hovers over a star on the rating component. */ type IconMouseInEventHandler = (event: $w.IconMouseInEvent) => void; type ItemReadyEventHandler = ($item: $w.$w, itemData: any, index: number) => void; type ItemRemovedEventHandler = (itemData: any) => void; /** * Handles events fired when the keyboard is pressed. */ type KeyboardEventHandler = (event: $w.KeyboardEvent) => void; /** * Handles events fired when the mouse is used on a menu item. */ type MenuItemMouseEventHandler = (event: $w.MenuItemMouseEvent) => void; /** * Handles events fired when the mouse is clicked. */ type MouseEventHandler = (event: $w.MouseEvent) => void; /** * Handles events fired when an item in a quick action bar is clicked. */ type QuickActionBarItemClickedEventHandler = (event: $w.QuickActionBarItemClickedEvent) => void; /** * Function that runs when all page elements have finished loading. */ type ReadyHandler = () => Promise | void; /** * Handles events fired when a table cell is selected. */ type TableCellEventHandler = (event: $w.TableCellEvent) => void; /** * Handles events fired when a table row is selected. */ type TableRowEventHandler = (event: $w.TableRowEvent) => void; /** * Function that runs when custom validation is checked. */ type Validator = (value: string | $w.UploadButton.File[] | boolean, reject: Function) => void; type ViewChangeEventHandler = (event: $w.ViewChangeEvent) => void; type ViewChangeOperation = (options: $w.AppointmentField.OperationOptions) => any; /** * An event that is fired when a site visitor clicks a submit button on a [`WixForms`](wix-crm.html#$w-wixforms) element and the Wix Form is about to be submitted to the server. * You do not need to import `$w` or `wix-crm` to work with Wix Forms events. * [Read more](https://www.wix.com/corvid/reference/$w.WixFormSubmitEvent.html#) */ interface WixFormSubmitEvent extends $w.Event { /** * An array of objects representing the fields on a Wix Form. * [Read more](https://www.wix.com/corvid/reference/$w.WixFormSubmitEvent.html#wixFormFields) */ readonly wixFormFields: $w.WixFormSubmittedEvent.WixFormField[]; } namespace WixFormSubmitEvent { /** * An object representing a field on a Wix Form and its value. */ type WixFormField = { /** * The [`WixForms`](wix-crm.html#$w-wixforms) element's unique identifier. Used when selecting elements using the `$w()` selector. */ id: string; /** * Name of the field. */ fieldName: string; /** * Value of the field. If the field is a checkbox, its value is the checked property. If the field is a Captcha, its value is the token property. If the field is a file upload, its value is an array of the uploaded files' type. */ fieldValue: string; }; } /** * An event that is fired when a site visitor clicks a submit button on a [`WixForms`](wix-crm.html#$w-wixforms) element but the Wix Form is not successfully submitted to the server. * You do not need to import `$w` or `wix-crm` to work with Wix Forms events. * [Read more](https://www.wix.com/corvid/reference/$w.WixFormSubmittedErrorEvent.html#) */ interface WixFormSubmittedErrorEvent extends $w.Event { /** * Gets the error code for a failed Wix Form submission. * [Read more](https://www.wix.com/corvid/reference/$w.WixFormSubmittedErrorEvent.html#code) */ readonly code: string; /** * Gets the error message for a failed Wix Form submission. * [Read more](https://www.wix.com/corvid/reference/$w.WixFormSubmittedErrorEvent.html#message) */ readonly message: string; } /** * An event that is fired when a site visitor clicks a submit button on a [`WixForms`](wix-crm.html#$w-wixforms) element and the Wix Form is successfully submitted to the server. * You do not need to import `$w` or `wix-crm` to work with Wix Forms events. * [Read more](https://www.wix.com/corvid/reference/$w.WixFormSubmittedEvent.html#) */ interface WixFormSubmittedEvent extends $w.Event { /** * An array of objects representing the fields on a Wix Form. * [Read more](https://www.wix.com/corvid/reference/$w.WixFormSubmittedEvent.html#wixFormFields) */ readonly wixFormFields: $w.WixFormSubmittedEvent.WixFormField[]; } namespace WixFormSubmittedEvent { /** * An object representing a field on a Wix Form and its value. */ type WixFormField = { /** * The [`WixForms`](wix-crm.html#$w-wixforms) element's unique identifier. Used when selecting elements using the `$w()` selector. */ id: string; /** * Name of the field. */ fieldName: string; /** * Value of the field. If the field is a checkbox, its value is the checked property. If the field is a Captcha, its value is the token property. If the field is a file upload, its value is an array of the uploaded files' type. */ fieldValue: string; }; } /** * A `$w` element for enabling your site contacts and visitors to work with the Wix Forms app. * [Read more](https://www.wix.com/corvid/reference/$w.WixForms.html#) */ interface WixForms extends $w.HiddenCollapsedMixin { /** * Adds an event handler that runs when a site visitor starts to submit a Wix Form yet before the form is actually submitted and sent to the server. * [Read more](https://www.wix.com/corvid/reference/$w.WixForms.html#onWixFormSubmit) * @eventType WixFormSubmitEvent */ onWixFormSubmit(eventHandler: $w.WixForms.WixFormSubmitEventHandler): void; /** * Adds an event handler that runs when a site visitor submits a Wix Form and it is successfully received by the server. * [Read more](https://www.wix.com/corvid/reference/$w.WixForms.html#onWixFormSubmitted) * @eventType WixFormSubmittedEvent */ onWixFormSubmitted(eventHandler: $w.WixForms.WixFormSubmittedEventHandler): void; /** * Adds an event handler that runs when a site visitor is not able to successfully submit a Wix Form to the server. * [Read more](https://www.wix.com/corvid/reference/$w.WixForms.html#onWixFormSubmittedError) * @eventType WixFormSubmittedErrorEvent */ onWixFormSubmittedError(eventHandler: $w.WixForms.WixFormSubmittedErrorEventHandler): void; } namespace WixForms { /** * Handles events fired when the Wix Form is about to be submitted. */ type WixFormSubmitEventHandler = (event: $w.WixFormSubmitEvent) => any | boolean; /** * Handles events fired when the Wix Form is not submitted due to error. */ type WixFormSubmittedErrorEventHandler = (errorEvent: $w.WixFormSubmittedErrorEvent) => void; /** * Handles events fired when the Wix Form is submitted. */ type WixFormSubmittedEventHandler = (event: $w.WixFormSubmittedEvent) => void; } /** * `AddressInput` is used for entering addresses. It lets users type * an address, and suggests exact locations using Google Maps services. * [Read more](https://www.wix.com/corvid/reference/$w.AddressInput.html#) */ interface AddressInput extends $w.LabelMixin, $w.FormElement, $w.DisabledMixin, $w.RequiredMixin, $w.ReadOnlyMixin, $w.HiddenCollapsedMixin, $w.FocusMixin, $w.ClickableMixin { /** * Sets or gets the filter of the address input. * [Read more](https://www.wix.com/corvid/reference/$w.AddressInput.html#filter) */ filter: $w.AddressInput.AddressFilter; /** * Sets or gets the placeholder of the address input. * [Read more](https://www.wix.com/corvid/reference/$w.AddressInput.html#placeholder) */ placeholder: string; /** * Sets or gets the value of the address input. * [Read more](https://www.wix.com/corvid/reference/$w.AddressInput.html#value) */ value: $w.AddressInput.Address; } namespace AddressInput { /** * An object representing a physical address. */ type Address = { /** * Address in human-readable format. The formatted address is displayed in the address input element. */ formatted: string; /** * Address coordinates. */ location?: $w.AddressInput.AddressLocation; /** * Address street name and number. */ streetAddress?: $w.AddressInput.StreetAddress; /** * Address city. */ city?: string; /** * Address subdivision of a country, such as a state or province. */ subdivision?: string; /** * Address country. */ country?: string; /** * Address postal code. */ postalCode?: string; }; /** * An object containing a filter for filtering address suggestions * in an address input. Suggestions are restricted to addresses within * the specified country. * > **Note:** Currently only filtering by country is supported. */ type AddressFilter = { /** * [ISO_3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) country code. */ country?: string; }; /** * An object containing the coordinates of an address. */ type AddressLocation = { /** * Address latitude. */ latitude: number; /** * Address longitude. */ longitude: number; }; /** * An object containing the street name and number of an address. */ type StreetAddress = { /** * Street name. */ name: string; /** * Street number. */ number?: string; }; } /** * An element for playing audio files. * [Read more](https://www.wix.com/corvid/reference/$w.AudioPlayer.html#) */ interface AudioPlayer extends $w.Element, $w.HiddenCollapsedMixin { /** * Sets or gets the name of the artist displayed in an audio player. * [Read more](https://www.wix.com/corvid/reference/$w.AudioPlayer.html#artistName) */ artistName: string; /** * Sets or gets the cover image displayed in an audio player. * [Read more](https://www.wix.com/corvid/reference/$w.AudioPlayer.html#coverImage) */ coverImage: string; /** * Gets the current play time from the beginning of the audio track, in seconds. * [Read more](https://www.wix.com/corvid/reference/$w.AudioPlayer.html#currentTime) */ readonly currentTime: number; /** * Gets the total play time of the audio track, in seconds. * [Read more](https://www.wix.com/corvid/reference/$w.AudioPlayer.html#duration) */ readonly duration: number; /** * Indicates if the volume is currently muted. * [Read more](https://www.wix.com/corvid/reference/$w.AudioPlayer.html#isMuted) */ readonly isMuted: boolean; /** * Indicates if an audio track is currently playing. * [Read more](https://www.wix.com/corvid/reference/$w.AudioPlayer.html#isPlaying) */ readonly isPlaying: boolean; /** * Sets or gets the file location of the audio file. * [Read more](https://www.wix.com/corvid/reference/$w.AudioPlayer.html#src) */ src: string; /** * Sets or gets the track name displayed in an audio player. * [Read more](https://www.wix.com/corvid/reference/$w.AudioPlayer.html#trackName) */ trackName: string; /** * Sets or gets an audio player's volume. * [Read more](https://www.wix.com/corvid/reference/$w.AudioPlayer.html#volume) */ volume: number; /** * Mutes audio volume. * [Read more](https://www.wix.com/corvid/reference/$w.AudioPlayer.html#mute) */ mute(): Promise; /** * Adds an event handler that runs when playback has ended. * [Read more](https://www.wix.com/corvid/reference/$w.AudioPlayer.html#onEnded) * @eventType onEnded */ onEnded(handler: $w.EventHandler): $w.AudioPlayer; /** * Adds an event handler that runs when playback is paused. * [Read more](https://www.wix.com/corvid/reference/$w.AudioPlayer.html#onPause) * @eventType onPause */ onPause(handler: $w.EventHandler): $w.AudioPlayer; /** * Adds an event handler that runs when playback is started or restarted. * [Read more](https://www.wix.com/corvid/reference/$w.AudioPlayer.html#onPlay) * @eventType onPlay */ onPlay(handler: $w.EventHandler): $w.AudioPlayer; /** * Adds an event handler that runs when playback progresses. * [Read more](https://www.wix.com/corvid/reference/$w.AudioPlayer.html#onProgress) * @eventType onProgress */ onProgress(handler: $w.EventHandler): $w.AudioPlayer; /** * Pauses playback. * [Read more](https://www.wix.com/corvid/reference/$w.AudioPlayer.html#pause) */ pause(): Promise; /** * Begins or resumes playback. * [Read more](https://www.wix.com/corvid/reference/$w.AudioPlayer.html#play) */ play(): Promise; /** * Moves playback to the specified time, in seconds. * [Read more](https://www.wix.com/corvid/reference/$w.AudioPlayer.html#seek) */ seek(time: number): Promise; /** * Stops playback. * [Read more](https://www.wix.com/corvid/reference/$w.AudioPlayer.html#stop) */ stop(): Promise; /** * Toggles playback. * [Read more](https://www.wix.com/corvid/reference/$w.AudioPlayer.html#togglePlay) */ togglePlay(): Promise; /** * Unmutes audio volume. * [Read more](https://www.wix.com/corvid/reference/$w.AudioPlayer.html#unmute) */ unmute(): Promise; } /** * The reCAPTCHA element allows you to present a challenge-response test to site visitors to determine whether they are human or a bot. * [Read more](https://www.wix.com/corvid/reference/$w.Captcha.html#) */ interface Captcha extends $w.Element, $w.FocusMixin, $w.HiddenCollapsedMixin { /** * Gets the reCAPTCHA token. * [Read more](https://www.wix.com/corvid/reference/$w.Captcha.html#token) */ readonly token: string; /** * Adds an event handler that runs when a connection error occurs while completing the CAPTCHA challenge. * [Read more](https://www.wix.com/corvid/reference/$w.Captcha.html#onError) * @eventType onError */ onError(handler: $w.Captcha.ErrorHandler): void; /** * Adds an event handler that runs when the CAPTCHA token expires. * [Read more](https://www.wix.com/corvid/reference/$w.Captcha.html#onTimeout) * @eventType onTimeout */ onTimeout(handler: $w.Captcha.TimeoutHandler): void; /** * Adds an event handler that runs when the CAPTCHA challenge is successfully completed. * [Read more](https://www.wix.com/corvid/reference/$w.Captcha.html#onVerified) * @eventType onVerified */ onVerified(handler: $w.Captcha.VerifiedHandler): void; /** * Resets the reCAPTCHA element. * [Read more](https://www.wix.com/corvid/reference/$w.Captcha.html#reset) */ reset(): Promise; } namespace Captcha { /** * An error event handler. */ type ErrorHandler = () => void; /** * A timeout event handler. */ type TimeoutHandler = () => void; /** * A verification event handler. */ type VerifiedHandler = () => Promise | void; } /** * An API for rendering a custom element. * [Read more](https://www.wix.com/corvid/reference/$w.CustomElement.html#) */ interface CustomElement extends $w.Element, $w.HiddenCollapsedMixin { /** * Sets or gets the SEO markup to be rendered for search engine bots. * [Read more](https://www.wix.com/corvid/reference/$w.CustomElement.html#seoMarkup) */ seoMarkup: string; /** * Registers a callback function in Velo for an event triggered from the custom element. * [Read more](https://www.wix.com/corvid/reference/$w.CustomElement.html#on) */ on(eventName: string, callBackFunction: Function): void; /** * Sets an HTML attribute on the custom element's DOM node. * [Read more](https://www.wix.com/corvid/reference/$w.CustomElement.html#setAttribute) */ setAttribute(key: string, value: string | boolean | number): void; } /** * An element for working with paging. * [Read more](https://www.wix.com/corvid/reference/$w.Pagination.html#) */ interface Pagination extends $w.Element, $w.DisabledMixin, $w.HiddenCollapsedMixin, $w.ClickableMixin, $w.ViewportMixin { /** * Sets or gets the current page. * [Read more](https://www.wix.com/corvid/reference/$w.Pagination.html#currentPage) */ currentPage: number; /** * Sets or gets the total number of pages shown in a pagination bar. * [Read more](https://www.wix.com/corvid/reference/$w.Pagination.html#totalPages) */ totalPages: number; /** * Adds an event handler that runs when the pagination bar * is changed. * [Read more](https://www.wix.com/corvid/reference/$w.Pagination.html#onChange) * @eventType Change */ onChange(handler: $w.EventHandler): $w.Pagination; } /** * An element for displaying the status of an ongoing process. * [Read more](https://www.wix.com/corvid/reference/$w.ProgressBar.html#) */ interface ProgressBar extends $w.Element, $w.HiddenCollapsedMixin, $w.StyleMixin { /** * Gets an object containing information about the progress bar's styles. * [Read more](https://www.wix.com/corvid/reference/$w.ProgressBar.html#style) */ readonly style: $w.Style; /** * Sets or gets a progress bar's target value. * [Read more](https://www.wix.com/corvid/reference/$w.ProgressBar.html#targetValue) */ targetValue: number; /** * Sets or gets a progress bar's value. * [Read more](https://www.wix.com/corvid/reference/$w.ProgressBar.html#value) */ value: number; } /** * Range sliders allow site visitors to select a range of values within a given range. * [Read more](https://www.wix.com/corvid/reference/$w.RangeSlider.html#) */ interface RangeSlider extends $w.Element, $w.ValueMixin, $w.DisabledMixin, $w.HiddenCollapsedMixin, $w.FocusMixin { /** * Sets or gets the label of a range slider. * [Read more](https://www.wix.com/corvid/reference/$w.RangeSlider.html#label) */ label: string; /** * Sets or gets the maximum value of a range slider. * [Read more](https://www.wix.com/corvid/reference/$w.RangeSlider.html#max) */ max: number; /** * Sets or gets the minimum value of a range slider. * [Read more](https://www.wix.com/corvid/reference/$w.RangeSlider.html#min) */ min: number; /** * Sets or gets the prefix of a range slider's value. * [Read more](https://www.wix.com/corvid/reference/$w.RangeSlider.html#prefix) */ prefix: string; /** * Sets or gets a range slider's type. * [Read more](https://www.wix.com/corvid/reference/$w.RangeSlider.html#sliderType) */ sliderType: string; /** * Sets or gets a range slider's step value. * [Read more](https://www.wix.com/corvid/reference/$w.RangeSlider.html#step) */ step: number; /** * Sets or gets a range slider's step type. * [Read more](https://www.wix.com/corvid/reference/$w.RangeSlider.html#stepType) */ stepType: string; /** * Sets or gets the suffix of a range slider's value. * [Read more](https://www.wix.com/corvid/reference/$w.RangeSlider.html#suffix) */ suffix: string; /** * Sets or gets the value(s) of a range slider's handle(s). * [Read more](https://www.wix.com/corvid/reference/$w.RangeSlider.html#value) */ value: number | number[]; } /** * A ratings display element allows you to display a value to your users * using icons. * [Read more](https://www.wix.com/corvid/reference/$w.RatingsDisplay.html#) */ interface RatingsDisplay extends $w.Element, $w.HiddenCollapsedMixin, $w.ClickableMixin { /** * Sets or gets the displayed number of ratings. * [Read more](https://www.wix.com/corvid/reference/$w.RatingsDisplay.html#numRatings) */ numRatings: number; /** * Sets or gets the displayed rating. * [Read more](https://www.wix.com/corvid/reference/$w.RatingsDisplay.html#rating) */ rating: number; } /** * A ratings input element allows you to capture a value from your users * using icons. * [Read more](https://www.wix.com/corvid/reference/$w.RatingsInput.html#) */ interface RatingsInput extends $w.FormElement, $w.DisabledMixin, $w.RequiredMixin, $w.HiddenCollapsedMixin, $w.FocusMixin, $w.ClickableMixin, $w.ViewportMixin { /** * Sets or gets the rating value. * [Read more](https://www.wix.com/corvid/reference/$w.RatingsInput.html#value) */ value: number; /** * Sets the function that runs when a user's mouse enters one of the rating icons. * [Read more](https://www.wix.com/corvid/reference/$w.RatingsInput.html#onIconMouseIn) * @eventType IconMouseIn */ onIconMouseIn(handler: $w.IconMouseInEventHandler): $w.RatingsInput; } /** * An input element for entering information in rich text format. * [Read more](https://www.wix.com/corvid/reference/$w.RichTextBox.html#) */ interface RichTextBox extends $w.FormElement, $w.DisabledMixin, $w.TextInputMixin, $w.HiddenCollapsedMixin, $w.FocusMixin, $w.ReadOnlyMixin, $w.ClickableMixin, $w.RequiredMixin { /** * **This standard element function is not supported for RichTextBox.** * [Read more](https://www.wix.com/corvid/reference/$w.RichTextBox.html#onInput) */ onInput(eventHandler: $w.EventHandler): $w.Element; } /** * [Selection Tags](https://support.wix.com/en/article/adding-and-setting-up-selection-tags) are used for selecting one or more options. * [Read more](https://www.wix.com/corvid/reference/$w.SelectionTags.html#) */ interface SelectionTags extends $w.FormElement, $w.HiddenCollapsedMixin, $w.DisabledMixin, $w.ClickableMixin, $w.StyleMixin, $w.RequiredMixin, $w.ValidatableMixin { /** * Sets or gets a list of items which will be rendered as tags. * [Read more](https://www.wix.com/corvid/reference/$w.SelectionTags.html#options) */ options: $w.SelectionTags.Option[]; /** * Sets or gets the indices of the selected options. * [Read more](https://www.wix.com/corvid/reference/$w.SelectionTags.html#selectedIndices) */ selectedIndices: number[]; /** * Gets an object containing information about the selection tags' styles. * [Read more](https://www.wix.com/corvid/reference/$w.SelectionTags.html#style) */ readonly style: $w.Style; /** * Sets or gets the values of the selected options. * [Read more](https://www.wix.com/corvid/reference/$w.SelectionTags.html#value) */ value: string[]; } namespace SelectionTags { /** * An object used by the [`options`](#options) property that contains the attributes of the selection tag item. */ type Option = { /** * The value of the selection tag option. This is what you use in code and is what is stored in your collections. */ value: string; /** * The label of the selection tag option. This is what a site visitor sees. */ label: string; }; } /** * `SignatureInput` lets site visitors enter signatures. * [Read more](https://www.wix.com/corvid/reference/$w.SignatureInput.html#) */ interface SignatureInput extends $w.LabelMixin, $w.FormElement, $w.HiddenCollapsedMixin, $w.DisabledMixin, $w.FocusMixin, $w.StyleMixin, $w.RequiredMixin { /** * Gets an object containing information about the signature input element's styles. * [Read more](https://www.wix.com/corvid/reference/$w.SignatureInput.html#style) */ readonly style: $w.Style; /** * Gets the value of a signature input. * [Read more](https://www.wix.com/corvid/reference/$w.SignatureInput.html#value) */ readonly value: string; /** * Clears the signature. * [Read more](https://www.wix.com/corvid/reference/$w.SignatureInput.html#clear) */ clear(): void; /** * Adds an event handler that runs when a signature input element's value * is changed by a site visitor. * [Read more](https://www.wix.com/corvid/reference/$w.SignatureInput.html#onChange) */ onChange(handler: $w.EventHandler): $w.SignatureInput; } /** * Sliders allow users to select a number from a given range. * [Read more](https://www.wix.com/corvid/reference/$w.Slider.html#) */ interface Slider extends $w.Element, $w.ValueMixin, $w.DisabledMixin, $w.HiddenCollapsedMixin, $w.FocusMixin { /** * Sets or gets the slider's maximum value. * [Read more](https://www.wix.com/corvid/reference/$w.Slider.html#max) */ max: number; /** * Sets or gets the slider's minimum value. * [Read more](https://www.wix.com/corvid/reference/$w.Slider.html#min) */ min: number; /** * Sets or gets a slider's step value. * [Read more](https://www.wix.com/corvid/reference/$w.Slider.html#step) */ step: number; /** * Sets or gets a slider's step type. * [Read more](https://www.wix.com/corvid/reference/$w.Slider.html#stepType) */ stepType: string; /** * Sets or gets the value of the slider. * [Read more](https://www.wix.com/corvid/reference/$w.Slider.html#value) */ value: number; } /** * Switches are used for a single binary choice. * [Read more](https://www.wix.com/corvid/reference/$w.Switch.html#) */ interface Switch extends $w.Element, $w.DisabledMixin, $w.HiddenCollapsedMixin, $w.FocusMixin, $w.ClickableMixin, $w.ValueMixin, $w.CheckedMixin { /** * Sets or gets whether a switch is on or off. * [Read more](https://www.wix.com/corvid/reference/$w.Switch.html#checked) */ checked: boolean; /** * **Note: This standard element property is not relevant for Switch. Use [`checked`](#checked) instead.** * [Read more](https://www.wix.com/corvid/reference/$w.Switch.html#value) */ readonly value: string; } /** * An input element for capturing the time of day. * [Read more](https://www.wix.com/corvid/reference/$w.TimePicker.html#) */ interface TimePicker extends $w.LabelMixin, $w.FocusMixin, $w.DisabledMixin, $w.HiddenCollapsedMixin, $w.RequiredMixin, $w.ReadOnlyMixin, $w.FormElement { /** * Sets or gets the time slots that are available for a time picker. * [Read more](https://www.wix.com/corvid/reference/$w.TimePicker.html#enabledTimes) */ enabledTimes: $w.TimePicker.TimeSlot[]; /** * Sets or gets the number of minutes the time picker steps. * [Read more](https://www.wix.com/corvid/reference/$w.TimePicker.html#step) */ step: number; /** * Sets or gets whether the time picker uses 12-hour or 24-hour format. * [Read more](https://www.wix.com/corvid/reference/$w.TimePicker.html#useAmPmFormat) */ useAmPmFormat: boolean; /** * Sets or gets a time picker's value. * [Read more](https://www.wix.com/corvid/reference/$w.TimePicker.html#value) */ value: string; } namespace TimePicker { /** * An object representing an available time slot for a time picker. */ type TimeSlot = { /** * Start time for the time slot. The `startTime` must be earlier than the `endTime`, and * be in one of the following formats: * + `HH:MM` (hours and minutes) * + `HH:MM:SS` (hours, minutes, and seconds) * + `HH:MM:SS.mmm` (hours, minutes, seconds, and milliseconds) * * `HH` is a 2-digit value between 0-23. * * `MM` is a 2-digit value between 0-59. * * `SS` is a 2-digit value between 0-59. Seconds are rounded down to the nearest minute. * * `mmm` is a 3-digit value between 0-999. Milliseconds are rounded down to the nearest second. * * * The time picker's first input time option is the `startTime`. * This means that if the `startTime` is '10:00', the first input time option is '10:00'. */ startTime: string; /** * End time for the time slot. The `endTime` must be later than the `startTime`, and * be in one of the following formats: * + `HH:MM` (hours and minutes) * + `HH:MM:SS` (hours, minutes, and seconds) * + `HH:MM:SS.mmm` (hours, minutes, seconds, and milliseconds) * * `HH` is a 2-digit value between 0-23. * > Note that '24:00' is a valid `endTime` in order for '23:59' to be an input time option. * * `MM` is a 2-digit value between 0-59. * * `SS` is a 2-digit value between 0-59. Seconds are rounded down to the nearest minute. * * `mmm` is a 3-digit value between 0-999. Milliseconds are rounded down to the nearest second. * * * The `endTime` is not included in the time picker's input time options. This means that if the `endTime` * is '11:00', the time picker's last input time option (assuming [`step`](#step) is '1'), is '10:59'. */ endTime: string; }; } /** * An element for presenting videos. * [Read more](https://www.wix.com/corvid/reference/$w.VideoPlayer.html#) */ interface VideoPlayer extends $w.Element, $w.HiddenCollapsedMixin { /** * Gets the current play time from the beginning of the current video, in seconds. * [Read more](https://www.wix.com/corvid/reference/$w.VideoPlayer.html#currentTime) */ readonly currentTime: number; /** * Sets or gets the description of a video. * > **Notes:** * > - Setting a video description only works when a video player is presenting a * > video uploaded to your site. * > - Getting a video description does not work when a video player is presenting a * > video from Facebook, Twitch, or YouTube. * [Read more](https://www.wix.com/corvid/reference/$w.VideoPlayer.html#description) */ description: string; /** * Gets the total play time of the current video, in seconds. * [Read more](https://www.wix.com/corvid/reference/$w.VideoPlayer.html#duration) */ readonly duration: number; /** * Indicates if the volume is currently muted. * [Read more](https://www.wix.com/corvid/reference/$w.VideoPlayer.html#isMuted) */ readonly isMuted: boolean; /** * Indicates if a video is currently playing. * [Read more](https://www.wix.com/corvid/reference/$w.VideoPlayer.html#isPlaying) */ readonly isPlaying: boolean; /** * Sets or gets the image shown in the video player before the video is played. * [Read more](https://www.wix.com/corvid/reference/$w.VideoPlayer.html#poster) */ poster: string; /** * Sets or gets the file location of the current video. * [Read more](https://www.wix.com/corvid/reference/$w.VideoPlayer.html#src) */ src: string; /** * Sets or gets the title displayed in a video player. * > **Notes:** * > - Setting a video title only works when a video player is presenting a * > video uploaded to your site. * > - Getting a video title does not work when a video player is presenting a * > video from Facebook, Twitch, or YouTube. * [Read more](https://www.wix.com/corvid/reference/$w.VideoPlayer.html#title) */ title: string; /** * Sets or gets the video player volume. * [Read more](https://www.wix.com/corvid/reference/$w.VideoPlayer.html#volume) */ volume: number; /** * Mutes video volume. * [Read more](https://www.wix.com/corvid/reference/$w.VideoPlayer.html#mute) */ mute(): Promise; /** * Adds an event handler that runs when playback has ended. * [Read more](https://www.wix.com/corvid/reference/$w.VideoPlayer.html#onEnded) * @eventType onEnded */ onEnded(handler: $w.EventHandler): $w.VideoPlayer; /** * Adds an event handler that runs when playback is paused. * [Read more](https://www.wix.com/corvid/reference/$w.VideoPlayer.html#onPause) * @eventType onPause */ onPause(handler: $w.EventHandler): $w.VideoPlayer; /** * Adds an event handler that runs when playback is started or restarted. * [Read more](https://www.wix.com/corvid/reference/$w.VideoPlayer.html#onPlay) * @eventType onPlay */ onPlay(handler: $w.EventHandler): $w.VideoPlayer; /** * Adds an event handler that runs when playback progresses. * [Read more](https://www.wix.com/corvid/reference/$w.VideoPlayer.html#onProgress) * @eventType onProgress */ onProgress(handler: $w.EventHandler): $w.VideoPlayer; /** * Pauses playback. * [Read more](https://www.wix.com/corvid/reference/$w.VideoPlayer.html#pause) */ pause(): Promise; /** * Begins or resumes playback. * [Read more](https://www.wix.com/corvid/reference/$w.VideoPlayer.html#play) */ play(): Promise; /** * Moves playback to the specified time, in seconds. * [Read more](https://www.wix.com/corvid/reference/$w.VideoPlayer.html#seek) */ seek(time: number): Promise; /** * Pauses playback. * [Read more](https://www.wix.com/corvid/reference/$w.VideoPlayer.html#stop) */ stop(): Promise; /** * Toggles playback. * [Read more](https://www.wix.com/corvid/reference/$w.VideoPlayer.html#togglePlay) */ togglePlay(): Promise; /** * Unmutes video volume. * [Read more](https://www.wix.com/corvid/reference/$w.VideoPlayer.html#unmute) */ unmute(): Promise; } /** * An icon that leads users to the shopping cart. * [Read more](https://www.wix.com/corvid/reference/$w.CartIcon.html#) */ interface CartIcon extends $w.Element, $w.HiddenCollapsedMixin { /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-stores.cart.addProducts()](https://www.wix.com/velo/reference/wix-stores/cart/addproducts). * [Read more](https://www.wix.com/corvid/reference/$w.CartIcon.html#addProductsToCart) */ addProductsToCart(products: $w.CartIcon.AddToCartItem[]): Promise; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-stores.cart.addProducts()](https://www.wix.com/velo/reference/wix-stores/cart/addproducts). * [Read more](https://www.wix.com/corvid/reference/$w.CartIcon.html#addToCart) */ addToCart(productID: string, quantity?: number, options?: $w.CartIcon.AddToCartOptions): Promise; } namespace CartIcon { /** * An object used to pass a custom text field when adding a product to * the shopping cart with options. */ type AddToCartCustomTextField = { /** * Custom text field title. */ title: string; /** * Custom text field value. */ value: string; }; /** * An object used when adding multiple products to the shopping cart. */ type AddToCartItem = { /** * The ID of the product to add to the cart. */ productId: string; /** * The number of product units to add to the cart. */ quantity: number; /** * Specific product options to add to the cart. */ options?: $w.CartIcon.AddToCartOptions; }; /** * An object used when adding a product to the shopping cart with options. */ type AddToCartOptions = { /** * Product options to use when adding the product to the cart. * The object contains key:value pairs where the key is the option name and the value is the chosen option value. */ choices: any; /** * Custom text fields to use when adding the product to the cart. */ customTextFields: $w.CartIcon.AddToCartCustomTextField[]; }; } /** * A store page for a specific product. * [Read more](https://www.wix.com/corvid/reference/$w.ProductPage.html#) */ interface ProductPage extends $w.Element, $w.HiddenCollapsedMixin { /** * Gets all the information associated with the current product. * [Read more](https://www.wix.com/corvid/reference/$w.ProductPage.html#getProduct) */ getProduct(): Promise<$w.ProductPage.Product>; } namespace ProductPage { /** * An object representing a media item. */ type MediaItem = { /** * Media item ID. */ id: string; /** * Media item title. */ title: string; /** * Media item description. Descriptions over 100 characters are truncated. */ description: string; /** * Media item type. Can be "image" or "video." */ type: string; /** * Media item source URL. */ src: string; /** * Thumbnail URL for videos only. */ thumbnail?: string; }; /** * An object representing a product in a store. */ type Product = { /** * Product ID. */ _id: string; /** * Date and time the product was last updated. */ _updatedDate: Date; /** * Product name. */ name: string; /** * Product description. */ description: string; /** * Main product media item (image or video thumbnail) URL. */ mainMedia: string; /** * List of product media items. */ mediaItems: $w.ProductPage.MediaItem; /** * Product stock keeping unit value. Must be unique. */ sku: string; /** * Deprecated. Use `ribbon` instead. */ ribbons: $w.ProductPage.ProductRibbon[]; /** * Product currency. */ currency: string; /** * Product price. * The price must be greater than its discount. * The product price is propagated to the product's newly-created variants. Product variants whose prices have been updated directly are not affected by the changes to the product price. */ price: number; /** * Discounted product price. */ discountedPrice: number; /** * Product price formatted with the currency. */ formattedPrice: string; /** * Discounted product price formatted with the currency. */ formattedDiscountedPrice: string; /** * ID for the inventory item. */ inventoryItemId: string; /** * Product discount. */ discount: $w.ProductPage.ProductDiscount; /** * Indicates whether inventory is tracked for the product. */ trackInventory: boolean; /** * Indicates whether the product is in stock. */ inStock: boolean; /** * Number of units currently in stock. */ quantityInStock: number; /** * Additional product information sections. */ additionalInfoSections: $w.ProductPage.ProductAdditionalInfoSection[]; /** * All the available options for a store product. */ productOptions: $w.ProductPage.ProductOptions; /** * Product page relative URL. */ productPageUrl: string; /** * Indicates whether product variants are managed. Can be set to true only if the product has options. Once set to true, `manageVariants` can only be reset to false only if no variants exist. Use [`getProductVariants()`](https://www.wix.com/velo/reference/wix-stores.html#getProductVariants) to check if variants exist. You cannot set `manageVariants` to true if more than 300 variants are defined. */ manageVariants: boolean; /** * List of product customization fields. */ customTextFields: $w.ProductPage.ProductCustomTextFields[]; /** * Product type. Either `"physical"` or `"digital"`. When creating a product using the API, currently only `"physical"` is supported. */ productType: string; /** * Product slug. */ slug: string; /** * Product weight. */ weight: number; /** * Product variants. */ variants: $w.ProductPage.VariantItem[]; /** * Price per unit. */ pricePerUnit: number; /** * Price per unit formatted with currency symbol. */ formattedPricePerUnit: string; /** * Details of the product's price per unit. */ pricePerUnitData: $w.ProductPage.pricePerUnitData; /** * Custom SEO data for the product. Learn more [about SEO](https://support.wix.com/en/search?term=seo). */ seoData: $w.ProductPage.SeoData; /** * Product ribbon. Used to highlight relevant information about a product. For example, `"Sale"`, `"New Arrival"`, `"Sold Out"`. */ ribbon: string; }; /** * An object representing an additional info section for a store product. */ type ProductAdditionalInfoSection = { /** * Section title. */ title: string; /** * Section description. */ description: string; }; /** * An object representing a product variant's option choices. */ type ProductChoices = { /** * Value of the choice. This key name is dependent on the * product option. For example, if a product has a size option, this * key value will be something like `"Size"` and its value will be something like * `"Large"`. * * `optionKey` is not case-sensitive. Therefore the values for the option keys "`Size`", "`SIZE`", and "`size`" are combined. */ optionKey: string; }; /** * An object representing a custom text field for a store product. */ type ProductCustomTextFields = { /** * Product customization field title. */ title: string; /** * Maximum length of product customization field in characters. */ maxLength: string; }; /** * An object representing a product discount. */ type ProductDiscount = { /** * Discount type. Required. * * One of: * * * * - `"AMOUNT"` * - `"PERCENT"` * - `"NONE"` */ type: string; /** * Discount value. The discount value cannot be greater than the price of the product or the variant. */ value: string; }; /** * An object representing an option for a store product. */ type ProductOption = { /** * Option type. Either `"color"` or `"drop_down"`. */ optionType: string; /** * Option name. */ name: string; /** * Option choices. */ choices: $w.ProductPage.ProductOptionsChoice[]; }; /** * An object representing all the available options for a store product, such as "Size" and "Color." */ type ProductOptions = { /** * Name of the option. This key name *  is dependent on the options added to the product. For example, if a product has a size * option, this key will be something like `"Size"`. * * `optionKey` is not case-sensitive. Therefore the values for the option keys "`Size`", "`SIZE`", and "`size`" are combined. */ optionKey: $w.ProductPage.ProductOption; }; /** * An object representing an option's choice for a store product, such as choice "Small" for the option "Size." */ type ProductOptionsChoice = { /** * Choice value. */ value: number; /** * Choice description. */ description: number; /** * Choice media. */ media: $w.ProductPage.ProductOptionsChoiceMedia; /** * Indicates whether the product with this choice is in stock. */ inStock: boolean; /** * Indicates whether the product with this option is visible. */ visible: boolean; }; /** * An object representing the choice media. */ type ProductOptionsChoiceMedia = { /** * Main choice media item (image or video thumbnail) URL. */ mainMedia: string; /** * List of choice media items. */ mediaItems: $w.ProductPage.MediaItem; }; /** * An object representing a ribbon for a store product. */ type ProductRibbon = { /** * Ribbon text. */ text: string; }; /** * An object representing custom SEO data for the product. */ type SeoData = { /** * SEO tag details. */ tags: $w.ProductPage.SeoTag[]; }; /** * An object representing the product's custom SEO tags. */ type SeoTag = { /** * SEO tag type. * Supported values: * * + `"title"` * + `"meta"` * + `"script"` * + `"link"` */ type: string; /** * The props property holds an object of `{"key": "value"}` pairs where the key is one of the SEO tag's properties (name, content, rel, href, etc.) * and the value is the value for that property. `{"name": "description", "content": "The description itself."}`. */ props: object; /** * Tag metadata. For example, `{"height": 300, "width": 240}`. */ meta: object; /** * Tag inner content. For example, ` inner content `. */ children: string; /** * Whether the tag is a custom tag. */ custom: boolean; /** * Whether the tag is disabled. */ disabled: boolean; }; /** * An object representing variant information to use when creating or updating variants. */ type VariantInfo = { /** * Variant currency. */ currency: string; /** * Variant price. The variant price must be greater than its discount. If the variant price has been updated, changes to the product price do not affect the variant price. */ price: number; /** * Discounted variant price. */ discountedPrice: number; /** * Variant price formatted with the currency. */ formattedPrice: string; /** * Discounted variant price formatted with the currency. */ formattedDiscountedPrice: string; /** * Variant weight. */ weight: number; /** * Variant stock keeping unit value. */ sku: string; /** * Whether the variant is visible in the store. */ visible: boolean; /** * Price per unit. */ pricePerUnit: number; /** * Price per unit formatted with currency symbol. */ formattedPricePerUnit: string; }; /** * An object representing a product variant item. */ type VariantItem = { /** * Unique variant ID. */ _id: string; /** * The choices of the retrieved variant. */ choices: $w.ProductPage.ProductChoices; /** * Variant information. */ variant: $w.ProductPage.VariantInfo; }; /** * An object representing a product's price per unit data. */ type pricePerUnitData = { /** * Product’s total weight, volume, or area. For example, if your product weighs 1 kilogram, the `totalQuantity` is `1`. */ totalQuantity: number; /** * Total measurement unit of weight, volume, or area. For example, if your product weighs 1 kilogram, the `totalMeasurementUnit` is `"KG"`. * * Supported values: * `"ML"`, `"CL"`, `"L"`, `"CBM"`, `"MG"`, `"G"`, `"KG"`, `"MM"`, `"CM"`, `"M"`, `"SQM"`, `"OZ"`, `"LB"`, `"FLOZ"`, `"PT"`, `"QT"`, `"GAL"`, `"IN"`, `"FT"`, `"YD"`, `"SQFT"`. */ totalMeasurementUnit: string; /** * Product’s base weight, volume, or area. For example, for a product weighing 1 kilogram, the `baseQuantity` could be `100` (grams). */ baseQuantity: number; /** * Base measurement unit of weight, volume, or area. For example, if your product weighs 1 kilogram, and the `baseQuantity` is `100` grams, `baseMeasurementUnit` is `"G"`. * * Supported values: * `"ML"`, `"CL"`, `"L"`, `"CBM"`, `"MG"`, `"G"`, `"KG"`, `"MM"`, `"CM"`, `"M"`, `"SQM"`, `"OZ"`, `"LB"`, `"FLOZ"`, `"PT"`, `"QT"`, `"GAL"`, `"IN"`, `"FT"`, `"YD"`, `"SQFT"`. */ baseMeasurementUnit: string; }; } /** * A thank you page displayed when an order is created. * [Read more](https://www.wix.com/corvid/reference/$w.ThankYouPage.html#) */ interface ThankYouPage extends $w.Element, $w.HiddenCollapsedMixin { /** * Gets the order associated with the current page. * [Read more](https://www.wix.com/corvid/reference/$w.ThankYouPage.html#getOrder) */ getOrder(): Promise<$w.ThankYouPage.Order>; } namespace ThankYouPage { /** * An object representing address information. */ type Address = { /** * Address in readable format. */ formatted: string; /** * City. */ city?: string; /** * Country. */ country?: string; /** * Main address information. */ addressLine?: string; /** * Additional address information (apt, floor, etc.). */ addressLine2?: string; /** * Alternative property for street name and number. */ streetAddress?: $w.ThankYouPage.StreetAddress; /** * Postal/zip code. */ postalCode?: string; /** * Subdivision of a country, such as a state or province. */ subdivision?: string; }; /** * An object representing a coupon applied to the order. */ type AppliedCoupon = { /** * Coupon ID. */ couponId: string; /** * Coupon name. */ name: string; /** * Coupon code. */ code: string; }; /** * An object representing an order's billing info. */ type BillingInfo = { /** * Billing address. */ address?: $w.ThankYouPage.Address; /** * Last name. */ lastName?: string; /** * First name. */ firstName?: string; /** * Email address. */ email?: string; /** * Phone number. */ phone?: string; /** * Company name. */ company?: string; /** * VAT information. */ vatId?: $w.ThankYouPage.VatId; }; /** * An object representing information about the buyer. */ type BuyerInfo = { /** * Unique buyer's ID. */ id: string; /** * Buyer's email address. */ email: string; /** * Buyer's first name. */ firstName: string; /** * Buyer's last name. */ lastName: string; /** * Buyer's identity. * One of: * * * - `"MEMBER"`: A logged-in site member. * - `"CONTACT"`: A Wix contact. */ identityType: string; /** * Buyer's phone number. */ phone?: string; }; /** * An object representing information about the sales channel that submitted this order. */ type ChannelInfo = { /** * Order ID from an external system (e.g., eBay or Amazon). */ externalOrderId?: string; /** * URL to the order in the external system (e.g., eBay or Amazon). */ externalOrderUrl?: string; /** * Sales channel that submitted the order. * One of: * * * + `"WEB"`: Wix online store. * + `"POS"`: Point of sale. * + `"EBAY"`: eBay. * + `"OTHER_PLATFORM"`: Order imported from another system (e.g., Cart2Cart). * + `"WIX_APP_STORE"`: Order created via the Wix mobile app. */ type: string; }; /** * An object representing a custom field added by the customer during the checkout process. */ type CustomField = { /** * Custom field's title. */ title: string; /** * Title translated into the buyer's language. */ translatedTitle: string; /** * Custom field's text. */ value: string; }; /** * An object representing a custom text field. */ type CustomTextField = { /** * Field title. */ title: string; /** * Field value. */ value: string; }; /** * An object representing a discount applied to the order. */ type Discount = { appliedCoupon: $w.ThankYouPage.AppliedCoupon; }; /** * An object representing information about the identity of the order initiator. * Occasionally, the person that completes the order isn't the buyer. For example, this occurs when an order is created using a point of sale terminal. */ type EnteredBy = { id: string; /** * Order was created by one of the following: * * * + `"USER"`: Wix user who performed a POS transaction on behalf of the buyer. * + `"MEMBER"`: Logged-in site member. * + `"CONTACT"`: A Wix contact. */ identityType: string; }; /** * An object representing an line item's price information. */ type LineItemPriceData = { /** * Price of the item. */ price: number; /** * Total price charged to the customer (per line item) after calculation of quantity and discount. */ totalPrice: number; /** * Whether the price includes tax. */ taxIncludedInPrice: boolean; }; /** * An object representing a line item's primary media item. */ type MediaItem = { /** * Image description for accessibility purposes. */ altText?: string; /** * Unique media item ID. */ id: string; /** * Media item external URL. */ externalImageUrl?: string; /** * Media item source URL for media uploaded to Wix. */ src: string; /** * Media item width. * One of: * * * - `"IMAGE"`: Image item. * - `"UNSPECIFIED_MEDIA_TYPE_ITEM"`: Media item type can't be classified due to an error. */ type: string; }; /** * An object representing a line item option. */ type Option = { /** * Name of the product option. */ option: string; /** * Selected option. */ selection: string; }; /** * An object representing an order. */ type Order = { /** * Unique order ID. */ _id: string; /** * Date and time the order was updated. */ _updatedDate: Date; /** * The site's displayed language. */ buyerLanguage: string; /** * The shopping cart's unique ID. */ cartId?: string; /** * Channel information. */ channelInfo: $w.ThankYouPage.ChannelInfo; /** * Identity of the order's operator. */ enteredBy: $w.ThankYouPage.EnteredBy; /** * Billing information. */ billingInfo?: $w.ThankYouPage.BillingInfo; /** * Buyer information. */ buyerInfo: $w.ThankYouPage.BuyerInfo; /** * A note added by the buyer. */ buyerNote?: string; /** * Date and time the order was created. */ _dateCreated: Date; /** * Order currency. */ currency: string; /** * Running order number. */ number: number; /** * Shipping information. */ shippingInfo?: $w.ThankYouPage.OrderShippingInfo; /** * Order items. */ lineItems: $w.ThankYouPage.OrderLineItem[]; /** * Order totals. */ totals: $w.ThankYouPage.Totals; /** * The unit in which the order's weight is measured. Either `"KG"` or `"LB"`. */ weightUnit: string; /** * Information about a custom field. */ customField?: $w.ThankYouPage.CustomField; /** * Discount information. */ discount?: $w.ThankYouPage.Discount; }; /** * An object representing a line item in an order. */ type OrderLineItem = { /** * Custom text. */ customTextFields?: $w.ThankYouPage.CustomTextField[]; /** * Line item product ID. */ productId?: string; /** * Type of the line item. * One of: * * * - `"DIGITAL"`: Digital item. * - `"PHYSICAL"`: Physical item. * - `"CUSTOM_AMOUNT_ITEM"`: Item with a custom price. */ lineItemType?: string; /** * Information about the line item's primary media item. */ mediaItem: $w.ThankYouPage.MediaItem; /** * Name of the line item. */ name: string; /** * Notes about the line item. */ notes?: string; /** * Line item options. */ options: $w.ThankYouPage.Option[]; /** * Deprecated: see priceData. */ price: number; /** * Line item quantity. */ quantity: number; /** * Line item stock keeping unit. */ sku: string; /** * Deprecated: see priceData. */ totalPrice: number; /** * Line item weight. */ weight: number; /** * Line item index. */ index: number; /** * Line item's name, translated into the customer's language. */ translatedName: string; /** * Line item's discount amount. */ discount?: number; /** * Line item's total amount of tax applied. */ tax?: number; /** * Price information. */ priceData?: $w.ThankYouPage.LineItemPriceData; /** * Tax group ID. */ taxGroupId?: string; /** * Line item's fulfiller ID. */ fulfillerId: string; /** * Line item's variant ID. */ variantId: string; }; /** * An object representing an order's shipping information. */ type OrderShippingInfo = { /** * Expected date of delivery. */ deliverByDate?: Date; /** * Delivery option name. */ deliveryOption: string; /** * Estimated time until delivery. */ estimatedDeliveryTime?: string; /** * Shipment details (empty if order was designated for pickup). */ shipmentDetails?: $w.ThankYouPage.ShipmentDetails; /** * Pickup details (empty if order was designated for delivery). */ pickupDetails?: $w.ThankYouPage.PickupDetails; /** * Shipping region. */ shippingRegion?: string; }; /** * An object representing an order's pickup details. */ type PickupDetails = { /** * Pickup instructions. */ pickupInstructions?: string; /** * Pickup address. */ pickupAddress?: $w.ThankYouPage.Address; /** * First name. */ firstName?: string; /** * Last name. */ lastName?: string; /** * Email address. */ email?: string; /** * Phone number. */ phone?: string; }; /** * An object representing an order's shipping details. */ type ShipmentDetails = { /** * Shipping address. */ address?: $w.ThankYouPage.Address; /** * Last name. */ lastName?: string; /** * First name. */ firstName?: string; /** * Email address. */ email?: string; /** * Phone number. */ phone?: string; /** * Company name. */ company?: string; /** * VAT information. */ vatId?: $w.ThankYouPage.VatId; /** * Deprecated: see priceData. */ tax?: number; /** * Deprecated: see priceData. */ discount?: number; /** * Shipment price information. */ priceData?: $w.ThankYouPage.ShipmentPriceData; }; /** * An object representing shipment price information. */ type ShipmentPriceData = { /** * Price of the item. */ price: number; /** * Whether the price includes tax. */ taxIncludedInPrice: boolean; }; /** * An object representing information about the street name and street number of an address. */ type StreetAddress = { /** * Address street name. */ name: string; /** * Address street number. */ number: string; }; type SubscriptionInfo = { /** * ID of the current subscription's cycle. */ id: string; /** * Current cycle number. For example, if the subscription is in the 3rd month of a 4-month subscription, the value will be `3`. */ cycleNumber: number; /** * Subscription settings. */ subscriptionSettings: $w.ThankYouPage.SubscriptionSettings; /** * Subscription option information. */ subscriptionOptionInfo: $w.ThankYouPage.SubscriptionOptionInfo; }; type SubscriptionOptionInfo = { /** * Subscription option ID. */ id: string; /** * Subscription option title. For example, "Coffee of the week". */ title: string; /** * Subscription option description. For example, "Subscribe and get 15% off". */ description: string; }; type SubscriptionSettings = { /** * Frequency of recurring payment. * Supported values: * * + `"DAY"` * + `"WEEK"` * + `"MONTH"` * + `"YEAR"` */ frequency: string; /** * Whether subscription is renewed automatically at the end of each period. */ autoRenewal: boolean; /** * Number of billing cycles before subscription ends. Ignored if `autoRenewal: false`. */ billingCycles: number; }; /** * An object representing an order's totals. */ type Totals = { /** * Total calculated discount amount. */ discount?: number; /** * Total quantity of the the order's line items. */ quantity: number; /** * Total shipping price, including tax. */ shipping?: number; /** * Subtotal of all the order's line items, excluding tax. */ subtotal: number; /** * Total amount of tax. */ tax?: number; /** * Total price. */ total: number; /** * Total weight of the order's items. */ weight: number; }; /** * An object representing value added tax (VAT) information. */ type VatId = { /** * VAT number. */ number: string; /** * VAT type. Either `"CPF"` or `"CNPJ"`. */ type: string; }; } type dataset = wix_dataset.Dataset; type router_dataset = wix_dataset.DynamicDataset; } declare namespace wix_dataset { /** * A [dataset](wix-dataset.html) connects page elements to a set of items in a data collection. * [Read more](https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#) */ interface Dataset { /** * Adds a new blank item. * [Read more](https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#add) */ add(): Promise; /** * Returns the current item. * [Read more](https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#getCurrentItem) */ getCurrentItem(): any; /** * Returns the current item's index. * [Read more](https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#getCurrentItemIndex) */ getCurrentItemIndex(): number; /** * Gets the index of the dataset's current page. * [Read more](https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#getCurrentPageIndex) */ getCurrentPageIndex(): number; /** * Returns the selected items. * [Read more](https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#getItems) */ getItems(fromIndex: number, numberOfItems: number): Promise; /** * Gets the dataset's page size. * [Read more](https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#getPageSize) */ getPageSize(): number; /** * Returns the number of items in the dataset that match its filter criteria. * [Read more](https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#getTotalCount) */ getTotalCount(): number; /** * Gets the number of pages in the dataset. * [Read more](https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#getTotalPageCount) */ getTotalPageCount(): number; /** * Indicates if there is a next item. * [Read more](https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#hasNext) */ hasNext(): boolean; /** * Indicates if there is a next page of data. * [Read more](https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#hasNextPage) */ hasNextPage(): boolean; /** * Indicates if there is a previous item. * [Read more](https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#hasPrevious) */ hasPrevious(): boolean; /** * Indicates if there is a previous page of data. * [Read more](https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#hasPreviousPage) */ hasPreviousPage(): boolean; /** * Loads the next page of data in addition to the current data. * [Read more](https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#loadMore) */ loadMore(): Promise; /** * Loads the specified page. * [Read more](https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#loadPage) */ loadPage(pageIndex: number): Promise; /** * **Deprecated.** * This function will continue to work, but a newer version is available. Use the * [`add()`](https://www.wix.com/velo/reference/wix-dataset/dataset/add) function instead. * [Read more](https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#new) */ new (): Promise; /** * Saves the current item and moves to the next item. * [Read more](https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#next) */ next(): Promise; /** * Moves to the next page of data. * [Read more](https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#nextPage) */ nextPage(): Promise; /** * Adds an event handler that runs just after a save. * [Read more](https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#onAfterSave) * @eventType afterSave */ onAfterSave(handler: wix_dataset.Dataset.AfterSaveHandler): void; /** * Adds an event handler that runs just before a save. * [Read more](https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#onBeforeSave) */ onBeforeSave(handler: wix_dataset.Dataset.BeforeSaveHandler): void; /** * Adds an event handler that runs when the current index changes. * [Read more](https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#onCurrentIndexChanged) * @eventType currentIndexChanged */ onCurrentIndexChanged(handler: wix_dataset.Dataset.CurrentIndexChangedHandler): void; /** * Adds an event handler that runs when an error occurs. * [Read more](https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#onError) * @eventType datasetError */ onError(handler: wix_dataset.Dataset.ErrorHandler): void; /** * Adds an event handler that runs when a value of the current item changes. * [Read more](https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#onItemValuesChanged) * @eventType itemValuesChanged */ onItemValuesChanged(handler: wix_dataset.Dataset.ItemValuesChangedHandler): void; /** * Adds an event handler that runs when the dataset is ready. * [Read more](https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#onReady) * @eventType datasetReady */ onReady(handler: wix_dataset.Dataset.ReadyHandler): void; /** * The `onReadyAsync()` function returns a Promise that resolves when a dataset is ready. * [Read more](https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#onReadyAsync) */ onReadyAsync(): Promise; /** * Saves the current item and moves to the previous item. * [Read more](https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#previous) */ previous(): Promise; /** * Moves to the previous page of data. * [Read more](https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#previousPage) */ previousPage(): Promise; /** * Refetches the contents of the dataset from the collection. * [Read more](https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#refresh) */ refresh(): Promise; /** * Removes the current item. * [Read more](https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#remove) */ remove(): Promise; /** * Reverts the current item to its saved value. * [Read more](https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#revert) */ revert(): Promise; /** * Saves the current item. * [Read more](https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#save) */ save(): Promise; /** * Sets the current item by index. * [Read more](https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#setCurrentItemIndex) */ setCurrentItemIndex(index: number): Promise; /** * Updates the value of a field in the current item. * [Read more](https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#setFieldValue) */ setFieldValue(fieldKey: string, value: any): void; /** * Updates the values of a set of fields in the current item. * [Read more](https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#setFieldValues) */ setFieldValues(fieldValues: any): void; /** * Sets the dataset filter. * [Read more](https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#setFilter) */ setFilter(filter: wix_data.WixDataFilter): Promise; /** * Sets the dataset's page size. * [Read more](https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#setPageSize) */ setPageSize(pageSize: number): Promise; /** * Sets the dataset sort order. * [Read more](https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#setSort) */ setSort(sort: wix_data.WixDataSort): Promise; } namespace Dataset { /** * An object representing a dataset error. */ type DatasetError = { /** * Error code. */ code: string; /** * Error message. */ message: string; }; /** * An object used by the `getItems()` function that contains the items retrieved and the total number of items in the dataset that match its filter criteria */ type GetItemsResult = { /** * List of items objects where key:value pairs are the field keys and field values of the retrieved items, including all hidden fields. */ items: any[]; /** * The number of items in the dataset that match its filter criteria. */ totalCount: number; /** * The index in the dataset of the first item in the items property. */ offset: number; }; /** * An after save event handler. */ type AfterSaveHandler = (itemBeforeSave: any, itemAfterSave: any) => void; /** * A before save event handler. */ type BeforeSaveHandler = () => Promise | boolean; /** * A current item index change event handler. */ type CurrentIndexChangedHandler = (index: number) => void; /** * An error event handler. */ type ErrorHandler = (operation: string, error: wix_dataset.Dataset.DatasetError) => void; /** * A current item value change event handler. */ type ItemValuesChangedHandler = (itemBeforeChange: any, updatedItem: any) => void; /** * A dataset ready event handler. */ type ReadyHandler = () => void; } /** * A [dataset](wix-dataset.html) connects page elements on a dynamic page to a set of items in a data collection. * * >**Note:** It is not possible to connect page elements on a dynamic page to an item in a [single item collection](https://support.wix.com/en/article/about-collections-with-a-single-item). * [Read more](https://www.wix.com/corvid/reference/wix-dataset.DynamicDataset.html#) */ interface DynamicDataset extends wix_dataset.Dataset { /** * Gets the next dynamic page URL. * [Read more](https://www.wix.com/corvid/reference/wix-dataset.DynamicDataset.html#getNextDynamicPage) */ getNextDynamicPage(): Promise; /** * Gets the previous dynamic page URL. * [Read more](https://www.wix.com/corvid/reference/wix-dataset.DynamicDataset.html#getPreviousDynamicPage) */ getPreviousDynamicPage(): Promise; } } declare namespace site_monitoring { /** * A single record of a Wix site event in JSON format. * [Read more](https://www.wix.com/corvid/reference/site-monitoring.LogEntry.html#) */ interface LogEntry { /** * Unique identifier for the log entry. * [Read more](https://www.wix.com/corvid/reference/site-monitoring.LogEntry.html#insertId) */ readonly insertId: string; /** * Payload of the log entry in JSON format. * [Read more](https://www.wix.com/corvid/reference/site-monitoring.LogEntry.html#jsonPayload) */ readonly jsonPayload: site_monitoring.LogEntry.LogEntryJsonPayload; /** * Additional information about the log entry. * [Read more](https://www.wix.com/corvid/reference/site-monitoring.LogEntry.html#labels) */ readonly labels: site_monitoring.LogEntry.LogEntryLabels; /** * Additional information about a potentially long-running operation associated with the log entry. * [Read more](https://www.wix.com/corvid/reference/site-monitoring.LogEntry.html#operation) */ readonly operation: site_monitoring.LogEntry.LogEntryOperation; /** * Time the log entry was received by site monitoring. * [Read more](https://www.wix.com/corvid/reference/site-monitoring.LogEntry.html#receiveTimestamp) */ readonly receiveTimestamp: string; /** * Severity of the log entry. * [Read more](https://www.wix.com/corvid/reference/site-monitoring.LogEntry.html#severity) */ readonly severity: string; /** * Source code location information associated with the log entry. * [Read more](https://www.wix.com/corvid/reference/site-monitoring.LogEntry.html#sourceLocation) */ readonly sourceLocation: site_monitoring.LogEntry.LogEntrySourceLocation; /** * Time the site event occurred. * [Read more](https://www.wix.com/corvid/reference/site-monitoring.LogEntry.html#timestamp) */ readonly timestamp: string; } namespace LogEntry { /** * Payload of the log entry in JSON format. */ type LogEntryJsonPayload = { /** * Payload message. */ message: string; }; /** * Additional information about the log entry. */ type LogEntryLabels = { /** * [`baseUrl`](https://www.wix.com/velo/reference/wix-location.html#baseUrl) of the site with which the log entry is associated. */ siteUrl: string; /** * Name of Wix application with which the log entry is associated, such as Stores or Bookings. The generic namespace `Corvid` represents site code not associated with a specific Wix application. Currently only the `Corvid` namespace is supported. */ namespace: string; /** * Unique identifier for the site. Does not change even if the site name or other site attributes change. */ tenantId: string; /** * Indicates the viewing mode from which the log entry originates. * One of the following: * * + `"Preview"`: Preview mode. * + `"Site"`: Published site mode. */ viewMode: string; /** * Unique identifier for a specific site [`revision`](https://www.wix.com/velo/reference/wix-site.html#revision). You can use the `revision` property together with the [Release Manager](https://support.wix.com/en/article/about-site-monitoring#site-revisions) to monitor and debug new revisions of your site. */ revision: string; }; /** * Additional information about a potentially long-running operation associated with the log entry. */ type LogEntryOperation = { /** * Unique identifier useful for linking together all log entries associated with a specific operation. */ id: string; /** * Context of the operation, such as a URL path for page code or a web module function name. */ producer: string; }; /** * Source code location information associated with the log entry. Currently only applicable for backend log entries with the `Corvid` namespace. */ type LogEntrySourceLocation = { /** * Name of the source file. */ file: string; /** * Line within the source file. 1-based. 0 indicates no line number available. */ line: number; }; } } declare namespace wix_location { /** * An object used to manage the query segment of the current page's URL. * [Read more](https://www.wix.com/corvid/reference/wix-location.QueryParams.html#) */ interface QueryParams { /** * Adds query parameters to the current page's URL. * [Read more](https://www.wix.com/corvid/reference/wix-location.QueryParams.html#add) */ add(toAdd: any): void; /** * Removes query parameters from the current page's URL. * [Read more](https://www.wix.com/corvid/reference/wix-location.QueryParams.html#remove) */ remove(toRemove: string[]): void; } /** * An object containing information about a location. */ type Location = { /** * Location path. */ path: string; }; /** * An object containing navigation and scrolling options. */ type NavOptions = { /** * Whether the page scrolls to the top when navigating to the specified URL for a Wix page. Defaults to `false`. When `true`, the page remains at the same Y-axis position as the previously-viewed page. This setting does not affect scrolling for external URLs. */ disableScrollToTop?: boolean; }; /** * Set of key-value pairs for query parameters and their values. */ type ParamsToAdd = { /** * Key value pair in the format `key:value`: * * + `key` Any query parameter name of type `string`. * + `:` A colon separating the `key` and the `value`. * + `value` Any query parameter value of type `string`. */ "key:value": string; }; /** * Set of key-value pairs for query parameters and their values. */ type QueryObject = { /** * Key value pair in the format `key:value`: * * + `key` Any query parameter name of type `string`. * + `:` A colon separating the `key` and the `value`. * + `value` Any query parameter value of type `string`. */ "key:value": string; }; /** * Set of key-value pairs for query parameters and their values. */ type QueryParamsToAdd = { /** * Key value pair in the format `key:value`: * * + `key` Any query parameter name of type `string`. * + `:` A colon separating the `key` and the `value`. * + `value` Any query parameter value of type `string`. */ "key:value": string; }; /** * An object containing navigation and scrolling options. */ type navigationParams = { /** * When navigating to the specified URL, do not scroll to the top. Instead, remain at the current position on the page. */ disableScrollToTop: boolean; }; /** * Handles location change events. */ type LocationChangeHandler = (event: wix_location.Location) => void; } declare namespace wix_site { /** * An object representing a single entry in a sitemap. * [Read more](https://www.wix.com/corvid/reference/wix-site.WixRouterSitemapEntry.html#) */ interface WixRouterSitemapEntry { /** * Gets how frequently the page is likely to change. * [Read more](https://www.wix.com/corvid/reference/wix-site.WixRouterSitemapEntry.html#changeFrequency) */ readonly changeFrequency: string; /** * Gets when the page data was last modified. * [Read more](https://www.wix.com/corvid/reference/wix-site.WixRouterSitemapEntry.html#lastModified) */ readonly lastModified: Date; /** * Gets the page name. * [Read more](https://www.wix.com/corvid/reference/wix-site.WixRouterSitemapEntry.html#pageName) */ readonly pageName: string; /** * Gets the priority of this URL relative to other URLs on your site. * [Read more](https://www.wix.com/corvid/reference/wix-site.WixRouterSitemapEntry.html#priority) */ readonly priority: number; /** * Gets the page title. * [Read more](https://www.wix.com/corvid/reference/wix-site.WixRouterSitemapEntry.html#title) */ readonly title: string; /** * Gets the relative url of the page. * [Read more](https://www.wix.com/corvid/reference/wix-site.WixRouterSitemapEntry.html#url) */ readonly url: string; } /** * An object that contains information about which pages and lightboxes to * prefetch resources for. */ type PrefetchItems = { /** * The relative or absolute URLs of the pages in your site * to prefetch resources for. */ pages?: string[]; /** * The names of the lightboxes in your site to prefetch * resources for. * * > **Note:** Pages are listed by relative or absolute URL, but lightboxes are listed by name. * See [`wix-location.to()`](wix-location.html#to) to learn how to find a page's relative * URL. You can find a lightbox's name by selecting the lightbox and clicking the settings button. */ lightboxes?: string[]; }; /** * An object that is returned from a prefetch request. */ type PrefetchResult = { /** * A success or failure message. */ message: string; /** * The errors that occurred. */ errors: wix_site.PrefetchResultError; }; /** * An object that is returned when a resource prefetch is unsuccessful. */ type PrefetchResultError = { /** * The names of the pages for which prefetch failed. */ pages: string[]; /** * The names of the lightbox for which prefetch failed. */ lightboxes: string[]; }; /** * An object that contains information about the site's prefixes. */ type Prefix = { /** * The name of the prefix. */ name: string; /** * The type of the prefix. * * A site's routers, dynamic pages, and app pages all have prefixes. * * One of: * * + `"dynamicPages"` * + `"router"` * + `"app"` */ type: string; /** * The prefix. */ prefix: string; /** * If the prefix is an app's prefix, the `applicationId` property is the app's ID. */ applicationId?: string; }; /** * An object that contains information about the site's pages, prefixes, and lightboxes. */ type SiteStructure = { /** * The pages of the site. * Pages can be regular pages, dynamic pages, router pages, or pages from an app. */ pages: wix_site.StructurePage[]; /** * The prefixes of the site's routers and dynamic pages. */ prefixes: wix_site.Prefix[]; /** * The site's lightboxes. */ lightboxes: wix_site.StructureLightbox[]; }; /** * An object that contains information about a lightbox on the site. */ type StructureLightbox = { /** * The name of the lightbox. */ name: string; }; /** * An object that contains information about a page on the site. */ type StructurePage = { /** * The name of the page. */ name: string; /** * The type of the page: `"static"` or `"template"`. */ type: string; /** * The URL of the page. If the page is a `static` page the `url` property is the page's SEO URL. */ url?: string; /** * If the page is an app page, the `applicationId` property is the app's ID. */ applicationId?: string; /** * If the page is a router or dynamic page, the `prefix` property is the page's prefix. */ prefix?: string; /** * If the page is the Home page, `isHomePage` is `true`. Otherwise, it does not exist. */ isHomePage?: boolean; }; } declare namespace wix_storage { /** * Used for storing local, session, or memory key/value data in the visitor's browser. * [Read more](https://www.wix.com/corvid/reference/wix-storage.Storage.html#) */ interface Storage { /** * Removes **all** items from local, session, or memory storage. * [Read more](https://www.wix.com/corvid/reference/wix-storage.Storage.html#clear) */ clear(): void; /** * Gets an item from local, session, or memory storage. * [Read more](https://www.wix.com/corvid/reference/wix-storage.Storage.html#getItem) */ getItem(key: string): string; /** * Removes an item from local, session, or memory storage. * [Read more](https://www.wix.com/corvid/reference/wix-storage.Storage.html#removeItem) */ removeItem(key: string): void; /** * Stores an item in local, session, or memory storage. * > **Note:** You can store up to 50kb of data in local and session storage and up to * > 1mb in memory storage. * [Read more](https://www.wix.com/corvid/reference/wix-storage.Storage.html#setItem) */ setItem(key: string, value: string | number | string[]): void; } } declare namespace wix_window { /** * The ConsentPolicy API is used to perform actions related to the user's allowed cookies and 3rd-party data transfer, such as for GDPR or CCPA purposes. * [Read more](https://www.wix.com/corvid/reference/wix-window.ConsentPolicy.html#) */ interface ConsentPolicy { /** * Gets the visitor's consent policy regarding allowed cookies and 3rd-party data transfer, such as for GDPR or CCPA purposes. * [Read more](https://www.wix.com/corvid/reference/wix-window.ConsentPolicy.html#getCurrentConsentPolicy) */ getCurrentConsentPolicy(): wix_window.ConsentPolicy.PolicyDetails; /** * Sets the function that runs * when a visitor's consent policy was changed using * [`setConsentPolicy()`](#setConsentPolicy) or reset using * [`resetConsentPolicy()`](#resetConsentPolicy). * [Read more](https://www.wix.com/corvid/reference/wix-window.ConsentPolicy.html#onConsentPolicyChanged) */ onConsentPolicyChanged(handler: wix_window.ConsentPolicy.ConsentPolicyChangedHandler): void; /** * Removes the current policy from the visitor's browser * and resets the visitor's consent policy to the default policy for the site. * [Read more](https://www.wix.com/corvid/reference/wix-window.ConsentPolicy.html#resetConsentPolicy) */ resetConsentPolicy(): Promise; /** * Sets the current visitor's consent policy * regarding allowed cookies and data transfer to 3rd parties, * such as for GDPR or CCPA purposes. * [Read more](https://www.wix.com/corvid/reference/wix-window.ConsentPolicy.html#setConsentPolicy) */ setConsentPolicy(policy: wix_window.ConsentPolicy.Policy): Promise; } namespace ConsentPolicy { /** * The event that occurred when the consent policy changed. */ type ConsentPolicyChangedEvent = {}; /** * The current user's consent policy settings. */ type Policy = { /** * Consent for mandatory cookies for Wix websites, such as for security cookies. Wix places these cookies on your device and these cookies do not require user consent. Always `true`. */ essential: boolean; /** * Consent for cookies placed on the user's device that "remember" user settings to improve user experience. For example, an indication that the user dismissed a popup. The default is `true`. */ functional: boolean; /** * Consent for cookies used for analytics, such as Wix analytics, Google Analytics, Yandex Metrica, and so on. The default is `true`. */ analytics: boolean; /** * Consent for cookies used for advertising purposes. This includes 3rd-party scripts and pixels that may potentially place advertising cookies on the device (such as Twitter page view and Facebook Pixel). The default is `true`. */ advertising: boolean; /** * Consent for a user's personal data to be transferred to a 3rd party (such as Google Analytics, Facebook Pixel, and FullStory). The default is `true`. */ dataToThirdParty: boolean; }; /** * The complete details of the current user's consent policy. */ type PolicyDetails = { /** * Whether the policy is the default consent policy set by the site owner. If `true`, either the user has not set a policy or the site owner has reset the policy. */ defaultPolicy: boolean; /** * An object representing the user's current consent policy. */ policy: wix_window.ConsentPolicy.Policy; /** * If a cookie exists in the browser defining the current consent policy, the date the policy was set. Otherwise, undefined. */ createdDate?: Date; }; /** * Function that runs when a user's consent policy was changed using [`setConsentPolicy()`](#setConsentPolicy). */ type ConsentPolicyChangedHandler = (event: wix_window.ConsentPolicy.ConsentPolicyChangedEvent) => void; } /** * A [lightbox](https://support.wix.com/en/article/about-lightboxes) pops up on your site to grab your visitor's attention. * [Read more](https://www.wix.com/corvid/reference/wix-window.Lightbox.html#) */ interface Lightbox { /** * Closes the lightbox. * [Read more](https://www.wix.com/corvid/reference/wix-window.Lightbox.html#close) */ close(data?: any): void; /** * Returns the data object that was passed to a lightbox. * [Read more](https://www.wix.com/corvid/reference/wix-window.Lightbox.html#getContext) */ getContext(): any; } /** * The Multilingual API is used when working with the languages in a multilingual site. * [Read more](https://www.wix.com/corvid/reference/wix-window.Multilingual.html#) */ interface Multilingual { /** * Sets or gets the site's current display language. * [Read more](https://www.wix.com/corvid/reference/wix-window.Multilingual.html#currentLanguage) */ currentLanguage: string; /** * Gets whether the site has been set up to be shown in multiple languages. * [Read more](https://www.wix.com/corvid/reference/wix-window.Multilingual.html#isEnabled) */ readonly isEnabled: boolean; /** * Gets information about the site's languages. * [Read more](https://www.wix.com/corvid/reference/wix-window.Multilingual.html#siteLanguages) */ readonly siteLanguages: wix_window.Multilingual.SiteLanguage[]; } namespace Multilingual { /** * An object returned by the `siteLanguages` property that contains information about the site's languages. */ type SiteLanguage = { /** * The language's full name. */ name: string; /** * The language's locale code, which represents a set of language-related formatting preferences. */ locale: string; /** * The language's two-letter code. */ languageCode: string; /** * The language's three-letter country code. */ countryCode: string; /** * Whether the language is the site's primary language. */ isPrimaryLanguage: boolean; }; } /** * The Rendering API is used to control when code is run as a page is being loaded. * [Read more](https://www.wix.com/corvid/reference/wix-window.Rendering.html#) */ interface Rendering { /** * Gets the current environment the rendering process is running in. * [Read more](https://www.wix.com/corvid/reference/wix-window.Rendering.html#env) */ readonly env: string; /** * **Deprecated:** The `renderCycle` property no longer works as expected. * [Read more](https://www.wix.com/corvid/reference/wix-window.Rendering.html#renderCycle) */ readonly renderCycle: number; /** * **Deprecated:** This version of the `warmupData` property does not work as expected. A newer version is available at [`wix-window.warmupData`](wix-window.html#warmupData). * [Read more](https://www.wix.com/corvid/reference/wix-window.Rendering.html#warmupData) */ readonly warmupData: boolean | number | string | any; } /** * The Warmup Data API is used to optimize data loading for sites that render both on the server and in the browser, * allowing costly data fetching operations to be done only once. * [Read more](https://www.wix.com/corvid/reference/wix-window.WarmupData.html#) */ interface WarmupData { /** * Gets data from server-side code for use in client-side code. * [Read more](https://www.wix.com/corvid/reference/wix-window.WarmupData.html#get) */ get(key: string): any; /** * Sets data in server-side code for use in client-side code. * [Read more](https://www.wix.com/corvid/reference/wix-window.WarmupData.html#set) */ set(key: string, data: any): void; } /** * An object that defines the location. */ type Coordinates = { /** * The position's latitude in decimal degrees. */ latitude: number; /** * The position's longitude in decimal degrees. */ longitude: number; /** * The position's altitude in meters, relative to sea level. This value may be null if the browser cannot provide the data. */ altitude: number; /** * The accuracy in meters of the `latitude` and `longitude` properties. */ accuracy: number; /** * The accuracy in meters of the `altitude` property. This value may be null. */ altitudeAccuracy: number; /** * The direction in degrees in which the device is traveling. It indicates how far off from heading true north the device is. If `speed` is `0`, the heading is `NaN`. This value may be null if the browser cannot provide the data. */ heading: number; /** * The velocity in meters per second of the device. This value may be null if the browser cannot provide the data. */ speed: number; }; /** * An object returned by the `getCurrentGeolocation()` function that contains information about the current geolocation. */ type CurrentGeolocation = { /** * The geolocation timestamp representing the date and time at which the location was retrieved. */ timestamp: string; /** * An object that defines the location. */ coords: wix_window.Coordinates; }; /** * A custom parameter used when sending a CustomEvent track event. */ type CustomType = {}; /** * An object containing the size of the actual body of the page, which may be larger or smaller than the current window. */ type DocumentSize = { /** * The height of the page body. */ height: number; /** * The width of the page body. */ width: number; }; /** * An object used when opening a modal window. */ type OpenModalOptions = { /** * Width of the modal window. */ width: number; /** * Height of the modal window. */ height: number; }; /** * An object containing the scroll offset of the page within the window from the top-left corner. */ type ScrollOffset = { /** * The horizontal scroll offset of the page within the window from the left. */ x: number; /** * The vertical scroll offset of the page within the window from the top. */ y: number; }; /** * An object used for providing options for the `scrollTo()` method. */ type ScrollToOptions = { /** * Indicates whether to scroll with an animation. Defaults to `true`. */ scrollAnimation: boolean; }; /** * An object containing the size of the viewable area of the current browser window. */ type WindowSize = { /** * The height of the window. */ height: number; /** * The width of the window. */ width: number; }; /** * An object returned by the `getBoundingRect()` function that contains information about the window's size, the document's size, and the current scroll position. */ type WindowSizeInfo = { /** * An object containing the size of the viewable area of the current browser window. */ window: wix_window.WindowSize; /** * An object containing the size of the actual body of the page, which may be larger or smaller than the current window. */ document: wix_window.DocumentSize; /** * An object containing the scroll offset of the page within the window from the top-left corner. */ scroll: wix_window.ScrollOffset; }; /** * Objects used when calling the [`trackEvent()`](wix-window.html#trackEvent) function. */ type trackingParameters = { /** * Object used for `AddPaymentInfo` events. */ AddPaymentInfoEvent?: wix_window.trackingParametersAddPaymentInfoEvent; /** * Object used for `AddProductImpression` events. */ AddProductImpressionEvent?: wix_window.trackingParametersAddProductImpressionEvent; /** * Object used for `AddToCart` events. */ AddToCartEvent?: wix_window.trackingParametersAddToCartEvent; /** * Object used for `CheckoutStep` events. */ CheckoutStepEvent?: wix_window.trackingParametersCheckoutStepEvent; /** * Object used for `ClickProduct` events. */ ClickProductEvent?: wix_window.trackingParametersClickProductEvent; /** * Object used for `InitiateCheckout` events. */ InitiateCheckoutEvent?: wix_window.trackingParametersInitiateCheckoutEvent; /** * Object used for `Lead` events. */ LeadEvent?: wix_window.trackingParametersLeadEvent; /** * Object used for `Purchase` events. */ PurchaseEvent?: wix_window.trackingParametersPurchaseEvent; /** * Object used for `RemoveFromCart` events. */ RemoveFromCartEvent?: wix_window.trackingParametersRemoveFromCartEvent; /** * Object used for `StartPayment` events. */ StartPaymentEvent?: wix_window.trackingParametersStartPaymentEvent; /** * Object used for `ViewContent` events. */ ViewContentEvent?: wix_window.trackingParametersViewContentEvent; /** * Object used for custom events. */ CustomEvent?: wix_window.trackingParametersCustomEvent; }; /** * An object used when sending an `AddPaymentInfo` track event. */ type trackingParametersAddPaymentInfoEvent = { /** * Event origin. For example, `Music Player` or `Contact Form`. */ origin?: string; /** * Payment type. For example, `Visa` or `PayPal`. */ option?: string; }; /** * An object used when sending an AddProductImpression track event. */ type trackingParametersAddProductImpressionEvent = { /** * Event origin. For example, `Music Player` or `Contact Form`. */ origin?: string; /** * `key:value` pairs describing the products. */ contents: wix_window.trackingParametersAddProductImpressionEventContents[]; }; /** * An object used when sending an AddProductImpression track event. */ type trackingParametersAddProductImpressionEventContents = { /** * Product ID. */ id?: string; /** * Stock-keeping unit for the product. */ sku?: string; /** * Product name. */ name: string; /** * Product category. For example, `Accessories/Watches`. */ category?: string; /** * Product price. */ price?: number; /** * Currency code in [ISO 4217 format](https://en.wikipedia.org/wiki/ISO_4217). For example, `EUR`, `USD`, or `CAD`. */ currency?: string; /** * Brand name of the product. */ brand?: string; /** * Product variant such as `green` or `large`. */ variant?: string; /** * List or collection the product is part of. For example, `Product Gallery` or `Search Results`. */ list?: string; /** * Position of the product within a list or collection. */ position?: string; }; /** * An object used when sending an AddToCart track event. */ type trackingParametersAddToCartEvent = { /** * Event origin. For example, `Music Player` or `Contact Form`. */ origin?: string; /** * Product ID. */ id?: string; /** * Stock-keeping unit for the product. */ sku?: string; /** * Product name. */ name: string; /** * Product price. */ price?: number; /** * Currency code in [ISO 4217 format](https://en.wikipedia.org/wiki/ISO_4217). For example, `EUR`, `USD`, or `CAD`. */ currency?: string; /** * Product category. For example, `Accessories/Watches`. */ category?: string; /** * Brand name of the product. */ brand?: string; /** * Product variant such as `green` or `large`. */ variant?: string; /** * List or collection the product is part of. For example, `Product Gallery` or `Search Results`. */ position?: string; /** * Product quantity. */ quantity?: number; }; /** * An object used when sending an CheckoutStep track event. */ type trackingParametersCheckoutStepEvent = { /** * Event origin. For example, `Music Player` or `Contact Form`. */ origin?: string; /** * Number of the step in the checkout process. * For example `2` for `addPaymentInfo` in a checkout flow that consists of the steps `StartPayment`, `addPaymentInfo`, and `Select Shipping`. */ step?: string; /** * Action the visitor has taken in this step. For example, `Select Shipping`. */ action?: string; /** * Option information on the checkout page. For example the selected payment method. */ option?: string; }; /** * An object used when sending a ClickProduct track event. */ type trackingParametersClickProductEvent = { /** * Event origin. For example, `Music Player` or `Contact Form`. */ origin?: string; /** * Product ID. */ id?: string; /** * Stock-keeping unit for the product. */ sku?: string; /** * Product name. */ name: string; /** * Product price. */ price?: number; /** * Currency code in [ISO 4217 format](https://en.wikipedia.org/wiki/ISO_4217). For example, `EUR`, `USD`, or `CAD`. */ currency?: string; /** * Product category. For example, `Accessories/Watches`. */ category?: string; /** * Brand name of the product. */ brand?: string; /** * Product variant such as `green` or `large`. */ variant?: string; /** * List or collection the product is part of. For example, `Product Gallery` or `Search Results`. */ list?: string; /** * Position of the product within a list or collection. */ position?: string; }; /** * An object used when sending a CustomEvent track event. */ type trackingParametersCustomEvent = { /** * Event category. **Note:** Required for Google Analytics and Facebook Pixel. */ eventCategory?: string; /** * Event action type. **Note:** Required for Google Analytics and Facebook Pixel. */ eventAction?: string; /** * Event label. */ eventLabel?: string; /** * Event value. */ eventValue?: number; /** * Any number of custom properties. */ "*"?: wix_window.CustomType; }; /** * An object used when sending an InitiateCheckout track event. */ type trackingParametersInitiateCheckoutEvent = { /** * Event origin. For example, `Music Player` or `Contact Form`. */ origin?: string; /** * `key:value` pairs describing the products. */ contents: wix_window.trackingParametersInitiateCheckoutEventContents[]; }; /** * An object used when sending an InitiateCheckout track event. */ type trackingParametersInitiateCheckoutEventContents = { /** * Product ID. */ id?: string; /** * Stock-keeping unit for the product. */ sku?: string; /** * Product name. */ name: string; /** * Product category. For example, `Accessories/Watches`. */ category?: string; /** * Product price. */ price?: number; /** * Currency code in [ISO 4217 format](https://en.wikipedia.org/wiki/ISO_4217). For example, `EUR`, `USD`, or `CAD`. */ currency?: string; /** * Brand name of the product. */ brand?: string; /** * Product variant such as `green` or `large`. */ variant?: string; /** * Product quantity. */ quantity?: number; }; /** * An object used when sending a Lead track event. */ type trackingParametersLeadEvent = { /** * Lead category. */ category?: string; /** * Lead action. */ action?: string; /** * Lead label. */ label?: string; }; /** * An object used when sending a Purchase track event. */ type trackingParametersPurchaseEvent = { /** * Event origin. For example, `Music Player` or `Contact Form`. */ origin?: string; /** * Transaction ID or order number. */ id?: string; /** * Store name. */ affiliation?: string; /** * Total purchase price. Includes tax and shipping fee. */ revenue?: number; /** * Total tax. */ tax?: number; /** * Shipping fee. */ shipping?: number; /** * Applied coupon code. */ coupon?: string; /** * `key:value` pairs describing the purchased products. */ contents: wix_window.trackingParametersPurchaseEventContents[]; }; /** * An object used when sending an Purchase track event. */ type trackingParametersPurchaseEventContents = { /** * Product ID. */ id?: string; /** * Product name. */ name: string; /** * Product category. For example, `Accessories/Watches`. */ category?: string; /** * Product price. */ price?: number; /** * Currency code in [ISO 4217 format](https://en.wikipedia.org/wiki/ISO_4217). For example, `EUR`, `USD`, or `CAD`. */ currency?: string; /** * Brand name of the product. */ brand?: string; /** * Product variant such as `green` or `large`. */ variant?: string; /** * Product quantity. */ quantity?: number; }; /** * An object used when sending a RemoveFromCart track event. */ type trackingParametersRemoveFromCartEvent = { /** * Event origin. For example, `Music Player` or `Contact Form`. */ origin?: string; /** * Product ID. */ id?: string; /** * Product name. */ name: string; /** * Product price. */ price?: number; /** * Currency code in [ISO 4217 format](https://en.wikipedia.org/wiki/ISO_4217). For example, `EUR`, `USD`, or `CAD`. */ currency?: string; /** * Product category. For example, `Accessories/Watches`. */ category?: string; /** * Brand name of the product. */ brand?: string; /** * Product variant such as `green` or `large`. */ variant?: string; /** * Position of the product within a list or collection. */ position?: string; /** * Product quantity. */ quantity?: number; }; /** * An object used when sending an StartPayment track event. */ type trackingParametersStartPaymentEvent = { /** * Event origin. For example, `Music Player` or `Contact Form`. */ origin?: string; /** * Payment type. For example, `Visa` or `PayPal`. */ option?: string; }; /** * An object used when sending a ViewContent track event. */ type trackingParametersViewContentEvent = { /** * Event origin. For example, `Music Player` or `Contact Form`. */ origin?: string; /** * Product ID. */ id?: string; /** * Stock-keeping unit for the product. */ sku?: string; /** * Product name. */ name: string; /** * Product price. */ price?: number; /** * Currency code in [ISO 4217 format](https://en.wikipedia.org/wiki/ISO_4217). For example, `EUR`, `USD`, or `CAD`. */ currency?: string; /** * Product category. For example, `Accessories/Watches`. */ category?: string; /** * Brand name of the product. */ brand?: string; /** * Product variant such as `green` or `large`. */ variant?: string; /** * List or collection the product is part of. For example, `Product Gallery` or `Search Results`. */ list?: string; /** * Position of the product within a list or collection. */ position?: string; }; } declare namespace wix_animations { /** * An animation timeline. * [Read more](https://www.wix.com/corvid/reference/wix-animations.TimeLine.html#) */ interface TimeLine { /** * Adds an animation to a timeline. * [Read more](https://www.wix.com/corvid/reference/wix-animations.TimeLine.html#add) */ add(target: $w.Element | $w.Element[], animation: wix_animations.TimeLine.AnimationAttributes | wix_animations.TimeLine.AnimationAttributes[], offset?: number | string): wix_animations.TimeLine; /** * Sets an event handler that runs when the timeline completes playing. * [Read more](https://www.wix.com/corvid/reference/wix-animations.TimeLine.html#onComplete) */ onComplete(handler: Function): wix_animations.TimeLine; /** * Sets an event handler that runs when a the timeline repeats. * [Read more](https://www.wix.com/corvid/reference/wix-animations.TimeLine.html#onRepeat) */ onRepeat(handler: Function): wix_animations.TimeLine; /** * Sets an event handler that runs when the timeline completes playing * in the reverse direction. * [Read more](https://www.wix.com/corvid/reference/wix-animations.TimeLine.html#onReverseComplete) */ onReverseComplete(handler: Function): wix_animations.TimeLine; /** * Sets an event handler that runs when the timeline starts playing. * [Read more](https://www.wix.com/corvid/reference/wix-animations.TimeLine.html#onStart) */ onStart(handler: Function): wix_animations.TimeLine; /** * Pauses a timeline. * [Read more](https://www.wix.com/corvid/reference/wix-animations.TimeLine.html#pause) */ pause(): wix_animations.TimeLine; /** * Plays a timeline forwards. * [Read more](https://www.wix.com/corvid/reference/wix-animations.TimeLine.html#play) */ play(): wix_animations.TimeLine; /** * Replays a timeline. * [Read more](https://www.wix.com/corvid/reference/wix-animations.TimeLine.html#replay) */ replay(): wix_animations.TimeLine; /** * Plays a timeline in reverse. * [Read more](https://www.wix.com/corvid/reference/wix-animations.TimeLine.html#reverse) */ reverse(): wix_animations.TimeLine; } namespace TimeLine { /** * An object representing the attributes of an animation in an timeline. */ type AnimationAttributes = { /** * Animation duration in milliseconds. */ duration: number; /** * Number of milliseconds to delay before beginning the animation. */ delay?: number; /** * Target opacity of the animated element or elements, from 0.0 to 1.0. */ opacity?: number; /** * The target degree to rotate to, where a complete rotation * is 360 degrees. * * Note that the starting orientation of each element is determined by the rotation set in the * Editor. If you did not rotate the element in the Editor, it begins at 0 degrees. * * The direction of the rotation is determined by the current orientation of the animated * element or elements, the target degree specified by the `rotate` attribute, and, optionally, * the specified `rotateDirection` attribute. * * + If the target degree is greater than the current rotation degree, the animation * rotates clockwise. * * For example, if an element starts at 0 degrees and `rotate` is `540`, it rotates clockwise * one and a half rotations. Similarly, if an element starts at -540 degrees and `rotate` is `0`, * it also rotates clockwise one and a half rotations. * + If the target degree is less than the current rotation degree, the animation * rotates counterclockwise. * * For example, if an element starts at 0 degrees and `rotate` is `-540`, it rotates counterclockwise * one and a half rotations. Similarly, if an element starts a 540 degrees and `rotate` is `0`, * it also rotates counterclockwise one and a half rotations. * + If a `rotateDirection` value is specified, that direction overrides the rules listed * above. * * * The `rotate` value is specified using one of the following formats: * * + A number to specify the target degree to rotate to. * + A `"+=X"` expression to specify a target degree is `X` number of degrees greater * than the current orientation. * * For example, if the current orientation is 540 degrees and `rotate` is `"+=90"`, * the target degree is 630 and the rotation will be a quarter turn clockwise, * unless the direction is overridden by specifying a `rotateDirection` value. * + A `"-=X"` expression to specify a target degree is `X` number of degrees less * than the current orientation. * * For example, if the current orientation is 540 degrees and `rotate` is `"-=90"`, * the target degree is 450 and the rotation will be a quarter turn counterclockwise, * unless the direction is overridden by specifying a `rotateDirection` value. */ rotate?: number | string; /** * Direction in which to rotate. Overrides the * default rotation direction as explained in the `rotate` property. * * Either `"cw"` to rotate clockwise or `"ccw"` to rotate counterclockwise. */ rotateDirection?: string; /** * Target scale of the animated element or elements, where * `1` is the original size. * * For example, if `scale` is `.5`, the animated element or elements will shrink to * half their original sizes and if `scale` is `2`, the animated element or elements * will grow to double their original sizes. */ scale?: number; /** * Target horizontal scale of the animated element or elements. * * If a `scale` value is set, also setting a `scaleX` value overrides the horizontal * scaling set use `scale`. */ scaleX?: number; /** * Target vertical scale of the animated element or elements. * * If a `scale` value is set, also setting a `scaleY` value overrides the vertical * scaling set use `scale`. */ scaleY?: number; /** * Horizontal pixel target to move the element or elements * to horizontally. * * One of the following formats: * * + A positive number to specify a target pixel to the right, relative to the * original position. * + A negative number to specify a target pixel to the left, relative to the * original position. * + A `"+="` expression to specify a target pixel to the right, relative to the * last animated position. For example, `"+=100"` moves 100 pixels to the right * of wherever the element or elements are positioned when this specific animation * begins. * + A `"-="` expression to specify a target pixel to the left, relative to the * last animated position. For example, `"-=100"` moves 100 pixels to the left * of wherever the element or elements are positioned when this specific animation * begins. */ x?: number | string; /** * Vertical pixel target to move the element or elements * to vertically. * * One of the following formats: * * + A positive number to specify a target pixel down, relative to the * original position. * + A negative number to specify a target pixel up, relative to the * original position. * + A `"+="` expression to specify a target pixel down, relative to the * last animated position. For example, `"+=100"` moves 100 pixels down * from wherever the element or elements are positioned when this specific animation * begins. * + A `"-="` expression to specify a target pixel up, relative to the * last animated position.For example, `"-=100"` moves 100 pixels up * from wherever the element or elements are positioned when this specific animation * begins. */ y?: number | string; /** * The animation motion acceleration or deceleration. Specifies * the rate of change of the animation attributes over time. * * One of: * * * | Ease In | Ease Out | Ease In-Out | * |---|---|---| * | `"easeInSine"` ![Ease In Sine](images/easeInSine.png "Ease In Sine") | `"easeOutSine"` ![Ease Out Sine](images/easeOutSine.png "Ease Out Sine") | `"easeInOutSine"` ![Ease In Sine](images/easeInOutSine.png "Ease In-Out Sine") | * | `"easeInQuad"` ![Ease In Quad](images/easeInQuad.png "Ease In Quad") | `"easeOutQuad"` ![Ease Out Quad](images/easeOutQuad.png "Ease Out Quad") | `"easeInOutQuad"` ![Ease In-Out Quad](images/easeInOutQuad.png "Ease In-Out Quad") | * | `"easeInCubic"` ![Ease In Cubic](images/easeInCubic.png "Ease In Cubic") | `"easeOutCubic"` ![Ease Out Cubic](images/easeOutCubic.png "Ease Out Cubic") | `"easeInOutCubic"` ![Ease In-Out Cubic](images/easeInOutCubic.png "Ease In-Out Cubic") | * | `"easeInQuart"` ![Ease In Quart](images/easeInQuart.png "Ease In Quart") | `"easeOutQuart"` ![Ease Out Quart](images/easeOutQuart.png "Ease Out Quart") | `"easeInOutQuart"` ![Ease In-Out Quart](images/easeInOutQuart.png "Ease In-Out Quart") | * | `"easeInQuint"` ![Ease In Quint](images/easeInQuint.png "Ease In Quint") | `"easeOutQuint"` ![Ease Out Quint](images/easeOutQuint.png "Ease Out Quint") | `"easeInOutQuint"` ![Ease In-Out Quint](images/easeInOutQuint.png "Ease In-Out Quint") | * | `"easeInExpo"` ![Ease In Expo](images/easeInExpo.png "Ease In Expo") | `"easeOutExpo"` ![Ease Out Expo](images/easeOutExpo.png "Ease Out Expo") | `"easeInOutExpo"` ![Ease In-Out Expo](images/easeInOutExpo.png "Ease In-Out Expo") | * | `"easeInCirc"` ![Ease In Circ](images/easeInCirc.png "Ease In Circ") | `"easeOutCirc"` ![Ease Out Circ](images/easeOutCirc.png "Ease Out Circ") | `"easeInOutCirc"` ![Ease In-Out Circ](images/easeInOutCirc.png "Ease In-Out Circ") | * | `"easeInBack"` ![Ease In Back](images/easeInBack.png "Ease In Back") | `"easeOutBack"` ![Ease Out Back](images/easeOutBack.png "Ease Out Back") | `"easeInOutBack"` ![Ease In-Out Back](images/easeInOutBack.png "Ease In-Out Back") | * | `"easeInElastic"` ![Ease In Elastic](images/easeInElastic.png "Ease In Elastic") | `"easeOutElastic"` ![Ease Out Elastic](images/easeOutElastic.png "Ease Out Elastic") | `"easeInOutElastic"` ![Ease In-Out Elastic](images/easeInOutElastic.png "Ease In-Out Elastic") | * | `"easeInBounce"` ![Ease In Bounce](images/easeInBounce.png "Ease In Bounce") | `"easeOutBounce"` ![Ease Out Bounce](images/easeOutBounce.png "Ease Out Bounce") | `"easeInOutBounce"` ![Ease In-Out Bounce](images/easeInOutBounce.png "Ease In-Out Bounce") | * | `"easeLinear"` ![Ease Linear](images/easeLinear.png "Ease Linear") | | | * * * Defaults to `"easeInSine"`. */ easing?: string; }; } /** * An object containing options for creating a timeline. */ type TimeLineOptions = { /** * Number of times the timeline repeats after it * finishes playing all the animations in the timeline once. * * For example, if `repeat` is `2`, the timeline plays a total of 3 times, * the initial play plus 2 repetitions. * * To repeat infinitely, pass a `repeat` value of `-1`. * * Defaults to `0`, meaning the timeline plays only once. */ repeat?: number; /** * Number of milliseconds to wait between * repetitions. * * For example, if `repeat` is `2` and `repeatDelay` is `1000`, the timeline plays * the initial play, then waits for 1 second before it plays again, and then waits * 1 second again before the final play. * * Defaults to `0`, meaning the each repetition plays immediately after the one * that preceded it. */ repeatDelay?: number; /** * Whether to reverse the animation play for each successive * repetition. * * For example, if `repeat` is `2` and the timeline contains the animations **A**, * **B**, and **C** to be played one after the other, the animations will play in * the following order: * * + If `yoyo` is `false`: * * **A** -> **B** -> **C** -> **A** -> **B** -> **C** -> **A** -> **B** -> **C** * + If `yoyo` is `true`: * * **A** -> **B** -> **C** -> **C** -> **B** -> **A** -> **A** -> **B** -> **C** * * * Defaults to `false`. */ yoyo?: boolean; }; } declare namespace wix_billing_backend { /** * Events that are fired by actions relating to billing. * [Read more](https://www.wix.com/corvid/reference/wix-billing-backend.Events.html#) */ interface Events { /** * An event that fires when an invoice is created. * [Read more](https://www.wix.com/corvid/reference/wix-billing-backend.Events.html#onInvoiceCreated) */ onInvoiceCreated(event: wix_billing_backend.Invoices.Invoice): void; /** * An event that fires when an invoice is overdue. * [Read more](https://www.wix.com/corvid/reference/wix-billing-backend.Events.html#onInvoiceOverdue) */ onInvoiceOverdue(event: wix_billing_backend.Invoices.Invoice): void; /** * An event that fires when an invoice is paid. * [Read more](https://www.wix.com/corvid/reference/wix-billing-backend.Events.html#onInvoicePaid) */ onInvoicePaid(event: wix_billing_backend.Invoices.Invoice): void; /** * An event that fires when an invoice is sent. * [Read more](https://www.wix.com/corvid/reference/wix-billing-backend.Events.html#onInvoiceSent) */ onInvoiceSent(event: wix_billing_backend.Invoices.Invoice): void; /** * An event that fires when a price quote is accepted. * [Read more](https://www.wix.com/corvid/reference/wix-billing-backend.Events.html#onPriceQuoteAccepted) */ onPriceQuoteAccepted(event: wix_billing_backend.PriceQuotes.PriceQuote): void; /** * An event that fires when a price quote is created. * [Read more](https://www.wix.com/corvid/reference/wix-billing-backend.Events.html#onPriceQuoteCreated) */ onPriceQuoteCreated(event: wix_billing_backend.PriceQuotes.PriceQuote): void; /** * An event that fires when a price quote has expired. * [Read more](https://www.wix.com/corvid/reference/wix-billing-backend.Events.html#onPriceQuoteExpired) */ onPriceQuoteExpired(event: wix_billing_backend.PriceQuotes.PriceQuote): void; /** * An event that fires when a price quote is sent. * [Read more](https://www.wix.com/corvid/reference/wix-billing-backend.Events.html#onPriceQuoteSent) */ onPriceQuoteSent(event: wix_billing_backend.PriceQuotes.PriceQuote): void; } /** * The wix-billing-backend module contains functionality for working with * [your site's invoices](https://support.wix.com/en/article/about-wix-invoices) * from backend code. * [Read more](https://www.wix.com/corvid/reference/wix-billing-backend.Invoices.html#) */ interface Invoices { /** * Adds a payment to the invoice and reports the payment to the payment provider. * [Read more](https://www.wix.com/corvid/reference/wix-billing-backend.Invoices.html#addPayment) */ addPayment(id: wix_billing_backend.Invoices.IdAndVersion, payment: wix_billing_backend.Invoices.Payment): Promise; /** * Creates a new invoice. * [Read more](https://www.wix.com/corvid/reference/wix-billing-backend.Invoices.html#createInvoice) */ createInvoice(invoiceFields: wix_billing_backend.Invoices.InvoiceFields): Promise; /** * Creates a link that can be used by a customer to preview the invoice. * [Read more](https://www.wix.com/corvid/reference/wix-billing-backend.Invoices.html#createInvoicePreviewUrl) */ createInvoicePreviewUrl(id: wix_billing_backend.Invoices.IdAndVersion, options?: wix_billing_backend.Invoices.AuthOptions): Promise; /** * Deletes an invoice by ID. * [Read more](https://www.wix.com/corvid/reference/wix-billing-backend.Invoices.html#deleteInvoice) */ deleteInvoice(id: string): Promise; /** * Gets an existing invoice by ID. * [Read more](https://www.wix.com/corvid/reference/wix-billing-backend.Invoices.html#getInvoice) */ getInvoice(id: string): Promise; /** * Sends an invoice preview link to a customer via email. * [Read more](https://www.wix.com/corvid/reference/wix-billing-backend.Invoices.html#sendInvoice) */ sendInvoice(id: wix_billing_backend.Invoices.IdAndVersion, emailInfo: wix_billing_backend.Invoices.EmailInfo): Promise; /** * Update an existing invoice. * [Read more](https://www.wix.com/corvid/reference/wix-billing-backend.Invoices.html#updateInvoice) */ updateInvoice(id: wix_billing_backend.Invoices.IdAndVersion, invoiceFields: wix_billing_backend.Invoices.InvoiceFields, fieldMask?: string[]): Promise; /** * Voids an invoice. * [Read more](https://www.wix.com/corvid/reference/wix-billing-backend.Invoices.html#voidInvoice) */ voidInvoice(id: wix_billing_backend.Invoices.IdAndVersion): Promise; } namespace Invoices { /** * An object that contains address information. */ type Address = { /** * Address line. */ addressLine?: string; /** * Secondary address line. */ addressLine2?: string; /** * Address subdivision. */ subdivision?: string; /** * Address city. */ city?: string; /** * Address postal code. */ postalCode?: string; /** * Address street address. */ streetAddress?: wix_billing_backend.Invoices.StreetAddress; /** * Address country. */ country?: string; /** * Address in human readable format. */ formatted?: string; }; type AuthOptions = { /** * Prevents permission checks from running for the operation. Defaults to `false`. */ suppressAuth: boolean; }; /** * An object that contains calculated tax information. */ type CalculatedTax = { /** * Tax name. */ name: string; /** * Tax rate. */ rate: number; /** * Total value of taxable goods. */ taxable: number; /** * Total amount of tax applied. */ taxed: number; /** * Tax code. */ code: string; }; /** * An object that contains customer information. */ type Customer = { /** * Contact ID. */ contactId: string; /** * Email address. */ email: string; /** * Physical address. */ address?: wix_billing_backend.Invoices.Address; /** * Physical billing address. */ billingAddress?: wix_billing_backend.Invoices.Address; /** * Physical shipping address. */ shippingAddress?: wix_billing_backend.Invoices.Address; /** * Phone number. */ phone?: string; /** * Company name. */ company?: string; /** * Company ID. Can be used to store company VAT ID. */ companyId?: string; /** * Full name. */ fullName?: string; /** * First name. */ firstName?: string; /** * Last name. */ lastName?: string; }; /** * An object that contains discount information. */ type Discount = { /** * Discount amount. */ value: number; /** * Discount type. * * Either: * * + `"Fixed"`: A fixed amount is deducted. * + `"Percentage"`: A percentage of the total amount is deducted. */ type: string; }; /** * An object that contains information used to send an invoice to a customer. */ type EmailInfo = { /** * Email subject. */ subject: string; /** * Email body. Limited formatting in the email body can be * achieved using standard JavaScript string formatting. */ body: string; }; /** * An object that contains ID and version information. */ type IdAndVersion = { /** * Invoice ID. */ id: string; /** * Invoice version. */ version: number; }; /** * An object that represents an invoice. */ type Invoice = { /** * ID and version of the invoice. */ id: wix_billing_backend.Invoices.IdAndVersion; /** * Status of the invoice. * One of: * * + `"Draft"` * + `"Sent"` * + `"Processing"` * + `"Paid"` * + `"Overdue"` * + `"Void"` * + `"Deleted"` * + `"PartiallyPaid"` * + `"PartialAndOverdue"` */ status: string; /** * Number of the invoice, unique within your site. */ number: string; /** * Title of the invoice. */ title: string; /** * Currency code. */ currency: string; /** * Locale information. */ locale: wix_billing_backend.Invoices.Locale; /** * Customer listed on the invoice. */ customer: wix_billing_backend.Invoices.Customer; /** * Line items listed on the invoice. */ lineItems: wix_billing_backend.Invoices.LineItem[]; /** * Discount included in the invoice. */ discount: wix_billing_backend.Invoices.Discount; /** * List of payments already received from the customer. */ payments: wix_billing_backend.Invoices.Payment[]; /** * List of taxes calculated based on the line items. */ taxes: wix_billing_backend.Invoices.CalculatedTax[]; /** * Total values. */ totals: wix_billing_backend.Invoices.TotalPrice; /** * Invoice dynamic totals. */ dynamicTotals: wix_billing_backend.Invoices.InvoiceDynamicTotals; /** * Additional metadata included in the invoice. */ metadata: wix_billing_backend.Invoices.MetaData; /** * Invoice company ID. */ companyId: string; /** * Whether the invoice was sent to the customer. */ wasSent: boolean; /** * Dates associated with the invoice. */ dates: wix_billing_backend.Invoices.InvoiceDates; }; /** * An object that contains date information for an invoice. */ type InvoiceDates = { /** * Invoice issue date. */ issueDate: Date; /** * Invoice due date. */ dueDate: Date; }; /** * An object that contains information about invoice totals that change when payments are received. */ type InvoiceDynamicTotals = { /** * Amount paid. */ paidAmount: number; /** * Balance amount. */ balance: number; }; /** * An object that contains information used when creating or updating an invoice. */ type InvoiceFields = { /** * Invoice ID, as a UUID. */ id?: string; /** * Title of the invoice. */ title: string; /** * Customer listed on the invoice. */ customer: wix_billing_backend.Invoices.Customer; /** * Currency code. */ currency: string; /** * Line items listed on the invoice. */ lineItems: wix_billing_backend.Invoices.LineItem[]; /** * Discount included in the invoice. */ discount?: wix_billing_backend.Invoices.Discount; /** * Invoice payments. */ payments: wix_billing_backend.Invoices.Payment[]; /** * Invoice metadata. */ metadata?: wix_billing_backend.Invoices.MetaData; /** * Dates associated with the invoice. */ dates: wix_billing_backend.Invoices.InvoiceDates; }; /** * An object that contains itemized fee information. */ type ItemizedFee = { /** * Item fee name. */ name: string; /** * Item fee price. */ price: number; }; /** * An object that contains line item information. */ type LineItem = { /** * Line item ID. */ id: string; /** * Line item name. */ name: string; /** * Line item description. */ description: string; /** * Line item price. */ price: number; /** * Line item quantity. */ quantity: number; /** * Line item taxes. */ taxes?: wix_billing_backend.Invoices.LineItemTax[]; }; /** * An object that contains tax information for a line item. */ type LineItemTax = { /** * Line item tax name. */ name: string; /** * Line item tax rate. */ rate: number; /** * Line item tax code. */ code: string; }; /** * An object that contains locale information. */ type Locale = { /** * An IETF language tag. * Some common language tags include: * * + `"en-US"`: English, United States * + `"en-GB"`: English, British * + `"es-ES"`: Spanish, Spain * + `"de-DE"`: German, Germany * + `"ja-JP"`: Japanese, Japan * + `"fr-CH"`: French, Switzerland * + `"it-IT"`: Italian, Italy */ language: string; }; /** * An object that contains metadata information. */ type MetaData = { /** * Invoice notes. */ notes?: string; /** * Legal terms. */ legalTerms?: string; /** * URL to legal terms. */ sourceUrl?: string; /** * Source that triggered the action. For example, `"stores"`. */ source?: string; /** * ID of the trigger source. For example, an order ID. */ sourceRefId?: string; }; /** * An object that contains information about an invoice payment. */ type Payment = { /** * Payment id. */ id: string; /** * Payment type, describing how the payment was made. */ type: string; /** * Payment amount. */ amount: number; /** * Payment date. */ date: Date; }; /** * An object that contains response information. */ type Response = { /** * ID and version information. */ id: wix_billing_backend.Invoices.IdAndVersion; }; /** * An object that contains street address information. */ type StreetAddress = { /** * Street address information. */ value: string; /** * Street address type. Either `"Number"` or `"Name"`. */ type: string; }; /** * An object that contains price totals. */ type TotalPrice = { /** * Discount amount. */ discountAmount: number; /** * List of itemized fees. */ fees: wix_billing_backend.Invoices.ItemizedFee[]; /** * Sum of line item tax amounts. */ taxedAmount: number; /** * Subtotal of the line items without the tax included. */ subtotal: number; /** * Total price of the itemized fees and taxes. */ total: number; }; } /** * The wix-billing-backend module contains functionality for working with * your site's [price quotes](https://support.wix.com/en/article/wix-price-quotes-creating-and-sending-price-quotes-to-clients) * from backend code. * [Read more](https://www.wix.com/corvid/reference/wix-billing-backend.PriceQuotes.html#) */ interface PriceQuotes { /** * Creates a new price quote. * [Read more](https://www.wix.com/corvid/reference/wix-billing-backend.PriceQuotes.html#createPriceQuote) */ createPriceQuote(priceQuoteInfo: wix_billing_backend.PriceQuotes.PriceQuoteInfo): Promise; /** * Deletes a price quote by ID. * [Read more](https://www.wix.com/corvid/reference/wix-billing-backend.PriceQuotes.html#deletePriceQuote) */ deletePriceQuote(id: string): Promise; /** * Gets an existing price quote by ID. * [Read more](https://www.wix.com/corvid/reference/wix-billing-backend.PriceQuotes.html#getPriceQuote) */ getPriceQuote(id: string): Promise; /** * Sends a price quote preview link to a customer via email. * [Read more](https://www.wix.com/corvid/reference/wix-billing-backend.PriceQuotes.html#sendPriceQuote) */ sendPriceQuote(id: wix_billing_backend.PriceQuotes.IdAndVersion, emailInfo: wix_billing_backend.PriceQuotes.EmailInfo): Promise; /** * Updates an existing price quote. * [Read more](https://www.wix.com/corvid/reference/wix-billing-backend.PriceQuotes.html#updatePriceQuote) */ updatePriceQuote(id: wix_billing_backend.PriceQuotes.IdAndVersion, priceQuoteInfo: wix_billing_backend.PriceQuotes.PriceQuoteInfo, fieldMask?: string[]): Promise; } namespace PriceQuotes { /** * An object that contains address information. */ type Address = { /** * Address line. */ addressLine?: string; /** * Secondary address line. */ addressLine2?: string; /** * Address subdivision. */ subdivision?: string; /** * Address city. */ city?: string; /** * Address postal code. */ postalCode?: string; /** * Address street address. */ streetAddress?: wix_billing_backend.PriceQuotes.StreetAddress; /** * Address country. */ country?: string; /** * Address in human readable format. */ formatted?: string; }; /** * An object that contains calculated tax information. */ type CalculatedTax = { /** * Tax name. */ name: string; /** * Tax rate. */ rate: number; /** * Total value of taxable goods. */ taxable: number; /** * Total amount of tax applied. */ taxed: number; /** * Tax code. */ code: string; }; /** * An object that contains customer information. */ type Customer = { /** * Contact ID. */ contactId: string; /** * Email address. */ email: string; /** * Physical address. */ address?: wix_billing_backend.PriceQuotes.Address; /** * Physical billing address. */ billingAddress?: wix_billing_backend.PriceQuotes.Address; /** * Physical shipping address. */ shippingAddress?: wix_billing_backend.PriceQuotes.Address; /** * Phone number. */ phone?: string; /** * Company name. */ company?: string; /** * Company ID. Can be used to store company VAT ID. */ companyId?: string; /** * Full name. */ fullName?: string; /** * First name. */ firstName?: string; /** * Last name. */ lastName?: string; }; /** * An object that contains discount information. */ type Discount = { /** * Discount amount. */ value: number; /** * Discount type. * * Either: * * + `"Fixed"`: A fixed amount is deducted. * + `"Percentage"`: A percentage of the total amount is deducted. */ type: string; }; /** * An object that contains information used to send a price quote to a customer. */ type EmailInfo = { /** * Email subject. */ subject: string; /** * Email body. Limited formatting in the email body can be * achieved using standard JavaScript string formatting. */ body: string; }; /** * An object that contains ID and version information. */ type IdAndVersion = { /** * Price quote ID. */ id: string; /** * Price quote version. */ version: number; }; /** * An object that contains itemized fee information. */ type ItemizedFee = { /** * Item fee name. */ name: string; /** * Item fee price. */ price: number; }; /** * An object that contains line item information. */ type LineItem = { /** * Line item ID. */ id: string; /** * Line item name. */ name: string; /** * Line item description. */ description: string; /** * Line item price. */ price: number; /** * Line item quantity. */ quantity: number; /** * Line item taxes. */ taxes?: wix_billing_backend.PriceQuotes.LineItemTax[]; }; /** * An object that contains tax information for a line item. */ type LineItemTax = { /** * Line item tax name. */ name: string; /** * Line item tax rate. */ rate: number; /** * Line item tax code. */ code: string; }; /** * An object that contains locale information. */ type Locale = { /** * An IETF language tag. * Some common language tags include: * * + `"en-US"`: English, United States * + `"en-GB"`: English, British * + `"es-ES"`: Spanish, Spain * + `"de-DE"`: German, Germany * + `"ja-JP"`: Japanese, Japan * + `"fr-CH"`: French, Switzerland * + `"it-IT"`: Italian, Italy */ language: string; }; /** * An object that contains metadata information. */ type MetaData = { /** * Price quote notes. */ notes?: string; /** * Legal terms. */ legalTerms?: string; /** * URL to legal terms. */ sourceUrl?: string; /** * Source that triggered the action. For example, `"stores"`. */ source?: string; /** * ID of the trigger source. For example, an order ID. */ sourceRefId?: string; }; /** * An object that contains information about price quote payment terms. */ type PaymentTerms = { /** * Price quote term type. * One of: * * + `"DueOnReceipt"` * + `"NetPlus"` * + `"TimeStamp"` * + `"Other"` */ termType: string; /** * Term data. When `termType` is `"NetPlus"`, * `termData` contains a positive integer indicating how many days after the charge * payment is due. */ termData?: string; }; /** * An object that represents a price quote. */ type PriceQuote = { /** * ID and version of the price quote. */ id: wix_billing_backend.PriceQuotes.IdAndVersion; /** * Status of the price quote. * One of: * * + `"Draft"` * + `"Sent"` * + `"Processing"` * + `"Accepted"` * + `"Rejected"` * + `"Expired"` * + `"Void"` * + `"Deleted"` * + `"Invoiced"` */ status: string; /** * Number of the price quote, unique within your site. */ number: string; /** * Title of the price quote. */ title: string; /** * Currency code. */ currency: string; /** * Locale information. */ locale: wix_billing_backend.PriceQuotes.Locale; /** * Customer listed on the price quote. */ customer: wix_billing_backend.PriceQuotes.Customer; /** * Line items listed on the price quote. */ lineItems: wix_billing_backend.PriceQuotes.LineItem[]; /** * Discount included in the price quote. */ discount: wix_billing_backend.PriceQuotes.Discount; /** * Payment terms. */ paymentTerms: wix_billing_backend.PriceQuotes.PaymentTerms; /** * List of taxes calculated based on the line items. */ taxes: wix_billing_backend.PriceQuotes.CalculatedTax[]; /** * Total values. */ totals: wix_billing_backend.PriceQuotes.TotalPrice; /** * Additional metadata included in the price quote. */ metadata: wix_billing_backend.PriceQuotes.MetaData; /** * Price quote company ID. */ companyId: string; /** * Price quote invoice ID, when converting price quote to invoice. */ invoiceId: string; /** * Dates associated with the price quote. */ dates: wix_billing_backend.PriceQuotes.PriceQuoteDates; }; /** * An object that contains date information for a price quote. */ type PriceQuoteDates = { /** * Date the price quote was issued. */ issueDate: Date; /** * Date that the price quote is valid until. */ validThroughDate: Date; /** * Date the price quote was accepted. */ acceptanceDate?: Date; /** * Date the price quote was last seen. */ lastSeenDate?: Date; }; /** * An object that contains information used when creating or updating a price quote. */ type PriceQuoteInfo = { /** * Price quote ID, as a UUID. */ id?: string; /** * Title of the price quote. */ title: string; /** * Customer listed on the price quote. */ customer: wix_billing_backend.PriceQuotes.Customer; /** * Currency code. */ currency: string; /** * Line items listed on the price quote. */ lineItems: wix_billing_backend.PriceQuotes.LineItem[]; /** * Discount included in the price quote. */ discount?: wix_billing_backend.PriceQuotes.Discount; /** * Payment terms. */ paymentTerms: wix_billing_backend.PriceQuotes.PaymentTerms; /** * Price quote metadata. */ metadata?: wix_billing_backend.PriceQuotes.MetaData; /** * Dates associated with the price quote. */ dates: wix_billing_backend.PriceQuotes.PriceQuoteDates; }; /** * An object that contains response information. */ type Response = { /** * ID and version information. */ id: wix_billing_backend.PriceQuotes.IdAndVersion; }; /** * An object that contains street address information. */ type StreetAddress = { /** * Street address information. */ value: string; /** * Street address type. Either `"Number"` or `"Name"`. */ type: string; }; /** * An object that contains price totals. */ type TotalPrice = { /** * Discount amount. */ discountAmount: number; /** * List of itemized fees. */ fees: wix_billing_backend.PriceQuotes.ItemizedFee[]; /** * Sum of line item tax amounts. */ taxedAmount: number; /** * Subtotal of the line items without the tax included. */ subtotal: number; /** * Total price of the itemized fees and taxes. */ total: number; }; } } declare namespace wix_blog_backend.Categories { /** * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Categories.CategoriesQueryBuilder.html#) */ interface CategoriesQueryBuilder { /** * Adds a sort to a query, sorting by the specified properties in ascending order. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Categories.CategoriesQueryBuilder.html#ascending) */ ascending(propertyNames: Array): wix_blog_backend.Categories.CategoriesQueryBuilder; /** * Adds a sort to a query, sorting by the specified properties in descending order. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Categories.CategoriesQueryBuilder.html#descending) */ descending(propertyNames: Array): wix_blog_backend.Categories.CategoriesQueryBuilder; /** * Refines a query to match items where the specified property equals the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Categories.CategoriesQueryBuilder.html#eq) */ eq(propertyName: string, value: any): wix_blog_backend.Categories.CategoriesQueryBuilder; /** * Returns the filtered query results. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Categories.CategoriesQueryBuilder.html#find) */ find(): Promise; /** * Refines a query to match items where the specified property is greater than or equal to the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Categories.CategoriesQueryBuilder.html#ge) */ ge(propertyName: string, value: any): wix_blog_backend.Categories.CategoriesQueryBuilder; /** * Refines a query to match items where the specified property is greater than the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Categories.CategoriesQueryBuilder.html#gt) */ gt(propertyName: string, value: any): wix_blog_backend.Categories.CategoriesQueryBuilder; /** * Refines a query to match items whose specified property contains any of the specified values. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Categories.CategoriesQueryBuilder.html#hasSome) */ hasSome(propertyName: string, value: Array): wix_blog_backend.Categories.CategoriesQueryBuilder; /** * Refines a query to match items where the specified property is less than or equal to the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Categories.CategoriesQueryBuilder.html#le) */ le(propertyName: string, value: any): wix_blog_backend.Categories.CategoriesQueryBuilder; /** * Limits the number of items the query returns. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Categories.CategoriesQueryBuilder.html#limit) */ limit(limit: number): wix_blog_backend.Categories.CategoriesQueryBuilder; /** * Refines a query to match items where the specified property is less than the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Categories.CategoriesQueryBuilder.html#lt) */ lt(propertyName: string, value: any): wix_blog_backend.Categories.CategoriesQueryBuilder; /** * Refines a query to match items where the specified property doesn't equal the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Categories.CategoriesQueryBuilder.html#ne) */ ne(propertyName: string, value: any): wix_blog_backend.Categories.CategoriesQueryBuilder; /** * Sets the number of items to skip before returning query results. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Categories.CategoriesQueryBuilder.html#skip) */ skip(skip: number): wix_blog_backend.Categories.CategoriesQueryBuilder; /** * Refines a query to match items where the specified property starts with the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Categories.CategoriesQueryBuilder.html#startsWith) */ startsWith(propertyName: string, value: string): wix_blog_backend.Categories.CategoriesQueryBuilder; } /** * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Categories.CategoriesQueryResult.html#) */ interface CategoriesQueryResult { /** * Returns the index of the current page of results. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Categories.CategoriesQueryResult.html#currentPage) */ currentPage: number; /** * Returns an array of `categories` items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Categories.CategoriesQueryResult.html#items) */ items: Array; /** * Returns the number of items in the current page of results. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Categories.CategoriesQueryResult.html#length) */ length: number; /** * Returns the requested page size. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Categories.CategoriesQueryResult.html#pageSize) */ pageSize: number; /** * Returns the `CategorysQueryBuilder` object used to get the current results. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Categories.CategoriesQueryResult.html#query) */ query: wix_blog_backend.Categories.CategoriesQueryBuilder; /** * Returns the total number of items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Categories.CategoriesQueryResult.html#totalCount) */ totalCount: number; /** * Returns the total number of pages the query produced. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Categories.CategoriesQueryResult.html#totalPages) */ totalPages: number; /** * Indicates whether the query has more results. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Categories.CategoriesQueryResult.html#hasNext) */ hasNext(): boolean; /** * Indicates whether the query has previous results. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Categories.CategoriesQueryResult.html#hasPrev) */ hasPrev(): boolean; /** * Retrieves the next page of query results. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Categories.CategoriesQueryResult.html#next) */ next(): Promise; /** * Retrieves the previous page of query results. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Categories.CategoriesQueryResult.html#prev) */ prev(): Promise; } } declare namespace wix_blog_backend { /** * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Categories.html#) */ interface Categories { /** * Gets a category by the specified ID. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Categories.html#getCategory) */ getCategory(categoryId: string, options: wix_blog_backend.Categories.GetCategoryOptions): Promise; /** * Gets a category by the specified slug. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Categories.html#getCategoryBySlug) */ getCategoryBySlug(slug: string, options: wix_blog_backend.Categories.GetCategoryBySlugOptions): Promise; /** * Retrieves a list of categories. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Categories.html#listCategories) */ listCategories(options: wix_blog_backend.Categories.ListCategoriesOptions): Promise; /** * Creates a query to retrieve a list of categories. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Categories.html#queryCategories) */ queryCategories(): wix_blog_backend.Categories.CategoriesQueryBuilder; } namespace Categories { type ApplicationError = { code?: string; data?: Object; description?: string; }; type BlogPaging = { /** * Pointer to the next or previous page in the list of results. */ cursor?: string; /** * Number of items to return. * * Default: `50` * * Max: `100` */ limit?: number; /** * Number of categories to skip in the list. */ offset?: number; }; type BulkActionMetadata = { /** * Number of items that couldn't be processed. */ totalFailures?: number; /** * Number of items that were successfully processed. */ totalSuccesses?: number; /** * Number of failures without details because detailed failure threshold was exceeded. */ undetailedFailures?: number; }; type BulkCategoryResult = { /** * Optional created category. */ item?: wix_blog_backend.Categories.Category; /** * Bulk actions metadata for category. */ itemMetadata?: wix_blog_backend.Categories.ItemMetadata; }; type BulkCreateCategoriesOptions = { /** * List of additional category fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in * the response in addition to the category’s base fields. Base fields don’t include any of the supported fieldset values. By default * only the category’s base fields are returned. */ fieldsets?: Array; /** * Whether to return the full created category entities in the response. */ returnFullEntity?: boolean; }; type BulkCreateCategoriesRequest = { /** * Categories to create. */ categories: Array; /** * List of additional category fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in * the response in addition to the category’s base fields. Base fields don’t include any of the supported fieldset values. By default * only the category’s base fields are returned. */ fieldsets?: Array; /** * Whether to return the full created category entities in the response. */ returnFullEntity?: boolean; }; type BulkCreateCategoriesResponse = { /** * Bulk action metadata. */ bulkActionMetadata?: wix_blog_backend.Categories.BulkActionMetadata; /** * Categories created by bulk action. */ results?: Array; }; type BulkUpdateCategoriesOptions = { /** * Field mask of fields to update. */ fieldMask?: Array; /** * List of category fields to be included in the response if the entities are present. * Base default fieldset returns all core category properties (all properties that are not a supported fieldset value). * For example, when `URL` fieldset is selected, returned category will include the set of base properties and the category's preview url. */ fieldsets?: Array; /** * Whether to return the full created category entities in the response. */ returnFullEntity?: boolean; }; type BulkUpdateCategoriesRequest = { /** * Categories to update. */ categories: Array; /** * Field mask of fields to update. */ fieldMask?: Array; /** * List of category fields to be included in the response if the entities are present. * Base default fieldset returns all core category properties (all properties that are not a supported fieldset value). * For example, when `URL` fieldset is selected, returned category will include the set of base properties and the category's preview url. */ fieldsets?: Array; /** * Whether to return the full created category entities in the response. */ returnFullEntity?: boolean; }; type BulkUpdateCategoriesResponse = { /** * Bulk action metadata. */ bulkActionMetadata?: wix_blog_backend.Categories.BulkActionMetadata; /** * Categories updated by bulk action. */ results?: Array; }; type Category = { /** * Category ID. */ _id?: string; /** * Category cover image. */ coverImage?: string; /** * Reserved for internal use. */ coverMedia?: wix_blog_backend.Categories.CoverMedia; /** * Category description. */ description?: string; /** * Position of the category in the [Category Menu](https://support.wix.com/en/article/wix-blog-adding-and-customizing-a-category-menu). Categories with lower display position are displayed first. */ displayPosition?: number; /** * Reserved for internal use. */ internalId?: string; /** * Category label. Displayed in the Category Menu. */ label?: string; /** * Category Language. * * 2-letter language code in [ISO 639-1 format](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes). */ language?: string; /** * Reserved for internal use. */ oldRank?: number; /** * Number of posts in the category. */ postCount?: number; /** * Reserved for internal use. */ rank?: number; /** * SEO data. */ seoData?: wix_blog_backend.Categories.SeoSchema; /** * Part of a category's URL that refers to a specific category. * * For example, `'https:/example.com/blog/category/{my-category-slug}'`. */ slug?: string; /** * Category title. */ title?: string; /** * ID of the category's translations when [Wix Multilingual](https://wix.wixanswers.com/app/kb/article/36837a9d-5d22-4fa1-9a80-1b99b7f82b5e/en) is installed on a site. All translations of a single category will share the same `translationId`. */ translationId?: string; /** * Category URL. * * The `url` directs you to a page that lists every post with the specified category. */ url?: string; }; type CoverMedia = { /** * If `false`, the cover image is the first media item appearing in the content. */ custom?: boolean; /** * Whether cover media is displayed. */ displayed?: boolean; /** * Is cover media enabled. * Selected by user whether to display cover media on the feed */ enabled?: boolean; /** * Image url. */ image?: string; /** * Video url. */ video?: string; }; type CoverMediaMediaOneOf = { /** * Image url. */ image?: string; /** * Video url. */ video?: string; }; type CreateCategoryOptions = { /** * List of additional category fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in * the response in addition to the category’s base fields. Base fields don’t include any of the supported fieldset values. By default * only the category’s base fields are returned. */ fieldsets?: Array; }; type CreateCategoryRequest = { /** * Category info. */ category: wix_blog_backend.Categories.Category; /** * List of additional category fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in * the response in addition to the category’s base fields. Base fields don’t include any of the supported fieldset values. By default * only the category’s base fields are returned. */ fieldsets?: Array; }; type CreateCategoryResponse = { /** * Category info. */ category?: wix_blog_backend.Categories.Category; }; type CursorPaging = { /** * Pointer to the next or previous page in the list of results. * * You can get the relevant cursor token * from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. */ cursor?: string; /** * Number of items to load. */ limit?: number; }; type Cursors = { /** * Cursor pointing to next page in the list of results. */ next?: string; /** * Cursor pointing to previous page in the list of results. */ prev?: string; }; type DeleteCategoryRequest = { /** * Category ID. */ categoryId: string; }; type DeleteCategoryResponse = {}; type GetCategoryBySlugOptions = { /** * List of category fields to be included in the response. By default, any fields not passed are not returned. * * Supported Values: * `"SEO"` and `"URL"`. */ fieldsets?: Array; }; type GetCategoryBySlugRequest = { /** * __Deprecated.__ Use `fieldsets` instead. * * This parameter will be removed on June 30, 2023. * List of category fields to be included in the response. */ fieldsToInclude?: Array; /** * List of additional category fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in * the response in addition to the category’s base fields. Base fields don’t include any of the supported fieldset values. By default * only the category’s base fields are returned. */ fieldsets?: Array; /** * Slug of the category to retrieve. */ slug: string; }; type GetCategoryBySlugResponse = { /** * Category info. */ category?: wix_blog_backend.Categories.Category; }; type GetCategoryOptions = { /** * List of category fields to be included in the response. By default, any fields not passed are not returned. * * Supported Values: * `"SEO"` and `"URL"`. */ fieldsets?: Array; }; type GetCategoryRequest = { /** * Category ID. */ categoryId: string; /** * __Deprecated.__ Use `fieldsets` instead. * This parameter will be removed on June 30, 2023. * * List of category fields to be included in the response. */ fieldsToInclude?: Array; /** * List of additional category fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in * the response in addition to the category’s base fields. Base fields don’t include any of the supported fieldset values. By default * only the category’s base fields are returned. */ fieldsets?: Array; }; type GetCategoryResponse = { /** * Category info. */ category?: wix_blog_backend.Categories.Category; }; type InitialCategoriesCopied = { /** * Number of categories copied. */ count?: number; }; type ItemMetadata = { /** * Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */ _id?: string; /** * Details about the error in case of failure. */ error?: wix_blog_backend.Categories.ApplicationError; /** * Index of the item within the request array. Allows for correlation between request and response items. */ originalIndex?: number; /** * Whether the requested action was successful for this item. When `false`, the `error` field is populated. */ success?: boolean; }; type ListCategoriesOptions = { /** * List of category fields to be included in the response. By default, any fields not passed are not returned. * * Supported Values: * `"SEO"` and `"URL"`. */ fieldsets?: Array; /** * Pagination options. */ paging?: wix_blog_backend.Categories.BlogPaging; }; type ListCategoriesRequest = { /** * __Deprecated.__ Use `fieldsets` instead. * * This parameter will be removed on June 30, 2023. * * List of category fields to be included in the response. */ fieldsToInclude?: Array; /** * List of additional category fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in * the response in addition to the category’s base fields. Base fields don’t include any of the supported fieldset values. By default * only the category’s base fields are returned. */ fieldsets?: Array; /** * Pagination options. */ paging?: wix_blog_backend.Categories.BlogPaging; }; type ListCategoriesResponse = { /** * List of categories. */ categories?: Array; /** * Details on the paged set of results returned. */ metaData?: wix_blog_backend.Categories.MetaData; }; type MetaData = { /** * Number of items returned in this response. */ count?: number; /** * Pointer to the next or previous page in the list of results. */ cursor?: string; /** * Number of items skipped. */ offset?: number; /** * Total number of items that match the query. */ total?: number; }; type Paging = { /** * Number of items to load. */ limit?: number; /** * Number of items to skip in the current sort order. */ offset?: number; }; type PagingMetadataV2 = { /** * Number of items returned in the response. */ count?: number; /** * Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */ cursors?: wix_blog_backend.Categories.Cursors; /** * Offset that was requested. */ offset?: number; /** * Flag that indicates the server failed to calculate the `total` field. */ tooManyToCount?: boolean; /** * Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */ total?: number; }; type PlatformQuery = { /** * Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: wix_blog_backend.Categories.CursorPaging; /** * Filter object in the following format: * `"filter" : { * "fieldName1": "value1", * "fieldName2":{"$operator":"value2"} * }` * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains` */ filter?: Object; /** * Paging options to limit and skip the number of items. */ paging?: wix_blog_backend.Categories.Paging; /** * Sort object in the following format: * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]` */ sort?: Array; }; type PlatformQueryPagingMethodOneOf = { /** * Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: wix_blog_backend.Categories.CursorPaging; /** * Paging options to limit and skip the number of items. */ paging?: wix_blog_backend.Categories.Paging; }; type QueryCategoriesOptions = {}; type QueryCategoriesRequest = { /** * __Deprecated.__ Use `fieldsets` instead. * This parameter will be removed on June 30, 2023. * * List of category fields to be included in the response. */ fieldsToInclude?: Array; /** * List of additional category fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in * the response in addition to the category’s base fields. Base fields don’t include any of the supported fieldset values. By default * only the category’s base fields are returned. */ fieldsets?: Array; /** * __Deprecated.__ Use `query` instead. * This parameter will be removed on June 30, 2023. * * Filter object. */ filter?: Object; /** * __Deprecated.__ Use `query` instead. * This parameter will be removed on June 30, 2023. * * Pagination options. */ paging?: wix_blog_backend.Categories.BlogPaging; /** * Query options. */ query?: wix_blog_backend.Categories.PlatformQuery; /** * __Deprecated.__ Use `query` instead. * This parameter will be removed on June 3, 2023. * * Sorting options. */ sort?: Array; }; type QueryCategoriesResponse = { /** * List of categories. */ categories?: Array; /** * __Deprecated.__ Use `pagingMetadata` instead. * This property will be removed on June 30, 2023. * * Details on the paged set of results returned. */ metaData?: wix_blog_backend.Categories.MetaData; /** * Details on the paged set of results returned. */ pagingMetadata?: wix_blog_backend.Categories.PagingMetadataV2; }; type SeoSchema = { /** * SEO general settings. */ settings?: wix_blog_backend.Categories.Settings; /** * SEO tag information. */ tags?: Array; }; type Settings = { /** * Whether the auto redirects feature creating `301 redirects` on a slug change is enabled. * * Default: enabled */ preventAutoRedirect?: boolean; }; type Sorting = { /** * Name of the field to sort by. */ fieldName?: string; /** * Sort order. */ order?: string; }; type Tag = { /** * SEO tag inner content. For example, ` inner content `. */ children?: string; /** * Whether the tag is a custom tag. */ custom?: boolean; /** * Whether the tag is disabled. */ disabled?: boolean; /** * SEO tag meta data. For example, `{height: 300, width: 240}`. */ meta?: Object; /** * A `{'key':'value'} pair object where each SEO tag property (`'name'`, `'content'`, `'rel'`, `'href'`) contains a value. * For example: `{'name': 'description', 'content': 'the description itself'}`. */ props?: Object; /** * SEO tag type. * * Supported values: `title`, `meta`, `script`, `link`. */ type?: string; }; type UpdateCategory = { /** * Category ID. */ _id?: string; /** * Category cover image. */ coverImage?: string; /** * Reserved for internal use. */ coverMedia?: wix_blog_backend.Categories.CoverMedia; /** * Category description. */ description?: string; /** * Position of the category in the [Category Menu](https://support.wix.com/en/article/wix-blog-adding-and-customizing-a-category-menu). Categories with lower display position are displayed first. */ displayPosition?: number; /** * Reserved for internal use. */ internalId?: string; /** * Category label. Displayed in the Category Menu. */ label?: string; /** * Category Language. * * 2-letter language code in [ISO 639-1 format](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes). */ language?: string; /** * Reserved for internal use. */ oldRank?: number; /** * Number of posts in the category. */ postCount?: number; /** * Reserved for internal use. */ rank?: number; /** * SEO data. */ seoData?: wix_blog_backend.Categories.SeoSchema; /** * Part of a category's URL that refers to a specific category. * * For example, `'https:/example.com/blog/category/{my-category-slug}'`. */ slug?: string; /** * Category title. */ title?: string; /** * ID of the category's translations when [Wix Multilingual](https://wix.wixanswers.com/app/kb/article/36837a9d-5d22-4fa1-9a80-1b99b7f82b5e/en) is installed on a site. All translations of a single category will share the same `translationId`. */ translationId?: string; /** * Category URL. * * The `url` directs you to a page that lists every post with the specified category. */ url?: string; }; type UpdateCategoryOptions = { /** * Field mask of fields to update. */ fieldMask?: Array; /** * List of additional category fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in * the response in addition to the category’s base fields. Base fields don’t include any of the supported fieldset values. By default * only the category’s base fields are returned. */ fieldsets?: Array; }; type UpdateCategoryRequest = { /** * Category info. */ category: wix_blog_backend.Categories.Category; /** * Field mask of fields to update. */ fieldMask?: Array; /** * List of additional category fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in * the response in addition to the category’s base fields. Base fields don’t include any of the supported fieldset values. By default * only the category’s base fields are returned. */ fieldsets?: Array; }; type UpdateCategoryResponse = { /** * Category info. */ category?: wix_blog_backend.Categories.Category; }; } /** * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Events.html#) */ interface Events { /** * An event that is triggered when a category is created. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Events.html#onCategoryCreated) */ onCategoryCreated(event: wix_blog_backend.Events.blogV3CategoryCategoryCreated): void; /** * An event that is triggered when a category is deleted. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Events.html#onCategoryDeleted) */ onCategoryDeleted(event: wix_blog_backend.Events.blogV3CategoryCategoryDeleted): void; /** * An event that is triggered when a category is updated. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Events.html#onCategoryUpdated) */ onCategoryUpdated(event: wix_blog_backend.Events.blogV3CategoryCategoryUpdated): void; /** * An event that is triggered when a post is created. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Events.html#onPostCreated) */ onPostCreated(event: wix_blog_backend.Events.blogV3PostPostCreated): void; /** * An event that is triggered when a post is deleted. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Events.html#onPostDeleted) */ onPostDeleted(event: wix_blog_backend.Events.blogV3PostPostDeleted): void; /** * An event that is triggered when a post is liked. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Events.html#onPostLiked) */ onPostLiked(event: wix_blog_backend.Events.blogV3PostPostLikedEvent): void; /** * An event that is triggered when a post is unliked. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Events.html#onPostUnliked) */ onPostUnliked(event: wix_blog_backend.Events.blogV3PostPostUnlikedEvent): void; /** * An event that triggers when a post is updated. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Events.html#onPostUpdated) */ onPostUpdated(event: wix_blog_backend.Events.blogV3PostPostUpdated): void; /** * An event that is triggered when a tag is created. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Events.html#onTagCreated) */ onTagCreated(event: wix_blog_backend.Events.blogV3TagTagCreated): void; /** * An event that is triggered when a tag is deleted. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Events.html#onTagDeleted) */ onTagDeleted(event: wix_blog_backend.Events.blogV3TagTagDeleted): void; /** * Triggered when a tag is updated. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Events.html#onTagUpdated) */ onTagUpdated(event: wix_blog_backend.Events.blogV3TagTagUpdated): void; } namespace Events { type blogV3CategoryApplicationError = { code?: string; data?: Object; description?: string; }; type blogV3CategoryBackendEventMetadata = { /** * ID of the entity associated with the event. */ entityId: string; /** * Event timestamp. */ eventTime: string; /** * Event ID. */ id: string; /** * Whether the event was triggered as a result of a privacy regulation application (for example, [GDPR](https://support.wix.com/en/article/gdpr-frequently-asked-questions)). For advanced users. */ triggeredByAnonymizeRequest: boolean; }; type blogV3CategoryBlogPaging = { /** * Pointer to the next or previous page in the list of results. */ cursor?: string; /** * Number of items to return. * * Default:`50` */ limit?: number; /** * Number of items to skip in the current sort order. * * Default: `0` */ offset?: number; }; type blogV3CategoryBulkActionMetadata = { /** * Number of items that couldn't be processed. */ totalFailures?: number; /** * Number of items that were successfully processed. */ totalSuccesses?: number; /** * Number of failures without details because detailed failure threshold was exceeded. */ undetailedFailures?: number; }; type blogV3CategoryBulkCategoryResult = { /** * Optional created category. */ item?: wix_blog_backend.Events.blogV3CategoryCategory; /** * Bulk actions metadata for category. */ itemMetadata?: wix_blog_backend.Events.blogV3CategoryItemMetadata; }; type blogV3CategoryBulkCreateCategoriesRequest = { /** * Categories to create. */ categories: Array; /** * List of additional category fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in * the response in addition to the category’s base fields. Base fields don’t include any of the supported fieldset values. By default * only the category’s base fields are returned. */ fieldsets?: Array; /** * Whether to return the full created category entities in the response. */ returnFullEntity?: boolean; }; type blogV3CategoryBulkCreateCategoriesResponse = { /** * Bulk action metadata. */ bulkActionMetadata?: wix_blog_backend.Events.blogV3CategoryBulkActionMetadata; /** * Categories created by bulk action. */ results?: Array; }; type blogV3CategoryBulkUpdateCategoriesRequest = { /** * Categories to update. */ categories: Array; /** * Field mask of fields to update. */ fieldMask?: Array; /** * List of category fields to be included in the response if the entities are present. * Base default fieldset returns all core category properties (all properties that are not a supported fieldset value). * For example, when `URL` fieldset is selected, returned category will include the set of base properties and the category's preview url. */ fieldsets?: Array; /** * Whether to return the full created category entities in the response. */ returnFullEntity?: boolean; }; type blogV3CategoryBulkUpdateCategoriesResponse = { /** * Bulk action metadata. */ bulkActionMetadata?: wix_blog_backend.Events.blogV3CategoryBulkActionMetadata; /** * Categories updated by bulk action. */ results?: Array; }; type blogV3CategoryCategory = { /** * Category ID. */ _id?: string; /** * Category cover image. */ coverImage?: string; /** * __Deprecated.__ Use `coverImage` instead. * This property will be removed on June 30, 2023. * * Category cover image or video. */ coverMedia?: wix_blog_backend.Events.blogV3CategoryCoverMedia; /** * Category description. */ description?: string; /** * Category position in sequence. Categories with a lower display position are displayed first. Categories with a position of `-1` appear at the end of the sequence. * * Default: `-1` */ displayPosition?: number; /** * Reserved for internal use. */ internalId?: string; /** * Category label. Displayed in the Category Menu. */ label?: string; /** * Category language. * * Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */ language?: string; /** * Reserved for internal use. */ oldRank?: number; /** * Number of posts in the category. */ postCount?: number; /** * __Deprecated.__ Use `displayPosition` instead. * This property will be removed on June 30, 2023. * * Category position in sequence. */ rank?: number; /** * SEO data. */ seoData?: wix_blog_backend.Events.blogV3CategorySeoSchema; /** * Category slug. For example, `'category-slug'`. */ slug?: string; /** * Category title. */ title?: string; /** * ID of the category's translations. All translations of a single category share the same `translationId`. */ translationId?: string; /** * Category URL. */ url?: string; }; type blogV3CategoryCategoryCreated = { /** * Created category. */ entity: wix_blog_backend.Events.blogV3CategoryCategory; /** * Event metadata. */ metadata: wix_blog_backend.Events.blogV3CategoryBackendEventMetadata; }; type blogV3CategoryCategoryDeleted = { /** * Event metadata. */ metadata: wix_blog_backend.Events.blogV3CategoryBackendEventMetadata; }; type blogV3CategoryCategoryUpdated = { /** * Updated category. */ entity: wix_blog_backend.Events.blogV3CategoryCategory; /** * Event metadata. */ metadata: wix_blog_backend.Events.blogV3CategoryBackendEventMetadata; }; type blogV3CategoryCoverMedia = { /** * Whether cover media is custom. If `false` the cover image is set to the first media item that appears in the content. */ custom?: boolean; /** * Whether cover media is displayed. */ displayed?: boolean; /** * Is cover media enabled. * Selected by user whether to display cover media on the feed */ enabled?: boolean; /** * Image url. */ image?: string; /** * Video url. */ video?: string; }; type blogV3CategoryCoverMediaMediaOneOf = { /** * Image url. */ image?: string; /** * Video url. */ video?: string; }; type blogV3CategoryCreateCategoryRequest = { /** * Category info. */ category: wix_blog_backend.Events.blogV3CategoryCategory; /** * List of additional category fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in * the response in addition to the category’s base fields. Base fields don’t include any of the supported fieldset values. By default * only the category’s base fields are returned. */ fieldsets?: Array; }; type blogV3CategoryCreateCategoryResponse = { /** * Category info. */ category?: wix_blog_backend.Events.blogV3CategoryCategory; }; type blogV3CategoryCursorPaging = { /** * Pointer to the next or previous page in the list of results. * * You can get the relevant cursor token * from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. */ cursor?: string; /** * Number of items to load. */ limit?: number; }; type blogV3CategoryCursors = { /** * Cursor pointing to next page in the list of results. */ next?: string; /** * Cursor pointing to previous page in the list of results. */ prev?: string; }; type blogV3CategoryDeleteCategoryRequest = { /** * Category ID. */ categoryId: string; }; type blogV3CategoryDeleteCategoryResponse = {}; type blogV3CategoryGetCategoryBySlugRequest = { /** * __Deprecated.__ Use `fieldsets` instead. * * This parameter will be removed on June 30, 2023. * List of category fields to be included in the response. */ fieldsToInclude?: Array; /** * List of additional category fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in * the response in addition to the category’s base fields. Base fields don’t include any of the supported fieldset values. By default * only the category’s base fields are returned. */ fieldsets?: Array; /** * Slug of the category to retrieve. */ slug: string; }; type blogV3CategoryGetCategoryBySlugResponse = { /** * Category info. */ category?: wix_blog_backend.Events.blogV3CategoryCategory; }; type blogV3CategoryGetCategoryRequest = { /** * Category ID. */ categoryId: string; /** * __Deprecated.__ Use `fieldsets` instead. * This parameter will be removed on June 30, 2023. * * List of category fields to be included in the response. */ fieldsToInclude?: Array; /** * List of additional category fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in * the response in addition to the category’s base fields. Base fields don’t include any of the supported fieldset values. By default * only the category’s base fields are returned. */ fieldsets?: Array; }; type blogV3CategoryGetCategoryResponse = { /** * Category info. */ category?: wix_blog_backend.Events.blogV3CategoryCategory; }; type blogV3CategoryInitialCategoriesCopied = { /** * Number of categories copied. */ count?: number; }; type blogV3CategoryItemMetadata = { /** * Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */ _id?: string; /** * Details about the error in case of failure. */ error?: wix_blog_backend.Events.blogV3CategoryApplicationError; /** * Index of the item within the request array. Allows for correlation between request and response items. */ originalIndex?: number; /** * Whether the requested action was successful for this item. When `false`, the `error` field is populated. */ success?: boolean; }; type blogV3CategoryListCategoriesRequest = { /** * __Deprecated.__ Use `fieldsets` instead. * * This parameter will be removed on June 30, 2023. * * List of category fields to be included in the response. */ fieldsToInclude?: Array; /** * List of additional category fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in * the response in addition to the category’s base fields. Base fields don’t include any of the supported fieldset values. By default * only the category’s base fields are returned. */ fieldsets?: Array; /** * Pagination options. */ paging?: wix_blog_backend.Events.blogV3CategoryBlogPaging; }; type blogV3CategoryListCategoriesResponse = { /** * List of categories. */ categories?: Array; /** * Details on the paged set of results returned. */ metaData?: wix_blog_backend.Events.blogV3CategoryMetaData; }; type blogV3CategoryMetaData = { /** * Number of items returned in this response. */ count?: number; /** * Pointer to the next or previous page in the list of results. */ cursor?: string; /** * Requested offset. */ offset?: number; /** * Total number of items that match the query. */ total?: number; }; type blogV3CategoryPaging = { /** * Number of items to load. */ limit?: number; /** * Number of items to skip in the current sort order. */ offset?: number; }; type blogV3CategoryPagingMetadataV2 = { /** * Number of items returned in the response. */ count?: number; /** * Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */ cursors?: wix_blog_backend.Events.blogV3CategoryCursors; /** * Offset that was requested. */ offset?: number; /** * Flag that indicates the server failed to calculate the `total` field. */ tooManyToCount?: boolean; /** * Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */ total?: number; }; type blogV3CategoryPlatformQuery = { /** * Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: wix_blog_backend.Events.blogV3CategoryCursorPaging; /** * Filter object in the following format: * `"filter" : { * "fieldName1": "value1", * "fieldName2":{"$operator":"value2"} * }` * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains` */ filter?: Object; /** * Paging options to limit and skip the number of items. */ paging?: wix_blog_backend.Events.blogV3CategoryPaging; /** * Sort object in the following format: * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]` */ sort?: Array; }; type blogV3CategoryPlatformQueryPagingMethodOneOf = { /** * Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: wix_blog_backend.Events.blogV3CategoryCursorPaging; /** * Paging options to limit and skip the number of items. */ paging?: wix_blog_backend.Events.blogV3CategoryPaging; }; type blogV3CategoryQueryCategoriesRequest = { /** * __Deprecated.__ Use `fieldsets` instead. * This parameter will be removed on June 30, 2023. * * List of category fields to be included in the response. */ fieldsToInclude?: Array; /** * List of additional category fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in * the response in addition to the category’s base fields. Base fields don’t include any of the supported fieldset values. By default * only the category’s base fields are returned. */ fieldsets?: Array; /** * __Deprecated.__ Use `query` instead. * This parameter will be removed on June 30, 2023. * * Filter object. */ filter?: Object; /** * __Deprecated.__ Use `query` instead. * This parameter will be removed on June 30, 2023. * * Pagination options. */ paging?: wix_blog_backend.Events.blogV3CategoryBlogPaging; /** * Query options. */ query?: wix_blog_backend.Events.blogV3CategoryPlatformQuery; /** * __Deprecated.__ Use `query` instead. * This parameter will be removed on June 3, 2023. * * Sorting options. */ sort?: Array; }; type blogV3CategoryQueryCategoriesResponse = { /** * List of categories. */ categories?: Array; /** * __Deprecated.__ Use `pagingMetadata` instead. * This property will be removed on June 30, 2023. * * Details on the paged set of results returned. */ metaData?: wix_blog_backend.Events.blogV3CategoryMetaData; /** * Details on the paged set of results returned. */ pagingMetadata?: wix_blog_backend.Events.blogV3CategoryPagingMetadataV2; }; type blogV3CategorySeoSchema = { /** * SEO general settings. */ settings?: wix_blog_backend.Events.blogV3CategorySettings; /** * SEO tags information. */ tags?: Array; }; type blogV3CategorySettings = { /** * Whether the auto redirects feature creating `301 redirects` on a slug change is enabled. * * Default: enabled */ preventAutoRedirect?: boolean; }; type blogV3CategorySorting = { /** * Name of the field to sort by. */ fieldName?: string; /** * Sort order. */ order?: string; }; type blogV3CategoryTag = { /** * SEO tag inner content. For example, ` inner content `. */ children?: string; /** * Whether the tag is a custom tag. */ custom?: boolean; /** * Whether the tag is disabled. */ disabled?: boolean; /** * SEO tag meta data. For example, `{height: 300, width: 240}`. */ meta?: Object; /** * A `{'key':'value'} pair object where each SEO tag property (`'name'`, `'content'`, `'rel'`, `'href'`) contains a value. * For example: `{'name': 'description', 'content': 'the description itself'}`. */ props?: Object; /** * SEO tag type. * * Supported values: `title`, `meta`, `script`, `link`. */ type?: string; }; type blogV3CategoryUpdateCategoryRequest = { /** * Category info. */ category: wix_blog_backend.Events.blogV3CategoryCategory; /** * Field mask of fields to update. */ fieldMask?: Array; /** * List of additional category fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in * the response in addition to the category’s base fields. Base fields don’t include any of the supported fieldset values. By default * only the category’s base fields are returned. */ fieldsets?: Array; }; type blogV3CategoryUpdateCategoryResponse = { /** * Category info. */ category?: wix_blog_backend.Events.blogV3CategoryCategory; }; type blogV3PostAnchorData = { /** * The target node's ID. */ anchor?: string; }; type blogV3PostAppEmbedData = { /** * Data for embedded Wix Bookings content. */ bookingData?: wix_blog_backend.Events.blogV3PostBookingData; /** * Data for embedded Wix Events content. */ eventData?: wix_blog_backend.Events.blogV3PostEventData; /** * An image for the embedded content. */ image?: wix_blog_backend.Events.blogV3PostMedia; /** * Deprecated: Use `image` instead. */ imageSrc?: string; /** * The ID of the embedded content. */ itemId?: string; /** * The name of the embedded content. */ name?: string; /** * The type of Wix App content being embedded. */ type?: string; /** * The URL for the embedded content. */ url?: string; }; type blogV3PostAppEmbedDataAppDataOneOf = { /** * Data for embedded Wix Bookings content. */ bookingData?: wix_blog_backend.Events.blogV3PostBookingData; /** * Data for embedded Wix Events content. */ eventData?: wix_blog_backend.Events.blogV3PostEventData; }; type blogV3PostAudioData = { /** * Audio file details. */ audio?: wix_blog_backend.Events.blogV3PostMedia; /** * Author name. */ authorName?: string; /** * Styling for the audio node's container. */ containerData?: wix_blog_backend.Events.blogV3PostPluginContainerData; /** * Cover image. */ coverImage?: wix_blog_backend.Events.blogV3PostMedia; /** * Sets whether the audio node's download button is disabled. */ disableDownload?: boolean; /** * An HTML version of the audio node. */ html?: string; /** * Track name. */ name?: string; }; type blogV3PostBackendEventMetadata = { /** * ID of the entity associated with the event. */ entityId: string; /** * Event timestamp. */ eventTime: string; /** * Event ID. */ id: string; /** * Whether the event was triggered as a result of a privacy regulation application (for example, [GDPR](https://support.wix.com/en/article/gdpr-frequently-asked-questions)). For advanced users. */ triggeredByAnonymizeRequest: boolean; }; type blogV3PostBackground = { /** * The background color as a hexademical value. */ color?: string; /** * Details for a gradient background. */ gradient?: wix_blog_backend.Events.blogV3PostGradient; /** * An image to use for the background. */ image?: wix_blog_backend.Events.blogV3PostMedia; /** * Background type. For each option, include the relevant details. */ type?: string; }; type blogV3PostBackgroundBackgroundOneOf = { /** * The background color as a hexademical value. */ color?: string; /** * Details for a gradient background. */ gradient?: wix_blog_backend.Events.blogV3PostGradient; /** * An image to use for the background. */ image?: wix_blog_backend.Events.blogV3PostMedia; }; type blogV3PostBlockquoteData = { /** * Indentation level. */ indentation?: number; }; type blogV3PostBlogCursorPaging = { /** * Pointer to the next or previous page in the list of results. */ cursor?: string; /** * Number of items to load. */ limit?: number; }; type blogV3PostBlogMedia = { /** * Whether custom cover media has been specified. If `false`, the first media item in the post's content serves as cover media. */ custom?: boolean; /** * Whether cover media is displayed. */ displayed?: boolean; /** * Embed media details. */ embedMedia?: wix_blog_backend.Events.blogV3PostEmbedMedia; /** * Wix Media details. */ wixMedia?: wix_blog_backend.Events.blogV3PostWixMedia; }; type blogV3PostBlogMediaMediaOneOf = { /** * Embed media details. */ embedMedia?: wix_blog_backend.Events.blogV3PostEmbedMedia; /** * Wix Media details. */ wixMedia?: wix_blog_backend.Events.blogV3PostWixMedia; }; type blogV3PostBlogPaging = { /** * Pointer to the next or previous page in the list of results. */ cursor?: string; /** * Number of items to return. * * Default:`50` */ limit?: number; /** * Number of items to skip in the current sort order. * * Default: `0` */ offset?: number; }; type blogV3PostBookingData = { /** * Booking duration in minutes. */ durations?: string; }; type blogV3PostBorder = { /** * Border radius in pixels. */ radius?: number; /** * Border width in pixels. */ width?: number; }; type blogV3PostBorderColors = { /** * Bottom border color as a hexadecimal value. */ bottom?: string; /** * Left border color as a hexadecimal value. */ left?: string; /** * Right border color as a hexadecimal value. */ right?: string; /** * Top border color as a hexadecimal value. */ top?: string; }; type blogV3PostBulkGetPostMetricsRequest = { /** * Post IDs. */ postIds: Array; }; type blogV3PostBulkGetPostMetricsResponse = { /** * Map of post.id to metrics */ metrics?: Record; }; type blogV3PostBulkGetPostReactionsRequest = { /** * Post IDs. */ postIds: Array; }; type blogV3PostBulkGetPostReactionsResponse = { /** * Map of post.id to reactions */ reactionsMap?: Record; }; type blogV3PostBulletedListData = { /** * Indentation level. */ indentation?: number; }; type blogV3PostButtonData = { /** * Styling for the button's container. */ containerData?: wix_blog_backend.Events.blogV3PostPluginContainerData; /** * Button link details. */ link?: wix_blog_backend.Events.blogV3PostLink; /** * Styling for the button. */ styles?: wix_blog_backend.Events.blogV3PostStyles; /** * The text to display on the button. */ text?: string; /** * The button type. */ type?: string; }; type blogV3PostCategory = { /** * Category ID. */ _id?: string; /** * Category cover image. */ coverImage?: string; /** * __Deprecated.__ Use `coverImage` instead. * This property will be removed on June 30, 2023. * * Category cover image or video. */ coverMedia?: wix_blog_backend.Events.blogV3PostCoverMedia; /** * Category description. */ description?: string; /** * Category position in sequence. Categories with a lower display position are displayed first. Categories with a position of `-1` appear at the end of the sequence. * * Default: `-1` */ displayPosition?: number; /** * Reserved for internal use. */ internalId?: string; /** * Category label. Displayed in the Category Menu. */ label?: string; /** * Category language. * * Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */ language?: string; /** * Reserved for internal use. */ oldRank?: number; /** * Number of posts in the category. */ postCount?: number; /** * __Deprecated.__ Use `displayPosition` instead. * This property will be removed on June 30, 2023. * * Category position in sequence. */ rank?: number; /** * SEO data. */ seoData?: wix_blog_backend.Events.blogV3PostSeoSchema; /** * Category slug. For example, `'category-slug'`. */ slug?: string; /** * Category title. */ title?: string; /** * ID of the category's translations. All translations of a single category share the same `translationId`. */ translationId?: string; /** * Category URL. */ url?: string; }; type blogV3PostCellStyle = { /** * Cell background color as a hexadecimal value. */ backgroundColor?: string; /** * Vertical alignment for the cell's text. */ verticalAlignment?: string; }; type blogV3PostCodeBlockData = { /** * Styling for the code block's text. */ textStyle?: wix_blog_backend.Events.blogV3PostTextStyle; }; type blogV3PostCollapsibleListData = { /** * Styling for the collapsible list's container. */ containerData?: wix_blog_backend.Events.blogV3PostPluginContainerData; /** * The direction of the text in the list. Either left-to-right or right-to-left. */ direction?: string; /** * If `true`, only one item can be expanded at a time. */ expandOnlyOne?: boolean; /** * Sets which items are expanded when the page loads. */ initialExpandedItems?: string; /** * If `true`, The collapsible item will appear in search results as an FAQ. */ isQapageData?: boolean; }; type blogV3PostColorData = { /** * The text's background color as a hexadecimal value. */ background?: string; /** * The text's foreground color as a hexadecimal value. */ foreground?: string; }; type blogV3PostColors = { /** * The background color as a hexadecimal value. */ background?: string; /** * The border color as a hexadecimal value. */ border?: string; /** * The text color as a hexadecimal value. */ text?: string; }; type blogV3PostCoverMedia = { /** * Whether cover media is custom. If `false` the cover image is set to the first media item that appears in the content. */ custom?: boolean; /** * Whether cover media is displayed. */ displayed?: boolean; /** * Is cover media enabled. * Selected by user whether to display cover media on the feed */ enabled?: boolean; /** * Image url. */ image?: string; /** * Video url. */ video?: string; }; type blogV3PostCoverMediaMediaOneOf = { /** * Image url. */ image?: string; /** * Video url. */ video?: string; }; type blogV3PostCreateDraftPostFromTemplateRequest = { /** * Post template id */ postTemplateId: string; }; type blogV3PostCreateDraftPostFromTemplateResponse = { /** * Created draft post */ draftPost?: wix_blog_backend.Events.blogV3PostDraftPost; }; type blogV3PostCursorMetaData = { /** * Cursor pointing to next result page. */ next?: string; }; type blogV3PostCursorPaging = { /** * Pointer to the next or previous page in the list of results. * * You can get the relevant cursor token * from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. */ cursor?: string; /** * Number of items to load. */ limit?: number; }; type blogV3PostCursors = { /** * Cursor pointing to next page in the list of results. */ next?: string; /** * Cursor pointing to previous page in the list of results. */ prev?: string; }; type blogV3PostDecoration = { /** * Data for an anchor link decoration. */ anchorData?: wix_blog_backend.Events.blogV3PostAnchorData; /** * Data for a color decoration. */ colorData?: wix_blog_backend.Events.blogV3PostColorData; /** * Data for a font size decoration. */ fontSizeData?: wix_blog_backend.Events.blogV3PostFontSizeData; /** * Font weight for a bold decoration. */ fontWeightValue?: number; /** * Data for an italic decoration. */ italicData?: boolean; /** * Data for an external link decoration. */ linkData?: wix_blog_backend.Events.blogV3PostLinkData; /** * Data for a mention decoration. */ mentionData?: wix_blog_backend.Events.blogV3PostMentionData; /** * The type of decoration to apply. */ type?: string; /** * Data for an underline decoration. */ underlineData?: boolean; }; type blogV3PostDecorationDataOneOf = { /** * Data for an anchor link decoration. */ anchorData?: wix_blog_backend.Events.blogV3PostAnchorData; /** * Data for a color decoration. */ colorData?: wix_blog_backend.Events.blogV3PostColorData; /** * Data for a font size decoration. */ fontSizeData?: wix_blog_backend.Events.blogV3PostFontSizeData; /** * Font weight for a bold decoration. */ fontWeightValue?: number; /** * Data for an italic decoration. */ italicData?: boolean; /** * Data for an external link decoration. */ linkData?: wix_blog_backend.Events.blogV3PostLinkData; /** * Data for a mention decoration. */ mentionData?: wix_blog_backend.Events.blogV3PostMentionData; /** * Data for an underline decoration. */ underlineData?: boolean; }; type blogV3PostDesign = { /** * Styling for voting options. */ options?: wix_blog_backend.Events.blogV3PostOptionDesign; /** * Styling for the poll. */ poll?: wix_blog_backend.Events.blogV3PostPollDesign; }; type blogV3PostDimensions = { /** * An array representing the minimum width of each column in pixels. */ colsMinWidth?: Array; /** * An array representing relative width of each column in relation to the other columns. */ colsWidthRatio?: Array; /** * An array representing the height of each row in pixels. */ rowsHeight?: Array; }; type blogV3PostDividerData = { /** * Divider alignment. */ alignment?: string; /** * Styling for the divider's container. */ containerData?: wix_blog_backend.Events.blogV3PostPluginContainerData; /** * Divider line style. */ lineStyle?: string; /** * Divider width. */ width?: string; }; type blogV3PostDocumentStyle = { /** * Styling for block quote nodes. */ blockquote?: wix_blog_backend.Events.blogV3PostTextNodeStyle; /** * Styling for code block nodes. */ codeBlock?: wix_blog_backend.Events.blogV3PostTextNodeStyle; /** * Styling for H5 nodes. */ headerFive?: wix_blog_backend.Events.blogV3PostTextNodeStyle; /** * Styling for H4 nodes. */ headerFour?: wix_blog_backend.Events.blogV3PostTextNodeStyle; /** * Styling for H1 nodes. */ headerOne?: wix_blog_backend.Events.blogV3PostTextNodeStyle; /** * Styling for H6 nodes. */ headerSix?: wix_blog_backend.Events.blogV3PostTextNodeStyle; /** * Styling for H3 nodes. */ headerThree?: wix_blog_backend.Events.blogV3PostTextNodeStyle; /** * Styling for H2 nodes. */ headerTwo?: wix_blog_backend.Events.blogV3PostTextNodeStyle; /** * Styling for paragraph nodes. */ paragraph?: wix_blog_backend.Events.blogV3PostTextNodeStyle; }; type blogV3PostDraftPost = { /** * Date the draft post was first created. */ _createdDate?: Date; /** * Draft post ID. */ _id?: string; /** * Category IDs of the draft post. */ categoryIds?: Array; /** * Reserved for internal use. */ changeOrigin?: string; /** * Whether commenting on the draft post is enabled. */ commentingEnabled?: boolean; /** * Reserved for internal use. */ content?: Object; /** * Reserved for internal use. */ contentId?: string; /** * Date the draft post was last edited. */ editedDate?: Date; /** * Reserved for internal use. */ editingSessionId?: string; /** * Draft post excerpt. * * If no excerpt has been manually set, an excerpt is automatically generated from the post's text. * This can be retrieved using the `GENERATED_EXCERPT` fieldset. */ excerpt?: string; /** * Whether the draft post is marked as featured. */ featured?: boolean; /** * Date the post was first published. */ firstPublishedDate?: Date; /** * Indicates if there are changes made to the draft post that have not yet been published. */ hasUnpublishedChanges?: boolean; /** * Hashtags in the post. */ hashtags?: Array; /** * Image placed at the top of the blog page. */ heroImage?: string; /** * Reserved for internal use. */ internalId?: string; /** * Language the draft post is written in. * * 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */ language?: string; /** * Post cover media. */ media?: wix_blog_backend.Events.blogV3PostBlogMedia; /** * Draft post owner's member ID. */ memberId?: string; /** * Estimated reading time of the draft post (calculated automatically). */ minutesToRead?: number; /** * Details of the draft post in review. Only relevant to posts submitted by guest writers. */ moderationDetails?: wix_blog_backend.Events.blogV3PostModerationDetails; /** * Reserved for internal use. */ mostRecentContributorId?: string; /** * Reserved for internal use. */ paidContentParagraph?: number; /** * Number of paragraphs to display in a paid content preview for non-paying users. */ previewTextParagraph?: number; /** * [Pricing plan IDs](https://dev.wix.com/api/rest/wix-pricing-plans). Only relevant if a post is assigned to a specific pricing plan. */ pricingPlanIds?: Array; /** * IDs of posts related to this draft post. */ relatedPostIds?: Array; /** * Draft Post rich content. */ richContent?: wix_blog_backend.Events.blogV3PostRichContent; /** * Date the draft post is scheduled to be published. */ scheduledPublishDate?: Date; /** * SEO data. */ seoData?: wix_blog_backend.Events.blogV3PostSeoSchema; /** * SEO slug. */ seoSlug?: string; /** * Reserved for internal use. */ slugs?: Array; /** * Status of the draft post. */ status?: string; /** * Tag IDs the draft post is tagged with. */ tagIds?: Array; /** * Draft post title. */ title?: string; /** * ID of the draft post's translations. * * All translations of a single post share the same `translationId`. */ translationId?: string; /** * Draft post URL preview. What the URL will look like once the post is published. */ url?: string; }; type blogV3PostDraftPostTranslation = { /** * Post ID. */ _id?: string; /** * Language the post is written in. */ language?: string; /** * SEO data. */ seoData?: wix_blog_backend.Events.blogV3PostSeoSchema; /** * Post slug. For example, 'post-slug'. */ slug?: string; /** * Post status. */ status?: string; /** * Post URL. */ url?: string; }; type blogV3PostEmbedData = { /** * Styling for the oEmbed node's container. */ containerData?: wix_blog_backend.Events.blogV3PostPluginContainerData; /** * An [oEmbed](https://www.oembed.com) object. */ oembed?: wix_blog_backend.Events.blogV3PostOembed; /** * Origin asset source. */ src?: string; }; type blogV3PostEmbedMedia = { /** * Thumbnail details. */ thumbnail?: wix_blog_backend.Events.blogV3PostEmbedThumbnail; /** * Video details. */ video?: wix_blog_backend.Events.blogV3PostEmbedVideo; }; type blogV3PostEmbedThumbnail = { /** * Thumbnail height. */ height?: number; /** * Thumbnail url. */ url?: string; /** * Thumbnail width. */ width?: number; }; type blogV3PostEmbedVideo = { /** * Video height. */ height?: number; /** * Video url. */ url?: string; /** * Video width. */ width?: number; }; type blogV3PostEventData = { /** * Event location. */ location?: string; /** * Event schedule. */ scheduling?: string; }; type blogV3PostFileData = { /** * Styling for the file's container. */ containerData?: wix_blog_backend.Events.blogV3PostPluginContainerData; /** * File MIME type. */ mimeType?: string; /** * File name. */ name?: string; /** * File path. */ path?: string; /** * Settings for PDF files. */ pdfSettings?: wix_blog_backend.Events.blogV3PostPdfSettings; /** * File size in KB. */ size?: number; /** * The source for the file's data. */ src?: wix_blog_backend.Events.blogV3PostFileSource; /** * File type. */ type?: string; }; type blogV3PostFileSource = { /** * An ID that's resolved to a URL by a resolver function. */ _id?: string; /** * Custom ID. Use `id` instead. */ custom?: string; /** * Indicates whether the file's source is private. */ private?: boolean; /** * The absolute URL for the file's source. */ url?: string; }; type blogV3PostFileSourceDataOneOf = { /** * An ID that's resolved to a URL by a resolver function. */ _id?: string; /** * Custom ID. Use `id` instead. */ custom?: string; /** * The absolute URL for the file's source. */ url?: string; }; type blogV3PostFontSizeData = { /** * The units used for the font size. */ unit?: string; /** * Font size value. */ value?: number; }; type blogV3PostGalleryData = { /** * Styling for the gallery's container. */ containerData?: wix_blog_backend.Events.blogV3PostPluginContainerData; /** * Sets whether the gallery's download button is disabled. */ disableDownload?: boolean; /** * Sets whether the gallery's expand button is disabled. */ disableExpand?: boolean; /** * The items in the gallery. */ items?: Array; /** * Options for defining the gallery's appearance. */ options?: wix_blog_backend.Events.blogV3PostGalleryOptions; }; type blogV3PostGalleryOptions = { /** * Styling for gallery items. */ item?: wix_blog_backend.Events.blogV3PostItemStyle; /** * Gallery layout. */ layout?: wix_blog_backend.Events.blogV3PostLayout; /** * Styling for gallery thumbnail images. */ thumbnails?: wix_blog_backend.Events.blogV3PostThumbnails; }; type blogV3PostGetPostBySlugRequest = { /** * __Deprecated.__ Use `fieldsets` instead. * This parameter will be removed on June 30, 2023. * * List of post fields to be included in the response. */ fieldsToInclude?: Array; /** * List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in * the response in addition to the post’s base fields. Base fields don’t include any of the supported fieldset values. By default * only the post’s base fields are returned. */ fieldsets?: Array; /** * Slug of the post to retrieve. */ slug: string; }; type blogV3PostGetPostBySlugResponse = { /** * Post info. */ post?: wix_blog_backend.Events.blogV3PostPost; }; type blogV3PostGetPostMetricsRequest = { /** * Post ID. */ postId: string; }; type blogV3PostGetPostMetricsResponse = { /** * Post metrics. */ metrics?: wix_blog_backend.Events.blogV3PostMetrics; }; type blogV3PostGetPostRequest = { /** * __Deprecated.__ Use `fieldsets` instead. * This parameter will be removed on June 30, 2023. * * List of post fields to be included in the response. */ fieldsToInclude?: Array; /** * List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in * the response in addition to the post’s base fields. Base fields don’t include any of the supported fieldset values. By default * only the post’s base fields are returned. */ fieldsets?: Array; /** * Post ID. */ postId: string; }; type blogV3PostGetPostResponse = { /** * Post info. */ post?: wix_blog_backend.Events.blogV3PostPost; }; type blogV3PostGetTemplateRequest = { /** * Post template id */ postTemplateId: string; }; type blogV3PostGetTemplateResponse = { /** * Post template */ postTemplate?: wix_blog_backend.Events.blogV3PostPost; }; type blogV3PostGetTotalLikesPerMemberRequest = { /** * Member ID. */ memberId: string; }; type blogV3PostGetTotalLikesPerMemberResponse = { /** * The total number of likes of the member. */ total?: number; }; type blogV3PostGetTotalPostsRequest = { /** * Language filter. * * 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. * Pass a language to receive the total amount of posts in that specified language. */ language?: string; }; type blogV3PostGetTotalPostsResponse = { /** * Total amount of published posts. */ total?: number; }; type blogV3PostGetTotalPublicationsRequest = { /** * Language filter */ language?: string; }; type blogV3PostGetTotalPublicationsResponse = { /** * Total amount of publications. */ total?: number; }; type blogV3PostGif = { /** * GIF format URL. */ gif?: string; /** * MP4 format URL. */ mp4?: string; /** * Thumbnail URL. */ still?: string; }; type blogV3PostGifData = { /** * Styling for the GIF's container. */ containerData?: wix_blog_backend.Events.blogV3PostPluginContainerData; /** * The source of the downsized GIF. */ downsized?: wix_blog_backend.Events.blogV3PostGif; /** * Height in pixels. */ height?: number; /** * The source of the full size GIF. */ original?: wix_blog_backend.Events.blogV3PostGif; /** * Width in pixels. */ width?: number; }; type blogV3PostGradient = { /** * The gradient angle in degrees. */ angle?: number; /** * The end color as a hexademical value. */ lastColor?: string; /** * The start color as a hexademical value. */ startColor?: string; }; type blogV3PostHeadingData = { /** * Indentation level from 1-6. */ indentation?: number; /** * Heading level from 1-6. */ level?: number; /** * Styling for the heading text. */ textStyle?: wix_blog_backend.Events.blogV3PostTextStyle; }; type blogV3PostHeight = { /** * A custom height value in pixels. */ custom?: string; }; type blogV3PostHtmlData = { /** * Styling for the HTML node's container. */ containerData?: wix_blog_backend.Events.blogV3PostPluginContainerData; /** * The HTML code for the node. */ html?: string; /** * Whether this is an AdSense element. Use `source` instead. */ isAdsense?: boolean; /** * The type of HTML code. */ source?: string; /** * The URL for the HTML code for the node. */ url?: string; }; type blogV3PostHtmlDataDataOneOf = { /** * The HTML code for the node. */ html?: string; /** * Whether this is an AdSense element. Use `source` instead. */ isAdsense?: boolean; /** * The URL for the HTML code for the node. */ url?: string; }; type blogV3PostImage = { /** * Link details for images that are links. */ link?: wix_blog_backend.Events.blogV3PostLink; /** * Image file details. */ media?: wix_blog_backend.Events.blogV3PostMedia; }; type blogV3PostImageData = { /** * Image's alternative text. */ altText?: string; /** * Image caption. */ caption?: string; /** * Styling for the image's container. */ containerData?: wix_blog_backend.Events.blogV3PostPluginContainerData; /** * Sets whether the image's download button is disabled. */ disableDownload?: boolean; /** * Sets whether the image expands to full screen when clicked. */ disableExpand?: boolean; /** * Image file details. */ image?: wix_blog_backend.Events.blogV3PostMedia; /** * Link details for images that are links. */ link?: wix_blog_backend.Events.blogV3PostLink; }; type blogV3PostInitialPostsCopied = { /** * Number of posts copied. */ count?: number; }; type blogV3PostItem = { /** * Item's alternative text. */ altText?: string; /** * An image item. */ image?: wix_blog_backend.Events.blogV3PostImage; /** * Item title. */ title?: string; /** * A video item. */ video?: wix_blog_backend.Events.blogV3PostItemVideo; }; type blogV3PostItemDataOneOf = { /** * An image item. */ image?: wix_blog_backend.Events.blogV3PostImage; /** * A video item. */ video?: wix_blog_backend.Events.blogV3PostItemVideo; }; type blogV3PostItemStyle = { /** * Sets how item images are cropped. */ crop?: string; /** * Item ratio */ ratio?: number; /** * The spacing between items in pixels. */ spacing?: number; /** * Desirable dimension for each item in pixels (behvaior changes according to gallery type) */ targetSize?: number; }; type blogV3PostItemVideo = { /** * Video file details. */ media?: wix_blog_backend.Events.blogV3PostMedia; /** * Video thumbnail file details. */ thumbnail?: wix_blog_backend.Events.blogV3PostMedia; }; type blogV3PostLayout = { /** * Sets whether horizontal scroll is enabled. */ horizontalScroll?: boolean; /** * The number of columns to display on mobile screens. */ mobileNumberOfColumns?: number; /** * The number of columns to display on full size screens. */ numberOfColumns?: number; /** * Gallery orientation. */ orientation?: string; /** * Gallery layout type. */ type?: string; }; type blogV3PostLink = { /** * The target node's ID. Used for linking to another node in this object. */ anchor?: string; /** * A serialized object used for a custom or external link panel. */ customData?: string; /** * The HTML `rel` attribute value for the link. This object specifies the relationship between the current document and the linked document. */ rel?: wix_blog_backend.Events.blogV3PostRel; /** * he HTML `target` attribute value for the link. This property defines where the linked document opens as follows: * `SELF` - Default. Opens the linked document in the same frame as the link. * `BLANK` - Opens the linked document in a new browser tab or window. * `PARENT` - Opens the linked document in the link's parent frame. * `TOP` - Opens the linked document in the full body of the link's browser tab or window. */ target?: string; /** * The absolute URL for the linked document. */ url?: string; }; type blogV3PostLinkData = { /** * Link details. */ link?: wix_blog_backend.Events.blogV3PostLink; }; type blogV3PostLinkDataOneOf = { /** * The target node's ID. Used for linking to another node in this object. */ anchor?: string; /** * The absolute URL for the linked document. */ url?: string; }; type blogV3PostLinkPreviewData = { /** * Styling for the link preview's container. */ containerData?: wix_blog_backend.Events.blogV3PostPluginContainerData; /** * Preview description. */ description?: string; /** * The preview content as HTML. */ html?: string; /** * Link details. */ link?: wix_blog_backend.Events.blogV3PostLink; /** * Preview thumbnail URL. */ thumbnailUrl?: string; /** * Preview title. */ title?: string; }; type blogV3PostListMigratedPostsRequest = { /** * New blog version instance id */ instanceId: string; /** * Cursor pointing to page of results */ paging?: wix_blog_backend.Events.blogV3PostBlogCursorPaging; }; type blogV3PostListMigratedPostsResponse = { /** * Pagination */ pagingMetaData?: wix_blog_backend.Events.blogV3PostCursorMetaData; /** * List of posts */ posts?: Array; /** * Data of post in old blog by post id */ postsMigrationMeta?: Record; }; type blogV3PostListPostsRequest = { /** * Category filter. * * Pass an array of category IDs to return only posts with any of the provided categories. * If omitted, all posts with or without associated categories are returned. */ categoryIds?: Array; /** * Whether to return only featured posts. * * Default: `false` */ featured?: boolean; /** * __Deprecated.__ Use `fieldsets` instead. * This parameter will be removed on June 30, 2023. * * List of post fields to be included in the response. */ fieldsToInclude?: Array; /** * List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in * the response in addition to the post’s base fields. Base fields don’t include any of the supported fieldset values. By default * only the post’s base fields are returned. */ fieldsets?: Array; /** * Hashtag filter. * * Pass an array of hashtags to return only posts containing any of the provided hashtags. * If omitted, all posts with or without hashtags are returned. */ hashtags?: Array; /** * Language filter. * * 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. * Pass a language to only receive posts that are in that language. * If omitted, posts in all languages are returned. */ language?: string; /** * Post owner's member ID. */ memberId?: string; /** * Pagination options. */ paging?: wix_blog_backend.Events.blogV3PostBlogPaging; /** * Sorting options. * * - `FEED`: Ordered by `firstPublishedDate` in descending order with pinned posts first. * - `VIEW_COUNT`: Ordered by total number of views in descending order. * - `LIKE_COUNT`: Ordered by total number of likes in descending order. * - `PUBLISHED_DATE_ASC`: Ordered by `firstPublishedDate` in ascending order. * - `PUBLISHED_DATE_DESC`: Ordered by `firstPublishedDate` in descending order. * - `TITLE_ASC`: Ordered by `title` in ascening order. * - `TITLE_DESC`: Ordered by `title` in descending order. * - `RATING`: reserved for internal use. * * Default: `FEED` */ sort?: string; /** * Tag filter. * * Pass an array of tag IDs to return only posts with any of the provided tags. * If omitted, all posts with or without tags are returned. */ tagIds?: Array; }; type blogV3PostListPostsResponse = { /** * Details on the paged set of results returned. */ metaData?: wix_blog_backend.Events.blogV3PostMetaData; /** * List of posts. */ posts?: Array; }; type blogV3PostListTemplatesRequest = { /** * Filter post templates by given template category ids */ categoryIds?: Array; /** * Filter post templates by provided language */ language?: string; /** * Returns post template categories when set to TRUE */ listTemplateCategories?: boolean; /** * Pagination options. */ paging?: wix_blog_backend.Events.blogV3PostBlogPaging; /** * Sort order by ascending/descending publish date. Default is ascending publish date sort */ sort?: string; }; type blogV3PostListTemplatesResponse = { /** * Available post templates */ postTemplates?: Array; /** * Details on the paged set of posts templates returned. */ postTemplatesMetaData?: wix_blog_backend.Events.blogV3PostMetaData; /** * Post template categories. This value is returned empty unless asked explicitly */ templateCategories?: Array; }; type blogV3PostListValue = { /** * Repeated field of dynamically typed values. */ values?: Array; }; type blogV3PostMapData = { /** * Styling for the map's container. */ containerData?: wix_blog_backend.Events.blogV3PostPluginContainerData; /** * Map settings. */ mapSettings?: wix_blog_backend.Events.blogV3PostMapSettings; }; type blogV3PostMapSettings = { /** * The address to display on the map. */ address?: string; /** * Sets whether the map is draggable. */ draggable?: boolean; /** * Initial zoom value. */ initialZoom?: number; /** * Location latitude. */ lat?: number; /** * Location longitude. */ lng?: number; /** * Location name. */ locationName?: string; /** * Map type. `HYBRID` is a combination of the `ROADMAP` and `SATELLITE` map types. */ mapType?: string; /** * Sets whether the location marker is visible. */ marker?: boolean; /** * Sets whether street view control is enabled. */ streetViewControl?: boolean; /** * Sets whether view mode control is enabled. */ viewModeControl?: boolean; /** * Sets whether zoom control is enabled. */ zoomControl?: boolean; }; type blogV3PostMedia = { /** * Media duration in seconds. Only relevant for audio and video files. */ duration?: number; /** * Media height in pixels. */ height?: number; /** * The source for the media's data. */ src?: wix_blog_backend.Events.blogV3PostFileSource; /** * Media width in pixels. */ width?: number; }; type blogV3PostMentionData = { /** * Mentioned user's ID. */ _id?: string; /** * The mentioned user's name. */ name?: string; /** * The version of the user's name that appears after the `@` character in the mention. */ slug?: string; }; type blogV3PostMetaData = { /** * Number of items returned in this response. */ count?: number; /** * Pointer to the next or previous page in the list of results. */ cursor?: string; /** * Requested offset. */ offset?: number; /** * Total number of items that match the query. */ total?: number; }; type blogV3PostMetadata = { /** * Object ID. */ _id?: string; /** * When the object was created. */ createdTimestamp?: Date; /** * When the object was most recently updated. */ updatedTimestamp?: Date; /** * Schema version. */ version?: number; }; type blogV3PostMetrics = { /** * Total number of post comments. */ comments?: number; /** * Total number of post likes. */ likes?: number; /** * Total number of post views. */ views?: number; }; type blogV3PostModerationDetails = { /** * Member ID of the person who approved or rejected the post. */ moderatedBy?: string; /** * Date the post was approved or rejected. */ moderationDate?: Date; /** * Status indicating whether the submission was approved or rejected by the moderator. */ status?: string; /** * Member ID of the person submitting the draft post for review. */ submittedBy?: string; /** * Date the post was submitted for review. */ submittedDate?: Date; }; type blogV3PostNode = { /** * Node ID. */ _id?: string; /** * Data for an app embed node. */ appEmbedData?: wix_blog_backend.Events.blogV3PostAppEmbedData; /** * Data for an audio node. */ audioData?: wix_blog_backend.Events.blogV3PostAudioData; /** * Data for a block quote node. */ blockquoteData?: wix_blog_backend.Events.blogV3PostBlockquoteData; /** * Data for a bulleted list node. */ bulletedListData?: wix_blog_backend.Events.blogV3PostBulletedListData; /** * Data for a button node. */ buttonData?: wix_blog_backend.Events.blogV3PostButtonData; /** * Data for a code block node. */ codeBlockData?: wix_blog_backend.Events.blogV3PostCodeBlockData; /** * Data for a collapsible list node. */ collapsibleListData?: wix_blog_backend.Events.blogV3PostCollapsibleListData; /** * Data for a divider node. */ dividerData?: wix_blog_backend.Events.blogV3PostDividerData; /** * Data for an oEmbed node. */ embedData?: wix_blog_backend.Events.blogV3PostEmbedData; /** * Data for a custon external node. */ externalData?: Object; /** * Data for a file node. */ fileData?: wix_blog_backend.Events.blogV3PostFileData; /** * Data for a gallery node. */ galleryData?: wix_blog_backend.Events.blogV3PostGalleryData; /** * Data for a GIF node. */ gifData?: wix_blog_backend.Events.blogV3PostGifData; /** * Data for a heading node. */ headingData?: wix_blog_backend.Events.blogV3PostHeadingData; /** * Data for an embedded HTML node. */ htmlData?: wix_blog_backend.Events.blogV3PostHtmlData; /** * Data for an image node. */ imageData?: wix_blog_backend.Events.blogV3PostImageData; /** * Data for a link preview node. */ linkPreviewData?: wix_blog_backend.Events.blogV3PostLinkPreviewData; /** * Data for a map node. */ mapData?: wix_blog_backend.Events.blogV3PostMapData; /** * A list of child nodes. */ nodes?: Array; /** * Data for an ordered list node. */ orderedListData?: wix_blog_backend.Events.blogV3PostOrderedListData; /** * Data for a paragraph node. */ paragraphData?: wix_blog_backend.Events.blogV3PostParagraphData; /** * Data for a poll node. */ pollData?: wix_blog_backend.Events.blogV3PostPollData; /** * Padding and background color styling for the node. */ style?: wix_blog_backend.Events.blogV3PostNodeStyle; /** * Data for a table cell node. */ tableCellData?: wix_blog_backend.Events.blogV3PostTableCellData; /** * Data for a table node. */ tableData?: wix_blog_backend.Events.blogV3PostTableData; /** * Data for a text node. Used to apply decorations to text. */ textData?: wix_blog_backend.Events.blogV3PostTextData; /** * Node type. Use `APP_EMBED` for nodes that embed content from other Wix apps. Use `EMBED` to embed content in [oEmbed](https://oembed.com/) format. */ type?: string; /** * Data for a video node. */ videoData?: wix_blog_backend.Events.blogV3PostVideoData; }; type blogV3PostNodeDataOneOf = { /** * Data for an app embed node. */ appEmbedData?: wix_blog_backend.Events.blogV3PostAppEmbedData; /** * Data for an audio node. */ audioData?: wix_blog_backend.Events.blogV3PostAudioData; /** * Data for a block quote node. */ blockquoteData?: wix_blog_backend.Events.blogV3PostBlockquoteData; /** * Data for a bulleted list node. */ bulletedListData?: wix_blog_backend.Events.blogV3PostBulletedListData; /** * Data for a button node. */ buttonData?: wix_blog_backend.Events.blogV3PostButtonData; /** * Data for a code block node. */ codeBlockData?: wix_blog_backend.Events.blogV3PostCodeBlockData; /** * Data for a collapsible list node. */ collapsibleListData?: wix_blog_backend.Events.blogV3PostCollapsibleListData; /** * Data for a divider node. */ dividerData?: wix_blog_backend.Events.blogV3PostDividerData; /** * Data for an oEmbed node. */ embedData?: wix_blog_backend.Events.blogV3PostEmbedData; /** * Data for a custon external node. */ externalData?: Object; /** * Data for a file node. */ fileData?: wix_blog_backend.Events.blogV3PostFileData; /** * Data for a gallery node. */ galleryData?: wix_blog_backend.Events.blogV3PostGalleryData; /** * Data for a GIF node. */ gifData?: wix_blog_backend.Events.blogV3PostGifData; /** * Data for a heading node. */ headingData?: wix_blog_backend.Events.blogV3PostHeadingData; /** * Data for an embedded HTML node. */ htmlData?: wix_blog_backend.Events.blogV3PostHtmlData; /** * Data for an image node. */ imageData?: wix_blog_backend.Events.blogV3PostImageData; /** * Data for a link preview node. */ linkPreviewData?: wix_blog_backend.Events.blogV3PostLinkPreviewData; /** * Data for a map node. */ mapData?: wix_blog_backend.Events.blogV3PostMapData; /** * Data for an ordered list node. */ orderedListData?: wix_blog_backend.Events.blogV3PostOrderedListData; /** * Data for a paragraph node. */ paragraphData?: wix_blog_backend.Events.blogV3PostParagraphData; /** * Data for a poll node. */ pollData?: wix_blog_backend.Events.blogV3PostPollData; /** * Data for a table cell node. */ tableCellData?: wix_blog_backend.Events.blogV3PostTableCellData; /** * Data for a table node. */ tableData?: wix_blog_backend.Events.blogV3PostTableData; /** * Data for a text node. Used to apply decorations to text. */ textData?: wix_blog_backend.Events.blogV3PostTextData; /** * Data for a video node. */ videoData?: wix_blog_backend.Events.blogV3PostVideoData; }; type blogV3PostNodeStyle = { /** * The background color as a hexadecimal value. */ backgroundColor?: string; /** * The bottom padding value in pixels. */ paddingBottom?: string; /** * The top padding value in pixels. */ paddingTop?: string; }; type blogV3PostOembed = { /** * The name of the author or owner of the resource. */ authorName?: string; /** * The URL for the author or owner of the resource. */ authorUrl?: string; /** * The height of the resource specified in the `url` property in pixels. */ height?: number; /** * HTML for embedding a video player. The HTML should have no padding or margins. */ html?: string; /** * The name of the resource provider. */ providerName?: string; /** * The URL for the resource provider. */ providerUrl?: string; /** * The height of the resource's thumbnail image. If this property is defined, `thumbnailUrl` and `thumbnailWidth`must also be defined. */ thumbnailHeight?: string; /** * The URL for a thumbnail image for the resource. If this property is defined, `thumbnailWidth` and `thumbnailHeight` must also be defined. */ thumbnailUrl?: string; /** * The width of the resource's thumbnail image. If this property is defined, `thumbnailUrl` and `thumbnailHeight` must also be defined. */ thumbnailWidth?: string; /** * Resource title. */ title?: string; /** * The resource type. */ type?: string; /** * The source URL for the resource. */ url?: string; /** * The oEmbed version number. This value must be `1.0`. */ version?: string; /** * The URL for an embedded viedo. */ videoUrl?: string; /** * The width of the resource specified in the `url` property in pixels. */ width?: number; }; type blogV3PostOldBlogMigratedEvent = { /** * Instance id of new version of blog */ newBlogInstanceId?: string; /** * Instance id of old version of blog */ oldBlogInstanceId?: string; }; type blogV3PostOption = { /** * Option ID. */ _id?: string; /** * The image displayed with the option. */ image?: wix_blog_backend.Events.blogV3PostMedia; /** * Option title. */ title?: string; }; type blogV3PostOptionDesign = { /** * Border radius in pixels. */ borderRadius?: number; }; type blogV3PostOptionLayout = { /** * Sets whether to display option images. */ enableImage?: boolean; }; type blogV3PostOrderedListData = { /** * Indentation level. */ indentation?: number; }; type blogV3PostPaging = { /** * Number of items to load. */ limit?: number; /** * Number of items to skip in the current sort order. */ offset?: number; }; type blogV3PostPagingMetadataV2 = { /** * Number of items returned in the response. */ count?: number; /** * Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */ cursors?: wix_blog_backend.Events.blogV3PostCursors; /** * Offset that was requested. */ offset?: number; /** * Flag that indicates the server failed to calculate the `total` field. */ tooManyToCount?: boolean; /** * Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */ total?: number; }; type blogV3PostParagraphData = { /** * Indentation level from 1-6. */ indentation?: number; /** * Styling for the paragraph text. */ textStyle?: wix_blog_backend.Events.blogV3PostTextStyle; }; type blogV3PostPdfSettings = { /** * Sets whether the PDF download button is disabled. */ disableDownload?: boolean; /** * Sets whether the PDF print button is disabled. */ disablePrint?: boolean; /** * PDF view mode. One of the following: * `NONE` : The PDF isn't displayed. * `FULL` : A full page view of the PDF is displayed. * `MINI` : A mini view of the PDF is displayed. */ viewMode?: string; }; type blogV3PostPeriodPostCount = { /** * Start of time range in ISO 8601 date and time format. */ periodStart?: Date; /** * Number of posts published during this month. */ postCount?: number; }; type blogV3PostPeriodPublicationsCount = { /** * Start of time range in ISO 8601 date and time format. */ periodStart?: Date; /** * Number of posts published during this month. */ publicationsCount?: number; }; type blogV3PostPermissions = { /** * Sets whether one voter can vote multiple times. */ allowMultipleVotes?: boolean; /** * Sets who can view the poll results. */ view?: string; /** * Sets who can vote. */ vote?: string; }; type blogV3PostPlatformQuery = { /** * Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: wix_blog_backend.Events.blogV3PostCursorPaging; /** * Filter object in the following format: * `"filter" : { * "fieldName1": "value1", * "fieldName2":{"$operator":"value2"} * }` * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains` */ filter?: Object; /** * Paging options to limit and skip the number of items. */ paging?: wix_blog_backend.Events.blogV3PostPaging; /** * Sort object in the following format: * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]` */ sort?: Array; }; type blogV3PostPlatformQueryPagingMethodOneOf = { /** * Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: wix_blog_backend.Events.blogV3PostCursorPaging; /** * Paging options to limit and skip the number of items. */ paging?: wix_blog_backend.Events.blogV3PostPaging; }; type blogV3PostPlaybackOptions = { /** * Sets whether the media will automatically start playing. */ autoPlay?: boolean; /** * Sets whether media's will be looped. */ playInLoop?: boolean; /** * Sets whether media's controls will be shown. */ showControls?: boolean; }; type blogV3PostPluginContainerData = { /** * The node's alignment within its container. */ alignment?: string; /** * The height of the node when it's displayed. */ height?: wix_blog_backend.Events.blogV3PostHeight; /** * Spoiler cover settings for the node. */ spoiler?: wix_blog_backend.Events.blogV3PostSpoiler; /** * Sets whether text should wrap around this node when it's displayed. If `textWrap` is `false`, the node takes up the width of its container. */ textWrap?: boolean; /** * The width of the node when it's displayed. */ width?: wix_blog_backend.Events.blogV3PostPluginContainerDataWidth; }; type blogV3PostPluginContainerDataWidth = { /** * A custom width value in pixels. */ custom?: string; /** * One of the following predefined width options: * `CONTENT`: The width of the container matches the content width. * `SMALL`: Small width. * `ORIGINAL`: The width of the container matches the original asset width. * `FULL_WIDTH`: Full width. */ size?: string; }; type blogV3PostPluginContainerDataWidthDataOneOf = { /** * A custom width value in pixels. */ custom?: string; /** * One of the following predefined width options: * `CONTENT`: The width of the container matches the content width. * `SMALL`: Small width. * `ORIGINAL`: The width of the container matches the original asset width. * `FULL_WIDTH`: Full width. */ size?: string; }; type blogV3PostPoll = { /** * Poll ID. */ _id?: string; /** * Poll creator ID. */ creatorId?: string; /** * Main poll image. */ image?: wix_blog_backend.Events.blogV3PostMedia; /** * Voting options. */ options?: Array; /** * The poll's permissions and display settings. */ settings?: wix_blog_backend.Events.blogV3PostPollSettings; /** * Poll title. */ title?: string; }; type blogV3PostPollData = { /** * Styling for the poll's container. */ containerData?: wix_blog_backend.Events.blogV3PostPluginContainerData; /** * Styling for the poll and voting options. */ design?: wix_blog_backend.Events.blogV3PostDesign; /** * Layout settings for the poll and voting options. */ layout?: wix_blog_backend.Events.blogV3PostPollDataLayout; /** * Poll data. */ poll?: wix_blog_backend.Events.blogV3PostPoll; }; type blogV3PostPollDataLayout = { /** * Voting otpions layout settings. */ options?: wix_blog_backend.Events.blogV3PostOptionLayout; /** * Poll layout settings. */ poll?: wix_blog_backend.Events.blogV3PostPollLayout; }; type blogV3PostPollDesign = { /** * Background styling. */ background?: wix_blog_backend.Events.blogV3PostBackground; /** * Border radius in pixels. */ borderRadius?: number; }; type blogV3PostPollLayout = { /** * The direction of the text displayed in the voting options. Text can be displayed either right-to-left or left-to-right. */ direction?: string; /** * Sets whether to display the main poll image. */ enableImage?: boolean; /** * The layout for displaying the voting options. */ type?: string; }; type blogV3PostPollSettings = { /** * Permissions settings for voting. */ permissions?: wix_blog_backend.Events.blogV3PostPermissions; /** * Sets whether voters are displayed in the vote results. */ showVoters?: boolean; /** * Sets whether the vote count is displayed. */ showVotesCount?: boolean; }; type blogV3PostPost = { /** * Post ID. */ _id?: string; /** * [Category IDs](https://dev.wix.com/api/rest/wix-blog/blog/categories) of the post. */ categoryIds?: Array; /** * Whether commenting on the post is enabled. */ commentingEnabled?: boolean; /** * Post owner's [contact ID](https://dev.wix.com/api/rest/contacts). */ contactId?: string; /** * Reserved for internal use. */ content?: string; /** * Reserved for internal use. */ contentId?: string; /** * The post's content in plain text. */ contentText?: string; /** * __Deprecated.__ Use `media` instead. * This property will be removed on June 30, 2023. * * Post cover media. */ coverMedia?: wix_blog_backend.Events.blogV3PostCoverMedia; /** * Post excerpt. * Can be selected by a site contributor. By default, it is extracted from the content text's first characters. * * Max: 140 characters */ excerpt?: string; /** * Whether the post is marked as featured. */ featured?: boolean; /** * Date the post was first published. */ firstPublishedDate?: Date; /** * Hashtags in the post. */ hashtags?: Array; /** * Image placed at the top of the blog page. */ heroImage?: string; /** * Reserved for internal use. */ internalCategoryIds?: Array; /** * Reserved for internal use. */ internalId?: string; /** * Reserved for internal use. */ internalRelatedPostIds?: Array; /** * Language the post is written in. * * 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */ language?: string; /** * Date the post was last published. */ lastPublishedDate?: Date; /** * Post cover media. */ media?: wix_blog_backend.Events.blogV3PostBlogMedia; /** * Post owner's [member ID](https://dev.wix.com/api/rest/members). */ memberId?: string; /** * Estimated reading time (calculated automatically). */ minutesToRead?: number; /** * Post moderation details. Only relevant to posts submitted by [guest writers](https://support.wix.com/en/article/wix-blog-moderating-blog-posts-from-your-guest-writers). */ moderationDetails?: wix_blog_backend.Events.blogV3PostModerationDetails; /** * Reserved for internal use. */ mostRecentContributorId?: string; /** * Whether the post is pinned. If `true`, the post is placed at the top of the post list. */ pinned?: boolean; /** * [Pricing plan IDs](https://dev.wix.com/api/rest/wix-pricing-plans). Only relevant if a post is assigned to a specific pricing plan. */ pricingPlanIds?: Array; /** * IDs of posts related to the post. */ relatedPostIds?: Array; /** * Post rich content */ richContent?: wix_blog_backend.Events.blogV3PostRichContent; /** * SEO data. */ seoData?: wix_blog_backend.Events.blogV3PostSeoSchema; /** * Post slug. Part of a posts's URL, for example, `'https:/example.com/posts/{my-post-slug}'`. */ slug?: string; /** * IDs of [tags](https://dev.wix.com/api/rest/wix-blog/blog/tags) the post is tagged with. */ tagIds?: Array; /** * Post title. */ title?: string; /** * ID of the translations of this post. All translations of a single post share the same `translationId`. */ translationId?: string; /** * Post URL. */ url?: string; }; type blogV3PostPostCountInfo = { /** * Total number of post comments */ comments?: number; /** * Total number of post likes */ likes?: number; /** * Total number of post views */ views?: number; }; type blogV3PostPostCountersUpdated = { /** * Visitor ID if person that liked the post is not logged in */ anonymousVisitorId?: string; /** * New counter value. */ counter?: number; /** * Member ID of person who triggered the counter update */ memberId?: string; /** * ID of the post whose counters were updated. */ postId?: string; /** * Field of the updated counter. */ updatedCounterField?: string; }; type blogV3PostPostCountersUpdatedInitiatorOneOf = { /** * Visitor ID if person that liked the post is not logged in */ anonymousVisitorId?: string; /** * Member ID of person who triggered the counter update */ memberId?: string; }; type blogV3PostPostCreated = { /** * Created post. */ entity: wix_blog_backend.Events.blogV3PostPost; /** * Event metadata. */ metadata: wix_blog_backend.Events.blogV3PostBackendEventMetadata; }; type blogV3PostPostDeleted = { /** * Event metadata. */ metadata: wix_blog_backend.Events.blogV3PostBackendEventMetadata; }; type blogV3PostPostLiked = { /** * ID of the site visitor (not logged in) who liked the post. */ anonymousVisitorId?: string; /** * ID of the member (logged in) who liked the post. */ memberId?: string; /** * ID of the liked post. */ postId?: string; }; type blogV3PostPostLikedEvent = { /** * Information about the liked post. */ data: wix_blog_backend.Events.blogV3PostPostLiked; /** * Event metadata. */ metadata: wix_blog_backend.Events.blogV3PostBackendEventMetadata; }; type blogV3PostPostLikedInitiatorOneOf = { /** * Visitor ID of person who liked the post when they are not logged in. */ anonymousVisitorId?: string; /** * Member ID of person who liked the post (only returned when the member was logged in when liking the post). */ memberId?: string; }; type blogV3PostPostMigrationMetaData = { /** * Post author in old blog */ author?: string; /** * Old blog instance id */ instanceId?: string; /** * Post id in old blog */ postId?: string; /** * Post slug in old blog */ slug?: string; }; type blogV3PostPostOwnerChanged = {}; type blogV3PostPostUnliked = { /** * Visitor ID of person who unliked the post when they are not logged in. */ anonymousVisitorId?: string; /** * Member ID of person who unliked the post (returned when the member was logged in when unliking the post). */ memberId?: string; /** * ID of the unliked post. */ postId?: string; }; type blogV3PostPostUnlikedEvent = { /** * Information about the unliked post. */ data: wix_blog_backend.Events.blogV3PostPostUnliked; /** * Event metadata. */ metadata: wix_blog_backend.Events.blogV3PostBackendEventMetadata; }; type blogV3PostPostUnlikedInitiatorOneOf = { /** * Visitor ID of person who unliked the post when they are not logged in. */ anonymousVisitorId?: string; /** * Member ID of person who unliked the post (returned when the member was logged in when unliking the post). */ memberId?: string; }; type blogV3PostPostUpdated = { /** * Updated post. */ entity: wix_blog_backend.Events.blogV3PostPost; /** * Event metadata. */ metadata: wix_blog_backend.Events.blogV3PostBackendEventMetadata; }; type blogV3PostQueryPostCountStatsRequest = { /** * Language filter. * * 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. * Pass a language to only receive the period post count for that specified language. */ language?: string; /** * Number of months to include in response. */ months?: number; /** * Order of returned results. * * - `OLDEST`: posts by date in ascending order. * - `NEWEST`: posts by date in descending order. * * Default: `OLDEST` */ order?: string; /** * __Deprecated.__ Use `months` instead. * This property will be removed on June 30, 2023. * * Non-inclusive end of time range to return, in ISO 8601 date and time format. */ rangeEnd?: Date; /** * Start of time range to return, in ISO 8601 date and time format. */ rangeStart?: Date; /** * Time zone to use when calculating the start of the month. * * [UTC timezone offset](https://en.wikipedia.org/wiki/List_of_UTC_offsets) format. For example, New York time zone is `-05`. */ timeZone?: string; }; type blogV3PostQueryPostCountStatsResponse = { /** * List of published post counts by month. */ stats?: Array; }; type blogV3PostQueryPostsRequest = { /** * __Deprecated.__ Use `fieldsets` instead. * This parameter will be removed on June 30, 2023. * * List of post fields to be included in the response. */ fieldsToInclude?: Array; /** * List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in * the response in addition to the post’s base fields. Base fields don’t include any of the supported fieldset values. By default * only the post’s base fields are returned. */ fieldsets?: Array; /** * __Deprecated.__ Use `query` instead. * This parameter will be removed on June 30, 2023. * * Filter object. */ filter?: Object; /** * __Deprecated.__ Use `query` instead. * This parameter will be removed on June 30, 2023. * * Pagination options. */ paging?: wix_blog_backend.Events.blogV3PostBlogPaging; /** * Query options. */ query?: wix_blog_backend.Events.blogV3PostPlatformQuery; /** * __Deprecated.__ Use `query` instead. * This parameter will be removed on June 30, 2023. * * Sorting options. For a list of sortable fields, see [Field Support for Filtering and Sorting](https://dev.wix.com/api/rest/wix-blog/blog/filter-and-sort). */ sort?: Array; }; type blogV3PostQueryPostsResponse = { /** * __Deprecated.__ Use `pagingMetadata` instead. * This property will be removed on June 30, 2023. * * Details on the paged set of results returned. */ metaData?: wix_blog_backend.Events.blogV3PostMetaData; /** * Details on the paged set of results returned. */ pagingMetadata?: wix_blog_backend.Events.blogV3PostPagingMetadataV2; /** * List of posts. */ posts?: Array; }; type blogV3PostQueryPublicationsCountStatsRequest = { /** * Language filter * * 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */ language?: string; /** * Number of months to include in the response. */ months?: number; /** * Order of the returned results. */ order?: string; /** * Non-inclusive end of time range to return, in ISO 8601 date and time format. */ rangeEnd?: Date; /** * Start of time range to return, in ISO 8601 date and time format. */ rangeStart?: Date; /** * Timezone of the client. */ timeZone?: string; }; type blogV3PostQueryPublicationsCountStatsResponse = { /** * Chronologically ordered list of publications. */ stats?: Array; }; type blogV3PostReactions = { /** * Is post liked by the current user */ liked?: boolean; }; type blogV3PostRel = { /** * Indicates to search engine crawlers not to follow the link. */ nofollow?: boolean; /** * Indicates that this link protect referral information from being passed to the target website. */ noreferrer?: boolean; /** * Indicates to search engine crawlers that the link is a paid placement such as sponsored content or an advertisement. */ sponsored?: boolean; /** * Indicates that this link is user-generated content and isn't necessarily trusted or endorsed by the page’s author. For example, a link in a fourm post. */ ugc?: boolean; }; type blogV3PostRichContent = { /** * Global styling for header, paragraph, block quote, and code block nodes in the object. */ documentStyle?: wix_blog_backend.Events.blogV3PostDocumentStyle; /** * Object metadata. */ metadata?: wix_blog_backend.Events.blogV3PostMetadata; /** * Node objects representing a rich content document. */ nodes?: Array; }; type blogV3PostSendActionEventRequest = { entityId?: string; postCountersUpdated?: wix_blog_backend.Events.blogV3PostPostCountersUpdated; postLikedAction?: wix_blog_backend.Events.blogV3PostPostLiked; }; type blogV3PostSendActionEventRequestActionOneOf = { postCountersUpdated?: wix_blog_backend.Events.blogV3PostPostCountersUpdated; postLikedAction?: wix_blog_backend.Events.blogV3PostPostLiked; }; type blogV3PostSendActionEventResponse = {}; type blogV3PostSeoSchema = { /** * SEO general settings. */ settings?: wix_blog_backend.Events.blogV3PostSettings; /** * SEO tags information. */ tags?: Array; }; type blogV3PostSettings = { /** * Whether the auto redirects feature creating `301 redirects` on a slug change is enabled. * * Default: enabled */ preventAutoRedirect?: boolean; }; type blogV3PostSorting = { /** * Name of the field to sort by. */ fieldName?: string; /** * Sort order. */ order?: string; }; type blogV3PostSpoiler = { /** * The text for the button used to remove the spoiler cover. */ buttonText?: string; /** * The description displayed on top of the spoiler cover. */ description?: string; /** * Sets whether the spoiler cover is enabled for this node. */ enabled?: boolean; }; type blogV3PostStyles = { /** * Border attributes. */ border?: wix_blog_backend.Events.blogV3PostBorder; /** * Color attributes. */ colors?: wix_blog_backend.Events.blogV3PostColors; }; type blogV3PostTableCellData = { /** * The cell's border colors. */ borderColors?: wix_blog_backend.Events.blogV3PostBorderColors; /** * Styling for the cell's background color and text alignment. */ cellStyle?: wix_blog_backend.Events.blogV3PostCellStyle; }; type blogV3PostTableData = { /** * Sets whether the table's first column is a header. */ columnHeader?: boolean; /** * Styling for the table's container. */ containerData?: wix_blog_backend.Events.blogV3PostPluginContainerData; /** * The table's dimensions. */ dimensions?: wix_blog_backend.Events.blogV3PostDimensions; /** * Deprecated: Use `rowHeader` and `columnHeader` instead. */ header?: boolean; /** * Sets whether the table's first row is a header. */ rowHeader?: boolean; }; type blogV3PostTag = { /** * SEO tag inner content. For example, ` inner content `. */ children?: string; /** * Whether the tag is a custom tag. */ custom?: boolean; /** * Whether the tag is disabled. */ disabled?: boolean; /** * SEO tag meta data. For example, `{height: 300, width: 240}`. */ meta?: Object; /** * A `{'key':'value'} pair object where each SEO tag property (`'name'`, `'content'`, `'rel'`, `'href'`) contains a value. * For example: `{'name': 'description', 'content': 'the description itself'}`. */ props?: Object; /** * SEO tag type. * * Supported values: `title`, `meta`, `script`, `link`. */ type?: string; }; type blogV3PostTextData = { /** * The decorations to apply. */ decorations?: Array; /** * The text to apply decorations to. */ text?: string; }; type blogV3PostTextNodeStyle = { /** * The decorations to apply to the node. */ decorations?: Array; /** * Line height for text in the node. */ lineHeight?: string; /** * Padding and background color for the node. */ nodeStyle?: wix_blog_backend.Events.blogV3PostNodeStyle; }; type blogV3PostTextStyle = { /** * A CSS `line-height` value for the text as a unitless ratio. */ lineHeight?: string; /** * Text alignment. Defaults to `AUTO`. */ textAlignment?: string; }; type blogV3PostThumbnails = { /** * Thumbnail alignment. */ placement?: string; /** * Spacing between thumbnails in pixels. */ spacing?: number; }; type blogV3PostVideoData = { /** * Styling for the video's container. */ containerData?: wix_blog_backend.Events.blogV3PostPluginContainerData; /** * Sets whether the video's download button is disabled. */ disableDownload?: boolean; /** * Video options. */ options?: wix_blog_backend.Events.blogV3PostPlaybackOptions; /** * Video thumbnail details. */ thumbnail?: wix_blog_backend.Events.blogV3PostMedia; /** * Video title. */ title?: string; /** * Video details. */ video?: wix_blog_backend.Events.blogV3PostMedia; }; type blogV3PostVideoResolution = { /** * Video format for example, mp4, hls. */ format?: string; /** * Video height. */ height?: number; /** * Video URL. */ url?: string; /** * Video width. */ width?: number; }; type blogV3PostWixMedia = { /** * Thumbnail or image details. */ image?: string; /** * Video details. Optional */ videoV2?: string; }; type blogV3TagApplicationError = { code?: string; data?: Object; description?: string; }; type blogV3TagBackendEventMetadata = { /** * ID of the entity associated with the event. */ entityId: string; /** * Event timestamp. */ eventTime: string; /** * Event ID. */ id: string; /** * Whether the event was triggered as a result of a privacy regulation application (for example, [GDPR](https://support.wix.com/en/article/gdpr-frequently-asked-questions)). For advanced users. */ triggeredByAnonymizeRequest: boolean; }; type blogV3TagBulkActionMetadata = { /** * Number of items that couldn't be processed. */ totalFailures?: number; /** * Number of items that were successfully processed. */ totalSuccesses?: number; /** * Number of failures without details because detailed failure threshold was exceeded. */ undetailedFailures?: number; }; type blogV3TagBulkCreateTagsRequest = { /** * List of tag fields to be included if entities are present in the response. * Base fieldset, which is default, will return all core tag properties. * Example: When URL fieldset is selected, returned tag will have a set of base properties and tag url. */ fieldsets?: Array; /** * Whether to return the full created tag entities in the response. */ returnFullEntity?: boolean; /** * Tags to create. */ tags: Array; }; type blogV3TagBulkCreateTagsResponse = { /** * Bulk action metadata. */ bulkActionMetadata?: wix_blog_backend.Events.blogV3TagBulkActionMetadata; /** * Tags created by bulk action. */ results?: Array; }; type blogV3TagBulkTagResult = { /** * Optional created tag. */ item?: wix_blog_backend.Events.blogV3TagTag; /** * Bulk actions metadata for tag. */ itemMetadata?: wix_blog_backend.Events.blogV3TagItemMetadata; }; type blogV3TagCreateTagRequest = { /** * List of additional tag fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in * the response in addition to the tag's base fields. Base fields don’t include any of the supported fieldset values. By default * only the tag's base fields are returned. */ fieldsets?: Array; /** * Tag label. The label for each tag in a blog must be unique. */ label: string; /** * Tag language. * * 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */ language?: string; /** * Preferred tag slug. For example, `'tag-slug'`. */ slug?: string; }; type blogV3TagCreateTagResponse = { /** * Tag info. */ tag?: wix_blog_backend.Events.blogV3TagTag; }; type blogV3TagCursorPaging = { /** * Pointer to the next or previous page in the list of results. * * You can get the relevant cursor token * from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. */ cursor?: string; /** * Number of items to load. */ limit?: number; }; type blogV3TagCursors = { /** * Cursor pointing to next page in the list of results. */ next?: string; /** * Cursor pointing to previous page in the list of results. */ prev?: string; }; type blogV3TagDeleteTagRequest = { /** * Tag ID. */ tagId: string; }; type blogV3TagDeleteTagResponse = {}; type blogV3TagGetOrCreateTagRequest = { /** * List of tag fields to be included if entities are present in the response. * Base fieldset, which is default, will return all core tag properties. * Example: When URL fieldset is selected, returned tag will have a set of base properties and tag url. */ fieldsets?: Array; /** * Tag name. Unique per blog. */ label: string; /** * Tag language. */ language?: string; }; type blogV3TagGetOrCreateTagResponse = { /** * Tag info. */ tag?: wix_blog_backend.Events.blogV3TagTag; }; type blogV3TagGetTagByLabelRequest = { /** * __Deprecated.__ Use `fieldsets` instead. * This parameter will be removed on June 30, 2023. * * List of tag fields to be included in the response. */ fieldsToInclude?: Array; /** * List of additional tag fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in * the response in addition to the tag's base fields. Base fields don’t include any of the supported fieldset values. By default * only the tag's base fields are returned. */ fieldsets?: Array; /** * Tag label. */ label: string; /** * Tag language. * * 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. * If omitted, tags in all languages are returned. */ language?: string; }; type blogV3TagGetTagByLabelResponse = { /** * Tag info. */ tag?: wix_blog_backend.Events.blogV3TagTag; }; type blogV3TagGetTagBySlugRequest = { /** * __Deprecated.__ Use `fieldsets` instead. * This parameter will be removed on June 30, 2023. * * List of tag fields to be included in the response. */ fieldsToInclude?: Array; /** * List of additional tag fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in * the response in addition to the tag's base fields. Base fields don’t include any of the supported fieldset values. By default * only the tag's base fields are returned. */ fieldsets?: Array; /** * Slug of the tag to retrieve. */ slug: string; }; type blogV3TagGetTagBySlugResponse = { /** * Tag info. */ tag?: wix_blog_backend.Events.blogV3TagTag; }; type blogV3TagGetTagRequest = { /** * __Deprecated.__ Use `fieldsets` instead. * This parameter will be removed on June 30, 2023. * * List of tag fields to be included in the response. */ fieldsToInclude?: Array; /** * List of additional tag fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in * the response in addition to the tag's base fields. Base fields don’t include any of the supported fieldset values. By default * only the tag's base fields are returned. */ fieldsets?: Array; /** * Tag ID. */ tagId: string; }; type blogV3TagGetTagResponse = { /** * Tag info. */ tag?: wix_blog_backend.Events.blogV3TagTag; }; type blogV3TagInitialTagsCopied = { /** * Number of tags copied. */ count?: number; }; type blogV3TagItemMetadata = { /** * Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */ _id?: string; /** * Details about the error in case of failure. */ error?: wix_blog_backend.Events.blogV3TagApplicationError; /** * Index of the item within the request array. Allows for correlation between request and response items. */ originalIndex?: number; /** * Whether the requested action was successful for this item. When `false`, the `error` field is populated. */ success?: boolean; }; type blogV3TagListTagsRequest = { /** * Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `sort`. */ cursorPaging?: wix_blog_backend.Events.blogV3TagCursorPaging; /** * List of tag fields to be included if entities are present in the response. * Base fieldset, which is default, will return all core tag properties. * Example: When URL fieldset is selected, returned tag will have a set of base properties and tag url. */ fieldsets?: Array; /** * Paging options to limit and skip the number of items. */ paging?: wix_blog_backend.Events.blogV3TagPaging; /** * Sorting options. For a list of sortable fields, see [Field Support for Filtering and Sorting](https://dev.wix.com/api/rest/community/blog/filter-and-sort). */ sort?: Array; }; type blogV3TagListTagsRequestPagingMethodOneOf = { /** * Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `sort`. */ cursorPaging?: wix_blog_backend.Events.blogV3TagCursorPaging; /** * Paging options to limit and skip the number of items. */ paging?: wix_blog_backend.Events.blogV3TagPaging; }; type blogV3TagListTagsResponse = { /** * Details on the paged set of results returned. */ metaData?: wix_blog_backend.Events.blogV3TagMetaData; /** * List of tags. */ tags?: Array; }; type blogV3TagMetaData = { /** * Number of items returned in this response. */ count?: number; /** * Pointer to the next or previous page in the list of results. */ cursor?: string; /** * Requested offset. */ offset?: number; /** * Total number of items that match the query. */ total?: number; }; type blogV3TagPaging = { /** * Number of items to load. */ limit?: number; /** * Number of items to skip in the current sort order. */ offset?: number; }; type blogV3TagPagingMetadataV2 = { /** * Number of items returned in the response. */ count?: number; /** * Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */ cursors?: wix_blog_backend.Events.blogV3TagCursors; /** * Offset that was requested. */ offset?: number; /** * Flag that indicates the server failed to calculate the `total` field. */ tooManyToCount?: boolean; /** * Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */ total?: number; }; type blogV3TagPlatformQuery = { /** * Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: wix_blog_backend.Events.blogV3TagCursorPaging; /** * Filter object in the following format: * `"filter" : { * "fieldName1": "value1", * "fieldName2":{"$operator":"value2"} * }` * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains` */ filter?: Object; /** * Paging options to limit and skip the number of items. */ paging?: wix_blog_backend.Events.blogV3TagPaging; /** * Sort object in the following format: * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]` */ sort?: Array; }; type blogV3TagPlatformQueryPagingMethodOneOf = { /** * Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: wix_blog_backend.Events.blogV3TagCursorPaging; /** * Paging options to limit and skip the number of items. */ paging?: wix_blog_backend.Events.blogV3TagPaging; }; type blogV3TagQueryTagsRequest = { /** * __Deprecated.__ Use `fieldsets` instead. * This parameter will be removed on June 30, 2023. * * List of tag fields to be included in the response. */ fieldsToInclude?: Array; /** * List of additional tag fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in * the response in addition to the tag's base fields. Base fields don’t include any of the supported fieldset values. By default * only the tag's base fields are returned. */ fieldsets?: Array; /** * __Deprecated.__ Use `query` instead. * This parameter will be removed on June 30, 2023. * * Filter object. * For a detailed list of supported filters, see [Field Support for Filtering and Sorting](https://dev.wix.com/api/rest/community/blog/filter-and-sort). */ filter?: Object; /** * __Deprecated.__ Use `query` instead. * This parameter will be removed on June 30, 2023. * * Pagination options. */ paging?: wix_blog_backend.Events.blogV3TagPaging; /** * Query options. */ query?: wix_blog_backend.Events.blogV3TagPlatformQuery; /** * __Deprecated.__ Use `query` instead. * This parameter will be removed on June 30, 2023. * * Sorting options. For a list of sortable fields, see [Field Support for Filtering and Sorting](https://dev.wix.com/api/rest/community/blog/filter-and-sort). */ sort?: Array; }; type blogV3TagQueryTagsResponse = { /** * __Deprecated.__ Use `pagingMetadata` instead. * This property will be removed on June 30, 2023. * * Details on the paged set of results returned. */ metaData?: wix_blog_backend.Events.blogV3TagMetaData; /** * Details on the paged set of results returned. */ pagingMetadata?: wix_blog_backend.Events.blogV3TagPagingMetadataV2; /** * List of tags. */ tags?: Array; }; type blogV3TagSorting = { /** * Name of the field to sort by. */ fieldName?: string; /** * Sort order. */ order?: string; }; type blogV3TagTag = { /** * Date the tag was created. */ _createdDate?: Date; /** * Tag ID. */ _id?: string; /** * Date the tag was last updated. */ _updatedDate?: Date; /** * Tag label. * * A blog can't have two tags with the same label. */ label?: string; /** * Tag language. * * 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */ language?: string; /** * Number of posts with this tag, including unpublished draft posts. */ postCount?: number; /** * Reserved for internal use. */ publicationCount?: number; /** * Number of published posts with this tag. */ publishedPostCount?: number; /** * Part of a tag's URL. For example, `'https:/example.com/blog/tags/{my-tag-slug}'`. */ slug?: string; /** * ID of the tag translations. * * All translations of a single tag share the same `translationId`. */ translationId?: string; /** * Tag URL. */ url?: string; }; type blogV3TagTagCreated = { /** * Created tag. */ entity: wix_blog_backend.Events.blogV3TagTag; /** * Event metadata. */ metadata: wix_blog_backend.Events.blogV3TagBackendEventMetadata; }; type blogV3TagTagDeleted = { /** * Event metadata. */ metadata: wix_blog_backend.Events.blogV3TagBackendEventMetadata; }; type blogV3TagTagUpdated = { entity: wix_blog_backend.Events.blogV3TagTag; metadata: wix_blog_backend.Events.blogV3TagBackendEventMetadata; }; type blogV3TagTagsFieldSet = { /** * Includes tag URL when TRUE. Defaults to FALSE. */ includeUrl?: boolean; }; type blogV3TagUpdateTagRequest = { /** * Field mask of fields to update. */ fieldMask?: Array; /** * List of tag fields to be included if entities are present in the response. * Base fieldset, which is default, will return all core tag properties. * Example: When URL fieldset is selected, returned tag will have a set of base properties and tag url. */ fieldsets?: Array; /** * Tag info. */ tag?: wix_blog_backend.Events.blogV3TagTag; }; type blogV3TagUpdateTagResponse = { /** * Tag info. */ tag?: wix_blog_backend.Events.blogV3TagTag; }; } /** * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Posts.html#) */ interface Posts { /** * Gets a post by the specified ID. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Posts.html#getPost) */ getPost(postId: string, options: wix_blog_backend.Posts.GetPostOptions): Promise; /** * Gets a post by the provided slug. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Posts.html#getPostBySlug) */ getPostBySlug(slug: string, options: wix_blog_backend.Posts.GetPostBySlugOptions): Promise; /** * Gets a specified post's metrics. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Posts.html#getPostMetrics) */ getPostMetrics(postId: string): Promise; /** * Gets the total amount of published posts on the blog. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Posts.html#getTotalPosts) */ getTotalPosts(options: wix_blog_backend.Posts.GetTotalPostsOptions): Promise; /** * Retrieves a list of published posts. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Posts.html#listPosts) */ listPosts(options: wix_blog_backend.Posts.ListPostsOptions): Promise; /** * Retrieves the number of published posts per month within a specified time range. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Posts.html#queryPostCountStats) */ queryPostCountStats(options: wix_blog_backend.Posts.QueryPostCountStatsOptions): Promise; /** * Creates a query to retrieve a list of posts. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Posts.html#queryPosts) */ queryPosts(): wix_blog_backend.Posts.PostsQueryBuilder; } namespace Posts { type AnchorData = { /** * The target node's ID. */ anchor?: string; }; type AppEmbedData = { /** * Data for embedded Wix Bookings content. */ bookingData?: wix_blog_backend.Posts.BookingData; /** * Data for embedded Wix Events content. */ eventData?: wix_blog_backend.Posts.EventData; /** * An image for the embedded content. */ image?: wix_blog_backend.Posts.Media; /** * Deprecated: Use `image` instead. */ imageSrc?: string; /** * The ID of the embedded content. */ itemId?: string; /** * The name of the embedded content. */ name?: string; /** * The type of Wix App content being embedded. */ type?: string; /** * The URL for the embedded content. */ url?: string; }; type AppEmbedDataAppDataOneOf = { /** * Data for embedded Wix Bookings content. */ bookingData?: wix_blog_backend.Posts.BookingData; /** * Data for embedded Wix Events content. */ eventData?: wix_blog_backend.Posts.EventData; }; type AudioData = { /** * Audio file details. */ audio?: wix_blog_backend.Posts.Media; /** * Author name. */ authorName?: string; /** * Styling for the audio node's container. */ containerData?: wix_blog_backend.Posts.PluginContainerData; /** * Cover image. */ coverImage?: wix_blog_backend.Posts.Media; /** * Sets whether the audio node's download button is disabled. */ disableDownload?: boolean; /** * An HTML version of the audio node. */ html?: string; /** * Track name. */ name?: string; }; type Background = { /** * The background color as a hexademical value. */ color?: string; /** * Details for a gradient background. */ gradient?: wix_blog_backend.Posts.Gradient; /** * An image to use for the background. */ image?: wix_blog_backend.Posts.Media; /** * Background type. For each option, include the relevant details. */ type?: string; }; type BackgroundBackgroundOneOf = { /** * The background color as a hexademical value. */ color?: string; /** * Details for a gradient background. */ gradient?: wix_blog_backend.Posts.Gradient; /** * An image to use for the background. */ image?: wix_blog_backend.Posts.Media; }; type BlockquoteData = { /** * Indentation level. */ indentation?: number; }; type BlogCursorPaging = { /** * Pointer to the next or previous page in the list of results. */ cursor?: string; /** * Number of items to load. */ limit?: number; }; type BlogMedia = { /** * Whether the media is custom. * * `false` if the media is the first image or video in the post. `true` if set to some other image or video.", */ custom?: boolean; /** * Whether cover media is displayed. */ displayed?: boolean; /** * Embed media details. */ embedMedia?: wix_blog_backend.Posts.EmbedMedia; /** * Wix Media details. */ wixMedia?: wix_blog_backend.Posts.WixMedia; }; type BlogMediaMediaOneOf = { /** * Embed media details. */ embedMedia?: wix_blog_backend.Posts.EmbedMedia; /** * Wix Media details. */ wixMedia?: wix_blog_backend.Posts.WixMedia; }; type BlogPaging = { /** * Pointer to the next or previous page in the list of results. */ cursor?: string; /** * Number of items to return. * * Default:`50` */ limit?: number; /** * Number of items to skip in the current sort order. * * Default: `0` */ offset?: number; }; type BookingData = { /** * Booking duration in minutes. */ durations?: string; }; type Border = { /** * Border radius in pixels. */ radius?: number; /** * Border width in pixels. */ width?: number; }; type BorderColors = { /** * Bottom border color as a hexadecimal value. */ bottom?: string; /** * Left border color as a hexadecimal value. */ left?: string; /** * Right border color as a hexadecimal value. */ right?: string; /** * Top border color as a hexadecimal value. */ top?: string; }; type BulkGetPostMetricsRequest = { /** * Post IDs. */ postIds: Array; }; type BulkGetPostMetricsResponse = { /** * Map of post.id to metrics */ metrics?: Record; }; type BulkGetPostReactionsRequest = { /** * Post IDs. */ postIds: Array; }; type BulkGetPostReactionsResponse = { /** * Map of post.id to reactions */ reactionsMap?: Record; }; type BulletedListData = { /** * Indentation level. */ indentation?: number; }; type ButtonData = { /** * Styling for the button's container. */ containerData?: wix_blog_backend.Posts.PluginContainerData; /** * Button link details. */ link?: wix_blog_backend.Posts.Link; /** * Styling for the button. */ styles?: wix_blog_backend.Posts.Styles; /** * The text to display on the button. */ text?: string; /** * The button type. */ type?: string; }; type Category = { /** * Category ID. */ _id?: string; /** * Category cover image. */ coverImage?: string; /** * __Deprecated.__ Use `coverImage` instead. * This property will be removed on June 30, 2023. * * Category cover image or video. */ coverMedia?: wix_blog_backend.Posts.CoverMedia; /** * Category description. */ description?: string; /** * Category position in sequence. Categories with a lower display position are displayed first. Categories with a position of `-1` appear at the end of the sequence. * * Default: `-1` */ displayPosition?: number; /** * Reserved for internal use. */ internalId?: string; /** * Category label. Displayed in the Category Menu. */ label?: string; /** * Category language. * * Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */ language?: string; /** * Reserved for internal use. */ oldRank?: number; /** * Number of posts in the category. */ postCount?: number; /** * __Deprecated.__ Use `displayPosition` instead. * This property will be removed on June 30, 2023. * * Category position in sequence. */ rank?: number; /** * SEO data. */ seoData?: wix_blog_backend.Posts.SeoSchema; /** * Category slug. For example, `'category-slug'`. */ slug?: string; /** * Category title. */ title?: string; /** * ID of the category's translations. All translations of a single category share the same `translationId`. */ translationId?: string; /** * Category URL. */ url?: string; }; type CellStyle = { /** * Cell background color as a hexadecimal value. */ backgroundColor?: string; /** * Vertical alignment for the cell's text. */ verticalAlignment?: string; }; type CodeBlockData = { /** * Styling for the code block's text. */ textStyle?: wix_blog_backend.Posts.TextStyle; }; type CollapsibleListData = { /** * Styling for the collapsible list's container. */ containerData?: wix_blog_backend.Posts.PluginContainerData; /** * The direction of the text in the list. Either left-to-right or right-to-left. */ direction?: string; /** * If `true`, only one item can be expanded at a time. */ expandOnlyOne?: boolean; /** * Sets which items are expanded when the page loads. */ initialExpandedItems?: string; /** * If `true`, The collapsible item will appear in search results as an FAQ. */ isQapageData?: boolean; }; type ColorData = { /** * The text's background color as a hexadecimal value. */ background?: string; /** * The text's foreground color as a hexadecimal value. */ foreground?: string; }; type Colors = { /** * The background color as a hexadecimal value. */ background?: string; /** * The border color as a hexadecimal value. */ border?: string; /** * The text color as a hexadecimal value. */ text?: string; }; type CoverMedia = { /** * Whether the cover media is custom. * * `false` if the cover media is the first image or video in the post. `true` if set to some other image or video. */ custom?: boolean; /** * Whether cover media is displayed. */ displayed?: boolean; /** * Is cover media enabled. * Selected by user whether to display cover media on the feed */ enabled?: boolean; /** * Image url. */ image?: string; /** * Video url. */ video?: string; }; type CoverMediaMediaOneOf = { /** * Image url. */ image?: string; /** * Video url. */ video?: string; }; type CreateDraftPostFromTemplateRequest = { /** * Post template id */ postTemplateId: string; }; type CreateDraftPostFromTemplateResponse = { /** * Created draft post */ draftPost?: wix_blog_backend.Posts.DraftPost; }; type CursorMetaData = { /** * Cursor pointing to next result page. */ next?: string; }; type CursorPaging = { /** * Pointer to the next or previous page in the list of results. * * You can get the relevant cursor token * from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. */ cursor?: string; /** * Number of items to load. */ limit?: number; }; type Cursors = { /** * Cursor pointing to next page in the list of results. */ next?: string; /** * Cursor pointing to previous page in the list of results. */ prev?: string; }; type Decoration = { /** * Data for an anchor link decoration. */ anchorData?: wix_blog_backend.Posts.AnchorData; /** * Data for a color decoration. */ colorData?: wix_blog_backend.Posts.ColorData; /** * Data for a font size decoration. */ fontSizeData?: wix_blog_backend.Posts.FontSizeData; /** * Font weight for a bold decoration. */ fontWeightValue?: number; /** * Data for an italic decoration. */ italicData?: boolean; /** * Data for an external link decoration. */ linkData?: wix_blog_backend.Posts.LinkData; /** * Data for a mention decoration. */ mentionData?: wix_blog_backend.Posts.MentionData; /** * The type of decoration to apply. */ type?: string; /** * Data for an underline decoration. */ underlineData?: boolean; }; type DecorationDataOneOf = { /** * Data for an anchor link decoration. */ anchorData?: wix_blog_backend.Posts.AnchorData; /** * Data for a color decoration. */ colorData?: wix_blog_backend.Posts.ColorData; /** * Data for a font size decoration. */ fontSizeData?: wix_blog_backend.Posts.FontSizeData; /** * Font weight for a bold decoration. */ fontWeightValue?: number; /** * Data for an italic decoration. */ italicData?: boolean; /** * Data for an external link decoration. */ linkData?: wix_blog_backend.Posts.LinkData; /** * Data for a mention decoration. */ mentionData?: wix_blog_backend.Posts.MentionData; /** * Data for an underline decoration. */ underlineData?: boolean; }; type Design = { /** * Styling for voting options. */ options?: wix_blog_backend.Posts.OptionDesign; /** * Styling for the poll. */ poll?: wix_blog_backend.Posts.PollDesign; }; type Dimensions = { /** * An array representing the minimum width of each column in pixels. */ colsMinWidth?: Array; /** * An array representing relative width of each column in relation to the other columns. */ colsWidthRatio?: Array; /** * An array representing the height of each row in pixels. */ rowsHeight?: Array; }; type DividerData = { /** * Divider alignment. */ alignment?: string; /** * Styling for the divider's container. */ containerData?: wix_blog_backend.Posts.PluginContainerData; /** * Divider line style. */ lineStyle?: string; /** * Divider width. */ width?: string; }; type DocumentStyle = { /** * Styling for block quote nodes. */ blockquote?: wix_blog_backend.Posts.TextNodeStyle; /** * Styling for code block nodes. */ codeBlock?: wix_blog_backend.Posts.TextNodeStyle; /** * Styling for H5 nodes. */ headerFive?: wix_blog_backend.Posts.TextNodeStyle; /** * Styling for H4 nodes. */ headerFour?: wix_blog_backend.Posts.TextNodeStyle; /** * Styling for H1 nodes. */ headerOne?: wix_blog_backend.Posts.TextNodeStyle; /** * Styling for H6 nodes. */ headerSix?: wix_blog_backend.Posts.TextNodeStyle; /** * Styling for H3 nodes. */ headerThree?: wix_blog_backend.Posts.TextNodeStyle; /** * Styling for H2 nodes. */ headerTwo?: wix_blog_backend.Posts.TextNodeStyle; /** * Styling for paragraph nodes. */ paragraph?: wix_blog_backend.Posts.TextNodeStyle; }; type DraftPost = { /** * Date the draft post was first created. */ _createdDate?: Date; /** * Draft post ID. */ _id?: string; /** * Category IDs of the draft post. */ categoryIds?: Array; /** * Reserved for internal use. */ changeOrigin?: string; /** * Whether commenting on the draft post is enabled. */ commentingEnabled?: boolean; /** * Reserved for internal use. */ content?: Object; /** * Reserved for internal use. */ contentId?: string; /** * Date the draft post was last edited. */ editedDate?: Date; /** * Reserved for internal use. */ editingSessionId?: string; /** * Draft post excerpt. * * If no excerpt has been manually set, an excerpt is automatically generated from the post's text. * This can be retrieved using the `GENERATED_EXCERPT` fieldset. */ excerpt?: string; /** * Whether the draft post is marked as featured. */ featured?: boolean; /** * Date the post was first published. */ firstPublishedDate?: Date; /** * Indicates if there are changes made to the draft post that have not yet been published. */ hasUnpublishedChanges?: boolean; /** * Hashtags in the post. */ hashtags?: Array; /** * Image placed at the top of the blog page. */ heroImage?: string; /** * Reserved for internal use. */ internalId?: string; /** * Language the draft post is written in. * * 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */ language?: string; /** * Post cover media. */ media?: wix_blog_backend.Posts.BlogMedia; /** * Draft post owner's member ID. */ memberId?: string; /** * Estimated reading time of the draft post (calculated automatically). */ minutesToRead?: number; /** * Details of the draft post in review. Only relevant to posts submitted by guest writers. */ moderationDetails?: wix_blog_backend.Posts.ModerationDetails; /** * Reserved for internal use. */ mostRecentContributorId?: string; /** * Reserved for internal use. */ paidContentParagraph?: number; /** * Number of paragraphs to display in a paid content preview for non-paying users. */ previewTextParagraph?: number; /** * [Pricing plan IDs](https://dev.wix.com/api/rest/wix-pricing-plans). Only relevant if a post is assigned to a specific pricing plan. */ pricingPlanIds?: Array; /** * IDs of posts related to this draft post. */ relatedPostIds?: Array; /** * Draft Post rich content. */ richContent?: wix_blog_backend.Posts.RichContent; /** * Date the draft post is scheduled to be published. */ scheduledPublishDate?: Date; /** * SEO data. */ seoData?: wix_blog_backend.Posts.SeoSchema; /** * SEO slug. */ seoSlug?: string; /** * Reserved for internal use. */ slugs?: Array; /** * Status of the draft post. */ status?: string; /** * Tag IDs the draft post is tagged with. */ tagIds?: Array; /** * Draft post title. */ title?: string; /** * ID of the draft post's translations. * * All translations of a single post share the same `translationId`. */ translationId?: string; /** * Draft post URL preview. What the URL will look like once the post is published. */ url?: string; }; type DraftPostTranslation = { /** * Post ID. */ _id?: string; /** * Language the post is written in. */ language?: string; /** * SEO data. */ seoData?: wix_blog_backend.Posts.SeoSchema; /** * Post slug. For example, 'post-slug'. */ slug?: string; /** * Post status. */ status?: string; /** * Post URL. */ url?: string; }; type EmbedData = { /** * Styling for the oEmbed node's container. */ containerData?: wix_blog_backend.Posts.PluginContainerData; /** * An [oEmbed](https://www.oembed.com) object. */ oembed?: wix_blog_backend.Posts.Oembed; /** * Origin asset source. */ src?: string; }; type EmbedMedia = { /** * Thumbnail details. */ thumbnail?: wix_blog_backend.Posts.EmbedThumbnail; /** * Video details. */ video?: wix_blog_backend.Posts.EmbedVideo; }; type EmbedThumbnail = { /** * Thumbnail height. */ height?: number; /** * Thumbnail url. */ url?: string; /** * Thumbnail width. */ width?: number; }; type EmbedVideo = { /** * Video height. */ height?: number; /** * Video url. */ url?: string; /** * Video width. */ width?: number; }; type EventData = { /** * Event location. */ location?: string; /** * Event schedule. */ scheduling?: string; }; type FileData = { /** * Styling for the file's container. */ containerData?: wix_blog_backend.Posts.PluginContainerData; /** * File MIME type. */ mimeType?: string; /** * File name. */ name?: string; /** * File path. */ path?: string; /** * Settings for PDF files. */ pdfSettings?: wix_blog_backend.Posts.PDFSettings; /** * File size in KB. */ size?: number; /** * The source for the file's data. */ src?: wix_blog_backend.Posts.FileSource; /** * File type. */ type?: string; }; type FileSource = { /** * An ID that's resolved to a URL by a resolver function. */ _id?: string; /** * Custom ID. Use `id` instead. */ custom?: string; /** * Indicates whether the file's source is private. */ private?: boolean; /** * The absolute URL for the file's source. */ url?: string; }; type FileSourceDataOneOf = { /** * An ID that's resolved to a URL by a resolver function. */ _id?: string; /** * Custom ID. Use `id` instead. */ custom?: string; /** * The absolute URL for the file's source. */ url?: string; }; type FontSizeData = { /** * The units used for the font size. */ unit?: string; /** * Font size value. */ value?: number; }; type GIF = { /** * GIF format URL. */ gif?: string; /** * MP4 format URL. */ mp4?: string; /** * Thumbnail URL. */ still?: string; }; type GIFData = { /** * Styling for the GIF's container. */ containerData?: wix_blog_backend.Posts.PluginContainerData; /** * The source of the downsized GIF. */ downsized?: wix_blog_backend.Posts.GIF; /** * Height in pixels. */ height?: number; /** * The source of the full size GIF. */ original?: wix_blog_backend.Posts.GIF; /** * Width in pixels. */ width?: number; }; type GalleryData = { /** * Styling for the gallery's container. */ containerData?: wix_blog_backend.Posts.PluginContainerData; /** * Sets whether the gallery's download button is disabled. */ disableDownload?: boolean; /** * Sets whether the gallery's expand button is disabled. */ disableExpand?: boolean; /** * The items in the gallery. */ items?: Array; /** * Options for defining the gallery's appearance. */ options?: wix_blog_backend.Posts.GalleryOptions; }; type GalleryOptions = { /** * Styling for gallery items. */ item?: wix_blog_backend.Posts.ItemStyle; /** * Gallery layout. */ layout?: wix_blog_backend.Posts.Layout; /** * Styling for gallery thumbnail images. */ thumbnails?: wix_blog_backend.Posts.Thumbnails; }; type GetPostBySlugOptions = { /** * List of post fields to be included in the response. By default, any fields not passed are not returned. * * Supported Values: * `"CONTACT_ID"`, `"CONTENT_TEXT"`, `"METRICS"`, `"SEO"`, and `"URL"`. */ fieldsets?: Array; }; type GetPostBySlugRequest = { /** * Reserved for internal use. */ fieldsToInclude?: Array; /** * List of post fields to be included in the response. By default, any fields not passed are not returned. * * Supported Values: * `"CONTACT_ID"`, `"CONTENT_TEXT"`, `"METRICS"`, `"SEO"`, and `"URL"`. */ fieldsets?: Array; /** * Slug of the post to retrieve. */ slug: string; }; type GetPostBySlugResponse = { /** * Post info. */ post?: wix_blog_backend.Posts.Post; }; type GetPostMetricsRequest = { /** * Post ID. */ postId: string; }; type GetPostMetricsResponse = { /** * Post metrics. */ metrics?: wix_blog_backend.Posts.Metrics; }; type GetPostOptions = { /** * List of post fields to be included in the response. By default, any fields not passed are not returned. * * Supported Values: * `"CONTACT_ID"`, `"CONTENT_TEXT"`, `"METRICS"`, `"SEO"`, and `"URL"`. */ fieldsets?: Array; }; type GetPostRequest = { /** * Reserved for internal use. */ fieldsToInclude?: Array; /** * List of post fields to be included in the response. By default, any fields not passed are not returned. * * Supported Values: * `"CONTACT_ID"`, `"CONTENT_TEXT"`, `"METRICS"`, `"SEO"`, and `"URL"`. */ fieldsets?: Array; /** * Post ID. */ postId: string; }; type GetPostResponse = { /** * Post info. */ post?: wix_blog_backend.Posts.Post; }; type GetTemplateRequest = { /** * Post template id */ postTemplateId: string; }; type GetTemplateResponse = { /** * Post template */ postTemplate?: wix_blog_backend.Posts.Post; }; type GetTotalLikesPerMemberRequest = { /** * Member ID. */ memberId: string; }; type GetTotalLikesPerMemberResponse = { /** * The total number of likes of the member. */ total?: number; }; type GetTotalPostsOptions = { /** * Language filter. * * 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */ language?: string; }; type GetTotalPostsRequest = { /** * Language filter. * * 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */ language?: string; }; type GetTotalPostsResponse = { /** * Total amount of published posts. */ total?: number; }; type GetTotalPublicationsOptions = { /** * Language filter */ language?: string; }; type GetTotalPublicationsRequest = { /** * Language filter */ language?: string; }; type GetTotalPublicationsResponse = { /** * Total amount of publications. */ total?: number; }; type Gradient = { /** * The gradient angle in degrees. */ angle?: number; /** * The end color as a hexademical value. */ lastColor?: string; /** * The start color as a hexademical value. */ startColor?: string; }; type HTMLData = { /** * Styling for the HTML node's container. */ containerData?: wix_blog_backend.Posts.PluginContainerData; /** * The HTML code for the node. */ html?: string; /** * Whether this is an AdSense element. Use `source` instead. */ isAdsense?: boolean; /** * The type of HTML code. */ source?: string; /** * The URL for the HTML code for the node. */ url?: string; }; type HTMLDataDataOneOf = { /** * The HTML code for the node. */ html?: string; /** * Whether this is an AdSense element. Use `source` instead. */ isAdsense?: boolean; /** * The URL for the HTML code for the node. */ url?: string; }; type HeadingData = { /** * Indentation level from 1-6. */ indentation?: number; /** * Heading level from 1-6. */ level?: number; /** * Styling for the heading text. */ textStyle?: wix_blog_backend.Posts.TextStyle; }; type Height = { /** * A custom height value in pixels. */ custom?: string; }; type Image = { /** * Link details for images that are links. */ link?: wix_blog_backend.Posts.Link; /** * Image file details. */ media?: wix_blog_backend.Posts.Media; }; type ImageData = { /** * Image's alternative text. */ altText?: string; /** * Image caption. */ caption?: string; /** * Styling for the image's container. */ containerData?: wix_blog_backend.Posts.PluginContainerData; /** * Sets whether the image's download button is disabled. */ disableDownload?: boolean; /** * Sets whether the image expands to full screen when clicked. */ disableExpand?: boolean; /** * Image file details. */ image?: wix_blog_backend.Posts.Media; /** * Link details for images that are links. */ link?: wix_blog_backend.Posts.Link; }; type InitialPostsCopied = { /** * Number of posts copied. */ count?: number; }; type Item = { /** * Item's alternative text. */ altText?: string; /** * An image item. */ image?: wix_blog_backend.Posts.Image; /** * Item title. */ title?: string; /** * A video item. */ video?: wix_blog_backend.Posts.Video; }; type ItemDataOneOf = { /** * An image item. */ image?: wix_blog_backend.Posts.Image; /** * A video item. */ video?: wix_blog_backend.Posts.Video; }; type ItemStyle = { /** * Sets how item images are cropped. */ crop?: string; /** * Item ratio */ ratio?: number; /** * The spacing between items in pixels. */ spacing?: number; /** * Desirable dimension for each item in pixels (behvaior changes according to gallery type) */ targetSize?: number; }; type Layout = { /** * Sets whether horizontal scroll is enabled. */ horizontalScroll?: boolean; /** * The number of columns to display on mobile screens. */ mobileNumberOfColumns?: number; /** * The number of columns to display on full size screens. */ numberOfColumns?: number; /** * Gallery orientation. */ orientation?: string; /** * Gallery layout type. */ type?: string; }; type Link = { /** * The target node's ID. Used for linking to another node in this object. */ anchor?: string; /** * A serialized object used for a custom or external link panel. */ customData?: string; /** * The HTML `rel` attribute value for the link. This object specifies the relationship between the current document and the linked document. */ rel?: wix_blog_backend.Posts.Rel; /** * he HTML `target` attribute value for the link. This property defines where the linked document opens as follows: * `SELF` - Default. Opens the linked document in the same frame as the link. * `BLANK` - Opens the linked document in a new browser tab or window. * `PARENT` - Opens the linked document in the link's parent frame. * `TOP` - Opens the linked document in the full body of the link's browser tab or window. */ target?: string; /** * The absolute URL for the linked document. */ url?: string; }; type LinkData = { /** * Link details. */ link?: wix_blog_backend.Posts.Link; }; type LinkDataOneOf = { /** * The target node's ID. Used for linking to another node in this object. */ anchor?: string; /** * The absolute URL for the linked document. */ url?: string; }; type LinkPreviewData = { /** * Styling for the link preview's container. */ containerData?: wix_blog_backend.Posts.PluginContainerData; /** * Preview description. */ description?: string; /** * The preview content as HTML. */ html?: string; /** * Link details. */ link?: wix_blog_backend.Posts.Link; /** * Preview thumbnail URL. */ thumbnailUrl?: string; /** * Preview title. */ title?: string; }; type ListDemoPostsOptions = { /** * Category filter. * * Pass an array of category IDs to return only posts with any of the provided categories. * If omitted, all posts with or without associated categories are returned. */ categoryIds?: Array; /** * Whether to return only featured posts. * * Default: `false` */ featured?: boolean; /** * Reserved for internal use. */ fieldsToInclude?: Array; /** * List of post fields to be included in the response. By default, any fields not passed are not returned. * * Supported Values: * `"CONTACT_ID"`, `"CONTENT_TEXT"`, `"METRICS"`, `"SEO"`, and `"URL"`. */ fieldsets?: Array; /** * Hashtag filter. * * Pass an array of hashtags to return only posts containing any of the provided hashtags. * If omitted, all posts with or without hashtags are returned. */ hashtags?: Array; /** * Language filter. * * 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */ language?: string; /** * Post owner's member ID. */ memberId?: string; /** * Pagination options. */ paging?: wix_blog_backend.Posts.BlogPaging; /** * Sort order by descending view count, ascending or descending publish date, or default to descending by publish date with pinned posts first. */ sort?: string; /** * Tag filter. * * Pass an array of tag IDs to return only posts with any of the provided tags. * If omitted, all posts with or without tags are returned. */ tagIds?: Array; }; type ListMigratedPostsOptions = { /** * Cursor pointing to page of results */ paging?: wix_blog_backend.Posts.BlogCursorPaging; }; type ListMigratedPostsRequest = { /** * New blog version instance id */ instanceId: string; /** * Cursor pointing to page of results */ paging?: wix_blog_backend.Posts.BlogCursorPaging; }; type ListMigratedPostsResponse = { /** * Pagination */ pagingMetaData?: wix_blog_backend.Posts.CursorMetaData; /** * List of posts */ posts?: Array; /** * Data of post in old blog by post id */ postsMigrationMeta?: Record; }; type ListPostsOptions = { /** * List of category IDs to filter for. * * Default: All categories */ categoryIds?: Array; /** * Featured filter. Whether to return only featured posts. */ featured?: boolean; /** * List of post fields to be included in the response. By default, any fields not passed are not returned. * * Supported Values: * `"CONTACT_ID"`, `"CONTENT_TEXT"`, `"METRICS"`, `"SEO"`, and `"URL"`. */ fieldsets?: Array; /** * List of hashtags to filter for. * * Default: All hashtags */ hashtags?: Array; /** * Language filter. * * 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */ language?: string; /** * Member ID to filter for. * * Default: All members */ memberId?: string; /** * Pagination options. */ paging?: wix_blog_backend.Posts.BlogPaging; /** * Sort order. * * Sort by one of the following: * - `'VIEW_COUNT'` descending view count * - `'LIKE_COUNT'` descending like count * - `'PUBLISHED_DATE_ASC'` ascending published date * - `'PUBLISHED_DATE_DESC'` descending published date * - `'TITLE_ASC'` ascending title * - `'TITLE_DESC'` descending title * * Default: `'PUBLISHED_DATE_DESC'` */ sort?: string; /** * List of tag IDs to filter for. * * Default: All tags */ tagIds?: Array; }; type ListPostsRequest = { /** * Category filter. * * Pass an array of category IDs to return only posts with any of the provided categories. * If omitted, all posts with or without associated categories are returned. */ categoryIds?: Array; /** * Whether to return only featured posts. * * Default: `false` */ featured?: boolean; /** * Reserved for internal use. */ fieldsToInclude?: Array; /** * List of post fields to be included in the response. By default, any fields not passed are not returned. * * Supported Values: * `"CONTACT_ID"`, `"CONTENT_TEXT"`, `"METRICS"`, `"SEO"`, and `"URL"`. */ fieldsets?: Array; /** * Hashtag filter. * * Pass an array of hashtags to return only posts containing any of the provided hashtags. * If omitted, all posts with or without hashtags are returned. */ hashtags?: Array; /** * Language filter. * * 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */ language?: string; /** * Post owner's member ID. */ memberId?: string; /** * Pagination options. */ paging?: wix_blog_backend.Posts.BlogPaging; /** * Sort order by descending view count, ascending or descending publish date, or default to descending by publish date with pinned posts first. */ sort?: string; /** * Tag filter. * * Pass an array of tag IDs to return only posts with any of the provided tags. * If omitted, all posts with or without tags are returned. */ tagIds?: Array; }; type ListPostsResponse = { /** * Details on the paged set of results returned. */ metaData?: wix_blog_backend.Posts.MetaData; /** * List of posts. */ posts?: Array; }; type ListTemplatesOptions = { /** * Filter post templates by given template category ids */ categoryIds?: Array; /** * Filter post templates by provided language */ language?: string; /** * Returns post template categories when set to TRUE */ listTemplateCategories?: boolean; /** * Pagination options. */ paging?: wix_blog_backend.Posts.BlogPaging; /** * Sort order by ascending/descending publish date. Default is ascending publish date sort */ sort?: string; }; type ListTemplatesRequest = { /** * Filter post templates by given template category ids */ categoryIds?: Array; /** * Filter post templates by provided language */ language?: string; /** * Returns post template categories when set to TRUE */ listTemplateCategories?: boolean; /** * Pagination options. */ paging?: wix_blog_backend.Posts.BlogPaging; /** * Sort order by ascending/descending publish date. Default is ascending publish date sort */ sort?: string; }; type ListTemplatesResponse = { /** * Available post templates */ postTemplates?: Array; /** * Details on the paged set of posts templates returned. */ postTemplatesMetaData?: wix_blog_backend.Posts.MetaData; /** * Post template categories. This value is returned empty unless asked explicitly */ templateCategories?: Array; }; type ListValue = { /** * Repeated field of dynamically typed values. */ values?: Array; }; type MapData = { /** * Styling for the map's container. */ containerData?: wix_blog_backend.Posts.PluginContainerData; /** * Map settings. */ mapSettings?: wix_blog_backend.Posts.MapSettings; }; type MapSettings = { /** * The address to display on the map. */ address?: string; /** * Sets whether the map is draggable. */ draggable?: boolean; /** * Initial zoom value. */ initialZoom?: number; /** * Location latitude. */ lat?: number; /** * Location longitude. */ lng?: number; /** * Location name. */ locationName?: string; /** * Map type. `HYBRID` is a combination of the `ROADMAP` and `SATELLITE` map types. */ mapType?: string; /** * Sets whether the location marker is visible. */ marker?: boolean; /** * Sets whether street view control is enabled. */ streetViewControl?: boolean; /** * Sets whether view mode control is enabled. */ viewModeControl?: boolean; /** * Sets whether zoom control is enabled. */ zoomControl?: boolean; }; type Media = { /** * Media duration in seconds. Only relevant for audio and video files. */ duration?: number; /** * Media height in pixels. */ height?: number; /** * The source for the media's data. */ src?: wix_blog_backend.Posts.FileSource; /** * Media width in pixels. */ width?: number; }; type MentionData = { /** * Mentioned user's ID. */ _id?: string; /** * The mentioned user's name. */ name?: string; /** * The version of the user's name that appears after the `@` character in the mention. */ slug?: string; }; type MetaData = { /** * Number of items returned in this response. */ count?: number; /** * Pointer to the next or previous page in the list of results. */ cursor?: string; /** * Number of items skipped in the current sort order. */ offset?: number; /** * Total number of items that match the query. */ total?: number; }; type Metadata = { /** * Object ID. */ _id?: string; /** * When the object was created. */ createdTimestamp?: Date; /** * When the object was most recently updated. */ updatedTimestamp?: Date; /** * Schema version. */ version?: number; }; type Metrics = { /** * Total number of post comments. */ comments?: number; /** * Total number of post likes. */ likes?: number; /** * Total number of post views. */ views?: number; }; type ModerationDetails = { /** * Member ID of the person who approved or rejected the post. */ moderatedBy?: string; /** * Date and time the post was approved or rejected by a moderator. */ moderationDate?: Date; /** * Status indicating whether the submission was approved or rejected by the moderator. * * Supported values: `'APPROVED'`, `'REJECTED'`, `'PENDING'`. */ status?: string; /** * Member ID of the person who submitted the post. */ submittedBy?: string; /** * Date and time the post was submitted for moderation. */ submittedDate?: Date; }; type Node = { /** * Node ID. */ _id?: string; /** * Data for an app embed node. */ appEmbedData?: wix_blog_backend.Posts.AppEmbedData; /** * Data for an audio node. */ audioData?: wix_blog_backend.Posts.AudioData; /** * Data for a block quote node. */ blockquoteData?: wix_blog_backend.Posts.BlockquoteData; /** * Data for a bulleted list node. */ bulletedListData?: wix_blog_backend.Posts.BulletedListData; /** * Data for a button node. */ buttonData?: wix_blog_backend.Posts.ButtonData; /** * Data for a code block node. */ codeBlockData?: wix_blog_backend.Posts.CodeBlockData; /** * Data for a collapsible list node. */ collapsibleListData?: wix_blog_backend.Posts.CollapsibleListData; /** * Data for a divider node. */ dividerData?: wix_blog_backend.Posts.DividerData; /** * Data for an oEmbed node. */ embedData?: wix_blog_backend.Posts.EmbedData; /** * Data for a custon external node. */ externalData?: Object; /** * Data for a file node. */ fileData?: wix_blog_backend.Posts.FileData; /** * Data for a gallery node. */ galleryData?: wix_blog_backend.Posts.GalleryData; /** * Data for a GIF node. */ gifData?: wix_blog_backend.Posts.GIFData; /** * Data for a heading node. */ headingData?: wix_blog_backend.Posts.HeadingData; /** * Data for an embedded HTML node. */ htmlData?: wix_blog_backend.Posts.HTMLData; /** * Data for an image node. */ imageData?: wix_blog_backend.Posts.ImageData; /** * Data for a link preview node. */ linkPreviewData?: wix_blog_backend.Posts.LinkPreviewData; /** * Data for a map node. */ mapData?: wix_blog_backend.Posts.MapData; /** * A list of child nodes. */ nodes?: Array; /** * Data for an ordered list node. */ orderedListData?: wix_blog_backend.Posts.OrderedListData; /** * Data for a paragraph node. */ paragraphData?: wix_blog_backend.Posts.ParagraphData; /** * Data for a poll node. */ pollData?: wix_blog_backend.Posts.PollData; /** * Padding and background color styling for the node. */ style?: wix_blog_backend.Posts.NodeStyle; /** * Data for a table cell node. */ tableCellData?: wix_blog_backend.Posts.TableCellData; /** * Data for a table node. */ tableData?: wix_blog_backend.Posts.TableData; /** * Data for a text node. Used to apply decorations to text. */ textData?: wix_blog_backend.Posts.TextData; /** * Node type. Use `APP_EMBED` for nodes that embed content from other Wix apps. Use `EMBED` to embed content in [oEmbed](https://oembed.com/) format. */ type?: string; /** * Data for a video node. */ videoData?: wix_blog_backend.Posts.VideoData; }; type NodeDataOneOf = { /** * Data for an app embed node. */ appEmbedData?: wix_blog_backend.Posts.AppEmbedData; /** * Data for an audio node. */ audioData?: wix_blog_backend.Posts.AudioData; /** * Data for a block quote node. */ blockquoteData?: wix_blog_backend.Posts.BlockquoteData; /** * Data for a bulleted list node. */ bulletedListData?: wix_blog_backend.Posts.BulletedListData; /** * Data for a button node. */ buttonData?: wix_blog_backend.Posts.ButtonData; /** * Data for a code block node. */ codeBlockData?: wix_blog_backend.Posts.CodeBlockData; /** * Data for a collapsible list node. */ collapsibleListData?: wix_blog_backend.Posts.CollapsibleListData; /** * Data for a divider node. */ dividerData?: wix_blog_backend.Posts.DividerData; /** * Data for an oEmbed node. */ embedData?: wix_blog_backend.Posts.EmbedData; /** * Data for a custon external node. */ externalData?: Object; /** * Data for a file node. */ fileData?: wix_blog_backend.Posts.FileData; /** * Data for a gallery node. */ galleryData?: wix_blog_backend.Posts.GalleryData; /** * Data for a GIF node. */ gifData?: wix_blog_backend.Posts.GIFData; /** * Data for a heading node. */ headingData?: wix_blog_backend.Posts.HeadingData; /** * Data for an embedded HTML node. */ htmlData?: wix_blog_backend.Posts.HTMLData; /** * Data for an image node. */ imageData?: wix_blog_backend.Posts.ImageData; /** * Data for a link preview node. */ linkPreviewData?: wix_blog_backend.Posts.LinkPreviewData; /** * Data for a map node. */ mapData?: wix_blog_backend.Posts.MapData; /** * Data for an ordered list node. */ orderedListData?: wix_blog_backend.Posts.OrderedListData; /** * Data for a paragraph node. */ paragraphData?: wix_blog_backend.Posts.ParagraphData; /** * Data for a poll node. */ pollData?: wix_blog_backend.Posts.PollData; /** * Data for a table cell node. */ tableCellData?: wix_blog_backend.Posts.TableCellData; /** * Data for a table node. */ tableData?: wix_blog_backend.Posts.TableData; /** * Data for a text node. Used to apply decorations to text. */ textData?: wix_blog_backend.Posts.TextData; /** * Data for a video node. */ videoData?: wix_blog_backend.Posts.VideoData; }; type NodeStyle = { /** * The background color as a hexadecimal value. */ backgroundColor?: string; /** * The bottom padding value in pixels. */ paddingBottom?: string; /** * The top padding value in pixels. */ paddingTop?: string; }; type Oembed = { /** * The name of the author or owner of the resource. */ authorName?: string; /** * The URL for the author or owner of the resource. */ authorUrl?: string; /** * The height of the resource specified in the `url` property in pixels. */ height?: number; /** * HTML for embedding a video player. The HTML should have no padding or margins. */ html?: string; /** * The name of the resource provider. */ providerName?: string; /** * The URL for the resource provider. */ providerUrl?: string; /** * The height of the resource's thumbnail image. If this property is defined, `thumbnailUrl` and `thumbnailWidth`must also be defined. */ thumbnailHeight?: string; /** * The URL for a thumbnail image for the resource. If this property is defined, `thumbnailWidth` and `thumbnailHeight` must also be defined. */ thumbnailUrl?: string; /** * The width of the resource's thumbnail image. If this property is defined, `thumbnailUrl` and `thumbnailHeight` must also be defined. */ thumbnailWidth?: string; /** * Resource title. */ title?: string; /** * The resource type. */ type?: string; /** * The source URL for the resource. */ url?: string; /** * The oEmbed version number. This value must be `1.0`. */ version?: string; /** * The URL for an embedded viedo. */ videoUrl?: string; /** * The width of the resource specified in the `url` property in pixels. */ width?: number; }; type OldBlogMigratedEvent = { /** * Instance id of new version of blog */ newBlogInstanceId?: string; /** * Instance id of old version of blog */ oldBlogInstanceId?: string; }; type Option = { /** * Option ID. */ _id?: string; /** * The image displayed with the option. */ image?: wix_blog_backend.Posts.Media; /** * Option title. */ title?: string; }; type OptionDesign = { /** * Border radius in pixels. */ borderRadius?: number; }; type OptionLayout = { /** * Sets whether to display option images. */ enableImage?: boolean; }; type OrderedListData = { /** * Indentation level. */ indentation?: number; }; type PDFSettings = { /** * Sets whether the PDF download button is disabled. */ disableDownload?: boolean; /** * Sets whether the PDF print button is disabled. */ disablePrint?: boolean; /** * PDF view mode. One of the following: * `NONE` : The PDF isn't displayed. * `FULL` : A full page view of the PDF is displayed. * `MINI` : A mini view of the PDF is displayed. */ viewMode?: string; }; type Paging = { /** * Number of items to load. */ limit?: number; /** * Number of items to skip in the current sort order. */ offset?: number; }; type PagingMetadataV2 = { /** * Number of items returned in the response. */ count?: number; /** * Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */ cursors?: wix_blog_backend.Posts.Cursors; /** * Offset that was requested. */ offset?: number; /** * Flag that indicates the server failed to calculate the `total` field. */ tooManyToCount?: boolean; /** * Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */ total?: number; }; type ParagraphData = { /** * Indentation level from 1-6. */ indentation?: number; /** * Styling for the paragraph text. */ textStyle?: wix_blog_backend.Posts.TextStyle; }; type PeriodPostCount = { /** * Start of time range in ISO 8601 date and time format. */ periodStart?: Date; /** * Number of posts published during this month. */ postCount?: number; }; type PeriodPublicationsCount = { /** * Start of time range in ISO 8601 date and time format. */ periodStart?: Date; /** * Number of posts published during this month. */ publicationsCount?: number; }; type Permissions = { /** * Sets whether one voter can vote multiple times. */ allowMultipleVotes?: boolean; /** * Sets who can view the poll results. */ view?: string; /** * Sets who can vote. */ vote?: string; }; type PlatformQuery = { /** * Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: wix_blog_backend.Posts.CursorPaging; /** * Filter object in the following format: * `"filter" : { * "fieldName1": "value1", * "fieldName2":{"$operator":"value2"} * }` * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains` */ filter?: Object; /** * Paging options to limit and skip the number of items. */ paging?: wix_blog_backend.Posts.Paging; /** * Sort object in the following format: * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]` */ sort?: Array; }; type PlatformQueryPagingMethodOneOf = { /** * Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: wix_blog_backend.Posts.CursorPaging; /** * Paging options to limit and skip the number of items. */ paging?: wix_blog_backend.Posts.Paging; }; type PlaybackOptions = { /** * Sets whether the media will automatically start playing. */ autoPlay?: boolean; /** * Sets whether media's will be looped. */ playInLoop?: boolean; /** * Sets whether media's controls will be shown. */ showControls?: boolean; }; type PluginContainerData = { /** * The node's alignment within its container. */ alignment?: string; /** * The height of the node when it's displayed. */ height?: wix_blog_backend.Posts.Height; /** * Spoiler cover settings for the node. */ spoiler?: wix_blog_backend.Posts.Spoiler; /** * Sets whether text should wrap around this node when it's displayed. If `textWrap` is `false`, the node takes up the width of its container. */ textWrap?: boolean; /** * The width of the node when it's displayed. */ width?: wix_blog_backend.Posts.PluginContainerDataWidth; }; type PluginContainerDataWidth = { /** * A custom width value in pixels. */ custom?: string; /** * One of the following predefined width options: * `CONTENT`: The width of the container matches the content width. * `SMALL`: Small width. * `ORIGINAL`: The width of the container matches the original asset width. * `FULL_WIDTH`: Full width. */ size?: string; }; type PluginContainerDataWidthDataOneOf = { /** * A custom width value in pixels. */ custom?: string; /** * One of the following predefined width options: * `CONTENT`: The width of the container matches the content width. * `SMALL`: Small width. * `ORIGINAL`: The width of the container matches the original asset width. * `FULL_WIDTH`: Full width. */ size?: string; }; type Poll = { /** * Poll ID. */ _id?: string; /** * Poll creator ID. */ creatorId?: string; /** * Main poll image. */ image?: wix_blog_backend.Posts.Media; /** * Voting options. */ options?: Array; /** * The poll's permissions and display settings. */ settings?: wix_blog_backend.Posts.PollSettings; /** * Poll title. */ title?: string; }; type PollData = { /** * Styling for the poll's container. */ containerData?: wix_blog_backend.Posts.PluginContainerData; /** * Styling for the poll and voting options. */ design?: wix_blog_backend.Posts.Design; /** * Layout settings for the poll and voting options. */ layout?: wix_blog_backend.Posts.PollDataLayout; /** * Poll data. */ poll?: wix_blog_backend.Posts.Poll; }; type PollDataLayout = { /** * Voting otpions layout settings. */ options?: wix_blog_backend.Posts.OptionLayout; /** * Poll layout settings. */ poll?: wix_blog_backend.Posts.PollLayout; }; type PollDesign = { /** * Background styling. */ background?: wix_blog_backend.Posts.Background; /** * Border radius in pixels. */ borderRadius?: number; }; type PollLayout = { /** * The direction of the text displayed in the voting options. Text can be displayed either right-to-left or left-to-right. */ direction?: string; /** * Sets whether to display the main poll image. */ enableImage?: boolean; /** * The layout for displaying the voting options. */ type?: string; }; type PollSettings = { /** * Permissions settings for voting. */ permissions?: wix_blog_backend.Posts.Permissions; /** * Sets whether voters are displayed in the vote results. */ showVoters?: boolean; /** * Sets whether the vote count is displayed. */ showVotesCount?: boolean; }; type Post = { /** * Post ID. */ _id?: string; /** * [Category IDs](https://www.wix.com/velo/reference/wix-blog-backend/category) of the post. */ categoryIds?: Array; /** * Whether commenting on the post is enabled. */ commentingEnabled?: boolean; /** * Post owner's [contact ID](https://www.wix.com/velo/reference/wix-crm-backend/contacts). */ contactId?: string; /** * Reserved for internal use. */ content?: string; /** * Reserved for internal use. */ contentId?: string; /** * The post's content in plain text. */ contentText?: string; /** * Reserved for internal use. */ coverMedia?: wix_blog_backend.Posts.CoverMedia; /** * Post excerpt. * Can be selected by a site contributor. By default, it is extracted from the content text's first characters. * * Max: 140 characters */ excerpt?: string; /** * Whether the post is marked as featured. */ featured?: boolean; /** * Date the post was first published. */ firstPublishedDate?: Date; /** * Hashtags in the post. */ hashtags?: Array; /** * Image placed at the top of the blog page. Only displays on mobile devices. */ heroImage?: string; /** * Reserved for internal use. */ internalCategoryIds?: Array; /** * Reserved for internal use. */ internalId?: string; /** * Reserved for internal use. */ internalRelatedPostIds?: Array; /** * Language the post is written in. * * 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */ language?: string; /** * Date the post was last published. */ lastPublishedDate?: Date; /** * Post cover media. */ media?: wix_blog_backend.Posts.BlogMedia; /** * Post owner's [member ID](https://www.wix.com/velo/reference/wix-members-backend). */ memberId?: string; /** * Estimated reading time. */ minutesToRead?: number; /** * Post moderation details. * * Only relevant to posts submitted by [guest writers](https://support.wix.com/en/article/wix-blog-moderating-blog-posts-from-your-guest-writers). Guest writers have the ability to write posts but not publish them. These posts can be rejected or approved for publishing by a blog editor or site owner. */ moderationDetails?: wix_blog_backend.Posts.ModerationDetails; /** * Reserved for internal use. */ mostRecentContributorId?: string; /** * Whether the post is pinned. If `true`, the post is placed at the top of the post list. */ pinned?: boolean; /** * Pricing plan IDs. * * If a post is assigned to a specific pricing plan. */ pricingPlanIds?: Array; /** * IDs of posts related to the post. */ relatedPostIds?: Array; /** * Post rich content */ richContent?: wix_blog_backend.Posts.RichContent; /** * SEO data. */ seoData?: wix_blog_backend.Posts.SeoSchema; /** * Part of a post's URL that refers to a specific post. * * For example, `'https:/example.com/posts/my-post-slug'`. */ slug?: string; /** * IDs of [tags](https://www.wix.com/velo/reference/wix-blog-backend/tags) the post is tagged with. */ tagIds?: Array; /** * Post title. */ title?: string; /** * ID of the post's translations when [Wix Multilingual](https://support.wix.com/en/article/wix-multilingual-translating-your-blog) is installed on a site. All translations of a single post will share the same `translationId`. */ translationId?: string; /** * Post URL. */ url?: string; }; type PostCountInfo = { /** * Total number of post comments */ comments?: number; /** * Total number of post likes */ likes?: number; /** * Total number of post views */ views?: number; }; type PostCountersUpdated = { /** * Visitor ID if person that liked the post is not logged in */ anonymousVisitorId?: string; /** * New counter value. */ counter?: number; /** * Member ID of person who triggered the counter update */ memberId?: string; /** * ID of the post which counters were updated. */ postId?: string; /** * Field of the updated counter. */ updatedCounterField?: string; }; type PostCountersUpdatedInitiatorOneOf = { /** * Visitor ID if person that liked the post is not logged in */ anonymousVisitorId?: string; /** * Member ID of person who triggered the counter update */ memberId?: string; }; type PostLiked = { /** * Visitor ID of person who liked the post when they are not logged in. */ anonymousVisitorId?: string; /** * Member ID of person who liked the post (only returned when the member was logged in when liking the post). */ memberId?: string; /** * ID of the liked post. */ postId?: string; }; type PostLikedInitiatorOneOf = { /** * Visitor ID of person who liked the post when they are not logged in. */ anonymousVisitorId?: string; /** * Member ID of person who liked the post (only returned when the member was logged in when liking the post). */ memberId?: string; }; type PostMigrationMetaData = { /** * Post author in old blog */ author?: string; /** * Old blog instance id */ instanceId?: string; /** * Post id in old blog */ postId?: string; /** * Post slug in old blog */ slug?: string; }; type PostOwnerChanged = {}; type PostUnliked = { /** * Visitor ID of person who unliked the post when they are not logged in. */ anonymousVisitorId?: string; /** * Member ID of person who unliked the post (returned when the member was logged in when unliking the post). */ memberId?: string; /** * ID of the unliked post. */ postId?: string; }; type PostUnlikedInitiatorOneOf = { /** * Visitor ID of person who unliked the post when they are not logged in. */ anonymousVisitorId?: string; /** * Member ID of person who unliked the post (returned when the member was logged in when unliking the post). */ memberId?: string; }; type QueryPostCountStatsOptions = { /** * Language filter. * * 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */ language?: string; /** * Number of months to include in response. */ months?: number; /** * Sort order. * Use `'ASC'` for ascending order or `'DESC'` for descending order. * * Default: `ASC` */ order?: string; /** * Reserved for internal use. */ rangeEnd?: Date; /** * Start of time range to return, in ISO 8601 date and time format. */ rangeStart?: Date; /** * Time zone to use when calculating the start of the month. * * [UTC timezone offset](https://en.wikipedia.org/wiki/List_of_UTC_offsets) format. For example, New York time zone is `-05`. */ timeZone?: string; }; type QueryPostCountStatsRequest = { /** * Language filter. * * 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */ language?: string; /** * Number of months to include in response. */ months?: number; /** * Order of returned results. * * - `OLDEST`: posts by date in ascending order. * - `NEWEST`: posts by date in descending order. * * Default: `OLDEST` */ order?: string; /** * __Deprecated.__ Use `months` instead. * This property will be removed on June 30, 2023. * * Non-inclusive end of time range to return, in ISO 8601 date and time format. */ rangeEnd?: Date; /** * Start of time range to return, in ISO 8601 date and time format. */ rangeStart?: Date; /** * Time zone to use when calculating the start of the month. * * [UTC timezone offset](https://en.wikipedia.org/wiki/List_of_UTC_offsets) format. For example, New York time zone is `-05`. */ timeZone?: string; }; type QueryPostCountStatsResponse = { /** * List of posts in specified order. */ stats?: Array; }; type QueryPostsOptions = {}; type QueryPostsRequest = { /** * Reserved for internal use. */ fieldsToInclude?: Array; /** * List of post fields to be included in the response. By default, any fields not passed are not returned. * * Supported Values: * `"CONTACT_ID"`, `"CONTENT_TEXT"`, `"METRICS"`, `"SEO"`, and `"URL"`. */ fieldsets?: Array; /** * __Deprecated.__ Use `query` instead. * This parameter will be removed on June 30, 2023. * * Filter object. */ filter?: Object; /** * __Deprecated.__ Use `query` instead. * This parameter will be removed on June 30, 2023. * * Pagination options. */ paging?: wix_blog_backend.Posts.BlogPaging; /** * Query options. */ query?: wix_blog_backend.Posts.PlatformQuery; /** * __Deprecated.__ Use `query` instead. * This parameter will be removed on June 30, 2023. * * Sorting options. For a list of sortable fields, see [Field Support for Filtering and Sorting](https://dev.wix.com/api/rest/wix-blog/blog/filter-and-sort). */ sort?: Array; }; type QueryPostsResponse = { /** * __Deprecated.__ Use `pagingMetadata` instead. * This property will be removed on June 30, 2023. * * Details on the paged set of results returned. */ metaData?: wix_blog_backend.Posts.MetaData; /** * Details on the paged set of results returned. */ pagingMetadata?: wix_blog_backend.Posts.PagingMetadataV2; /** * List of posts. */ posts?: Array; }; type QueryPublicationsCountStatsOptions = { /** * Language filter * * 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */ language?: string; /** * Number of months to include in the response. */ months?: number; /** * Order of the returned results. */ order?: string; /** * Non-inclusive end of time range to return, in ISO 8601 date and time format. */ rangeEnd?: Date; /** * Start of time range to return, in ISO 8601 date and time format. */ rangeStart?: Date; /** * Timezone of the client. */ timeZone?: string; }; type QueryPublicationsCountStatsRequest = { /** * Language filter * * 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */ language?: string; /** * Number of months to include in the response. */ months?: number; /** * Order of the returned results. */ order?: string; /** * Non-inclusive end of time range to return, in ISO 8601 date and time format. */ rangeEnd?: Date; /** * Start of time range to return, in ISO 8601 date and time format. */ rangeStart?: Date; /** * Timezone of the client. */ timeZone?: string; }; type QueryPublicationsCountStatsResponse = { /** * Chronologically ordered list of publications. */ stats?: Array; }; type Reactions = { /** * Is post liked by the current user */ liked?: boolean; }; type Rel = { /** * Indicates to search engine crawlers not to follow the link. */ nofollow?: boolean; /** * Indicates that this link protect referral information from being passed to the target website. */ noreferrer?: boolean; /** * Indicates to search engine crawlers that the link is a paid placement such as sponsored content or an advertisement. */ sponsored?: boolean; /** * Indicates that this link is user-generated content and isn't necessarily trusted or endorsed by the page’s author. For example, a link in a fourm post. */ ugc?: boolean; }; type RichContent = { /** * Global styling for header, paragraph, block quote, and code block nodes in the object. */ documentStyle?: wix_blog_backend.Posts.DocumentStyle; /** * Object metadata. */ metadata?: wix_blog_backend.Posts.Metadata; /** * Node objects representing a rich content document. */ nodes?: Array; }; type SendActionEventOptions = { entityId?: string; postCountersUpdated?: wix_blog_backend.Posts.PostCountersUpdated; postLikedAction?: wix_blog_backend.Posts.PostLiked; }; type SendActionEventRequest = { entityId?: string; postCountersUpdated?: wix_blog_backend.Posts.PostCountersUpdated; postLikedAction?: wix_blog_backend.Posts.PostLiked; }; type SendActionEventRequestActionOneOf = { postCountersUpdated?: wix_blog_backend.Posts.PostCountersUpdated; postLikedAction?: wix_blog_backend.Posts.PostLiked; }; type SendActionEventResponse = {}; type SeoSchema = { /** * SEO general settings. */ settings?: wix_blog_backend.Posts.Settings; /** * SEO tags information. */ tags?: Array; }; type Settings = { /** * Whether the auto redirects feature creating `301 redirects` on a slug change is enabled. * * Default: enabled */ preventAutoRedirect?: boolean; }; type Sorting = { /** * Name of the field to sort by. */ fieldName?: string; /** * Sort order. */ order?: string; }; type Spoiler = { /** * The text for the button used to remove the spoiler cover. */ buttonText?: string; /** * The description displayed on top of the spoiler cover. */ description?: string; /** * Sets whether the spoiler cover is enabled for this node. */ enabled?: boolean; }; type Styles = { /** * Border attributes. */ border?: wix_blog_backend.Posts.Border; /** * Color attributes. */ colors?: wix_blog_backend.Posts.Colors; }; type TableCellData = { /** * The cell's border colors. */ borderColors?: wix_blog_backend.Posts.BorderColors; /** * Styling for the cell's background color and text alignment. */ cellStyle?: wix_blog_backend.Posts.CellStyle; }; type TableData = { /** * Sets whether the table's first column is a header. */ columnHeader?: boolean; /** * Styling for the table's container. */ containerData?: wix_blog_backend.Posts.PluginContainerData; /** * The table's dimensions. */ dimensions?: wix_blog_backend.Posts.Dimensions; /** * Deprecated: Use `rowHeader` and `columnHeader` instead. */ header?: boolean; /** * Sets whether the table's first row is a header. */ rowHeader?: boolean; }; type Tag = { /** * SEO tag inner content. For example, ` inner content `. */ children?: string; /** * Whether the tag is a custom tag. */ custom?: boolean; /** * Whether the tag is disabled. */ disabled?: boolean; /** * SEO tag meta data. For example, `{height: 300, width: 240}`. */ meta?: Object; /** * A `{'key':'value'} pair object where each SEO tag property (`'name'`, `'content'`, `'rel'`, `'href'`) contains a value. * For example: `{'name': 'description', 'content': 'the description itself'}`. */ props?: Object; /** * SEO tag type. * * Supported values: `title`, `meta`, `script`, `link`. */ type?: string; }; type TextData = { /** * The decorations to apply. */ decorations?: Array; /** * The text to apply decorations to. */ text?: string; }; type TextNodeStyle = { /** * The decorations to apply to the node. */ decorations?: Array; /** * Line height for text in the node. */ lineHeight?: string; /** * Padding and background color for the node. */ nodeStyle?: wix_blog_backend.Posts.NodeStyle; }; type TextStyle = { /** * A CSS `line-height` value for the text as a unitless ratio. */ lineHeight?: string; /** * Text alignment. Defaults to `AUTO`. */ textAlignment?: string; }; type Thumbnails = { /** * Thumbnail alignment. */ placement?: string; /** * Spacing between thumbnails in pixels. */ spacing?: number; }; type Video = { /** * Video file details. */ media?: wix_blog_backend.Posts.Media; /** * Video thumbnail file details. */ thumbnail?: wix_blog_backend.Posts.Media; }; type VideoData = { /** * Styling for the video's container. */ containerData?: wix_blog_backend.Posts.PluginContainerData; /** * Sets whether the video's download button is disabled. */ disableDownload?: boolean; /** * Video options. */ options?: wix_blog_backend.Posts.PlaybackOptions; /** * Video thumbnail details. */ thumbnail?: wix_blog_backend.Posts.Media; /** * Video title. */ title?: string; /** * Video details. */ video?: wix_blog_backend.Posts.Media; }; type VideoResolution = { /** * Video format for example, mp4, hls. */ format?: string; /** * Video height. */ height?: number; /** * Video URL. */ url?: string; /** * Video width. */ width?: number; }; type WixMedia = { /** * Thumbnail or image details. */ image?: string; /** * Video details. Optional */ videoV2?: string; }; } /** * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Tags.html#) */ interface Tags { /** * Gets a tag by the specified ID. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Tags.html#getTag) */ getTag(tagId: string, options: wix_blog_backend.Tags.GetTagOptions): Promise; /** * Gets a tag by the specified label. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Tags.html#getTagByLabel) */ getTagByLabel(label: string, options: wix_blog_backend.Tags.GetTagByLabelOptions): Promise; /** * Gets a tag by the specified slug. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Tags.html#getTagBySlug) */ getTagBySlug(slug: string, options: wix_blog_backend.Tags.GetTagBySlugOptions): Promise; /** * Creates a query to retrieve a list of tags. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Tags.html#queryTags) */ queryTags(): wix_blog_backend.Tags.TagsQueryBuilder; } namespace Tags { type ApplicationError = { code?: string; data?: Object; description?: string; }; type BulkActionMetadata = { /** * Number of items that couldn't be processed. */ totalFailures?: number; /** * Number of items that were successfully processed. */ totalSuccesses?: number; /** * Number of failures without details because detailed failure threshold was exceeded. */ undetailedFailures?: number; }; type BulkCreateTagsOptions = { /** * List of tag fields to be included if entities are present in the response. * Base fieldset, which is default, will return all core tag properties. * Example: When URL fieldset is selected, returned tag will have a set of base properties and tag url. */ fieldsets?: Array; /** * Whether to return the full created tag entities in the response. */ returnFullEntity?: boolean; }; type BulkCreateTagsRequest = { /** * List of tag fields to be included if entities are present in the response. * Base fieldset, which is default, will return all core tag properties. * Example: When URL fieldset is selected, returned tag will have a set of base properties and tag url. */ fieldsets?: Array; /** * Whether to return the full created tag entities in the response. */ returnFullEntity?: boolean; /** * Tags to create. */ tags: Array; }; type BulkCreateTagsResponse = { /** * Bulk action metadata. */ bulkActionMetadata?: wix_blog_backend.Tags.BulkActionMetadata; /** * Tags created by bulk action. */ results?: Array; }; type BulkTagResult = { /** * Optional created tag. */ item?: wix_blog_backend.Tags.Tag; /** * Bulk actions metadata for tag. */ itemMetadata?: wix_blog_backend.Tags.ItemMetadata; }; type CreateTagOptions = { /** * List of additional tag fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in * the response in addition to the tag's base fields. Base fields don’t include any of the supported fieldset values. By default * only the tag's base fields are returned. */ fieldsets?: Array; /** * Tag language. * * 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */ language?: string; /** * Preferred tag slug. For example, `'tag-slug'`. */ slug?: string; }; type CreateTagRequest = { /** * List of additional tag fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in * the response in addition to the tag's base fields. Base fields don’t include any of the supported fieldset values. By default * only the tag's base fields are returned. */ fieldsets?: Array; /** * Tag label. The label for each tag in a blog must be unique. */ label: string; /** * Tag language. * * 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */ language?: string; /** * Preferred tag slug. For example, `'tag-slug'`. */ slug?: string; }; type CreateTagResponse = { /** * Tag info. */ tag?: wix_blog_backend.Tags.Tag; }; type CursorPaging = { /** * Pointer to the next or previous page in the list of results. * * You can get the relevant cursor token * from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. */ cursor?: string; /** * Number of items to load. */ limit?: number; }; type Cursors = { /** * Cursor pointing to next page in the list of results. */ next?: string; /** * Cursor pointing to previous page in the list of results. */ prev?: string; }; type DeleteTagRequest = { /** * Tag ID. */ tagId: string; }; type DeleteTagResponse = {}; type GetOrCreateTagOptions = { /** * List of tag fields to be included if entities are present in the response. * Base fieldset, which is default, will return all core tag properties. * Example: When URL fieldset is selected, returned tag will have a set of base properties and tag url. */ fieldsets?: Array; /** * Tag language. */ language?: string; }; type GetOrCreateTagRequest = { /** * List of tag fields to be included if entities are present in the response. * Base fieldset, which is default, will return all core tag properties. * Example: When URL fieldset is selected, returned tag will have a set of base properties and tag url. */ fieldsets?: Array; /** * Tag name. Unique per blog. */ label: string; /** * Tag language. */ language?: string; }; type GetOrCreateTagResponse = { /** * Tag info. */ tag?: wix_blog_backend.Tags.Tag; }; type GetTagByLabelOptions = { /** * List of additional tag fields to be included in the response. By default, any fields not passed are not returned. * * Supported Values: * `"URL"` */ fieldsets?: Array; /** * Tag language. * * 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. * If omitted, tags in all languages are returned. */ language?: string; }; type GetTagByLabelRequest = { /** * __Deprecated.__ Use `fieldsets` instead. * This parameter will be removed on June 30, 2023. * * List of tag fields to be included in the response. */ fieldsToInclude?: Array; /** * List of additional tag fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in * the response in addition to the tag's base fields. Base fields don’t include any of the supported fieldset values. By default * only the tag's base fields are returned. */ fieldsets?: Array; /** * Tag label. */ label: string; /** * Tag language. * * 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. * If omitted, tags in all languages are returned. */ language?: string; }; type GetTagByLabelResponse = { /** * Tag info. */ tag?: wix_blog_backend.Tags.Tag; }; type GetTagBySlugOptions = { /** * List of additional tag fields to be included in the response. By default, any fields not passed are not returned. * * Supported Values: * `"URL"` */ fieldsets?: Array; }; type GetTagBySlugRequest = { /** * __Deprecated.__ Use `fieldsets` instead. * This parameter will be removed on June 30, 2023. * * List of tag fields to be included in the response. */ fieldsToInclude?: Array; /** * List of additional tag fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in * the response in addition to the tag's base fields. Base fields don’t include any of the supported fieldset values. By default * only the tag's base fields are returned. */ fieldsets?: Array; /** * Slug of the tag to retrieve. */ slug: string; }; type GetTagBySlugResponse = { /** * Tag info. */ tag?: wix_blog_backend.Tags.Tag; }; type GetTagOptions = { /** * List of additional tag fields to be included in the response. By default, any fields not passed are not returned. * * Supported Values: * `"URL"` */ fieldsets?: Array; }; type GetTagRequest = { /** * __Deprecated.__ Use `fieldsets` instead. * This parameter will be removed on June 30, 2023. * * List of tag fields to be included in the response. */ fieldsToInclude?: Array; /** * List of additional tag fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in * the response in addition to the tag's base fields. Base fields don’t include any of the supported fieldset values. By default * only the tag's base fields are returned. */ fieldsets?: Array; /** * Tag ID. */ tagId: string; }; type GetTagResponse = { /** * Tag info. */ tag?: wix_blog_backend.Tags.Tag; }; type InitialTagsCopied = { /** * Number of tags copied. */ count?: number; }; type ItemMetadata = { /** * Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */ _id?: string; /** * Details about the error in case of failure. */ error?: wix_blog_backend.Tags.ApplicationError; /** * Index of the item within the request array. Allows for correlation between request and response items. */ originalIndex?: number; /** * Whether the requested action was successful for this item. When `false`, the `error` field is populated. */ success?: boolean; }; type ListTagsOptions = { /** * Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `sort`. */ cursorPaging?: wix_blog_backend.Tags.CursorPaging; /** * List of tag fields to be included if entities are present in the response. * Base fieldset, which is default, will return all core tag properties. * Example: When URL fieldset is selected, returned tag will have a set of base properties and tag url. */ fieldsets?: Array; /** * Paging options to limit and skip the number of items. */ paging?: wix_blog_backend.Tags.Paging; /** * Sorting options. For a list of sortable fields, see [Field Support for Filtering and Sorting](https://dev.wix.com/api/rest/community/blog/filter-and-sort). */ sort?: Array; }; type ListTagsRequest = { /** * Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `sort`. */ cursorPaging?: wix_blog_backend.Tags.CursorPaging; /** * List of tag fields to be included if entities are present in the response. * Base fieldset, which is default, will return all core tag properties. * Example: When URL fieldset is selected, returned tag will have a set of base properties and tag url. */ fieldsets?: Array; /** * Paging options to limit and skip the number of items. */ paging?: wix_blog_backend.Tags.Paging; /** * Sorting options. For a list of sortable fields, see [Field Support for Filtering and Sorting](https://dev.wix.com/api/rest/community/blog/filter-and-sort). */ sort?: Array; }; type ListTagsRequestPagingMethodOneOf = { /** * Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `sort`. */ cursorPaging?: wix_blog_backend.Tags.CursorPaging; /** * Paging options to limit and skip the number of items. */ paging?: wix_blog_backend.Tags.Paging; }; type ListTagsResponse = { /** * Details on the paged set of results returned. */ metaData?: wix_blog_backend.Tags.MetaData; /** * List of tags. */ tags?: Array; }; type MetaData = { /** * Number of items returned in this response. */ count?: number; /** * Pointer to the next or previous page in the list of results. */ cursor?: string; /** * Requested offset. */ offset?: number; /** * Total number of items that match the query. */ total?: number; }; type Paging = { /** * Number of items to load. */ limit?: number; /** * Number of items to skip in the current sort order. */ offset?: number; }; type PagingMetadataV2 = { /** * Number of items returned in the response. */ count?: number; /** * Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */ cursors?: wix_blog_backend.Tags.Cursors; /** * Offset that was requested. */ offset?: number; /** * Flag that indicates the server failed to calculate the `total` field. */ tooManyToCount?: boolean; /** * Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */ total?: number; }; type PlatformQuery = { /** * Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: wix_blog_backend.Tags.CursorPaging; /** * Filter object in the following format: * `"filter" : { * "fieldName1": "value1", * "fieldName2":{"$operator":"value2"} * }` * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains` */ filter?: Object; /** * Paging options to limit and skip the number of items. */ paging?: wix_blog_backend.Tags.Paging; /** * Sort object in the following format: * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]` */ sort?: Array; }; type PlatformQueryPagingMethodOneOf = { /** * Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: wix_blog_backend.Tags.CursorPaging; /** * Paging options to limit and skip the number of items. */ paging?: wix_blog_backend.Tags.Paging; }; type QueryTagsOptions = {}; type QueryTagsRequest = { /** * __Deprecated.__ Use `fieldsets` instead. * This parameter will be removed on June 30, 2023. * * List of tag fields to be included in the response. */ fieldsToInclude?: Array; /** * List of additional tag fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in * the response in addition to the tag's base fields. Base fields don’t include any of the supported fieldset values. By default * only the tag's base fields are returned. */ fieldsets?: Array; /** * __Deprecated.__ Use `query` instead. * This parameter will be removed on June 30, 2023. * * Filter object. * For a detailed list of supported filters, see [Field Support for Filtering and Sorting](https://dev.wix.com/api/rest/community/blog/filter-and-sort). */ filter?: Object; /** * __Deprecated.__ Use `query` instead. * This parameter will be removed on June 30, 2023. * * Pagination options. */ paging?: wix_blog_backend.Tags.Paging; /** * Query options. */ query?: wix_blog_backend.Tags.PlatformQuery; /** * __Deprecated.__ Use `query` instead. * This parameter will be removed on June 30, 2023. * * Sorting options. For a list of sortable fields, see [Field Support for Filtering and Sorting](https://dev.wix.com/api/rest/community/blog/filter-and-sort). */ sort?: Array; }; type QueryTagsResponse = { /** * __Deprecated.__ Use `pagingMetadata` instead. * This property will be removed on June 30, 2023. * * Details on the paged set of results returned. */ metaData?: wix_blog_backend.Tags.MetaData; /** * Details on the paged set of results returned. */ pagingMetadata?: wix_blog_backend.Tags.PagingMetadataV2; /** * List of tags. */ tags?: Array; }; type Sorting = { /** * Name of the field to sort by. */ fieldName?: string; /** * Sort order. */ order?: string; }; type Tag = { /** * Date the tag was created. */ _createdDate?: Date; /** * Tag ID. */ _id?: string; /** * Date the tag was last updated. */ _updatedDate?: Date; /** * Tag label. * * A blog can't have two tags with the same label. */ label?: string; /** * Tag language. * * 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */ language?: string; /** * Number of posts with this tag, including unpublished draft posts. */ postCount?: number; /** * Reserved for internal use. */ publicationCount?: number; /** * Number of published posts with this tag. */ publishedPostCount?: number; /** * Part of a tag's URL that refers to a specific tag. * * For example, `'https:/example.com/tags/{my-tag-slug}'`. */ slug?: string; /** * ID of the tag's translations when [Wix Multilingual](https://support.wix.com/en/article/wix-multilingual-translating-your-blog) is installed on a site. All translations of a single tag will share the same `translationId`. */ translationId?: string; /** * Tag URL. * * The `url` directs you to a page that lists every post with the specified tag. */ url?: string; }; type TagsFieldSet = { /** * Includes tag URL when TRUE. Defaults to FALSE. */ includeUrl?: boolean; }; type UpdateTag = { /** * Date the tag was created. */ _createdDate?: Date; /** * Tag ID. */ _id?: string; /** * Date the tag was last updated. */ _updatedDate?: Date; /** * Tag label. * * A blog can't have two tags with the same label. */ label?: string; /** * Tag language. * * 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */ language?: string; /** * Number of posts with this tag, including unpublished draft posts. */ postCount?: number; /** * Reserved for internal use. */ publicationCount?: number; /** * Number of published posts with this tag. */ publishedPostCount?: number; /** * Part of a tag's URL that refers to a specific tag. * * For example, `'https:/example.com/tags/{my-tag-slug}'`. */ slug?: string; /** * ID of the tag's translations when [Wix Multilingual](https://support.wix.com/en/article/wix-multilingual-translating-your-blog) is installed on a site. All translations of a single tag will share the same `translationId`. */ translationId?: string; /** * Tag URL. * * The `url` directs you to a page that lists every post with the specified tag. */ url?: string; }; type UpdateTagOptions = { /** * Field mask of fields to update. */ fieldMask?: Array; /** * List of tag fields to be included if entities are present in the response. * Base fieldset, which is default, will return all core tag properties. * Example: When URL fieldset is selected, returned tag will have a set of base properties and tag url. */ fieldsets?: Array; tag: wix_blog_backend.Tags.UpdateTag; }; type UpdateTagRequest = { /** * Field mask of fields to update. */ fieldMask?: Array; /** * List of tag fields to be included if entities are present in the response. * Base fieldset, which is default, will return all core tag properties. * Example: When URL fieldset is selected, returned tag will have a set of base properties and tag url. */ fieldsets?: Array; /** * Tag info. */ tag?: wix_blog_backend.Tags.Tag; }; type UpdateTagResponse = { /** * Tag info. */ tag?: wix_blog_backend.Tags.Tag; }; } } declare namespace wix_blog_backend.Posts { /** * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Posts.PostsQueryBuilder.html#) */ interface PostsQueryBuilder { /** * Adds a sort to a query, sorting by the specified properties in ascending order. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Posts.PostsQueryBuilder.html#ascending) */ ascending(propertyNames: Array): wix_blog_backend.Posts.PostsQueryBuilder; /** * Adds a sort to a query, sorting by the specified properties in descending order. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Posts.PostsQueryBuilder.html#descending) */ descending(propertyNames: Array): wix_blog_backend.Posts.PostsQueryBuilder; /** * Refines a query to match items where the specified property equals the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Posts.PostsQueryBuilder.html#eq) */ eq(propertyName: string, value: any): wix_blog_backend.Posts.PostsQueryBuilder; /** * Returns the filtered query results. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Posts.PostsQueryBuilder.html#find) */ find(): Promise; /** * Refines a query to match items where the specified property is greater than or equal to the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Posts.PostsQueryBuilder.html#ge) */ ge(propertyName: string, value: any): wix_blog_backend.Posts.PostsQueryBuilder; /** * Refines a query to match items where the specified property is greater than the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Posts.PostsQueryBuilder.html#gt) */ gt(propertyName: string, value: any): wix_blog_backend.Posts.PostsQueryBuilder; /** * Refines a query to match items whose specified property contains all of the specified values. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Posts.PostsQueryBuilder.html#hasAll) */ hasAll(propertyName: string, value: Array): wix_blog_backend.Posts.PostsQueryBuilder; /** * Refines a query to match items whose specified property contains any of the specified values. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Posts.PostsQueryBuilder.html#hasSome) */ hasSome(propertyName: string, value: Array): wix_blog_backend.Posts.PostsQueryBuilder; /** * Refines a query to match items where the specified property is less than or equal to the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Posts.PostsQueryBuilder.html#le) */ le(propertyName: string, value: any): wix_blog_backend.Posts.PostsQueryBuilder; /** * Limits the number of items the query returns. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Posts.PostsQueryBuilder.html#limit) */ limit(limit: number): wix_blog_backend.Posts.PostsQueryBuilder; /** * Refines a query to match items where the specified property is less than the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Posts.PostsQueryBuilder.html#lt) */ lt(propertyName: string, value: any): wix_blog_backend.Posts.PostsQueryBuilder; /** * Refines a query to match items where the specified property doesn't equal the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Posts.PostsQueryBuilder.html#ne) */ ne(propertyName: string, value: any): wix_blog_backend.Posts.PostsQueryBuilder; /** * Sets the number of items to skip before returning query results. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Posts.PostsQueryBuilder.html#skip) */ skip(skip: number): wix_blog_backend.Posts.PostsQueryBuilder; /** * Refines a query to match items where the specified property starts with the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Posts.PostsQueryBuilder.html#startsWith) */ startsWith(propertyName: string, value: string): wix_blog_backend.Posts.PostsQueryBuilder; } /** * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Posts.PostsQueryResult.html#) */ interface PostsQueryResult { /** * Returns the index of the current page of results. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Posts.PostsQueryResult.html#currentPage) */ currentPage: number; /** * Returns an array of `posts` items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Posts.PostsQueryResult.html#items) */ items: Array; /** * Returns the number of items in the current page of results. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Posts.PostsQueryResult.html#length) */ length: number; /** * Returns the requested page size. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Posts.PostsQueryResult.html#pageSize) */ pageSize: number; /** * Returns the `PostsQueryBuilder` object used to get the current results. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Posts.PostsQueryResult.html#query) */ query: wix_blog_backend.Posts.PostsQueryBuilder; /** * Returns the total number of items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Posts.PostsQueryResult.html#totalCount) */ totalCount: number; /** * Returns the total number of pages the query produced. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Posts.PostsQueryResult.html#totalPages) */ totalPages: number; /** * Indicates whether the query has more results. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Posts.PostsQueryResult.html#hasNext) */ hasNext(): boolean; /** * Indicates whether the query has previous results. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Posts.PostsQueryResult.html#hasPrev) */ hasPrev(): boolean; /** * Retrieves the next page of query results. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Posts.PostsQueryResult.html#next) */ next(): Promise; /** * Retrieves the previous page of query results. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Posts.PostsQueryResult.html#prev) */ prev(): Promise; } } declare namespace wix_blog_backend.Tags { /** * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Tags.TagsQueryBuilder.html#) */ interface TagsQueryBuilder { /** * Adds a sort to a query, sorting by the specified properties in ascending order. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Tags.TagsQueryBuilder.html#ascending) */ ascending(propertyNames: Array): wix_blog_backend.Tags.TagsQueryBuilder; /** * Adds a sort to a query, sorting by the specified properties in descending order. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Tags.TagsQueryBuilder.html#descending) */ descending(propertyNames: Array): wix_blog_backend.Tags.TagsQueryBuilder; /** * Refines a query to match items where the specified property equals the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Tags.TagsQueryBuilder.html#eq) */ eq(propertyName: string, value: any): wix_blog_backend.Tags.TagsQueryBuilder; /** * Returns the filtered query results. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Tags.TagsQueryBuilder.html#find) */ find(): Promise; /** * Refines a query to match items where the specified property is greater than or equal to the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Tags.TagsQueryBuilder.html#ge) */ ge(propertyName: string, value: any): wix_blog_backend.Tags.TagsQueryBuilder; /** * Refines a query to match items where the specified property is greater than the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Tags.TagsQueryBuilder.html#gt) */ gt(propertyName: string, value: any): wix_blog_backend.Tags.TagsQueryBuilder; /** * Refines a query to match items whose specified property contains any of the specified values. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Tags.TagsQueryBuilder.html#hasSome) */ hasSome(propertyName: string, value: Array): wix_blog_backend.Tags.TagsQueryBuilder; /** * Refines a query to match items where the specified property is less than or equal to the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Tags.TagsQueryBuilder.html#le) */ le(propertyName: string, value: any): wix_blog_backend.Tags.TagsQueryBuilder; /** * Limits the number of items the query returns. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Tags.TagsQueryBuilder.html#limit) */ limit(limit: number): wix_blog_backend.Tags.TagsQueryBuilder; /** * Refines a query to match items where the specified property is less than the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Tags.TagsQueryBuilder.html#lt) */ lt(propertyName: string, value: any): wix_blog_backend.Tags.TagsQueryBuilder; /** * Refines a query to match items where the specified property doesn't equal the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Tags.TagsQueryBuilder.html#ne) */ ne(propertyName: string, value: any): wix_blog_backend.Tags.TagsQueryBuilder; /** * Sets the number of items to skip before returning query results. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Tags.TagsQueryBuilder.html#skip) */ skip(skip: number): wix_blog_backend.Tags.TagsQueryBuilder; /** * Refines a query to match items where the specified property starts with the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Tags.TagsQueryBuilder.html#startsWith) */ startsWith(propertyName: string, value: string): wix_blog_backend.Tags.TagsQueryBuilder; } /** * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Tags.TagsQueryResult.html#) */ interface TagsQueryResult { /** * Returns the index of the current page of results. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Tags.TagsQueryResult.html#currentPage) */ currentPage: number; /** * Returns an array of `tags` items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Tags.TagsQueryResult.html#items) */ items: Array; /** * Returns the number of items in the current page of results. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Tags.TagsQueryResult.html#length) */ length: number; /** * Returns the requested page size. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Tags.TagsQueryResult.html#pageSize) */ pageSize: number; /** * Returns the `TagsQueryBuilder` object used to get the current results. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Tags.TagsQueryResult.html#query) */ query: wix_blog_backend.Tags.TagsQueryBuilder; /** * Returns the total number of items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Tags.TagsQueryResult.html#totalCount) */ totalCount: number; /** * Returns the total number of pages the query produced. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Tags.TagsQueryResult.html#totalPages) */ totalPages: number; /** * Indicates whether the query has more results. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Tags.TagsQueryResult.html#hasNext) */ hasNext(): boolean; /** * Indicates whether the query has previous results. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Tags.TagsQueryResult.html#hasPrev) */ hasPrev(): boolean; /** * Retrieves the next page of query results. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Tags.TagsQueryResult.html#next) */ next(): Promise; /** * Retrieves the previous page of query results. * [Read more](https://www.wix.com/corvid/reference/wix-blog-backend.Tags.TagsQueryResult.html#prev) */ prev(): Promise; } } declare namespace wix_bookings_backend.Bookings { /** * Contains functionality for refining a Bookings query. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.BookingsQueryBuilder.html#) */ interface BookingsQueryBuilder { /** * Adds a sort to a query, sorting by the specified properties in ascending order. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.BookingsQueryBuilder.html#ascending) */ ascending(...propertyName: string[]): wix_bookings_backend.Bookings.BookingsQueryBuilder; /** * Adds a sort to a query or sort, sorting by the specified properties in descending order. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.BookingsQueryBuilder.html#descending) */ descending(...propertyName: string[]): wix_bookings_backend.Bookings.BookingsQueryBuilder; /** * Refines a query to match items whose specified property value equals the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.BookingsQueryBuilder.html#eq) */ eq(propertyName: string, value: any): wix_bookings_backend.Bookings.BookingsQueryBuilder; /** * Returns the bookings that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.BookingsQueryBuilder.html#find) */ find(options?: wix_bookings_backend.Bookings.BookingsQueryBuilder.QueryOptions): Promise; /** * Refines a query to match items whose specified property value is greater than or equal to the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.BookingsQueryBuilder.html#ge) */ ge(propertyName: string, value: string | number | Date): wix_bookings_backend.Bookings.BookingsQueryBuilder; /** * Refines a query to match items whose specified property value is greater than the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.BookingsQueryBuilder.html#gt) */ gt(propertyName: string, value: string | number | Date): wix_bookings_backend.Bookings.BookingsQueryBuilder; /** * Refines a query to match items whose specified property contains any of the specified `value` parameters. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.BookingsQueryBuilder.html#hasSome) */ hasSome(propertyName: string, value: string[]): wix_bookings_backend.Bookings.BookingsQueryBuilder; /** * Refines a query to match items whose specified property value is less than or equal to the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.BookingsQueryBuilder.html#le) */ le(propertyName: string, value: string | number | Date): wix_bookings_backend.Bookings.BookingsQueryBuilder; /** * Limits the number of items the query returns. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.BookingsQueryBuilder.html#limit) */ limit(limit: number): wix_bookings_backend.Bookings.BookingsQueryBuilder; /** * Refines a query to match items whose specified property value is less than the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.BookingsQueryBuilder.html#lt) */ lt(propertyName: string, value: string | number | Date): wix_bookings_backend.Bookings.BookingsQueryBuilder; /** * Sets the number of items to skip before returning query results. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.BookingsQueryBuilder.html#skip) */ skip(skip: number): wix_bookings_backend.Bookings.BookingsQueryBuilder; } namespace BookingsQueryBuilder { /** * Options to use when performing a query. */ type QueryOptions = { /** * Prevents permission checks from running for the `find()` operation. Defaults to `false`. */ suppressAuth?: boolean; }; } /** * The results of a bookings query, containing the retrieved items. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.BookingsQueryResult.html#) */ interface BookingsQueryResult { /** * Returns the index of the current results page number. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.BookingsQueryResult.html#currentPage) */ readonly currentPage: number; /** * Returns an array of bookings that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.BookingsQueryResult.html#items) */ readonly items: wix_bookings_backend.Booking[]; /** * Returns the number of items in the current results page. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.BookingsQueryResult.html#length) */ readonly length: number; /** * Returns the query page size. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.BookingsQueryResult.html#pageSize) */ readonly pageSize: number; /** * Returns the BookingsQueryBuilder object used to get the current results. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.BookingsQueryResult.html#query) */ readonly query: wix_bookings_backend.Bookings.BookingsQueryBuilder; /** * Returns the total number of items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.BookingsQueryResult.html#totalCount) */ readonly totalCount: number; /** * Returns the total number of pages the query produced. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.BookingsQueryResult.html#totalPages) */ readonly totalPages: number; /** * Indicates if the query has more results. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.BookingsQueryResult.html#hasNext) */ hasNext(): boolean; /** * Indicates the query has previous results. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.BookingsQueryResult.html#hasPrev) */ hasPrev(): boolean; /** * Retrieves the next page of query results. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.BookingsQueryResult.html#next) */ next(): Promise; /** * Retrieves the previous page of query results. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.BookingsQueryResult.html#prev) */ prev(): Promise; } /** * Contains functionality for refining a Bookings query. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.WixBookingsQueryBuilder.html#) */ interface WixBookingsQueryBuilder { /** * Adds a sort to a query, sorting by the specified properties in ascending order. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.WixBookingsQueryBuilder.html#ascending) */ ascending(...propertyName: string[]): wix_bookings_backend.Bookings.WixBookingsQueryBuilder; /** * Adds a sort to a query or sort, sorting by the specified properties in descending order. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.WixBookingsQueryBuilder.html#descending) */ descending(...propertyName: string[]): wix_bookings_backend.Bookings.WixBookingsQueryBuilder; /** * Refines a query to match items whose specified property value equals the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.WixBookingsQueryBuilder.html#eq) */ eq(propertyName: string, value: any): wix_bookings_backend.Bookings.WixBookingsQueryBuilder; /** * Returns the items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.WixBookingsQueryBuilder.html#find) */ find(options?: wix_bookings_backend.Bookings.WixBookingsQueryBuilder.QueryOptions): Promise; /** * Refines a query to match items whose specified property value is greater than or equal to the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.WixBookingsQueryBuilder.html#ge) */ ge(propertyName: string, value: string | number | Date): wix_bookings_backend.Bookings.WixBookingsQueryBuilder; /** * Refines a query to match items whose specified property value is greater than the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.WixBookingsQueryBuilder.html#gt) */ gt(propertyName: string, value: string | number | Date): wix_bookings_backend.Bookings.WixBookingsQueryBuilder; /** * Refines a query to match items whose specified property contains any of the specified `value` parameters. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.WixBookingsQueryBuilder.html#hasSome) */ hasSome(propertyName: string, value: string[]): wix_bookings_backend.Bookings.WixBookingsQueryBuilder; /** * Refines a query to match items whose specified property value is less than or equal to the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.WixBookingsQueryBuilder.html#le) */ le(propertyName: string, value: string | number | Date): wix_bookings_backend.Bookings.WixBookingsQueryBuilder; /** * Limits the number of items the query returns. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.WixBookingsQueryBuilder.html#limit) */ limit(limit: number): wix_bookings_backend.Bookings.WixBookingsQueryBuilder; /** * Refines a query to match items whose specified property value is less than the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.WixBookingsQueryBuilder.html#lt) */ lt(propertyName: string, value: string | number | Date): wix_bookings_backend.Bookings.WixBookingsQueryBuilder; /** * Sets the number of items to skip before returning query results. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.WixBookingsQueryBuilder.html#skip) */ skip(skip: number): wix_bookings_backend.Bookings.WixBookingsQueryBuilder; } namespace WixBookingsQueryBuilder { /** * Options to use when performing a query. */ type QueryOptions = { /** * Prevents [permission](https://support.wix.com/en/article/about-collection-permissions) checks from running for the operation. */ suppressAuth?: boolean; }; } /** * The results of a data query, containing the retrieved items. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.WixBookingsQueryResult.html#) */ interface WixBookingsQueryResult { /** * Returns the index of the current results page number. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.WixBookingsQueryResult.html#currentPage) */ readonly currentPage: number; /** * Returns the an array of bookings that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.WixBookingsQueryResult.html#items) */ readonly items: wix_bookings_backend.Booking[]; /** * Returns the number of items in the current results page. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.WixBookingsQueryResult.html#length) */ readonly length: number; /** * Returns the query page size. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.WixBookingsQueryResult.html#pageSize) */ readonly pageSize: number; /** * Returns the query used to get the current results. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.WixBookingsQueryResult.html#query) */ readonly query: wix_bookings_backend.Bookings.WixBookingsQueryBuilder; /** * Returns the total number of items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.WixBookingsQueryResult.html#totalCount) */ readonly totalCount: number; /** * Returns the total number of pages the query produced. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.WixBookingsQueryResult.html#totalPages) */ readonly totalPages: number; /** * Indicates if the query has more results. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.WixBookingsQueryResult.html#hasNext) */ hasNext(): boolean; /** * Indicates the query has previous results. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.WixBookingsQueryResult.html#hasPrev) */ hasPrev(): boolean; /** * Retrieves the next page of query results. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.WixBookingsQueryResult.html#next) */ next(): Promise; /** * Retrieves the previous page of query results. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.WixBookingsQueryResult.html#prev) */ prev(): Promise; } } declare namespace wix_bookings_backend { /** * The Bookings API provides functionality for updating and managing bookings created in the Wix Bookings app. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.html#) */ interface Bookings { /** * Cancels an existing booking. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.html#cancelBooking) */ cancelBooking(bookingId: string, options: wix_bookings_backend.Bookings.CancelBookingOptions): Promise; /** * Confirms a booking request. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.html#confirmBooking) */ confirmBooking(bookingId: string, options: wix_bookings_backend.Bookings.ConfirmBookingOptions): Promise; /** * Declines a pending booking request. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.html#declineBooking) */ declineBooking(bookingId: string, options: wix_bookings_backend.Bookings.DeclineBookingOptions): Promise; /** * Creates a query to retrieve a list of bookings. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.html#queryBookings) */ queryBookings(): wix_bookings_backend.Bookings.BookingsQueryBuilder; /** * Sets the number of people who actually attended the session for the given booking. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.html#setAttendance) */ setAttendance(bookingId: string, attendanceInfo: wix_bookings_backend.Bookings.AttendanceInfo, options?: wix_bookings_backend.Options): Promise; /** * Marks a booking as fully paid. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.html#setBookingAsPaid) */ setBookingAsPaid(bookingId: string, options?: wix_bookings_backend.Options): Promise; /** * Updates the customer's information for a booking. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Bookings.html#updateCustomerInfo) */ updateCustomerInfo(bookingId: string, formInfo: wix_bookings_backend.Bookings.FormInfo, options?: wix_bookings_backend.Options): Promise; } namespace Bookings { /** * Contact's full [address](https://www.wix.com/corvid/reference/$w/addressinput/value). */ type AddressInfo = { /** * A string containing the full address of this location. */ formatted?: string; /** * Main address line, usually street and number, as free text. */ addressLine1?: string; /** * Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */ addressLine2?: string; /** * Street name, number, and apartment number. */ streetAddress?: wix_bookings_backend.StreetAddressInfo; /** * Coordinates of the physical address. */ location?: wix_bookings_backend.AddressLocationInfo; /** * City name. */ city?: string; /** * Subdivision. Usually state, region, prefecture or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */ subdivision?: string; /** * Country code in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code format. */ country?: string; /** * Zip/postal code. */ postalCode?: string; }; /** * Attendance information for the booking */ type AttendanceInfo = { /** * Whether the booked contact attended the session. */ attended?: boolean; /** * Number of attendees that attended the session. This can be greater than 1 when the booking is made for a group of people. */ numberOfAttendees?: number; }; type CancelBookingOptions = { /** * Whether to notify the participants about the booking confirmation, and an optional custom message. */ participantNotification?: wix_bookings_backend.ParticipantNotificationInfo; /** * Sets the cancel booking flow behavior. */ flowControlSettings?: wix_bookings_backend.Bookings.FlowControlSettingsInfo; /** * When `true`, prevents permission checks from running for the operation. Defaults to `false`. */ suppressAuth?: boolean; }; type CancelBookingResult = { /** * ID of the canceled booking. */ bookingId: string; }; type ConfirmBookingOptions = { /** * Whether to notify the participants about the booking confirmation, and an optional custom message. */ participantNotification?: wix_bookings_backend.ParticipantNotificationInfo; /** * When `true`, prevents permission checks from running for the operation. Defaults to `false`. */ suppressAuth?: boolean; }; /** * Contact details of the customer making the booking. */ type ContactDetails = { /** * Contact's ID. */ contactId?: string; /** * Contact's first name. When populated from a standard booking form, this property corresponds to the **Name** field. */ firstName?: string; /** * Contact's last name. */ lastName?: string; /** * Contact's email, used to create a new contact or get existing one from the [CRM API](wix-crm/introduction). */ email?: string; /** * Contact's phone number. */ phone?: string; /** * Contact's time zone. */ timeZone?: string; /** * Contact's country in [ISO 3166-1 alpha-2 code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. */ countryCode?: string; /** * Contact's full [address](https://www.wix.com/velo/reference/$w/addressinput/value). */ address?: wix_bookings_backend.Bookings.OwnerAddress; }; type DeclineBookingOptions = { /** * Whether to notify the participants about the booking confirmation, and an optional custom message. */ participantNotification?: wix_bookings_backend.ParticipantNotificationInfo; /** * When `true`, prevents permission checks from running for the operation. Defaults to `false`. */ suppressAuth?: boolean; }; type DeclineBookingResult = { /** * ID of the declined booking. */ bookingId: string; }; /** * Sets the cancel booking flow behavior. */ type FlowControlSettingsInfo = { /** * Whether to ignore the service's cancellation policy. * * * Requires "Manage Wix Bookings App" and "Manage Bookings' Calendar" [roles](https://support.wix.com/en/article/roles-permissions-overview#bookings-admin). * */ ignoreCancellationPolicy?: boolean; }; /** * Updated form info and contact details */ type FormInfo = { /** * List of rates and the number of participants for each rate. */ paymentSelection?: wix_bookings_backend.PaymentSelectionInfo[]; /** * Additional custom fields submitted with the form. */ additionalFields?: wix_bookings_backend.CustomFormFieldInfo[]; /** * Contact details of the customer making the booking. */ contactDetails?: wix_bookings_backend.Bookings.ContactDetails; }; /** * Contact full [address](https://www.wix.com/velo/reference/$w/addressinput/value). */ type OwnerAddress = { /** * Main address line, usually street and number, as free text. */ addressLine1?: string; /** * Street name, number and apartment number. */ streetAddress?: wix_bookings_backend.StreetAddressInfo; /** * String containing the full address of this location. */ formatted?: string; /** * Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */ addressLine2?: string; /** * Coordinates of the physical address. */ location?: wix_bookings_backend.AddressLocationInfo; /** * City name. */ city?: string; /** * Subdivision. Usually state, region, prefecture or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */ subdivision?: string; /** * Country code. */ country?: string; /** * Zip/postal code. */ postalCode?: string; }; } /** * Events that are fired by actions related to Wix Bookings. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Events.html#) */ interface Events { /** * An event that fires when a booking is canceled. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Events.html#onBookingCanceled) */ onBookingCanceled(event: wix_bookings_backend.Events.BookingEvent): void; /** * An event that fires when a booking request is confirmed. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Events.html#onBookingConfirmed) */ onBookingConfirmed(event: wix_bookings_backend.Events.BookingEvent): void; /** * An event that fires when a booking request is declined. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Events.html#onBookingDeclined) */ onBookingDeclined(event: wix_bookings_backend.Events.BookingEvent): void; /** * An event that fires when a booking request is created. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Events.html#onBookingRequestCreated) */ onBookingRequestCreated(event: wix_bookings_backend.Events.BookingEvent): void; /** * An event that fires when a booking's schedule is updated. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Events.html#onBookingScheduleUpdated) */ onBookingScheduleUpdated(event: wix_bookings_backend.Events.BookingEvent): void; /** * An event that fires when a booking's details are updated. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Events.html#onBookingUpdated) */ onBookingUpdated(event: wix_bookings_backend.Events.BookingEvent): void; } namespace Events { /** * An object representing a booking event. */ type BookingEvent = { /** * Action that triggered the event. Each event has its own set of possible trigger values. */ trigger: string; /** * Booking object after the event was triggered. */ booking: wix_bookings_backend.Booking; /** * Booking object before the event was triggered. */ previousBooking: wix_bookings_backend.Booking; }; } /** * The Bookings Resources API provides functionality for creating, managing, and querying resources. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Resources.html#) */ interface Resources { /** * Creates a resource. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Resources.html#createResource) */ createResource(resourceInfo: wix_bookings_backend.Resources.ResourceInfo, scheduleInfo: wix_bookings_backend.Resources.ResourceScheduleInfo[], options?: wix_bookings_backend.Options): Promise; /** * Deletes a resource. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Resources.html#deleteResource) */ deleteResource(resourceId: string, options?: wix_bookings_backend.Options): Promise; /** * Creates a query to retrieve extended resource information. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Resources.html#queryResourceCatalog) */ queryResourceCatalog(): wix_bookings_backend.Resources.ResourceCatalogQueryBuilder; /** * Updates a resource. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Resources.html#updateResource) */ updateResource(id: string, resourceInfo: wix_bookings_backend.Resources.UpdateResourceInfo, options?: wix_bookings_backend.Options): Promise; /** * Updates a resource's schedule. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Resources.html#updateResourceSchedule) */ updateResourceSchedule(resourceId: string, scheduleId: string, scheduleInfo: wix_bookings_backend.Resources.ResourceScheduleInfo, options?: wix_bookings_backend.Options): Promise; } namespace Resources { type LinkedSchedulesInfo = { /** * Schedule ID. */ scheduleId: string; /** * Owner ID, of the linked schedule. */ scheduleOwnerId: string; }; /** * Resource details. */ type ResourceInfo = { /** * Resource name. */ name: string; /** * Resource email address. */ email?: string; /** * Resource phone number. */ phone?: string; /** * Resource description. */ description?: string; /** * Resource tags. Tags are used to identify, group, and filter the different types of resources. For example, 'staff' or 'room'. */ tags?: string[]; }; /** * ResourceCatalog query results. */ type ResourceQueryResults = { /** * Resource. */ resource: wix_bookings_backend.Resource; /** * Resource's schedules. */ schedules: wix_bookings_backend.Resources.ResourceSchedule[]; /** * History of slugified resource names. */ slugs: wix_bookings_backend.Resources.Slug[]; }; type ResourceSchedule = { /** * Schedule ID. */ _id: string; /** * ID of the schedule's owner entity. This may be a resource ID or a service ID. */ scheduleOwnerId: string; /** * An object describing how to calculate the schedule's availability. * An empty object indicates that the schedule is not available for booking. */ availability: wix_bookings_backend.Resources.ResourceScheduleAvailability; }; /** * An object describing how to calculate the schedule's availability. */ type ResourceScheduleAvailability = { /** * Date and time the schedule starts to be available for booking. */ start: Date; /** * Other schedules that impact the availability calculation. Relevant only when there are availability constraints. */ linkedSchedules: wix_bookings_backend.LinkedResourceScheduleInfo[]; }; /** * An object describing how to calculate the schedule's availability. */ type ResourceScheduleAvailabilityInfo = { /** * Date and time the schedule starts to be available for booking. */ start?: Date; /** * Other schedules that impact the availability calculation. Relevant only when there are availability constraints. */ linkedSchedules?: wix_bookings_backend.LinkedResourceScheduleInfo[]; }; type ResourceScheduleInfo = { /** * An object describing how to calculate the schedule's availability. * An empty object indicates that the schedule is not available for booking. */ availability?: wix_bookings_backend.Resources.ResourceScheduleAvailability; }; /** * Slugified resource name. */ type Slug = { /** * Slugified resource name. */ name: string; /** * Date and time the resource name was created. */ _createdDate: Date; }; /** * Resource details. */ type UpdateResourceInfo = { /** * Resource name. */ name?: string; /** * Resource email address. */ email?: string; /** * Resource phone number. */ phone?: string; /** * Resource description. */ description?: string; /** * Resource tags. Tags are used to identify, group, and filter the different types of resources. For example, 'staff' or 'room'. */ tags?: string[]; }; } /** * The Sessions API provides functionality for creating, managing, and querying sessions. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Sessions.html#) */ interface Sessions { /** * Creates a session. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Sessions.html#createSession) */ createSession(sessionInfo: wix_bookings_backend.Sessions.SessionInfo, options?: wix_bookings_backend.Options): Promise; /** * Deletes a session from a schedule. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Sessions.html#deleteSession) */ deleteSession(sessionId: string, options?: wix_bookings_backend.Sessions.DeleteSessionOptions): Promise; /** * Gets a session. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Sessions.html#getSession) */ getSession(sessionId: string, options?: wix_bookings_backend.Options): Promise; /** * Retrieves a list of the sessions according to the specified filters and paging. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Sessions.html#querySessions) */ querySessions(): wix_bookings_backend.Sessions.SessionQueryBuilder; /** * Updates a session. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Sessions.html#updateSession) */ updateSession(sessionId: string, sessionInfo: wix_bookings_backend.Sessions.UpdateSessionInfo, options?: wix_bookings_backend.Options): Promise; } namespace Sessions { type DeleteSessionOptions = { /** * Whether to notify participants about the change, and an optional custom message. */ participantNotification?: wix_bookings_backend.ParticipantNotificationInfo; /** * When `true`, prevents permission checks from running for the operation. Defaults to `false`. */ suppressAuth?: boolean; }; type Session = { /** * Session ID. */ _id: string; /** * ID of the schedule that the session belongs to. */ scheduleId: string; /** * ID of the resource or service that the session's schedule belongs to. */ scheduleOwnerId: string; /** * Tags for the session. * The value is inherited from the schedule and can be overridden unless the session is a recurring session. */ tags: string[]; /** * Additional information about the session. * Notes are not supported for recurring sessions. */ notes: string; /** * Session status. * * One of: * - `"CONFIRMED"` Default value. * - `"CANCELLED"` The session was deleted. * */ status: string; /** * ID of the recurring session if this session is an instance of a recurrence. Use this ID to update the recurrence and all of the instances. */ recurringSessionId?: string; /** * Session type. * * One of: * - `"EVENT"` Reserved period of time on the schedule. For example, an appointment, class, course, or blocked time. Events are visible in the Dashboard in the Bookings app's [Booking Calendar](https://support.wix.com/en/article/wix-bookings-about-the-wix-bookings-calendar) page. * - `"WORKING_HOURS"` Placeholder for available time on a resource’s schedule. * */ type: string; /** * String representing a recurrence rule (RRULE) for a recurring session, as defined in [iCalendar RFC 5545](https://icalendar.org/iCalendar-RFC-5545/3-3-10-recurrence-rule.html). * If the session is an instance of a recurrence pattern, the `instanceOfRecurrence` property will contain the recurrence rule and this property will be empty. * The RRULE defines a rule for repeating a session. * Supported parameters are: * * |Keyword|Description|Supported values| * |--|--|---| * |`FREQ`|The frequency at which the session is recurs. Required.|`WEEKLY`| * |`INTERVAL`|How often, in terms of `FREQ`, the session recurs. Default is 1. Optional.| * |`UNTIL`|The UTC end date and time of the recurrence. Optional.| * |`BYDAY`|Day of the week when the event should recur. Required.|One of: `MO`, `TU`, `WE`, `TH`, `FR`, `SA`, `SU`| * * * For example, a session that repeats every second week on a Monday until January 7, 2022 at 8 AM: * `"FREQ=WEEKLY;INTERVAL=2;BYDAY=MO;UNTIL=20220107T080000Z"` * * */ recurrence?: string; /** * String representing a recurrence rule (RRULE) if the session is an instance of a recurrence pattern. * Empty when the session is not an instance of a recurrence rule, or if the session defines a recurrence pattern, and `recurrence` is not empty. */ instanceOfRecurrence?: string; /** * An object specifying the start date and time of the session. If the session is a recurring session, `start` must contain a `localDateTime`. */ start: wix_bookings_backend.CalendarDateTime; /** * An object specifying the end date and time of the session. If the session is a recurring session, `end` must contain a `localDateTime`. */ end: wix_bookings_backend.CalendarDateTime; }; /** * Session. */ type SessionInfo = { /** * ID of the schedule that the session belongs to. */ scheduleId: string; /** * An object specifying the start date and time of the session. If the session is a recurring session, `start` must contain a `localDateTime`. */ start: wix_bookings_backend.CalendarDateTimeInfo; /** * An object specifying the end date and time of the session. If the session is a recurring session, `end` must contain a `localDateTime`. */ end: wix_bookings_backend.CalendarDateTimeInfo; /** * Tags for the session. * The value is inherited from the schedule and can be overridden unless the session is a recurring session. */ tags?: string[]; /** * Additional information about the session. * Notes are not supported for recurring sessions. */ notes?: string; /** * Session type. * * One of: * - `"EVENT"` Reserved period of time on the schedule. For example, an appointment, class, course, or blocked time. Events are visible in the Dashboard in the Bookings app's [Booking Calendar](https://support.wix.com/en/article/wix-bookings-about-the-wix-bookings-calendar) page. * - `"WORKING_HOURS"` Placeholder for available time on a resource’s schedule. * */ type?: string; /** * String representing a recurrence rule (RRULE) for a recurring session, as defined in [iCalendar RFC 5545](https://icalendar.org/iCalendar-RFC-5545/3-3-10-recurrence-rule.html). * If the session is an instance of a recurrence pattern, the `instanceOfRecurrence` property will contain the recurrence rule and this property will be empty. * The RRULE defines a rule for repeating a session. * Supported parameters are: * * |Keyword|Description|Supported values| * |--|--|---| * |`FREQ`|The frequency at which the session is recurs. Required.|`WEEKLY`| * |`INTERVAL`|How often, in terms of `FREQ`, the session recurs. Default is 1. Optional.| * |`UNTIL`|The UTC end date and time of the recurrence. Optional.| * |`BYDAY`|Day of the week when the event should recur. Required.|One of: `MO`, `TU`, `WE`, `TH`, `FR`, `SA`, `SU`| * * * For example, a session that repeats every second week on a Monday until January 7, 2022 at 8 AM: * `"FREQ=WEEKLY;INTERVAL=2;BYDAY=MO;UNTIL=20220107T080000Z"` * * */ recurrence?: string; }; /** * Session. */ type UpdateSessionInfo = { /** * An object specifying the start date and time of the session. If the session is a recurring session, `start` must contain a `localDateTime`. */ start?: wix_bookings_backend.CalendarDateTimeInfo; /** * An object specifying the start date and time of the session. If the session is a recurring session, `start` must contain a `localDateTime`. */ end?: wix_bookings_backend.CalendarDateTimeInfo; /** * Tags for the session. * The value is inherited from the schedule and can be overridden unless the session is a recurring session. */ tags?: string[]; /** * Additional information about the session. * Notes are not supported for recurring sessions. */ notes?: string; /** * Session type. * * One of: * - `"EVENT"` Reserved period of time on the schedule. For example, an appointment, class, course, or blocked time. Events are visible in the Dashboard in the Bookings app's [Booking Calendar](https://support.wix.com/en/article/wix-bookings-about-the-wix-bookings-calendar) page. * - `"WORKING_HOURS"` Placeholder for available time on a resource’s schedule. * */ type?: string; /** * String representing a recurrence rule (RRULE) for a recurring session, as defined in [iCalendar RFC 5545](https://icalendar.org/iCalendar-RFC-5545/3-3-10-recurrence-rule.html). * If the session is an instance of a recurrence pattern, the `instanceOfRecurrence` property will contain the recurrence rule and this property will be empty. * The RRULE defines a rule for repeating a session. * Supported parameters are: * * |Keyword|Description|Supported values| * |--|--|---| * |`FREQ`|The frequency at which the session is recurs. Required.|`WEEKLY`| * |`INTERVAL`|How often, in terms of `FREQ`, the session recurs. Default is 1. Optional.| * |`UNTIL`|The UTC end date and time of the recurrence. Optional.| * |`BYDAY`|Day of the week when the event should recur. Required.|One of: `MO`, `TU`, `WE`, `TH`, `FR`, `SA`, `SU`| * * * For example, a session that repeats every second week on a Monday until January 7, 2022 at 8 AM: * `"FREQ=WEEKLY;INTERVAL=2;BYDAY=MO;UNTIL=20220107T080000Z"` * * */ recurrence?: string; }; } /** * Contains functionality for refining a Bookings query. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.WixBookingsQueryBuilder.html#) */ interface WixBookingsQueryBuilder { /** * Adds a sort to a query, sorting by the specified properties in ascending order. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.WixBookingsQueryBuilder.html#ascending) */ ascending(...propertyName: string[]): wix_bookings_backend.WixBookingsQueryBuilder; /** * Returns the number of items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.WixBookingsQueryBuilder.html#count) */ count(options?: wix_bookings_backend.WixBookingsQueryBuilder.QueryOptions): Promise; /** * Adds a sort to a query or sort, sorting by the specified properties in descending order. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.WixBookingsQueryBuilder.html#descending) */ descending(...propertyName: string[]): wix_bookings_backend.WixBookingsQueryBuilder; /** * Refines a query to match items whose specified property value equals the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.WixBookingsQueryBuilder.html#eq) */ eq(propertyName: string, value: any): wix_bookings_backend.WixBookingsQueryBuilder; /** * Returns the items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.WixBookingsQueryBuilder.html#find) */ find(options?: wix_bookings_backend.WixBookingsQueryBuilder.QueryOptions): Promise; /** * Refines a query to match items whose specified property value is greater than or equal to the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.WixBookingsQueryBuilder.html#ge) */ ge(propertyName: string, value: string | number | Date): wix_bookings_backend.WixBookingsQueryBuilder; /** * Refines a query to match items whose specified property value is greater than the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.WixBookingsQueryBuilder.html#gt) */ gt(propertyName: string, value: string | number | Date): wix_bookings_backend.WixBookingsQueryBuilder; /** * Refines a query to match items whose specified property contains any of the specified `value` parameters. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.WixBookingsQueryBuilder.html#hasSome) */ hasSome(propertyName: string, value: string[]): wix_bookings_backend.WixBookingsQueryBuilder; /** * Refines a query to match items whose specified property value is less than or equal to the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.WixBookingsQueryBuilder.html#le) */ le(propertyName: string, value: string | number | Date): wix_bookings_backend.WixBookingsQueryBuilder; /** * Limits the number of items the query returns. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.WixBookingsQueryBuilder.html#limit) */ limit(limit: number): wix_bookings_backend.WixBookingsQueryBuilder; /** * Refines a query to match items whose specified property value is less than the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.WixBookingsQueryBuilder.html#lt) */ lt(propertyName: string, value: string | number | Date): wix_bookings_backend.WixBookingsQueryBuilder; /** * Sets the number of items to skip before returning query results. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.WixBookingsQueryBuilder.html#skip) */ skip(skip: number): wix_bookings_backend.WixBookingsQueryBuilder; } namespace WixBookingsQueryBuilder { /** * Options to use when performing a query. */ type QueryOptions = { /** * Prevents [permission](https://support.wix.com/en/article/about-collection-permissions) checks from running for the operation. */ suppressAuth?: boolean; }; } /** * The results of a data query, containing the retrieved items. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.WixBookingsQueryResult.html#) */ interface WixBookingsQueryResult { /** * Returns the index of the current results page number. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.WixBookingsQueryResult.html#currentPage) */ readonly currentPage: number; /** * Returns the items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.WixBookingsQueryResult.html#items) */ readonly items: any[]; /** * Returns the number of items in the current results page. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.WixBookingsQueryResult.html#length) */ readonly length: number; /** * Returns the query page size. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.WixBookingsQueryResult.html#pageSize) */ readonly pageSize: number; /** * Returns the query used to get the current results. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.WixBookingsQueryResult.html#query) */ readonly query: wix_bookings_backend.WixBookingsQueryBuilder; /** * Returns the total number of items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.WixBookingsQueryResult.html#totalCount) */ readonly totalCount: number; /** * Returns the total number of pages the query produced. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.WixBookingsQueryResult.html#totalPages) */ readonly totalPages: number; /** * Indicates if the query has more results. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.WixBookingsQueryResult.html#hasNext) */ hasNext(): boolean; /** * Indicates the query has previous results. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.WixBookingsQueryResult.html#hasPrev) */ hasPrev(): boolean; /** * Retrieves the next page of query results. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.WixBookingsQueryResult.html#next) */ next(): Promise; /** * Retrieves the previous page of query results. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.WixBookingsQueryResult.html#prev) */ prev(): Promise; } /** * Custom [address](https://www.wix.com/velo/reference/$w/addressinput/value), used when location_type is `"OWNER_CUSTOM"`. */ type Address = { /** * String containing the full address of this location. */ formatted: string; /** * Main address line, usually street and number, as free text. */ addressLine1?: string; /** * Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */ addressLine2: string; /** * Street name, number and apartment number. */ streetAddress?: wix_bookings_backend.StreetAddress; /** * Coordinates of the physical address. */ location: wix_bookings_backend.AddressLocation; /** * City name. */ city: string; /** * Subdivision. Usually state, region, prefecture or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */ subdivision: string; /** * Country code. */ country: string; /** * Zip/postal code. */ postalCode: string; }; /** * coordinates of the physical address. */ type AddressCoordinates = { /** * Latitude. */ latitude: number; /** * Longitude. */ longitude: number; }; /** * Coordinates of the physical address. */ type AddressLocation = { /** * Address latitude. */ latitude: number; /** * Address longitude. */ longitude: number; }; /** * Coordinates of the physical address. */ type AddressLocationInfo = { /** * Address latitude. */ latitude?: number; /** * Address longitude. */ longitude?: number; }; /** * coordinates of the physical address. */ type AddressLocation_5466057688 = { /** * Latitude. */ latitude?: number; /** * Longitude. */ longitude?: number; }; /** * Address. */ type Address_30702269075 = { /** * country code. */ country?: string; /** * subdivision (usually state or region) code according to ISO 3166-2. */ subdivision?: string; /** * city name. */ city?: string; /** * zip/postal code. */ postalCode?: string; /** * A break down of the street to number and street name. */ streetAddress?: wix_bookings_backend.StreetAddress_7212524817; /** * A string containing the human-readable address of this location. */ formattedAddress?: string; /** * Free text for human-to-human textual orientation aid purposes. */ hint?: string; /** * coordinates of the physical address. */ geocode?: wix_bookings_backend.AddressLocation_5466057688; }; /** * Attendance information. */ type Attendance = { /** * Whether the booked contact attended the session. */ attendanceStatus: boolean; /** * Number of attendees that attended the session. This can be more than 1 if `formInfo.paymentSelection.numberOfParticipants` for the booking is greater than 1. */ numberOfAttendees: number; }; /** * Attendance information. */ type AttendanceInfo = { /** * Whether the booked contact attended the session. */ attendanceStatus: boolean; /** * Number of attendees that attended the session. This can be greater than 1 when the booking is made for a group of people. */ numberOfAttendees: number; }; /** * The final price, currency, down payment, and amount received. */ type Balance = { /** * Required payment amount, currency, and any down payment required. */ finalPrice: wix_bookings_backend.Price; /** * Current total amount paid. */ amountReceived: string; }; /** * An object describing the entity that was booked. */ type BookedEntity = { /** * Price options offered to book this session at the time of booking. */ rate: wix_bookings_backend.Rate; /** * Location of the session. */ location: wix_bookings_backend.Location; /** * List of tags for the booking. */ tags: string[]; /** * ID of the booked schedule. */ scheduleId: string; /** * Session title at the time of booking. */ title: string; /** * Start and end time of the booked sessions. */ singleSession?: wix_bookings_backend.SingleSession; /** * First start and last end time of the booked sessions. */ setOfSessions?: wix_bookings_backend.SetOfSessions; /** * ID of the booked service. */ serviceId: string; /** * Online conference information. */ onlineConference?: wix_bookings_backend.OnlineConference; }; type BookedResource = { /** * Booked resource ID. */ _id: string; /** * Resource's name at the time of booking. */ name: string; /** * Resource's email at the time of booking. */ email: string; }; type Booking = { /** * Booking ID. */ _id: string; /** * An object describing the entity that was booked. */ bookedEntity: wix_bookings_backend.BookedEntity; /** * List of booked resources. Currently, only one is supported. The booked resource would be the staff-member giving the session. */ bookedResources: wix_bookings_backend.BookedResource[]; /** * Form information submitted when booking. FormInfo contains contact details, participants, and other form fields, set up for the service. */ formInfo?: wix_bookings_backend.Form; /** * Payment Details. */ paymentDetails?: wix_bookings_backend.PaymentDetails; /** * Booking status. * * One of: * - `"PENDING_CHECKOUT"` The booking is waiting to be checked out. * - `"CONFIRMED"` The booking has beed approved by the owner. * - `"CANCELED"` The booking has been canceled. * - `"PENDING"` The booking has been created. * - `"PENDING_APPROVAL"` The booking is waiting for the owner to approve or decline. * - `"DECLINED"` The booking was declined by the owner. * */ status: string; /** * Attendance information. */ attendanceInfo: wix_bookings_backend.AttendanceInfo; /** * An object describing the platform and application that made the booking. */ bookingSource: wix_bookings_backend.BookingSource; /** * External ID provided by the client app on creation. */ externalUserId?: string; /** * Date and time the booking was created. */ _createdDate: Date; }; /** * An object describing the platform and application that made the booking. */ type BookingSource = { /** * Platform from which a booking was created * * One of: * - `"WEB"` Desktop browser. * - `"MOBILE_APP"` Mobile application. * */ platform: string; /** * Actor that created this booking. * * One of: * - `"BUSINESS"` * - `"CUSTOMER"` * */ actor: string; /** * Wix site ID of the application that created this booking. */ appDefId: string; /** * Name of the application that created this booking, as saved in Wix-dev-center at the time of booking. */ appName: string; }; /** * An object describing the business location. */ type BusinessLocation = { /** * ID of the location. */ _id: string; /** * Display name of the location. */ name: string; /** * Free text describing the location. */ description: string; /** * Status of the location. Default is `"ACTIVE"`. * One of: * + `"ACTIVE"` * + `"IN_ACTIVE"` */ status: string; /** * Type of the location. * One of: * + `"UNKNOWN"` * + `"BRANCH"` * + `"OFFICES"` * + `"RECEPTION"` * + `"HEADQUARTERS"` */ locationType: string; /** * Fax number. */ fax: string; /** * Time zone. */ timeZone: string; /** * Email address. */ email: string; /** * Phone number. */ phone: string; /** * Address. */ address: wix_bookings_backend.Address; /** * Location revision, represents the number of changes to the location. */ revision: string; /** * Whether the location is archived. * Archived locations can't be updated. */ archived: boolean; /** * Whether this is the default location. * There can only be one default location per site. Changes to the default location are made on the **Site Properties** page of the dashboard. * The default location can't be deleted. */ default: boolean; }; /** * Represents the time periods that this location is open for business. Holds a collection of TimePeriod instances. */ type BusinessSchedule = { /** * Times that this location is open. Each period represents a range of hours when the location is. * open during the week. Limited to 100 time periods. */ periods: wix_bookings_backend.TimePeriod[]; /** * Exceptions to the business's regular hours. */ specialHourPeriod: wix_bookings_backend.SpecialHourPeriod[]; }; /** * Represents the time periods that this location is open for business. Holds a collection of TimePeriod instances. */ type BusinessSchedule_46474402208 = { /** * Times that this location is open. Each period represents a range of hours when the location is * open during the week. Limited to 100 time periods. */ periods?: wix_bookings_backend.TimePeriod_38785543152[]; /** * Exceptions to the business's regular hours. */ specialHourPeriod?: wix_bookings_backend.SpecialHourPeriod_8149530360[]; }; /** * An object specifying the start date and time of the session. If the session is a recurring session, `start` must contain a `localDateTime`. */ type CalendarDateTime = { /** * UTC date-time in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)) format. If a timezone offset is specified, the time is converted to UTC. For example, if you specify `new Date('2021-01-06T16:00:00.000-07:00')`, the stored value will be `"2021-01-06T23:00:00.000Z"`. * Required if `localDateTime` is not specified. * If `localDateTime` is specified, `timestamp` is calculated as `localDateTime`, using the business's timezone. */ timestamp: Date; /** * An object containing the local date and time for the business's timezone. */ localDateTime: wix_bookings_backend.LocalDateTime; }; /** * An object specifying the start date and time of the session. If the session is a recurring session, `start` must contain a `localDateTime`. */ type CalendarDateTimeInfo = { /** * UTC date-time in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)) format. If a timezone offset is specified, the time is converted to UTC. For example, if you specify `new Date('2021-01-06T16:00:00.000-07:00')`, the stored value will be `"2021-01-06T23:00:00.000Z"`. * Required if `localDateTime` is not specified. * If `localDateTime` is specified, `timestamp` is calculated as `localDateTime`, using the business's timezone. */ timestamp?: Date; /** * An object containing the local date and time for the business's timezone. */ localDateTime?: wix_bookings_backend.LocalDateTimeInfo; }; /** * Contact details of the customer making the booking. */ type ContactDetails = { /** * Contact's ID. */ contactId: string; /** * Contact's first name. When populated from a standard booking form, this property corresponds to the **Name** field. */ firstName: string; /** * Contact's last name. */ lastName: string; /** * Contact's email, used to create a new contact or get existing one from teh [CRM API](wix-crm/introduction). */ email: string; /** * Contact's phone number. */ phone: string; /** * Contact's time zone. */ timeZone: string; /** * Contact's country in [ISO 3166-1 alpha-2 code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. */ countryCode: string; /** * Custom [address](https://www.wix.com/velo/reference/$w/addressinput/value), used when location_type is `"OWNER_CUSTOM"`. */ address: wix_bookings_backend.Address; }; /** * The contact details of the customer making the booking. */ type ContactDetailsInfo = { /** * Contact's ID. */ contactId?: string; /** * Contact's first name. */ firstName?: string; /** * Contact's last name. */ lastName?: string; /** * Contact's email, used to create a new contact or get an existing one from the [CRM API](wix-crm/introduction). */ email?: string; /** * Contact's phone number. */ phone?: string; /** * Contact's full [address](https://www.wix.com/corvid/reference/$w/addressinput/value). */ address?: wix_bookings_backend.Bookings.AddressInfo; /** * Contact's time zone. */ timeZone?: string; /** * Contact's country in [ISO 3166-1 alpha-2 code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. */ countryCode?: string; }; /** * Coupon details, if a coupon was used to pay for the booking. */ type CouponDetails = { /** * Coupon name. */ couponName: string; /** * Coupon code. */ couponCode: string; /** * Coupon discount amount. */ couponDiscount: string; /** * Coupon ID. */ couponId: string; }; type CustomFormField = { /** * ID of the form field as defined in the form. */ _id: string; /** * Value that was submitted for this field. */ value: string; /** * Form field's label at the time of submission. */ label: string; /** * * One of: * - `"SHORT_TEXT"` * - `"LONG_TEXT"` * - `"CHECK_BOX"` * */ valueType: string; }; type CustomFormFieldInfo = { /** * ID of the form field as defined in the form. */ _id?: string; /** * Value that was submitted for this field. */ value?: string; /** * * One of: * - `"SHORT_TEXT"` * - `"LONG_TEXT"` * - `"CHECK_BOX"` * */ valueType?: string; }; /** * Form information submitted when booking. FormInfo contains contact details, participants, and other form fields, set up for the service. */ type Form = { /** * Contact details of the customer making the booking. */ contactDetails?: wix_bookings_backend.ContactDetails; /** * List of rates and the number of participants for each rate. */ paymentSelection: wix_bookings_backend.PaymentSelection[]; /** * Additional custom fields submitted with the form. */ additionalFields?: wix_bookings_backend.CustomFormField[]; }; /** * Updated form info and contact details. */ type FormInfo = { /** * Contact details of the user making the booking. */ contactDetails?: wix_bookings_backend.ContactDetailsInfo; /** * A list of rates and the number of participants for each rate. */ paymentSelection: wix_bookings_backend.PaymentSelectionInfo[]; /** * Additional custom fields submitted with the form. */ additionalFields?: wix_bookings_backend.CustomFormFieldInfo[]; }; type FormInfo_CustomFormField = { /** * ID of the form field as defined in the form. */ _id?: string; /** * Value that was submitted for this field. */ value?: string; /** * One of: * + `"SHORT_TEXT"` * + `"LONG_TEXT"` * + `"CHECK_BOX"` */ valueType?: string; }; type Form_CustomFormField = { /** * ID of the form field as defined in the form. */ _id: string; /** * Value that was submitted for this field. */ value: string; /** * Form field's label at the time of submission. */ label: string; /** * One of: * + `"SHORT_TEXT"` * + `"LONG_TEXT"` * + `"CHECK_BOX"` */ valueType: string; }; type IsAvailableResult_6686246600 = { /** * Whether the requested entity is available for booking for the specified party size. */ available: boolean; /** * Number of spots available to be booked, not including the number of participants in the availability request. */ capacity: number; /** * Current number of booked participants. */ totalParticipants: number; }; type LinkedResourceScheduleInfo = { /** * Schedule ID. */ scheduleId?: string; }; /** * An object containing the local date and time for the business's timezone. */ type LocalDateTime = { /** * Year. 4-digit format. */ year: number; /** * Month number, from 1-12. */ monthOfYear: number; /** * Day of the month, from 1-31. */ dayOfMonth: number; /** * Hour of the day in 24-hour format, from 0-23. */ hourOfDay: number; /** * Minute, from 0-59. */ minutesOfHour: number; }; /** * An object containing the local date and time for the business's timezone. */ type LocalDateTimeInfo = { /** * Year. 4-digit format. */ year?: number; /** * Month number, from 1-12. */ monthOfYear?: number; /** * Day of the month, from 1-31. */ dayOfMonth?: number; /** * Hour of the day in 24-hour format, from 0-23. */ hourOfDay?: number; /** * Minute, from 0-59. */ minutesOfHour?: number; }; /** * The location of the session. */ type Location = { /** * Location type. * * One of: * - `"OWNER_BUSINESS"` The business address as set in the site’s general settings. * - `"OWNER_CUSTOM"` The address as set when creating the service. * - `"CUSTOM"` The address set for the individual session. * */ locationType: string; /** * An object describing the business location. * Valid when `locationType` is `"OWNER_BUSINESS"`. Defaults to the business's default location. */ businessLocation: wix_bookings_backend.BusinessLocation; /** * Custom [address](https://www.wix.com/velo/reference/$w/addressinput/value), used when location_type is `"OWNER_CUSTOM"`. */ customAddress: wix_bookings_backend.Address; }; /** * Geographic location of the session as free-form text. Optional. */ type Location_103381755471 = { /** * Location type. * One of: * + `"OWNER_BUSINESS"` The business address as set by the owner in the site’s general settings. * + `"OWNER_CUSTOM"` The address as set by owner when creating the service. * + `"CUSTOM"` The address as set for the individual session. */ locationType?: string; /** * Free text address used when location_type is `OWNER_CUSTOM`. */ address?: string; /** * Currently not supported. * Valid when locationType is `"OWNER_BUSINESS"` and defaults to the default business location. * When used, businessLocation._id is required. * Supported read only fields: name, description, timezone, email, phone, address. */ businessLocation?: wix_bookings_backend.Location_99881894064; }; /** * Not supported yet. */ type Location_99881894064 = { /** * Display name of the location. */ name?: string; /** * Free text to better describe the location. */ description?: string; /** * Status of the location. Active by default. * One of: * + `"ACTIVE"` * + `"IN_ACTIVE"` */ status?: string; /** * Type of the location. * One of: * + `"UNKNOWN"` * + `"BRANCH"` * + `"OFFICES"` * + `"RECEPTION"` * + `"HEADQUARTERS"` */ locationType?: string; /** * Fax number. */ fax?: string; /** * Time zone. */ timeZone?: string; /** * Email address. */ email?: string; /** * Phone number. */ phone?: string; /** * Address. */ address?: wix_bookings_backend.Address_30702269075; /** * Represents the time periods that this location is open for business. Holds a collection of TimePeriod instances. * TimePeriod indicates when the location is open. Each period represents a range of hours when the location is open during the week. Limited to 100 time periods. */ businessSchedule?: wix_bookings_backend.BusinessSchedule_46474402208; /** * Location revision, represent the number of changes on the location. */ revision?: string; }; /** * Online conference information. */ type OnlineConference = { /** * Participant url. */ guestUrl: string; /** * Online conference provider identifier. */ providerId: string; /** * Online conference password. */ password: string; /** * Online conference description. */ description: string; }; /** * Authorization options. */ type Options = { /** * When `true`, prevents permission checks from running for the operation. Defaults to `false`. */ suppressAuth?: boolean; }; /** * Plan details. */ type PaidPlan = { /** * Order ID when the Pricing Plan was purchased. */ orderId: string; /** * Benefit ID. */ benefitId: string; /** * ID of the pricing plan. */ planId: string; }; /** * Pricing plan details, if a pricing plan was used to pay for the booking. */ type PaidPlanDetails = { /** * Plan details. */ plan: wix_bookings_backend.PaidPlan; /** * Plan name. */ planName: string; /** * Transaction ID created in the Pricing Plans service when the member redeemed a benefit to pay for this booking. */ transactionId: string; }; /** * Describes the selected paid plan to use for this booking. */ type PaidPlan_11584964510 = { /** * Order ID when the Pricing Plan was purchased. */ orderId?: string; /** * Benefit ID. */ benefitId?: string; /** * ID of the pricing plan. */ planId?: string; }; /** * Whether to notify the participants about the booking confirmation, and an optional custom message. */ type ParticipantNotificationInfo = { /** * Whether to notify participants about the change. */ notifyParticipants?: boolean; /** * Custom message to send to the participants. */ message?: string; }; /** * Payment Details. */ type PaymentDetails = { /** * Checkout ID. */ _id: string; /** * Final price, currency, down payment, and amount received. */ balance: wix_bookings_backend.Balance; /** * Coupon details, if a coupon was used to pay for the booking. */ couponDetails: wix_bookings_backend.CouponDetails; /** * Checkout current state. * * One of: * - `"COMPLETE"` Amount paid in full. * - `"PENDING_CASHIER"` An online payment is in progress and awaiting a response. * - `"REJECTED"` The checkout request was rejected by the online payment process. * - `"READY"` All online checkout requirements were met. For example, when the service uses pay in person, or a partial or down payment was paid online. * - `"CANCELED"` Checkout canceled. * - `"REFUNDED"` When using Pricing Plans, if the booking was canceled, it will be automatically refunded. * - `"PENDING_MERCHANT"` An online payment was made, but the owner has not set up the necessary details. * - `"WIX_PAY_FAILURE"` Online payment failure. * - `"PENDING_MARK_AS_PAID"` Offline transaction. The transaction will be complete when explicitly marked as paid. * - `"PENDING_BUYER"` The transaction started, but is waiting for confirmation on the buyer's side. This can be due to credit or fraud checking on the provider's side, a long bank transfer, or similar processes. * */ state: string; /** * In case of wix-pay service, holds all payment history for a booking. */ wixPayMultipleDetails: wix_bookings_backend.WixPayDetails[]; /** * Pricing plan details, if a pricing plan was used to pay for the booking. */ pricingPlanDetails: wix_bookings_backend.PaidPlanDetails; }; type PaymentSelection = { /** * Label corresponding to the booking rate. Default is free/custom. */ rateLabel: string; /** * Number of participants for this rate. */ numberOfParticipants: number; }; type PaymentSelectionInfo = { /** * Label corresponding to the booking rate. Default is free/custom. */ rateLabel?: string; /** * Number of participants for this rate. */ numberOfParticipants?: number; }; /** * `key` of type string, `value` of type object */ type Price = { /** * Required payment amount. */ amount: string; /** * Currency in which the amount is quoted. */ currency: string; /** * Amount of a down payment or deposit as part of the transaction. */ downPayAmount: string; }; /** * `key` of type string, `value` of type object. */ type Price_7237915081 = { /** * Required payment amount. */ amount?: string; /** * Currency in which the amount is quoted. */ currency?: string; /** * Amount of a down payment or deposit as part of the transaction. */ downPayAmount?: string; }; /** * Plan details. */ type PricingPlan = { /** * Order ID when the Pricing Plan was purchased. */ orderId: string; /** * Benefit ID. */ benefitId: string; /** * ID of the pricing plan. */ planId: string; }; /** * Pricing plan details, if a pricing plan was used to pay for the booking. */ type PricingPlanDetails = { /** * Plan details. */ plan: wix_bookings_backend.PricingPlan; /** * Plan name. */ planName: string; /** * Transaction ID created in the Pricing Plans service when the member redeemed a benefit to pay for this booking. */ transactionId: string; }; /** * Price options offered to book this session at the time of booking. */ type Rate = { /** * Set of key-value pairs.Mapping between a named price option, for example, adult or child prices, and the price, currency, and down payment amount. */ labeledPriceOptions: any; /** * Textual price information used when **Price Per Session** is set to **Custom Price** in the app's service details page. */ priceText: string; }; /** * The price options offered to participate this session. Optional. The default value is the schedule rate. */ type Rate_13652876269 = { /** * Set of key-value pairs.Mapping between a named price option and the price, currency and down payment amount. */ labeledPriceOptions?: any; /** * Textual price information used when Price Per Session is set to Custom Price in the app's service details page. */ priceText?: string; }; type RescheduleRequest_6918542709 = { /** * Whether to notify the participants about the booking confirmation, and an optional custom message. */ participantNotification?: wix_bookings_backend.ParticipantNotificationInfo; /** * Sets the reschedule flow behavior, some behaviors required permissions. */ ignoreReschedulePolicy?: wix_bookings_backend.RescheduleRequest_FlowControlSettings_1362659582; }; /** * Sets the reschedule flow behavior, some behaviors required permissions. */ type RescheduleRequest_FlowControlSettings_1362659582 = { /** * when defined as true, skips the service defined reschedule policy. * required BOOKINGS.IGNORE_BOOKING_POLICY permission. */ ignoreReschedulePolicy?: boolean; }; /** * Resource details. */ type Resource = { /** * Resource ID. */ _id: string; /** * Resource name. */ name: string; /** * Resource email address. */ email?: string; /** * Resource phone number. */ phone?: string; /** * Resource description. */ description?: string; /** * Resource tags. Tags are used to identify, group, and filter the different types of resources. For example, 'staff' or 'room'. */ tags?: string[]; /** * List of IDs of schedules owned by this resource. */ scheduleIds: string[]; /** * Resource status. * * One of: * - `"CREATED"` Default status. * - `"DELETED"` The resource was deleted. * - `"UPDATED"` The resource was updated. * */ status: string; }; /** * First start and last end time of the booked sessions. */ type SetOfSessions = { /** * Start time of the first session. */ firstSessionStart: Date; /** * End time of the last session. */ lastSessionEnd: Date; }; /** * Start and end time of the booked sessions. */ type SingleSession = { sessionId: string; /** * Start time of the session. */ start: Date; /** * End time of the session. */ end: Date; }; /** * Set of time periods when a location's operational hours differ from its normal business hours. */ type SpecialHourPeriod = { /** * Date and Time in 24hr [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) Coordinated universal time (UTC). */ startDate: string; /** * Date and Time in 24hr [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) Coordinated universal time (UTC). */ endDate: string; /** * Whether the business is closed during this period. */ isClosed: boolean; /** * Comment. */ comment: string; }; /** * Set of time periods when a location's operational hours differ from its normal business hours. */ type SpecialHourPeriod_8149530360 = { /** * Date and Time in 24hr iso-8601 Coordinated universal time (UTC). */ startDate?: string; /** * Date and Time in 24hr iso-8601 Coordinated universal time (UTC). */ endDate?: string; /** * Whether the business is closed during this period. */ isClosed?: boolean; /** * Comment text. */ comment?: string; }; /** * Street name, number and apartment number. */ type StreetAddress = { /** * Street number. */ number: string; /** * Street name. */ name: string; /** * Apartment number. */ apt: string; }; /** * Street name, number and apartment number. */ type StreetAddressInfo = { /** * Street number. */ number?: string; /** * Street name. */ name?: string; /** * Apartment number. */ apt?: string; }; /** * A break down of the street to number and street name. */ type StreetAddress_7212524817 = { /** * street number. */ number?: string; /** * street name. */ name?: string; /** * apartment number. */ apt?: string; }; /** * Street name, number and apartment number. */ type StreetContactAddress_NOT = { /** * Street number. */ number: string; /** * Street name. */ name: string; /** * Apartment number. */ apt: string; }; type Subdivision = { /** * Subdivision code. Usually state, region, prefecture or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */ code: string; /** * Subdivision full name. */ name: string; }; /** * A span of time that the business is open. */ type TimePeriod = { /** * Day of the week this period starts on. * One of: * + `"MONDAY"` * + `"TUESDAY"` * + `"WEDNESDAY"` * + `"THURSDAY"` * + `"FRIDAY"` * + `"SATURDAY"` * + `"SUNDAY"` */ openDay: string; /** * Time in 24hr [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) extended format (hh:mm). Valid values are 00:00-24:00, where 24:00 represents * midnight at the end of the specified day field. */ openTime: string; /** * Day of the week this period ends on. * One of: * + `"MONDAY"` * + `"TUESDAY"` * + `"WEDNESDAY"` * + `"THURSDAY"` * + `"FRIDAY"` * + `"SATURDAY"` * + `"SUNDAY"` */ closeDay: string; /** * Time in 24hr [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) extended format (hh:mm). Valid values are 00:00-24:00, where 24:00 represents * midnight at the end of the specified day field. */ closeTime: string; }; /** * A span of time that the business is open. */ type TimePeriod_38785543152 = { /** * Day of the week this period starts on. * One of: * + `"MONDAY"` * + `"TUESDAY"` * + `"WEDNESDAY"` * + `"THURSDAY"` * + `"FRIDAY"` * + `"SATURDAY"` * + `"SUNDAY"` */ openDay?: string; /** * Time in 24hr [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) extended format (hh:mm). Valid values are 00:00-24:00, where 24:00 represents * midnight at the end of the specified day field. */ openTime?: string; /** * Day of the week this period ends on. * One of: * + `"MONDAY"` * + `"TUESDAY"` * + `"WEDNESDAY"` * + `"THURSDAY"` * + `"FRIDAY"` * + `"SATURDAY"` * + `"SUNDAY"` */ closeDay?: string; /** * Time in 24hr [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) extended format (hh:mm). Valid values are 00:00-24:00, where 24:00 represents * midnight at the end of the specified day field. */ closeTime?: string; }; type WixPayDetails = { /** * Wix Pay payment transaction ID. */ txId: string; /** * Wix Pay payment order ID. */ orderId: string; /** * Order amount sent to the Wix Pay system. */ orderAmount: string; /** * Transaction status * * One of: * - `"CREATED"` The transaction has been started. * - `"PENDING_MERCHANT"` An online payment was made, but the owner has not set up the necessary details. * - `"COMPLETE"` The current part of the payment was completed. * - `"FAILED"` The Wix online payment system is unavailable or failed processing. * - `"DECLINED"` The payment was declined. * - `"PENDING_MARK_AS_PAID"` Offline transaction. The transaction will be complete when explicitly marked as paid. * - `"CANCELED"` The transaction was canceled. * */ orderStatus: string; /** * Date and time that the order was approved. */ orderApprovalTime: Date; /** * Payment vendor name. The company processing the payment, such as Pay Pal or a credit card company. `inPerson` is used for cash payments. */ paymentVendorName: string; }; } declare namespace wix_bookings_backend.Resources { /** * Contains functionality for refining a resource catalog query. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Resources.ResourceCatalogQueryBuilder.html#) */ interface ResourceCatalogQueryBuilder { /** * Refines a query to match items whose specified property value equals the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Resources.ResourceCatalogQueryBuilder.html#eq) */ eq(propertyName: string, value: string): wix_bookings_backend.Resources.ResourceCatalogQueryBuilder; /** * Returns the resource catalog items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Resources.ResourceCatalogQueryBuilder.html#find) */ find(options?: wix_bookings_backend.Resources.ResourceCatalogQueryBuilder.QueryOptions): Promise; /** * Refines a query to match items whose specified property contains any of the specified `value` parameters. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Resources.ResourceCatalogQueryBuilder.html#hasSome) */ hasSome(propertyName: string, value: string[]): wix_bookings_backend.Resources.ResourceCatalogQueryBuilder; /** * Limits the number of items the query returns. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Resources.ResourceCatalogQueryBuilder.html#limit) */ limit(limit: number): wix_bookings_backend.Resources.ResourceCatalogQueryBuilder; /** * Sets the number of items to skip before returning query results. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Resources.ResourceCatalogQueryBuilder.html#skip) */ skip(skip: number): wix_bookings_backend.Resources.ResourceCatalogQueryBuilder; } namespace ResourceCatalogQueryBuilder { /** * Options to use when performing a query. */ type QueryOptions = { /** * When `true`, prevents permission checks from running for the operation. Defaults to `false`. */ suppressAuth?: boolean; }; } /** * The results of a resource catalog query, containing the retrieved items. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Resources.ResourceCatalogQueryResult.html#) */ interface ResourceCatalogQueryResult { /** * Returns the index of the current results page number. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Resources.ResourceCatalogQueryResult.html#currentPage) */ readonly currentPage: number; /** * Returns an array of resources, slugs, and schedules that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Resources.ResourceCatalogQueryResult.html#items) */ readonly items: wix_bookings_backend.Resources.ResourceQueryResults[]; /** * Returns the number of items in the current results page. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Resources.ResourceCatalogQueryResult.html#length) */ readonly length: number; /** * Returns the query page size. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Resources.ResourceCatalogQueryResult.html#pageSize) */ readonly pageSize: number; /** * Returns the ResourceCatalogQueryBuilder object used to get the current results. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Resources.ResourceCatalogQueryResult.html#query) */ readonly query: wix_bookings_backend.Resources.ResourceCatalogQueryBuilder; /** * Returns the total number of items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Resources.ResourceCatalogQueryResult.html#totalCount) */ readonly totalCount: number; /** * Returns the total number of pages the query produced. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Resources.ResourceCatalogQueryResult.html#totalPages) */ readonly totalPages: number; /** * Indicates if the query has more results. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Resources.ResourceCatalogQueryResult.html#hasNext) */ hasNext(): boolean; /** * Indicates the query has previous results. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Resources.ResourceCatalogQueryResult.html#hasPrev) */ hasPrev(): boolean; /** * Retrieves the next page of query results. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Resources.ResourceCatalogQueryResult.html#next) */ next(): Promise; /** * Retrieves the previous page of query results. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Resources.ResourceCatalogQueryResult.html#prev) */ prev(): Promise; } } declare namespace wix_bookings_backend.Sessions { /** * Contains functionality for refining a session query. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Sessions.SessionQueryBuilder.html#) */ interface SessionQueryBuilder { /** * Refines a query to match items whose specified property value equals the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Sessions.SessionQueryBuilder.html#eq) */ eq(propertyName: string, value: any): wix_bookings_backend.Sessions.SessionQueryBuilder; /** * Returns the bookings that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Sessions.SessionQueryBuilder.html#find) */ find(options?: wix_bookings_backend.Sessions.SessionQueryBuilder.QueryOptions): Promise; /** * Refines a query to match items whose specified property value is greater than or equal to the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Sessions.SessionQueryBuilder.html#ge) */ ge(propertyName: string, value: Date): wix_bookings_backend.Sessions.SessionQueryBuilder; /** * Refines a query to match items whose specified property contains any of the specified `value` parameters. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Sessions.SessionQueryBuilder.html#hasSome) */ hasSome(propertyName: string, value: string[]): wix_bookings_backend.Sessions.SessionQueryBuilder; /** * Limits the number of items the query returns. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Sessions.SessionQueryBuilder.html#limit) */ limit(limit: number): wix_bookings_backend.Sessions.SessionQueryBuilder; /** * Refines a query to match items whose specified property value is less than the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Sessions.SessionQueryBuilder.html#lt) */ lt(propertyName: string, value: Date): wix_bookings_backend.Sessions.SessionQueryBuilder; /** * Refines a query to match items whose specified property value does not equal the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Sessions.SessionQueryBuilder.html#ne) */ ne(propertyName: string, value: any): wix_bookings_backend.Sessions.SessionQueryBuilder; /** * Sets the number of items to skip before returning query results. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Sessions.SessionQueryBuilder.html#skip) */ skip(skip: number): wix_bookings_backend.Sessions.SessionQueryBuilder; } namespace SessionQueryBuilder { /** * Options to use when performing a query. */ type QueryOptions = { /** * When `true`, prevents permission checks from running for the `find()` operation. Defaults to `false`. */ suppressAuth?: boolean; }; } /** * The results of a session query, containing the retrieved items. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Sessions.SessionQueryResult.html#) */ interface SessionQueryResult { /** * Returns the index of the current results page number. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Sessions.SessionQueryResult.html#currentPage) */ readonly currentPage: number; /** * Returns an array of sessions that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Sessions.SessionQueryResult.html#items) */ readonly items: wix_bookings_backend.Sessions.Session[]; /** * Returns the query page size. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Sessions.SessionQueryResult.html#pageSize) */ readonly pageSize: number; /** * Returns the `SessionQueryBuilder` object used to get the current results. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Sessions.SessionQueryResult.html#query) */ readonly query: wix_bookings_backend.Sessions.SessionQueryBuilder; /** * Returns the total number of items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Sessions.SessionQueryResult.html#totalCount) */ readonly totalCount: number; /** * Returns the total number of pages the query produced. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Sessions.SessionQueryResult.html#totalPages) */ readonly totalPages: number; /** * Indicates if the query has more results. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Sessions.SessionQueryResult.html#hasNext) */ hasNext(): boolean; /** * Indicates the query has previous results. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Sessions.SessionQueryResult.html#hasPrev) */ hasPrev(): boolean; /** * Retrieves the next page of query results. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Sessions.SessionQueryResult.html#next) */ next(): Promise; /** * Retrieves the previous page of query results. * [Read more](https://www.wix.com/corvid/reference/wix-bookings-backend.Sessions.SessionQueryResult.html#prev) */ prev(): Promise; } } declare namespace wix_captcha_backend { /** * An object representing a CAPTCHA authorization error message. */ type ErrorReport = { /** * Error message. */ error: string; }; /** * An object representing a CAPTCHA authorization success message. */ type SuccessReport = { /** * Value is `true` when authorization is successful. */ success: boolean; }; } declare namespace wix_chat_backend { /** * Events that are fired by actions relating to chat messages. * [Read more](https://www.wix.com/corvid/reference/wix-chat-backend.Events.html#) */ interface Events { /** * An event that fires when a chat message is sent to or from the business. * [Read more](https://www.wix.com/corvid/reference/wix-chat-backend.Events.html#onMessage) */ onMessage(event: wix_chat_backend.Events.SendMessageEvent): void; } namespace Events { /** * The content of a chat message. */ type MessagePayload = { /** * Text of the chat message. */ text: string; }; /** * An object representing a chat message that was sent. */ type SendMessageEvent = { /** * ID of the channel on which the message was sent. */ channelId: string; /** * Direction of the message. * One of the following: * * + `"VisitorToBusiness"`: From a site visitor to the business. * + `"BusinessToVisitor"`: From the business to a site visitor. */ direction: string; /** * Type of message. Currently only `TEXT` is supported. */ type: string; /** * First 250 characters of the chat message. Currently only text is included in the summary. */ summary: string; /** * The sender's member ID. For a message sent from the site's business, the site owner's member ID. */ participantId: string; /** * Date and time the message was sent. */ createdAt: Date; /** * Content of the message. * Currently only content of type text is included in the `payload`. */ payload: wix_chat_backend.Events.MessagePayload; /** * An object representing additional contextual message information included in a chat message. The site visitor does not see the metadata. */ metadata?: any; }; } /** * An object representing a chat message to be sent. */ type MessageInfo = { /** * The content of the message. */ messageText: string; /** * The ID of the channel to send the message to. Currently only IDs of business channels are supported. */ channelId: string; /** * An object representing additional contextual message information included in a chat message. The site visitor does not see the metadata. */ metadata?: any; /** * Indicates whether the message is sent from the visitor to the business. If `sendAsVisitor` is `true`, the message is sent from the site visitor to the business. If `sendAsVisitor` is `undefined` or `false`, the message is sent from the business to the site visitor. The default is `undefined`. */ sendAsVisitor?: boolean; }; } declare namespace wix_crm_backend.Contacts { /** * Contains functionality for refining a contacts query. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.ContactsQueryBuilder.html#) */ interface ContactsQueryBuilder { /** * Adds an `and` condition to the query. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.ContactsQueryBuilder.html#and) */ and(query: wix_crm_backend.Contacts.ContactsQueryBuilder): wix_crm_backend.Contacts.ContactsQueryBuilder; /** * Adds a sort to a query, sorting by the specified properties in ascending order. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.ContactsQueryBuilder.html#ascending) */ ascending(...propertyName: string[]): wix_crm_backend.Contacts.ContactsQueryBuilder; /** * Refines a query to match items whose specified property value is within a specified range. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.ContactsQueryBuilder.html#between) */ between(propertyName: string, rangeStart: Date, rangeEnd: Date): wix_crm_backend.Contacts.ContactsQueryBuilder; /** * Adds a sort to a query, sorting by the specified properties in descending order. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.ContactsQueryBuilder.html#descending) */ descending(...propertyName: string[]): wix_crm_backend.Contacts.ContactsQueryBuilder; /** * Refines a query to match items whose specified property value equals the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.ContactsQueryBuilder.html#eq) */ eq(propertyName: string, value: any): wix_crm_backend.Contacts.ContactsQueryBuilder; /** * Returns the items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.ContactsQueryBuilder.html#find) */ find(options?: wix_crm_backend.Contacts.AuthOptions): Promise; /** * Refines a query to match items whose specified property value is greater than or equal to the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.ContactsQueryBuilder.html#ge) */ ge(propertyName: string, value: Date): wix_crm_backend.Contacts.ContactsQueryBuilder; /** * Refines a query to match items whose specified property value is greater than the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.ContactsQueryBuilder.html#gt) */ gt(propertyName: string, value: Date): wix_crm_backend.Contacts.ContactsQueryBuilder; /** * Refines a query to match items whose specified property value contains all of the specified values. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.ContactsQueryBuilder.html#hasAll) */ hasAll(propertyName: string, values: string[]): wix_crm_backend.Contacts.ContactsQueryBuilder; /** * Refines a query to match items whose specified property value contains any of the specified values. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.ContactsQueryBuilder.html#hasSome) */ hasSome(propertyName: string, values: string[]): wix_crm_backend.Contacts.ContactsQueryBuilder; /** * Refines a query to match items whose specified property value is less than or equal to the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.ContactsQueryBuilder.html#le) */ le(propertyName: string, value: Date): wix_crm_backend.Contacts.ContactsQueryBuilder; /** * Limits the number of items the query returns. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.ContactsQueryBuilder.html#limit) */ limit(limit: string): wix_crm_backend.Contacts.ContactsQueryBuilder; /** * Refines a query to match items whose specified property value is less than the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.ContactsQueryBuilder.html#lt) */ lt(propertyName: string, value: Date): wix_crm_backend.Contacts.ContactsQueryBuilder; /** * Refines a query to match items whose specified property value does not equal the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.ContactsQueryBuilder.html#ne) */ ne(propertyName: string, value: any): wix_crm_backend.Contacts.ContactsQueryBuilder; /** * Adds an `not` condition to the query. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.ContactsQueryBuilder.html#not) */ not(query: wix_crm_backend.Contacts.ContactsQueryBuilder): wix_crm_backend.Contacts.ContactsQueryBuilder; /** * Adds an `or` condition to the query. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.ContactsQueryBuilder.html#or) */ or(query: wix_crm_backend.Contacts.ContactsQueryBuilder): wix_crm_backend.Contacts.ContactsQueryBuilder; /** * Sets the number of items to skip before returning query results. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.ContactsQueryBuilder.html#skip) */ skip(skip: string): wix_crm_backend.Contacts.ContactsQueryBuilder; /** * Refines a query to match items whose specified property value starts with a specified string. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.ContactsQueryBuilder.html#startsWith) */ startsWith(propertyName: string, value: string): wix_crm_backend.Contacts.ContactsQueryBuilder; } /** * The results of a contacts query, containing the retrieved items. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.ContactsQueryResult.html#) */ interface ContactsQueryResult { /** * Returns the items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.ContactsQueryResult.html#items) */ readonly items: wix_crm_backend.Contacts.Contact[]; /** * Returns the number of items in the current results page. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.ContactsQueryResult.html#length) */ readonly length: number; /** * Returns the query page size. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.ContactsQueryResult.html#pageSize) */ readonly pageSize: number; /** * Returns the `ContactsQueryBuilder` object used to get the current results. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.ContactsQueryResult.html#query) */ readonly query: wix_crm_backend.Contacts.ContactsQueryBuilder; /** * Indicates if the query has more results. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.ContactsQueryResult.html#hasNext) */ hasNext(): boolean; /** * Indicates if the query has previous results. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.ContactsQueryResult.html#hasPrev) */ hasPrev(): boolean; /** * Retrieves the next page of query results. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.ContactsQueryResult.html#next) */ next(): Promise; /** * Retrieves the previous page of query results. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.ContactsQueryResult.html#prev) */ prev(): Promise; } /** * Contains functionality for refining an extended fields query. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.ExtendedFieldsQueryBuilder.html#) */ interface ExtendedFieldsQueryBuilder { /** * Adds a sort to a query, sorting by the specified properties in ascending order. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.ExtendedFieldsQueryBuilder.html#ascending) */ ascending(...propertyName: string[]): wix_crm_backend.Contacts.ExtendedFieldsQueryBuilder; /** * Adds a sort to a query, sorting by the specified properties in descending order. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.ExtendedFieldsQueryBuilder.html#descending) */ descending(...propertyName: string[]): wix_crm_backend.Contacts.ExtendedFieldsQueryBuilder; /** * Returns the items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.ExtendedFieldsQueryBuilder.html#find) */ find(options?: wix_crm_backend.Contacts.AuthOptions): Promise; /** * Limits the number of items the query returns. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.ExtendedFieldsQueryBuilder.html#limit) */ limit(limit: string): wix_crm_backend.Contacts.ExtendedFieldsQueryBuilder; /** * Sets the number of items to skip before returning query results. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.ExtendedFieldsQueryBuilder.html#skip) */ skip(skip: string): wix_crm_backend.Contacts.ExtendedFieldsQueryBuilder; } /** * The results of a contacts query, containing the retrieved items. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.ExtendedFieldsQueryResult.html#) */ interface ExtendedFieldsQueryResult { /** * Returns the items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.ExtendedFieldsQueryResult.html#items) */ readonly items: wix_crm_backend.Contacts.ExtendedField[]; /** * Returns the number of items in the current results page. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.ExtendedFieldsQueryResult.html#length) */ readonly length: number; /** * Returns the query page size. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.ExtendedFieldsQueryResult.html#pageSize) */ readonly pageSize: number; /** * Returns the `ExtendedFieldsQueryBuilder` object used to get the current results. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.ExtendedFieldsQueryResult.html#query) */ readonly query: wix_crm_backend.Contacts.ExtendedFieldsQueryBuilder; /** * Indicates if the query has more results. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.ExtendedFieldsQueryResult.html#hasNext) */ hasNext(): boolean; /** * Indicates if the query has previous results. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.ExtendedFieldsQueryResult.html#hasPrev) */ hasPrev(): boolean; /** * Retrieves the next page of query results. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.ExtendedFieldsQueryResult.html#next) */ next(): Promise; /** * Retrieves the previous page of query results. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.ExtendedFieldsQueryResult.html#prev) */ prev(): Promise; } /** * Contains functionality for refining a labels query. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.LabelsQueryBuilder.html#) */ interface LabelsQueryBuilder { /** * Adds a sort to a query, sorting by the specified properties in ascending order. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.LabelsQueryBuilder.html#ascending) */ ascending(...propertyName: string[]): wix_crm_backend.Contacts.LabelsQueryBuilder; /** * Adds a sort to a query, sorting by the specified properties in descending order. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.LabelsQueryBuilder.html#descending) */ descending(...propertyName: string[]): wix_crm_backend.Contacts.LabelsQueryBuilder; /** * Returns the items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.LabelsQueryBuilder.html#find) */ find(options?: wix_crm_backend.Contacts.AuthOptions): Promise; /** * Limits the number of items the query returns. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.LabelsQueryBuilder.html#limit) */ limit(limit: string): wix_crm_backend.Contacts.LabelsQueryBuilder; /** * Sets the number of items to skip before returning query results. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.LabelsQueryBuilder.html#skip) */ skip(skip: string): wix_crm_backend.Contacts.LabelsQueryBuilder; } /** * The results of a contacts query, containing the retrieved items. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.LabelsQueryResult.html#) */ interface LabelsQueryResult { /** * Returns the items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.LabelsQueryResult.html#items) */ readonly items: wix_crm_backend.Contacts.Label[]; /** * Returns the number of items in the current results page. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.LabelsQueryResult.html#length) */ readonly length: number; /** * Returns the query page size. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.LabelsQueryResult.html#pageSize) */ readonly pageSize: number; /** * Returns the `LabelsQueryBuilder` object used to get the current results. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.LabelsQueryResult.html#query) */ readonly query: wix_crm_backend.Contacts.LabelsQueryBuilder; /** * Indicates if the query has more results. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.LabelsQueryResult.html#hasNext) */ hasNext(): boolean; /** * Indicates if the query has previous results. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.LabelsQueryResult.html#hasPrev) */ hasPrev(): boolean; /** * Retrieves the next page of query results. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.LabelsQueryResult.html#next) */ next(): Promise; /** * Retrieves the previous page of query results. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.LabelsQueryResult.html#prev) */ prev(): Promise; } } declare namespace wix_crm_backend { /** * The Contacts API is used to manage a site's contacts. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.html#) */ interface Contacts { /** * Appends an existing contact or creates a contact if it doesn't exist. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.html#appendOrCreateContact) */ appendOrCreateContact(contactInfo: wix_crm_backend.Contacts.ContactInfo): Promise; /** * Creates a new contact. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.html#createContact) */ createContact(contactInfo: wix_crm_backend.Contacts.ContactInfo, options?: wix_crm_backend.Contacts.Options): Promise; /** * Deletes a contact who is not a site member or contributor. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.html#deleteContact) */ deleteContact(contactId: string, options?: wix_crm_backend.Contacts.AuthOptions): Promise; /** * Deletes an extended field. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.html#deleteExtendedField) */ deleteExtendedField(key: string, options?: wix_crm_backend.Contacts.AuthOptions): Promise; /** * Deletes a label from the site and removes it from contacts it applies to. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.html#deleteLabel) */ deleteLabel(key: string, options?: wix_crm_backend.Contacts.AuthOptions): Promise; /** * Retrieves a custom field with a given name, or creates one if it doesn't exist. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.html#findOrCreateExtendedField) */ findOrCreateExtendedField(extendedFieldInfo: wix_crm_backend.Contacts.ExtendedFieldInfo, options?: wix_crm_backend.Contacts.AuthOptions): Promise; /** * Retrieves a label with a given name, or creates one if it doesn't exist. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.html#findOrCreateLabel) */ findOrCreateLabel(displayName: string, options?: wix_crm_backend.Contacts.AuthOptions): Promise; /** * Retrieves a contact. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.html#getContact) */ getContact(contactId: string, options?: wix_crm_backend.Contacts.AuthOptions): Promise; /** * Retrieves an extended field. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.html#getExtendedField) */ getExtendedField(key: string, options?: wix_crm_backend.Contacts.AuthOptions): Promise; /** * Retrieves a label. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.html#getLabel) */ getLabel(key: string, options?: wix_crm_backend.Contacts.AuthOptions): Promise; /** * Adds labels to a contact. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.html#labelContact) */ labelContact(contactId: string, labelKeys: string[], options?: wix_crm_backend.Contacts.AuthOptions): Promise; /** * Creates a query to retrieve a list of contacts. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.html#queryContacts) */ queryContacts(): wix_crm_backend.Contacts.ContactsQueryBuilder; /** * Creates a query to retrieve a list of extended fields. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.html#queryExtendedFields) */ queryExtendedFields(): wix_crm_backend.Contacts.ExtendedFieldsQueryBuilder; /** * Creates a query to retrieve a list of labels. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.html#queryLabels) */ queryLabels(): wix_crm_backend.Contacts.LabelsQueryBuilder; /** * Renames an extended field. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.html#renameExtendedField) */ renameExtendedField(key: string, displayName: string, options?: wix_crm_backend.Contacts.AuthOptions): Promise; /** * Renames a label. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.html#renameLabel) */ renameLabel(key: string, displayName: string, options?: wix_crm_backend.Contacts.AuthOptions): Promise; /** * Removes labels from a contact. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.html#unlabelContact) */ unlabelContact(contactId: string, labelKeys: string[], options?: wix_crm_backend.Contacts.AuthOptions): Promise; /** * Updates a contact's properties. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Contacts.html#updateContact) */ updateContact(identifiers: wix_crm_backend.Contacts.Identifiers, contactInfo: wix_crm_backend.Contacts.ContactInfo, options?: wix_crm_backend.Contacts.Options): Promise; } namespace Contacts { type Address = { /** * Street address ID. */ _id: string; /** * * * * Address type. * `"UNTAGGED"` is shown as "Other" in the Contact List. * * One of: * * - `"UNTAGGED"` * - `"HOME"` * - `"WORK"` * - `"BILLING"` * - `"SHIPPING"` * */ tag: string; /** * Street address. */ address: wix_crm_backend.Contacts.AddressDetails; }; /** * Street address. */ type AddressDetails = { /** * Main address line, usually street and number, as free text. */ addressLine1?: string; /** * Street address object, with number and name in separate fields. */ streetAddress?: wix_crm_backend.Contacts.StreetAddressInfo; /** * Human-readable address string. * If not provided, the value is generated from the available address data. */ formatted?: string; /** * Free text providing more detailed address information, * such as apartment, suite, or floor. */ addressLine2?: string; /** * Coordinates of the physical address. */ location?: wix_crm_backend.Contacts.AddressLocation; /** * City name. */ city?: string; /** * Code for a subdivision (such as state, prefecture, or province) in an * [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format. */ subdivision?: string; /** * 2-letter country code in an * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. */ country?: string; /** * Postal or zip code. */ postalCode?: string; }; type AddressInfo = { /** * * * * Address type. * `"UNTAGGED"` is shown as "Other" in the Contact List. * * One of: * * - `"UNTAGGED"` * - `"HOME"` * - `"WORK"` * - `"BILLING"` * - `"SHIPPING"` * */ tag: string; /** * Street address. */ address: wix_crm_backend.Contacts.AddressDetails; }; /** * Coordinates of the physical address. */ type AddressLocation = { /** * Address's latitude. */ latitude?: number; /** * Address's longitude. */ longitude?: number; }; /** * Authorization options. */ type AuthOptions = { /** * When `true`, prevents permission checks from running for the operation. Defaults to `false`. */ suppressAuth?: boolean; }; /** * Contact. */ type Contact = { /** * Contact ID. */ _id: string; /** * Revision number, which increments by 1 each time the contact is updated. * To prevent conflicting changes, * the existing `revision` must be used when updating a contact. */ revision: number; /** * Details about the contact's source. */ source: wix_crm_backend.Contacts.Source; /** * Date and time the contact was created. */ _createdDate: Date; /** * Date and time the contact was last updated. */ _updatedDate: Date; /** * Details about the contact's last action in the site. */ lastActivity: wix_crm_backend.Contacts.LastActivity; /** * Contact's primary phone and email. */ primaryInfo?: wix_crm_backend.Contacts.PrimaryInfo; /** * Contact's details. */ info: wix_crm_backend.Contacts.Info; }; type ContactIdentification = { /** * ID of the contact that was found or created. */ contactId: string; /** * Identity type of the returned contact. * * * * * One of: * * - `"CONTACT"`: The returned contact ID belongs to a new or existing contact. * - `"MEMBER"`: The returned contact ID belongs to the currently logged-in site member. * - `"NOT_AUTHENTICATED_MEMBER"`: The returned contact ID belongs to a site member who is not currently logged in. * */ identityType: string; }; /** * Contact's information. */ type ContactInfo = { /** * Contact's first and last name. */ name?: wix_crm_backend.Contacts.Name; /** * Contact's company name. */ company?: string; /** * Contact's job title. * Corresponds to the **Position** field in the Dashboard. */ jobTitle?: string; /** * Contact's locale, formatted as an * [IETF BCP 47 language tag](https://tools.ietf.org/html/rfc5646). * Typically, this is a lowercase 2-letter language code, * followed by a hyphen, * followed by an uppercase 2-letter country code. * * For example, German from Germany is formatted as `de-DE`, * and U.S. English is formatted as `en-US`. */ locale?: string; /** * Contact's birthdate, formatted as `"YYYY-MM-DD"`. * * Example: `"2020-03-15"` for March 15, 2020. */ birthdate?: string; /** * **Deprecated.** Use `profilePicture` instead. */ picture?: wix_crm_backend.Contacts.Picture; /** * List of up to 50 email addresses. */ emails?: wix_crm_backend.Contacts.EmailInfo[]; /** * List of up to 50 phone numbers. */ phones?: wix_crm_backend.Contacts.PhoneInfo[]; /** * List of up to 50 addresses. */ addresses?: wix_crm_backend.Contacts.AddressInfo[]; /** * List of contact label keys. * [Contact labels](https://support.wix.com/en/article/adding-labels-to-contacts-in-your-contact-list) * help categorize contacts. * * * * * Label keys must exist to be added to the contact. * Contact labels can be created or retrieved with * [`findOrCreateLabel()`](wix-crm-backend/contacts/findorcreatelabel) * or * [`queryLabels()`](wix-crm-backend/contacts/queryLabels). * */ labelKeys?: string[]; /** * Set of key-value pairs. * * * * Contact's * [extended fields](wix-crm-backend/contacts/introduction#about-extended-fields), * which allow you to store additional information about your contacts. * * To view or create extended fields, use * [`findOrCreateExtendedField()`](wix-crm-backend/contacts/findorcreateextendedfield), * [`getExtendedField()`](wix-crm-backend/contacts/getextendedfield), or * [`queryExtendedFields()`](wix-crm-backend/contacts/queryextendedfields). * */ extendedFields?: any; /** * Contact's profile picture URL. */ profilePicture?: string; }; /** * Contact's profile picture. */ type ContactPicture = { /** * Image source. Can be either a Media Manager URL or external URL. */ image: string; /** * Indicates whether the image is retrieved from Wix Media * or an external provider. * * * * * One of: * * - `"EXTERNAL"`: The image is retrieved from an external provider. * - `"WIX_MEDIA"`: The image is retrieved from Wix Media. * */ imageProvider: string; }; type Email = { /** * Email ID. */ _id: string; /** * Email type. * * * * * `"UNTAGGED"` is shown as "Other" in the Contact List. * * One of: * * - `"UNTAGGED"` * - `"MAIN"` * - `"HOME"` * - `"WORK"` * */ tag: string; /** * Email address. */ email: string; /** * Indicates whether this is the contact's primary email address. * When changing `primary` to `true` for an email, * the contact's other emails become `false`. */ primary: boolean; }; type EmailInfo = { /** * Email type. * * * * * `"UNTAGGED"` is shown as "Other" in the Contact List. * * One of: * * - `"UNTAGGED"` * - `"MAIN"` * - `"HOME"` * - `"WORK"` * */ tag?: string; /** * Email address. */ email?: string; /** * Indicates whether this is the contact's primary email address. * When changing `primary` to `true` for an email, * the contact's other emails become `false`. */ primary?: boolean; }; /** * Extended field that was found or created. */ type ExtendedField = { /** * Extended field key. * * When accessing contact data, * extended field data is available at `extendedFields[key]`. * For example, if the key is "custom.notes", * the value can be accessed at `extendedFields["custom.notes"]`. * * `key` is generated when the extended field is created * and cannot be modified, even if `displayName` changes. */ key: string; /** * Extended field display name shown in the Contact List. */ displayName: string; /** * Type of data the field holds. * * * * * One of: * * - `"TEXT"`: Accepts strings. * - `"URL"`: Accepts web addresses. Prepends `https://` if no protocol is included. * - `"DATE"`: Accepts dates formatted as `"YYYY-MM-DD"`. * - `"NUMBER"`: Accepts floats. * */ dataType: string; /** * * * * Indicates whether the extended field is a * [system field or custom field](wix-crm-backend/contacts/introduction#about-extended-fields). * * One of: * * - `"SYSTEM"`: The field is a system field managed by Wix. System fields cannot be modified by 3rd-party apps or site contributors. * - `"USER_DEFINED"`: The field is a custom field and can be modified by 3rd-party apps or site contributors. * */ fieldType: string; /** * Date and time the field was created. */ _createdDate: Date; /** * Date and time the field was last updated. */ _updatedDate: Date; /** * * * * Extended field [namespace](wix-crm-backend/contacts/introduction#the-namespace-and-key-properties-in-labels-and-extended-fields). * * * Extended fields created by site contributors or 3rd-party apps * are automatically assigned to the `custom` namespace. */ namespace: string; /** * Field description, if the field is a system field. */ description: string; }; /** * Custom field to find or create. */ type ExtendedFieldInfo = { /** * Display name to find or create. * * If an existing custom field is an exact match * for the specified `displayName`, * the existing field is returned. * If not, a new field is created and returned. */ displayName: string; /** * Type of data the field holds. * Ignored if an existing field is an exact match * for the specified display name. * * * * * One of: * * - `"TEXT"`: Accepts strings. * - `"URL"`: Accepts web addresses. Prepends `https://` if no protocol is included. * - `"DATE"`: Accepts dates formatted as `"YYYY-MM-DD"`. * - `"NUMBER"`: Accepts floats. * */ dataType?: string; }; /** * List of extended fields. */ type ExtendedFieldList = { /** * List of extended fields. */ items: wix_crm_backend.Contacts.ExtendedField[]; /** * Metadata for the page of results. */ pagingMetadata: wix_crm_backend.Contacts.PagingMetadata; }; /** * Extended field that was found or created. */ type FoundOrCreatedExtendedField = { /** * Extended field that was found or created. */ extendedField: wix_crm_backend.Contacts.ExtendedField; /** * Indicates whether the extended field was just created or already existed. * * If the field was just created, returns `true`. * If it already existed, returns `false`. */ newExtendedField: boolean; }; /** * Label that was found or created. */ type FoundOrCreatedLabel = { /** * Label that was found or created. */ label: wix_crm_backend.Contacts.Label; /** * Indicates whether the label was just created or already existed. * * If the label was just created, returns `true`. * If it already existed, returns `false`. */ newLabel: boolean; }; type Identifiers = { /** * ID of the contact to update. */ contactId: string; /** * Revision number. * When updating, include the existing `revision` * to prevent conflicting updates. */ revision: number; }; /** * Contact's details. */ type Info = { /** * Contact's first and last name. */ name?: wix_crm_backend.Contacts.Name; /** * Contact's company name. */ company?: string; /** * Contact's job title. * Corresponds to the **Position** field in the Dashboard. */ jobTitle?: string; /** * Contact's locale, formatted as an * [IETF BCP 47 language tag](https://tools.ietf.org/html/rfc5646). * Typically, this is a lowercase 2-letter language code, * followed by a hyphen, * followed by an uppercase 2-letter country code. * * For example, German from Germany is formatted as `de-DE`, * and U.S. English is formatted as `en-US`. */ locale?: string; /** * Contact's birthdate, formatted as `"YYYY-MM-DD"`. * * Example: `"2020-03-15"` for March 15, 2020. */ birthdate?: string; /** * **Deprecated.** Use `profilePicture` instead. */ picture: wix_crm_backend.Contacts.Picture; /** * List of up to 50 email addresses. */ emails?: wix_crm_backend.Contacts.Email[]; /** * List of up to 50 phone numbers. */ phones?: wix_crm_backend.Contacts.Phone[]; /** * List of up to 50 addresses. */ addresses?: wix_crm_backend.Contacts.Address[]; /** * List of contact label keys. * [Contact labels](https://support.wix.com/en/article/adding-labels-to-contacts-in-your-contact-list) * help categorize contacts. * * * * * Label keys must exist to be added to the contact. * Contact labels can be created or retrieved with * [`findOrCreateLabel()`](wix-crm-backend/contacts/findorcreatelabel) * or * [`queryLabels()`](wix-crm-backend/contacts/queryLabels). * */ labelKeys?: string[]; /** * Set of key-value pairs. * * * * Contact's * [extended fields](wix-crm-backend/contacts/introduction#about-extended-fields), * which allow you to store additional information about your contacts. * * To view or create extended fields, use * [`findOrCreateExtendedField()`](wix-crm-backend/contacts/findorcreateextendedfield), * [`getExtendedField()`](wix-crm-backend/contacts/getextendedfield), or * [`queryExtendedFields()`](wix-crm-backend/contacts/queryextendedfields). * */ extendedFields: any; /** * Contact's profile picture URL. */ profilePicture?: string; }; /** * Label that was found or created. */ type Label = { /** * Label key. * * `key` is generated when the label is created * and cannot be modified, even if `displayName` changes. */ key: string; /** * Label display name shown in the Dashboard. */ displayName: string; /** * Label type. * * * * * One of: * * - `"SYSTEM"`: The label is a predefined system label for the Contact List. * - `"USER_DEFINED"`: The label was created by a site contributor or app. * - `"WIX_APP_DEFINED"`: The label was created by a Wix app. * */ labelType: string; /** * Date and time the label was created. */ _createdDate: Date; /** * Date and time the label was last updated. */ _updatedDate: Date; /** * * * * Label [namespace](wix-crm-backend/contacts/introduction#the-namespace-and-key-properties-in-labels-and-extended-fields). * * * Labels created by site contributors or 3rd-party apps * are automatically assigned to the `custom` namespace. */ namespace: string; }; /** * List of labels. */ type LabelList = { /** * List of labels. */ items: wix_crm_backend.Contacts.Label[]; /** * Metadata for the page of results. */ pagingMetadata: wix_crm_backend.Contacts.PagingMetadata; }; /** * Details about the contact's last action in the site. */ type LastActivity = { /** * Date and time of the last action. */ activityDate: Date; /** * Contact's last action in the site. * * * * * Some possible values: * `"GENERAL"`, `"CONTACT_CREATED"`, `"MEMBER_LOGIN"`, `"MEMBER_REGISTER"`, * `"MEMBER_STATUS_CHANGED"`, `"FORM_SUBMITTED"`, `"INBOX_FORM_SUBMITTED"`, * `"INBOX_PAYMENT_REQUEST_PAID"`, `"INBOX_MESSAGE_TO_CUSTOMER"`, * `"INBOX_MESSAGE_FROM_CUSTOMER"`, `"NEWSLETTER_SUBSCRIPTION_FORM_SUBMITTED"`, * `"NEWSLETTER_SUBSCRIPTION_UNSUBSCRIBE"`, `"ECOM_PURCHASE"`, * `"ECOM_CART_ABANDON"`, `"ECOM_CHECKOUT_BUYER"`, `"BOOKINGS_APPOINTMENT"`, * `"HOTELS_RESERVATION"`, `"HOTELS_PURCHASE"`, `"HOTELS_CONFIRMATION"`, * `"HOTELS_CANCEL"`, `"VIDEO_PURCHASE"`, `"VIDEO_RENT"`, * `"CASHIER_BUTTON_PURCHASE"`, `"ARENA_NEW_LEAD"`, `"EVENTS_RSVP"`, * `"INVOICE_PAY"`, `"INVOICE_OVERDUE"`, `"PRICE_QUOTE_ACCEPT"`, * `"PRICE_QUOTE_EXPIRE"`, `"RESTAURANTS_ORDER"`, `"RESTAURANTS_RESERVATION"`, * `"SHOUTOUT_OPEN"`, `"SHOUTOUT_CLICK"`, `"CONTACT_MERGED"`. * */ activityType: string; }; /** * Paging options. */ type ListOptions = { /** * Number of items to return. * * Defaults to `100`. */ limit?: number; /** * Number of items to skip in the current sort order. * * Defaults to `0`. */ skip?: number; /** * Sorting options. */ sort?: wix_crm_backend.Contacts.SortingOptions; /** * When `true`, prevents permission checks from running for the operation. Defaults to `false`. */ suppressAuth?: boolean; }; /** * Contact's first and last name. */ type Name = { /** * Contact's first name. */ first?: string; /** * Contact's last name. */ last?: string; }; /** * Contact creation options. */ type Options = { /** * Controls whether the call will succeed * if the new contact information contains an email already used by another contact. * * If set to `true`, * the call will succeed even if an email address is used by another contact. * If set to `false`, * the call will fail if an email address is used by another contact. * * Defaults to `false`. */ allowDuplicates?: boolean; /** * When `true`, prevents permission checks from running for the operation. Defaults to `false`. */ suppressAuth?: boolean; }; /** * Metadata for the page of results. */ type PagingMetadata = { /** * Number of items returned. */ length: number; /** * Number of items that matched the query. */ totalCount: number; /** * Indicates if `total` calculation timed out before the response was sent. * Typically this happens if there is a large set of results. */ tooManyToCount: boolean; }; type Phone = { /** * Phone ID. */ _id: string; /** * Phone type. * * * * * `"UNTAGGED"` is shown as "Other" in the Contact List. * * One of: * * - `"UNTAGGED"` * - `"MAIN"` * - `"HOME"` * - `"MOBILE"` * - `"WORK"` * - `"FAX"` * */ tag: string; /** * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code. */ countryCode?: string; /** * Phone number. */ phone: string; /** * [ITU E.164-formatted](https://www.itu.int/rec/T-REC-E.164/) * phone number. * Automatically generated using `phone` and `countryCode`, * as long as both of those values are valid. */ e164Phone?: string; /** * Whether this is the contact's primary phone number. * When changing `primary` to `true` for a phone, * the contact's other phones become `false`. */ primary: boolean; }; type PhoneInfo = { /** * Phone type. * * * * * `"UNTAGGED"` is shown as "Other" in the Contact List. * * One of: * * - `"UNTAGGED"` * - `"MAIN"` * - `"HOME"` * - `"MOBILE"` * - `"WORK"` * - `"FAX"` * */ tag?: string; /** * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code. */ countryCode?: string; /** * Phone number. */ phone?: string; /** * Whether this is the contact's primary phone number. * When changing `primary` to `true` for a phone, * the contact's other phones become `false`. */ primary?: boolean; }; /** * todo */ type Picture = { /** * **Deprecated.** Use `profilePicture` instead. */ image?: string; /** * **Deprecated.** */ imageProvider?: string; }; /** * Contact's primary phone and email. */ type PrimaryInfo = { /** * Primary email address. * * * * * This property reflects the email address in `contactInfo.emails` * where `primary` is `true`. * */ email?: string; /** * Primary phone number. * * * * * This property reflects the phone number in `contactInfo.phones` * where `primary` is `true`. * */ phone?: string; }; /** * The `options` parameter is an optional parameter that can be used when calling the query [`find()`](#find) function. */ type QueryOptions = { /** * Plain text search for an exact match, up to 100 characters. * * Searchable fields: * * - `info.name.first` * - `info.name.last` * - `info.emails.email` * - `info.phones.phone` */ search?: string; /** * When `true`, prevents permission checks from running for the operation. * * Defaults to `false`. */ suppressAuth?: boolean; }; /** * Sorting options. */ type SortingOptions = { /** * Name of the field to sort by. */ fieldName?: string; /** * Sort order. * * * * * One of: * * - `"ASC"`: Ascending order * - `"DESC"`: Descending order * * Defaults to `"ASC"`. * */ order?: string; }; /** * Details about the contact's source. */ type Source = { /** * Source type. * * * Some possible values: * `"OTHER"`, `"ADMIN"`, `"WIX_APP"`, `"IMPORT"`, `"THIRD_PARTY"`, * `"WIX_BOOKINGS"`, `"WIX_CHAT"`, `"WIX_EMAIL_MARKETING"`, `"WIX_EVENTS"`, * `"WIX_FORMS"`, `"WIX_GROUPS"`, `"WIX_HOTELS"`, `"WIX_MARKET_PLACE"`, * `"WIX_MUSIC"`, `"WIX_RESTAURANTS"`, `"WIX_SITE_MEMBERS"`, `"WIX_STORES"`. * */ sourceType: string; /** * App ID, if the contact was created by an app. */ appId: string; }; /** * Street address object, with number and name in separate fields. */ type StreetAddress = { /** * Street number. */ number: string; /** * Street name. */ name: string; }; /** * Street address object, with number and name in separate fields. */ type StreetAddressInfo = { /** * Street number. */ number?: string; /** * Street name. */ name?: string; }; } /** * Code that has been replaced with newer, forward-compatible functions. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Deprecated.html#) */ interface Deprecated { } /** * Events that are fired by actions relating to site contacts. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Events.html#) */ interface Events { /** * An event that triggers when a new workflow card is created. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Events.html#onCardCreated) */ onCardCreated(event: wix_crm_backend.Events.CardCreatedEvent): void; /** * An event that triggers when a workflow card is moved. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Events.html#onCardMoved) */ onCardMoved(event: wix_crm_backend.Events.CardMovedEvent): void; /** * An event that triggers when a workflow card is moved. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Events.html#onCardRestored) */ onCardRestored(event: wix_crm_backend.Events.CardRestoredEvent): void; /** * An event that triggers when a new contact is created. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Events.html#onContactCreated) */ onContactCreated(event: wix_crm_backend.Events.ContactCreatedEvent): void; /** * An event that triggers when a contact is deleted. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Events.html#onContactDeleted) */ onContactDeleted(event: wix_crm_backend.Events.ContactDeletedEvent): void; /** * An event that triggers when one or more source contacts are merged into a target contact. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Events.html#onContactMerged) */ onContactMerged(event: wix_crm_backend.Events.ContactMergedEvent): void; /** * An event that triggers when a contact is updated. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Events.html#onContactUpdated) */ onContactUpdated(event: wix_crm_backend.Events.ContactUpdatedEvent): void; /** * An event that triggers when a site visitor submits a Wix Form. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Events.html#onFormSubmit) */ onFormSubmit(event: wix_crm_backend.Events.FormSubmitEvent): void; } namespace Events { /** * An object representing a created card. */ type CardCreatedEvent = { /** * ID of the card's workflow. */ workflowId: string; /** * Name of the card's workflow. */ workflowName: string; /** * ID of the card's phase. */ phaseId: string; /** * Name of the card's phase. */ phaseName: string; /** * The card that was created. */ card: wix_crm_backend.Workflows.Card; }; /** * An object representing a moved card. */ type CardMovedEvent = { /** * ID of the card's workflow. */ workflowId: string; /** * Name of the card's workflow. */ workflowName: string; /** * ID of the card's new phase. */ newPhaseId: string; /** * Name of the card's new phase. */ newPhaseName: string; /** * ID of the card's old phase. */ previousPhaseId: string; /** * Name of the card's old phase. */ previousPhaseName: string; /** * The card that was moved. */ card: wix_crm_backend.Workflows.Card; }; /** * An object representing a moved card. */ type CardRestoredEvent = { /** * ID of the workflow the card was restored to. */ workflowId: string; /** * Name of the workflow the card was restored to. */ workflowName: string; /** * ID of the phase the card was restored to. */ phaseId: string; /** * Name of the phase the card was restored to. */ phaseName: string; /** * The card that was restored. */ card: wix_crm_backend.Workflows.Card; }; type ContactCreatedEvent = { /** * Event metadata. */ metadata: wix_crm_backend.Events.EventMetadata; /** * Created contact. */ entity: wix_crm_backend.Contacts.Contact; }; type ContactDeletedEvent = { /** * Event metadata. */ metadata: wix_crm_backend.Events.UpdateAndDeleteMetadata; }; type ContactMergedData = { /** * IDs of the source contacts. */ sourceContactIds: string[]; /** * ID of the target contact. */ targetContactId: string; /** * Updated target contact. */ targetContact: wix_crm_backend.Contacts.Contact; }; type ContactMergedEvent = { /** * Event metadata. */ metadata: wix_crm_backend.Events.EventMetadata; /** * Information about the source and target contacts. */ data: wix_crm_backend.Events.ContactMergedData; }; type ContactUpdatedEvent = { /** * Event metadata. */ metadata: wix_crm_backend.Events.UpdateAndDeleteMetadata; /** * Updated contact. */ entity: wix_crm_backend.Contacts.Contact; }; /** * Event metadata. */ type EventMetadata = { /** * Event ID. */ id: string; /** * Contact ID associated with the event. */ entityId: string; /** * Event timestamp. */ eventTime: string; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, [GDPR](https://support.wix.com/en/article/gdpr-frequently-asked-questions)). * For advanced users. */ triggeredByAnonymizeRequest?: boolean; }; /** * An object representing an attachment to a Wix Form. */ type FormAttachment = { /** * Name of the attachment. */ name: string; /** * Type of attachment. * One of: * * + `"UNDEFINED"` * + `"DOCUMENT"` * + `"IMAGE"` * + `"VIDEO"` */ type: string; /** * URL of the attachment. */ url: string; }; /** * An object representing a Wix Form field. */ type FormField = { /** * Name of the field. */ fieldName: string; /** * Value of the field. */ fieldValue: string; }; /** * An object representing a Wix Form. */ type FormSubmitEvent = { /** * Contact ID of the site visitor submitting the Wix Form. */ contactId: string; /** * Name of the Wix Form. */ formName: string; /** * Date and time that the Wix Form was submitted. */ submissionTime: Date; /** * Data submitted in the Wix Form. The object contains key:value pairs where the key is the field name and the value is the contents of the field. */ submissionData: wix_crm_backend.Events.FormField[]; /** * The Wix Form's attachments. */ attachments: wix_crm_backend.Events.FormAttachment[]; }; /** * Event metadata. */ type UpdateAndDeleteMetadata = { /** * Event ID. */ id: string; /** * Contact ID associated with the event. */ entityId: string; /** * Event timestamp. */ eventTime: string; /** * If present and set to `"merge"`, * indicates the event was triggered by a merge. * * See [`onContactMerged()`](#onContactMerged) for information on handling * merge events. */ originatedFrom?: string; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, [GDPR](https://support.wix.com/en/article/gdpr-frequently-asked-questions)). * For advanced users. */ triggeredByAnonymizeRequest?: boolean; }; } /** * The Notifications API is used to send notifications to the site owner and contributors. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Notifications.html#) */ interface Notifications { /** * Sends a notification. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Notifications.html#notify) */ notify(body: string, channels: string[], options?: wix_crm_backend.Notifications.NotificationOptions): Promise; } namespace Notifications { /** * An object containing information about where to navigate when a notification is clicked. */ type ActionTarget = { /** * URL to navigate to when the `actionTitle` text is clicked. */ url?: string; }; /** * An object representing notification options. */ type NotificationOptions = { /** * Notification title. Only displayed on mobile and browser notifications. Max length: 512 characters. */ title?: string; /** * Call to action text to be clicked on. When clicked, navigates to the `actionTarget` URL. Max length: 512 characters. */ actionTitle?: string; /** * Where to navigate to when the `actionTitle` text is clicked. */ actionTarget?: wix_crm_backend.Notifications.ActionTarget; /** * Contributor that will receive the notifications, based on their assigned roles. * One of: * * + `"All_Contributors"`: All site contributors, including the site owner. * + `"Owner"`: Only the site owner. */ recipients?: wix_crm_backend.Notifications.SiteContributors; }; /** * An object containing information about which contributors will receive a notification. */ type SiteContributors = { /** * Roles to receive the notification. * One of: * * + `"All_Contributors"`: All site contributors (default). * + `"Owner"`: Only the site owner. */ role?: string; }; } /** * The Tasks API is used to manage a site's tasks. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Tasks.html#) */ interface Tasks { /** * Sets a task as completed. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Tasks.html#completeTask) */ completeTask(taskId: string): Promise; /** * Creates a new task. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Tasks.html#createTask) */ createTask(taskInfo: wix_crm_backend.Tasks.TaskInfo): Promise; /** * Gets a task by ID. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Tasks.html#getTask) */ getTask(taskId: string): Promise; /** * Removes an existing task. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Tasks.html#removeTask) */ removeTask(taskId: string): Promise; /** * Resets a task as not completed. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Tasks.html#resetTask) */ resetTask(taskId: string): Promise; /** * Updates the specified fields of an existing task. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Tasks.html#updateTaskFields) */ updateTaskFields(taskId: string, taskInfo: wix_crm_backend.Tasks.TaskInfo): Promise; } namespace Tasks { /** * An object representing a task. */ type Task = { /** * Unique task identifier. */ _id: string; /** * Task title. */ title: string; /** * Date the task is due. */ dueDate: Date; /** * Unique identifier of the site contact * that this task is linked to. */ contactId: string; /** * Indicates whether the task has been * completed. */ isCompleted: boolean; /** * Running task version number. Each time an * action is performed on a task its version number is incremented. */ version: number; /** * Type of the task's creator. `"USER"` * if the task was created using the site's dashboard. `"APP"` if the task was * created using the [`createTask()`](#createTask) function or if it was created * by an app installed on the site. */ creatorType: string; /** * When `creatorType` is `"USER"`, the unique * identifier of the user that created the task in the dashboard. Otherwise, `userId` is not * present. */ userId?: string; /** * When `creatorType` is `"APP"`, the unique * identifier of the application that created the task. Otherwise, `applicationId` is not * present. */ applicationId?: string; }; /** * An object representing information for creating or updating a task. */ type TaskInfo = { /** * Task title. */ title?: string; /** * Date the task is due. */ dueDate?: Date; /** * Unique identifier of the site contact * that this task is linked to. */ contactId?: string; }; } /** * The Triggered Emails API is used to send triggered emails to your site's contacts and members. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.TriggeredEmails.html#) */ interface TriggeredEmails { /** * Sends a triggered email to a contact, unless that contact is marked as unsubscribed.. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.TriggeredEmails.html#emailContact) */ emailContact(emailId: string, contactId: string, options?: wix_crm_backend.TriggeredEmails.TriggeredEmailOptions): Promise; /** * Sends a triggered email to a site member. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.TriggeredEmails.html#emailMember) */ emailMember(emailId: string, memberId: string, options?: wix_crm_backend.TriggeredEmails.TriggeredEmailOptions): Promise; } namespace TriggeredEmails { type TriggeredEmailOptions = { /** * An object with `key:value` pairs. Each * `key` is a variable in the email template created in Triggered Emails, and its * corresponding `value` is the value to insert into the template in place of the * variable. The values must be strings. * * Example: `{ firstName: 'John', lastName: 'Doe' }` */ variables: any; }; } /** * The Workflows API is used to manage your site's * [workflows](https://support.wix.com/en/article/about-workflows). * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Workflows.html#) */ interface Workflows { /** * Archives a workflow card. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Workflows.html#archiveCard) */ archiveCard(cardId: string): Promise; /** * Creates a new workflow card. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Workflows.html#createCard) */ createCard(workflowId: string, phaseId: string, card: wix_crm_backend.Workflows.Card, position?: number): Promise; /** * Creates a new workflow phase. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Workflows.html#createPhase) */ createPhase(workflowId: string, phase: wix_crm_backend.Workflows.Phase, position?: number): Promise; /** * Creates a new workflow. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Workflows.html#createWorkflow) */ createWorkflow(workflowInfo: wix_crm_backend.Workflows.WorkflowInfo): Promise; /** * Deletes a workflow card by ID. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Workflows.html#deleteCard) */ deleteCard(cardId: string): Promise; /** * Deletes a workflow phase by ID. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Workflows.html#deletePhase) */ deletePhase(phaseId: string): Promise; /** * Deletes a workflow by ID. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Workflows.html#deleteWorkflow) */ deleteWorkflow(workflowId: string): Promise; /** * Gets a workflow card by ID. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Workflows.html#getCard) */ getCard(cardId: string): Promise; /** * Gets a phase info by ID. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Workflows.html#getPhaseInfo) */ getPhaseInfo(phaseId: string): Promise; /** * Gets a workflow info by ID. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Workflows.html#getWorkflowInfo) */ getWorkflowInfo(workflowId: string): Promise; /** * Gets a list of a workflow's cards. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Workflows.html#listCards) */ listCards(workflowId: string, options?: wix_crm_backend.Workflows.ListCardOptions): Promise; /** * Gets a list of a workflow's phases. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Workflows.html#listPhasesInfo) */ listPhasesInfo(workflowId: string, options?: wix_crm_backend.Workflows.ListOptions): Promise; /** * Gets a list of the site's workflows info. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Workflows.html#listWorkflowsInfo) */ listWorkflowsInfo(options?: wix_crm_backend.Workflows.ListOptions): Promise; /** * Moves a card to a new position within a workflow. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Workflows.html#moveCard) */ moveCard(cardId: string, options: wix_crm_backend.Workflows.MoveCardOptions): Promise; /** * Moves a phase to a new position with a workflow. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Workflows.html#movePhase) */ movePhase(phaseId: string, options: wix_crm_backend.Workflows.MovePhaseOptions): Promise; /** * Restores an archived workflow card. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Workflows.html#restoreCard) */ restoreCard(cardId: string, options: wix_crm_backend.Workflows.MoveCardOptions): Promise; /** * Updates an existing workflow card. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Workflows.html#updateCardFields) */ updateCardFields(cardId: string, card: wix_crm_backend.Workflows.Card): Promise; /** * Updates an existing workflow phase. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Workflows.html#updatePhaseFields) */ updatePhaseFields(phaseId: string, phase: wix_crm_backend.Workflows.Phase): Promise; /** * Updates an existing workflow. * [Read more](https://www.wix.com/corvid/reference/wix-crm-backend.Workflows.html#updateWorkflowFields) */ updateWorkflowFields(workflowId: string, workflowInfo: wix_crm_backend.Workflows.WorkflowInfo): Promise; } namespace Workflows { /** * An object containing card information. */ type Card = { /** * Unique card identifier. */ id: string; /** * Name of the card. */ name?: string; /** * Source that created the card. * * Some possible values: * * + `"Contacts"` * + `"Corvid"` * + `"Inbox"` * + `"Invoices"` * + `"Marketplace"` * + `"Price Quotes"` * + `"Wix Forms"` */ source: string; /** * ID of the contact associated with the card. */ contactId: string; /** * Date the card was created. */ createdDate: Date; /** * Date the card was last updated. */ updatedDate: Date; /** * ID of the phase which contains the card. */ phaseId: string; }; /** * An object containing a list of cards and pagination info. */ type CardList = { /** * List of cards matching the list options. */ items: wix_crm_backend.Workflows.Card[]; /** * Number of items in the current results page. */ length: number; /** * Total number of cards in the specified workflow and phase. */ totalCount: number; /** * Number of items returned per page with the current list options. */ pageSize: number; /** * Total number of results pages. */ totalPages: number; /** * Index of the current page. Indices are zero-based. */ currentPage: number; }; /** * An object contains ListCards request data. */ type ListCardOptions = { /** * ID of phase to retrieve cards from. If omitted, will retrieve cards from all phases. Not to be used with `fetchOnlyArchived`. */ phaseId?: string; /** * Whether to retrieve only archived cards. Not to be used with `phaseId`. */ fetchOnlyArchived?: boolean; /** * Maximum number of cards to retrieve. Defaults to `50`. */ limit?: number; /** * Number of cards to skip before the retrieved items. Defaults to `0`. */ skip?: number; /** * Ordering options. */ order?: wix_crm_backend.Workflows.OrderOptions; }; /** * An object containing options used when requesting a list of workflows or phases. */ type ListOptions = { /** * Maximum number of items to retrieve. Defaults to `50` for phases and `100` for workflows. */ limit?: number; /** * Number of items to skip before the retrieved items. Defaults to `0`. */ skip?: number; /** * Ordering options. */ order?: wix_crm_backend.Workflows.OrderOptions; }; /** * An object containing information used when moving a card. */ type MoveCardOptions = { /** * ID of the phase to move the card to. If omitted, the card remains in the same phase. */ newPhaseId?: string; /** * Position within the phase to move the card to. If omitted, the card is moved to the top of the phase. */ newPosition?: number; }; /** * An object containing information used when moving a phase. */ type MovePhaseOptions = { /** * ID of the workflow to move the phase to. */ workflowId: string; /** * Position within the workflow to move the phase to. */ newPosition: number; }; /** * An object containing sort order options. */ type OrderOptions = { /** * Field to sort on. */ field: string; /** * Order of sort. Either `"asc"` or `"desc"` (defaults to `"asc"`). */ sort: string; }; /** * An object containing phase information. */ type Phase = { /** * Unique phase identifier. */ id: string; /** * Name of the phase. */ name: string; }; /** * An object containing a list of phases and pagination info. */ type PhaseList = { /** * List of phases matching the list options. */ items: wix_crm_backend.Workflows.Phase[]; /** * Number of items in the current results page. */ length: number; /** * Total number of phases in the specified workflow. */ totalCount: number; /** * Number of items returned per page with the current list options. */ pageSize: number; /** * Total number of results pages. */ totalPages: number; /** * Index of the current page. Indices are zero-based. */ currentPage: number; }; /** * An object representing a workflow. */ type Workflow = { /** * Workflow information. */ workflowInfo: wix_crm_backend.Workflows.WorkflowInfo; /** * ID of the win phase. */ winPhaseId: string; }; /** * An object containing information about a workflow. */ type WorkflowInfo = { /** * Unique workflow identifier. */ id: string; /** * Name of the workflow. */ name: string; /** * Workflow description. */ description?: string; /** * Date the workflow was created. */ createdDate?: Date; }; /** * An object containing a list of workflows and pagination info. */ type WorkflowList = { /** * List of workflows matching the list options. */ items: wix_crm_backend.Workflows.WorkflowInfo[]; /** * Number of items in the current results page. */ length: number; /** * Total number of workflows in the site. */ totalCount: number; /** * Number of items returned per page with the current list options. */ pageSize: number; /** * Total number of results pages. */ totalPages: number; /** * Index of the current page. Indices are zero-based. */ currentPage: number; }; } /** * An object that contains information about a site contact. */ type ContactInfo = { /** * Contact's first name. */ firstName?: string; /** * Contact's last name. */ lastName?: string; /** * Contact's image source. */ picture?: string; /** * List of contact's email addresses. When * creating a contact, if no phone number is * provided, at least one email address must be provided. */ emails?: string[]; /** * Email address the contact who is also * a member uses to log into the system. */ loginEmail?: string; /** * List of contact's phone numbers. When * creating a contact, if no email is * provided, at least one phone number must be provided. */ phones?: string[]; /** * List of contact's labels. [Labels](https://support.wix.com/en/article/creating-contact-labels) * are used to organize contacts. When setting the `labels` property, you can * only list labels that already exist in your site's [Contacts List](https://support.wix.com/en/article/accessing-your-contact-list). */ labels?: string[]; /** * Any * number of custom fields. [Custom fields](https://support.wix.com/en/article/adding-custom-fields-to-contacts) * are used to store additional information about your site's contacts. When * setting a custom field, use key:value pairs, where the key matches the display names * in your site's [Contacts List](https://support.wix.com/en/article/accessing-your-contact-list). * You can only set values for custom fields that already exist in the Contacts * application. */ customFields?: string | number | Date; }; /** * An object that contains contact deletion options. */ type DeleteOptions = { /** * Whether to perform the deletion when the contact is also a member. Defaults to `false`. */ deleteMembers: boolean; }; } declare namespace wix_data { /** * Hooks that can be added to wix-data operations. * [Read more](https://www.wix.com/corvid/reference/wix-data.Hooks.html#) */ interface Hooks { /** * A hook that is triggered after a `count()` operation. * [Read more](https://www.wix.com/corvid/reference/wix-data.Hooks.html#afterCount) */ afterCount(count: number, context: wix_data.Hooks.HookContext): Promise & number; /** * A hook that is triggered after a `get()` operation. * [Read more](https://www.wix.com/corvid/reference/wix-data.Hooks.html#afterGet) */ afterGet(item: any, context: wix_data.Hooks.HookContext): Promise & any; /** * A hook that is triggered after an `insert()` operation. * [Read more](https://www.wix.com/corvid/reference/wix-data.Hooks.html#afterInsert) */ afterInsert(item: any, context: wix_data.Hooks.HookContext): Promise & any; /** * A hook that is triggered after a `find` operation, for each of the items in the query results. * [Read more](https://www.wix.com/corvid/reference/wix-data.Hooks.html#afterQuery) */ afterQuery(item: any, context: wix_data.Hooks.HookContext): Promise & any; /** * A hook that is triggered after a `remove()` operation. * [Read more](https://www.wix.com/corvid/reference/wix-data.Hooks.html#afterRemove) */ afterRemove(item: any, context: wix_data.Hooks.HookContext): Promise & any; /** * A hook that is triggered after an `update()` operation. * [Read more](https://www.wix.com/corvid/reference/wix-data.Hooks.html#afterUpdate) */ afterUpdate(item: any, context: wix_data.Hooks.UpdateHookContext): Promise & any; /** * A hook that is triggered before a `count()` operation. * [Read more](https://www.wix.com/corvid/reference/wix-data.Hooks.html#beforeCount) */ beforeCount(query: wix_data.WixDataQuery, context: wix_data.Hooks.HookContext): Promise & wix_data.WixDataQuery; /** * A hook that is triggered before a `get()` operation. * [Read more](https://www.wix.com/corvid/reference/wix-data.Hooks.html#beforeGet) */ beforeGet(itemId: string, context: wix_data.Hooks.HookContext): Promise & string; /** * A hook that is triggered before an `insert()` operation. * [Read more](https://www.wix.com/corvid/reference/wix-data.Hooks.html#beforeInsert) */ beforeInsert(item: any, context: wix_data.Hooks.HookContext): Promise & any; /** * A hook that is triggered before a `find()` operation. * [Read more](https://www.wix.com/corvid/reference/wix-data.Hooks.html#beforeQuery) */ beforeQuery(query: wix_data.WixDataQuery, context: wix_data.Hooks.HookContext): Promise & wix_data.WixDataQuery; /** * A hook that is called before a `remove()` operation. * [Read more](https://www.wix.com/corvid/reference/wix-data.Hooks.html#beforeRemove) */ beforeRemove(itemId: string, context: wix_data.Hooks.UpdateHookContext): Promise & string; /** * A hook that is triggered before an `update()` operation. * [Read more](https://www.wix.com/corvid/reference/wix-data.Hooks.html#beforeUpdate) */ beforeUpdate(item: any, context: wix_data.Hooks.UpdateHookContext): Promise & any; /** * A hook that is triggered on any error or rejected Promise from any of the wix-data operations. * [Read more](https://www.wix.com/corvid/reference/wix-data.Hooks.html#onFailure) */ onFailure(error: Error, context: wix_data.Hooks.HookContext): Promise; } namespace Hooks { /** * An object that contains contextual information about the hook being called. */ type HookContext = { /** * The ID of the collection the hook affects. */ collectionName: string; /** * The current site user ID. If no user is logged in to the site it may be null. */ userId: string; /** * The permissions role of the current user. Possibilities are: `anonymous`, `siteMember`, and `siteOwner`. */ userRole: string; }; /** * An object that contains contextual information when calling the `beforeUpdate()`, `beforeRemove()`, or `afterUpdate()` hooks. */ type UpdateHookContext = { /** * The ID of the collection the hook affects. */ collectionName: string; /** * The current site user ID. If no user is logged in to the site it may be null. */ userId: string; /** * The permissions role of the current user. Possibilities are: `anonymous`, `siteMember`, and `siteOwner`. */ userRole: string; /** * The item stored in the database collection before an update or delete operation. */ currentItem: any; }; } /** * Provides functionality for performing aggregations on collection data. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataAggregate.html#) */ interface WixDataAggregate { /** * Adds a sort to an aggregation, sorting by the items or groups by the specified properties in ascending order. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataAggregate.html#ascending) */ ascending(...propertyName: string[]): wix_data.WixDataAggregate; /** * Refines a `WixDataAggregate` to only contain the average value from each aggregation group. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataAggregate.html#avg) */ avg(propertyName: string, projectedName?: string): wix_data.WixDataAggregate; /** * Refines a `WixDataAggregate` to contain the item count of each group in the aggregation. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataAggregate.html#count) */ count(): wix_data.WixDataAggregate; /** * Adds a sort to an aggregation, sorting by the items or groups by the specified properties in descending order. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataAggregate.html#descending) */ descending(...propertyName: string[]): wix_data.WixDataAggregate; /** * Filters out items from being used in an aggregation. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataAggregate.html#filter) */ filter(filter: wix_data.WixDataFilter): wix_data.WixDataAggregate; /** * Groups items together in an aggregation. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataAggregate.html#group) */ group(...propertyName: string[]): wix_data.WixDataAggregate; /** * Filters out groups from being returned from an aggregation. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataAggregate.html#having) */ having(filter: wix_data.WixDataFilter): wix_data.WixDataAggregate; /** * Limits the number of items or groups the aggregation returns. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataAggregate.html#limit) */ limit(limit: number): wix_data.WixDataAggregate; /** * Refines a `WixDataAggregate` to only contain the maximum value from each aggregation group. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataAggregate.html#max) */ max(propertyName: string, projectedName?: string): wix_data.WixDataAggregate; /** * Refines a `WixDataAggregate` to only contain the minimum value from each aggregation group. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataAggregate.html#min) */ min(propertyName: string, projectedName?: string): wix_data.WixDataAggregate; /** * Runs the aggregation and returns the results. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataAggregate.html#run) */ run(options?: wix_data.WixDataAggregate.RunOptions): Promise; /** * Sets the number of items or groups to skip before returning aggregation results. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataAggregate.html#skip) */ skip(skip: number): wix_data.WixDataAggregate; /** * Refines a `WixDataAggregate` to contain the sum from each aggregation group. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataAggregate.html#sum) */ sum(propertyName: string, projectedName?: string): wix_data.WixDataAggregate; } namespace WixDataAggregate { /** * Options to use when running an aggregation. */ type RunOptions = { /** * When `true`, prevents permission checks from running for the `run()` operation. Defaults to `false`. */ suppressAuth?: boolean; /** * When `true`, reads data from the primary database instance. * This decreases performance but ensures data retrieved is up to date even immediately after an update. * See [Wix Data and Eventual Consistency](https://www.wix.com/velo/reference/wix-data/introduction#wix-data_introduction_wix-data-and-eventual-consistency) for more information. * * Default: `false` */ consistentRead?: boolean; }; } /** * The results of an aggregation, containing the aggregated values. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataAggregateResult.html#) */ interface WixDataAggregateResult { /** * Gets the aggregated values. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataAggregateResult.html#items) */ readonly items: any[]; /** * Returns the number of values in the aggregate results. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataAggregateResult.html#length) */ readonly length: number; /** * Indicates if the aggregation has more results. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataAggregateResult.html#hasNext) */ hasNext(): boolean; /** * Retrieves the next page of aggregate results. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataAggregateResult.html#next) */ next(): Promise; } /** * Provides functionality for refining a filter. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataFilter.html#) */ interface WixDataFilter { /** * Adds an `and` condition to the query or filter. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataFilter.html#and) */ and(query: wix_data.WixDataQuery): wix_data.WixDataQuery; /** * Refines a query or filter to match items whose specified property value is within a specified range. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataFilter.html#between) */ between(propertyName: string, rangeStart: string | number | Date, rangeEnd: string | number | Date): wix_data.WixDataQuery; /** * Refines a query or filter to match items whose specified property value contains a specified string. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataFilter.html#contains) */ contains(propertyName: string, string: string): wix_data.WixDataQuery; /** * Refines a query or filter to match items whose specified property value ends with a specified string. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataFilter.html#endsWith) */ endsWith(propertyName: string, string: string): wix_data.WixDataQuery; /** * Refines a query or filter to match items whose specified property value equals the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataFilter.html#eq) */ eq(propertyName: string, value: any): wix_data.WixDataQuery; /** * Refines a query or filter to match items whose specified property value is greater than or equal to the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataFilter.html#ge) */ ge(propertyName: string, value: string | number | Date): wix_data.WixDataQuery; /** * Refines a query or filter to match items whose specified property value is greater than the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataFilter.html#gt) */ gt(propertyName: string, value: string | number | Date): wix_data.WixDataQuery; /** * Refines a query or filter to match items whose specified property values equals all of the specified `value` parameters. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataFilter.html#hasAll) */ hasAll(propertyName: string, value: string | number | Date | any[]): wix_data.WixDataQuery; /** * Refines a query or filter to match items whose specified property value equals any of the specified `value` parameters. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataFilter.html#hasSome) */ hasSome(propertyName: string, value: string | number | Date | any[]): wix_data.WixDataQuery; /** * Refines a query or filter to match items whose specified property does not exist or does not have any value. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataFilter.html#isEmpty) */ isEmpty(propertyName: string): wix_data.WixDataQuery; /** * Refines a query or filter to match items whose specified property has any value. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataFilter.html#isNotEmpty) */ isNotEmpty(propertyName: string): wix_data.WixDataQuery; /** * Refines a query or filter to match items whose specified property value is less than or equal to the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataFilter.html#le) */ le(propertyName: string, value: string | number | Date): wix_data.WixDataQuery; /** * Refines a query or filter to match items whose specified property value is less than the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataFilter.html#lt) */ lt(propertyName: string, value: string | number | Date): wix_data.WixDataQuery; /** * Refines a query or filter to match items whose specified property value does not equal the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataFilter.html#ne) */ ne(propertyName: string, value: any): wix_data.WixDataQuery; /** * Adds a `not` condition to the query or filter. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataFilter.html#not) */ not(query: wix_data.WixDataQuery): wix_data.WixDataQuery; /** * Adds an `or` condition to the query or filter. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataFilter.html#or) */ or(query: wix_data.WixDataQuery): wix_data.WixDataQuery; /** * Refines a query or filter to match items whose specified property value starts with a specified string. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataFilter.html#startsWith) */ startsWith(propertyName: string, string: string): wix_data.WixDataQuery; } /** * Contains functionality for refining a data query. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataQuery.html#) */ interface WixDataQuery extends wix_data.WixDataFilter { /** * Adds a sort to a query or sort, sorting by the specified properties in ascending order. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataQuery.html#ascending) */ ascending(...propertyName: string[]): wix_data.WixDataQuery; /** * Returns the number of items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataQuery.html#count) */ count(options?: wix_data.WixDataOptions): Promise; /** * Adds a sort to a query or sort, sorting by the specified properties in descending order. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataQuery.html#descending) */ descending(...propertyName: string[]): wix_data.WixDataQuery; /** * Returns the distinct values that match the query, without duplicates. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataQuery.html#distinct) */ distinct(propertyName: string, options?: wix_data.WixDataOptions): Promise; /** * Returns the items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataQuery.html#find) */ find(options?: wix_data.WixDataOptions): Promise; /** * Includes referenced items for the specified properties in a query's results. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataQuery.html#include) */ include(...propertyName: string[]): wix_data.WixDataQuery; /** * Limits the number of items the query returns. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataQuery.html#limit) */ limit(limit: number): wix_data.WixDataQuery; /** * Sets the number of items to skip before returning query results. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataQuery.html#skip) */ skip(skip: number): wix_data.WixDataQuery; } /** * The results of a data reference query, containing the retrieved items. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataQueryReferencedResult.html#) */ interface WixDataQueryReferencedResult { /** * Returns the items that match the reference query. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataQueryReferencedResult.html#items) */ readonly items: any[]; /** * Returns the total number of items that match the reference query. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataQueryReferencedResult.html#totalCount) */ readonly totalCount: number; /** * Indicates if the reference query has more results. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataQueryReferencedResult.html#hasNext) */ hasNext(): boolean; /** * Indicates if the reference query has previous results. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataQueryReferencedResult.html#hasPrev) */ hasPrev(): boolean; /** * Retrieves the next page of reference query results. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataQueryReferencedResult.html#next) */ next(): Promise; /** * Retrieves the previous page of reference query results. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataQueryReferencedResult.html#prev) */ prev(): Promise; } /** * The results of a data query, containing the retrieved items. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataQueryResult.html#) */ interface WixDataQueryResult { /** * Returns the index of the current results page number. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataQueryResult.html#currentPage) */ readonly currentPage: number; /** * Returns the items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataQueryResult.html#items) */ readonly items: any[]; /** * Returns the number of items in the current results page. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataQueryResult.html#length) */ readonly length: number; /** * Returns the query page size. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataQueryResult.html#pageSize) */ readonly pageSize: number; /** * Indicates if referenced items have been trimmed from the results. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataQueryResult.html#partialIncludes) */ readonly partialIncludes: boolean; /** * Returns the query used to get the current results. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataQueryResult.html#query) */ readonly query: wix_data.WixDataQuery; /** * Returns the total number of items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataQueryResult.html#totalCount) */ readonly totalCount: number; /** * Returns the total number of pages the query produced. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataQueryResult.html#totalPages) */ readonly totalPages: number; /** * Indicates if the query has more results. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataQueryResult.html#hasNext) */ hasNext(): boolean; /** * Indicates the query has previous results. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataQueryResult.html#hasPrev) */ hasPrev(): boolean; /** * Retrieves the next page of query results. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataQueryResult.html#next) */ next(): Promise; /** * Retrieves the previous page of query results. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataQueryResult.html#prev) */ prev(): Promise; } /** * Provides functionality for sorting a query. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataSort.html#) */ interface WixDataSort { /** * Adds a sort to a query or sort, sorting by the specified properties in ascending order. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataSort.html#ascending) */ ascending(...propertyName: string[]): wix_data.WixDataQuery; /** * Adds a sort to a query or sort, sorting by the specified properties in descending order. * [Read more](https://www.wix.com/corvid/reference/wix-data.WixDataSort.html#descending) */ descending(...propertyName: string[]): wix_data.WixDataQuery; } /** * An object returned by the `bulkRemove()` function. */ type WixDataBulkRemoveResult = { /** * The number of removed items. */ removed: number; /** * The number of skipped items. */ skipped: number; /** * List of IDs of removed items. */ removedItemIds: string[]; /** * List of errors. */ errors: Error[]; }; /** * An object returned by Wix Data bulk operations. */ type WixDataBulkResult = { /** * The number of inserted items. */ inserted: number; /** * The number of updated items. */ updated: number; /** * The number of skipped items. */ skipped: number; /** * List of IDs of inserted items. */ insertedItemIds: string[]; /** * List of IDs of updated items. */ updatedItemIds: string[]; /** * List of errors. */ errors: Error[]; }; /** * An object that you pass as the `options` parameter that modifies how an operation is performed. */ type WixDataOptions = { /** * Prevents [permission](https://support.wix.com/en/article/about-collection-permissions) checks from running for the operation. Defaults to `false`. Can only be used in backend code. */ suppressAuth?: boolean; /** * Prevents [hooks](https://support.wix.com/en/article/wix-code-how-to-use-data-hooks) from running for the operation. Can only be used in backend code. */ suppressHooks?: boolean; /** * Optional filters specific to querying [Wix Stores Products Collection Fields](https://support.wix.com/en/article/velo-wix-stores-products-collection-fields). */ appOptions?: wix_data.WixStoresProductQuery; /** * When `true`, reads data from the primary database instance. * This decreases performance but ensures data retrieved is up to date even immediately after an update. * See [Wix Data and Eventual Consistency](https://www.wix.com/velo/reference/wix-data/introduction#wix-data_introduction_wix-data-and-eventual-consistency) for more information. * * Default: `false` */ consistentRead?: boolean; }; /** * An object for controlling the order of returned referenced items. */ type WixDataQueryReferencedOptions = { /** * Order of the returned referenced items. Sorted by the date each item was referenced. * * Supported values: * - `'asc'`: Ascending * - `'desc'`: Descending */ order?: string; /** * Prevents [permission](https://support.wix.com/en/article/about-collection-permissions) checks from running for the operation. Defaults to `false`. Can only be used in backend code. */ suppressAuth?: boolean; /** * When `true`, reads data from the primary database instance. * This decreases performance but ensures data retrieved is up to date even immediately after an update. * See [Wix Data and Eventual Consistency](https://www.wix.com/velo/reference/wix-data/introduction#wix-data_introduction_wix-data-and-eventual-consistency) for more information. * * Default: `false` */ consistentRead?: boolean; }; /** * An object that you pass as the `options.appOptions` parameter that allows for Wix Stores/Products query specificity. */ type WixStoresProductQuery = { /** * Whether to include product variants in the query. Default is `false`. */ includeVariants?: boolean; /** * Whether to include [hidden products](https://support.wix.com/en/article/wix-stores-changing-the-visibility-of-a-product) in the query. Default is `false`. */ includeHiddenProducts?: boolean; }; } declare namespace wix_ecom_backend { /** * [Read more](https://www.wix.com/corvid/reference/wix-ecom-backend.Cart.html#) */ interface Cart { /** * Adds catalog line items and/or custom line items to a cart. * [Read more](https://www.wix.com/corvid/reference/wix-ecom-backend.Cart.html#addToCart) */ addToCart(_id: string, options: wix_ecom_backend.Cart.AddToCartOptions): Promise; /** * Creates a new cart. * [Read more](https://www.wix.com/corvid/reference/wix-ecom-backend.Cart.html#createCart) */ createCart(options: wix_ecom_backend.Cart.CreateCartOptions): Promise; /** * Creates a checkout from the current site visitor’s cart. * [Read more](https://www.wix.com/corvid/reference/wix-ecom-backend.Cart.html#createCheckout) */ createCheckout(_id: string, options: wix_ecom_backend.Cart.CreateCheckoutOptions): Promise; /** * Deletes a cart. * [Read more](https://www.wix.com/corvid/reference/wix-ecom-backend.Cart.html#deleteCart) */ deleteCart(_id: string): Promise; /** * Estimates the subtotal and total for current site visitor’s cart. Totals include tax and are based on the selected carrier service, shipping address, and billing information. * [Read more](https://www.wix.com/corvid/reference/wix-ecom-backend.Cart.html#estimateTotals) */ estimateTotals(_id: string, options: wix_ecom_backend.Cart.EstimateTotalsOptions): Promise; /** * Retrieves a cart. * [Read more](https://www.wix.com/corvid/reference/wix-ecom-backend.Cart.html#getCart) */ getCart(_id: string): Promise; /** * Removes the coupon from a specified cart. * [Read more](https://www.wix.com/corvid/reference/wix-ecom-backend.Cart.html#removeCoupon) */ removeCoupon(_id: string): Promise; /** * Removes line items from the specified cart. * [Read more](https://www.wix.com/corvid/reference/wix-ecom-backend.Cart.html#removeLineItems) */ removeLineItems(_id: string, lineItemIds: Array): Promise; /** * Updates a specified cart's properties. * [Read more](https://www.wix.com/corvid/reference/wix-ecom-backend.Cart.html#updateCart) */ updateCart(_id: string, options: wix_ecom_backend.Cart.UpdateCartOptions): Promise; /** * Updates the quantity of one or more line items in a specified cart. * [Read more](https://www.wix.com/corvid/reference/wix-ecom-backend.Cart.html#updateLineItemsQuantity) */ updateLineItemsQuantity(_id: string, lineItems: Array): Promise; } namespace Cart { type ActionEvent = { bodyAsJson?: string; }; type AddToCartOptions = { /** * Custom line items. */ customLineItems?: Array; /** * Catalog line items. */ lineItems?: Array; }; type AddToCartRequest = { /** * Cart ID. */ _id: string; /** * Custom line items. */ customLineItems?: Array; /** * Catalog line items. */ lineItems?: Array; }; type AddToCartResponse = { /** * Updated cart. */ cart?: wix_ecom_backend.Cart.Cart; }; type AddToCurrentCartRequest = { /** * Custom line items. */ customLineItems?: Array; /** * Catalog line items. */ lineItems?: Array; }; type AdditionalFee = { /** * Additional fee's unique code (or ID) for future processing */ code?: string; /** * Translated additional fee's name */ name?: string; /** * Additional fee's price */ price?: wix_ecom_backend.Cart.MultiCurrencyPrice; /** * Provider's app id */ providerAppId?: string; /** * Tax details */ taxDetails?: wix_ecom_backend.Cart.ItemTaxFullDetails; }; type Address = { /** * Main address line (usually street name and number). */ addressLine1?: string; /** * Free text providing more detailed address info. Usually contains apt, suite, floor. */ addressLine2?: string; /** * City name. */ city?: string; /** * Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format. */ country?: string; /** * Postal or zip code. */ postalCode?: string; /** * Street address object, with number, name, and apartment number in separate fields. */ streetAddress?: wix_ecom_backend.Cart.StreetAddress; /** * Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format. */ subdivision?: string; }; type AddressLocation = { /** * Address latitude. */ latitude?: number; /** * Address longitude. */ longitude?: number; }; type AddressWithContact = { /** * Address. */ address?: wix_ecom_backend.Cart.Address; /** * Contact details. */ contactDetails?: wix_ecom_backend.Cart.ApiFullAddressContactDetails; }; type ApiFullAddressContactDetails = { /** * Company name. */ company?: string; /** * First name. */ firstName?: string; /** * Last name. */ lastName?: string; /** * Phone number. */ phone?: string; /** * Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set - UNSPECIFIED is not allowed. */ vatId?: wix_ecom_backend.Cart.VatId; }; type ApplicationError = { code?: string; data?: Object; description?: string; }; type AppliedCoupon = { /** * Coupon code */ code?: string; /** * Converted discount value */ convertedDiscountValue?: string; /** * Coupon internal ID */ couponId?: string; /** * Type (e.g., moneyOff, percentOff) */ couponType?: string; /** * Discount value */ discountValue?: string; /** * Coupon name */ name?: string; }; type AppliedDiscount = { /** * Coupon details. */ coupon?: wix_ecom_backend.Cart.V1Coupon; /** * Discount rule */ discountRule?: wix_ecom_backend.Cart.DiscountRule; /** * Discount type. */ discountType?: string; /** * IDs of the line items the discount applies to. */ lineItemIds?: Array; /** * Merchant discount. */ merchantDiscount?: wix_ecom_backend.Cart.V1MerchantDiscount; }; type AppliedDiscountDiscountSourceOneOf = { /** * Coupon details. */ coupon?: wix_ecom_backend.Cart.V1Coupon; /** * Discount rule */ discountRule?: wix_ecom_backend.Cart.DiscountRule; /** * Merchant discount. */ merchantDiscount?: wix_ecom_backend.Cart.V1MerchantDiscount; }; type AutoTaxFallbackCalculationDetails = { /** * invalid request (i.e. address), timeout, internal error, license error, and others will be encoded here */ error?: wix_ecom_backend.Cart.ApplicationError; /** * Reason for fallback. Supported values: * + `"AUTO_TAX_FAILED"` * + `"AUTO_TAX_DEACTIVATED"` */ fallbackReason?: string; }; type BuyerDetails = { /** * Email address */ email?: string; /** * Customer's first name */ firstName?: string; /** * Customer's last name */ lastName?: string; /** * Phone number */ phone?: string; }; type BuyerInfo = { /** * Contact ID. Auto-created if one does not yet exist. For more information, see the [Contacts API](https://www.wix.com/velo/reference/wix-crm-backend/contacts/introduction). */ contactId?: string; /** * Member ID - if the buyer is a site member. */ memberId?: string; /** * User ID - if the cart owner is a Wix user. */ userId?: string; /** * Visitor ID - if the buyer is **not** a site member. */ visitorId?: string; }; type BuyerInfoIdOneOf = { /** * Member ID - if the buyer is a site member. */ memberId?: string; /** * User ID - if the cart owner is a Wix user. */ userId?: string; /** * Visitor ID - if the buyer is **not** a site member. */ visitorId?: string; }; type CalculatedLineItem = { /** * Line item ID. */ lineItemId?: string; /** * Type of selected payment option for current item. Defaults to `"FULL_PAYMENT_ONLINE"`. * + `"FULL_PAYMENT_ONLINE"` - The entire payment for this item happens as part of the checkout. * + `"FULL_PAYMENT_OFFLINE"` - The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods. * + `"MEMBERSHIP"` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` will be 0. */ paymentOption?: string; /** * Price breakdown for this line item. */ pricesBreakdown?: wix_ecom_backend.Cart.LineItemPricesData; }; type CalculationErrors = { /** * Carrier errors. */ carrierErrors?: wix_ecom_backend.Cart.CarrierErrors; /** * Coupon calculation error. */ couponCalculationError?: wix_ecom_backend.Cart.Details; /** * Discount Rule calculation error. */ discountsCalculationError?: wix_ecom_backend.Cart.Details; /** * General shipping calculation error. */ generalShippingCalculationError?: wix_ecom_backend.Cart.Details; /** * Gift card calculation error. */ giftCardCalculationError?: wix_ecom_backend.Cart.Details; /** * Membership payment methods calculation errors * For example, will indicate that a line item that must be paid with membership payment doesn't have one or selected memberships are invalid */ membershipError?: wix_ecom_backend.Cart.Details; /** * Order validation errors. */ orderValidationErrors?: Array; /** * Tax calculation error. */ taxCalculationError?: wix_ecom_backend.Cart.Details; }; type CalculationErrorsShippingCalculationErrorOneOf = { /** * Carrier errors. */ carrierErrors?: wix_ecom_backend.Cart.CarrierErrors; /** * General shipping calculation error. */ generalShippingCalculationError?: wix_ecom_backend.Cart.Details; }; type CarrierError = { /** * Carrier ID. */ carrierId?: string; /** * Error details. */ error?: wix_ecom_backend.Cart.Details; }; type CarrierErrors = { /** * Carrier errors. */ errors?: Array; }; type CarrierServiceOption = { /** * Carrier ID. */ carrierId?: string; /** * Shipping options offered by this carrier for this request. */ shippingOptions?: Array; }; type Cart = { /** * Date and time the cart was created. */ _createdDate?: Date; /** * Cart ID. */ _id?: string; /** * Date and time the cart was updated. */ _updatedDate?: Date; /** * Cart discounts. */ appliedDiscounts?: Array; /** * Buyer information. */ buyerInfo?: wix_ecom_backend.Cart.BuyerInfo; /** * Language for communication with the buyer. Defaults to the site language. * For a site that supports multiple languages, this is the language the buyer selected. */ buyerLanguage?: string; /** * [Buyer note](https://support.wix.com/en/article/wix-stores-viewing-buyer-notes) left by the customer. */ buyerNote?: string; /** * ID of the checkout related to this cart. */ checkoutId?: string; /** * Contact info. */ contactInfo?: wix_ecom_backend.Cart.AddressWithContact; /** * All the converted prices are presented in this currency. */ conversionCurrency?: string; /** * Currency used for pricing. */ currency?: string; /** * Line items. */ lineItems?: Array; /** * Site language in which original values are shown. */ siteLanguage?: string; /** * Whether tax is included in line item prices. */ taxIncludedInPrices?: boolean; /** * Weight measurement unit - defaults to site's weight unit. Supported values: * + `"KG"` * + `"LB"` */ weightUnit?: string; }; type CartAddress = { /** * Address */ address?: wix_ecom_backend.Cart.CommonAddress; /** * Contact details */ contactDetails?: wix_ecom_backend.Cart.FullAddressContactDetails; }; type CartCompletedEvent = { /** * Coupon applied to this cart */ appliedCoupon?: wix_ecom_backend.Cart.AppliedCoupon; /** * Customer's billing address */ billingAddress?: wix_ecom_backend.Cart.CartAddress; /** * Customer's Wix ID */ buyerInfo?: wix_ecom_backend.Cart.V1BuyerInfo; /** * Message from the customer */ buyerNote?: string; cartId?: string; /** * Time the cart was created */ completedTime?: Date; /** * Currency used for pricing in this store */ currency?: wix_ecom_backend.Cart.Currency; /** * Cart shipping information */ shippingInfo?: wix_ecom_backend.Cart.ShippingInfo; /** * Totals for order's line items */ totals?: wix_ecom_backend.Cart.Totals; /** * Weight measurement unit - defaults to site's weight unit. Supported values: * + `"KG"` * + `"LB"` */ weightUnit?: string; }; type CartDiscount = { /** * Coupon details. */ coupon?: wix_ecom_backend.Cart.Coupon; /** * Merchant discount. */ merchantDiscount?: wix_ecom_backend.Cart.MerchantDiscount; }; type CartDiscountDiscountSourceOneOf = { /** * Coupon details. */ coupon?: wix_ecom_backend.Cart.Coupon; /** * Merchant discount. */ merchantDiscount?: wix_ecom_backend.Cart.MerchantDiscount; }; type CatalogReference = { /** * App ID of the catalog the item comes from. For example, the Wix Stores `appId` is `"1380b703-ce81-ff05-f115-39571d94dfcd"`. */ appId?: string; /** * ID of the item within its catalog. For example, `productId` for Wix Stores. */ catalogItemId?: string; /** * Additional info in key:value form. For example, for a product variant from Wix Stores Catalog, `options` field would hold something like one of the following: * + `{"Size": "M", "Color": "Red"}` * + `{"variantId": ""}`. */ options?: Object; }; type Color = { /** * HEX or RGB color code for display. */ code?: string; /** * Description line color name in site's default language. */ original?: string; /** * Description line color name translated into buyer's language. Defaults to `original` when not defined. */ translated?: string; }; type CommonAddress = { /** * Main address line, usually street and number as free text. */ addressLine?: string; /** * Main address line, usually street and number as free text. */ addressLine1?: string; /** * Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */ addressLine2?: string; /** * City name. */ city?: string; /** * Country code. */ country?: string; /** * Zip/postal code. */ postalCode?: string; /** * Street name and number. */ streetAddress?: wix_ecom_backend.Cart.StreetAddress; /** * Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */ subdivision?: string; }; type CommonAddressStreetOneOf = { /** * Main address line, usually street and number as free text. */ addressLine?: string; /** * Street name and number. */ streetAddress?: wix_ecom_backend.Cart.StreetAddress; }; type Coupon = { /** * Coupon ID. */ _id?: string; /** * Coupon code. */ code?: string; }; type CreateCartOptions = { /** * Cart info. */ cartInfo?: wix_ecom_backend.Cart.Cart; /** * The code of an existing coupon to apply to the cart. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */ couponCode?: string; /** * Custom line items. */ customLineItems?: Array; /** * Catalog line items. */ lineItems?: Array; /** * Merchant discounts to apply to specific line items. If no `lineItemIds` are passed, the discount will apply to the whole cart. */ merchantDiscounts?: Array; }; type CreateCartRequest = { /** * Cart info. */ cartInfo?: wix_ecom_backend.Cart.Cart; /** * The code of an existing coupon to apply to the cart. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */ couponCode?: string; /** * Custom line items. */ customLineItems?: Array; /** * Catalog line items. */ lineItems?: Array; /** * Merchant discounts to apply to specific line items. If no `lineItemIds` are passed, the discount will apply to the whole cart. */ merchantDiscounts?: Array; }; type CreateCartResponse = { /** * Cart. */ cart?: wix_ecom_backend.Cart.Cart; }; type CreateCheckoutFromCurrentCartRequest = { /** * Billing address. Used for calculating tax if all the items in the cart are not shippable. */ billingAddress?: wix_ecom_backend.Cart.Address; /** * Sales channel type. Supported values: * + `"AMAZON"` * + `"BACKOFFICE_MERCHANT"` * + `"EBAY"` * + `"OTHER_PLATFORM"` * + `"POS"` * + `"WEB"` * + `"WISH"` * + `"WIX_APP_STORE"` * + `"WIX_INVOICES"` */ channelType?: string; /** * Mandatory when setting a billing or shipping address if the site visitor isn't logged in. */ email?: string; /** * Selected shipping option. */ selectedShippingOption?: wix_ecom_backend.Cart.SelectedShippingOption; /** * Shipping address. Used for calculating tax and shipping (when applicable). */ shippingAddress?: wix_ecom_backend.Cart.Address; }; type CreateCheckoutOptions = { /** * Billing address. Used for calculating tax if all the items in the cart are not shippable. */ billingAddress?: wix_ecom_backend.Cart.Address; /** * Sales channel type. Supported values: * + `"AMAZON"` * + `"BACKOFFICE_MERCHANT"` * + `"EBAY"` * + `"OTHER_PLATFORM"` * + `"POS"` * + `"WEB"` * + `"WISH"` * + `"WIX_APP_STORE"` * + `"WIX_INVOICES"` */ channelType?: string; /** * Mandatory when setting a billing or shipping address if the site visitor isn't logged in. */ email?: string; /** * Selected shipping option. */ selectedShippingOption?: wix_ecom_backend.Cart.SelectedShippingOption; /** * Shipping address. Used for calculating tax and shipping (when applicable). */ shippingAddress?: wix_ecom_backend.Cart.Address; }; type CreateCheckoutRequest = { /** * Cart ID. */ _id: string; /** * Billing address. Used for calculating tax if all the items in the cart are not shippable. */ billingAddress?: wix_ecom_backend.Cart.Address; /** * Sales channel type. Supported values: * + `"AMAZON"` * + `"BACKOFFICE_MERCHANT"` * + `"EBAY"` * + `"OTHER_PLATFORM"` * + `"POS"` * + `"WEB"` * + `"WISH"` * + `"WIX_APP_STORE"` * + `"WIX_INVOICES"` */ channelType?: string; /** * Mandatory when setting a billing or shipping address if the site visitor isn't logged in. */ email?: string; /** * Selected shipping option. */ selectedShippingOption?: wix_ecom_backend.Cart.SelectedShippingOption; /** * Shipping address. Used for calculating tax and shipping (when applicable). */ shippingAddress?: wix_ecom_backend.Cart.Address; }; type CreateCheckoutResponse = { /** * The newly created checkout's ID. */ checkoutId?: string; }; type Currency = { /** * Currency code */ code?: string; /** * Currency symbol */ symbol?: string; }; type CustomLineItem = { /** * Custom line item ID. Defaults to an auto-generated ID. */ _id?: string; /** * Custom line item description lines. Used for displaying the cart, checkout and order. */ descriptionLines?: Array; /** * Custom line item media. Supported formats: * + Link to an image/video from the [Wix Media Manager](https://support.wix.com/en/article/wix-media-about-the-media-manager) - `"wix:image://v1/3c76e2_c53...4ea4~mv2.jpg#originWidth=1000&originHeight=1000"`. * + An image from the web - `"http(s)://"`. */ media?: string; /** * Custom line item name. */ name?: string; /** * Custom line item price. */ price?: string; /** * Custom line item quantity. */ quantity?: number; }; type DeleteCartRequest = { /** * ID of the cart to delete. */ _id: string; }; type DeleteCartResponse = {}; type DeleteCurrentCartRequest = {}; type DeliveryLogistics = { /** * Expected delivery time, in free text. For example, "3-5 business days". */ deliveryTime?: string; /** * Instructions for caller, e.g for pickup: "Please deliver during opening hours, and please don't park in disabled parking spot". */ instructions?: string; /** * Pickup details. */ pickupDetails?: wix_ecom_backend.Cart.PickupDetails; }; type Description = { /** * Subscription option description. */ original?: string; /** * Translated subscription option name. */ translated?: string; }; type DescriptionLine = { /** * Description line color value. */ colorInfo?: wix_ecom_backend.Cart.Color; /** * Description line name. */ name?: wix_ecom_backend.Cart.DescriptionLineName; /** * Description line plain text value. */ plainText?: wix_ecom_backend.Cart.PlainTextValue; }; type DescriptionLineDescriptionLineValueOneOf = {}; type DescriptionLineName = { /** * Description line name in site's default language. */ original?: string; /** * Description line name translated into buyer's language. Defaults to `original` when not defined. */ translated?: string; }; type DescriptionLineValueOneOf = { /** * Description line color value. */ colorInfo?: wix_ecom_backend.Cart.Color; /** * Description line plain text value. */ plainText?: wix_ecom_backend.Cart.PlainTextValue; }; type Details = { applicationError?: wix_ecom_backend.Cart.ApplicationError; /** * Deprecated in APIs. Used to enable migration from rendering arbitrary tracing to rest response. */ tracing?: Record; validationError?: wix_ecom_backend.Cart.ValidationError; }; type DetailsKindOneOf = { applicationError?: wix_ecom_backend.Cart.ApplicationError; validationError?: wix_ecom_backend.Cart.ValidationError; }; type DiscountRule = { /** * Discount rule ID */ _id?: string; /** * Discount value. */ amount?: wix_ecom_backend.Cart.MultiCurrencyPrice; /** * Discount rule name */ name?: wix_ecom_backend.Cart.DiscountRuleName; }; type DiscountRuleName = { /** * Original discount rule name (in site's default language). */ original?: string; /** * Discount rule name translated into buyer's language. Defaults to `original` when not defined. */ translated?: string; }; type DomainEvent = { /** * random GUID so clients can tell if event was already handled */ _id?: string; actionEvent?: wix_ecom_backend.Cart.ActionEvent; createdEvent?: wix_ecom_backend.Cart.EntityCreatedEvent; deletedEvent?: wix_ecom_backend.Cart.EntityDeletedEvent; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * Assuming that all messages including Actions have id * Example: The id of the specific order, the id of a specific campaign */ entityId?: string; /** * The time of the event. Useful if there was a delay in dipatching */ eventTime?: Date; extendedFieldsUpdatedEvent?: wix_ecom_backend.Cart.ExtendedFieldsUpdatedEvent; /** * If present, indicates the action that triggered the event. */ originatedFrom?: string; /** * This is top level to ease client code dipatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** * A field that should be set if this event was triggered by an anonymize request. * For example you must set it to true when sending an event as a result of a GDPR right to be forgotten request. * NOTE: This field is not relevant for `EntityCreatedEvent` but is located here for better ergonomics of consumers. */ triggeredByAnonymizeRequest?: boolean; updatedEvent?: wix_ecom_backend.Cart.EntityUpdatedEvent; }; type DomainEventBodyOneOf = { actionEvent?: wix_ecom_backend.Cart.ActionEvent; createdEvent?: wix_ecom_backend.Cart.EntityCreatedEvent; deletedEvent?: wix_ecom_backend.Cart.EntityDeletedEvent; extendedFieldsUpdatedEvent?: wix_ecom_backend.Cart.ExtendedFieldsUpdatedEvent; updatedEvent?: wix_ecom_backend.Cart.EntityUpdatedEvent; }; type Empty = {}; type EntityCreatedEvent = { entityAsJson?: string; }; type EntityDeletedEvent = {}; type EntityUpdatedEvent = { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; }; type EstimateCurrentCartTotalsRequest = { /** * Billing address. Used for calculating tax if all the items in the cart are not shippable. */ billingAddress?: wix_ecom_backend.Cart.Address; /** * The selected membership payment options and which line items they apply to. */ selectedMemberships?: wix_ecom_backend.Cart.SelectedMemberships; /** * Selected shipping option. */ selectedShippingOption?: wix_ecom_backend.Cart.SelectedShippingOption; /** * Shipping address. Used for calculating tax and shipping (when applicable). */ shippingAddress?: wix_ecom_backend.Cart.Address; }; type EstimateTotalsOptions = { /** * Billing address. Used for calculating tax if all the items in the cart are not shippable. */ billingAddress?: wix_ecom_backend.Cart.Address; /** * The selected membership payment options and which line items they apply to. */ selectedMemberships?: wix_ecom_backend.Cart.SelectedMemberships; /** * Selected shipping option. */ selectedShippingOption?: wix_ecom_backend.Cart.SelectedShippingOption; /** * Shipping address. Used for calculating tax and shipping (when applicable). */ shippingAddress?: wix_ecom_backend.Cart.Address; }; type EstimateTotalsRequest = { /** * Cart ID. */ _id: string; /** * Billing address. Used for calculating tax if all the items in the cart are not shippable. */ billingAddress?: wix_ecom_backend.Cart.Address; /** * The selected membership payment options and which line items they apply to. */ selectedMemberships?: wix_ecom_backend.Cart.SelectedMemberships; /** * Selected shipping option. */ selectedShippingOption?: wix_ecom_backend.Cart.SelectedShippingOption; /** * Shipping address. Used for calculating tax and shipping (when applicable). */ shippingAddress?: wix_ecom_backend.Cart.Address; }; type EstimateTotalsResponse = { /** * Additional fees */ additionalFees?: Array; /** * Applied discounts. */ appliedDiscounts?: Array; /** * Calculated line items. */ calculatedLineItems?: Array; /** * Calculation errors. */ calculationErrors?: wix_ecom_backend.Cart.CalculationErrors; /** * Cart. */ cart?: wix_ecom_backend.Cart.Cart; /** * Currency used for pricing in this store. */ currency?: string; /** * Applied gift card. */ giftCard?: wix_ecom_backend.Cart.GiftCard; /** * Information about valid and invalid memberships, and which ones are selected for usage. */ membershipOptions?: wix_ecom_backend.Cart.MembershipOptions; /** * Remaining amount for the order to be fully paid. */ payLater?: wix_ecom_backend.Cart.PriceSummary; /** * Minimal amount to pay in order to place the order. */ payNow?: wix_ecom_backend.Cart.PriceSummary; /** * Price summary. */ priceSummary?: wix_ecom_backend.Cart.PriceSummary; /** * Shipping information. */ shippingInfo?: wix_ecom_backend.Cart.ShippingInformation; /** * Tax summary. */ taxSummary?: wix_ecom_backend.Cart.TaxSummary; /** * Weight measurement unit - defaults to site's weight unit. Supported values: * + `"KG"` * + `"LB"` */ weightUnit?: string; }; type ExtendedFieldsUpdatedEvent = { currentEntityAsJson?: string; }; type FieldViolation = { data?: Object; description?: string; field?: string; /** * applicable when violated_rule=OTHER */ ruleName?: string; /** * Suppoerted values: * - `'DECIMAL_GT'` * - `'DECIMAL_GTE'` * - `'DECIMAL_LT'` * - `'DECIMAL_LTE'` * - `'DECIMAL_MAX_SCALE'` * - `'FORMAT'` * - `'INVALID_ENUM_VALUE'` * - `'MAX'` * - `'MAX_LENGTH'` * - `'MAX_SIZE'` * - `'MIN'` * - `'MIN_LENGTH'` * - `'MIN_SIZE'` * - `'OTHER'` * - `'REQUIRED_FIELD'` * - `'VALIDATION'` */ violatedRule?: string; }; type FullAddressContactDetails = { /** * Contact's company */ company?: string; /** * Email associated with the address */ email?: string; /** * Contact first name */ firstName?: string; /** * Contact last name */ lastName?: string; /** * Contact phone number */ phone?: string; /** * tax info (Currently usable only in Brazil) */ vatId?: wix_ecom_backend.Cart.VatId; }; type GetCartByCheckoutIdRequest = { /** * Checkout ID. */ _id: string; }; type GetCartByCheckoutIdResponse = { /** * The requested cart. */ cart?: wix_ecom_backend.Cart.Cart; }; type GetCartRequest = { /** * ID of the cart to retrieve. */ _id: string; }; type GetCartResponse = { /** * The requested cart. */ cart?: wix_ecom_backend.Cart.Cart; }; type GetCurrentCartRequest = {}; type GetCurrentCartResponse = { /** * Current session's active cart. */ cart?: wix_ecom_backend.Cart.Cart; }; type GiftCard = { /** * Gift Card ID. */ _id?: string; /** * Gift card value. */ amount?: wix_ecom_backend.Cart.MultiCurrencyPrice; /** * App ID of the gift card provider. */ appId?: string; /** * Gift card obfuscated code. */ obfuscatedCode?: string; }; type Group = { /** * Item ID (when the coupon scope is limited to just one item). */ entityId?: string; /** * Coupon scope's group (e.g., product or collection in Wix Stores). See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values). */ name?: string; }; type InvalidMembership = { /** * Membership details. */ membership?: wix_ecom_backend.Cart.Membership; /** * Reason why this membership is invalid and cannot be used. */ reason?: string; }; type ItemAvailabilityInfo = { /** * Quantity available. */ quantityAvailable?: number; /** * Item availability status. */ status?: string; }; type ItemTaxFullDetails = { /** * If breakdown exists, the sum of rates in the breakdown must equal `tax_rate`. */ rateBreakdown?: Array; /** * Tax rate %, as a decimal point between 0 and 1. */ taxRate?: string; /** * Amount for which tax is calculated. */ taxableAmount?: wix_ecom_backend.Cart.MultiCurrencyPrice; /** * Calculated tax, based on `taxable_amount` and `tax_rate`. */ totalTax?: wix_ecom_backend.Cart.MultiCurrencyPrice; }; type ItemType = { /** * Custom item type. */ custom?: string; /** * Preset item type. */ preset?: string; }; type ItemTypeItemTypeDataOneOf = { /** * Custom item type. */ custom?: string; /** * Preset item type. */ preset?: string; }; type LineItem = { /** * Line item ID. */ _id?: string; /** * Item availability details. */ availability?: wix_ecom_backend.Cart.ItemAvailabilityInfo; /** * Catalog and item reference. Holds IDs for the item and the catalog it came from, as well as further optional info. */ catalogReference?: wix_ecom_backend.Cart.CatalogReference; /** * Line item description lines. Used for displaying the cart, checkout and order. */ descriptionLines?: Array; /** * Item price **before** catalog-defined discount. Defaults to `price` when not provided. */ fullPrice?: wix_ecom_backend.Cart.MultiCurrencyPrice; /** * Line item image details. */ image?: string; /** * Item type. Either a preset type or custom. */ itemType?: wix_ecom_backend.Cart.ItemType; /** * Type of selected payment option for current item. Defaults to `"FULL_PAYMENT_ONLINE"`. * + `"FULL_PAYMENT_ONLINE"` - The entire payment for this item happens as part of the checkout. * + `"FULL_PAYMENT_OFFLINE"` - The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods. * + `"MEMBERSHIP"` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` will be 0. */ paymentOption?: string; /** * Physical properties of the item. When relevant, contains information such as SKU, item weight, and shippability. */ physicalProperties?: wix_ecom_backend.Cart.PhysicalProperties; /** * Item price **after** catalog-defined discount and line item discounts. */ price?: wix_ecom_backend.Cart.MultiCurrencyPrice; /** * Item price **before** line item discounts and **after** catalog-defined discount. Defaults to `price` when not provided. */ priceBeforeDiscounts?: wix_ecom_backend.Cart.MultiCurrencyPrice; /** * Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". */ priceDescription?: wix_ecom_backend.Cart.PriceDescription; /** * Item name. * + Stores - `product.name` * + Bookings - `service.info.name` * + Events - `ticket.name` */ productName?: wix_ecom_backend.Cart.ProductName; /** * Item quantity. */ quantity?: number; /** * In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID. * + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID. * + in most cases, this field is the name as `catalogReference.catalogItemId`. * + Used in membership validation. */ rootCatalogItemId?: string; /** * Service properties. When relevant, this contains information such as date and number of participants. */ serviceProperties?: wix_ecom_backend.Cart.ServiceProperties; /** * URL to the item's page on the site. */ url?: string; }; type LineItemPricesData = { /** * Total price **after** catalog-defined discount and line item discounts. */ lineItemPrice?: wix_ecom_backend.Cart.MultiCurrencyPrice; /** * Catalog price after catalog discount and automatic discounts. */ price?: wix_ecom_backend.Cart.MultiCurrencyPrice; /** * Item price **before** line item discounts and **after** catalog-defined discount. Defaults to `price` when not provided. */ priceBeforeDiscounts?: wix_ecom_backend.Cart.MultiCurrencyPrice; /** * Tax details. */ taxDetails?: wix_ecom_backend.Cart.ItemTaxFullDetails; /** * Total discount for all line items. */ totalDiscount?: wix_ecom_backend.Cart.MultiCurrencyPrice; /** * Total price after discounts and after tax. */ totalPriceAfterTax?: wix_ecom_backend.Cart.MultiCurrencyPrice; /** * Deprecated - please use `total_price_after_tax` minus `tax_details.total_tax` instead. */ totalPriceBeforeTax?: wix_ecom_backend.Cart.MultiCurrencyPrice; }; type LineItemQuantityUpdate = { /** * Line item ID. */ _id?: string; /** * New quantity. Number must 1 or higher. */ quantity?: number; }; type Membership = { /** * Membership ID. */ _id?: string; /** * Additional data about this membership. */ additionalData?: Object; /** * ID of the application providing this payment option. */ appId?: string; /** * Optional - For a membership that has limited credits, information about credit usage. */ credits?: wix_ecom_backend.Cart.MembershipPaymentCredits; /** * Optional - TMembership expiry date. */ expirationDate?: Date; /** * Line item IDs which are "paid" for by this membership. */ lineItemIds?: Array; /** * The name of this membership. */ name?: wix_ecom_backend.Cart.MembershipName; }; type MembershipName = { /** * The name of this membership */ original?: string; /** * Membership name translated into buyer's language. Defaults to `original` when not defined. */ translated?: string; }; type MembershipOptions = { /** * List of payment options that can be used. */ eligibleMemberships?: Array; /** * List of payment options that are owned by the member, but cannot be used due to reason provided. */ invalidMemberships?: Array; /** * The selected membership payment options and which line items they apply to. */ selectedMemberships?: Array; }; type MembershipPaymentCredits = { /** * How much credit remained for this membership */ remaining?: number; /** * How much credit this membership has in total */ total?: number; }; type MerchantDiscount = { /** * Discount value. */ amount?: wix_ecom_backend.Cart.MultiCurrencyPrice; }; type MerchantDiscountInput = { /** * Discount amount. */ amount?: string; /** * IDs of the line items the discount applies to. */ lineItemIds?: Array; }; type MultiCurrencyPrice = { /** * Amount. */ amount?: string; /** * Converted amount. */ convertedAmount?: string; /** * Amount formatted with currency symbol. */ formattedAmount?: string; /** * Converted amount formatted with currency symbol. */ formattedConvertedAmount?: string; }; type OtherCharge = { /** * Price of added cost. */ price?: wix_ecom_backend.Cart.MultiCurrencyPrice; /** * Type of additional cost. */ type?: string; }; type PhysicalProperties = { /** * Whether this line item is shippable. */ shippable?: boolean; /** * Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku). */ sku?: string; /** * Line item weight. Measurement unit is taken from `order.weightUnit`. Supported values: * + `"KG"` * + `"LB"` */ weight?: number; }; type PickupDetails = { /** * Pickup address. */ address?: wix_ecom_backend.Cart.Address; /** * Whether the pickup address is that of a business - this may effect tax calculation. */ businessLocation?: boolean; /** * Pickup method */ pickupMethod?: string; }; type PlainTextValue = { /** * Description line plain text value in site's default language. */ original?: string; /** * Description line plain text value translated into buyer's language. Defaults to `original` when not defined. */ translated?: string; }; type PriceDescription = { /** * **Required** - Original price description (in site's default language). */ original?: string; /** * Product name translated into buyer's language. Defaults to `original` when not defined. */ translated?: string; }; type PriceSummary = { /** * Total additional fees price. */ additionalFees?: wix_ecom_backend.Cart.MultiCurrencyPrice; /** * Total calculated discount value. */ discount?: wix_ecom_backend.Cart.MultiCurrencyPrice; /** * Total shipping price, before discounts and before tax. */ shipping?: wix_ecom_backend.Cart.MultiCurrencyPrice; /** * Subtotal of all line items, before discounts and before tax. */ subtotal?: wix_ecom_backend.Cart.MultiCurrencyPrice; /** * Total tax. */ tax?: wix_ecom_backend.Cart.MultiCurrencyPrice; /** * Total price after discounts, gift cards, and tax. */ total?: wix_ecom_backend.Cart.MultiCurrencyPrice; }; type ProductName = { /** * *Required** - Original product name (in site's default language). */ original?: string; /** * Description product name translated into buyer's language. Defaults to `original` when not defined. */ translated?: string; }; type RemoveCouponFromCurrentCartRequest = {}; type RemoveCouponRequest = { /** * Cart ID. */ _id: string; }; type RemoveCouponResponse = { /** * Updated cart. */ cart?: wix_ecom_backend.Cart.Cart; }; type RemoveLineItemsFromCurrentCartRequest = { /** * IDs of the line items to remove from the cart. */ lineItemIds: Array; }; type RemoveLineItemsRequest = { /** * Cart ID. */ _id: string; /** * IDs of the line items to remove from the cart. */ lineItemIds: Array; }; type RemoveLineItemsResponse = { /** * Updated cart. */ cart?: wix_ecom_backend.Cart.Cart; }; type Scope = { /** * Coupon scope's applied group (e.g., event or ticket in Wix Events) */ group?: wix_ecom_backend.Cart.Group; /** * Scope namespace (Wix Stores, Wix Bookings, Wix Events) */ namespace?: string; }; type SecuredMedia = { /** * Media ID in media manager. */ _id?: string; /** * Original file name. */ fileName?: string; /** * File type. */ fileType?: string; }; type SelectedCarrierServiceOption = { /** * This carrier's unique ID */ carrierId?: string; /** * Unique identifier of selected option. For example, "usps_std_overnight". */ code?: string; /** * Shipping costs. */ cost?: wix_ecom_backend.Cart.SelectedCarrierServiceOptionPrices; /** * Delivery logistics. */ logistics?: wix_ecom_backend.Cart.DeliveryLogistics; /** * Other charges */ otherCharges?: Array; /** * Were we able to find the requested shipping option, or otherwise we fallback to the default one (the first) */ requestedShippingOption?: boolean; /** * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale). * For example, "Standard" or "First-Class Package International". */ title?: string; }; type SelectedCarrierServiceOptionOtherCharge = { /** * Price of added charge. */ cost?: wix_ecom_backend.Cart.SelectedCarrierServiceOptionPrices; /** * Details of the charge, such as 'Full Coverage Insurance of up to 80% of value of shipment'. */ details?: string; /** * Type of additional cost. */ type?: string; }; type SelectedCarrierServiceOptionPrices = { /** * Shipping price before discount and before tax. */ price?: wix_ecom_backend.Cart.MultiCurrencyPrice; /** * Tax details. */ taxDetails?: wix_ecom_backend.Cart.ItemTaxFullDetails; /** * Shipping discount before tax. */ totalDiscount?: wix_ecom_backend.Cart.MultiCurrencyPrice; /** * Total shipping price, after discount and after tax. */ totalPriceAfterTax?: wix_ecom_backend.Cart.MultiCurrencyPrice; /** * Deprecated - please use `total_price_after_tax` minus `tax_details.total_tax` instead. */ totalPriceBeforeTax?: wix_ecom_backend.Cart.MultiCurrencyPrice; }; type SelectedMembership = { /** * Membership ID. */ _id?: string; /** * ID of the app providing this payment option. */ appId?: string; /** * IDs of the line items this membership applies to. */ lineItemIds?: Array; }; type SelectedMemberships = { /** * Selected memberships. */ memberships?: Array; }; type SelectedShippingOption = { /** * Carrier ID. */ carrierId?: string; /** * Selected shipping option code. For example, "usps_std_overnight". */ code?: string; }; type ServiceProperties = { /** * The number of people participating in this service. For example, the number of people attending the class or the number of people per hotel room. */ numberOfParticipants?: number; /** * The date and time for which the service is supposed to be provided. For example, the time of the class. */ scheduledDate?: Date; }; type ShippingInfo = { /** * Pickup details when this object describes pickup */ pickupDetails?: wix_ecom_backend.Cart.V1PickupDetails; /** * Shipment details when this object describes shipment */ shippingAddress?: wix_ecom_backend.Cart.CartAddress; /** * Selected shipping rule details */ shippingRuleDetails?: wix_ecom_backend.Cart.ShippingRuleDetails; }; type ShippingInfoDetailsOneOf = { /** * Pickup details when this object describes pickup */ pickupDetails?: wix_ecom_backend.Cart.V1PickupDetails; /** * Shipment details when this object describes shipment */ shippingAddress?: wix_ecom_backend.Cart.CartAddress; }; type ShippingInformation = { /** * All shipping options. */ carrierServiceOptions?: Array; /** * Shipping region. */ region?: wix_ecom_backend.Cart.ShippingRegion; /** * Selected shipping option. */ selectedCarrierServiceOption?: wix_ecom_backend.Cart.SelectedCarrierServiceOption; }; type ShippingOption = { /** * Unique code of provided shipping option like "usps_std_overnight". * For legacy calculators this would be the UUID of the option. */ code?: string; /** * Sipping price information. */ cost?: wix_ecom_backend.Cart.ShippingPrice; /** * Delivery logistics. */ logistics?: wix_ecom_backend.Cart.DeliveryLogistics; /** * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale). * For example, "Standard" or "First-Class Package International". */ title?: string; }; type ShippingPrice = { /** * Other costs such as insurance, handling & packaging for fragile items, etc. */ otherCharges?: Array; /** * Shipping price. */ price?: wix_ecom_backend.Cart.MultiCurrencyPrice; }; type ShippingRegion = { /** * Shipping region ID. */ _id?: string; /** * Shipping region name. */ name?: string; }; type ShippingRuleDetails = { /** * Rule title (as provided by the store owner) */ deliveryOption?: string; /** * Shipping option delivery time */ estimatedDeliveryTime?: string; /** * Selected option ID */ optionId?: string; /** * Selected shipping rule ID */ ruleId?: string; }; type StreetAddress = { /** * Street name. */ name?: string; /** * Street number. */ number?: string; }; type Subdivision = { /** * Short subdivision code. */ code?: string; /** * Subdivision full name. */ name?: string; }; type SubscriptionOptionInfo = { /** * Subscription option description. */ description?: wix_ecom_backend.Cart.Description; /** * Subscription option settings. */ subscriptionSettings?: wix_ecom_backend.Cart.SubscriptionSettings; /** * Subscription option title. */ title?: wix_ecom_backend.Cart.Title; }; type SubscriptionSettings = { /** * Whether subscription is renewed automatically at the end of each period. */ autoRenewal?: boolean; /** * Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`. */ billingCycles?: number; /** * Frequency of recurring payment. */ frequency?: string; }; type TaxCalculationDetails = { /** * Error details and reason for tax rate fallback. */ autoTaxFallbackDetails?: wix_ecom_backend.Cart.AutoTaxFallbackCalculationDetails; /** * Reason the manual calculation was used. */ manualRateReason?: string; /** * Rate calculation type. Supported values: * + `"AUTO_RATE"` * + `"FALLBACK_RATE"` * + `"MANUAL_RATE"` * + `"NO_TAX_COLLECTED"` */ rateType?: string; }; type TaxCalculationDetailsCalculationDetailsOneOf = { /** * Details of the fallback rate calculation. */ autoTaxFallbackDetails?: wix_ecom_backend.Cart.AutoTaxFallbackCalculationDetails; /** * Reason the manual calculation was used. */ manualRateReason?: string; }; type TaxRateBreakdown = { /** * Type of tax against which the calculation was performed. */ name?: string; /** * Rate at which this tax detail was calculated. */ rate?: string; /** * Amount of tax for this tax detail. */ tax?: wix_ecom_backend.Cart.MultiCurrencyPrice; }; type TaxSummary = { /** * Tax calculator that was active when the order was created. */ calculationDetails?: wix_ecom_backend.Cart.TaxCalculationDetails; /** * Amount for which tax is calculated, added from line items. */ taxableAmount?: wix_ecom_backend.Cart.MultiCurrencyPrice; /** * Calculated tax, added from line items. */ totalTax?: wix_ecom_backend.Cart.MultiCurrencyPrice; }; type Title = { /** * Subscription option name. */ original?: string; /** * Translated subscription option name. */ translated?: string; }; type Totals = { /** * Total calculated discount value, according to order.discount */ discount?: number; /** * Total line items quantity */ quantity?: number; /** * Total shipping price, including tax */ shipping?: number; /** * Subtotal of all line items, before tax */ subtotal?: number; /** * Total tax */ tax?: number; /** * Total price */ total?: number; /** * Total items weight */ weight?: number; }; type UpdateCartInfo = { /** * Date and time the cart was created. */ _createdDate?: Date; /** * ID of the cart to be updated. */ _id?: string; /** * Date and time the cart was updated. */ _updatedDate?: Date; /** * Cart discounts. */ appliedDiscounts?: Array; /** * Buyer information. */ buyerInfo?: wix_ecom_backend.Cart.BuyerInfo; /** * Language for communication with the buyer. Defaults to the site language. * For a site that supports multiple languages, this is the language the buyer selected. */ buyerLanguage?: string; /** * [Buyer note](https://support.wix.com/en/article/wix-stores-viewing-buyer-notes) left by the customer. */ buyerNote?: string; /** * ID of the checkout related to this cart. */ checkoutId?: string; /** * Contact info. */ contactInfo?: wix_ecom_backend.Cart.AddressWithContact; /** * All the converted prices are presented in this currency. */ conversionCurrency?: string; /** * Currency used for pricing. */ currency?: string; /** * Line items. */ lineItems?: Array; /** * Site language in which original values are shown. */ siteLanguage?: string; /** * Whether tax is included in line item prices. */ taxIncludedInPrices?: boolean; /** * Weight measurement unit - defaults to site's weight unit. Supported values: * + `"KG"` * + `"LB"` */ weightUnit?: string; }; type UpdateCartOptions = { /** * The information for the cart being updated. */ cartInfo: wix_ecom_backend.Cart.UpdateCartInfo; /** * The code of an existing coupon to apply to the cart. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */ couponCode?: string; /** * Custom line items. */ customLineItems?: Array; /** * Catalog line items. */ lineItems?: Array; /** * Merchant discounts to apply to specific line items. If no `lineItemIds` are passed, the discount will be applied to the whole cart. */ merchantDiscounts?: Array; }; type UpdateCartRequest = { /** * Cart info. */ cartInfo?: wix_ecom_backend.Cart.Cart; /** * The code of an existing coupon to apply to the cart. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */ couponCode?: string; /** * Custom line items. */ customLineItems?: Array; /** * Catalog line items. */ lineItems?: Array; /** * Merchant discounts to apply to specific line items. If no `lineItemIds` are passed, the discount will be applied to the whole cart. */ merchantDiscounts?: Array; }; type UpdateCartResponse = { /** * Updated Cart. */ cart?: wix_ecom_backend.Cart.Cart; }; type UpdateCurrentCartLineItemQuantityRequest = { /** * Line item IDs and their new quantity. */ lineItems: Array; }; type UpdateLineItemsQuantityRequest = { /** * Cart ID. */ _id: string; /** * Line item IDs and their new quantity. */ lineItems: Array; }; type UpdateLineItemsQuantityResponse = { /** * Updated cart. */ cart?: wix_ecom_backend.Cart.Cart; }; type V1BuyerInfo = { /** * Customer details */ _id?: string; /** * Customer's email address */ email?: string; /** * Customer's first name */ firstName?: string; /** * Customer's relationship to the website */ identityType?: string; /** * Customer's last name */ lastName?: string; /** * Customer's phone number */ phone?: string; }; type V1Coupon = { /** * Coupon ID. */ _id?: string; /** * Coupon value. */ amount?: wix_ecom_backend.Cart.MultiCurrencyPrice; /** * Coupon code. */ code?: string; /** * Coupon name. */ name?: string; }; type V1MerchantDiscount = { /** * Discount value. */ amount?: wix_ecom_backend.Cart.MultiCurrencyPrice; }; type V1PickupDetails = { /** * Customer details */ buyerDetails?: wix_ecom_backend.Cart.BuyerDetails; /** * Pickup address */ pickupAddress?: wix_ecom_backend.Cart.CommonAddress; /** * Store owner's pickup instructions */ pickupInstructions?: string; }; type ValidationError = { fieldViolations?: Array; }; type VatId = { /** * Customer's tax ID */ _id?: string; /** * tax type */ type?: string; }; } /** * [Read more](https://www.wix.com/corvid/reference/wix-ecom-backend.Checkout.html#) */ interface Checkout { /** * Creates a checkout. * [Read more](https://www.wix.com/corvid/reference/wix-ecom-backend.Checkout.html#createCheckout) */ createCheckout(options: wix_ecom_backend.Checkout.CreateCheckoutOptions): Promise; /** * Retrieves a checkout. * [Read more](https://www.wix.com/corvid/reference/wix-ecom-backend.Checkout.html#getCheckout) */ getCheckout(_id: string): Promise; } namespace Checkout { type ActionEvent = { bodyAsJson?: string; }; type AdditionalFee = { /** * Additional fee's unique code (or ID) for future processing */ code?: string; /** * Translated additional fee's name */ name?: string; /** * Additional fee's price */ price?: wix_ecom_backend.Checkout.MultiCurrencyPrice; /** * Provider's app id */ providerAppId?: string; /** * Tax details */ taxDetails?: wix_ecom_backend.Checkout.ItemTaxFullDetails; }; type Address = { /** * Address line 1 (free text) */ addressLine1?: string; /** * address line */ addressLine2?: string; /** * City name */ city?: string; /** * Company name */ company?: string; /** * Country code (2 letters) */ country?: string; /** * Email address */ email?: string; /** * Addressee name */ fullName?: wix_ecom_backend.Checkout.FullName; /** * Phone number */ phone?: string; /** * Address line 1 (street) */ street?: wix_ecom_backend.Checkout.Street; /** * State or district */ subdivision?: string; /** * Tax information (for Brazil only) */ vatId?: wix_ecom_backend.Checkout.VatId; /** * ZIP/postal code */ zipCode?: string; }; type AddressAddressLine1OptionsOneOf = { /** * Address line 1 (free text) */ addressLine1?: string; /** * Address line 1 (street) */ street?: wix_ecom_backend.Checkout.Street; }; type AddressWithContact = { /** * Address. */ address?: wix_ecom_backend.Checkout.ApiAddress; /** * Contact details. */ contactDetails?: wix_ecom_backend.Checkout.FullAddressContactDetails; }; type ApiAddress = { /** * Main address line (usually street name and number). */ addressLine1?: string; /** * Free text providing more detailed address info. Usually contains apt, suite, floor. */ addressLine2?: string; /** * City name. */ city?: string; /** * Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format. */ country?: string; /** * Postal or zip code. */ postalCode?: string; /** * Street address object, with number, name, and apartment number in separate fields. */ streetAddress?: wix_ecom_backend.Checkout.StreetAddress; /** * Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format. */ subdivision?: string; }; type ApplicationError = { code?: string; data?: Object; description?: string; }; type AppliedCoupon = { /** * Coupon code */ code?: string; /** * Coupon ID */ couponId?: string; /** * Coupon name */ name?: string; }; type AppliedDiscount = { /** * Coupon details. */ coupon?: wix_ecom_backend.Checkout.Coupon; /** * Discount rule */ discountRule?: wix_ecom_backend.Checkout.DiscountRule; /** * Discount type. */ discountType?: string; /** * IDs of the line items the discount applies to. */ lineItemIds?: Array; /** * Merchant discount. */ merchantDiscount?: wix_ecom_backend.Checkout.MerchantDiscount; }; type AppliedDiscountDiscountSourceOneOf = { /** * Coupon details. */ coupon?: wix_ecom_backend.Checkout.Coupon; /** * Discount rule */ discountRule?: wix_ecom_backend.Checkout.DiscountRule; /** * Merchant discount. */ merchantDiscount?: wix_ecom_backend.Checkout.MerchantDiscount; }; type AutoTaxFallbackCalculationDetails = { /** * invalid request (i.e. address), timeout, internal error, license error, and others will be encoded here */ error?: wix_ecom_backend.Checkout.ApplicationError; /** * reason for fallback */ fallbackReason?: string; }; type BillingInfo = { /** * Full billing address */ address?: wix_ecom_backend.Checkout.Address; /** * Deprecated (use paymentProviderTransactionId instead) */ externalTransactionId?: string; /** * Payment date */ paidDate?: Date; /** * Transaction ID from payment gateway (e.g., Wix Payments) */ paymentGatewayTransactionId?: string; /** * Payment method used for this order */ paymentMethod?: string; /** * Transaction ID from payment provider (e.g., PayPal, Square, Stripe) transaction ID */ paymentProviderTransactionId?: string; /** * Whether order can be refunded by payment provider (manually or automatic) */ refundableByPaymentProvider?: boolean; }; type BuyerInfo = { /** * Contact ID. Auto-created if one does not yet exist. For more information, see [Contacts API](https://www.wix.com/velo/reference/wix-crm-backend/contacts/introduction). */ contactId?: string; /** * Buyer email address. */ email?: string; /** * Member ID - If the buyer is a site member. */ memberId?: string; /** * + When `true` - checkout doesn't have an owner yet and anyone can access it. The first to access it will be new owner. * + If `false`, the value in `checkout.createdBy` is the owner. */ openAccess?: boolean; /** * Visitor ID - if the buyer is **not** a site member. */ visitorId?: string; }; type BuyerInfoIdOneOf = { /** * Member ID - If the buyer is a site member. */ memberId?: string; /** * + When `true` - checkout doesn't have an owner yet and anyone can access it. The first to access it will be new owner. * + If `false`, the value in `checkout.createdBy` is the owner. */ openAccess?: boolean; /** * Visitor ID - if the buyer is **not** a site member. */ visitorId?: string; }; type CalculationErrors = { /** * Carrier errors. */ carrierErrors?: wix_ecom_backend.Checkout.CarrierErrors; /** * Coupon calculation error. */ couponCalculationError?: wix_ecom_backend.Checkout.Details; /** * Discount Rule calculation error. */ discountsCalculationError?: wix_ecom_backend.Checkout.Details; /** * General shipping calculation error. */ generalShippingCalculationError?: wix_ecom_backend.Checkout.Details; /** * Gift card calculation error. */ giftCardCalculationError?: wix_ecom_backend.Checkout.Details; /** * Membership payment methods calculation errors * For example, will indicate that a line item that must be paid with membership payment doesn't have one or selected memberships are invalid */ membershipError?: wix_ecom_backend.Checkout.Details; /** * Order validation errors. */ orderValidationErrors?: Array; /** * Tax calculation error. */ taxCalculationError?: wix_ecom_backend.Checkout.Details; }; type CalculationErrorsShippingCalculationErrorOneOf = { /** * Carrier errors. */ carrierErrors?: wix_ecom_backend.Checkout.CarrierErrors; /** * General shipping calculation error. */ generalShippingCalculationError?: wix_ecom_backend.Checkout.Details; }; type CarrierError = { /** * Carrier ID. */ carrierId?: string; /** * Error details. */ error?: wix_ecom_backend.Checkout.Details; }; type CarrierErrors = { /** * Carrier errors. */ errors?: Array; }; type CarrierServiceOption = { /** * Carrier ID. */ carrierId?: string; /** * Shipping options offered by this carrier for this request. */ shippingOptions?: Array; }; type CatalogReference = { /** * App ID of the catalog the item comes from. For example, the Wix Stores `appId` is `"1380b703-ce81-ff05-f115-39571d94dfcd"`. */ appId?: string; /** * ID of the item within its catalog. For example, `productId` for Wix Stores. */ catalogItemId?: string; /** * Additional info in key:value form. For example, for a product variant from Wix Stores Catalog, `options` field would hold something like one of the following: * + `{"Size": "M", "Color": "Red"}` * + `{"variantId": ""}`. */ options?: Object; }; type ChannelInfo = { /** * Sales channel that submitted the subscription */ type?: string; }; type ChargeDetails = { /** * Discount applied for this line item */ discount?: number; /** * price of line item (depends on subscription option) */ price?: number; /** * Tax applied for this line item */ tax?: number; /** * Is tax applied for this line item */ taxIncludedInPrice?: boolean; /** * Total price charged to the customer (for this line items) after computation of quantity and discount */ totalPrice?: number; }; type Checkout = { /** * Date and time the checkout was created. */ _createdDate?: Date; /** * Checkout ID. */ _id?: string; /** * Date and time the checkout was updated. */ _updatedDate?: Date; /** * Additional Fees */ additionalFees?: Array; /** * Applied discounts. */ appliedDiscounts?: Array; /** * Billing information. */ billingInfo?: wix_ecom_backend.Checkout.AddressWithContact; /** * Buyer information. */ buyerInfo?: wix_ecom_backend.Checkout.BuyerInfo; /** * Language for communication with the buyer. Defaults to the site language. * For a site that supports multiple languages, this is the language the buyer selected. */ buyerLanguage?: string; /** * [Buyer note](https://support.wix.com/en/article/wix-stores-viewing-buyer-notes) left by the customer. */ buyerNote?: string; /** * Errors when calculating totals. */ calculationErrors?: wix_ecom_backend.Checkout.CalculationErrors; /** * Cart ID that this checkout was created from. Empty if this checkout wasn't created out of a cart. */ cartId?: string; /** * Sales channel that submitted the order. "WIX_APP_STORE" refers to the Wix mobile app. */ channelType?: string; /** * Whether an order was successfully created from this checkout. * For an order to be successful, it must be successfully paid for (unless the total is 0). */ completed?: boolean; /** * All the converted prices are presented in this currency. */ conversionCurrency?: string; /** * ID of the checkout's initiator. */ createdBy?: wix_ecom_backend.Checkout.CreatedBy; /** * Currency used for pricing in this store. */ currency?: string; /** * Custom fields. */ customFields?: Array; /** * Applied gift card details. */ giftCard?: wix_ecom_backend.Checkout.GiftCard; /** * Line items. */ lineItems?: Array; /** * Information about valid and invalid memberships, and which ones are selected for usage */ membershipOptions?: wix_ecom_backend.Checkout.MembershipOptions; /** * Remaining amount for the order to be fully paid. */ payLater?: wix_ecom_backend.Checkout.PriceSummary; /** * Minimal amount to pay in order to place the order. */ payNow?: wix_ecom_backend.Checkout.PriceSummary; /** * Calculated price summary for the checkout. */ priceSummary?: wix_ecom_backend.Checkout.PriceSummary; /** * Shipping information. */ shippingInfo?: wix_ecom_backend.Checkout.ShippingInfo; /** * Site language in which original values are shown. */ siteLanguage?: string; /** * Whether tax is included in line item prices. */ taxIncludedInPrice?: boolean; /** * Tax summary. */ taxSummary?: wix_ecom_backend.Checkout.TaxSummary; /** * Weight measurement unit - defaults to site's weight unit. Supported values: * + `"KG"` * + `"LB"` */ weightUnit?: string; }; type CheckoutMarkedAsCompleted = { checkout?: wix_ecom_backend.Checkout.Checkout; }; type Color = { /** * Optional - HEX or RGB color code for display. */ code?: string; /** * Optional - Description line color name in site's default language. */ original?: string; /** * Optional - Translated description line color name according to buyer language. Defaults to `original` when not provided. */ translated?: string; }; type CommonVatId = { /** * Customer's tax ID */ _id?: string; /** * tax type */ type?: string; }; type Coupon = { /** * Coupon ID. */ _id?: string; /** * Coupon value. */ amount?: wix_ecom_backend.Checkout.MultiCurrencyPrice; /** * Coupon code. */ code?: string; /** * Coupon name. */ name?: string; }; type CreateCheckoutOptions = { /** * Sales channel that submitted the order. Supported values: * + `"WEB"`, `"POS"`, `"EBAY"`, `"AMAZON"`, `"WIX_APP_STORE"`, `"WIX_INVOICES"`, `"BACKOFFICE_MERCHANT"`, `"WISH"`, `"OTHER_PLATFORM"`. */ channelType?: string; /** * Checkout information. */ checkoutInfo?: wix_ecom_backend.Checkout.Checkout; /** * The code of an existing coupon to apply to checkout. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */ couponCode?: string; /** * Custom line items to be added to checkout. */ customLineItems?: Array; /** * Gift card code. */ giftCardCode?: string; /** * Line items to be added to checkout. */ lineItems?: Array; /** * Merchant discounts to apply to specific line items. If no `lineItemIds` are passed, the discount will be applied to the whole checkout. */ merchantDiscounts?: Array; }; type CreateCheckoutRequest = { /** * Sales channel that submitted the order. Supported values: * + `"WEB"`, `"POS"`, `"EBAY"`, `"AMAZON"`, `"WIX_APP_STORE"`, `"WIX_INVOICES"`, `"BACKOFFICE_MERCHANT"`, `"WISH"`, `"OTHER_PLATFORM"`. */ channelType?: string; /** * Checkout information. */ checkoutInfo?: wix_ecom_backend.Checkout.Checkout; /** * The code of an existing coupon to apply to checkout. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */ couponCode?: string; /** * Custom line items to be added to checkout. */ customLineItems?: Array; /** * Gift card code. */ giftCardCode?: string; /** * Line items to be added to checkout. */ lineItems?: Array; /** * Merchant discounts to apply to specific line items. If no `lineItemIds` are passed, the discount will be applied to the whole checkout. */ merchantDiscounts?: Array; }; type CreateCheckoutResponse = { /** * Newly created checkout. */ checkout?: wix_ecom_backend.Checkout.Checkout; }; type CreateOrderAndChargeOptions = { /** * Payment token. */ paymentToken?: string; /** * Custom URL params to be added to redirect URLs. */ urlParams?: Record; }; type CreateOrderAndChargeRequest = { /** * Checkout ID. */ _id: string; /** * Payment token. */ paymentToken?: string; /** * Custom URL params to be added to redirect URLs. */ urlParams?: Record; }; type CreateOrderAndChargeResponse = { /** * ID of newly created order. */ orderId?: string; /** * The payment gateway is cashier. * payment_gateway_order_id will be returned given that money was charged. * In some cases, money will not be charged: * If the total price is 0 - For example, could be a free item or a an item with 100% discount * If the total price is not 0, but the payment is covered by alternative payment methods such as gift card */ paymentGatewayOrderId?: string; /** * Payment response token. */ paymentResponseToken?: string; /** * ID of newly created subscription. */ subscriptionId?: string; }; type CreateOrderAndChargeResponseIdOneOf = { /** * ID of newly created order. */ orderId?: string; /** * ID of newly created subscription. */ subscriptionId?: string; }; type CreateOrderOptions = { /** * Custom URL params to be added to redirect URLs. */ urlParams?: Record; }; type CreateOrderRequest = { /** * Checkout ID. */ _id: string; /** * Custom URL params to be added to redirect URLs. */ urlParams?: Record; }; type CreateOrderResponse = { /** * ID of newly created order (ecom order ID) */ orderId?: string; /** * The payment gateway is cashier. * payment_gateway_order_id will be returned given that money needs to be charged. * In some cases, money should not be charged: * If the total price is 0 - For example, could be a free item or a an item with 100% discount * If the total price is not 0, but the payment is covered by alternative payment methods such as gift card */ paymentGatewayOrderId?: string; /** * ID of newly created subscription. */ subscriptionId?: string; }; type CreateOrderResponseIdOneOf = { /** * ID of newly created order (ecom order ID) */ orderId?: string; /** * ID of newly created subscription. */ subscriptionId?: string; }; type CreatedBy = { /** * App ID - when the order was created by an external application or Wix service. */ appId?: string; /** * Member ID - when the order was created by a **logged in** site visitor. */ memberId?: string; /** * User ID - when the order was created by a Wix user on behalf of a buyer. * For example, via POS (point of service). */ userId?: string; /** * Visitor ID - when the order was created by a site visitor that was **not** logged in. */ visitorId?: string; }; type CreatedByIdOneOf = { /** * App ID - when the order was created by an external application or Wix service. */ appId?: string; /** * Member ID - when the order was created by a **logged in** site visitor. */ memberId?: string; /** * User ID - when the order was created by a Wix user on behalf of a buyer. * For example, via POS (point of service). */ userId?: string; /** * Visitor ID - when the order was created by a site visitor that was **not** logged in. */ visitorId?: string; }; type CustomField = { /** * Custom field title. */ title?: string; /** * Translated custom field title. */ translatedTitle?: string; /** * Custom field value. */ value?: any; }; type CustomLineItem = { /** * Custom line item ID. Defaults to an auto-generated ID. */ _id?: string; /** * Custom line item description lines. Used for displaying the cart, checkout and order. */ descriptionLines?: Array; /** * Custom line item media. * + Link to an image/video from the [Wix Media Manager](https://support.wix.com/en/article/wix-media-about-the-media-manager) - `"wix:image://v1/3c76e2_c53...4ea4~mv2.jpg#originWidth=1000&originHeight=1000"`. * + An image from the web - `"http(s)://"`. */ media?: string; /** * Custom line item name. */ name?: string; /** * Custom line item price. */ price?: string; /** * Custom line item quantity. */ quantity?: number; }; type CustomTextFieldSelection = { /** * Custom text field name */ title?: string; /** * Custom text field value */ value?: string; }; type DeliveryLogistics = { /** * Expected delivery time, in free text. For example, "3-5 business days". */ deliveryTime?: string; /** * Instructions for caller, e.g for pickup: "Please deliver during opening hours, and please don't park in disabled parking spot". */ instructions?: string; /** * Pickup details. */ pickupDetails?: wix_ecom_backend.Checkout.PickupDetails; }; type Description = { /** * Subscription option description. */ original?: string; /** * Translated subscription option name. */ translated?: string; }; type DescriptionLine = { /** * Description line color value. */ colorInfo?: wix_ecom_backend.Checkout.Color; /** * Description line name. */ name?: wix_ecom_backend.Checkout.DescriptionLineName; /** * Description line plain text value. */ plainText?: wix_ecom_backend.Checkout.PlainTextValue; }; type DescriptionLineDescriptionLineValueOneOf = {}; type DescriptionLineName = { /** * Optional - Description line name in site's default language. */ original?: string; /** * Optional - Translated description line item according to buyer language. Defaults to `original` when not provided. */ translated?: string; }; type DescriptionLineValueOneOf = { /** * Description line color value. */ colorInfo?: wix_ecom_backend.Checkout.Color; /** * Description line plain text value. */ plainText?: wix_ecom_backend.Checkout.PlainTextValue; }; type Details = { applicationError?: wix_ecom_backend.Checkout.ApplicationError; /** * deprecated in API's - to enable migration from rendering arbitrary tracing to rest response */ tracing?: Record; validationError?: wix_ecom_backend.Checkout.ValidationError; }; type DetailsKindOneOf = { applicationError?: wix_ecom_backend.Checkout.ApplicationError; validationError?: wix_ecom_backend.Checkout.ValidationError; }; type Discount = { /** * Discount type. */ type?: string; /** * Discount value. */ value?: number; }; type DiscountRule = { /** * Discount rule ID */ _id?: string; /** * Discount value. */ amount?: wix_ecom_backend.Checkout.MultiCurrencyPrice; /** * Discount rule name */ name?: wix_ecom_backend.Checkout.DiscountRuleName; }; type DiscountRuleName = { /** * Original discount rule name (in site's default language). */ original?: string; /** * Translated discount rule name according to buyer language. Defaults to `original` when not provided. */ translated?: string; }; type DomainEvent = { /** * random GUID so clients can tell if event was already handled */ _id?: string; actionEvent?: wix_ecom_backend.Checkout.ActionEvent; createdEvent?: wix_ecom_backend.Checkout.EntityCreatedEvent; deletedEvent?: wix_ecom_backend.Checkout.EntityDeletedEvent; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * Assuming that all messages including Actions have id * Example: The id of the specific order, the id of a specific campaign */ entityId?: string; /** * The time of the event. Useful if there was a delay in dipatching */ eventTime?: Date; extendedFieldsUpdatedEvent?: wix_ecom_backend.Checkout.ExtendedFieldsUpdatedEvent; /** * If present, indicates the action that triggered the event. */ originatedFrom?: string; /** * This is top level to ease client code dipatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** * A field that should be set if this event was triggered by an anonymize request. * For example you must set it to true when sending an event as a result of a GDPR right to be forgotten request. * NOTE: This field is not relevant for `EntityCreatedEvent` but is located here for better ergonomics of consumers. */ triggeredByAnonymizeRequest?: boolean; updatedEvent?: wix_ecom_backend.Checkout.EntityUpdatedEvent; }; type DomainEventBodyOneOf = { actionEvent?: wix_ecom_backend.Checkout.ActionEvent; createdEvent?: wix_ecom_backend.Checkout.EntityCreatedEvent; deletedEvent?: wix_ecom_backend.Checkout.EntityDeletedEvent; extendedFieldsUpdatedEvent?: wix_ecom_backend.Checkout.ExtendedFieldsUpdatedEvent; updatedEvent?: wix_ecom_backend.Checkout.EntityUpdatedEvent; }; type Empty = {}; type EntityCreatedEvent = { entityAsJson?: string; }; type EntityDeletedEvent = {}; type EntityUpdatedEvent = { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; }; type ExtendedFieldsUpdatedEvent = { currentEntityAsJson?: string; }; type FieldViolation = { data?: Object; description?: string; field?: string; /** * applicable when violated_rule=OTHER */ ruleName?: string; /** * Suppoerted values: * - `'DECIMAL_GT'` * - `'DECIMAL_GTE'` * - `'DECIMAL_LT'` * - `'DECIMAL_LTE'` * - `'DECIMAL_MAX_SCALE'` * - `'FORMAT'` * - `'INVALID_ENUM_VALUE'` * - `'MAX'` * - `'MAX_LENGTH'` * - `'MAX_SIZE'` * - `'MIN'` * - `'MIN_LENGTH'` * - `'MIN_SIZE'` * - `'OTHER'` * - `'REQUIRED_FIELD'` * - `'VALIDATION'` */ violatedRule?: string; }; type FullAddressContactDetails = { /** * Company name. */ company?: string; /** * First name. */ firstName?: string; /** * Last name. */ lastName?: string; /** * Phone number. */ phone?: string; /** * Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set - UNSPECIFIED is not allowed. */ vatId?: wix_ecom_backend.Checkout.CommonVatId; }; type FullName = { /** * Customer's first name */ firstName?: string; /** * Customer's last name */ lastName?: string; }; type GetCheckoutRequest = { /** * Checkout ID. */ _id: string; }; type GetCheckoutResponse = { /** * The requested checkout. */ checkout?: wix_ecom_backend.Checkout.Checkout; }; type GetWixCheckoutURLRequest = { /** * Checkout ID. */ _id: string; }; type GetWixCheckoutURLResponse = { /** * Checkout URL. */ checkoutUrl?: string; }; type GetWixCheckoutUrlOptions = {}; type GiftCard = { /** * Gift Card ID. */ _id?: string; /** * Gift card value. */ amount?: wix_ecom_backend.Checkout.MultiCurrencyPrice; /** * App ID of the gift card provider. */ appId?: string; /** * Gift card obfuscated code. */ obfuscatedCode?: string; }; type Group = { /** * Item ID (when the coupon scope is limited to just one item). */ entityId?: string; /** * Coupon scope's group (e.g., product or collection in Wix Stores). See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values). */ name?: string; }; type InvalidMembership = { /** * Membership details. */ membership?: wix_ecom_backend.Checkout.Membership; /** * Reason why this membership is invalid and cannot be used. */ reason?: string; }; type ItemAvailabilityInfo = { /** * Quantity available. */ quantityAvailable?: number; /** * Item availability status. Supported Values: * + `"NOT_FOUND"`: Item does not exist * + `"NOT_AVAILABLE"`: Item not in stock * + `"PARTIALLY_AVAILABLE"`: Available quantity is less than requested */ status?: string; }; type ItemTaxFullDetails = { /** * If breakdown exists, the sum of rates in the breakdown must equal `tax_rate`. */ rateBreakdown?: Array; /** * Tax rate %, as a decimal point between 0 and 1. */ taxRate?: string; /** * Amount for which tax is calculated. */ taxableAmount?: wix_ecom_backend.Checkout.MultiCurrencyPrice; /** * Calculated tax, based on `taxable_amount` and `tax_rate`. */ totalTax?: wix_ecom_backend.Checkout.MultiCurrencyPrice; }; type ItemType = { /** * Custom item type. */ custom?: string; /** * Preset item type. */ preset?: string; }; type ItemTypeItemTypeDataOneOf = { /** * Custom item type. */ custom?: string; /** * Preset item type. */ preset?: string; }; type LineItem = { /** * Line item ID. */ _id?: string; /** * Item availability details. */ availability?: wix_ecom_backend.Checkout.ItemAvailabilityInfo; /** * Catalog and item reference. Holds IDs for the item and the catalog it came from, as well as further optional info. */ catalogReference?: wix_ecom_backend.Checkout.CatalogReference; /** * Partial payment for the given item to be paid upfront during the checkout. Eligible for catalog items with type `DEPOSIT_ONLINE` only. */ depositAmount?: wix_ecom_backend.Checkout.MultiCurrencyPrice; /** * Line item description lines. Used for displaying the cart, checkout and order. */ descriptionLines?: Array; /** * Discount for this line item's entire quantity. */ discount?: wix_ecom_backend.Checkout.MultiCurrencyPrice; /** * Item price **before** catalog-defined discount. Defaults to `price` when not provided. */ fullPrice?: wix_ecom_backend.Checkout.MultiCurrencyPrice; /** * Item type. Either a preset type or custom. */ itemType?: wix_ecom_backend.Checkout.ItemType; /** * Total price **after** catalog-defined discount and line item discounts. */ lineItemPrice?: wix_ecom_backend.Checkout.MultiCurrencyPrice; /** * Line item image details. */ media?: string; /** * Type of selected payment option for current item. Defaults to `"FULL_PAYMENT_ONLINE"`. * + `"FULL_PAYMENT_ONLINE"`: The entire payment for this item happens as part of the checkout. * + `"FULL_PAYMENT_OFFLINE"`: The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods. * + `"MEMBERSHIP"`: Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0. * + `"DEPOSIT_ONLINE"`: Partial payment for the given item to be paid upfront during the checkout. Amount to be paid is defined by deposit_amount field. */ paymentOption?: string; /** * Physical properties of the item. When relevant, contains information such as SKU, item weight, and shippability. */ physicalProperties?: wix_ecom_backend.Checkout.PhysicalProperties; /** * Item price **after** catalog-defined discount and line item discounts. */ price?: wix_ecom_backend.Checkout.MultiCurrencyPrice; /** * Item price **before** line item discounts and **after** catalog-defined discount. Defaults to `price` when not provided. */ priceBeforeDiscounts?: wix_ecom_backend.Checkout.MultiCurrencyPrice; /** * Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". */ priceDescription?: wix_ecom_backend.Checkout.PriceDescription; /** * Item name. * + Stores - `product.name` * + Bookings - `service.info.name` * + Events - `ticket.name` */ productName?: wix_ecom_backend.Checkout.ProductName; /** * Item quantity. */ quantity?: number; /** * In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID. * + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID. * + In most cases, this field has the same value as `catalogReference.catalogItemId`. * + Used in membership validation. */ rootCatalogItemId?: string; /** * Service properties. When relevant, this contains information such as date and number of participants. */ serviceProperties?: wix_ecom_backend.Checkout.ServiceProperties; /** * Tax details for this line item. */ taxDetails?: wix_ecom_backend.Checkout.ItemTaxFullDetails; /** * Total price after all discounts and tax. */ totalPriceAfterTax?: wix_ecom_backend.Checkout.MultiCurrencyPrice; /** * Deprecated - please use `total_price_after_tax` minus `tax_details.total_tax` instead. */ totalPriceBeforeTax?: wix_ecom_backend.Checkout.MultiCurrencyPrice; /** * URL to the item's page on the site. */ url?: string; }; type MarkCheckoutAsCompletedRequest = { /** * Checkout ID. */ _id: string; }; type MarkCheckoutAsCompletedResponse = {}; type MediaItem = { /** * Media ID (for media items previously saved in Wix Media) */ _id?: string; /** * Alternative text for presentation when media cannot be displayed */ altText?: string; /** * Media external URL */ externalImageUrl?: string; /** * Media item height */ height?: number; /** * Media type */ mediaType?: string; /** * Media URL */ url?: string; /** * Media item width */ width?: number; }; type Membership = { /** * Membership ID. */ _id?: string; /** * Additional data about this membership. */ additionalData?: Object; /** * ID of the application providing this payment option. */ appId?: string; /** * Optional - For a membership that has limited credits, information about credit usage. */ credits?: wix_ecom_backend.Checkout.MembershipPaymentCredits; /** * Optional - TMembership expiry date. */ expirationDate?: Date; /** * Line item IDs which are "paid for" by this membership. */ lineItemIds?: Array; /** * The name of this membership. */ name?: wix_ecom_backend.Checkout.MembershipName; }; type MembershipName = { /** * The name of this membership */ original?: string; /** * Optional - Translated name of this membership. Defaults to `original` when not provided. */ translated?: string; }; type MembershipOptions = { /** * List of payment options that can be used */ eligibleMemberships?: Array; /** * List of payment options that are owned by the member, but cannot be used due to reason provided */ invalidMemberships?: Array; /** * The selected payment options and which line items they apply to */ selectedMemberships?: wix_ecom_backend.Checkout.SelectedMemberships; }; type MembershipPaymentCredits = { /** * How much credit remained for this membership */ remaining?: number; /** * How much credit this membership has in total */ total?: number; }; type MerchantDiscount = { /** * Discount value. */ amount?: wix_ecom_backend.Checkout.MultiCurrencyPrice; }; type MerchantDiscountInput = { /** * Discount amount. */ amount?: string; /** * IDs of the line items the discount applies to. */ lineItemIds?: Array; }; type MultiCurrencyPrice = { /** * Amount. */ amount?: string; /** * Converted amount. */ convertedAmount?: string; /** * Amount formatted with currency symbol. */ formattedAmount?: string; /** * Converted amount formatted with currency symbol. */ formattedConvertedAmount?: string; }; type OptionSelection = { /** * Option name */ option?: string; /** * Selected choice for this option */ selection?: string; }; type OrderCreated = { /** * Order archive status */ archived?: boolean; /** * Customer information */ buyerInfo?: wix_ecom_backend.Checkout.V2BuyerInfo; /** * Currency used for pricing in this store */ currency?: string; /** * Order creation date */ dateCreated?: Date; /** * Order fulfillment status */ fulfillmentStatus?: string; /** * ID displayed in the owner's store (auto generated) */ number?: string; /** * Order ID (auto generated upon order creation) */ orderId?: string; /** * Order payment status */ paymentStatus?: string; /** * Whether the order was read by the store owner */ read?: boolean; /** * Totals for order's line items */ totals?: wix_ecom_backend.Checkout.Totals; /** * Weight measurement unit used in this store. Supported values: * + `"KG"` * + `"LB"` */ weightUnit?: string; }; type OrdersExperiments = { epCommitTax?: boolean; moveBuyerOrderConfirmationEmailToEp?: boolean; moveMerchantEmailToEp?: boolean; producedByEpBridge?: boolean; }; type OtherCharge = { /** * Price of added cost. */ price?: wix_ecom_backend.Checkout.MultiCurrencyPrice; /** * Type of additional cost. */ type?: string; }; type PhysicalProperties = { /** * Whether this line item is shippable. */ shippable?: boolean; /** * Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku). */ sku?: string; /** * Line item weight. Measurement unit (`"KG"` or `"LB"`) is taken from `order.weightUnit`. */ weight?: number; }; type PickupAddress = { /** * Address */ addressLine?: string; /** * City */ city?: string; /** * Country code (2 letters) */ country?: string; /** * State/District */ subdivision?: string; /** * ZIP/postal code */ zipCode?: string; }; type PickupDetails = { /** * Pickup address. */ address?: wix_ecom_backend.Checkout.ApiAddress; /** * Whether the pickup address is that of a business - this may effect tax calculation. */ businessLocation?: boolean; /** * Pickup method */ pickupMethod?: string; }; type PlainTextValue = { /** * Optional - Description line plain text value in site's default language. */ original?: string; /** * Optional - Translated description line plain text value according to buyer language. Defaults to `original` when not provided. */ translated?: string; }; type PriceDescription = { /** * Required** - Original price description (in site's default language). */ original?: string; /** * Optional - Translated product name according to buyer language. Defaults to `original` when not provided. */ translated?: string; }; type PriceSummary = { /** * Total additional fees price. */ additionalFees?: wix_ecom_backend.Checkout.MultiCurrencyPrice; /** * Total calculated discount value. */ discount?: wix_ecom_backend.Checkout.MultiCurrencyPrice; /** * Total shipping price, before discounts and before tax. */ shipping?: wix_ecom_backend.Checkout.MultiCurrencyPrice; /** * Subtotal of all line items, before discounts and before tax. */ subtotal?: wix_ecom_backend.Checkout.MultiCurrencyPrice; /** * Total tax. */ tax?: wix_ecom_backend.Checkout.MultiCurrencyPrice; /** * Total price after discounts, gift cards, and tax. */ total?: wix_ecom_backend.Checkout.MultiCurrencyPrice; }; type ProductDetails = { /** * Line item fulfillerId from stores fulfillers. No value means self fulfilled */ fulfillerId?: string; /** * Line item type (may be extended) */ lineItemType?: string; /** * Line item primary media for preview */ mediaItem?: wix_ecom_backend.Checkout.MediaItem; /** * Line item name */ name?: string; /** * Line item notes */ notes?: string; /** * Line item product ID (optional for POS orders) */ productId?: string; /** * Line item SKU */ sku?: string; /** * Tax group id */ taxGroupId?: string; /** * Line item name translated to buyer's language */ translatedName?: string; /** * Line item weight */ weight?: number; }; type ProductName = { /** * Required** - Original item name (in site's default language). */ original?: string; /** * Optional - Translated item name according to buyer language. Defaults to `original` when not provided. */ translated?: string; }; type RemoveCouponRequest = { /** * Checkout ID. */ _id: string; }; type RemoveCouponResponse = { /** * Updated checkout after removal of coupon. */ checkout?: wix_ecom_backend.Checkout.Checkout; }; type RemoveGiftCardRequest = { /** * Checkout ID. */ _id: string; }; type RemoveGiftCardResponse = { /** * Updated checkout after removal of gift card. */ checkout?: wix_ecom_backend.Checkout.Checkout; }; type RemoveLineItemsRequest = { /** * Checkout ID. */ _id: string; /** * IDs of the line items to be removed. */ lineItemIds: Array; }; type RemoveLineItemsResponse = { /** * Updated checkout after removal of line items. */ checkout?: wix_ecom_backend.Checkout.Checkout; }; type Scope = { /** * Coupon scope's applied group (e.g., event or ticket in Wix Events) */ group?: wix_ecom_backend.Checkout.Group; /** * Scope namespace (Wix Stores, Wix Bookings, Wix Events) */ namespace?: string; }; type SecuredMedia = { /** * Media ID in media manager. */ _id?: string; /** * Original file name. */ fileName?: string; /** * File type. */ fileType?: string; }; type SelectedCarrierServiceOption = { /** * This carrier's unique ID */ carrierId?: string; /** * Unique identifier of selected option. For example, "usps_std_overnight". */ code?: string; /** * Shipping costs. */ cost?: wix_ecom_backend.Checkout.SelectedCarrierServiceOptionPrices; /** * Delivery logistics. */ logistics?: wix_ecom_backend.Checkout.DeliveryLogistics; /** * Other charges */ otherCharges?: Array; /** * Were we able to find the requested shipping option, or otherwise we fallback to the default one (the first) */ requestedShippingOption?: boolean; /** * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale). * For example, "Standard" or "First-Class Package International". */ title?: string; }; type SelectedCarrierServiceOptionOtherCharge = { /** * Price of added charge. */ cost?: wix_ecom_backend.Checkout.SelectedCarrierServiceOptionPrices; /** * Details of the charge, such as 'Full Coverage Insurance of up to 80% of value of shipment'. */ details?: string; /** * Type of additional cost. */ type?: string; }; type SelectedCarrierServiceOptionPrices = { /** * Shipping price before discount and before tax. */ price?: wix_ecom_backend.Checkout.MultiCurrencyPrice; /** * Tax details. */ taxDetails?: wix_ecom_backend.Checkout.ItemTaxFullDetails; /** * Shipping discount before tax. */ totalDiscount?: wix_ecom_backend.Checkout.MultiCurrencyPrice; /** * Total shipping price, after discount and after tax. */ totalPriceAfterTax?: wix_ecom_backend.Checkout.MultiCurrencyPrice; /** * Deprecated - please use `total_price_after_tax` minus `tax_details.total_tax` instead. */ totalPriceBeforeTax?: wix_ecom_backend.Checkout.MultiCurrencyPrice; }; type SelectedMembership = { /** * Membership ID. */ _id?: string; /** * ID of the app providing this payment option. */ appId?: string; /** * IDs of the line items this membership applies to. */ lineItemIds?: Array; }; type SelectedMemberships = { /** * Selected memberships. */ memberships?: Array; }; type ServiceProperties = { /** * Optional - The number of people participating in this service. For example, the number of people attending the class or the number of people per hotel room. */ numberOfParticipants?: number; /** * Optional - The date and time for which the service is supposed to be provided. For example, the time of the class. */ scheduledDate?: Date; }; type ShipmentDetails = { /** * Shipping destination address */ address?: wix_ecom_backend.Checkout.Address; /** * Discount applied for shipping */ discount?: number; /** * Tax applied for shipping */ tax?: number; /** * Whether tax is included in the price */ taxIncludedInPrice?: boolean; }; type ShippingInfo = { /** * All carrier options for this shipping rule. */ carrierServiceOptions?: Array; /** * Shipping region. */ region?: wix_ecom_backend.Checkout.ShippingRegion; /** * Selected option out of the options allowed for the region (see `region` field). * The region field is chosen based on the address provided. */ selectedCarrierServiceOption?: wix_ecom_backend.Checkout.SelectedCarrierServiceOption; /** * Shipping address and contact details. */ shippingDestination?: wix_ecom_backend.Checkout.AddressWithContact; }; type ShippingOption = { /** * Unique code of provided shipping option like "usps_std_overnight". * For legacy calculators this would be the UUID of the option. */ code?: string; /** * Sipping price information. */ cost?: wix_ecom_backend.Checkout.ShippingPrice; /** * Delivery logistics. */ logistics?: wix_ecom_backend.Checkout.DeliveryLogistics; /** * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale). * For example, "Standard" or "First-Class Package International". */ title?: string; }; type ShippingPrice = { /** * Other costs such as insurance, handling & packaging for fragile items, etc. */ otherCharges?: Array; /** * Shipping price. */ price?: wix_ecom_backend.Checkout.MultiCurrencyPrice; }; type ShippingRegion = { /** * Shipping region ID. */ _id?: string; /** * Shipping region name. */ name?: string; }; type StoreSettings = { /** * The language to be used when communicating with the buyer * For a site that support multiple languages, this would be the language the buyer selected * Otherwise this would be the site language */ buyerLanguage?: string; /** * Currency used for pricing in this store */ currency?: string; /** * Weight measurement unit used in this store. Supported values: * + `"KG"` * + `"LB"` */ weightUnit?: string; }; type Street = { /** * Street name */ name?: string; /** * Street number */ number?: string; }; type StreetAddress = { /** * Street name. */ name?: string; /** * Street number. */ number?: string; }; type Subscription = { /** * Subscription id (auto-generated upon subscription creation) */ _id?: string; /** * Coupon that was applied to subscription */ appliedCoupon?: wix_ecom_backend.Checkout.V1AppliedCoupon; /** * Full billing address */ billingAddress?: wix_ecom_backend.Checkout.Address; /** * information about first subscription payment */ billingInfo?: wix_ecom_backend.Checkout.V1BillingInfo; /** * member or contact */ buyerInfo?: wix_ecom_backend.Checkout.V1BuyerInfo; /** * Message from the customer (e.g., customization request) */ buyerNote?: string; /** * The id of the cart this order was created from */ cartId?: string; /** * Sales channel that submitted this subscription */ channelInfo?: wix_ecom_backend.Checkout.ChannelInfo; /** * The id of the checkout this subscriptions was created from */ checkoutId?: string; /** * Custom field */ customField?: wix_ecom_backend.Checkout.V1CustomField; /** * Subscription creation date */ dateCreated?: Date; /** * id of subscription in external system */ externalId?: string; /** * Line items ordered */ lineItems?: Array; /** * Delivery information */ shippingInfo?: wix_ecom_backend.Checkout.V1ShippingInfo; /** * site settings at the moment when subscription created */ storeSettings?: wix_ecom_backend.Checkout.StoreSettings; /** * Information about subscription option from which subscription was created */ subscriptionOptionInfo?: wix_ecom_backend.Checkout.V1SubscriptionOptionInfo; /** * defines when subscriber will be charged: for frequency=MONTH, billingCycles=6, interval=2 payment will be done every 2 month during one year */ subscriptionSettings?: wix_ecom_backend.Checkout.V1SubscriptionSettings; /** * Totals for subscription's line items */ totals?: wix_ecom_backend.Checkout.V1Totals; }; type SubscriptionCreated = { subscription?: wix_ecom_backend.Checkout.Subscription; }; type SubscriptionInfo = { /** * Subscription ID. */ _id?: string; /** * Current cycle number. For example, if the subscription is in the 3rd month of a 4-month subscription, the value will be `3`. */ cycleNumber?: number; /** * Subscription options info. */ subscriptionOptionInfo?: wix_ecom_backend.Checkout.V2SubscriptionOptionInfo; /** * Subscription settings. */ subscriptionSettings?: wix_ecom_backend.Checkout.V1SubscriptionSettings; }; type SubscriptionOptionInfo = { /** * Subscription option description. */ description?: wix_ecom_backend.Checkout.Description; /** * Subscription option settings. */ subscriptionSettings?: wix_ecom_backend.Checkout.SubscriptionSettings; /** * Subscription option title. */ title?: wix_ecom_backend.Checkout.Title; }; type SubscriptionSettings = { /** * Whether subscription is renewed automatically at the end of each period. */ autoRenewal?: boolean; /** * Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`. */ billingCycles?: number; /** * Frequency of recurring payment. */ frequency?: string; }; type TaxCalculationDetails = { /** * Details of the fallback rate calculation. */ autoTaxFallbackDetails?: wix_ecom_backend.Checkout.AutoTaxFallbackCalculationDetails; /** * Reason the manual calculation was used. */ manualRateReason?: string; /** * Rate calculation type. */ rateType?: string; }; type TaxCalculationDetailsCalculationDetailsOneOf = { /** * Details of the fallback rate calculation. */ autoTaxFallbackDetails?: wix_ecom_backend.Checkout.AutoTaxFallbackCalculationDetails; /** * Reason the manual calculation was used. */ manualRateReason?: string; }; type TaxRateBreakdown = { /** * Type of tax against which the calculation was performed. */ name?: string; /** * Rate at which this tax detail was calculated. */ rate?: string; /** * Amount of tax for this tax detail. */ tax?: wix_ecom_backend.Checkout.MultiCurrencyPrice; }; type TaxSummary = { /** * Tax calculator that was active when the order was created. */ calculationDetails?: wix_ecom_backend.Checkout.TaxCalculationDetails; /** * Amount for which tax is calculated, added from line items. */ taxableAmount?: wix_ecom_backend.Checkout.MultiCurrencyPrice; /** * Calculated tax, added from line items. */ totalTax?: wix_ecom_backend.Checkout.MultiCurrencyPrice; }; type Title = { /** * Subscription option name. */ original?: string; /** * Translated subscription option name. */ translated?: string; }; type Totals = { /** * Total calculated discount value. */ discount?: string; /** * Total calculated gift card value. */ giftCard?: string; /** * Total number of line items. */ quantity?: number; /** * Total refund. */ refund?: string; /** * Total shipping price, before tax. */ shipping?: string; /** * Subtotal of all the line items, before tax. */ subtotal?: string; /** * Total tax. */ tax?: string; /** * Total price charged. */ total?: string; /** * Total items weight. */ weight?: string; }; type UpdateCheckout = { /** * Date and time the checkout was created. */ _createdDate?: Date; /** * Checkout ID. */ _id?: string; /** * Date and time the checkout was updated. */ _updatedDate?: Date; /** * Additional Fees */ additionalFees?: Array; /** * Applied discounts. */ appliedDiscounts?: Array; /** * Billing information. */ billingInfo?: wix_ecom_backend.Checkout.AddressWithContact; /** * Buyer information. */ buyerInfo?: wix_ecom_backend.Checkout.BuyerInfo; /** * Language for communication with the buyer. Defaults to the site language. * For a site that supports multiple languages, this is the language the buyer selected. */ buyerLanguage?: string; /** * [Buyer note](https://support.wix.com/en/article/wix-stores-viewing-buyer-notes) left by the customer. */ buyerNote?: string; /** * Errors when calculating totals. */ calculationErrors?: wix_ecom_backend.Checkout.CalculationErrors; /** * Cart ID that this checkout was created from. Empty if this checkout wasn't created out of a cart. */ cartId?: string; /** * Sales channel that submitted the order. "WIX_APP_STORE" refers to the Wix mobile app. */ channelType?: string; /** * Whether an order was successfully created from this checkout. * For an order to be successful, it must be successfully paid for (unless the total is 0). */ completed?: boolean; /** * All the converted prices are presented in this currency. */ conversionCurrency?: string; /** * ID of the checkout's initiator. */ createdBy?: wix_ecom_backend.Checkout.CreatedBy; /** * Currency used for pricing in this store. */ currency?: string; /** * Custom fields. */ customFields?: Array; /** * Applied gift card details. */ giftCard?: wix_ecom_backend.Checkout.GiftCard; /** * Line items. */ lineItems?: Array; /** * Information about valid and invalid memberships, and which ones are selected for usage */ membershipOptions?: wix_ecom_backend.Checkout.MembershipOptions; /** * Remaining amount for the order to be fully paid. */ payLater?: wix_ecom_backend.Checkout.PriceSummary; /** * Minimal amount to pay in order to place the order. */ payNow?: wix_ecom_backend.Checkout.PriceSummary; /** * Calculated price summary for the checkout. */ priceSummary?: wix_ecom_backend.Checkout.PriceSummary; /** * Shipping information. */ shippingInfo?: wix_ecom_backend.Checkout.ShippingInfo; /** * Site language in which original values are shown. */ siteLanguage?: string; /** * Whether tax is included in line item prices. */ taxIncludedInPrice?: boolean; /** * Tax summary. */ taxSummary?: wix_ecom_backend.Checkout.TaxSummary; /** * Weight measurement unit - defaults to site's weight unit. Supported values: * + `"KG"` * + `"LB"` */ weightUnit?: string; }; type UpdateCheckoutOptions = { /** * The code of an existing coupon to apply to checkout. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */ couponCode?: string; /** * Gift card code. */ giftCardCode?: string; /** * Merchant discounts to apply to specific line items. If no `lineItemIds` are passed, the discount will be applied to the whole checkout. */ merchantDiscounts?: Array; }; type UpdateCheckoutRequest = { /** * Checkout information. */ checkout: wix_ecom_backend.Checkout.Checkout; /** * The code of an existing coupon to apply to checkout. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */ couponCode?: string; /** * Gift card code. */ giftCardCode?: string; /** * Merchant discounts to apply to specific line items. If no `lineItemIds` are passed, the discount will be applied to the whole checkout. */ merchantDiscounts?: Array; }; type UpdateCheckoutResponse = { /** * Updated checkout. */ checkout?: wix_ecom_backend.Checkout.Checkout; }; type UpdatedCheckoutMessage = { /** * Previous checkout. */ oldCheckout?: wix_ecom_backend.Checkout.Checkout; /** * Updated checkout. */ updatedCheckout?: wix_ecom_backend.Checkout.Checkout; }; type V1AppliedCoupon = { /** * Coupon code */ code?: string; /** * Coupon ID */ couponId?: string; /** * Coupon name */ name?: string; }; type V1BillingInfo = { /** * Order ID from payment gateway (e.g., Wix Payments) */ paymentGatewayOrderId?: string; /** * Transaction ID from payment gateway (e.g., Wix Payments) */ paymentGatewayTransactionId?: string; /** * Payment method used for this order */ paymentMethod?: string; }; type V1BuyerInfo = { /** * Wix customer ID */ _id?: string; /** * Customer type */ identityType?: string; }; type V1CustomField = { /** * Title for the custom field */ title?: string; /** * The title translated according to the buyer language */ translatedTitle?: string; /** * Free text that the customer entered in the custom field during the checkout process */ value?: string; }; type V1LineItem = { /** * Charges details */ chargeDetails?: wix_ecom_backend.Checkout.ChargeDetails; /** * Line item custom text field selections */ customTextFields?: Array; /** * Line item ID (auto-generated) */ index?: number; /** * Line item options ordered */ options?: Array; /** * Product details */ productDetails?: wix_ecom_backend.Checkout.ProductDetails; /** * Line item quantity */ quantity?: number; /** * Line item variantId (from Stores Catalog) */ variantId?: string; }; type V1PickupDetails = { /** * Pickup address */ address?: wix_ecom_backend.Checkout.PickupAddress; /** * Store owner's pickup instructions */ pickupInstructions?: string; }; type V1ShippingInfo = { /** * Delivery option name */ deliveryOption?: string; /** * Delivery option delivery time */ estimatedDeliveryTime?: string; /** * Pickup details (when this object describes pickup) */ pickupDetails?: wix_ecom_backend.Checkout.V1PickupDetails; /** * Shipment details (when this object describes shipment) */ shipmentDetails?: wix_ecom_backend.Checkout.ShipmentDetails; }; type V1ShippingInfoDetailsOneOf = { /** * Pickup details (when this object describes pickup) */ pickupDetails?: wix_ecom_backend.Checkout.V1PickupDetails; /** * Shipment details (when this object describes shipment) */ shipmentDetails?: wix_ecom_backend.Checkout.ShipmentDetails; }; type V1SubscriptionOptionInfo = { _id?: string; description?: string; discount?: wix_ecom_backend.Checkout.Discount; title?: string; }; type V1SubscriptionSettings = { /** * Whether subscription is renewed automatically at the end of each period. */ autoRenewal?: boolean; /** * Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`. */ billingCycles?: number; /** * Frequency of recurring payment. */ frequency?: string; }; type V1Totals = { /** * Total calculated discount value */ discount?: number; /** * Total line items quantity */ quantity?: number; /** * Total shipping price, including tax */ shipping?: number; /** * Subtotal of all line items, before tax */ subtotal?: number; /** * Total tax */ tax?: number; /** * Total price */ total?: number; /** * Total weight */ weight?: number; }; type V2BuyerInfo = { /** * Wix customer ID */ _id?: string; /** * Customer's email address */ email?: string; /** * Customer's first name */ firstName?: string; /** * Customer type */ identityType?: string; /** * Customer's last name */ lastName?: string; /** * Customer's phone number */ phone?: string; /** * Deprecated (use identityType instead) */ type?: string; }; type V2SubscriptionOptionInfo = { /** * Subscription option description. */ description?: string; /** * Subscription option title. */ title?: string; }; type ValidationError = { fieldViolations?: Array; }; type VatId = { /** * Customer's tax ID */ number?: string; /** * tax type */ type?: string; }; } /** * [Read more](https://www.wix.com/corvid/reference/wix-ecom-backend.CurrentCart.html#) */ interface CurrentCart { /** * Adds line items to the current site visitor's cart. Both catalog line items and custom line items are supported. * [Read more](https://www.wix.com/corvid/reference/wix-ecom-backend.CurrentCart.html#addToCurrentCart) */ addToCurrentCart(options: wix_ecom_backend.CurrentCart.AddToCurrentCartOptions): Promise; /** * Creates a checkout from the current cart. * [Read more](https://www.wix.com/corvid/reference/wix-ecom-backend.CurrentCart.html#createCheckoutFromCurrentCart) */ createCheckoutFromCurrentCart(options: wix_ecom_backend.CurrentCart.CreateCheckoutFromCurrentCartOptions): Promise; /** * Deletes the current site visitor's cart. * [Read more](https://www.wix.com/corvid/reference/wix-ecom-backend.CurrentCart.html#deleteCurrentCart) */ deleteCurrentCart(): Promise; /** * Estimates the current cart's price totals (including tax), based on a selected carrier service, shipping address, and billing information. * [Read more](https://www.wix.com/corvid/reference/wix-ecom-backend.CurrentCart.html#estimateCurrentCartTotals) */ estimateCurrentCartTotals(options: wix_ecom_backend.CurrentCart.EstimateCurrentCartTotalsOptions): Promise; /** * Retrieves the current site visitor's cart. * [Read more](https://www.wix.com/corvid/reference/wix-ecom-backend.CurrentCart.html#getCurrentCart) */ getCurrentCart(): Promise; /** * Removes the coupon from the current site visitor's cart. * [Read more](https://www.wix.com/corvid/reference/wix-ecom-backend.CurrentCart.html#removeCouponFromCurrentCart) */ removeCouponFromCurrentCart(): Promise; /** * Removes line items from the current site visitor's cart. * [Read more](https://www.wix.com/corvid/reference/wix-ecom-backend.CurrentCart.html#removeLineItemsFromCurrentCart) */ removeLineItemsFromCurrentCart(lineItemIds: Array): Promise; /** * Updates the current site visitor's cart. * [Read more](https://www.wix.com/corvid/reference/wix-ecom-backend.CurrentCart.html#updateCurrentCart) */ updateCurrentCart(options: wix_ecom_backend.CurrentCart.UpdateCurrentCartOptions): Promise; /** * Updates the quantity of one or more line items in the current site visitor's cart. * [Read more](https://www.wix.com/corvid/reference/wix-ecom-backend.CurrentCart.html#updateCurrentCartLineItemQuantity) */ updateCurrentCartLineItemQuantity(lineItems: Array): Promise; } namespace CurrentCart { type ActionEvent = { bodyAsJson?: string; }; type AddToCartRequest = { /** * Cart ID. */ _id: string; /** * Custom line items. */ customLineItems?: Array; /** * Catalog line items. */ lineItems?: Array; }; type AddToCartResponse = { /** * Updated cart. */ cart?: wix_ecom_backend.CurrentCart.Cart; }; type AddToCurrentCartOptions = { /** * Custom line items. */ customLineItems?: Array; /** * Catalog line items. */ lineItems?: Array; }; type AddToCurrentCartRequest = { /** * Custom line items. */ customLineItems?: Array; /** * Catalog line items. */ lineItems?: Array; }; type AdditionalFee = { /** * Additional fee's unique code (or ID) for future processing */ code?: string; /** * Translated additional fee's name */ name?: string; /** * Additional fee's price */ price?: wix_ecom_backend.CurrentCart.MultiCurrencyPrice; /** * Provider's app id */ providerAppId?: string; /** * Tax details */ taxDetails?: wix_ecom_backend.CurrentCart.ItemTaxFullDetails; }; type Address = { /** * Main address line (usually street name and number). */ addressLine1?: string; /** * Free text providing more detailed address info. Usually contains apt, suite, floor. */ addressLine2?: string; /** * City name. */ city?: string; /** * Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format. */ country?: string; /** * Postal or zip code. */ postalCode?: string; /** * Street address object, with number, name, and apartment number in separate fields. */ streetAddress?: wix_ecom_backend.CurrentCart.StreetAddress; /** * Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format. */ subdivision?: string; }; type AddressLocation = { /** * Address latitude. */ latitude?: number; /** * Address longitude. */ longitude?: number; }; type AddressWithContact = { /** * Address. */ address?: wix_ecom_backend.CurrentCart.Address; /** * Contact details. */ contactDetails?: wix_ecom_backend.CurrentCart.ApiFullAddressContactDetails; }; type ApiFullAddressContactDetails = { /** * Company name. */ company?: string; /** * First name. */ firstName?: string; /** * Last name. */ lastName?: string; /** * Phone number. */ phone?: string; /** * Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set - UNSPECIFIED is not allowed. */ vatId?: wix_ecom_backend.CurrentCart.VatId; }; type ApplicationError = { code?: string; data?: Object; description?: string; }; type AppliedCoupon = { /** * Coupon code */ code?: string; /** * Converted discount value */ convertedDiscountValue?: string; /** * Coupon internal ID */ couponId?: string; /** * Type (e.g., moneyOff, percentOff) */ couponType?: string; /** * Discount value */ discountValue?: string; /** * Coupon name */ name?: string; }; type AppliedDiscount = { /** * Coupon details. */ coupon?: wix_ecom_backend.CurrentCart.V1Coupon; /** * Discount rule */ discountRule?: wix_ecom_backend.CurrentCart.DiscountRule; /** * Discount type. */ discountType?: string; /** * IDs of the line items the discount applies to. */ lineItemIds?: Array; /** * Merchant discount. */ merchantDiscount?: wix_ecom_backend.CurrentCart.V1MerchantDiscount; }; type AppliedDiscountDiscountSourceOneOf = { /** * Coupon details. */ coupon?: wix_ecom_backend.CurrentCart.V1Coupon; /** * Discount rule */ discountRule?: wix_ecom_backend.CurrentCart.DiscountRule; /** * Merchant discount. */ merchantDiscount?: wix_ecom_backend.CurrentCart.V1MerchantDiscount; }; type AutoTaxFallbackCalculationDetails = { /** * invalid request (i.e. address), timeout, internal error, license error, and others will be encoded here */ error?: wix_ecom_backend.CurrentCart.ApplicationError; /** * Reason for fallback. Supported values: * + `"AUTO_TAX_FAILED"` * + `"AUTO_TAX_DEACTIVATED"` */ fallbackReason?: string; }; type BuyerDetails = { /** * Email address */ email?: string; /** * Customer's first name */ firstName?: string; /** * Customer's last name */ lastName?: string; /** * Phone number */ phone?: string; }; type BuyerInfo = { /** * Contact ID. Auto-created if one does not yet exist. For more information, see the [Contacts API](https://www.wix.com/velo/reference/wix-crm-backend/contacts/introduction). */ contactId?: string; /** * Member ID - if the buyer is a site member. */ memberId?: string; /** * User ID - if the cart owner is a Wix user. */ userId?: string; /** * Visitor ID - if the buyer is **not** a site member. */ visitorId?: string; }; type BuyerInfoIdOneOf = { /** * Member ID - if the buyer is a site member. */ memberId?: string; /** * User ID - if the cart owner is a Wix user. */ userId?: string; /** * Visitor ID - if the buyer is **not** a site member. */ visitorId?: string; }; type CalculatedLineItem = { /** * Line item ID. */ lineItemId?: string; /** * Type of selected payment option for current item. Defaults to `"FULL_PAYMENT_ONLINE"`. * + `"FULL_PAYMENT_ONLINE"` - The entire payment for this item happens as part of the checkout. * + `"FULL_PAYMENT_OFFLINE"` - The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods. * + `"MEMBERSHIP"` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` will be 0. */ paymentOption?: string; /** * Price breakdown for this line item. */ pricesBreakdown?: wix_ecom_backend.CurrentCart.LineItemPricesData; }; type CalculationErrors = { /** * Carrier errors. */ carrierErrors?: wix_ecom_backend.CurrentCart.CarrierErrors; /** * Coupon calculation error. */ couponCalculationError?: wix_ecom_backend.CurrentCart.Details; /** * Discount Rule calculation error. */ discountsCalculationError?: wix_ecom_backend.CurrentCart.Details; /** * General shipping calculation error. */ generalShippingCalculationError?: wix_ecom_backend.CurrentCart.Details; /** * Gift card calculation error. */ giftCardCalculationError?: wix_ecom_backend.CurrentCart.Details; /** * Membership payment methods calculation errors * For example, will indicate that a line item that must be paid with membership payment doesn't have one or selected memberships are invalid */ membershipError?: wix_ecom_backend.CurrentCart.Details; /** * Order validation errors. */ orderValidationErrors?: Array; /** * Tax calculation error. */ taxCalculationError?: wix_ecom_backend.CurrentCart.Details; }; type CalculationErrorsShippingCalculationErrorOneOf = { /** * Carrier errors. */ carrierErrors?: wix_ecom_backend.CurrentCart.CarrierErrors; /** * General shipping calculation error. */ generalShippingCalculationError?: wix_ecom_backend.CurrentCart.Details; }; type CarrierError = { /** * Carrier ID. */ carrierId?: string; /** * Error details. */ error?: wix_ecom_backend.CurrentCart.Details; }; type CarrierErrors = { /** * Carrier errors. */ errors?: Array; }; type CarrierServiceOption = { /** * Carrier ID. */ carrierId?: string; /** * Shipping options offered by this carrier for this request. */ shippingOptions?: Array; }; type Cart = { /** * Date and time the cart was created. */ _createdDate?: Date; /** * Cart ID. */ _id?: string; /** * Date and time the cart was updated. */ _updatedDate?: Date; /** * Cart discounts. */ appliedDiscounts?: Array; /** * Buyer information. */ buyerInfo?: wix_ecom_backend.CurrentCart.BuyerInfo; /** * Language for communication with the buyer. Defaults to the site language. * For a site that supports multiple languages, this is the language the buyer selected. */ buyerLanguage?: string; /** * [Buyer note](https://support.wix.com/en/article/wix-stores-viewing-buyer-notes) left by the customer. */ buyerNote?: string; /** * ID of the checkout related to this cart. */ checkoutId?: string; /** * Contact info. */ contactInfo?: wix_ecom_backend.CurrentCart.AddressWithContact; /** * All the converted prices are presented in this currency. */ conversionCurrency?: string; /** * Currency used for pricing. */ currency?: string; /** * Line items. */ lineItems?: Array; /** * Site language in which original values are shown. */ siteLanguage?: string; /** * Whether tax is included in line item prices. */ taxIncludedInPrices?: boolean; /** * Weight measurement unit - defaults to site's weight unit. Supported values: * + `"KG"` * + `"LB"` */ weightUnit?: string; }; type CartAddress = { /** * Address */ address?: wix_ecom_backend.CurrentCart.CommonAddress; /** * Contact details */ contactDetails?: wix_ecom_backend.CurrentCart.FullAddressContactDetails; }; type CartCompletedEvent = { /** * Coupon applied to this cart */ appliedCoupon?: wix_ecom_backend.CurrentCart.AppliedCoupon; /** * Customer's billing address */ billingAddress?: wix_ecom_backend.CurrentCart.CartAddress; /** * Customer's Wix ID */ buyerInfo?: wix_ecom_backend.CurrentCart.V1BuyerInfo; /** * Message from the customer */ buyerNote?: string; cartId?: string; /** * Time the cart was created */ completedTime?: Date; /** * Currency used for pricing in this store */ currency?: wix_ecom_backend.CurrentCart.Currency; /** * Cart shipping information */ shippingInfo?: wix_ecom_backend.CurrentCart.ShippingInfo; /** * Totals for order's line items */ totals?: wix_ecom_backend.CurrentCart.Totals; /** * Weight measurement unit - defaults to site's weight unit. Supported values: * + `"KG"` * + `"LB"` */ weightUnit?: string; }; type CartDiscount = { /** * Coupon details. */ coupon?: wix_ecom_backend.CurrentCart.Coupon; /** * Merchant discount. */ merchantDiscount?: wix_ecom_backend.CurrentCart.MerchantDiscount; }; type CartDiscountDiscountSourceOneOf = { /** * Coupon details. */ coupon?: wix_ecom_backend.CurrentCart.Coupon; /** * Merchant discount. */ merchantDiscount?: wix_ecom_backend.CurrentCart.MerchantDiscount; }; type CatalogReference = { /** * App ID of the catalog the item comes from. For example, the Wix Stores `appId` is `"1380b703-ce81-ff05-f115-39571d94dfcd"`. */ appId?: string; /** * ID of the item within its catalog. For example, `productId` for Wix Stores. */ catalogItemId?: string; /** * Additional info in key:value form. For example, for a product variant from Wix Stores Catalog, `options` field would hold something like one of the following: * + `{"Size": "M", "Color": "Red"}` * + `{"variantId": ""}`. */ options?: Object; }; type Color = { /** * HEX or RGB color code for display. */ code?: string; /** * Description line color name in site's default language. */ original?: string; /** * Description line color name translated into buyer's language. Defaults to `original` when not defined. */ translated?: string; }; type CommonAddress = { /** * Main address line, usually street and number as free text. */ addressLine?: string; /** * Main address line, usually street and number as free text. */ addressLine1?: string; /** * Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */ addressLine2?: string; /** * City name. */ city?: string; /** * Country code. */ country?: string; /** * Zip/postal code. */ postalCode?: string; /** * Street name and number. */ streetAddress?: wix_ecom_backend.CurrentCart.StreetAddress; /** * Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */ subdivision?: string; }; type CommonAddressStreetOneOf = { /** * Main address line, usually street and number as free text. */ addressLine?: string; /** * Street name and number. */ streetAddress?: wix_ecom_backend.CurrentCart.StreetAddress; }; type Coupon = { /** * Coupon ID. */ _id?: string; /** * Coupon code. */ code?: string; }; type CreateCartRequest = { /** * Cart info. */ cartInfo?: wix_ecom_backend.CurrentCart.Cart; /** * The code of an existing coupon to apply to the cart. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */ couponCode?: string; /** * Custom line items. */ customLineItems?: Array; /** * Catalog line items. */ lineItems?: Array; /** * Merchant discounts to apply to specific line items. If no `lineItemIds` are passed, the discount will apply to the whole cart. */ merchantDiscounts?: Array; }; type CreateCartResponse = { /** * Cart. */ cart?: wix_ecom_backend.CurrentCart.Cart; }; type CreateCheckoutFromCurrentCartOptions = { /** * Billing address. Used for calculating tax if all the items in the cart are not shippable. */ billingAddress?: wix_ecom_backend.CurrentCart.Address; /** * Sales channel type. Supported values: * + `"AMAZON"` * + `"BACKOFFICE_MERCHANT"` * + `"EBAY"` * + `"OTHER_PLATFORM"` * + `"POS"` * + `"WEB"` * + `"WISH"` * + `"WIX_APP_STORE"` * + `"WIX_INVOICES"` */ channelType?: string; /** * Mandatory when setting a billing or shipping address if the site visitor isn't logged in. */ email?: string; /** * Selected shipping option. */ selectedShippingOption?: wix_ecom_backend.CurrentCart.SelectedShippingOption; /** * Shipping address. Used for calculating tax and shipping (when applicable). */ shippingAddress?: wix_ecom_backend.CurrentCart.Address; }; type CreateCheckoutFromCurrentCartRequest = { /** * Billing address. Used for calculating tax if all the items in the cart are not shippable. */ billingAddress?: wix_ecom_backend.CurrentCart.Address; /** * Sales channel type. Supported values: * + `"AMAZON"` * + `"BACKOFFICE_MERCHANT"` * + `"EBAY"` * + `"OTHER_PLATFORM"` * + `"POS"` * + `"WEB"` * + `"WISH"` * + `"WIX_APP_STORE"` * + `"WIX_INVOICES"` */ channelType?: string; /** * Mandatory when setting a billing or shipping address if the site visitor isn't logged in. */ email?: string; /** * Selected shipping option. */ selectedShippingOption?: wix_ecom_backend.CurrentCart.SelectedShippingOption; /** * Shipping address. Used for calculating tax and shipping (when applicable). */ shippingAddress?: wix_ecom_backend.CurrentCart.Address; }; type CreateCheckoutRequest = { /** * Cart ID. */ _id: string; /** * Billing address. Used for calculating tax if all the items in the cart are not shippable. */ billingAddress?: wix_ecom_backend.CurrentCart.Address; /** * Sales channel type. Supported values: * + `"AMAZON"` * + `"BACKOFFICE_MERCHANT"` * + `"EBAY"` * + `"OTHER_PLATFORM"` * + `"POS"` * + `"WEB"` * + `"WISH"` * + `"WIX_APP_STORE"` * + `"WIX_INVOICES"` */ channelType?: string; /** * Mandatory when setting a billing or shipping address if the site visitor isn't logged in. */ email?: string; /** * Selected shipping option. */ selectedShippingOption?: wix_ecom_backend.CurrentCart.SelectedShippingOption; /** * Shipping address. Used for calculating tax and shipping (when applicable). */ shippingAddress?: wix_ecom_backend.CurrentCart.Address; }; type CreateCheckoutResponse = { /** * The newly created checkout's ID. */ checkoutId?: string; }; type Currency = { /** * Currency code */ code?: string; /** * Currency symbol */ symbol?: string; }; type CustomLineItem = { /** * Custom line item ID. Defaults to an auto-generated ID. */ _id?: string; /** * Custom line item description lines. Used for displaying the cart, checkout and order. */ descriptionLines?: Array; /** * Custom line item media. Supported formats: * + Link to an image/video from the [Wix Media Manager](https://support.wix.com/en/article/wix-media-about-the-media-manager) - `"wix:image://v1/3c76e2_c53...4ea4~mv2.jpg#originWidth=1000&originHeight=1000"`. * + An image from the web - `"http(s)://"`. */ media?: string; /** * Custom line item name. */ name?: string; /** * Custom line item price. */ price?: string; /** * Custom line item quantity. */ quantity?: number; }; type DeleteCartRequest = { /** * ID of the cart to delete. */ _id: string; }; type DeleteCartResponse = {}; type DeleteCurrentCartRequest = {}; type DeliveryLogistics = { /** * Expected delivery time, in free text. For example, "3-5 business days". */ deliveryTime?: string; /** * Instructions for caller, e.g for pickup: "Please deliver during opening hours, and please don't park in disabled parking spot". */ instructions?: string; /** * Pickup details. */ pickupDetails?: wix_ecom_backend.CurrentCart.PickupDetails; }; type Description = { /** * Subscription option description. */ original?: string; /** * Translated subscription option name. */ translated?: string; }; type DescriptionLine = { /** * Description line color value. */ colorInfo?: wix_ecom_backend.CurrentCart.Color; /** * Description line name. */ name?: wix_ecom_backend.CurrentCart.DescriptionLineName; /** * Description line plain text value. */ plainText?: wix_ecom_backend.CurrentCart.PlainTextValue; }; type DescriptionLineDescriptionLineValueOneOf = {}; type DescriptionLineName = { /** * Description line name in site's default language. */ original?: string; /** * Description line name translated into buyer's language. Defaults to `original` when not defined. */ translated?: string; }; type DescriptionLineValueOneOf = { /** * Description line color value. */ colorInfo?: wix_ecom_backend.CurrentCart.Color; /** * Description line plain text value. */ plainText?: wix_ecom_backend.CurrentCart.PlainTextValue; }; type Details = { applicationError?: wix_ecom_backend.CurrentCart.ApplicationError; /** * Deprecated in APIs. Used to enable migration from rendering arbitrary tracing to rest response. */ tracing?: Record; validationError?: wix_ecom_backend.CurrentCart.ValidationError; }; type DetailsKindOneOf = { applicationError?: wix_ecom_backend.CurrentCart.ApplicationError; validationError?: wix_ecom_backend.CurrentCart.ValidationError; }; type DiscountRule = { /** * Discount rule ID */ _id?: string; /** * Discount value. */ amount?: wix_ecom_backend.CurrentCart.MultiCurrencyPrice; /** * Discount rule name */ name?: wix_ecom_backend.CurrentCart.DiscountRuleName; }; type DiscountRuleName = { /** * Original discount rule name (in site's default language). */ original?: string; /** * Discount rule name translated into buyer's language. Defaults to `original` when not defined. */ translated?: string; }; type DomainEvent = { /** * random GUID so clients can tell if event was already handled */ _id?: string; actionEvent?: wix_ecom_backend.CurrentCart.ActionEvent; createdEvent?: wix_ecom_backend.CurrentCart.EntityCreatedEvent; deletedEvent?: wix_ecom_backend.CurrentCart.EntityDeletedEvent; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * Assuming that all messages including Actions have id * Example: The id of the specific order, the id of a specific campaign */ entityId?: string; /** * The time of the event. Useful if there was a delay in dipatching */ eventTime?: Date; extendedFieldsUpdatedEvent?: wix_ecom_backend.CurrentCart.ExtendedFieldsUpdatedEvent; /** * If present, indicates the action that triggered the event. */ originatedFrom?: string; /** * This is top level to ease client code dipatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** * A field that should be set if this event was triggered by an anonymize request. * For example you must set it to true when sending an event as a result of a GDPR right to be forgotten request. * NOTE: This field is not relevant for `EntityCreatedEvent` but is located here for better ergonomics of consumers. */ triggeredByAnonymizeRequest?: boolean; updatedEvent?: wix_ecom_backend.CurrentCart.EntityUpdatedEvent; }; type DomainEventBodyOneOf = { actionEvent?: wix_ecom_backend.CurrentCart.ActionEvent; createdEvent?: wix_ecom_backend.CurrentCart.EntityCreatedEvent; deletedEvent?: wix_ecom_backend.CurrentCart.EntityDeletedEvent; extendedFieldsUpdatedEvent?: wix_ecom_backend.CurrentCart.ExtendedFieldsUpdatedEvent; updatedEvent?: wix_ecom_backend.CurrentCart.EntityUpdatedEvent; }; type Empty = {}; type EntityCreatedEvent = { entityAsJson?: string; }; type EntityDeletedEvent = {}; type EntityUpdatedEvent = { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; }; type EstimateCurrentCartTotalsOptions = { /** * Billing address. Used for calculating tax if all the items in the cart are not shippable. */ billingAddress?: wix_ecom_backend.CurrentCart.Address; /** * The selected membership payment options and which line items they apply to. */ selectedMemberships?: wix_ecom_backend.CurrentCart.SelectedMemberships; /** * Selected shipping option. */ selectedShippingOption?: wix_ecom_backend.CurrentCart.SelectedShippingOption; /** * Shipping address. Used for calculating tax and shipping (when applicable). */ shippingAddress?: wix_ecom_backend.CurrentCart.Address; }; type EstimateCurrentCartTotalsRequest = { /** * Billing address. Used for calculating tax if all the items in the cart are not shippable. */ billingAddress?: wix_ecom_backend.CurrentCart.Address; /** * The selected membership payment options and which line items they apply to. */ selectedMemberships?: wix_ecom_backend.CurrentCart.SelectedMemberships; /** * Selected shipping option. */ selectedShippingOption?: wix_ecom_backend.CurrentCart.SelectedShippingOption; /** * Shipping address. Used for calculating tax and shipping (when applicable). */ shippingAddress?: wix_ecom_backend.CurrentCart.Address; }; type EstimateTotalsRequest = { /** * Cart ID. */ _id: string; /** * Billing address. Used for calculating tax if all the items in the cart are not shippable. */ billingAddress?: wix_ecom_backend.CurrentCart.Address; /** * The selected membership payment options and which line items they apply to. */ selectedMemberships?: wix_ecom_backend.CurrentCart.SelectedMemberships; /** * Selected shipping option. */ selectedShippingOption?: wix_ecom_backend.CurrentCart.SelectedShippingOption; /** * Shipping address. Used for calculating tax and shipping (when applicable). */ shippingAddress?: wix_ecom_backend.CurrentCart.Address; }; type EstimateTotalsResponse = { /** * Additional fees */ additionalFees?: Array; /** * Applied discounts. */ appliedDiscounts?: Array; /** * Calculated line items. */ calculatedLineItems?: Array; /** * Calculation errors. */ calculationErrors?: wix_ecom_backend.CurrentCart.CalculationErrors; /** * Cart. */ cart?: wix_ecom_backend.CurrentCart.Cart; /** * Currency used for pricing in this store. */ currency?: string; /** * Applied gift card. */ giftCard?: wix_ecom_backend.CurrentCart.GiftCard; /** * Information about valid and invalid memberships, and which ones are selected for usage. */ membershipOptions?: wix_ecom_backend.CurrentCart.MembershipOptions; /** * Remaining amount for the order to be fully paid. */ payLater?: wix_ecom_backend.CurrentCart.PriceSummary; /** * Minimal amount to pay in order to place the order. */ payNow?: wix_ecom_backend.CurrentCart.PriceSummary; /** * Price summary. */ priceSummary?: wix_ecom_backend.CurrentCart.PriceSummary; /** * Shipping information. */ shippingInfo?: wix_ecom_backend.CurrentCart.ShippingInformation; /** * Tax summary. */ taxSummary?: wix_ecom_backend.CurrentCart.TaxSummary; /** * Weight measurement unit - defaults to site's weight unit. Supported values: * + `"KG"` * + `"LB"` */ weightUnit?: string; }; type ExtendedFieldsUpdatedEvent = { currentEntityAsJson?: string; }; type FieldViolation = { data?: Object; description?: string; field?: string; /** * applicable when violated_rule=OTHER */ ruleName?: string; /** * Suppoerted values: * - `'DECIMAL_GT'` * - `'DECIMAL_GTE'` * - `'DECIMAL_LT'` * - `'DECIMAL_LTE'` * - `'DECIMAL_MAX_SCALE'` * - `'FORMAT'` * - `'INVALID_ENUM_VALUE'` * - `'MAX'` * - `'MAX_LENGTH'` * - `'MAX_SIZE'` * - `'MIN'` * - `'MIN_LENGTH'` * - `'MIN_SIZE'` * - `'OTHER'` * - `'REQUIRED_FIELD'` * - `'VALIDATION'` */ violatedRule?: string; }; type FullAddressContactDetails = { /** * Contact's company */ company?: string; /** * Email associated with the address */ email?: string; /** * Contact first name */ firstName?: string; /** * Contact last name */ lastName?: string; /** * Contact phone number */ phone?: string; /** * tax info (Currently usable only in Brazil) */ vatId?: wix_ecom_backend.CurrentCart.VatId; }; type GetCartByCheckoutIdRequest = { /** * Checkout ID. */ _id: string; }; type GetCartByCheckoutIdResponse = { /** * The requested cart. */ cart?: wix_ecom_backend.CurrentCart.Cart; }; type GetCartRequest = { /** * ID of the cart to retrieve. */ _id: string; }; type GetCartResponse = { /** * The requested cart. */ cart?: wix_ecom_backend.CurrentCart.Cart; }; type GetCurrentCartRequest = {}; type GetCurrentCartResponse = { /** * Current session's active cart. */ cart?: wix_ecom_backend.CurrentCart.Cart; }; type GiftCard = { /** * Gift Card ID. */ _id?: string; /** * Gift card value. */ amount?: wix_ecom_backend.CurrentCart.MultiCurrencyPrice; /** * App ID of the gift card provider. */ appId?: string; /** * Gift card obfuscated code. */ obfuscatedCode?: string; }; type Group = { /** * Item ID (when the coupon scope is limited to just one item). */ entityId?: string; /** * Coupon scope's group (e.g., product or collection in Wix Stores). See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values). */ name?: string; }; type InvalidMembership = { /** * Membership details. */ membership?: wix_ecom_backend.CurrentCart.Membership; /** * Reason why this membership is invalid and cannot be used. */ reason?: string; }; type ItemAvailabilityInfo = { /** * Quantity available. */ quantityAvailable?: number; /** * Item availability status. */ status?: string; }; type ItemTaxFullDetails = { /** * If breakdown exists, the sum of rates in the breakdown must equal `tax_rate`. */ rateBreakdown?: Array; /** * Tax rate %, as a decimal point between 0 and 1. */ taxRate?: string; /** * Amount for which tax is calculated. */ taxableAmount?: wix_ecom_backend.CurrentCart.MultiCurrencyPrice; /** * Calculated tax, based on `taxable_amount` and `tax_rate`. */ totalTax?: wix_ecom_backend.CurrentCart.MultiCurrencyPrice; }; type ItemType = { /** * Custom item type. */ custom?: string; /** * Preset item type. */ preset?: string; }; type ItemTypeItemTypeDataOneOf = { /** * Custom item type. */ custom?: string; /** * Preset item type. */ preset?: string; }; type LineItem = { /** * Line item ID. */ _id?: string; /** * Item availability details. */ availability?: wix_ecom_backend.CurrentCart.ItemAvailabilityInfo; /** * Catalog and item reference. Holds IDs for the item and the catalog it came from, as well as further optional info. */ catalogReference?: wix_ecom_backend.CurrentCart.CatalogReference; /** * Line item description lines. Used for displaying the cart, checkout and order. */ descriptionLines?: Array; /** * Item price **before** catalog-defined discount. Defaults to `price` when not provided. */ fullPrice?: wix_ecom_backend.CurrentCart.MultiCurrencyPrice; /** * Line item image details. */ image?: string; /** * Item type. Either a preset type or custom. */ itemType?: wix_ecom_backend.CurrentCart.ItemType; /** * Type of selected payment option for current item. Defaults to `"FULL_PAYMENT_ONLINE"`. * + `"FULL_PAYMENT_ONLINE"` - The entire payment for this item happens as part of the checkout. * + `"FULL_PAYMENT_OFFLINE"` - The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods. * + `"MEMBERSHIP"` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` will be 0. */ paymentOption?: string; /** * Physical properties of the item. When relevant, contains information such as SKU, item weight, and shippability. */ physicalProperties?: wix_ecom_backend.CurrentCart.PhysicalProperties; /** * Item price **after** catalog-defined discount and line item discounts. */ price?: wix_ecom_backend.CurrentCart.MultiCurrencyPrice; /** * Item price **before** line item discounts and **after** catalog-defined discount. Defaults to `price` when not provided. */ priceBeforeDiscounts?: wix_ecom_backend.CurrentCart.MultiCurrencyPrice; /** * Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". */ priceDescription?: wix_ecom_backend.CurrentCart.PriceDescription; /** * Item name. * + Stores - `product.name` * + Bookings - `service.info.name` * + Events - `ticket.name` */ productName?: wix_ecom_backend.CurrentCart.ProductName; /** * Item quantity. */ quantity?: number; /** * In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID. * + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID. * + in most cases, this field is the name as `catalogReference.catalogItemId`. * + Used in membership validation. */ rootCatalogItemId?: string; /** * Service properties. When relevant, this contains information such as date and number of participants. */ serviceProperties?: wix_ecom_backend.CurrentCart.ServiceProperties; /** * URL to the item's page on the site. */ url?: string; }; type LineItemPricesData = { /** * Total price **after** catalog-defined discount and line item discounts. */ lineItemPrice?: wix_ecom_backend.CurrentCart.MultiCurrencyPrice; /** * Catalog price after catalog discount and automatic discounts. */ price?: wix_ecom_backend.CurrentCart.MultiCurrencyPrice; /** * Item price **before** line item discounts and **after** catalog-defined discount. Defaults to `price` when not provided. */ priceBeforeDiscounts?: wix_ecom_backend.CurrentCart.MultiCurrencyPrice; /** * Tax details. */ taxDetails?: wix_ecom_backend.CurrentCart.ItemTaxFullDetails; /** * Total discount for all line items. */ totalDiscount?: wix_ecom_backend.CurrentCart.MultiCurrencyPrice; /** * Total price after discounts and after tax. */ totalPriceAfterTax?: wix_ecom_backend.CurrentCart.MultiCurrencyPrice; /** * Deprecated - please use `total_price_after_tax` minus `tax_details.total_tax` instead. */ totalPriceBeforeTax?: wix_ecom_backend.CurrentCart.MultiCurrencyPrice; }; type LineItemQuantityUpdate = { /** * Line item ID. */ _id?: string; /** * New quantity. Number must 1 or higher. */ quantity?: number; }; type Membership = { /** * Membership ID. */ _id?: string; /** * Additional data about this membership. */ additionalData?: Object; /** * ID of the application providing this payment option. */ appId?: string; /** * Optional - For a membership that has limited credits, information about credit usage. */ credits?: wix_ecom_backend.CurrentCart.MembershipPaymentCredits; /** * Optional - TMembership expiry date. */ expirationDate?: Date; /** * Line item IDs which are "paid" for by this membership. */ lineItemIds?: Array; /** * The name of this membership. */ name?: wix_ecom_backend.CurrentCart.MembershipName; }; type MembershipName = { /** * The name of this membership */ original?: string; /** * Membership name translated into buyer's language. Defaults to `original` when not defined. */ translated?: string; }; type MembershipOptions = { /** * List of payment options that can be used. */ eligibleMemberships?: Array; /** * List of payment options that are owned by the member, but cannot be used due to reason provided. */ invalidMemberships?: Array; /** * The selected membership payment options and which line items they apply to. */ selectedMemberships?: Array; }; type MembershipPaymentCredits = { /** * How much credit remained for this membership */ remaining?: number; /** * How much credit this membership has in total */ total?: number; }; type MerchantDiscount = { /** * Discount value. */ amount?: wix_ecom_backend.CurrentCart.MultiCurrencyPrice; }; type MerchantDiscountInput = { /** * Discount amount. */ amount?: string; /** * IDs of the line items the discount applies to. */ lineItemIds?: Array; }; type MultiCurrencyPrice = { /** * Amount. */ amount?: string; /** * Converted amount. */ convertedAmount?: string; /** * Amount formatted with currency symbol. */ formattedAmount?: string; /** * Converted amount formatted with currency symbol. */ formattedConvertedAmount?: string; }; type OtherCharge = { /** * Price of added cost. */ price?: wix_ecom_backend.CurrentCart.MultiCurrencyPrice; /** * Type of additional cost. */ type?: string; }; type PhysicalProperties = { /** * Whether this line item is shippable. */ shippable?: boolean; /** * Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku). */ sku?: string; /** * Line item weight. Measurement unit is taken from `order.weightUnit`. Supported values: * + `"KG"` * + `"LB"` */ weight?: number; }; type PickupDetails = { /** * Pickup address. */ address?: wix_ecom_backend.CurrentCart.Address; /** * Whether the pickup address is that of a business - this may effect tax calculation. */ businessLocation?: boolean; /** * Pickup method */ pickupMethod?: string; }; type PlainTextValue = { /** * Description line plain text value in site's default language. */ original?: string; /** * Description line plain text value translated into buyer's language. Defaults to `original` when not defined. */ translated?: string; }; type PriceDescription = { /** * **Required** - Original price description (in site's default language). */ original?: string; /** * Product name translated into buyer's language. Defaults to `original` when not defined. */ translated?: string; }; type PriceSummary = { /** * Total additional fees price. */ additionalFees?: wix_ecom_backend.CurrentCart.MultiCurrencyPrice; /** * Total calculated discount value. */ discount?: wix_ecom_backend.CurrentCart.MultiCurrencyPrice; /** * Total shipping price, before discounts and before tax. */ shipping?: wix_ecom_backend.CurrentCart.MultiCurrencyPrice; /** * Subtotal of all line items, before discounts and before tax. */ subtotal?: wix_ecom_backend.CurrentCart.MultiCurrencyPrice; /** * Total tax. */ tax?: wix_ecom_backend.CurrentCart.MultiCurrencyPrice; /** * Total price after discounts, gift cards, and tax. */ total?: wix_ecom_backend.CurrentCart.MultiCurrencyPrice; }; type ProductName = { /** * *Required** - Original product name (in site's default language). */ original?: string; /** * Description product name translated into buyer's language. Defaults to `original` when not defined. */ translated?: string; }; type RemoveCouponFromCurrentCartRequest = {}; type RemoveCouponRequest = { /** * Cart ID. */ _id: string; }; type RemoveCouponResponse = { /** * Updated cart. */ cart?: wix_ecom_backend.CurrentCart.Cart; }; type RemoveLineItemsFromCurrentCartRequest = { /** * IDs of the line items to remove from the cart. */ lineItemIds: Array; }; type RemoveLineItemsRequest = { /** * Cart ID. */ _id: string; /** * IDs of the line items to remove from the cart. */ lineItemIds: Array; }; type RemoveLineItemsResponse = { /** * Updated cart. */ cart?: wix_ecom_backend.CurrentCart.Cart; }; type Scope = { /** * Coupon scope's applied group (e.g., event or ticket in Wix Events) */ group?: wix_ecom_backend.CurrentCart.Group; /** * Scope namespace (Wix Stores, Wix Bookings, Wix Events) */ namespace?: string; }; type SecuredMedia = { /** * Media ID in media manager. */ _id?: string; /** * Original file name. */ fileName?: string; /** * File type. */ fileType?: string; }; type SelectedCarrierServiceOption = { /** * This carrier's unique ID */ carrierId?: string; /** * Unique identifier of selected option. For example, "usps_std_overnight". */ code?: string; /** * Shipping costs. */ cost?: wix_ecom_backend.CurrentCart.SelectedCarrierServiceOptionPrices; /** * Delivery logistics. */ logistics?: wix_ecom_backend.CurrentCart.DeliveryLogistics; /** * Other charges */ otherCharges?: Array; /** * Were we able to find the requested shipping option, or otherwise we fallback to the default one (the first) */ requestedShippingOption?: boolean; /** * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale). * For example, "Standard" or "First-Class Package International". */ title?: string; }; type SelectedCarrierServiceOptionOtherCharge = { /** * Price of added charge. */ cost?: wix_ecom_backend.CurrentCart.SelectedCarrierServiceOptionPrices; /** * Details of the charge, such as 'Full Coverage Insurance of up to 80% of value of shipment'. */ details?: string; /** * Type of additional cost. */ type?: string; }; type SelectedCarrierServiceOptionPrices = { /** * Shipping price before discount and before tax. */ price?: wix_ecom_backend.CurrentCart.MultiCurrencyPrice; /** * Tax details. */ taxDetails?: wix_ecom_backend.CurrentCart.ItemTaxFullDetails; /** * Shipping discount before tax. */ totalDiscount?: wix_ecom_backend.CurrentCart.MultiCurrencyPrice; /** * Total shipping price, after discount and after tax. */ totalPriceAfterTax?: wix_ecom_backend.CurrentCart.MultiCurrencyPrice; /** * Deprecated - please use `total_price_after_tax` minus `tax_details.total_tax` instead. */ totalPriceBeforeTax?: wix_ecom_backend.CurrentCart.MultiCurrencyPrice; }; type SelectedMembership = { /** * Membership ID. */ _id?: string; /** * ID of the app providing this payment option. */ appId?: string; /** * IDs of the line items this membership applies to. */ lineItemIds?: Array; }; type SelectedMemberships = { /** * Selected memberships. */ memberships?: Array; }; type SelectedShippingOption = { /** * Carrier ID. */ carrierId?: string; /** * Selected shipping option code. For example, "usps_std_overnight". */ code?: string; }; type ServiceProperties = { /** * The number of people participating in this service. For example, the number of people attending the class or the number of people per hotel room. */ numberOfParticipants?: number; /** * The date and time for which the service is supposed to be provided. For example, the time of the class. */ scheduledDate?: Date; }; type ShippingInfo = { /** * Pickup details when this object describes pickup */ pickupDetails?: wix_ecom_backend.CurrentCart.V1PickupDetails; /** * Shipment details when this object describes shipment */ shippingAddress?: wix_ecom_backend.CurrentCart.CartAddress; /** * Selected shipping rule details */ shippingRuleDetails?: wix_ecom_backend.CurrentCart.ShippingRuleDetails; }; type ShippingInfoDetailsOneOf = { /** * Pickup details when this object describes pickup */ pickupDetails?: wix_ecom_backend.CurrentCart.V1PickupDetails; /** * Shipment details when this object describes shipment */ shippingAddress?: wix_ecom_backend.CurrentCart.CartAddress; }; type ShippingInformation = { /** * All shipping options. */ carrierServiceOptions?: Array; /** * Shipping region. */ region?: wix_ecom_backend.CurrentCart.ShippingRegion; /** * Selected shipping option. */ selectedCarrierServiceOption?: wix_ecom_backend.CurrentCart.SelectedCarrierServiceOption; }; type ShippingOption = { /** * Unique code of provided shipping option like "usps_std_overnight". * For legacy calculators this would be the UUID of the option. */ code?: string; /** * Sipping price information. */ cost?: wix_ecom_backend.CurrentCart.ShippingPrice; /** * Delivery logistics. */ logistics?: wix_ecom_backend.CurrentCart.DeliveryLogistics; /** * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale). * For example, "Standard" or "First-Class Package International". */ title?: string; }; type ShippingPrice = { /** * Other costs such as insurance, handling & packaging for fragile items, etc. */ otherCharges?: Array; /** * Shipping price. */ price?: wix_ecom_backend.CurrentCart.MultiCurrencyPrice; }; type ShippingRegion = { /** * Shipping region ID. */ _id?: string; /** * Shipping region name. */ name?: string; }; type ShippingRuleDetails = { /** * Rule title (as provided by the store owner) */ deliveryOption?: string; /** * Shipping option delivery time */ estimatedDeliveryTime?: string; /** * Selected option ID */ optionId?: string; /** * Selected shipping rule ID */ ruleId?: string; }; type StreetAddress = { /** * Street name. */ name?: string; /** * Street number. */ number?: string; }; type Subdivision = { /** * Short subdivision code. */ code?: string; /** * Subdivision full name. */ name?: string; }; type SubscriptionOptionInfo = { /** * Subscription option description. */ description?: wix_ecom_backend.CurrentCart.Description; /** * Subscription option settings. */ subscriptionSettings?: wix_ecom_backend.CurrentCart.SubscriptionSettings; /** * Subscription option title. */ title?: wix_ecom_backend.CurrentCart.Title; }; type SubscriptionSettings = { /** * Whether subscription is renewed automatically at the end of each period. */ autoRenewal?: boolean; /** * Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`. */ billingCycles?: number; /** * Frequency of recurring payment. */ frequency?: string; }; type TaxCalculationDetails = { /** * Error details and reason for tax rate fallback. */ autoTaxFallbackDetails?: wix_ecom_backend.CurrentCart.AutoTaxFallbackCalculationDetails; /** * Reason the manual calculation was used. */ manualRateReason?: string; /** * Rate calculation type. Supported values: * + `"AUTO_RATE"` * + `"FALLBACK_RATE"` * + `"MANUAL_RATE"` * + `"NO_TAX_COLLECTED"` */ rateType?: string; }; type TaxCalculationDetailsCalculationDetailsOneOf = { /** * Details of the fallback rate calculation. */ autoTaxFallbackDetails?: wix_ecom_backend.CurrentCart.AutoTaxFallbackCalculationDetails; /** * Reason the manual calculation was used. */ manualRateReason?: string; }; type TaxRateBreakdown = { /** * Type of tax against which the calculation was performed. */ name?: string; /** * Rate at which this tax detail was calculated. */ rate?: string; /** * Amount of tax for this tax detail. */ tax?: wix_ecom_backend.CurrentCart.MultiCurrencyPrice; }; type TaxSummary = { /** * Tax calculator that was active when the order was created. */ calculationDetails?: wix_ecom_backend.CurrentCart.TaxCalculationDetails; /** * Amount for which tax is calculated, added from line items. */ taxableAmount?: wix_ecom_backend.CurrentCart.MultiCurrencyPrice; /** * Calculated tax, added from line items. */ totalTax?: wix_ecom_backend.CurrentCart.MultiCurrencyPrice; }; type Title = { /** * Subscription option name. */ original?: string; /** * Translated subscription option name. */ translated?: string; }; type Totals = { /** * Total calculated discount value, according to order.discount */ discount?: number; /** * Total line items quantity */ quantity?: number; /** * Total shipping price, including tax */ shipping?: number; /** * Subtotal of all line items, before tax */ subtotal?: number; /** * Total tax */ tax?: number; /** * Total price */ total?: number; /** * Total items weight */ weight?: number; }; type UpdateCartRequest = { /** * Cart info. */ cartInfo?: wix_ecom_backend.CurrentCart.Cart; /** * The code of an existing coupon to apply to the cart. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */ couponCode?: string; /** * Custom line items. */ customLineItems?: Array; /** * Catalog line items. */ lineItems?: Array; /** * Merchant discounts to apply to specific line items. If no `lineItemIds` are passed, the discount will be applied to the whole cart. */ merchantDiscounts?: Array; }; type UpdateCartResponse = { /** * Updated Cart. */ cart?: wix_ecom_backend.CurrentCart.Cart; }; type UpdateCurrentCartLineItemQuantityRequest = { /** * Line item IDs and their new quantity. */ lineItems: Array; }; type UpdateCurrentCartOptions = { /** * Cart info. */ cartInfo?: wix_ecom_backend.CurrentCart.Cart; /** * The code of an existing coupon to apply to the cart. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */ couponCode?: string; /** * Custom line items. */ customLineItems?: Array; /** * Catalog line items. */ lineItems?: Array; /** * Merchant discounts to apply to specific line items. If no `lineItemIds` are passed, the discount will be applied to the whole cart. */ merchantDiscounts?: Array; }; type UpdateLineItemsQuantityRequest = { /** * Cart ID. */ _id: string; /** * Line item IDs and their new quantity. */ lineItems: Array; }; type UpdateLineItemsQuantityResponse = { /** * Updated cart. */ cart?: wix_ecom_backend.CurrentCart.Cart; }; type V1BuyerInfo = { /** * Customer details */ _id?: string; /** * Customer's email address */ email?: string; /** * Customer's first name */ firstName?: string; /** * Customer's relationship to the website */ identityType?: string; /** * Customer's last name */ lastName?: string; /** * Customer's phone number */ phone?: string; }; type V1Coupon = { /** * Coupon ID. */ _id?: string; /** * Coupon value. */ amount?: wix_ecom_backend.CurrentCart.MultiCurrencyPrice; /** * Coupon code. */ code?: string; /** * Coupon name. */ name?: string; }; type V1MerchantDiscount = { /** * Discount value. */ amount?: wix_ecom_backend.CurrentCart.MultiCurrencyPrice; }; type V1PickupDetails = { /** * Customer details */ buyerDetails?: wix_ecom_backend.CurrentCart.BuyerDetails; /** * Pickup address */ pickupAddress?: wix_ecom_backend.CurrentCart.CommonAddress; /** * Store owner's pickup instructions */ pickupInstructions?: string; }; type ValidationError = { fieldViolations?: Array; }; type VatId = { /** * Customer's tax ID */ _id?: string; /** * tax type */ type?: string; }; } /** * [Read more](https://www.wix.com/corvid/reference/wix-ecom-backend.Events.html#) */ interface Events { /** * An event that triggers when a new cart is created. * [Read more](https://www.wix.com/corvid/reference/wix-ecom-backend.Events.html#onCartCreated) */ onCartCreated(event: wix_ecom_backend.Events.ecomV1CartCartCreated): void; /** * An event that triggers when a cart is deleted. * [Read more](https://www.wix.com/corvid/reference/wix-ecom-backend.Events.html#onCartDeleted) */ onCartDeleted(event: wix_ecom_backend.Events.ecomV1CartCartDeleted): void; /** * An event that triggers when a cart is updated. * [Read more](https://www.wix.com/corvid/reference/wix-ecom-backend.Events.html#onCartUpdated) */ onCartUpdated(event: wix_ecom_backend.Events.ecomV1CartCartUpdated): void; /** * An event that triggers when an order is approved. * [Read more](https://www.wix.com/corvid/reference/wix-ecom-backend.Events.html#onOrderApproved) */ onOrderApproved(event: wix_ecom_backend.Events.ecomV1OrderOrderApprovedEvent): void; } namespace Events { type ecomDiscountsV1DiscountRuleActionEvent = { bodyAsJson?: string; }; type ecomDiscountsV1DiscountRuleActiveTimeInfo = { /** * Discount rule active end time. */ end?: Date; /** * Discount rule active start time. */ start?: Date; }; type ecomDiscountsV1DiscountRuleAnd = { /** * Array of triggers. Currently chaining up to 2 triggers is supported. */ triggers?: Array; }; type ecomDiscountsV1DiscountRuleAppliedDiscount = { /** * Applied discount rule. */ appliedDiscountRule?: wix_ecom_backend.Events.ecomDiscountsV1DiscountRuleAppliedDiscountRule; /** * Discount type. */ discountType?: string; /** * IDs of line items the discount applies to. */ lineItemIds?: Array; }; type ecomDiscountsV1DiscountRuleAppliedDiscountRule = { /** * Discount rule ID. */ _id?: string; /** * Total discount amount from all line items the discount applied to. */ amount?: wix_ecom_backend.Events.ecomDiscountsV1DiscountRuleMultiCurrencyPrice; /** * Discount rule type. */ discountRuleType?: string; /** * Discount rule name. */ name?: wix_ecom_backend.Events.ecomDiscountsV1DiscountRuleDiscountRuleName; }; type ecomDiscountsV1DiscountRuleBackendEventMetadata = { entityId: string; eventTime: string; id: string; triggeredByAnonymizeRequest: boolean; }; type ecomDiscountsV1DiscountRuleCatalogItemFilter = { /** * Catalog App ID. For example, the Wix Stores `appId`, or the 3rd-party `appId`. */ catalogAppId?: string; /** * ID of the item within its Wix or 3rd-party catalog. For example, `productId` for Wix Stores. */ catalogItemIds?: Array; }; type ecomDiscountsV1DiscountRuleCatalogReference = { /** * ID of the catalog app. For example, the Wix Stores `appId`, or the 3rd-party `appId`. */ appId?: string; /** * ID of the item within its Wix or 3rd-party catalog. For example, `productId` for Wix Stores or `eventId` for Wix Events. */ catalogItemId?: string; /** * Additional info in key:value form. For example, `{"options":{"Size": "M", "Color": "Red"}}` or `{"variantId": ""}`. */ options?: Object; }; type ecomDiscountsV1DiscountRuleCreateDiscountRuleRequest = { /** * Discount rule info. */ discountRule: wix_ecom_backend.Events.ecomDiscountsV1DiscountRuleDiscountRule; }; type ecomDiscountsV1DiscountRuleCreateDiscountRuleResponse = { /** * Discount rule. */ discountRule?: wix_ecom_backend.Events.ecomDiscountsV1DiscountRuleDiscountRule; }; type ecomDiscountsV1DiscountRuleCursorPaging = { /** * Pointer to the next or previous page in the list of results. */ cursor?: string; /** * Number of items to load. */ limit?: number; }; type ecomDiscountsV1DiscountRuleCursors = { /** * Cursor pointing to next page in the list of results. */ next?: string; /** * Cursor pointing to previous page in the list of results. */ prev?: string; }; type ecomDiscountsV1DiscountRuleCustom = { /** * Trigger ID. */ _id?: string; /** * App ID of the trigger creator. */ appId?: string; /** * Optional - additional data in key:value form. * + This data will be passed to the Custom Triggers Service SPI. * + For example, for a weather trigger that would be eligible if temperature is above 30 degrees, params would be: `{ "minTemp": 30 }`. */ params?: Object; }; type ecomDiscountsV1DiscountRuleCustomFilter = { /** * Custom filter app ID. */ appId?: string; /** * Custom-filter related data in key:value form. * For example, an array of collectionIDs: `{ ["collectionId": "12345"], ["collectionId": "67890"] }`. */ params?: Object; }; type ecomDiscountsV1DiscountRuleDeleteDiscountRuleRequest = { /** * ID of the discount rule to delete. */ discountRuleId: string; }; type ecomDiscountsV1DiscountRuleDeleteDiscountRuleResponse = {}; type ecomDiscountsV1DiscountRuleDiscount = { /** * Discount type. */ discountType?: string; /** * Amount to be discounted from original price. */ fixedAmount?: string; /** * Fixed price. Line item will be fixed to this price. */ fixedPrice?: string; /** * Percentage to be discounted from original price. */ percentage?: number; /** * Data related to `SPECIFIC_ITEMS` target type. */ specificItemsInfo?: wix_ecom_backend.Events.ecomDiscountsV1DiscountRuleSpecificItemsInfo; /** * Type of the target this discount is applied to. */ targetType?: string; }; type ecomDiscountsV1DiscountRuleDiscountDiscountOneOf = { /** * Amount to be discounted from original price. */ fixedAmount?: string; /** * Fixed price. Line item will be fixed to this price. */ fixedPrice?: string; /** * Percentage to be discounted from original price. */ percentage?: number; }; type ecomDiscountsV1DiscountRuleDiscountRule = { /** * Date and time the discount rule was created. */ _createdDate?: Date; /** * Discount rule ID. */ _id?: string; /** * Date and time the discount rule was last updated. */ _updatedDate?: Date; /** * Whether the discount rule is active. */ active?: boolean; /** * Time frame when the discount rule is active. */ activeTimeInfo?: wix_ecom_backend.Events.ecomDiscountsV1DiscountRuleActiveTimeInfo; /** * Description of a set of discounts that can be performed, if the trigger/s is met. * Currently only a single discount is supported. */ discounts?: wix_ecom_backend.Events.ecomDiscountsV1DiscountRuleDiscounts; /** * Discount rule name. */ name?: string; /** * calculated string which describe the discount rule //WHAT CAN BE THE MAXIMAL VAL? */ offer?: string; /** * Revision number, which increments by 1 each time the discount rule is updated. * To prevent conflicting changes, the existing `revision` must be used when updating a discount rule. */ revision?: string; /** * Discount rule status. */ status?: string; /** * Discount rule trigger. Description of a set of conditions that must be fulfilled to perform pre-defined discounts (see `discounts` field). * Not providing a trigger means the discount rule will always be applied (if possible). */ trigger?: wix_ecom_backend.Events.ecomDiscountsV1DiscountRuleDiscountTrigger; /** * Number of times the discount rule was used. */ usageCount?: number; }; type ecomDiscountsV1DiscountRuleDiscountRuleCreated = { entity: wix_ecom_backend.Events.ecomDiscountsV1DiscountRuleDiscountRule; metadata: wix_ecom_backend.Events.ecomDiscountsV1DiscountRuleBackendEventMetadata; }; type ecomDiscountsV1DiscountRuleDiscountRuleDeleted = { metadata: wix_ecom_backend.Events.ecomDiscountsV1DiscountRuleBackendEventMetadata; }; type ecomDiscountsV1DiscountRuleDiscountRuleName = { /** * Original discount rule name (in site's default language). */ original?: string; /** * Translated discount rule name according to buyer language. Defaults to `original` when not provided. */ translated?: string; }; type ecomDiscountsV1DiscountRuleDiscountRuleUpdated = { entity: wix_ecom_backend.Events.ecomDiscountsV1DiscountRuleDiscountRule; metadata: wix_ecom_backend.Events.ecomDiscountsV1DiscountRuleBackendEventMetadata; }; type ecomDiscountsV1DiscountRuleDiscountTrigger = { /** * Chain multiple triggers with AND operator. */ and?: wix_ecom_backend.Events.ecomDiscountsV1DiscountRuleAnd; /** * Custom trigger. */ custom?: wix_ecom_backend.Events.ecomDiscountsV1DiscountRuleCustom; /** * Item quantity trigger. */ itemQuantityRange?: wix_ecom_backend.Events.ecomDiscountsV1DiscountRuleItemQuantityRange; /** * Subtotal trigger */ subtotalRange?: wix_ecom_backend.Events.ecomDiscountsV1DiscountRuleSubtotalRange; /** * Trigger Type */ triggerType?: string; }; type ecomDiscountsV1DiscountRuleDiscountTriggerTriggerOneOf = { /** * Chain multiple triggers with AND operator. */ and?: wix_ecom_backend.Events.ecomDiscountsV1DiscountRuleAnd; /** * Custom trigger. */ custom?: wix_ecom_backend.Events.ecomDiscountsV1DiscountRuleCustom; /** * Item quantity trigger. */ itemQuantityRange?: wix_ecom_backend.Events.ecomDiscountsV1DiscountRuleItemQuantityRange; /** * Subtotal trigger */ subtotalRange?: wix_ecom_backend.Events.ecomDiscountsV1DiscountRuleSubtotalRange; }; type ecomDiscountsV1DiscountRuleDiscounts = { /** * Discounts. */ values?: Array; }; type ecomDiscountsV1DiscountRuleDomainEvent = { /** * random GUID so clients can tell if event was already handled */ _id?: string; actionEvent?: wix_ecom_backend.Events.ecomDiscountsV1DiscountRuleActionEvent; createdEvent?: wix_ecom_backend.Events.ecomDiscountsV1DiscountRuleEntityCreatedEvent; deletedEvent?: wix_ecom_backend.Events.ecomDiscountsV1DiscountRuleEntityDeletedEvent; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * Assuming that all messages including Actions have id * Example: The id of the specific order, the id of a specific campaign */ entityId?: string; /** * The time of the event. Useful if there was a delay in dipatching */ eventTime?: Date; extendedFieldsUpdatedEvent?: wix_ecom_backend.Events.ecomDiscountsV1DiscountRuleExtendedFieldsUpdatedEvent; /** * If present, indicates the action that triggered the event. */ originatedFrom?: string; /** * This is top level to ease client code dipatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** * A field that should be set if this event was triggered by an anonymize request. * For example you must set it to true when sending an event as a result of a GDPR right to be forgotten request. * NOTE: This field is not relevant for `EntityCreatedEvent` but is located here for better ergonomics of consumers. */ triggeredByAnonymizeRequest?: boolean; updatedEvent?: wix_ecom_backend.Events.ecomDiscountsV1DiscountRuleEntityUpdatedEvent; }; type ecomDiscountsV1DiscountRuleDomainEventBodyOneOf = { actionEvent?: wix_ecom_backend.Events.ecomDiscountsV1DiscountRuleActionEvent; createdEvent?: wix_ecom_backend.Events.ecomDiscountsV1DiscountRuleEntityCreatedEvent; deletedEvent?: wix_ecom_backend.Events.ecomDiscountsV1DiscountRuleEntityDeletedEvent; extendedFieldsUpdatedEvent?: wix_ecom_backend.Events.ecomDiscountsV1DiscountRuleExtendedFieldsUpdatedEvent; updatedEvent?: wix_ecom_backend.Events.ecomDiscountsV1DiscountRuleEntityUpdatedEvent; }; type ecomDiscountsV1DiscountRuleEmpty = {}; type ecomDiscountsV1DiscountRuleEntityCreatedEvent = { entityAsJson?: string; }; type ecomDiscountsV1DiscountRuleEntityDeletedEvent = {}; type ecomDiscountsV1DiscountRuleEntityUpdatedEvent = { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; }; type ecomDiscountsV1DiscountRuleExtendedFieldsUpdatedEvent = { currentEntityAsJson?: string; }; type ecomDiscountsV1DiscountRuleGetAppliedDiscountsRequest = { /** * Line items for which to check for discount rules. */ lineItems?: Array; }; type ecomDiscountsV1DiscountRuleGetAppliedDiscountsResponse = { /** * All eligible discounts. */ appliedDiscounts?: Array; }; type ecomDiscountsV1DiscountRuleGetDiscountRuleRequest = { /** * ID of the discount rule to retrieve. */ discountRuleId: string; }; type ecomDiscountsV1DiscountRuleGetDiscountRuleResponse = { /** * The requested discount rule. */ discountRule?: wix_ecom_backend.Events.ecomDiscountsV1DiscountRuleDiscountRule; }; type ecomDiscountsV1DiscountRuleItemQuantityRange = { /** * Quantity range - from (inclusive). */ from?: number; /** * All associated scopes for `SPECIFIC_ITEMS` target type. */ scopes?: Array; /** * Quantity range - to (inclusive). */ to?: number; }; type ecomDiscountsV1DiscountRuleLineItem = { /** * Line item ID. */ _id?: string; /** * Optional - Catalog and item reference info. See [Catalog SPI](https://bo.wix.com/wix-docs/rest/ecommerce/catalog-spi/introduction) for more details. * Empty in the case of a custom line item. */ catalogReference?: wix_ecom_backend.Events.ecomDiscountsV1DiscountRuleCatalogReference; /** * Price. */ price?: string; /** * Quantity. */ quantity?: number; }; type ecomDiscountsV1DiscountRuleMultiCurrencyPrice = { /** * Amount. */ amount?: string; /** * Converted amount. */ convertedAmount?: string; /** * Amount formatted with currency symbol. */ formattedAmount?: string; /** * Converted amount formatted with currency symbol. */ formattedConvertedAmount?: string; }; type ecomDiscountsV1DiscountRulePlatformPaging = { /** * Number of items to load. */ limit?: number; /** * Number of items to skip in the current sort order. */ offset?: number; }; type ecomDiscountsV1DiscountRulePlatformPagingMetadata = { /** * The number of items returned in this response. */ count?: number; /** * Cursors to navigate through result pages. Returned if cursor paging was used. */ cursors?: wix_ecom_backend.Events.ecomDiscountsV1DiscountRuleCursors; /** * The offset which was requested. Returned if offset paging was used. */ offset?: number; /** * The total number of items that match the query. Returned if offset paging was used. */ total?: number; }; type ecomDiscountsV1DiscountRulePlatformQuery = { /** * Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */ cursorPaging?: wix_ecom_backend.Events.ecomDiscountsV1DiscountRuleCursorPaging; /** * Filter object. */ filter?: Object; /** * Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */ paging?: wix_ecom_backend.Events.ecomDiscountsV1DiscountRulePlatformPaging; /** * Sorting options. For example, `[{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]`. */ sort?: Array; }; type ecomDiscountsV1DiscountRulePlatformQueryPagingMethodOneOf = { /** * Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */ cursorPaging?: wix_ecom_backend.Events.ecomDiscountsV1DiscountRuleCursorPaging; /** * Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */ paging?: wix_ecom_backend.Events.ecomDiscountsV1DiscountRulePlatformPaging; }; type ecomDiscountsV1DiscountRuleQueryDiscountRulesRequest = { /** * Query options. */ query: wix_ecom_backend.Events.ecomDiscountsV1DiscountRulePlatformQuery; }; type ecomDiscountsV1DiscountRuleQueryDiscountRulesResponse = { /** * List of discount rules. */ discountRules?: Array; /** * Details on the paged set of results returned. */ pagingMetadata?: wix_ecom_backend.Events.ecomDiscountsV1DiscountRulePlatformPagingMetadata; }; type ecomDiscountsV1DiscountRuleScope = { /** * Scope ID. */ _id?: string; /** * Catalog item filter. Must be passed with `type."CATALOG_ITEM"`. */ catalogItemFilter?: wix_ecom_backend.Events.ecomDiscountsV1DiscountRuleCatalogItemFilter; /** * Custom filter. Must be passed with `type."CATALOG_ITEM"`. */ customFilter?: wix_ecom_backend.Events.ecomDiscountsV1DiscountRuleCustomFilter; /** * Scope type. */ type?: string; }; type ecomDiscountsV1DiscountRuleScopeScopeItemsOneOf = { /** * Catalog item filter. Must be passed with `type."CATALOG_ITEM"`. */ catalogItemFilter?: wix_ecom_backend.Events.ecomDiscountsV1DiscountRuleCatalogItemFilter; /** * Custom filter. Must be passed with `type."CATALOG_ITEM"`. */ customFilter?: wix_ecom_backend.Events.ecomDiscountsV1DiscountRuleCustomFilter; }; type ecomDiscountsV1DiscountRuleSorting = { /** * Name of the field to sort by. */ fieldName?: string; /** * Sort order. */ order?: string; }; type ecomDiscountsV1DiscountRuleSpecificItemsInfo = { /** * All associated scopes for `SPECIFIC_ITEMS` target type. */ scopes?: Array; }; type ecomDiscountsV1DiscountRuleSubtotalRange = { /** * Price range - from (inclusive). */ from?: string; /** * All associated scopes for `SPECIFIC_ITEMS` target type. * The trigger will be eligible if the line item is contained in one of the scopes. */ scopes?: Array; /** * Price range - to (inclusive). */ to?: string; }; type ecomDiscountsV1DiscountRuleUpdateDiscountRuleRequest = { /** * Discount rule info. */ discountRule: wix_ecom_backend.Events.ecomDiscountsV1DiscountRuleDiscountRule; }; type ecomDiscountsV1DiscountRuleUpdateDiscountRuleResponse = { /** * Updated discount rule. */ discountRule?: wix_ecom_backend.Events.ecomDiscountsV1DiscountRuleDiscountRule; }; type ecomV1CartActionEvent = { bodyAsJson?: string; }; type ecomV1CartAddToCartRequest = { /** * Cart ID. */ _id: string; /** * Custom line items. */ customLineItems?: Array; /** * Catalog line items. */ lineItems?: Array; }; type ecomV1CartAddToCartResponse = { /** * Updated cart. */ cart?: wix_ecom_backend.Events.ecomV1CartCart; }; type ecomV1CartAddToCurrentCartRequest = { /** * Custom line items. */ customLineItems?: Array; /** * Catalog line items. */ lineItems?: Array; }; type ecomV1CartAdditionalFee = { /** * Additional fee's unique code (or ID) for future processing */ code?: string; /** * Translated additional fee's name */ name?: string; /** * Additional fee's price */ price?: wix_ecom_backend.Events.ecomV1CartMultiCurrencyPrice; /** * Provider's app id */ providerAppId?: string; /** * Tax details */ taxDetails?: wix_ecom_backend.Events.ecomV1CartItemTaxFullDetails; }; type ecomV1CartAddress = { /** * Main address line (usually street name and number). */ addressLine1?: string; /** * Free text providing more detailed address info. Usually contains apt, suite, floor. */ addressLine2?: string; /** * City name. */ city?: string; /** * Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format. */ country?: string; /** * Postal or zip code. */ postalCode?: string; /** * Street address object, with number, name, and apartment number in separate fields. */ streetAddress?: wix_ecom_backend.Events.ecomV1CartStreetAddress; /** * Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format. */ subdivision?: string; }; type ecomV1CartAddressLocation = { /** * Address latitude. */ latitude?: number; /** * Address longitude. */ longitude?: number; }; type ecomV1CartAddressWithContact = { /** * Address. */ address?: wix_ecom_backend.Events.ecomV1CartAddress; /** * Contact details. */ contactDetails?: wix_ecom_backend.Events.ecomV1CartApiFullAddressContactDetails; }; type ecomV1CartApiFullAddressContactDetails = { /** * Company name. */ company?: string; /** * First name. */ firstName?: string; /** * Last name. */ lastName?: string; /** * Phone number. */ phone?: string; /** * Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set - UNSPECIFIED is not allowed. */ vatId?: wix_ecom_backend.Events.ecomV1CartVatId; }; type ecomV1CartApplicationError = { code?: string; data?: Object; description?: string; }; type ecomV1CartAppliedCoupon = { /** * Coupon code */ code?: string; /** * Converted discount value */ convertedDiscountValue?: string; /** * Coupon internal ID */ couponId?: string; /** * Type (e.g., moneyOff, percentOff) */ couponType?: string; /** * Discount value */ discountValue?: string; /** * Coupon name */ name?: string; }; type ecomV1CartAppliedDiscount = { /** * Coupon details. */ coupon?: wix_ecom_backend.Events.ecomV1CartV1Coupon; /** * Discount rule */ discountRule?: wix_ecom_backend.Events.ecomV1CartDiscountRule; /** * Discount type. */ discountType?: string; /** * IDs of line items the discount applies to. */ lineItemIds?: Array; /** * Merchant discount. */ merchantDiscount?: wix_ecom_backend.Events.ecomV1CartV1MerchantDiscount; }; type ecomV1CartAppliedDiscountDiscountSourceOneOf = { /** * Coupon details. */ coupon?: wix_ecom_backend.Events.ecomV1CartV1Coupon; /** * Discount rule */ discountRule?: wix_ecom_backend.Events.ecomV1CartDiscountRule; /** * Merchant discount. */ merchantDiscount?: wix_ecom_backend.Events.ecomV1CartV1MerchantDiscount; }; type ecomV1CartAutoTaxFallbackCalculationDetails = { /** * invalid request (i.e. address), timeout, internal error, license error, and others will be encoded here */ error?: wix_ecom_backend.Events.ecomV1CartApplicationError; /** * reason for fallback */ fallbackReason?: string; }; type ecomV1CartBackendEventMetadata = { entityId: string; eventTime: string; id: string; triggeredByAnonymizeRequest: boolean; }; type ecomV1CartBuyerDetails = { /** * Email address */ email?: string; /** * Customer's first name */ firstName?: string; /** * Customer's last name */ lastName?: string; /** * Phone number */ phone?: string; }; type ecomV1CartBuyerInfo = { /** * Contact ID. Auto-created if one does not yet exist. For more information, see [Contacts API](https://dev.wix.com/api/rest/contacts/contacts/introduction). */ contactId?: string; /** * Member ID - if the buyer is a site member. */ memberId?: string; /** * User ID - if the cart owner is a Wix user. */ userId?: string; /** * Visitor ID - if the buyer is **not** a site member. */ visitorId?: string; }; type ecomV1CartBuyerInfoIdOneOf = { /** * Member ID - if the buyer is a site member. */ memberId?: string; /** * User ID - if the cart owner is a Wix user. */ userId?: string; /** * Visitor ID - if the buyer is **not** a site member. */ visitorId?: string; }; type ecomV1CartCalculatedLineItem = { /** * Line item ID. */ lineItemId?: string; /** * Type of selected payment option for current item. Supported values: * + `"FULL_PAYMENT_ONLINE"` - The entire payment for this item will happen as part of the checkout * + `"FULL_PAYMENT_OFFLINE"` - The entire payment for this item will happen after the checkout * + `"MEMBERSHIP"` - This item cannot be paid via monetary payment options, only via non monetary option such membership. When this option is used, price must be set to 0 * + `"DEPOSIT_ONLINE"` - Partial payment of the given item will happen as part of the checkout. Amount to be paid is defined by deposit_amount field. */ paymentOption?: string; /** * Price breakdown for this line item. */ pricesBreakdown?: wix_ecom_backend.Events.ecomV1CartLineItemPricesData; }; type ecomV1CartCalculationErrors = { /** * Carrier errors. */ carrierErrors?: wix_ecom_backend.Events.ecomV1CartCarrierErrors; /** * Coupon calculation error. */ couponCalculationError?: wix_ecom_backend.Events.ecomV1CartDetails; /** * Discount Rule calculation error. */ discountsCalculationError?: wix_ecom_backend.Events.ecomV1CartDetails; /** * General shipping calculation error. */ generalShippingCalculationError?: wix_ecom_backend.Events.ecomV1CartDetails; /** * Gift card calculation error. */ giftCardCalculationError?: wix_ecom_backend.Events.ecomV1CartDetails; /** * Membership payment methods calculation errors * For example, will indicate that a line item that must be paid with membership payment doesn't have one or selected memberships are invalid */ membershipError?: wix_ecom_backend.Events.ecomV1CartDetails; /** * Order validation errors. */ orderValidationErrors?: Array; /** * Tax calculation error. */ taxCalculationError?: wix_ecom_backend.Events.ecomV1CartDetails; }; type ecomV1CartCalculationErrorsShippingCalculationErrorOneOf = { /** * Carrier errors. */ carrierErrors?: wix_ecom_backend.Events.ecomV1CartCarrierErrors; /** * General shipping calculation error. */ generalShippingCalculationError?: wix_ecom_backend.Events.ecomV1CartDetails; }; type ecomV1CartCarrierError = { /** * Carrier ID. */ carrierId?: string; /** * Error details. */ error?: wix_ecom_backend.Events.ecomV1CartDetails; }; type ecomV1CartCarrierErrors = { /** * Carrier errors. */ errors?: Array; }; type ecomV1CartCarrierServiceOption = { /** * Carrier ID. */ carrierId?: string; /** * Shipping options offered by this carrier for this request. */ shippingOptions?: Array; }; type ecomV1CartCart = { /** * Date and time the cart was created. */ _createdDate?: Date; /** * Cart ID. */ _id?: string; /** * Date and time the cart was updated. */ _updatedDate?: Date; /** * Cart discounts. */ appliedDiscounts?: Array; /** * Buyer information. */ buyerInfo?: wix_ecom_backend.Events.ecomV1CartBuyerInfo; /** * Language for communication with the buyer. Defaults to the site language. * For a site that supports multiple languages, this is the language the buyer selected. */ buyerLanguage?: string; /** * [Buyer note](https://support.wix.com/en/article/wix-stores-viewing-buyer-notes) left by the customer. */ buyerNote?: string; /** * ID of the checkout related to this cart. */ checkoutId?: string; /** * Contact info. */ contactInfo?: wix_ecom_backend.Events.ecomV1CartAddressWithContact; /** * All the converted prices are presented in this currency. */ conversionCurrency?: string; /** * Currency used for pricing. */ currency?: string; /** * Line items. */ lineItems?: Array; /** * Site language in which original values are shown. */ siteLanguage?: string; /** * Whether tax is included in line item prices. */ taxIncludedInPrices?: boolean; /** * Weight measurement unit - defaults to site's weight unit. */ weightUnit?: string; }; type ecomV1CartCartAddress = { /** * Address */ address?: wix_ecom_backend.Events.ecomV1CartCommonAddress; /** * Contact details */ contactDetails?: wix_ecom_backend.Events.ecomV1CartFullAddressContactDetails; }; type ecomV1CartCartCompletedEvent = { /** * Coupon applied to this cart */ appliedCoupon?: wix_ecom_backend.Events.ecomV1CartAppliedCoupon; /** * Customer's billing address */ billingAddress?: wix_ecom_backend.Events.ecomV1CartCartAddress; /** * Customer's Wix ID */ buyerInfo?: wix_ecom_backend.Events.ecomV1CartV1BuyerInfo; /** * Message from the customer */ buyerNote?: string; cartId?: string; /** * Time the cart was created */ completedTime?: Date; /** * Currency used for pricing in this store */ currency?: wix_ecom_backend.Events.ecomV1CartCurrency; /** * Cart shipping information */ shippingInfo?: wix_ecom_backend.Events.ecomV1CartShippingInfo; /** * Totals for order's line items */ totals?: wix_ecom_backend.Events.ecomV1CartTotals; /** * Weight unit used in this store */ weightUnit?: string; }; type ecomV1CartCartCreated = { entity: wix_ecom_backend.Events.ecomV1CartCart; metadata: wix_ecom_backend.Events.ecomV1CartBackendEventMetadata; }; type ecomV1CartCartDeleted = { metadata: wix_ecom_backend.Events.ecomV1CartBackendEventMetadata; }; type ecomV1CartCartDiscount = { /** * Coupon details. */ coupon?: wix_ecom_backend.Events.ecomV1CartCoupon; /** * Merchant discount. */ merchantDiscount?: wix_ecom_backend.Events.ecomV1CartMerchantDiscount; }; type ecomV1CartCartDiscountDiscountSourceOneOf = { /** * Coupon details. */ coupon?: wix_ecom_backend.Events.ecomV1CartCoupon; /** * Merchant discount. */ merchantDiscount?: wix_ecom_backend.Events.ecomV1CartMerchantDiscount; }; type ecomV1CartCartUpdated = { entity: wix_ecom_backend.Events.ecomV1CartCart; metadata: wix_ecom_backend.Events.ecomV1CartBackendEventMetadata; }; type ecomV1CartCatalogReference = { /** * ID of the catalog app. For example, the Wix Stores `appId`, or the 3rd-party `appId`. */ appId?: string; /** * ID of the item within its Wix or 3rd-party catalog. For example, `productId` for Wix Stores or `eventId` for Wix Events. */ catalogItemId?: string; /** * Additional info in key:value form. For example, `{"options":{"Size": "M", "Color": "Red"}}` or `{"variantId": ""}`. */ options?: Object; }; type ecomV1CartColor = { /** * Optional - HEX or RGB color code for display. */ code?: string; /** * Optional - Description line color name in site's default language. */ original?: string; /** * Optional - Translated description line color name according to buyer language. Defaults to `original` when not provided. */ translated?: string; }; type ecomV1CartCommonAddress = { /** * Main address line, usually street and number as free text. */ addressLine?: string; /** * Main address line, usually street and number as free text. */ addressLine1?: string; /** * Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */ addressLine2?: string; /** * City name. */ city?: string; /** * Country code. */ country?: string; /** * Zip/postal code. */ postalCode?: string; /** * Street name and number. */ streetAddress?: wix_ecom_backend.Events.ecomV1CartStreetAddress; /** * Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */ subdivision?: string; }; type ecomV1CartCommonAddressStreetOneOf = { /** * Main address line, usually street and number as free text. */ addressLine?: string; /** * Street name and number. */ streetAddress?: wix_ecom_backend.Events.ecomV1CartStreetAddress; }; type ecomV1CartCoupon = { /** * Coupon ID. */ _id?: string; /** * Coupon code. */ code?: string; }; type ecomV1CartCreateCartRequest = { /** * Cart info. */ cartInfo?: wix_ecom_backend.Events.ecomV1CartCart; /** * Code of an existing coupon to apply to cart. For more information, see [Coupons API](https://dev.wix.com/api/rest/wix-coupons/coupons/introduction). */ couponCode?: string; /** * Custom line items. */ customLineItems?: Array; /** * Catalog line items. */ lineItems?: Array; /** * Merchant discounts to apply to specific line items. If no `lineItemIds` are passed, the discount will be applied to the whole cart. */ merchantDiscounts?: Array; }; type ecomV1CartCreateCartResponse = { /** * Cart. */ cart?: wix_ecom_backend.Events.ecomV1CartCart; }; type ecomV1CartCreateCheckoutFromCurrentCartRequest = { /** * Billing address. Used for calculating tax if all the items in the cart are not shippable. */ billingAddress?: wix_ecom_backend.Events.ecomV1CartAddress; /** * Sales channel type. */ channelType?: string; /** * Mandatory when setting billing or shipping address and user is not logged in. */ email?: string; /** * Selected shipping option. */ selectedShippingOption?: wix_ecom_backend.Events.ecomV1CartSelectedShippingOption; /** * Shipping address. Used for calculating tax and shipping (when applicable). */ shippingAddress?: wix_ecom_backend.Events.ecomV1CartAddress; }; type ecomV1CartCreateCheckoutRequest = { /** * Cart ID. */ _id: string; /** * Billing address. Used for calculating tax if all the items in the cart are not shippable. */ billingAddress?: wix_ecom_backend.Events.ecomV1CartAddress; /** * Sales channel type. */ channelType?: string; /** * Mandatory when setting a billing or shipping address if the site visitor isn't logged in. */ email?: string; /** * Selected shipping option. */ selectedShippingOption?: wix_ecom_backend.Events.ecomV1CartSelectedShippingOption; /** * Shipping address. Used for calculating tax and shipping (when applicable). */ shippingAddress?: wix_ecom_backend.Events.ecomV1CartAddress; }; type ecomV1CartCreateCheckoutResponse = { /** * The newly created checkout's ID. */ checkoutId?: string; }; type ecomV1CartCurrency = { /** * Currency code */ code?: string; /** * Currency symbol */ symbol?: string; }; type ecomV1CartCustomLineItem = { /** * Custom line item ID. Defaults to an auto-generated ID. */ _id?: string; /** * Custom line item description lines. Used for display purposes for the cart, checkout and order. */ descriptionLines?: Array; /** * Custom line item's media. */ media?: string; /** * Custom line item name. */ name?: string; /** * Custom line item price. */ price?: string; /** * Custom line item quantity. */ quantity?: number; }; type ecomV1CartDeleteCartRequest = { /** * ID of the cart to delete. */ _id: string; }; type ecomV1CartDeleteCartResponse = {}; type ecomV1CartDeleteCurrentCartRequest = {}; type ecomV1CartDeliveryLogistics = { /** * Expected delivery time, in free text. For example, "3-5 business days". */ deliveryTime?: string; /** * Instructions for caller, e.g for pickup: "Please deliver during opening hours, and please don't park in disabled parking spot". */ instructions?: string; /** * Pickup details. */ pickupDetails?: wix_ecom_backend.Events.ecomV1CartPickupDetails; }; type ecomV1CartDescription = { /** * Subscription option description. */ original?: string; /** * Translated subscription option name. */ translated?: string; }; type ecomV1CartDescriptionLine = { /** * Description line color value. */ colorInfo?: wix_ecom_backend.Events.ecomV1CartColor; /** * Description line name. */ name?: wix_ecom_backend.Events.ecomV1CartDescriptionLineName; /** * Description line plain text value. */ plainText?: wix_ecom_backend.Events.ecomV1CartPlainTextValue; }; type ecomV1CartDescriptionLineDescriptionLineValueOneOf = {}; type ecomV1CartDescriptionLineName = { /** * Optional - Description line name in site's default language. */ original?: string; /** * Optional - Translated description line item according to buyer language. Defaults to `original` when not provided. */ translated?: string; }; type ecomV1CartDescriptionLineValueOneOf = { /** * Description line color value. */ colorInfo?: wix_ecom_backend.Events.ecomV1CartColor; /** * Description line plain text value. */ plainText?: wix_ecom_backend.Events.ecomV1CartPlainTextValue; }; type ecomV1CartDetails = { applicationError?: wix_ecom_backend.Events.ecomV1CartApplicationError; /** * deprecated in API's - to enable migration from rendering arbitrary tracing to rest response */ tracing?: Record; validationError?: wix_ecom_backend.Events.ecomV1CartValidationError; }; type ecomV1CartDetailsKindOneOf = { applicationError?: wix_ecom_backend.Events.ecomV1CartApplicationError; validationError?: wix_ecom_backend.Events.ecomV1CartValidationError; }; type ecomV1CartDiscountRule = { /** * Discount rule ID */ _id?: string; /** * Discount value. */ amount?: wix_ecom_backend.Events.ecomV1CartMultiCurrencyPrice; /** * Discount rule name */ name?: wix_ecom_backend.Events.ecomV1CartDiscountRuleName; }; type ecomV1CartDiscountRuleName = { /** * Original discount rule name (in site's default language). */ original?: string; /** * Translated discount rule name according to buyer language. Defaults to `original` when not provided. */ translated?: string; }; type ecomV1CartDomainEvent = { /** * random GUID so clients can tell if event was already handled */ _id?: string; actionEvent?: wix_ecom_backend.Events.ecomV1CartActionEvent; createdEvent?: wix_ecom_backend.Events.ecomV1CartEntityCreatedEvent; deletedEvent?: wix_ecom_backend.Events.ecomV1CartEntityDeletedEvent; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * Assuming that all messages including Actions have id * Example: The id of the specific order, the id of a specific campaign */ entityId?: string; /** * The time of the event. Useful if there was a delay in dipatching */ eventTime?: Date; extendedFieldsUpdatedEvent?: wix_ecom_backend.Events.ecomV1CartExtendedFieldsUpdatedEvent; /** * If present, indicates the action that triggered the event. */ originatedFrom?: string; /** * This is top level to ease client code dipatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** * A field that should be set if this event was triggered by an anonymize request. * For example you must set it to true when sending an event as a result of a GDPR right to be forgotten request. * NOTE: This field is not relevant for `EntityCreatedEvent` but is located here for better ergonomics of consumers. */ triggeredByAnonymizeRequest?: boolean; updatedEvent?: wix_ecom_backend.Events.ecomV1CartEntityUpdatedEvent; }; type ecomV1CartDomainEventBodyOneOf = { actionEvent?: wix_ecom_backend.Events.ecomV1CartActionEvent; createdEvent?: wix_ecom_backend.Events.ecomV1CartEntityCreatedEvent; deletedEvent?: wix_ecom_backend.Events.ecomV1CartEntityDeletedEvent; extendedFieldsUpdatedEvent?: wix_ecom_backend.Events.ecomV1CartExtendedFieldsUpdatedEvent; updatedEvent?: wix_ecom_backend.Events.ecomV1CartEntityUpdatedEvent; }; type ecomV1CartEmpty = {}; type ecomV1CartEntityCreatedEvent = { entityAsJson?: string; }; type ecomV1CartEntityDeletedEvent = {}; type ecomV1CartEntityUpdatedEvent = { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; }; type ecomV1CartEstimateCurrentCartTotalsRequest = { /** * Billing address. Used for calculating tax if all the items in the cart are not shippable. */ billingAddress?: wix_ecom_backend.Events.ecomV1CartAddress; /** * The selected membership payment options and which line items they apply to. */ selectedMemberships?: wix_ecom_backend.Events.ecomV1CartSelectedMemberships; /** * Selected shipping option. */ selectedShippingOption?: wix_ecom_backend.Events.ecomV1CartSelectedShippingOption; /** * Shipping address. Used for calculating tax and shipping (when applicable). */ shippingAddress?: wix_ecom_backend.Events.ecomV1CartAddress; }; type ecomV1CartEstimateTotalsRequest = { /** * Cart ID. */ _id: string; /** * Billing address. Used for calculating tax if all the items in the cart are not shippable. */ billingAddress?: wix_ecom_backend.Events.ecomV1CartAddress; /** * The selected membership payment options and which line items they apply to. */ selectedMemberships?: wix_ecom_backend.Events.ecomV1CartSelectedMemberships; /** * Selected shipping option. */ selectedShippingOption?: wix_ecom_backend.Events.ecomV1CartSelectedShippingOption; /** * Shipping address. Used for calculating tax and shipping (when applicable). */ shippingAddress?: wix_ecom_backend.Events.ecomV1CartAddress; }; type ecomV1CartEstimateTotalsResponse = { /** * Additional fees */ additionalFees?: Array; /** * Applied discounts. */ appliedDiscounts?: Array; /** * Calculated line items. */ calculatedLineItems?: Array; /** * Calculation errors. */ calculationErrors?: wix_ecom_backend.Events.ecomV1CartCalculationErrors; /** * Cart. */ cart?: wix_ecom_backend.Events.ecomV1CartCart; /** * Currency used for pricing in this store. */ currency?: string; /** * Applied gift card. */ giftCard?: wix_ecom_backend.Events.ecomV1CartGiftCard; /** * Information about valid and invalid memberships, and which ones are selected for usage. */ membershipOptions?: wix_ecom_backend.Events.ecomV1CartMembershipOptions; /** * Remaining amount for the order to be fully paid. */ payLater?: wix_ecom_backend.Events.ecomV1CartPriceSummary; /** * Minimal amount to pay in order to place the order. */ payNow?: wix_ecom_backend.Events.ecomV1CartPriceSummary; /** * Price summary. */ priceSummary?: wix_ecom_backend.Events.ecomV1CartPriceSummary; /** * Shipping information. */ shippingInfo?: wix_ecom_backend.Events.ecomV1CartShippingInformation; /** * Tax summary. */ taxSummary?: wix_ecom_backend.Events.ecomV1CartTaxSummary; /** * Weight measurement unit - defaults to site's weight unit. */ weightUnit?: string; }; type ecomV1CartExtendedFieldsUpdatedEvent = { currentEntityAsJson?: string; }; type ecomV1CartFieldViolation = { data?: Object; description?: string; field?: string; /** * applicable when violated_rule=OTHER */ ruleName?: string; /** * Suppoerted values: * - `'DECIMAL_GT'` * - `'DECIMAL_GTE'` * - `'DECIMAL_LT'` * - `'DECIMAL_LTE'` * - `'DECIMAL_MAX_SCALE'` * - `'FORMAT'` * - `'INVALID_ENUM_VALUE'` * - `'MAX'` * - `'MAX_LENGTH'` * - `'MAX_SIZE'` * - `'MIN'` * - `'MIN_LENGTH'` * - `'MIN_SIZE'` * - `'OTHER'` * - `'REQUIRED_FIELD'` * - `'VALIDATION'` */ violatedRule?: string; }; type ecomV1CartFullAddressContactDetails = { /** * Contact's company */ company?: string; /** * Email associated with the address */ email?: string; /** * Contact first name */ firstName?: string; /** * Contact last name */ lastName?: string; /** * Contact phone number */ phone?: string; /** * tax info (Currently usable only in Brazil) */ vatId?: wix_ecom_backend.Events.ecomV1CartVatId; }; type ecomV1CartGetCartByCheckoutIdRequest = { /** * Checkout ID. */ _id: string; }; type ecomV1CartGetCartByCheckoutIdResponse = { /** * The requested cart. */ cart?: wix_ecom_backend.Events.ecomV1CartCart; }; type ecomV1CartGetCartRequest = { /** * Cart ID. */ _id: string; }; type ecomV1CartGetCartResponse = { /** * The requested cart. */ cart?: wix_ecom_backend.Events.ecomV1CartCart; }; type ecomV1CartGetCurrentCartRequest = {}; type ecomV1CartGetCurrentCartResponse = { /** * Current session's active cart. */ cart?: wix_ecom_backend.Events.ecomV1CartCart; }; type ecomV1CartGiftCard = { /** * Gift Card ID. */ _id?: string; /** * Gift card value. */ amount?: wix_ecom_backend.Events.ecomV1CartMultiCurrencyPrice; /** * App ID of the gift card provider. */ appId?: string; /** * Gift card obfuscated code. */ obfuscatedCode?: string; }; type ecomV1CartGroup = { /** * Item ID (when the coupon scope is limited to just one item). */ entityId?: string; /** * Coupon scope's group (e.g., product or collection in Wix Stores). See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values). */ name?: string; }; type ecomV1CartInvalidMembership = { /** * Membership details. */ membership?: wix_ecom_backend.Events.ecomV1CartMembership; /** * Reason why this membership is invalid and cannot be used. */ reason?: string; }; type ecomV1CartItemAvailabilityInfo = { /** * Quantity available. */ quantityAvailable?: number; /** * Item availability status. Supported Values: * + `"NOT_FOUND"`: Item does not exist * + `"NOT_AVAILABLE"`: Item not in stock * + `"PARTIALLY_AVAILABLE"`: Available quantity is less than requested */ status?: string; }; type ecomV1CartItemTaxFullDetails = { /** * If breakdown exists, the sum of rates in the breakdown must equal `tax_rate`. */ rateBreakdown?: Array; /** * Tax rate %, as a decimal point between 0 and 1. */ taxRate?: string; /** * Amount for which tax is calculated. */ taxableAmount?: wix_ecom_backend.Events.ecomV1CartMultiCurrencyPrice; /** * Calculated tax, based on `taxable_amount` and `tax_rate`. */ totalTax?: wix_ecom_backend.Events.ecomV1CartMultiCurrencyPrice; }; type ecomV1CartItemType = { /** * Custom item type. */ custom?: string; /** * Preset item type. */ preset?: string; }; type ecomV1CartItemTypeItemTypeDataOneOf = { /** * Custom item type. */ custom?: string; /** * Preset item type. */ preset?: string; }; type ecomV1CartLineItem = { /** * Line item ID. */ _id?: string; /** * Item availability details. */ availability?: wix_ecom_backend.Events.ecomV1CartItemAvailabilityInfo; /** * Catalog and item reference info. See [Catalog SPI](https://bo.wix.com/wix-docs/rest/ecommerce/catalog-spi/introduction) for more details. * Empty in the case of a custom line item. */ catalogReference?: wix_ecom_backend.Events.ecomV1CartCatalogReference; /** * Line item description lines. Used for display purposes for the cart, checkout and order. */ descriptionLines?: Array; /** * Item price **before** catalog-defined discount. Defaults to `price` when not provided. */ fullPrice?: wix_ecom_backend.Events.ecomV1CartMultiCurrencyPrice; /** * Line item image details. */ image?: string; /** * Item type. Either a preset type or custom. */ itemType?: wix_ecom_backend.Events.ecomV1CartItemType; /** * Type of selected payment option for current item. Defaults to `FULL_PAYMENT_ONLINE`. * + `FULL_PAYMENT_ONLINE` - The entire payment for this item happens as part of the checkout. * + `FULL_PAYMENT_OFFLINE` - The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods. * + `MEMBERSHIP` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0. */ paymentOption?: string; /** * Physical properties of the item. When relevant, contains information such as SKU, item weight, and shippability. */ physicalProperties?: wix_ecom_backend.Events.ecomV1CartPhysicalProperties; /** * Item price **after** catalog-defined discount and line item discounts. */ price?: wix_ecom_backend.Events.ecomV1CartMultiCurrencyPrice; /** * Item price **before** line item discounts and **after** catalog-defined discount. Defaults to `price` when not provided. */ priceBeforeDiscounts?: wix_ecom_backend.Events.ecomV1CartMultiCurrencyPrice; /** * Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". */ priceDescription?: wix_ecom_backend.Events.ecomV1CartPriceDescription; /** * Item name. * + Stores - `product.name` * + Bookings - `service.info.name` * + Events - `ticket.name` */ productName?: wix_ecom_backend.Events.ecomV1CartProductName; /** * Item quantity. */ quantity?: number; /** * In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID. * + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID. * + in most cases, this field is the name as `catalogReference.catalogItemId`. * + Used in membership validation. */ rootCatalogItemId?: string; /** * Service properties. When relevant, this contains information such as date and number of participants. */ serviceProperties?: wix_ecom_backend.Events.ecomV1CartServiceProperties; /** * URL to the item's page on the site. */ url?: string; }; type ecomV1CartLineItemPricesData = { /** * Total price **after** catalog-defined discount and line item discounts. */ lineItemPrice?: wix_ecom_backend.Events.ecomV1CartMultiCurrencyPrice; /** * Catalog price after catalog discount and automatic discounts. */ price?: wix_ecom_backend.Events.ecomV1CartMultiCurrencyPrice; /** * Item price **before** line item discounts and **after** catalog-defined discount. Defaults to `price` when not provided. */ priceBeforeDiscounts?: wix_ecom_backend.Events.ecomV1CartMultiCurrencyPrice; /** * Tax details. */ taxDetails?: wix_ecom_backend.Events.ecomV1CartItemTaxFullDetails; /** * Total discount for all line items. */ totalDiscount?: wix_ecom_backend.Events.ecomV1CartMultiCurrencyPrice; /** * Total price after discounts and after tax. */ totalPriceAfterTax?: wix_ecom_backend.Events.ecomV1CartMultiCurrencyPrice; /** * Deprecated - please use `total_price_after_tax` minus `tax_details.total_tax` instead. */ totalPriceBeforeTax?: wix_ecom_backend.Events.ecomV1CartMultiCurrencyPrice; }; type ecomV1CartLineItemQuantityUpdate = { /** * Line item ID. */ _id?: string; /** * New quantity. Number must 1 or higher. */ quantity?: number; }; type ecomV1CartMembership = { /** * Membership ID. */ _id?: string; /** * Additional data about this membership. */ additionalData?: Object; /** * ID of the application providing this payment option. */ appId?: string; /** * Optional - For a membership that has limited credits, information about credit usage. */ credits?: wix_ecom_backend.Events.ecomV1CartMembershipPaymentCredits; /** * Optional - TMembership expiry date. */ expirationDate?: Date; /** * Line item IDs which are "paid" for by this membership. */ lineItemIds?: Array; /** * The name of this membership. */ name?: wix_ecom_backend.Events.ecomV1CartMembershipName; }; type ecomV1CartMembershipName = { /** * The name of this membership */ original?: string; /** * Optional - Translated name of this membership. Defaults to `original` when not provided. */ translated?: string; }; type ecomV1CartMembershipOptions = { /** * List of payment options that can be used. */ eligibleMemberships?: Array; /** * List of payment options that are owned by the member, but cannot be used due to reason provided. */ invalidMemberships?: Array; /** * The selected membership payment options and which line items they apply to. */ selectedMemberships?: Array; }; type ecomV1CartMembershipPaymentCredits = { /** * How much credit remained for this membership */ remaining?: number; /** * How much credit this membership has in total */ total?: number; }; type ecomV1CartMerchantDiscount = { /** * Discount value. */ amount?: wix_ecom_backend.Events.ecomV1CartMultiCurrencyPrice; }; type ecomV1CartMerchantDiscountInput = { /** * Discount amount. */ amount?: string; /** * IDs of line items the discount applies to. */ lineItemIds?: Array; }; type ecomV1CartMultiCurrencyPrice = { /** * Amount. */ amount?: string; /** * Converted amount. */ convertedAmount?: string; /** * Amount formatted with currency symbol. */ formattedAmount?: string; /** * Converted amount formatted with currency symbol. */ formattedConvertedAmount?: string; }; type ecomV1CartOtherCharge = { /** * Price of added cost. */ price?: wix_ecom_backend.Events.ecomV1CartMultiCurrencyPrice; /** * Type of additional cost. */ type?: string; }; type ecomV1CartPhysicalProperties = { /** * Whether this line item is shippable. */ shippable?: boolean; /** * Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku). */ sku?: string; /** * Line item weight. Measurement unit (KG or LB) is taken from `order.weightUnit`. */ weight?: number; }; type ecomV1CartPickupDetails = { /** * Pickup address. */ address?: wix_ecom_backend.Events.ecomV1CartAddress; /** * Whether the pickup address is that of a business - this may effect tax calculation. */ businessLocation?: boolean; /** * Pickup method */ pickupMethod?: string; }; type ecomV1CartPlainTextValue = { /** * Optional - Description line plain text value in site's default language. */ original?: string; /** * Optional - Translated description line plain text value according to buyer language. Defaults to `original` when not provided. */ translated?: string; }; type ecomV1CartPriceDescription = { /** * Required** - Original price description (in site's default language). */ original?: string; /** * Optional - Translated product name according to buyer language. Defaults to `original` when not provided. */ translated?: string; }; type ecomV1CartPriceSummary = { /** * Total additional fees price. */ additionalFees?: wix_ecom_backend.Events.ecomV1CartMultiCurrencyPrice; /** * Total calculated discount value. */ discount?: wix_ecom_backend.Events.ecomV1CartMultiCurrencyPrice; /** * Total shipping price, before discounts and before tax. */ shipping?: wix_ecom_backend.Events.ecomV1CartMultiCurrencyPrice; /** * Subtotal of all line items, before discounts and before tax. */ subtotal?: wix_ecom_backend.Events.ecomV1CartMultiCurrencyPrice; /** * Total tax. */ tax?: wix_ecom_backend.Events.ecomV1CartMultiCurrencyPrice; /** * Total price after discounts, gift cards, and tax. */ total?: wix_ecom_backend.Events.ecomV1CartMultiCurrencyPrice; }; type ecomV1CartProductName = { /** * Required** - Original item name (in site's default language). */ original?: string; /** * Optional - Translated item name according to buyer language. Defaults to `original` when not provided. */ translated?: string; }; type ecomV1CartRemoveCouponFromCurrentCartRequest = {}; type ecomV1CartRemoveCouponRequest = { /** * Cart ID. */ _id: string; }; type ecomV1CartRemoveCouponResponse = { /** * Updated cart. */ cart?: wix_ecom_backend.Events.ecomV1CartCart; }; type ecomV1CartRemoveLineItemsFromCurrentCartRequest = { /** * Line item IDs to remove from cart. */ lineItemIds: Array; }; type ecomV1CartRemoveLineItemsRequest = { /** * Cart ID. */ _id: string; /** * Line item IDs to remove from cart. */ lineItemIds: Array; }; type ecomV1CartRemoveLineItemsResponse = { /** * Updated cart. */ cart?: wix_ecom_backend.Events.ecomV1CartCart; }; type ecomV1CartScope = { /** * Coupon scope's applied group (e.g., event or ticket in Wix Events) */ group?: wix_ecom_backend.Events.ecomV1CartGroup; /** * Scope namespace (Wix Stores, Wix Bookings, Wix Events) */ namespace?: string; }; type ecomV1CartSecuredMedia = { /** * Media ID in media manager. */ _id?: string; /** * Original file name. */ fileName?: string; /** * File type. */ fileType?: string; }; type ecomV1CartSelectedCarrierServiceOption = { /** * This carrier's unique ID */ carrierId?: string; /** * Unique identifier of selected option. For example, "usps_std_overnight". */ code?: string; /** * Shipping costs. */ cost?: wix_ecom_backend.Events.ecomV1CartSelectedCarrierServiceOptionPrices; /** * Delivery logistics. */ logistics?: wix_ecom_backend.Events.ecomV1CartDeliveryLogistics; /** * Other charges */ otherCharges?: Array; /** * Were we able to find the requested shipping option, or otherwise we fallback to the default one (the first) */ requestedShippingOption?: boolean; /** * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale). * For example, "Standard" or "First-Class Package International". */ title?: string; }; type ecomV1CartSelectedCarrierServiceOptionOtherCharge = { /** * Price of added charge. */ cost?: wix_ecom_backend.Events.ecomV1CartSelectedCarrierServiceOptionPrices; /** * Details of the charge, such as 'Full Coverage Insurance of up to 80% of value of shipment'. */ details?: string; /** * Type of additional cost. */ type?: string; }; type ecomV1CartSelectedCarrierServiceOptionPrices = { /** * Shipping price before discount and before tax. */ price?: wix_ecom_backend.Events.ecomV1CartMultiCurrencyPrice; /** * Tax details. */ taxDetails?: wix_ecom_backend.Events.ecomV1CartItemTaxFullDetails; /** * Shipping discount before tax. */ totalDiscount?: wix_ecom_backend.Events.ecomV1CartMultiCurrencyPrice; /** * Total shipping price, after discount and after tax. */ totalPriceAfterTax?: wix_ecom_backend.Events.ecomV1CartMultiCurrencyPrice; /** * Deprecated - please use `total_price_after_tax` minus `tax_details.total_tax` instead. */ totalPriceBeforeTax?: wix_ecom_backend.Events.ecomV1CartMultiCurrencyPrice; }; type ecomV1CartSelectedMembership = { /** * Membership ID. */ _id?: string; /** * ID of the app providing this payment option. */ appId?: string; /** * IDs of the line items this membership applies to. */ lineItemIds?: Array; }; type ecomV1CartSelectedMemberships = { /** * Selected memberships. */ memberships?: Array; }; type ecomV1CartSelectedShippingOption = { /** * Carrier ID. */ carrierId?: string; /** * Selected shipping option code. For example, "usps_std_overnight". */ code?: string; }; type ecomV1CartServiceProperties = { /** * Optional - The number of people participating in this service. For example, the number of people attending the class or the number of people per hotel room. */ numberOfParticipants?: number; /** * Optional - The date and time for which the service is supposed to be provided. For example, the time of the class. */ scheduledDate?: Date; }; type ecomV1CartShippingInfo = { /** * Pickup details when this object describes pickup */ pickupDetails?: wix_ecom_backend.Events.ecomV1CartV1PickupDetails; /** * Shipment details when this object describes shipment */ shippingAddress?: wix_ecom_backend.Events.ecomV1CartCartAddress; /** * Selected shipping rule details */ shippingRuleDetails?: wix_ecom_backend.Events.ecomV1CartShippingRuleDetails; }; type ecomV1CartShippingInfoDetailsOneOf = { /** * Pickup details when this object describes pickup */ pickupDetails?: wix_ecom_backend.Events.ecomV1CartV1PickupDetails; /** * Shipment details when this object describes shipment */ shippingAddress?: wix_ecom_backend.Events.ecomV1CartCartAddress; }; type ecomV1CartShippingInformation = { /** * All shipping options. */ carrierServiceOptions?: Array; /** * Shipping region. */ region?: wix_ecom_backend.Events.ecomV1CartShippingRegion; /** * Selected shipping option. */ selectedCarrierServiceOption?: wix_ecom_backend.Events.ecomV1CartSelectedCarrierServiceOption; }; type ecomV1CartShippingOption = { /** * Unique code of provided shipping option like "usps_std_overnight". * For legacy calculators this would be the UUID of the option. */ code?: string; /** * Sipping price information. */ cost?: wix_ecom_backend.Events.ecomV1CartShippingPrice; /** * Delivery logistics. */ logistics?: wix_ecom_backend.Events.ecomV1CartDeliveryLogistics; /** * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale). * For example, "Standard" or "First-Class Package International". */ title?: string; }; type ecomV1CartShippingPrice = { /** * Other costs such as insurance, handling & packaging for fragile items, etc. */ otherCharges?: Array; /** * Shipping price. */ price?: wix_ecom_backend.Events.ecomV1CartMultiCurrencyPrice; }; type ecomV1CartShippingRegion = { /** * Shipping region ID. */ _id?: string; /** * Shipping region name. */ name?: string; }; type ecomV1CartShippingRuleDetails = { /** * Rule title (as provided by the store owner) */ deliveryOption?: string; /** * Shipping option delivery time */ estimatedDeliveryTime?: string; /** * Selected option ID */ optionId?: string; /** * Selected shipping rule ID */ ruleId?: string; }; type ecomV1CartStreetAddress = { /** * Street name. */ name?: string; /** * Street number. */ number?: string; }; type ecomV1CartSubdivision = { /** * Short subdivision code. */ code?: string; /** * Subdivision full name. */ name?: string; }; type ecomV1CartSubscriptionOptionInfo = { /** * Subscription option description. */ description?: wix_ecom_backend.Events.ecomV1CartDescription; /** * Subscription option settings. */ subscriptionSettings?: wix_ecom_backend.Events.ecomV1CartSubscriptionSettings; /** * Subscription option title. */ title?: wix_ecom_backend.Events.ecomV1CartTitle; }; type ecomV1CartSubscriptionSettings = { /** * Whether subscription is renewed automatically at the end of each period. */ autoRenewal?: boolean; /** * Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`. */ billingCycles?: number; /** * Frequency of recurring payment. */ frequency?: string; }; type ecomV1CartTaxCalculationDetails = { /** * Details of the fallback rate calculation. */ autoTaxFallbackDetails?: wix_ecom_backend.Events.ecomV1CartAutoTaxFallbackCalculationDetails; /** * Reason the manual calculation was used. */ manualRateReason?: string; /** * Rate calculation type. */ rateType?: string; }; type ecomV1CartTaxCalculationDetailsCalculationDetailsOneOf = { /** * Details of the fallback rate calculation. */ autoTaxFallbackDetails?: wix_ecom_backend.Events.ecomV1CartAutoTaxFallbackCalculationDetails; /** * Reason the manual calculation was used. */ manualRateReason?: string; }; type ecomV1CartTaxRateBreakdown = { /** * Type of tax against which the calculation was performed. */ name?: string; /** * Rate at which this tax detail was calculated. */ rate?: string; /** * Amount of tax for this tax detail. */ tax?: wix_ecom_backend.Events.ecomV1CartMultiCurrencyPrice; }; type ecomV1CartTaxSummary = { /** * Tax calculator that was active when the order was created. */ calculationDetails?: wix_ecom_backend.Events.ecomV1CartTaxCalculationDetails; /** * Amount for which tax is calculated, added from line items. */ taxableAmount?: wix_ecom_backend.Events.ecomV1CartMultiCurrencyPrice; /** * Calculated tax, added from line items. */ totalTax?: wix_ecom_backend.Events.ecomV1CartMultiCurrencyPrice; }; type ecomV1CartTitle = { /** * Subscription option name. */ original?: string; /** * Translated subscription option name. */ translated?: string; }; type ecomV1CartTotals = { /** * Total calculated discount value, according to order.discount */ discount?: number; /** * Total line items quantity */ quantity?: number; /** * Total shipping price, including tax */ shipping?: number; /** * Subtotal of all line items, before tax */ subtotal?: number; /** * Total tax */ tax?: number; /** * Total price */ total?: number; /** * Total items weight */ weight?: number; }; type ecomV1CartUpdateCartRequest = { /** * Cart info. */ cartInfo?: wix_ecom_backend.Events.ecomV1CartCart; /** * Coupon code. For more information, see [Coupons API](https://dev.wix.com/api/rest/wix-coupons/coupons/introduction). */ couponCode?: string; /** * Custom line items. */ customLineItems?: Array; /** * Catalog line items. */ lineItems?: Array; /** * Merchant discounts to apply to specific line items. If no `lineItemIds` are passed, the discount will be applied to the whole cart. */ merchantDiscounts?: Array; }; type ecomV1CartUpdateCartResponse = { /** * Updated Cart. */ cart?: wix_ecom_backend.Events.ecomV1CartCart; }; type ecomV1CartUpdateCurrentCartLineItemQuantityRequest = { /** * Line item IDs and their new quantity. */ lineItems: Array; }; type ecomV1CartUpdateLineItemsQuantityRequest = { /** * Cart ID. */ _id: string; /** * Line item IDs and their new quantity. */ lineItems: Array; }; type ecomV1CartUpdateLineItemsQuantityResponse = { /** * Updated cart. */ cart?: wix_ecom_backend.Events.ecomV1CartCart; }; type ecomV1CartV1BuyerInfo = { /** * Customer details */ _id?: string; /** * Customer's email address */ email?: string; /** * Customer's first name */ firstName?: string; /** * Customer's relationship to the website */ identityType?: string; /** * Customer's last name */ lastName?: string; /** * Customer's phone number */ phone?: string; }; type ecomV1CartV1Coupon = { /** * Coupon ID. */ _id?: string; /** * Coupon value. */ amount?: wix_ecom_backend.Events.ecomV1CartMultiCurrencyPrice; /** * Coupon code. */ code?: string; /** * Coupon name. */ name?: string; }; type ecomV1CartV1MerchantDiscount = { /** * Discount value. */ amount?: wix_ecom_backend.Events.ecomV1CartMultiCurrencyPrice; }; type ecomV1CartV1PickupDetails = { /** * Customer details */ buyerDetails?: wix_ecom_backend.Events.ecomV1CartBuyerDetails; /** * Pickup address */ pickupAddress?: wix_ecom_backend.Events.ecomV1CartCommonAddress; /** * Store owner's pickup instructions */ pickupInstructions?: string; }; type ecomV1CartValidationError = { fieldViolations?: Array; }; type ecomV1CartVatId = { /** * Customer's tax ID */ _id?: string; /** * tax type */ type?: string; }; type ecomV1CheckoutActionEvent = { bodyAsJson?: string; }; type ecomV1CheckoutAdditionalFee = { /** * Additional fee's unique code (or ID) for future processing */ code?: string; /** * Translated additional fee's name */ name?: string; /** * Additional fee's price */ price?: wix_ecom_backend.Events.ecomV1CheckoutMultiCurrencyPrice; /** * Provider's app id */ providerAppId?: string; /** * Tax details */ taxDetails?: wix_ecom_backend.Events.ecomV1CheckoutItemTaxFullDetails; }; type ecomV1CheckoutAddress = { /** * Address line 1 (free text) */ addressLine1?: string; /** * address line */ addressLine2?: string; /** * City name */ city?: string; /** * Company name */ company?: string; /** * Country code (2 letters) */ country?: string; /** * Email address */ email?: string; /** * Addressee name */ fullName?: wix_ecom_backend.Events.ecomV1CheckoutFullName; /** * Phone number */ phone?: string; /** * Address line 1 (street) */ street?: wix_ecom_backend.Events.ecomV1CheckoutStreet; /** * State or district */ subdivision?: string; /** * Tax information (for Brazil only) */ vatId?: wix_ecom_backend.Events.ecomV1CheckoutVatId; /** * ZIP/postal code */ zipCode?: string; }; type ecomV1CheckoutAddressAddressLine1OptionsOneOf = { /** * Address line 1 (free text) */ addressLine1?: string; /** * Address line 1 (street) */ street?: wix_ecom_backend.Events.ecomV1CheckoutStreet; }; type ecomV1CheckoutAddressWithContact = { /** * Address. */ address?: wix_ecom_backend.Events.ecomV1CheckoutApiAddress; /** * Contact details. */ contactDetails?: wix_ecom_backend.Events.ecomV1CheckoutFullAddressContactDetails; }; type ecomV1CheckoutApiAddress = { /** * Main address line (usually street name and number). */ addressLine?: string; /** * Free text providing more detailed address info. Usually contains apt, suite, floor. */ addressLine2?: string; /** * City name. */ city?: string; /** * Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format. */ country?: string; /** * Country's full name. */ countryFullname?: string; /** * Postal or zip code. */ postalCode?: string; /** * Street address object, with number, name, and apartment number in separate fields. */ streetAddress?: wix_ecom_backend.Events.ecomV1CheckoutStreetAddress; /** * Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format. */ subdivision?: string; /** * Subdivision full-name. */ subdivisionFullname?: string; }; type ecomV1CheckoutApplicationError = { code?: string; data?: Object; description?: string; }; type ecomV1CheckoutAppliedCoupon = { /** * Coupon code */ code?: string; /** * Coupon ID */ couponId?: string; /** * Coupon name */ name?: string; }; type ecomV1CheckoutAppliedDiscount = { /** * Coupon details. */ coupon?: wix_ecom_backend.Events.ecomV1CheckoutCoupon; /** * Discount rule */ discountRule?: wix_ecom_backend.Events.ecomV1CheckoutDiscountRule; /** * Discount type. */ discountType?: string; /** * IDs of line items the discount applies to. */ lineItemIds?: Array; /** * Merchant discount. */ merchantDiscount?: wix_ecom_backend.Events.ecomV1CheckoutMerchantDiscount; }; type ecomV1CheckoutAppliedDiscountDiscountSourceOneOf = { /** * Coupon details. */ coupon?: wix_ecom_backend.Events.ecomV1CheckoutCoupon; /** * Discount rule */ discountRule?: wix_ecom_backend.Events.ecomV1CheckoutDiscountRule; /** * Merchant discount. */ merchantDiscount?: wix_ecom_backend.Events.ecomV1CheckoutMerchantDiscount; }; type ecomV1CheckoutAutoTaxFallbackCalculationDetails = { /** * invalid request (i.e. address), timeout, internal error, license error, and others will be encoded here */ error?: wix_ecom_backend.Events.ecomV1CheckoutApplicationError; /** * reason for fallback */ fallbackReason?: string; }; type ecomV1CheckoutBackendEventMetadata = { entityId: string; eventTime: string; id: string; triggeredByAnonymizeRequest: boolean; }; type ecomV1CheckoutBillingInfo = { /** * Full billing address */ address?: wix_ecom_backend.Events.ecomV1CheckoutAddress; /** * Deprecated (use paymentProviderTransactionId instead) */ externalTransactionId?: string; /** * Payment date */ paidDate?: Date; /** * Transaction ID from payment gateway (e.g., Wix Payments) */ paymentGatewayTransactionId?: string; /** * Payment method used for this order */ paymentMethod?: string; /** * Transaction ID from payment provider (e.g., PayPal, Square, Stripe) transaction ID */ paymentProviderTransactionId?: string; /** * Whether order can be refunded by payment provider (manually or automatic) */ refundableByPaymentProvider?: boolean; }; type ecomV1CheckoutBuyerInfo = { /** * Contact ID. Auto-created if one does not yet exist. For more information, see [Contacts API](https://dev.wix.com/api/rest/contacts/contacts/introduction). */ contactId?: string; /** * Buyer email address. */ email?: string; /** * Member ID (if site visitor is a site member). */ memberId?: string; /** * + When `true` - checkout doesn't have an owner yet and anyone can access it. The first to access it will be new owner. * + If `false`, the value in `checkout.createdBy` is the owner. */ openAccess?: boolean; /** * Visitor ID (if site visitor is **not** a member). */ visitorId?: string; }; type ecomV1CheckoutBuyerInfoIdOneOf = { /** * Member ID (if site visitor is a site member). */ memberId?: string; /** * + When `true` - checkout doesn't have an owner yet and anyone can access it. The first to access it will be new owner. * + If `false`, the value in `checkout.createdBy` is the owner. */ openAccess?: boolean; /** * Visitor ID (if site visitor is **not** a member). */ visitorId?: string; }; type ecomV1CheckoutCalculationErrors = { /** * Carrier errors. */ carrierErrors?: wix_ecom_backend.Events.ecomV1CheckoutCarrierErrors; /** * Coupon calculation error. */ couponCalculationError?: wix_ecom_backend.Events.ecomV1CheckoutDetails; /** * Discount Rule calculation error. */ discountsCalculationError?: wix_ecom_backend.Events.ecomV1CheckoutDetails; /** * General shipping calculation error. */ generalShippingCalculationError?: wix_ecom_backend.Events.ecomV1CheckoutDetails; /** * Gift card calculation error. */ giftCardCalculationError?: wix_ecom_backend.Events.ecomV1CheckoutDetails; /** * Membership payment methods calculation errors * For example, will indicate that a line item that must be paid with membership payment doesn't have one or selected memberships are invalid */ membershipError?: wix_ecom_backend.Events.ecomV1CheckoutDetails; /** * Order validation errors. */ orderValidationErrors?: Array; /** * Tax calculation error. */ taxCalculationError?: wix_ecom_backend.Events.ecomV1CheckoutDetails; }; type ecomV1CheckoutCalculationErrorsShippingCalculationErrorOneOf = { /** * Carrier errors. */ carrierErrors?: wix_ecom_backend.Events.ecomV1CheckoutCarrierErrors; /** * General shipping calculation error. */ generalShippingCalculationError?: wix_ecom_backend.Events.ecomV1CheckoutDetails; }; type ecomV1CheckoutCarrierError = { /** * Carrier ID. */ carrierId?: string; /** * Error details. */ error?: wix_ecom_backend.Events.ecomV1CheckoutDetails; }; type ecomV1CheckoutCarrierErrors = { /** * Carrier errors. */ errors?: Array; }; type ecomV1CheckoutCarrierServiceOption = { /** * Carrier ID. */ carrierId?: string; /** * Shipping options offered by this carrier for this request. */ shippingOptions?: Array; }; type ecomV1CheckoutCatalogReference = { /** * ID of the catalog app. For example, the Wix Stores `appId`, or the 3rd-party `appId`. */ appId?: string; /** * ID of the item within its Wix or 3rd-party catalog. For example, `productId` for Wix Stores or `eventId` for Wix Events. */ catalogItemId?: string; /** * Additional info in key:value form. For example, `{"options":{"Size": "M", "Color": "Red"}}` or `{"variantId": ""}`. */ options?: Object; }; type ecomV1CheckoutChannelInfo = { /** * Sales channel that submitted the subscription */ type?: string; }; type ecomV1CheckoutChargeDetails = { /** * Discount applied for this line item */ discount?: number; /** * price of line item (depends on subscription option) */ price?: number; /** * Tax applied for this line item */ tax?: number; /** * Is tax applied for this line item */ taxIncludedInPrice?: boolean; /** * Total price charged to the customer (for this line items) after computation of quantity and discount */ totalPrice?: number; }; type ecomV1CheckoutCheckout = { /** * Date and time the checkout was created. */ _createdDate?: Date; /** * Checkout ID. */ _id?: string; /** * Date and time the checkout was updated. */ _updatedDate?: Date; /** * Additional Fees */ additionalFees?: Array; /** * Applied discounts. */ appliedDiscounts?: Array; /** * Billing information. */ billingInfo?: wix_ecom_backend.Events.ecomV1CheckoutAddressWithContact; /** * Buyer information. */ buyerInfo?: wix_ecom_backend.Events.ecomV1CheckoutBuyerInfo; /** * Language for communication with the buyer. Defaults to the site language. * For a site that supports multiple languages, this is the language the buyer selected. */ buyerLanguage?: string; /** * [Buyer note](https://support.wix.com/en/article/wix-stores-viewing-buyer-notes) left by the customer. */ buyerNote?: string; /** * Errors when calculating totals. */ calculationErrors?: wix_ecom_backend.Events.ecomV1CheckoutCalculationErrors; /** * Sales channel that submitted the order. "WIX_APP_STORE" refers to the Wix mobile app. */ channelType?: string; /** * Whether an order was successfully created from this checkout. * For an order to be successful, it must be successfully paid for (unless the total is 0). */ completed?: boolean; /** * All the converted prices are presented in this currency. */ conversionCurrency?: string; /** * ID of the checkout's initiator. */ createdBy?: wix_ecom_backend.Events.ecomV1CheckoutCreatedBy; /** * Currency used for pricing in this store. */ currency?: string; /** * Custom fields. */ customFields?: Array; /** * Applied gift card details. */ giftCard?: wix_ecom_backend.Events.ecomV1CheckoutGiftCard; /** * Line items. */ lineItems?: Array; /** * Information about valid and invalid memberships, and which ones are selected for usage */ membershipOptions?: wix_ecom_backend.Events.ecomV1CheckoutMembershipOptions; /** * Remaining amount for the order to be fully paid. */ payLater?: wix_ecom_backend.Events.ecomV1CheckoutPriceSummary; /** * Minimal amount to pay in order to place the order. */ payNow?: wix_ecom_backend.Events.ecomV1CheckoutPriceSummary; /** * Calculated price summary for the checkout. */ priceSummary?: wix_ecom_backend.Events.ecomV1CheckoutPriceSummary; /** * Shipping information. */ shippingInfo?: wix_ecom_backend.Events.ecomV1CheckoutShippingInfo; /** * Site language in which original values are shown. */ siteLanguage?: string; /** * Whether tax is included in line item prices. */ taxIncludedInPrice?: boolean; /** * Tax summary. */ taxSummary?: wix_ecom_backend.Events.ecomV1CheckoutTaxSummary; /** * Weight measurement unit - defaults to site's weight unit. */ weightUnit?: string; }; type ecomV1CheckoutCheckoutCompleted = { data: wix_ecom_backend.Events.ecomV1CheckoutCheckoutMarkedAsCompleted; metadata: wix_ecom_backend.Events.ecomV1CheckoutBackendEventMetadata; }; type ecomV1CheckoutCheckoutCreated = { entity: wix_ecom_backend.Events.ecomV1CheckoutCheckout; metadata: wix_ecom_backend.Events.ecomV1CheckoutBackendEventMetadata; }; type ecomV1CheckoutCheckoutMarkedAsCompleted = { checkout?: wix_ecom_backend.Events.ecomV1CheckoutCheckout; }; type ecomV1CheckoutCheckoutUpdated = { entity: wix_ecom_backend.Events.ecomV1CheckoutCheckout; metadata: wix_ecom_backend.Events.ecomV1CheckoutBackendEventMetadata; }; type ecomV1CheckoutColor = { /** * Optional - HEX or RGB color code for display. */ code?: string; /** * Optional - Description line color name in site's default language. */ original?: string; /** * Optional - Translated description line color name according to buyer language. Defaults to `original` when not provided. */ translated?: string; }; type ecomV1CheckoutCommonVatId = { /** * Customer's tax ID */ _id?: string; /** * tax type */ type?: string; }; type ecomV1CheckoutCoupon = { /** * Coupon ID. */ _id?: string; /** * Coupon value. */ amount?: wix_ecom_backend.Events.ecomV1CheckoutMultiCurrencyPrice; /** * Coupon code. */ code?: string; /** * Coupon name. */ name?: string; }; type ecomV1CheckoutCreateCheckoutRequest = { /** * Sales channel that submitted the order. */ channelType?: string; /** * Checkout information. */ checkoutInfo?: wix_ecom_backend.Events.ecomV1CheckoutCheckout; /** * Coupon code. */ couponCode?: string; /** * Custom line items to be added to checkout. */ customLineItems?: Array; /** * Gift card code. */ giftCardCode?: string; /** * Line items to be added to checkout. */ lineItems?: Array; /** * Merchant discounts to apply to specific line items. If no `lineItemIds` are passed, the discount will be applied to the whole checkout. */ merchantDiscounts?: Array; }; type ecomV1CheckoutCreateCheckoutResponse = { /** * Newly created checkout. */ checkout?: wix_ecom_backend.Events.ecomV1CheckoutCheckout; }; type ecomV1CheckoutCreateOrderAndChargeRequest = { /** * Checkout ID. */ _id: string; /** * Payment token. */ paymentToken?: string; /** * Custom URL params to be added to redirect URLs. */ urlParams?: Record; }; type ecomV1CheckoutCreateOrderAndChargeResponse = { /** * ID of newly created order. */ orderId?: string; /** * The payment gateway is cashier. * payment_gateway_order_id will be returned given that money was charged. * In some cases, money will not be charged: * If the total price is 0 - For example, could be a free item or a an item with 100% discount * If the total price is not 0, but the payment is covered by alternative payment methods such as gift card */ paymentGatewayOrderId?: string; /** * Payment response token. */ paymentResponseToken?: string; /** * ID of newly created subscription. */ subscriptionId?: string; }; type ecomV1CheckoutCreateOrderAndChargeResponseIdOneOf = { /** * ID of newly created order. */ orderId?: string; /** * ID of newly created subscription. */ subscriptionId?: string; }; type ecomV1CheckoutCreateOrderRequest = { /** * Checkout ID. */ _id: string; /** * Custom URL params to be added to redirect URLs. */ urlParams?: Record; }; type ecomV1CheckoutCreateOrderResponse = { /** * ID of newly created order (ecom order ID) */ orderId?: string; /** * The payment gateway is cashier. * payment_gateway_order_id will be returned given that money needs to be charged. * In some cases, money should not be charged: * If the total price is 0 - For example, could be a free item or a an item with 100% discount * If the total price is not 0, but the payment is covered by alternative payment methods such as gift card */ paymentGatewayOrderId?: string; /** * ID of newly created subscription. */ subscriptionId?: string; }; type ecomV1CheckoutCreateOrderResponseIdOneOf = { /** * ID of newly created order (ecom order ID) */ orderId?: string; /** * ID of newly created subscription. */ subscriptionId?: string; }; type ecomV1CheckoutCreatedBy = { /** * App ID - when the order was created by an external application or Wix service. */ appId?: string; /** * Member ID - when the order was created by a **logged in** site visitor. */ memberId?: string; /** * User ID - when the order was created by a Wix user on behalf of a buyer. * For example, via POS (point of service). */ userId?: string; /** * Visitor ID - when the order was created by a site visitor that was **not** logged in. */ visitorId?: string; }; type ecomV1CheckoutCreatedByIdOneOf = { /** * App ID - when the order was created by an external application or Wix service. */ appId?: string; /** * Member ID - when the order was created by a **logged in** site visitor. */ memberId?: string; /** * User ID - when the order was created by a Wix user on behalf of a buyer. * For example, via POS (point of service). */ userId?: string; /** * Visitor ID - when the order was created by a site visitor that was **not** logged in. */ visitorId?: string; }; type ecomV1CheckoutCustomField = { /** * Custom field title. */ title?: string; /** * Translated custom field title. */ translatedTitle?: string; /** * Custom field value. */ value?: any; }; type ecomV1CheckoutCustomLineItem = { /** * Custom line item ID. Defaults to an auto-generated ID. */ _id?: string; /** * Custom line item description lines. Used for display purposes for the cart, checkout and order. */ descriptionLines?: Array; /** * Custom line item's media. */ media?: string; /** * Custom line item name. */ name?: string; /** * Custom line item price. */ price?: string; /** * Custom line item quantity. */ quantity?: number; }; type ecomV1CheckoutCustomTextFieldSelection = { /** * Custom text field name */ title?: string; /** * Custom text field value */ value?: string; }; type ecomV1CheckoutDeliveryLogistics = { /** * Expected delivery time, in free text. For example, "3-5 business days". */ deliveryTime?: string; /** * Instructions for caller, e.g for pickup: "Please deliver during opening hours, and please don't park in disabled parking spot". */ instructions?: string; /** * Pickup details. */ pickupDetails?: wix_ecom_backend.Events.ecomV1CheckoutPickupDetails; }; type ecomV1CheckoutDescription = { /** * Subscription option description. */ original?: string; /** * Translated subscription option name. */ translated?: string; }; type ecomV1CheckoutDescriptionLine = { /** * Description line color value. */ colorInfo?: wix_ecom_backend.Events.ecomV1CheckoutColor; /** * Description line name. */ name?: wix_ecom_backend.Events.ecomV1CheckoutDescriptionLineName; /** * Description line plain text value. */ plainText?: wix_ecom_backend.Events.ecomV1CheckoutPlainTextValue; }; type ecomV1CheckoutDescriptionLineDescriptionLineValueOneOf = {}; type ecomV1CheckoutDescriptionLineName = { /** * Optional - Description line name in site's default language. */ original?: string; /** * Optional - Translated description line item according to buyer language. Defaults to `original` when not provided. */ translated?: string; }; type ecomV1CheckoutDescriptionLineValueOneOf = { /** * Description line color value. */ colorInfo?: wix_ecom_backend.Events.ecomV1CheckoutColor; /** * Description line plain text value. */ plainText?: wix_ecom_backend.Events.ecomV1CheckoutPlainTextValue; }; type ecomV1CheckoutDetails = { applicationError?: wix_ecom_backend.Events.ecomV1CheckoutApplicationError; /** * deprecated in API's - to enable migration from rendering arbitrary tracing to rest response */ tracing?: Record; validationError?: wix_ecom_backend.Events.ecomV1CheckoutValidationError; }; type ecomV1CheckoutDetailsKindOneOf = { applicationError?: wix_ecom_backend.Events.ecomV1CheckoutApplicationError; validationError?: wix_ecom_backend.Events.ecomV1CheckoutValidationError; }; type ecomV1CheckoutDiscount = { /** * Discount type. */ type?: string; /** * Discount value. */ value?: number; }; type ecomV1CheckoutDiscountRule = { /** * Discount rule ID */ _id?: string; /** * Discount value. */ amount?: wix_ecom_backend.Events.ecomV1CheckoutMultiCurrencyPrice; /** * Discount rule name */ name?: wix_ecom_backend.Events.ecomV1CheckoutDiscountRuleName; }; type ecomV1CheckoutDiscountRuleName = { /** * Original discount rule name (in site's default language). */ original?: string; /** * Translated discount rule name according to buyer language. Defaults to `original` when not provided. */ translated?: string; }; type ecomV1CheckoutDomainEvent = { /** * random GUID so clients can tell if event was already handled */ _id?: string; actionEvent?: wix_ecom_backend.Events.ecomV1CheckoutActionEvent; createdEvent?: wix_ecom_backend.Events.ecomV1CheckoutEntityCreatedEvent; deletedEvent?: wix_ecom_backend.Events.ecomV1CheckoutEntityDeletedEvent; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * Assuming that all messages including Actions have id * Example: The id of the specific order, the id of a specific campaign */ entityId?: string; /** * The time of the event. Useful if there was a delay in dipatching */ eventTime?: Date; extendedFieldsUpdatedEvent?: wix_ecom_backend.Events.ecomV1CheckoutExtendedFieldsUpdatedEvent; /** * If present, indicates the action that triggered the event. */ originatedFrom?: string; /** * This is top level to ease client code dipatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** * A field that should be set if this event was triggered by an anonymize request. * For example you must set it to true when sending an event as a result of a GDPR right to be forgotten request. * NOTE: This field is not relevant for `EntityCreatedEvent` but is located here for better ergonomics of consumers. */ triggeredByAnonymizeRequest?: boolean; updatedEvent?: wix_ecom_backend.Events.ecomV1CheckoutEntityUpdatedEvent; }; type ecomV1CheckoutDomainEventBodyOneOf = { actionEvent?: wix_ecom_backend.Events.ecomV1CheckoutActionEvent; createdEvent?: wix_ecom_backend.Events.ecomV1CheckoutEntityCreatedEvent; deletedEvent?: wix_ecom_backend.Events.ecomV1CheckoutEntityDeletedEvent; extendedFieldsUpdatedEvent?: wix_ecom_backend.Events.ecomV1CheckoutExtendedFieldsUpdatedEvent; updatedEvent?: wix_ecom_backend.Events.ecomV1CheckoutEntityUpdatedEvent; }; type ecomV1CheckoutEmpty = {}; type ecomV1CheckoutEntityCreatedEvent = { entityAsJson?: string; }; type ecomV1CheckoutEntityDeletedEvent = {}; type ecomV1CheckoutEntityUpdatedEvent = { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; }; type ecomV1CheckoutExtendedFieldsUpdatedEvent = { currentEntityAsJson?: string; }; type ecomV1CheckoutFieldViolation = { data?: Object; description?: string; field?: string; /** * applicable when violated_rule=OTHER */ ruleName?: string; /** * Suppoerted values: * - `'DECIMAL_GT'` * - `'DECIMAL_GTE'` * - `'DECIMAL_LT'` * - `'DECIMAL_LTE'` * - `'DECIMAL_MAX_SCALE'` * - `'FORMAT'` * - `'INVALID_ENUM_VALUE'` * - `'MAX'` * - `'MAX_LENGTH'` * - `'MAX_SIZE'` * - `'MIN'` * - `'MIN_LENGTH'` * - `'MIN_SIZE'` * - `'OTHER'` * - `'REQUIRED_FIELD'` * - `'VALIDATION'` */ violatedRule?: string; }; type ecomV1CheckoutFullAddressContactDetails = { /** * Company name. */ company?: string; /** * First name. */ firstName?: string; /** * Last name. */ lastName?: string; /** * Phone number. */ phone?: string; /** * Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set - UNSPECIFIED is not allowed. */ vatId?: wix_ecom_backend.Events.ecomV1CheckoutCommonVatId; }; type ecomV1CheckoutFullName = { /** * Customer's first name */ firstName?: string; /** * Customer's last name */ lastName?: string; }; type ecomV1CheckoutGetCheckoutRequest = { /** * Checkout ID. */ _id: string; }; type ecomV1CheckoutGetCheckoutResponse = { /** * The requested checkout. */ checkout?: wix_ecom_backend.Events.ecomV1CheckoutCheckout; }; type ecomV1CheckoutGetWixCheckoutUrlRequest = { /** * Checkout ID. */ _id: string; }; type ecomV1CheckoutGetWixCheckoutUrlResponse = { /** * Checkout URL. */ checkoutUrl?: string; }; type ecomV1CheckoutGiftCard = { /** * Gift Card ID. */ _id?: string; /** * Gift card value. */ amount?: wix_ecom_backend.Events.ecomV1CheckoutMultiCurrencyPrice; /** * App ID of the gift card provider. */ appId?: string; /** * Gift card obfuscated code. */ obfuscatedCode?: string; }; type ecomV1CheckoutGroup = { /** * Item ID (when the coupon scope is limited to just one item). */ entityId?: string; /** * Coupon scope's group (e.g., product or collection in Wix Stores). See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values). */ name?: string; }; type ecomV1CheckoutInvalidMembership = { /** * Membership details. */ membership?: wix_ecom_backend.Events.ecomV1CheckoutMembership; /** * Reason why this membership is invalid and cannot be used. */ reason?: string; }; type ecomV1CheckoutItemAvailabilityInfo = { /** * Quantity available. */ quantityAvailable?: number; /** * Item availability status. Supported Values: * + `"NOT_FOUND"`: Item does not exist * + `"NOT_AVAILABLE"`: Item not in stock * + `"PARTIALLY_AVAILABLE"`: Available quantity is less than requested */ status?: string; }; type ecomV1CheckoutItemTaxFullDetails = { /** * If breakdown exists, the sum of rates in the breakdown must equal `tax_rate`. */ rateBreakdown?: Array; /** * Tax rate %, as a decimal point between 0 and 1. */ taxRate?: string; /** * Amount for which tax is calculated. */ taxableAmount?: wix_ecom_backend.Events.ecomV1CheckoutMultiCurrencyPrice; /** * Calculated tax, based on `taxable_amount` and `tax_rate`. */ totalTax?: wix_ecom_backend.Events.ecomV1CheckoutMultiCurrencyPrice; }; type ecomV1CheckoutItemType = { /** * Custom item type. */ custom?: string; /** * Preset item type. */ preset?: string; }; type ecomV1CheckoutItemTypeItemTypeDataOneOf = { /** * Custom item type. */ custom?: string; /** * Preset item type. */ preset?: string; }; type ecomV1CheckoutLineItem = { /** * Line item ID. */ _id?: string; /** * Item availability details. */ availability?: wix_ecom_backend.Events.ecomV1CheckoutItemAvailabilityInfo; /** * Catalog and item reference info. See [Catalog SPI](https://bo.wix.com/wix-docs/rest/ecommerce/catalog-spi/introduction) for more details. * Empty in the case of a custom line item. */ catalogReference?: wix_ecom_backend.Events.ecomV1CheckoutCatalogReference; /** * Partial payment for the given item to be paid upfront during the checkout. Eligible for catalog items with type `DEPOSIT_ONLINE` only. */ depositAmount?: wix_ecom_backend.Events.ecomV1CheckoutMultiCurrencyPrice; /** * Line item description lines. Used for display purposes for the cart, checkout and order. */ descriptionLines?: Array; /** * Discount for this line item's entire quantity. */ discount?: wix_ecom_backend.Events.ecomV1CheckoutMultiCurrencyPrice; /** * Item price **before** catalog-defined discount. Defaults to `price` when not provided. */ fullPrice?: wix_ecom_backend.Events.ecomV1CheckoutMultiCurrencyPrice; /** * Item type. Either a preset type or custom. */ itemType?: wix_ecom_backend.Events.ecomV1CheckoutItemType; /** * Total price **after** catalog-defined discount and line item discounts. */ lineItemPrice?: wix_ecom_backend.Events.ecomV1CheckoutMultiCurrencyPrice; /** * Line item image details. */ media?: string; /** * Type of selected payment option for current item. Defaults to `FULL_PAYMENT_ONLINE`. * + `FULL_PAYMENT_ONLINE` - The entire payment for this item happens as part of the checkout. * + `FULL_PAYMENT_OFFLINE` - The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods. * + `MEMBERSHIP` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0. * + `DEPOSIT_ONLINE` - Partial payment for the given item to be paid upfront during the checkout. Amount to be paid is defined by deposit_amount field. */ paymentOption?: string; /** * Physical properties of the item. When relevant, contains information such as SKU, item weight, and shippability. */ physicalProperties?: wix_ecom_backend.Events.ecomV1CheckoutPhysicalProperties; /** * Item price **after** catalog-defined discount and line item discounts. */ price?: wix_ecom_backend.Events.ecomV1CheckoutMultiCurrencyPrice; /** * Item price **before** line item discounts and **after** catalog-defined discount. Defaults to `price` when not provided. */ priceBeforeDiscounts?: wix_ecom_backend.Events.ecomV1CheckoutMultiCurrencyPrice; /** * Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". */ priceDescription?: wix_ecom_backend.Events.ecomV1CheckoutPriceDescription; /** * Item name. * + Stores - `product.name` * + Bookings - `service.info.name` * + Events - `ticket.name` */ productName?: wix_ecom_backend.Events.ecomV1CheckoutProductName; /** * Item quantity. */ quantity?: number; /** * In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID. * + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID. * + In most cases, this field has the same value as `catalogReference.catalogItemId`. * + Used in membership validation. */ rootCatalogItemId?: string; /** * Service properties. When relevant, this contains information such as date and number of participants. */ serviceProperties?: wix_ecom_backend.Events.ecomV1CheckoutServiceProperties; /** * Tax details for this line item. */ taxDetails?: wix_ecom_backend.Events.ecomV1CheckoutItemTaxFullDetails; /** * Total price after all discounts and tax. */ totalPriceAfterTax?: wix_ecom_backend.Events.ecomV1CheckoutMultiCurrencyPrice; /** * Total price after all discounts, before tax. */ totalPriceBeforeTax?: wix_ecom_backend.Events.ecomV1CheckoutMultiCurrencyPrice; /** * URL to the item's page on the site. */ url?: string; }; type ecomV1CheckoutMarkCheckoutAsCompletedRequest = { /** * Checkout ID. */ _id: string; }; type ecomV1CheckoutMarkCheckoutAsCompletedResponse = {}; type ecomV1CheckoutMediaItem = { /** * Media ID (for media items previously saved in Wix Media) */ _id?: string; /** * Alternative text for presentation when media cannot be displayed */ altText?: string; /** * Media external URL */ externalImageUrl?: string; /** * Media item height */ height?: number; /** * Media type */ mediaType?: string; /** * Media URL */ url?: string; /** * Media item width */ width?: number; }; type ecomV1CheckoutMembership = { /** * Membership ID. */ _id?: string; /** * Additional data about this membership. */ additionalData?: Object; /** * ID of the application providing this payment option. */ appId?: string; /** * Optional - For a membership that has limited credits, information about credit usage. */ credits?: wix_ecom_backend.Events.ecomV1CheckoutMembershipPaymentCredits; /** * Optional - TMembership expiry date. */ expirationDate?: Date; /** * Line item IDs which are "paid" for by this membership. */ lineItemIds?: Array; /** * The name of this membership. */ name?: wix_ecom_backend.Events.ecomV1CheckoutMembershipName; }; type ecomV1CheckoutMembershipName = { /** * The name of this membership */ original?: string; /** * Optional - Translated name of this membership. Defaults to `original` when not provided. */ translated?: string; }; type ecomV1CheckoutMembershipOptions = { /** * List of payment options that can be used */ eligibleMemberships?: Array; /** * List of payment options that are owned by the member, but cannot be used due to reason provided */ invalidMemberships?: Array; /** * The selected payment options and which line items they apply to */ selectedMemberships?: wix_ecom_backend.Events.ecomV1CheckoutSelectedMemberships; }; type ecomV1CheckoutMembershipPaymentCredits = { /** * How much credit remained for this membership */ remaining?: number; /** * How much credit this membership has in total */ total?: number; }; type ecomV1CheckoutMerchantDiscount = { /** * Discount value. */ amount?: wix_ecom_backend.Events.ecomV1CheckoutMultiCurrencyPrice; }; type ecomV1CheckoutMerchantDiscountInput = { /** * Discount amount. */ amount?: string; /** * IDs of line items the discount applies to. */ lineItemIds?: Array; }; type ecomV1CheckoutMultiCurrencyPrice = { /** * Amount. */ amount?: string; /** * Converted amount. */ convertedAmount?: string; /** * Amount formatted with currency symbol. */ formattedAmount?: string; /** * Converted amount formatted with currency symbol. */ formattedConvertedAmount?: string; }; type ecomV1CheckoutOptionSelection = { /** * Option name */ option?: string; /** * Selected choice for this option */ selection?: string; }; type ecomV1CheckoutOrderCreated = { /** * Order archive status */ archived?: boolean; /** * Customer information */ buyerInfo?: wix_ecom_backend.Events.ecomV1CheckoutV2BuyerInfo; /** * Currency used for pricing in this store */ currency?: string; /** * Order creation date */ dateCreated?: Date; /** * Order fulfillment status */ fulfillmentStatus?: string; /** * ID displayed in the owner's store (auto generated) */ number?: string; /** * Order ID (auto generated upon order creation) */ orderId?: string; /** * Order payment status */ paymentStatus?: string; /** * Whether the order was read by the store owner */ read?: boolean; /** * Totals for order's line items */ totals?: wix_ecom_backend.Events.ecomV1CheckoutTotals; /** * Weight unit used in this store */ weightUnit?: string; }; type ecomV1CheckoutOrdersExperiments = { epCommitTax?: boolean; moveBuyerOrderConfirmationEmailToEp?: boolean; moveMerchantEmailToEp?: boolean; producedByEpBridge?: boolean; }; type ecomV1CheckoutOtherCharge = { /** * Price of added cost. */ price?: wix_ecom_backend.Events.ecomV1CheckoutMultiCurrencyPrice; /** * Type of additional cost. */ type?: string; }; type ecomV1CheckoutPhysicalProperties = { /** * Whether this line item is shippable. */ shippable?: boolean; /** * Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku). */ sku?: string; /** * Line item weight. Measurement unit (KG or LB) is taken from `order.weightUnit`. */ weight?: number; }; type ecomV1CheckoutPickupAddress = { /** * Address */ addressLine?: string; /** * City */ city?: string; /** * Country code (2 letters) */ country?: string; /** * State/District */ subdivision?: string; /** * ZIP/postal code */ zipCode?: string; }; type ecomV1CheckoutPickupDetails = { /** * Pickup address. */ address?: wix_ecom_backend.Events.ecomV1CheckoutApiAddress; /** * Whether the pickup address is that of a business - this may effect tax calculation. */ businessLocation?: boolean; /** * Pickup method */ pickupMethod?: string; }; type ecomV1CheckoutPlainTextValue = { /** * Optional - Description line plain text value in site's default language. */ original?: string; /** * Optional - Translated description line plain text value according to buyer language. Defaults to `original` when not provided. */ translated?: string; }; type ecomV1CheckoutPriceDescription = { /** * Required** - Original price description (in site's default language). */ original?: string; /** * Optional - Translated product name according to buyer language. Defaults to `original` when not provided. */ translated?: string; }; type ecomV1CheckoutPriceSummary = { /** * Total additional fees price. */ additionalFees?: wix_ecom_backend.Events.ecomV1CheckoutMultiCurrencyPrice; /** * Total calculated discount value. */ discount?: wix_ecom_backend.Events.ecomV1CheckoutMultiCurrencyPrice; /** * Total shipping price, before discounts and before tax. */ shipping?: wix_ecom_backend.Events.ecomV1CheckoutMultiCurrencyPrice; /** * Subtotal of all line items, before discounts and before tax. */ subtotal?: wix_ecom_backend.Events.ecomV1CheckoutMultiCurrencyPrice; /** * Total tax. */ tax?: wix_ecom_backend.Events.ecomV1CheckoutMultiCurrencyPrice; /** * Total price after discounts, gift cards, and tax. */ total?: wix_ecom_backend.Events.ecomV1CheckoutMultiCurrencyPrice; }; type ecomV1CheckoutProductDetails = { /** * Line item fulfillerId from stores fulfillers. No value means self fulfilled */ fulfillerId?: string; /** * Line item type (may be extended) */ lineItemType?: string; /** * Line item primary media for preview */ mediaItem?: wix_ecom_backend.Events.ecomV1CheckoutMediaItem; /** * Line item name */ name?: string; /** * Line item notes */ notes?: string; /** * Line item product ID (optional for POS orders) */ productId?: string; /** * Line item SKU */ sku?: string; /** * Tax group id */ taxGroupId?: string; /** * Line item name translated to buyer's language */ translatedName?: string; /** * Line item weight */ weight?: number; }; type ecomV1CheckoutProductName = { /** * Required** - Original product name (in site's default language). */ original?: string; /** * Optional - Translated product name according to buyer language. Defaults to `original` when not provided. */ translated?: string; }; type ecomV1CheckoutRemoveCouponRequest = { /** * Checkout ID. */ _id: string; }; type ecomV1CheckoutRemoveCouponResponse = { /** * Updated checkout after removal of coupon. */ checkout?: wix_ecom_backend.Events.ecomV1CheckoutCheckout; }; type ecomV1CheckoutRemoveGiftCardRequest = { /** * Checkout ID. */ _id: string; }; type ecomV1CheckoutRemoveGiftCardResponse = { /** * Updated checkout after removal of gift card. */ checkout?: wix_ecom_backend.Events.ecomV1CheckoutCheckout; }; type ecomV1CheckoutRemoveLineItemsRequest = { /** * Checkout ID. */ _id: string; /** * IDs of line items to be removed. */ lineItemIds: Array; }; type ecomV1CheckoutRemoveLineItemsResponse = { /** * Updated checkout after removal of line items. */ checkout?: wix_ecom_backend.Events.ecomV1CheckoutCheckout; }; type ecomV1CheckoutScope = { /** * Coupon scope's applied group (e.g., event or ticket in Wix Events) */ group?: wix_ecom_backend.Events.ecomV1CheckoutGroup; /** * Scope namespace (Wix Stores, Wix Bookings, Wix Events) */ namespace?: string; }; type ecomV1CheckoutSecuredMedia = { /** * Media ID in media manager. */ _id?: string; /** * Original file name. */ fileName?: string; /** * File type. */ fileType?: string; }; type ecomV1CheckoutSelectedCarrierServiceOption = { /** * This carrier's unique ID */ carrierId?: string; /** * Unique identifier of selected option. For example, "usps_std_overnight". */ code?: string; /** * Shipping costs. */ cost?: wix_ecom_backend.Events.ecomV1CheckoutSelectedCarrierServiceOptionPrices; /** * Delivery logistics. */ logistics?: wix_ecom_backend.Events.ecomV1CheckoutDeliveryLogistics; /** * Other charges */ otherCharges?: Array; /** * Were we able to find the requested shipping option, or otherwise we fallback to the default one (the first) */ requestedShippingOption?: boolean; /** * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale). * For example, "Standard" or "First-Class Package International". */ title?: string; }; type ecomV1CheckoutSelectedCarrierServiceOptionOtherCharge = { /** * Price of added charge. */ cost?: wix_ecom_backend.Events.ecomV1CheckoutSelectedCarrierServiceOptionPrices; /** * Details of the charge, such as 'Full Coverage Insurance of up to 80% of value of shipment'. */ details?: string; /** * Type of additional cost. */ type?: string; }; type ecomV1CheckoutSelectedCarrierServiceOptionPrices = { /** * Shipping price before discount and before tax. */ price?: wix_ecom_backend.Events.ecomV1CheckoutMultiCurrencyPrice; /** * Tax details. */ taxDetails?: wix_ecom_backend.Events.ecomV1CheckoutItemTaxFullDetails; /** * Shipping discount before tax. */ totalDiscount?: wix_ecom_backend.Events.ecomV1CheckoutMultiCurrencyPrice; /** * Total shipping price, after discount and after tax. */ totalPriceAfterTax?: wix_ecom_backend.Events.ecomV1CheckoutMultiCurrencyPrice; /** * Totals shipping price after discount and before tax. */ totalPriceBeforeTax?: wix_ecom_backend.Events.ecomV1CheckoutMultiCurrencyPrice; }; type ecomV1CheckoutSelectedMembership = { /** * Membership ID. */ _id?: string; /** * ID of the app providing this payment option. */ appId?: string; /** * IDs of the line items this membership applies to. */ lineItemIds?: Array; }; type ecomV1CheckoutSelectedMemberships = { /** * Selected memberships. */ memberships?: Array; }; type ecomV1CheckoutServiceProperties = { /** * Optional - The number of people participating in this service. For example, the number of people attending the class or the number of people per hotel room. */ numberOfParticipants?: number; /** * Optional - The date and time for which the service is supposed to be provided. For example, the time of the class. */ scheduledDate?: Date; }; type ecomV1CheckoutShipmentDetails = { /** * Shipping destination address */ address?: wix_ecom_backend.Events.ecomV1CheckoutAddress; /** * Discount applied for shipping */ discount?: number; /** * Tax applied for shipping */ tax?: number; /** * Whether tax is included in the price */ taxIncludedInPrice?: boolean; }; type ecomV1CheckoutShippingInfo = { /** * All carrier options for this shipping rule. */ carrierServiceOptions?: Array; /** * Shipping region. */ region?: wix_ecom_backend.Events.ecomV1CheckoutShippingRegion; /** * Selected option out of the options allowed for the region (see `region` field). * The region field is chosen based on the address provided. */ selectedCarrierServiceOption?: wix_ecom_backend.Events.ecomV1CheckoutSelectedCarrierServiceOption; /** * Shipping address and contact details. */ shippingDestination?: wix_ecom_backend.Events.ecomV1CheckoutAddressWithContact; }; type ecomV1CheckoutShippingOption = { /** * Unique code of provided shipping option like "usps_std_overnight". * For legacy calculators this would be the UUID of the option. */ code?: string; /** * Sipping price information. */ cost?: wix_ecom_backend.Events.ecomV1CheckoutShippingPrice; /** * Delivery logistics. */ logistics?: wix_ecom_backend.Events.ecomV1CheckoutDeliveryLogistics; /** * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale). * For example, "Standard" or "First-Class Package International". */ title?: string; }; type ecomV1CheckoutShippingPrice = { /** * Other costs such as insurance, handling & packaging for fragile items, etc. */ otherCharges?: Array; /** * Shipping price. */ price?: wix_ecom_backend.Events.ecomV1CheckoutMultiCurrencyPrice; }; type ecomV1CheckoutShippingRegion = { /** * Shipping region ID. */ _id?: string; /** * Shipping region name. */ name?: string; }; type ecomV1CheckoutStoreSettings = { /** * The language to be used when communicating with the buyer * For a site that support multiple languages, this would be the language the buyer selected * Otherwise this would be the site language */ buyerLanguage?: string; /** * Currency used for pricing in this store */ currency?: string; /** * Weight unit used in this store */ weightUnit?: string; }; type ecomV1CheckoutStreet = { /** * Street name */ name?: string; /** * Street number */ number?: string; }; type ecomV1CheckoutStreetAddress = { /** * Street name. */ name?: string; /** * Street number. */ number?: string; }; type ecomV1CheckoutSubscription = { /** * Subscription id (auto-generated upon subscription creation) */ _id?: string; /** * Coupon that was applied to subscription */ appliedCoupon?: wix_ecom_backend.Events.ecomV1CheckoutV1AppliedCoupon; /** * Full billing address */ billingAddress?: wix_ecom_backend.Events.ecomV1CheckoutAddress; /** * information about first subscription payment */ billingInfo?: wix_ecom_backend.Events.ecomV1CheckoutV1BillingInfo; /** * member or contact */ buyerInfo?: wix_ecom_backend.Events.ecomV1CheckoutV1BuyerInfo; /** * Message from the customer (e.g., customization request) */ buyerNote?: string; /** * The id of the cart this order was created from */ cartId?: string; /** * Sales channel that submitted this subscription */ channelInfo?: wix_ecom_backend.Events.ecomV1CheckoutChannelInfo; /** * The id of the checkout this subscriptions was created from */ checkoutId?: string; /** * Custom field */ customField?: wix_ecom_backend.Events.ecomV1CheckoutV1CustomField; /** * Subscription creation date */ dateCreated?: Date; /** * id of subscription in external system */ externalId?: string; /** * Line items ordered */ lineItems?: Array; /** * Delivery information */ shippingInfo?: wix_ecom_backend.Events.ecomV1CheckoutV1ShippingInfo; /** * site settings at the moment when subscription created */ storeSettings?: wix_ecom_backend.Events.ecomV1CheckoutStoreSettings; /** * Information about subscription option from which subscription was created */ subscriptionOptionInfo?: wix_ecom_backend.Events.ecomV1CheckoutV1SubscriptionOptionInfo; /** * defines when subscriber will be charged: for frequency=MONTH, billingCycles=6, interval=2 payment will be done every 2 month during one year */ subscriptionSettings?: wix_ecom_backend.Events.ecomV1CheckoutV1SubscriptionSettings; /** * Totals for subscription's line items */ totals?: wix_ecom_backend.Events.ecomV1CheckoutV1Totals; }; type ecomV1CheckoutSubscriptionCreated = { subscription?: wix_ecom_backend.Events.ecomV1CheckoutSubscription; }; type ecomV1CheckoutSubscriptionInfo = { /** * Subscription ID. */ _id?: string; /** * Current cycle number. For example, if the subscription is in the 3rd month of a 4-month subscription, the value will be `3`. */ cycleNumber?: number; /** * Subscription options info. */ subscriptionOptionInfo?: wix_ecom_backend.Events.ecomV1CheckoutV2SubscriptionOptionInfo; /** * Subscription settings. */ subscriptionSettings?: wix_ecom_backend.Events.ecomV1CheckoutV1SubscriptionSettings; }; type ecomV1CheckoutSubscriptionOptionInfo = { /** * Subscription option description. */ description?: wix_ecom_backend.Events.ecomV1CheckoutDescription; /** * Subscription option settings. */ subscriptionSettings?: wix_ecom_backend.Events.ecomV1CheckoutSubscriptionSettings; /** * Subscription option title. */ title?: wix_ecom_backend.Events.ecomV1CheckoutTitle; }; type ecomV1CheckoutSubscriptionSettings = { /** * Whether subscription is renewed automatically at the end of each period. */ autoRenewal?: boolean; /** * Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`. */ billingCycles?: number; /** * Frequency of recurring payment. */ frequency?: string; }; type ecomV1CheckoutTaxCalculationDetails = { /** * Details of the fallback rate calculation. */ autoTaxFallbackDetails?: wix_ecom_backend.Events.ecomV1CheckoutAutoTaxFallbackCalculationDetails; /** * Reason the manual calculation was used. */ manualRateReason?: string; /** * Rate calculation type. */ rateType?: string; }; type ecomV1CheckoutTaxCalculationDetailsCalculationDetailsOneOf = { /** * Details of the fallback rate calculation. */ autoTaxFallbackDetails?: wix_ecom_backend.Events.ecomV1CheckoutAutoTaxFallbackCalculationDetails; /** * Reason the manual calculation was used. */ manualRateReason?: string; }; type ecomV1CheckoutTaxRateBreakdown = { /** * Type of tax against which the calculation was performed. */ name?: string; /** * Rate at which this tax detail was calculated. */ rate?: string; /** * Amount of tax for this tax detail. */ tax?: wix_ecom_backend.Events.ecomV1CheckoutMultiCurrencyPrice; }; type ecomV1CheckoutTaxSummary = { /** * Tax calculator that was active when the order was created. */ calculationDetails?: wix_ecom_backend.Events.ecomV1CheckoutTaxCalculationDetails; /** * Amount for which tax is calculated, added from line items. */ taxableAmount?: wix_ecom_backend.Events.ecomV1CheckoutMultiCurrencyPrice; /** * Calculated tax, added from line items. */ totalTax?: wix_ecom_backend.Events.ecomV1CheckoutMultiCurrencyPrice; }; type ecomV1CheckoutTitle = { /** * Subscription option name. */ original?: string; /** * Translated subscription option name. */ translated?: string; }; type ecomV1CheckoutTotals = { /** * Total calculated discount value. */ discount?: string; /** * Total calculated gift card value. */ giftCard?: string; /** * Total number of line items. */ quantity?: number; /** * Total refund. */ refund?: string; /** * Total shipping price, before tax. */ shipping?: string; /** * Subtotal of all the line items, before tax. */ subtotal?: string; /** * Total tax. */ tax?: string; /** * Total price charged. */ total?: string; /** * Total items weight. */ weight?: string; }; type ecomV1CheckoutUpdateCheckoutRequest = { /** * Checkout information. */ checkout: wix_ecom_backend.Events.ecomV1CheckoutCheckout; /** * Coupon code. */ couponCode?: string; /** * Gift card code. */ giftCardCode?: string; /** * Merchant discounts to apply to specific line items. If no `lineItemIds` are passed, the discount will be applied to the whole checkout. */ merchantDiscounts?: Array; }; type ecomV1CheckoutUpdateCheckoutResponse = { /** * Updated checkout. */ checkout?: wix_ecom_backend.Events.ecomV1CheckoutCheckout; }; type ecomV1CheckoutUpdatedCheckoutMessage = { /** * Previous checkout. */ oldCheckout?: wix_ecom_backend.Events.ecomV1CheckoutCheckout; /** * Updated checkout. */ updatedCheckout?: wix_ecom_backend.Events.ecomV1CheckoutCheckout; }; type ecomV1CheckoutV1AppliedCoupon = { /** * Coupon code */ code?: string; /** * Coupon ID */ couponId?: string; /** * Coupon name */ name?: string; }; type ecomV1CheckoutV1BillingInfo = { /** * Order ID from payment gateway (e.g., Wix Payments) */ paymentGatewayOrderId?: string; /** * Transaction ID from payment gateway (e.g., Wix Payments) */ paymentGatewayTransactionId?: string; /** * Payment method used for this order */ paymentMethod?: string; }; type ecomV1CheckoutV1BuyerInfo = { /** * Wix customer ID */ _id?: string; /** * Customer type */ identityType?: string; }; type ecomV1CheckoutV1CustomField = { /** * Title for the custom field */ title?: string; /** * The title translated according to the buyer language */ translatedTitle?: string; /** * Free text that the customer entered in the custom field during the checkout process */ value?: string; }; type ecomV1CheckoutV1LineItem = { /** * Charges details */ chargeDetails?: wix_ecom_backend.Events.ecomV1CheckoutChargeDetails; /** * Line item custom text field selections */ customTextFields?: Array; /** * Line item ID (auto-generated) */ index?: number; /** * Line item options ordered */ options?: Array; /** * Product details */ productDetails?: wix_ecom_backend.Events.ecomV1CheckoutProductDetails; /** * Line item quantity */ quantity?: number; /** * Line item variantId (from Stores Catalog) */ variantId?: string; }; type ecomV1CheckoutV1PickupDetails = { /** * Pickup address */ address?: wix_ecom_backend.Events.ecomV1CheckoutPickupAddress; /** * Store owner's pickup instructions */ pickupInstructions?: string; }; type ecomV1CheckoutV1ShippingInfo = { /** * Delivery option name */ deliveryOption?: string; /** * Delivery option delivery time */ estimatedDeliveryTime?: string; /** * Pickup details (when this object describes pickup) */ pickupDetails?: wix_ecom_backend.Events.ecomV1CheckoutV1PickupDetails; /** * Shipment details (when this object describes shipment) */ shipmentDetails?: wix_ecom_backend.Events.ecomV1CheckoutShipmentDetails; }; type ecomV1CheckoutV1ShippingInfoDetailsOneOf = { /** * Pickup details (when this object describes pickup) */ pickupDetails?: wix_ecom_backend.Events.ecomV1CheckoutV1PickupDetails; /** * Shipment details (when this object describes shipment) */ shipmentDetails?: wix_ecom_backend.Events.ecomV1CheckoutShipmentDetails; }; type ecomV1CheckoutV1SubscriptionOptionInfo = { _id?: string; description?: string; discount?: wix_ecom_backend.Events.ecomV1CheckoutDiscount; title?: string; }; type ecomV1CheckoutV1SubscriptionSettings = { /** * Whether subscription is renewed automatically at the end of each period. */ autoRenewal?: boolean; /** * Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`. */ billingCycles?: number; /** * Frequency of recurring payment. */ frequency?: string; }; type ecomV1CheckoutV1Totals = { /** * Total calculated discount value */ discount?: number; /** * Total line items quantity */ quantity?: number; /** * Total shipping price, including tax */ shipping?: number; /** * Subtotal of all line items, before tax */ subtotal?: number; /** * Total tax */ tax?: number; /** * Total price */ total?: number; /** * Total weight */ weight?: number; }; type ecomV1CheckoutV2BuyerInfo = { /** * Wix customer ID */ _id?: string; /** * Customer's email address */ email?: string; /** * Customer's first name */ firstName?: string; /** * Customer type */ identityType?: string; /** * Customer's last name */ lastName?: string; /** * Customer's phone number */ phone?: string; /** * Deprecated (use identityType instead) */ type?: string; }; type ecomV1CheckoutV2SubscriptionOptionInfo = { /** * Subscription option description. */ description?: string; /** * Subscription option title. */ title?: string; }; type ecomV1CheckoutValidationError = { fieldViolations?: Array; }; type ecomV1CheckoutVatId = { /** * Customer's tax ID */ number?: string; /** * tax type */ type?: string; }; type ecomV1FulfillmentsBackendEventMetadata = { entityId: string; eventTime: string; id: string; triggeredByAnonymizeRequest: boolean; }; type ecomV1FulfillmentsBuyerInfo = { /** * Wix customer ID */ _id?: string; /** * Customer's email address */ email?: string; /** * Customer's first name */ firstName?: string; /** * Customer type */ identityType?: string; /** * Customer's last name */ lastName?: string; /** * Customer's phone number */ phone?: string; /** * Deprecated (use identityType instead) */ type?: string; }; type ecomV1FulfillmentsCreateFulfillmentRequest = { /** * Fulfillment info. */ fulfillment: wix_ecom_backend.Events.ecomV1FulfillmentsFulfillment; /** * Order ID. */ orderId: string; }; type ecomV1FulfillmentsCreateFulfillmentResponse = { /** * ID of created fulfillment. */ fulfillmentId?: string; /** * Order ID and the orders' fulfillments. */ orderWithFulfillments?: wix_ecom_backend.Events.ecomV1FulfillmentsOrderWithFulfillments; }; type ecomV1FulfillmentsDeleteFulfillmentRequest = { /** * IDs of fulfillments to delete. */ fulfillmentId: string; /** * Order ID. */ orderId: string; }; type ecomV1FulfillmentsDeleteFulfillmentResponse = { /** * Order ID and the orders' associated fulfillments after deletion. */ orderWithFulfillments?: wix_ecom_backend.Events.ecomV1FulfillmentsOrderWithFulfillments; }; type ecomV1FulfillmentsFulfillment = { /** * Fulfillment creation date and time. */ _createdDate?: Date; /** * Fulfillment ID. */ _id?: string; /** * Line items being fulfilled. */ lineItems?: Array; /** * Fulfillment tracking info. */ trackingInfo?: wix_ecom_backend.Events.ecomV1FulfillmentsFulfillmentTrackingInfo; }; type ecomV1FulfillmentsFulfillmentCreated = { /** * Buyer information. */ buyerInfo?: wix_ecom_backend.Events.ecomV1FulfillmentsBuyerInfo; /** * Fulfillment creation date and time. */ dateCreated?: Date; /** * ID of the newly created fulfillment. */ fulfillmentId?: string; /** * Order fulfillment status. */ fulfillmentStatus?: string; /** * Order ID (auto generated upon order creation). */ orderId?: string; /** * Fulfillment tracking information. */ trackingInfo?: wix_ecom_backend.Events.ecomV1FulfillmentsV2FulfillmentTrackingInfo; }; type ecomV1FulfillmentsFulfillmentDeleted = { /** * ID of the deleted fulfillment. */ fulfillmentId?: string; /** * Order fulfillment status. */ fulfillmentStatus?: string; /** * Order ID (auto generated upon order creation). */ orderId?: string; }; type ecomV1FulfillmentsFulfillmentLineItem = { /** * Line item ID (mirrors the ID of the order line item). */ _id?: string; /** * Line item quantity. * * On creation, if this parameter isn't passed, the new fulfillment will automatically include all items of this line item that have not already been linked to a fulfillment. * * If the order does not have the requested quantity of line items available to add to this fulfillment, the fulfillment will not be created and an error will be returned. * * This property will always have a value when returned. */ quantity?: number; }; type ecomV1FulfillmentsFulfillmentTrackingInfo = { /** * Shipping provider. Using the following shipping providers will allow for auto-filling the tracking link: * * `fedex` * * `ups` * * `usps` * * `dhl` * * `canadaPost` */ shippingProvider?: string; /** * Tracking link - auto-filled if using a predefined shipping provider, otherwise provided on creation. */ trackingLink?: string; /** * Tracking number. */ trackingNumber?: string; }; type ecomV1FulfillmentsFulfillmentUpdated = { /** * ID of the updated fulfillment. */ fulfillmentId?: string; /** * Order ID (auto generated upon order creation). */ orderId?: string; /** * Fulfillment tracking information. */ trackingInfo?: wix_ecom_backend.Events.ecomV1FulfillmentsV2FulfillmentTrackingInfo; }; type ecomV1FulfillmentsFulfillmentsUpdated = { entity: wix_ecom_backend.Events.ecomV1FulfillmentsOrderWithFulfillments; metadata: wix_ecom_backend.Events.ecomV1FulfillmentsBackendEventMetadata; }; type ecomV1FulfillmentsIndexingMessage = { _id?: string; opType?: number; requiredVersions?: Array; }; type ecomV1FulfillmentsListFulfillmentsForMultipleOrdersRequest = { /** * Order IDs for which to retrieve fulfillments. */ orderIds: Array; }; type ecomV1FulfillmentsListFulfillmentsForMultipleOrdersResponse = { /** * List of order IDs and their associated fulfillments. */ ordersWithFulfillments?: Array; }; type ecomV1FulfillmentsListFulfillmentsForSingleOrderRequest = { /** * Order ID for which to retrieve fulfillments. */ orderId: string; }; type ecomV1FulfillmentsListFulfillmentsForSingleOrderResponse = { /** * List of fulfillments associated with the order. */ orderWithFulfillments?: wix_ecom_backend.Events.ecomV1FulfillmentsOrderWithFulfillments; }; type ecomV1FulfillmentsOrderWithFulfillments = { /** * Fulfillments associated with the order. */ fulfillments?: Array; /** * Order ID. */ orderId?: string; }; type ecomV1FulfillmentsSnapshotMessage = { _id?: string; opType?: number; }; type ecomV1FulfillmentsUpdateFulfillmentRequest = { /** * Set of fields to update. Fields that aren't included in `fieldMask.paths` are ignored. */ fieldMask?: Array; /** * Fulfillment info to update. */ fulfillment?: wix_ecom_backend.Events.ecomV1FulfillmentsFulfillment; /** * Order ID. */ orderId: string; }; type ecomV1FulfillmentsUpdateFulfillmentResponse = { /** * Order ID and the orders' associated fulfillments after update. */ orderWithFulfillments?: wix_ecom_backend.Events.ecomV1FulfillmentsOrderWithFulfillments; }; type ecomV1FulfillmentsV2FulfillmentTrackingInfo = { /** * Shipping provider. Using the following shipping providers will allow for autofilling the tracking link: * * `fedex` * * `ups` * * `usps` * * `dhl` * * `canadaPost` */ shippingProvider?: string; /** * Tracking link - autofilled if using a predefined shipping provider, otherwise provided on creation. */ trackingLink?: string; /** * Tracking number. */ trackingNumber?: string; }; type ecomV1OrderActionEvent = { bodyAsJson?: string; }; type ecomV1OrderActivity = { /** * Activity creation date and time. */ _createdDate?: Date; /** * Activity ID. */ _id?: string; /** * Activity author's email. */ authorEmail?: string; /** * Custom activity details (optional). `activity.type` must be `CUSTOM_ACTIVITY`. */ customActivity?: wix_ecom_backend.Events.ecomV1OrderCustomActivity; /** * Merchant comment details (optional). `activity.type` must be `MERCHANT_COMMENT`. */ merchantComment?: wix_ecom_backend.Events.ecomV1OrderMerchantComment; /** * Additional info about order refunded activity (optional). `activity.type` must be `ORDER_REFUNDED`. */ orderRefunded?: wix_ecom_backend.Events.ecomV1OrderOrderRefunded; /** * Activity type. */ type?: string; }; type ecomV1OrderActivityContentOneOf = { /** * Custom activity details (optional). `activity.type` must be `CUSTOM_ACTIVITY`. */ customActivity?: wix_ecom_backend.Events.ecomV1OrderCustomActivity; /** * Merchant comment details (optional). `activity.type` must be `MERCHANT_COMMENT`. */ merchantComment?: wix_ecom_backend.Events.ecomV1OrderMerchantComment; /** * Additional info about order refunded activity (optional). `activity.type` must be `ORDER_REFUNDED`. */ orderRefunded?: wix_ecom_backend.Events.ecomV1OrderOrderRefunded; }; type ecomV1OrderAddActivityRequest = { /** * Order ID. */ _id: string; /** * Activity info. */ activity: wix_ecom_backend.Events.ecomV1OrderPublicActivity; }; type ecomV1OrderAddActivityResponse = { /** * ID of the added activity. * Use this ID to either [update](https://bo.wix.com/wix-docs/rest/ecommerce/orders/update-activity) or [delete](https://bo.wix.com/wix-docs/rest/ecommerce/orders/delete-activity) the activity. */ activityId?: string; /** * Updated order. */ order?: wix_ecom_backend.Events.ecomV1OrderOrder; }; type ecomV1OrderAddInternalActivityRequest = { /** * Order ID. */ _id: string; /** * Activity info. */ activity: wix_ecom_backend.Events.ecomV1OrderInternalActivity; }; type ecomV1OrderAddInternalActivityResponse = { /** * ID of the added internal activity. * Use this ID to either [update](https://bo.wix.com/wix-docs/rest/ecommerce/orders/update-activity) or [delete](https://bo.wix.com/wix-docs/rest/ecommerce/orders/delete-activity) the activity. */ activityId?: string; /** * Updated order. */ order?: wix_ecom_backend.Events.ecomV1OrderOrder; }; type ecomV1OrderAdditionalFee = { /** * Additional fee's unique code for future processing. */ code?: string; /** * Name of additional fee. */ name?: string; /** * Additional fee's price. */ price?: wix_ecom_backend.Events.ecomV1OrderPrice; /** * SPI implementer's `appId`. */ providerAppId?: string; /** * Tax details. */ taxDetails?: wix_ecom_backend.Events.ecomV1OrderItemTaxFullDetails; }; type ecomV1OrderAddress = { /** * Main address line (usually street name and number). */ addressLine1?: string; /** * Free text providing more detailed address info. Usually contains apt, suite, floor. */ addressLine2?: string; /** * City name. */ city?: string; /** * Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format. */ country?: string; /** * Postal or zip code. */ postalCode?: string; /** * Street address object, with number, name, and apartment number in separate fields. */ streetAddress?: wix_ecom_backend.Events.ecomV1OrderStreetAddress; /** * Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format. */ subdivision?: string; }; type ecomV1OrderAddressWithContact = { /** * Address. */ address?: wix_ecom_backend.Events.ecomV1OrderAddress; /** * Contact details. */ contactDetails?: wix_ecom_backend.Events.ecomV1OrderFullAddressContactDetails; }; type ecomV1OrderAggregateOrdersRequest = { /** * This is an object defining aggregation itself */ aggregation: Object; /** * Filter applied to original data */ filter?: Object; }; type ecomV1OrderAggregateOrdersResponse = { aggregates?: Object; }; type ecomV1OrderApiAddress = { /** * Address line 1 (free text) */ addressLine1?: string; /** * address line */ addressLine2?: string; /** * City name */ city?: string; /** * Company name */ company?: string; /** * Country code (2 letters) */ country?: string; /** * Email address */ email?: string; /** * Addressee name */ fullName?: wix_ecom_backend.Events.ecomV1OrderFullName; /** * Phone number */ phone?: string; /** * Address line 1 (street) */ street?: wix_ecom_backend.Events.ecomV1OrderStreet; /** * State or district */ subdivision?: string; /** * Tax information (for Brazil only) */ vatId?: wix_ecom_backend.Events.ecomV1OrderApiVatId; /** * ZIP/postal code */ zipCode?: string; }; type ecomV1OrderApiAddressAddressLine1OptionsOneOf = { /** * Address line 1 (free text) */ addressLine1?: string; /** * Address line 1 (street) */ street?: wix_ecom_backend.Events.ecomV1OrderStreet; }; type ecomV1OrderApiVatId = { /** * Customer's tax ID */ number?: string; /** * tax type */ type?: string; }; type ecomV1OrderApplicationError = { code?: string; data?: Object; description?: string; }; type ecomV1OrderAppliedCoupon = { /** * Coupon code */ code?: string; /** * Coupon ID */ couponId?: string; /** * Coupon name */ name?: string; }; type ecomV1OrderAppliedDiscount = { /** * Applied coupon info. */ coupon?: wix_ecom_backend.Events.ecomV1OrderCoupon; /** * Automatic Discount */ discountRule?: wix_ecom_backend.Events.ecomV1OrderDiscountRule; /** * Discount type. * * `"GLOBAL"` - discount applies to entire order. * * `"SPECIFIC-ITEMS"` - discount applies to specific items. * * `"SHIPPING"` - discount applies to shipping. For example, free shipping. */ discountType?: string; /** * IDs of line items discount applies to. */ lineItemIds?: Array; /** * Merchant discount. */ merchantDiscount?: wix_ecom_backend.Events.ecomV1OrderMerchantDiscount; }; type ecomV1OrderAppliedDiscountDiscountSourceOneOf = { /** * Applied coupon info. */ coupon?: wix_ecom_backend.Events.ecomV1OrderCoupon; /** * Automatic Discount */ discountRule?: wix_ecom_backend.Events.ecomV1OrderDiscountRule; /** * Merchant discount. */ merchantDiscount?: wix_ecom_backend.Events.ecomV1OrderMerchantDiscount; }; type ecomV1OrderArchiveOrderRequest = { /** * Order ID. */ _id: string; }; type ecomV1OrderArchiveOrderResponse = { /** * Archived order. */ order?: wix_ecom_backend.Events.ecomV1OrderOrder; }; type ecomV1OrderBackendEventMetadata = { entityId: string; eventTime: string; id: string; triggeredByAnonymizeRequest: boolean; }; type ecomV1OrderBalance = { /** * Balance amount, can be negative. Negative value signifies amount to be refunded * and can happen due to possible overcharge or modified manual order. */ amount?: string; /** * Amount formatted with currency symbol. */ formattedAmount?: string; }; type ecomV1OrderBalanceSummary = { balance?: wix_ecom_backend.Events.ecomV1OrderBalance; }; type ecomV1OrderBillingInfo = { /** * Full billing address */ address?: wix_ecom_backend.Events.ecomV1OrderApiAddress; /** * Deprecated (use paymentProviderTransactionId instead) */ externalTransactionId?: string; /** * Payment date */ paidDate?: Date; /** * Transaction ID from payment gateway (e.g., Wix Payments) */ paymentGatewayTransactionId?: string; /** * Payment method used for this order */ paymentMethod?: string; /** * Transaction ID from payment provider (e.g., PayPal, Square, Stripe) transaction ID */ paymentProviderTransactionId?: string; /** * Whether order can be refunded by payment provider (manually or automatic) */ refundableByPaymentProvider?: boolean; }; type ecomV1OrderBulkActionMetadata = { /** * Number of items that couldn't be processed. */ totalFailures?: number; /** * Number of items that were successfully processed. */ totalSuccesses?: number; /** * Number of failures without details because detailed failure threshold was exceeded. */ undetailedFailures?: number; }; type ecomV1OrderBulkArchiveOrdersByFilterRequest = { /** * Filter object. Learn more about supported filters [here](https://bo.wix.com/wix-docs/rest/ecommerce/orders/filter-and-sort). */ filter: Object; }; type ecomV1OrderBulkArchiveOrdersByFilterResponse = { /** * Bulk action metadata. */ bulkActionMetadata?: wix_ecom_backend.Events.ecomV1OrderBulkActionMetadata; /** * Items updated by bulk action. */ results?: Array; }; type ecomV1OrderBulkArchiveOrdersRequest = { /** * IDs of orders to archive. */ ids: Array; /** * Whether to return the full updated order entities in the response. */ returnFullEntity?: boolean; }; type ecomV1OrderBulkArchiveOrdersResponse = { /** * Bulk action metadata. */ bulkActionMetadata?: wix_ecom_backend.Events.ecomV1OrderBulkActionMetadata; /** * Items updated by bulk action. */ results?: Array; }; type ecomV1OrderBulkMarkAsFulfilledByFilterRequest = { /** * Filter object. Learn more about supported filters [here](https://bo.wix.com/wix-docs/rest/ecommerce/orders/filter-and-sort). */ filter: Object; }; type ecomV1OrderBulkMarkAsFulfilledByFilterResponse = { /** * Bulk action metadata. */ bulkActionMetadata?: wix_ecom_backend.Events.ecomV1OrderBulkActionMetadata; /** * Items updated by bulk action. */ results?: Array; }; type ecomV1OrderBulkMarkAsFulfilledRequest = { /** * IDs of orders to be marked as fulfilled. */ ids: Array; /** * Whether to return the full updated order entities in the response. */ returnFullEntity?: boolean; }; type ecomV1OrderBulkMarkAsFulfilledResponse = { /** * Bulk action metadata. */ bulkActionMetadata?: wix_ecom_backend.Events.ecomV1OrderBulkActionMetadata; /** * Items updated by bulk action. */ results?: Array; }; type ecomV1OrderBulkMarkAsUnfulfilledByFilterRequest = { /** * Filter object. Learn more about supported filters [here](https://bo.wix.com/wix-docs/rest/ecommerce/orders/filter-and-sort). */ filter: Object; }; type ecomV1OrderBulkMarkAsUnfulfilledByFilterResponse = { /** * Bulk action metadata. */ bulkActionMetadata?: wix_ecom_backend.Events.ecomV1OrderBulkActionMetadata; /** * Items updated by bulk action. */ results?: Array; }; type ecomV1OrderBulkMarkAsUnfulfilledRequest = { /** * IDs of orders to be marked as not fulfilled. */ ids: Array; /** * Whether to return the full updated order entities in the response. */ returnFullEntity?: boolean; }; type ecomV1OrderBulkMarkAsUnfulfilledResponse = { /** * Bulk action metadata. */ bulkActionMetadata?: wix_ecom_backend.Events.ecomV1OrderBulkActionMetadata; /** * Items updated by bulk action. */ results?: Array; }; type ecomV1OrderBulkMarkOrdersAsPaidRequest = { /** * IDs of orders to mark as paid. */ ids: Array; }; type ecomV1OrderBulkMarkOrdersAsPaidResponse = { /** * Bulk action metadata. */ bulkActionMetadata?: wix_ecom_backend.Events.ecomV1OrderBulkActionMetadata; /** * Items updated by the bulk action. * The Order entity within the results optimistically changes its payment status to paid, however this process is async. */ results?: Array; }; type ecomV1OrderBulkOrderResult = { /** * Updated item. Optional - returned only if requested with `return_full_entity` set to `true`. */ item?: wix_ecom_backend.Events.ecomV1OrderOrder; /** * Item metadata. */ itemMetadata?: wix_ecom_backend.Events.ecomV1OrderItemMetadata; }; type ecomV1OrderBulkUnArchiveOrdersByFilterRequest = { /** * Filter object. Learn more about supported filters [here](https://bo.wix.com/wix-docs/rest/ecommerce/orders/filter-and-sort). */ filter: Object; }; type ecomV1OrderBulkUnArchiveOrdersByFilterResponse = { /** * Bulk action metadata. */ bulkActionMetadata?: wix_ecom_backend.Events.ecomV1OrderBulkActionMetadata; /** * Items updated by bulk action. */ results?: Array; }; type ecomV1OrderBulkUnArchiveOrdersRequest = { /** * IDs or orders to unarchive. */ ids: Array; /** * Whether to return the full updated order entities in the response. */ returnFullEntity?: boolean; }; type ecomV1OrderBulkUnArchiveOrdersResponse = { /** * Bulk action metadata. */ bulkActionMetadata?: wix_ecom_backend.Events.ecomV1OrderBulkActionMetadata; /** * Items updated by bulk action. */ results?: Array; }; type ecomV1OrderBuyerInfo = { /** * Contact ID. Auto-created if one does not yet exist. For more information, see [Contacts API](https://dev.wix.com/api/rest/contacts/contacts/introduction). */ contactId?: string; /** * Buyer email address. */ email?: string; /** * Member ID (if site visitor is a site member). */ memberId?: string; /** * Visitor ID (if site visitor is not a member). */ visitorId?: string; }; type ecomV1OrderBuyerInfoIdOneOf = { /** * Member ID (if site visitor is a site member). */ memberId?: string; /** * Visitor ID (if site visitor is not a member). */ visitorId?: string; }; type ecomV1OrderBuyerInfoUpdate = { /** * Contact ID. */ contactId?: string; /** * Email associated with the buyer. */ email?: string; }; type ecomV1OrderCancel = {}; type ecomV1OrderCancelOrderRequest = { /** * Order ID. */ _id: string; /** * Custom note to be added to the email (optional). */ customMessage?: string; /** * Whether to restock all items in the order. */ restockAllItems?: boolean; /** * Whether to send an order canceled email to the buyer. */ sendOrderCanceledEmail?: boolean; }; type ecomV1OrderCancelOrderResponse = { /** * Canceled order. */ order?: wix_ecom_backend.Events.ecomV1OrderOrder; }; type ecomV1OrderCatalogReference = { /** * ID of the catalog app. For example, the Wix Stores `appId`, or the 3rd-party `appId`. */ appId?: string; /** * ID of the item within its Wix or 3rd-party catalog. For example, `productId` for Wix Stores or `eventId` for Wix Events. */ catalogItemId?: string; /** * Additional info in key:value form. For example, `{"options":{"Size": "M", "Color": "Red"}}` or `{"variantId": ""}`. */ options?: Object; }; type ecomV1OrderChannelInfo = { /** * Reference to an order ID from an external system. */ externalOrderId?: string; /** * URL to the order in the external system. */ externalOrderUrl?: string; /** * Sales channel that submitted the order. */ type?: string; }; type ecomV1OrderColor = { /** * Optional - HEX or RGB color code for display. */ code?: string; /** * Optional - Description line color name in site's default language. */ original?: string; /** * Optional - Translated description line color name according to buyer language. Defaults to `original` when not provided. */ translated?: string; }; type ecomV1OrderComplete = {}; type ecomV1OrderContinueSideEffectsFlowInLegacyData = { orderId?: string; ordersExperiments?: wix_ecom_backend.Events.ecomV1OrderOrdersExperiments; storeId?: string; }; type ecomV1OrderCoupon = { /** * Coupon ID. */ _id?: string; /** * Coupon value. */ amount?: wix_ecom_backend.Events.ecomV1OrderPrice; /** * Coupon code. */ code?: string; /** * Coupon name. */ name?: string; }; type ecomV1OrderCreateOrderRequest = { /** * Order info. */ order: wix_ecom_backend.Events.ecomV1OrderOrder; }; type ecomV1OrderCreateOrderResponse = { /** * Newly created order. */ order?: wix_ecom_backend.Events.ecomV1OrderOrder; }; type ecomV1OrderCreatePaymentGatewayOrderRequest = { /** * eCom Order ID */ ecomOrderId: string; }; type ecomV1OrderCreatePaymentGatewayOrderResponse = { /** * ID of the order created in the payment gateway */ paymentGatewayOrderId?: string; }; type ecomV1OrderCreatedBy = { /** * App ID - when the order was created by an external application. */ appId?: string; /** * Member ID - when the order was created by a **logged in** site visitor. */ memberId?: string; /** * User ID - when the order was created by a Wix user on behalf of a buyer. * For example, via POS (point of service). */ userId?: string; /** * Visitor ID - when the order was created by a site visitor that was **not** logged in. */ visitorId?: string; }; type ecomV1OrderCreatedByStringOneOf = { /** * App ID - when the order was created by an external application. */ appId?: string; /** * Member ID - when the order was created by a **logged in** site visitor. */ memberId?: string; /** * User ID - when the order was created by a Wix user on behalf of a buyer. * For example, via POS (point of service). */ userId?: string; /** * Visitor ID - when the order was created by a site visitor that was **not** logged in. */ visitorId?: string; }; type ecomV1OrderCursorPaging = { /** * Pointer to the next or previous page in the list of results. */ cursor?: string; /** * Number of items to load. */ limit?: number; }; type ecomV1OrderCursors = { /** * Cursor pointing to next page in the list of results. */ next?: string; /** * Cursor pointing to previous page in the list of results. */ prev?: string; }; type ecomV1OrderCustomActivity = { /** * Additional data in key-value form. For example, `{ "Ticket number": "123456" }`. */ additionalData?: Record; /** * ID of the app that created the custom activity. */ appId?: string; /** * Custom activity type. For example, `"Ticket number set"`. */ type?: string; }; type ecomV1OrderCustomField = { /** * Custom field title. */ title?: string; /** * Translated custom field title. */ translatedTitle?: string; /** * Custom field value. */ value?: any; }; type ecomV1OrderDecrementData = { /** * Line item quantity being decremented. */ decrementBy?: number; /** * ID of the line item being decremented. */ lineItemId?: string; /** * Whether to restock the line item (triggers inventory update). */ restock?: boolean; }; type ecomV1OrderDecrementItemsQuantityRequest = { /** * Order ID */ _id: string; /** * Which items to decrement, and how much to decrement from each one */ decrementData: Array; }; type ecomV1OrderDecrementItemsQuantityResponse = { /** * Updated order data */ order?: wix_ecom_backend.Events.ecomV1OrderOrder; }; type ecomV1OrderDeleteActivityRequest = { /** * Order ID. */ _id: string; /** * ID of the activity to delete. */ activityId: string; }; type ecomV1OrderDeleteActivityResponse = { /** * Updated order. */ order?: wix_ecom_backend.Events.ecomV1OrderOrder; }; type ecomV1OrderDeliveryLogistics = { /** * Latest expected delivery date. */ deliverByDate?: Date; /** * Expected delivery time in free text. For example, `"3-5 business days"`. */ deliveryTime?: string; /** * Instructions for carrier. For example, `"Please knock on the door. If unanswered, please call contact number. Thanks."`. */ instructions?: string; /** * Pickup details. */ pickupDetails?: wix_ecom_backend.Events.ecomV1OrderPickupDetails; /** * Shipping address and contact details. */ shippingDestination?: wix_ecom_backend.Events.ecomV1OrderAddressWithContact; }; type ecomV1OrderDeliveryLogisticsAddressOneOf = { /** * Pickup details. */ pickupDetails?: wix_ecom_backend.Events.ecomV1OrderPickupDetails; /** * Shipping address and contact details. */ shippingDestination?: wix_ecom_backend.Events.ecomV1OrderAddressWithContact; }; type ecomV1OrderDescriptionLine = { /** * Description line color value. */ colorInfo?: wix_ecom_backend.Events.ecomV1OrderColor; /** * Description line name. */ name?: wix_ecom_backend.Events.ecomV1OrderDescriptionLineName; /** * Description line plain text value. */ plainText?: wix_ecom_backend.Events.ecomV1OrderPlainTextValue; }; type ecomV1OrderDescriptionLineDescriptionLineValueOneOf = {}; type ecomV1OrderDescriptionLineName = { /** * Optional - Description line name in site's default language. */ original?: string; /** * Optional - Translated description line item according to buyer language. Defaults to `original` when not provided. */ translated?: string; }; type ecomV1OrderDescriptionLineValueOneOf = { /** * Description line color value. */ colorInfo?: wix_ecom_backend.Events.ecomV1OrderColor; /** * Description line plain text value. */ plainText?: wix_ecom_backend.Events.ecomV1OrderPlainTextValue; }; type ecomV1OrderDiffmatokyPayload = { compareChannel?: string; entityId?: string; errorInformation?: wix_ecom_backend.Events.ecomV1OrderErrorInformation; left?: string; right?: string; tags?: Array; }; type ecomV1OrderDigitalFile = { /** * Link expiration time and date. */ expirationDate?: Date; /** * ID of the secure file in media. */ fileId?: string; /** * Link will exist after the digital links have been generated on the order. */ link?: string; }; type ecomV1OrderDiscountRule = { /** * Discount rule ID */ _id?: string; /** * Discount value. */ amount?: wix_ecom_backend.Events.ecomV1OrderPrice; /** * Discount rule name */ name?: wix_ecom_backend.Events.ecomV1OrderDiscountRuleName; }; type ecomV1OrderDiscountRuleName = { /** * Original discount rule name (in site's default language). */ original?: string; /** * Translated discount rule name according to buyer language. Defaults to `original` when not provided. */ translated?: string; }; type ecomV1OrderDomainEvent = { /** * random GUID so clients can tell if event was already handled */ _id?: string; actionEvent?: wix_ecom_backend.Events.ecomV1OrderActionEvent; createdEvent?: wix_ecom_backend.Events.ecomV1OrderEntityCreatedEvent; deletedEvent?: wix_ecom_backend.Events.ecomV1OrderEntityDeletedEvent; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * Assuming that all messages including Actions have id * Example: The id of the specific order, the id of a specific campaign */ entityId?: string; /** * The time of the event. Useful if there was a delay in dipatching */ eventTime?: Date; extendedFieldsUpdatedEvent?: wix_ecom_backend.Events.ecomV1OrderExtendedFieldsUpdatedEvent; /** * If present, indicates the action that triggered the event. */ originatedFrom?: string; /** * This is top level to ease client code dipatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** * A field that should be set if this event was triggered by an anonymize request. * For example you must set it to true when sending an event as a result of a GDPR right to be forgotten request. * NOTE: This field is not relevant for `EntityCreatedEvent` but is located here for better ergonomics of consumers. */ triggeredByAnonymizeRequest?: boolean; updatedEvent?: wix_ecom_backend.Events.ecomV1OrderEntityUpdatedEvent; }; type ecomV1OrderDomainEventBodyOneOf = { actionEvent?: wix_ecom_backend.Events.ecomV1OrderActionEvent; createdEvent?: wix_ecom_backend.Events.ecomV1OrderEntityCreatedEvent; deletedEvent?: wix_ecom_backend.Events.ecomV1OrderEntityDeletedEvent; extendedFieldsUpdatedEvent?: wix_ecom_backend.Events.ecomV1OrderExtendedFieldsUpdatedEvent; updatedEvent?: wix_ecom_backend.Events.ecomV1OrderEntityUpdatedEvent; }; type ecomV1OrderDownloadLinkSent = {}; type ecomV1OrderEmailEdited = {}; type ecomV1OrderEmpty = {}; type ecomV1OrderEntityCreatedEvent = { entityAsJson?: string; }; type ecomV1OrderEntityDeletedEvent = {}; type ecomV1OrderEntityUpdatedEvent = { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; }; type ecomV1OrderErrorInformation = { stackTrace?: string; }; type ecomV1OrderExtendedFieldsUpdatedEvent = { currentEntityAsJson?: string; }; type ecomV1OrderFulfillerEmailSent = {}; type ecomV1OrderFulfillmentStatusUpdated = { /** * the action that caused this update */ action?: string; /** * the new status (after the update) */ newFulfillmentStatus?: string; /** * The order that was updated */ order?: wix_ecom_backend.Events.ecomV1OrderOrder; /** * The previous status (before the update) */ previousFulfillmentStatus?: string; }; type ecomV1OrderFullAddressContactDetails = { /** * Company name. */ company?: string; /** * First name. */ firstName?: string; /** * Last name. */ lastName?: string; /** * Phone number. */ phone?: string; /** * Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set - UNSPECIFIED is not allowed. */ vatId?: wix_ecom_backend.Events.ecomV1OrderVatId; }; type ecomV1OrderFullName = { /** * Customer's first name */ firstName?: string; /** * Customer's last name */ lastName?: string; }; type ecomV1OrderGetOrderRequest = { /** * ID of the order to retrieve. */ _id: string; }; type ecomV1OrderGetOrderResponse = { /** * The requested order. */ order?: wix_ecom_backend.Events.ecomV1OrderOrder; }; type ecomV1OrderGetPaymentCollectabilityStatusRequest = { /** * Ecom order ID. */ ecomOrderId: string; }; type ecomV1OrderGetPaymentCollectabilityStatusResponse = { /** * Collectable order amount */ amount?: wix_ecom_backend.Events.ecomV1OrderPrice; /** * Payment collectability status */ status?: string; }; type ecomV1OrderGetShipmentsRequest = { _id: string; }; type ecomV1OrderGetShipmentsResponse = { shipmentIds?: Array; }; type ecomV1OrderIndexingMessage = { _id?: string; opType?: number; requiredVersions?: Array; }; type ecomV1OrderInternalActivity = { /** * Internal activity creation date and time. */ _createdDate?: Date; /** * Internal activity ID. */ _id?: string; /** * Internal activity author's email. */ authorEmail?: string; /** * Download link was sent (relevant for orders with digital line items). */ downloadLinkSent?: wix_ecom_backend.Events.ecomV1OrderDownloadLinkSent; /** * Order email was updated. */ emailEdited?: wix_ecom_backend.Events.ecomV1OrderEmailEdited; /** * Email sent to fulfiller. */ fulfillerEmailSent?: wix_ecom_backend.Events.ecomV1OrderFulfillerEmailSent; /** * Invoice was added to order. */ invoiceAdded?: wix_ecom_backend.Events.ecomV1OrderInvoiceAdded; /** * Invoice sent to customer via email. */ invoiceSent?: wix_ecom_backend.Events.ecomV1OrderInvoiceSent; /** * New exchange order created. */ newExchangeOrderCreated?: wix_ecom_backend.Events.ecomV1OrderNewExchangeOrderCreated; /** * Order canceled. */ orderCanceled?: wix_ecom_backend.Events.ecomV1OrderOrderCanceled; /** * Order created as a result of items exchange. */ orderCreatedFromExchange?: wix_ecom_backend.Events.ecomV1OrderOrderCreatedFromExchange; /** * Order shipping status set as fulfilled. */ orderFulfilled?: wix_ecom_backend.Events.ecomV1OrderOrderFulfilled; /** * Order shipping status set as not fulfilled. */ orderNotFulfilled?: wix_ecom_backend.Events.ecomV1OrderOrderNotFulfilled; /** * Order paid. Either by the store owner (for offline orders), or when an online transaction was confirmed. */ orderPaid?: wix_ecom_backend.Events.ecomV1OrderOrderPaid; /** * Order partially paid. During the checkout for orders with deposit items. */ orderPartiallyPaid?: wix_ecom_backend.Events.ecomV1OrderOrderPartiallyPaid; /** * Order placed. */ orderPlaced?: wix_ecom_backend.Events.ecomV1OrderOrderPlaced; /** * Order refunded. */ orderRefunded?: wix_ecom_backend.Events.ecomV1OrderOrderRefunded; /** * Email notification for pickup sent. */ pickupReadyEmailSent?: wix_ecom_backend.Events.ecomV1OrderPickupReadyEmailSent; /** * Shipping address was updated. */ shippingAddressEdited?: wix_ecom_backend.Events.ecomV1OrderShippingAddressEdited; /** * An email confirmation of order shipment was sent. */ shippingConfirmationEmailSent?: wix_ecom_backend.Events.ecomV1OrderShippingConfirmationEmailSent; /** * Shipping tracking link added to order. */ trackingLinkAdded?: wix_ecom_backend.Events.ecomV1OrderTrackingLinkAdded; /** * Shipping tracking number added to order. */ trackingNumberAdded?: wix_ecom_backend.Events.ecomV1OrderTrackingNumberAdded; /** * Shipping tracking number was edited. */ trackingNumberEdited?: wix_ecom_backend.Events.ecomV1OrderTrackingNumberEdited; }; type ecomV1OrderInternalActivityContentOneOf = { /** * Download link was sent (relevant for orders with digital line items). */ downloadLinkSent?: wix_ecom_backend.Events.ecomV1OrderDownloadLinkSent; /** * Order email was updated. */ emailEdited?: wix_ecom_backend.Events.ecomV1OrderEmailEdited; /** * Email sent to fulfiller. */ fulfillerEmailSent?: wix_ecom_backend.Events.ecomV1OrderFulfillerEmailSent; /** * Invoice was added to order. */ invoiceAdded?: wix_ecom_backend.Events.ecomV1OrderInvoiceAdded; /** * Invoice sent to customer via email. */ invoiceSent?: wix_ecom_backend.Events.ecomV1OrderInvoiceSent; /** * New exchange order created. */ newExchangeOrderCreated?: wix_ecom_backend.Events.ecomV1OrderNewExchangeOrderCreated; /** * Order canceled. */ orderCanceled?: wix_ecom_backend.Events.ecomV1OrderOrderCanceled; /** * Order created as a result of items exchange. */ orderCreatedFromExchange?: wix_ecom_backend.Events.ecomV1OrderOrderCreatedFromExchange; /** * Order shipping status set as fulfilled. */ orderFulfilled?: wix_ecom_backend.Events.ecomV1OrderOrderFulfilled; /** * Order shipping status set as not fulfilled. */ orderNotFulfilled?: wix_ecom_backend.Events.ecomV1OrderOrderNotFulfilled; /** * Order paid. Either by the store owner (for offline orders), or when an online transaction was confirmed. */ orderPaid?: wix_ecom_backend.Events.ecomV1OrderOrderPaid; /** * Order partially paid. During the checkout for orders with deposit items. */ orderPartiallyPaid?: wix_ecom_backend.Events.ecomV1OrderOrderPartiallyPaid; /** * Order placed. */ orderPlaced?: wix_ecom_backend.Events.ecomV1OrderOrderPlaced; /** * Order refunded. */ orderRefunded?: wix_ecom_backend.Events.ecomV1OrderOrderRefunded; /** * Email notification for pickup sent. */ pickupReadyEmailSent?: wix_ecom_backend.Events.ecomV1OrderPickupReadyEmailSent; /** * Shipping address was updated. */ shippingAddressEdited?: wix_ecom_backend.Events.ecomV1OrderShippingAddressEdited; /** * An email confirmation of order shipment was sent. */ shippingConfirmationEmailSent?: wix_ecom_backend.Events.ecomV1OrderShippingConfirmationEmailSent; /** * Shipping tracking link added to order. */ trackingLinkAdded?: wix_ecom_backend.Events.ecomV1OrderTrackingLinkAdded; /** * Shipping tracking number added to order. */ trackingNumberAdded?: wix_ecom_backend.Events.ecomV1OrderTrackingNumberAdded; /** * Shipping tracking number was edited. */ trackingNumberEdited?: wix_ecom_backend.Events.ecomV1OrderTrackingNumberEdited; }; type ecomV1OrderInvoiceAdded = {}; type ecomV1OrderInvoiceSent = {}; type ecomV1OrderItemMetadata = { /** * Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */ _id?: string; /** * Details about the error in case of failure. */ error?: wix_ecom_backend.Events.ecomV1OrderApplicationError; /** * Index of the item within the request array. Allows for correlation between request and response items. */ originalIndex?: number; /** * Whether the requested action was successful for this item. When `false`, the `error` field is populated. */ success?: boolean; }; type ecomV1OrderItemTaxFullDetails = { /** * Tax rate percentage, as a decimal numeral between 0 and 1. For example, `"0.13"`. */ taxRate?: string; /** * Taxable amount of this line item. */ taxableAmount?: wix_ecom_backend.Events.ecomV1OrderPrice; /** * The calculated tax, based on the `taxableAmount` and `taxRate`. */ totalTax?: wix_ecom_backend.Events.ecomV1OrderPrice; }; type ecomV1OrderItemType = { /** * Custom item type. */ custom?: string; /** * Preset item type. */ preset?: string; }; type ecomV1OrderItemTypeItemTypeDataOneOf = { /** * Custom item type. */ custom?: string; /** * Preset item type. */ preset?: string; }; type ecomV1OrderLineItemExchangeData = { /** * ID of the exchanged line item. */ lineItemId?: string; /** * Line item quantity being exchanged. */ quantity?: number; }; type ecomV1OrderLineItemUpdate = { /** * Description lines' info. * If description line already exists for this name, it will be replaced. */ descriptionLines?: Array; /** * Line item ID. */ lineItemId?: string; }; type ecomV1OrderMarkAsFulfilledRequest = { /** * Order ID. */ _id: string; }; type ecomV1OrderMarkAsFulfilledResponse = { /** * Updated order. */ order?: wix_ecom_backend.Events.ecomV1OrderOrder; }; type ecomV1OrderMarkAsUnfulfilledRequest = { /** * Order ID. */ _id: string; }; type ecomV1OrderMarkAsUnfulfilledResponse = { /** * Updated order. */ order?: wix_ecom_backend.Events.ecomV1OrderOrder; }; type ecomV1OrderMarkOrderAsPaidRequest = { /** * Order ID. */ _id: string; }; type ecomV1OrderMarkOrderAsPaidResponse = { /** * Updated order. */ order?: wix_ecom_backend.Events.ecomV1OrderOrder; }; type ecomV1OrderMarkOrderAsSeenByHumanRequest = { /** * Order ID. */ _id: string; }; type ecomV1OrderMarkOrderAsSeenByHumanResponse = { /** * Updated order. */ order?: wix_ecom_backend.Events.ecomV1OrderOrder; }; type ecomV1OrderMerchantComment = { /** * Merchant comment message. */ message?: string; }; type ecomV1OrderMerchantDiscount = { /** * Discount amount. */ amount?: wix_ecom_backend.Events.ecomV1OrderPrice; /** * Discount description as free text (optional). */ description?: string; /** * Pre-defined discount reason (optional). * * `"ITEMS_EXCHANGE"` - exchange balance acquired as a result of items exchange. */ discountReason?: string; }; type ecomV1OrderMerchantDiscountMerchantDiscountReasonOneOf = { /** * Discount description as free text (optional). */ description?: string; /** * Pre-defined discount reason (optional). * * `"ITEMS_EXCHANGE"` - exchange balance acquired as a result of items exchange. */ discountReason?: string; }; type ecomV1OrderNewExchangeOrderCreated = { /** * ID of the new order created as a result of an exchange of items. */ exchangeOrderId?: string; /** * IDs of the items that were exchanged. */ lineItems?: Array; }; type ecomV1OrderOrder = { /** * Date and time the order was created. */ _createdDate?: Date; /** * Order ID. */ _id?: string; /** * Date and time of order's latest update. */ _updatedDate?: Date; /** * Order activities. */ activities?: Array; /** * Additional fees applied to the order. */ additionalFees?: Array; /** * Applied discounts. */ appliedDiscounts?: Array; /** * Whether order is archived. */ archived?: boolean; /** * Order attribution source. */ attributionSource?: string; /** * Billing address and contact details. */ billingInfo?: wix_ecom_backend.Events.ecomV1OrderAddressWithContact; /** * Buyer information. */ buyerInfo?: wix_ecom_backend.Events.ecomV1OrderBuyerInfo; /** * Language for communication with the buyer. Defaults to the site language. * For a site that supports multiple languages, this is the language the buyer selected. */ buyerLanguage?: string; /** * [Buyer note](https://support.wix.com/en/article/wix-stores-viewing-buyer-notes) left by the customer. */ buyerNote?: string; /** * Information about the sales channel that submitted this order. */ channelInfo?: wix_ecom_backend.Events.ecomV1OrderChannelInfo; /** * Checkout ID. */ checkoutId?: string; /** * ID of the order's initiator. */ createdBy?: wix_ecom_backend.Events.ecomV1OrderCreatedBy; /** * Currency used for pricing in this store. */ currency?: string; /** * Custom fields. */ customFields?: Array; /** * Order fulfillment status. */ fulfillmentStatus?: string; /** * Order line items. */ lineItems?: Array; /** * Order number displayed in the site owner's business manager (auto-generated). */ number?: string; /** * Order payment status. * + `NOT_PAID` - This can be an order made online, but not yet paid. In such cases `order.status` will be `INITIALIZED`. * + This status also applies when an offline order needs to be manually marked as paid. In such cases `order.status` will be `APPROVED`. * + `PAID` - All payments associated with this order are paid. For online payments: [`payment.regularPaymentDetails.status: APPROVED`](https://bo.wix.com/wix-docs/rest/ecommerce/order-payments/order-transactions-object). For gift cards: [`payment.giftCardPaymentDetails.voided: false`](https://bo.wix.com/wix-docs/rest/ecommerce/order-payments/order-transactions-object). * + `PARTIALLY_REFUNDED` - Order was refunded, but refund amount is less than order total price. * + `FULLY_REFUNDED` - Order fully refunded. Refund amount equals total price. * + `PENDING` - Payments received but not yet confirmed by the payment provider. * + `PARTIALLY_PAID` - At least one payment was received and approved, covering less than total price amount. */ paymentStatus?: string; /** * Order price summary. */ priceSummary?: wix_ecom_backend.Events.ecomV1OrderPriceSummary; /** * Whether a human has seen the order. Set when an order is clicked on in the Business Manager. */ seenByAHuman?: boolean; /** * Shipping info and selected shipping option details. */ shippingInfo?: wix_ecom_backend.Events.ecomV1OrderShippingInformation; /** * Site language in which original values are shown. */ siteLanguage?: string; /** * Order status. * + `INITIALIZED` - Order was created, but not yet approved or declined. * + `APPROVED` - Order was approved. This happens when either the online payment succeeded or the order is an offline order. * + Once an order is approved, many side effects are triggered. For example, holding of stock in the inventory and sending of notification emails. * + `CANCELED` - Order was canceled by the user. */ status?: string; /** * Whether tax is included in line item prices. */ taxIncludedInPrices?: boolean; /** * Tax summary. */ taxSummary?: wix_ecom_backend.Events.ecomV1OrderTaxSummary; /** * Weight measurement unit - defaults to site's weight unit. */ weightUnit?: string; }; type ecomV1OrderOrderApproved = { /** * The order that was updated */ order?: wix_ecom_backend.Events.ecomV1OrderOrder; }; type ecomV1OrderOrderApprovedEvent = { data: wix_ecom_backend.Events.ecomV1OrderOrderApproved; metadata: wix_ecom_backend.Events.ecomV1OrderBackendEventMetadata; }; type ecomV1OrderOrderCanceled = {}; type ecomV1OrderOrderCanceledEventOrderCanceled = { /** * Personal note added to the email */ customMessage?: string; /** * The order that was cancelled */ order?: wix_ecom_backend.Events.ecomV1OrderOrder; /** * Should restock all items on that order */ restockAllItems?: boolean; /** * Should send a confirmation mail to the customer */ sendOrderCanceledEmail?: boolean; }; type ecomV1OrderOrderCreated = { /** * Order archive status */ archived?: boolean; /** * Customer information */ buyerInfo?: wix_ecom_backend.Events.ecomV1OrderV2BuyerInfo; /** * Currency used for pricing in this store */ currency?: string; /** * Order creation date */ dateCreated?: Date; /** * Order fulfillment status */ fulfillmentStatus?: string; /** * ID displayed in the owner's store (auto generated) */ number?: string; /** * Order ID (auto generated upon order creation) */ orderId?: string; /** * Order payment status */ paymentStatus?: string; /** * Whether the order was read by the store owner */ read?: boolean; /** * Totals for order's line items */ totals?: wix_ecom_backend.Events.ecomV1OrderTotals; /** * Weight unit used in this store */ weightUnit?: string; }; type ecomV1OrderOrderCreatedFromExchange = { /** * ID of the original order for which the exchange happened. */ originalOrderId?: string; }; type ecomV1OrderOrderFulfilled = {}; type ecomV1OrderOrderItemsRestocked = { /** * The order which items were restocked */ order?: wix_ecom_backend.Events.ecomV1OrderOrder; /** * Restocked items and quantities */ restockItems?: Array; }; type ecomV1OrderOrderLineItem = { /** * Line item ID. */ _id?: string; /** * References to the line item's origin catalog. * See [Catalog SPI](https://bo.wix.com/wix-docs/rest/ecommerce/catalog-spi/introduction) for more details. * This field is empty in the case of a custom line item. */ catalogReference?: wix_ecom_backend.Events.ecomV1OrderCatalogReference; /** * Item's price amount to be charged during checkout, relevant for items with payment option DEPOSIT_ONLINE */ depositAmount?: wix_ecom_backend.Events.ecomV1OrderPrice; /** * Line item description lines. Used for display purposes for the cart, checkout and order. */ descriptionLines?: Array; /** * Fulfiller ID. Field is empty when the line item is self-fulfilled. * To get fulfillment information, pass this order's ID to [List Fulfillments For Single Order](https://bo.wix.com/wix-docs/rest/ecommerce/order-fulfillments/list-fulfillments-for-single-order). */ fulfillerId?: string; /** * Line item image. */ image?: string; /** * Item type. Either a preset type or custom. */ itemType?: wix_ecom_backend.Events.ecomV1OrderItemType; /** * Type of selected payment option for current item. Defaults to `FULL_PAYMENT_ONLINE`. * + `FULL_PAYMENT_ONLINE` - The entire payment for this item happens as part of the checkout. * + `FULL_PAYMENT_OFFLINE` - The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods. * + `MEMBERSHIP` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0. * + `DEPOSIT_ONLINE` - Partial payment for the given item to be paid upfront during the checkout. Eligible for catalog items with type `DEPOSIT_ONLINE` only. */ paymentOption?: string; /** * Physical properties of the item. When relevant, contains information such as SKU and item weight. */ physicalProperties?: wix_ecom_backend.Events.ecomV1OrderPhysicalProperties; /** * Line item price after line item discounts for display purposes. */ price?: wix_ecom_backend.Events.ecomV1OrderPrice; /** * Line item price before line item discounts for display purposes. Defaults to `price` when not provided. */ priceBeforeDiscounts?: wix_ecom_backend.Events.ecomV1OrderPrice; /** * Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". */ priceDescription?: wix_ecom_backend.Events.ecomV1OrderPriceDescription; /** * Item name. * + Stores - `product.name` * + Bookings - `service.info.name` * + Events - `ticket.name` */ productName?: wix_ecom_backend.Events.ecomV1OrderProductName; /** * Line item quantity. */ quantity?: number; /** * quantity of inventory requested to be returned. Whether to restock or ignore the request is up the vertical. */ restockQuantity?: number; /** * Subscription info. */ subscriptionInfo?: wix_ecom_backend.Events.ecomV1OrderSubscriptionInfo; /** * Tax details for this line item. */ taxDetails?: wix_ecom_backend.Events.ecomV1OrderItemTaxFullDetails; /** * Total discount for this line item's entire quantity. */ totalDiscount?: wix_ecom_backend.Events.ecomV1OrderPrice; /** * Total price after all discounts and tax. */ totalPriceAfterTax?: wix_ecom_backend.Events.ecomV1OrderPrice; /** * Deprecated - please use `total_price_after_tax` minus `tax_details.total_tax` instead. */ totalPriceBeforeTax?: wix_ecom_backend.Events.ecomV1OrderPrice; }; type ecomV1OrderOrderNotFulfilled = {}; type ecomV1OrderOrderPaid = {}; type ecomV1OrderOrderPartiallyPaid = {}; type ecomV1OrderOrderPlaced = {}; type ecomV1OrderOrderRefunded = { /** * Refund amount. */ amount?: wix_ecom_backend.Events.ecomV1OrderPrice; /** * Whether order was refunded manually. For example, via payment provider or using cash. */ manual?: boolean; /** * Reason for refund. */ reason?: string; }; type ecomV1OrderOrdersExperiments = { epCommitTax?: boolean; moveBuyerOrderConfirmationEmailToEp?: boolean; moveMerchantEmailToEp?: boolean; producedByEpBridge?: boolean; }; type ecomV1OrderPaymentStatusUpdated = { /** * The order that was updated */ order?: wix_ecom_backend.Events.ecomV1OrderOrder; /** * The previous status (before the update) */ previousPaymentStatus?: string; }; type ecomV1OrderPhysicalProperties = { /** * Whether this line item is shippable. */ shippable?: boolean; /** * Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku). */ sku?: string; /** * Line item weight. Measurement unit (KG or LB) is taken from `order.weightUnit`. */ weight?: number; }; type ecomV1OrderPickupAddress = { /** * Main address line (usually street name and number). */ addressLine1?: string; /** * Free text providing more detailed address info. Usually contains apt, suite, floor. */ addressLine2?: string; /** * City name. */ city?: string; /** * Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format. */ country?: string; /** * Postal or zip code. */ postalCode?: string; /** * Street address object, with number, name, and apartment number in separate fields. */ streetAddress?: wix_ecom_backend.Events.ecomV1OrderStreetAddress; /** * Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format. */ subdivision?: string; }; type ecomV1OrderPickupDetails = { /** * Pickup address. */ address?: wix_ecom_backend.Events.ecomV1OrderPickupAddress; /** * Pickup method */ pickupMethod?: string; }; type ecomV1OrderPickupReadyEmailSent = {}; type ecomV1OrderPlainTextValue = { /** * Optional - Description line plain text value in site's default language. */ original?: string; /** * Optional - Translated description line plain text value according to buyer language. Defaults to `original` when not provided. */ translated?: string; }; type ecomV1OrderPlatformPaging = { /** * Number of items to load. */ limit?: number; /** * Number of items to skip in the current sort order. */ offset?: number; }; type ecomV1OrderPlatformPagingMetadata = { /** * The number of items returned in this response. */ count?: number; /** * Cursors to navigate through result pages. Returned if cursor paging was used. */ cursors?: wix_ecom_backend.Events.ecomV1OrderCursors; /** * The offset which was requested. Returned if offset paging was used. */ offset?: number; /** * The total number of items that match the query. Returned if offset paging was used. */ total?: number; }; type ecomV1OrderPlatformQuery = { /** * Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */ cursorPaging?: wix_ecom_backend.Events.ecomV1OrderCursorPaging; /** * Filter object. */ filter?: Object; /** * Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */ paging?: wix_ecom_backend.Events.ecomV1OrderPlatformPaging; /** * Sorting options. For example, `[{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]`. */ sort?: Array; }; type ecomV1OrderPlatformQueryPagingMethodOneOf = { /** * Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */ cursorPaging?: wix_ecom_backend.Events.ecomV1OrderCursorPaging; /** * Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */ paging?: wix_ecom_backend.Events.ecomV1OrderPlatformPaging; }; type ecomV1OrderPreparePaymentCollectionRequest = { /** * Amount to collect */ amount: wix_ecom_backend.Events.ecomV1OrderPrice; /** * Ecom order ID. */ ecomOrderId: string; }; type ecomV1OrderPreparePaymentCollectionResponse = { /** * Payment gateway order id which is associated with given payment */ paymentGatewayOrderId?: string; }; type ecomV1OrderPreviewBuyerConfirmationEmailRequest = {}; type ecomV1OrderPreviewBuyerConfirmationEmailResponse = { emailPreview?: string; }; type ecomV1OrderPreviewBuyerPaymentsReceivedEmailRequest = {}; type ecomV1OrderPreviewBuyerPaymentsReceivedEmailResponse = { emailPreview?: string; }; type ecomV1OrderPreviewBuyerPickupConfirmationEmailRequest = {}; type ecomV1OrderPreviewBuyerPickupConfirmationEmailResponse = { emailPreview?: string; }; type ecomV1OrderPreviewCancelEmailRequest = { /** * Personal note added to the email (optional) */ customMessage?: string; orderId: string; }; type ecomV1OrderPreviewCancelEmailResponse = { emailPreview?: string; }; type ecomV1OrderPreviewCancelRefundEmailRequest = { /** * Personal note added to the email (optional) */ customMessage?: string; orderId: string; /** * Refund amount */ refundAmount?: wix_ecom_backend.Events.ecomV1OrderPrice; }; type ecomV1OrderPreviewCancelRefundEmailResponse = { emailPreview?: string; }; type ecomV1OrderPreviewEmailByTypeRequest = { /** * Suppoerted values: * - `'DOWNLOAD_LINKS'` * - `'ORDER_PLACED'` * - `'ORDER_READY_FOR_PICKUP'` * - `'ORDER_SHIPPED'` */ emailType: string; }; type ecomV1OrderPreviewEmailByTypeResponse = { emailPreview?: string; }; type ecomV1OrderPreviewRefundEmailRequest = { /** * Personal note added to the email (optional) */ customMessage?: string; /** * Refund business details */ details?: wix_ecom_backend.Events.ecomV1OrderRefundDetails; orderId: string; /** * Refund amount */ refundAmount: wix_ecom_backend.Events.ecomV1OrderPrice; }; type ecomV1OrderPreviewRefundEmailResponse = { emailPreview?: string; }; type ecomV1OrderPreviewResendDownloadLinksEmailRequest = {}; type ecomV1OrderPreviewResendDownloadLinksEmailResponse = { emailPreview?: string; }; type ecomV1OrderPreviewShippingConfirmationEmailRequest = {}; type ecomV1OrderPreviewShippingConfirmationEmailResponse = { emailPreview?: string; }; type ecomV1OrderPrice = { /** * Amount. */ amount?: string; /** * Amount formatted with currency symbol. */ formattedAmount?: string; }; type ecomV1OrderPriceDescription = { /** * Required** - Original price description (in site's default language). */ original?: string; /** * Optional - Translated product name according to buyer language. Defaults to `original` when not provided. */ translated?: string; }; type ecomV1OrderPriceSummary = { /** * Total calculated discount value. */ discount?: wix_ecom_backend.Events.ecomV1OrderPrice; /** * Total shipping price, before discounts and before tax. */ shipping?: wix_ecom_backend.Events.ecomV1OrderPrice; /** * Subtotal of all the line items, before discounts and before tax. */ subtotal?: wix_ecom_backend.Events.ecomV1OrderPrice; /** * Total tax on this order. */ tax?: wix_ecom_backend.Events.ecomV1OrderPrice; /** * Order’s total price after discounts and tax. */ total?: wix_ecom_backend.Events.ecomV1OrderPrice; /** * Total price of additional fees. */ totalAdditionalFees?: wix_ecom_backend.Events.ecomV1OrderPrice; /** * Deprecated - use `total` instead. */ totalPrice?: wix_ecom_backend.Events.ecomV1OrderPrice; }; type ecomV1OrderProductName = { /** * Required** - Original item name (in site's default language). */ original?: string; /** * Optional - Translated item name according to buyer language. Defaults to `original` when not provided. */ translated?: string; }; type ecomV1OrderPublicActivity = { /** * Custom activity details. */ customActivity?: wix_ecom_backend.Events.ecomV1OrderCustomActivity; /** * Merchant commment. */ merchantComment?: wix_ecom_backend.Events.ecomV1OrderMerchantComment; }; type ecomV1OrderPublicActivityContentOneOf = { /** * Custom activity details. */ customActivity?: wix_ecom_backend.Events.ecomV1OrderCustomActivity; /** * Merchant commment. */ merchantComment?: wix_ecom_backend.Events.ecomV1OrderMerchantComment; }; type ecomV1OrderQueryOrderRequest = { /** * Query options. */ query?: wix_ecom_backend.Events.ecomV1OrderPlatformQuery; }; type ecomV1OrderQueryOrderResponse = { /** * Details on the paged set of results returned. */ metadata?: wix_ecom_backend.Events.ecomV1OrderPlatformPagingMetadata; /** * List of orders. */ orders?: Array; }; type ecomV1OrderRefundDetails = { /** * Refunded line items and quantities. */ items?: Array; /** * Reason for refund, given by user (optional). */ reason?: string; /** * Whether shipping rate is also refunded. */ shippingIncluded?: boolean; }; type ecomV1OrderRefundItem = { /** * ID of the line item being refunded. */ lineItemId?: string; /** * Line item quantity being refunded. */ quantity?: number; }; type ecomV1OrderReschedule = { executeAt?: Date; payload?: string; }; type ecomV1OrderRestockItem = { /** * ID of the line item being restocked. */ lineItemId?: string; /** * Line item quantity being restocked. */ quantity?: number; }; type ecomV1OrderSendBuyerConfirmationEmailRequest = { orderId: string; }; type ecomV1OrderSendBuyerConfirmationEmailResponse = {}; type ecomV1OrderSendBuyerPaymentsReceivedEmailRequest = { orderId: string; }; type ecomV1OrderSendBuyerPaymentsReceivedEmailResponse = {}; type ecomV1OrderSendBuyerPickupConfirmationEmailRequest = { orderId: string; }; type ecomV1OrderSendBuyerPickupConfirmationEmailResponse = {}; type ecomV1OrderSendBuyerShippingConfirmationEmailRequest = { orderId: string; }; type ecomV1OrderSendBuyerShippingConfirmationEmailResponse = {}; type ecomV1OrderSendCancelRefundEmailRequest = { /** * Personal note added to the email (optional) */ customMessage?: string; /** * The ID of order that is canceled/refunded */ orderId: string; /** * Refund amount */ refundAmount: wix_ecom_backend.Events.ecomV1OrderPrice; }; type ecomV1OrderSendCancelRefundEmailResponse = {}; type ecomV1OrderSendMerchantOrderReceivedNotificationRequest = { orderId: string; }; type ecomV1OrderSendMerchantOrderReceivedNotificationResponse = {}; type ecomV1OrderSendOrderPaymentReceivedEmail = { orderId?: string; storeId?: string; }; type ecomV1OrderShippingAddressEdited = {}; type ecomV1OrderShippingConfirmationEmailSent = {}; type ecomV1OrderShippingInformation = { /** * App Def Id of external provider which was a source of shipping info */ carrierId?: string; /** * Unique code (or ID) of selected shipping option. For example, `"usps_std_overnight"``. */ code?: string; /** * Shipping costs. */ cost?: wix_ecom_backend.Events.ecomV1OrderShippingPrice; /** * Shipping logistics. */ logistics?: wix_ecom_backend.Events.ecomV1OrderDeliveryLogistics; /** * Shipping region. */ region?: wix_ecom_backend.Events.ecomV1OrderShippingRegion; /** * Shipping option title. * For example, `"USPS Standard Overnight Delivery"`, `"Standard"` or `"First-Class Package International"`. */ title?: string; }; type ecomV1OrderShippingPrice = { /** * Shipping discount before tax. */ discount?: wix_ecom_backend.Events.ecomV1OrderPrice; /** * Shipping price for display purposes. */ price?: wix_ecom_backend.Events.ecomV1OrderPrice; /** * Tax details. */ taxDetails?: wix_ecom_backend.Events.ecomV1OrderItemTaxFullDetails; /** * Shipping price after all discounts (if any exist), and after tax. */ totalPriceAfterTax?: wix_ecom_backend.Events.ecomV1OrderPrice; /** * Deprecated - please use `total_price_after_tax` minus `tax_details.total_tax` instead. */ totalPriceBeforeTax?: wix_ecom_backend.Events.ecomV1OrderPrice; }; type ecomV1OrderShippingRegion = { /** * Name of shipping region. For example, `"Metropolitan London"`, or `"Outer Melbourne suburbs"`. */ name?: string; }; type ecomV1OrderSnapshotMessage = { _id?: string; opType?: number; }; type ecomV1OrderSorting = { /** * Name of the field to sort by. */ fieldName?: string; /** * Sort order. */ order?: string; }; type ecomV1OrderStreet = { /** * Street name */ name?: string; /** * Street number */ number?: string; }; type ecomV1OrderStreetAddress = { /** * Street name. */ name?: string; /** * Street number. */ number?: string; }; type ecomV1OrderSubscriptionInfo = { /** * Subscription ID. */ _id?: string; /** * Subscription cycle. For example, if this order is for the 3rd cycle of a subscription, value will be `3`. */ cycleNumber?: number; /** * Subscription option description. For example, `"1kg of selected coffee, once a month"`. */ subscriptionOptionDescription?: string; /** * Subscription option title. For example, `"Monthly coffee Subscription"`. */ subscriptionOptionTitle?: string; /** * Subscription detailed information. */ subscriptionSettings?: wix_ecom_backend.Events.ecomV1OrderSubscriptionSettings; }; type ecomV1OrderSubscriptionOptionInfo = { /** * Subscription option description. */ description?: string; /** * Subscription option title. */ title?: string; }; type ecomV1OrderSubscriptionSettings = { /** * Whether subscription is renewed automatically at the end of each period. */ autoRenewal?: boolean; /** * Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`. */ billingCycles?: number; /** * Frequency of recurring payment. */ frequency?: string; }; type ecomV1OrderTask = { executeAt?: Date; key?: wix_ecom_backend.Events.ecomV1OrderTaskKey; payload?: string; }; type ecomV1OrderTaskAction = { cancel?: wix_ecom_backend.Events.ecomV1OrderCancel; complete?: wix_ecom_backend.Events.ecomV1OrderComplete; reschedule?: wix_ecom_backend.Events.ecomV1OrderReschedule; }; type ecomV1OrderTaskActionActionOneOf = { cancel?: wix_ecom_backend.Events.ecomV1OrderCancel; complete?: wix_ecom_backend.Events.ecomV1OrderComplete; reschedule?: wix_ecom_backend.Events.ecomV1OrderReschedule; }; type ecomV1OrderTaskKey = { appId?: string; instanceId?: string; subjectId?: string; }; type ecomV1OrderTaxSummary = { /** * Total tax. */ totalTax?: wix_ecom_backend.Events.ecomV1OrderPrice; }; type ecomV1OrderTotals = { /** * Total calculated discount value. */ discount?: string; /** * Total calculated gift card value. */ giftCard?: string; /** * Total number of line items. */ quantity?: number; /** * Total refund. */ refund?: string; /** * Total shipping price, before tax. */ shipping?: string; /** * Subtotal of all the line items, before tax. */ subtotal?: string; /** * Total tax. */ tax?: string; /** * Total price charged. */ total?: string; /** * Total items weight. */ weight?: string; }; type ecomV1OrderTrackingLinkAdded = {}; type ecomV1OrderTrackingNumberAdded = {}; type ecomV1OrderTrackingNumberEdited = {}; type ecomV1OrderTransactionsActivity = { /** * Activity item author */ author?: string; /** * Comment added to activity item */ message?: string; /** * Activity item timestamp */ timestamp?: Date; /** * Activity item type */ type?: string; }; type ecomV1OrderTransactionsAddInvoiceToOrderRequest = { /** * Invoice info. */ invoiceInfo: wix_ecom_backend.Events.ecomV1OrderTransactionsInvoiceInfo; /** * Order ID. */ orderId: string; }; type ecomV1OrderTransactionsAddInvoiceToOrderResponse = { /** * List of order invoices. */ orderInvoices?: Array; }; type ecomV1OrderTransactionsAddPaymentsRequest = { /** * Order ID. */ orderId: string; /** * Payments to be added to order. */ payments: Array; }; type ecomV1OrderTransactionsAddPaymentsResponse = { /** * Order ID and its associated transactions. */ orderTransactions?: wix_ecom_backend.Events.ecomV1OrderTransactionsOrderTransactions; /** * IDs of added order payments. */ paymentsIds?: Array; }; type ecomV1OrderTransactionsAddress = { /** * Address line 1 (free text) */ addressLine1?: string; /** * address line */ addressLine2?: string; /** * City name */ city?: string; /** * Company name */ company?: string; /** * Country code (2 letters) */ country?: string; /** * Email address */ email?: string; /** * Addressee name */ fullName?: wix_ecom_backend.Events.ecomV1OrderTransactionsFullName; /** * Phone number */ phone?: string; /** * Address line 1 (street) */ street?: wix_ecom_backend.Events.ecomV1OrderTransactionsStreet; /** * State or district */ subdivision?: string; /** * Tax information (for Brazil only) */ vatId?: wix_ecom_backend.Events.ecomV1OrderTransactionsVatId; /** * ZIP/postal code */ zipCode?: string; }; type ecomV1OrderTransactionsAddressAddressLine1OptionsOneOf = { /** * Address line 1 (free text) */ addressLine1?: string; /** * Address line 1 (street) */ street?: wix_ecom_backend.Events.ecomV1OrderTransactionsStreet; }; type ecomV1OrderTransactionsApplicationError = { code?: string; data?: Object; description?: string; }; type ecomV1OrderTransactionsAppliedCoupon = { /** * Coupon code */ code?: string; /** * Coupon ID */ couponId?: string; /** * Coupon name */ name?: string; }; type ecomV1OrderTransactionsBackendEventMetadata = { entityId: string; eventTime: string; id: string; triggeredByAnonymizeRequest: boolean; }; type ecomV1OrderTransactionsBillingInfo = { /** * Full billing address */ address?: wix_ecom_backend.Events.ecomV1OrderTransactionsAddress; /** * Deprecated (use paymentProviderTransactionId instead) */ externalTransactionId?: string; /** * Payment date */ paidDate?: Date; /** * Transaction ID from payment gateway (e.g., Wix Payments) */ paymentGatewayTransactionId?: string; /** * Payment method used for this order */ paymentMethod?: string; /** * Transaction ID from payment provider (e.g., PayPal, Square, Stripe) transaction ID */ paymentProviderTransactionId?: string; /** * Whether order can be refunded by payment provider (manually or automatic) */ refundableByPaymentProvider?: boolean; }; type ecomV1OrderTransactionsBulkActionMetadata = { /** * Number of items that couldn't be processed. */ totalFailures?: number; /** * Number of items that were successfully processed. */ totalSuccesses?: number; /** * Number of failures without details because detailed failure threshold was exceeded. */ undetailedFailures?: number; }; type ecomV1OrderTransactionsBulkGenerateInvoicesRequest = { /** * Order IDs. */ orderIds: Array; }; type ecomV1OrderTransactionsBulkGenerateInvoicesResponse = { bulkActionMetadata?: wix_ecom_backend.Events.ecomV1OrderTransactionsBulkActionMetadata; results?: Array; }; type ecomV1OrderTransactionsBulkInvoiceResult = { item?: wix_ecom_backend.Events.ecomV1OrderTransactionsInvoiceForOrder; itemMetadata?: wix_ecom_backend.Events.ecomV1OrderTransactionsItemMetadata; }; type ecomV1OrderTransactionsBulkPaymentResult = { /** * Updated payment. Returned if `return_full_entity` set to `true`. */ item?: wix_ecom_backend.Events.ecomV1OrderTransactionsPayment; /** * Item metadata. */ itemMetadata?: wix_ecom_backend.Events.ecomV1OrderTransactionsItemMetadata; }; type ecomV1OrderTransactionsBulkUpdatePaymentStatusesRequest = { /** * Order and payment IDs for which to update payment status. */ paymentAndOrderIds: Array; /** * Whether to return the full payment entity (`results.item`) in the response. */ returnFullEntity?: boolean; /** * Payment status. */ status?: string; }; type ecomV1OrderTransactionsBulkUpdatePaymentStatusesResponse = { /** * Bulk operation metadata. */ bulkActionMetadata?: wix_ecom_backend.Events.ecomV1OrderTransactionsBulkActionMetadata; /** * Bulk operation results. */ results?: Array; }; type ecomV1OrderTransactionsBuyerDetails = { /** * Email address */ email?: string; /** * Addressee name */ fullName?: wix_ecom_backend.Events.ecomV1OrderTransactionsFullName; /** * Phone number */ phone?: string; }; type ecomV1OrderTransactionsBuyerInfo = { /** * Wix customer ID */ _id?: string; /** * Customer's email address */ email?: string; /** * Customer's first name */ firstName?: string; /** * Customer type */ identityType?: string; /** * Customer's last name */ lastName?: string; /** * Customer's phone number */ phone?: string; /** * Deprecated (use identityType instead) */ type?: string; }; type ecomV1OrderTransactionsCalculateRefundItemRequest = { /** * ID of the line item being refunded */ lineItemId?: string; /** * How much of that line item is being refunded */ quantity?: number; /** * Should this item be restocked (used for validation purposes) */ restock?: boolean; }; type ecomV1OrderTransactionsCalculateRefundItemResponse = { /** * Line item ID */ lineItemId?: string; /** * The line item's price */ lineItemPrice?: number; }; type ecomV1OrderTransactionsCalculateRefundRequest = { /** * Order ID */ orderId: string; /** * Refunded line items and quantity */ refundItems?: Array; /** * Should include shipping in refund calculation */ refundShipping?: boolean; }; type ecomV1OrderTransactionsCalculateRefundResponse = { /** * Discount given for this order */ discount?: string; /** * The refundable items of that order */ items?: Array; /** * Previous refund given on that order */ previouslyRefundedAmount?: string; /** * Total cost of the order (without tax) */ subtotal?: string; /** * Tax cost of the order */ tax?: string; /** * Total refundable amount */ total?: string; }; type ecomV1OrderTransactionsChannelInfo = { /** * Reference to an order ID from an external system, as defined in channelInfo (e.g., eBay or Amazon) */ externalOrderId?: string; /** * URL to the order in the external system, as defined in channelInfo (e.g., eBay or Amazon) */ externalOrderUrl?: string; /** * Sales channel that submitted the order */ type?: string; }; type ecomV1OrderTransactionsCustomField = { /** * Title for the custom field */ title?: string; /** * The title translated according to the buyer language */ translatedTitle?: string; /** * Free text that the customer entered in the custom field during the checkout process */ value?: string; }; type ecomV1OrderTransactionsCustomTextFieldSelection = { /** * Custom text field name */ title?: string; /** * Custom text field value */ value?: string; }; type ecomV1OrderTransactionsDiffmatokyPayload = { compareChannel?: string; entityId?: string; errorInformation?: wix_ecom_backend.Events.ecomV1OrderTransactionsErrorInformation; left?: string; right?: string; tags?: Array; }; type ecomV1OrderTransactionsDigitalFile = { /** * id of the secure file in media */ fileId?: string; }; type ecomV1OrderTransactionsDiscount = { /** * Applied coupon */ appliedCoupon?: wix_ecom_backend.Events.ecomV1OrderTransactionsAppliedCoupon; /** * Deprecated (use Totals.discount instead) */ value?: string; }; type ecomV1OrderTransactionsEnteredBy = { _id?: string; /** * Suppoerted values: * - `'APP'` * - `'CONTACT'` * - `'MEMBER'` * - `'USER'` */ identityType?: string; }; type ecomV1OrderTransactionsErrorInformation = { stackTrace?: string; }; type ecomV1OrderTransactionsFulfillment = { /** * Fulfillment ID (auto generated upon fulfillment creation). */ _id?: string; /** * Fulfillment creation date and time. */ dateCreated?: Date; /** * Information about the line items in the fulfilled order. */ lineItems?: Array; /** * Tracking information. */ trackingInfo?: wix_ecom_backend.Events.ecomV1OrderTransactionsFulfillmentTrackingInfo; }; type ecomV1OrderTransactionsFulfillmentLineItem = { /** * Line item ID (mirrors the line item index of the order). */ index?: number; /** * Line item quantity. * On creation, if this parameter isn't passed, the new fulfillment will automatically include all items of this line item that have not already been linked to a fulfillment. * If the order does not have the requested quantity of line items available to add to this fulfillment, the fulfillment will not be created and an error will be returned. * This property will always have a value when returned. */ quantity?: number; }; type ecomV1OrderTransactionsFulfillmentTrackingInfo = { /** * Shipping provider. Using the following shipping providers will allow for autofilling the tracking link: * * `fedex` * * `ups` * * `usps` * * `dhl` * * `canadaPost` */ shippingProvider?: string; /** * Tracking link - autofilled if using a predefined shipping provider, otherwise provided on creation. */ trackingLink?: string; /** * Tracking number. */ trackingNumber?: string; }; type ecomV1OrderTransactionsFullName = { /** * Customer's first name */ firstName?: string; /** * Customer's last name */ lastName?: string; }; type ecomV1OrderTransactionsGenerateInvoiceRequest = { /** * Order ID. */ orderId: string; }; type ecomV1OrderTransactionsGenerateInvoiceResponse = { /** * Invoice ID. */ invoiceId?: string; }; type ecomV1OrderTransactionsGetRefundabilityStatusRequest = { /** * Order ID. */ orderId: string; }; type ecomV1OrderTransactionsGetRefundabilityStatusResponse = { /** * Refundability details. */ refundabilities?: Array; /** * Whether the order supports refunding per item. */ refundablePerItem?: boolean; }; type ecomV1OrderTransactionsGiftCard = { /** * giftcard internal ID */ _id?: string; /** * giftcard amount */ amount?: string; /** * giftcard provider appid */ providerId?: string; transactionId?: string; }; type ecomV1OrderTransactionsGiftCardPaymentDetails = { /** * ID of the app that created the gift card. */ appId?: string; /** * Gift card ID. */ giftCardId?: string; /** * Gift card payment ID. */ giftCardPaymentId?: string; /** * Whether the gift card is voided. */ voided?: boolean; }; type ecomV1OrderTransactionsIndexingMessage = { _id?: string; opType?: number; requiredVersions?: Array; }; type ecomV1OrderTransactionsInvoiceForOrder = { /** * Invoice ID. */ invoiceId?: string; /** * Order ID. */ orderId?: string; }; type ecomV1OrderTransactionsInvoiceInfo = { /** * Invoice creation date and time. */ _createdDate?: Date; /** * Invoice ID. */ _id?: string; /** * ID of the app that set the invoice. */ appId?: string; /** * Invoice URL. */ url?: string; }; type ecomV1OrderTransactionsInvoicesForOrder = { /** * Invoices info. */ invoicesInfo?: Array; /** * Order ID. */ orderId?: string; }; type ecomV1OrderTransactionsItemMetadata = { /** * Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */ _id?: string; /** * Details about the error in case of failure. */ error?: wix_ecom_backend.Events.ecomV1OrderTransactionsApplicationError; /** * Index of the item within the request array. Allows for correlation between request and response items. */ originalIndex?: number; /** * Whether the requested action was successful for this item. When `false`, the `error` field is populated. */ success?: boolean; }; type ecomV1OrderTransactionsLineItem = { /** * Line item custom text field entry */ customTextFields?: Array; /** * Discount applied for this line item */ discount?: string; /** * Line item fulfillerId from stores fulfillers. No value equals self fulfilled */ fulfillerId?: string; /** * Line item ID (auto-generated, stable within this order only) */ index?: number; /** * Line item type (may be extended) */ lineItemType?: string; /** * Primary media for preview of the line item */ mediaItem?: wix_ecom_backend.Events.ecomV1OrderTransactionsMediaItem; /** * Line item name */ name?: string; /** * Line item notes */ notes?: string; /** * Line item options ordered */ options?: Array; /** * Deprecated (use priceData instead) */ price?: string; /** * Price data */ priceData?: wix_ecom_backend.Events.ecomV1OrderTransactionsLineItemPriceData; /** * Line item product ID (optional for POS orders) */ productId?: string; /** * Line item quantity */ quantity?: number; /** * Line item SKU */ sku?: string; /** * Tax applied for this line item */ tax?: string; /** * Tax group ID */ taxGroupId?: string; /** * Deprecated (use priceData instead) */ taxIncludedInPrice?: boolean; /** * Deprecated (use priceData instead) */ totalPrice?: string; /** * Product name, translated into the customer's language */ translatedName?: string; /** * Line item variantId (from Stores Catalog) */ variantId?: string; /** * Line item weight */ weight?: string; }; type ecomV1OrderTransactionsLineItemPriceData = { /** * Line item price */ price?: string; /** * Whether tax is included in the price set for this line item */ taxIncludedInPrice?: boolean; /** * Total price charged to the customer (per line item) after computation of quantity and discount */ totalPrice?: string; }; type ecomV1OrderTransactionsListInvoicesForMultipleOrdersRequest = { /** * Order IDs for which to retrieve invoices. */ orderIds: Array; }; type ecomV1OrderTransactionsListInvoicesForMultipleOrdersResponse = { /** * List of order IDs and their associated invoices. */ invoicesForOrder?: Array; }; type ecomV1OrderTransactionsListInvoicesForSingleOrderRequest = { /** * Order ID. */ orderId: string; }; type ecomV1OrderTransactionsListInvoicesForSingleOrderResponse = { /** * List of invoices. */ invoices?: Array; }; type ecomV1OrderTransactionsListTransactionsForMultipleOrdersRequest = { /** * Order IDs for which to retrieve transactions. */ orderIds: Array; }; type ecomV1OrderTransactionsListTransactionsForMultipleOrdersResponse = { /** * List of order IDs and their associated transactions. */ orderTransactions?: Array; }; type ecomV1OrderTransactionsListTransactionsForSingleOrderRequest = { /** * Order ID. */ orderId: string; }; type ecomV1OrderTransactionsListTransactionsForSingleOrderResponse = { /** * Order ID and its associated transactions. */ orderTransactions?: wix_ecom_backend.Events.ecomV1OrderTransactionsOrderTransactions; }; type ecomV1OrderTransactionsMediaItem = { /** * Media ID (for media items previously saved in Wix Media) */ _id?: string; /** * Alternative text for presentation when media cannot be displayed */ altText?: string; /** * Media external URL */ externalImageUrl?: string; /** * Media item height */ height?: number; /** * Deprecated */ mediaId?: string; /** * Media type */ mediaType?: string; /** * Media URL */ url?: string; /** * Media item width */ width?: number; }; type ecomV1OrderTransactionsMembershipName = { /** * The name of this membership */ original?: string; /** * Optional - Translated name of this membership. Defaults to `original` when not provided. */ translated?: string; }; type ecomV1OrderTransactionsMembershipPaymentDetails = { /** * The transaction id under the membership system. Can be used to void it */ externalTransactionId?: string; /** * ID of the line item this membership applies to. */ lineItemId?: string; /** * The membership id */ membershipId?: string; /** * Membership name */ name?: wix_ecom_backend.Events.ecomV1OrderTransactionsMembershipName; /** * ID of the application providing this payment option */ providerAppId?: string; /** * Payment status */ status?: string; /** * Whether the membership is voided. */ voided?: boolean; }; type ecomV1OrderTransactionsOptionSelection = { /** * Option name */ option?: string; /** * Selected choice for this option */ selection?: string; }; type ecomV1OrderTransactionsOrder = { /** * Order ID (auto-generated upon order creation). */ _id?: string; /** * Log of updates related to the order. */ activities?: Array; /** * Whether or not the order was archived. */ archived?: boolean; /** * Billing information. */ billingInfo?: wix_ecom_backend.Events.ecomV1OrderTransactionsBillingInfo; /** * Buyer information. */ buyerInfo?: wix_ecom_backend.Events.ecomV1OrderTransactionsBuyerInfo; /** * Language for communication with the buyer. Defaults to the site language. * For a site that supports multiple languages, this is the language the buyer selected. */ buyerLanguage?: string; /** * A note added by the buyer. */ buyerNote?: string; /** * Shopping cart ID. */ cartId?: string; /** * Information about the sales channel that submitted this order. */ channelInfo?: wix_ecom_backend.Events.ecomV1OrderTransactionsChannelInfo; /** * Currency used for pricing in this store. */ currency?: string; /** * Custom field information. */ customField?: wix_ecom_backend.Events.ecomV1OrderTransactionsCustomField; /** * Order creation date and time. */ dateCreated?: Date; /** * Discount information. */ discount?: wix_ecom_backend.Events.ecomV1OrderTransactionsDiscount; /** * Identity of the order's initiator. */ enteredBy?: wix_ecom_backend.Events.ecomV1OrderTransactionsEnteredBy; /** * Order's current fulfillment status (whether the order received a tracking number or was delivered/picked up). */ fulfillmentStatus?: string; /** * Order fulfillment information. */ fulfillments?: Array; /** * Invoice information. */ invoiceInfo?: wix_ecom_backend.Events.ecomV1OrderTransactionsV2InvoiceInfo; /** * Date and time of latest update. */ lastUpdated?: Date; /** * Line items ordered. */ lineItems?: Array; /** * Order number displayed in the owner's store (auto-generated). */ number?: number; /** * Order’s unique numeric ID. * Primarily used for sorting and filtering when crawling all orders. */ numericId?: string; /** * Current status of the payment. */ paymentStatus?: string; /** * Deprecated. */ read?: boolean; /** * Refund information. */ refunds?: Array; /** * Shipping information. */ shippingInfo?: wix_ecom_backend.Events.ecomV1OrderTransactionsShippingInfo; /** * Subscription information. */ subscriptionInfo?: wix_ecom_backend.Events.ecomV1OrderTransactionsSubscriptionInfo; /** * Totals for order's line items. */ totals?: wix_ecom_backend.Events.ecomV1OrderTransactionsTotals; /** * Weight unit used in this store. */ weightUnit?: string; }; type ecomV1OrderTransactionsOrderRefunded = { /** * Refunded order data. */ order?: wix_ecom_backend.Events.ecomV1OrderTransactionsOrder; /** * Refund ID. */ refundId?: string; }; type ecomV1OrderTransactionsOrderTransactions = { /** * Order ID. */ orderId?: string; /** * Payments to the merchant. */ payments?: Array; /** * Refunds to the buyer. */ refunds?: Array; }; type ecomV1OrderTransactionsOrderTransactionsPayments = { data: wix_ecom_backend.Events.ecomV1OrderTransactionsPaymentsUpdated; metadata: wix_ecom_backend.Events.ecomV1OrderTransactionsBackendEventMetadata; }; type ecomV1OrderTransactionsOrderTransactionsRefunded = { data: wix_ecom_backend.Events.ecomV1OrderTransactionsRefundCreated; metadata: wix_ecom_backend.Events.ecomV1OrderTransactionsBackendEventMetadata; }; type ecomV1OrderTransactionsPayment = { /** * Payment creation date and time. Defaults to current time when not provided. */ _createdDate?: Date; /** * Payment ID (auto-generated upon payment creation). */ _id?: string; /** * Payment modification date and time. */ _updatedDate?: Date; /** * Payment amount. */ amount?: wix_ecom_backend.Events.ecomV1OrderTransactionsPrice; /** * Gift card payment details. */ giftcardPaymentDetails?: wix_ecom_backend.Events.ecomV1OrderTransactionsGiftCardPaymentDetails; /** * Whether refunds are explicitly disabled. * True means this payment is not refundable. * False means this payment might be refunded (depending on the payment provider). */ refundDisabled?: boolean; /** * Regular payment details. */ regularPaymentDetails?: wix_ecom_backend.Events.ecomV1OrderTransactionsRegularPaymentDetails; }; type ecomV1OrderTransactionsPaymentAndOrderId = { /** * Order ID. */ orderId?: string; /** * Payment ID. */ paymentId?: string; }; type ecomV1OrderTransactionsPaymentPaymentDetailsOneOf = { /** * Gift card payment details. */ giftcardPaymentDetails?: wix_ecom_backend.Events.ecomV1OrderTransactionsGiftCardPaymentDetails; /** * Regular payment details. */ regularPaymentDetails?: wix_ecom_backend.Events.ecomV1OrderTransactionsRegularPaymentDetails; }; type ecomV1OrderTransactionsPaymentRefund = { /** * Refund amount. Not relevant for membership refunds. */ amount?: wix_ecom_backend.Events.ecomV1OrderTransactionsPrice; /** * Whether refund is made externally and manually (on the payment provider's side) * When false (default), the payment gateway will be called in order to make an actual refund, and then the payment will be marked as refunded. * When true, the payment will only be *marked* as refunded, and no actual refund will be performed. */ externalRefund?: boolean; /** * Specific payment within the order to refund */ paymentId?: string; }; type ecomV1OrderTransactionsPaymentsUpdated = { /** * Updated order transactions. */ orderTransactions?: wix_ecom_backend.Events.ecomV1OrderTransactionsOrderTransactions; /** * IDs of the updated payments. */ paymentIds?: Array; }; type ecomV1OrderTransactionsPickupAddress = { /** * Address */ addressLine1?: string; /** * City */ city?: string; /** * Country code (3 letters) */ country?: string; /** * State/District */ subdivision?: string; /** * ZIP/postal code */ zipCode?: string; }; type ecomV1OrderTransactionsPickupDetails = { /** * Deprecated (use billingInfo instead). */ buyerDetails?: wix_ecom_backend.Events.ecomV1OrderTransactionsBuyerDetails; /** * Pickup address. */ pickupAddress?: wix_ecom_backend.Events.ecomV1OrderTransactionsPickupAddress; /** * Store owner's pickup instructions. */ pickupInstructions?: string; }; type ecomV1OrderTransactionsPrice = { /** * Amount. */ amount?: string; /** * Amount formatted with currency symbol. */ formattedAmount?: string; }; type ecomV1OrderTransactionsRefund = { /** * Refund creation date and time. Defaults to current time when not provided. */ _createdDate?: Date; /** * Refund ID (auto-generated upon refund creation). */ _id?: string; /** * Business details. */ details?: wix_ecom_backend.Events.ecomV1OrderTransactionsRefundDetails; /** * Transaction refund details. */ transactions?: Array; }; type ecomV1OrderTransactionsRefundCreated = { /** * Personal note added to the email */ customMessage?: string; /** * Updated order transactions. */ orderTransactions?: wix_ecom_backend.Events.ecomV1OrderTransactionsOrderTransactions; /** * ID of the created refund. */ refundId?: string; /** * Refunded line items and quantities that are part of the created refund. */ refundItems?: Array; /** * How to restock items as part of this refund. */ restockInfo?: wix_ecom_backend.Events.ecomV1OrderTransactionsRestockInfo; /** * Should send a confirmation mail to the customer */ sendOrderRefundedEmail?: boolean; }; type ecomV1OrderTransactionsRefundDetails = { /** * Refunded line items and quantities. */ items?: Array; /** * Reason for refund, given by user (optional). */ reason?: string; /** * Whether shipping rate is also refunded. */ shippingIncluded?: boolean; }; type ecomV1OrderTransactionsRefundItem = { /** * ID of the line item being refunded. */ lineItemId?: string; /** * Line item quantity being refunded. */ quantity?: number; }; type ecomV1OrderTransactionsRefundTransaction = { /** * Refund amount. */ amount?: wix_ecom_backend.Events.ecomV1OrderTransactionsPrice; /** * Whether refund was made externally and manually (on the payment provider's side). */ externalRefund?: boolean; /** * ID of the payment gateway refund. */ gatewayRefundId?: string; /** * ID of the payment associated with this refund. */ paymentId?: string; /** * ID of the refund in the payment provider's system. */ providerRefundId?: string; /** * Refund status. */ refundStatus?: string; }; type ecomV1OrderTransactionsRefundability = { /** * Reason why payment is only refundable manually. */ manuallyRefundableReason?: string; /** * Reason why payment is not refundable. */ nonRefundableReason?: string; /** * Payment ID. */ paymentId?: string; /** * Link to payment provider dashboard. */ providerLink?: string; /** * Payment refundability status. */ refundabilityStatus?: string; }; type ecomV1OrderTransactionsRefundabilityAdditionalRefundabilityInfoOneOf = { /** * Reason why payment is only refundable manually. */ manuallyRefundableReason?: string; /** * Reason why payment is not refundable. */ nonRefundableReason?: string; }; type ecomV1OrderTransactionsRegularPaymentDetails = { /** * Transaction ID from payment gateway (e.g., Wix Payments, chargeId), what we used to call payment_gateway_transaction_id */ gatewayTransactionId?: string; /** * Whether the payment is/was made offline. For example, when using cash or when marked as paid in the Business Manager. */ offlinePayment?: boolean; /** * Payment method. Non-exhaustive list of supported values: * CreditCard, Alipay, AstropayCash, AstropayDBT, AstropayMBT, Bitcoin, BitPay, Cash, ConvenienceStore, EPay, Fake, Giropay, IDeal, InPerson, * Klarna, MercadoPago, Netpay, NordeaSolo, Offline, PagSeguro, PayEasy, PayPal, Paysafecard, Paysafecash, PointOfSale, Poli, * Privat24, Przelewy24, RapidTransfer, Sepa, Skrill, Sofort, Trustly,Neteller, Unionpay, UniPay, Yandex. */ paymentMethod?: string; /** * Wix Payment's order id */ paymentOrderId?: string; /** * Transaction ID in the payment provider's system (for example, PayPal, Square, Stripe). Does not exist for offline payments. */ providerTransactionId?: string; /** * Payment status. */ status?: string; }; type ecomV1OrderTransactionsRestockInfo = { /** * Restocked line items and quantities, only relevant for `SOME_ITEMS` type. */ items?: Array; /** * Restock policy type. */ type?: string; }; type ecomV1OrderTransactionsRestockItem = { /** * ID of the line item being restocked. */ lineItemId?: string; /** * Line item quantity being restocked. */ quantity?: number; }; type ecomV1OrderTransactionsShipmentDetails = { /** * Shipping destination address. */ address?: wix_ecom_backend.Events.ecomV1OrderTransactionsAddress; /** * Discount applied for shipping. */ discount?: string; /** * Price data. */ priceData?: wix_ecom_backend.Events.ecomV1OrderTransactionsShippingPriceData; /** * Tax applied for shipping. */ tax?: string; /** * Deprecated (use fulfillments instead). */ trackingInfo?: wix_ecom_backend.Events.ecomV1OrderTransactionsTrackingInfo; }; type ecomV1OrderTransactionsShippingInfo = { /** * Unique code of provided shipping option. For example, `"usps_std_overnight"`. */ code?: string; /** * Latest expected delivery date. */ deliverByDate?: Date; /** * Shipping option name. */ deliveryOption?: string; /** * Shipping option delivery time. */ estimatedDeliveryTime?: string; /** * Pickup details (when this object describes pickup). */ pickupDetails?: wix_ecom_backend.Events.ecomV1OrderTransactionsPickupDetails; /** * Shipment details (when this object describes shipment). */ shipmentDetails?: wix_ecom_backend.Events.ecomV1OrderTransactionsShipmentDetails; /** * Shipping region. */ shippingRegion?: string; }; type ecomV1OrderTransactionsShippingInfoDetailsOneOf = { /** * Pickup details (when this object describes pickup). */ pickupDetails?: wix_ecom_backend.Events.ecomV1OrderTransactionsPickupDetails; /** * Shipment details (when this object describes shipment). */ shipmentDetails?: wix_ecom_backend.Events.ecomV1OrderTransactionsShipmentDetails; }; type ecomV1OrderTransactionsShippingPriceData = { /** * Shipping price. */ price?: string; /** * Whether tax is included in the price. */ taxIncludedInPrice?: boolean; }; type ecomV1OrderTransactionsSnapshotMessage = { _id?: string; opType?: number; }; type ecomV1OrderTransactionsStreet = { /** * Street name */ name?: string; /** * Street number */ number?: string; }; type ecomV1OrderTransactionsSubscriptionInfo = { /** * Subscription ID. */ _id?: string; /** * Current cycle number. For example, if the subscription is in the 3rd month of a 4-month subscription, the value will be `3`. */ cycleNumber?: number; /** * Subscription options info. */ subscriptionOptionInfo?: wix_ecom_backend.Events.ecomV1OrderTransactionsSubscriptionOptionInfo; /** * Subscription settings. */ subscriptionSettings?: wix_ecom_backend.Events.ecomV1OrderTransactionsSubscriptionSettings; }; type ecomV1OrderTransactionsSubscriptionOptionInfo = { /** * Subscription option description. */ description?: string; /** * Subscription option title. */ title?: string; }; type ecomV1OrderTransactionsSubscriptionSettings = { /** * Whether subscription is renewed automatically at the end of each period. */ autoRenewal?: boolean; /** * Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`. */ billingCycles?: number; /** * Frequency of recurring payment. */ frequency?: string; }; type ecomV1OrderTransactionsTotals = { /** * Total calculated discount value. */ discount?: string; /** * Total calculated gift card value. */ giftCard?: string; /** * Total number of line items. */ quantity?: number; /** * Total refund. */ refund?: string; /** * Total shipping price, before tax. */ shipping?: string; /** * Subtotal of all the line items, before tax. */ subtotal?: string; /** * Total tax. */ tax?: string; /** * Total price charged. */ total?: string; /** * Total items weight. */ weight?: string; }; type ecomV1OrderTransactionsTrackingInfo = { /** * Shipping provider */ shippingProvider?: string; /** * Tracking link */ trackingLink?: string; /** * Tracking number */ trackingNumber?: string; }; type ecomV1OrderTransactionsTriggerRefundRequest = { /** * Personal note added to the email */ customMessage?: string; /** * Business model of a refund */ details?: wix_ecom_backend.Events.ecomV1OrderTransactionsRefundDetails; /** * The order this refund related to */ orderId: string; /** * Refund operations information * Currently, only *one* payment refund is supported per request */ payments: Array; /** * How to restock items as part of this refund */ restockInfo?: wix_ecom_backend.Events.ecomV1OrderTransactionsRestockInfo; /** * Should send a confirmation mail to the customer */ sendOrderRefundedEmail?: boolean; }; type ecomV1OrderTransactionsTriggerRefundResponse = { /** * All order's transactions after the refunds were added */ orderTransactions?: wix_ecom_backend.Events.ecomV1OrderTransactionsOrderTransactions; /** * Created refund ID */ refundId?: string; }; type ecomV1OrderTransactionsUpdatePaymentStatusRequest = { /** * Order ID. */ orderId: string; /** * Payment ID. */ paymentId: string; /** * Payment status. */ status?: string; }; type ecomV1OrderTransactionsUpdatePaymentStatusResponse = { /** * Order ID and its associated transactions after update. */ orderTransactions?: wix_ecom_backend.Events.ecomV1OrderTransactionsOrderTransactions; }; type ecomV1OrderTransactionsV2InvoiceInfo = { /** * Invoice ID */ _id?: string; /** * Invoice source */ source?: string; }; type ecomV1OrderTransactionsV2Refund = { /** * Refund ID. */ _id?: string; /** * Refund amount. */ amount?: string; /** * Refund created timestamp. */ dateCreated?: Date; /** * Whether refund was made externally (on the payment provider's side). */ externalRefund?: boolean; /** * Payment provider transaction ID. Used to find refund transaction info on the payment provider's side. */ paymentProviderTransactionId?: string; /** * Reason for refund, given by user (optional). */ reason?: string; }; type ecomV1OrderTransactionsVatId = { /** * Customer's tax ID */ number?: string; /** * tax type */ type?: string; }; type ecomV1OrderTriggerSideEffectsFromLegacyData = { orderId?: string; ordersExperiments?: wix_ecom_backend.Events.ecomV1OrderOrdersExperiments; storeId?: string; }; type ecomV1OrderUnArchiveOrderRequest = { /** * Order ID. */ _id: string; }; type ecomV1OrderUnArchiveOrderResponse = { /** * Unarchived order. */ order?: wix_ecom_backend.Events.ecomV1OrderOrder; }; type ecomV1OrderUpdateActivityRequest = { /** * Order ID. */ _id: string; /** * Activity info. */ activity: wix_ecom_backend.Events.ecomV1OrderPublicActivity; /** * ID of the activity to update. */ activityId: string; }; type ecomV1OrderUpdateActivityResponse = { /** * Updated order. */ order?: wix_ecom_backend.Events.ecomV1OrderOrder; }; type ecomV1OrderUpdateBillingContactDetailsRequest = { /** * Order ID. */ _id: string; /** * Contact details. */ addressContactDetails?: wix_ecom_backend.Events.ecomV1OrderFullAddressContactDetails; }; type ecomV1OrderUpdateBillingContactDetailsResponse = { /** * Updated order. */ order?: wix_ecom_backend.Events.ecomV1OrderOrder; }; type ecomV1OrderUpdateBuyerInfoRequest = { /** * Order ID. */ _id: string; /** * Buyer info. */ buyerInfo?: wix_ecom_backend.Events.ecomV1OrderBuyerInfoUpdate; }; type ecomV1OrderUpdateBuyerInfoResponse = { /** * Updated order. */ order?: wix_ecom_backend.Events.ecomV1OrderOrder; }; type ecomV1OrderUpdateLineItemsDescriptionLinesRequest = { /** * Order ID. */ _id: string; /** * Line items. */ lineItems: Array; }; type ecomV1OrderUpdateLineItemsDescriptionLinesResponse = { /** * Updated order. */ order?: wix_ecom_backend.Events.ecomV1OrderOrder; }; type ecomV1OrderUpdateOrderShippingAddressRequest = { /** * Order ID. */ _id: string; /** * Shipping address and contact details to be updated. */ shippingAddress: wix_ecom_backend.Events.ecomV1OrderAddressWithContact; }; type ecomV1OrderUpdateOrderShippingAddressResponse = { /** * Updated order. */ order?: wix_ecom_backend.Events.ecomV1OrderOrder; }; type ecomV1OrderV1SubscriptionSettings = { /** * Whether subscription is renewed automatically at the end of each period. */ autoRenewal?: boolean; /** * Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`. */ billingCycles?: number; /** * Frequency of recurring payment. */ frequency?: string; }; type ecomV1OrderV2BuyerInfo = { /** * Wix customer ID */ _id?: string; /** * Customer's email address */ email?: string; /** * Customer's first name */ firstName?: string; /** * Customer type */ identityType?: string; /** * Customer's last name */ lastName?: string; /** * Customer's phone number */ phone?: string; /** * Deprecated (use identityType instead) */ type?: string; }; type ecomV1OrderV2SubscriptionInfo = { /** * Subscription ID. */ _id?: string; /** * Current cycle number. For example, if the subscription is in the 3rd month of a 4-month subscription, the value will be `3`. */ cycleNumber?: number; /** * Subscription options info. */ subscriptionOptionInfo?: wix_ecom_backend.Events.ecomV1OrderSubscriptionOptionInfo; /** * Subscription settings. */ subscriptionSettings?: wix_ecom_backend.Events.ecomV1OrderV1SubscriptionSettings; }; type ecomV1OrderVatId = { /** * Customer's tax ID */ _id?: string; /** * tax type */ type?: string; }; } /** * [Read more](https://www.wix.com/corvid/reference/wix-ecom-backend.Orders.html#) */ interface Orders { /** * Retrieves an order. * [Read more](https://www.wix.com/corvid/reference/wix-ecom-backend.Orders.html#getOrder) */ getOrder(_id: string): Promise; } namespace Orders { type ActionEvent = { bodyAsJson?: string; }; type Activity = { /** * Activity creation date and time. */ _createdDate?: Date; /** * Activity ID. */ _id?: string; /** * Activity author's email. */ authorEmail?: string; /** * Custom activity details (optional). `activity.type` must be `CUSTOM_ACTIVITY`. */ customActivity?: wix_ecom_backend.Orders.CustomActivity; /** * Merchant comment details (optional). `activity.type` must be `MERCHANT_COMMENT`. */ merchantComment?: wix_ecom_backend.Orders.MerchantComment; /** * Additional info about order refunded activity (optional). `activity.type` must be `ORDER_REFUNDED`. */ orderRefunded?: wix_ecom_backend.Orders.OrderRefunded; /** * Activity type. */ type?: string; }; type ActivityContentOneOf = { /** * Custom activity details (optional). `activity.type` must be `CUSTOM_ACTIVITY`. */ customActivity?: wix_ecom_backend.Orders.CustomActivity; /** * Merchant comment details (optional). `activity.type` must be `MERCHANT_COMMENT`. */ merchantComment?: wix_ecom_backend.Orders.MerchantComment; /** * Additional info about order refunded activity (optional). `activity.type` must be `ORDER_REFUNDED`. */ orderRefunded?: wix_ecom_backend.Orders.OrderRefunded; }; type AddActivityRequest = { /** * Order ID. */ _id: string; /** * Activity info. */ activity: wix_ecom_backend.Orders.PublicActivity; }; type AddActivityResponse = { /** * ID of the added activity. * Use this ID to either [update](https://bo.wix.com/wix-docs/rest/ecommerce/orders/update-activity) or [delete](https://bo.wix.com/wix-docs/rest/ecommerce/orders/delete-activity) the activity. */ activityId?: string; /** * Updated order. */ order?: wix_ecom_backend.Orders.Order; }; type AddInternalActivityRequest = { /** * Order ID. */ _id: string; /** * Activity info. */ activity: wix_ecom_backend.Orders.InternalActivity; }; type AddInternalActivityResponse = { /** * ID of the added internal activity. * Use this ID to either [update](https://bo.wix.com/wix-docs/rest/ecommerce/orders/update-activity) or [delete](https://bo.wix.com/wix-docs/rest/ecommerce/orders/delete-activity) the activity. */ activityId?: string; /** * Updated order. */ order?: wix_ecom_backend.Orders.Order; }; type AdditionalFee = { /** * Additional fee's unique code for future processing. */ code?: string; /** * Name of additional fee. */ name?: string; /** * Additional fee's price. */ price?: wix_ecom_backend.Orders.Price; /** * SPI implementer's `appId`. */ providerAppId?: string; /** * Tax details. */ taxDetails?: wix_ecom_backend.Orders.ItemTaxFullDetails; }; type Address = { /** * Main address line (usually street name and number). */ addressLine1?: string; /** * Free text providing more detailed address info. Usually contains apt, suite, floor. */ addressLine2?: string; /** * City name. */ city?: string; /** * Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format. */ country?: string; /** * Postal or zip code. */ postalCode?: string; /** * Street address object, with number, name, and apartment number in separate fields. */ streetAddress?: wix_ecom_backend.Orders.StreetAddress; /** * Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format. */ subdivision?: string; }; type AddressWithContact = { /** * Address. */ address?: wix_ecom_backend.Orders.Address; /** * Contact details. */ contactDetails?: wix_ecom_backend.Orders.FullAddressContactDetails; }; type AggregateOrdersOptions = { /** * This is an object defining aggregation itself */ aggregation: Object; /** * Filter applied to original data */ filter?: Object; }; type AggregateOrdersRequest = { /** * This is an object defining aggregation itself */ aggregation: Object; /** * Filter applied to original data */ filter?: Object; }; type AggregateOrdersResponse = { aggregates?: Object; }; type ApiAddress = { /** * Address line 1 (free text) */ addressLine1?: string; /** * address line */ addressLine2?: string; /** * City name */ city?: string; /** * Company name */ company?: string; /** * Country code (2 letters) */ country?: string; /** * Email address */ email?: string; /** * Addressee name */ fullName?: wix_ecom_backend.Orders.FullName; /** * Phone number */ phone?: string; /** * Address line 1 (street) */ street?: wix_ecom_backend.Orders.Street; /** * State or district */ subdivision?: string; /** * Tax information (for Brazil only) */ vatId?: wix_ecom_backend.Orders.ApiVatId; /** * ZIP/postal code */ zipCode?: string; }; type ApiAddressAddressLine1OptionsOneOf = { /** * Address line 1 (free text) */ addressLine1?: string; /** * Address line 1 (street) */ street?: wix_ecom_backend.Orders.Street; }; type ApiVatId = { /** * Customer's tax ID */ number?: string; /** * tax type */ type?: string; }; type ApplicationError = { code?: string; data?: Object; description?: string; }; type AppliedCoupon = { /** * Coupon code */ code?: string; /** * Coupon ID */ couponId?: string; /** * Coupon name */ name?: string; }; type AppliedDiscount = { /** * Applied coupon info. */ coupon?: wix_ecom_backend.Orders.Coupon; /** * Automatic Discount */ discountRule?: wix_ecom_backend.Orders.DiscountRule; /** * Discount type. * * `"GLOBAL"` - discount applies to entire order. * * `"SPECIFIC-ITEMS"` - discount applies to specific items. * * `"SHIPPING"` - discount applies to shipping. For example, free shipping. */ discountType?: string; /** * IDs of line items discount applies to. */ lineItemIds?: Array; /** * Merchant discount. */ merchantDiscount?: wix_ecom_backend.Orders.MerchantDiscount; }; type AppliedDiscountDiscountSourceOneOf = { /** * Applied coupon info. */ coupon?: wix_ecom_backend.Orders.Coupon; /** * Automatic Discount */ discountRule?: wix_ecom_backend.Orders.DiscountRule; /** * Merchant discount. */ merchantDiscount?: wix_ecom_backend.Orders.MerchantDiscount; }; type ArchiveOrderRequest = { /** * Order ID. */ _id: string; }; type ArchiveOrderResponse = { /** * Archived order. */ order?: wix_ecom_backend.Orders.Order; }; type Balance = { /** * Balance amount, can be negative. Negative value signifies amount to be refunded * and can happen due to possible overcharge or modified manual order. */ amount?: string; /** * Amount formatted with currency symbol. */ formattedAmount?: string; }; type BalanceSummary = { balance?: wix_ecom_backend.Orders.Balance; }; type BillingInfo = { /** * Full billing address */ address?: wix_ecom_backend.Orders.ApiAddress; /** * Deprecated (use paymentProviderTransactionId instead) */ externalTransactionId?: string; /** * Payment date */ paidDate?: Date; /** * Transaction ID from payment gateway (e.g., Wix Payments) */ paymentGatewayTransactionId?: string; /** * Payment method used for this order */ paymentMethod?: string; /** * Transaction ID from payment provider (e.g., PayPal, Square, Stripe) transaction ID */ paymentProviderTransactionId?: string; /** * Whether order can be refunded by payment provider (manually or automatic) */ refundableByPaymentProvider?: boolean; }; type BulkActionMetadata = { /** * Number of items that couldn't be processed. */ totalFailures?: number; /** * Number of items that were successfully processed. */ totalSuccesses?: number; /** * Number of failures without details because detailed failure threshold was exceeded. */ undetailedFailures?: number; }; type BulkArchiveOrdersByFilterRequest = { /** * Filter object. Learn more about supported filters [here](https://bo.wix.com/wix-docs/rest/ecommerce/orders/filter-and-sort). */ filter: Object; }; type BulkArchiveOrdersByFilterResponse = { /** * Bulk action metadata. */ bulkActionMetadata?: wix_ecom_backend.Orders.BulkActionMetadata; /** * Items updated by bulk action. */ results?: Array; }; type BulkArchiveOrdersOptions = { /** * Whether to return the full updated order entities in the response. */ returnFullEntity?: boolean; }; type BulkArchiveOrdersRequest = { /** * IDs of orders to archive. */ ids: Array; /** * Whether to return the full updated order entities in the response. */ returnFullEntity?: boolean; }; type BulkArchiveOrdersResponse = { /** * Bulk action metadata. */ bulkActionMetadata?: wix_ecom_backend.Orders.BulkActionMetadata; /** * Items updated by bulk action. */ results?: Array; }; type BulkMarkAsFulfilledByFilterRequest = { /** * Filter object. Learn more about supported filters [here](https://bo.wix.com/wix-docs/rest/ecommerce/orders/filter-and-sort). */ filter: Object; }; type BulkMarkAsFulfilledByFilterResponse = { /** * Bulk action metadata. */ bulkActionMetadata?: wix_ecom_backend.Orders.BulkActionMetadata; /** * Items updated by bulk action. */ results?: Array; }; type BulkMarkAsFulfilledOptions = { /** * Whether to return the full updated order entities in the response. */ returnFullEntity?: boolean; }; type BulkMarkAsFulfilledRequest = { /** * IDs of orders to be marked as fulfilled. */ ids: Array; /** * Whether to return the full updated order entities in the response. */ returnFullEntity?: boolean; }; type BulkMarkAsFulfilledResponse = { /** * Bulk action metadata. */ bulkActionMetadata?: wix_ecom_backend.Orders.BulkActionMetadata; /** * Items updated by bulk action. */ results?: Array; }; type BulkMarkAsUnfulfilledByFilterRequest = { /** * Filter object. Learn more about supported filters [here](https://bo.wix.com/wix-docs/rest/ecommerce/orders/filter-and-sort). */ filter: Object; }; type BulkMarkAsUnfulfilledByFilterResponse = { /** * Bulk action metadata. */ bulkActionMetadata?: wix_ecom_backend.Orders.BulkActionMetadata; /** * Items updated by bulk action. */ results?: Array; }; type BulkMarkAsUnfulfilledOptions = { /** * Whether to return the full updated order entities in the response. */ returnFullEntity?: boolean; }; type BulkMarkAsUnfulfilledRequest = { /** * IDs of orders to be marked as not fulfilled. */ ids: Array; /** * Whether to return the full updated order entities in the response. */ returnFullEntity?: boolean; }; type BulkMarkAsUnfulfilledResponse = { /** * Bulk action metadata. */ bulkActionMetadata?: wix_ecom_backend.Orders.BulkActionMetadata; /** * Items updated by bulk action. */ results?: Array; }; type BulkMarkOrdersAsPaidRequest = { /** * IDs of orders to mark as paid. */ ids: Array; }; type BulkMarkOrdersAsPaidResponse = { /** * Bulk action metadata. */ bulkActionMetadata?: wix_ecom_backend.Orders.BulkActionMetadata; /** * Items updated by the bulk action. * The Order entity within the results optimistically changes its payment status to paid, however this process is async. */ results?: Array; }; type BulkOrderResult = { /** * Updated item. Optional - returned only if requested with `return_full_entity` set to `true`. */ item?: wix_ecom_backend.Orders.Order; /** * Item metadata. */ itemMetadata?: wix_ecom_backend.Orders.ItemMetadata; }; type BulkUnArchiveOrdersByFilterRequest = { /** * Filter object. Learn more about supported filters [here](https://bo.wix.com/wix-docs/rest/ecommerce/orders/filter-and-sort). */ filter: Object; }; type BulkUnArchiveOrdersByFilterResponse = { /** * Bulk action metadata. */ bulkActionMetadata?: wix_ecom_backend.Orders.BulkActionMetadata; /** * Items updated by bulk action. */ results?: Array; }; type BulkUnArchiveOrdersOptions = { /** * Whether to return the full updated order entities in the response. */ returnFullEntity?: boolean; }; type BulkUnArchiveOrdersRequest = { /** * IDs or orders to unarchive. */ ids: Array; /** * Whether to return the full updated order entities in the response. */ returnFullEntity?: boolean; }; type BulkUnArchiveOrdersResponse = { /** * Bulk action metadata. */ bulkActionMetadata?: wix_ecom_backend.Orders.BulkActionMetadata; /** * Items updated by bulk action. */ results?: Array; }; type BuyerInfo = { /** * Contact ID. Auto-created if one does not yet exist. For more information, see [Contacts API](https://dev.wix.com/api/rest/contacts/contacts/introduction). */ contactId?: string; /** * Buyer email address. */ email?: string; /** * Member ID (if site visitor is a site member). */ memberId?: string; /** * Visitor ID (if site visitor is not a member). */ visitorId?: string; }; type BuyerInfoIdOneOf = { /** * Member ID (if site visitor is a site member). */ memberId?: string; /** * Visitor ID (if site visitor is not a member). */ visitorId?: string; }; type BuyerInfoUpdate = { /** * Contact ID. */ contactId?: string; /** * Email associated with the buyer. */ email?: string; }; type Cancel = {}; type CancelOrderOptions = { /** * Custom note to be added to the email (optional). */ customMessage?: string; /** * Whether to restock all items in the order. */ restockAllItems?: boolean; /** * Whether to send an order canceled email to the buyer. */ sendOrderCanceledEmail?: boolean; }; type CancelOrderRequest = { /** * Order ID. */ _id: string; /** * Custom note to be added to the email (optional). */ customMessage?: string; /** * Whether to restock all items in the order. */ restockAllItems?: boolean; /** * Whether to send an order canceled email to the buyer. */ sendOrderCanceledEmail?: boolean; }; type CancelOrderResponse = { /** * Canceled order. */ order?: wix_ecom_backend.Orders.Order; }; type CatalogReference = { /** * App ID of the catalog the item comes from. For example, the Wix Stores `appId` is `"1380b703-ce81-ff05-f115-39571d94dfcd"`. */ appId?: string; /** * ID of the item within its catalog. For example, `productId` for Wix Stores. */ catalogItemId?: string; /** * Additional info in key:value form. For example, for a product variant from Wix Stores Catalog, `options` field would hold something like one of the following: * + `{"Size": "M", "Color": "Red"}` * + `{"variantId": ""}`. */ options?: Object; }; type ChannelInfo = { /** * Reference to an order ID from an external system. */ externalOrderId?: string; /** * URL to the order in the external system. */ externalOrderUrl?: string; /** * Sales channel that submitted the order. */ type?: string; }; type Color = { /** * Optional - HEX or RGB color code for display. */ code?: string; /** * Optional - Description line color name in site's default language. */ original?: string; /** * Optional - Translated description line color name according to buyer language. Defaults to `original` when not provided. */ translated?: string; }; type Complete = {}; type ContinueSideEffectsFlowInLegacyData = { orderId?: string; ordersExperiments?: wix_ecom_backend.Orders.OrdersExperiments; storeId?: string; }; type Coupon = { /** * Coupon ID. */ _id?: string; /** * Coupon value. */ amount?: wix_ecom_backend.Orders.Price; /** * Coupon code. */ code?: string; /** * Coupon name. */ name?: string; }; type CreateOrderRequest = { /** * Order info. */ order: wix_ecom_backend.Orders.Order; }; type CreateOrderResponse = { /** * Newly created order. */ order?: wix_ecom_backend.Orders.Order; }; type CreatePaymentGatewayOrderRequest = { /** * eCom Order ID */ ecomOrderId: string; }; type CreatePaymentGatewayOrderResponse = { /** * ID of the order created in the payment gateway */ paymentGatewayOrderId?: string; }; type CreatedBy = { /** * App ID - when the order was created by an external application. */ appId?: string; /** * Member ID - when the order was created by a **logged in** site visitor. */ memberId?: string; /** * User ID - when the order was created by a Wix user on behalf of a buyer. * For example, via POS (point of service). */ userId?: string; /** * Visitor ID - when the order was created by a site visitor that was **not** logged in. */ visitorId?: string; }; type CreatedByStringOneOf = { /** * App ID - when the order was created by an external application. */ appId?: string; /** * Member ID - when the order was created by a **logged in** site visitor. */ memberId?: string; /** * User ID - when the order was created by a Wix user on behalf of a buyer. * For example, via POS (point of service). */ userId?: string; /** * Visitor ID - when the order was created by a site visitor that was **not** logged in. */ visitorId?: string; }; type CursorPaging = { /** * Pointer to the next or previous page in the list of results. */ cursor?: string; /** * Number of items to load. */ limit?: number; }; type Cursors = { /** * Cursor pointing to next page in the list of results. */ next?: string; /** * Cursor pointing to previous page in the list of results. */ prev?: string; }; type CustomActivity = { /** * Additional data in key-value form. For example, `{ "Ticket number": "123456" }`. */ additionalData?: Record; /** * ID of the app that created the custom activity. */ appId?: string; /** * Custom activity type. For example, `"Ticket number set"`. */ type?: string; }; type CustomField = { /** * Custom field title. */ title?: string; /** * Translated custom field title. */ translatedTitle?: string; /** * Custom field value. */ value?: any; }; type DecrementData = { /** * Line item quantity being decremented. */ decrementBy?: number; /** * ID of the line item being decremented. */ lineItemId?: string; /** * Whether to restock the line item (triggers inventory update). */ restock?: boolean; }; type DecrementItemsQuantityRequest = { /** * Order ID */ _id: string; /** * Which items to decrement, and how much to decrement from each one */ decrementData: Array; }; type DecrementItemsQuantityResponse = { /** * Updated order data */ order?: wix_ecom_backend.Orders.Order; }; type DeleteActivityIdentifiers = { /** * Order ID. */ _id: string; /** * ID of the activity to delete. */ activityId: string; }; type DeleteActivityRequest = { /** * Order ID. */ _id: string; /** * ID of the activity to delete. */ activityId: string; }; type DeleteActivityResponse = { /** * Updated order. */ order?: wix_ecom_backend.Orders.Order; }; type DeliveryLogistics = { /** * Latest expected delivery date. */ deliverByDate?: Date; /** * Expected delivery time in free text. For example, `"3-5 business days"`. */ deliveryTime?: string; /** * Instructions for carrier. For example, `"Please knock on the door. If unanswered, please call contact number. Thanks."`. */ instructions?: string; /** * Pickup details. */ pickupDetails?: wix_ecom_backend.Orders.PickupDetails; /** * Shipping address and contact details. */ shippingDestination?: wix_ecom_backend.Orders.AddressWithContact; }; type DeliveryLogisticsAddressOneOf = { /** * Pickup details. */ pickupDetails?: wix_ecom_backend.Orders.PickupDetails; /** * Shipping address and contact details. */ shippingDestination?: wix_ecom_backend.Orders.AddressWithContact; }; type DescriptionLine = { /** * Description line color value. */ colorInfo?: wix_ecom_backend.Orders.Color; /** * Description line name. */ name?: wix_ecom_backend.Orders.DescriptionLineName; /** * Description line plain text value. */ plainText?: wix_ecom_backend.Orders.PlainTextValue; }; type DescriptionLineDescriptionLineValueOneOf = {}; type DescriptionLineName = { /** * Optional - Description line name in site's default language. */ original?: string; /** * Optional - Translated description line item according to buyer language. Defaults to `original` when not provided. */ translated?: string; }; type DescriptionLineValueOneOf = { /** * Description line color value. */ colorInfo?: wix_ecom_backend.Orders.Color; /** * Description line plain text value. */ plainText?: wix_ecom_backend.Orders.PlainTextValue; }; type DiffmatokyPayload = { compareChannel?: string; entityId?: string; errorInformation?: wix_ecom_backend.Orders.ErrorInformation; left?: string; right?: string; tags?: Array; }; type DigitalFile = { /** * Link expiration time and date. */ expirationDate?: Date; /** * ID of the secure file in media. */ fileId?: string; /** * Link will exist after the digital links have been generated on the order. */ link?: string; }; type DiscountRule = { /** * Discount rule ID */ _id?: string; /** * Discount value. */ amount?: wix_ecom_backend.Orders.Price; /** * Discount rule name */ name?: wix_ecom_backend.Orders.DiscountRuleName; }; type DiscountRuleName = { /** * Original discount rule name (in site's default language). */ original?: string; /** * Translated discount rule name according to buyer language. Defaults to `original` when not provided. */ translated?: string; }; type DomainEvent = { /** * random GUID so clients can tell if event was already handled */ _id?: string; actionEvent?: wix_ecom_backend.Orders.ActionEvent; createdEvent?: wix_ecom_backend.Orders.EntityCreatedEvent; deletedEvent?: wix_ecom_backend.Orders.EntityDeletedEvent; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * Assuming that all messages including Actions have id * Example: The id of the specific order, the id of a specific campaign */ entityId?: string; /** * The time of the event. Useful if there was a delay in dipatching */ eventTime?: Date; extendedFieldsUpdatedEvent?: wix_ecom_backend.Orders.ExtendedFieldsUpdatedEvent; /** * If present, indicates the action that triggered the event. */ originatedFrom?: string; /** * This is top level to ease client code dipatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** * A field that should be set if this event was triggered by an anonymize request. * For example you must set it to true when sending an event as a result of a GDPR right to be forgotten request. * NOTE: This field is not relevant for `EntityCreatedEvent` but is located here for better ergonomics of consumers. */ triggeredByAnonymizeRequest?: boolean; updatedEvent?: wix_ecom_backend.Orders.EntityUpdatedEvent; }; type DomainEventBodyOneOf = { actionEvent?: wix_ecom_backend.Orders.ActionEvent; createdEvent?: wix_ecom_backend.Orders.EntityCreatedEvent; deletedEvent?: wix_ecom_backend.Orders.EntityDeletedEvent; extendedFieldsUpdatedEvent?: wix_ecom_backend.Orders.ExtendedFieldsUpdatedEvent; updatedEvent?: wix_ecom_backend.Orders.EntityUpdatedEvent; }; type DownloadLinkSent = {}; type EmailEdited = {}; type Empty = {}; type EntityCreatedEvent = { entityAsJson?: string; }; type EntityDeletedEvent = {}; type EntityUpdatedEvent = { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; }; type ErrorInformation = { stackTrace?: string; }; type ExtendedFieldsUpdatedEvent = { currentEntityAsJson?: string; }; type FulfillerEmailSent = {}; type FulfillmentStatusUpdated = { /** * the action that caused this update */ action?: string; /** * the new status (after the update) */ newFulfillmentStatus?: string; /** * The order that was updated */ order?: wix_ecom_backend.Orders.Order; /** * The previous status (before the update) */ previousFulfillmentStatus?: string; }; type FullAddressContactDetails = { /** * Company name. */ company?: string; /** * First name. */ firstName?: string; /** * Last name. */ lastName?: string; /** * Phone number. */ phone?: string; /** * Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set - UNSPECIFIED is not allowed. */ vatId?: wix_ecom_backend.Orders.VatId; }; type FullName = { /** * Customer's first name */ firstName?: string; /** * Customer's last name */ lastName?: string; }; type GetOrderRequest = { /** * ID of the order to retrieve. */ _id: string; }; type GetOrderResponse = { /** * The requested order. */ order?: wix_ecom_backend.Orders.Order; }; type GetPaymentCollectabilityStatusRequest = { /** * Ecom order ID. */ ecomOrderId: string; }; type GetPaymentCollectabilityStatusResponse = { /** * Collectable order amount */ amount?: wix_ecom_backend.Orders.Price; /** * Payment collectability status */ status?: string; }; type GetShipmentsRequest = { _id: string; }; type GetShipmentsResponse = { shipmentIds?: Array; }; type IndexingMessage = { _id?: string; opType?: number; requiredVersions?: Array; }; type InternalActivity = { /** * Internal activity creation date and time. */ _createdDate?: Date; /** * Internal activity ID. */ _id?: string; /** * Internal activity author's email. */ authorEmail?: string; /** * Download link was sent (relevant for orders with digital line items). */ downloadLinkSent?: wix_ecom_backend.Orders.DownloadLinkSent; /** * Order email was updated. */ emailEdited?: wix_ecom_backend.Orders.EmailEdited; /** * Email sent to fulfiller. */ fulfillerEmailSent?: wix_ecom_backend.Orders.FulfillerEmailSent; /** * Invoice was added to order. */ invoiceAdded?: wix_ecom_backend.Orders.InvoiceAdded; /** * Invoice sent to customer via email. */ invoiceSent?: wix_ecom_backend.Orders.InvoiceSent; /** * New exchange order created. */ newExchangeOrderCreated?: wix_ecom_backend.Orders.NewExchangeOrderCreated; /** * Order canceled. */ orderCanceled?: wix_ecom_backend.Orders.OrderCanceled; /** * Order created as a result of items exchange. */ orderCreatedFromExchange?: wix_ecom_backend.Orders.OrderCreatedFromExchange; /** * Order shipping status set as fulfilled. */ orderFulfilled?: wix_ecom_backend.Orders.OrderFulfilled; /** * Order shipping status set as not fulfilled. */ orderNotFulfilled?: wix_ecom_backend.Orders.OrderNotFulfilled; /** * Order paid. Either by the store owner (for offline orders), or when an online transaction was confirmed. */ orderPaid?: wix_ecom_backend.Orders.OrderPaid; /** * Order partially paid. During the checkout for orders with deposit items. */ orderPartiallyPaid?: wix_ecom_backend.Orders.OrderPartiallyPaid; /** * Order placed. */ orderPlaced?: wix_ecom_backend.Orders.OrderPlaced; /** * Order refunded. */ orderRefunded?: wix_ecom_backend.Orders.OrderRefunded; /** * Email notification for pickup sent. */ pickupReadyEmailSent?: wix_ecom_backend.Orders.PickupReadyEmailSent; /** * Shipping address was updated. */ shippingAddressEdited?: wix_ecom_backend.Orders.ShippingAddressEdited; /** * An email confirmation of order shipment was sent. */ shippingConfirmationEmailSent?: wix_ecom_backend.Orders.ShippingConfirmationEmailSent; /** * Shipping tracking link added to order. */ trackingLinkAdded?: wix_ecom_backend.Orders.TrackingLinkAdded; /** * Shipping tracking number added to order. */ trackingNumberAdded?: wix_ecom_backend.Orders.TrackingNumberAdded; /** * Shipping tracking number was edited. */ trackingNumberEdited?: wix_ecom_backend.Orders.TrackingNumberEdited; }; type InternalActivityContentOneOf = { /** * Download link was sent (relevant for orders with digital line items). */ downloadLinkSent?: wix_ecom_backend.Orders.DownloadLinkSent; /** * Order email was updated. */ emailEdited?: wix_ecom_backend.Orders.EmailEdited; /** * Email sent to fulfiller. */ fulfillerEmailSent?: wix_ecom_backend.Orders.FulfillerEmailSent; /** * Invoice was added to order. */ invoiceAdded?: wix_ecom_backend.Orders.InvoiceAdded; /** * Invoice sent to customer via email. */ invoiceSent?: wix_ecom_backend.Orders.InvoiceSent; /** * New exchange order created. */ newExchangeOrderCreated?: wix_ecom_backend.Orders.NewExchangeOrderCreated; /** * Order canceled. */ orderCanceled?: wix_ecom_backend.Orders.OrderCanceled; /** * Order created as a result of items exchange. */ orderCreatedFromExchange?: wix_ecom_backend.Orders.OrderCreatedFromExchange; /** * Order shipping status set as fulfilled. */ orderFulfilled?: wix_ecom_backend.Orders.OrderFulfilled; /** * Order shipping status set as not fulfilled. */ orderNotFulfilled?: wix_ecom_backend.Orders.OrderNotFulfilled; /** * Order paid. Either by the store owner (for offline orders), or when an online transaction was confirmed. */ orderPaid?: wix_ecom_backend.Orders.OrderPaid; /** * Order partially paid. During the checkout for orders with deposit items. */ orderPartiallyPaid?: wix_ecom_backend.Orders.OrderPartiallyPaid; /** * Order placed. */ orderPlaced?: wix_ecom_backend.Orders.OrderPlaced; /** * Order refunded. */ orderRefunded?: wix_ecom_backend.Orders.OrderRefunded; /** * Email notification for pickup sent. */ pickupReadyEmailSent?: wix_ecom_backend.Orders.PickupReadyEmailSent; /** * Shipping address was updated. */ shippingAddressEdited?: wix_ecom_backend.Orders.ShippingAddressEdited; /** * An email confirmation of order shipment was sent. */ shippingConfirmationEmailSent?: wix_ecom_backend.Orders.ShippingConfirmationEmailSent; /** * Shipping tracking link added to order. */ trackingLinkAdded?: wix_ecom_backend.Orders.TrackingLinkAdded; /** * Shipping tracking number added to order. */ trackingNumberAdded?: wix_ecom_backend.Orders.TrackingNumberAdded; /** * Shipping tracking number was edited. */ trackingNumberEdited?: wix_ecom_backend.Orders.TrackingNumberEdited; }; type InvoiceAdded = {}; type InvoiceSent = {}; type ItemMetadata = { /** * Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */ _id?: string; /** * Details about the error in case of failure. */ error?: wix_ecom_backend.Orders.ApplicationError; /** * Index of the item within the request array. Allows for correlation between request and response items. */ originalIndex?: number; /** * Whether the requested action was successful for this item. When `false`, the `error` field is populated. */ success?: boolean; }; type ItemTaxFullDetails = { /** * Tax rate percentage, as a decimal numeral between 0 and 1. For example, `"0.13"`. */ taxRate?: string; /** * Taxable amount of this line item. */ taxableAmount?: wix_ecom_backend.Orders.Price; /** * The calculated tax, based on the `taxableAmount` and `taxRate`. */ totalTax?: wix_ecom_backend.Orders.Price; }; type ItemType = { /** * Custom item type. */ custom?: string; /** * Preset item type. */ preset?: string; }; type ItemTypeItemTypeDataOneOf = { /** * Custom item type. */ custom?: string; /** * Preset item type. */ preset?: string; }; type LineItemExchangeData = { /** * ID of the exchanged line item. */ lineItemId?: string; /** * Line item quantity being exchanged. */ quantity?: number; }; type LineItemUpdate = { /** * Description lines' info. * If description line already exists for this name, it will be replaced. */ descriptionLines?: Array; /** * Line item ID. */ lineItemId?: string; }; type MarkAsFulfilledRequest = { /** * Order ID. */ _id: string; }; type MarkAsFulfilledResponse = { /** * Updated order. */ order?: wix_ecom_backend.Orders.Order; }; type MarkAsUnfulfilledRequest = { /** * Order ID. */ _id: string; }; type MarkAsUnfulfilledResponse = { /** * Updated order. */ order?: wix_ecom_backend.Orders.Order; }; type MarkOrderAsPaidRequest = { /** * Order ID. */ _id: string; }; type MarkOrderAsPaidResponse = { /** * Updated order. */ order?: wix_ecom_backend.Orders.Order; }; type MarkOrderAsSeenByHumanRequest = { /** * Order ID. */ _id: string; }; type MarkOrderAsSeenByHumanResponse = { /** * Updated order. */ order?: wix_ecom_backend.Orders.Order; }; type MerchantComment = { /** * Merchant comment message. */ message?: string; }; type MerchantDiscount = { /** * Discount amount. */ amount?: wix_ecom_backend.Orders.Price; /** * Discount description as free text (optional). */ description?: string; /** * Pre-defined discount reason (optional). * * `"ITEMS_EXCHANGE"` - exchange balance acquired as a result of items exchange. */ discountReason?: string; }; type MerchantDiscountMerchantDiscountReasonOneOf = { /** * Discount description as free text (optional). */ description?: string; /** * Pre-defined discount reason (optional). * * `"ITEMS_EXCHANGE"` - exchange balance acquired as a result of items exchange. */ discountReason?: string; }; type NewExchangeOrderCreated = { /** * ID of the new order created as a result of an exchange of items. */ exchangeOrderId?: string; /** * IDs of the items that were exchanged. */ lineItems?: Array; }; type Order = { /** * Date and time the order was created. */ _createdDate?: Date; /** * Order ID. */ _id?: string; /** * Date and time of order's latest update. */ _updatedDate?: Date; /** * Order activities. */ activities?: Array; /** * Additional fees applied to the order. */ additionalFees?: Array; /** * Applied discounts. */ appliedDiscounts?: Array; /** * Whether order is archived. */ archived?: boolean; /** * Order attribution source. */ attributionSource?: string; /** * Billing address and contact details. */ billingInfo?: wix_ecom_backend.Orders.AddressWithContact; /** * Buyer information. */ buyerInfo?: wix_ecom_backend.Orders.BuyerInfo; /** * Language for communication with the buyer. Defaults to the site language. * For a site that supports multiple languages, this is the language the buyer selected. */ buyerLanguage?: string; /** * [Buyer note](https://support.wix.com/en/article/wix-stores-viewing-buyer-notes) left by the customer. */ buyerNote?: string; /** * Information about the sales channel that submitted this order. */ channelInfo?: wix_ecom_backend.Orders.ChannelInfo; /** * Checkout ID. */ checkoutId?: string; /** * ID of the order's initiator. */ createdBy?: wix_ecom_backend.Orders.CreatedBy; /** * Currency used for pricing in this store. */ currency?: string; /** * Custom fields. */ customFields?: Array; /** * Order fulfillment status. */ fulfillmentStatus?: string; /** * Order line items. */ lineItems?: Array; /** * Order number displayed in the site owner's business manager (auto-generated). */ number?: string; /** * Order payment status. * + `NOT_PAID` - This can be an order made online, but not yet paid. In such cases `order.status` will be `INITIALIZED`. * + This status also applies when an offline order needs to be manually marked as paid. In such cases `order.status` will be `APPROVED`. * + `PAID` - All payments associated with this order are paid. For online payments: [`payment.regularPaymentDetails.status: APPROVED`](https://bo.wix.com/wix-docs/rest/ecommerce/order-payments/order-transactions-object). For gift cards: [`payment.giftCardPaymentDetails.voided: false`](https://bo.wix.com/wix-docs/rest/ecommerce/order-payments/order-transactions-object). * + `PARTIALLY_REFUNDED` - Order was refunded, but refund amount is less than order total price. * + `FULLY_REFUNDED` - Order fully refunded. Refund amount equals total price. * + `PENDING` - Payments received but not yet confirmed by the payment provider. * + `PARTIALLY_PAID` - At least one payment was received and approved, covering less than total price amount. */ paymentStatus?: string; /** * Order price summary. */ priceSummary?: wix_ecom_backend.Orders.PriceSummary; /** * Whether a human has seen the order. Set when an order is clicked on in the Business Manager. */ seenByAHuman?: boolean; /** * Shipping info and selected shipping option details. */ shippingInfo?: wix_ecom_backend.Orders.ShippingInformation; /** * Site language in which original values are shown. */ siteLanguage?: string; /** * Order status. * + `INITIALIZED` - Order was created, but not yet approved or declined. * + `APPROVED` - Order was approved. This happens when either the online payment succeeded or the order is an offline order. * + Once an order is approved, many side effects are triggered. For example, holding of stock in the inventory and sending of notification emails. * + `CANCELED` - Order was canceled by the user. */ status?: string; /** * Whether tax is included in line item prices. */ taxIncludedInPrices?: boolean; /** * Tax summary. */ taxSummary?: wix_ecom_backend.Orders.TaxSummary; /** * Weight measurement unit - defaults to site's weight unit. */ weightUnit?: string; }; type OrderApproved = { /** * The order that was updated */ order?: wix_ecom_backend.Orders.Order; }; type OrderCanceled = {}; type OrderCanceledEventOrderCanceled = { /** * Personal note added to the email */ customMessage?: string; /** * The order that was cancelled */ order?: wix_ecom_backend.Orders.Order; /** * Should restock all items on that order */ restockAllItems?: boolean; /** * Should send a confirmation mail to the customer */ sendOrderCanceledEmail?: boolean; }; type OrderCreated = { /** * Order archive status */ archived?: boolean; /** * Customer information */ buyerInfo?: wix_ecom_backend.Orders.V2BuyerInfo; /** * Currency used for pricing in this store */ currency?: string; /** * Order creation date */ dateCreated?: Date; /** * Order fulfillment status */ fulfillmentStatus?: string; /** * ID displayed in the owner's store (auto generated) */ number?: string; /** * Order ID (auto generated upon order creation) */ orderId?: string; /** * Order payment status */ paymentStatus?: string; /** * Whether the order was read by the store owner */ read?: boolean; /** * Totals for order's line items */ totals?: wix_ecom_backend.Orders.Totals; /** * Weight unit used in this store */ weightUnit?: string; }; type OrderCreatedFromExchange = { /** * ID of the original order for which the exchange happened. */ originalOrderId?: string; }; type OrderFulfilled = {}; type OrderItemsRestocked = { /** * The order which items were restocked */ order?: wix_ecom_backend.Orders.Order; /** * Restocked items and quantities */ restockItems?: Array; }; type OrderLineItem = { /** * Line item ID. */ _id?: string; /** * Catalog and item reference. Holds IDs for the item and the catalog it came from, as well as further optional info. */ catalogReference?: wix_ecom_backend.Orders.CatalogReference; /** * Item's price amount to be charged during checkout, relevant for items with payment option DEPOSIT_ONLINE */ depositAmount?: wix_ecom_backend.Orders.Price; /** * Line item description lines. Used for display purposes for the cart, checkout and order. */ descriptionLines?: Array; /** * Fulfiller ID. Field is empty when the line item is self-fulfilled. * To get fulfillment information, pass this order's ID to [List Fulfillments For Single Order](https://bo.wix.com/wix-docs/rest/ecommerce/order-fulfillments/list-fulfillments-for-single-order). */ fulfillerId?: string; /** * Line item image. */ image?: string; /** * Item type. Either a preset type or custom. */ itemType?: wix_ecom_backend.Orders.ItemType; /** * Type of selected payment option for current item. Defaults to `FULL_PAYMENT_ONLINE`. * + `FULL_PAYMENT_ONLINE` - The entire payment for this item happens as part of the checkout. * + `FULL_PAYMENT_OFFLINE` - The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods. * + `MEMBERSHIP` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0. * + `DEPOSIT_ONLINE` - Partial payment for the given item to be paid upfront during the checkout. Eligible for catalog items with type `DEPOSIT_ONLINE` only. */ paymentOption?: string; /** * Physical properties of the item. When relevant, contains information such as SKU and item weight. */ physicalProperties?: wix_ecom_backend.Orders.PhysicalProperties; /** * Line item price after line item discounts for display purposes. */ price?: wix_ecom_backend.Orders.Price; /** * Line item price before line item discounts for display purposes. Defaults to `price` when not provided. */ priceBeforeDiscounts?: wix_ecom_backend.Orders.Price; /** * Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". */ priceDescription?: wix_ecom_backend.Orders.PriceDescription; /** * Item name. * + Stores - `product.name` * + Bookings - `service.info.name` * + Events - `ticket.name` */ productName?: wix_ecom_backend.Orders.ProductName; /** * Line item quantity. */ quantity?: number; /** * quantity of inventory requested to be returned. Whether to restock or ignore the request is up the vertical. */ restockQuantity?: number; /** * Subscription info. */ subscriptionInfo?: wix_ecom_backend.Orders.SubscriptionInfo; /** * Tax details for this line item. */ taxDetails?: wix_ecom_backend.Orders.ItemTaxFullDetails; /** * Total discount for this line item's entire quantity. */ totalDiscount?: wix_ecom_backend.Orders.Price; /** * Total price after all discounts and tax. */ totalPriceAfterTax?: wix_ecom_backend.Orders.Price; /** * Deprecated - please use `total_price_after_tax` minus `tax_details.total_tax` instead. */ totalPriceBeforeTax?: wix_ecom_backend.Orders.Price; }; type OrderNotFulfilled = {}; type OrderPaid = {}; type OrderPartiallyPaid = {}; type OrderPlaced = {}; type OrderRefunded = { /** * Refund amount. */ amount?: wix_ecom_backend.Orders.Price; /** * Whether order was refunded manually. For example, via payment provider or using cash. */ manual?: boolean; /** * Reason for refund. */ reason?: string; }; type OrdersExperiments = { epCommitTax?: boolean; moveBuyerOrderConfirmationEmailToEp?: boolean; moveMerchantEmailToEp?: boolean; producedByEpBridge?: boolean; }; type PaymentStatusUpdated = { /** * The order that was updated */ order?: wix_ecom_backend.Orders.Order; /** * The previous status (before the update) */ previousPaymentStatus?: string; }; type PhysicalProperties = { /** * Whether this line item is shippable. */ shippable?: boolean; /** * Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku). */ sku?: string; /** * Line item weight. Measurement unit (KG or LB) is taken from `order.weightUnit`. */ weight?: number; }; type PickupAddress = { /** * Main address line (usually street name and number). */ addressLine1?: string; /** * Free text providing more detailed address info. Usually contains apt, suite, floor. */ addressLine2?: string; /** * City name. */ city?: string; /** * Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format. */ country?: string; /** * Postal or zip code. */ postalCode?: string; /** * Street address object, with number, name, and apartment number in separate fields. */ streetAddress?: wix_ecom_backend.Orders.StreetAddress; /** * Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format. */ subdivision?: string; }; type PickupDetails = { /** * Pickup address. */ address?: wix_ecom_backend.Orders.PickupAddress; /** * Pickup method */ pickupMethod?: string; }; type PickupReadyEmailSent = {}; type PlainTextValue = { /** * Optional - Description line plain text value in site's default language. */ original?: string; /** * Optional - Translated description line plain text value according to buyer language. Defaults to `original` when not provided. */ translated?: string; }; type PlatformPaging = { /** * Number of items to load. */ limit?: number; /** * Number of items to skip in the current sort order. */ offset?: number; }; type PlatformPagingMetadata = { /** * The number of items returned in this response. */ count?: number; /** * Cursors to navigate through result pages. Returned if cursor paging was used. */ cursors?: wix_ecom_backend.Orders.Cursors; /** * The offset which was requested. Returned if offset paging was used. */ offset?: number; /** * The total number of items that match the query. Returned if offset paging was used. */ total?: number; }; type PlatformQuery = { /** * Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */ cursorPaging?: wix_ecom_backend.Orders.CursorPaging; /** * Filter object. */ filter?: Object; /** * Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */ paging?: wix_ecom_backend.Orders.PlatformPaging; /** * Sorting options. For example, `[{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]`. */ sort?: Array; }; type PlatformQueryPagingMethodOneOf = { /** * Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */ cursorPaging?: wix_ecom_backend.Orders.CursorPaging; /** * Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */ paging?: wix_ecom_backend.Orders.PlatformPaging; }; type PreparePaymentCollectionRequest = { /** * Amount to collect */ amount: wix_ecom_backend.Orders.Price; /** * Ecom order ID. */ ecomOrderId: string; }; type PreparePaymentCollectionResponse = { /** * Payment gateway order id which is associated with given payment */ paymentGatewayOrderId?: string; }; type PreviewBuyerConfirmationEmailRequest = {}; type PreviewBuyerConfirmationEmailResponse = { emailPreview?: string; }; type PreviewBuyerPaymentsReceivedEmailRequest = {}; type PreviewBuyerPaymentsReceivedEmailResponse = { emailPreview?: string; }; type PreviewBuyerPickupConfirmationEmailRequest = {}; type PreviewBuyerPickupConfirmationEmailResponse = { emailPreview?: string; }; type PreviewCancelEmailOptions = { /** * Personal note added to the email (optional) */ customMessage?: string; }; type PreviewCancelEmailRequest = { /** * Personal note added to the email (optional) */ customMessage?: string; orderId: string; }; type PreviewCancelEmailResponse = { emailPreview?: string; }; type PreviewCancelRefundEmailOptions = { /** * Personal note added to the email (optional) */ customMessage?: string; /** * Refund amount */ refundAmount?: wix_ecom_backend.Orders.Price; }; type PreviewCancelRefundEmailRequest = { /** * Personal note added to the email (optional) */ customMessage?: string; orderId: string; /** * Refund amount */ refundAmount?: wix_ecom_backend.Orders.Price; }; type PreviewCancelRefundEmailResponse = { emailPreview?: string; }; type PreviewEmailByTypeRequest = { /** * Suppoerted values: * - `'DOWNLOAD_LINKS'` * - `'ORDER_PLACED'` * - `'ORDER_READY_FOR_PICKUP'` * - `'ORDER_SHIPPED'` */ emailType: string; }; type PreviewEmailByTypeResponse = { emailPreview?: string; }; type PreviewRefundEmailOptions = { /** * Personal note added to the email (optional) */ customMessage?: string; /** * Refund business details */ details?: wix_ecom_backend.Orders.RefundDetails; /** * Refund amount */ refundAmount: wix_ecom_backend.Orders.Price; }; type PreviewRefundEmailRequest = { /** * Personal note added to the email (optional) */ customMessage?: string; /** * Refund business details */ details?: wix_ecom_backend.Orders.RefundDetails; orderId: string; /** * Refund amount */ refundAmount: wix_ecom_backend.Orders.Price; }; type PreviewRefundEmailResponse = { emailPreview?: string; }; type PreviewResendDownloadLinksEmailRequest = {}; type PreviewResendDownloadLinksEmailResponse = { emailPreview?: string; }; type PreviewShippingConfirmationEmailRequest = {}; type PreviewShippingConfirmationEmailResponse = { emailPreview?: string; }; type Price = { /** * Amount. */ amount?: string; /** * Amount formatted with currency symbol. */ formattedAmount?: string; }; type PriceDescription = { /** * Required** - Original price description (in site's default language). */ original?: string; /** * Optional - Translated product name according to buyer language. Defaults to `original` when not provided. */ translated?: string; }; type PriceSummary = { /** * Total calculated discount value. */ discount?: wix_ecom_backend.Orders.Price; /** * Total shipping price, before discounts and before tax. */ shipping?: wix_ecom_backend.Orders.Price; /** * Subtotal of all the line items, before discounts and before tax. */ subtotal?: wix_ecom_backend.Orders.Price; /** * Total tax on this order. */ tax?: wix_ecom_backend.Orders.Price; /** * Order’s total price after discounts and tax. */ total?: wix_ecom_backend.Orders.Price; /** * Total price of additional fees. */ totalAdditionalFees?: wix_ecom_backend.Orders.Price; /** * Deprecated - use `total` instead. */ totalPrice?: wix_ecom_backend.Orders.Price; }; type ProductName = { /** * Required** - Original item name (in site's default language). */ original?: string; /** * Optional - Translated item name according to buyer language. Defaults to `original` when not provided. */ translated?: string; }; type PublicActivity = { /** * Custom activity details. */ customActivity?: wix_ecom_backend.Orders.CustomActivity; /** * Merchant commment. */ merchantComment?: wix_ecom_backend.Orders.MerchantComment; }; type PublicActivityContentOneOf = { /** * Custom activity details. */ customActivity?: wix_ecom_backend.Orders.CustomActivity; /** * Merchant commment. */ merchantComment?: wix_ecom_backend.Orders.MerchantComment; }; type QueryOrderRequest = { /** * Query options. */ query?: wix_ecom_backend.Orders.PlatformQuery; }; type QueryOrderResponse = { /** * Details on the paged set of results returned. */ metadata?: wix_ecom_backend.Orders.PlatformPagingMetadata; /** * List of orders. */ orders?: Array; }; type RefundDetails = { /** * Refunded line items and quantities. */ items?: Array; /** * Reason for refund, given by user (optional). */ reason?: string; /** * Whether shipping rate is also refunded. */ shippingIncluded?: boolean; }; type RefundItem = { /** * ID of the line item being refunded. */ lineItemId?: string; /** * Line item quantity being refunded. */ quantity?: number; }; type Reschedule = { executeAt?: Date; payload?: string; }; type RestockItem = { /** * ID of the line item being restocked. */ lineItemId?: string; /** * Line item quantity being restocked. */ quantity?: number; }; type SendBuyerConfirmationEmailRequest = { orderId: string; }; type SendBuyerConfirmationEmailResponse = {}; type SendBuyerPaymentsReceivedEmailRequest = { orderId: string; }; type SendBuyerPaymentsReceivedEmailResponse = {}; type SendBuyerPickupConfirmationEmailRequest = { orderId: string; }; type SendBuyerPickupConfirmationEmailResponse = {}; type SendBuyerShippingConfirmationEmailRequest = { orderId: string; }; type SendBuyerShippingConfirmationEmailResponse = {}; type SendCancelRefundEmailOptions = { /** * Personal note added to the email (optional) */ customMessage?: string; /** * Refund amount */ refundAmount: wix_ecom_backend.Orders.Price; }; type SendCancelRefundEmailRequest = { /** * Personal note added to the email (optional) */ customMessage?: string; /** * The ID of order that is canceled/refunded */ orderId: string; /** * Refund amount */ refundAmount: wix_ecom_backend.Orders.Price; }; type SendCancelRefundEmailResponse = {}; type SendMerchantOrderReceivedNotificationRequest = { orderId: string; }; type SendMerchantOrderReceivedNotificationResponse = {}; type SendOrderPaymentReceivedEmail = { orderId?: string; storeId?: string; }; type ShippingAddressEdited = {}; type ShippingConfirmationEmailSent = {}; type ShippingInformation = { /** * App Def Id of external provider which was a source of shipping info */ carrierId?: string; /** * Unique code (or ID) of selected shipping option. For example, `"usps_std_overnight"``. */ code?: string; /** * Shipping costs. */ cost?: wix_ecom_backend.Orders.ShippingPrice; /** * Shipping logistics. */ logistics?: wix_ecom_backend.Orders.DeliveryLogistics; /** * Shipping region. */ region?: wix_ecom_backend.Orders.ShippingRegion; /** * Shipping option title. * For example, `"USPS Standard Overnight Delivery"`, `"Standard"` or `"First-Class Package International"`. */ title?: string; }; type ShippingPrice = { /** * Shipping discount before tax. */ discount?: wix_ecom_backend.Orders.Price; /** * Shipping price for display purposes. */ price?: wix_ecom_backend.Orders.Price; /** * Tax details. */ taxDetails?: wix_ecom_backend.Orders.ItemTaxFullDetails; /** * Shipping price after all discounts (if any exist), and after tax. */ totalPriceAfterTax?: wix_ecom_backend.Orders.Price; /** * Deprecated - please use `total_price_after_tax` minus `tax_details.total_tax` instead. */ totalPriceBeforeTax?: wix_ecom_backend.Orders.Price; }; type ShippingRegion = { /** * Name of shipping region. For example, `"Metropolitan London"`, or `"Outer Melbourne suburbs"`. */ name?: string; }; type SnapshotMessage = { _id?: string; opType?: number; }; type Sorting = { /** * Name of the field to sort by. */ fieldName?: string; /** * Sort order. */ order?: string; }; type Street = { /** * Street name */ name?: string; /** * Street number */ number?: string; }; type StreetAddress = { /** * Street name. */ name?: string; /** * Street number. */ number?: string; }; type SubscriptionInfo = { /** * Subscription ID. */ _id?: string; /** * Subscription cycle. For example, if this order is for the 3rd cycle of a subscription, value will be `3`. */ cycleNumber?: number; /** * Subscription option description. For example, `"1kg of selected coffee, once a month"`. */ subscriptionOptionDescription?: string; /** * Subscription option title. For example, `"Monthly coffee Subscription"`. */ subscriptionOptionTitle?: string; /** * Subscription detailed information. */ subscriptionSettings?: wix_ecom_backend.Orders.SubscriptionSettings; }; type SubscriptionOptionInfo = { /** * Subscription option description. */ description?: string; /** * Subscription option title. */ title?: string; }; type SubscriptionSettings = { /** * Whether subscription is renewed automatically at the end of each period. */ autoRenewal?: boolean; /** * Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`. */ billingCycles?: number; /** * Frequency of recurring payment. */ frequency?: string; }; type Task = { executeAt?: Date; key?: wix_ecom_backend.Orders.TaskKey; payload?: string; }; type TaskAction = { cancel?: wix_ecom_backend.Orders.Cancel; complete?: wix_ecom_backend.Orders.Complete; reschedule?: wix_ecom_backend.Orders.Reschedule; }; type TaskActionActionOneOf = { cancel?: wix_ecom_backend.Orders.Cancel; complete?: wix_ecom_backend.Orders.Complete; reschedule?: wix_ecom_backend.Orders.Reschedule; }; type TaskKey = { appId?: string; instanceId?: string; subjectId?: string; }; type TaxSummary = { /** * Total tax. */ totalTax?: wix_ecom_backend.Orders.Price; }; type Totals = { /** * Total calculated discount value. */ discount?: string; /** * Total calculated gift card value. */ giftCard?: string; /** * Total number of line items. */ quantity?: number; /** * Total refund. */ refund?: string; /** * Total shipping price, before tax. */ shipping?: string; /** * Subtotal of all the line items, before tax. */ subtotal?: string; /** * Total tax. */ tax?: string; /** * Total price charged. */ total?: string; /** * Total items weight. */ weight?: string; }; type TrackingLinkAdded = {}; type TrackingNumberAdded = {}; type TrackingNumberEdited = {}; type TriggerSideEffectsFromLegacyData = { orderId?: string; ordersExperiments?: wix_ecom_backend.Orders.OrdersExperiments; storeId?: string; }; type UnArchiveOrderRequest = { /** * Order ID. */ _id: string; }; type UnArchiveOrderResponse = { /** * Unarchived order. */ order?: wix_ecom_backend.Orders.Order; }; type UpdateActivityIdentifiers = { /** * Order ID. */ _id: string; /** * ID of the activity to update. */ activityId: string; }; type UpdateActivityRequest = { /** * Order ID. */ _id: string; /** * Activity info. */ activity: wix_ecom_backend.Orders.PublicActivity; /** * ID of the activity to update. */ activityId: string; }; type UpdateActivityResponse = { /** * Updated order. */ order?: wix_ecom_backend.Orders.Order; }; type UpdateBillingContactDetailsOptions = { /** * Contact details. */ addressContactDetails?: wix_ecom_backend.Orders.FullAddressContactDetails; }; type UpdateBillingContactDetailsRequest = { /** * Order ID. */ _id: string; /** * Contact details. */ addressContactDetails?: wix_ecom_backend.Orders.FullAddressContactDetails; }; type UpdateBillingContactDetailsResponse = { /** * Updated order. */ order?: wix_ecom_backend.Orders.Order; }; type UpdateBuyerInfoOptions = { /** * Buyer info. */ buyerInfo?: wix_ecom_backend.Orders.BuyerInfoUpdate; }; type UpdateBuyerInfoRequest = { /** * Order ID. */ _id: string; /** * Buyer info. */ buyerInfo?: wix_ecom_backend.Orders.BuyerInfoUpdate; }; type UpdateBuyerInfoResponse = { /** * Updated order. */ order?: wix_ecom_backend.Orders.Order; }; type UpdateLineItemsDescriptionLinesRequest = { /** * Order ID. */ _id: string; /** * Line items. */ lineItems: Array; }; type UpdateLineItemsDescriptionLinesResponse = { /** * Updated order. */ order?: wix_ecom_backend.Orders.Order; }; type UpdateOrderShippingAddressOptions = { /** * Shipping address and contact details to be updated. */ shippingAddress: wix_ecom_backend.Orders.AddressWithContact; }; type UpdateOrderShippingAddressRequest = { /** * Order ID. */ _id: string; /** * Shipping address and contact details to be updated. */ shippingAddress: wix_ecom_backend.Orders.AddressWithContact; }; type UpdateOrderShippingAddressResponse = { /** * Updated order. */ order?: wix_ecom_backend.Orders.Order; }; type V1SubscriptionSettings = { /** * Whether subscription is renewed automatically at the end of each period. */ autoRenewal?: boolean; /** * Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`. */ billingCycles?: number; /** * Frequency of recurring payment. */ frequency?: string; }; type V2BuyerInfo = { /** * Wix customer ID */ _id?: string; /** * Customer's email address */ email?: string; /** * Customer's first name */ firstName?: string; /** * Customer type */ identityType?: string; /** * Customer's last name */ lastName?: string; /** * Customer's phone number */ phone?: string; /** * Deprecated (use identityType instead) */ type?: string; }; type V2SubscriptionInfo = { /** * Subscription ID. */ _id?: string; /** * Current cycle number. For example, if the subscription is in the 3rd month of a 4-month subscription, the value will be `3`. */ cycleNumber?: number; /** * Subscription options info. */ subscriptionOptionInfo?: wix_ecom_backend.Orders.SubscriptionOptionInfo; /** * Subscription settings. */ subscriptionSettings?: wix_ecom_backend.Orders.V1SubscriptionSettings; }; type VatId = { /** * Customer's tax ID */ _id?: string; /** * tax type */ type?: string; }; } } declare namespace wix_events { /** * A registration form for an event. * [Read more](https://www.wix.com/corvid/reference/wix-events.Form.html#) */ interface Form { /** * Gets information about the event's registration form and status. * [Read more](https://www.wix.com/corvid/reference/wix-events.Form.html#formData) */ readonly formData: wix_events.Form.FormData; /** * Validates form fields and values against the registration form as defined in the site Dashboard. * [Read more](https://www.wix.com/corvid/reference/wix-events.Form.html#validate) */ validate(formValues: wix_events.Form.FormValue[]): Promise; /** * Validates an input form field value against the registration form as defined in the site Dashboard. * [Read more](https://www.wix.com/corvid/reference/wix-events.Form.html#validateInput) */ validateInput(inputName: string, formValues: wix_events.Form.FormValue[]): wix_events.Form.ValidationResult; } namespace Form { /** * An object containing information about a label for a complex input field type. */ type AdditionalLabel = { /** * Additional label name. */ name: string; /** * Additional label value. */ label: string; }; /** * An object representing an error that occurred during validation of a registration form's fields. */ type FieldValidationError = { /** * Error message. */ message: string; /** * List of fields that caused the error when the form does not pass validation. */ fields: string[]; }; /** * An object representing the details needed to create a registration form for an event. */ type FormData = { /** * Information about the input fields needed to create a registration form. */ formInputs: wix_events.Form.InputItem[]; /** * Allowed RSVP statuses for an event. * One of: * * + `"YES_AND_NO"`: Guests can RSVP for the event with a "Yes" or "No". * + `"YES_ONLY"`: Guests can only RSVP for the event with a "Yes". * + `"WAITING"`: The guest limit has been reached, but there is an open waitlist. */ rsvpStatusOptions: string; /** * Event registration status. * One of: * * + `"OPEN_RSVP"`: Registration is open and guest limit has not been reached. * + `"OPEN_RSVP_WAITLIST"`: Registration is open, guest limit has been reached, * and additional registering guests are added to the waitlist. * + `"OPEN_TICKETS"`: Registration is open for a ticketed event and there are still * tickets available. * + `"OPEN_EXTERNAL"`: Registration is open for an event that uses external registration, * not RSVP or ticketed. * + `"CLOSED"`: Registration is closed because the guest limit has been reached. * + `"CLOSED_MANUALLY"`: Registration was closed manually. */ registrationStatus: string; /** * Whether the event is a ticketed event. */ isTicketed: boolean; }; /** * An object containing information about a form value. */ type FormValue = { /** * Form field name. */ name: string; /** * Form field value. */ value: string; }; /** * An object containing information about an input field in a registration form. */ type InputItem = { /** * Unique input identifier. */ _id: string; /** * Whether the input field's value is an array. */ array: boolean; /** * Input field display label. */ label: string; /** * Addition field display labels for complex fields. */ additionalLabels: wix_events.Form.AdditionalLabel[]; /** * List of value options where applicable. */ options: string[]; /** * Maximum length of the input field's value. A value of `0` indicates no maximum length. */ maxLength: number; /** * Input field name. */ name: string; /** * Whether the input field is required. */ required: boolean; /** * The type of the input field. * One of: * * + `"NAME"` * + `"INPUT"` * + `"RADIO"` * + `"CHECKBOX"` * + `"DROPDOWN"` * + `"GUEST_CONTROL"` * + `"ADDRESS_FULL"` * + `"TEXTAREA"` * + `"DATE"` */ controlType: string; }; /** * An object representing the result of a validation. */ type ValidationResult = { /** * Indicates that the registration form field(s) are valid. */ valid: boolean; }; /** * An object representing an error that occurred during validation of an RSVP form's values. */ type ValueValidationError = { /** * Error message. */ message: string; /** * ID of the input field that failed validation. */ inputId: string; /** * Error type. * One of: * * + `"EMPTY_INPUT"`: A required field is missing its value. * + `"INVALID_INPUT_VALUE"`: The value is not valid for the field type. * + `"INPUT_TOO_LONG"`: The value is too long. * + `"INVALID_OPTION"`: The value does not match one of the defined options for the field. * + `"INVALID_STATUS"`: The status value is not valid. * + `"INVALID_NUMBER_OF_GUESTS"`: The number of guests does not match the number defined for the form. */ errorType: string; }; } /** * An object containing RSVP functionality. * [Read more](https://www.wix.com/corvid/reference/wix-events.Rsvp.html#) */ interface Rsvp { /** * Creates an RSVP and adds the new guests to an event's guest list. * [Read more](https://www.wix.com/corvid/reference/wix-events.Rsvp.html#createRsvp) */ createRsvp(eventId: string, formValues: wix_events.Rsvp.FormValue[]): Promise; } namespace Rsvp { /** * An object representing an error that occurred during an RSVP creation. */ type CreationError = { /** * Error message. */ message: string; /** * Error type. * One of: * * + `"RSVP_CLOSED"`: Event registration is closed. * + `"GUEST_LIMIT_REACHED"`: The maximum number of guests has already been reached. * + `"MEMBER_ALREADY_REGISTERED"`: The current registrant is already registered as a guest. * + `"WAITING_LIST_UNAVAILABLE"`: The maximum number of guests has already been reached and * there is no waitlist. * + `"UNKNOWN_ERROR"`: Unknown error. */ errorType: string; }; /** * An object containing information about form values. */ type FormValue = { /** * Form field name. */ name: string; /** * Form field value. */ value: string; }; /** * An object representing a guest on an event RSVP. */ type Guest = { /** * Index of the guest in the RSVP guest list. Indices are zero-based. */ index: number; /** * Guest ID, which is unique within the RSVP. */ id: number; /** * Full name of the guest. */ fullName: string; }; /** * An object representing an RSVP input value. */ type InputValue = { /** * Name of the input. */ inputName: string; /** * Value of the input, when there is just one value. */ value: string; /** * Value of the input, when there are multiple values. */ values: string[]; }; /** * An object representing an RSVP form. */ type RsvpForm = { /** * Values that were entered in the RSVP form. */ inputValues: wix_events.Rsvp.InputValue[]; }; /** * An object representing a response to creating an RSVP. */ type RsvpResponse = { /** * RSVP ID */ id: string; /** * Whether the guest's personal information has been removed. */ anonymized: boolean; /** * Contact ID of the guest who created the RSVP. */ contactId: string; /** * Date when the RSVP was created. */ createdDate: Date; /** * Email address to the guest who created the RSVP. */ email: string; /** * ID of the event the RSVP is for. */ eventId: string; /** * First name of the guest who created the RSVP. */ firstName: string; /** * Last name of the guest who created the RSVP. */ lastName: string; /** * All of the guests included in the RSVP. */ guests: wix_events.RsvpForm.Guest[]; /** * A representation of the RSVP form that was created. */ rsvpForm: wix_events.RsvpForm.RsvpForm; /** * Member ID of the guest who created the RSVP form if the guest is a site member. */ memberId: string; /** * Date when RSVP was last modified. */ updatedDate: Date; /** * RSVP status. */ status: string; /** * Total number of guests included in the RSVP. */ totalGuests: number; }; } /** * **Deprecated:** A form for creating an RSVP to an event. * [Read more](https://www.wix.com/corvid/reference/wix-events.RsvpForm.html#) */ interface RsvpForm { /** * **Deprecated:** Gets information about the event's RSVP form and status. * [Read more](https://www.wix.com/corvid/reference/wix-events.RsvpForm.html#getRsvpData) */ getRsvpData(): Promise; /** * **Deprecated:** Submits an RSVP form and adds the new guests to the event's guest list. * [Read more](https://www.wix.com/corvid/reference/wix-events.RsvpForm.html#submit) */ submit(formValues: wix_events.RsvpForm.FormValue[]): Promise; /** * **Deprecated:** Validates form fields and values against the registration form as defined in the site Dashboard. * [Read more](https://www.wix.com/corvid/reference/wix-events.RsvpForm.html#validate) */ validate(formValues: wix_events.RsvpForm.FormValue[]): Promise; /** * **Deprecated:** Validates an input form field value against the registration form as defined in the site Dashboard. * [Read more](https://www.wix.com/corvid/reference/wix-events.RsvpForm.html#validateInput) */ validateInput(inputName: string, formValues: wix_events.RsvpForm.FormValue[]): Promise; } namespace RsvpForm { /** * **Deprecated:** An object containing information about a label for a complex input field type. */ type AdditionalLabel = { /** * Additional label name. */ name: string; /** * Additional label value. */ label: string; }; /** * **Deprecated:** An object representing an error that occurred during validation of an RSVP form's fields. */ type FieldValidationError = { /** * Error message. */ message: string; /** * List of fields that caused the error when the form does not pass validation. */ fields: string[]; }; /** * **Deprecated:** An object containing information about form value to submit. */ type FormValue = { /** * Form field name. */ name: string; /** * Form field value. */ value: string; }; /** * **Deprecated:** An object representing a guest on an event RSVP. */ type Guest = { /** * Index of the guest in the RSVP guest list. Indices are zero-based. */ index: number; /** * Guest ID, which is unique within the RSVP. */ id: number; /** * Full name of the guest. */ fullName: string; }; /** * **Deprecated:** An object representing a submitted RSVP form input value. */ type InputValue = { /** * Name of the form input. */ inputName: string; /** * Value of the form input, when there is just one value. */ value: string; /** * Value of the form input, when there are multiple values. */ values: string[]; }; /** * **Deprecated:** An object representing the details needed to create an RSVP form for an event. */ type RsvpData = { /** * Information about the input fields needed to create an RSVP form. */ rsvpFormInputs: wix_events.RsvpForm.RsvpInputItem[]; /** * Allowed RSVP statuses for an event. * One of: * * + `"YES_AND_NO"`: Guests can RSVP for the event with a "Yes" or "No". * + `"YES_ONLY"`: Guests can only RSVP for the event with a "Yes". * + `"WAITING"`: The guest limit has been reached, but there is an open waitlist. */ rsvpStatusOptions: string; /** * Event registration status. * One of: * * + `"OPEN_RSVP"`: Registration is open and guest limit has not been reached. * + `"OPEN_RSVP_WAITLIST"`: Registration is open, guest limit has been reached, * and additional registering guests are added to the waitlist. * + `"CLOSED"`: Registration is closed because the guest limit has been reached. * + `"CLOSED_MANUALLY"`: Registration was closed manually. */ registrationStatus: string; }; /** * **Deprecated:** An object representing a submitted RSVP form. */ type RsvpForm = { /** * Values that were entered in the RSVP form. */ inputValues: wix_events.RsvpForm.InputValue[]; }; /** * **Deprecated:** An object containing information about an input field in an RSVP form. */ type RsvpInputItem = { /** * Unique input identifier. */ _id: string; /** * Whether the input field's value is an array. */ array: boolean; /** * Input field display label. */ label: string; /** * Addition field display labels for complex fields. */ additionalLabels: wix_events.RsvpForm.AdditionalLabel[]; /** * List of value options where applicable. */ options: string[]; /** * Maximum length of the input field's value. A value of `0` indicates no maximum length. */ maxLength: number; /** * Input field name. */ name: string; /** * Whether the input field is required. */ required: boolean; /** * The type of the input field. * One of: * * + `"NAME"` * + `"INPUT"` * + `"RADIO"` * + `"CHECKBOX"` * + `"DROPDOWN"` * + `"GUEST_CONTROL"` * + `"ADDRESS_FULL"` * + `"TEXTAREA"` * + `"DATE"` */ controlType: string; }; /** * **Deprecated:** An object representing a response to submitting an RSVP. */ type RsvpResponse = { /** * RSVP ID */ id: string; /** * Indicates whether the guest's personal information has been deleted or not. */ anonymized: boolean; /** * Contact ID of the guest who submitted the RSVP form. */ contactId: string; /** * Date when the RSVP was submitted. */ createdDate: Date; /** * Email address to the guest who submitted the RSVP form. */ email: string; /** * ID of the event the RSVP is for. */ eventId: string; /** * First name of the guest who submitted the RSVP form. */ firstName: string; /** * Last name of the guest who submitted the RSVP form. */ lastName: string; /** * All of the guests included in the RSVP. */ guests: wix_events.RsvpForm.Guest[]; /** * A representation of the RSVP form that was submitted. */ rsvpForm: wix_events.RsvpForm.RsvpForm; /** * Member ID of the guest who submitted the RSVP form if the guest is a site member. */ memberId: string; /** * Date when RSVP was last modified. */ updatedDate: Date; /** * RSVP status. */ status: string; /** * Total number of guests included in the RSVP. */ totalGuests: number; }; /** * **Deprecated:** An object representing an error that occurred during an RSVP form submission. */ type SubmissionError = { /** * Error message. */ message: string; /** * Error type. * One of: * * + `"RSVP_CLOSED"`: Event registration is closed. * + `"GUEST_LIMIT_REACHED"`: The maximum number of guests has already been reached. * + `"MEMBER_ALREADY_REGISTERED"`: The current registrant is already registered as a guest. * + `"WAITING_LIST_UNAVAILABLE"`: The maximum number of guests has already been reached and * there is no waitlist. * + `"UNKNOWN_ERROR"`: Unknown error. */ errorType: string; }; /** * **Deprecated:** An object representing the result of a form validation. */ type ValidationResult = { /** * Indicates that the RSVP form fields are valid. */ valid: boolean; }; /** * **Deprecated:** An object representing an error that occurred during validation of an RSVP form's values. */ type ValueValidationError = { /** * Error message. */ message: string; /** * ID of the input field that failed validation. */ inputId: string; /** * Error type. * One of: * * + `"EMPTY_INPUT"`: A required field is missing its value. * + `"INVALID_INPUT_VALUE"`: The value is not valid for the field type. * + `"INPUT_TOO_LONG"`: The value is too long. * + `"INVALID_OPTION"`: The value does not match one of the defined options for the field. * + `"INVALID_STATUS"`: The status value is not valid. * + `"INVALID_NUMBER_OF_GUESTS"`: The number of guests does not match the number defined for the form. */ errorType: string; }; } /** * An object containing ticketing functionality. * [Read more](https://www.wix.com/corvid/reference/wix-events.Tickets.html#) */ interface Tickets { /** * Performs a checkout on reserved tickets. * [Read more](https://www.wix.com/corvid/reference/wix-events.Tickets.html#checkout) */ checkout(eventId: string, reservationId: string, checkoutInfo: wix_events.Tickets.CheckoutInfo): Promise; /** * Reserves tickets for an event. * [Read more](https://www.wix.com/corvid/reference/wix-events.Tickets.html#reserve) */ reserve(eventId: string, tickets: wix_events.Tickets.TicketSelection[]): Promise; /** * Updates a ticket order. * [Read more](https://www.wix.com/corvid/reference/wix-events.Tickets.html#updateOrder) */ updateOrder(eventId: string, orderNumber: string, updateInfo: wix_events.Tickets.UpdateInfo): Promise; /** * Verifies a ticket coupon. * [Read more](https://www.wix.com/corvid/reference/wix-events.Tickets.html#verifyCoupon) */ verifyCoupon(eventId: string, reservationId: string, coupon: string): Promise; } namespace Tickets { /** * An object containing information about a checkout. */ type CheckoutInfo = { /** * Field names and values for a registration form. */ formValues: wix_events.Form.FormValue[]; /** * Coupon to be used during checkout. */ coupon?: string; }; /** * An object containing information about a checkout performed using the [`checkout()`](#reserve) function. */ type CheckoutResponse = { /** * Ticket reservations. */ reservations: wix_events.Tickets.Reservation[]; /** * Ticket order. */ order: wix_events.Tickets.Order; /** * Time the reservations expire. */ expirationTime: Date; }; /** * An object representing a discount. */ type Discount = { /** * Discount amount. */ amount: wix_events.Tickets.Money; /** * Amount after discount. */ afterDiscount: wix_events.Tickets.Money; /** * Discount code. */ code: string; /** * Discount name. */ name: string; /** * ID of the coupon used in the discount. */ couponId: string; }; /** * An object containing information about a discount error. */ type DiscountError = { /** * Error code. * * One of: * * + `"ERROR_COUPON_DOES_NOT_EXIST"` * + `"ERROR_COUPON_IS_DISABLED"` * + `"ERROR_COUPON_USAGE_EXCEEDED"` * + `"ERROR_COUPON_HAS_EXPIRED"` */ code: string; }; /** * An object containing information about discount errors. */ type DiscountErrors = { /** * Invoice the coupon is used in. */ error: wix_events.Tickets.DiscountError[]; }; /** * An object representing a fee. */ type Fee = { /** * Fee name. Value is `"WIX_FEE"`: Wix service fee applied to the item. */ name: string; /** * Fee calculation method. * One of: * * + `"FEE_ADDED"`: Fee is added to the ticket price at checkout. * + `"FEE_INCLUDED"`: Seller absorbs the fee. It is deducted from the ticket price. */ type: string; /** * Rate percentage. Possible values are between `"0.01"` and `"100"`, using up to 2 decimal places. */ rate: string; /** * Total amount of fee charges. */ amount: wix_events.Tickets.Money; }; /** * An object representing a ticket order invoice. */ type Invoice = { /** * Invoice items. */ items: wix_events.Tickets.InvoiceItem[]; /** * Invoice total. */ total: wix_events.Tickets.Money; /** * Invoice applied discount. */ discount?: wix_events.Tickets.Discount; /** * Invoice tax. */ tax?: wix_events.Tickets.Tax; /** * Invoice subtotal amount before discount, tax, and fees. */ subTotal: wix_events.Tickets.Money; /** * Invoice total amount after discount, tax, and fees. * Grand total is calculated in the following manner: * * 1. Total price of all items in the cart. * 2. Discount is subtracted from the cart (if applicable). * 3. Tax is added (if applicable). * 4. Wix service fee is added. */ grandTotal: wix_events.Tickets.Money; /** * Invoice applied fee charges. */ fees: wix_events.Tickets.Fee[]; /** * Total revenue with taxes, excluding fees. Payment provider fees are not deducted. */ revenue: wix_events.Tickets.Money; }; /** * An object representing a ticket order invoice item. */ type InvoiceItem = { /** * Invoice item ID. */ id: string; /** * Invoice item quantity. */ quantity: number; /** * Invoice item name. */ name: string; /** * Invoice item price. */ price: wix_events.Tickets.Money; /** * Invoice item total. */ total: wix_events.Tickets.Money; /** * Invoice item applied discount. */ discount?: wix_events.Tickets.Discount; /** * Invoice item tax. */ tax?: wix_events.Tickets.Tax; /** * Invoice item applied fee charges. */ fees: wix_events.Tickets.Fee[]; }; /** * An object representing a monetary amount. */ type Money = { /** * Decimal amount. */ amount: string; /** * ISO 4217 currency format. For example, "USD". */ currency: string; }; /** * An object containing information about a ticket order. */ type Order = { /** * Order number. */ orderNumber: string; /** * ID of the reservation used in the order. */ reservationId: string; /** * ID of the checkout payment. */ paymentId: string; /** * ID of the event the tickets are for. */ eventId: string; /** * ID of the contact associated with the order. */ contactId: string; /** * ID of the member associated with the order. */ memberId: string; /** * Time the order was created. */ createdDate: string; /** * First name associated with the order. */ firstName: string; /** * Last name associated with the order. */ lastName: string; /** * Full name associated with the order. */ fullName: string; /** * Email address associated with the order. */ email: string; /** * Form values used in the order. */ checkoutForm: wix_events.Form.FormValue[]; /** * Whether the order is confirmed. */ confirmed: boolean; /** * Status of the order. * * One of: * * + `"INITIATED"` * + `"FREE"` * + `"PENDING"` * + `"PAID"` * + `"OFFLINE_PENDING"` */ status: string; /** * Payment method. */ paymentMethod: string; /** * Number of tickets in the order. */ ticketQuantity: number; /** * Order price. */ price: wix_events.Tickets.Money; /** * URL of the tickets PDF. */ ticketsPdf: string; /** * Whether the order is archived. */ archived: boolean; /** * Indicates whether personal information has been removed. */ anonymized: boolean; /** * Order invoice. */ invoice: wix_events.Tickets.Invoice; /** * Whether all ticket holders in the order have checked in. */ fullyCheckedIn: boolean; /** * Transaction ID. */ transactionId: string; }; /** * An object representing ticket reservations. */ type Reservation = { /** * Ticket quantity. */ quantity: number; /** * Reserved ticket. */ ticket: wix_events.Tickets.Ticket; }; /** * An object containing information about a reservation created using the [`reserve()`](#reserve) function. */ type ReservationResponse = { /** * Reservation ID. */ id: string; /** * Ticket reservations. */ reservations: wix_events.Tickets.Reservation[]; /** * Ticket reservations invoice. */ invoice: wix_events.Tickets.Invoice; /** * Time the reservations expire. */ expirationTime: Date; }; /** * An object representing a tax. */ type Tax = { /** * Tax type. * One of: * * + `"INCLUDED"`: Tax is included in the ticket price. * + `"ADDED"`: Tax is added to the order at checkout. */ type: string; /** * Tax name. */ name: string; /** * Rate percentage. Possible values are between `"0.01"` and `"100"`, using up to 2 decimal places. */ rate: string; /** * Taxable amount. */ taxable: wix_events.Tickets.Money; /** * Total tax amount. */ amount: wix_events.Tickets.Money; }; /** * An object representing a ticket. */ type Ticket = { /** * Ticket ID. */ _id: number; /** * Ticket price. */ price: wix_events.Tickets.Money; /** * Whether the ticket is free. */ free: boolean; /** * Ticket name. */ name: string; /** * Ticket description. */ description: string; /** * Number of tickets that can be checked out together. * A value of `0` means there is no limit. */ limitPerCheckout: number; /** * Order index. */ orderIndex: number; /** * Ticket policy rules. */ policy: string; /** * ID of the event the ticket is for. */ eventId: string; }; /** * An object representing an event ticket. */ type TicketSelection = { /** * ID of the ticket. */ ticketId: string; /** * Ticket quantity. */ quantity: number; }; /** * An object containing information about an order update. */ type UpdateInfo = { /** * Field names and values for a registration form. */ formValues: wix_events.Form.FormValue[]; }; /** * An object containing information about an order updated using the [`updateOrder()`](#updateOrder) function. */ type UpdateOrderResponse = { /** * Updated ticket order. */ order: wix_events.Tickets.Order; }; /** * An object containing information about a coupon being verified using the [`verifyCoupon()`](#verifyCoupon) function. */ type VerifyCouponResponse = { /** * Invoice the coupon is used in. */ invoice?: wix_events.Tickets.Invoice; /** * Discount errors. */ discountErrors?: wix_events.Tickets.DiscountErrors; }; } } declare namespace wix_events_backend { /** * Backend events that are fired from Wix events. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.Events.html#) */ interface Events { /** * A backend event that fires when a Wix event is canceled. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.Events.html#onEventCanceled) */ onEventCanceled(event: wix_events_backend.Events.CanceledEvent): void; /** * A backend event that fires when a Wix event is created or copied. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.Events.html#onEventCreated) */ onEventCreated(event: wix_events_backend.Events.CreatedEvent): void; /** * A backend event that fires when a Wix event is deleted. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.Events.html#onEventDeleted) */ onEventDeleted(event: wix_events_backend.Events.DeletedEvent): void; /** * A backend event that fires when a Wix event ends. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.Events.html#onEventEnded) */ onEventEnded(event: wix_events_backend.Events.EndedEvent): void; /** * A backend event that fires when a Wix event's reminders are sent. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.Events.html#onEventReminder) */ onEventReminder(event: wix_events_backend.Events.EventReminder): void; /** * A backend event that fires when a Wix event starts. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.Events.html#onEventStarted) */ onEventStarted(event: wix_events_backend.Events.StartedEvent): void; /** * A backend event that fires when an existing Wix event is updated. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.Events.html#onEventUpdated) */ onEventUpdated(event: wix_events_backend.Events.UpdatedEvent): void; /** * A backend event that fires when a ticket order is confirmed. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.Events.html#onOrderConfirmed) */ onOrderConfirmed(event: wix_events_backend.Events.OrderConfirmedEvent): void; /** * A backend event that fires when a ticket order is deleted. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.Events.html#onOrderDeleted) */ onOrderDeleted(event: wix_events_backend.Events.OrderDeletedEvent): void; /** * A backend event that fires when a ticket order is initiated. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.Events.html#onOrderInitiated) */ onOrderInitiated(event: wix_events_backend.Events.OrderInitiatedEvent): void; /** * A backend event that fires when a ticket order is updated. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.Events.html#onOrderUpdated) */ onOrderUpdated(event: wix_events_backend.Events.OrderUpdatedEvent): void; /** * A backend event that fires when a ticket reservation is created. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.Events.html#onReservationCreated) */ onReservationCreated(event: wix_events_backend.Events.ReservationCreatedEvent): void; /** * A backend event that fires when a ticket reservation is updated. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.Events.html#onReservationUpdated) */ onReservationUpdated(event: wix_events_backend.Events.ReservationUpdatedEvent): void; /** * A backend event that fires when a guest registers to a Wix event. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.Events.html#onRsvpCreated) */ onRsvpCreated(event: wix_events_backend.Events.RsvpCreatedEvent): void; /** * A backend event that fires when an RSVP is deleted. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.Events.html#onRsvpDeleted) */ onRsvpDeleted(event: wix_events_backend.Events.RsvpDeletedEvent): void; /** * A backend event that fires when an RSVP is updated. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.Events.html#onRsvpUpdated) */ onRsvpUpdated(event: wix_events_backend.Events.RsvpUpdatedEvent): void; /** * A backend event that fires when a ticket definition is created. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.Events.html#onTicketDefinitionCreated) */ onTicketDefinitionCreated(event: wix_events_backend.Events.TicketDefinitionCreatedEvent): void; /** * A backend event that fires when a ticket definition is deleted. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.Events.html#onTicketDefinitionDeleted) */ onTicketDefinitionDeleted(event: wix_events_backend.Events.TicketDefinitionDeletedEvent): void; /** * A backend event that fires when a ticket definition is updated. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.Events.html#onTicketDefinitionUpdated) */ onTicketDefinitionUpdated(event: wix_events_backend.Events.TicketDefinitionUpdatedEvent): void; /** * A backend event that fires when a Wix event is canceled. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.Events.html#onWixEventCanceled) */ onWixEventCanceled(event: wix_events_backend.Events.CanceledWixEvent): void; } namespace Events { /** * An object representing a Wix event that was canceled. */ type CanceledEvent = { /** * Time the event was canceled. */ timestamp: Date; /** * Event ID. */ eventId: string; /** * Event title. */ title: string; }; /** * An object representing a Wix event that was canceled. */ type CanceledWixEvent = { /** * Time the event was canceled. */ timestamp: Date; /** * Event ID. */ eventId: string; /** * Event title. */ title: string; }; /** * An object representing guest check-in. */ type CheckIn = { /** * Time guest was checked-in. */ created: Date; }; /** * An object representing the Wix event that was created or copied. */ type CreatedEvent = { /** * Time the event was created/copied. */ timestamp: Date; /** * Event ID. */ eventId: string; /** * Event title. */ title: string; /** * Event location. */ location: wix_events_backend.Events.Location; /** * Event's schedule configuration. */ scheduleConfig: wix_events_backend.Events.ScheduleConfiguration; /** * ID of the user who created/copied the event. */ userId: string; }; /** * An object representing a Wix event that was deleted. */ type DeletedEvent = { /** * Time the event was deleted. */ timestamp: Date; /** * Event ID. */ eventId: string; /** * Event title. */ title: string; }; /** * An object representing an applied discount. */ type Discount = { /** * Discount amount. */ amount: wix_events_backend.Events.Money; /** * Amount after discount. */ afterDiscount: wix_events_backend.Events.Money; /** * Discount items. */ discounts: wix_events_backend.Events.DiscountItem[]; }; /** * An object representing a coupon discount. */ type DiscountCoupon = { /** * Coupon name. */ name: string; /** * Coupon code. */ code: string; /** * Coupon ID. */ couponId: string; }; /** * An object representing an applied discount of specific type. */ type DiscountItem = { /** * Discount amount. */ amount: wix_events_backend.Events.Money; /** * Discount coupon. */ coupon?: wix_events_backend.Events.DiscountCoupon; /** * Pricing plan discount. */ paidPlan?: wix_events_backend.Events.PricingPlanDiscount; }; /** * An object representing the event that has ended. */ type EndedEvent = { /** * Time the event ended. */ timestamp: Date; /** * The ID of the event. */ eventId: string; }; /** * An object representing the Wix event that reminders have been sent for. */ type EventReminder = { /** * Time the reminder was sent. */ timestamp: Date; /** * Event ID. */ eventId: string; /** * Event location. */ location: wix_events_backend.Events.Location; /** * Event's schedule configuration. */ scheduleConfig: wix_events_backend.Events.ScheduleConfiguration; /** * Event title. */ title: string; /** * ID of the user who created the event. */ userId: string; /** * The time between now and the event start. */ startsIn: wix_events_backend.Events.TimeDuration; }; /** * An object representing an applied fee. */ type Fee = { /** * Fee name. Value is `"WIX_FEE"`: Wix service fee applied to the item. */ name: string; /** * Fee calculation method. * One of: * * + `"FEE_ADDED"`: Fee is added to the ticket price at checkout. * + `"FEE_INCLUDED"`: Seller absorbs the fee. It is deducted from the ticket price. */ type: string; /** * Rate percentage. Possible values are between `"0.01"` and `"100"`, using up to 2 decimal places. */ rate: string; /** * Total amount of fee charges. */ amount: wix_events_backend.Events.Money; }; /** * An object representing a submitted guest form. */ type FormResponse = { /** * Values that were entered in the guest form. */ inputValues: wix_events_backend.Events.InputValue[]; }; /** * An object representing a guest of a Wix event's RSVP. */ type Guest = { /** * Index of the guest in the RSVP guest list. Indices are zero-based. */ index: number; /** * Guest ID, which is unique within the RSVP. */ id: number; /** * Full name of the guest. */ fullName: string; }; /** * An object representing a guest form input value. */ type InputValue = { /** * Name of the form input. */ inputName: string; /** * Value of the form input, when there is just one value. */ value: string; /** * Values of the form input, when there are multiple values. */ values: string[]; }; /** * An object representing an order invoice. */ type Invoice = { /** * Invoice items. */ items: wix_events_backend.Events.InvoiceItem[]; /** * Invoice applied discount. */ discount?: wix_events_backend.Events.Discount; /** * Invoice applied tax. */ tax?: wix_events_backend.Events.Tax; /** * Invoice applied fee charges. */ fees: wix_events_backend.Events.Fee[]; /** * Invoice total amount before discount, tax, and fees. */ subTotal: wix_events_backend.Events.Money; /** * Invoice total amount after discount, tax, and fees. * Grand total is calculated in the following manner: * * 1. Total price of all items in the cart. * 2. Discount is subtracted from the cart (if applicable). * 3. Tax is added (if applicable). * 4. Wix service fee is added. */ grandTotal: wix_events_backend.Events.Money; /** * Total revenue with taxes, excluding fees. Payment provider fees are not deducted. */ revenue: wix_events_backend.Events.Money; }; /** * An object representing an order invoice item. */ type InvoiceItem = { /** * Invoice item ID. */ id: string; /** * Invoice item quantity. */ quantity: number; /** * Invoice item name. */ name: string; /** * Invoice item price. */ price: wix_events_backend.Events.Money; /** * Invoice item total. */ total: wix_events_backend.Events.Money; /** * Invoice item applied discount. */ discount?: wix_events_backend.Events.Discount; /** * Invoice item applied tax. */ tax?: wix_events_backend.Events.Tax; /** * Invoice item applied fee charges. */ fees: wix_events_backend.Events.Fee[]; }; /** * An object representing the Wix event location. */ type Location = { /** * Location name. Maximum allowed characters is 50. */ name: string; /** * The location's map coordinates. */ coordinates: wix_events_backend.Events.MapCoordinates; /** * Single line address representation of the location. */ address: string; /** * Type of location. * One of: * * + `"VENUE"`: Event is hosted in the venue. * + `"ONLINE"`: Event is hosted online. */ type: string; }; /** * An object representing an event location's coordinates. */ type MapCoordinates = { /** * Latitude. */ lat: number; /** * Longitude. */ lng: number; }; /** * An object representing money. */ type Money = { /** * Decimal amount. */ amount: string; /** * Currency code. Must be a valid [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code (for example, `USD`). */ currency: string; }; /** * An object representing the confirmed order. */ type OrderConfirmedEvent = { /** * Time order was confirmed. */ timestamp: Date; /** * Event ID. */ eventId: string; /** * Unique order number. */ orderNumber: string; /** * Contact ID associated with this order. */ contactId?: string; /** * Member ID associated with this order. */ memberId?: string; /** * Time order was created. */ created: Date; /** * Buyer first name. */ firstName: string; /** * Buyer last name. */ lastName: string; /** * Buyer email. */ email: string; /** * Checkout form response. */ checkoutForm: wix_events_backend.Events.FormResponse; /** * Order status. * One of: * * + `"FREE"`: Order is confirmed, no payment required. * + `"PENDING"`: Order was paid, but the payment provider suspended the payment. Eventually changes to `"PAID"`. * + `"PAID"`: Order paid using the payment provider. * + `"OFFLINE_PENDING"`: Order confirmed, but has to be paid offline and status needs to be manually updated to `"PAID"`. * + `"INITIATED"`: Order is awaiting payment. */ status: string; /** * Payment method used. For example, "payPal" or "creditCard". */ method: string; /** * Order invoice. */ invoice: wix_events_backend.Events.Invoice; /** * Tickets generated after payment. */ tickets: wix_events_backend.Events.Ticket[]; }; /** * An object representing the deleted ticket order. */ type OrderDeletedEvent = { /** * Time order was deleted. */ timestamp: Date; /** * Event ID. */ eventId: string; /** * Unique order number. */ orderNumber: string; /** * Contact ID associated with this order. */ contactId?: string; /** * Member ID associated with this order. */ memberId?: string; /** * Whether the order was anonymized by a GDPR delete. */ anonymized: boolean; /** * Order type. * One of: * * + `"UNASSIGNED_TICKETS"`: Buyer form is used for all tickets. * + `"ASSIGNED_TICKETS"`: Each order ticket has its own form. */ orderType: string; }; /** * An object representing the initiated order. */ type OrderInitiatedEvent = { /** * Time order was initiated. */ timestamp: Date; /** * Event ID. */ eventId: string; /** * Unique order number. */ orderNumber: string; /** * Contact ID associated with this order. */ contactId?: string; /** * Member ID associated with this order. */ memberId?: string; /** * Buyer first name. */ firstName: string; /** * Buyer last name. */ lastName: string; /** * Buyer email. */ email: string; /** * Checkout form response. */ checkoutForm: wix_events_backend.Events.FormResponse; /** * Order status. * One of: * * + `"FREE"`: Order is confirmed, no payment required. * + `"PENDING"`: Order was paid, but the payment provider suspended the payment. Eventually changes to `"PAID"`. * + `"PAID"`: Order paid using the payment provider. * + `"OFFLINE_PENDING"`: Order confirmed, but has to be paid offline and status needs to be manually updated to `"PAID"`. * + `"INITIATED"`: Order is awaiting payment. */ status: string; /** * Order invoice. */ invoice: wix_events_backend.Events.Invoice; }; /** * An object representing the updated order. */ type OrderUpdatedEvent = { /** * Time order was updated. */ timestamp: Date; /** * Event ID. */ eventId: string; /** * Unique order number. */ orderNumber: string; /** * Contact ID associated with this order. */ contactId?: string; /** * Member ID associated with this order. */ memberId?: string; /** * Time order was created. */ created: Date; /** * Buyer first name. */ firstName: string; /** * Buyer last name. */ lastName: string; /** * Buyer email. */ email: string; /** * Checkout form response. */ checkoutForm: wix_events_backend.Events.FormResponse; /** * Whether the order is confirmed An order gets confirmed * when the payment gateway processes the payment and the funds reach the merchant's account. */ confirmed: boolean; /** * Order status. * One of: * * + `"FREE"`: Order is confirmed, no payment required. * + `"PENDING"`: Order was paid, but the payment provider suspended the payment. Eventually changes to `"PAID"`. * + `"PAID"`: Order paid using the payment provider. * + `"OFFLINE_PENDING"`: Order confirmed, but has to be paid offline and status needs to be manually updated to `"PAID"`. * + `"INITIATED"`: Order is awaiting payment. */ status: string; /** * Payment method used. For example, "payPal" or "creditCard". */ method: string; /** * Whether the order is archived. */ archived: boolean; /** * Tickets generated after payment. */ tickets: wix_events_backend.Events.Ticket[]; }; /** * An object representing a paid plan discount. */ type PaidPlanDiscount = { /** * Paid plan name. */ name: string; /** * Percentage applied discount. */ percentDiscount?: wix_events_backend.Events.PercentDiscount; }; /** * An object representing a fixed rate discount. */ type PercentDiscount = { /** * Discount rate percentage. Possible values are between `"0.01"` and `"100"`, using up to 2 decimal places. */ rate: string; /** * Number of discounted items. */ quantityDiscounted: number; }; /** * An object representing a pricing plan discount. */ type PricingPlanDiscount = { /** * Pricing plan name. */ name: string; /** * Percentage applied discount. */ percentDiscount?: wix_events_backend.Events.PercentDiscount; }; /** * An object representing the created ticket reservation. */ type ReservationCreatedEvent = { /** * Time tickets were reserved. */ timestamp: Date; /** * Event ID. */ eventId: string; /** * Reservation ID. Can be used to retrieve an invoice. */ reservationId: string; /** * Time reservation expires. */ expires: Date; /** * Reservation status. * One of: * * + `"RESERVATION_PENDING"`: Reservation is pending confirmation. It will expire after expiration due time. * + `"RESERVATION_CONFIRMED"`: Reservation was confirmed and will not expire. * + `"RESERVATION_CANCELED"`: Reservation was canceled because of non payment. * + `"RESERVATION_CANCELED_MANUALLY"`: Reservation was canceled manually by the buyer. */ status: string; }; /** * An object representing the updated reservation. */ type ReservationUpdatedEvent = { /** * Time tickets were reserved. */ timestamp: Date; /** * Event ID. */ eventId: string; /** * Reservation ID. Can be used to retrieve an invoice. */ reservationId: string; /** * Reservation status. * One of: * * + `"RESERVATION_PENDING"`: Reservation is pending confirmation. It will expire after expiration due time. * + `"RESERVATION_CONFIRMED"`: Reservation was confirmed and will not expire. * + `"RESERVATION_CANCELED"`: Reservation was canceled because of non payment. * + `"RESERVATION_CANCELED_MANUALLY"`: Reservation was canceled manually by the buyer. */ status: string; }; /** * An object representing the created RSVP. */ type RsvpCreatedEvent = { /** * Time the RSVP was created. */ timestamp: Date; /** * Event ID. */ eventId: string; /** * RSVP ID. */ rsvpId: string; /** * Contact ID associated with the RSVP. */ contactId: string; /** * Member ID associated with the RSVP. */ memberId?: string; /** * RSVP response status. * One of: * * + `"YES"`: Guest is attending. * + `"NO"`: Guest is not attending. * + `"WAITING"`: Guest added to the wait list. */ status: string; /** * Guest first name. */ firstName: string; /** * Guest last name. */ lastName: string; /** * Guest email address. */ email: string; /** * RSVP form response. */ rsvpForm: wix_events_backend.Events.FormResponse; /** * List of guests. */ guests: wix_events_backend.Events.Guest[]; }; /** * An object representing the deleted RSVP. */ type RsvpDeletedEvent = { /** * Time RSVP was deleted. */ timestamp: Date; /** * Event ID. */ eventId: string; /** * RSVP ID. */ rsvpId: string; /** * Contact ID associated with this RSVP. */ contactId: string; /** * Member ID associated with this RSVP. */ memberId?: string; /** * Whether the RSVP was anonymized as a result of a GDPR delete. */ anonymized: boolean; }; /** * An object representing the updated RSVP. */ type RsvpUpdatedEvent = { /** * Time the RSVP was updated. */ timestamp: Date; /** * Time the RSVP was created. */ created: Date; /** * Event ID. */ eventId: string; /** * RSVP ID. */ rsvpId: string; /** * Contact ID associated with this RSVP. */ contactId: string; /** * Member ID associated with this RSVP. */ memberId?: string; /** * RSVP response status. * One of: * * + `"YES"`: Guest is attending. * + `"NO"`: Guest is not attending. * + `"WAITING"`: Guest added to the wait list. */ status: string; /** * Guest first name. */ firstName: string; /** * Guest last name. */ lastName: string; /** * Guest email. */ email: string; /** * RSVP form response. */ rsvpForm: wix_events_backend.Events.FormResponse; /** * List of guests. */ guests: wix_events_backend.Events.Guest[]; }; /** * An object representing an event's schedule configuration. */ type ScheduleConfiguration = { /** * Whether the event's schedule is to be determined later. * * If an event's time is not yet decided, the TBD message is displayed instead of the * start date and end date. * * When `scheduleTbd` is `true`, `startDate`, `endDate`, and `timeZoneId` are not required. */ scheduleTbd: boolean; /** * Schedule TBD message. */ scheduleTbdMessage?: string; /** * Event start date. */ startDate?: Date; /** * Event end date. */ endDate?: Date; /** * ID of the time zone for the Wix event in [tz database format](https://en.wikipedia.org/wiki/Tz_database), such as `EST`, or `America/Los_Angeles`. Optional for TBD events. */ timeZoneId?: string; }; /** * An object representing the event that has started. */ type StartedEvent = { /** * Time the event started. */ timestamp: Date; /** * Event ID. */ eventId: string; }; /** * An object representing an applied tax. */ type Tax = { /** * Tax type. * One of: * * + `"INCLUDED"`: Tax is included in the ticket price. * + `"ADDED"`: Tax is added to the order at checkout. */ type: string; /** * Tax name. */ name: string; /** * Rate percentage. Possible values are between `"0.01"` and `"100"`, using up to 2 decimal places. */ rate: string; /** * Taxable amount. */ taxable: wix_events_backend.Events.Money; /** * Total tax amount. */ amount: wix_events_backend.Events.Money; }; /** * An object representing a generated ticket. */ type Ticket = { /** * Unique ticket number. */ ticketNumber: string; /** * Ticket definition ID. */ ticketDefinitionId: string; /** * Ticket check-in. */ checkIn: wix_events_backend.Events.CheckIn; /** * Whether the ticket is archived. */ archived: boolean; /** * Whether the ticket is confirmed. */ confirmed: boolean; /** * Guest first name. */ firstName?: string; /** * Guest last name. */ lastName?: string; /** * Guest email address. */ email?: string; /** * Contact ID associated with this ticket. */ contactId?: string; /** * Member ID associated with this ticket. */ memberId?: string; /** * Ticket form response. Only assigned tickets contain a separate form. */ form?: wix_events_backend.Events.FormResponse; }; /** * An object representing the created ticket definition. */ type TicketDefinitionCreatedEvent = { /** * Time ticket definition was created. */ timestamp: Date; /** * Event ID. */ eventId: string; /** * Ticket definition ID. */ ticketDefinitionId: string; }; /** * An object representing the deleted ticket definition. */ type TicketDefinitionDeletedEvent = { /** * Time ticket definition was deleted. */ timestamp: Date; /** * Event ID. */ eventId: string; /** * Ticket definition ID. */ ticketDefinitionId: string; }; /** * An object representing the updated ticket definition. */ type TicketDefinitionUpdatedEvent = { /** * Time ticket definition was updated. */ timestamp: Date; /** * Event ID. */ eventId: string; /** * Ticket definition ID. */ ticketDefinitionId: string; }; /** * An object representing a time duration. */ type TimeDuration = { /** * Number of days in the time duration. */ days: number; /** * Number of hours in the time duration. */ hours: number; /** * Number of minutes in the time duration. */ minutes: number; }; /** * An object representing the Wix event that was updated. */ type UpdatedEvent = { /** * Time the event was updated. */ timestamp: Date; /** * Event ID. */ eventId: string; /** * Event title. */ title: string; /** * Event location. */ location: wix_events_backend.Events.Location; /** * Event's schedule configuration. */ scheduleConfig: wix_events_backend.Events.ScheduleConfiguration; /** * Whether the schedule configuration was updated. */ scheduleConfigUpdated: boolean; }; } /** * The Wix Events API provides functionality for creating, updating, and managing Wix events. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.WixEvents.html#) */ interface WixEvents { /** * Cancels a Wix event and closes its registration. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.WixEvents.html#cancelEvent) */ cancelEvent(eventId: string): Promise; /** * Copies a Wix event. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.WixEvents.html#copyEvent) */ copyEvent(eventId: string): Promise; /** * Creates a Wix event. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.WixEvents.html#createEvent) */ createEvent(eventInfo: wix_events_backend.WixEvents.WixEventInfo, options: wix_events_backend.WixEvents.WixEventInfoOptions): Promise; /** * Deletes a Wix event. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.WixEvents.html#deleteEvent) */ deleteEvent(eventId: string): Promise; /** * Retrieves a Wix event by ID. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.WixEvents.html#getEvent) */ getEvent(eventId: string): Promise; /** * Creates a query to retrieve a list of Wix events. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.WixEvents.html#queryEvents) */ queryEvents(): wix_events_backend.WixEvents.EventsQueryBuilder; /** * Updates a Wix event. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.WixEvents.html#updateEvent) */ updateEvent(eventId: string, eventInfo: wix_events_backend.WixEvents.WixEventUpdateInfo, options: wix_events_backend.WixEvents.WixEventInfoOptions): Promise; } namespace WixEvents { /** * An object representing additional labels for form fields. */ type AdditionalLabel = { /** * Field name. */ name: string; /** * Field label. */ label: string; }; /** * An object representing a street address for the Wix event. */ type Address = { /** * Main address line (usually street and number) as free text. For non-TBD events, either `addressLine1` or `streetAddress` must be entered. Optional for TBD events. */ addressLine1?: string; /** * Street address object, with number and name in separate fields. For non-TBD events, either `addressLine1` or `streetAddress` must be entered. Optional for TBD events. */ streetAddress?: wix_events_backend.WixEvents.StreetAddress; /** * Human-readable address string. If not provided, the value is generated from the available address data. If provided, the value is parsed and used to populate other address properties. */ formatted: string; /** * Free text providing more detailed address information, such as apartment, suite, or floor. */ addressLine2: string; /** * Coordinates of the physical address. */ location: wix_events_backend.WixEvents.AddressLocation; /** * City name. */ city: string; /** * Code for a subdivision (such as state, prefecture, or province) in an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format. */ subdivision: string; /** * 2-letter country code in an [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. */ country: string; /** * Postal or zip code. */ postalCode: string; }; /** * An object for updating a street address. */ type AddressInfo = { /** * Main address line (usually street and number) as free text. For non-TBD events, either `addressLine1` or `streetAddress` must be entered. Optional for TBD events. */ addressLine1?: string; /** * Street address object, with number and name in separate fields. For non-TBD events, either `addressLine1` or `streetAddress` must be entered. Optional for TBD events. */ streetAddress?: wix_events_backend.WixEvents.StreetAddressInfo; /** * Human-readable address string. If not provided, the value is generated from the available address data. If provided, the value is parsed and used to populate other address properties. */ formatted?: string; /** * Free text providing more detailed address information, such as apartment, suite, or floor. */ addressLine2?: string; /** * Coordinates of the physical address. */ location?: wix_events_backend.WixEvents.AddressLocationInfo; /** * City name. */ city?: string; /** * Code for a subdivision (such as state, prefecture, or province) in an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format. */ subdivision?: string; /** * 2-letter country code in an [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. */ country?: string; /** * Postal or zip code. */ postalCode?: string; }; /** * An object representing coordinates of the physical address of the Wix event. */ type AddressLocation = { /** * Address's latitude. */ latitude: number; /** * Address's longitude. */ longitude: number; }; /** * An object for updating coordinates of the physical address of the Wix event. */ type AddressLocationInfo = { /** * Address's latitude. */ latitude?: number; /** * Address's longitude. */ longitude?: number; }; /** * An object representing the links (URLs) that guests can click to add the Wix event to their calendars. */ type CalendarLinks = { /** * A URL that guests can use to add the Wix event to their Google calendars. */ google: string; /** * A URL that guests can use to download ICS calendar files in order to add the Wix event to their calendars. */ ics: string; }; /** * An object representing messages on the form for purchasing tickets. */ type CheckoutFormMessages = { /** * Title for the form for purchasing tickets. */ title: string; /** * Button label text that directs guests to check out the form when purchasing tickets. */ checkoutLabel: string; }; /** * An object representing the ID of a Wix event that was deleted. */ type DeletedWixEvent = { /** * Deleted event ID. */ _id: string; }; /** * An object representing the corresponding registration form for the Wix event. */ type Form = { /** * A block of fields to group together on the form. For example, you might create a block for first name and last name. These blocks are also called input groups. */ InputGroups: wix_events_backend.WixEvents.InputGroup[]; /** * Messages you can customize for the form. */ messages: wix_events_backend.WixEvents.FormMessages; }; /** * An object representing a set of configured form messages. */ type FormMessages = { /** * RSVP form messages. */ rsvp: wix_events_backend.WixEvents.RsvpFormMessages; /** * Checkout form messages. */ checkout: wix_events_backend.WixEvents.CheckoutFormMessages; /** * Messages to display when event registration is closed. */ registrationClosed: wix_events_backend.WixEvents.RegistrationClosedMessages; }; /** * An object representing the guest list settings for the Wix event. */ type GuestListSettings = { /** * Whether guests can see other guests attending the Wix event. Defaults to `true`. */ public: boolean; }; /** * An object for updating guest list settings for the Wix event. */ type GuestListSettingsInfo = { /** * Whether guests can see other guests attending the Wix event. Defaults to `true`. */ public?: boolean; }; /** * An object representing a field on a form. The field may or may not be included in an `InputGroup` block. Text-type fields can contain one or more values. */ type InputField = { /** * Field name. */ name: string; /** * Main field label. */ label: string; /** * Additional labels for multi-valued fields, such as `ADDRESS` fields. */ additionalLabels: wix_events_backend.WixEvents.AdditionalLabel[]; /** * Pre-defined text choices for fields, such as the options listed in a dropdown. */ options: string[]; /** * Whether the field is mandatory. */ required: boolean; /** * Maximum number of characters allowed for the `TEXT` fields. */ maxLength: number; /** * Type of the field. The type determines the format of the field. * This property is used to validate the values entered on the form when submitting. Defaults to `"TEXT"`. * One of: * + `"TEXT"` * + `"NUMBER"` * + `"TEXT_ARRAY"` * + `"DATE_TIME"` * + `"ADDRESS"` */ type: string; /** * The maximum number of values allowed for `TEXT_ARRAY` fields. */ maxSize: number; }; /** * An object representing a block of fields that tend to be grouped together on a form. The block of fields is also called an input group. */ type InputGroup = { /** * The type of the block of fields. Every field in the block must be of the same type. * One of: * + `"INPUT"` * + `"TEXTAREA"` * + `"DROPDOWN"` * + `"RADIO"` * + `"CHECKBOX"` * + `"NAME"` * + `"GUEST_CONTROL"`. This control corresponds to the `Additional Guests` option when customizing the registration form in the Dashboard. The fields for this block include specifying how many guests, adding text for a comment, and whether the guest name is required. * + `"ADDRESS_SHORT"`. This control corresponds to the `Single Line` address option when customizing the registration form in the Dashboard, and the `Address.Location.Address.formatted` property in this API. * + `"ADDRESS_FULL"`. This control corresponds to the `Full Address` address option when customizing the registration form in the Dashboard, and the set of individual address properties (excluding `Address.Location.Address.formatted`) in this API. * + `"DATE"` */ type: string; /** * Whether the fields in the input group are mandatory (such as name and email). When `true`, you can change only the label for the fields in the block. */ system: boolean; /** * Fields in the block. Also called child input fields. */ inputs: wix_events_backend.WixEvents.InputField[]; /** * Fields in the input group are sorted by this value in ascending order. */ orderIndex: number; /** * Unique ID for the input group. */ _id: string; }; /** * An object representing a Wix event location. */ type Location = { /** * Location name. `name` is required for TBD events (events whose time is yet "to be determined"). */ name: string; /** * Street address for the Wix event. * * The `address` property contains the full [address](https://www.wix.com/velo/reference/$w/addressinput/value) of the Wix event. The address is derived from the [`formatted`](#formatted) property. * * The `address` is required for non-TBD events. (TBD events are events whose time is yet "to be determined.") */ address: wix_events_backend.WixEvents.Address; /** * Location type. Defaults to `"VENUE"`. * One of: * + `"VENUE"`. The event is being held at a physical location. * + `"ONLINE"`. The event is being held at a virtual online location, such as with online conferencing. */ type: string; }; /** * An object for updating a Wix event's location. */ type LocationInfo = { /** * Location name. `name` is required for TBD events (events whose time is yet "to be determined"). */ name?: string; /** * Full [address](https://www.wix.com/velo/reference/$w/addressinput/value). * The `address` is required for non-TBD events. (TBD events are events whose time is yet "to be determined.") * You can specify the `address` for non-TBD events in the following ways: * + By entering the `address.formatted` property, which the API then uses to populate the other address properties. * + By entering the individual `address` properties including the `address.addressLine1` property and, if needed, the `address.addressLine2`property. (Do not specify `address.streetAddress`.) The API uses this data to populate the `address.formatted` property. * + By entering the individual `address` properties including `address.streetAddress`. (Do not specify `address.addressLine1`.) The API uses this data to populate the `address.formatted` property. */ address?: wix_events_backend.WixEvents.AddressInfo; /** * Location type. Defaults to `"VENUE"`. * One of: * + `"VENUE"`. The event is being held at a physical location. * + `"ONLINE"`. The event is being held at a virtual online location, such as with online conferencing. */ type?: string; }; /** * An object representing money and its default monetary format. */ type Money = { /** * Monetary amount represented as a decimal string with a period as the decimal separator (for example, 3.99). */ value: string; /** * Currency code. Must be a valid [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code (for example, `USD`). */ currency: string; }; /** * An object representing online conferencing details for the Wix event. */ type OnlineConferencing = { /** * Whether online conferencing is enabled. Not supported for Wix events that are TBDs (events whose time is not yet determined). * When enabled, links to join the conference are generated and provided to guests in an email when the guest registers. */ enabled: boolean; /** * ID of the online conferencing provider. */ providerId: string; /** * Online conference type. Defaults to `"MEETING"`. * One of: * + `"MEETING"` * + `"WEBINAR"` */ conferenceType: string; /** * Session details for the Wix event. */ session: wix_events_backend.WixEvents.Session; }; /** * An object for updating online conferencing settings for a Wix event. */ type OnlineConferencingInfo = { /** * Whether online conferencing is enabled. Not supported for Wix events that are TBDs (events whose time is not yet determined). * When enabled, links to join the conference are generated and provided to guests in an email when the guest registers. */ enabled?: boolean; /** * ID of the online conferencing provider. */ providerId?: string; /** * Online conference type. Defaults to `"MEETING"`. * One of: * + `"MEETING"` * + `"WEBINAR"` */ conferenceType?: string; }; /** * Options to use when performing a query or query count. */ type QueryOptions = { /** * When `true`, prevents permission checks from running for the operation. Defaults to `false`. */ suppressAuth?: boolean; }; /** * An object representing registration details for the Wix event. */ type Registration = { /** * Registration URL if registration for the Wix event managed externally. Guests go to this URL to register. */ externalRegistrationUrl: string; /** * Who can register for the Wix event. Defaults to `"MEMBER"`. * One of: * + `"MEMBER"`. Only logged-in guests can register. * + `"VISITOR_OR_MEMBER"`. Everyone can register, whether they are logged-in to the site or not. */ restrictedTo: string; /** * Initial event type, set when creating the Wix event. * One of: * + `"RSVP"`. The event is created as an RSVP-type event. * + `"TICKETS"`. The event is created as a ticketed-type event. */ initialType: string; /** * Read-only type of the Wix event. After initial event creation, the type can change, for example, if event registration is not necessary (`NO_REGISTRATION`) or if event registration is set to be managed externally (`EXTERNAL`). * + `"RSVP"`. The event was initially created as an RSVP-type event. * + `"TICKETS"`. The event was initially created as a ticketed-type event. * + `"EXTERNAL"`. Registration is managed externally, on a different site. Setting the `externalRegistrationUrl` property updates the `type` to this status. * + `"NO_REGISTRATION"`. There is no need to register for this site. Setting the `registrationDisabled` property updates the `type` to this status. */ type: string; /** * Wix event registration status. * One of: * + `"CLOSED"`. The event was closed (for example, if the maximum number of attendees was reached) or cancelled. Guests cannot register. * + `"CLOSED_MANUALLY"`. Event registration was closed manually by the event manager. Guests cannot register. * + `"OPEN_RSVP"`. Guests can register for the RSVP-type Wix event. * + `"OPEN_RSVP_WAITLIST"`. Guests can register for the RSVP-type Wix event, but are waitlisted. * + `"OPEN_TICKETS"`. Guests can register for the ticketed-type Wix event. * + `"OPEN_EXTERNAL"`. Guests can register externally for the Wix event--not using Wix Events. */ status: string; /** * Registration details for an RSVP event. */ rsvp: wix_events_backend.WixEvents.Rsvp; /** * Registration details for a ticketed event. */ tickets: wix_events_backend.WixEvents.Tickets; }; /** * An object representing messages to display when Wix event registration is closed. */ type RegistrationClosedMessages = { /** * Message displayed when event registration is closed. */ message: string; /** * Button label text that directs guests to take other actions, such as a clicking a link to see other Wix events that they can register for. */ exploreEventsLabel: string; }; /** * An object representing RSVP registration settings for a Wix event. */ type Rsvp = { /** * Whether the Wix event accepts `NO` RSVPs in addition to `YES` RSVPs. Defaults to `"YES_ONLY"`. * One of: * + `"YES_ONLY"` * + `"YES_AND_NO"` */ rsvpStatusOptions: string; /** * Maximum number of guests allowed to register to the Wix event. If a guest adds additional guests to the same RSVP, the additional guests are also included when calculating the `limit`. */ limit: number; /** * Whether to open a waitlist when the guest `limit` for the Wix event is reached. Waitlisted guests are assigned a `WAITING` status. */ waitlist: boolean; }; /** * An object representing RSVP form messages. */ type RsvpFormMessages = { /** * Button label text displayed next to where the guest RSVPs `YES`. */ rsvpYes: string; /** * Button label text displayed next to where the guest RSVPs `NO`. */ rsvpNo: string; /** * Messages to display when the RSVP is `YES`. */ yesMessages: wix_events_backend.WixEvents.RsvpFormPositive; /** * Messages to display when the RSVP is `YES`, even if the guest is placed on the waitlist. Wait-listed guests receive the same messages as guests who are not on the waitlist. */ waitingMessages: wix_events_backend.WixEvents.RsvpFormPositive; /** * Messages to display when the RSVP is `NO`. */ noMessages: wix_events_backend.WixEvents.RsvpFormNegative; /** * Button label text that directs guests to submit the RSVP form. */ submitRsvpLabel: string; }; /** * An object representing a messages to display when the RSVP is `NO`. */ type RsvpFormNegative = { /** * Form title for negative RSVPs. */ title: string; /** * Confirmation message title. */ confirmationTitle: string; /** * Button label text that suggests guests share the Wix event link with others who might want to attend. */ shareLabel: string; }; /** * An object representing a messages to display when the RSVP is `YES`. */ type RsvpFormPositive = { /** * Form title for positive RSVPs. */ title: string; /** * Confirmation message title. */ confirmationTitle: string; /** * Confirmation message text. */ confirmationMessage: string; /** * Button label text that suggests guests add the Wix event to their calendar using the link. */ addToCalendarLabel: string; /** * Button label text that suggests guests share the Wix event link with others who might want to attend. */ shareLabel: string; }; /** * An object for updating RSVP registration settings for a Wix event. */ type RsvpInfo = { /** * Whether the Wix event accepts `NO` rsvps in addition to `YES` rsvps. Defaults to `"YES_ONLY"`. * One of: * + `"YES_ONLY"` * + `"YES_AND_NO"` */ rsvpStatusOptions?: string; /** * Maximum number of guests allowed to register to the Wix event. If a guest adds additional guests to the same RSVP, the additional guests are also included when calculating the `limit`. */ limit?: number; /** * Whether to open a waitlist when the guest `limit` for the Wix event is reached. Waitlisted guests are assigned a `WAITING` status. */ waitlist?: boolean; }; /** * An object representing RSVP summary data for the Wix event. */ type RsvpSummary = { /** * Total number of RSVPs received. */ totalRsvps: number; /** * Number of accepted RSVPs. */ yesCount: number; /** * Number of rejected RSVPs. */ noCount: number; /** * Number of RSVPs in the waitlist. */ waitlistCount: number; }; /** * An object representing scheduling settings for a Wix event. */ type Scheduling = { /** * Whether the event's time is to be determined later. If `true`, the Wix event's schedule is defined as TBD ("to be determined"). * Because the Wix event's start and end dates are not yet defined, a message, set in `tbdMessage`, is displayed instead. * `startDate`, `endDate`, and `timeZoneId` are optional for TBD events. */ tbd: boolean; /** * A message to display for events whose `tbd` property is `true`. */ tbdMessage: string; /** * Start date and time for the Wix event. Optional for TBD events. */ startDate: Date; /** * End date and time for the Wix event. Optional for TBD events. */ endDate: Date; /** * ID of the time zone for the Wix event in [tz database](https://en.wikipedia.org/wiki/Tz_database) format, such as `EST`, or `America/Los_Angeles`. Optional for TBD events. */ timeZoneId: string; /** * Whether the time zone is displayed in the formatted schedule. */ showTimeZone: boolean; /** * Formatted schedule representation. */ formatted: string; /** * Formatted start date of the event (empty for TBD events). */ startDateFormatted: string; /** * Formatted start time of the event (empty for TBD events). */ startTimeFormatted: string; /** * Whether the end date is hidden in the formatted schedule. */ hideEndDate: boolean; }; /** * An object for updating scheduling settings for a Wix event. */ type SchedulingInfo = { /** * Whether the event's time is to be determined later. If `true`, the Wix event's schedule is defined as TBD ("to be determined"). * Because the Wix event's start and end dates are not yet defined, a message, set in `tbdMessage`, is displayed instead. * `startDate`, `endDate`, and `timeZoneId` are optional for TBD events. */ tbd?: boolean; /** * A message to display for events whose `tbd` property is `true`. */ tbdMessage?: string; /** * Start date and time for the Wix event. Optional for TBD ("to be determined") events. */ startDate?: Date; /** * End date and time for the Wix event. Optional for TBD ("to be determined") events. */ endDate?: Date; /** * ID of the time zone for the Wix event in [tz database format](https://en.wikipedia.org/wiki/Tz_database), such as `EST`, or `America/Los_Angeles`. Optional for TBD events. */ timeZoneId?: string; /** * Whether the time zone is displayed in the formatted schedule. */ showTimeZone?: boolean; /** * Whether the end date is hidden in the formatted schedule. */ hideEndDate?: boolean; }; /** * An object representing a Wix event session, including links and passwords. */ type Session = { /** * Link for the event host to use to start the online conference session. */ hostLink: string; /** * Link for the guests to use to join the online conference session. */ guestLink: string; /** * The password required to join the online conference session (when relevant). Requiring a password is dependent on the online conferencing provider. For example, Zoom provides passwords for its meetings while LiveVideo does not. */ password: string; }; /** * An object representing the site URL for the Wix event, including its base URL and path. */ type SiteUrl = { /** * Base URL. * + Premium sites: The domain,for example, `https://domain.com`. * + Free sites: The site URL, for example, `https://user_name.wixsite.com/mysite`. * > **Note**: The above URL examples are for a published site. When previewing your site, you receive the Editor URL. */ baseUrl: string; /** * The path to Wix event page, for example, `/my-events/weekly-meetup-2` for both Premium and free sites. */ path: string; }; /** * An object representing the Wix event's street address, with number and name in separate fields. */ type StreetAddress = { /** * Street number. */ number: string; /** * Street name. */ name: string; }; /** * An object for updating the Wix event's street address, with number and name in separate fields. */ type StreetAddressInfo = { /** * Street number. */ number?: string; /** * Street name. */ name?: string; }; /** * An object representing summary data and statistics for Wix event sales, excluding data pertaining to archived orders. */ type Summaries = { /** * Summary data for RSVP sales. */ rsvp: wix_events_backend.WixEvents.RsvpSummary; /** * Summary data for revenue and tickets sold. */ tickets: wix_events_backend.WixEvents.TicketsSummary; }; /** * An object for updating tax settings for the Wix event. */ type TaxSettingInfo = { /** * When the tax is applied. Defaults to `"INCLUDED"`. * One of: * + `"INCLUDED"`. Tax is built-in to the price. * + `"ADDED_AT_CHECKOUT"`. Tax is added when the guest checks out. */ type?: string; /** * Tax name. */ name?: string; /** * Tax rate, such as `21.55`. */ rate?: string; }; /** * An object representing tax settings for the Wix event. */ type TaxSettings = { /** * When the tax is applied. Defaults to `"INCLUDED"`. * One of: * + `"INCLUDED"`. Tax is built-in to the price. * + `"ADDED_AT_CHECKOUT"`. Tax is added when the guest checks out. */ type: string; /** * Tax name. */ name: string; /** * Tax rate, such as `21.55`. */ rate: string; }; /** * An object representing ticketing settings for the Wix event. */ type Ticketing = { /** * Currency used for event ordering and transactions. */ currency: string; /** * When ordering, whether each ticket in the order needs its own order form or if one form covers multiple tickets. */ formAssignedPerTicket: boolean; /** * Tax settings. */ tax: wix_events_backend.WixEvents.TaxSettings; /** * Price of the lowest-priced ticket. */ lowestTicketPrice: wix_events_backend.WixEvents.Money; /** * Price of the lowest-priced ticket. */ highestTicketPrice: wix_events_backend.WixEvents.Money; /** * Formatted price of the lowest-priced ticket. */ lowestTicketPriceFormatted: string; /** * Formatted price of the highest-priced ticket. */ highestTicketPriceFormatted: string; }; /** * An object for updating ticketing settings for the Wix event. */ type TicketingInfo = { /** * When ordering, whether each ticket in the order needs its own order form or if one form covers multiple tickets. */ formAssignedPerTicket?: boolean; /** * Tax settings. */ tax?: wix_events_backend.WixEvents.TaxSettingInfo; }; /** * An object representing a summary of the Wix event's revenue and tickets sold. */ type TicketingSummary = { /** * Total number of tickets sold. */ totalTickets: number; /** * Total revenue, including taxes and excluding fees. Payment provider fees are not deducted. */ revenue: wix_events_backend.WixEvents.Money; /** * Whether currency cannot be changed. The currency is locked after the first order for the event has been created and is set to the currency of that first order. */ currencyLocked: boolean; /** * Total number of orders placed for the Wix event. */ totalOrders: number; /** * Total sales balance for confirmed transactions. */ totalSales: wix_events_backend.WixEvents.Money; }; /** * An object representing tickets settings for the Wix event. */ type Tickets = { /** * Currency used for event ordering and transactions. */ currency: string; /** * When ordering, whether each ticket in the order needs its own order form or if one form covers multiple tickets. */ formAssignedPerTicket: boolean; /** * Tax settings. */ tax: wix_events_backend.WixEvents.TaxSettings; /** * Price of the lowest-priced ticket. */ lowestTicketPrice: wix_events_backend.WixEvents.Money; /** * Price of the lowest-priced ticket. */ highestTicketPrice: wix_events_backend.WixEvents.Money; /** * Formatted price of the lowest-priced ticket. */ lowestTicketPriceFormatted: string; /** * Formatted price of the highest-priced ticket. */ highestTicketPriceFormatted: string; }; /** * An object for updating tickets settings for the Wix event. */ type TicketsInfo = { /** * When ordering, whether each ticket in the order needs its own order form or if one form covers multiple tickets. */ formAssignedPerTicket?: boolean; /** * Tax settings. */ tax?: wix_events_backend.WixEvents.TaxSettingInfo; }; /** * An object representing a summary of the Wix event's revenue and tickets sold. */ type TicketsSummary = { /** * Total number of tickets sold. */ totalTickets: number; /** * Total revenue, including taxes and excluding fees. Payment provider fees are not deducted. */ revenue: wix_events_backend.WixEvents.Money; /** * Whether currency cannot be changed. The currency is locked after the first order for the event has been created and is set to the currency of that first order. */ currencyLocked: boolean; /** * Total number of orders placed for the Wix event. */ totalOrders: number; /** * Total sales balance for confirmed transactions. */ totalSales: wix_events_backend.WixEvents.Money; }; /** * An object representing a Wix event. */ type WixEvent = { /** * Wix event ID. */ _id: string; /** * Wix event location details. */ location: wix_events_backend.WixEvents.Location; /** * Wix event scheduling details. */ scheduling: wix_events_backend.WixEvents.Scheduling; /** * Wix event title. */ title: string; /** * Wix event description. */ description: string; /** * Rich-text (HTML) content for the "About Event" section. */ about: string; /** * The location of an image that represents the Wix event. This image is printed on the ticket (PDF format). The image file must be an image file from the Media Manager. * * The URL format is: * `wix:image://v1//#originWidth=&originHeight=[&watermark=]` */ mainImage: string; /** * URL-friendly version of the Wix event title. Unique across all Wix events in the same site. */ slug: string; /** * [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code of the Wix event. Use to translate content on forms, and so on. */ language: string; /** * Date the Wix event was created. */ _createdDate: Date; /** * Date the Wix event was updated. */ _updatedDate: Date; /** * Wix event status. Defaults to `"SCHEDULED"`. * One of: * + `"SCHEDULED"`. The upcoming Wix event is scheduled but has not yet started. * + `"STARTED"`. The Wix event has started and is in progress. * + `"ENDED"`. The Wix event has ended. * + `"CANCELED"`. The Wix event has been canceled. */ status: string; /** * Registration details for the Wix event. */ registration: wix_events_backend.WixEvents.Registration; /** * "Add to calendar" URLs. */ calendarLinks: wix_events_backend.WixEvents.CalendarLinks; /** * Event page URL components. */ eventUrl: wix_events_backend.WixEvents.SiteUrl; /** * Registration form for the site guest to fill out with their contact details, and other information, as relevant. */ form: wix_events_backend.WixEvents.Form; /** * Summaries of Wix event sales. */ summary: wix_events_backend.WixEvents.Summaries; /** * Guest list settings for the Wix event. */ guestList: wix_events_backend.WixEvents.GuestListSettings; /** * ID of the creator of the Wix event. If the creator is not logged in when creating the event, the `createdBy` property is empty. */ createdBy: string; /** * Online conferencing details for the Wix event. */ videoConferencing: wix_events_backend.WixEvents.OnlineConferencing; /** * The "Filter by:" drop-down option for filtering contacts by this event * in the Dashboard's [Contact List page](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F8f93447d-7521-4aa1-8c64-4d5a4f025d3f%2Fcontacts%2F%3FreferralInfo%3Dsidebar). * This read-only property is automatically populated to comprise a "custom" prefix, the title of the event, and other suffixes added for uniqueness. Note that even if * the title of an event is updated, the `assignedContactsLabel` does not change. */ assignedContactsLabel: string; }; /** * An object for creating a Wix event. */ type WixEventInfo = { /** * Wix event title. */ title?: string; /** * Wix event description. */ description?: string; /** * The location of an image that represents the Wix event. This image is printed on the ticket (PDF format). The image file must be an image file from the Media Manager. * * The URL format is: * `wix:image://v1//#originWidth=&originHeight=[&watermark=]` */ mainImage?: string; /** * Wix event registration settings. */ registration?: wix_events_backend.WixEvents.WixEventRegistrationInfo; /** * Wix event guest list settings. */ guestList?: wix_events_backend.WixEvents.GuestListSettingsInfo; /** * Rich-text (HTML) content for the "About Event" section. */ about?: string; /** * Wix event online conferencing settings. */ videoConferencing?: wix_events_backend.WixEvents.OnlineConferencingInfo; /** * Wix event location settings. * `location.address` is required for non-TBD events. * `location.name` is required for TBD events. * (TBD events are events whose times are yet "to be determined.") */ location: wix_events_backend.WixEvents.LocationInfo; /** * Wix event scheduling settings. */ scheduling: wix_events_backend.WixEvents.SchedulingInfo; }; /** * An object for updating registration options for a Wix event. */ type WixEventInfoOptions = { /** * Content language code in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. * Used for translating tickets' PDF labels, registration forms, automatic emails, and so on. * Supported languages: `ar`, `bg`, `cs`, `da`, `de`, `el`, `en`, `es`, `fi`, `fr`, `he`, `hi`, `hu`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `no`, `pl`, `pt`, `ro`, `ru`, `sv`, `th`, `tl`, `tr`, `uk`, `zh`. * Defaults to `en`. */ language?: string; }; /** * An object for updating registration settings for the Wix event. */ type WixEventRegistrationInfo = { /** * Registration URL, if registration for the Wix event is managed externally. Guests go to this URL to register. Setting this property changes the read-only `registration.type` property to `EXTERNAL`. */ externalRegistrationUrl?: string; /** * Whether to temporarily suspend (pause) registration. For example, you might want to pause registration temporarily if you need to change venues to allow for more attendees. */ registrationPaused?: boolean; /** * Who can register to the Wix event. Defaults to `"MEMBER"`. * One of: * + `"MEMBER"`. Only logged-in guests can register. * + `"VISITOR_OR_MEMBER"`. Everyone can register, whether they are logged-in to the site or not. */ restrictedTo?: string; /** * Whether to disable registration. For example, you might want to disable registration if you will not have enough supplies on-hand for more attendees. Setting to `true` changes the read-only `registration.type` property to `NO_REGISTRATION`. */ registrationDisabled?: boolean; /** * Registration settings for the RSVP Wix event. */ rsvp?: wix_events_backend.WixEvents.RsvpInfo; /** * Event type. Only RSVP and TICKETS are allowed when creating an event (`initialType`), however after initial event * creation the `type` can be changed to other values. * One of: * + `"RSVP"`. The Wix event is an RSVP event. It cannot be changed to a ticketed event. * + `"TICKETS"`. The Wix event is a ticketed event. It cannot be changed to an RSVP event. * + `"EXTERNAL"`. If you created a guest list before setting up external registration, the current guest list remains but is likely to be * incomplete. So when sending out messages to the Wix-managed guest list, not all * guests will receive them. Messages should be sent from the external registration system * to the complete guest list. * You can change the value back at any point if you no longer want the event to be managed externally. * + `"NO_REGISTRATION"`. No registration is necessary for the event. */ type?: string; /** * Registration settings for the ticketed Wix event. */ tickets?: wix_events_backend.WixEvents.TicketsInfo; }; /** * An object for updating a Wix event. */ type WixEventUpdateInfo = { /** * Wix event title. */ title?: string; /** * Wix event description. */ description?: string; /** * Wix event location settings. * Address is required for non-TBD events. * Location name is required for TBD events. * (TBD events are events whose times are yet "to be determined.") */ location?: wix_events_backend.WixEvents.LocationInfo; /** * Wix event scheduling settings. */ scheduling?: wix_events_backend.WixEvents.SchedulingInfo; /** * The location of an image that represents the Wix event. This image is printed on the ticket (PDF format). The image file must be an image file from the Media Manager. * * The URL format is: * `wix:image://v1//#originWidth=&originHeight=[&watermark=]` */ mainImage?: string; /** * Wix event registration settings. */ registration?: wix_events_backend.WixEvents.WixEventRegistrationInfo; /** * Wix event guest list settings. */ guestList?: wix_events_backend.WixEvents.GuestListSettingsInfo; /** * Rich-text (HTML) content for the "About Event" section. */ about?: string; /** * Wix event online conferencing settings. */ videoConferencing?: wix_events_backend.WixEvents.OnlineConferencingInfo; }; } } declare namespace wix_events_backend.WixEvents { /** * Contains functionality for refining a Wix events query. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.WixEvents.EventsQueryBuilder.html#) */ interface EventsQueryBuilder { /** * Adds an `and` condition to the query. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.WixEvents.EventsQueryBuilder.html#and) */ and(query: wix_events_backend.WixEvents.EventsQueryBuilder): wix_events_backend.WixEvents.EventsQueryBuilder; /** * Adds a sort to a query, sorting by the specified properties in ascending order. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.WixEvents.EventsQueryBuilder.html#ascending) */ ascending(...propertyName: string[]): wix_events_backend.WixEvents.EventsQueryBuilder; /** * Refines a query to match items whose specified property value contains a specified string. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.WixEvents.EventsQueryBuilder.html#contains) */ contains(propertyName: string, value: string): wix_events_backend.WixEvents.EventsQueryBuilder; /** * Adds a sort to a query, sorting by the specified properties in descending order. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.WixEvents.EventsQueryBuilder.html#descending) */ descending(...propertyName: string[]): wix_events_backend.WixEvents.EventsQueryBuilder; /** * Refines a query to match items whose specified property value equals the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.WixEvents.EventsQueryBuilder.html#eq) */ eq(propertyName: string, value: any): wix_events_backend.WixEvents.EventsQueryBuilder; /** * Returns the items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.WixEvents.EventsQueryBuilder.html#find) */ find(options?: wix_events_backend.WixEvents.QueryOptions): Promise; /** * Refines a query to match items whose specified property value is greater than or equal to the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.WixEvents.EventsQueryBuilder.html#ge) */ ge(propertyName: string, value: string | number | Date): wix_events_backend.WixEvents.EventsQueryBuilder; /** * Refines a query to match items whose specified property value is greater than the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.WixEvents.EventsQueryBuilder.html#gt) */ gt(propertyName: string, value: string | number | Date): wix_events_backend.WixEvents.EventsQueryBuilder; /** * Refines a query to match items whose specified property value contains any of the specified values. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.WixEvents.EventsQueryBuilder.html#hasSome) */ hasSome(propertyName: string, values: string[]): wix_events_backend.WixEvents.EventsQueryBuilder; /** * Refines a query to match items whose specified property value is less than or equal to the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.WixEvents.EventsQueryBuilder.html#le) */ le(propertyName: string, value: string | number | Date): wix_events_backend.WixEvents.EventsQueryBuilder; /** * Limits the number of items the query returns. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.WixEvents.EventsQueryBuilder.html#limit) */ limit(limit: string): wix_events_backend.WixEvents.EventsQueryBuilder; /** * Refines a query to match items whose specified property value is less than the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.WixEvents.EventsQueryBuilder.html#lt) */ lt(propertyName: string, value: string | number | Date): wix_events_backend.WixEvents.EventsQueryBuilder; /** * Refines a query to match items whose specified property value does not equal the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.WixEvents.EventsQueryBuilder.html#ne) */ ne(propertyName: string, value: any): wix_events_backend.WixEvents.EventsQueryBuilder; /** * Adds an `not` condition to the query. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.WixEvents.EventsQueryBuilder.html#not) */ not(query: wix_events_backend.WixEvents.EventsQueryBuilder): wix_events_backend.WixEvents.EventsQueryBuilder; /** * Adds an `or` condition to the query. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.WixEvents.EventsQueryBuilder.html#or) */ or(query: wix_events_backend.WixEvents.EventsQueryBuilder): wix_events_backend.WixEvents.EventsQueryBuilder; /** * Sets the number of items to skip before returning query results. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.WixEvents.EventsQueryBuilder.html#skip) */ skip(skip: string): wix_events_backend.WixEvents.EventsQueryBuilder; } /** * The results of a Wix events query, containing the retrieved items. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.WixEvents.EventsQueryResult.html#) */ interface EventsQueryResult { /** * Returns the index of the current results page number. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.WixEvents.EventsQueryResult.html#currentPage) */ readonly currentPage: number; /** * Returns the items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.WixEvents.EventsQueryResult.html#items) */ readonly items: wix_events_backend.WixEvents.WixEvent[]; /** * Returns the number of items in the current results page. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.WixEvents.EventsQueryResult.html#length) */ readonly length: number; /** * Returns the query page size. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.WixEvents.EventsQueryResult.html#pageSize) */ readonly pageSize: number; /** * Contains functionality for refining a Wix events query. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.WixEvents.EventsQueryResult.html#query) */ readonly query: wix_events_backend.WixEvents.EventsQueryBuilder; /** * Returns the total number of items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.WixEvents.EventsQueryResult.html#totalCount) */ readonly totalCount: number; /** * Returns the total number of pages the query produced. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.WixEvents.EventsQueryResult.html#totalPages) */ readonly totalPages: number; /** * Indicates if the query has more results. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.WixEvents.EventsQueryResult.html#hasNext) */ hasNext(): boolean; /** * Indicates if the query has previous results. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.WixEvents.EventsQueryResult.html#hasPrev) */ hasPrev(): boolean; /** * Retrieves the next page of query results. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.WixEvents.EventsQueryResult.html#next) */ next(): Promise; /** * Retrieves the previous page of query results. * [Read more](https://www.wix.com/corvid/reference/wix-events-backend.WixEvents.EventsQueryResult.html#prev) */ prev(): Promise; } } declare namespace wix_fetch { /** * An object returned by the `fetch()` function representing * an HTTP response to a fetch. * [Read more](https://www.wix.com/corvid/reference/wix-fetch.WixFetchResponse.html#) */ interface WixFetchResponse { /** * Indicates whether the body of the response has been used yet. * [Read more](https://www.wix.com/corvid/reference/wix-fetch.WixFetchResponse.html#bodyUsed) */ readonly bodyUsed: boolean; /** * The response headers. * [Read more](https://www.wix.com/corvid/reference/wix-fetch.WixFetchResponse.html#headers) */ readonly headers: any; /** * Indicates if the request was successful, meaning its `status` is in the range 2xx. * [Read more](https://www.wix.com/corvid/reference/wix-fetch.WixFetchResponse.html#ok) */ readonly ok: boolean; /** * The response [status code](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes). * [Read more](https://www.wix.com/corvid/reference/wix-fetch.WixFetchResponse.html#status) */ readonly status: number; /** * The response [status message](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes). * [Read more](https://www.wix.com/corvid/reference/wix-fetch.WixFetchResponse.html#statusText) */ readonly statusText: string; /** * The response URL. * [Read more](https://www.wix.com/corvid/reference/wix-fetch.WixFetchResponse.html#url) */ readonly url: string; /** * Reads the response body as JSON. * [Read more](https://www.wix.com/corvid/reference/wix-fetch.WixFetchResponse.html#json) */ json(): Promise; /** * Reads the response body as a string. * [Read more](https://www.wix.com/corvid/reference/wix-fetch.WixFetchResponse.html#text) */ text(): Promise; } /** * An object used by the `fetch()` function representing an HTTPS request. */ type WixFetchRequest = { /** * The [HTTP method](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods) to use. Defaults to `"GET"`. */ method?: string; /** * The request headers. */ headers?: any; /** * The request body. */ body?: string; /** * The [request mode](https://developer.mozilla.org/en-US/docs/Web/API/Request/mode). * * One of: * * + `"cors"` * + `"no-cors"` * + `"same-origin"` */ mode?: string; /** * The [request credentials](https://developer.mozilla.org/en-US/docs/Web/API/Request/credentials). * * One of: * * + `"omit"` * + `"include"` * + `"same-origin"` */ credentials?: string; /** * The [request cache mode](https://developer.mozilla.org/en-US/docs/Web/API/Request/cache). * * One of: * * + `"default"` * + `"force-cache"` * + `"no-cache"` * + `"no-store"` * + `"only-if-cached"` * + `"reload"` */ cache?: string; }; } declare namespace $w.WixForms { /** * An event that is fired when a site visitor clicks a submit button on a `WixForms` element but the Wix Form is not successfully submitted to the server. * [Read more](https://www.wix.com/corvid/reference/$w.WixForms.WixFormSubmittedErrorEvent.html#) */ interface WixFormSubmittedErrorEvent extends $w.Event { /** * Gets the error code for a failed Wix Form submission. * [Read more](https://www.wix.com/corvid/reference/$w.WixForms.WixFormSubmittedErrorEvent.html#code) */ readonly code: string; /** * Gets the error message for a failed Wix Form submission. * [Read more](https://www.wix.com/corvid/reference/$w.WixForms.WixFormSubmittedErrorEvent.html#message) */ readonly message: string; } /** * An event that is fired when a site visitor clicks a submit button on a `WixForms` element and the Wix Form is successfully submitted to the server. * [Read more](https://www.wix.com/corvid/reference/$w.WixForms.WixFormSubmittedEvent.html#) */ interface WixFormSubmittedEvent extends $w.Event { /** * An object representing a Wix Form field. * [Read more](https://www.wix.com/corvid/reference/$w.WixForms.WixFormSubmittedEvent.html#wixFormField) */ readonly wixFormField: any; } } declare namespace wix_forum_backend { /** * Events that are fired from a Wix Forum. * [Read more](https://www.wix.com/corvid/reference/wix-forum-backend.Events.html#) */ interface Events { /** * A backend event that fires when a new forum category is created. * [Read more](https://www.wix.com/corvid/reference/wix-forum-backend.Events.html#onCategoryCreated) */ onCategoryCreated(event: wix_forum_backend.Events.CreatedCategory): void; /** * A backend event that fires when a forum category is deleted. * [Read more](https://www.wix.com/corvid/reference/wix-forum-backend.Events.html#onCategoryDeleted) */ onCategoryDeleted(event: wix_forum_backend.Events.DeletedCategory): void; /** * A backend event that fires when a forum category is updated. * [Read more](https://www.wix.com/corvid/reference/wix-forum-backend.Events.html#onCategoryUpdated) */ onCategoryUpdated(event: wix_forum_backend.Events.UpdatedCategory): void; /** * A backend event that fires when a new forum comment is created. * [Read more](https://www.wix.com/corvid/reference/wix-forum-backend.Events.html#onCommentCreated) */ onCommentCreated(event: wix_forum_backend.Events.CreatedComment): void; /** * A backend event that fires when a forum comment is deleted. * [Read more](https://www.wix.com/corvid/reference/wix-forum-backend.Events.html#onCommentDeleted) */ onCommentDeleted(event: wix_forum_backend.Events.DeletedComment): void; /** * A backend event that fires when a forum comment is downvoted. * [Read more](https://www.wix.com/corvid/reference/wix-forum-backend.Events.html#onCommentDownvoted) */ onCommentDownvoted(event: wix_forum_backend.Events.DownvotedComment): void; /** * A backend event that fires when a forum comment is liked. * [Read more](https://www.wix.com/corvid/reference/wix-forum-backend.Events.html#onCommentLiked) */ onCommentLiked(event: wix_forum_backend.Events.LikedComment): void; /** * A backend event that fires when a forum comment is marked as best. * [Read more](https://www.wix.com/corvid/reference/wix-forum-backend.Events.html#onCommentMarkedAsBest) */ onCommentMarkedAsBest(event: wix_forum_backend.Events.MarkedAsBestComment): void; /** * A backend event that fires when a forum comment is reported. * [Read more](https://www.wix.com/corvid/reference/wix-forum-backend.Events.html#onCommentReported) */ onCommentReported(event: wix_forum_backend.Events.ReportedComment): void; /** * A backend event that fires when a forum comment is unliked. * [Read more](https://www.wix.com/corvid/reference/wix-forum-backend.Events.html#onCommentUnliked) */ onCommentUnliked(event: wix_forum_backend.Events.UnlikedComment): void; /** * A backend event that fires when a forum comment is unmarked as best. * [Read more](https://www.wix.com/corvid/reference/wix-forum-backend.Events.html#onCommentUnmarkedAsBest) */ onCommentUnmarkedAsBest(event: wix_forum_backend.Events.UnmarkedAsBestComment): void; /** * A backend event that fires when a vote is removed from a forum comment. * [Read more](https://www.wix.com/corvid/reference/wix-forum-backend.Events.html#onCommentUnvoted) */ onCommentUnvoted(event: wix_forum_backend.Events.UnvotedComment): void; /** * A backend event that fires when a forum comment is updated. * [Read more](https://www.wix.com/corvid/reference/wix-forum-backend.Events.html#onCommentUpdated) */ onCommentUpdated(event: wix_forum_backend.Events.UpdatedComment): void; /** * A backend event that fires when a forum comment is upvoted. * [Read more](https://www.wix.com/corvid/reference/wix-forum-backend.Events.html#onCommentUpvoted) */ onCommentUpvoted(event: wix_forum_backend.Events.UpvotedComment): void; /** * A backend event that fires when a forum post is closed. * [Read more](https://www.wix.com/corvid/reference/wix-forum-backend.Events.html#onPostClosed) */ onPostClosed(event: wix_forum_backend.Events.ClosedPost): void; /** * A backend event that fires when a new forum post is created. * [Read more](https://www.wix.com/corvid/reference/wix-forum-backend.Events.html#onPostCreated) */ onPostCreated(event: wix_forum_backend.Events.CreatedPost): void; /** * A backend event that fires when a forum post is deleted. * [Read more](https://www.wix.com/corvid/reference/wix-forum-backend.Events.html#onPostDeleted) */ onPostDeleted(event: wix_forum_backend.Events.DeletedPost): void; /** * A backend event that fires when a forum post is liked. * [Read more](https://www.wix.com/corvid/reference/wix-forum-backend.Events.html#onPostLiked) */ onPostLiked(event: wix_forum_backend.Events.LikedPost): void; /** * A backend event that fires when a forum post is moved. * [Read more](https://www.wix.com/corvid/reference/wix-forum-backend.Events.html#onPostMoved) */ onPostMoved(event: wix_forum_backend.Events.MovedPost): void; /** * A backend event that fires when a forum post is opened. * [Read more](https://www.wix.com/corvid/reference/wix-forum-backend.Events.html#onPostOpened) */ onPostOpened(event: wix_forum_backend.Events.OpenedPost): void; /** * A backend event that fires when a forum post is pinned. * [Read more](https://www.wix.com/corvid/reference/wix-forum-backend.Events.html#onPostPinned) */ onPostPinned(event: wix_forum_backend.Events.PinnedPost): void; /** * A backend event that fires when a forum post is reported. * [Read more](https://www.wix.com/corvid/reference/wix-forum-backend.Events.html#onPostReported) */ onPostReported(event: wix_forum_backend.Events.ReportedPost): void; /** * A backend event that fires when a forum post is unliked. * [Read more](https://www.wix.com/corvid/reference/wix-forum-backend.Events.html#onPostUnliked) */ onPostUnliked(event: wix_forum_backend.Events.UnlikedPost): void; /** * A backend event that fires when a forum post is unpinned. * [Read more](https://www.wix.com/corvid/reference/wix-forum-backend.Events.html#onPostUnpinned) */ onPostUnpinned(event: wix_forum_backend.Events.UnpinnedPost): void; /** * A backend event that fires when a forum post is updated. * [Read more](https://www.wix.com/corvid/reference/wix-forum-backend.Events.html#onPostUpdated) */ onPostUpdated(event: wix_forum_backend.Events.UpdatedPost): void; } namespace Events { /** * An object representing a forum category. */ type Category = { /** * Category ID. */ _id: string; /** * Category name. Appears on the forum home page and in the navigation menu. */ name: string; /** * Category header title. Appears in the category page header. */ headerTitle: string; /** * Short description of the category. */ description: string; /** * Type of header background. * One of the following: * * + `"IMAGE"`: Category header background is an image. * + `"COLOR"`: Category header background is a color. * * * The default value is `"COLOR"`. */ headerType: string; /** * Category header background [image source](https://www.wix.com/velo/reference/$w/image/src). Applicable only if `headerType` is an image. */ headerImage: string; /** * Forum category header image overlay color. Applicable only when `headerType` is `"IMAGE"`. */ headerImageOverlayColor: wix_forum_backend.Events.Color; /** * Forum category header background color. */ headerBackgroundColor: wix_forum_backend.Events.Color; /** * Forum category header text color. */ headerTextColor: wix_forum_backend.Events.Color; /** * Position in the list of categories on the forum home page. `0` indicates the first category. */ rank: number; /** * Relative URL of the category page. */ pageUrl: string; /** * URL-friendly name of the category that is unique across the forum. */ slug: string; /** * Number of posts in the category. */ postCount: number; /** * Total views of all posts in the category. */ postViewCount: number; /** * Only admins and moderators can post in this category. */ writeProtected: boolean; /** * Date and time the category was created. */ _createdDate: Date; /** * Date and time the category was last updated. */ _updatedDate: Date; /** * Type of category. * One of the following: * * * + `"DISCUSSION"`: Conversational discussion with other members. * + `"QUESTION"`: Specific question with answers from the community. */ categoryType: string; }; /** * An object representing a post that was closed. */ type ClosedPost = { /** * Post ID. */ postId: string; }; /** * An object representing a color used in a forum header. */ type Color = { /** * Hexadecimal rgb color value. */ color: string; /** * Opacity percentage as a decimal between 0 and 1. */ opacity: number; }; /** * An object representing a forum comment. */ type Comment = { /** * Comment ID. */ _id: string; /** * ID of the post commented on. */ postId: string; /** * ID of the comment author. */ _ownerId: string; /** * Plain text of the comment. */ plainContent: string; /** * Number of replies to the comment. */ replyCount: number; /** * Number of likes the comment received. */ likeCount: number; /** * Number of upvotes the comment received. Only applicable to comments on posts with a `postType` value of `"QUESTION"`. */ upvoteCount: number; /** * Number of downvotes the comment received. Only applicable to comments on posts with a `postType` value of `"QUESTION"`. */ downvoteCount: number; /** * Number of upvotes subtracted by the number of downvotes. May be a negative number. Only applicable to comments on posts with a `postType` value of `"QUESTION"`. */ score: number; /** * Date and time the comment was created. */ _createdDate: Date; /** * Date and time the comment was last edited. */ _editedDate: Date; /** * Date and time of the last activity performed on the comment. */ _lastActivityDate: Date; /** * Relative URL of the post page containing the comment. */ pageUrl: string; }; /** * An object representing a category that was created. */ type CreatedCategory = { /** * Category ID. */ categoryId: string; /** * Forum category that was created. */ category: wix_forum_backend.Events.Category; }; /** * An object representing a comment that was created. */ type CreatedComment = { /** * Comment ID. */ commentId: string; /** * Forum comment that was created. */ comment: wix_forum_backend.Events.Comment; }; /** * An object representing a post that was created. */ type CreatedPost = { /** * Post ID. */ postId: string; /** * Forum post that was created. */ post: wix_forum_backend.Events.Post; }; /** * An object representing a category that was deleted. */ type DeletedCategory = { /** * Category ID. */ categoryId: string; }; /** * An object representing a comment that was deleted. */ type DeletedComment = { /** * Comment ID. */ commentId: string; }; /** * An object representing a post that was deleted. */ type DeletedPost = { /** * Post ID. */ postId: string; }; /** * An object representing a comment that was downvoted. */ type DownvotedComment = { /** * Comment ID. */ commentId: string; }; /** * An object representing a comment that was liked. */ type LikedComment = { /** * Comment ID. */ commentId: string; }; /** * An object representing a post that was liked. */ type LikedPost = { /** * Post ID. */ postId: string; }; /** * An object representing a comment that was marked as best. */ type MarkedAsBestComment = { /** * Comment ID. */ commentId: string; }; /** * An object representing a post that was moved to a different category. */ type MovedPost = { /** * Post ID. */ postId: string; /** * ID of the category the post moved from. */ previousCategoryId: string; /** * ID of the category the post moved to. */ currentCategoryId: string; }; /** * An object representing a post that was opened. */ type OpenedPost = { /** * Post ID. */ postId: string; }; /** * An object representing a post that was pinned. */ type PinnedPost = { /** * Post ID. */ postId: string; }; /** * An object representing a forum post. */ type Post = { /** * Post ID. */ _id: string; /** * ID of the post author. */ _ownerId: string; /** * ID of the category the post belongs to. */ categoryId: string; /** * Post title. */ title: string; /** * Plain text of the post. */ plainContent: string; /** * Whether the post is pinned. Only forum admins can pin and unpin posts. */ pinned: boolean; /** * Whether comments are disabled for the post (the post was closed). */ commentingDisabled: boolean; /** * Number of comments on the post. */ commentCount: number; /** * Number of likes the post received. */ likeCount: number; /** * Number of times the post was viewed. */ viewCount: number; /** * Date and time the post was created. */ _createdDate: Date; /** * Date and time the post was last edited. */ _editedDate: Date; /** * Date and time of the last activity performed on the post. */ _lastActivityDate: Date; /** * Relative URL of the post page. */ pageUrl: string; /** * URL-friendly name of the post that is unique across the forum. */ slug: string; /** * Type of post. * One of the following: * * * + `"DISCUSSION"`: Conversational discussion with other members. * + `"QUESTION"`: Specific question with answers from the community. */ postType: string; /** * ID of comment marked as best answer to the post question. Applicable only for posts with a `postType` of `"QUESTION"`. */ bestAnswerCommentId: string; }; /** * An object representing a comment that was reported. */ type ReportedComment = { /** * Comment ID. */ commentId: string; /** * Type of report. * One of the following: * * * + `"OFFENSIVE_CONTENT"`: Content that is offensive. * + `"OFFENSIVE_MEDIA"`: Media content that is offensive. * + `"SPAM"`: Comments with unrelated or unwanted information. */ reportType: string; }; /** * An object representing a post that was reported. */ type ReportedPost = { /** * Post ID. */ postId: string; /** * Type of report. * One of the following: * * * + `"OFFENSIVE_CONTENT"`: Content that is offensive. * + `"OFFENSIVE_MEDIA"`: Media content that is offensive. * + `"SPAM"`: Posts with unrelated or unwanted information. */ reportType: string; }; /** * An object representing a comment that was unliked. */ type UnlikedComment = { /** * Comment ID. */ commentId: string; }; /** * An object representing a post that was unliked. */ type UnlikedPost = { /** * Post ID. */ postId: string; }; /** * An object representing a comment that was marked as best. */ type UnmarkedAsBestComment = { /** * Comment ID. */ commentId: string; }; /** * An object representing a post that was unpinned. */ type UnpinnedPost = { /** * Post ID. */ postId: string; }; /** * An object representing a comment that was unvoted. */ type UnvotedComment = { /** * Comment ID. */ commentId: string; }; /** * An object representing a category that was updated. */ type UpdatedCategory = { /** * Category ID. */ categoryId: string; /** * Forum category that was updated. */ category: wix_forum_backend.Events.Category; }; /** * An object representing a comment that was updated. */ type UpdatedComment = { /** * Comment ID. */ commentId: string; /** * Forum comment that was updated. */ comment: wix_forum_backend.Events.Comment; }; /** * An object representing a post that was updated. */ type UpdatedPost = { /** * Post ID. */ postId: string; /** * Forum post that was updated. */ post: wix_forum_backend.Events.Post; }; /** * An object representing a comment that was upvoted. */ type UpvotedComment = { /** * Comment ID. */ commentId: string; }; } } declare namespace wix_groups_backend.CreateRequests { /** * Contains functionality for refining a CreateRequests query. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.CreateRequests.CreateRequestsQueryBuilder.html#) */ interface CreateRequestsQueryBuilder { /** * Adds a sort to a query, sorting by the specified properties in ascending order. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.CreateRequests.CreateRequestsQueryBuilder.html#ascending) */ ascending(...propertyName: string[]): wix_groups_backend.CreateRequests.CreateRequestsQueryBuilder; /** * Adds a sort to a query, sorting by the specified properties in descending order. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.CreateRequests.CreateRequestsQueryBuilder.html#descending) */ descending(...propertyName: string[]): wix_groups_backend.CreateRequests.CreateRequestsQueryBuilder; /** * Refines a query to match items whose specified property value equals the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.CreateRequests.CreateRequestsQueryBuilder.html#eq) */ eq(propertyName: string, value: any): wix_groups_backend.CreateRequests.CreateRequestsQueryBuilder; /** * Returns the items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.CreateRequests.CreateRequestsQueryBuilder.html#find) */ find(options?: wix_groups_backend.Options): Promise; /** * Refines a query to match items whose specified property value contains any of the specified values. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.CreateRequests.CreateRequestsQueryBuilder.html#hasSome) */ hasSome(propertyName: string, values: string[]): wix_groups_backend.CreateRequests.CreateRequestsQueryBuilder; /** * Limits the number of items the query returns. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.CreateRequests.CreateRequestsQueryBuilder.html#limit) */ limit(limit: string): wix_groups_backend.CreateRequests.CreateRequestsQueryBuilder; /** * Refines a query to match items whose specified property value does not equal the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.CreateRequests.CreateRequestsQueryBuilder.html#ne) */ ne(propertyName: string, value: any): wix_groups_backend.CreateRequests.CreateRequestsQueryBuilder; /** * Adds an `or` condition to the query. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.CreateRequests.CreateRequestsQueryBuilder.html#or) */ or(query: wix_groups_backend.CreateRequests.CreateRequestsQueryBuilder): wix_groups_backend.CreateRequests.CreateRequestsQueryBuilder; /** * Sets the number of items to skip before returning query results. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.CreateRequests.CreateRequestsQueryBuilder.html#skip) */ skip(skip: string): wix_groups_backend.CreateRequests.CreateRequestsQueryBuilder; } /** * The results of a create request query, containing the retrieved items. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.CreateRequests.CreateRequestsQueryResult.html#) */ interface CreateRequestsQueryResult { /** * Returns the index of the current results page number. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.CreateRequests.CreateRequestsQueryResult.html#currentPage) */ readonly currentPage: number; /** * Returns the items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.CreateRequests.CreateRequestsQueryResult.html#items) */ readonly items: wix_groups_backend.CreateRequests.CreateRequest[]; /** * Returns the number of items in the current results page. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.CreateRequests.CreateRequestsQueryResult.html#length) */ readonly length: number; /** * Returns the query page size. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.CreateRequests.CreateRequestsQueryResult.html#pageSize) */ readonly pageSize: number; /** * Returns the `CreateRequestsQueryBuilder` object used to get the current results. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.CreateRequests.CreateRequestsQueryResult.html#query) */ readonly query: wix_groups_backend.CreateRequests.CreateRequestsQueryBuilder; /** * Returns the total number of items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.CreateRequests.CreateRequestsQueryResult.html#totalCount) */ readonly totalCount: number; /** * Returns the total number of pages the query produced. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.CreateRequests.CreateRequestsQueryResult.html#totalPages) */ readonly totalPages: number; /** * Retrieves the next page of query results. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.CreateRequests.CreateRequestsQueryResult.html#next) */ next(): Promise; /** * Retrieves the previous page of query results. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.CreateRequests.CreateRequestsQueryResult.html#prev) */ prev(): Promise; } } declare namespace wix_groups_backend { /** * The CreateRequests API provides functionality for managing requests to create a group. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.CreateRequests.html#) */ interface CreateRequests { /** * Approves requests to create a group. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.CreateRequests.html#approveCreateRequests) */ approveCreateRequests(createRequestIds: string[], options?: wix_groups_backend.Options): Promise; /** * Lists requests to create a group. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.CreateRequests.html#listCreateRequests) */ listCreateRequests(paging?: wix_groups_backend.CreateRequests.Paging, options?: wix_groups_backend.Options): Promise; /** * Creates a query to retrieve a list of create requests. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.CreateRequests.html#queryCreateRequests) */ queryCreateRequests(): wix_groups_backend.CreateRequests.CreateRequestsQueryBuilder; /** * Rejects requests to create a group. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.CreateRequests.html#rejectCreateRequests) */ rejectCreateRequests(rejections: wix_groups_backend.CreateRequests.RejectCreateRequest[], options?: wix_groups_backend.Options): Promise; } namespace CreateRequests { type CreateRequest = { /** * ID of the request to create a group. Same as group ID. */ _id: string; /** * Status of the request to create a group. * One of: * + `"PENDING"` * + `"APPROVED"` * + `"REJECTED"` */ status: string; /** * Reason the request to create a group was rejected. */ rejectionReason?: string; /** * Group requested to create. */ group: wix_groups_backend.Group; }; type ListCreateRequests = { /** * Requests to create a group. */ createRequests: wix_groups_backend.CreateRequests.CreateRequest[]; /** * Paging information. */ metadata: wix_groups_backend.Metadata; }; type Paging = { /** * Maximum number of create requests to retrieve. Defaults to 1,000. */ limit?: number; /** * Number of create requests to skip in the list. */ skip?: number; }; type RejectCreateRequest = { /** * ID of the create request to reject. */ createRequestId: string; /** * Reason the request to create a group was rejected. Max 1,000 characters. This text is displayed to the creator of the rejected request. */ reason?: string; }; } /** * The Groups API provides functionality for managing groups, including creating, deleting, updating, and querying groups. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Groups.html#) */ interface Groups { /** * Creates a group. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Groups.html#createGroup) */ createGroup(groupInfo: wix_groups_backend.Groups.GroupInfo, options?: wix_groups_backend.Options): Promise; /** * Deletes a group. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Groups.html#deleteGroup) */ deleteGroup(groupId: string, options?: wix_groups_backend.Options): Promise; /** * Gets a group by ID. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Groups.html#getGroup) */ getGroup(groupId: string, options?: wix_groups_backend.Options): Promise; /** * Gets a group by slug. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Groups.html#getGroupBySlug) */ getGroupBySlug(slug: string, options?: wix_groups_backend.Options): Promise; /** * Lists groups. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Groups.html#listGroups) */ listGroups(paging?: wix_groups_backend.Groups.Paging, options?: wix_groups_backend.Options): Promise; /** * Creates a query to retrieve a list of groups. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Groups.html#queryGroups) */ queryGroups(): wix_groups_backend.Groups.GroupsQueryBuilder; /** * Updates a group. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Groups.html#updateGroup) */ updateGroup(groupId: string, groupInfo: wix_groups_backend.Groups.GroupInfoUpdate, options?: wix_groups_backend.Options): Promise; } namespace Groups { type GroupInfo = { /** * Group name. */ name: string; /** * Group description. */ description?: string; /** * Group privacy level. * One of: * + `PUBLIC`: Site visitors can see the group and its content in the list of groups. Site members can join the group. * + `PRIVATE`: Site visitors can see the group in the list of groups, but only group members can see its content. Site members can request to join the group. * + `SECRET`: Only group members can see the group and its content in the list of groups. Site members can only join if invited by group admins, or other group members. */ privacyStatus?: string; /** * Group cover image. */ coverImage?: wix_groups_backend.CoverImage; /** * What group members are called. For example, 'Coworkers', 'Friends', or 'Students'. */ memberTitle?: string; /** * Group settings. */ settings?: wix_groups_backend.GroupSettings; /** * Site member ID of the group creator. Defaults to group creator. Required if using suppressAuth. */ owner?: string; }; /** * Group to update. */ type GroupInfoUpdate = { /** * Group name. */ name?: string; /** * Group description. */ description?: string; /** * Group privacy level. * One of: * + `PUBLIC`: Site visitors can see the group and its content in the list of groups. Site members can join the group. * + `PRIVATE`: Site visitors can see the group in the list of groups, but only group members can see its content. Site members can request to join the group. * + `SECRET`: Only group members can see the group and its content in the list of groups. Site members can only join if invited by group admins, or other group members. */ privacyStatus?: string; /** * Group cover image. */ coverImage?: wix_groups_backend.CoverImageOptions; /** * What group members are called. For example, 'Coworkers', 'Friends', or 'Students'. */ memberTitle?: string; /** * Group settings. */ settings?: wix_groups_backend.GroupSettingsOptions; /** * Site member ID of the group creator. */ owner?: string; }; type ListGroups = { /** * List of groups. */ groups: wix_groups_backend.Group[]; /** * Paging information. */ metadata: wix_groups_backend.Metadata; }; type Paging = { /** * Maximum number of groups to retrieve. Defaults to 1,000. */ limit?: number; /** * Number of groups to skip in the list. */ skip?: number; }; } /** * The JoinRequests API provides functionality for managing requests to join a group. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.JoinRequests.html#) */ interface JoinRequests { /** * Approves requests to join a group. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.JoinRequests.html#approveJoinRequests) */ approveJoinRequests(identifiers: wix_groups_backend.JoinRequests.Identifiers, options?: wix_groups_backend.Options): Promise; /** * Lists requests to join a group. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.JoinRequests.html#listJoinRequests) */ listJoinRequests(groupId: string, paging?: wix_groups_backend.JoinRequests.Paging, options?: wix_groups_backend.Options): Promise; /** * Creates a query to retrieve a list of join requests. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.JoinRequests.html#queryJoinRequests) */ queryJoinRequests(): wix_groups_backend.JoinRequests.JoinRequestsQueryBuilder; /** * Rejects requests to join a group. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.JoinRequests.html#rejectJoinRequests) */ rejectJoinRequests(groupId: string, rejections: wix_groups_backend.JoinRequests.Rejection[], options?: wix_groups_backend.Options): Promise; } namespace JoinRequests { type Identifiers = { /** * ID of the group requested to join. */ groupId: string; /** * IDs of the site members to approve. */ memberIds: string[]; }; type JoinRequest = { /** * Site member ID of the requester. */ memberId: string; /** * Date the site member requested to join the group. */ _createdDate: Date; /** * Status of the request to join a group. * One of: * - `"PENDING"` * - `"APPROVED"` * - `"REJECTED"` */ status: string; /** * Reason the request to join a group was rejected. */ rejectionReason?: string; }; type ListJoinRequests = { /** * Requests to join a group. */ joinRequests: wix_groups_backend.JoinRequests.JoinRequest[]; /** * Paging information. */ metadata: wix_groups_backend.Metadata; }; type Paging = { /** * Maximum number of join requests to retrieve. Defaults to 100. */ limit?: number; /** * Number of join requests to skip in the list. */ skip?: number; }; type Rejection = { /** * ID of the site member to reject. */ memberId: string; /** * Reason the request to join a group was rejected. Text written by the request reviewer that is displayed when the group is rejected (max 1,000 characters). */ reason: string; }; } /** * The Members API provides functionality for managing group members, inluding adding, removing, and querying group members. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Members.html#) */ interface Members { /** * Adds site members to a group. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Members.html#addGroupMembers) */ addGroupMembers(identifiers: wix_groups_backend.Members.IdentifiersAddGroupMembers, options?: wix_groups_backend.Options): Promise; /** * Lists all members of a group. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Members.html#listGroupMembers) */ listGroupMembers(groupId: string, paging?: wix_groups_backend.Members.Paging, options?: wix_groups_backend.Options): Promise; /** * Lists all group memberships of a site member. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Members.html#listMemberships) */ listMemberships(memberId: string, paging?: wix_groups_backend.Members.PagingMemberships, options?: wix_groups_backend.Options): Promise; /** * Retrieves a list of up to 100 group members, given the provided paging, sorting and filtering. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Members.html#queryGroupMembers) */ queryGroupMembers(): wix_groups_backend.Members.GroupMembersQueryBuilder; /** * Retrieves a list of up to 100 memberships, given the provided paging, sorting and filtering. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Members.html#queryMemberships) */ queryMemberships(): wix_groups_backend.Members.GroupMembersQueryBuilder; /** * Removes members from a group. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Members.html#removeGroupMembers) */ removeGroupMembers(identifiers: wix_groups_backend.Members.IdentifiersRemoveGroupMembers, options?: wix_groups_backend.Options): Promise; } namespace Members { type GroupMember = { /** * Group member role. * One of: * - `"MEMBER"`: Group member. * - `"ADMIN"`: Group admins. */ role: string; /** * Site member ID of group member. */ memberId: string; /** * Date and time the group member joined the group. */ joinedDate: Date; }; type IdentifiersAddGroupMembers = { /** * ID of the group. */ groupId: string; /** * IDs of the site members to add to the group. */ memberIds: string[]; }; type IdentifiersRemoveGroupMembers = { /** * ID of the group. */ groupId: string; /** * IDs of the site members to remove from the group. */ memberIds: string[]; }; type ListGroupMembers = { /** * Group members. */ members: wix_groups_backend.Members.GroupMember[]; /** * Paging information. */ metadata: wix_groups_backend.Metadata; }; type ListMemberships = { /** * Site member's memberships. */ memberships: wix_groups_backend.Members.Membership[]; /** * Paging information. */ metadata: wix_groups_backend.Metadata; }; type Membership = { /** * Group ID. */ groupId: string; /** * Group membership status. * One of: * - `"JOINED"` * - `"PENDING"` */ status: string; /** * Group member role. * One of: * - `"MEMBER"`: Group member. * - `"ADMIN"`: Group admins. */ role: string; }; type Paging = { /** * Maximum number of group members to retrieve. Defaults to 100. */ limit?: number; /** * Number of group members to skip in the list. */ skip?: number; }; type PagingMemberships = { /** * Maximum number of memberships to retrieve. Defaults to 100. */ limit?: number; /** * Number of memberships to skip in the list. */ skip?: number; }; } /** * The Roles API provides functionality for assigning and unassigning a role to a group member. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Roles.html#) */ interface Roles { /** * Assigns a role to group members. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Roles.html#assignRole) */ assignRole(identifiers: wix_groups_backend.Roles.Identifiers, role: string, options?: wix_groups_backend.Options): Promise; /** * Unassigns a role from group members. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Roles.html#unassignRole) */ unassignRole(identifiers: wix_groups_backend.Roles.Identifiers, role: string, options?: wix_groups_backend.Options): Promise; } namespace Roles { type Identifiers = { /** * ID of the group. */ groupId: string; /** * IDs of the site members. */ memberIds: string[]; }; } /** * Group cover image. */ type CoverImage = { /** * **Deprecated**. Use the `imageUrl` property instead. * * Group cover image. Only site admins or group admins can upload a group cover image. */ image?: wix_groups_backend.Image; /** * Position of the group cover image relative to the uploaded image. */ position?: wix_groups_backend.Position; /** * The group cover image's Wix media URL in the following format: `'wix:image://v1//#originWidth=&originHeight=[&watermark=]'`. Note that the URL contains the image's width and height. * * **Note:** This replaces the old `image` property. `image` will continue to work, but we recommend that you use the updated `imageUrl` property instead. */ imageUrl?: string; }; /** * Group cover image. */ type CoverImageOptions = { /** * **Deprecated**. Use the `imageUrl` property instead. * * Group cover image. Only site admins or group admins can upload a group cover image. */ image?: wix_groups_backend.ImageOptions; /** * Position of the top left corner of the group cover image relative to the uploaded image. */ position?: wix_groups_backend.PositionOptions; /** * The group cover image's Wix media URL in the following format: `'wix:image://v1//#originWidth=&originHeight=[&watermark=]'`. Note that the URL contains the image's width and height. * * **Note:** This replaces the old `image` property. `image` will continue to work, but we recommend that you use the updated `imageUrl` property instead. */ imageUrl?: string; }; type Group = { /** * Group ID. */ _id: string; /** * Group name. */ name: string; /** * Part of a group's URL, for example, `'https:/example.com/groups/{my-group-slug}'`. Generally based on the group name, but for secret groups it is * an autogenerated string of characters, for example, `'https:/example.com/groups/{5D3yTX}'`. It is case-sensitive. */ slug: string; /** * Group description. */ description: string; /** * Group privacy level. * One of: * + `PUBLIC`: Site visitors can see the group and its content in the list of groups. Site members can join the group. * + `PRIVATE`: Site visitors can see the group in the list of groups, but only group members can see its content. Site members can request to join the group. * + `SECRET`: Only group members can see the group and its content in the list of groups. Site members can only join if invited by group admins, or other group members. */ privacyStatus: string; /** * Group cover image. */ coverImage?: wix_groups_backend.CoverImage; /** * What group members are called. For example, 'Coworkers', 'Friends', or 'Students'. */ memberTitle?: string; /** * Number of members in the group. */ memberCount: number; /** * Group settings. */ settings: wix_groups_backend.GroupSettings; /** * Date and time the group was last active. For example, a post or comment. */ lastActivityDate: Date; /** * Date and time the group was created. */ _createdDate: Date; /** * Date and time the group was last updated. */ _updatedDate: Date; /** * Site member ID of the group creator. Defaults to group creator. */ owner: string; }; /** * Group settings. */ type GroupSettings = { /** * Whether group members can send an email inviting others to join the group. When `false`, only site admins and group admins can invite others to join the group. Defaults to `false`. */ membersCanInvite: boolean; /** * Whether group members can approve or reject requests to join a group. When `false`, only site admins and group admins can approve or reject requests to join the group. Defaults to `false`. */ membersCanApprove: boolean; /** * Whether to create a daily group post welcoming new members. Defaults to `true`. */ welcomeMemberPostEnabled: boolean; /** * Whether to create a group post when group details are changed. Defaults to `true`. */ groupUpdatePostEnabled: boolean; /** * Whether group members can view the list of members in the group. Defaults to `true`. */ showMemberList: boolean; }; /** * Group settings. */ type GroupSettingsOptions = { /** * Whether group members can send an email inviting others to join the group. When `false`, only site admins and group admins can invite others to join the group. Defaults to `false`. */ membersCanInvite?: boolean; /** * Whether group members can approve or reject requests to join a group. When `false`, only site admins and group admins can approve or reject requests to join the group. Defaults to `false`. */ membersCanApprove?: boolean; /** * Whether to create a daily group post welcoming new members. Defaults to `true`. */ welcomeMemberPostEnabled?: boolean; /** * Whether to create a group post when group details are changed. Defaults to `true`. */ groupUpdatePostEnabled?: boolean; /** * Whether group members can view the list of members in the group. Defaults to `true`. */ showMemberList?: boolean; }; /** * Group cover image. Only site admins or group admins can upload a group cover image. */ type Image = { /** * **Deprecated**. * * Group cover image's file URL. */ mediaId?: string; /** * **Deprecated**. * * Group cover image width. */ width?: number; /** * **Deprecated**. * * Group cover image height. */ height?: number; }; /** * Group cover image. Only site admins or group admins can upload a group cover image. */ type ImageOptions = { /** * **Deprecated**. * * Group cover image's file URL. */ mediaId?: string; /** * **Deprecated**. * * Group cover image width. */ width?: number; /** * **Deprecated**. * * Group cover image height. */ height?: number; }; type Metadata = { /** * Number of items in the current results page. */ length?: number; /** * Total number of items that match the query. */ totalCount?: number; /** * Flag indicating that the server failed to calculate the 'total' field. */ tooManyToCount?: boolean; }; type Options = { /** * When `true`, prevents permission checks from running for the operation. Defaults to `false`. */ suppressAuth?: boolean; }; /** * Position of the top left corner of the group cover image relative to the uploaded image. */ type Position = { /** * Horizontal coordinate. */ x?: number; /** * Vertical coordinate. */ y?: number; }; /** * Position of the top left corner of the group cover image relative to the uploaded image. */ type PositionOptions = { /** * Horizontal coordinate. */ x?: number; /** * Vertical coordinate. */ y?: number; }; /** * Group member role. When membership status is not `JOINED`, this is empty. */ type Role = { /** * Group member role. * One of: * - `"MEMBER"`: Group member. * - `"ADMIN"`: Group admin. */ role: string; }; } declare namespace wix_groups_backend.Groups { /** * Contains functionality for refining a Groups query. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Groups.GroupsQueryBuilder.html#) */ interface GroupsQueryBuilder { /** * Adds a sort to a query, sorting by the specified properties in ascending order. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Groups.GroupsQueryBuilder.html#ascending) */ ascending(...propertyName: string[]): wix_groups_backend.Groups.GroupsQueryBuilder; /** * Refines a query to match items whose specified property value contains a specified string. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Groups.GroupsQueryBuilder.html#contains) */ contains(propertyName: string, value: string): wix_groups_backend.Groups.GroupsQueryBuilder; /** * Adds a sort to a query, sorting by the specified properties in descending order. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Groups.GroupsQueryBuilder.html#descending) */ descending(...propertyName: string[]): wix_groups_backend.Groups.GroupsQueryBuilder; /** * Refines a query to match items whose specified property value ends with a specified string. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Groups.GroupsQueryBuilder.html#endsWith) */ endsWith(propertyName: string, value: string): wix_groups_backend.Groups.GroupsQueryBuilder; /** * Refines a query to match items whose specified property value equals the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Groups.GroupsQueryBuilder.html#eq) */ eq(propertyName: string, value: any): wix_groups_backend.Groups.GroupsQueryBuilder; /** * Returns the items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Groups.GroupsQueryBuilder.html#find) */ find(options?: wix_groups_backend.Options): Promise; /** * Refines a query to match items whose specified property value contains any of the specified values. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Groups.GroupsQueryBuilder.html#hasSome) */ hasSome(propertyName: string, values: string[]): wix_groups_backend.Groups.GroupsQueryBuilder; /** * Limits the number of items the query returns. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Groups.GroupsQueryBuilder.html#limit) */ limit(limit: string): wix_groups_backend.Groups.GroupsQueryBuilder; /** * Refines a query to match items whose specified property value does not equal the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Groups.GroupsQueryBuilder.html#ne) */ ne(propertyName: string, value: any): wix_groups_backend.Groups.GroupsQueryBuilder; /** * Adds an `or` condition to the query. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Groups.GroupsQueryBuilder.html#or) */ or(query: wix_groups_backend.Groups.GroupsQueryBuilder): wix_groups_backend.Groups.GroupsQueryBuilder; /** * Sets the number of items to skip before returning query results. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Groups.GroupsQueryBuilder.html#skip) */ skip(skip: string): wix_groups_backend.Groups.GroupsQueryBuilder; /** * Refines a query to match items whose specified property value starts with a specified string. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Groups.GroupsQueryBuilder.html#startsWith) */ startsWith(propertyName: string, value: string): wix_groups_backend.Groups.GroupsQueryBuilder; } /** * The results of a create request query, containing the retrieved items. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Groups.GroupsQueryResult.html#) */ interface GroupsQueryResult { /** * Returns the index of the current results page number. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Groups.GroupsQueryResult.html#currentPage) */ readonly currentPage: number; /** * Returns the items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Groups.GroupsQueryResult.html#items) */ readonly items: wix_groups_backend.Group[]; /** * Returns the number of items in the current results page. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Groups.GroupsQueryResult.html#length) */ readonly length: number; /** * Returns the query page size. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Groups.GroupsQueryResult.html#pageSize) */ readonly pageSize: number; /** * Returns the `GroupsQueryBuilder` object used to get the current results. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Groups.GroupsQueryResult.html#query) */ readonly query: wix_groups_backend.Groups.GroupsQueryBuilder; /** * Returns the total number of items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Groups.GroupsQueryResult.html#totalCount) */ readonly totalCount: number; /** * Returns the total number of pages the query produced. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Groups.GroupsQueryResult.html#totalPages) */ readonly totalPages: number; /** * Retrieves the next page of query results. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Groups.GroupsQueryResult.html#next) */ next(): Promise; /** * Retrieves the previous page of query results. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Groups.GroupsQueryResult.html#prev) */ prev(): Promise; } } declare namespace wix_groups_backend.JoinRequests { /** * Contains functionality for refining a JoinRequests query. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.JoinRequests.JoinRequestsQueryBuilder.html#) */ interface JoinRequestsQueryBuilder { /** * Refines a query to match items whose specified property value equals the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.JoinRequests.JoinRequestsQueryBuilder.html#eq) */ eq(propertyName: string, value: any): wix_groups_backend.JoinRequests.JoinRequestsQueryBuilder; /** * Returns the items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.JoinRequests.JoinRequestsQueryBuilder.html#find) */ find(options?: wix_groups_backend.Options): Promise; /** * Refines a query to match items whose specified property value contains any of the specified values. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.JoinRequests.JoinRequestsQueryBuilder.html#hasSome) */ hasSome(propertyName: string, values: string[]): wix_groups_backend.JoinRequests.JoinRequestsQueryBuilder; /** * Limits the number of items the query returns. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.JoinRequests.JoinRequestsQueryBuilder.html#limit) */ limit(limit: string): wix_groups_backend.JoinRequests.JoinRequestsQueryBuilder; /** * Refines a query to match items whose specified property value does not equal the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.JoinRequests.JoinRequestsQueryBuilder.html#ne) */ ne(propertyName: string, value: any): wix_groups_backend.JoinRequests.JoinRequestsQueryBuilder; /** * Adds an `or` condition to the query. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.JoinRequests.JoinRequestsQueryBuilder.html#or) */ or(query: wix_groups_backend.JoinRequests.JoinRequestsQueryBuilder): wix_groups_backend.JoinRequests.JoinRequestsQueryBuilder; /** * Sets the number of items to skip before returning query results. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.JoinRequests.JoinRequestsQueryBuilder.html#skip) */ skip(skip: string): wix_groups_backend.JoinRequests.JoinRequestsQueryBuilder; } /** * The results of a create request query, containing the retrieved items. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.JoinRequests.JoinRequestsQueryResult.html#) */ interface JoinRequestsQueryResult { /** * Returns the index of the current results page number. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.JoinRequests.JoinRequestsQueryResult.html#currentPage) */ readonly currentPage: number; /** * Returns the items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.JoinRequests.JoinRequestsQueryResult.html#items) */ readonly items: wix_groups_backend.JoinRequests.JoinRequest[]; /** * Returns the number of items in the current results page. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.JoinRequests.JoinRequestsQueryResult.html#length) */ readonly length: number; /** * Returns the query page size. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.JoinRequests.JoinRequestsQueryResult.html#pageSize) */ readonly pageSize: number; /** * Returns the `JoinRequestsQueryBuilder` object used to get the current results. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.JoinRequests.JoinRequestsQueryResult.html#query) */ readonly query: wix_groups_backend.JoinRequests.JoinRequestsQueryBuilder; /** * Returns the total number of items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.JoinRequests.JoinRequestsQueryResult.html#totalCount) */ readonly totalCount: number; /** * Returns the total number of pages the query produced. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.JoinRequests.JoinRequestsQueryResult.html#totalPages) */ readonly totalPages: number; /** * Retrieves the next page of query results. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.JoinRequests.JoinRequestsQueryResult.html#next) */ next(): Promise; /** * Retrieves the previous page of query results. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.JoinRequests.JoinRequestsQueryResult.html#prev) */ prev(): Promise; } } declare namespace wix_groups_backend.Members { /** * Contains functionality for refining a Members query. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Members.GroupMembersQueryBuilder.html#) */ interface GroupMembersQueryBuilder { /** * Adds a sort to a query, sorting by the specified properties in ascending order. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Members.GroupMembersQueryBuilder.html#ascending) */ ascending(...propertyName: string[]): wix_groups_backend.Members.GroupMembersQueryBuilder; /** * Adds a sort to a query, sorting by the specified properties in descending order. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Members.GroupMembersQueryBuilder.html#descending) */ descending(...propertyName: string[]): wix_groups_backend.Members.GroupMembersQueryBuilder; /** * Refines a query to match items whose specified property value equals the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Members.GroupMembersQueryBuilder.html#eq) */ eq(propertyName: string, value: any): wix_groups_backend.Members.GroupMembersQueryBuilder; /** * Returns the items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Members.GroupMembersQueryBuilder.html#find) */ find(options?: wix_groups_backend.Options): Promise; /** * Limits the number of items the query returns. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Members.GroupMembersQueryBuilder.html#limit) */ limit(limit: string): wix_groups_backend.Members.GroupMembersQueryBuilder; /** * Refines a query to match items whose specified property value does not equal the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Members.GroupMembersQueryBuilder.html#ne) */ ne(propertyName: string, value: any): wix_groups_backend.Members.GroupMembersQueryBuilder; /** * Sets the number of items to skip before returning query results. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Members.GroupMembersQueryBuilder.html#skip) */ skip(skip: string): wix_groups_backend.Members.GroupMembersQueryBuilder; } /** * The results of a create request query, containing the retrieved items. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Members.GroupMembersQueryResult.html#) */ interface GroupMembersQueryResult { /** * Returns the index of the current results page number. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Members.GroupMembersQueryResult.html#currentPage) */ readonly currentPage: number; /** * Returns the items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Members.GroupMembersQueryResult.html#items) */ readonly items: wix_groups_backend.Members.GroupMember[]; /** * Returns the number of items in the current results page. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Members.GroupMembersQueryResult.html#length) */ readonly length: number; /** * Returns the query page size. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Members.GroupMembersQueryResult.html#pageSize) */ readonly pageSize: number; /** * Returns the `GroupMembersQueryBuilder` object used to get the current results. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Members.GroupMembersQueryResult.html#query) */ readonly query: wix_groups_backend.Members.GroupMembersQueryBuilder; /** * Returns the total number of items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Members.GroupMembersQueryResult.html#totalCount) */ readonly totalCount: number; /** * Returns the total number of pages the query produced. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Members.GroupMembersQueryResult.html#totalPages) */ readonly totalPages: number; /** * Retrieves the next page of query results. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Members.GroupMembersQueryResult.html#next) */ next(): Promise; /** * Retrieves the previous page of query results. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Members.GroupMembersQueryResult.html#prev) */ prev(): Promise; } /** * Contains functionality for refining a Memberships query. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Members.MembershipsQueryBuilder.html#) */ interface MembershipsQueryBuilder { /** * Refines a query to match items whose specified property value equals the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Members.MembershipsQueryBuilder.html#eq) */ eq(propertyName: string, value: any): wix_groups_backend.Members.MembershipsQueryBuilder; /** * Returns the items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Members.MembershipsQueryBuilder.html#find) */ find(options?: wix_groups_backend.Options): Promise; /** * Limits the number of items the query returns. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Members.MembershipsQueryBuilder.html#limit) */ limit(limit: string): wix_groups_backend.Members.MembershipsQueryBuilder; /** * Refines a query to match items whose specified property value does not equal the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Members.MembershipsQueryBuilder.html#ne) */ ne(propertyName: string, value: any): wix_groups_backend.Members.MembershipsQueryBuilder; /** * Sets the number of items to skip before returning query results. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Members.MembershipsQueryBuilder.html#skip) */ skip(skip: string): wix_groups_backend.Members.MembershipsQueryBuilder; } /** * The results of a create request query, containing the retrieved items. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Members.MembershipsQueryResult.html#) */ interface MembershipsQueryResult { /** * Returns the index of the current results page number. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Members.MembershipsQueryResult.html#currentPage) */ readonly currentPage: number; /** * Returns the items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Members.MembershipsQueryResult.html#items) */ readonly items: wix_groups_backend.Members.Membership[]; /** * Returns the number of items in the current results page. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Members.MembershipsQueryResult.html#length) */ readonly length: number; /** * Returns the query page size. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Members.MembershipsQueryResult.html#pageSize) */ readonly pageSize: number; /** * Returns the `MembershipsQueryBuilder` object used to get the current results. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Members.MembershipsQueryResult.html#query) */ readonly query: wix_groups_backend.Members.MembershipsQueryBuilder; /** * Returns the total number of items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Members.MembershipsQueryResult.html#totalCount) */ readonly totalCount: number; /** * Returns the total number of pages the query produced. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Members.MembershipsQueryResult.html#totalPages) */ readonly totalPages: number; /** * Retrieves the next page of query results. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Members.MembershipsQueryResult.html#next) */ next(): Promise; /** * Retrieves the previous page of query results. * [Read more](https://www.wix.com/corvid/reference/wix-groups-backend.Members.MembershipsQueryResult.html#prev) */ prev(): Promise; } } declare namespace wix_http_functions.WixHttpFunctionRequest { /** * [Read more](https://www.wix.com/corvid/reference/wix-http-functions.WixHttpFunctionRequest.WixHttpFunctionRequestBody.html#) */ interface WixHttpFunctionRequestBody { /** * Returns a Promise which resolves to the body of the call in binary as a Node.js [Buffer](https://nodejs.org/docs/latest-v14.x/api/buffer.html) object. * [Read more](https://www.wix.com/corvid/reference/wix-http-functions.WixHttpFunctionRequest.WixHttpFunctionRequestBody.html#buffer) */ buffer(): Promise; /** * Returns a Promise which resolves to the body of the call as a JSON object. * [Read more](https://www.wix.com/corvid/reference/wix-http-functions.WixHttpFunctionRequest.WixHttpFunctionRequestBody.html#json) */ json(): Promise; /** * Returns a Promise which resolves to the body of the call as a string. * [Read more](https://www.wix.com/corvid/reference/wix-http-functions.WixHttpFunctionRequest.WixHttpFunctionRequestBody.html#text) */ text(): Promise; } } declare namespace wix_http_functions { /** * An object representing an incoming request received by a call to an HTTP function. * [Read more](https://www.wix.com/corvid/reference/wix-http-functions.WixHttpFunctionRequest.html#) */ interface WixHttpFunctionRequest { /** * Returns the base URL of a call to an HTTP function. * [Read more](https://www.wix.com/corvid/reference/wix-http-functions.WixHttpFunctionRequest.html#baseUrl) */ readonly baseUrl: string; /** * Returns an object representing the body of the incoming call to an HTTP function. * [Read more](https://www.wix.com/corvid/reference/wix-http-functions.WixHttpFunctionRequest.html#body) */ readonly body: wix_http_functions.WixHttpFunctionRequest.WixHttpFunctionRequestBody; /** * Returns the function name of a call to an HTTP function. * [Read more](https://www.wix.com/corvid/reference/wix-http-functions.WixHttpFunctionRequest.html#functionName) */ readonly functionName: string; /** * Returns the HTTP header fields used in a call to an HTTP function. * [Read more](https://www.wix.com/corvid/reference/wix-http-functions.WixHttpFunctionRequest.html#headers) */ readonly headers: any; /** * Returns the IP address of the client who called the HTTP function. * [Read more](https://www.wix.com/corvid/reference/wix-http-functions.WixHttpFunctionRequest.html#ip) */ readonly ip: string; /** * Returns the HTTP method used in calling an HTTP function. * [Read more](https://www.wix.com/corvid/reference/wix-http-functions.WixHttpFunctionRequest.html#method) */ readonly method: string; /** * Returns the path of the URL used to call an HTTP function. * [Read more](https://www.wix.com/corvid/reference/wix-http-functions.WixHttpFunctionRequest.html#path) */ readonly path: string[]; /** * Returns the query fields and values of the URL used to call an HTTP function. * [Read more](https://www.wix.com/corvid/reference/wix-http-functions.WixHttpFunctionRequest.html#query) */ readonly query: any; /** * Returns the full URL of a call to an HTTP function. * [Read more](https://www.wix.com/corvid/reference/wix-http-functions.WixHttpFunctionRequest.html#url) */ readonly url: string; } /** * An object representing a response to an HTTP function request. * [Read more](https://www.wix.com/corvid/reference/wix-http-functions.WixHttpFunctionResponse.html#) */ interface WixHttpFunctionResponse { /** * Sets or gets the body of the response as a string, object or binary buffer. * [Read more](https://www.wix.com/corvid/reference/wix-http-functions.WixHttpFunctionResponse.html#body) */ body: string | Buffer | any; /** * Sets or gets the HTTP response header fields. * [Read more](https://www.wix.com/corvid/reference/wix-http-functions.WixHttpFunctionResponse.html#headers) */ headers: any; /** * Sets or gets the HTTP status code of the response. * [Read more](https://www.wix.com/corvid/reference/wix-http-functions.WixHttpFunctionResponse.html#status) */ status: number; } /** * An object used to customize a response to an HTTP function call, including a HTTP response code you select. */ type WixHttpFunctionCustomResponseOptions = { /** * The response's HTTP status code. */ status?: number; /** * The response's body. */ body?: string | Buffer | any; /** * The response's header fields. The `headers` property contains an object of `key:value` pairs where the `key` is the header field name and the `value` is the header field value. */ headers?: any; }; /** * An object used to set up a standard response to an HTTP function call, including a pre-set (unchangeable) HTTP response code. */ type WixHttpFunctionResponseOptions = { /** * The response's body. */ body?: string | Buffer | any; /** * The response's header fields. The `headers` property contains an object of `key:value` pairs where the `key` is the header field name and the `value` is the header field value. */ headers?: any; }; } declare namespace wix_marketing_backend { /** * The Coupons API is used to manage your site's coupons. * [Read more](https://www.wix.com/corvid/reference/wix-marketing-backend.Coupons.html#) */ interface Coupons { /** * Creates a new coupon. * [Read more](https://www.wix.com/corvid/reference/wix-marketing-backend.Coupons.html#createCoupon) */ createCoupon(couponInfo: wix_marketing_backend.Coupons.CouponInfo): Promise; /** * Deletes an existing coupon. * [Read more](https://www.wix.com/corvid/reference/wix-marketing-backend.Coupons.html#deleteCoupon) */ deleteCoupon(couponId: string): Promise; /** * Updates the specified fields of an existing coupon. * [Read more](https://www.wix.com/corvid/reference/wix-marketing-backend.Coupons.html#updateCouponFields) */ updateCouponFields(couponId: string, couponInfo: wix_marketing_backend.Coupons.CouponInfo): Promise; } namespace Coupons { /** * An object representing coupon information. */ type AppliedCoupon = { /** * Coupon ID. */ _id: string; /** * Name of coupon. */ name: string; /** * Coupon code. Must be unique for all coupons in your site. Maximum 20 characters. */ code: string; /** * Coupon valid from. */ startTime: Date; /** * Coupon expiration time. */ expirationTime?: Date; /** * Maximum number of times a coupon can be used. Note that multiple purchases by the same customer or purchases by different customers are both counted toward usage limit. */ usageLimit?: number; /** * Indicates whether the coupon is currently [active](https://support.wix.com/en/article/activating-and-deactivating-coupons-in-wix-stores). */ active?: boolean; /** * Scope of the coupon. When no scope is defined, the coupon applies to all items in all `namespaces` in the site. */ scope?: wix_marketing_backend.Coupons.CouponScope; /** * Coupon creation date. */ _dateCreated: string; /** * Whether the coupon is expired. */ expired?: boolean; /** * Coupon display data in the dashboard. Returned if the coupon is only valid for a specific product/booking/event. */ displayData?: wix_marketing_backend.Coupons.DisplayData; /** * Coupon type. For example, "PercentOff", "FreeShipping", etc. */ type: string; /** * Maximum number of times the coupon can be used **per customer**. */ limitPerCustomer?: number; /** * Indicates whether the coupon is limited to 1 discount per order. If true and a customer pays for multiple items the coupon applies to, only the lowest priced item is discounted. Coupons with a `bookings` `namespace` are always limited to one item. */ limitedToOneItem?: boolean; /** * The coupon is only applicable when the order subtotal is over this amount. */ minimumSubtotal?: number; /** * Coupon type: Fixed price discount. */ moneyOffAmount?: number; /** * Coupon type: Discount as a percentage. */ percentOffRate?: number; /** * Coupon type: Specific sale price. Currently only supported for coupons with a `stores` `namespace`. */ fixedPriceAmount?: number; /** * Coupon type: Free products when making a purchase. `buyXGetY` is an object that specifies `x` and `y` in the following scenario: if a visitor purchases x number of products, they receive y number of products for free. Currently only supported for coupons with a `stores` `namespace`. */ buyXGetY?: wix_marketing_backend.Coupons.CouponTypeBuyXGetY; /** * Coupon type: Free shipping. If true, the coupon applies to all items in all `namespaces` in the site. */ freeShipping?: boolean; }; /** * An object representing coupon information. */ type Coupon = { /** * Coupon ID. */ _id: string; /** * Name of coupon. */ name: string; /** * Coupon code. Must be unique for all coupons in your site. Maximum 20 characters. */ code: string; /** * Coupon valid from this date and time. */ startTime: Date; /** * Coupon expires at this date and time. */ expirationTime?: Date; /** * Maximum number of times a coupon can be used. Note that multiple purchases by the same customer or purchases by different customers are both counted toward usage limit. */ usageLimit?: number; /** * Indicates whether the coupon is currently [active](https://support.wix.com/en/article/activating-and-deactivating-coupons-in-wix-stores). */ active?: boolean; /** * Scope of the coupon. When no scope is defined, the coupon applies to all items in all `namespaces` in the site. */ scope?: wix_marketing_backend.Coupons.CouponScope; /** * Coupon creation date. */ _dateCreated: string; /** * Whether the coupon is expired. */ expired?: boolean; /** * Coupon display data in the dashboard. Returned if the coupon is only valid for a specific product/booking/event. */ displayData?: wix_marketing_backend.Coupons.DisplayData; /** * Coupon type. For example, "PercentOff", "FreeShipping", etc. */ type: string; /** * Maximum number of times the coupon can be used **per customer**. Not supported by Wix Bookings. */ limitPerCustomer?: number; /** * Indicates whether the coupon is limited to 1 discount per order. If true and a customer pays for multiple items the coupon applies to, only the lowest priced item is discounted. Coupons with a `bookings` `namespace` are always limited to one item. */ limitedToOneItem?: boolean; /** * The coupon is only applicable when the order subtotal is over this amount. */ minimumSubtotal?: number; /** * Coupon type: Fixed price discount. */ moneyOffAmount?: number; /** * Coupon type: Discount as a percentage. */ percentOffRate?: number; /** * Coupon type: Specific sale price. Currently only supported for coupons with a `stores` `namespace`. */ fixedPriceAmount?: number; /** * Coupon type: Free products when making a purchase. `buyXGetY` is an object that specifies `x` and `y` in the following scenario: if a visitor purchases x number of products, they receive y number of products for free. Currently only supported for coupons with a `stores` `namespace`. */ buyXGetY?: wix_marketing_backend.Coupons.CouponTypeBuyXGetY; /** * Coupon type: Free shipping. If true, the coupon applies to all items in all `namespaces` in the site. */ freeShipping?: boolean; /** * ID of the app that created the coupon. Empty if created by the site owner. */ appId?: string; /** * How many times the coupon was used. */ numberOfUsages: number; }; type CouponId = { /** * ID of the new coupon. */ id: string; }; /** * An object representing information for creating or updating a coupon. */ type CouponInfo = { /** * Name of coupon. */ name: string; /** * Coupon code. Must be unique for all coupons in your site. Maximum 20 characters. */ code: string; /** * Coupon valid from this date and time. */ startTime: Date; /** * Coupon expires at this date and time. */ expirationTime?: Date; /** * Maximum number of times a coupon can be used. Note that multiple purchases by the same customer or purchases by different customers are both counted toward usage limit. */ usageLimit?: number; /** * Indicates whether the coupon is limited to 1 discount per order. If true and a customer pays for multiple items the coupon applies to, only the lowest priced item is discounted. Coupons with a `bookings` `namespace` are always limited to one item. */ limitedToOneItem?: boolean; /** * Indicates whether the coupon is currently [active](https://support.wix.com/en/article/activating-and-deactivating-coupons-in-wix-stores). */ active?: boolean; /** * The coupon is only applicable when the order subtotal is over this amount. */ minimumSubtotal?: number; /** * Scope of the coupon. When no scope is defined, the coupon applies to all items in all `namespaces` in the site. */ scope?: wix_marketing_backend.Coupons.CouponScope; /** * Coupon type: Fixed price discount. */ moneyOffAmount?: number; /** * Coupon type: Discount as a percentage. */ percentOffRate?: number; /** * Coupon type: Specific sale price. Currently only supported for coupons with a `stores` `namespace`. */ fixedPriceAmount?: number; /** * Coupon type: Free products when making a purchase. `buyXGetY` is an object that specifies `x` and `y` in the following scenario: if a visitor purchases x number of products, they receive y number of products for free. Currently only supported for coupons with a `stores` `namespace`. */ buyXGetY?: wix_marketing_backend.Coupons.CouponTypeBuyXGetY; /** * Coupon type: Free shipping. If true, the coupon applies to all items in all `namespaces` in the site. */ freeShipping?: boolean; /** * Maximum number of times the coupon can be used **per customer**. Not supported by Wix Bookings. */ limitPerCustomer?: number; /** * Whether the coupon applies to subscription products. */ appliesToSubscriptions?: boolean; /** * Specifies the amount of cycles to apply the discount to for a subscription item. * * Can only be set when `appliesToSubscriptions` is `TRUE` and `scope.namespace` is `pricingPlans`. * If `discountedCycleCount` is empty, the coupon applies to all available cycles. * * Min: `1` * Max: `999` */ discountedCycleCount?: number; }; /** * An object containing the scope of a coupon. */ type CouponScope = { /** * Wix application for which the coupon is applicable. * One of the following: * * + `"stores"` * + `"bookings"` * + `"events"` * + `"pricingPlans"` */ namespace: string; /** * Group within a `namespace` for which the coupon is applicable. If no group is specified, the coupon applies to all items in the namespace. `group` is required in some cases. See the table in [`createCoupon()`](#createCoupon) for a list of currently supported groups for each namespace. */ group?: wix_marketing_backend.Coupons.ScopeGroup; }; /** * An object defining the number of purchases required and the number of free items received for a "Buy X Get Y" coupon type. */ type CouponTypeBuyXGetY = { /** * Number of purchased items required to receive free items. */ x: number; /** * Number of items received for free if required number of items were purchased. */ y: number; }; /** * An object representing display data for the product associated with the coupon. */ type DisplayData = { /** * Display name. */ name: string; /** * Formatted price for display. */ formattedPrice: string; /** * Media ID for the product associated with the coupon. */ mediaItem: string; }; /** * An object specifying the group within a `CouponScope` * `namespace` for which the coupon is applicable. */ type ScopeGroup = { /** * Name of the group. */ name: string; /** * ID of the specific item in the group for which the coupon is applicable. If no `entityId` is specified, the coupon applies to all items in the group. In some cases when a group is specified, an `entityId` is required. See the table in [`createCoupon()`](#createCoupon) for a list of currently supported entities for each namespace and group. */ entityId?: string; }; } /** * Events that are triggered by actions related to Wix Marketing. * [Read more](https://www.wix.com/corvid/reference/wix-marketing-backend.Events.html#) */ interface Events { /** * An event that is triggered when a coupon is used. * [Read more](https://www.wix.com/corvid/reference/wix-marketing-backend.Events.html#onCouponApplied) */ onCouponApplied(event: wix_marketing_backend.Events.CouponAppliedEvent): void; /** * An event that is triggered when a coupon is created. * [Read more](https://www.wix.com/corvid/reference/wix-marketing-backend.Events.html#onCouponCreated) */ onCouponCreated(event: wix_marketing_backend.Events.CouponEvent): void; /** * An event that is triggered when a coupon is deleted. * [Read more](https://www.wix.com/corvid/reference/wix-marketing-backend.Events.html#onCouponDeleted) */ onCouponDeleted(event: wix_marketing_backend.Events.CouponDeletedEvent): void; /** * An event that is triggered when a coupon is updated. * [Read more](https://www.wix.com/corvid/reference/wix-marketing-backend.Events.html#onCouponUpdated) */ onCouponUpdated(event: wix_marketing_backend.Events.CouponEvent): void; } namespace Events { /** * An object representing a custom coupon event. */ type CouponAppliedEvent = { /** * Event metadata. */ metadata: wix_marketing_backend.Events.Metadata; /** * Event data. */ data: wix_marketing_backend.Events.Data; }; type CouponAppliedEventBody = { /** * Applied coupon information. */ coupon: wix_marketing_backend.Coupons.Coupon; /** * ID of app that applied the coupon (Stores, Bookings, Events). */ wixAppId: string; /** * ID of the entity that the coupon was applied to (orderId, bookingId, etc.). */ wixAppOrderId: string; }; /** * An object representing a custom coupon event. */ type CouponDeletedEvent = { /** * Event metadata. */ metadata: wix_marketing_backend.Events.Metadata; }; /** * An object representing a coupon event. */ type CouponEvent = { /** * Event metadata. */ metadata: wix_marketing_backend.Events.Metadata; /** * Coupon information. */ entity: wix_marketing_backend.Coupons.Coupon; }; /** * An object representing a custom event's data. */ type Data = { /** * Applied coupon information. */ coupon: wix_marketing_backend.Coupons.Coupon; /** * ID of the entity that the coupon was applied to (orderId, bookingId, etc.). */ wixAppOrderId: string; /** * ID of the Wix app that applied the coupon. * + Wix Stores: `1380b703-ce81-ff05-f115-39571d94dfcd` * + Wix Bookings: `13d21c63-b5ec-5912-8397-c3a5ddb27a97` * + Wix Events: `140603ad-af8d-84a5-2c80-a0f60cb47351` */ wixAppId: string; }; /** * An object representing a coupon. */ type Metadata = { /** * Event ID. */ id: string; /** * Coupon ID associated with this event. */ entityId: string; /** * Event timestamp. */ eventTime: string; /** * Whether this event was triggered as a result of a privacy regulation application (for example, [GDPR](https://support.wix.com/en/article/gdpr-frequently-asked-questions)). For advanced users. */ triggeredByAnonymizeRequest: boolean; }; } } declare namespace wix_media_backend { /** * Events triggered by the Wix Media API. * [Read more](https://www.wix.com/corvid/reference/wix-media-backend.Events.html#) */ interface Events { /** * An event that triggers when an audio file has completed transcoding. * [Read more](https://www.wix.com/corvid/reference/wix-media-backend.Events.html#onAudioTranscoded) */ onAudioTranscoded(event: wix_media_backend.Events.FileEvent): void; /** * An event that triggers when a file has completed uploading. * [Read more](https://www.wix.com/corvid/reference/wix-media-backend.Events.html#onFileUploaded) */ onFileUploaded(event: wix_media_backend.Events.FileEvent): void; /** * An event that triggers when a video file has completed transcoding. * [Read more](https://www.wix.com/corvid/reference/wix-media-backend.Events.html#onVideoTranscoded) */ onVideoTranscoded(event: wix_media_backend.Events.FileEvent): void; } namespace Events { /** * An object representing an uploaded file and upload context. */ type FileEvent = { /** * Information about the uploaded file. */ fileInfo: wix_media_backend.MediaManager.FileInfo; /** * An object of key:value string pairs that was sent * when the file was uploaded. */ context: any; }; } /** * The `mediaManager` module contains functionality for working with * the media that is stored in your site's [Media Manager](https://support.wix.com/en/article/about-the-media-manager-568956). * [Read more](https://www.wix.com/corvid/reference/wix-media-backend.MediaManager.html#) */ interface MediaManager { /** * Returns a download URL for downloading files from the Media Manager. * [Read more](https://www.wix.com/corvid/reference/wix-media-backend.MediaManager.html#downloadFiles) */ downloadFiles(fileUrls: string[]): Promise; /** * Returns a download URL for downloading a folder from the Media Manager. * [Read more](https://www.wix.com/corvid/reference/wix-media-backend.MediaManager.html#downloadFolder) */ downloadFolder(folderId: string): Promise; /** * Gets a temporary download URL with a token for a specified file in the Media Manager. * [Read more](https://www.wix.com/corvid/reference/wix-media-backend.MediaManager.html#getDownloadUrl) */ getDownloadUrl(fileUrl: string, expirationTime?: number, downloadedFileName?: string, expiredTokenRedirectUrl?: string): Promise; /** * Gets a file's information from the Media Manager by `fileUrl`. * [Read more](https://www.wix.com/corvid/reference/wix-media-backend.MediaManager.html#getFileInfo) */ getFileInfo(fileUrl: string): Promise; /** * **Deprecated.** * This function will continue to work, but a newer version is available. Use the [`getDownloadUrl`](https://www.wix.com/velo/reference/wix-media-backend/mediamanager-obj/getdownloadurl) function instead. * [Read more](https://www.wix.com/corvid/reference/wix-media-backend.MediaManager.html#getFileUrl) */ getFileUrl(fileUrl: string): Promise; /** * Gets a folder's information from the Media Manager by `folderId`. * [Read more](https://www.wix.com/corvid/reference/wix-media-backend.MediaManager.html#getFolderInfo) */ getFolderInfo(folderId: string): Promise; /** * Gets an upload URL for uploading a file to the media manager. * [Read more](https://www.wix.com/corvid/reference/wix-media-backend.MediaManager.html#getUploadUrl) */ getUploadUrl(path: string, options: wix_media_backend.MediaManager.UploadOptions): Promise; /** * Gets a video file's playback URL from the Media Manager. * [Read more](https://www.wix.com/corvid/reference/wix-media-backend.MediaManager.html#getVideoPlaybackUrl) */ getVideoPlaybackUrl(fileUrl: string, format: string): Promise; /** * Imports a file to the Media Manager from a URL. * [Read more](https://www.wix.com/corvid/reference/wix-media-backend.MediaManager.html#importFile) */ importFile(path: string, url: string, options: wix_media_backend.MediaManager.UploadOptions): Promise; /** * Gets a list of files from the Media Manager by `parentFolderId` (or root). * [Read more](https://www.wix.com/corvid/reference/wix-media-backend.MediaManager.html#listFiles) */ listFiles(filters?: wix_media_backend.MediaManager.FileFilterOptions, sorting?: wix_media_backend.MediaManager.SortingOptions, paging?: wix_media_backend.MediaManager.PagingOptions): Promise; /** * Gets a list of folders from the Media Manager by `parentFolderId` (or root). * [Read more](https://www.wix.com/corvid/reference/wix-media-backend.MediaManager.html#listFolders) */ listFolders(filters?: wix_media_backend.MediaManager.FolderFilterOptions, sorting?: wix_media_backend.MediaManager.SortingOptions, paging?: wix_media_backend.MediaManager.PagingOptions): Promise; /** * Moves single or multiple files to the Media Manager's trash. * [Read more](https://www.wix.com/corvid/reference/wix-media-backend.MediaManager.html#moveFilesToTrash) */ moveFilesToTrash(fileUrls: string[]): Promise; /** * Moves single or multiple folders, including their files and sub-folders, to the Media Manager's trash. * [Read more](https://www.wix.com/corvid/reference/wix-media-backend.MediaManager.html#moveFoldersToTrash) */ moveFoldersToTrash(folderIds: string[]): Promise; /** * Uploads a file to the Media Manager from a [buffer](https://nodejs.org/api/buffer.html#buffer_static_method_buffer_from_string_encoding). * [Read more](https://www.wix.com/corvid/reference/wix-media-backend.MediaManager.html#upload) */ upload(path: string, fileContent: Buffer, fileName: string, options: wix_media_backend.MediaManager.UploadOptions): Promise; } namespace MediaManager { /** * An object containing information about the file that was listed. */ type File = { /** * **Deprecated**. Use the `fileUrl` property instead. * * The `fileName` property is the internal name (unique identifier) which is generated when a file is uploaded by the Media Manager, returned from the [`importFile()`](#importFile), or [`upload()`](#upload) functions. The name is the string located in the file's URL. Click [here](https://www.wix.com/velo/forum/tips-tutorials-examples/creating-a-url-for-a-media-file-or-the-truth-about-getfileurl) to learn more. Use this name when calling the [`getFileInfo()`](#getFileInfo), [`getFileUrl()`](#getFileUrl), * and [`getVideoPlaybackUrl()`](#getVideoPlaybackUrl) functions. */ fileName: string; /** * The file's Wix media URL in the following format: `'wix:image://v1//#originWidth=&originHeight=[&watermark=]'`. */ fileUrl: string; /** * File hash. */ hash: string; /** * Size of the listed file in bytes. */ sizeInBytes: number; /** * [Mime type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of * the listed file. */ mimeType: string; /** * Media type of the listed file. * One of: * * + `"audio"` * + `"document"` * + `"image"` * + `"shape"` * + `"video"` */ mediaType: string; /** * Whether the link to the listed file is * public or private. Private links require a token to be used. */ isPrivate: boolean; /** * ID of the file's parent folder. */ parentFolderId: string; /** * Original name of the uploaded file. This is the display name * that appears in the Media Manager. */ originalFileName: string; /** * URL of the file's icon. */ iconUrl: string; /** * List of labels assigned to the file by the Media Manager. */ labels: string[]; /** * Media height. */ height: string; /** * Media width. */ width: string; /** * Date the file was created. */ _createdDate: Date; /** * Date the file was updated. */ _updatedDate: Date; }; /** * File filter options. */ type FileFilterOptions = { /** * ID of the parent folder of the files to list. */ parentFolderId?: string; /** * Media type of the files to list. Leave blank to list files of all media types. * One of: * * + `"audio"` * + `"document"` * + `"image"` * + `"shape"` * + `"video"` */ mediaType?: string; /** * Whether the link to the files you want to list is public or private. Leave blank to include both public and private files. */ isPrivate?: boolean; }; /** * An object containing information about the file that was uploaded. */ type FileInfo = { /** * **Deprecated**. Use the `fileUrl` property instead. * * The `fileName` property is the internal name (unique identifier) which is generated when a file is uploaded by the Media Manager, returned from the [`importFile()`](#importFile), or [`upload()`](#upload) functions. The name is the string located in the file's URL. Click [here](https://www.wix.com/velo/forum/tips-tutorials-examples/creating-a-url-for-a-media-file-or-the-truth-about-getfileurl) to learn more. Use this name when calling the [`getFileInfo()`](#getFileInfo), [`getFileUrl()`](#getFileUrl), * and [`getVideoPlaybackUrl()`](#getVideoPlaybackUrl) functions. */ fileName: string; /** * The file's Wix media URL in the following format: `'wix:image://v1//#originWidth=&originHeight=[&watermark=]'`. */ fileUrl: string; /** * File hash. */ hash: string; /** * Size of the uploaded file in bytes. */ sizeInBytes: number; /** * [Mime type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of * the uploaded file. */ mimeType: string; /** * Type of the file that was uploaded. * One of: * * + `"audio"` * + `"document"` * + `"image"` * + `"shape"` * + `"video"` */ mediaType: string; /** * Whether the link to the uploaded file is * public or private. Private links require a token to be used. */ isPrivate: boolean; /** * ID of the file's parent folder. */ parentFolderId: string; /** * Original name of the uploaded file. This is the display name * that appears in the Media Manager. */ originalFileName: string; /** * Status of the file that was uploaded. * One of: * * + `"IN-DOWNLOAD-QUEUE"` * + `"IN-QUEUE"` * + `"READY"` */ opStatus: string; /** * URL where the file was uploaded from. */ sourceURL: string; /** * URL of the file's icon. */ iconUrl: string; /** * List of labels assigned to the file by the Media Manager. */ labels: string[]; /** * Media height. */ height: string; /** * Media width. */ width: string; /** * Date the file was created. */ _createdDate: Date; /** * Date the file was updated. */ _updatedDate: Date; }; /** * Folder filter options. */ type FolderFilterOptions = { /** * ID of the parent folder of the folders to list. */ parentFolderId?: string; }; /** * An object containing information about the folder. */ type FolderInfo = { /** * ID of the folder. Internal name (unique identifier) which is generated when a folder is created by the Media Manager. Use this ID when calling the [`listFiles()`](#listFiles), and [`listFolders()`](#listFolders) functions. */ folderId: string; /** * Name of the folder. */ folderName: string; /** * ID of the folder's parent folder. Use this ID when calling the [`listFiles()`](#listFiles), and [`listFolders()`](#listFolders) functions. */ parentFolderId: string; /** * Date the folder was created. */ _createdDate: Date; /** * Date the folder was updated. */ _updatedDate: Date; }; /** * An object containing information about the media options of a file to upload. */ type MediaOptions = { /** * Type of file to upload. * One of: * * + `"audio"` * + `"document"` * + `"image"` * + `"shape"` * + `"video"` */ mediaType?: string; /** * [Mime type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of * the file to import. The specified value must match the actual mime type of * the file's content. */ mimeType?: string; }; /** * An object containing information about the metadata options of a file to upload. */ type MetadataOptions = { /** * Whether the link to the uploaded file will * be public or private. Private links require a token to be used. Defaults to * `false`. */ isPrivate?: boolean; /** * Indicates if the file was uploaded by a * site visitor. Files uploaded by visitors are tagged in the Media Manager as * being added by a visitor. Defaults to `true`. */ isVisitorUpload?: boolean; /** * An object of key:value string pairs that is sent * back in the [`onFileUploaded()`](wix-media-backend.Events.html#onFileUploaded) * event. */ context?: any; /** * In this case the fileName is the name you would like your file to appear as in the Media Manager. */ fileName?: string; }; /** * Pagination options. */ type PaginationOptions = { /** * Amount of records to retrieve. */ limit?: number; /** * Number of records to skip. */ skip?: number; }; /** * Paging options. */ type PagingOptions = { /** * Amount of records to retrieve. Defaults to 20. */ limit?: number; /** * Number of records to skip. */ skip?: number; }; /** * Sorting options. **Note:** When sorting by `"originalFileName"`, folders and file names that begin with capital letters come before lowercase in '`asc`' order. */ type SortOptions = { /** * Direction of sort: `"asc"` or `"desc"`. Defaults to `"asc"`. */ order?: string; /** * Field to sort by: `"folderName"` or `"_updatedDate"`. Deafults to `"_updatedDate"`. */ field?: string; }; /** * Sorting options. **Note:** When sorting by '`originalFileName`', folders and file names that begin with capital letters come before lowercase in '`asc`' order. */ type SortingOptions = { /** * Direction of sort: `"asc"` or `"desc"`. Defaults to `"asc"`. */ order?: string; /** * Field to sort by: `"originalFileName"` or `"_updatedDate"`. Defaults to `"_updatedDate"`. */ field?: string; }; /** * An object containing information about the options of a file to upload. */ type UploadOptions = { /** * Media options of the file to upload. */ mediaOptions?: wix_media_backend.MediaManager.MediaOptions; /** * Metadata options of the file to upload. */ metadataOptions?: wix_media_backend.MediaManager.MetadataOptions; }; /** * An object containing information about an upload URL. */ type UploadUrl = { /** * The URL used for sending a POST or PUT request to upload a file to the Media Manager. */ uploadUrl: string; /** * **Deprecated.** Use the `uploadUrl` property instead. * * The token to use with the file POST. * * **Note:** The `uploadToken` property returns empty, as the token is now included in the upload URL. The `uploadToken` property will continue to work, but we recommend that you use the updated `uploadUrl` parameter instead. */ uploadToken: string; }; } } declare namespace wix_members { /** * The Authentication API contains functionality for authenticating members from frontend code. * [Read more](https://www.wix.com/corvid/reference/wix-members.Authentication.html#) */ interface Authentication { /** * Logs the current member into the site using the given session token. * [Read more](https://www.wix.com/corvid/reference/wix-members.Authentication.html#applySessionToken) */ applySessionToken(sessionToken: string): Promise; /** * Indicates whether the site visitor is a logged-in member. * [Read more](https://www.wix.com/corvid/reference/wix-members.Authentication.html#loggedIn) */ loggedIn(): boolean; /** * Logs a registered member in with an email and password. * [Read more](https://www.wix.com/corvid/reference/wix-members.Authentication.html#login) */ login(email: string, password: string): Promise; /** * Logs the current member out of the site. * [Read more](https://www.wix.com/corvid/reference/wix-members.Authentication.html#logout) */ logout(): void; /** * Sets the function that runs when a member logs in. * [Read more](https://www.wix.com/corvid/reference/wix-members.Authentication.html#onLogin) */ onLogin(handler: wix_members.Authentication.LoginHandler): void; /** * Sets the function that runs when a member logs out. * [Read more](https://www.wix.com/corvid/reference/wix-members.Authentication.html#onLogout) */ onLogout(handler: wix_members.Authentication.LogoutHandler): void; /** * Prompts the current site visitor with a password reset modal. * [Read more](https://www.wix.com/corvid/reference/wix-members.Authentication.html#promptForgotPassword) */ promptForgotPassword(): Promise; /** * Prompts the current visitor to log in as a site member. * [Read more](https://www.wix.com/corvid/reference/wix-members.Authentication.html#promptLogin) */ promptLogin(options?: wix_members.Authentication.LoginOptions): Promise; /** * Registers a new site member. * [Read more](https://www.wix.com/corvid/reference/wix-members.Authentication.html#register) */ register(email: string, password: string, options?: wix_members.Authentication.RegistrationOptions): Promise; /** * Sends a site member an email with a link to set their password. * [Read more](https://www.wix.com/corvid/reference/wix-members.Authentication.html#sendSetPasswordEmail) */ sendSetPasswordEmail(email: string, options?: wix_members.Authentication.SetPasswordEmailOptions): Promise; } namespace Authentication { /** * An object that contains information about a site contact. */ type ContactInfo = { /** * Contact's first name. */ firstName?: string; /** * Contact's last name. */ lastName?: string; /** * Contact's image source URL. */ picture?: string; /** * List of contact's email addresses. * When creating a contact, if no phone number is * provided, at least 1 email address must be provided. */ emails?: string[]; /** * List of contact's phone numbers. * When creating a contact, if no email is * provided, at least 1 phone number must be provided. */ phones?: string[]; /** * List of contact's labels. [Labels](https://support.wix.com/en/article/creating-contact-labels) * are used to organize contacts. When setting the `labels` property, you can * only list labels that already exist in your site's [Contact List](https://support.wix.com/en/article/accessing-your-contact-list). */ labels?: string[]; /** * Contact's language. */ language?: string; /** * Any * number of custom fields. [Custom fields](https://support.wix.com/en/article/adding-custom-fields-to-contacts) * are used to store additional information about your site's contacts. When * setting a custom field, use a key:value pair. The key must match one of the `key` properties of the [objects](wix-crm-backend/contacts/extendedfieldsqueryresult/items) * returned by [queryExtendedFields()](/wix-crm-backend/contacts/queryextendedfields) with the `custom.` prefix removed. * You can only set values for custom fields that already exist in the Contacts * application. */ customFields?: string | number | Date; }; type LoginEvent = { /** * Logged-in member. */ member: wix_members_backend.Members.Member; }; type LoginOptions = { /** * Whether to display the `"login"` or `"signup"` prompt. * * Defaults to `"signup"`. */ mode?: string; /** * Whether the login form should be modal (`true`) * or full screen (`false`). * * Defaults to `false` (full screen). */ modal?: boolean; }; /** * An object that contains information about a site registration. */ type RegistrationOptions = { /** * Contact information. */ contactInfo?: wix_members.Authentication.ContactInfo; /** * Sets the [privacy status](https://support.wix.com/en/article/member-privacy-settings-for-groups) of a new member upon registration. * One of: * * - `"PUBLIC"`: Sets the new member status to public. A member whose status is public is a member of the site's community. * - `"PRIVATE"`: Sets the new member status to private. A member whose status is private is not a member of the site's community. * * Defaults to `"PRIVATE"`. */ privacyStatus?: string; }; type RegistrationResult = { /** * Registration status. * * One of: * * - `"PENDING"`: The member must be approved before they can log in to the site. * - `"ACTIVE"`: The member is approved and can log in to the site. */ status: string; /** * Token for approving the member * with the [`approveByToken()`](wix-members-backend/authentication/approveByToken) * function. `approvalToken` is safe to pass via email or from page code to * backend code. * * Returned when `status` is `"PENDING"`. */ approvalToken?: string; /** * The registered member. * * Returned when `status` is `"ACTIVE"`. */ member?: wix_members.CurrentMember.Member; }; type SetPasswordEmailOptions = { /** * Whether to hide the "ignore this email" message. * * If `false`, the email tells the member * they can safely ignore * if they did not request the password change. * * Defaults to `false`. */ hideIgnoreMessage?: boolean; }; type LoginHandler = (currentMember: wix_members.CurrentMember) => void; type LogoutHandler = () => void; } /** * The CurrentMember API contains functionality for viewing and managing site members from frontend code. * [Read more](https://www.wix.com/corvid/reference/wix-members.CurrentMember.html#) */ interface CurrentMember { /** * Retrieves the currently logged-in member. * [Read more](https://www.wix.com/corvid/reference/wix-members.CurrentMember.html#getMember) */ getMember(options?: wix_members.CurrentMember.FieldsetOptions): Promise; /** * Retrieves the member's roles. * [Read more](https://www.wix.com/corvid/reference/wix-members.CurrentMember.html#getRoles) */ getRoles(): Promise; /** * Removes the currently logged-in member from the site community and sets their profile to private. * [Read more](https://www.wix.com/corvid/reference/wix-members.CurrentMember.html#makeProfilePrivate) */ makeProfilePrivate(): Promise; /** * Joins the currently logged-in member to the site community and sets their profile to public. * [Read more](https://www.wix.com/corvid/reference/wix-members.CurrentMember.html#makeProfilePublic) */ makeProfilePublic(): Promise; } namespace CurrentMember { type Address = { /** * Street address ID. */ _id?: string; /** * Street address object, with number and name in separate fields. */ streetAddress?: wix_members.CurrentMember.StreetAddress; /** * Main address line, usually street and number, as free text. */ addressLine?: string; /** * Free text providing more detailed address information, * such as apartment, suite, or floor. */ addressLine2?: string; /** * City name. */ city?: string; /** * Code for a subdivision (such as state, prefecture, or province) in an * [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format. */ subdivision?: string; /** * 2-letter country code in an * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. */ country?: string; /** * Postal code. */ postalCode?: string; }; /** * Member's contact information. Contact information is stored in the */ type ContactDetails = { /** * Contact's first name. */ firstName?: string; /** * Contact's last name. */ lastName?: string; /** * List of phone numbers. */ phones: string[]; /** * List of email addresses. */ emails: string[]; /** * List of street addresses. */ addresses: wix_members.CurrentMember.Address[]; /** * Contact's birthdate, formatted as `"YYYY-MM-DD"`. * * Example: `"2020-03-15"` for March 15, 2020. */ birthdate?: string; /** * Contact's company name. */ company?: string; /** * Contact's job title. */ jobTitle?: string; /** * Custom fields, * [structured as key:object pairs](wix-members/introduction#data-structure). * Custom field keys are defined in the * [Contacts Extended Fields API](wix-crm-backend/contacts). * The paired object contains the `name` and `value` properties, * where `name` is the display name and `value` is the value stored for the member. * * Only custom fields * [added to the member profile in the Dashboard](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fmembers-account) * are available through the Members API. * Empty fields are not returned. * * When updating a member, `name` is ignored. */ customFields: object; }; type CustomField = { /** * Field display name. */ name: string; /** * Value stored in the field. */ value: string | number; }; type FieldsetOptions = { /** * Predefined sets of fields to return. * When multiple fieldsets are provided, the union of all the included fields is returned. * * Predefined fieldsets are one of: * * - `"FULL"`: Returns all fields. * - `"PUBLIC"`: Returns `_id` and all fields under `profile`. With this fieldset, `profile.status`, `profile.privacyStatus`, and `profile.activityStatus` are returned as `"UNKNOWN"`. * * Defaults to `[ "FULL" ]`. */ fieldsets: string[]; }; /** * Member's profile photo. */ type Image = { /** * **Deprecated.** Wix Media image ID, * set when the member selects an image from Wix Media. */ _id: string; /** * Image URL. */ url: string; /** * Original image width. */ height: number; /** * Original image height. */ width: number; /** * X-axis offset. * * Defaults to `0`. */ offsetX: number; /** * Y-axis offset. * * Defaults to `0`. */ offsetY: number; }; /** * Updated member. */ type Member = { /** * Member ID. */ _id: string; /** * Email used by the member to log in to the site. */ loginEmail?: string; /** * Member site access status. * * * * One of: * * - `"PENDING"`: Member created and is waiting for approval by site owner. * - `"APPROVED"`: Member can log in to the site. * - `"OFFLINE"`: Member is a [guest author](https://support.wix.com/en/article/wix-blog-adding-guest-authors-to-your-blog) for the site blog and cannot log in to the site. * - `"BLOCKED"`: Member is blocked and cannot log in to the site. * - `"UNKNOWN"`: Insufficient permissions to get the status. * */ status: string; /** * Contact ID. */ contactId: string; /** * Member privacy status. * * * * * One of: * * - `"PUBLIC"`: Member is visible to everyone. * - `"PRIVATE"`: Member is hidden from site visitors and other site members. Member is returned only to site contributors and apps with the appropriate permissions. * - `"UNKNOWN"`: Insufficient permissions to get the status. * */ privacyStatus: string; /** * Member activity status. * * * * * One of: * * - `"ACTIVE"`: Member can write forum posts and blog comments. * - `"MUTED"`: Member cannot write forum posts or blog comments. * - `"UNKNOWN"`: Insufficient permissions to get the status. * */ activityStatus: string; /** * Date and time when the member was created. */ _createdDate: Date; /** * Date and time when the member was updated. */ _updatedDate: Date; /** * Date and time when the member last logged in to the site. */ lastLoginDate?: Date; /** * Member's contact information. Contact information is stored in the * [Contact List](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fcontacts). * * */ contactDetails?: wix_members.CurrentMember.ContactDetails; /** * Profile display info. */ profile: wix_members.CurrentMember.Profile; }; /** * Profile display info. */ type Profile = { /** * Name that identifies the member to other members. * Displayed on the member's profile page * and interactions in the forum or blog. */ nickname: string; /** * Slug that determines the member's profile page URL. */ slug: string; /** * Member's profile photo. */ profilePhoto?: wix_members.CurrentMember.Image; /** * Member's profile photo. */ coverPhoto?: wix_members.CurrentMember.Image; /** * Member title. * * */ title?: string; }; type Role = { /** * Role ID. */ _id: string; /** * Role name as defined in the site's * [Member Permissions](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fmember-permissions/roles) * page or one of `"Admin"` or `"Member"`. */ title: string; /** * Role description, if defined in the site's dashboard. */ description?: string; /** * Role color, as defined in the site's * [Member Permissions](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fmember-permissions/roles) * page. * * One of: * * - `"DARK_BLUE"` * - `"LIGHT_BLUE"` * - `"TEAL"` * - `"LIGHT_GREEN"` * - `"YELLOW"` * - `"ORANGE"` * - `"RED"` * - `"VIOLET"` * - `"PURPLE"` */ color: string; /** * Date and time the role was created. */ _createdDate?: Date; }; /** * Street address object, with number and name in separate fields. */ type StreetAddress = { /** * Street number. */ number: string; /** * Street name. */ name: string; }; } } declare namespace wix_members_backend { /** * The Authentication API contains functionality for authenticating users from backend code. * [Read more](https://www.wix.com/corvid/reference/wix-members-backend.Authentication.html#) */ interface Authentication { /** * Approves a pending member using an email address. * [Read more](https://www.wix.com/corvid/reference/wix-members-backend.Authentication.html#approveByEmail) */ approveByEmail(email: string): Promise; /** * Approves a pending member using an approval token. * [Read more](https://www.wix.com/corvid/reference/wix-members-backend.Authentication.html#approveByToken) */ approveByToken(token: string): Promise; /** * Blocks a member from logging in to the site. * [Read more](https://www.wix.com/corvid/reference/wix-members-backend.Authentication.html#blockByEmail) */ blockByEmail(email: string): Promise; /** * Changes a member's login email address. * [Read more](https://www.wix.com/corvid/reference/wix-members-backend.Authentication.html#changeLoginEmail) */ changeLoginEmail(memberId: string, newEmail: string): Promise; /** * Creates a session token for a member authenticated by a 3rd party. * [Read more](https://www.wix.com/corvid/reference/wix-members-backend.Authentication.html#generateSessionToken) */ generateSessionToken(email: string): Promise; /** * Logs a registered member in with an email and password. * [Read more](https://www.wix.com/corvid/reference/wix-members-backend.Authentication.html#login) */ login(email: string, password: string): Promise; /** * Registers a new site member. * [Read more](https://www.wix.com/corvid/reference/wix-members-backend.Authentication.html#register) */ register(email: string, password: string, options?: wix_members_backend.Authentication.RegistrationOptions): Promise; /** * Sends a site member an email with a link to set their password. * [Read more](https://www.wix.com/corvid/reference/wix-members-backend.Authentication.html#sendSetPasswordEmail) */ sendSetPasswordEmail(email: string, options?: wix_members_backend.Authentication.SetPasswordEmailOptions): Promise; } namespace Authentication { /** * An object that contains information about a site contact. */ type ContactInfo = { /** * Contact's first name. */ firstName?: string; /** * Contact's last name. */ lastName?: string; /** * Contact's image source URL. */ picture?: string; /** * List of contact's email addresses. * When creating a contact, if no phone number is * provided, at least 1 email address must be provided. */ emails?: string[]; /** * List of contact's phone numbers. * When creating a contact, if no email is * provided, at least 1 phone number must be provided. */ phones?: string[]; /** * List of contact's labels. [Labels](https://support.wix.com/en/article/creating-contact-labels) * are used to organize contacts. When setting the `labels` property, you can * only list labels that already exist in your site's [Contact List](https://support.wix.com/en/article/accessing-your-contact-list). */ labels?: string[]; /** * Contact's language. */ language?: string; /** * Any * number of custom fields. [Custom fields](https://support.wix.com/en/article/adding-custom-fields-to-contacts) * are used to store additional information about your site's contacts. When * setting a custom field, use a key:value pair. The key must match one of the `key` properties of the [objects](wix-crm-backend/contacts/extendedfieldsqueryresult/items) * returned by [queryExtendedFields()](/wix-crm-backend/contacts/queryextendedfields) with the `custom.` prefix removed. * You can only set values for custom fields that already exist in the Contacts * application. */ customFields?: string | number | Date; }; /** * An object that contains information about a site registration. */ type RegistrationOptions = { /** * Contact information. */ contactInfo?: wix_members_backend.Authentication.ContactInfo; /** * Sets the [privacy status](https://support.wix.com/en/article/member-privacy-settings-for-groups) of a new member upon registration. * One of: * * - `"PUBLIC"`: Sets the new member status to public. A member whose status is public is a member of the site's community. * - `"PRIVATE"`: Sets the new member status to private. A member whose status is private is not a member of the site's community. * * Defaults to `"PRIVATE"`. */ privacyStatus?: string; }; type RegistrationResult = { /** * Registration status. * * One of: * * - `"PENDING"`: The member must be approved before they can log in to the site. * - `"ACTIVE"`: The member is approved and can log in to the site. */ status: string; /** * Token for logging in the current visitor * as a site member with the * [`applySessionToken()`](wix-members/authentication/applySessionToken) * function from wix-members. * * Returned when `status` is `"ACTIVE"`. */ sessionToken?: string; /** * Token for approving the member * with the [`approveByToken()`](wix-members-backend/authentication/approveByToken) * function. `approvalToken` is safe to pass via email or from page code to * backend code. * * Returned when `status` is `"PENDING"`. */ approvalToken?: string; /** * The registered member. */ member: wix_members_backend.Members.Member; }; type SetPasswordEmailOptions = { /** * Whether to hide the "ignore this email" message. * * If `false`, the email tells the member * they can safely ignore * if they did not request the password change. * * Defaults to `false`. */ hideIgnoreMessage?: boolean; }; } /** * The Authorization API contains functionality for working with * [member roles](https://support.wix.com/en/site-members/setting-your-members-permissions) * from backend code. * [Read more](https://www.wix.com/corvid/reference/wix-members-backend.Authorization.html#) */ interface Authorization { /** * Assigns a role to a member. * [Read more](https://www.wix.com/corvid/reference/wix-members-backend.Authorization.html#assignRole) */ assignRole(roleId: string, memberId: string, options?: wix_members_backend.AuthOptions): Promise; /** * Removes a role from a member. * [Read more](https://www.wix.com/corvid/reference/wix-members-backend.Authorization.html#removeRole) */ removeRole(roleId: string, memberId: string, options?: wix_members_backend.AuthOptions): Promise; } /** * The Badges API contains functionality for working with [member badges](https://support.wix.com/en/article/about-member-badges) from backend code. * [Read more](https://www.wix.com/corvid/reference/wix-members-backend.Badges.html#) */ interface Badges { /** * Assigns a badge to site members. * [Read more](https://www.wix.com/corvid/reference/wix-members-backend.Badges.html#assignMembers) */ assignMembers(badgeId: string, memberIds: string[]): Promise; /** * Creates a badge. * [Read more](https://www.wix.com/corvid/reference/wix-members-backend.Badges.html#createBadge) */ createBadge(badgeInfo: wix_members_backend.Badges.BadgeInfo): Promise; /** * Deletes a badge. * [Read more](https://www.wix.com/corvid/reference/wix-members-backend.Badges.html#deleteBadge) */ deleteBadge(badgeId: string): Promise; /** * Lists the badges assigned to each of the specified site members. * [Read more](https://www.wix.com/corvid/reference/wix-members-backend.Badges.html#listMemberBadges) */ listMemberBadges(memberIds: string[]): Promise; /** * Lists the IDs of all members assigned to a badge. * [Read more](https://www.wix.com/corvid/reference/wix-members-backend.Badges.html#listMembers) */ listMembers(badgeId: string): Promise; /** * Removes site members from an assigned badge. * [Read more](https://www.wix.com/corvid/reference/wix-members-backend.Badges.html#removeMembers) */ removeMembers(badgeId: string, memberIds: string[]): Promise; /** * Updates a badge. * [Read more](https://www.wix.com/corvid/reference/wix-members-backend.Badges.html#updateBadge) */ updateBadge(badgeId: string, badgeInfo: wix_members_backend.Badges.BadgeInfo): Promise; } namespace Badges { /** * An object representing a member badge. */ type Badge = { /** * Badge ID. */ _id: string; /** * Badge title. */ title: string; /** * Badge's unique URL as used in a dynamic page. */ slug: string; /** * Badge description. */ description: string; /** * Badge background color as a hexadecimal RGB color value. * * Defaults to `"#796EFF"` (purple). */ backgroundColor: string; /** * Badge text color as a hexadecimal RGB color value. * * Defaults to `"#FFFFFF"` (white). */ textColor: string; /** * Badge icon as an SVG image. One of: * * - An external web URL in the following format: `http(s)://`. * - The [source URL](wix-media-backend.mediaManager.html#getFileUrl) for a Wix Media Manager file. * Wix Media Manager file names in a `wix:image://...` format are not supported. */ icon: string; /** * ID of the role that badge members are assigned to. */ roleId: string; /** * Date and time the badge was created. */ _createdDate: Date; /** * Date and time the badge was last updated. */ _updatedDate: Date; }; /** * Information to use when creating or updating a badge. */ type BadgeInfo = { /** * Badge title. */ title: string; /** * Badge description. */ description?: string; /** * Badge background color as a hexadecimal RGB color value. * * Defaults to `"#796EFF"` (purple). */ backgroundColor?: string; /** * Badge text color as a hexadecimal RGB color value. * * Defaults to `"#FFFFFF"` (white). */ textColor?: string; /** * Badge icon as an SVG image. One of: * * - An external web URL in the following format: `http(s)://`. * - The [source URL](wix-media-backend.mediaManager.html#getFileUrl) for a Wix Media Manager file. * Wix Media Manager file names in a `wix:image://...` format are not supported. */ icon?: string; }; /** * An object representing the badges associated with a member. */ type MemberBadges = { /** * Member ID. */ memberId: string; /** * List of badge IDs assigned to the member. */ badgeIds: string[]; }; } /** * The CurrentMember API contains functionality for viewing and managing site members from backend code. * [Read more](https://www.wix.com/corvid/reference/wix-members-backend.CurrentMember.html#) */ interface CurrentMember { /** * Retrieves the currently logged-in member. * [Read more](https://www.wix.com/corvid/reference/wix-members-backend.CurrentMember.html#getMember) */ getMember(options?: wix_members_backend.Members.FieldsetOptions): Promise; /** * Retrieves the member's roles. * [Read more](https://www.wix.com/corvid/reference/wix-members-backend.CurrentMember.html#getRoles) */ getRoles(): Promise; /** * Removes the currently logged-in member from the site community and sets their profile to private. * [Read more](https://www.wix.com/corvid/reference/wix-members-backend.CurrentMember.html#makeProfilePrivate) */ makeProfilePrivate(): Promise; /** * Joins the currently logged-in member to the site community and sets their profile to public. * [Read more](https://www.wix.com/corvid/reference/wix-members-backend.CurrentMember.html#makeProfilePublic) */ makeProfilePublic(): Promise; /** * Changes the currently logged-in member's slug. * [Read more](https://www.wix.com/corvid/reference/wix-members-backend.CurrentMember.html#updateSlug) */ updateSlug(slug: string): Promise; } namespace CurrentMember { type Role = { /** * Role ID. */ _id: string; /** * Role name as defined in the site's * [Member Permissions](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fmember-permissions/roles) * page or one of `"Admin"` or `"Member"`. */ title: string; /** * Role description, if defined in the site's dashboard. */ description?: string; /** * Role color, as defined in the site's * [Member Permissions](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fmember-permissions/roles) * page. * * One of: * * - `"DARK_BLUE"` * - `"LIGHT_BLUE"` * - `"TEAL"` * - `"LIGHT_GREEN"` * - `"YELLOW"` * - `"ORANGE"` * - `"RED"` * - `"VIOLET"` * - `"PURPLE"` */ color: string; /** * Date and time the role was created. */ _createdDate?: Date; }; } /** * Events that are triggered by actions on a site's members. * [Read more](https://www.wix.com/corvid/reference/wix-members-backend.Events.html#) */ interface Events { /** * An event that is triggered when a site member is created. * [Read more](https://www.wix.com/corvid/reference/wix-members-backend.Events.html#onMemberCreated) */ onMemberCreated(event: wix_members_backend.Events.CreatedMemberEvent): void; /** * An event that is triggered when a site member is deleted. * [Read more](https://www.wix.com/corvid/reference/wix-members-backend.Events.html#onMemberDeleted) */ onMemberDeleted(event: wix_members_backend.Events.DeletedMemberEvent): void; /** * An event that is triggered when a site member's information is updated. * [Read more](https://www.wix.com/corvid/reference/wix-members-backend.Events.html#onMemberUpdated) */ onMemberUpdated(event: wix_members_backend.Events.UpdatedMemberEvent): void; } namespace Events { /** * An object representing the site member that was created. */ type CreatedMemberEvent = { /** * Event metadata. */ metadata: wix_members_backend.Events.EventMetadata; /** * Information about the created member. */ entity: wix_members_backend.Members.Member; }; /** * An object representing the site member deletion event. */ type DeletedMemberEvent = { /** * Event metadata. */ metadata: wix_members_backend.Events.EventMetadata; }; /** * Event metadata. */ type EventMetadata = { /** * Event ID. */ id: string; /** * Member ID associated with this event. */ entityId: string; /** * Event timestamp. */ eventTime: string; /** * Whether the event was triggered as a result of a privacy regulation application (for example, [GDPR](https://support.wix.com/en/article/gdpr-frequently-asked-questions)). For advanced users. */ triggeredByAnonymizeRequest?: boolean; }; /** * An object representing the site member whose information was updated. */ type UpdatedMemberEvent = { /** * Event metadata. */ metadata: wix_members_backend.Events.EventMetadata; /** * Information about the updated member. */ entity: wix_members_backend.Members.Member; }; } /** * The Members API contains functionality for viewing and managing site members from backend code. * [Read more](https://www.wix.com/corvid/reference/wix-members-backend.Members.html#) */ interface Members { /** * Deletes a member. * [Read more](https://www.wix.com/corvid/reference/wix-members-backend.Members.html#deleteMember) */ deleteMember(id: string): Promise; /** * Deletes a member's street addresses. * [Read more](https://www.wix.com/corvid/reference/wix-members-backend.Members.html#deleteMemberAddresses) */ deleteMemberAddresses(id: string): Promise; /** * Clears a member's email addresses. * [Read more](https://www.wix.com/corvid/reference/wix-members-backend.Members.html#deleteMemberEmails) */ deleteMemberEmails(id: string): Promise; /** * Clears a member's phone numbers. * [Read more](https://www.wix.com/corvid/reference/wix-members-backend.Members.html#deleteMemberPhones) */ deleteMemberPhones(id: string): Promise; /** * Retrieves a member by ID. * [Read more](https://www.wix.com/corvid/reference/wix-members-backend.Members.html#getMember) */ getMember(id: string, options?: wix_members_backend.Members.FieldsetOptions): Promise; /** * Updates a member's properties. * [Read more](https://www.wix.com/corvid/reference/wix-members-backend.Members.html#updateMember) */ updateMember(id: string, member: wix_members_backend.Members.MemberInfo): Promise; } namespace Members { type Address = { /** * Street address ID. */ _id?: string; /** * Street address object, with number and name in separate fields. */ streetAddress?: wix_members_backend.Members.StreetAddress; /** * Main address line, usually street and number, as free text. */ addressLine?: string; /** * Free text providing more detailed address information, * such as apartment, suite, or floor. */ addressLine2?: string; /** * City name. */ city?: string; /** * Code for a subdivision (such as state, prefecture, or province) in an * [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format. */ subdivision?: string; /** * 2-letter country code in an * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. */ country?: string; /** * Postal code. */ postalCode?: string; }; type AddressInfo = { /** * Street address object, with number and name in separate fields. */ streetAddress?: wix_members_backend.Members.StreetAddressInfo; /** * Main address line, usually street and number, as free text. */ addressLine?: string; /** * Free text providing more detailed address information, * such as apartment, suite, or floor. */ addressLine2?: string; /** * City name. */ city?: string; /** * Code for a subdivision (such as state, prefecture, or province) in an * [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format. */ subdivision?: string; /** * 2-letter country code in an * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. */ country?: string; /** * Postal code. */ postalCode?: string; }; /** * Member's contact information. Contact information is stored in the */ type ContactDetails = { /** * Contact's first name. */ firstName?: string; /** * Contact's last name. */ lastName?: string; /** * List of phone numbers. */ phones: string[]; /** * List of email addresses. */ emails: string[]; /** * List of street addresses. */ addresses: wix_members_backend.Members.Address[]; /** * Contact's birthdate, formatted as `"YYYY-MM-DD"`. * * Example: `"2020-03-15"` for March 15, 2020. */ birthdate?: string; /** * Contact's company name. */ company?: string; /** * Contact's job title. */ jobTitle?: string; /** * Custom fields, * [structured as key:object pairs](wix-members-backend/introduction#data-structure). * Custom field keys are defined in the * [Contacts Extended Fields API](wix-crm-backend/contacts). * The paired object contains the `name` and `value` properties, * where `name` is the display name and `value` is the value stored for the member. * * Only custom fields * [added to the member profile in the Dashboard](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fmembers-account) * are available through the Members API. * Empty fields are not returned. * * When updating a member, `name` is ignored. */ customFields: object; }; /** * Member's contact information. Contact information is stored in the * [Contact List](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fcontacts). * * */ type ContactInfo = { /** * Contact's first name. */ firstName?: string; /** * Contact's last name. */ lastName?: string; /** * List of phone numbers. */ phones?: string[]; /** * List of email addresses. */ emails?: string[]; /** * List of street addresses. */ addresses?: wix_members_backend.Members.AddressInfo[]; /** * Contact's birthdate, formatted as `"YYYY-MM-DD"`. * * Example: `"2020-03-15"` for March 15, 2020. */ birthdate?: string; /** * Contact's company name. */ company?: string; /** * Contact's job title. */ jobTitle?: string; /** * Set of key-value pairs. * Custom fields, * where each key is the field key, * and each value is the field's value for the member. */ customFields?: any; }; type CustomField = { /** * Field display name. */ name: string; /** * Value stored in the field. */ value: string | number; }; type FieldsetOptions = { /** * Predefined sets of fields to return. * When multiple fieldsets are provided, the union of all the included fields is returned. * * Predefined fieldsets are one of: * * - `"FULL"`: Returns all fields. * - `"PUBLIC"`: Returns `_id` and all fields under `profile`. With this fieldset, `profile.status`, `profile.privacyStatus`, and `profile.activityStatus` are returned as `"UNKNOWN"`. * * Defaults to `[ "PUBLIC" ]`. */ fieldsets: string[]; }; /** * Member's profile photo. */ type Image = { /** * **Deprecated.** Wix Media image ID, * set when the member selects an image from Wix Media. */ _id: string; /** * Image URL. */ url: string; /** * Original image width. */ height: number; /** * Original image height. */ width: number; /** * X-axis offset. * * Defaults to `0`. */ offsetX: number; /** * Y-axis offset. * * Defaults to `0`. */ offsetY: number; }; /** * Updated member. */ type Member = { /** * Member ID. */ _id: string; /** * Email used by the member to log in to the site. */ loginEmail?: string; /** * Member site access status. * * * * One of: * * - `"PENDING"`: Member created and is waiting for approval by site owner. * - `"APPROVED"`: Member can log in to the site. * - `"OFFLINE"`: Member is a [guest author](https://support.wix.com/en/article/wix-blog-adding-guest-authors-to-your-blog) for the site blog and cannot log in to the site. * - `"BLOCKED"`: Member is blocked and cannot log in to the site. * - `"UNKNOWN"`: Insufficient permissions to get the status. * */ status: string; /** * Contact ID. */ contactId: string; /** * Member privacy status. * * * * * One of: * * - `"PUBLIC"`: Member is visible to everyone. * - `"PRIVATE"`: Member is hidden from site visitors and other site members. Member is returned only to site contributors and apps with the appropriate permissions. * - `"UNKNOWN"`: Insufficient permissions to get the status. * */ privacyStatus: string; /** * Member activity status. * * * * * One of: * * - `"ACTIVE"`: Member can write forum posts and blog comments. * - `"MUTED"`: Member cannot write forum posts or blog comments. * - `"UNKNOWN"`: Insufficient permissions to get the status. * */ activityStatus: string; /** * Date and time when the member was created. */ _createdDate: Date; /** * Date and time when the member was updated. */ _updatedDate: Date; /** * Date and time when the member last logged in to the site. */ lastLoginDate?: Date; /** * Member's contact information. Contact information is stored in the * [Contact List](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fcontacts). * * */ contactDetails?: wix_members_backend.Members.ContactDetails; /** * Profile display info. */ profile: wix_members_backend.Members.Profile; }; /** * Member details to update. */ type MemberInfo = { /** * Member's contact information. Contact information is stored in the * [Contact List](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fcontacts). * * */ contactDetails?: wix_members_backend.Members.ContactInfo; /** * Profile display info. */ profile?: wix_members_backend.Members.ProfileInfo; }; /** * Profile display info. */ type Profile = { /** * Name that identifies the member to other members. * Displayed on the member's profile page * and interactions in the forum or blog. */ nickname: string; /** * Slug that determines the member's profile page URL. */ slug: string; /** * Member's profile photo. */ profilePhoto?: wix_members_backend.Members.Image; /** * Member's profile photo. */ coverPhoto?: wix_members_backend.Members.Image; /** * Member title. * * */ title?: string; }; /** * Member's profile photo. */ type ProfileImageInfo = { /** * Wix Media image ID, * set when the member selects an image from Wix Media. */ _id?: string; /** * Image URL. */ url?: string; /** * Original image width. */ height?: number; /** * Original image height. */ width?: number; /** * X-axis offset. * * Defaults to `0`. */ offsetX?: number; /** * Y-axis offset. * * Defaults to `0`. */ offsetY?: number; }; /** * Profile display info. */ type ProfileInfo = { /** * Name that identifies the member to other members. * Displayed on the member's profile page * and interactions in the forum or blog. */ nickname?: string; /** * Member's profile photo. */ profilePhoto?: wix_members_backend.Members.ProfileImageInfo; /** * Member's profile photo. */ coverPhoto?: wix_members_backend.Members.ProfileImageInfo; /** * Member title. * * */ title?: string; }; /** * Street address object, with number and name in separate fields. */ type StreetAddress = { /** * Street number. */ number: string; /** * Street name. */ name: string; }; /** * Street address object, with number and name in separate fields. */ type StreetAddressInfo = { /** * Street number. */ number?: string; /** * Street name. */ name?: string; }; } type AuthOptions = { /** * Prevents permission checks from running for the operation. */ suppressAuth: boolean; }; } declare namespace wix_paid_plans_backend { /** * **Deprecated.** * The Wix paid plan events will continue to work, but a newer version is available at [wix-pricing-plans-backend](https://www.wix.com/velo/reference/wix-pricing-plans-backend/events). * [Read more](https://www.wix.com/corvid/reference/wix-paid-plans-backend.Events.html#) */ interface Events { /** * **Deprecated.** * This event will continue to work, but a newer version is available at [`wix-pricing-plans-backend.events.onPlanPurchased()`](wix-pricing-plans-backend/events/onplanpurchased). * [Read more](https://www.wix.com/corvid/reference/wix-paid-plans-backend.Events.html#onPlanPurchased) */ onPlanPurchased(event: wix_paid_plans_backend.Events.PlanPurchasedEvent): void; } namespace Events { /** * An object representing a new pricing plan order (subscription). */ type Order = { /** * Order ID of the purchase of the plan, auto-generated when an order is created. */ id: string; /** * Status of the payment for the plan. Can be `PAID`, `REFUNDED`, `FAILED`, `UNPAID`, and `PAYMENT_STATUS_UNDEFINED`. */ paymentStatus: string; /** * Date and time until which the plan is valid. */ validUntil: Date; /** * Object containing the price of the plan. */ price: wix_paid_plans_backend.Events.Price; /** * If the plan is cancelled, the reason why. One of: * * + `OWNER_CANCELED`: The owner cancelled. * + `PAYMENT_PROVIDER_CANCELED`: The payment provider cancelled. * + `PAYMENT_FAILED`: The payment failed. * + `UOU_CANCELED`: The site member cancelled. * + `CANCELLATION_REASON_UNDEFINED`: The reason is undefined. */ cancellationReason: string; /** * If the plan is cancelled, the cause of the cancellation. One of: * * + `"UNDEFINED"`: Cancellation initiator undefined. * + `"OWNER"`: Order (subscription) was canceled by site owner. * + `"MEMBER"`: Order (subscription) was canceled by member. * + `"PAYMENT_FAILURE"`: Subscription was canceled because of payment failure. * + `"SETUP_FAILURE"`: Subscription was canceled because of payment setup failure. */ cancellationInitiator: string; /** * Date and time from which the plan is valid. */ validFrom: Date; /** * Name of the plan. */ planName: string; /** * ID of the plan for Wix Pay. If plan is free, this ID is blank. */ wixPayOrderId: string; /** * If the plan is recurring. If true, the price is deducted weekly, monthly, or yearly. */ recurring: boolean; /** * Date and time the order was created. */ dateCreated: Date; /** * Status of the order. Can be `ACTIVE`, `PENDING`, `CANCELED`, `EXPIRED`, `PENDING_CANCELLATION`, and `ORDER_STATUS_UNDEFINED`. */ status: string; /** * Description of the plan. */ planDescription: string; /** * ID for the member who purchased the plan. */ memberId: string; /** * How the plan was purchased, either `ONLINE` pr `OFFLINE`. */ orderType: string; /** * ID of the plan. */ planId: string; /** * Object containing properties about how long the plan is valid. */ validFor: wix_paid_plans_backend.Events.ValidFor; /** * How many trial days were given to the subscriber of the plan. Available only for orders whose plans are recurring, meaning plans whose pricing model is `subscription`. */ freeTrialDays?: number; /** * Role assigned after purchasing the plan. */ roleId: string; }; /** * An object representing the period for which a plan is valid. */ type Period = { /** * The number of units until the plan expires. */ amount: number; /** * Time period for billing the plan, such as `MONTH`. */ unit: string; }; /** * An object representing a new pricing plan purchase. */ type PlanPurchasedEvent = { /** * Object containing the details about the plan's order. */ order: wix_paid_plans_backend.Events.Order; }; /** * An object representing the price of a purchased plan. */ type Price = { /** * Payment currency. A three-letter * [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217) currency code. */ currency: string; /** * The cost of the plan. */ amount: number; }; /** * An object representing how long a plan is valid. */ type ValidFor = { /** * If true, the plan does not expire. */ forever: boolean; /** * Object containing the period for which the plan is valid. */ period: wix_paid_plans_backend.Events.Period; }; } } declare namespace wix_paid_plans { /** * An object representing a pricing plan order (subscription). */ type Order = { /** * Order ID of the purchase of the plan, auto-generated when an order is created. */ id: string; /** * Status of the payment for the plan. Can be `PAID`, `FAILED`, `UNPAID`, and `PAYMENT_STATUS_UNDEFINED`. */ paymentStatus: string; /** * Date and time until which the plan is valid. */ validUntil: Date; /** * Object containing the price of the plan. */ price: wix_paid_plans.Price; /** * If the plan is cancelled, the cause of the cancellation. One of: * * + `"UNDEFINED"`: Cancellation initiator unknown. * + `"OWNER"`: Order (subscription) was canceled by site owner. * + `"MEMBER"`: Order (subscription) was canceled by member. * + `"PAYMENT_FAILURE"`: Subscription was canceled because of payment failure. * + `"SETUP_FAILURE"`: Subscription was canceled because of payment setup failure. */ cancellationInitiator: string; /** * Date and time from which the plan is valid. */ validFrom: Date; /** * Name of the plan. */ planName: string; /** * ID of the plan for Wix Pay. If plan is free, this ID is blank. */ wixPayOrderId: string; /** * If the plan is recurring. If true, the price is deducted weekly, monthly, or yearly. */ recurring: boolean; /** * Date and time the order was created. */ dateCreated: Date; /** * Status of the order. Can be `ACTIVE`, `PENDING`, `CANCELED`, `EXPIRED`, `PENDING_CANCELLATION`, and `ORDER_STATUS_UNDEFINED`. */ status: string; /** * Description of the plan. */ planDescription: string; /** * ID for the member who purchased the plan. */ memberId: string; /** * How the plan was purchased, either `ONLINE` or `OFFLINE`. */ orderType: string; /** * ID of the plan. */ planId: string; /** * Object containing properties about how long the plan is valid. */ validFor: wix_paid_plans.ValidFor; /** * How many trial days were given to the subscriber of the plan. Available only for orders whose plans are recurring, meaning plans whose pricing model is `subscription`. */ freeTrialDays?: number; /** * Role assigned after purchasing the plan. */ roleId: string; }; /** * An object representing an order result. */ type OrderResult = { /** * ID of the order. */ orderId: string; /** * Wix Pay ID of the order being purchased. */ wixPayOrderId: string; }; /** * An object representing the period for which a plan is valid. */ type Period = { /** * The number of units until the plan expires. */ amount: number; /** * Time period for billing the plan, such as `MONTH`. */ unit: string; }; /** * An object representing the price of a purchased plan. */ type Price = { /** * Payment currency. A three-letter * [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217) currency code. */ currency: string; /** * The cost of the plan. */ amount: number; }; /** * An object representing a purchase result for a non-free plan. */ type PurchaseResult = { /** * ID of the order being purchased. */ orderId: string; /** * Payment status in Wix Pay. One of: * * + "`Successful`": Payment was successfully received. * + "`Pending`": Payment is pending payment provider approval. * + "`Failed`": Payment has failed. * + "`Chargeback`": Payment is a chargeback. * + "`Refunded`": Payment was fully refunded. * + "`Offline`": Payment will be executed offline. * + "`PartiallyRefunded`": Payment was partially refunded. * + "`Cancelled`": Payment was cancelled and was not processed. * + "`Undefined`": Payment status is pending payment provider input. */ wixPayStatus: string; /** * Wix Pay ID of the order being purchased. Returned for non-free plans. */ wixPayOrderId: string; }; /** * An object representing a purchase result for a free plan. */ type PurchaseResultFree = { /** * ID of the order being purchased. */ orderId: string; }; /** * An object representing how long a plan is valid. */ type ValidFor = { /** * If true, the plan does not expire. */ forever: boolean; /** * Object containing the period for which the plan is valid. */ period: wix_paid_plans.Period; }; } declare namespace wix_pay.Currencies { /** * An object for retrieving conversion rates and converting amounts. * [Read more](https://www.wix.com/corvid/reference/wix-pay.Currencies.CurrencyConverter.html#) */ interface CurrencyConverter { /** * Converts an array of amounts from one currency to another. * [Read more](https://www.wix.com/corvid/reference/wix-pay.Currencies.CurrencyConverter.html#convertAmounts) */ convertAmounts(options: wix_pay.Currencies.CurrencyConverter.ConvertAmountsOptions): Promise; /** * Gets a currency conversion rate. * [Read more](https://www.wix.com/corvid/reference/wix-pay.Currencies.CurrencyConverter.html#getConversionRate) */ getConversionRate(sourceCurrency: string, targetCurrency: string): Promise; } namespace CurrencyConverter { /** * An object representing a currency conversion rate. */ type ConversionRate = { /** * The conversion rate between the source and target currencies. */ rate: number; /** * The date and time when the rate was set. */ timestamp: Date; }; /** * An object representing the currencies and amounts to be converted. */ type ConvertAmountsOptions = { /** * Amounts to convert. */ amounts: number[]; /** * Currency to convert from. The `from` currency code used must exist in the array returned by the [`getAllCurrencies()`](wix-pay.Currencies.html#getAllCurrencies) function. */ from: string; /** * Currency to convert to. The `to` currency code used must exist in the array returned by the [`getAllCurrencies()`](wix-pay.Currencies.html#getAllCurrencies) function. * > **Note:** * The `from` and `to` currency codes used must exist in the array returned by the * [`getAllCurrencies()`](wix-pay.Currencies.html#getAllCurrencies) function. */ to: string; }; /** * An object representing the results of a currency conversion. */ type ConvertedAmounts = { /** * Array of converted amounts. */ amounts: number[]; /** * The date and time when the currency exchange rate was set. */ timestamp: Date; }; } /** * Site-related currency settings. * [Read more](https://www.wix.com/corvid/reference/wix-pay.Currencies.SiteSettings.html#) */ interface SiteSettings { /** * Gets the list of supported currencies that you set for your site. * [Read more](https://www.wix.com/corvid/reference/wix-pay.Currencies.SiteSettings.html#getCurrencies) */ getCurrencies(): Promise; } namespace SiteSettings { /** * An object representing an ISO currency code. */ type CurrencyCode = { /** * A 3-letter * [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217) currency code. */ code: string; }; } } declare namespace wix_pay { /** * The Currencies API contains functionality for displaying prices in your store in different currencies, getting exchange rates, and converting between currencies. * [Read more](https://www.wix.com/corvid/reference/wix-pay.Currencies.html#) */ interface Currencies { /** * Gets conversion rates and converts amounts. * [Read more](https://www.wix.com/corvid/reference/wix-pay.Currencies.html#currencyConverter) */ readonly currencyConverter: wix_pay.Currencies.CurrencyConverter; /** * Gets currencies that you set for your site. * [Read more](https://www.wix.com/corvid/reference/wix-pay.Currencies.html#siteSettings) */ readonly siteSettings: wix_pay.Currencies.SiteSettings; /** * Gets the list of all currencies for which Wix supports conversion. * [Read more](https://www.wix.com/corvid/reference/wix-pay.Currencies.html#getAllCurrencies) */ getAllCurrencies(): Promise; } namespace Currencies { /** * An object representing a currency. */ type Currency = { /** * A 3-letter * [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217) currency code. */ code: string; /** * A currency symbol. */ symbol: string; }; } /** * An object representing a payment. */ type Payment = { /** * Payment transaction ID. */ id: string; /** * Payment total amount. */ amount: number; /** * Payment currency. A three-letter * [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217) currency code. */ currency: string; /** * Payment items. */ items: wix_pay.PaymentItem[]; }; /** * An object representing a payment item. */ type PaymentItem = { /** * Payment item name. */ name: string; /** * Payment item price. */ price: number; /** * Payment item quantity. */ quantity: number; }; /** * An object representing the options of a payment. */ type PaymentOptions = { /** * Absolute URL of a terms and conditions * page. If a link is present, an agreement checkbox will be presented alongside the link. */ termsAndConditionsLink?: string; /** * Whether to show your site's [Thank You page](https://www.wix.com/velo/reference/$w/thankyoupage). Does not apply to Thank You pages for in-app browsers. Defaults to `true`. */ showThankYouPage?: boolean; /** * Whether to skip the user info page. Defaults to `false`. * The page will be skipped only if user info was passed to [`createPayment()`](wix-pay-backend.html#createPayment) as * a part of the `PaymentInfo` object. */ skipUserInfoPage?: boolean; /** * An object representing information about the user. It will be used to prefill * user info form during payment process. * * Deprecation note: Pass user information to [`createPayment( )`](wix-pay-backend.html#createPayment) instead. */ userInfo?: wix_pay.PaymentUserInfo; }; /** * An object representing a payment result. */ type PaymentResult = { /** * The payment. */ payment: wix_pay.Payment; /** * Payment status. One of: * * + "`Successful`": Payment was successfully received. * + "`Pending`": Payment is pending payment provider approval. * + "`Failed`": Payment has failed. * + "`Chargeback`": Payment is chargeback. * + "`Refunded`": Payment was fully refunded. * + "`Offline`": Payment will be executed offline. * + "`PartiallyRefunded`": Payment was partially refunded. * + "`Cancelled`": Payment was cancelled and was not processed. * + "`Undefined`": Payment status is pending payment provider input. */ status: string; /** * ID of the payment transaction. */ transactionId: string; /** * An object representing information about the user. */ userInfo: wix_pay.PaymentUserInfo; }; /** * An object representing information about the user. */ type PaymentUserInfo = { /** * User's first name. Value is `null` if * there is no first name information. */ firstName: string; /** * User's last name. Value is `null` if * there is no last name information. */ lastName: string; /** * User's country code. A three-letter * [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) country code. Value * is `null` if there is no country information. */ country: string; /** * User's phone number. Value is `null` if * there is no phone number information. */ phone: string; /** * User's email address. Value is `null` if * there is no email address information. */ email: string; }; } declare namespace wix_pay_backend.Currencies { /** * An object for retrieving conversion rates and converting amounts. * [Read more](https://www.wix.com/corvid/reference/wix-pay-backend.Currencies.CurrencyConverter.html#) */ interface CurrencyConverter { /** * Converts an array of one or more amounts from one currency to another. * [Read more](https://www.wix.com/corvid/reference/wix-pay-backend.Currencies.CurrencyConverter.html#convertAmounts) */ convertAmounts(options: wix_pay_backend.Currencies.CurrencyConverter.ConvertAmountsOptions): Promise; /** * Gets a currency conversion rate. * [Read more](https://www.wix.com/corvid/reference/wix-pay-backend.Currencies.CurrencyConverter.html#getConversionRate) */ getConversionRate(sourceCurrency: string, targetCurrency: string): Promise; } namespace CurrencyConverter { /** * An object representing a currency conversion rate. */ type ConversionRate = { /** * The conversion rate between the source and target currencies. */ rate: number; /** * The date and time when the rate was set. */ timestamp: Date; }; /** * An object representing the currencies and amounts to be converted. */ type ConvertAmountsOptions = { /** * Amounts to convert. */ amounts: number[]; /** * Currency to convert from. The `from` currency code used must exist in the array returned by the [`getAllCurrencies()`](wix-pay-backend.Currencies.html#getAllCurrencies) function. */ from: string; /** * Currency to convert to. The `to` currency code used must exist in the array returned by the [`getAllCurrencies()`](wix-pay-backend.Currencies.html#getAllCurrencies) function. * * > **Note:** The `from` and `to` currency codes used must exist in the array returned by the [`getAllCurrencies()`](wix-pay-backend.Currencies.html#getAllCurrencies) function. */ to: string; }; /** * An object representing the results of a currency conversion. */ type ConvertedAmounts = { /** * Array of converted amounts. */ amounts: number[]; /** * The date and time when the currency exchange rate was set. */ timestamp: Date; }; } /** * Site-related currency settings. * [Read more](https://www.wix.com/corvid/reference/wix-pay-backend.Currencies.SiteSettings.html#) */ interface SiteSettings { /** * Gets the list of supported currencies that you set for your site. * [Read more](https://www.wix.com/corvid/reference/wix-pay-backend.Currencies.SiteSettings.html#getCurrencies) */ getCurrencies(): Promise; /** * Sets the list of currencies that the site will support. * [Read more](https://www.wix.com/corvid/reference/wix-pay-backend.Currencies.SiteSettings.html#setCurrencies) */ setCurrencies(options: wix_pay_backend.Currencies.SiteSettings.CurrencyCode[]): Promise; } namespace SiteSettings { /** * An object representing an ISO currency code. */ type CurrencyCode = { /** * A 3-letter * [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217) currency code. */ code: string; }; } } declare namespace wix_pay_backend { /** * The Currencies API contains functionality for displaying prices in your store in different currencies, getting exchange rates, and converting between currencies. * [Read more](https://www.wix.com/corvid/reference/wix-pay-backend.Currencies.html#) */ interface Currencies { /** * Gets conversion rates and converts amounts. * [Read more](https://www.wix.com/corvid/reference/wix-pay-backend.Currencies.html#currencyConverter) */ readonly currencyConverter: wix_pay_backend.Currencies.CurrencyConverter; /** * Gets and sets currencies that you want to support on your site. * [Read more](https://www.wix.com/corvid/reference/wix-pay-backend.Currencies.html#siteSettings) */ readonly siteSettings: wix_pay_backend.Currencies.SiteSettings; /** * Gets the list of all currencies for which Wix supports conversion. * [Read more](https://www.wix.com/corvid/reference/wix-pay-backend.Currencies.html#getAllCurrencies) */ getAllCurrencies(): Promise; } namespace Currencies { /** * An object representing a currency. */ type Currency = { /** * A 3-letter * [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217) currency code. */ code: string; /** * A currency symbol. */ symbol: string; }; } /** * Events fired by payments created using the Pay API. * [Read more](https://www.wix.com/corvid/reference/wix-pay-backend.Events.html#) */ interface Events { /** * An event that fires when a payment's transaction status is changed. * [Read more](https://www.wix.com/corvid/reference/wix-pay-backend.Events.html#onPaymentUpdate) */ onPaymentUpdate(event: wix_pay_backend.Events.PaymentUpdateEvent): void; } namespace Events { /** * An object representing a payment update. */ type PaymentUpdateEvent = { /** * The payment's information. */ payment: wix_pay_backend.Payment; /** * Payment status. * One of: * * + `"Successful"` * + `"Pending"` * + `"Failed"` * + `"Chargeback"` * + `"Refunded"` * + `"Offline"` * + `"PartiallyRefunded"` * + `"Cancelled"` * + `"Undefined"` */ status: string; /** * ID of the payment transaction. */ transactionId: string; /** * User information. */ userInfo: wix_pay_backend.PaymentUserInfo; }; } /** * An object representing a payment. */ type Payment = { /** * Payment transaction ID. */ id: string; /** * Payment total amount. */ amount: number; /** * Payment currency. A three-letter * [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217) currency code. */ currency: string; /** * Payment items. */ items: wix_pay_backend.PaymentItem[]; /** * An object representing information about the user. */ userInfo: wix_pay_backend.PaymentUserInfo; }; /** * An object representing information for creating a payment. */ type PaymentInfo = { /** * Total payment amount. Must equal * the sum of the `price` properties in the `items` list while taking the * `quantity` into account. */ amount: number; /** * Payment currency. A three-letter * [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217) currency code. Defaults to * the currency defined by the site's [Regional Settings](https://support.wix.com/en/article/changing-your-sites-regional-settings). */ currency?: string; /** * List of payment items. */ items: wix_pay_backend.PaymentItem[]; /** * An object representing information about the user. It will be used to prefill * the user info form during the payment process. */ userInfo?: wix_pay_backend.PaymentUserInfo; }; /** * An object representing a payment item. */ type PaymentItem = { /** * Payment item name. */ name: string; /** * Payment item price. */ price: number; /** * Payment item quantity. */ quantity?: number; }; /** * An object representing information about the user. */ type PaymentUserInfo = { /** * User's first name. Value is `null` if * there is no first name information. */ firstName: string; /** * User's last name. Value is `null` if * there is no last name information. */ lastName: string; /** * User's phone number. Value is `null` if * there is no phone number information. */ phone: string; /** * User's email address. Value is `null` if * there is no email address information. */ email: string; /** * User's country code. A three-letter * [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) country code. Value * is `null` if there is no country information. */ countryCode: string; }; } declare namespace wix_pricing_plans { /** * Contains functionality for ordering your site's pricing plans. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans.Checkout.html#) */ interface Checkout { /** * Orders a pricing plan. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans.Checkout.html#createOnlineOrder) */ createOnlineOrder(planId: string, options?: wix_pricing_plans_backend.Checkout.CreateOnlineOrderOptions): Promise; /** * Orders and purchases a pricing plan. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans.Checkout.html#startOnlinePurchase) */ startOnlinePurchase(planId: string, options?: wix_pricing_plans.Checkout.StartOnlinePurchaseOptions): Promise; } namespace Checkout { type CreateOnlineOrderOptions = { /** * Start date and time for the ordered plan. * * Default: Current date and time */ startDate?: Date; /** * Coupon code to apply. * * To learn more about coupons, see [applyCoupon()](wix-pricing-plans-backend/checkout/applycoupon). */ couponCode?: string; }; /** * An object representing the period for which a plan is valid. */ type Period = { /** * The number of units until the plan expires. */ amount: number; /** * Time period for billing the plan, such as `"MONTH"`. */ unit: string; }; /** * An object representing the price of a purchased plan. */ type Price = { /** * Payment currency. A three-letter * [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217) currency code. */ currency: string; /** * The cost of the plan. */ amount: number; }; /** * An object representing a purchase for a non-free plan. */ type Purchase = { /** * The order being purchased. */ order: wix_pricing_plans_backend.Orders.Order; /** * Payment status in [Wix Pay](https://www.wix.com/velo/reference/wix-pay). Omitted for free plans. * One of: * + `"Successful"`: Payment was successfully received. * + `"Pending"`: Payment is pending payment provider approval. * + `"Failed"`: Payment has failed. * + `"Chargeback"`: Payment is chargeback. * + `"Refunded"`: Payment was fully refunded. * + `"Offline"`: Payment will be executed offline. * + `"PartiallyRefunded"`: Payment was partially refunded. * + `"Cancelled"`: Payment was cancelled and was not processed. * + `"Undefined"`: Payment status is pending payment provider input. */ wixPayStatus?: string; }; type StartOnlinePurchaseOptions = { /** * Start date and time for the ordered plan. * * Default: Current date and time */ startDate?: Date; /** * Coupon code to apply. * * To learn more about coupons, see [applyCoupon()](wix-pricing-plans-backend/checkout/applycoupon). */ couponCode?: string; }; /** * An object representing how long a plan is valid. */ type ValidFor = { /** * If true, the plan does not expire. */ forever: boolean; /** * Object containing the period for which the plan is valid. */ period: wix_pricing_plans.Checkout.Period; }; } /** * The Pricing Plans Orders API contains functionality for managing * your site's pricing plan [orders](https://support.wix.com/en/article/pricing-plans-an-overview). * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans.Orders.html#) */ interface Orders { /** * Lists the orders for the currently logged-in member. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans.Orders.html#listCurrentMemberOrders) */ listCurrentMemberOrders(filters?: wix_pricing_plans_backend.Orders.CurrentMemberFilterOptions, sorting?: wix_pricing_plans_backend.Orders.SortingOptions, paging?: wix_pricing_plans_backend.Orders.PaginationOptions): Promise; /** * Requests the cancellation of a specific order of a plan for the currently logged-in member. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans.Orders.html#requestCurrentMemberOrderCancellation) */ requestCurrentMemberOrderCancellation(orderId: string, effectiveAt: string): Promise; } } declare namespace wix_pricing_plans_backend { /** * The Pricing Plans Checkout API contains functionality for ordering and checking out * your site's pricing plan [orders](https://support.wix.com/en/article/pricing-plans-an-overview). * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.Checkout.html#) */ interface Checkout { /** * Applies a coupon to a draft order. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.Checkout.html#applyCoupon) */ applyCoupon(orderId: string, couponCode: string): Promise; /** * Change the start date of a draft order. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.Checkout.html#changeStartDate) */ changeStartDate(orderId: string, startDate: Date): Promise; /** * Creates an order for a buyer who purchased the plan with an offline transaction. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.Checkout.html#createOfflineOrder) */ createOfflineOrder(planId: string, buyerId: string, options?: wix_pricing_plans_backend.Checkout.CreateOfflineOrderOptions): Promise; /** * Creates an order online for currently logged-in member. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.Checkout.html#createOnlineOrder) */ createOnlineOrder(planId: string, options?: wix_pricing_plans_backend.Checkout.CreateOnlineOrderOptions): Promise; /** * Provides a preview of an offline order as if it was purchased. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.Checkout.html#previewOfflineOrder) */ previewOfflineOrder(planId: string, buyerId: string, options?: wix_pricing_plans_backend.Checkout.PreviewOfflineOrderOptions): Promise; /** * Provides a preview of an online order as if it was purchased. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.Checkout.html#previewOnlineOrder) */ previewOnlineOrder(planId: string, options?: wix_pricing_plans_backend.Checkout.PreviewOnlineOrderOptions): Promise; /** * Provides a preview of an order's pricing as if was purchased. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.Checkout.html#previewPrice) */ previewPrice(planId: string, couponCode?: string): Promise; } namespace Checkout { type ApplyCoupon = { /** * The order with the coupon applied. */ order?: wix_pricing_plans_backend.Orders.Order; }; type CreateOfflineOrderInfo = { /** * Date from which the plan is active. Defaults to the current date. */ startDate?: Date; /** * Whether the order is paid. Defaults to `false`. */ paid?: boolean; /** * When `true`, prevents permission checks from running for the operation. Defaults to `false`. */ suppressAuth?: boolean; }; type CreateOfflineOrderOptions = { /** * Start date and time for the ordered plan. * * Default: Current date and time */ startDate?: Date; /** * Whether the order is paid. * * Default: `false` */ paid?: boolean; /** * Whether to suppress permission checks from running for the operation. * * Default: `false` */ suppressAuth?: boolean; /** * Coupon code to apply. * * To learn more about coupons, see [applyCoupon()](wix-pricing-plans-backend/checkout/applycoupon). */ couponCode?: string; }; type CreateOnlineOrderOptions = { /** * Start date and time for the ordered plan. * * Default: Current date and time */ startDate?: Date; /** * Coupon code to apply. * * To learn more about coupons, see [applyCoupon()](wix-pricing-plans-backend/checkout/applycoupon). */ couponCode?: string; }; type OrderPreview = { /** * The preview, as if the plan had been ordered. */ order?: wix_pricing_plans_backend.Orders.Order; /** * Whether this previewed order would exceed the permitted amount of purchases * available for this plan for this buyer. * * Always `false` for plans that do not have purchase limits. */ purchaseLimitExceeded: boolean; }; type PreviewOfflineOrderOptions = { /** * Date from which the plan is active. Defaults to the current date. */ startDate?: Date; /** * When `true`, prevents permission checks from running for the operation. Defaults to `false`. */ suppressAuth?: boolean; /** * Coupon code to apply. * * To learn more about coupons, see [applyCoupon()](wix-pricing-plans-backend/checkout/applycoupon). */ couponCode?: string; }; type PreviewOnlineOrderOptions = { /** * Date from which the plan is active. Defaults to the current date. */ startDate?: Date; /** * Coupon code to apply. * * To learn more about coupons, see [applyCoupon()](wix-pricing-plans-backend/checkout/applycoupon). */ couponCode?: string; }; type PricePreview = { /** * **Deprecated.** Use `prices` instead. */ price: wix_pricing_plans_backend.Orders.PriceDetails; /** * Pricing details. */ prices: wix_pricing_plans_backend.Orders.Prices; }; } /** * Events fired by pricing plans. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.Events.html#) */ interface Events { /** * An event that triggers when an order is canceled with `effectiveAt` as `NEXT_PAYMENT_DATE`. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.Events.html#onOrderAutoRenewCanceled) */ onOrderAutoRenewCanceled(event: wix_pricing_plans_backend.Events.OrderAutoRenewCanceledEvent): void; /** * An event that triggers when an order is canceled. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.Events.html#onOrderCanceled) */ onOrderCanceled(event: wix_pricing_plans_backend.Events.OrderCanceledEvent): void; /** * An event that triggers when an order is created. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.Events.html#onOrderCreated) */ onOrderCreated(event: wix_pricing_plans_backend.Events.OrderCreatedEvent): void; /** * An event that triggers at the start of each payment cycle for online orders. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.Events.html#onOrderCycleStarted) */ onOrderCycleStarted(event: wix_pricing_plans_backend.Events.OrderCycleStartedEvent): void; /** * An event that triggers when the `endDate` of an order is postponed or made earlier. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.Events.html#onOrderEndDatePostponed) */ onOrderEndDatePostponed(event: wix_pricing_plans_backend.Events.OrderEndDatePostponedEvent): void; /** * An event that triggers when an order expires or is canceled immediately. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.Events.html#onOrderEnded) */ onOrderEnded(event: wix_pricing_plans_backend.Events.OrderEndedEvent): void; /** * An event that triggers when an offline order is marked as paid. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.Events.html#onOrderMarkedAsPaid) */ onOrderMarkedAsPaid(event: wix_pricing_plans_backend.Events.OrderMarkedAsPaidEvent): void; /** * An event that triggers when an order is paused. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.Events.html#onOrderPaused) */ onOrderPaused(event: wix_pricing_plans_backend.Events.OrderPausedEvent): void; /** * An event that triggers when an order is purchased. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.Events.html#onOrderPurchased) */ onOrderPurchased(event: wix_pricing_plans_backend.Events.OrderPurchasedEvent): void; /** * An event that triggers when an order resumes. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.Events.html#onOrderResumed) */ onOrderResumed(event: wix_pricing_plans_backend.Events.OrderResumedEvent): void; /** * An event that triggers when the start date of an order is changed. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.Events.html#onOrderStartDateChanged) */ onOrderStartDateChanged(event: wix_pricing_plans_backend.Events.OrderStartDateChangedEvent): void; /** * An event that triggers when the start date of a purchased or free order is reached. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.Events.html#onOrderStarted) */ onOrderStarted(event: wix_pricing_plans_backend.Events.OrderUpdatedEvent): void; /** * An event that triggers when an order is changed. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.Events.html#onOrderUpdated) */ onOrderUpdated(event: wix_pricing_plans_backend.Events.OrderUpdatedEvent): void; /** * An event that triggers when a pricing plan is archived. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.Events.html#onPlanArchived) */ onPlanArchived(event: wix_pricing_plans_backend.Events.PlanArchivedEvent): void; /** * An event that triggers when a pricing plan is created. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.Events.html#onPlanCreated) */ onPlanCreated(event: wix_pricing_plans_backend.Events.PlanCreatedEvent): void; /** * An event that triggers when a member purchases a plan. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.Events.html#onPlanPurchased) */ onPlanPurchased(event: wix_pricing_plans_backend.Events.PlanPurchasedEvent): void; /** * An event that triggers when a pricing plan is changed. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.Events.html#onPlanUpdated) */ onPlanUpdated(event: wix_pricing_plans_backend.Events.PlanUpdatedEvent): void; } namespace Events { /** * Event data. */ type EventData = { /** * Plan information. */ plan: wix_pricing_plans_backend.Plan; }; /** * Event metadata. */ type EventMetadata = { /** * Event ID. */ id: string; /** * Plan ID associated with this event. */ entityId: string; /** * Event timestamp. */ eventTime: string; /** * Whether the event is triggered as a result of a privacy regulation application. For example, [GDPR](https://support.wix.com/en/article/gdpr-frequently-asked-questions). For advanced users. */ triggeredByAnonymizeRequest?: boolean; }; /** * An object representing a new pricing plan order (subscription). */ type Order = { /** * Order ID of the purchase of the plan, auto-generated when an order is created. */ id: string; /** * Status of the payment for the plan. Can be `PAID`, `REFUNDED`, `FAILED`, `UNPAID`, and `PAYMENT_STATUS_UNDEFINED`. */ paymentStatus: string; /** * Date and time until which the plan is valid. */ validUntil: Date; /** * Object containing the price of the plan. */ price: wix_pricing_plans_backend.Events.Price; /** * If the plan is canceled, the reason why. One of: * * + `OWNER_CANCELED`: The owner canceled. * + `PAYMENT_PROVIDER_CANCELED`: The payment provider canceled. * + `PAYMENT_FAILED`: The payment failed. * + `UOU_CANCELED`: The site member canceled. * + `CANCELLATION_REASON_UNDEFINED`: The reason is undefined. */ cancellationReason: string; /** * If the plan is cancelled, the cause of the cancellation. One of: * * + `"UNDEFINED"`: Cancellation initiator undefined. * + `"OWNER"`: Site owner canceled the order. * + `"MEMBER"`: Buyer initiated the cancellation. * + `"PAYMENT_FAILURE"`: Payment transaction failed. * + `"SETUP_FAILURE"`: Buyer's payment details weren't set up correctly. */ cancellationInitiator: string; /** * Date and time from which the plan is valid. */ validFrom: Date; /** * Name of the plan. */ planName: string; /** * ID of the plan for Wix Pay. If plan is free, this ID is blank. */ wixPayOrderId: string; /** * If the plan is recurring. If true, the price is deducted weekly, monthly, or yearly. */ recurring: boolean; /** * Date and time the order was created. */ dateCreated: Date; /** * Status of the order. Can be `ACTIVE`, `PENDING`, `CANCELED`, `EXPIRED`, `PENDING_CANCELLATION`, and `ORDER_STATUS_UNDEFINED`. */ status: string; /** * Description of the plan. */ planDescription: string; /** * ID for the member who ordered the plan. */ memberId: string; /** * How the plan was ordered, either `ONLINE` or `OFFLINE`. */ orderType: string; /** * ID of the plan. */ planId: string; /** * Object containing properties about how long the plan is valid. */ validFor: wix_pricing_plans_backend.Events.ValidFor; /** * How many trial days were given to the subscriber of the plan. Available only for orders whose plans are recurring, meaning plans whose pricing model is `subscription`. */ freeTrialDays?: number; /** * Role assigned after ordering the plan. */ roleId: string; }; /** * Information about the event fired when the order auto-renewal is canceled. */ type OrderAutoRenewCanceledEvent = { /** * Event metadata. */ metadata: wix_pricing_plans_backend.Events.OrderEventMetadata; /** * Data about the order. */ data: wix_pricing_plans_backend.Events.OrderEventData; }; /** * Information about the order cancellation event. */ type OrderCanceledEvent = { /** * Event metadata. */ metadata: wix_pricing_plans_backend.Events.OrderEventMetadata; /** * Data about the order. */ data: wix_pricing_plans_backend.Events.OrderEventData; }; /** * Information about the order's creation event. */ type OrderCreatedEvent = { /** * Event metadata. */ metadata: wix_pricing_plans_backend.Events.OrderEventMetadata; /** * Order information. */ entity: wix_pricing_plans_backend.Orders.Order; }; /** * Information about the event fired when the order's payment cycle is triggered. This means the next payment date has arrived. */ type OrderCycleStartedEvent = { /** * Event metadata. */ metadata: wix_pricing_plans_backend.Events.OrderEventMetadata; /** * Data about the order. */ data: wix_pricing_plans_backend.Events.OrderCycleStartedEventData; }; /** * Event data. */ type OrderCycleStartedEventData = { /** * Order information. */ order: wix_pricing_plans_backend.Orders.Order; /** * Number of the payment cycle. Zero for unlimited plan orders and orders whose plans are valid until canceled. */ cycleNumber: number; /** * Wix Pay transaction ID. */ transactionId: string; }; /** * Information about the order postponed event. */ type OrderEndDatePostponedEvent = { /** * Event metadata. */ metadata: wix_pricing_plans_backend.Events.OrderEventMetadata; /** * Data about the order. */ data: wix_pricing_plans_backend.Events.OrderEventData; }; /** * Information about the order end event. */ type OrderEndedEvent = { /** * Event metadata. */ metadata: wix_pricing_plans_backend.Events.OrderEventMetadata; /** * Data about the order. */ data: wix_pricing_plans_backend.Events.OrderEventData; }; /** * Event data. */ type OrderEventData = { /** * Order information. */ order: wix_pricing_plans_backend.Orders.Order; }; /** * Event metadata. */ type OrderEventMetadata = { /** * Event ID. */ id: string; /** * Order ID associated with this event. */ entityId: string; /** * Event timestamp. */ eventTime: string; /** * Whether the event is triggered as a result of a privacy regulation application (for example, [GDPR](https://support.wix.com/en/article/gdpr-frequently-asked-questions)). For advanced users. */ triggeredByAnonymizeRequest?: boolean; }; /** * Information about the offline order "marked as paid" event. */ type OrderMarkedAsPaidEvent = { /** * Event metadata. */ metadata: wix_pricing_plans_backend.Events.OrderEventMetadata; /** * Data about the order. */ data: wix_pricing_plans_backend.Events.OrderEventData; }; /** * Information about the order pause event. */ type OrderPausedEvent = { /** * Event metadata. */ metadata: wix_pricing_plans_backend.Events.OrderEventMetadata; /** * Data about the order. */ data: wix_pricing_plans_backend.Events.OrderEventData; }; /** * Information about the order purchase event. */ type OrderPurchasedEvent = { /** * Event metadata. */ metadata: wix_pricing_plans_backend.Events.OrderEventMetadata; /** * Data about the order. */ data: wix_pricing_plans_backend.Events.OrderEventData; }; /** * Information about the order resumption event. */ type OrderResumedEvent = { /** * Event metadata. */ metadata: wix_pricing_plans_backend.Events.OrderEventMetadata; /** * Data about the order. */ data: wix_pricing_plans_backend.Events.OrderEventData; }; /** * Information about the order's start date change event. */ type OrderStartDateChangedEvent = { /** * Event metadata. */ metadata: wix_pricing_plans_backend.Events.OrderEventMetadata; /** * Data about the order. */ data: wix_pricing_plans_backend.Events.OrderEventData; }; /** * Information about the order update event. */ type OrderUpdatedEvent = { /** * Event metadata. */ metadata: wix_pricing_plans_backend.Events.OrderEventMetadata; /** * Order information. */ entity: wix_pricing_plans_backend.Orders.Order; }; /** * An object representing the period for which a plan is valid. */ type Period = { /** * The number of units until the plan expires. */ amount: number; /** * Time period for billing the plan, such as `MONTH`. */ unit: string; }; /** * Information about the plan archive event. */ type PlanArchivedEvent = { /** * Event metadata. */ metadata: wix_pricing_plans_backend.Events.EventMetadata; /** * Event data, including information about the archived plan. */ data: wix_pricing_plans_backend.Events.EventData; }; /** * Information about the create plan event. */ type PlanCreatedEvent = { /** * Event metadata. */ metadata: wix_pricing_plans_backend.Events.EventMetadata; /** * Plan information. */ entity: wix_pricing_plans_backend.Plan; }; /** * An object representing a new pricing plan purchase. */ type PlanPurchasedEvent = { /** * Object containing the details about the plan's order. */ order: wix_pricing_plans_backend.Events.Order; }; /** * Information about the plan update event. */ type PlanUpdatedEvent = { /** * Event metadata. */ metadata: wix_pricing_plans_backend.Events.EventMetadata; /** * Plan information. */ entity: wix_pricing_plans_backend.Plan; }; /** * An object representing the price of the plan. */ type Price = { /** * Payment currency. A three-letter * [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217) currency code. */ currency: string; /** * The cost of the plan. */ amount: number; }; /** * An object representing how long a plan is valid. */ type ValidFor = { /** * If true, the plan does not expire. */ forever: boolean; /** * Object containing the period for which the plan is valid. */ period: wix_pricing_plans_backend.Events.Period; }; } /** * The Pricing Plans Orders API contains functionality for managing * your site's pricing plan [orders](https://support.wix.com/en/article/pricing-plans-an-overview). * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.Orders.html#) */ interface Orders { /** * Cancels an existing order. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.Orders.html#cancelOrder) */ cancelOrder(orderId: string, effectiveAt: string, options?: wix_pricing_plans_backend.Options): Promise; /** * Gets an order for the currently logged-in member. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.Orders.html#getCurrentMemberOrder) */ getCurrentMemberOrder(orderId: string): Promise; /** * Gets an existing pricing plan order by ID. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.Orders.html#getOrder) */ getOrder(orderId: string, options?: wix_pricing_plans_backend.Options): Promise; /** * Lists orders for the currently logged-in member. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.Orders.html#listCurrentMemberOrders) */ listCurrentMemberOrders(filters?: wix_pricing_plans_backend.Orders.CurrentMemberFilterOptions, sorting?: wix_pricing_plans_backend.Orders.SortingOptions, paging?: wix_pricing_plans_backend.Orders.PaginationOptions): Promise; /** * Lists pricing plan orders. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.Orders.html#listOrders) */ listOrders(filters?: wix_pricing_plans_backend.Orders.FilterOptions, sorting?: wix_pricing_plans_backend.Orders.SortingOptions, paging?: wix_pricing_plans_backend.Orders.PaginationOptions, options?: wix_pricing_plans_backend.Options): Promise; /** * Marks an offline pricing plan order as paid. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.Orders.html#markAsPaid) */ markAsPaid(orderId: string, options?: wix_pricing_plans_backend.Options): Promise; /** * Pauses a pricing plans order. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.Orders.html#pauseOrder) */ pauseOrder(orderId: string, options?: wix_pricing_plans_backend.Options): Promise; /** * Extends the duration of a pricing plan order by postponing the order's `endDate`. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.Orders.html#postponeEndDate) */ postponeEndDate(orderId: string, endDate: Date, options?: wix_pricing_plans_backend.Options): Promise; /** * Starts the process of cancelling the logged-in member's pricing plan order. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.Orders.html#requestCurrentMemberOrderCancellation) */ requestCurrentMemberOrderCancellation(orderId: string, effectiveAt: string): Promise; /** * Resumes a paused pricing plan order. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.Orders.html#resumeOrder) */ resumeOrder(orderId: string, options?: wix_pricing_plans_backend.Options): Promise; } namespace Orders { /** * Buyer details. */ type Buyer = { /** * Member ID for the buyer. See [`wix-members-backend`](wix-members-backend/introduction) to learn more about a site's members. */ memberId: string; /** * Contact ID for the buyer. See [Contacts in `wix-crm-backend`](wix-crm-backend/contacts/introduction) to learn more about a site's contacts. */ contactId: string; }; /** * Details about the cancellation of an order. Only present if the order `status` is `"CANCELED"`. */ type Cancellation = { /** * Date and time when the cancellation was requested. */ requestedDate: Date; /** * The reason for the cancellation. * Supported values: * + `"OWNER_ACTION"`. The site owner canceled the order. * + `"MEMBER_ACTION"`. The buyer initiated the cancellation. * + `"PAYMENT_FAILURE"`. A payment transaction failed. * + `"PAYMENT_SETUP_FAILURE"`. The buyer's payment details weren't set up correctly. */ cause: string; /** * When the cancellation takes effect. This is set when cancelling the order. * Supported values: * + `"IMMEDIATELY"`. The cancellation occurs immediately and the buyer can no longer use the plan at this point. * + `"NEXT_PAYMENT_DATE"`. The cancellation occurs at the next payment date and time. The buyer can continue to use the plan until that date and time. */ effectiveAt: string; }; /** * Coupon applied to the order. * * To learn more about coupons, see [applyCoupon()](wix-pricing-plans-backend/checkout/applycoupon). */ type Coupon = { /** * Code of the applied coupon. */ code: string; /** * Total discount of the coupon, as a monetary amount. */ amount: string; /** * Coupon ID. */ id: string; }; /** * Current payment cycle for the order. * * `currentCycle` will be omitted if the order's `status` is `CANCELED` or `ENDED`, or if the `startDate` hasn't been reached yet. */ type CurrentCycle = { /** * Index of the current payment cycle in the order. * * `0` when the order is in a free trial period. In all other cases, the index starts with `1`. */ index: number; /** * Start date and time for the current payment cycle. */ startedDate: Date; /** * End date and time for the current payment cycle. */ endedDate: Date; }; /** * Fields to filter by when listing orders for the current member. */ type CurrentMemberFilterOptions = { /** * Specific IDs of plans that were ordered by the current member. */ planIds?: string[]; /** * Whether the auto-renewal of the current member's recurring orders was canceled. */ autoRenewCanceled?: boolean; /** * Specific statuses for the current member's orders. * + `"DRAFT"`. The order has been initiated but payment has not been processed yet. The plan is not yet available for use. * + `"PENDING"`. Payment is being processed. The plan is not yet available for use. * + `"ACTIVE"`. The order has been processed and paid for. The plan is available for use. * + `"PAUSED"`. Use of the plan has been [paused](wix-pricing-plans-backend/orders/pauseorder), for example, if the buyer is away. The plan can be [resumed](wix-pricing-plans-backend/orders/resumeorder). * + `"ENDED"`. The order has completed its duration and is no longer available for use. * + `"CANCELED"`. The order has been [canceled](wix-pricing-plans-backend/orders/cancelorder). */ orderStatuses?: string[]; /** * Specific payment statuses for the current member's orders. * + `"PAID"`. The last payment was paid. * + `"REFUNDED"`. The last payment was refunded. * + `"FAILED"`. The last payment transaction did not complete. * + `"UNPAID"`. The last payment was not paid. * + `"PENDING"`. Awaiting payment. * + `"NOT_APPLICABLE"`. No payment was necessary, such as for free plans or free trials. */ paymentStatuses?: string[]; }; /** * Length of one payment cycle. For example, `1` `MONTH` for monthly payments. */ type Duration = { /** * The amount of a duration `unit` in a single payment cycle. * * Currently limited to support only value of `1`. */ count: number; /** * Unit of time for the cycle duration. * * Supported values: `"UNDEFINED"`, `"DAY"`, `"WEEK"`, `"MONTH"`, `"YEAR"` */ unit: string; }; /** * Fields to filter by when listing orders. */ type FilterOptions = { /** * Specific member IDs of buyers who ordered a pricing plan. */ buyerIds?: string[]; /** * Specific IDs of plans that were ordered. */ planIds?: string[]; /** * Whether the auto-renewal of recurring orders was canceled. */ autoRenewCanceled?: boolean; /** * Specific order statuses. * + `"DRAFT"`. The order has been initiated but payment has not been processed yet. The plan is not yet available for use. * + `"PENDING"`. Payment is being processed. The plan is not yet available for use. * + `"ACTIVE"`. The order has been processed and paid for. The plan is available for use. * + `"PAUSED"`. Use of the plan has been [paused](wix-pricing-plans-backend/orders/pauseorder), for example, if the buyer is away. The plan can be [resumed](wix-pricing-plans-backend/orders/resumeorder). * + `"ENDED"`. The order has completed its duration and is no longer available for use. * + `"CANCELED"`. The order has been [canceled](wix-pricing-plans-backend/orders/cancelorder). */ orderStatuses?: string[]; /** * Specific payment statuses. * + `"PAID"`. The last payment was paid. * + `"REFUNDED"`. The last payment was refunded. * + `"FAILED"`. The last payment transaction did not complete. * + `"UNPAID"`. The last payment was not paid. * + `"PENDING"`. Awaiting payment. * + `"NOT_APPLICABLE"`. No payment was necessary, such as for free plans or free trials. */ paymentStatuses?: string[]; }; type Order = { /** * Order ID. */ _id: string; /** * ID of the plan that was ordered. */ planId: string; /** * ID of the related Wix subscription. * * Every pricing plan order corresponds to a Wix subscription, including orders for single payment plans. You can see all orders from your site's [Subscriptions](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fsubscriptions%3FreferralInfo%3Dvelo-docs) page in the Dashboard. */ subscriptionId: string; /** * ID of the associated Wix Pay order. * * Created by the [`createOnlineOrder()`](wix-pricing-plans-backend/checkout/createonlineorder) or [`createfflineOrder()`](wix-pricing-plans-backend/checkout/createofflineorder) function. For online orders, send this value as a parameter to the Wix Pay [`startPayment()`](wix-pay/startPayment) function to enable your buyer to pay for the order. `wixPayOrderId` is omitted if the order is free. */ wixPayOrderId?: string; /** * The buyer's IDs. Includes `memberId` and `contactId`. * * Currently, Pricing Plan orders are limited to members only. `contactId` is returned, but a buyer will not be able to order a plan without a `memberId`. */ buyer: wix_pricing_plans_backend.Orders.Buyer; /** * **Deprecated.** Use `pricing` instead. */ priceDetails: wix_pricing_plans_backend.Orders.PriceDetails; /** * Order [pricing model](wix-pricing-plans-backend/introduction#pricing-models), price, and payment schedule. */ pricing?: wix_pricing_plans_backend.Orders.Pricing; /** * How the order was processed. * Supported values: * + `"ONLINE"`. The buyer ordered the plan using the site. * + `"OFFLINE"`. The buyer made a manual, offline order without using the site. */ type: string; /** * Status of the order. * Supported values: * + `"DRAFT"`. The order has been initiated but payment hasn't been processed yet. The plan isn't yet available for use. * + `"PENDING"`. The order has been processed and its start date is set in the future. The plan isn't yet available for use. * + `"ACTIVE"`. The order has been processed. The plan is available for use. * + `"PAUSED"`. The order, and use of the plan, is [paused](wix-pricing-plans-backend/orders/pauseorder). For example, if the buyer is away. The order, and use of the plan, can be [resumed](wix-pricing-plans-backend/orders/resumeorder). * + `"ENDED"`. The order has completed its duration and is no longer available for use. * + `"CANCELED"`. The order has been [canceled](wix-pricing-plans-backend/orders/cancelorder). */ status: string; /** * Whether the order will be canceled at the next payment date. * * If `true`, the order `status` will be `CANCELED` and the next payment won't be charged. Omitted for single payment orders. */ autoRenewCanceled?: boolean; /** * Details about the cancellation of an order. Only present if the `status` is `"CANCELED"`. */ cancellation?: wix_pricing_plans_backend.Orders.Cancellation; /** * Status of the last payment for the order. This is updated automatically for online orders. The site owner updates this manually for offline orders. * Supported values: * + `"PAID"`. The last payment was paid. * + `"REFUNDED"`. The last payment was refunded. * + `"FAILED"`. The last payment transaction didn't complete. * + `"UNPAID"`. The last payment wasn't paid. * + `"PENDING"`. Awaiting payment. * + `"NOT_APPLICABLE"`. No payment was necessary. For example, for free plans or free trials. */ lastPaymentStatus: string; /** * Start date and time for the ordered plan. */ startDate: Date; /** * Current date and time the ordered plan will expire. * * `endDate` may be updated over the course of an order. If the order is [paused](wix-pricing-plans-backend/orders/pauseorder), it will have a later `endDate` once it [resumes](wix-pricing-plans-backend/orders/resumeorder). `endDate` may also be [postponed](wix-pricing-plans-backend/orders/postponeenddate). * * Omitted if the order is valid until canceled and still `"ACTIVE"`. */ endDate?: Date; /** * List of periods during which this order is paused. */ pausePeriods: wix_pricing_plans_backend.Orders.PausePeriod[]; /** * Free trial period, in days. Only available for recurring plans. */ freeTrialDays?: string; /** * Earliest end date and time that the plan for this order can expire. * * This is calculated by adding all pause periods to the original end date. Omitted if the order is active until canceled. Reserved for future use. */ earliestEndDate?: Date; /** * Current payment cycle for the order. * * `currentCycle` will be omitted if the order's status is `CANCELED` or `ENDED`, or if the `startDate` hasn't passed yet. */ currentCycle: wix_pricing_plans_backend.Orders.CurrentCycle; /** * Name of the plan at the time of the order. */ planName: string; /** * Description of the plan at the time of the order. */ planDescription: string; /** * Plan price as it was at the moment of order creation. */ planPrice: string; /** * Date and time the order was created. */ _createdDate: Date; /** * Date and time the order was last updated. For example, the date and time an order was paused, resumed, or canceled. */ _updatedDate: Date; }; type OrderCopy = { /** * Order Copy ID. */ _id: string; /** * ID of the plan that was purchased with this order. */ planId: string; /** * ID of the related Wix subscription. Every pricing plan order corresponds to a Wix subscription, including orders for single payment plans. You can see all orders from your site's [Subscriptions](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fsubscriptions%3FreferralInfo%3Dvelo-docs) page in the Dashboard. */ subscriptionId: string; /** * ID of the associated Wix Pay order, created by the [`createOnlineOrder()`](wix-pricing-plans-backend/checkout/createonlineorder) function. Send this value as a parameter to the Wix Pay [`startPayment()`](wix-pay/startPayment) function to enable your buyer to pay for the order. `wixPayOrderId` is omitted if the order is free. */ wixPayOrderId?: string; /** * Buyer details. */ buyer: wix_pricing_plans_backend.Orders.Buyer; /** * Order pricing details for one payment cycle, payment schedule, and expiration. */ priceDetails: wix_pricing_plans_backend.Orders.PriceDetails; /** * Order pricing model, price, and payment schedule. */ pricing?: wix_pricing_plans_backend.Orders.Pricing; /** * How the order was processed. * One of: * + `"ONLINE"`. The buyer purchased the plan using the site. * + `"OFFLINE"`. The buyer made a manual, offline purchase without using the site. */ type: string; /** * Status of the order. * One of: * + `"DRAFT"`. The order has been initiated but payment hasn't been processed yet. The plan isn't yet available for use. * + `"PENDING"`. Payment is being processed. The plan isn't yet available for use. * + `"ACTIVE"`. The order has been processed and paid for. The plan is available for use. * + `"PAUSED"`. Use of the plan has been [paused](wix-pricing-plans-backend/orders/pauseorder), for example, if the buyer is away. The plan can be [resumed](wix-pricing-plans-backend/orders/resumeorder). * + `"ENDED"`. The order has completed its duration and is no longer available for use. * + `"CANCELED"`. The order has been [canceled](wix-pricing-plans-backend/orders/cancelorder). */ status: string; /** * If true, next payment won't be charged at the next scheduled payment date. The order `status` will become `"CANCELED"` at the expiration date. Omitted for single payment orders. */ autoRenewCanceled?: boolean; /** * Details about the cancellation of an order. Omitted if the order `status` isn't `"CANCELED"`. */ cancellation?: wix_pricing_plans_backend.Orders.Cancellation; /** * Status of the last payment for the order. The site owner updates this manually for offline orders. * One of: * + `"PAID"`. The last payment was paid. * + `"REFUNDED"`. The last payment was refunded. * + `"FAILED"`. The last payment transaction didn't complete. * + `"UNPAID"`. The last payment wasn't paid. * + `"PENDING"`. Awaiting payment. * + `"NOT_APPLICABLE"`. No payment was necessary, such as for free plans or free trials. */ lastPaymentStatus: string; /** * Date the plan for this order will become active. */ startDate: Date; /** * Date the plan for this order will expire. Omitted if the order is active until canceled. */ endDate?: Date; /** * List of periods during which this order is paused, if there are any. */ pausePeriods: wix_pricing_plans_backend.Orders.PausePeriod[]; /** * Free trial period, in days. Only available for recurring plans. */ freeTrialDays?: string; /** * Earliest possible date that the plan for this order can end. This is calculated by adding all pause periods to the original end date. This date is used as a boundary for extending or shortening the duration of a plan. You can't set a plan to expire before this date. Omitted if the order is active until canceled. */ earliestEndDate?: Date; /** * Current payment cycle for the order. * * `currentCycle` will be omitted if the order's status is `CANCELLED` or `ENDED`, or if the `startDate` hasn't passed yet. */ currentCycle: wix_pricing_plans_backend.Orders.CurrentCycle; /** * Name of the plan at the time of the order. */ planName: string; /** * Description of the plan at the time of the order. */ planDescription: string; /** * Plan price as it was at the moment of order creation. */ planPrice: string; /** * Date order was created. This is the date before initiating a payment or any other actions. */ _createdDate: Date; /** * Date order was last updated, such as the date an order was paused, resumed, or canceled. */ _updatedDate: Date; }; /** * The order has recurring payments. */ type OrderRecurrence = { /** * Length of one payment cycle. For example, `1` `MONTH` for monthly payments. */ cycleDuration: wix_pricing_plans_backend.Orders.Duration; /** * Amount of payment cycles this subscription is valid for. * * `0` for orders of plans that are unlimited or until-canceled. */ cycleCount: number; }; type PaginationOptions = { /** * Limit the number of orders returned. * * Default: `50` */ limit?: number; /** * Number of entries to skip. */ skip?: number; }; /** * Period during which the order of a plan is suspended. */ type PausePeriod = { /** * Status of the pause period. * Supported values: * + `"ACTIVE"`. Status while the order is [paused](wix-pricing-plans-backend/orders/pauseorder). * + `"ENDED"`. Status while the order is [resumed](wix-pricing-plans-backend/orders/resumeorder). */ status: string; /** * Start date and time of the pause period. */ pauseDate: Date; /** * End date and time of the pause period. * * Omitted while the pause period remains `"ACTIVE"`. */ resumeDate: Date; }; /** * Order price details. */ type Price = { /** * Price of the order excluding tax, specified as a monetary amount. For example, `"9.99"`. */ subtotal: string; /** * Coupon applied to the order. * * To learn more about coupons, see [applyCoupon()](wix-pricing-plans-backend/checkout/applycoupon). */ coupon: wix_pricing_plans_backend.Orders.Coupon; /** * Total discount applied to the order. */ discount: string; /** * Tax applied to the order. */ tax?: wix_pricing_plans_backend.Orders.Tax; /** * Price after tax and discount is applied, specified as a monetary amount. For example, `"13.98"`. * * If no tax is applied, this amount is the same as `subtotal`. */ total: string; /** * Three-letter currency code in [ISO 4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. */ currency: string; }; /** * **Deprecated.** Use `pricing` instead. */ type PriceDetails = { /** * Price of the order, excluding tax. Specified as a monetary amount, such as `"3.99"`. */ subtotal: string; /** * Tax applied for the plan. Omitted if no tax was applied. */ tax?: wix_pricing_plans_backend.Orders.Tax; /** * Price after tax is applied. Specified as a monetary amount, such as `"4.98"`. If no tax was applied, this amount is the same as `subtotal`. */ total: string; /** * Price of the plan when the order was created. This price is the amount for a single payment. For subscriptions, this is the amount to pay for each single payment cycle and the `planPrice` is required. Otherwise, the payment is for the entire plan. */ planPrice: string; /** * Currency code. Must be a valid [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code (for example, `"USD"`). */ currency: string; /** * Pricing model indicating that the order has recurring payments. This type of subscription isn't a "Wix subscription," which encompasses various types of subscriptions, such as Wix Stores subscriptions, Wix invoice subscriptions, and *all* pricing plan models. */ subscription?: wix_pricing_plans_backend.Orders.OrderRecurrence; /** * Pricing model indicating that the order is paid with a single payment per cycle and what the length of the cycle is. The cycle is the duration of the order's plan, not a payment cycle. */ singlePaymentForDuration?: wix_pricing_plans_backend.Duration; /** * Pricing model indicating that the order of the plan is paid in one single payment and that the order is active until canceled. */ singlePaymentUnlimited?: boolean; /** * Free trial period for the order in days. Available only for orders whose plans are recurring, meaning plans whose pricing model is `subscription`. */ freeTrialDays?: number; }; /** * Cycle duration to apply `price` for. */ type PriceDuration = { /** * Price starts to apply with this cycle. * * `1` is the first payment cycle for all pricing models. */ cycleFrom: number; /** * Amount of cycles to apply price for. * * For `subscription` pricing models with a finite number of cycles, the `numberOfCycles` is the same as `pricing.subscription.cycleCount`. * * For `subscription` pricing models that are unlimited or until-canceled, the `numberOfCycles` is not returned. * * For `singlePaymentForDuration` and `singlePaymentUnlimited` pricing models, the `numberOfCycles` is `1`. */ numberOfCycles: number; }; /** * Pricing details for all pricing models. */ type Prices = { /** * Cycle duration to apply `price` for. * * Use with all pricing models. Can apply the same price to multiple payment cycles. */ duration: wix_pricing_plans_backend.Orders.PriceDuration; /** * Order price. */ price: wix_pricing_plans_backend.Orders.Price; }; /** * Order pricing model, price, and payment schedule. */ type Pricing = { /** * Pricing model for an order with recurring payment cycles. */ subscription?: wix_pricing_plans_backend.Orders.OrderRecurrence; /** * Pricing model for an order with a one-time payment and the order is valid for a specific amount of time. */ singlePaymentForDuration?: wix_pricing_plans_backend.Orders.Duration; /** * Pricing model for an order with a one-time payment and the order is valid until canceled. */ singlePaymentUnlimited?: boolean; /** * Pricing details for all pricing models. */ prices: wix_pricing_plans_backend.Orders.Prices; }; /** * Sorting details. */ type SortingOptions = { /** * Name of the property to sort by. * * Supported values: `_createdDate`, `endDate` * * Default: `_createdDate` */ fieldName?: string; /** * Sort order. * * Supported values: * + `"ASC"`: Ascending * + `"DESC"`: Descending * * Default: `"ASC"` */ order?: string; }; /** * Tax applied to the order. If empty, no tax was applied. */ type Tax = { /** * Name of the tax. For example, VAT. */ name: string; /** * Whether tax is included in the original price. When `false`, tax is added at checkout. */ includedInPrice: boolean; /** * Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`. */ rate: string; /** * Total tax, specified as a monetary amount. For example, `"3.99"`. */ amount: string; }; } /** * Contains functionality for refining a public pricing plan query. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.PublicPlansQueryBuilder.html#) */ interface PublicPlansQueryBuilder { /** * Adds an `and` condition to the query. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.PublicPlansQueryBuilder.html#and) */ and(query: wix_pricing_plans_backend.PublicPlansQueryBuilder): wix_pricing_plans_backend.PublicPlansQueryBuilder; /** * Adds a sort to a query, sorting by the specified properties in ascending order. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.PublicPlansQueryBuilder.html#ascending) */ ascending(...propertyName: string[]): wix_pricing_plans_backend.PublicPlansQueryBuilder; /** * Refines a query to match items whose specified property value is within a specified range. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.PublicPlansQueryBuilder.html#between) */ between(propertyName: string, rangeStart: string | number | Date, rangeEnd: string | number | Date): wix_pricing_plans_backend.PublicPlansQueryBuilder; /** * Refines a query to match items whose specified property value contains a specified string. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.PublicPlansQueryBuilder.html#contains) */ contains(propertyName: string, string: string): wix_pricing_plans_backend.PublicPlansQueryBuilder; /** * Adds a sort to a query or sort, sorting by the specified properties in descending order. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.PublicPlansQueryBuilder.html#descending) */ descending(...propertyName: string[]): wix_pricing_plans_backend.PublicPlansQueryBuilder; /** * Refines a query to match items whose specified property value ends with a specified string. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.PublicPlansQueryBuilder.html#endsWith) */ endsWith(propertyName: string, string: string): wix_pricing_plans_backend.PublicPlansQueryBuilder; /** * Refines a query to match items whose specified property value equals the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.PublicPlansQueryBuilder.html#eq) */ eq(propertyName: string, value: any): wix_pricing_plans_backend.PublicPlansQueryBuilder; /** * Returns the items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.PublicPlansQueryBuilder.html#find) */ find(): Promise; /** * Refines a query to match items whose specified property value is greater than or equal to the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.PublicPlansQueryBuilder.html#ge) */ ge(propertyName: string, value: string | number | Date): wix_pricing_plans_backend.PublicPlansQueryBuilder; /** * Refines a query to match items whose specified property value is greater than the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.PublicPlansQueryBuilder.html#gt) */ gt(propertyName: string, value: string | number | Date): wix_pricing_plans_backend.PublicPlansQueryBuilder; /** * Refines a query to match items whose specified property contains any of the specified `value` parameters. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.PublicPlansQueryBuilder.html#hasSome) */ hasSome(propertyName: string, values: string[]): wix_pricing_plans_backend.PublicPlansQueryBuilder; /** * Refines a query to match items whose specified property value is less than or equal to the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.PublicPlansQueryBuilder.html#le) */ le(propertyName: string, value: string | number | Date): wix_pricing_plans_backend.PublicPlansQueryBuilder; /** * Limits the number of items the query returns. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.PublicPlansQueryBuilder.html#limit) */ limit(limit: number): wix_pricing_plans_backend.PublicPlansQueryBuilder; /** * Refines a query to match items whose specified property value is less than the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.PublicPlansQueryBuilder.html#lt) */ lt(propertyName: string, value: string | number | Date): wix_pricing_plans_backend.PublicPlansQueryBuilder; /** * Refines a query to match items whose specified property value does not equal the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.PublicPlansQueryBuilder.html#ne) */ ne(propertyName: string, value: any): wix_pricing_plans_backend.PublicPlansQueryBuilder; /** * Adds a `not` condition to the query. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.PublicPlansQueryBuilder.html#not) */ not(query: wix_pricing_plans_backend.PublicPlansQueryBuilder): wix_pricing_plans_backend.PublicPlansQueryBuilder; /** * Adds an `or` condition to the query. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.PublicPlansQueryBuilder.html#or) */ or(query: wix_pricing_plans_backend.PublicPlansQueryBuilder): wix_pricing_plans_backend.PublicPlansQueryBuilder; /** * Sets the number of items to skip before returning query results. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.PublicPlansQueryBuilder.html#skip) */ skip(skip: number): wix_pricing_plans_backend.PublicPlansQueryBuilder; /** * Refines a query to match items whose specified property value starts with a specified string. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.PublicPlansQueryBuilder.html#startsWith) */ startsWith(propertyName: string, string: string): wix_pricing_plans_backend.PublicPlansQueryBuilder; } /** * The results of a public pricing plans query, containing the retrieved items. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.PublicPlansQueryResult.html#) */ interface PublicPlansQueryResult { /** * Returns the index of the current results page number. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.PublicPlansQueryResult.html#currentPage) */ readonly currentPage: number; /** * Returns the items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.PublicPlansQueryResult.html#items) */ readonly items: wix_pricing_plans_backend.PublicPlansQueryResult.Item[]; /** * Returns the number of items in the current results page. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.PublicPlansQueryResult.html#length) */ readonly length: number; /** * Returns the query page size. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.PublicPlansQueryResult.html#pageSize) */ readonly pageSize: number; /** * Returns the query used to get the current results. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.PublicPlansQueryResult.html#query) */ readonly query: wix_pricing_plans_backend.PublicPlansQueryBuilder; /** * Returns the total number of items that match the query. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.PublicPlansQueryResult.html#totalCount) */ readonly totalCount: number; /** * Returns the total number of pages the query produced. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.PublicPlansQueryResult.html#totalPages) */ readonly totalPages: number; /** * Indicates if the query has more results. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.PublicPlansQueryResult.html#hasNext) */ hasNext(): boolean; /** * Indicates the query has previous results. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.PublicPlansQueryResult.html#hasPrev) */ hasPrev(): boolean; /** * Retrieves the next page of query results. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.PublicPlansQueryResult.html#next) */ next(): Promise; /** * Retrieves the previous page of query results. * [Read more](https://www.wix.com/corvid/reference/wix-pricing-plans-backend.PublicPlansQueryResult.html#prev) */ prev(): Promise; } namespace PublicPlansQueryResult { /** * An item returned by a query. */ type Item = { /** * An item that matches the query. */ publicPlan: wix_pricing_plans_backend.PublicPlan; }; } type CreatePlanInfo = { /** * Plan name. */ name: string; /** * Plan price, payment schedule, and expiration. */ pricing: wix_pricing_plans_backend.PricingInfo; /** * Plan description. */ description?: string; /** * List of text strings that promote the pricing plan (for example, "Plenty of parking" or "Free gift on your birthday"). */ perks?: string[]; /** * Whether the plan is public (visible to site visitors). Defaults to `true`. */ public?: boolean; /** * Whether the same buyer can purchase the plan multiple times. `1` means the buyer can only purchase the plan once. An empty value or `0` means no limitation. Defaults to empty. */ maxPurchasesPerBuyer?: number; /** * Whether the buyer can start the plan at a later date. Defaults to `false`. */ allowFutureStartDate?: boolean; /** * Whether the buyer is allowed to cancel their plan. Defaults to `true`. If `true`, calling the [`cancelOrder()`](wix-paid-plans/cancelOrder) function returns an error. */ buyerCanCancel?: boolean; /** * Any terms and conditions that apply to the plan. This information is displayed during checkout. */ termsAndConditions?: string; }; /** * Length of one payment cycle, for example, 3 months to have quarterly payments. */ type Duration = { /** * Number of days, months, weeks, or years. */ count: number; /** * Days, months, weeks, or years. * One of: * + `"DAY"` * + `"WEEK"` * + `"MONTH"` * + `"YEAR"` */ unit: string; }; /** * Length of one payment cycle, for example, 3 months to have quarterly payments. */ type DurationInfo = { /** * Number of days, months, weeks, or years. */ count?: number; /** * Days, months, weeks, or years. * One of: * + `"DAY"` * + `"WEEK"` * + `"MONTH"` * + `"YEAR"` */ unit?: string; }; type ListPlanInfo = { /** * Number of pricing plans to list. Defaults to 50. */ limit?: number; /** * Number of pricing plans to skip. Defaults to 0. */ skip?: number; /** * Archived filter. Defaults to ACTIVE (not archived) only. * One of: * + `"ACTIVE"` * + `"ARCHIVED"` * + `"ARCHIVED_AND_ACTIVE"` */ archived?: string; /** * Visibility filter. Defaults to PUBLIC_AND_HIDDEN (meaning, both are listed). * One of: * + `"PUBLIC_AND_HIDDEN"` * + `"PUBLIC"` * + `"HIDDEN"` */ public?: string; }; type ListPublicPlanOptions = { /** * Number of public pricing plans to list. Defaults to 50. */ limit?: number; /** * Number of public pricing plans to skip. Defaults to 0. */ skip?: number; }; /** * Amount for a single payment. For subscriptions, this is the amount to pay for each single payment cycle and it is required. Otherwise, the single payment for the entire plan. */ type Money = { /** * Monetary amount. Decimal string with a period as a decimal separator (for example, 3.99). Cannot be negative. */ value: string; /** * Currency code. Must be a valid [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code (for example, USD). */ currency: string; }; /** * Amount for a single payment. For subscriptions, this is the amount to pay for each single payment cycle and it is required. Otherwise, the single payment for the entire plan. */ type MoneyInfo = { /** * Monetary amount. Decimal string with a period as a decimal separator (for example, 3.99). Cannot be negative. */ value?: string; /** * Currency code. Must be a valid [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code (for example, USD). */ currency?: string; }; type Options = { /** * Whether to suppress permission checks from running for the operation. * * Default: `false` */ suppressAuth?: boolean; }; /** * A text string promoting the pricing plan (for example, "Plenty of parking" or "Free gift on your birthday"). */ type Perk = { /** * Text listing one perk of this plan. */ value: string; }; /** * List of text strings that promote the pricing plan (for example, "Plenty of parking" or "Free gift on your birthday"). */ type Perks = { /** * A list of strings promoting the pricing plan. */ value?: wix_pricing_plans_backend.Perk[]; }; type Plan = { /** * Plan ID. */ _id: string; /** * Plan name. */ name: string; /** * Plan description. */ description: string; /** * List of text strings that promote the pricing plan (for example, "Plenty of parking" or "Free gift on your birthday"). */ perks: string[]; /** * Plan price, payment schedule, and expiration. */ pricing: wix_pricing_plans_backend.Pricing; /** * Whether the plan is public (visible to site visitors). */ public: boolean; /** * Whether the plan is archived. Archived plans are not visible and can't be purchased anymore, but existing purchases remain in effect. */ archived: boolean; /** * Whether the plan is marked as primary. If `true`, the plan is highlighted on the site with a custom ribbon. Defaults to `false`. */ primary: boolean; /** * Whether the plan has any orders (including pending and unpaid orders). */ hasOrders: boolean; /** * Date plan was created. */ _createdDate: Date; /** * Date plan was last updated. */ _updatedDate: Date; /** * URL-friendly version of the plan name. Unique across all plans in the same site. */ slug: string; /** * Whether the buyer can start the plan at a later date. */ allowFutureStartDate: boolean; /** * Whether the buyer is allowed to cancel their plan. If `false`, calling the [`cancelOrder()`](wix-paid-plans/cancelOrder) function returns an error. */ buyerCanCancel: boolean; /** * Whether the same buyer can purchase the plan multiple times. `1` means the buyer can only purchase the plan once. An empty value or `0` means no limitation. */ maxPurchasesPerBuyer?: number; /** * Any terms and conditions that apply to the plan. This information is displayed during checkout. */ termsAndConditions?: string; }; type Plans = { /** * List of public and hidden pricing plans. */ plans: wix_pricing_plans_backend.Plan[]; }; type PlansStats = { /** * Total number of plans created, including active plans (both public and hidden) and archived plans. */ total: number; }; /** * Pricing plan's pricing details, such as the plan price, payment schedule, and expiration. The payment schedule and expiration are based on one of three [pricing models](wix-pricing-plans-backend/introduction): `subscription`, `singlePaymentForDuration`, or `singlePaymentUnlimited`. Only one pricing model can be specified per plan. */ type Pricing = { /** * Pricing model indicating that the plan has recurring payments. This type of subscription is not a "Wix subscription," which encompasses various types of subscriptions, such as Wix Stores subscriptions, Wix invoice subscriptions, and *all* pricing plan models. */ subscription?: wix_pricing_plans_backend.Recurrence; /** * Pricing model indicating that the plan is paid with a single payment per cycle and what the length of the cycle is. The cycle is the duration of the plan, not a payment cycle. */ singlePaymentForDuration?: wix_pricing_plans_backend.Duration; /** * Pricing model indicating that the plan is paid in one single payment and that the plan is valid until canceled. */ singlePaymentUnlimited?: boolean; /** * Amount for a single payment. For subscriptions, this is the amount to pay for each single payment cycle and it is required. Otherwise, the single payment for the entire plan. */ price: wix_pricing_plans_backend.Money; /** * Free trial period for the plan in days. Available only for recurring plans, meaning plans whose pricing model is `subscription`. */ freeTrialDays?: number; }; /** * Pricing plan's pricing details, such as the plan price, payment schedule, and expiration. The payment schedule and expiration are based on one of three [pricing models](wix-pricing-plans-backend/introduction): `subscription`, `singlePaymentForDuration`, or `singlePaymentUnlimited`. */ type PricingInfo = { /** * Pricing model indicating that the plan has recurring payments. */ subscription?: wix_pricing_plans_backend.Recurrence; /** * Pricing model indicating that the plan is paid with a single payment per cycle and what the Length of the cycle is. The cycle is the duration of the plan, not a payment cycle. */ singlePaymentForDuration?: wix_pricing_plans_backend.Duration; /** * Pricing model indicating that the plan is paid in one single payment and that the plan is valid until canceled. */ singlePaymentUnlimited?: boolean; /** * Amount for a single payment. For subscriptions, this is the amount to pay for each single payment cycle and it is required. Otherwise, the single payment for the entire plan. */ price?: wix_pricing_plans_backend.MoneyInfo; /** * Free trial period for the plan in days. Available only for recurring plans, meaning plans whose pricing model is `subscription`. */ freeTrialDays?: number; }; /** * Public pricing plan entity containing information about the pricing plan. Can be read by any site member or visitor. */ type PublicPlan = { /** * Plan ID. */ _id: string; /** * Plan name. */ name: string; /** * Plan description. */ description: string; /** * List of text strings that promote the pricing plan (for example, "Plenty of parking" or "Free gift on your birthday"). */ perks: string[]; /** * Plan price, payment schedule, and expiration. */ pricing: wix_pricing_plans_backend.Pricing; /** * Whether the plan is marked as primary. If `true`, the plan is highlighted on the site with a custom ribbon. Defaults to `false`. */ primary: boolean; /** * Date plan was created. */ _createdDate: Date; /** * Date plan was last updated. */ _updatedDate: Date; /** * URL-friendly version of the plan name. Unique across all plans in the same site. */ slug: string; /** * Whether the buyer can start the plan at a later date. Defaults to `false`. */ allowFutureStartDate: boolean; /** * Whether the buyer is allowed to cancel their plan. Defaults to `false`. If `false`, calling the [`cancelOrder()`](wix-paid-plans/cancelOrder) function returns an error. */ buyerCanCancel: boolean; /** * Whether the same buyer can purchase the plan multiple times. `1` means the buyer can only purchase the plan once. An empty value or `0` means no limitation. Defaults to empty. */ maxPurchasesPerBuyer?: number; /** * Any terms and conditions that apply to the plan. This information is displayed during checkout. */ termsAndConditions?: string; }; type PublicPlans = { /** * List of public pricing plans. */ publicPlans: wix_pricing_plans_backend.PublicPlan[]; }; /** * The pricing plan has recurring payments. */ type Recurrence = { /** * Length of one payment cycle, for example, 1 month to have monthly payments. Multiply `cycleDuration`'s `count` by `cycleCount` to get the subscription duration. *Currently, only a value of `1` is supported.* */ cycleDuration: wix_pricing_plans_backend.Duration; /** * Number of cycles. Zero for unlimited plans and plans that are valid until canceled. */ cycleCount: number; }; /** * The pricing plan has recurring payments. */ type RecurrenceInfo = { /** * Length of one payment cycle, for example, 1 month to have monthly payments. Multiply `cycleDuration`'s `count` by `cycleCount` to get the subscription duration. *Currently, only a value of `1` is supported.* */ cycleDuration?: wix_pricing_plans_backend.DurationInfo; /** * Number of cycles. Zero for unlimited plans and plans that are valid until canceled. */ cycleCount?: number; }; type UpdatePlanInfo = { /** * Plan ID. */ _id: string; /** * Plan name. */ name?: string; /** * Plan description. */ description?: string; /** * List of text strings that promote the pricing plan (for example, "Plenty of parking" or "Free gift on your birthday"). */ perks?: string[]; /** * Plan price, payment schedule, and expiration. */ pricing?: wix_pricing_plans_backend.PricingInfo; /** * Whether the plan is public (visible to site visitors). */ public?: boolean; /** * Whether the same buyer can purchase the plan multiple times. `1` means the buyer can only purchase the plan once. An empty value or `0` means no limitation. Defaults to empty. */ maxPurchasesPerBuyer?: number; /** * Whether the buyer can start the plan at a later date. */ allowFutureStartDate?: boolean; /** * Whether the buyer is allowed to cancel their plan. If `false`, calling the [`cancelOrder()`](wix-paid-plans/cancelOrder) function returns an error. */ buyerCanCancel?: boolean; /** * Any terms and conditions that apply to the plan. This information is displayed during checkout. */ termsAndConditions?: string; }; } declare namespace wix_realtime { /** * An object representing a channel or channel resource. * Site visitors can subscribe to a channel or channel resource to receive the * messages that are published on it. When site visitors subscribe to a channel, they do not * receive messages published to a resource on that same channel. Similarly, * when site visitors subscribe to a channel resource, they do not * receive messages published to that same channel without a specified resource. * Channel resources inherit their parent channel's permissions, unless specified * otherwise. */ type Channel = { /** * Channel name. Cannot exceed 140 characters. */ name: string; /** * ID of a specific channel resource. */ resourceId?: string; }; /** * An object representing an error. */ type Error = { /** * Error code. * * One of: * * + `1`: Connection error * + `2`: Subscription error (error will also include a channel value) * + `3`: Bad input */ errorCode: number; /** * Error message. */ message: string; /** * Channel related to the error. */ channel?: wix_realtime.Channel; }; /** * An object representing a published message. */ type Message = { /** * Message payload. * Max: 10kb */ payload: any; /** * Message publisher, if sent. */ publisher?: wix_realtime.Publisher; }; /** * An object representing a publisher. */ type Publisher = { /** * ID of the publisher. */ id: string; }; /** * An object containing options to be used when unsubscribing from a * channel or channel resource. */ type UnsubscribeOptions = { /** * The channel, and optionally the resource, to * unsubscribe from. Use this property when unsubscribing from all subscriptions to a channel * or channel resource. */ channel?: wix_realtime.Channel; /** * ID of the subscription to unsubscribe from. Use this * property when unsubscribing from one of multiple subscriptions to a channel or channel * resource. */ subscriptionId?: string; }; type ConnectionHandler = () => void; type DisconnectionHandler = () => void; type ErrorHandler = (error: wix_realtime.Error) => void; type MessageHandler = (message: wix_realtime.Message, channel: wix_realtime.Channel) => void; } declare namespace wix_realtime_backend { /** * A router for defining and checking permissions. * [Read more](https://www.wix.com/corvid/reference/wix-realtime-backend.PermissionsRouter.html#) */ interface PermissionsRouter { /** * Sets a permissions handler for a specific channel or channel resource. * [Read more](https://www.wix.com/corvid/reference/wix-realtime-backend.PermissionsRouter.html#add) */ add(channel: wix_realtime_backend.Channel, handler: wix_realtime_backend.PermissionsRouter.PermissionsHandler): Promise & void; /** * Checks the permissions for a subscriber on a channel or channel resource. * [Read more](https://www.wix.com/corvid/reference/wix-realtime-backend.PermissionsRouter.html#check) */ check(channel: wix_realtime_backend.Channel, subscriber: wix_realtime_backend.Subscriber): Promise & wix_realtime_backend.ChannelPermissions; /** * Sets a permissions handler for default permissions. * [Read more](https://www.wix.com/corvid/reference/wix-realtime-backend.PermissionsRouter.html#default) */ default(handler: wix_realtime_backend.PermissionsRouter.PermissionsHandler): void; } namespace PermissionsRouter { type PermissionsHandler = (channel: wix_realtime_backend.Channel, subscriber: wix_realtime_backend.Subscriber) => Promise | wix_realtime_backend.ChannelPermissions; } /** * An object representing a channel or channel resource. * Site visitors can subscribe to a channel or channel resource to receive the * messages that are published on it. When site visitors subscribe to a channel, they do not * receive messages published to a resource on that same channel. Similarly, * when site visitors subscribe to a channel resource, they do not * receive messages published to that same channel without a specified resource. * Channel resources inherit their parent channel's permissions, unless specified * otherwise. */ type Channel = { /** * Channel name. Cannot exceed 140 characters. Cannot include spaces or special characters. */ name: string; /** * ID of a specific channel resource. */ resourceId?: string; }; /** * An object containing permission settings for a channel. */ type ChannelPermissions = { /** * Whether the subscriber has read permissions. Defaults to `true`. */ read?: boolean; }; /** * An object containing options for publishing. */ type PublishOptions = { /** * User IDs of specific users to publish to. */ users?: string[]; /** * Whether to include information about the message publisher. * Defaults to `false`. */ includePublisher?: boolean; }; /** * An object representing a channel subscriber. */ type Subscriber = { /** * The subscriber's user ID. */ id: string; /** * The type of subscriber. * * One of: * * + `"Admin"`: Subscriber is the site owner. * + `"Member"`: Subscriber is a logged-in site member. * + `"Visitor"`: Subscriber in not logged in. */ type: string; }; } declare namespace wix_router { /** * An object representing an incoming page request received by a router. * [Read more](https://www.wix.com/corvid/reference/wix-router.WixRouterRequest.html#) */ interface WixRouterRequest { /** * Returns the base URL of the router request. * [Read more](https://www.wix.com/corvid/reference/wix-router.WixRouterRequest.html#baseUrl) */ readonly baseUrl: string; /** * Returns the current environment the router rendering process is running in. * [Read more](https://www.wix.com/corvid/reference/wix-router.WixRouterRequest.html#env) */ readonly env: string; /** * Returns the form factor of the device used to make the router request. * [Read more](https://www.wix.com/corvid/reference/wix-router.WixRouterRequest.html#formFactor) */ readonly formFactor: string; /** * Returns the remote IP address of the router request. * [Read more](https://www.wix.com/corvid/reference/wix-router.WixRouterRequest.html#ip) */ readonly ip: string; /** * Returns the names of the pages associated with this router. * [Read more](https://www.wix.com/corvid/reference/wix-router.WixRouterRequest.html#pages) */ readonly pages: string[]; /** * Returns the path of the router request URL. * [Read more](https://www.wix.com/corvid/reference/wix-router.WixRouterRequest.html#path) */ readonly path: string[]; /** * Returns the router prefix of the router request URL. * [Read more](https://www.wix.com/corvid/reference/wix-router.WixRouterRequest.html#prefix) */ readonly prefix: string; /** * Returns the protocol of the router request URL. * [Read more](https://www.wix.com/corvid/reference/wix-router.WixRouterRequest.html#protocol) */ readonly protocol: string; /** * Returns the query fields and values of the request URL. * [Read more](https://www.wix.com/corvid/reference/wix-router.WixRouterRequest.html#query) */ readonly query: any; /** * Returns the `referrer` header from the router request. * [Read more](https://www.wix.com/corvid/reference/wix-router.WixRouterRequest.html#referrer) */ readonly referrer: string; /** * Returns the full URL of the router request. * [Read more](https://www.wix.com/corvid/reference/wix-router.WixRouterRequest.html#url) */ readonly url: string; /** * Returns the details of the current site user who is logged in. * [Read more](https://www.wix.com/corvid/reference/wix-router.WixRouterRequest.html#user) */ readonly user: wix_router.WixRouterUser; /** * Returns the `user-agent` header as sent from the device used to make the router request. * [Read more](https://www.wix.com/corvid/reference/wix-router.WixRouterRequest.html#userAgent) */ readonly userAgent: string; } /** * An object representing a response to a request received by a router. * [Read more](https://www.wix.com/corvid/reference/wix-router.WixRouterResponse.html#) */ interface WixRouterResponse { /** * Sets or gets the data to pass with the response. * [Read more](https://www.wix.com/corvid/reference/wix-router.WixRouterResponse.html#data) */ data: any; /** * Sets or gets the members to be written to the HTML head of the page. * [Read more](https://www.wix.com/corvid/reference/wix-router.WixRouterResponse.html#head) */ head: wix_router.WixRouterResponse.HeadOptions; /** * Sets or gets the response message to be used when responding with status codes 4xx and 5xx. * [Read more](https://www.wix.com/corvid/reference/wix-router.WixRouterResponse.html#message) */ message: string; /** * Sets or gets the page to route to. * [Read more](https://www.wix.com/corvid/reference/wix-router.WixRouterResponse.html#page) */ page: string; /** * Sets or gets the url to redirect to when responding with status codes 301 and 302. * [Read more](https://www.wix.com/corvid/reference/wix-router.WixRouterResponse.html#redirectUrl) */ redirectUrl: string; /** * Sets or gets the response's HTTP status code. * [Read more](https://www.wix.com/corvid/reference/wix-router.WixRouterResponse.html#status) */ status: number; } namespace WixRouterResponse { /** * Members of the HTML head. */ type HeadOptions = { /** * The page title. Written to the `` tag. */ title?: string; /** * **Deprecated: Use the new `metaTags` format instead.** * * The page description. */ description?: string; /** * **Deprecated: Use the new `metaTags` format instead.** * * The page keywords. */ keywords?: string; /** * **Deprecated: Use the new `metaTags` format instead.** * * Indicates whether to add a meta tag that prevents search engines from indexing the * page. */ noIndex?: boolean; /** * The page's SEO-related meta tags. * * The keys in the object represent the keys in the tag and the values in the * object represent the values in the tag. * * For example: * * ```javascript * { * "property": "og:image", * "content": "https://.../Wix+logo.jpg" * } * ``` * * Produces: * * ```html * * ``` * * When setting `og:image` meta tags, the `content` can be an external image URL * or a Media Manager image URL as described [here]($w.Image.html#src). * * **Deprecated format:** An object with key:value pairs where the key is the meta tag name * and the value is the content. */ metaTags?: wix_router.WixRouterResponse.MetaTag[]; /** * The page's SEO-related link tags, * which provide additional SEO information about the page. For example, you can set a * link to a canonical or alternate version of the page. */ links?: wix_router.WixRouterResponse.Link[]; /** * The page's structured data, which helps search engines * understand more about the page and your business so they can display a richer snippet of the * page in search results. */ structuredData?: any[]; }; /** * An object representing a link tag. */ type Link = { /** * The relationship of the linked resource to the current page. */ rel?: string; /** * The URL of the linked resource. */ href?: string; }; /** * An object representing a meta tag. */ type MetaTag = { /** * Name of the meta tag. Either `name` or `property` is required. */ name?: string; /** * Name of the meta tag property. Either `property` or `name` is required. */ property?: string; /** * HTTP header that corresponds to the `content`. */ "http-equiv"?: string; /** * Meta tag value. For `og:image` meta tags, the `content` can * be an external image URL or a Media Manager image URL as described [here]($w.Image.html#src). */ content: string; }; } /** * An object representing a single entry in a sitemap. * [Read more](https://www.wix.com/corvid/reference/wix-router.WixRouterSitemapEntry.html#) */ interface WixRouterSitemapEntry { /** * Sets or gets how frequently the page is likely to change. * [Read more](https://www.wix.com/corvid/reference/wix-router.WixRouterSitemapEntry.html#changeFrequency) */ changeFrequency: string; /** * Sets or gets when was the page data last modified. * [Read more](https://www.wix.com/corvid/reference/wix-router.WixRouterSitemapEntry.html#lastModified) */ lastModified: Date; /** * Sets or gets the page name. * [Read more](https://www.wix.com/corvid/reference/wix-router.WixRouterSitemapEntry.html#pageName) */ pageName: string; /** * Sets or gets the priority of this URL relative to other URLs on your site. * [Read more](https://www.wix.com/corvid/reference/wix-router.WixRouterSitemapEntry.html#priority) */ priority: number; /** * Sets or gets the page title. * [Read more](https://www.wix.com/corvid/reference/wix-router.WixRouterSitemapEntry.html#title) */ title: string; /** * Sets or gets the relative url of the page. * [Read more](https://www.wix.com/corvid/reference/wix-router.WixRouterSitemapEntry.html#url) */ url: string; } /** * An object representing a request for a sitemap. * [Read more](https://www.wix.com/corvid/reference/wix-router.WixRouterSitemapRequest.html#) */ interface WixRouterSitemapRequest { /** * Returns the base URL of the request. * [Read more](https://www.wix.com/corvid/reference/wix-router.WixRouterSitemapRequest.html#baseUrl) */ readonly baseUrl: string; /** * Sets or gets the page name. * [Read more](https://www.wix.com/corvid/reference/wix-router.WixRouterSitemapRequest.html#pageName) */ readonly pageName: string; /** * Returns the names of the pages associated with this router. * [Read more](https://www.wix.com/corvid/reference/wix-router.WixRouterSitemapRequest.html#pages) */ readonly pages: string[]; /** * Returns the router prefix of the request. * [Read more](https://www.wix.com/corvid/reference/wix-router.WixRouterSitemapRequest.html#prefix) */ readonly prefix: string; /** * Returns the details of the current site user who is logged in. * [Read more](https://www.wix.com/corvid/reference/wix-router.WixRouterSitemapRequest.html#user) */ readonly user: wix_router.WixRouterUser; } /** * An object that contains information about the current site visitor who is logged in. * [Read more](https://www.wix.com/corvid/reference/wix-router.WixRouterUser.html#) */ interface WixRouterUser { /** * Gets the user's ID. * [Read more](https://www.wix.com/corvid/reference/wix-router.WixRouterUser.html#id) */ readonly id: string; /** * Gets the user's role. * [Read more](https://www.wix.com/corvid/reference/wix-router.WixRouterUser.html#role) */ readonly role: string; } } declare namespace wix_search { /** * Contains functionality for refining a site search. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchBuilder.html#) */ interface WixSearchBuilder { /** * Refines a search to match documents that meet the conditions of all of the specified filters. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchBuilder.html#and) */ and(...filters: wix_search.WixSearchFilter[]): wix_search.WixSearchBuilder; /** * Adds a sort to a search, sorting by the specified fields in ascending order. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchBuilder.html#ascending) */ ascending(...field: string[]): wix_search.WixSearchBuilder; /** * Adds a sort to a search, sorting by the specified fields in descending order. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchBuilder.html#descending) */ descending(...field: string[]): wix_search.WixSearchBuilder; /** * Refines a search builder to only search for documents of the specified document type. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchBuilder.html#documentType) */ documentType(type: string): wix_search.WixSearchBuilder; /** * Refines a search to match documents whose specified field value equals the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchBuilder.html#eq) */ eq(field: string, value: any): wix_search.WixSearchBuilder; /** * Categorizes search results according to the specified facets. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchBuilder.html#facets) */ facets(...facets: string[]): wix_search.WixSearchBuilder; /** * Returns the documents that match the search. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchBuilder.html#find) */ find(): Promise; /** * Sets whether to search for exact matches or approximate matches of the search phrase. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchBuilder.html#fuzzy) */ fuzzy(fuzzy: boolean): wix_search.WixSearchBuilder; /** * Refines a search to match documents whose specified field value is greater than or equal to the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchBuilder.html#ge) */ ge(field: string, value: string | number | Date): wix_search.WixSearchBuilder; /** * Refines a search to match documents whose specified field value is greater than the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchBuilder.html#gt) */ gt(field: string, value: string | number | Date): wix_search.WixSearchBuilder; /** * Refines a search to match documents whose specified field value contains all of the specified values. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchBuilder.html#hasAll) */ hasAll(field: string, values: string[]): wix_search.WixSearchBuilder; /** * Refines a search to match documents whose specified field contains any of the specified values. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchBuilder.html#hasSome) */ hasSome(field: string, values: string[]): wix_search.WixSearchBuilder; /** * Refines a search to match documents whose specified field value equals any of the specified values. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchBuilder.html#in) */ in(field: string, values: string[] | number[]): wix_search.WixSearchBuilder; /** * Refines a search builder to search in the specified language. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchBuilder.html#language) */ language(language: string): wix_search.WixSearchBuilder; /** * Refines a search or filter to match documents whose specified field value is less than or equal to the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchBuilder.html#le) */ le(field: string, value: string | number | Date): wix_search.WixSearchBuilder; /** * Limits the number of documents the search returns. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchBuilder.html#limit) */ limit(limit: number): wix_search.WixSearchBuilder; /** * Refines a search or filter to match documents whose specified field value is less than the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchBuilder.html#lt) */ lt(field: string, value: string | number | Date): wix_search.WixSearchBuilder; /** * Refines a search to match documents whose specified field value does not equal the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchBuilder.html#ne) */ ne(field: string, value: any): wix_search.WixSearchBuilder; /** * Refines a search to match documents that do not meet the conditions of all of the specified filters. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchBuilder.html#not) */ not(...filters: wix_search.WixSearchFilter[]): wix_search.WixSearchBuilder; /** * Refines a search to match documents that meet the condition of any of the specified filters. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchBuilder.html#or) */ or(...filters: wix_search.WixSearchFilter[]): wix_search.WixSearchBuilder; /** * Sets the search phrase to search for. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchBuilder.html#query) */ query(phrase: string): wix_search.WixSearchBuilder; /** * Refines a search to include only certain fields. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchBuilder.html#searchFields) */ searchFields(fields: string[]): wix_search.WixSearchBuilder; /** * Sets the number of documents to skip before returning search results. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchBuilder.html#skip) */ skip(skip: number): wix_search.WixSearchBuilder; } /** * Contains functionality for creating filters to use in a site search. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchFilterBuilder.html#) */ interface WixSearchFilterBuilder { /** * Creates a search filter for matching documents that meet the conditions of all of the specified filters. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchFilterBuilder.html#and) */ and(...filters: wix_search.WixSearchFilter[]): wix_search.WixSearchFilter; /** * Creates a search filter for matching documents whose specified field value equals the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchFilterBuilder.html#eq) */ eq(field: string, value: any): wix_search.WixSearchFilter; /** * Creates a search filter for matching documents whose specified field value is greater than or equal to the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchFilterBuilder.html#ge) */ ge(field: string, value: string | number | Date): wix_search.WixSearchFilter; /** * Creates a search filter for matching documents whose specified field value is greater than the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchFilterBuilder.html#gt) */ gt(field: string, value: string | number | Date): wix_search.WixSearchFilter; /** * Creates a search filter for matching documents whose specified field value contains all of the specified values. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchFilterBuilder.html#hasAll) */ hasAll(field: string, values: string[]): wix_search.WixSearchFilter; /** * Creates a search filter for matching documents whose specified field contains any of the specified values. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchFilterBuilder.html#hasSome) */ hasSome(field: string, values: string[]): wix_search.WixSearchFilter; /** * Creates a search filter for matching documents whose specified field value equals any of the specified values. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchFilterBuilder.html#in) */ in(field: string, values: string[] | number[]): wix_search.WixSearchFilter; /** * Creates a search filter for matching documents whose specified field value is less than or equal to the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchFilterBuilder.html#le) */ le(field: string, value: string | number | Date): wix_search.WixSearchFilter; /** * Creates a search filter for matching documents whose specified field value is less than the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchFilterBuilder.html#lt) */ lt(field: string, value: string | number | Date): wix_search.WixSearchFilter; /** * Creates a search filter for matching documents whose specified field value does not equal the specified value. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchFilterBuilder.html#ne) */ ne(field: string, value: any): wix_search.WixSearchFilter; /** * Creates a search filter for matching documents that do not meet the conditions of all of the specified filters. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchFilterBuilder.html#not) */ not(...filters: wix_search.WixSearchFilter[]): wix_search.WixSearchFilter; /** * Creates a filter for matching documents that meet the condition of any of the specified filters. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchFilterBuilder.html#or) */ or(...filters: wix_search.WixSearchFilter[]): wix_search.WixSearchFilter; } /** * The results of a site search, containing the retrieved documents. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchResult.html#) */ interface WixSearchResult { /** * Returns the index of the current results page number. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchResult.html#currentPage) */ readonly currentPage: number; /** * Returns the documents that match the search. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchResult.html#documents) */ readonly documents: wix_search.WixSearchResult.Document[]; /** * Returns the facet results retrieved by the search. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchResult.html#facets) */ readonly facets: wix_search.WixSearchResult.FacetResult[]; /** * Returns the number of documents in the current results page. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchResult.html#length) */ readonly length: number; /** * Returns the search page size. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchResult.html#pageSize) */ readonly pageSize: number; /** * Returns the total number of documents that match the search. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchResult.html#totalCount) */ readonly totalCount: number; /** * Returns the total number of pages the search produced. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchResult.html#totalPages) */ readonly totalPages: number; /** * Indicates if the search has another page of results. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchResult.html#hasNext) */ hasNext(): boolean; /** * Indicates if the search has a previous page of results. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchResult.html#hasPrev) */ hasPrev(): boolean; /** * Retrieves the next page of search results. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchResult.html#next) */ next(): Promise; /** * Retrieves the previous page of search results. * [Read more](https://www.wix.com/corvid/reference/wix-search.WixSearchResult.html#prev) */ prev(): Promise; } namespace WixSearchResult { /** * A document returned by a site search. The following are the default properties included in every search result document. For app-specific properties, check the supported schema for each [`documentType`](wix-search.WixSearchBuilder.html#documentType). */ type Document = { /** * Unique document identifier. */ _id: string; /** * Document image in the following format: `wix:image://v1//#originWidth=&originHeight=[&watermark=]` */ image: string; /** * Document type. * One of the following: * * + `Site/Pages` * + `Blog/Posts` * + `Bookings/Services` * + `Forum/Content` * + `Stores/Products` */ documentType: string; /** * The relative page URL. For regular site pages, the URL defined in [SEO settings](https://support.wix.com/en/article/changing-your-page-url). Note that the `url` for the home page is an empty string. For Wix app pages, the URL stored in the database collection. */ url: string; /** * For regular site pages, all text on the page. For Wix app pages, the description or content stored in the database collection. */ description: string; /** * For regular site pages, the [SEO page title](https://support.wix.com/en/article/adding-seo-page-titles-and-descriptions-meta-tags#page-titles). For Wix app pages, the title or name stored in the database collection. */ title: string; }; /** * Facet value information. */ type Facet = { /** * Facet value. */ facetValue: string; /** * Number of returned documents that match the facet value. */ count: number; }; /** * Facet information for a single facet specified for the search. Includes the name of the specified facet and the results for each facet value. */ type FacetGroup = { /** * Name of the facet specified for the search. */ facet: string; /** * Information about the facet values for the specified facet. */ facets: wix_search.WixSearchResult.Facet[]; }; /** * A facet result returned by a site search. A facet result is returned for each parameter specified in the [`facets()`](wix-search.WixSearchBuilder.html#facets) function. */ type FacetResult = { /** * A facet group with facet information. Includes the name of the specified facet and the results for each facet value. */ facets: wix_search.WixSearchResult.FacetGroup[]; }; } /** * Contains functionality for filtering a site search. */ type WixSearchFilter = { /** * An object containing the filter definition. */ filterDefinition: any; }; } declare namespace wix_secrets_backend { /** * An object representing information for creating or updating a secret. */ type Secret = { /** * A unique, meaningful name used for retrieving the secret at runtime using [`getSecret()`](wix-secrets-backend.html#getSecret). You can use alphanumeric characters and the following special characters: `_+=-#@$#`. Spaces are not supported. */ name: string; /** * The confidential value to protect, such as an API key. */ value: string; /** * An optional text describing the secret's purpose or any other notes. */ description?: string; }; /** * Information about a secret, not including the protected `value`. */ type SecretInfo = { /** * The secret's ID. */ id: string; /** * A unique, meaningful name used for retrieving the secret at runtime using [`getSecret()`](wix-secrets-backend.html#getSecret). */ name: string; /** * An optional text describing the secret's purpose or any other notes about it. */ description: string; /** * The date and time the secret was created. */ createdDate: Date; /** * The date and time the secret was last updated. */ updatedDate: Date; }; /** * An object representing information for creating or updating a secret. */ type SecretUpdateInfo = { /** * A unique, meaningful name used for retrieving the secret at runtime using [`getSecret()`](wix-secrets-backend.html#getSecret). You can use alphanumeric characters and the following special characters: `_+=-#@$#`. Spaces are not supported. */ name?: string; /** * The confidential value to protect, such as an API key. */ value?: string; /** * An optional text describing the secret's purpose or any other notes. */ description?: string; }; } declare namespace wix_seo { /** * An object representing a link tag. */ type Link = { /** * The relationship of the linked resource to the current page. */ rel?: string; /** * The URL of the linked resource. */ href?: string; }; /** * An object representing a meta tag. */ type MetaTag = { /** * Name of the meta tag. Either `name` or `property` are required. */ name?: string; /** * Name of the meta tag property. Either `property` or `name` are required. */ property?: string; /** * HTTP header that corresponds to the `content`. */ "http-equiv"?: string; /** * Meta tag value. For `og:image` meta tags, the `content` can * be an external image URL or a Media Manager image URL as described [here]($w.Image.html#src). */ content: string; }; } declare namespace wix_site_backend { /** * The generalInfo API contains functionality for getting * [the information about your business](https://support.wix.com/en/article/adding-your-sites-business-info) that * has been entered in the **General Info** section of your site's [**Dashboard**](https://support.wix.com/en/article/wix-dashboard-overview). * [Read more](https://www.wix.com/corvid/reference/wix-site-backend.GeneralInfo.html#) */ interface GeneralInfo { /** * Gets the physical address of the site's business. * [Read more](https://www.wix.com/corvid/reference/wix-site-backend.GeneralInfo.html#getAddress) */ getAddress(): Promise; /** * Gets the site business name. * [Read more](https://www.wix.com/corvid/reference/wix-site-backend.GeneralInfo.html#getBusinessName) */ getBusinessName(): Promise; /** * Gets the business hours of the site's business. * [Read more](https://www.wix.com/corvid/reference/wix-site-backend.GeneralInfo.html#getBusinessSchedule) */ getBusinessSchedule(): Promise; /** * Gets the site category information. * [Read more](https://www.wix.com/corvid/reference/wix-site-backend.GeneralInfo.html#getCategories) */ getCategories(): Promise; /** * Gets the site description. * [Read more](https://www.wix.com/corvid/reference/wix-site-backend.GeneralInfo.html#getDescription) */ getDescription(): Promise; /** * Gets the email address used for notifications of activities on your site. * [Read more](https://www.wix.com/corvid/reference/wix-site-backend.GeneralInfo.html#getEmail) */ getEmail(): Promise; /** * Gets the fax number used for notifications of activities on your site. * [Read more](https://www.wix.com/corvid/reference/wix-site-backend.GeneralInfo.html#getFax) */ getFax(): Promise; /** * Gets site language information. * [Read more](https://www.wix.com/corvid/reference/wix-site-backend.GeneralInfo.html#getLanguage) */ getLanguage(): Promise; /** * Gets site locale information. * [Read more](https://www.wix.com/corvid/reference/wix-site-backend.GeneralInfo.html#getLocale) */ getLocale(): Promise; /** * Gets the site logo file name. * [Read more](https://www.wix.com/corvid/reference/wix-site-backend.GeneralInfo.html#getLogo) */ getLogo(): Promise; /** * Gets site multilingual information. * [Read more](https://www.wix.com/corvid/reference/wix-site-backend.GeneralInfo.html#getMultilingual) */ getMultilingual(): Promise; /** * Gets site payment currency information. * [Read more](https://www.wix.com/corvid/reference/wix-site-backend.GeneralInfo.html#getPaymentCurrency) */ getPaymentCurrency(): Promise; /** * Gets the phone number used for notifications of activities on your site. * [Read more](https://www.wix.com/corvid/reference/wix-site-backend.GeneralInfo.html#getPhone) */ getPhone(): Promise; /** * Gets the site display name. * [Read more](https://www.wix.com/corvid/reference/wix-site-backend.GeneralInfo.html#getSiteDisplayName) */ getSiteDisplayName(): Promise; /** * Gets site time zone information. * [Read more](https://www.wix.com/corvid/reference/wix-site-backend.GeneralInfo.html#getTimeZone) */ getTimeZone(): Promise; } namespace GeneralInfo { /** * An object representing a site's corresponding physical address. */ type GeneralInfoAddress = { /** * Address street. */ street: string; /** * Address city. */ city: string; /** * Address country. */ country: string; /** * Address state. */ state: string; /** * Address zip code. */ zip: string; /** * Address description. */ hint: wix_site_backend.GeneralInfo.GeneralInfoAddressHint; /** * Whether the business has a physical address. */ isPhysical: boolean; /** * Address as formatted by Google. */ googleFormattedAddress: string; /** * Address street number. */ streetNumber: string; /** * Address apartment number. */ apartmentNumber: string; /** * Address coordinates. */ coordinates: wix_site_backend.GeneralInfo.GeneralInfoAddressCoordinates; }; /** * An object representing the coordinates of the site address. */ type GeneralInfoAddressCoordinates = { /** * Address latitude. */ latitude: string; /** * Address longitude. */ longitude: string; }; /** * An object representing a description of a site's address. */ type GeneralInfoAddressHint = { /** * Address description. */ text: string; /** * Whether description is shown before, after, or instead of the actual address. */ placement: string; }; /** * An object representing the categories that describe your site's business. */ type GeneralInfoCategories = { /** * Primary site category. */ primary: string; /** * List of secondary site categories. */ secondary: string[]; }; /** * An object representing the site's languages. */ type GeneralInfoLanguages = { /** * List supported languages. */ supportedLanguages: wix_site_backend.GeneralInfo.GeneralInfoLanguagesSupported[]; /** * Whether to automatically redirect users based on their browser's settings. */ autoRedirect: boolean; }; /** * An object representing the site's supported languages. */ type GeneralInfoLanguagesSupported = { /** * Language code. */ languageCode: string; /** * Language locale. */ locale: wix_site_backend.GeneralInfo.GeneralInfoLocale; /** * Country Code for the Language icon. */ countryCode: string; /** * Whether the language is the primary language. */ isPrimary: boolean; }; /** * An object representing a site's locale. */ type GeneralInfoLocale = { /** * Site country. */ country: string; /** * Site language code. */ languageCode: string; }; /** * An object representing business hours. */ type GeneralInfoSchedule = { /** * List of opening and closing days and times. */ periods: wix_site_backend.GeneralInfo.GeneralInfoSchedulePeriods[]; /** * Special hours. */ specialHourPeriod: wix_site_backend.GeneralInfo.GeneralInfoScheduleSpecial[]; }; /** * An object representing business opened and closed hours. */ type GeneralInfoSchedulePeriods = { /** * Business opening day. */ openDay: string; /** * Business opening time. */ openTime: string; /** * Business closing day. */ closeDay: string; /** * Business closing time. */ closeTime: string; }; /** * An object representing special business hours. */ type GeneralInfoScheduleSpecial = { /** * Special hours start date. */ startDate: string; /** * Special hours end date. */ endDate: string; /** * Whether the business is closed. */ isClosed: boolean; /** * Special hours comment. */ comment: string; }; } } declare namespace wix_stores_backend { /** * Events that are fired from a Wix Store. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.Events.html#) */ interface Events { /** * An event that fires when a visitor abandons a shopping cart. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.Events.html#onCartAbandoned) */ onCartAbandoned(event: wix_stores_backend.Events.CartAbandonedEvent): void; /** * An event that fires when a visitor completes a purchase from a shopping cart. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.Events.html#onCartCompleted) */ onCartCompleted(event: wix_stores_backend.Events.CartCompletedEvent): void; /** * An event that fires when a cart is created. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.Events.html#onCartCreated) */ onCartCreated(event: wix_stores_backend.Events.CartCreatedEvent): void; /** * An event that fires when a visitor completes a purchase from an abandoned shopping cart. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.Events.html#onCartRecovered) */ onCartRecovered(event: wix_stores_backend.Events.CartRecoveredEvent): void; /** * An event that fires when a product collection is created. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.Events.html#onCollectionCreated) */ onCollectionCreated(event: wix_stores_backend.Events.CollectionCreatedEvent): void; /** * An event that fires when a product collection is deleted. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.Events.html#onCollectionDeleted) */ onCollectionDeleted(event: wix_stores_backend.Events.CollectionDeletedEvent): void; /** * An event that fires when a product collection is updated. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.Events.html#onCollectionUpdated) */ onCollectionUpdated(event: wix_stores_backend.Events.CollectionUpdatedEvent): void; /** * An event that fires when an order fulfillment is created. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.Events.html#onFulfillmentCreated) */ onFulfillmentCreated(event: wix_stores_backend.Events.FulfillmentCreatedEvent): void; /** * An event that fires when an order fulfillment is deleted. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.Events.html#onFulfillmentDeleted) */ onFulfillmentDeleted(event: wix_stores_backend.Events.FulfillmentDeletedEvent): void; /** * An event that fires when an order fulfillment is updated. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.Events.html#onFulfillmentUpdated) */ onFulfillmentUpdated(event: wix_stores_backend.Events.FulfillmentUpdatedEvent): void; /** * An event that fires when an inventory item's information is updated. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.Events.html#onInventoryItemUpdated) */ onInventoryItemUpdated(event: wix_stores_backend.Events.InventoryItemUpdatedEvent): void; /** * An event that fires when the inventory information of a product variant is updated. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.Events.html#onInventoryVariantUpdated) */ onInventoryVariantUpdated(event: wix_stores_backend.Events.InventoryVariantUpdatedEvent): void; /** * An event that fires when a new order is placed. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.Events.html#onNewOrder) */ onNewOrder(event: wix_stores_backend.Events.NewOrderEvent): void; /** * An event that fires when an order is canceled. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.Events.html#onOrderCanceled) */ onOrderCanceled(event: wix_stores_backend.Events.OrderCanceledEvent): void; /** * An event that fires when an order is marked as paid. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.Events.html#onOrderPaid) */ onOrderPaid(event: wix_stores_backend.Order): void; /** * An event that fires when an order is refunded. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.Events.html#onOrderRefunded) */ onOrderRefunded(event: wix_stores_backend.Events.OrderRefundedEvent): void; /** * An event that fires when a product is created. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.Events.html#onProductCreated) */ onProductCreated(event: wix_stores_backend.Events.ProductCreatedEvent): void; /** * An event that fires when a product is deleted. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.Events.html#onProductDeleted) */ onProductDeleted(event: wix_stores_backend.Events.ProductDeletedEvent): void; /** * An event that fires when a product is updated. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.Events.html#onProductUpdated) */ onProductUpdated(event: wix_stores_backend.Events.ProductUpdatedEvent): void; /** * An event that fires when variant information for a product is updated. * [Read more](https://www.wix.com/corvid/reference/wix-stores-backend.Events.html#onVariantsUpdated) */ onVariantsUpdated(event: wix_stores_backend.Events.VariantsUpdatedEvent): void; } namespace Events { /** * An object representing a shopping cart that was abandoned. */ type CartAbandonedEvent = { /** * Time the abandoned cart was abandoned. */ abandonTime: string; /** * Information about the visitor who abandoned the shopping cart. */ buyerInfo: wix_stores_backend.BuyerInfo; /** * ID of the shopping cart that was abandoned. */ cartId: string; /** * URL of the abandoned cart's checkout page. */ checkoutUrl: string; /** * ID of coupon used in the abandoned cart. */ couponId: string; /** * Time the abandoned cart was created. */ creationTime: string; /** * Number of items in the abandoned cart. */ itemsCount: number; /** * Abandoned cart totals. */ totals: wix_stores_backend.Events.CartTotals; }; /** * An object representing a shopping cart that was completed. */ type CartCompletedEvent = { /** * ID of the shopping cart that was completed. */ cartId: string; /** * Time the shopping cart was completed. */ completedTime: string; /** * The buyer's information. */ buyerInfo: wix_stores_backend.BuyerInfo; /** * Message from the buyer. */ buyerNote: string; /** * Coupon applied in the shopping cart. */ appliedCoupon: wix_stores_backend.CartAppliedCoupon; /** * Billing address. */ billingAddress: wix_stores_backend.Address; /** * Currency of the shopping cart. */ currency: wix_stores_backend.Currency; /** * The order's units of weight. One of: `"KG"`, `"LB"`, or `"UNSPECIFIED_WEIGHT_UNIT"`. */ weightUnit: string; /** * The shopping cart's totals. */ totals: wix_stores_backend.OrderTotals; /** * The shopping cart's shipping information. */ shippingInfo: wix_stores_backend.CartShippingInfo; }; /** * An object representing a shopping cart that was created. */ type CartCreatedEvent = { /** * ID of the shopping cart that was created. */ cartId: string; /** * Time the shopping cart was created. */ creationTime: string; /** * The buyer's information. */ buyerInfo: wix_stores_backend.BuyerInfo; /** * The order's units of weight. One of: `"KG"`, `"LB"`, or `"UNSPECIFIED_WEIGHT_UNIT"`. */ weightUnit: string; /** * Currency of the shopping cart. */ currency: wix_stores_backend.Currency; /** * The shopping cart's totals. */ totals: wix_stores_backend.OrderTotals; }; /** * An object representing a shopping cart that was recovered. */ type CartRecoveredEvent = { /** * Time the recovered cart was abandoned. */ abandonedTime: string; /** * ID of the shopping cart that was abandoned. */ cartId: string; /** * Time the recovered cart was originally created. */ creationTime: string; /** * Time the cart was recovered. */ recoveredTime: string; }; /** * An object representing the totals of a shopping cart. */ type CartTotals = { /** * Subtotal of all the line items in the abandoned cart, not including shipping and tax. */ subtotal: number; /** * Total of all the line items in the abandoned cart, including shipping and tax. */ total: number; /** * Total formatted with currency symbol. */ formattedTotal: string; }; /** * An object representing a product collection that was created. */ type CollectionCreatedEvent = { /** * ID of the created collection. */ _id: string; /** * Collection name. */ name: string; /** * Main product media item (image) URL. */ mainMedia: string; }; /** * An object representing a product collection that was deleted. */ type CollectionDeletedEvent = { /** * ID of the delete collection. */ collectionId: string; }; /** * An object representing a product collection that was updated. */ type CollectionUpdatedEvent = { /** * ID of the updated collection. */ collectionId: string; /** * Names of the collection fields that were updated. */ updatedFields: string[]; }; /** * An object representing fulfillment information that was created. */ type FulfillmentCreatedEvent = { /** * ID of the order the fulfillment was created for. */ orderId: string; /** * ID of the fulfillment that was created. */ fulfillmentId: string; /** * Date and time the fulfillment was created. */ dateCreated: string; /** * Information about the order's buyer. */ buyerInfo: wix_stores_backend.BuyerInfo; /** * Tracking information. */ trackingInfo: wix_stores_backend.TrackingInfo; /** * The order's current fulfillment status. * One of: * * + `"NOT_FULFILLED"`: Order is not yet fulfilled. * + `"FULFILLED"`: Order was fulfilled successfully. * + `"CANCELED"`: Order was canceled. * + `"PARTIALLY_FULFILLED"`: Order was partially fulfilled. For example, when only some of the order's items were fulfilled. */ fulfillmentStatus: string; }; /** * An object representing fulfillment information that was deleted. */ type FulfillmentDeletedEvent = { /** * ID of the order the fulfillment was deleted from. */ orderId: string; /** * ID of the fulfillment that was deleted. */ fulfillmentId: string; /** * The order's current fulfillment status. * One of: * * + `"NOT_FULFILLED"`: Order is not yet fulfilled. * + `"FULFILLED"`: Order was fulfilled successfully. * + `"CANCELED"`: Order was canceled. * + `"PARTIALLY_FULFILLED"`: Order was partially fulfilled. For example, when only some of the order's items were fulfilled. */ fulfillmentStatus: string; }; /** * An object representing fulfillment information that was updated. */ type FulfillmentUpdatedEvent = { /** * ID of the order the fulfillment was updated for. */ orderId: string; /** * ID of the fulfillment that was updated. */ fulfillmentId: string; /** * Tracking information. */ trackingInfo: wix_stores_backend.TrackingInfo; }; /** * An object representing an inventory item that was updated. */ type InventoryItemUpdatedEvent = { /** * ID of the inventory item. */ inventoryItemId: string; /** * External ID of the inventory item. For example, the product ID for inventory items which are store products. */ externalId: string; /** * Whether the item's inventory is tracked. */ trackInventory: boolean; }; /** * An object representing product variant information that was updated. */ type InventoryVariantUpdatedEvent = { /** * ID of the inventory item. */ inventoryItemId: string; /** * External ID of the inventory item. For example, the product ID for inventory items which are store products. */ externalId: string; /** * List of variants that were updated. */ variants: wix_stores_backend.Events.UpdatedVariantInventory[]; }; /** * An object representing a new order from a store. */ type NewOrderEvent = { /** * The ID of the order, auto-generated when an order is created an unique within all Wix Stores. */ orderId: string; /** * Running order number unique to the current store. */ number: string; /** * The date the order was created. */ dateCreated: string; /** * The buyer's information. */ buyerInfo: wix_stores_backend.BuyerInfo; /** * The currency code for all of the order's prices. */ currency: string; /** * The order's units of weight. One of: `"KG"`, `"LB"`, or `"UNSPECIFIED_WEIGHT_UNIT"`. */ weightUnit: string; /** * The order's totals. */ totals: wix_stores_backend.OrderTotals; /** * The order's payment status. One of: `"PAID"` or `"NOT_PAID"`. */ paymentStatus: string; /** * The order's fulfillment status. One of: `"FULFILLED"` or `"NOT_FULFILLED"`. */ fulfillmentStatus: string; /** * Subscription information. Omitted unless the order is a subscription. * Learn more about [selling product subscriptions](https://support.wix.com/en/article/wix-stores-selling-product-subscriptions). */ subscriptionInfo?: wix_stores_backend.SubscriptionInfo; /** * Billing information. */ billingInfo: wix_stores_backend.BillingInfo; }; /** * An object representing information about a canceled order. */ type OrderCanceledEvent = { /** * Information about the canceled order. */ order: wix_stores_backend.Order; }; /** * An object representing information about a refunded order. */ type OrderRefundedEvent = { /** * Order refund ID. */ refundId: string; /** * Information about the refunded order. */ order: wix_stores_backend.Order; }; /** * An object representing the specific choices from the product's options. */ type ProductChoices = { /** * Value of the option. This key name is * dependent on the option changed in the product. For example, if a product * has a size option, this key value will be something like "Size" and its value * will be something like "Large". * * `optionKey` is not case-sensitive. Therefore the values for the option keys `"Size"` `"SIZE"` and `"size"` are combined. */ optionKey: string; }; /** * An object representing a product that was created. */ type ProductCreatedEvent = { /** * Product ID. */ _id: string; /** * Product name. */ name: string; /** * Product stock keeping unit. */ sku: string; /** * Discounted product price formatted with the currency. */ formattedDiscountedPrice: string; /** * Whether the product is shown in the store. */ visible: boolean; /** * Main product media item (image or video) URL. */ mainMedia: string; /** * Discounted product price. */ discountedPrice: number; /** * Product price formatted with the currency. */ formattedPrice: string; /** * Product price. */ price: number; /** * Product media items. */ mediaItems: wix_stores_backend.MediaItem[] | wix_stores_backend.VideoItem[]; /** * Product currency. */ currency: string; /** * URL to the product's page. */ productPageUrl: string; /** * Price per unit. */ pricePerUnit: number; /** * Price per unit formatted with currency symbol. */ formattedPricePerUnit: string; }; /** * An object representing a product that was deleted. */ type ProductDeletedEvent = { /** * ID of the deleted product. */ productId: string; }; /** * An object representing a product that was updated. */ type ProductUpdatedEvent = { /** * ID of the updated product. */ productId: string; /** * Names of the product fields that were updated. */ updatedFields: string[]; }; /** * An object representing a product variants that was updated. */ type UpdatedVariant = { /** * ID of the variant that was updated. */ variantId: string; /** * Names of the product variant fields that were updated. */ updatedFields: string[]; /** * Placeholder text. */ choices: wix_stores_backend.Events.ProductChoices; }; /** * An object representing product variant that was updated. */ type UpdatedVariantInventory = { /** * ID of the productVariant that was updated. */ id: string; /** * Old variant value. */ oldValue: wix_stores_backend.Events.VariantInventoryValue; /** * Updated variant value. */ newValue: wix_stores_backend.Events.VariantInventoryValue; }; /** * An object representing a product variant value. */ type VariantInventoryValue = { /** * Whether the variant is in stock. */ inStock: boolean; /** * Number of items in stock. */ quantity: number; }; /** * An object representing product variants that were updated. */ type VariantsUpdatedEvent = { /** * ID of the product in which variants were updated. */ productId: string; /** * Variants that were updated. */ variants: wix_stores_backend.Events.UpdatedVariant[]; }; } /** * An object representing an abandoned shopping cart. */ type AbandonedCart = { /** * Unique identifier of the shopping cart. */ _id: string; /** * Date and time the shopping cart was abandoned. */ abandonTime: string; /** * Total price of all items in the cart. */ total: string; /** * The buyer's information. */ buyerInfo: wix_stores_backend.BuyerInfo; /** * Log of updates related to the cart. */ activities: wix_stores_backend.Activity; /** * Status of the abandoned cart. Either `"ABANDONED"` or `"RECOVERED"`. */ status: string; }; /** * An array of objects representing a log of updates related to the order. */ type Activities = { /** * Activity type. * One of: * * * - `"MERCHANT_COMMENT"` * - `"ORDER_PLACED"` * - `"ORDER_PAID"` * - `"ORDER_FULFILLED"` * - `"ORDER_NOT_FULFILLED"` * - `"DOWNLOAD_LINK_SENT"` * - `"PICKUP_READY_EMAIL_SENT"` * - `"TRACKING_NUMBER_ADDED"` * - `"TRACKING_NUMBER_EDITED"` * - `"TRACKING_LINK_WAS_SET"` * - `"SHIPPING_CONFIRMATION_EMAIL_SENT"` * - `"INVOICE_WAS_SET"` * - `"INVOICE_WAS_REMOVED"` * - `"INVOICE_WAS_SENT"` */ type: string; /** * Who made the update (activity) to the order item. */ author: string; /** * Comment added to the activity. */ message: string; /** * The time the update (activity) occurred. */ timestamp: string; }; /** * An object representing a shopping cart activity. */ type Activity = { /** * One of: * * + `"CUSTOM_ACTIVITY"` * + `"EMAIL_NOT_SENT"` * + `"EMAIL_SENT"` * + `"NOTIFICATION_SENT"` * + `"SCHEDULED"` * + `"TASK_CREATED"` * + `"UNRECOGNIZED_TYPE"` */ activityType: string; /** * Activity message. */ message: string; /** * Time activity occurred. */ timestamp: string; /** * Custom activity data. */ customData: wix_stores_backend.CustomData; }; /** * An object representing address information. */ type Address = { /** * Address in readable format. */ formatted?: string; /** * City. */ city: string; /** * Country. */ country: string; /** * Main address information. */ addressLine: string; /** * Additional address information (apt, floor, etc.), if used. */ addressLine2?: string; /** * Alternative property for street name and number. */ streetAddress?: wix_stores_backend.StreetAddress; /** * Postal/zip code. */ postalCode: string; /** * Subdivision of a country, such as a state or province. */ subdivision: string; }; type AdjustBy = { /** * Adjust by percentage. */ percentage?: wix_stores_backend.PercentageAdjustment; /** * Adjust by amount. */ amount?: number; }; /** * An object representing a coupon applied to the order. */ type AppliedCoupon = { /** * Coupon ID. */ couponId: string; /** * Coupon name. */ name: string; /** * Coupon code (used by a buyer to apply the coupon). */ code: string; }; /** * An object representing an order's billing info. */ type BillingInfo = { /** * Billing address. */ address?: wix_stores_backend.Address; /** * Last name. */ lastName?: string; /** * First name. */ firstName?: string; /** * Email address. */ email?: string; /** * Phone number. */ phone?: string; /** * Company name. */ company?: string; /** * VAT information. */ vatId?: wix_stores_backend.VatId; /** * Deprecated: replaced with paymentProviderTransactionId. */ externalTransactionId?: string; /** * Date and time the payment was made. */ paidDate?: string; /** * Payment method. */ paymentMethod?: string; /** * Unique transaction ID for the payment gateway. */ paymentGatewayTransactionId?: string; /** * Unique ID for the payment provider. */ paymentProviderTransactionId?: string; }; type BulkActionMetadata = { /** * Number of items that were successfully processed. */ totalSuccesses: number; /** * Number of items that couldn't be processed. */ totalFailures: number; /** * Number of failures without details because detailed failure threshold was exceeded. */ undetailedFailures: number; }; type BulkAdjustProperties = { /** * Adjust product price. * If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled, variants prices are calculated according to the adjusted price. * If the variant price is negative after the adjustment, the update fails. */ price?: wix_stores_backend.AdjustBy; /** * Adjust the product's cost of goods. * If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled, cost of goods is adjusted per variant. */ cost?: wix_stores_backend.AdjustBy; /** * Adjust product weight. If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled, weight is adjusted per variant. */ weight?: wix_stores_backend.AdjustBy; }; type BulkAdjustResponse = { /** * Bulk action results. */ results: wix_stores_backend.BulkResults[]; /** * Bulk action metadata. */ bulkActionMetadata: wix_stores_backend.BulkActionMetadata; }; type BulkResults = { /** * Item metadata. */ itemMetadata: wix_stores_backend.ItemMetadata; }; type BulkUpdateProperties = { /** * Set product price. * If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled, variants prices are calculated according to the set product price. * If the variant price is negative after setting the new price, the update fails. */ price?: number; /** * Set the product's cost of goods. * If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled, cost of goods is set per variant. */ cost?: number; /** * Set product weight. * If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled, weight is set per variant. */ weight?: number; /** * Set product ribbon. Pass an empty string to remove the existing ribbon. */ ribbon?: string; /** * Set product brand. Pass an empty string to remove the existing brand. */ brand?: string; }; type BulkUpdateResponse = { /** * Bulk action results. */ results: wix_stores_backend.BulkResults[]; /** * Bulk action metadata. */ bulkActionMetadata: wix_stores_backend.BulkActionMetadata; }; /** * An object representing information about the buyer. */ type BuyerInfo = { /** * Unique buyer's ID. */ id: string; /** * Buyer's email address. */ email: string; /** * Buyer's first name. */ firstName: string; /** * Buyer's last name. */ lastName: string; /** * Buyer's identity. * One of: * * + `"MEMBER"`: A logged-in site member. * + `"CONTACT"`: A Wix contact. * + `"ADMIN"`: Buyer is the site owner. * + `"VISITOR"`: Buyer is not logged in. */ identityType: string; /** * Buyer's phone number. */ phone?: string; }; /** * An object representing a shopping cart. */ type Cart = { /** * Unique identifier of the shopping cart. */ _id: string; /** * Coupon applied in the shopping cart. */ appliedCoupon: wix_stores_backend.CartAppliedCoupon; /** * Cart billing address. */ billingAddress: wix_stores_backend.CartAddress; /** * The buyer's information. */ buyerInfo: wix_stores_backend.CartBuyerInfo; /** * Cart status. Either `"INCOMPLETE"` or `"COMPLETE"`. */ status: string; /** * Currency of the shopping cart. */ currency: wix_stores_backend.Currency; /** * The shopping cart's shipping information. */ shippingInfo: wix_stores_backend.CartShippingInfo; /** * Items in the shopping cart. */ lineItems: wix_stores_backend.CartLineItem[]; /** * The shopping cart's totals. */ totals: wix_stores_backend.OrderTotals; /** * The order's units of weight. One of: `"KG"`, `"LB"`, or `"UNSPECIFIED_WEIGHT_UNIT"`. */ weightUnit: string; }; /** * An object representing an address. */ type CartAddress = { /** * First name. */ firstName: string; /** * Last name. */ lastName: string; /** * Email address. */ email: string; /** * Phone number. */ phone: string; /** * Address. */ address: string; }; /** * An object representing a coupon applied in a shopping cart. */ type CartAppliedCoupon = { /** * Coupon code. */ code: string; /** * Coupon unique identifier. */ couponId: string; /** * Coupon name. */ name: string; /** * Type of coupon. * One of: * * + `"BuyXGetY"` * + `"FixedPriceAmount"` * + `"FreeShipping"` * + `"MoneyOffAmount"` * + `"PercentOffRate"` */ couponType: string; /** * Value of the coupon discount. */ discountValue: string; }; /** * An object representing a visitor who abandoned a shopping cart. */ type CartBuyerInfo = { /** * Buyer's unique ID. */ id: string; /** * Buyer's email address. */ email: string; /** * Buyer's first name. */ firstName: string; /** * Buyer's last name. */ lastName: string; /** * Buyer's identity. * One of: * * + `"ADMIN"`: Buyer is the site owner. * + `"MEMBER"`: Buyer is a logged-in site member. * + `"VISITOR"`: Buyer is not logged in. * + `"CONTACT"`: A contact has been created for the buyer. */ identityType: string; /** * Buyer's phone number. */ phone: string; }; /** * An object representing a custom text field. */ type CartCustomTextField = { /** * Field title. */ title: string; /** * Field value. */ value: string; }; /** * An object representing a line item in a shopping cart. */ type CartLineItem = { /** * Name of the line item. */ name: string; /** * Notes about the line item. */ notes: string; /** * Line item price. */ price: string; /** * Line item product ID. */ productId: string; /** * Line item quantity. */ quantity: number; /** * Line item stock keeping unit. */ sku: string; /** * Total price charged to the customer for all line items after any applicable discounts. */ totalPrice: string; /** * Line item weight. */ weight: string; /** * Type of the line item. * One of: * * + `"DIGITAL"`: Digital item. * + `"PHYSICAL"`: Physical item. * + `"CUSTOM_AMOUNT_ITEM"`: Item with a custom price. * + `"UNSPECIFIED"`: Type can't be classified due to an error. */ lineItemType: string; /** * Line item options. */ options: wix_stores_backend.Option[]; /** * Media item. */ mediaItem: wix_stores_backend.CartMediaItem; /** * Custom text. */ customTextFields: wix_stores_backend.CartCustomTextField[]; /** * Cart line item ID. */ id: number; }; /** * An object representing a line item's primary media. */ type CartMediaItem = { /** * Media item source for media uploaded to Wix (wix:image, wix:video or external URL). */ src: string; /** * Media item type. Currently only `"IMAGE"` type supported. */ type: string; }; /** * An object representing shipping information. */ type CartShippingInfo = { /** * Shipment address. */ shippingAddress?: wix_stores_backend.CartAddress; /** * Pickup address. */ pickupInfo?: wix_stores_backend.CartAddress; }; /** * An object representing information about the sales channel that submitted this order. */ type ChannelInfo = { /** * Order ID from an external system (such as eBay or Amazon). */ externalOrderId?: string; /** * URL to the order in the external system (such as eBay or Amazon). */ externalOrderUrl?: string; /** * Sales channel that submitted the order. * One of: * * * + `"WEB"`: Wix online store. * + `"POS"`: Point of sale. * + `"EBAY"`: eBay. * + `"OTHER_PLATFORM"`: Order imported from another system (such as Cart2Cart). * + `"WIX_APP_STORE"`: Order created via the Wix mobile app. */ type: string; }; /** * An object representing the choice for a product variant. */ type Choice = { /** * Product options to use when creating or updating the * product. The object contains key:value pairs where the key is the * option name and the value is the chosen option value. */ choices: any; }; /** * An object representing the choice for a product variant. */ type Choices = { /** * Option name. */ option: string; /** * Choice name. */ choice: string; }; /** * An object representing billing information for creating an order. */ type CreateOrderBillingInfo = { /** * Billing address. */ address: wix_stores_backend.Address; /** * Last name. */ lastName?: string; /** * First name. */ firstName?: string; /** * Email address. */ email?: string; /** * Phone number. */ phone?: string; /** * Company name. */ company?: string; /** * VAT information. */ vatId?: wix_stores_backend.VatId; /** * Payment method. */ paymentMethod?: string; /** * Unique transaction ID for the payment gateway. */ paymentGatewayTransactionId?: string; /** * Unique ID for the payment provider. */ paymentProviderTransactionId?: string; }; /** * An object representing buyer information for creating an order. */ type CreateOrderBuyerInfo = { /** * Unique buyer's ID. */ id: string; /** * Buyer's identity. * One of: * * + `"MEMBER"`: A logged-in site member. * + `"CONTACT"`: A Wix contact. */ identityType: string; }; /** * An object representing a line item for creating an order. */ type CreateOrderLineItem = { /** * Custom text. */ customTextFields?: wix_stores_backend.CustomTextField[]; /** * Line item product ID. */ productId?: string; /** * Type of line item. * One of: * * * - `"DIGITAL"`: Digital item. * - `"PHYSICAL"`: Physical item. * - `"CUSTOM_AMOUNT_ITEM"`: Item with a custom price. */ lineItemType?: string; /** * Line item's primary media item. */ mediaItem?: wix_stores_backend.CreateOrderMediaItem; /** * Name of the line item. */ name: string; /** * Notes about the line item. */ notes?: string; /** * Line item options. */ options?: wix_stores_backend.Option[]; /** * Line item quantity. */ quantity: number; /** * Line item stock keeping unit. */ sku?: string; /** * Line item weight. */ weight?: number; /** * Line item's name, translated into the customer's language. */ translatedName?: string; /** * Line item's discount amount. */ discount?: number; /** * Line item's total amount of tax applied. */ tax?: number; /** * Price information. */ priceData: wix_stores_backend.CreateOrderLineItemPriceData; /** * Tax group ID. */ taxGroupId?: string; /** * Line item's fulfiller ID. */ fulfillerId?: string; /** * Line item's variant ID. */ variantId?: string; }; /** * An object representing an line item's price information for creating an order. */ type CreateOrderLineItemPriceData = { /** * Price of the item. */ price: number; /** * Whether the price includes tax. */ taxIncludedInPrice?: boolean; }; /** * An object representing a line item's primary media item for creating an order. */ type CreateOrderMediaItem = { /** * Image description for accessibility purposes. */ altText?: string; /** * Media item source (wix:image or external URL). */ src?: string; }; /** * An object representing an order's totals for creating an order. */ type CreateOrderTotals = { /** * Total calculated discount amount. */ discount?: number; /** * Total shipping price, including tax. */ shipping?: number; /** * Subtotal of all the order's line items, excluding tax. */ subtotal: number; /** * Total amount of tax. */ tax?: number; /** * Total price. */ total: number; }; /** * An object representing a currency. */ type Currency = { /** * The currency code. */ currency: string; /** * The currency symbol. */ symbol: string; }; /** * An object representing custom activity data. */ type CustomData = { /** * Activity namespace. */ namespace: string; /** * JSON object containing custom data. */ customValue: any; }; /** * An object representing a custom field added by the customer during the checkout process. */ type CustomField = { /** * Custom field's title. */ title: string; /** * Title translated into the buyer's language. */ translatedTitle: string; /** * Custom field's text. */ value: string; }; /** * An object representing a custom text field. */ type CustomTextField = { /** * Field title. */ title: string; /** * Field value. */ value: string; }; type DecrementInfo = { /** * Variant ID. */ variantId: string; /** * Number to decrement inventory by. */ decrementBy: number; /** * Product ID. */ productId?: string; /** * Inventory item ID. This is the `_id` field in the ["InventoryItems" Collection](https://www.wix.com/velo/reference/wix-stores-backend/%22inventoryitems%22-collection-fields). */ inventoryId?: string; }; /** * An object representing a discount applied to the order. */ type Discount = { /** * Information about an applied coupon. */ appliedCoupon: wix_stores_backend.AppliedCoupon; }; /** * An object representing information about the identity of the order initiator. * Occasionally, the person that completes the order isn't the buyer. For example, this occurs when an order is created using a point of sale terminal. */ type EnteredBy = { /** * ID of the order initiator. */ id: string; /** * Order was created by one of the following: * * * + `"USER"`: Wix user who performed a POS transaction on behalf of the buyer. * + `"MEMBER"`: Logged-in site member. * + `"CONTACT"`: A Wix contact. */ identityType: string; }; /** * An object representing order fulfillment details. */ type Fulfillment = { /** * Unique ID automatically generated upon fulfillment. */ id: string; /** * Date and time of fulfillment. */ dateCreated: string; /** * Information about the line items in the fulfilled order. */ lineItems: wix_stores_backend.FulfillmentLineItem[]; /** * Tracking information for a fulfilled order. */ trackingInfo?: wix_stores_backend.TrackingInfo; }; /** * An object representing new fulfillment details. */ type FulfillmentInfo = { /** * Information about the line items in the fulfilled order. */ lineItems: wix_stores_backend.FulfillmentLineItem[]; /** * Tracking information for a fulfilled order. */ trackingInfo?: wix_stores_backend.TrackingInfo; }; /** * An object representing information about a fulfillment's line items. */ type FulfillmentLineItem = { /** * Line item's position in the list of line items. */ index: number; /** * Number of units of this line item. On creation, if this field is left empty, the new fulfillment will automatically include all items of this line item that have not already been linked to a fulfillment. * * If the order does not have the requested quantity of line items available to add to this fulfillment, the fulfillment will not be created and an error will be returned. This property will always have a value when returned. */ quantity?: number; }; type IncrementInfo = { /** * Variant ID. */ variantId: string; /** * Number to increment inventory by. */ incrementBy: number; /** * Product ID. */ productId?: string; /** * Inventory item ID. This is the `_id` field in the ["InventoryItems" Collection](https://www.wix.com/velo/reference/wix-stores-backend/%22inventoryitems%22-collection-fields). */ inventoryId?: string; }; /** * An object representing an inventory item for a product variant in a store. */ type InventoryItem = { /** * Unique identifier for the inventory item. */ _id: string; /** * Deprecated: use productId. */ externalId: string; /** * Product ID. */ productId: string; /** * Indicates whether the on-hand inventory quantity is tracked for the inventory item's variants. If true, you can update the actual number of variants available. If false, you can indicate if a variant is in stock. */ trackQuantity: boolean; /** * Inventory item's variants. */ variants: wix_stores_backend.InventoryItemVariantItem[]; /** * Date the inventory item was last updated. */ _updatedDate: string; }; type InventoryItemVariantInfo = { /** * Indicates whether the on-hand inventory quantity is tracked for the inventory item's variants. If true, you can update the actual number of variants available. If false, you can indicate if a variant is in stock. */ trackQuantity: boolean; /** * Inventory item variants. */ variants: wix_stores_backend.InventoryItemVariantItem[]; }; /** * An object representing an inventory item's variant. */ type InventoryItemVariantItem = { /** * Unique inventory item's variant ID. */ variantId: string; /** * Whether the variant is in stock at the store. Used when `trackQuantity` is false. If `trackQuantity` is true, `inStock` is based on the actual tracked `quantity`. */ inStock: boolean; /** * In-stock quantity at the store. Used when `trackQuantity` is true. If `trackQuantity` is false, undefined. */ quantity: number; }; type ItemMetadata = { /** * Item ID. Item Id. Omitted in certain cases, such as when failing to create an item. */ id: string; /** * Index of the item within the update array. */ originalIndex: number; /** * Whether the requested action succeeded for this item. * When `false`, the `error` property is populated. */ success: boolean; /** * Details about the error in case of failure, as a key:value pair. */ error: wix_stores_backend.ItemMetadataError; }; type ItemMetadataError = { /** * Error code. */ code: string; /** * Error description. */ description: string; /** * Error data. */ data: object; }; /** * An object representing an line item's price information. */ type LineItemPriceData = { /** * Price of the item. */ price: number; /** * Total price charged to the customer (per line item) after calculation of quantity and discount. */ totalPrice: number; /** * Whether the price includes tax. */ taxIncludedInPrice: boolean; }; /** * An object with the link to a PDF file. */ type LinkToPdf = { /** * URL to a PDF file. */ link: string; }; /** * An object representing the media item for a product. */ type Media = { /** * Deprecated. */ mediaId: string; /** * Deprecated. */ url: string; /** * Media item source for media uploaded to Wix (wix:image, wix:video or external URL). */ src: string; /** * A choice of the product variant. */ choice: wix_stores_backend.Choice; }; /** * An object representing the media item for a product's choices. */ type MediaChoice = { /** * Deprecated. See `mediaSources`. */ mediaIds: string[]; /** * Media item source for media uploaded to Wix (wix:image or wix:video). */ mediaSources: string[]; /** * Option name. */ option: string; /** * Choice name. */ choice: string; }; /** * An object representing a media item. */ type MediaItem = { /** * Media item title. */ title: string; /** * Media item description. */ description: string; /** * Media items type. Currently only `IMAGE` type supported. */ type: string; /** * Media item source for media uploaded to Wix (wix:image, wix:video or external URL). */ src: string; /** * Thumbnail URL for videos only. */ thumbnail?: string; }; /** * An object representing order fulfillment details. */ type NewFulfillmentAndOrder = { /** * ID for the newly created fulfillment. */ id: string; /** * Updated order. */ order: wix_stores_backend.Order; }; /** * An object representing a line item option. */ type Option = { /** * Name of the product option. */ option: string; /** * Selected option. */ selection: string; }; /** * An object representing an order. */ type Order = { /** * Unique order ID. */ _id: string; /** * Date and time the order was updated. */ _updatedDate: string; /** * The site's displayed language. */ buyerLanguage: string; /** * Shopping cart ID. */ cartId?: string; /** * Channel information. */ channelInfo: wix_stores_backend.ChannelInfo; /** * Identity of the order's initiator. */ enteredBy: wix_stores_backend.EnteredBy; /** * Billing information. */ billingInfo?: wix_stores_backend.BillingInfo; /** * Buyer information. */ buyerInfo: wix_stores_backend.BuyerInfo; /** * A note added by the buyer. */ buyerNote?: string; /** * Date and time the order was created. */ _dateCreated: string; /** * Order currency. */ currency: string; /** * The order's current fulfillment status (whether the order received a tracking number or was delivered/picked up). * One of: * * + `"NOT_FULFILLED"`: Order is not yet fulfilled. * + `"FULFILLED"`: Order was fulfilled successfully. * + `"CANCELED"`: Order was canceled. * + `"PARTIALLY_FULFILLED"`: Order was partially fulfilled. For example, when only some of the order's items were fulfilled. */ fulfillmentStatus: string; /** * Whether or not the order was archived. */ archived: boolean; /** * Log of updates related to the order. */ activities: wix_stores_backend.Activities[]; /** * Running order number. */ number: number; /** * Current status of the payment. * One of: * * + `"NOT_PAID"`: Payment was not made. * + `"PAID"`: Order was successfully paid for. * + `"PARTIALLY_REFUNDED"`: Order was partially refunded. * + `"FULLY_REFUNDED"`: Order was refunded in full. */ paymentStatus: string; /** * Shipping information. */ shippingInfo?: wix_stores_backend.OrderShippingInfo; /** * Order items. */ lineItems: wix_stores_backend.OrderLineItem[]; /** * Order totals. */ totals: wix_stores_backend.Totals; /** * The unit in which the order's weight is measured. Either `"KG"` or `"LB"`. If not provided, the site's default weight unit is used. */ weightUnit?: string; /** * Custom field information. */ customField?: wix_stores_backend.CustomField; /** * Order fulfillment information. */ fulfillments: wix_stores_backend.Fulfillment[]; /** * Discount information. */ discount?: wix_stores_backend.Discount; /** * Refund information. */ refunds?: wix_stores_backend.Refund[]; /** * Subscription information. Omitted unless the order is a subscription. * Learn more about [selling product subscriptions](https://support.wix.com/en/article/wix-stores-selling-product-subscriptions). */ subscriptionInfo?: wix_stores_backend.SubscriptionInfo; }; /** * An object representing information for creating an order. */ type OrderInfo = { /** * Shopping cart ID. */ cartId?: string; /** * The language displayed to the buyer. If not provided, the site's default language is used. */ buyerLanguage?: string; /** * Channel information. */ channelInfo: wix_stores_backend.ChannelInfo; /** * Billing information. */ billingInfo: wix_stores_backend.CreateOrderBillingInfo; /** * Buyer information. Only pass these fields if you want to override the buyer identity e.g. when creating an order on behalf of a contact or member. */ buyerInfo?: wix_stores_backend.CreateOrderBuyerInfo; /** * A note added by the buyer. */ buyerNote?: string; /** * Order currency. If not provided, the site's default currency is used. */ currency?: string; /** * Current status of the payment. * One of: * * + `"NOT_PAID"`: Payment was not made. * + `"PAID"`: Order was successfully paid for. */ paymentStatus: string; /** * Shipping information. */ shippingInfo: wix_stores_backend.OrderShippingInfo; /** * Order items. */ lineItems: wix_stores_backend.CreateOrderLineItem[]; /** * Order totals. */ totals: wix_stores_backend.CreateOrderTotals; /** * The unit in which the order's weight is measured. Either `"KG"` or `"LB"`. If not provided, the site's default weight unit is used. */ weightUnit?: string; /** * Information about a custom field. */ customField?: wix_stores_backend.CustomField; /** * Discount information. */ discount?: wix_stores_backend.Discount; }; /** * An object representing a line item in an order. */ type OrderLineItem = { /** * Custom text. */ customTextFields?: wix_stores_backend.CustomTextField[]; /** * Line item product ID. */ productId?: string; /** * Type of line item. * One of: * * * - `"DIGITAL"`: Digital item. * - `"PHYSICAL"`: Physical item. * - `"CUSTOM_AMOUNT_ITEM"`: Item with a custom price. */ lineItemType?: string; /** * Information about the line item's primary media item. */ mediaItem: wix_stores_backend.OrderMediaItem; /** * Name of the line item. */ name: string; /** * Notes about the line item. */ notes?: string; /** * Line item options. */ options?: wix_stores_backend.Option[]; /** * Deprecated: see priceData. */ price: number; /** * Line item quantity. */ quantity: number; /** * Line item stock keeping unit. */ sku?: string; /** * Deprecated: see priceData. */ totalPrice: number; /** * Line item weight. */ weight?: number; /** * Line item index. */ index?: number; /** * Line item's name, translated into the customer's language. */ translatedName?: string; /** * Line item's discount amount. */ discount?: number; /** * Line item's total amount of tax applied. */ tax?: number; /** * Price information. */ priceData: wix_stores_backend.LineItemPriceData; /** * Tax group ID. */ taxGroupId?: string; /** * Line item's fulfiller ID. */ fulfillerId?: string; /** * Line item's variant ID. */ variantId?: string; }; /** * An object representing a line item's primary media item. */ type OrderMediaItem = { /** * Image description for accessibility purposes. */ altText?: string; /** * Media item source (wix:image or external URL). */ src: string; /** * Media item type. Currently only `IMAGE` type supported. */ type: string; }; /** * An object representing an order's shipping information. */ type OrderShippingInfo = { /** * Expected date of delivery. */ deliverByDate?: string; /** * Delivery option name. */ deliveryOption?: string; /** * Estimated time until delivery. */ estimatedDeliveryTime?: string; /** * Shipment details (empty if order was designated for pickup). */ shipmentDetails: wix_stores_backend.ShipmentDetails; /** * Pickup details (empty if order was designated for delivery). */ pickupDetails?: wix_stores_backend.PickupDetails; /** * Shipping region. */ shippingRegion?: string; }; /** * An object representing an order's totals. */ type OrderTotals = { /** * The subtotal of all the order's line items, excluding tax. */ subtotal: number; /** * The total shipping price, including tax. */ shipping: number; /** * The total amount of tax. */ tax: string; /** * The total calculated discount amount. */ discount: number; /** * The total price. */ total: number; /** * The total weight of the order's items. */ weight: number; /** * The total quantity of the the order's line items. */ quantity: number; }; /** * An object representing paging options. */ type PagingOptions = { /** * Maximum number of variants to retrieve. Defaults to 300. */ limit: number; /** * Number of variants to skip before the retrieved variants. Defaults to 0. */ skip: number; }; type PercentageAdjustment = { /** * When `true`, result is rounded to the nearest whole number (integer). * When `false`, result is rounded to 2 places after the decimal point. */ roundToInt: string; /** * Percentage value, as a whole number (integer) between `-100` and `1000`. * For example, pass `100` to increase value by 100% (multiply original value by 2). */ rate: number; }; /** * An object representing an order's pickup details. */ type PickupDetails = { /** * Pickup instructions. */ pickupInstructions?: string; /** * Pickup address. */ pickupAddress?: wix_stores_backend.Address; /** * First name. */ firstName?: string; /** * Last name. */ lastName?: string; /** * Email address. */ email?: string; /** * Phone number. */ phone?: string; }; /** * An object representing a product in a store. */ type Product = { /** * Product ID. */ _id: string; /** * Date product was last updated. */ _updatedDate: string; /** * Product name. */ name: string; /** * Product description. */ description: string; /** * Main product media item URL (wix:image or https). */ mainMedia: string; /** * List of product media items. */ mediaItems: wix_stores_backend.MediaItem[]; /** * Product stock keeping unit value. Must be unique. */ sku: string; /** * Deprecated. Use `ribbon` instead. */ ribbons: wix_stores_backend.ProductRibbon[]; /** * Product currency. */ currency: string; /** * Product price. * The price must be greater than its discount. * The product price is propagated to the product's newly-created variants. Product variants whose prices have been updated directly are not affected by changes to the product price. */ price: number; /** * Discounted product price. */ discountedPrice: number; /** * Product price formatted with the currency. */ formattedPrice: string; /** * Discounted product price formatted with currency symbol. */ formattedDiscountedPrice: string; /** * ID for the inventory item. */ inventoryItemId: string; /** * Product discount. */ discount: wix_stores_backend.ProductDiscount; /** * Indicates whether inventory is tracked for the product. */ trackInventory: boolean; /** * Indicates whether the product is in stock. */ inStock: boolean; /** * Number of units currently in stock. */ quantityInStock: number; /** * Additional product information sections. */ additionalInfoSections: wix_stores_backend.ProductAdditionalInfoSection[]; /** * All the available options for a store product. */ productOptions: wix_stores_backend.ProductOptions; /** * Product page relative URL. */ productPageUrl: string; /** * Indicates whether product variants are managed. Can be set to true only if the product has options. Once set to true, can be reset to false only if no variants exist. Use [`getProductVariants()`](wix-stores.html#getProductVariants) to check if variants exist. You cannot set `manageVariants` to true if more than 300 variants are defined. */ manageVariants: boolean; /** * List of product customization fields. */ customTextFields: wix_stores_backend.ProductCustomTextFields[]; /** * Product type. */ productType: string; /** * Product slug. */ slug: string; /** * Product weight. */ weight: string; /** * Whether the product is visible to site visitors and appears in Content Manager collections. */ visible: boolean; /** * Product variants. */ variants: wix_stores_backend.VariantItem[]; /** * Custom SEO data for the product. Learn more [about SEO](https://support.wix.com/en/search?term=seo). */ seoData: wix_stores_backend.SeoData; /** * Details of the product's price per unit. */ pricePerUnitData: wix_stores_backend.pricePerUnitData; /** * Price per unit. */ pricePerUnit: number; /** * Price per unit formatted with currency symbol. */ formattedPricePerUnit: string; /** * Product ribbon. Used to highlight relevant information about a product. For example, `"Sale"`, `"New Arrival"`, `"Sold Out"`. */ ribbon: string; /** * Product brand. Including a brand name can help improve your site’s [visibility on search engines](https://support.wix.com/en/article/adding-brand-names-to-boost-product-page-seo-in-wix-stores). */ brand: string; }; /** * An object representing an additional info section for a store product. */ type ProductAdditionalInfoSection = { /** * Section title. */ title: string; /** * Section description. */ description: string; }; /** * An object representing a product variant's option choices. */ type ProductChoices = { /** * Value of the choice. This key name is dependent on the product option. For example, if a product has a size option, this * key value will be something like `"Size"` and its value will be something like * `"Large"`. * * `optionKey` is not case-sensitive. Therefore the values for the option keys `"Size"`, `"SIZE"`, and `"size"` are combined. */ optionKey: string; }; /** * An object representing a custom text field for a store product. */ type ProductCustomTextFields = { /** * Product customization field title. */ title: string; /** * Maximum length of product customization field in characters. */ maxLength: string; }; /** * An object representing a product discount. */ type ProductDiscount = { /** * Discount type. Required. * * * * One of: * * * * - `"AMOUNT"` * * - `"PERCENT"` * * - `"NONE"` */ type: string; /** * Discount value. The discount value cannot be greater than the price of the product or the variant. */ value: string; }; /** * An object representing information for creating or updating a product in a store. */ type ProductInfo = { /** * Product name. Limited to 80 characters. */ name: string; /** * Product description. */ description?: string; /** * Product stock keeping unit value. Must be unique. */ sku?: string; /** * Product price. * The price must be greater than its discount. * The product price is propagated to the product's newly-created variants. Product variants whose prices have been updated directly are not affected by changes to the product price. */ price: number; /** * An object representing a product discount. */ discount?: wix_stores_backend.ProductDiscount; /** * An object representing all the available options for a store product. */ productOptions?: wix_stores_backend.ProductOptionsInfo; /** * Indicates whether product variants can be managed. Can be set to true only if the product has options. Once set to true, can be reset to false only if no variants exist. Use [`getProductVariants()`](wix-stores.html#getProductVariants) to check if variants exist. You cannot set `manageVariants` to true if more than 300 variants are defined. */ manageVariants?: boolean; /** * Product type. Currently, only creating physical products (`"productType": "physical"`) is supported via the API. */ productType?: string; /** * Product weight. */ weight?: number; /** * Whether the product is visible to site visitors. Setting this to false removes the product from Content Manager collections. */ visible?: boolean; /** * Custom SEO data for the product. Learn more [about SEO](https://support.wix.com/en/search?term=seo). */ seoData?: wix_stores_backend.SeoData; /** * Details for the product's price per unit. If one of the `pricePerUnitData` fields is provided, all must be provided. */ pricePerUnitData?: wix_stores_backend.pricePerUnitData; /** * Product ribbon. Used to highlight relevant information about a product. * For example, `"Sale"`, `"New Arrival"`, `"Sold Out"`. Limited to 30 characters. */ ribbon?: string; /** * Product brand. * Including a brand name can help improve your site’s [visibility on search engines](https://support.wix.com/en/article/adding-brand-names-to-boost-product-page-seo-in-wix-stores). * Limited to 50 characters. */ brand?: string; }; /** * An object representing an option for a store product. */ type ProductOption = { /** * Option type. Either `"color"` or `"drop_down"`. */ optionType: string; /** * Option name. */ name: string; /** * Option choices. * Each option can contain between one and thirty choices. */ choices: wix_stores_backend.ProductOptionsChoice[]; }; /** * An object representing an option for a store product. */ type ProductOptionInfo = { /** * Option name. */ name: string; /** * Option choices. * Each option can contain between one and thirty choices. */ choices: wix_stores_backend.ProductOptionsChoiceInfo[]; }; /** * An object representing all the available options for a store product, such as "Size" or "Color." */ type ProductOptions = { /** * Name of the option. This key name *  is dependent on the options added to the product. For example, if a product has a size * option, this key will be something like `"Size"`. * * `optionKey` is not case-sensitive. Therefore the values for the option keys `"Size"`, `"SIZE"`, * and `"size"` are combined. * * An option cannot be changed if it has choices and variants. To change an option, reset its variants * with [`resetVariantData()`](wix-stores-backend.html#resetVariantData). * For each option, you can define a maximum of six choices. */ optionKey: wix_stores_backend.ProductOption; }; /** * An object returned by the `getProductOptionsAvailability()` function representing the availability of a product. */ type ProductOptionsAvailability = { /** * Whether the product with the specified option choices is available for purchase. */ availableForPurchase: boolean; /** * An object representing all the available options for a store product. */ productOptions: wix_stores_backend.ProductOptions; /** * Main product media item (image or video) URL. */ mainMedia: string; /** * List of product media items. */ mediaItems: wix_stores_backend.MediaItem[]; /** * The variant of the product selected using the specified option choices if there is one. */ selectedVariant: wix_stores_backend.ProductOptionsAvailabilitySelectedVariant; }; /** * An object representing the product variant selected using the `getProductOptionsAvailability()` function. */ type ProductOptionsAvailabilitySelectedVariant = { /** * Product variant stock keeping unit value. */ sku: string; /** * Product variant currency. */ currency: string; /** * Product variant price. The variant price must be greater than its discount. */ price: number; /** * Discounted product variant price. */ discountedPrice: number; /** * Product variant price formatted with the currency. */ formattedPrice: string; /** * Discounted product variant price formatted with the currency. */ formattedDiscountedPrice: string; /** * Whether the product variant is visible to site visitors and appears in Content Manager collections. */ visible: boolean; /** * Whether the product variant is in stock. */ inStock: boolean; /** * Product variant weight. */ weight: number; }; /** * An object representing an options choice for a store product, such as choice "Small" for the option "Size." */ type ProductOptionsChoice = { /** * Choice value. */ value: number; /** * Choice description. */ description: number; /** * Whether the product with this choice is in stock. */ inStock: boolean; /** * Whether the product with this option is visible. */ visible: boolean; }; type ProductOptionsChoiceInfo = { /** * Choice value. */ value: number; /** * Choice description. */ description: number; }; /** * An object representing all the available options for a store product. */ type ProductOptionsInfo = { /** * Name of the option. This key name is dependent on the options added to the product. For example, if a product has a color or size option, this key will be something like `"Color"` or `"Size"`. * * `optionKey` is not case-sensitive. Therefore the values for the option keys `"Size"`, `"SIZE"`, and `"size"` are combined. */ optionKey: wix_stores_backend.ProductOptionInfo; }; /** * An object representing a ribbon for a store product. */ type ProductRibbon = { /** * Ribbon text. */ text: string; }; /** * An object representing the selection of specific variants of a product. Use only one of * `choices` or `variantIds`. */ type ProductVariantOptions = { /** * The choices the retrieved variants will have. */ choices?: wix_stores_backend.ProductChoices; /** * IDs of variants to retrieve. */ variantIds?: string[]; }; /** * An object representing order refund information. */ type Refund = { /** * Refund ID. */ id: string; /** * Date and time the refund was issued. */ dateCreated: string; /** * Refund amount. */ amount: string; /** * Reason for refund. */ reason?: string; /** * Whether the refund was made externally. * An external refund refers to refunds processed by the payment provider and reported to the Wix orders system. * When the value is false, the refund was reported to the Wix orders system, but was not processed by the payment provider. */ externalRefund: boolean; /** * Payment provider transaction ID. */ paymentProviderTransactionId?: string; }; /** * An object representing custom SEO data for the product. */ type SeoData = { /** * SEO tag details. */ tags: wix_stores_backend.SeoTag[]; }; /** * An object representing the product's custom SEO tags. */ type SeoTag = { /** * SEO tag type. * Supported values: * * + `"title"` * + `"meta"` * + `"script"` * + `"link"` */ type: string; /** * The props property holds an object of `{"key": "value"}` pairs where the key is one of the SEO tag's properties (name, content, rel, href, etc.) * and the value is the value for that property. `{"name": "description", "content": "The description itself."}`. */ props: object; /** * Tag metadata. For example, `{"height": 300, "width": 240}`. */ meta: object; /** * Tag inner content. For example, ` inner content `. */ children: string; /** * Whether the tag is a custom tag. */ custom: boolean; /** * Whether the tag is disabled. */ disabled: boolean; }; /** * An object representing product custom SEO tag information. */ type SeoTagInfo = { /** * SEO tag type. * Supported values: * * + `"title"` * + `"meta"` * + `"script"` * + `"link"` */ type: string; /** * The props property holds an object of key:value pairs where the key is one of the SEO tag's properties (name, content, rel, href, etc.) * and the value is the value for that property. `{"name": "description", "content": "The description itself."}`. */ props: object; /** * Tag meta data. For example, `{"height": 300, "width": 240}`. */ meta: object; /** * Tag inner content. For example, ` inner content `. */ children: string; /** * Whether the tag is a custom tag. */ custom: boolean; /** * Whether the tag is disabled. */ disabled: boolean; }; /** * An object representing an order's shipping details. */ type ShipmentDetails = { /** * Shipping address. */ address?: wix_stores_backend.Address; /** * Last name. */ lastName?: string; /** * First name. */ firstName?: string; /** * Email address. */ email?: string; /** * Phone number. */ phone?: string; /** * Company name. */ company?: string; /** * VAT information. */ vatId?: wix_stores_backend.VatId; /** * Deprecated: see priceData. */ tax?: number; /** * Deprecated: see priceData. */ discount?: number; /** * Shipment price information. */ priceData?: wix_stores_backend.ShipmentPriceData; }; /** * An object representing shipment price information. */ type ShipmentPriceData = { /** * Price of the item. */ price: number; /** * Whether the price includes tax. */ taxIncludedInPrice: boolean; }; /** * An object representing information about the street name and street number of an address. */ type StreetAddress = { /** * Address street name. */ name: string; /** * Address street number. */ number: string; }; type SubscriptionInfo = { /** * ID of the current subscription's cycle. */ id: string; /** * Current billing cycle number. For example, if the subscription is in the 3rd month of a 4-month subscription, the value is `3`. */ cycleNumber: number; /** * Subscription settings. */ subscriptionSettings: wix_stores_backend.SubscriptionSettings; /** * Subscription option information. */ subscriptionOptionInfo: wix_stores_backend.SubscriptionOptionInfo; }; type SubscriptionOptionInfo = { /** * Subscription option ID. */ id: string; /** * Subscription option title. For example, "Coffee of the week". */ title: string; /** * Subscription option description. For example, "Subscribe and get 15% off". */ description: string; }; type SubscriptionSettings = { /** * Frequency of recurring payment. * Supported values: * * + `"DAY"` * + `"WEEK"` * + `"MONTH"` * + `"YEAR"` */ frequency: string; /** * Whether subscription is renewed automatically at the end of each period. * If the value is `true`, then `billingCycles` is ignored. */ autoRenewal: boolean; /** * Number of billing cycles before subscription ends. Ignored if `autoRenewal: false`. */ billingCycles: number; }; /** * An object representing an order's totals. */ type Totals = { /** * Total calculated discount amount. */ discount?: number; /** * Total quantity of the the order's line items. */ quantity: number; /** * Total shipping price, including tax. */ shipping?: number; /** * Subtotal of all the order's line items, excluding tax. */ subtotal: number; /** * Total amount of tax. */ tax?: number; /** * Total price. */ total: number; /** * Total weight of the order's items. */ weight: number; }; /** * An object representing tracking information for a fulfilled order. */ type TrackingInfo = { /** * Tracking number. */ trackingNumber: string; /** * Shipping provider. */ shippingProvider: string; /** * Link to the tracking summary of the fulfilled order. */ trackingLink: string; }; /** * An object representing information for creating or updating a product in a store. */ type UpdateProductInfo = { /** * Product name. Limited to 80 characters. */ name?: string; /** * Product description. */ description?: string; /** * Product stock keeping unit value. Must be unique. */ sku?: string; /** * Product price. * The price must be greater than its discount. * The product price is propagated to the product's newly-created variants. Product variants whose prices have been updated directly are not affected by changes to the product price. */ price?: number; /** * Details for the product's price per unit. If one of the `pricePerUnitData` fields is provided, all must be provided. */ pricePerUnitData?: wix_stores_backend.pricePerUnitData; /** * An object representing a product discount. */ discount?: wix_stores_backend.ProductDiscount; /** * An object representing all the available options for a store product. */ productOptions?: wix_stores_backend.ProductOptionsInfo; /** * Indicates whether product variants can be managed. Can be set to true only if the product has options. Once set to true, can be reset to false only if no variants exist. Use [`getProductVariants()`](wix-stores.html#getProductVariants) to check if variants exist. You cannot set `manageVariants` to true if more than 300 variants are defined. */ manageVariants?: boolean; /** * Product type. */ productType?: string; /** * Product weight. */ weight?: number; /** * Whether the product is visible to site visitors. Setting this to false removes the product from Content Manager collections. */ visible?: boolean; /** * Custom SEO data for the product. Learn more [about SEO](https://support.wix.com/en/search?term=seo). */ seoData?: wix_stores_backend.SeoData; /** * Product ribbon. Used to highlight relevant information about a product. * For example, `"Sale"`, `"New Arrival"`, `"Sold Out"`. Limited to 30 characters. */ ribbon?: string; /** * Product brand. * Including a brand name can help improve your site’s [visibility on search engines](https://support.wix.com/en/article/adding-brand-names-to-boost-product-page-seo-in-wix-stores). * Limited to 50 characters. */ brand?: string; }; /** * An object containing variant information. */ type VariantData = { /** * Variant currency. */ currency: string; /** * Variant price. The variant price must be greater than its discount. */ price: number; /** * Discounted variant price. */ discountedPrice: number; /** * Price per unit. */ pricePerUnit: number; /** * Price per unit formatted with currency symbol. */ formattedPricePerUnit: string; /** * Variant weight. */ weight: number; /** * Variant stock keeping unit value. */ sku: string; /** * Whether the variant is visible to site visitors and appears in Content Manager collections. */ visible: boolean; }; /** * An object containing variant information for update. */ type VariantInfo = { /** * Variant currency. */ currency: string; /** * Variant price. The variant price must be greater than its discount. */ price: number; /** * Discounted variant price. */ discountedPrice: number; /** * Variant weight. */ weight: number; /** * Variant stock keeping unit value. */ sku: string; /** * Whether the variant is visible to site visitors and appears in Content Manager collections. */ visible: boolean; /** * Specific product options to update. * The `choices` object contains key:value pairs where the key is the * option name and the value is the chosen option value. * For example, to update the blue t-shirt in size large, you would pass something like this: `{"Color": "Blue", "Size": "Large"}`. */ choices: any; }; /** * An object representing a product variant item. */ type VariantItem = { /** * Unique variant ID. */ _id: string; /** * The choices of the retrieved variant. */ choices: wix_stores_backend.ProductChoices; /** * Variant information. */ variant: wix_stores_backend.VariantData; }; /** * An object representing product variants. */ type Variants = { /** * List of variant items that match the specified choices or variant IDs. */ items: wix_stores_backend.VariantItem[]; /** * Number of items in the current results page. */ length: number; /** * Total number of variants with the specified choices. */ totalCount: number; }; /** * An object representing value added tax (VAT) information. */ type VatId = { /** * VAT number. */ number: string; /** * VAT type. Either `"CPF"` or `"CNPJ"`. */ type: string; }; /** * An object used by the Gallery properties `items` and `currentItem` to represent a single gallery video. */ type VideoItem = { /** * Item type. Value is `"video"`. */ type: string; /** * Video source URL. */ src: string; /** * Item slug. */ slug?: string; /** * Video title. */ title?: string; /** * Video description. Descriptions over 100 characters are truncated. */ description?: string; /** * URL of the video's clickable link. See [here]($w.LinkableMixin.html#link) for more information about links. */ link?: string; /** * Video thumbnail URL. */ thumbnail?: string; }; /** * An object representing a product's price per unit data. */ type pricePerUnitData = { /** * Product’s total weight, volume, or area. For example, if your product weighs 1 kilogram, the `totalQuantity` is `1`. */ totalQuantity: number; /** * Total measurement unit of weight, volume, or area. For example, if your product weighs 1 kilogram, the `totalMeasurementUnit` is `"KG"`. * * Make sure the measurement system (metric or imperial) matches the one in your site's [Regional Settings](https://support.wix.com/en/article/changing-your-sites-regional-settings). * * Supported metric values: * `"ML"`, `"CL"`, `"L"`, `"CBM"`, `"MG"`, `"G"`, `"KG"`, `"MM"`, `"CM"`, `"M"`, `"SQM"`. * * Supported imperial values: * `"OZ"`, `"LB"`, `"FLOZ"`, `"PT"`, `"QT"`, `"GAL"`, `"IN"`, `"FT"`, `"YD"`, `"SQFT"`. */ totalMeasurementUnit: string; /** * Product’s base weight, volume, or area. For example, for a product weighing 1 kilogram, the `baseQuantity` could be `100` (grams). */ baseQuantity: number; /** * Base measurement unit of weight, volume, or area. For example, if your product weighs 1 kilogram, and the `baseQuantity` is `100` grams, `baseMeasurementUnit` is `"G"`. * * Make sure the measurement system (metric or imperial) matches the one in your site's [Regional Settings](https://support.wix.com/en/article/changing-your-sites-regional-settings). * * Supported metric values: * `"ML"`, `"CL"`, `"L"`, `"CBM"`, `"MG"`, `"G"`, `"KG"`, `"MM"`, `"CM"`, `"M"`, `"SQM"`. * * Supported imperial values: * `"OZ"`, `"LB"`, `"FLOZ"`, `"PT"`, `"QT"`, `"GAL"`, `"IN"`, `"FT"`, `"YD"`, `"SQFT"`. */ baseMeasurementUnit: string; }; } declare namespace wix_users_backend { /** * **Deprecated.** * This code will continue to work, but a newer version is available at * [wix-members-backend.badges](https://www.wix.com/velo/reference/wix-members-backend/badges). * [Read more](https://www.wix.com/corvid/reference/wix-users-backend.Badges.html#) */ interface Badges { /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-members-backend.badges.assignMembers()](https://www.wix.com/velo/reference/wix-members-backend/badges/assignmembers). * [Read more](https://www.wix.com/corvid/reference/wix-users-backend.Badges.html#assignMembers) */ assignMembers(badgeId: string, memberIds: string[]): Promise; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-members-backend.badges.createBadge()](https://www.wix.com/velo/reference/wix-members-backend/badges/createbadge). * [Read more](https://www.wix.com/corvid/reference/wix-users-backend.Badges.html#createBadge) */ createBadge(badgeInfo: wix_users_backend.Badges.BadgeInfo): Promise; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-members-backend.badges.deleteBadge()](https://www.wix.com/velo/reference/wix-members-backend/badges/deletebadge). * [Read more](https://www.wix.com/corvid/reference/wix-users-backend.Badges.html#deleteBadge) */ deleteBadge(badgeId: string): Promise; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-members-backend.badges.listMemberBadges()](https://www.wix.com/velo/reference/wix-members-backend/badges/listmemberbadges). * [Read more](https://www.wix.com/corvid/reference/wix-users-backend.Badges.html#listMemberBadges) */ listMemberBadges(memberIds: string[]): Promise; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-members-backend.badges.listMembers()](https://www.wix.com/velo/reference/wix-members-backend/badges/listmembers). * [Read more](https://www.wix.com/corvid/reference/wix-users-backend.Badges.html#listMembers) */ listMembers(badgeId: string): Promise; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-members-backend.badges.removeMembers()](https://www.wix.com/velo/reference/wix-members-backend/badges/removemembers). * [Read more](https://www.wix.com/corvid/reference/wix-users-backend.Badges.html#removeMembers) */ removeMembers(badgeId: string, memberIds: string[]): Promise; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-members-backend.badges.updateBadge()](https://www.wix.com/velo/reference/wix-members-backend/badges/updatebadge). * [Read more](https://www.wix.com/corvid/reference/wix-users-backend.Badges.html#updateBadge) */ updateBadge(badgeId: string, badgeInfo: wix_users_backend.Badges.BadgeInfo): Promise; } namespace Badges { /** * An object representing a member badge. */ type Badge = { /** * Badge ID. */ id: string; /** * Badge title. */ title: string; /** * Badge description. */ description: string; /** * Background color of the badge as a hexadecimal rgb color value. The default color is `#796EFF` (purple). */ backgroundColor: string; /** * Text color of the badge as a hexadecimal rgb color value. The default color is `#FFFFFF` (white). */ textColor: string; /** * Badge icon as an SVG image. One of the following: * * + An external web URL in the following format: `http(s)://`. * + The [source URL](wix-media-backend.mediaManager.html#getFileUrl) for a Wix Media Manager file. Wix Media Manager file names in a `wix:image://...` format are not supported. */ icon: string; /** * ID of the role that badge members are assigned to. */ roleId: string; /** * Badge's unique URL as used in a dynamic page. */ slug: string; /** * Date and time the badge was created. */ createdDate: Date; /** * Date and time the badge was last updated. */ updatedDate: Date; }; /** * Information to use when creating or updating a badge. */ type BadgeInfo = { /** * Badge title. */ title: string; /** * Badge description. */ description?: string; /** * Background color of the badge as a hexadecimal rgb color value. The default color is `#796EFF` (purple). */ backgroundColor?: string; /** * Text color of the badge as a hexadecimal rgb color value. The default color is `#FFFFFF` (white). */ textColor?: string; /** * Badge icon as an SVG image. One of the following: * * + An external web URL in the following format: `http(s)://`. * + The [source URL](wix-media-backend.mediaManager.html#getFileUrl) for a Wix Media Manager file. Wix Media Manager file names in a `wix:image://...` format are not supported. */ icon?: string; }; /** * An object representing the badges associated with a member. */ type MemberBadges = { /** * Member ID. */ memberId: string; /** * IDs of all badges assigned to the specified member. */ badgeIds: string[]; }; } /** * **Deprecated.** * This code will continue to work, but a newer version is available at * [wix-members-backend.authorization](https://www.wix.com/velo/reference/wix-members-backend/authorization). * [Read more](https://www.wix.com/corvid/reference/wix-users-backend.Roles.html#) */ interface Roles { /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-members-backend.authorization.assignRole()](https://www.wix.com/velo/reference/wix-members-backend/authorization/assignrole). * [Read more](https://www.wix.com/corvid/reference/wix-users-backend.Roles.html#assignRole) */ assignRole(roleId: string, memberId: string, options?: wix_users_backend.Roles.WixRolesOptions): Promise; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-members-backend.authorization.removeRole()](https://www.wix.com/velo/reference/wix-members-backend/authorization/removerole). * [Read more](https://www.wix.com/corvid/reference/wix-users-backend.Roles.html#removeRole) */ removeRole(roleId: string, memberId: string, options?: wix_users_backend.Roles.WixRolesOptions): Promise; } namespace Roles { /** * An object that you pass as the `options` parameter that modifies how an operation is performed. */ type WixRolesOptions = { /** * Prevents permission checks from running for the operation. Defaults to `false`. */ suppressAuth: boolean; }; } /** * A site member. * [Read more](https://www.wix.com/corvid/reference/wix-users-backend.User.html#) */ interface User { /** * **Deprecated.** * This property will continue to work, but a newer version is available at * [wix-members-backend.currentMember.getMember()](https://www.wix.com/velo/reference/wix-members-backend/currentmember/getmember). * [Read more](https://www.wix.com/corvid/reference/wix-users-backend.User.html#id) */ readonly id: string; /** * **Deprecated.** * This property will continue to work, but a newer version is available at * [wix-members-backend.currentMember.getMember()](https://www.wix.com/velo/reference/wix-members-backend/currentmember/getmember). * [Read more](https://www.wix.com/corvid/reference/wix-users-backend.User.html#loggedIn) */ readonly loggedIn: boolean; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-members-backend.currentMember.getRoles()](https://www.wix.com/velo/reference/wix-members-backend/currentmember/getroles). * [Read more](https://www.wix.com/corvid/reference/wix-users-backend.User.html#role) */ readonly role: string; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-members-backend.currentMember.getMember()](https://www.wix.com/velo/reference/wix-members-backend/currentmember/getmember). * [Read more](https://www.wix.com/corvid/reference/wix-users-backend.User.html#getEmail) */ getEmail(): Promise; /** * Gets the current member's pricing plan. * [Read more](https://www.wix.com/corvid/reference/wix-users-backend.User.html#getPricingPlans) */ getPricingPlans(): Promise; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-members-backend.currentMember.getRoles()](https://www.wix.com/velo/reference/wix-members-backend/currentmember/getroles). * [Read more](https://www.wix.com/corvid/reference/wix-users-backend.User.html#getRoles) */ getRoles(): Promise; } namespace User { /** * An object returned by the `getPricingPlans()` function representing a user's [pricing plans](https://support.wix.com/en/article/adding-and-setting-up-the-paid-plans-app). */ type PricingPlan = { /** * The pricing plan's name. */ name: string; /** * The pricing plan's start date. */ startDate?: Date; /** * The pricing plan's expiry date. */ expiryDate?: Date; }; /** * An object returned by the `getRoles()` function representing a user's [roles](https://support.wix.com/en/article/creating-member-roles-6943237). */ type UserRole = { /** * Role name as defined in the site's dashboard or one of "Admin" or "Member". */ name: string; /** * Role description, if defined in the site's dashboard. */ description?: string; }; } /** * An object that contains information about a site member's address. */ type Address = { /** * Address street address. */ street: string; /** * Address city. */ city: string; /** * Address country. */ country: string; /** * Address postal code. */ postalCode: string; }; /** * An object that contains information about a site contact. */ type ContactInfo = { /** * Contact's first name. */ firstName?: string; /** * Contact's last name. */ lastName?: string; /** * Contact's image source. */ picture?: string; /** * List of contact's email addresses. * When creating a contact, if no phone number is * provided, at least one email address must be provided. */ emails?: string[]; /** * Email address the contact who is also * a member uses to log into the system. */ loginEmail?: string; /** * List of contact's phone numbers. * When creating a contact, if no email is * provided, at least one phone number must be provided. */ phones?: string[]; /** * List of contact's labels. [Labels](https://support.wix.com/en/article/creating-contact-labels) * are used to organize contacts. When setting the `labels` property, you can * only list labels that already exist in your site's [Contacts List](https://support.wix.com/en/article/accessing-your-contact-list). */ labels?: string[]; /** * Any * number of custom fields. [Customs fields](https://support.wix.com/en/article/adding-custom-fields-to-contacts) * are used to store additional information about your site's contacts. When * setting a custom field, use key:value pairs where the key matches the names * defined in your site's [Contacts List](https://support.wix.com/en/article/accessing-your-contact-list). * You can only set values for custom fields that already exist in the Contacts * application. */ customFields?: string | number | Date; }; /** * An object that contains information about a site member's picture. */ type Picture = { /** * Member's image URL. */ url: string; }; /** * An object that contains information about a site registration. */ type RegistrationOptions = { /** * Contact information. */ contactInfo?: wix_users_backend.ContactInfo; /** * Sets the [privacy status](https://support.wix.com/en/article/member-privacy-settings-for-groups) of a new member upon registration. * One of: * * + `"PUBLIC"`: Sets the new member status to public. A member whose status is public is a member of the site's community. * + `"PRIVATE"`: Sets the new member status to private. A member whose status is private is not a member of the site's community. The default is set to private. */ privacyStatus?: string; }; /** * An object that contains information about the results of a site registration. */ type RegistrationResult = { /** * Registration status. Either "Pending" or "Active". */ status: string; /** * A token used to log in the current * user as a site member. Pass the token from your backend code to client-side * code and use it when calling the [applySessionToken()](wix-users.html#applySessionToken) * function. The token is only available when `status` is "Active". */ sessionToken?: string; /** * A token for approving the user as * a site member using the [approveByToken()](wix-users-backend.html#approveByToken) * function. The token is safe to pass via email or from client-side code to * backend code. The token is only available when `status` is "Pending". The token * expires 30 hours after it is created. */ approvalToken?: string; /** * The user that has been registered. */ user: wix_users_backend.User; }; /** * An object that contains information about a site member. */ type RetrievedUser = { /** * Member's unique id. */ id: string; /** * The member's full name. This information is concatenated from the `firstName` and `lastName` properties. This field will not be returned if the member registered with an email but without a name. */ memberName?: string; /** * Member's first name. */ firstName: string; /** * Member's last name. */ lastName: string; /** * The email address the member uses to log in to your site. This is the address they supplied when they signed up. */ loginEmail: string; /** * The name the member specified on their profile. */ nickname: string; /** * The member's URL-friendly name that is unique across your site. Typically this is made up of the member's email prefix. */ slug: string; /** * The member's locale based on their last login. */ language: string; /** * Indicates the member's current status, between `Applicant`, `Active`, `Blocked`. */ status: string; /** * The date and time the member registered to the site. */ creationDate: Date; /** * The last date and time the member's details were updated. */ lastUpdateDate: Date; /** * The date and time when the member last logged in. */ lastLoginDate: Date; /** * List of the member's email addresses. */ emails: string[]; /** * List of the member's phone numbers. */ phones: string[]; /** * List of the member's labels. [Labels](https://support.wix.com/en/article/creating-contact-labels) * are used to organize contacts. When setting the `labels` property, you can * only list labels that already exist in your site's [Contacts List](https://support.wix.com/en/article/accessing-your-contact-list). */ labels: string[]; /** * Member's picture. */ picture: wix_users_backend.Picture; /** * Any * number of custom fields. [Custom fields](https://support.wix.com/en/article/adding-custom-fields-to-contacts) * are used to store additional information about your site's contacts. When * setting a custom field, use key:value pairs where the key matches the display names * in your site's [Contacts List](https://support.wix.com/en/article/accessing-your-contact-list). * You can only set values for custom fields that already exist in the Contacts * application. */ customFields: string | number | Date; }; /** * An object used when sending a Triggered Email. */ type TriggeredEmailOptions = { /** * An object with `key:value` pairs where each * `key` is a variable in the email template created in Triggered Emails and its * corresponding `value` is the value to insert into the template in place of * variable. The values must be strings. */ variables: any; }; /** * An object that contains information about a site member. */ type UserInfo = { /** * Member's first name. */ firstName?: string; /** * Member's last name. */ lastName?: string; /** * The name the member specified on their profile. */ nickname?: string; /** * The member's URL-friendly name that is unique across your site. Typically this is made up of the member's email prefix. */ slug?: string; /** * List of the member's email addresses. */ emails?: string[]; /** * List of the member's phone numbers. */ phones?: string[]; /** * List of the member's labels. [Labels](https://support.wix.com/en/article/creating-contact-labels) * are used to organize contacts. When setting the `labels` property, you can * only list labels that already exist in your site's [Contacts List](https://support.wix.com/en/article/accessing-your-contact-list). */ labels?: string[]; /** * Member's picture. */ picture?: wix_users_backend.Picture; /** * Any * number of custom fields. [Custom fields](https://support.wix.com/en/article/adding-custom-fields-to-contacts) * are used to store additional information about your site's contacts. When * setting a custom field, use key:value pairs where the key matches the display names * in your site's [Contacts List](https://support.wix.com/en/article/accessing-your-contact-list). * You can only set values for custom fields that already exist in the Contacts * application. */ customFields?: string | number | Date; }; } declare namespace wix_bookings { /** * An object that contains address information. */ type Address = { /** * Full text address comprised of street name and number, city, subdivision, country, and postal code. */ formatted: string; /** * Address coordinates. */ location: wix_bookings.AddressCoordinates; /** * Address street address. */ streetAddress: wix_bookings.StreetAddress; /** * Address city. */ city: string; /** * Address subdivision, state, prefecture, or province. */ subdivision: string; /** * Address country. */ country: string; /** * Address postal code. */ postalCode: string; }; /** * An object that contains the geographic coordinates of the address. */ type AddressCoordinates = { /** * Address latitude. */ latitude: number; /** * Address longitude. */ longitude: number; }; /** * An object that contains the geographic coordinates of the address. */ type AddressLocation = { /** * Address latitude. */ latitude: number; /** * Address longitude. */ longitude: number; }; /** * An object used when calling [`getServiceAvailability()`](#getServiceAvailability) * containing options for which slots should be returned. */ type AvailabilityOptions = { /** * Start date and time of the slots * to be returned. Defaults to the current date and time. */ startDateTime?: Date; /** * End date and time of the slots to * be returned. Defaults to one week from `startDateTime`, which is one week * from the current date and time if `startDateTime` is also omitted. */ endDateTime?: Date; }; /** * An object used when calling [`checkoutBooking()`](#checkoutBooking) * containing information about the slot to be booked. */ type BookingInfo = { /** * The slot to be booked. */ slot: wix_bookings.Slot; /** * List of form field values required to book the session. */ formFields: wix_bookings.FormField[]; /** * Number of spots to book. Defaults to `1`. */ numberOfSpots?: number; }; /** * An object representing the result of a call to [`checkoutBooking()`](#checkoutBooking). */ type BookingResult = { /** * ID of the booking that was checked out. */ bookingId: string; /** * Status of the booking that was checked out. * One of: * * + `"Confirmed"`: Payment was successful or payment is to be done offline. * + `"Pending Payment"`: Payment is pending. * + `"Terminated"`: Payment failed or was cancelled. */ status: string; }; /** * An object describing the business location. */ type BusinessLocation = { /** * Business location ID. */ id: string; /** * Business location name. */ name: string; /** * Business location description. */ description: string; /** * An object describing the address. */ address: wix_bookings.Address; }; /** * An object returned after calling [`getCheckoutOptions()`](#getCheckoutOptions) * containing information about the available payment options for the service and the logged-in user. */ type CheckoutOption = { /** * Type of the available payment option. Valid options are: * * + `"wixPay_Online"` for online collections * + `"wixPay_Offline"` for offline collections * + `"package"` for a package-type pricing plan * + `"membership"` for a membership-type pricing plan */ type: string; /** * Name of the plan package or membership. For booking with pricing plans only. */ planName?: string; /** * Order ID of the plan package or membership. For booking with pricing plans only. */ planOrderId?: string; /** * ID of the benefit provided by the plan package. For booking with package-type pricing plans only. */ benefitId?: string; /** * Number of sessions remaining in the plan package. For booking with package-type pricing plans only. */ remainingCredits?: number; /** * Number of sessions initially provided with the plan package. For booking with package-type pricing plans only. */ totalCredits?: number; /** * Date by which the plan package or membership expires. For booking with pricing plans only. */ planExpiration?: Date; }; /** * An object used to request checkout options for the service. Currently, you can request the checkout options using the ID of a slot. */ type CheckoutOptionOptions = { /** * Unique slot identifier. */ slotId: string; /** * User ID for the customer making the booking. Used for retrieving valid payment plans for the customer for the selected slot. */ userId: string; }; /** * An object that defines a booking window for limiting when a member can book a slot. For example, * you can prevent members from booking a service too far in advance, because perhaps the service might * be discontinued by then. Or, you can prevent members from booking a service right before it starts, as * this would make it hard to schedule resources. */ type Constraints = { /** * Date from which a member is allowed to book a slot. */ bookableFrom: Date; /** * Date until which a member is allowed to book a slot. */ bookableUntil: Date; }; /** * An object used when calling [`checkoutBooking()`](#checkoutBooking) * containing values for form fields required to book the session. */ type FormField = { /** * ID of the form field from the **form** property in the **Booking/Services** collection. */ _id: string; /** * Form field value. */ value: string; }; /** * The location where a service is offered. */ type Location = { /** * Location type. Valid options are: * - `"OWNER_BUSINESS"` The business address set by the owner. This type is set when choosing **Business Address** in the Service Details page of the dashboard, and populates the businessLocation object. * - `"OWNER_CUSTOM"` A custom address set by the owner. This type is set when choosing **Custom Location** in the Service Details page of the dashboard, and populates the `locationText` property. * - `"CUSTOM"` An address set for the individual booking, usually chosen by the customer and entered in the booking form. */ type: string; /** * Text describing the location. */ locationText: string; /** * An object describing the business location. */ businessLocation: wix_bookings.BusinessLocation; }; /** * An object used when calling [`checkoutBooking()`](#checkoutBooking) * containing information about the payment options. */ type PaymentOptions = { /** * A coupon code to be used with the payment. */ couponCode?: string; /** * Type of payment. Valid options are: * * + `"wixPay_Online"` for online collections * + `"wixPay_Offline"` for offline collections * + `"package"` for a package-type pricing plan * + `"membership"` for a membership-type pricing plan */ paymentType: string; }; /** * An object returned from [`getServiceAvailability()`](#getServiceAvailability) * containing the available bookings slots. */ type ServiceAvailability = { /** * List of the available slots. * * Max: 500 slots */ slots: wix_bookings.Slot[]; }; /** * An object representing a booking slot. */ type Slot = { /** * Unique slot identifier. */ _id: string; /** * Starting date and time of the slot. */ startDateTime: Date; /** * Ending date and time of the slot. */ endDateTime: Date; /** * ID of the service that the slot belongs to. */ serviceId: string; /** * Maximum number of participants that can book the service for this slot. */ capacity: number; /** * Number of remaining spots that can be booked for the slot. */ remainingSpots: number; /** * ID of the slot's staff member. */ staffMemberId: string; /** * Whether the slot can be booked right now, meaning today's date is within the booking window defined by `constraints`. */ bookable: boolean; /** * The dates between which the slot can be booked. The constraints define the booking window. The booking window prevents site members from booking way in advance or just right before the slot starts. */ constraints: wix_bookings.Constraints; /** * The location where this slot is offered. */ location: wix_bookings.Location; }; /** * An object representing information about the street name and street number of an address. */ type StreetAddress = { /** * Address street name. */ name: string; /** * Address street number. */ number: string; }; } declare namespace wix_crm { /** * The Contacts API is used to manage a site's contacts. * [Read more](https://www.wix.com/corvid/reference/wix-crm.Contacts.html#) */ interface Contacts { /** * Appends an existing contact or creates a contact if it doesn't exist. * [Read more](https://www.wix.com/corvid/reference/wix-crm.Contacts.html#appendOrCreateContact) */ appendOrCreateContact(contactInfo: wix_crm.Contacts.ContactInfo): Promise; } namespace Contacts { type Address = { /** * Street address ID. */ _id: string; /** * Address type. * `"UNTAGGED"` is shown as "Other" in the Contact List. * * One of: * * - `"UNTAGGED"` * - `"HOME"` * - `"WORK"` * - `"BILLING"` * - `"SHIPPING"` */ tag: string; /** * Street address. */ address: wix_crm.Contacts.AddressDetails; }; /** * Street address. */ type AddressDetails = { /** * Main address line, usually street and number, as free text. */ addressLine1?: string; /** * Street address object, with number and name in separate fields. */ streetAddress?: wix_crm.Contacts.StreetAddressInfo; /** * Human-readable address string. * If not provided, the value is generated from the available address data. */ formatted?: string; /** * Free text providing more detailed address information, * such as apartment, suite, or floor. */ addressLine2?: string; /** * Coordinates of the physical address. */ location?: wix_crm.Contacts.AddressLocation; /** * City name. */ city?: string; /** * Code for a subdivision (such as state, prefecture, or province) in an * [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format. */ subdivision?: string; /** * 2-letter country code in an * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. */ country?: string; /** * Postal or zip code. */ postalCode?: string; }; type AddressInfo = { /** * Address type. * `"UNTAGGED"` is shown as "Other" in the Contact List. * * One of: * * - `"UNTAGGED"` * - `"HOME"` * - `"WORK"` * - `"BILLING"` * - `"SHIPPING"` */ tag: string; /** * Street address. */ address: wix_crm.Contacts.AddressDetails; }; /** * Coordinates of the physical address. */ type AddressLocation = { /** * Address's latitude. */ latitude?: number; /** * Address's longitude. */ longitude?: number; }; type ContactIdentification = { /** * ID of the contact that was found or created. */ contactId: string; /** * Identity type of the returned contact. * * One of: * * - `"CONTACT"`: The returned contact ID belongs to a new or existing contact. * - `"MEMBER"`: The returned contact ID belongs to the currently logged-in site member. * - `"NOT_AUTHENTICATED_MEMBER"`: The returned contact ID belongs to a site member who is not currently logged in. */ identityType: string; }; /** * Contact's information. */ type ContactInfo = { /** * Contact's first and last name. */ name?: wix_crm.Contacts.Name; /** * Contact's company name. */ company?: string; /** * Contact's job title. * Corresponds to the **Position** field in the Dashboard. */ jobTitle?: string; /** * Contact's locale, formatted as an * [IETF BCP 47 language tag](https://tools.ietf.org/html/rfc5646). * Typically, this is a lowercase 2-letter language code, * followed by a hyphen, * followed by an uppercase 2-letter country code. * * For example, German from Germany is formatted as `de-DE`, * and U.S. English is formatted as `en-US`. */ locale?: string; /** * Contact's birthdate, formatted as `"YYYY-MM-DD"`. * * Example: `"2020-03-15"` for March 15, 2020. */ birthdate?: string; /** * **Deprecated.** Use `profilePicture` instead. */ picture?: wix_crm.Contacts.Picture; /** * Contact's profile picture URL. */ profilePicture?: string; /** * List of up to 50 email addresses. */ emails?: wix_crm.Contacts.EmailInfo[]; /** * List of up to 50 phone numbers. */ phones?: wix_crm.Contacts.PhoneInfo[]; /** * List of up to 50 addresses. */ addresses?: wix_crm.Contacts.AddressInfo[]; /** * List of contact label keys. * [Contact labels](https://support.wix.com/en/article/adding-labels-to-contacts-in-your-contact-list) * help categorize contacts. * * Label keys must exist to be added to the contact. * Contact labels can be created or retrieved with * [`findOrCreateLabel()`](wix-crm-backend/contacts/findorcreatelabel) * or * [`queryLabels()`](wix-crm-backend/contacts/queryLabels). */ labelKeys?: string[]; /** * Set of key-value pairs. * * Contact's * [extended fields](wix-crm-backend/contacts/introduction#about-extended-fields), * which allow you to store additional information about your contacts. * * To view or create extended fields, use * [`findOrCreateExtendedField()`](wix-crm-backend/contacts/findorcreateextendedfield), * [`getExtendedField()`](wix-crm-backend/contacts/getextendedfield), or * [`queryExtendedFields()`](wix-crm-backend/contacts/queryextendedfields). */ extendedFields?: any; }; /** * Contact's profile picture. */ type ContactPicture = { /** * Image source. Can be either a Media Manager URL or external URL. */ image: string; /** * Indicates whether the image is retrieved from Wix Media * or an external provider. * * One of: * * - `"EXTERNAL"`: The image is retrieved from an external provider. * - `"WIX_MEDIA"`: The image is retrieved from Wix Media. */ imageProvider: string; }; type Email = { /** * Email ID. */ _id: string; /** * Email type. * * `"UNTAGGED"` is shown as "Other" in the Contact List. * * One of: * * - `"UNTAGGED"` * - `"MAIN"` * - `"HOME"` * - `"WORK"` */ tag: string; /** * Email address. */ email: string; /** * Indicates whether this is the contact's primary email address. * When changing `primary` to `true` for an email, * the contact's other emails become `false`. */ primary: boolean; }; type EmailInfo = { /** * Email type. * * `"UNTAGGED"` is shown as "Other" in the Contact List. * * One of: * * - `"UNTAGGED"` * - `"MAIN"` * - `"HOME"` * - `"WORK"` */ tag?: string; /** * Email address. */ email?: string; /** * Indicates whether this is the contact's primary email address. * When changing `primary` to `true` for an email, * the contact's other emails become `false`. */ primary?: boolean; }; /** * Extended field that was found or created. */ type ExtendedField = { /** * Extended field key. * * When accessing contact data, * extended field data is available at `extendedFields[key]`. * For example, if the key is "custom.notes", * the value can be accessed at `extendedFields["custom.notes"]`. * * `key` is generated when the extended field is created * and cannot be modified, even if `displayName` changes. */ key: string; /** * Extended field display name shown in the Contact List. */ displayName: string; /** * Type of data the field holds. * * One of: * * - `"TEXT"`: Accepts strings. * - `"URL"`: Accepts web addresses. Prepends `https://` if no protocol is included. * - `"DATE"`: Accepts dates formatted as `"YYYY-MM-DD"`. * - `"NUMBER"`: Accepts floats. */ dataType: string; /** * Indicates whether the extended field is a * [system field or custom field](wix-crm-backend/contacts/introduction#about-extended-fields). * * One of: * * - `"SYSTEM"`: The field is a system field managed by Wix. System fields cannot be modified by 3rd-party apps or site contributors. * - `"USER_DEFINED"`: The field is a custom field and can be modified by 3rd-party apps or site contributors. */ fieldType: string; /** * Date and time the field was created. */ _createdDate: Date; /** * Date and time the field was last updated. */ _updatedDate: Date; /** * Extended field [namespace](wix-crm-backend/contacts/introduction#the-namespace-and-key-properties-in-labels-and-extended-fields). * * Extended fields created by site contributors or 3rd-party apps * are automatically assigned to the `custom` namespace. */ namespace: string; /** * Field description, if the field is a system field. */ description: string; }; /** * Contact's details. */ type Info = { /** * Contact's first and last name. */ name?: wix_crm.Contacts.Name; /** * Contact's company name. */ company?: string; /** * Contact's job title. * Corresponds to the **Position** field in the Dashboard. */ jobTitle?: string; /** * Contact's locale, formatted as an * [IETF BCP 47 language tag](https://tools.ietf.org/html/rfc5646). * Typically, this is a lowercase 2-letter language code, * followed by a hyphen, * followed by an uppercase 2-letter country code. * * For example, German from Germany is formatted as `de-DE`, * and U.S. English is formatted as `en-US`. */ locale?: string; /** * Contact's birthdate, formatted as `"YYYY-MM-DD"`. * * Example: `"2020-03-15"` for March 15, 2020. */ birthdate?: string; /** * **Deprecated.** Use `profilePicture` instead. */ picture: wix_crm.Contacts.Picture; /** * Contact's profile picture URL. */ profilePicture?: string; /** * List of up to 50 email addresses. */ emails?: wix_crm.Contacts.Email[]; /** * List of up to 50 phone numbers. */ phones?: wix_crm.Contacts.Phone[]; /** * List of up to 50 addresses. */ addresses?: wix_crm.Contacts.Address[]; /** * List of contact label keys. * [Contact labels](https://support.wix.com/en/article/adding-labels-to-contacts-in-your-contact-list) * help categorize contacts. * * Label keys must exist to be added to the contact. * Contact labels can be created or retrieved with * [`findOrCreateLabel()`](wix-crm-backend/contacts/findorcreatelabel) * or * [`queryLabels()`](wix-crm-backend/contacts/queryLabels). */ labelKeys?: string[]; /** * Set of key-value pairs. * * Contact's * [extended fields](wix-crm-backend/contacts/introduction#about-extended-fields), * which allow you to store additional information about your contacts. * * To view or create extended fields, use * [`findOrCreateExtendedField()`](wix-crm-backend/contacts/findorcreateextendedfield), * [`getExtendedField()`](wix-crm-backend/contacts/getextendedfield), or * [`queryExtendedFields()`](wix-crm-backend/contacts/queryextendedfields). */ extendedFields: any; }; /** * Label that was found or created. */ type Label = { /** * Label key. * * `key` is generated when the label is created * and cannot be modified, even if `displayName` changes. */ key: string; /** * Label display name shown in the Dashboard. */ displayName: string; /** * Label type. * * One of: * * - `"SYSTEM"`: The label is a predefined system label for the Contact List. * - `"USER_DEFINED"`: The label was created by a site contributor or app. * - `"WIX_APP_DEFINED"`: The label was created by a Wix app. */ labelType: string; /** * Date and time the label was created. */ _createdDate: Date; /** * Date and time the label was last updated. */ _updatedDate: Date; /** * Label [namespace](wix-crm-backend/contacts/introduction#the-namespace-and-key-properties-in-labels-and-extended-fields). * * Labels created by site contributors or 3rd-party apps * are automatically assigned to the `custom` namespace. */ namespace: string; }; /** * Details about the contact's last action in the site. */ type LastActivity = { /** * Date and time of the last action. */ activityDate: Date; /** * Contact's last action in the site. * * Some possible values: * `"GENERAL"`, `"CONTACT_CREATED"`, `"MEMBER_LOGIN"`, `"MEMBER_REGISTER"`, * `"MEMBER_STATUS_CHANGED"`, `"FORM_SUBMITTED"`, `"INBOX_FORM_SUBMITTED"`, * `"INBOX_PAYMENT_REQUEST_PAID"`, `"INBOX_MESSAGE_TO_CUSTOMER"`, * `"INBOX_MESSAGE_FROM_CUSTOMER"`, `"NEWSLETTER_SUBSCRIPTION_FORM_SUBMITTED"`, * `"NEWSLETTER_SUBSCRIPTION_UNSUBSCRIBE"`, `"ECOM_PURCHASE"`, * `"ECOM_CART_ABANDON"`, `"ECOM_CHECKOUT_BUYER"`, `"BOOKINGS_APPOINTMENT"`, * `"HOTELS_RESERVATION"`, `"HOTELS_PURCHASE"`, `"HOTELS_CONFIRMATION"`, * `"HOTELS_CANCEL"`, `"VIDEO_PURCHASE"`, `"VIDEO_RENT"`, * `"CASHIER_BUTTON_PURCHASE"`, `"ARENA_NEW_LEAD"`, `"EVENTS_RSVP"`, * `"INVOICE_PAY"`, `"INVOICE_OVERDUE"`, `"PRICE_QUOTE_ACCEPT"`, * `"PRICE_QUOTE_EXPIRE"`, `"RESTAURANTS_ORDER"`, `"RESTAURANTS_RESERVATION"`, * `"SHOUTOUT_OPEN"`, `"SHOUTOUT_CLICK"`, `"CONTACT_MERGED"`. */ activityType: string; }; /** * Contact's first and last name. */ type Name = { /** * Contact's first name. */ first?: string; /** * Contact's last name. */ last?: string; }; type Phone = { /** * Phone ID. */ _id: string; /** * Phone type. * * `"UNTAGGED"` is shown as "Other" in the Contact List. * * One of: * * - `"UNTAGGED"` * - `"MAIN"` * - `"HOME"` * - `"MOBILE"` * - `"WORK"` * - `"FAX"` */ tag: string; /** * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code. */ countryCode?: string; /** * Phone number. */ phone: string; /** * [ITU E.164-formatted](https://www.itu.int/rec/T-REC-E.164/) * phone number. * Automatically generated using `phone` and `countryCode`, * as long as both of those values are valid. */ e164Phone?: string; /** * Whether this is the contact's primary phone number. * When changing `primary` to `true` for a phone, * the contact's other phones become `false`. */ primary: boolean; }; type PhoneInfo = { /** * Phone type. * * `"UNTAGGED"` is shown as "Other" in the Contact List. * * One of: * * - `"UNTAGGED"` * - `"MAIN"` * - `"HOME"` * - `"MOBILE"` * - `"WORK"` * - `"FAX"` */ tag?: string; /** * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code. */ countryCode?: string; /** * Phone number. */ phone?: string; /** * Whether this is the contact's primary phone number. * When changing `primary` to `true` for a phone, * the contact's other phones become `false`. */ primary?: boolean; }; /** * todo */ type Picture = { /** * **Deprecated.** Use `profilePicture` instead. */ image?: string; /** * **Deprecated.** */ imageProvider?: string; }; /** * Contact's primary phone and email. */ type PrimaryInfo = { /** * Primary email address. * * This property reflects the email address in `contactInfo.emails` * where `primary` is `true`. */ email?: string; /** * Primary phone number. * * This property reflects the phone number in `contactInfo.phones` * where `primary` is `true`. */ phone?: string; }; /** * Details about the contact's source. */ type Source = { /** * Source type. * * Some possible values: * `"OTHER"`, `"ADMIN"`, `"WIX_APP"`, `"IMPORT"`, `"THIRD_PARTY"`, * `"WIX_BOOKINGS"`, `"WIX_CHAT"`, `"WIX_EMAIL_MARKETING"`, `"WIX_EVENTS"`, * `"WIX_FORMS"`, `"WIX_GROUPS"`, `"WIX_HOTELS"`, `"WIX_MARKET_PLACE"`, * `"WIX_MUSIC"`, `"WIX_RESTAURANTS"`, `"WIX_SITE_MEMBERS"`, `"WIX_STORES"`. */ sourceType: string; /** * App ID, if the contact was created by an app. */ appId: string; }; /** * Street address object, with number and name in separate fields. */ type StreetAddress = { /** * Street number. */ number: string; /** * Street name. */ name: string; }; /** * Street address object, with number and name in separate fields. */ type StreetAddressInfo = { /** * Street number. */ number?: string; /** * Street name. */ name?: string; }; } /** * Code that has been replaced with newer, forward-compatible functions. * [Read more](https://www.wix.com/corvid/reference/wix-crm.Deprecated.html#) */ interface Deprecated { } /** * The Triggered Emails API is used to send triggered emails to your site's contacts and members. * [Read more](https://www.wix.com/corvid/reference/wix-crm.TriggeredEmails.html#) */ interface TriggeredEmails { /** * Sends a triggered email to the current contact, unless that contact is marked as unsubscribed. * [Read more](https://www.wix.com/corvid/reference/wix-crm.TriggeredEmails.html#emailContact) */ emailContact(emailId: string, contactId: string, options?: wix_crm.TriggeredEmails.TriggeredEmailOptions): Promise; /** * Sends a Triggered Email to the currently logged-in site member. * [Read more](https://www.wix.com/corvid/reference/wix-crm.TriggeredEmails.html#emailMember) */ emailMember(emailId: string, memberId: string, options?: wix_crm.TriggeredEmails.TriggeredEmailOptions): Promise; } namespace TriggeredEmails { type TriggeredEmailOptions = { /** * An object with `key:value` pairs. Each * `key` is a variable in the email template created in Triggered Emails, and its * corresponding `value` is the value to insert into the template in place of the * variable. The values must be strings. * * Example: `{ firstName: 'John', lastName: 'Doe' }` */ variables: any; }; } /** * An object that contains information about a site contact. */ type ContactInfo = { /** * Contact's first name. */ firstName?: string; /** * Contact's last name. */ lastName?: string; /** * Contact's image source. */ picture?: string; /** * List of contact's email addresses. * When creating a contact, if no phone number is * provided, at least one email address must be provided. */ emails?: string[]; /** * Email address the contact who is also * a member uses to log into the system. */ loginEmail?: string; /** * List of contact's phone numbers. * When creating a contact, if no email is * provided, at least one phone number must be provided. */ phones?: string[]; /** * List of contact's labels. [Labels](https://support.wix.com/en/article/creating-contact-labels) * are used to organize contacts. When setting the `labels` property, you can * only list labels that already exist in your site's [Contacts List](https://support.wix.com/en/article/accessing-your-contact-list). */ labels?: string[]; /** * Any * number of custom fields. [Customs fields](https://support.wix.com/en/article/adding-custom-fields-to-contacts) * are used to store additional information about your site's contacts. When * setting a custom field, use key:value pairs where the key matches the names * defined in your site's [Contacts List](https://support.wix.com/en/article/accessing-your-contact-list). * You can only set values for custom fields that already exist in the Contacts * application. */ customFields?: string | number | Date; }; } declare namespace wix_stores { /** * The wix-stores.Cart module contains functionality for working with your * site's cart from client-side code. * [Read more](https://www.wix.com/corvid/reference/wix-stores.Cart.html#) */ interface Cart { /** * Adds one or more products to the cart. * [Read more](https://www.wix.com/corvid/reference/wix-stores.Cart.html#addProducts) */ addProducts(products: wix_stores.Cart.AddToCartItem[]): Promise; /** * Adds and applies a coupon to the cart. * [Read more](https://www.wix.com/corvid/reference/wix-stores.Cart.html#applyCoupon) */ applyCoupon(couponCode: string): Promise; /** * Gets the current site visitor's cart. * [Read more](https://www.wix.com/corvid/reference/wix-stores.Cart.html#getCurrentCart) */ getCurrentCart(): Promise; /** * Hides the Mini Cart. * [Read more](https://www.wix.com/corvid/reference/wix-stores.Cart.html#hideMiniCart) */ hideMiniCart(): void; /** * An event handler that is triggered when items are added or removed from a cart. * [Read more](https://www.wix.com/corvid/reference/wix-stores.Cart.html#onChange) */ onChange(handler: wix_stores.CartChangedHandler): void; /** * Removes the coupon currently applied to the cart. * [Read more](https://www.wix.com/corvid/reference/wix-stores.Cart.html#removeCoupon) */ removeCoupon(): Promise; /** * Removes a specified product from the cart. * [Read more](https://www.wix.com/corvid/reference/wix-stores.Cart.html#removeProduct) */ removeProduct(cartLineItemId: number): Promise; /** * Shows the Mini Cart. * [Read more](https://www.wix.com/corvid/reference/wix-stores.Cart.html#showMiniCart) */ showMiniCart(): void; /** * Directs the browser to navigate to the site visitor's cart. * [Read more](https://www.wix.com/corvid/reference/wix-stores.Cart.html#toCart) */ toCart(): Promise; /** * Updates the quantity of a specified line item in the cart. * [Read more](https://www.wix.com/corvid/reference/wix-stores.Cart.html#updateLineItemQuantity) */ updateLineItemQuantity(cartLineItemId: number, quantity: number): Promise; } namespace Cart { /** * An object used when adding one or more products to the cart. */ type AddToCartItem = { /** * ID of the product to add to the cart. */ productId: string; /** * Number of product units to add to the cart. */ quantity: number; /** * Specific product options to add to the cart. * If the product you're adding has options, you must specify which options to add. */ options?: wix_stores.Cart.AddToCartOptions; }; /** * An object used when adding a product to the cart with options. */ type AddToCartOptions = { /** * Product options to use when adding the * product to the cart. The object contains key:value pairs where the key is the option name and the value is the chosen option value. */ choices?: any; /** * Custom text fields to use when adding the product to the cart. */ customTextFields?: wix_stores.Cart.CustomTextField[]; }; /** * An object used to pass a custom text field when adding a product to * the cart with options. */ type CustomTextField = { /** * Custom text field title. */ title: string; /** * Custom text field value. */ value: string; }; } /** * The wix-stores.Navigate module contains functionality for navigating to * store-related pages from client-side code. * [Read more](https://www.wix.com/corvid/reference/wix-stores.Navigate.html#) */ interface Navigate { /** * Directs the browser to navigate to the site visitor's cart page. * [Read more](https://www.wix.com/corvid/reference/wix-stores.Navigate.html#toCart) */ toCart(): Promise; } /** * The wix-stores.product module contains functionality for working with your * store's products from client-side code. * [Read more](https://www.wix.com/corvid/reference/wix-stores.Product.html#) */ interface Product { /** * Gets the availability of a product based on the specified option choices. * [Read more](https://www.wix.com/corvid/reference/wix-stores.Product.html#getOptionsAvailability) */ getOptionsAvailability(productId: string, choices: any): Promise; /** * Gets a product's available variants based on the specified product ID and either option choices or variant IDs. * [Read more](https://www.wix.com/corvid/reference/wix-stores.Product.html#getVariants) */ getVariants(productId: string, options?: wix_stores.ProductVariantOptions): Promise; /** * Opens the [Quick View](https://support.wix.com/en/article/wix-stores-customizing-the-quick-view-in-the-product-gallery) modal of a specified product. * [Read more](https://www.wix.com/corvid/reference/wix-stores.Product.html#openQuickView) */ openQuickView(productId: string, options?: wix_stores.QuickViewOptions): Promise; } /** * An object representing an address. */ type CartAddress = { /** * First name. */ firstName: string; /** * Last name. */ lastName: string; /** * Email address. */ email: string; /** * Phone number. */ phone: string; /** * Address. */ address: string; }; /** * An object representing a coupon applied in a shopping cart. */ type CartAppliedCoupon = { /** * Coupon code. */ code: string; /** * Coupon unique identifier. */ couponId: string; /** * Coupon name. */ name: string; /** * Type of coupon. * One of: * * + `"BuyXGetY"` * + `"FixedPriceAmount"` * + `"FreeShipping"` * + `"MoneyOffAmount"` * + `"PercentOffRate"` */ couponType: string; /** * Value of the coupon discount. */ discountValue: string; }; /** * An object representing a visitor who abandoned a shopping cart. */ type CartBuyerInfo = { /** * Buyer's unique ID. */ id: string; /** * Buyer's email address. */ email: string; /** * Buyer's first name. */ firstName: string; /** * Buyer's last name. */ lastName: string; /** * Buyer's identity. * One of: * * + `"ADMIN"`: Buyer is the site owner. * + `"MEMBER"`: Buyer is a logged-in site member. * + `"VISITOR"`: Buyer is not logged in. * + `"CONTACT"`: A contact has been created for the buyer. */ identityType: string; /** * Buyer's phone number. */ phone: string; }; /** * An object representing a custom text field. */ type CartCustomTextField = { /** * Field title. */ title: string; /** * Field value. */ value: string; }; /** * An object representing a line item in a shopping cart. */ type CartLineItem = { /** * Cart line item ID. */ id: number; /** * Name of the line item. */ name: string; /** * Notes about the line item. */ notes: string; /** * Line item price. */ price: string; /** * Line item product ID. */ productId: string; /** * Line item quantity. */ quantity: number; /** * Line item stock keeping unit. */ sku: string; /** * Total price charged to the customer for all line items after any applicable discounts. */ totalPrice: string; /** * Line item weight. */ weight: string; /** * Type of the line item. * One of: * * + `"DIGITAL"`: Digital item. * + `"PHYSICAL"`: Physical item. * + `"CUSTOM_AMOUNT_ITEM"`: Item with a custom price. * + `"UNSPECIFIED"`: Type can't be classified due to an error. */ lineItemType: string; /** * Line item options. */ options: wix_stores.Option[]; /** * Media item. */ mediaItem: wix_stores.CartMediaItem; /** * Custom text. */ customTextFields: wix_stores.CartCustomTextField[]; }; /** * An object representing a line item's primary media. */ type CartMediaItem = { /** * Media item type. Currently only `"IMAGE"` type supported. */ type: string; /** * Media item source for media uploaded to Wix (wix:image, wix:video or external URL). */ src: string; }; /** * An object representing a shopping cart. */ type CartObj = { /** * Unique identifier of the shopping cart. */ _id: string; /** * Coupon applied in the shopping cart. */ appliedCoupon: wix_stores.CartAppliedCoupon; /** * Cart billing address. */ billingAddress: wix_stores.CartAddress; /** * The buyer's information. */ buyerInfo: wix_stores.CartBuyerInfo; /** * Cart status. Either `"INCOMPLETE"` or `"COMPLETE"`. */ status: string; /** * Currency of the shopping cart. */ currency: wix_stores.Currency; /** * The shopping cart's shipping information. */ shippingInfo: wix_stores.CartShippingInfo; /** * Items in the shopping cart. */ lineItems: wix_stores.CartLineItem[]; /** * The shopping cart's totals. */ totals: wix_stores.OrderTotals; /** * The order's units of weight. One of: `"KG"`, `"LB"`, or `"UNSPECIFIED_WEIGHT_UNIT"`. */ weightUnit: string; }; /** * An object representing shipping information. */ type CartShippingInfo = { /** * Shipment address. */ shippingAddress?: wix_stores.CartAddress; /** * Pickup address. */ pickupInfo?: wix_stores.CartAddress; }; /** * An object representing a currency. */ type Currency = { /** * The currency code. */ currency: string; /** * The currency symbol. */ symbol: string; }; /** * An object representing a media item. */ type MediaItem = { /** * Media item ID. */ id: string; /** * Media item title. */ title: string; /** * Media item description. */ description: string; /** * Media items type. Can be "image" or "video." */ type: string; /** * Media item URL. */ src: string; /** * Thumbnail URL for videos only. */ thumbnail?: string; }; /** * An object representing a line item option. */ type Option = { /** * Name of the product option. */ option: string; /** * Selected option. */ selection: string; }; /** * An object representing an order's totals. */ type OrderTotals = { /** * The subtotal of all the order's line items, excluding tax. */ subtotal: number; /** * The total shipping price, including tax. */ shipping: number; /** * The total amount of tax. */ tax: string; /** * The total calculated discount amount. */ discount: number; /** * The total price. */ total: number; /** * The total weight of the order's items. */ weight: number; /** * The total quantity of the the order's line items. */ quantity: number; }; /** * An object representing paging options. */ type PagingOptions = { /** * Maximum number of variants to retrieve. Defaults to 300. */ limit?: number; /** * Number of variants to skip before the retrieved variants. Defaults to 0. */ skip?: number; }; /** * An object representing a product variant's option choices. */ type ProductChoices = { /** * Value of the choice. This key name is * dependent on the product option. For example, if a product * has a size option, this key value will be something like "Size" and its value * will be something like "Large". * * `optionKey` is not case-sensitive. Therefore the values for the option keys "`Size`", "`SIZE`", and "`size`" are combined. */ optionKey: string; }; /** * An object representing an option for a store product. */ type ProductOption = { /** * Option type. Either `"color"` or `"drop_down"`. */ optionType: string; /** * Option name. */ name: string; /** * Option choices. */ choices: wix_stores.ProductOptionsChoice[]; }; /** * An object representing all the available options for a store product, such as "Size" or "Color". */ type ProductOptions = { /** * Name of the option. This key name *  is dependent on the options added to the product. For example, if a product has a size * option, this key will be something like `"Size"`. * * `optionKey` is not case-sensitive. Therefore the values for the option keys "`Size`", "`SIZE`", and "`size`" are combined. */ optionKey: wix_stores.ProductOption; }; /** * An object returned by the `getProductOptionsAvailability()` function representing the availability of a product. */ type ProductOptionsAvailability = { /** * Whether the product with the specified option choices is available for purchase. */ availableForPurchase: boolean; /** * An object representing all the available options for a store product. */ productOptions: wix_stores.ProductOptions; /** * Main product media item (image or video) URL. */ mainMedia: string; /** * List of product media items. */ mediaItems: wix_stores.MediaItem; /** * The variant of the product selected using the specified option choices if there is one. */ selectedVariant: wix_stores.ProductOptionsAvailabilitySelectedVariant; }; /** * An object representing the product variant selected using the `getProductOptionsAvailability()` function. */ type ProductOptionsAvailabilitySelectedVariant = { /** * Product variant stock keeping unit value. */ sku: string; /** * Product variant currency. */ currency: string; /** * Product variant price. The variant price must be greater than its discount. */ price: number; /** * Discounted product variant price. */ discountedPrice: number; /** * Product variant price formatted with the currency. */ formattedPrice: string; /** * Discounted product variant price formatted with the currency. */ formattedDiscountedPrice: string; /** * Whether the product variant is shown in the store. */ visible: boolean; /** * Whether the product variant is in stock. */ inStock: boolean; /** * Product variant weight. */ weight: number; }; /** * An object representing an options choice for a store product, such as choice "Small" for the option "Size." */ type ProductOptionsChoice = { /** * Choice value. */ value: number; /** * Choice description. */ description: number; /** * Choice media. */ media: wix_stores.ProductOptionsChoiceMedia; /** * Whether the product with this choice is in stock. */ inStock: boolean; /** * Whether the product with this option is visible. */ visible: boolean; }; /** * An object representing the choice media. */ type ProductOptionsChoiceMedia = { /** * Main choice media item (image or video thumbnail) URL. */ mainMedia: string; /** * List of choice media items. */ mediaItems: wix_stores.MediaItem; }; /** * An object representing the selection of specific variants of a product. Use only one of * `choices` or `variantIds`. */ type ProductVariantOptions = { /** * Choices of the retrieved variants. */ choices?: any; /** * IDs of the variants to retrieve. */ variantIds?: string[]; }; type QuickViewOptions = { /** * Product quantity to be displayed in the Quick View. Defaults to 1. */ quantity: number; }; /** * An object containing variant information to use when creating or updating variants. */ type VariantInfo = { /** * Variant currency. */ currency: string; /** * Variant price. The variant price must be greater than its discount. If the variant price has been updated, changes to the product price do not affect the variant price. */ price: number; /** * Discounted variant price. */ discountedPrice: number; /** * Variant price formatted with the currency. */ formattedPrice: string; /** * Discounted variant price formatted with the currency. */ formattedDiscountedPrice: string; /** * Variant weight. */ weight: number; /** * Variant stock keeping unit value. */ sku: string; /** * Whether the variant is visible in the store. */ visible: boolean; /** * Price per unit. */ pricePerUnit: number; /** * Price per unit formatted with currency symbol. */ formattedPricePerUnit: string; }; /** * An object representing a product variant item. */ type VariantItem = { /** * Unique variant ID. */ _id: string; /** * Choices of the retrieved variant in the form of an object containing a key:value pair for each variant choice. For example, if a variant has a size option, this key value will be something like "Size" and its value will be something like "Large". */ choices: any; /** * Variant information. */ variant: wix_stores.VariantInfo; }; /** * An object representing product variants. */ type Variants = { /** * List of variant items that match the specified choices or variant IDs. */ items: wix_stores.VariantItem[]; /** * Number of items in the current results page. */ length: number; /** * Total number of variants with the specified choices. */ totalCount: number; }; /** * An object representing a custom item to be added to the cart. */ type customItem = { /** * Custom item name. */ name?: string; /** * Custom item price. */ price: number; /** * Custom item quantity. */ quantity: number; /** * Note about the custom item. */ note?: string; }; /** * Function that runs when a cart changes. */ type CartChangedHandler = (cart: wix_stores.CartObj) => void; type callback = (cart: wix_stores_backend.Cart) => void; /** * Function that runs when an item is added or removed from the cart. */ type onCartChangedCallback = (cart: wix_stores_backend.Cart) => void; /** * Function that runs when a cart changes. */ type onCartChangedHandler = (cart: wix_stores_backend.Cart) => void; } declare namespace wix_users { /** * A site user. * [Read more](https://www.wix.com/corvid/reference/wix-users.User.html#) */ interface User { /** * **Deprecated.** * This property will continue to work, but a newer version is available at * [wix-members.currentMember.getMember()](https://www.wix.com/velo/reference/wix-members/currentmember/getmember). * [Read more](https://www.wix.com/corvid/reference/wix-users.User.html#id) */ readonly id: string; /** * **Deprecated.** * This property will continue to work, but a newer version is available at * [wix-members.currentMember.getMember()](https://www.wix.com/velo/reference/wix-members/currentmember/getmember). * [Read more](https://www.wix.com/corvid/reference/wix-users.User.html#loggedIn) */ readonly loggedIn: boolean; /** * **Deprecated.** * This property will continue to work, but a newer version is available at * [wix-members.currentMember.getRoles()](https://www.wix.com/velo/reference/wix-members/currentmember/getroles). * [Read more](https://www.wix.com/corvid/reference/wix-users.User.html#role) */ readonly role: string; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-members.currentMember.getMember()](https://www.wix.com/velo/reference/wix-members/currentmember/getmember). * [Read more](https://www.wix.com/corvid/reference/wix-users.User.html#getEmail) */ getEmail(): Promise; /** * Gets the user's member pricing plan. * [Read more](https://www.wix.com/corvid/reference/wix-users.User.html#getPricingPlans) */ getPricingPlans(): Promise; /** * **Deprecated.** * This function will continue to work, but a newer version is available at * [wix-members.currentMember.getRoles()](https://www.wix.com/velo/reference/wix-members/currentmember/getroles). * [Read more](https://www.wix.com/corvid/reference/wix-users.User.html#getRoles) */ getRoles(): Promise; } namespace User { /** * An object returned by the `getPricingPlans()` function representing a user's [pricing plans](https://support.wix.com/en/article/adding-and-setting-up-the-paid-plans-app). */ type PricingPlan = { /** * The pricing plan's name. */ name: string; /** * The pricing plan's start date. */ startDate?: Date; /** * The pricing plan's expiry date. */ expiryDate?: Date; }; /** * An object returned by the `getRoles()` function representing a user's [roles](https://support.wix.com/en/article/creating-member-roles-6943237). */ type UserRole = { /** * Role name as defined in the site's dashboard or one of "Admin" or "Member". */ name: string; /** * Role description, if defined in the site's dashboard. */ description?: string; }; } /** * The event that occurred when the consent policy changed. */ type ConsentPolicyChangedEvent = {}; /** * An object used by the `promptLogin()` function to determine how the login dialog box appears. */ type LoginOptions = { /** * What type of login experience to present: `"login"` or `"signup"`. Defaults to the option chosen in the Member Signup Settings panel in the Editor. */ mode?: string; /** * Deprecated. */ lang?: string; /** * Whether the login form should be modal (`true`) or full screen (`false`). Defaults to `false` if the property doesn't exist. */ modal?: boolean; }; /** * The current visitor's consent policy settings. */ type Policy = { /** * Consent for mandatory cookies for Wix websites, such as for security cookies. Wix places these cookies on your device and these cookies do not require visitor consent. Always `true`. */ essential: boolean; /** * Consent for cookies placed on the visitor's device that "remember" visitor settings to improve visitor experience. For example, an indication that the visitor dismissed a popup. The default is `true`. */ functional: boolean; /** * Consent for cookies used for analytics, such as Wix analytics, Google Analytics, Yandex Metrica, and so on. The default is `true`. */ analytics: boolean; /** * Consent for cookies used for advertising purposes. This includes 3rd-party scripts and pixels that may potentially place advertising cookies on the device (such as Twitter page view and Facebook Pixel). The default is `true`. */ advertising: boolean; /** * Consent for a visitor's personal data to be transferred to a 3rd party (such as Google Analytics, Facebook Pixel, and FullStory). The default is `true`. */ dataToThirdParty: boolean; }; /** * The complete details of the current user's consent policy. */ type PolicyDetails = { /** * Whether the policy is the default consent policy set by the site owner. If `true`, either the user has not set a policy or the site owner has reset the policy. */ defaultPolicy: boolean; /** * An object representing the visitor's current consent policy. */ policy: wix_users.Policy; /** * If a cookie exists in the browser defining the current consent policy, the date the policy was set. Otherwise, undefined. */ createdDate?: Date; }; /** * An object that contains information about a site registration. */ type RegistrationOptions = { /** * Contact information. */ contactInfo?: wix_crm.ContactInfo; /** * Sets the [privacy status](https://support.wix.com/en/article/member-privacy-settings-for-groups) of a new member upon registration. * One of: * * + `"PUBLIC"`: Sets the new member status to public. A member whose status is public is a member of the site's community. * + `"PRIVATE"`: Sets the new member status to private. A member whose status is private is not a member of the site's community. The default is set to private. */ privacyStatus?: string; }; /** * An object that contains information about the results of a site registration. */ type RegistrationResult = { /** * Registration status. Either "Pending" or "Active". */ status: string; /** * A token for approving the user as * a site member using the [approveByToken()](wix-users-backend.html#approveByToken) * function. The token is safe to pass via email or from client-side code to * backend code. The token is only available when `status` is "Pending". */ approvalToken?: string; /** * The user that has been registered. */ user: wix_users.User; }; /** * An object used when sending a Triggered Email. */ type TriggeredEmailOptions = { /** * An object with `key:value` pairs where each * `key` is a variable in the email template created in Triggered Emails and its * corresponding `value` is the value to insert into the template in place of * variable. The values must be strings. */ variables: any; }; /** * Function that runs when a visitor's consent policy was changed using [`setConsentPolicy()`](#setConsentPolicy). */ type ConsentPolicyChangedHandler = (event: wix_users.ConsentPolicyChangedEvent) => void; /** * Function that runs when a user has logged in. */ type LoginHandler = (user: wix_users.User) => void; }